/* Episode I's printed cards pair film stills and near-black frames with saturated colour bars.
   The lobby uses the same framing for the Theed panorama. */
@font-face {
  font-family: "Theed Capitals";
  src: url("/playtests/theme-cinzel-600.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Theed Condensed";
  src: url("/playtests/theme-barlow-condensed-700.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
body[data-site-theme="theed"]:not(:has(.arena-app)) {
  --yj-paper: #f2e8d7;
  --yj-ink: #2f211e;
  --yj-gold: #f1cd81;
  --yj-ruby: #792638;
  --yj-serif: "Theed Capitals", Georgia, serif;
  --yj-condensed: "Theed Condensed", "Arial Narrow", sans-serif;
  --bg: #171516;
  --panel: #282224;
  --panel2: #342a2b;
  --line: #59484a;
  --muted: #c3b6ae;
  --teal: var(--yj-gold);
  --teal-dark: #463425;
  --amber: #f5c873;
  --radius: 5px;
  --site-bg: var(--bg);
  --site-panel: var(--panel);
  --site-border: var(--line);
  --site-muted: var(--muted);
  --site-accent: var(--yj-gold);
  color: #f5ede2;
  background: linear-gradient(160deg, #302327 0, #1b191a 42rem, #151516 85rem);
  min-height: 100vh;

  & .site-header {
    color: var(--yj-ink);
    background: var(--yj-paper);
    border-bottom: 3px solid #b79553;
    gap: clamp(16px, 3vw, 52px);
  }
  & .site-header .brand-mark { display: none; }
  & .site-header .brand-stack { gap: 2px; }
  & .site-header .hub-link { color: #75574c; }
  & .site-header .game-brand {
    color: #492533; font: 600 clamp(22px, 2.2vw, 34px)/1 var(--yj-serif);
    white-space: nowrap; letter-spacing: -.065em;
  }
  & .site-header nav { gap: clamp(10px, 1.6vw, 24px); }
  & .site-header nav a, & .server-signin {
    color: #59483d; font: 700 15px/1.15 var(--yj-condensed);
    text-transform: uppercase; letter-spacing: .055em;
  }
  & .site-header nav a:is(:hover,.active,.play-open), & .server-signin:hover { color: var(--yj-ruby); }
  & .site-header nav a.active::after { background: var(--yj-ruby); height: 3px; }
  & .site-header .credits-chip, & .site-header .session-chip {
    background: #e9deca; color: #513d2c; border-color: #bbab8d;
  }
  & .site-header .credits-chip svg { color: #8b581e; }
  & .site-header .session-chip small { color: #6d5747; }
  & .site-header .status-dot { background: #4d7657; box-shadow: none; }
  & .site-header .avatar { background: #683846; color: #fff2df; }

  & #lobby-static { padding-top: 10px; }
  & .lobby .hero {
    display: grid; grid-template-columns: 1fr; align-items: center; isolation: isolate;
    position: relative; overflow: hidden; min-height: clamp(340px, 31vw, 495px);
    margin: 0; border: 1px solid #a78d68; border-radius: 3px;
    background: #33201d url("/playtests/youngjedi-theed.webp") center center / cover no-repeat;
    box-shadow: 0 12px 38px #08060640;
  }
  & .hero::before {
    content: ""; position: absolute; inset: 0; z-index: -1;
    background: linear-gradient(90deg, #200f15f5 0%, #29151be0 22%, #30191e98 39%, transparent 66%);
    pointer-events: none;
  }
  & .hero::after {
    content: ""; position: absolute; inset: 8px; width: auto; height: auto;
    --corner-line: linear-gradient(#f2d9adbd, #f2d9adbd);
    border: 0; pointer-events: none;
    background: var(--corner-line) left top/28px 1px, var(--corner-line) left top/1px 20px,
                var(--corner-line) right top/28px 1px, var(--corner-line) right top/1px 20px,
                var(--corner-line) left bottom/28px 1px, var(--corner-line) left bottom/1px 20px,
                var(--corner-line) right bottom/28px 1px, var(--corner-line) right bottom/1px 20px;
    background-repeat: no-repeat;
  }
  & .hero-copy { width: min(61%, 640px); padding: clamp(30px, 3.6vw, 64px); }
  & .yj-edition, & .yj-location {
    font: 700 13px/1 var(--yj-condensed); text-transform: uppercase; letter-spacing: .22em;
    color: #f4d493;
  }
  & .yj-edition { display: flex; gap: .65em; align-items: center; }
  & .yj-edition::before { content: ""; width: 32px; height: 3px; background: #ecc984; }
  & .yj-edition span, & .yj-location span { opacity: .7; }
  & .hero h1 {
    font: 600 clamp(64px, 6.6vw, 110px)/1.04 var(--yj-serif); letter-spacing: -.075em;
    color: #fff2dd; margin: .19em 0 .14em; text-shadow: 0 3px 20px #230e18a8;
  }
  & .hero-copy > p { margin: 0; max-width: 32ch; color: #f2e5d4; line-height: 1.48; font-size: clamp(15px,1.15vw,18px); }
  & .hero-actions { margin-top: 24px; gap: 9px; }
  & .hero-actions .text-button { color: #ffe2a7; }
  & .hero .first-run { max-width: 390px; }
  & .hero .first-run-steps { color: #e9d7bc; }
  & .yj-location {
    position: absolute; right: 18px; bottom: 15px; padding: 7px 11px;
    background: #251717d9; color: #fff0d2; font-size: 11px; border-left: 3px solid #e8bb6c;
  }

  & [data-dot] {
    display: inline-block; flex: none; width: .78em; height: .78em; border: 1px solid #ffffff88;
    border-radius: 50%; background: var(--dot); vertical-align: middle;
  }
  & [data-dot="red"] { --dot: #de5357; } & [data-dot="orange"] { --dot: #ec9149; }
  & [data-dot="blue"] { --dot: #589ade; } & [data-dot="yellow"] { --dot: #f2cc46; }
  & [data-dot="green"] { --dot: #6eae66; } & [data-dot="purple"] { --dot: #b18ada; }
  & [data-dot="wild"] { --dot: conic-gradient(#de5357,#f2cc46,#6eae66,#589ade,#b18ada,#de5357); }
  & .deck-facet, & .yj-types { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
  & .deck-facet { padding-bottom: 10px; }
  & .deck-facet button {
    display: inline-flex; align-items: center; gap: 5px; padding: 5px 9px; border: 1px solid var(--line);
    background: var(--panel); color: var(--muted); border-radius: 4px; text-transform: capitalize;
  }
  & .deck-facet button[aria-pressed="true"] { color: var(--yj-gold); border-color: var(--yj-gold); }
  & .yj-construction { padding: 10px; border-block: 1px solid var(--line); }
  & .yj-construction-heading, & .deck-group-picker { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
  & .yj-construction-heading h3 { margin: 0; }
  & .yj-construction-heading strong { color: var(--yj-gold); }
  & .deck-list-options { margin-top: 10px; }
  & .deck-group-picker { margin-bottom: 8px; }
  & .yj-colors { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0; }
  & .yj-colors > span {
    display: inline-flex; align-items: baseline; gap: 4px; white-space: nowrap; text-transform: capitalize;
    padding: 2px 5px; background: var(--panel); font-size: 12px; border-bottom: 2px solid var(--line);
  }
  & .yj-colors [data-state="full"] { border-color: #87ac76; } & .yj-colors [data-state="over"] { border-color: #ec797b; }
  & .yj-construction p { font-size: 12px; margin: 6px 0 0; }
  & .yj-types, & .deck-group-picker select, & .deck-card-group { text-transform: capitalize; }

  & :is(.section-heading h2,.library-heading h1,.discovery-intro h1,.discovery-panel h2,.workspace-heading h1,.card-detail h1,.product-section-title,.pass-heading h1,.pass-heading h2,.pass-trail-heading h2) {
    font-family: var(--yj-serif); color: #fff0dd; letter-spacing: -.045em;
  }
  & .eyebrow, & .little-label, & .section-heading .eyebrow, & .back-link {
    color: #dbbb83; font: 700 12px/1.2 var(--yj-condensed); letter-spacing: .13em;
  }
  & .section-heading { border-top: 1px solid #6d524b; padding-top: 15px; }
  & :is(.primary,.discovery-button,.hero-actions .primary.large) {
    border: 1px solid #ebc47e; border-radius: 3px; background: #eac782; color: #301b20;
    box-shadow: inset 0 0 0 2px #f9deb344; font-weight: 750;
  }
  & :is(.primary,.discovery-button):hover { background: #ffe1a6; color: #30151e; }
  & :is(.secondary,.hero-actions .secondary.large) { border: 1px solid #9e826f; border-radius: 3px; background: #34292be8; color: #fff0dd; }
  & .secondary:hover { background: #50363a; color: #fff3e5; }
  & :is(.discovery-panel,.quests-panel,.product-card,.pack-history,.trade-in,.pass-hero,.battle-pass,.pass-tier,.table-list-entry,.archive-filters,.rare-pulls,.card-detail-copy,.saved-deck,.modal) {
    background: var(--panel); border-color: var(--line); border-radius: 4px; color: #f5ede2;
  }
  & :is(.quests-panel,.pass-hero,.discovery-panel,.rare-pulls) { border-top: 3px solid #a67e58; }
  & :is(.quest-bar,.progress-track) { background: #47353b; }
  & .quest-bar > :first-child { background: linear-gradient(90deg,#9b4455,#f1c978); }
  & :is(.credits-chip,.count-badge) { background: #372c27; color: #f1cf91; border-color: #755d41; }
  & :is(.product-art,.pass-spotlight) { background: radial-gradient(ellipse at center, #63404a, #282025 77%); }
  & .archive-grid article h2, & .archive-grid article a { color: #f1e5d1; }
  & .archive-filters :is(input,select), & .rarity-chip { color: #f5e9d5; background: #30292b; border-color: #715d59; }
  & .rarity-chip:has(input:checked), & .pagination [aria-current="page"] { background: #e4c38c; color: #302126; }
  & :is(.saved-deck-shelf,.card-zoom,.search-field,.catalog-toolbar select,.deck-tile-menu-toggle,.catalog-card-copy) {
    background: #282224; color: #efe5d5; border-color: #665150;
  }
  & .saved-deck-tile { background: #382a2d; border-color: #6e5551; border-left: 3px solid #bf9962; }
  & .saved-deck-open { color: #fff0dd; }
  & .product-price { color: #f1cd81; }
  & :is(.library-heading h1,.discovery-intro h1)::before {
    content: ""; display: block; width: 45px; height: 5px; margin-bottom: 13px;
    background: linear-gradient(90deg,#c5954c 0 66%,transparent 66% 73%,#9c4953 73% 100%);
  }
  & .discovery-footer { color: #c2aba4; border-color: #584348; }
  & :focus-visible { outline: 2px solid #edc27a; outline-offset: 3px; }
  & .site-header :focus-visible { outline-color: #8f3448; }
}

@media (max-width: 850px) {
  body[data-site-theme="theed"]:not(:has(.arena-app)) {
    & .site-header { height: auto; min-height: 66px; flex-wrap: wrap; column-gap: 16px; row-gap: 8px; padding-block: 12px 0; }
    & .site-header nav { order: 4; width: 100%; flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; scrollbar-width: thin; padding: 6px 0 10px; }
    & .site-header nav a { white-space: nowrap; }
    & .hero-copy { width: min(68%, 520px); }
  }
}
@media (max-width: 600px) {
  body[data-site-theme="theed"]:not(:has(.arena-app)) {
    & #lobby-static { padding-top: 12px; }
    & .lobby .hero { min-height: 0; display: flex; align-items: end; padding-top: 132px; background-size: auto 220px; background-position: 79% top; }
    & .hero::before { background: linear-gradient(0deg, #28161e 0, #28161e calc(100% - 210px), #28161ef5 calc(100% - 150px), transparent calc(100% - 67px)); }
    & .hero-copy { width: 100%; padding: 18px 24px 26px; }
    & .hero h1 { font-size: clamp(49px,11vw,68px); }
    & .yj-edition { font-size: 11px; }
    & .hero-copy > p { font-size: 14px; }
    & .hero-actions { margin-top: 16px; }
    & .yj-location { top: 12px; right: 12px; bottom: auto; font-size: 9px; }
  }
}
