@import url('https://fonts.googleapis.com/css2?family=IM+Fell+English+SC&display=swap');

:root {
  color-scheme: dark;
  --bg: #141311;
  --panel: #1d1b19;
  --panel-raised: #27231f;
  --panel-hover: #302a24;
  --border: #38312a;
  --text: #f7f1e8;
  --muted: #b6ada2;
  --subtle: #656977;
  --accent: #f2a64b;
  --accent-dark: #3a281a;
  --danger: #ff8c8c;
  font-family: "IM Fell English SC", Georgia, serif;
  background: var(--bg);
  color: var(--text);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: var(--bg); }
button, input, select { font: inherit; }
button { color: inherit; }
.app-shell { min-height: 100vh; }
.app-shell[hidden], .auth-gate[hidden] { display: none !important; }
.auth-gate { min-height: 100vh; display: grid; place-items: center; padding: 28px 18px; background: var(--bg); }
.auth-card { width: min(100%, 440px); padding: clamp(24px, 5vw, 38px); border: 1px solid #373737; border-radius: 14px; background: #1d1d1d; box-shadow: 0 24px 70px #0006; }
.auth-brand { margin: 0 0 37px; }
.auth-card > .eyebrow { margin: 0 0 10px; color: #efbc78; }
.auth-card h1 { margin-bottom: 10px; font-size: clamp(29px, 7vw, 39px); }
.auth-card .page-subtitle { margin-bottom: 23px; }
.auth-form { display: grid; gap: 8px; }
.auth-form[hidden], .auth-switch[hidden], .auth-verification[hidden] { display: none !important; }
.auth-form > label:not(.auth-remember), .auth-confirm-wrap > label { margin-top: 5px; color: #d7d8de; font-size: 11px; font-weight: 600; }
.auth-form input[type="email"], .auth-form input[type="password"] { width: 100%; height: 42px; padding: 0 11px; border: 1px solid #383c46; border-radius: 7px; outline: 0; background: #14161c; color: var(--text); font-size: 12px; }
.auth-form input[type="email"]:focus, .auth-form input[type="password"]:focus { border-color: #b8783b; box-shadow: 0 0 0 3px #f2a64b18; }
.auth-field-hint { margin: -3px 0 2px; color: #858994; font-size: 10px; line-height: 1.5; }
.auth-field-hint[hidden] { display: none; }
.auth-confirm-wrap { display: grid; gap: 8px; }
.auth-confirm-wrap[hidden] { display: none; }
.auth-remember { display: flex; align-items: center; gap: 9px; margin: 8px 0 3px; color: #b9bbc4; font-size: 11px; cursor: pointer; }
.auth-remember input { width: 15px; height: 15px; margin: 0; accent-color: var(--accent); }
.auth-submit { width: 100%; min-height: 42px; margin-top: 6px; }
.auth-guest-button { width: 100%; min-height: 42px; margin: 0 0 8px; }
.auth-resume-guest { display: block; margin: 12px auto 0; }
.auth-resume-guest[hidden] { display: none; }
.auth-forgot-password { justify-self: center; padding: 3px 6px; }
.auth-forgot-password[hidden] { display: none !important; }
.auth-status { padding: 10px 11px; border: 1px solid #694246; border-radius: 7px; font-size: 11px; line-height: 1.5; }
.auth-status.error { background: #2b2021; color: #ffc0c0; }
.auth-status.success { border-color: #3e6047; background: #1d2b22; color: #a9e3b5; }
.auth-switch { display: flex; justify-content: center; align-items: center; gap: 6px; margin-top: 17px; color: #9295a0; font-size: 11px; }
.auth-switch-button { min-height: 28px; padding: 0 4px; color: #f3b974; }
.auth-verification { display: grid; gap: 10px; margin-top: 19px; padding: 16px; border: 1px solid #39343a; border-radius: 9px; background: #191b22; }
.auth-verification .eyebrow { margin: 0; color: #efbc78; }
.auth-verification h2 { margin: 0; font: 600 18px "IM Fell English SC", Georgia, serif; }
.auth-verification p:not(.eyebrow) { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.auth-test-link { width: 100%; text-decoration: none; }
.auth-verification-back { justify-self: center; }
.auth-verification .auth-form { margin-top: 4px; }
.auth-local-note { margin: 20px 0 0; color: #858994; font-size: 10px; line-height: 1.6; }
.auth-local-note strong { color: #d5a5a8; }

.sidebar {
  width: 244px;
  position: fixed;
  inset: 0 auto 0 0;
  display: flex;
  flex-direction: column;
  padding: 27px 17px 19px;
  background: #1a1714;
  border-right: 1px solid #3b3024;
  z-index: 3;
}
.brand { display: flex; align-items: center; gap: 10px; margin: 0 8px 55px; text-decoration: none; }
.brand-mark { width: 48px; height: 48px; flex-shrink: 0; border-radius: 9px; object-fit: cover; }
.brand-name { min-width: 0; color: #f5e1bf; font: 400 20px/1.08 "IM Fell English SC", Georgia, serif; letter-spacing: .045em; text-transform: uppercase; }
.brand-name span { display: block; color: #efaa5c; background: linear-gradient(90deg, #ffd78a, #e77a4e); background-clip: text; -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.sidebar .brand-name { font-size: 17px; }
.nav-label, .eyebrow { color: var(--subtle); font-size: 10px; font-weight: 700; letter-spacing: 1.25px; }
.nav-label { margin: 0 10px 12px; }
.primary-nav { display: grid; gap: 5px; }
.nav-item { width: 100%; min-height: 43px; display: flex; align-items: center; gap: 12px; padding: 0 12px; border: 0; border-radius: 8px; background: transparent; color: #a9abb5; text-align: left; cursor: pointer; transition: background .16s, color .16s; }
.nav-item > span:first-child { width: 18px; color: #848894; font-size: 20px; text-align: center; }
.nav-item:hover { background: #242424; color: var(--text); }
.nav-item.active { background: #303030; color: var(--accent); font-weight: 600; }
.nav-item.active > span:first-child { color: var(--accent); }
.nav-count { margin-left: auto; min-width: 22px; padding: 2px 6px; border-radius: 20px; background: #2c3039; color: #babcc5; font-size: 11px; text-align: center; }
.sidebar-bottom { margin-top: auto; }
.sidebar-note { display: flex; gap: 10px; padding: 13px 10px; border: 1px solid #413326; border-radius: 9px; background: #24201b; }
.note-icon { color: var(--accent); }
.sidebar-note p { margin: 0; color: #d7d8de; font-size: 11px; line-height: 1.65; }
.sidebar-note p span { color: var(--muted); }
.sidebar-credit { margin: 17px 3px 0; color: #60636d; font-size: 10px; }

.main-content { min-height: 100vh; margin-left: 244px; }
.topbar { height: 68px; display: flex; justify-content: space-between; align-items: center; padding: 0 5.2%; border-bottom: 1px solid #392e24; }
.breadcrumb { display: flex; align-items: center; gap: 11px; color: #818490; font-size: 12px; }
.breadcrumb-slash { color: #4b4e57; }
.breadcrumb strong { color: #e4e5e9; font-weight: 500; }
.topbar-right { display: flex; align-items: center; gap: 8px; color: #828590; font-size: 11px; }
.account-change-password, .account-sign-out { padding: 0 5px; white-space: nowrap; }
.account-change-password[hidden], .account-sign-out[hidden] { display: none !important; }
.guest-save-notice { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 18px 5.2% 0; padding: 12px 15px; border: 1px solid #694246; border-radius: 8px; background: #2b2021; color: #ffc0c0; font-size: 12px; line-height: 1.5; }
.guest-save-notice[hidden] { display: none !important; }
.guest-save-notice .button { flex: 0 0 auto; }
#cloud-save-notice { flex-wrap: wrap; }
#cloud-save-status { flex: 1 1 240px; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px #f2a64b66; }
.view { display: none; max-width: 1440px; margin: 0 auto; padding: 53px 5.2% 55px; }
.view.active { display: block; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 29px; }
.page-heading .eyebrow { margin: 0 0 11px; color: #efbc78; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 9px; font: 400 clamp(30px, 3.8vw, 43px)/1.16 "IM Fell English SC", Georgia, serif; letter-spacing: .01em; }
h1 span { color: var(--accent); }
.page-subtitle { max-width: 570px; margin-bottom: 0; color: var(--muted); font-size: 13px; line-height: 1.65; }
.search-bar { height: 54px; display: flex; align-items: center; gap: 13px; margin-bottom: 39px; padding: 0 16px; border: 1px solid #3b332c; border-radius: 9px; background: #1d1b19; box-shadow: 0 8px 24px #00000012; }
.search-bar:focus-within { border-color: #b8783b; box-shadow: 0 0 0 3px #f2a64b18; }
.search-icon { color: #858994; font-size: 24px; transform: rotate(-15deg); }
.search-bar input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 13px; }
.search-bar input::placeholder { color: #777b86; }
.discover-category-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: -20px 0 25px; color: var(--muted); font-size: 11px; }
.discover-category-filter label { font-weight: 600; }
kbd { padding: 4px 6px; border: 1px solid #393d47; border-radius: 4px; color: #888b94; font: 9px "IM Fell English SC", Georgia, serif; letter-spacing: .5px; }
.section-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 18px; }
.section-heading h2 { margin: 0 0 5px; font: 400 20px "IM Fell English SC", Georgia, serif; letter-spacing: .01em; }
.section-subtitle { margin: 0; color: var(--muted); font-size: 11px; }
.result-count { color: #858994; font-size: 11px; }
.catalog-controls { display: flex; align-items: center; gap: 12px; }
.catalog-updated { color: #727681; font-size: 9px; }
.refresh-button { min-height: 32px; padding: 0 10px; font-size: 10px; }
.catalog-pagination { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 25px 0 5px; color: #9497a1; font-size: 10px; }
.catalog-pagination .button { min-width: 150px; }
.discover-filter { margin: -10px 0 25px; border: 1px solid #3b332c; border-radius: 8px; background: #1c1a18; }
.discover-filter summary { padding: 12px 16px; cursor: pointer; font-size: 12px; font-weight: 700; color: #e7e8ec; }
.discover-filter[open] summary { border-bottom: 1px solid #3b332c; }
.discover-filter-body { padding: 16px; }
.illustrator-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 12px; }
.illustrator-toolbar .search-bar { flex: 1 1 260px; margin: 0; }
.illustrator-status { margin: 12px 0 18px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.illustrator-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.illustrator-item { min-width: 0; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px; border: 1px solid #3b332c; border-radius: 7px; background: #27231f; color: #e7e8ec; text-align: left; cursor: pointer; }
.illustrator-item span { min-width: 0; overflow-wrap: anywhere; }
.illustrator-item small { flex-shrink: 0; color: #a7aab4; }
.illustrator-item:hover, .illustrator-item.active { border-color: #bd8148; background: #30271f; }
.illustrator-card-section { margin-top: 30px; scroll-margin-top: 110px; }
.dialog-illustrator-link { text-align: right; overflow-wrap: anywhere; }

.card-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px 15px; }
.card-tile { min-width: 0; overflow: hidden; border: 1px solid #342f2a; border-radius: 10px; background: var(--panel); transition: transform .18s, border-color .18s, box-shadow .18s; }
.card-tile:hover { transform: translateY(-3px); border-color: #474d59; box-shadow: 0 14px 28px #00000026; }
.card-art { position: relative; display: grid; place-items: center; min-height: 236px; padding: 16px; overflow: hidden; background: radial-gradient(ellipse at 50% 44%, #3b342d 0%, #2a2520 55%, #1e1c19 100%); cursor: pointer; }
.art-open { position: absolute; inset: 0; z-index: 0; width: 100%; display: grid; place-items: center; padding: 16px; border: 0; background: transparent; cursor: pointer; }
.card-art img { display: block; width: auto; height: 213px; max-width: 100%; object-fit: contain; filter: drop-shadow(0 10px 12px #0006); transition: transform .2s; }
.card-tile:hover .card-art img { transform: scale(1.035) rotate(-1deg); }
.card-art img.image-missing { display: none; }
.image-fallback { display: none; position: absolute; color: #777c88; font-size: 12px; text-align: center; }
.image-fallback.visible, .card-art:has(img.image-missing) .image-fallback { display: block; }
.quick-add { position: absolute; z-index: 1; right: 10px; bottom: 10px; min-width: 46px; height: 31px; display: flex; align-items: center; justify-content: center; gap: 4px; padding: 0 7px; border: 1px solid #ffffff20; border-radius: 8px; background: #111318d9; color: var(--accent); font-size: 17px; cursor: pointer; opacity: 0; transform: translateY(3px); transition: .16s; }
.quick-add-count { color: #fff; font-size: 10px; font-weight: 700; line-height: 1; }
.card-tile:hover .quick-add, .quick-add:focus-visible { opacity: 1; transform: translateY(0); }
.card-info { padding: 12px 12px 11px; }
.card-title-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.card-title-row h3 { min-width: 0; overflow: hidden; margin: 0; }
.card-name { display: block; max-width: 100%; overflow: hidden; padding: 0; border: 0; background: transparent; color: #f0f0f3; font: 600 13px "IM Fell English SC", Georgia, serif; text-align: left; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.card-price { flex-shrink: 0; color: var(--accent); font-size: 11px; font-weight: 600; }
.card-meta { display: flex; justify-content: space-between; gap: 8px; margin-top: 7px; color: #858995; font-size: 10px; }
.card-set { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-number { flex-shrink: 0; color: #6f737e; }
.api-footnote { margin: 24px 0 0; color: #696d78; font-size: 10px; line-height: 1.5; }
.notice { margin: 0 0 18px; padding: 13px 15px; border: 1px solid #593c3c; border-radius: 8px; background: #2b2021; color: #ffc0c0; font-size: 12px; line-height: 1.5; }

.button { min-height: 38px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 0 14px; border: 1px solid transparent; border-radius: 7px; font-size: 11px; font-weight: 600; cursor: pointer; transition: .16s; }
.button-primary { background: var(--accent); color: #171b13; }
.button-primary:hover { background: #ffc06d; transform: translateY(-1px); }
.button-secondary { border-color: #453b31; background: #29241f; color: #efe7dd; }
.button-secondary:hover { border-color: #76583d; background: #352b23; }
.button:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.compact-heading { margin-bottom: 31px; }
.stats-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; margin-bottom: 37px; }
.stat-card { padding: 16px 18px; border: 1px solid #342f2a; border-radius: 9px; background: var(--panel); }
.stat-label { margin-bottom: 8px; color: #9699a4; font-size: 10px; }
.stat-value { margin: 0; font: 700 22px "IM Fell English SC", Georgia, serif; letter-spacing: -.5px; }
.empty-state { padding: 62px 20px 50px; border: 1px dashed #353944; border-radius: 10px; text-align: center; }
.empty-icon { color: #858b96; font-size: 28px; }
.empty-state h3 { margin: 12px 0 7px; font: 600 17px "IM Fell English SC", Georgia, serif; }
.empty-state p { margin-bottom: 19px; color: var(--muted); font-size: 12px; }
.collection-card .card-art { min-height: 216px; }
.collection-card .card-art img { height: 194px; }
.collection-card .card-info { padding-bottom: 8px; }
.quantity-control { display: flex; align-items: center; gap: 8px; margin-top: 11px; }
.quantity-control button { width: 24px; height: 23px; border: 1px solid #393d47; border-radius: 5px; background: #22252d; color: #e4e5e9; cursor: pointer; }
.quantity-control button:hover { border-color: #6c784d; color: var(--accent); }
.quantity-control span { min-width: 16px; color: #d8d9df; font-size: 11px; text-align: center; }
.quantity-control .remove-card { width: auto; margin-left: auto; padding: 0 7px; color: #999ca6; font-size: 10px; }

.deck-builder-actions { display: flex; align-items: center; gap: 8px; }
.deck-builder-actions .button { white-space: nowrap; }
.deck-selection-panel { margin: -8px 0 18px; padding: 14px; border: 1px solid #3b332c; border-radius: 9px; background: #1d1b19; }
.deck-selection-heading { margin-bottom: 11px; }
.deck-selection-heading h3 { margin: 0 0 5px; font: 600 13px "IM Fell English SC", Georgia, serif; }
.deck-selection-list { display: grid; gap: 7px; }
.deck-selection-item { display: grid; grid-template-columns: minmax(0, 1fr); align-items: center; gap: 8px; padding: 5px; border: 1px solid #3b332c; border-radius: 8px; background: #27231f; }
.deck-selection-item.active { border-color: #8c623c; background: #292227; }
.deck-selection-button { min-width: 0; display: flex; align-items: center; gap: 11px; padding: 5px; border: 0; border-radius: 5px; background: transparent; color: #e7e8ec; text-align: left; cursor: pointer; }
.deck-selection-button:hover .deck-selection-copy strong { color: #ffe2b7; }
.deck-selection-types, .deck-current-types { display: flex; align-items: center; gap: 5px; }
.deck-selection-copy { min-width: 0; flex: 1; }
.deck-selection-copy strong, .deck-selection-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.deck-selection-copy strong { font-size: 11px; font-weight: 650; }
.deck-selection-copy small { margin-top: 3px; color: #9295a0; font-size: 9px; }
.deck-selection-open { color: #e8ad70; font-size: 9px; white-space: nowrap; }
.deck-no-types { color: #858994; font-size: 9px; white-space: nowrap; }
.deck-toolbar { display: flex; align-items: center; gap: 12px; margin: 10px 0 22px; }
.deck-toolbar select { min-width: 210px; height: 39px; padding: 0 34px 0 12px; border: 1px solid #373b46; border-radius: 7px; background: #221e1a; color: #ededf0; font-size: 12px; }
.deck-size { color: #9295a0; font-size: 11px; }
.deck-current-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: -8px 0 13px; padding: 11px 13px; border: 1px solid #3b332c; border-radius: 8px; background: #1d2027; }
.deck-current-identity { min-width: 0; display: flex; align-items: center; gap: 10px; }
.deck-current-identity h3 { overflow: hidden; margin: 0; font: 600 13px "IM Fell English SC", Georgia, serif; text-overflow: ellipsis; white-space: nowrap; }
.deck-current-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.deck-current-actions .button { min-height: 32px; padding: 0 10px; font-size: 10px; }
.deck-current-types .trainer-energy-symbol { width: 25px; height: 25px; flex-basis: 25px; font-size: 9px; }
.deck-type-symbol { width: 15px; height: 15px; display: block; fill: currentColor; }
.deck-type-picker { min-width: 100%; flex: 1 0 100%; }
.deck-type-picker-label { margin: 0; color: #aaadb6; font-size: 10px; line-height: 1.5; }
.deck-type-options { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.deck-type-option { min-height: 35px; display: flex; align-items: center; gap: 6px; padding: 4px 8px; border: 1px solid #343843; border-radius: 6px; background: #27231f; color: #d8d9df; font-size: 9px; cursor: pointer; }
.deck-type-option input { width: 13px; height: 13px; margin: 0; accent-color: #d85e66; }
.deck-type-option:focus-within { border-color: #aa733e; }
.deck-type-option .trainer-energy-symbol { width: 24px; height: 24px; flex-basis: 24px; font-size: 8px; }
.deck-type-legacy { display: block; margin-top: 2px; color: #999ca6; font-size: 7px; }
.deck-editor-form { display: grid; gap: 10px; margin: 0 0 16px; padding: 12px; border: 1px solid #3b332c; border-radius: 8px; background: #1d1b19; }
.deck-editor-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.deck-layout { display: grid; grid-template-columns: minmax(0, 1fr) 250px; align-items: start; gap: 18px; }
.deck-card-list { overflow: hidden; border: 1px solid #342f2a; border-radius: 9px; background: var(--panel); }
.deck-row { min-height: 63px; display: flex; align-items: center; gap: 12px; padding: 8px 13px; border-bottom: 1px solid #342f2a; }
.deck-row:last-child { border-bottom: 0; }
.deck-row img { width: 34px; height: 46px; border-radius: 3px; background: #30333c; object-fit: contain; }
.deck-row-name { min-width: 0; flex: 1; }
.deck-row-name strong { display: block; overflow: hidden; color: #e7e8ec; font-size: 11px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.deck-row-name span { display: block; overflow: hidden; margin-top: 4px; color: #858994; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.deck-row-qty { color: #c7c9d0; font-size: 10px; }
.deck-row button { width: 26px; height: 26px; border: 1px solid #3b3f49; border-radius: 6px; background: #242730; color: #cdd0d8; cursor: pointer; }
.deck-row button:hover { border-color: #727d55; color: var(--accent); }
.deck-summary { padding: 17px; border: 1px solid #373737; border-radius: 9px; background: #1d1d1d; }
.deck-summary-icon { width: 31px; height: 31px; display: grid; place-items: center; margin-bottom: 17px; border-radius: 8px; background: #483023; color: var(--accent); font-size: 18px; }
.deck-summary .eyebrow { margin-bottom: 7px; color: #e8ad70; font-size: 9px; }
.deck-summary h2 { margin-bottom: 15px; font: 600 14px "IM Fell English SC", Georgia, serif; }
.deck-progress { height: 6px; overflow: hidden; border-radius: 9px; background: #34373d; }
.deck-progress span { height: 100%; display: block; width: 0; border-radius: inherit; background: var(--accent); transition: width .2s; }
.deck-progress-label { margin: 8px 0 12px; color: #d4d5db; font-size: 10px; }
.deck-hint { margin-bottom: 16px; color: #92959f; font-size: 10px; line-height: 1.6; }
.full-width { width: 100%; }
.deck-empty { margin-top: 18px; }
.deck-template-section { margin-top: 30px; }
.deck-template-heading { margin-bottom: 12px; }
.deck-template-heading h2 { margin: 0 0 5px; font: 600 16px "IM Fell English SC", Georgia, serif; }
.deck-template-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.deck-template-card { display: flex; min-width: 0; flex-direction: column; justify-content: space-between; gap: 18px; padding: 15px; border: 1px solid #3b332c; border-radius: 9px; background: linear-gradient(145deg, #22232b, #1e1c19); }
.deck-template-card .eyebrow { margin-bottom: 8px; color: #e8ad70; font-size: 8px; letter-spacing: .7px; }
.deck-template-card h3 { margin: 0 0 7px; font: 600 14px "IM Fell English SC", Georgia, serif; }
.deck-template-card > div > p:not(.eyebrow) { min-height: 36px; margin: 0 0 10px; color: #a4a7b0; font-size: 10px; line-height: 1.6; }
.deck-template-count { color: #858994; font-size: 9px; }
.deck-template-actions { display: grid; gap: 9px; }
.deck-template-actions .button { width: 100%; min-height: 34px; font-size: 10px; }
.deck-template-actions .button:disabled { border-color: #3a3d45; background: #282b32; color: #9699a3; cursor: default; }
.deck-template-actions a, .deck-meta-links a { color: #e9b879; font-size: 10px; text-decoration: none; }
.deck-template-actions a { display: flex; align-items: center; justify-content: space-between; }
.deck-template-actions a:hover, .deck-meta-links a:hover { color: #ffe2b7; }
.deck-template-note { margin: 12px 0; color: #9295a0; font-size: 10px; line-height: 1.6; }
.deck-meta-links { display: flex; flex-wrap: wrap; gap: 8px; }
.deck-meta-links a { padding: 8px 10px; border: 1px solid #353943; border-radius: 6px; background: #27231f; }

.card-dialog { width: min(660px, calc(100vw - 28px)); max-height: min(720px, calc(100vh - 28px)); overflow: auto; padding: 0; border: 1px solid #3a3e48; border-radius: 13px; background: #221e1a; color: var(--text); box-shadow: 0 25px 90px #0009; }
.card-dialog::backdrop { background: #08090bd1; backdrop-filter: blur(4px); }
.dialog-close { position: sticky; z-index: 2; top: 11px; float: right; width: 31px; height: 31px; margin: 11px 11px -42px 0; border: 1px solid #ffffff20; border-radius: 50%; background: #181a20e8; color: #fff; font-size: 21px; line-height: 1; cursor: pointer; }
.dialog-layout { display: grid; grid-template-columns: 220px 1fr; min-height: 340px; }
.owned-dex-dialog { padding-bottom: 24px; }
.owned-dex-card-display .dialog-art { position: static; min-height: 0; padding: 20px 20px 12px; }
.owned-dex-card-display .dialog-art img { width: auto; max-width: 100%; max-height: 235px; }
.owned-dex-card-display .dialog-art-unavailable { min-height: 100px; align-content: center; }
.owned-dex-card-details { max-width: 440px; margin: 0 auto; padding: 14px 24px 0; text-align: center; }
.owned-dex-card-details .eyebrow { margin-bottom: 8px; color: #efbc78; }
.owned-dex-card-details h2 { margin-bottom: 7px; font: 700 23px "IM Fell English SC", Georgia, serif; letter-spacing: -.7px; }
.owned-dex-card-details .dialog-meta { margin-bottom: 14px; }
.owned-dex-card-details .dialog-card-facts { margin-bottom: 12px; text-align: left; }
.owned-dex-card-picker { padding: 0 24px; }
.owned-dex-card-picker h3 { margin: 0 0 5px; font: 600 15px "IM Fell English SC", Georgia, serif; }
.owned-dex-card-picker p { margin: 0 0 12px; color: var(--muted); font-size: 11px; }
.owned-dex-card-options { display: flex; gap: 10px; padding: 2px 2px 10px; overflow-x: auto; scrollbar-color: #55505a #221e1a; }
.owned-dex-card-option { display: grid; align-content: start; gap: 5px; flex: 0 0 120px; min-width: 0; padding: 8px; border: 1px solid #383c46; border-radius: 8px; background: #27231f; color: var(--text); text-align: left; cursor: pointer; }
.owned-dex-card-option:hover, .owned-dex-card-option:focus-visible, .owned-dex-card-option[aria-pressed="true"] { border-color: var(--accent); outline: 0; }
.owned-dex-card-option[aria-pressed="true"] { background: #30271f; }
.owned-dex-card-option-art { display: grid; place-items: center; height: 95px; background: #191b22; }
.owned-dex-card-option-art img { grid-area: 1 / 1; width: auto; max-width: 100%; max-height: 100%; object-fit: contain; }
.owned-dex-card-option-art img.image-missing { display: none; }
.owned-dex-card-option-unavailable { display: none; grid-area: 1 / 1; color: #b8bac2; font-size: 9px; text-align: center; }
.owned-dex-card-option-unavailable.visible, .owned-dex-card-option-art img.image-missing + .owned-dex-card-option-unavailable { display: block; }
.owned-dex-card-option strong, .owned-dex-card-option small { overflow-wrap: anywhere; }
.owned-dex-card-option strong { font-size: 10px; }
.owned-dex-card-option small { color: #a6a9b3; font-size: 9px; }
.dialog-art { position: sticky; top: 0; align-self: start; min-height: 340px; display: grid; place-items: center; padding: 35px 20px; background: radial-gradient(ellipse at center, #353946, #27231f 70%); }
.dialog-art img { grid-area: 1 / 1; width: 100%; max-height: 300px; object-fit: contain; filter: drop-shadow(0 10px 13px #0007); }
.dialog-art img.image-missing { display: none; }
.dialog-art-unavailable { display: none; grid-area: 1 / 1; color: #b8bac2; font-size: 11px; text-align: center; }
.dialog-art-unavailable.visible, .dialog-art img.image-missing + .dialog-art-unavailable { display: block; }
.dialog-details { padding: 34px 27px 25px; }
.dialog-details .eyebrow { margin-bottom: 8px; color: #efbc78; }
.dialog-details h2 { margin-bottom: 7px; font: 700 23px "IM Fell English SC", Georgia, serif; letter-spacing: -.7px; }
.dialog-meta { margin-bottom: 19px; color: #999ca6; font-size: 11px; }
.dialog-card-facts { display: grid; gap: 9px; margin: -8px 0 17px; padding: 12px; border: 1px solid #343844; border-radius: 7px; background: #27231f; font-size: 10px; }
.dialog-card-facts > div { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.dialog-card-facts dt { flex-shrink: 0; color: #a6a9b3; }
.dialog-card-facts dd { min-width: 0; margin: 0; color: #e8e9ed; font-weight: 600; text-align: right; overflow-wrap: anywhere; }
.dialog-rarity, .dialog-card-types { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px; }
.dialog-card-type { display: inline-flex; align-items: center; gap: 5px; }
.dialog-card-type .trainer-energy-symbol { width: 22px; height: 22px; flex-basis: 22px; }
.dialog-card-type .deck-type-symbol { width: 13px; height: 13px; }
.rarity-symbol { display: inline-flex; align-items: center; gap: 1px; padding: 2px 3px; border-radius: 4px; background: #f0eee8; color: #18181b; }
.rarity-symbol svg { width: 13px; height: 13px; fill: currentColor; }
.rarity-silver { color: #79838e; }
.rarity-gold { color: #ad7910; }
.rarity-pink { color: #d13a8e; }
.rarity-mega svg:first-child { color: #e46b9b; }
.rarity-mega svg:last-child { color: #58a66f; }
.rarity-outline svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
.dialog-price { margin-bottom: 17px; padding: 12px 13px; border: 1px solid #4b3034; border-radius: 8px; background: #292124; }
.dialog-price span { display: block; color: #a6ac9c; font-size: 9px; }
.dialog-price strong { display: block; margin-top: 5px; color: var(--accent); font: 700 19px "IM Fell English SC", Georgia, serif; }
.tcgplayer-link { color: var(--accent); text-decoration: none; }
.tcgplayer-link:hover { color: #ffd095; text-decoration: underline; }
.marketplace-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; margin: -5px 0 17px; }
.marketplace-label { grid-column: 1 / -1; color: #a6ac9c; font-size: 9px; }
.marketplace-link { min-height: 36px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 10px; border: 1px solid #4b3034; border-radius: 7px; background: #292124; color: #e7e9e3; font-size: 10px; font-weight: 600; text-decoration: none; }
.marketplace-link:hover { border-color: #b78049; background: #382b20; color: #fff; }
.ebay-option { border-color: #3a3e48; background: #22252d; }
.ebay-option:hover { border-color: #68717e; background: #2a2e38; }
.dialog-description { margin: 0 0 18px; color: #b8bac2; font-size: 11px; line-height: 1.65; }
.dialog-collection-tracker { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; margin-bottom: 12px; padding: 12px; border: 1px solid #3a3e48; border-radius: 8px; background: #27231f; }
.dialog-collection-copy span, .dialog-collection-copy strong { display: block; }
.dialog-collection-copy span { margin-bottom: 4px; color: #a6a9b3; font-size: 9px; }
.dialog-collection-copy strong { color: #e8e9ed; font-size: 11px; }
.dialog-collection-copy small { display: block; margin-top: 5px; color: #a6a9b3; font-size: 9px; }
.dialog-collection-copy .dialog-saved-details { max-width: 290px; line-height: 1.5; }
.dialog-copy-selector { display: grid; justify-items: end; gap: 5px; }
.dialog-copy-selector > span { color: #a6a9b3; font-size: 9px; }
.dialog-quantity-control { display: flex; align-items: center; gap: 10px; }
.dialog-quantity-control button { width: 30px; height: 30px; border: 1px solid #454a56; border-radius: 6px; background: #292d37; color: #fff; font-size: 17px; cursor: pointer; }
.dialog-quantity-control button:not(:disabled):hover { border-color: var(--accent); }
.dialog-quantity-control button:disabled { opacity: .5; cursor: not-allowed; }
.dialog-quantity-control output { min-width: 20px; color: #fff; font-size: 12px; font-weight: 700; text-align: center; }
.dialog-quantity-save { grid-column: 1 / -1; width: 100%; }
.dialog-quantity-save:disabled { opacity: .58; cursor: not-allowed; }
.dialog-edit-collection-details { grid-column: 1 / -1; justify-self: start; }
.collection-card-details { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin-top: 8px; }
.collection-card-details span { padding: 3px 6px; border: 1px solid #3c414c; border-radius: 10px; background: #222630; color: #bfc2cc; font-size: 8px; }
.collection-card-details p { display: -webkit-box; width: 100%; margin: 0; overflow: hidden; color: #9da0aa; font-size: 9px; line-height: 1.45; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.collection-entry-dialog { width: min(440px, calc(100vw - 28px)); max-height: min(680px, calc(100vh - 28px)); overflow: auto; padding: 0; border: 1px solid #3a3e48; border-radius: 12px; background: #221e1a; color: var(--text); box-shadow: 0 25px 90px #0009; }
.collection-entry-dialog::backdrop { background: #08090ba8; backdrop-filter: blur(3px); }
.collection-entry-form { padding: 27px; }
.collection-entry-form .eyebrow { margin-bottom: 8px; color: #efbc78; }
.collection-entry-form h2 { margin: 0 34px 8px 0; font: 700 20px "IM Fell English SC", Georgia, serif; }
.collection-entry-form .page-subtitle { margin-bottom: 14px; font-size: 10px; line-height: 1.5; }
.collection-entry-form select.form-input { appearance: auto; }
.collection-entry-form textarea.form-input { min-height: 86px; resize: vertical; }
.collection-entry-checkbox { display: flex; align-items: center; gap: 9px; margin: 15px 0 3px; color: #d7d8de; font-size: 11px; }
.collection-entry-checkbox input { width: 16px; height: 16px; accent-color: var(--accent); }
.collection-entry-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 17px; }
.dialog-deck-action { display: grid; gap: 7px; margin-bottom: 12px; }
.dialog-deck-action label { color: #a6ac9c; font-size: 9px; }
.dialog-deck-controls { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.dialog-deck-controls select { min-width: 0; height: 39px; padding: 0 32px 0 10px; border: 1px solid #373b46; border-radius: 7px; background: #221e1a; color: #ededf0; font-size: 11px; }
.dialog-deck-controls .button { min-height: 39px; white-space: nowrap; }
.dialog-create-deck { justify-self: start; }
.dialog-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.dialog-loading { padding: 72px 22px; color: #b8bac2; font-size: 13px; text-align: center; }
.dialog-details .dialog-loading { padding: 16px 0; text-align: left; }
.dialog-error { color: #ffb6b6; }
.toast { position: fixed; right: 22px; bottom: 20px; z-index: 5; padding: 11px 15px; border: 1px solid #4a5935; border-radius: 8px; background: #252e1d; color: #e4f6ca; font-size: 11px; box-shadow: 0 10px 28px #0005; opacity: 0; pointer-events: none; transform: translateY(8px); transition: .2s; }
.toast.visible { opacity: 1; transform: translateY(0); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; clip-path: inset(50%); }
[hidden] { display: none !important; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.form-label { display: block; margin: 13px 0 7px; color: #c4c6ce; font-size: 11px; font-weight: 600; }
.form-input { width: 100%; min-height: 42px; padding: 10px 12px; border: 1px solid #353944; border-radius: 7px; outline: 0; background: #13161c; color: #f0f1f3; font-size: 12px; }
.form-input::placeholder { color: #747884; }
.form-input:focus { border-color: #b8783b; box-shadow: 0 0 0 3px #f2a64b18; }
.text-button { padding: 4px 0; border: 0; background: transparent; color: var(--accent); font-size: 10px; font-weight: 600; cursor: pointer; }
.text-button:hover { color: #ffd095; text-decoration: underline; }
.favorite-pokemon { position: relative; display: flex; align-items: center; gap: 20px; overflow: hidden; margin: 0 0 28px; padding: 18px; border: 1px solid #373737; border-radius: 10px; background: #1d1d1d; }
.favorite-pokemon-banner { position: absolute; top: 50%; right: 3%; width: 52%; height: 190%; object-fit: contain; object-position: right center; opacity: .7; transform: translateY(-50%); pointer-events: none; }
.favorite-pokemon::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, #1d1d1d 25%, #1d1d1de8 52%, #1d1d1d55 100%); pointer-events: none; }
.favorite-pokemon-art, .favorite-pokemon-copy { position: relative; z-index: 2; }
.favorite-pokemon-art { width: 110px; height: 110px; flex: 0 0 110px; display: grid; place-items: center; border-radius: 50%; background: #272727; color: var(--accent); font-size: 30px; }
.favorite-pokemon-art img { width: 100%; height: 100%; object-fit: contain; image-rendering: pixelated; }
.favorite-pokemon-art .favorite-image-missing { padding: 8px; color: var(--muted); font-size: 11px; text-align: center; }
.favorite-pokemon-copy { min-width: 0; }
.favorite-pokemon-copy .eyebrow, .favorite-picker .eyebrow { margin-bottom: 7px; color: #e8ad70; }
.favorite-pokemon-copy h2, .favorite-picker h2 { margin: 0 0 6px; font: 400 21px "IM Fell English SC", Georgia, serif; }
.favorite-pokemon-copy > p:not(.eyebrow) { margin: 0; color: var(--muted); font-size: 12px; }
.favorite-pokemon-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 12px; }
.favorite-picker-dialog { width: min(520px, calc(100vw - 28px)); }
.favorite-picker { padding: 26px; }
.favorite-picker .form-label { display: block; margin-top: 17px; }
.favorite-picker-status { min-height: 1.4em; margin: 10px 0; color: var(--muted); font-size: 11px; }
.favorite-picker-results { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; max-height: 340px; overflow-y: auto; }
.favorite-picker-choice { min-width: 0; display: flex; align-items: center; gap: 7px; padding: 5px 8px; border: 1px solid var(--border); border-radius: 7px; background: var(--panel); color: var(--text); text-align: left; cursor: pointer; }
.favorite-picker-choice:hover { border-color: var(--accent); }
.favorite-picker-choice img { width: 42px; height: 42px; flex: 0 0 42px; object-fit: contain; image-rendering: pixelated; }
.favorite-picker-choice span { min-width: 0; overflow-wrap: anywhere; font-size: 12px; }
.favorite-picker-choice small { display: block; color: var(--muted); }
@media (max-width: 480px) {
  .favorite-pokemon { gap: 12px; padding: 14px; }
  .favorite-pokemon-banner { right: 0; width: 65%; opacity: .45; }
  .favorite-pokemon-art { width: 76px; height: 76px; flex-basis: 76px; }
  .favorite-picker { padding: 20px; }
  .favorite-picker-results { grid-template-columns: 1fr; }
}
.home-display-wall-empty { margin-bottom: 30px; padding: 34px 18px; }
.home-display-wall-empty p { margin-bottom: 15px; }
.home-portfolio { margin: 0 0 36px; padding: 19px; border: 1px solid #373737; border-radius: 10px; background: #1d1d1d; }
.home-portfolio-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; }
.home-portfolio-header .eyebrow { margin-bottom: 7px; color: #e8ad70; }
.home-portfolio-header h2 { margin: 0 0 6px; font: 400 21px "IM Fell English SC", Georgia, serif; }
.home-portfolio-header h2 span { color: var(--accent); }
.portfolio-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 7px; }
.portfolio-controls select, .collection-toolbar select { min-width: 165px; min-height: 38px; padding: 0 30px 0 11px; border: 1px solid #383c46; border-radius: 7px; background: #221e1a; color: #ededf0; font-size: 11px; }
.portfolio-controls .button, .collection-toolbar .button { min-height: 38px; }
.portfolio-stats { margin: 17px 0 10px; }
.portfolio-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.portfolio-price-note { margin: 0; color: #9295a0; font-size: 10px; line-height: 1.5; }
.collection-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: -10px 0 20px; }
.collection-toolbar > label { color: #a7aab4; font-size: 11px; }
.collection-toolbar select { flex: 1; }
.collection-refresh-button { margin-left: auto; }
.collection-history { margin-top: 28px; padding: 18px; border: 1px solid #3b332c; border-radius: 9px; background: var(--panel); }
.collection-history-heading { align-items: flex-start; margin-bottom: 8px; }
.collection-history-heading h2 { margin: 0 0 5px; font: 600 16px "IM Fell English SC", Georgia, serif; }
.collection-history-heading select { min-width: 175px; min-height: 36px; padding: 0 30px 0 10px; border: 1px solid #383c46; border-radius: 7px; background: #221e1a; color: #ededf0; font-size: 11px; }
.collection-value-chart { min-height: 180px; }
.collection-value-svg { display: block; width: 100%; height: auto; overflow: visible; }
.collection-chart-gridline { stroke: #353943; stroke-width: 1; }
.collection-chart-label { fill: #9295a0; font: 11px "IM Fell English SC", Georgia, serif; }
.collection-chart-line { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.collection-chart-point { fill: var(--accent); stroke: #1d1b19; stroke-width: 2; }
.collection-history-note, .collection-history-empty { margin: 8px 0 0; color: #858994; font-size: 10px; line-height: 1.5; }
.portfolio-manager-link { margin-top: 10px; }
.portfolio-list { display: grid; gap: 10px; }
.portfolio-item { width: 100%; display: flex; align-items: center; gap: 13px; padding: 14px; border: 1px solid #2c3039; border-radius: 8px; background: var(--panel); color: var(--text); text-align: left; cursor: pointer; transition: .16s; }
.portfolio-item:hover, .portfolio-item:focus-visible { border-color: #aa733e; background: #27231f; }
.portfolio-item-icon { width: 36px; height: 36px; flex: 0 0 36px; display: grid; place-items: center; border-radius: 8px; background: #382b20; color: var(--accent); font-size: 17px; }
.portfolio-item-copy { min-width: 0; flex: 1; }
.portfolio-item-copy strong, .portfolio-item-copy small, .portfolio-item-value strong, .portfolio-item-value small { display: block; }
.portfolio-item-copy strong, .portfolio-item-value strong { color: #ebecf0; font-size: 11px; }
.portfolio-item-copy small, .portfolio-item-value small { margin-top: 4px; color: #90939e; font-size: 9px; }
.portfolio-item-value { flex: 0 0 auto; text-align: right; }
.portfolio-item-arrow { color: #90939e; }
.display-wall-heading { align-items: center; }
.dex-tracker { margin: 0 0 36px; padding: 19px; border: 1px solid #373737; border-radius: 10px; background: #1d1d1d; }
.dex-tracker-summary { display: flex; align-items: center; gap: 24px; margin-bottom: 18px; }
.dex-wheel { position: relative; display: grid; place-items: center; flex: none; width: 132px; height: 132px; border-radius: 50%; background: conic-gradient(var(--accent) calc(var(--dex-percent, 0) * 1%), #2b2f39 0); }
.dex-wheel::before { content: ""; position: absolute; inset: 13px; border-radius: 50%; background: #1d1f27; }
.dex-wheel span { position: relative; font: 700 25px "IM Fell English SC", Georgia, serif; }
.dex-tracker-info { min-width: 0; flex: 1; }
.dex-tracker-info .eyebrow { margin-bottom: 7px; color: #e8ad70; }
.dex-tracker-info h2 { margin: 0 0 6px; font: 400 21px "IM Fell English SC", Georgia, serif; }
.dex-tracker-info h2 span { color: var(--accent); }
.dex-generations { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px 16px; margin-top: 14px; }
.dex-generation { display: grid; gap: 4px; color: var(--muted); font-size: 10px; }
.dex-generation-bar { height: 4px; overflow: hidden; border-radius: 4px; background: #2b2f39; }
.dex-generation-bar span { display: block; height: 100%; background: var(--accent); }
.dex-tracker-search { max-width: 360px; margin: 0 0 14px; }
.dex-tracker-search-controls { display: flex; gap: 7px; }
.dex-tracker-search-controls .form-input { min-width: 0; min-height: 36px; }
.dex-tracker-search-controls .button { min-height: 36px; }
.dex-tracker-search-status { margin: 6px 0 0; color: var(--muted); font-size: 11px; }
.dex-tracker-search-status:empty { display: none; }
.dex-tracker-search-results { display: grid; gap: 4px; max-height: 190px; overflow-y: auto; }
.dex-tracker-search-results:not(:empty) { margin-top: 7px; }
.dex-tracker-search-result { padding: 8px 10px; border: 1px solid var(--border); border-radius: 6px; background: var(--panel-raised); color: var(--text); text-align: left; cursor: pointer; }
.dex-tracker-search-result:hover, .dex-tracker-search-result:focus-visible { border-color: var(--accent); }
.dex-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(46px, 1fr)); gap: 5px; max-height: 292px; padding-right: 4px; overflow-y: auto; }
.dex-tile { display: grid; place-items: center; min-height: 52px; padding: 2px; border: 1px solid #2a2e38; border-radius: 7px; background: #15171d; color: #5f6370; font-size: 9px; cursor: pointer; }
.dex-tile img { width: 34px; height: 34px; image-rendering: pixelated; }
.dex-tile.owned { border-color: #6d3b41; background: var(--accent-dark); color: #f4c5c8; }
.dex-tile:hover, .dex-tile:focus-visible { border-color: var(--accent); outline: 0; color: var(--text); }
.dex-tile.tracker-search-match { border-color: var(--accent); box-shadow: inset 0 0 0 2px var(--accent); color: var(--text); }
@media (max-width: 560px) { .dex-tracker-summary { flex-direction: column; align-items: flex-start; } }
.display-wall-controls { display: flex; flex: 0 0 auto; gap: 7px; }
.display-wall-dialog { width: min(620px, calc(100vw - 28px)); }
.display-wall-form { padding: 27px; }
.display-wall-form .eyebrow { margin-bottom: 8px; color: #efbc78; }
.display-wall-form h2 { margin: 0 34px 8px 0; font: 700 20px "IM Fell English SC", Georgia, serif; }
.display-wall-selection-count { margin: 12px 0 8px; color: #b9bbc4; font-size: 11px; }
.display-wall-manager-status { margin: 0 0 8px; color: #ffc0c0; font-size: 11px; }
.display-wall-manager-status:empty { display: none; }
.display-wall-card-choices { display: grid; gap: 7px; max-height: 340px; overflow-y: auto; }
.display-wall-choice { display: flex; align-items: center; gap: 11px; padding: 8px; border: 1px solid #353944; border-radius: 7px; background: #27231f; cursor: pointer; }
.display-wall-choice[hidden] { display: none; }
.display-wall-choice input { width: 16px; height: 16px; flex: 0 0 auto; accent-color: var(--accent); }
.display-wall-choice-art { position: relative; display: grid; place-items: center; width: 46px; height: 60px; flex: 0 0 auto; background: #15171d; }
.display-wall-choice-art img { max-width: 100%; max-height: 100%; object-fit: contain; }
.display-wall-choice-art img.image-missing { display: none; }
.display-wall-choice-art .image-fallback { font-size: 8px; }
.display-wall-choice-art:has(img.image-missing) .image-fallback { display: block; }
.display-wall-choice strong, .display-wall-choice small { display: block; overflow-wrap: anywhere; }
.display-wall-choice strong { color: #ebecf0; font-size: 11px; }
.display-wall-choice small { margin-top: 4px; color: #90939e; font-size: 10px; }
.display-wall-no-cards { color: var(--muted); font-size: 12px; }
.display-wall-scroll { width: 34px; height: 34px; border: 1px solid #383c46; border-radius: 7px; background: #27231f; color: #e7e8ec; font-size: 15px; cursor: pointer; }
.display-wall-scroll:hover { border-color: #aa733e; background: #30271f; }
.display-wall { display: flex; gap: 14px; margin: 0 0 30px; padding: 3px 4px 14px; overflow-x: auto; overscroll-behavior-inline: contain; scroll-snap-type: x mandatory; scrollbar-color: #55505a #221e1a; scrollbar-width: thin; }
.display-wall-card { flex: 0 0 clamp(190px, 22vw, 235px); scroll-snap-align: start; }
.display-wall-card .card-art { min-height: 220px; }
.display-wall-copies { margin: 11px 0 0; color: #9295a0; font-size: 9px; }
.card-remove-action { margin-top: 11px; }
.home-lists-heading { margin-top: 35px; }
.home-list-actions { display: flex; align-items: center; gap: 14px; }
.home-wishlist-count { display: inline-grid; min-width: 17px; height: 17px; margin-left: 3px; padding: 0 4px; place-items: center; border-radius: 9px; background: #382b20; color: var(--accent); font-size: 9px; }
.home-list-preview { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.home-list-card { display: flex; align-items: center; gap: 11px; min-width: 0; padding: 12px; border: 1px solid #2c3039; border-radius: 8px; background: var(--panel); text-align: left; cursor: pointer; }
.home-list-card:hover { border-color: #795839; background: #29231d; }
.home-list-icon { width: 31px; height: 31px; display: grid; flex-shrink: 0; place-items: center; border-radius: 7px; background: #382b20; color: var(--accent); font-size: 17px; }
.home-list-card > span:nth-child(2) { min-width: 0; flex: 1; }
.home-list-card strong, .home-list-card small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-list-card strong { color: #ebecf0; font-size: 11px; }
.home-list-card small { margin-top: 4px; color: #90939e; font-size: 9px; }
.home-list-arrow { color: #90939e; }
.home-list-empty { padding: 15px; border: 1px dashed #353944; border-radius: 8px; color: #9699a4; font-size: 11px; }
.language-select { max-width: 178px; min-height: 32px; padding: 0 27px 0 9px; border: 1px solid #383c46; border-radius: 6px; background: #221e1a; color: #dfe0e5; font-size: 10px; }
.language-caption { color: #9a9da7; font-size: 9px; white-space: nowrap; }
.expansion-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.era-set-group { margin: 0 0 25px; }
.era-group-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; padding-bottom: 8px; border-bottom: 1px solid #3b332c; }
.era-group-heading h3 { margin: 0; color: #f0f0f3; font: 600 14px "IM Fell English SC", Georgia, serif; }
.era-group-heading span { color: #9295a0; font-size: 10px; }
.expansion-tile { min-width: 0; min-height: 123px; display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid #2c3039; border-radius: 9px; background: var(--panel); color: var(--text); text-align: left; text-decoration: none; cursor: pointer; transition: .16s; }
.expansion-tile:hover { transform: translateY(-2px); border-color: #795839; background: #29231d; }
.expansion-logo { width: 58px; height: 58px; flex: 0 0 58px; display: grid; place-items: center; overflow: hidden; border-radius: 8px; background: #242831; color: #90949e; font-size: 10px; text-align: center; }
.expansion-logo img { width: 100%; height: 100%; object-fit: contain; }
.promo-placeholder { width: 100%; height: 100%; }
.promo-placeholder path { fill: #d7aa54; }
.promo-placeholder text { fill: #e6d3ad; font: 700 8px "IM Fell English SC", Georgia, serif; letter-spacing: 1px; }
.expansion-info { min-width: 0; }
.expansion-info strong { display: block; overflow: hidden; margin-bottom: 6px; font: 600 11px "IM Fell English SC", Georgia, serif; text-overflow: ellipsis; }
.expansion-info span { display: block; color: #8e929e; font-size: 9px; line-height: 1.5; }
.set-search-bar { margin-bottom: 23px; }
.set-search-bar input { font-size: 12px; }
.back-to-sets { margin: 0 0 19px; }
.energy-search-bar { margin-bottom: 24px; }
.energy-era-group { margin: 0 0 25px; }
.energy-card-grid { margin-top: 12px; }
.set-detail-heading { display: flex; align-items: center; gap: 18px; margin: 0 0 23px; padding: 16px; border: 1px solid #2c3039; border-radius: 9px; background: var(--panel); }
.set-detail-artwork { width: 82px; height: 62px; flex: 0 0 82px; display: grid; place-items: center; }
.set-detail-artwork img { width: 100%; height: 100%; object-fit: contain; }
.set-detail-heading h2 { margin: 0 0 5px; font: 600 17px "IM Fell English SC", Georgia, serif; }
.set-detail-heading p { margin: 0; color: #9699a4; font-size: 10px; }
.inline-create-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; max-width: 720px; margin: -10px 0 16px; padding: 12px; border: 1px solid #3b332c; border-radius: 8px; background: #1d1b19; }
.inline-create-form .form-input { min-width: 150px; flex: 1; }
.list-toolbar select { min-width: 160px; height: 39px; padding: 0 30px 0 11px; border: 1px solid #373b46; border-radius: 7px; background: #221e1a; color: #ededf0; font-size: 11px; }
.list-view-tabs { display: flex; width: max-content; gap: 4px; margin: -9px 0 18px; padding: 4px; border: 1px solid #3b332c; border-radius: 8px; background: #17191f; }
.list-view-tab { min-height: 34px; padding: 0 13px; border: 0; border-radius: 6px; background: transparent; color: #a4a7b0; font-size: 11px; font-weight: 650; cursor: pointer; }
.list-view-tab:hover { color: #fff; }
.list-view-tab.active { background: #382b20; color: #f3c791; }
.list-view-tab span { margin-left: 4px; color: #e8ad70; }
.wishlist-manager > .section-heading { margin-bottom: 13px; }
.wishlist-manager .card-grid { margin-bottom: 18px; }

.dex-index-wrap { margin: -13px 0 31px; padding: 15px; border: 1px solid #343943; border-radius: 10px; background: linear-gradient(135deg, #211d22, #1d1b19 72%); }
.dex-index-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 11px; }
.dex-index-heading h2 { margin: 0; font: 600 12px "IM Fell English SC", Georgia, serif; }
.dex-index-heading > span { color: #9699a4; font-size: 10px; }
.dex-index { display: flex; flex-wrap: wrap; gap: 6px; }
.dex-letter { min-width: 32px; height: 31px; padding: 0 8px; border: 1px solid #393d47; border-radius: 6px; background: #22252d; color: #d3d5dc; font-size: 10px; font-weight: 700; cursor: pointer; transition: .15s; }
.dex-letter:first-child { min-width: 43px; }
.dex-letter:hover:not(:disabled) { border-color: #b8783b; color: #ffe2b7; }
.dex-letter.active { border-color: #de9b49; background: #a92f39; color: #fff; }
.dex-letter:disabled { opacity: .35; cursor: not-allowed; }
.dex-card-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 17px 13px; }
.dex-card-grid .card-tile { border-color: #383740; background: #f3f1f0; }
.dex-card-grid .card-tile:hover { border-color: #d65b61; box-shadow: 0 14px 28px #00000038; }
.dex-card-grid .card-art { min-height: 225px; background: radial-gradient(ellipse at 50% 44%, #fff 0%, #ebe9e8 70%, #e1dfdf 100%); }
.dex-card-grid .card-art img { height: 203px; filter: drop-shadow(0 8px 10px #0003); }
.dex-card-grid .card-info { background: #f8f7f6; }
.dex-card-grid .card-name { color: #28252a; }
.dex-card-grid .card-price { color: #b52e39; }
.dex-card-grid .card-meta { color: #77727a; }
.dex-card-grid .card-number { color: #938b92; }
.pokemon-sort-warning { grid-column: 1 / -1; }
.dex-card-grid .quick-add { border-color: #ffffff4a; background: #a92f39e8; color: #fff; opacity: 1; transform: none; }
.dex-card-grid .quick-add:hover { background: #cc414b; }
.loading-state { grid-column: 1 / -1; padding: 45px 18px; border: 1px dashed #353944; border-radius: 9px; color: #a2a5af; font-size: 12px; text-align: center; }
.pokemon-lookup { margin: -20px 0 30px; }
.pokemon-lookup-card { width: 100%; display: flex; align-items: center; gap: 18px; padding: 13px 17px; border: 1px solid #3c343a; border-radius: 10px; background: linear-gradient(110deg, #292126, #1e1c19 58%); color: var(--text); text-align: left; cursor: pointer; transition: border-color .16s, transform .16s; }
.pokemon-lookup-card:hover { transform: translateY(-2px); border-color: #b8783b; }
.pokemon-sprite-frame { position: relative; display: grid; flex-shrink: 0; place-items: center; overflow: hidden; border-radius: 50%; background: radial-gradient(circle, #484038, #2d2823 72%); }
.pokemon-sprite-frame img { width: 100%; height: 100%; object-fit: contain; image-rendering: pixelated; }
.pokemon-sprite-frame.sprite-missing::after { content: "No sprite"; color: #858994; font-size: 9px; }
.pokemon-lookup-card > .pokemon-sprite-frame { width: 74px; height: 74px; }
.pokemon-lookup-copy { min-width: 0; flex: 1; }
.pokemon-lookup-copy > span, .pokemon-lookup-copy strong { display: block; }
.pokemon-lookup-copy .pokemon-number { margin-bottom: 5px; color: #e8ad70; font-size: 9px; font-weight: 700; letter-spacing: .8px; }
.pokemon-lookup-copy strong { margin-bottom: 4px; font: 700 17px "IM Fell English SC", Georgia, serif; }
.pokemon-lookup-copy > span:last-child { color: #9a9daa; font-size: 10px; }
.pokemon-lookup-action { flex-shrink: 0; color: var(--accent); font-size: 11px; font-weight: 700; }
.pokemon-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.pokemon-tile { position: relative; min-width: 0; min-height: 160px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 5px; overflow: hidden; padding: 13px 8px 12px; border: 1px solid #39322c; border-radius: 10px; background: linear-gradient(155deg, #27231f, #1d1b19); color: var(--text); cursor: pointer; transition: transform .16s, border-color .16s, background .16s; }
.pokemon-tile:hover { transform: translateY(-3px); border-color: #a8723c; background: linear-gradient(155deg, #332820, #221e1a); }
.pokemon-tile-number { position: absolute; top: 9px; left: 10px; color: #858994; font-size: 9px; font-weight: 700; letter-spacing: .4px; }
.pokemon-tile-sprite { width: 92px; height: 92px; margin: 4px auto 0; }
.pokemon-tile strong { max-width: 100%; overflow: hidden; font-size: 10px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.pokedex-search-bar { margin-bottom: 9px; }
.pokedex-generation-filter { display: flex; align-items: center; gap: 9px; margin: 0 0 28px 2px; color: #9a9daa; font-size: 10px; }
.pokedex-generation-filter select { min-width: 190px; min-height: 31px; padding: 0 30px 0 9px; border: 1px solid #383c46; border-radius: 6px; background: #221e1a; color: #e1e2e7; font-size: 10px; }
.pokemon-detail-back { margin: -10px 0 15px; }
.pokemon-detail-profile { padding: clamp(14px, 2.5vw, 24px); border: 1px solid #3b332c; border-radius: 11px; background: linear-gradient(145deg, #25211d, #1d1b19 65%); }
.pokemon-detail-hero { display: grid; grid-template-columns: minmax(150px, .42fr) minmax(0, 1fr); gap: clamp(16px, 3vw, 30px); align-items: center; padding-bottom: 21px; border-bottom: 1px solid #3b332c; }
.pokemon-detail-art { min-height: 190px; display: grid; place-items: center; border: 1px solid #38333b; border-radius: 10px; background: radial-gradient(circle, #39313a, #27231f 72%); }
.pokemon-detail-art img { width: min(100%, 220px); height: 210px; object-fit: contain; }
.pokemon-detail-intro .pokemon-number { color: #e8ad70; font-size: 9px; font-weight: 700; letter-spacing: .8px; }
.pokemon-detail-intro h2 { margin: 6px 0 0; font: 700 clamp(21px, 3vw, 30px) "IM Fell English SC", Georgia, serif; }
.pokemon-detail-intro > p:not(.pokemon-flavor-text) { margin: 4px 0 11px; color: #a7aab4; font-size: 11px; }
.pokemon-detail-types { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 11px; }
.pokemon-detail-type { padding: 4px 9px; border: 1px solid #72533a; border-radius: 15px; background: #382b20; color: #f3c791; font-size: 9px; font-weight: 700; }
.pokemon-flavor-text { max-width: 720px; margin: 0 0 14px; color: #c1c3ca; font-size: 11px; line-height: 1.65; }
.pokemon-detail-intro .button { min-height: 35px; }
.pokemon-detail-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 15px; }
.pokemon-detail-panel { min-width: 0; padding: 15px; border: 1px solid #3b332c; border-radius: 8px; background: #27231f; }
.pokemon-detail-panel h3 { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 0 0 11px; font: 600 13px "IM Fell English SC", Georgia, serif; }
.pokemon-detail-panel h3:not(:first-child) { margin-top: 18px; }
.pokemon-detail-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; margin: 0; }
.pokemon-detail-facts dt { color: #898d98; font-size: 9px; }
.pokemon-detail-facts dd { margin: 4px 0 0; color: #e1e2e7; font-size: 10px; font-weight: 600; }
.pokemon-ability-list { display: flex; flex-wrap: wrap; gap: 7px; margin: 0; padding: 0; list-style: none; }
.pokemon-ability-list li { padding: 7px 9px; border: 1px solid #393d47; border-radius: 6px; color: #d9dae0; font-size: 9px; }
.pokemon-ability-list li span { margin-left: 4px; color: #e8ad70; font-size: 8px; }
.pokemon-stat-total { color: #999ca7; font: 500 9px "IM Fell English SC", Georgia, serif; }
.pokemon-stats { display: grid; gap: 9px; }
.pokemon-stat-row { display: grid; grid-template-columns: 90px 30px minmax(45px, 1fr); gap: 8px; align-items: center; color: #b7bac3; font-size: 9px; }
.pokemon-stat-row strong { color: #ededf0; text-align: right; }
.pokemon-stat-track { height: 6px; overflow: hidden; border-radius: 4px; background: #363943; }
.pokemon-stat-track span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #a92f39, #e06b70); }
.pokemon-evolution-line { display: grid; gap: 7px; }
.pokemon-evolution-stage { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-left: calc(var(--evolution-depth) * 16px); }
.pokemon-evolution-stage button, .pokemon-evolution-current { display: inline-flex; align-items: center; gap: 7px; min-width: 130px; padding: 5px 8px; border: 1px solid #393d47; border-radius: 7px; background: #1d1b19; color: #e1e2e7; font-size: 9px; text-decoration: none; }
.pokemon-evolution-stage button { cursor: pointer; }
.pokemon-evolution-stage button:hover { border-color: #aa733e; }
.pokemon-evolution-stage img, .pokemon-evolution-current img { width: 31px; height: 31px; object-fit: contain; image-rendering: pixelated; }
.pokemon-evolution-stage small { color: #989ba5; font-size: 8px; }
.pokemon-detail-muted { color: #9a9daa; font-size: 10px; line-height: 1.6; }
.trainer-tip-tabs { display: flex; gap: 6px; overflow-x: auto; margin: 0 0 14px; padding: 0 0 3px; border-bottom: 1px solid #3b332c; }
.trainer-tip-tab { flex: 0 0 auto; padding: 10px 13px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: #999ca7; font-size: 11px; font-weight: 600; cursor: pointer; }
.trainer-tip-tab:hover { color: #fff; }
.trainer-tip-tab.active { border-bottom-color: var(--accent); color: #fff; }
.trainer-tip-panel { padding: clamp(17px, 3vw, 29px); border: 1px solid #2c3039; border-radius: 10px; background: linear-gradient(145deg, #25211d, #1d1b19 65%); }
.trainer-tip-intro { display: flex; align-items: flex-start; gap: 13px; margin-bottom: 21px; }
.trainer-tip-icon { width: 34px; height: 34px; flex: 0 0 34px; display: grid; place-items: center; border-radius: 9px; background: #382b20; color: var(--accent); font-size: 17px; }
.trainer-tip-intro h2 { margin: 0 0 5px; font: 600 17px "IM Fell English SC", Georgia, serif; }
.trainer-tip-intro p { max-width: 700px; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.65; }
.trainer-tip-grid, .trainer-card-type-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.trainer-card-type-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.trainer-tip-card, .trainer-card-type { min-width: 0; padding: 16px; border: 1px solid #3b332c; border-radius: 8px; background: #27231f; }
.trainer-tip-step { color: #e8ad70; font-size: 8px; font-weight: 700; letter-spacing: 1px; }
.trainer-tip-card h3 { margin: 9px 0 7px; font: 600 13px "IM Fell English SC", Georgia, serif; }
.trainer-card-type h3 { margin: 9px 0 7px; font: 600 15px "IM Fell English SC", Georgia, serif; }
.trainer-tip-card p { margin: 0; color: #a7aab4; font-size: 10px; line-height: 1.7; }
.trainer-card-type p { margin: 0; color: #a7aab4; font-size: 12px; line-height: 1.65; }
.trainer-card-type { padding: 17px; }
.trainer-card-type-icon { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 8px; font-size: 16px; }
.pokemon-type-icon { background: #253648; color: #76b7e5; }
.trainer-type-icon { background: #3a2f23; color: #ebbd70; }
.energy-type-icon { background: #263a2d; color: #8ed596; }
.trainer-card-type p + p { margin-top: 9px; }
.trainer-card-type p strong { color: #dedfe4; }
.trainer-inline-button { margin-top: 13px; }
.trainer-rarity-guide { margin-top: 22px; padding: 18px; border: 1px solid #3b3540; border-radius: 9px; background: linear-gradient(145deg, #24212a, #1a1c23 70%); }
.trainer-rarity-heading { margin-bottom: 15px; }
.trainer-rarity-heading .eyebrow { margin: 0 0 7px; color: #e8ad70; font-size: 8px; }
.trainer-rarity-heading h3 { margin: 0 0 6px; font: 600 17px "IM Fell English SC", Georgia, serif; }
.trainer-rarity-heading p:last-child { max-width: 720px; margin: 0; color: #a7aab4; font-size: 12px; line-height: 1.65; }
.trainer-rarity-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.trainer-rarity-item { min-width: 0; display: flex; align-items: flex-start; gap: 11px; padding: 12px; border: 1px solid #343640; border-radius: 7px; background: #1c1e26; }
.trainer-rarity-symbol { width: 40px; height: 40px; flex: 0 0 40px; display: grid; place-items: center; border-radius: 9px; background: #f0eee8; color: #202127; font-size: 16px; font-weight: 800; letter-spacing: -2px; }
.rarity-guide-gold { color: #ad7910; }
.rarity-guide-special { color: #d13a8e; font-size: 22px; }
.trainer-rarity-item h4 { margin: 0 0 4px; color: #e7e8ec; font-size: 12px; font-weight: 700; }
.trainer-rarity-item p { margin: 0; color: #a7aab4; font-size: 11px; line-height: 1.6; }
.trainer-rarity-note { margin: 14px 0 0; color: #8d909b; font-size: 11px; line-height: 1.65; }
.trainer-rarity-note a { color: #e9b879; }
.trainer-tip-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 18px; }
.trainer-energy-layout { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(220px, .85fr); gap: 14px; align-items: stretch; }
.trainer-energy-picker-label { margin: 0 0 8px; color: #a7aab4; font-size: 10px; font-weight: 600; }
.trainer-energy-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.trainer-energy-type { min-width: 0; display: flex; align-items: center; gap: 9px; padding: 9px; border: 1px solid #3b332c; border-radius: 7px; background: #27231f; color: #d9dae0; text-align: left; font-size: 10px; cursor: pointer; transition: .15s; }
.trainer-energy-type:hover { border-color: #555b67; background: #262a34; }
.trainer-energy-type.active { border-color: #aa733e; background: #30271f; color: #fff; }
.trainer-energy-type.previewed { border-color: #d3a66b; background: #302a24; color: #fff; }
.trainer-energy-type:focus-visible { outline: 2px solid #e8ad70; outline-offset: 2px; }
.trainer-type-status { display: block; margin-top: 2px; color: #a7aab4; font-size: 8px; }
.trainer-energy-symbol { width: 29px; height: 29px; flex: 0 0 29px; display: grid; place-items: center; border: 1px solid #ffffff24; border-radius: 50%; color: #15171d; font-size: 10px; font-weight: 800; }
.energy-grass { background: #65bd70; }
.energy-fire { background: #ef7555; }
.energy-water { background: #62a8e8; }
.energy-lightning { background: #f0ca4d; }
.energy-psychic { background: #a574d1; }
.energy-fighting { background: #c58d5d; }
.energy-darkness { background: #73717f; color: #fff; }
.energy-metal { background: #aeb8c2; }
.energy-dragon { background: #eaa94f; }
.energy-colorless { background: #d2d3d5; }
.energy-fairy { background: #e8a4c6; }
.trainer-energy-detail { min-height: 170px; padding: 16px; border: 1px solid #343943; border-radius: 8px; background: #1d1b19; }
.trainer-energy-detail-heading { display: flex; align-items: center; gap: 10px; margin-bottom: 13px; }
.trainer-energy-detail-heading .eyebrow { margin: 0 0 4px; color: #e8ad70; font-size: 8px; }
.trainer-energy-detail-heading h3 { margin: 0; font: 600 14px "IM Fell English SC", Georgia, serif; }
.trainer-matchup-summary { display: grid; gap: 11px; margin-bottom: 15px; }
.trainer-matchup-summary h4 { margin: 0 0 6px; color: #a7aab4; font-size: 9px; font-weight: 600; }
.trainer-matchup-types { display: flex; flex-wrap: wrap; gap: 5px; }
.trainer-matchup-chip { padding: 4px 8px; border-radius: 12px; color: #17191f; font-size: 9px; font-weight: 700; }
.trainer-matchup-chip.energy-darkness { color: #fff; }
.trainer-matchup-empty { color: #858994; font-size: 9px; }
.trainer-matchup-calculator { display: grid; gap: 7px; padding: 11px; border: 1px solid #3b332c; border-radius: 7px; background: #27231f; }
.trainer-matchup-calculator label { color: #dedfe4; font-size: 10px; font-weight: 600; }
.trainer-matchup-calculator select { width: 100%; min-height: 34px; padding: 6px 9px; border: 1px solid #414652; border-radius: 5px; background: #1d1b19; color: #e7e8ec; font: inherit; }
.trainer-matchup-calculator select:focus-visible { outline: 2px solid #e8ad70; outline-offset: 2px; }
.trainer-matchup-result { margin: 0 0 12px; padding: 10px; border: 1px solid #414652; border-radius: 7px; color: #e7e8ec; font-size: 10px; line-height: 1.6; }
.trainer-matchup-result p { margin: 0; }
.trainer-matchup-result p + p { margin-top: 6px; }
.trainer-energy-detail .trainer-matchup-caveat { margin: 0 0 14px; color: #a7aab4; font-size: 10px; line-height: 1.7; }
.trainer-matchup-caveat a { color: #e9b879; }
.trainer-browse-energy { margin-bottom: 12px; }
.trainer-energy-detail .button { min-height: 32px; font-size: 9px; }
.trainer-tip-note { margin: 15px 0 0; color: #858994; font-size: 9px; line-height: 1.65; }
.trainer-resource-list { display: grid; gap: 8px; }
.trainer-resource-link { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 15px; border: 1px solid #3b332c; border-radius: 8px; background: #27231f; color: #e7e8ec; text-decoration: none; transition: .15s; }
.trainer-resource-link:hover { border-color: #aa733e; background: #282329; }
.trainer-resource-link strong, .trainer-resource-link small { display: block; }
.trainer-resource-link strong { font-size: 11px; }
.trainer-resource-link small { margin-top: 4px; color: #9295a0; font-size: 9px; }
.trainer-resource-link > span:last-child { color: var(--accent); font-size: 15px; }

@media (max-width: 1080px) {
  .dex-card-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .pokemon-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .deck-template-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .dex-card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pokemon-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .pokemon-detail-columns { grid-template-columns: 1fr; }
  .pokemon-detail-hero { grid-template-columns: minmax(120px, .35fr) minmax(0, 1fr); }
  .trainer-tip-grid, .trainer-card-type-grid, .trainer-rarity-grid { grid-template-columns: 1fr; }
  .trainer-energy-layout { grid-template-columns: 1fr; }
  .deck-template-grid { grid-template-columns: 1fr; }
  .dex-index-wrap { margin-top: -8px; }
}
@media (min-width: 761px) and (max-width: 1050px) {
  .trainer-card-type-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .dex-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
  .illustrator-list { grid-template-columns: 1fr; }
  .deck-builder-heading { align-items: flex-start; flex-direction: column; }
  .deck-builder-actions { flex-wrap: wrap; }
  .deck-current-heading { align-items: flex-start; flex-direction: column; }
  .deck-current-identity { max-width: 100%; }
  .deck-current-actions { width: 100%; }
  .pokemon-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .pokemon-tile { min-height: 132px; padding: 10px 6px; }
  .pokemon-tile-sprite { width: 74px; height: 74px; }
  .pokemon-tile-number { top: 7px; left: 7px; font-size: 8px; }
  .pokemon-tile strong { font-size: 9px; }
  .pokemon-detail-hero { grid-template-columns: 1fr; }
  .pokemon-detail-art { min-height: 150px; }
  .pokemon-detail-art img { height: 155px; }
  .pokemon-detail-facts { gap: 10px; }
  .pokemon-stat-row { grid-template-columns: 75px 26px minmax(35px, 1fr); gap: 6px; }
  .pokemon-lookup-card { gap: 11px; padding: 11px; }
  .pokemon-lookup-card > .pokemon-sprite-frame { width: 59px; height: 59px; }
  .pokemon-lookup-copy strong { font-size: 14px; }
  .pokemon-lookup-action { font-size: 0; }
  .pokemon-lookup-action span { font-size: 17px; }
  .pokedex-generation-filter select { min-width: 0; max-width: calc(100vw - 120px); }
  .trainer-tip-tab { padding: 9px 10px; font-size: 10px; }
  .trainer-tip-intro h2 { font-size: 15px; }
  .dex-card-grid .card-art { min-height: 185px; padding: 10px; }
  .dex-card-grid .card-art img { height: 165px; }
  .dex-index-wrap { padding: 12px; }
  .dex-index { gap: 5px; }
  .dex-letter { min-width: 29px; height: 29px; padding: 0 6px; }
}
.list-toolbar .button { min-height: 34px; }
.list-toolbar { flex-wrap: wrap; }
.list-toolbar select#list-select { min-width: 145px; }
.trainer-name-dialog { width: min(440px, calc(100vw - 28px)); overflow: hidden; padding: 0; border: 1px solid #484848; border-radius: 16px; background: #1d1d1d; color: var(--text); box-shadow: 0 28px 100px #000c, 0 0 38px #f2a64b12; }
.trainer-name-dialog::backdrop { background: #08090bd1; backdrop-filter: blur(4px); }
.trainer-name-form { padding: 30px; }
.trainer-name-form::before { content: "✦"; width: 42px; height: 42px; display: grid; place-items: center; margin-bottom: 17px; border: 1px solid #f2a64b55; border-radius: 13px; background: linear-gradient(145deg, #5a3926, #30241d); color: #ffcf91; font-size: 20px; box-shadow: inset 0 1px #ffffff12, 0 8px 20px #0003; }
.trainer-name-form .eyebrow { width: fit-content; margin-bottom: 10px; padding: 5px 8px; border: 1px solid #f2a64b33; border-radius: 20px; background: #f2a64b12; color: #ffcf91; font-size: 9px; letter-spacing: 1.4px; }
.trainer-name-form h2 { margin: 0 0 9px; font: 700 23px "IM Fell English SC", Georgia, serif; letter-spacing: -.4px; }
.trainer-name-form .page-subtitle { margin-bottom: 19px; font-size: 12px; }
.trainer-name-form .form-label { margin-top: 0; }
.trainer-name-form .form-input { border-color: #51404a; background: #15161d; }
.trainer-name-form .form-input:focus { border-color: #f2a64b; box-shadow: 0 0 0 3px #f2a64b26; }
.trainer-name-button { padding: 0; border: 0; background: transparent; color: var(--accent); font: inherit; cursor: pointer; }
.trainer-name-button:hover { color: #fff; }
.trainer-name-button:focus-visible { border-radius: 3px; outline: 2px solid var(--accent); outline-offset: 3px; }
.trainer-name-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 19px; }
.catalog-controls { flex-wrap: wrap; justify-content: flex-end; }
.list-toolbar { display: flex; align-items: center; gap: 12px; margin: 10px 0 22px; }
.list-toolbar select, .dialog-list-action select { min-width: 210px; height: 39px; padding: 0 34px 0 12px; border: 1px solid #373b46; border-radius: 7px; background: #221e1a; color: #ededf0; font-size: 12px; }
.list-toolbar .button { margin-left: auto; }
.list-empty { margin-top: 10px; }
.dialog-list-action { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.dialog-list-action select { min-width: 130px; flex: 1; }
.dialog-list-action .button { flex-shrink: 0; }

@media (max-width: 1080px) {
  .card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .expansion-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .card-art { min-height: 220px; }
  .card-art img { height: 198px; }
}
@media (max-width: 760px) {
  .sidebar { width: 100%; height: auto; position: sticky; inset: 0 0 auto; flex-direction: column; align-items: stretch; gap: 5px; padding: 8px 12px; border-right: 0; border-bottom: 1px solid #252831; }
  .brand { margin: 0 10px 0 0; }
  .brand-mark { width: 40px; height: 40px; }
  .sidebar .brand-name { font-size: 20px; }
  .nav-label, .sidebar-bottom { display: none; }
  .primary-nav { display: flex; flex: 0 0 auto; gap: 3px; overflow-x: auto; }
  .nav-item { width: auto; min-width: 50px; min-height: 37px; flex: 1; justify-content: center; gap: 5px; padding: 0 7px; font-size: 10px; white-space: nowrap; }
  .nav-item > span:first-child { width: auto; font-size: 16px; }
  .nav-count { min-width: 18px; padding: 1px 5px; font-size: 9px; }
  .main-content { margin-left: 0; }
  .topbar { height: 52px; padding: 0 18px; }
  .view { padding: 34px 18px 42px; }
  .page-heading { align-items: flex-start; }
  .page-subtitle { font-size: 12px; }
  .search-bar { margin-bottom: 31px; }
  .topbar-right { gap: 6px; }
  .home-portfolio-header { flex-direction: column; }
  .portfolio-controls { width: 100%; justify-content: flex-start; }
  .collection-toolbar { margin-top: -13px; }
}
@media (max-width: 560px) {
  .topbar-right { font-size: 0; }
  .topbar-right .live-dot { width: 8px; height: 8px; }
  .brand { gap: 7px; }
  .nav-item { flex-direction: column; min-width: 47px; gap: 0; padding: 3px 4px; font-size: 8px; }
  .nav-item > span:first-child { height: 18px; }
  .nav-count { position: absolute; margin: -22px 0 0 35px; min-width: 15px; padding: 1px 4px; font-size: 8px; }
  .page-heading { display: block; }
  .page-heading > .button { margin-top: 17px; }
  h1 { font-size: 32px; }
  .search-bar { height: 49px; padding: 0 12px; }
  .search-bar input { font-size: 12px; }
  kbd { display: none; }
  .catalog-controls { flex-direction: column; align-items: flex-end; gap: 7px; }
  .catalog-updated { display: none; }
  .refresh-button { min-height: 29px; }
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
  .card-art { min-height: 185px; padding: 10px; }
  .card-art img { height: 165px; }
  .quick-add { opacity: 1; transform: none; }
  .card-info { padding: 10px 9px; }
  .card-name { font-size: 11px; }
  .card-price { font-size: 10px; }
  .card-meta { font-size: 9px; }
  .stats-row { gap: 7px; }
  .stat-card { padding: 12px 10px; }
  .stat-label { font-size: 9px; }
  .stat-value { font-size: 16px; }
  .deck-layout { grid-template-columns: 1fr; }
  .display-wall-heading { flex-direction: column; align-items: flex-start; }
  .display-wall-card .card-art { min-height: 185px; }
  .home-list-preview { grid-template-columns: 1fr; }
  .home-portfolio { padding: 14px; }
  .portfolio-controls select { flex-basis: 100%; }
  .portfolio-controls .button { flex: 1; padding: 0 9px; font-size: 10px; }
  .portfolio-footer { align-items: flex-start; }
  .portfolio-price-note { font-size: 9px; }
  .collection-toolbar > label { width: 100%; }
  .collection-toolbar select { min-width: 100%; }
  .collection-toolbar .button { flex: 1; padding: 0 9px; font-size: 10px; }
  .collection-refresh-button { margin-left: 0; flex-basis: 100%; }
  .expansion-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .expansion-tile { min-height: 86px; gap: 8px; padding: 8px; }
  .expansion-logo { width: 42px; height: 42px; flex-basis: 42px; }
  .expansion-info strong { font-size: 10px; }
  .expansion-info span { font-size: 8px; }
  .language-select { max-width: 125px; font-size: 9px; }
  .era-select { max-width: 155px; }
  .list-toolbar { flex-wrap: wrap; }
  .list-toolbar select { min-width: 0; flex: 1; }
  .list-toolbar .button { margin-left: 0; }
  .deck-summary { grid-row: 1; }
  .deck-summary-icon { margin-bottom: 9px; }
  .deck-summary h2 { margin-bottom: 10px; }
  .dialog-layout { grid-template-columns: 1fr; }
  .dialog-art { position: static; min-height: 0; padding: 22px; }
  .dialog-art img { width: auto; max-width: 100%; max-height: 240px; }
  .dialog-art-unavailable { min-height: 80px; display: none; align-content: center; }
  .dialog-details { padding: 34px 14px 20px; }
  .dialog-details h2 { font-size: 19px; }
  .dialog-meta, .dialog-description { font-size: 10px; }
  .dialog-deck-controls { grid-template-columns: 1fr; }
  .dialog-deck-controls .button { width: 100%; }
  .dialog-actions .button { width: 100%; }
}
