/* The home client (Theo, 11 Nov 2026): Play, Progress, Decks, Profile, Settings along the top, one screen each.
   On a desktop nothing scrolls: every panel is sized to the window. On a phone the tabs move to the bottom and
   a panel scrolls like a page. Dusk Paperback throughout: tokens from style.css, the brand layer from brand.css. */

.homepage { height: 100%; overflow: hidden; scrollbar-color: #4A3C78 transparent; font-variant-numeric: tabular-nums; }
.homepage ::selection { background: var(--peach); color: #0E0A1C; }
.homepage a { color: var(--ink); text-decoration-color: rgba(244, 180, 138, .55); text-underline-offset: 3px; }
.homepage a:hover { text-decoration-color: var(--peach); }
.homepage h1 { font: 400 clamp(22px, 2.5vw, 40px)/1.2 var(--f-disp); letter-spacing: .05em; text-transform: uppercase; text-wrap: balance; margin: 0; color: var(--ink); }
.homepage h2 { display: block; font: 400 11.5px/1.2 var(--f-disp); letter-spacing: .18em; text-transform: uppercase; color: var(--amber); margin: 0 0 12px; }
.homepage button.plate { background: linear-gradient(180deg, #4A3C78, #3A2E63); color: var(--ink); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 0 0 1px rgba(14, 10, 28, .5); padding: 9px 16px; }

#shell { --bar: 62px; display: grid; grid-template-rows: var(--bar) minmax(0, 1fr); height: 100vh; height: 100dvh; }

/* ---------------------------------------------------------------- the bar */
#bar { position: relative; z-index: 10; display: grid; grid-template-columns: auto 1fr auto; align-items: stretch; gap: clamp(18px, 3vw, 54px); padding: 0 clamp(18px, 2.4vw, 40px); background: #0E0A1C; box-shadow: 0 1px 0 var(--line), 0 10px 30px rgba(14, 10, 28, .7); }
.brand { align-self: center; font: 400 13px/1 var(--f-disp); letter-spacing: .2em; text-transform: uppercase; text-decoration: none; color: var(--ink); }
#tabs { display: flex; align-items: stretch; gap: clamp(6px, 1.6vw, 30px); }
#tabs a { position: relative; display: flex; align-items: center; padding: 0 10px; font: 400 11.5px/1 var(--f-disp); letter-spacing: .18em; text-transform: uppercase; text-decoration: none; color: var(--muted); transition: color .2s; }
#tabs a:hover { color: var(--ink); }
#tabs a:focus-visible { outline: 2px solid var(--amber); outline-offset: -4px; }
#tabs a[aria-current="page"] { color: var(--ink); }
/* the active tab stands on the brand's horizon stripes */
#tabs a::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: 0; height: 12px; background:
  linear-gradient(var(--plum), var(--plum)) 0 0 / 100% 1px no-repeat, linear-gradient(var(--danger), var(--danger)) 0 3px / 100% 2px no-repeat,
  linear-gradient(var(--peach), var(--peach)) 0 6px / 100% 2px no-repeat, linear-gradient(var(--amber), var(--amber)) 0 9px / 100% 3px no-repeat;
  transform: scaleX(0); transform-origin: 0 50%; transition: transform .45s cubic-bezier(.16, 1, .3, 1); }
#tabs a[aria-current="page"]::after { transform: scaleX(1); }
.me { align-self: center; display: grid; grid-template-columns: auto auto; column-gap: 12px; row-gap: 5px; align-items: baseline; text-decoration: none; min-width: 150px; }
.me-name { font: 600 14.5px/1 var(--f-body); max-width: 16ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-level { justify-self: end; font: 400 10.5px/1 var(--f-disp); letter-spacing: .14em; text-transform: uppercase; color: var(--amber); }
.me .xp { grid-column: 1 / -1; }

/* XP is drawn as the horizon stripes: four lines, filled as far as you have come */
.xp { --p: 0; display: grid; gap: 2px; }
.xp i { display: block; position: relative; background: rgba(241, 230, 208, .14); overflow: hidden; }
.xp i::after { content: ""; position: absolute; inset: 0; transform-origin: 0 50%; transform: scaleX(var(--p)); transition: transform 1.1s cubic-bezier(.16, 1, .3, 1); }
.xp i:nth-child(1) { height: 2px; } .xp i:nth-child(1)::after { background: var(--amber); }
.xp i:nth-child(2) { height: 1px; } .xp i:nth-child(2)::after { background: var(--peach); }
.xp i:nth-child(3) { height: 1px; } .xp i:nth-child(3)::after { background: var(--danger); }
.xp i:nth-child(4) { height: 1px; } .xp i:nth-child(4)::after { background: var(--plum); }
.xp.big { gap: 3px; }
.xp.big i:nth-child(1) { height: 5px; } .xp.big i:nth-child(2) { height: 3px; } .xp.big i:nth-child(3) { height: 2px; }

/* ---------------------------------------------------------------- panels */
#stage { position: relative; min-height: 0; }
.panel { position: absolute; inset: 0; display: grid; min-height: 0; padding: clamp(18px, 2.6vh, 34px) clamp(18px, 2.4vw, 40px); isolation: isolate; animation: panelin .5s cubic-bezier(.16, 1, .3, 1); }
.panel[hidden] { display: none; }
@keyframes panelin { from { opacity: 0; transform: translateY(8px); } }
.panel > .art { position: absolute; inset: 0; z-index: -1; background: var(--bg) 50% 30% / cover no-repeat; }

/* ---------------------------------------------------------------- PLAY */
.panel.lead { grid-template-columns: minmax(0, 1fr) clamp(300px, 27vw, 430px); gap: clamp(18px, 2.4vw, 40px); align-items: end; }
.panel.lead > .art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(14, 10, 28, .25), rgba(14, 10, 28, 0) 30%, rgba(14, 10, 28, .78) 78%, rgba(14, 10, 28, .94)), linear-gradient(90deg, rgba(14, 10, 28, .5), rgba(14, 10, 28, 0) 55%); }
.lead-text { max-width: 680px; padding-bottom: clamp(6px, 2vh, 26px); }
.lead-text h1 { font-size: clamp(34px, 4.6vw, 76px); letter-spacing: .04em; line-height: 1.05; text-shadow: 0 2px 30px rgba(14, 10, 28, .7); }
.lead-text > p { margin: 12px 0 0; font-size: clamp(15px, 1.05vw, 18px); line-height: 1.5; max-width: 56ch; text-shadow: 0 1px 12px rgba(14, 10, 28, .9); }
.lead-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-top: clamp(16px, 2.6vh, 28px); }
a.primary { display: inline-block; background: var(--btn); color: #0E0A1C !important; text-decoration: none; }
.primary { padding: clamp(14px, 1.9vh, 20px) clamp(28px, 3vw, 54px); font: 400 clamp(12.5px, .95vw, 15px)/1.2 var(--f-disp); letter-spacing: .14em; text-transform: uppercase; border-radius: 4px; box-shadow: var(--btn-hi), 0 12px 30px rgba(14, 10, 28, .65); }
.primary:disabled { filter: saturate(.4) brightness(.8); cursor: default; }
.second { font-size: 15px; font-weight: 600; text-shadow: 0 1px 10px rgba(14, 10, 28, .9); }
.lead-text .lead-note { margin-top: 12px; font-size: 13.5px; color: var(--ink); opacity: .78; }

.side { align-self: end; height: clamp(300px, 64%, 100%); display: grid; grid-template-rows: auto minmax(0, 1fr) auto; min-height: 0; padding: 18px; background: var(--glass); box-shadow: 0 0 0 1px rgba(241, 230, 208, .1), 0 20px 50px rgba(14, 10, 28, .6); border-radius: 4px; }
.glist { min-height: 0; overflow-y: auto; margin: 0 -6px; padding: 0 6px; }
.game { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; align-items: center; padding: 11px 0; border-top: 1px solid var(--line); text-decoration: none; }
.game:first-child { border-top: 0; }
.game b { font: 600 15px/1.25 var(--f-body); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.game small { grid-column: 1; font-size: 12.5px; color: var(--muted); }
.game .go { grid-row: 1 / span 2; grid-column: 2; font: 400 10.5px/1 var(--f-disp); letter-spacing: .14em; text-transform: uppercase; color: var(--peach); }
.game:hover b { color: var(--amber); }
.gempty { color: var(--muted); font-size: 14px; line-height: 1.5; margin: 6px 0 0; }
.code { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; margin-top: 14px; }
.code input { padding: 9px 11px; color: var(--ink); border: 1px solid var(--line); min-width: 0; }
.code input::placeholder { color: var(--muted); }
/* TV mode (19 Nov 2026): the way onto the big screen, under the code box */
.tvline { display: flex; align-items: center; gap: 10px; margin-top: 12px; font-size: 12.5px; color: var(--muted); line-height: 1.35; }
.homepage .tvline button.quiet { flex: none; padding: 7px 14px; font: 400 10.5px/1 var(--f-disp); letter-spacing: .14em; text-transform: uppercase; }
#tvform { margin-top: 8px; }
#tvform[hidden] { display: none; }

/* ---------------------------------------------------------------- PROGRESS */
#p-progress { grid-template-rows: auto minmax(0, 1fr) auto; gap: clamp(10px, 2vh, 22px); }
#p-progress > .art { background-position: 50% 62%; }
#p-progress > .art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(14, 10, 28, .82), rgba(14, 10, 28, .25) 34%, rgba(14, 10, 28, .2) 52%, rgba(14, 10, 28, .9) 76%, var(--bg)); }
.prog-head p { margin: 8px 0 0; font-size: clamp(14.5px, 1vw, 17px); max-width: 70ch; text-shadow: 0 1px 12px rgba(14, 10, 28, .9); }
.prog-head p b { color: var(--amber); font-weight: 600; }

/* the road: twelve levels on the horizon stripes */
.road { position: relative; align-self: center; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); align-items: end; padding-bottom: 46px; }
.road::before, .road::after { content: ""; position: absolute; left: 0; right: 0; bottom: 30px; height: 14px; background:
  linear-gradient(currentColor, currentColor) 0 0 / 100% 4px no-repeat, linear-gradient(currentColor, currentColor) 0 6px / 100% 3px no-repeat,
  linear-gradient(currentColor, currentColor) 0 10px / 100% 2px no-repeat, linear-gradient(currentColor, currentColor) 0 13px / 100% 1px no-repeat; color: rgba(241, 230, 208, .2); }
.road::after { background:
  linear-gradient(var(--amber), var(--amber)) 0 0 / 100% 4px no-repeat, linear-gradient(var(--peach), var(--peach)) 0 6px / 100% 3px no-repeat,
  linear-gradient(var(--danger), var(--danger)) 0 10px / 100% 2px no-repeat, linear-gradient(var(--plum), var(--plum)) 0 13px / 100% 1px no-repeat;
  clip-path: inset(0 calc(100% - var(--done, 0%)) 0 0); transition: clip-path 1.2s cubic-bezier(.16, 1, .3, 1); }
.stop { position: relative; display: grid; justify-items: center; gap: 6px; text-align: center; color: rgba(241, 230, 208, .72); padding: 0 4px; text-shadow: 0 1px 10px rgba(14, 10, 28, .95), 0 0 2px rgba(14, 10, 28, .8); }
.stop .rw { min-height: 2.5em; display: flex; align-items: flex-end; font-size: clamp(11.5px, .82vw, 14px); line-height: 1.25; color: var(--ink); text-shadow: 0 1px 10px rgba(14, 10, 28, .95); }
.stop .lv { font: 400 clamp(15px, 1.5vw, 26px)/1 var(--f-disp); }
.stop .post { width: 1px; height: clamp(10px, 2.4vh, 26px); background: currentColor; opacity: .6; }
.stop .at { position: absolute; top: 100%; margin-top: 26px; font-size: 12px; white-space: nowrap; }
.stop.reached { color: var(--ink); }
.stop.reward .post { height: clamp(22px, 5vh, 54px); }
.stop.here { color: var(--amber); }
.stop.here .lv { font-size: clamp(26px, 3vw, 52px); }
.stop.here .post { width: 2px; opacity: 1; }
.stop.here .at { color: var(--amber); font-weight: 600; }

.facrow { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: clamp(8px, .8vw, 14px); }
.facp { position: relative; height: clamp(92px, 17vh, 170px); padding: 0; overflow: hidden; border-radius: 4px; background: var(--panel); color: var(--ink); text-align: left; cursor: default; box-shadow: 0 0 0 1px rgba(241, 230, 208, .14), 0 8px 22px rgba(14, 10, 28, .5); font-weight: 400; }
.facp .a { position: absolute; inset: 0; background: 50% 35% / cover no-repeat; transition: transform .5s cubic-bezier(.16, 1, .3, 1), filter .3s; }
.facp .a::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(14, 10, 28, .05), rgba(14, 10, 28, .9)); }
.facp.locked .a { filter: grayscale(.6) brightness(.62); }
.facp .t { position: absolute; left: 12px; right: 12px; bottom: 10px; display: grid; gap: 4px; }
.facp b { font: 400 clamp(10px, .78vw, 12.5px)/1.3 var(--f-disp); letter-spacing: .08em; text-transform: uppercase; }
.facp .s { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink); }
.facp .s svg { width: 13px; height: 13px; }
.facp.owned .s { color: var(--teal); }
.facp.choose { cursor: pointer; box-shadow: 0 0 0 1px var(--amber), 0 8px 22px rgba(14, 10, 28, .5); }
.facp.choose .a { filter: none; }
.facp.choose .s { color: var(--amber); font-weight: 600; }
.facp.choose:hover .a, .facp.choose:focus-visible .a { transform: scale(1.06); }
.facp:disabled { filter: none; opacity: 1; }
.facp[data-chal] { cursor: pointer; }
.facp[data-chal]:hover .a, .facp[data-chal]:focus-visible .a { transform: scale(1.06); }
.facp .pips { display: flex; gap: 4px; margin-top: 2px; }
.facp .pips i { flex: 1; height: 3px; background: rgba(241, 230, 208, .22); }
.facp .pips i.on { background: var(--teal); }
.facp .pips i.tr { background: var(--amber); }
/* A faction's challenges (12 Nov 2026) */
.chalview { width: min(720px, 94vw); max-height: 92vh; max-height: 92dvh; padding: 0; border: 0; border-radius: 6px; background: var(--panel); color: var(--ink); box-shadow: 0 30px 80px rgba(0, 0, 0, .7), 0 0 0 1px rgba(241, 230, 208, .16); overflow: auto; }
.chalview::backdrop { background: rgba(14, 10, 28, .78); }
.chalhead { position: relative; display: flex; align-items: flex-end; gap: 12px; min-height: 120px; padding: 18px 22px 16px; overflow: hidden; }
.chalhead .a { position: absolute; inset: 0; background: 50% 35% / cover no-repeat; }
.chalhead .a::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(26, 20, 51, .25), var(--panel)); }
.chalhead .t { position: relative; flex: 1; min-width: 0; }
.chalhead h3 { margin: 0; font: 400 clamp(16px, 1.5vw, 21px)/1.25 var(--f-disp); letter-spacing: .08em; text-transform: uppercase; }
.chalhead p { margin: 6px 0 0; font-size: 14px; line-height: 1.45; max-width: 60ch; }
.chalx { position: relative; align-self: flex-start; }
.challist { list-style: none; margin: 0; padding: 0 22px; display: grid; }
.challist li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 6px 16px; padding: 14px 0; border-top: 1px solid rgba(241, 230, 208, .12); }
.challist .w { display: grid; gap: 3px; min-width: 0; }
.challist b { font-size: 16px; font-weight: 600; }
.challist .for { font-size: 13.5px; opacity: .8; }
.challist .for a { color: var(--amber); }
.challist .n { font-variant-numeric: tabular-nums; font-size: 14px; white-space: nowrap; }
.challist .st { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; white-space: nowrap; opacity: .8; }
.challist .st svg { width: 13px; height: 13px; }
.challist .st.done { color: var(--teal); opacity: 1; }
.challist .trk { min-width: 124px; }
.challist .meter { grid-column: 1 / -1; position: relative; height: 4px; background: rgba(241, 230, 208, .14); }
.challist .meter::after { content: ""; position: absolute; inset: 0; background: var(--peach); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); transition: transform .4s cubic-bezier(.16, 1, .3, 1); }
.challist li.done .meter::after { background: var(--teal); }
.challist li.tracked .meter::after { background: var(--amber); }
.chalfoot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 0; padding: 14px 22px 20px; border-top: 1px solid rgba(241, 230, 208, .12); font-size: 13.5px; opacity: .9; }
/* Scenarios (12 Nov 2026) */
.badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; background: linear-gradient(180deg, #F7D98A, #E2B048); color: #0E0A1C; font: 600 12.5px/1 var(--f-body); }
.badge svg { width: 12px; height: 12px; }
.pl-first { background: linear-gradient(180deg, #CFF3E6, #7FD3B8); }
/* Learn to play (14 Nov 2026): first, the brightest plate on the screen. Since 15 Nov 2026 it keeps the column of
   the other buttons (Theo: "super long and not sized to the rest of the buttons"). */
.plrow.lessonrow[hidden] { display: none; }
.pl-lesson { background: linear-gradient(180deg, #FFF8EA, #F2C46D); color: #1A1204; box-shadow: 0 0 0 2px rgba(255, 248, 234, .5), 0 14px 34px rgba(242, 196, 109, .28); }
.plrow.lessonrow .pl { min-height: clamp(104px, 13vh, 132px); }
.plrow.lessonrow.seen .pl { min-height: clamp(84px, 11vh, 112px); box-shadow: none; }   /* finished or skipped: the size of the other buttons */
.pl-lesson b { font-size: clamp(16px, 1.4vw, 22px); }
.pl-lesson .plk { font: 600 10.5px/1 var(--f-body, sans-serif); font-style: normal; letter-spacing: .2em; text-transform: uppercase; opacity: .75; }
.pl-scen { background: linear-gradient(180deg, #FFD9B0, #F4A76C); }
.scenlist .scw { grid-column: 1 / -1; justify-self: start; }
.scenlist .for + .for { opacity: .65; }
/* The AI ladder (12 Nov 2026) */
#rankedopts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ladderview { width: min(860px, 94vw); }
.ladlist { list-style: none; margin: 0; padding: 0 22px; display: grid; }
.ladlist li { display: grid; grid-template-columns: minmax(150px, 1fr) minmax(0, 3fr); align-items: center; gap: 14px; padding: 12px 0; border-top: 1px solid rgba(241, 230, 208, .12); }
.ladlist .who { display: grid; grid-template-columns: 44px minmax(0, 1fr); column-gap: 12px; align-items: center; }
.ladlist .who .a { grid-row: 1 / 3; width: 44px; height: 44px; border-radius: 4px; background: 50% 30% / cover no-repeat; }
.ladlist .who b { font: 400 12px/1.3 var(--f-disp); letter-spacing: .08em; text-transform: uppercase; align-self: end; }
.ladlist .who span:not(.a) { font-size: 13px; opacity: .8; align-self: start; }
.ladlist li.soon .who .a { filter: grayscale(.7) brightness(.6); }
.rungs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.rung { display: grid; gap: 4px; padding: 10px 12px; border: 0; border-radius: 6px; background: rgba(14, 10, 28, .5); color: var(--ink); text-align: left; cursor: pointer; box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow .15s, transform .15s; }
.rung b { font: 400 11.5px/1.2 var(--f-disp); letter-spacing: .1em; text-transform: uppercase; }
.rung span { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; }
.rung svg { width: 12px; height: 12px; }
.rung.open { background: linear-gradient(180deg, #F7D98A, #E2B048); color: #0E0A1C; box-shadow: none; }
.rung.open span { font-weight: 600; }
.rung.open:hover { transform: translateY(-2px); }
.rung.done { box-shadow: inset 0 0 0 1px var(--teal); }
.rung.done span { color: var(--teal); }
.rung.done:hover { box-shadow: inset 0 0 0 2px var(--teal); }
.rung:disabled { cursor: default; opacity: .6; }
@media (max-width: 860px) { #rankedopts { grid-template-columns: 1fr; } .rung { padding: 10px 8px; } .rung b { font-size: 10px; letter-spacing: .04em; } .ladlist { padding: 0 16px; } .ladlist li { grid-template-columns: minmax(0, 1fr); gap: 8px; } }
@media (prefers-reduced-motion: reduce) { .rung { transition: none; } }
/* The tracked challenge on the Play screen */
.sbox.trackbox { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: none; align-items: baseline; gap: 4px 12px; padding: 14px 18px 16px; color: var(--ink) !important; text-decoration: none; transition: box-shadow .2s; }
.sbox.trackbox[hidden] { display: none; }
.sbox.trackbox:hover, .sbox.trackbox:focus-visible { box-shadow: 0 0 0 1px var(--amber), 0 20px 50px rgba(0, 0, 0, .35); }
.trackbox h2 { grid-column: 1 / -1; margin-bottom: 4px; }
#p-home .side.split:has(#trackbox:not([hidden])) { grid-template-rows: auto minmax(0, 1.15fr) minmax(0, 1fr); }
.trackbox b { font-size: 14.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trackbox .n { font-size: 14px; font-variant-numeric: tabular-nums; }
.trackbox .how { grid-column: 1 / -1; font-size: 13.5px; opacity: .85; }
.trackbox .meter { grid-column: 1 / -1; position: relative; height: 4px; margin-top: 4px; background: rgba(241, 230, 208, .16); }
.trackbox .meter::after { content: ""; position: absolute; inset: 0; background: var(--amber); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); }
@media (max-width: 860px) { .challist li { grid-template-columns: minmax(0, 1fr) auto; } .challist .trk, .challist .st { grid-column: 1 / -1; justify-self: start; } .chalhead { min-height: 96px; padding: 14px 16px; } .challist { padding: 0 16px; } .chalfoot { padding: 12px 16px 18px; } }
@media (prefers-reduced-motion: reduce) { .challist .meter::after { transition: none; } }
.pickerr { margin: 8px 0 0; color: var(--danger); }

/* ---------------------------------------------------------------- DECKS: six factions across, four decks down */
#p-decks { background: var(--bg); }

.fcol { display: grid; grid-template-rows: clamp(64px, 12vh, 118px) repeat(4, minmax(0, 1fr)); gap: clamp(6px, 1vh, 10px); min-height: 0; }
.fhead { position: relative; overflow: hidden; border-radius: 4px; isolation: isolate; display: flex; flex-direction: column; justify-content: flex-end; padding: 10px 12px; }
.fhead .a { position: absolute; inset: 0; z-index: -1; background: 50% 38% / cover no-repeat; }
.fhead .a::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(14, 10, 28, .1), rgba(14, 10, 28, .88)); }
.fcol.locked .fhead .a { filter: grayscale(.6) brightness(.62); }
.fhead b { font: 400 clamp(10px, .8vw, 13px)/1.25 var(--f-disp); letter-spacing: .08em; text-transform: uppercase; }
.fhead .s { display: inline-flex; align-items: center; gap: 6px; margin-top: 3px; font-size: 12.5px; color: var(--ink); }
.fhead .s svg { width: 12px; height: 12px; }
.fcol.owned .fhead .s { color: var(--teal); }
.dk { position: relative; overflow: hidden; border-radius: 4px; isolation: isolate; display: flex; flex-direction: column; justify-content: flex-end; min-height: 0; padding: 9px 11px; box-shadow: 0 0 0 1px rgba(241, 230, 208, .1); }
.dk .a { position: absolute; inset: 0; z-index: -1; background: var(--panel) 50% 44% / 150% auto no-repeat; }
.dk .a::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(14, 10, 28, .12) 0, rgba(14, 10, 28, .55) 46%, rgba(14, 10, 28, .95) 86%); }
.dk.off .a { filter: grayscale(.55) brightness(.6); }
.dk .dn { font: 600 clamp(13.5px, 1vw, 16.5px)/1.2 var(--f-body); }
.dk .how { margin-top: 3px; font-size: clamp(11.5px, .8vw, 13px); line-height: 1.3; color: var(--ink); opacity: .9; }
.dk .yours { display: inline-flex; align-items: center; gap: 6px; margin-top: 3px; font-size: 12.5px; color: var(--teal); }
.dk .yours svg { width: 12px; height: 12px; }
.dk .meter { position: relative; height: 3px; margin-top: 7px; background: rgba(241, 230, 208, .16); }
.dk .meter::after { content: ""; position: absolute; inset: 0; background: var(--peach); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); }
.dk .n { position: absolute; top: 8px; right: 10px; font-size: 12px; color: var(--ink); text-shadow: 0 1px 6px rgba(14, 10, 28, .95); }

/* ---------------------------------------------------------------- PROFILE */
#p-profile { grid-template-columns: minmax(280px, 34vw) minmax(0, 1fr); gap: clamp(22px, 3.4vw, 60px); padding-left: 0; padding-top: 0; padding-bottom: 0; }
#p-profile > .art { right: auto; width: 34vw; min-width: 280px; }
#p-profile > .art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(14, 10, 28, 0) 38%, rgba(14, 10, 28, .86) 68%, var(--bg) 94%); }
.prof-plate { align-self: end; padding: 0 clamp(18px, 2.4vw, 40px) clamp(22px, 4vh, 44px); }
.prof-name { margin: 0; font: 600 18px/1.2 var(--f-body); overflow-wrap: anywhere; }
.prof-rank { margin: 2px 0 14px; display: flex; align-items: baseline; gap: 14px; font-family: var(--f-disp); line-height: 1; }
.prof-rank .word { font-size: 13px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.prof-rank .num { font-size: clamp(64px, 7vw, 96px); letter-spacing: -.02em; }
.prof-xp { margin: 10px 0 0; font-size: 14px; color: var(--muted); }
.prof-xp b { color: var(--ink); font-weight: 600; }
.prof-record { align-self: center; width: 100%; max-width: 820px; padding: clamp(18px, 2.6vh, 34px) 0; min-height: 0; overflow-y: auto; }
.rec { width: 100%; border-collapse: collapse; font-size: clamp(15px, 1.1vw, 18px); }
.near { list-style: none; margin: 0 0 clamp(22px, 4.4vh, 48px); padding: 0; border-top: 1px solid var(--line); }
.near li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 16px; align-items: baseline; padding: clamp(9px, 1.5vh, 14px) 0; border-bottom: 1px solid var(--line); }
.near b { font: 600 clamp(15px, 1.1vw, 18px)/1.25 var(--f-body); }
.near .how { grid-column: 1; font-size: 14px; color: var(--muted); }
.near .n { grid-row: 1; grid-column: 2; font-size: 14px; color: var(--amber); }
.near .meter { grid-column: 1 / -1; position: relative; height: 3px; margin-top: 4px; background: rgba(241, 230, 208, .14); }
.near .meter::after { content: ""; position: absolute; inset: 0; background: var(--peach); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); }
.nearnone { margin: 0 0 clamp(22px, 4.4vh, 48px); color: var(--muted); }
.rec th { font: 400 10.5px/1 var(--f-disp); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); text-align: right; padding: 0 0 10px 12px; }
.rec th:first-child, .rec td:first-child { text-align: left; padding-left: 0; }
.rec td { padding: clamp(8px, 1.4vh, 13px) 0 clamp(8px, 1.4vh, 13px) 12px; text-align: right; border-top: 1px solid var(--line); }
.rec tr.none td { color: var(--muted); }
.rec tfoot td { border-top: 1px solid var(--amber); font-weight: 600; }
#signin { margin-bottom: clamp(18px, 3vh, 34px); }
#signin h1 { font-size: clamp(19px, 2vw, 27px); margin-bottom: 8px; }
#signin p { margin: 0 0 14px; color: var(--muted); max-width: 58ch; }
.ways { display: flex; flex-wrap: wrap; gap: 10px; }
.way { display: inline-block; padding: 11px 16px; border-radius: 4px; background: var(--btn); color: #0E0A1C !important; font-weight: 600; text-decoration: none; box-shadow: var(--btn-hi); }
.way.quiet { background: rgba(14, 10, 28, .35); color: var(--ink) !important; box-shadow: 0 0 0 1px rgba(241, 230, 208, .22); }

/* ---------------------------------------------------------------- SETTINGS */
#p-settings { background: var(--bg); align-content: start; justify-items: center; overflow-y: auto; }
.set { width: min(640px, 100%); padding-top: clamp(10px, 4vh, 50px); }
.set h1 { margin-bottom: clamp(18px, 3vh, 30px); }
.setrow { display: grid; gap: 8px; padding: 18px 0; border-top: 1px solid var(--line); }
.setrow label, .setrow .lab { font: 400 10.5px/1 var(--f-disp); letter-spacing: .16em; text-transform: uppercase; color: var(--amber); }
.setctl { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.setctl input { flex: 1; min-width: 180px; padding: 10px 12px; color: var(--ink); border: 1px solid var(--line); }
.setctl.links { gap: 22px; }
.sethint { margin: 0; font-size: 13.5px; color: var(--muted); }

/* a short window: let a panel scroll rather than crush its contents */
@media (min-width: 861px) and (max-height: 620px) { .panel { overflow-y: auto; } }

/* ---------------------------------------------------------------- phones: tabs at the bottom, a panel scrolls like a page */
@media (max-width: 860px) {
  #shell { --bar: 52px; grid-template-rows: var(--bar) minmax(0, 1fr) calc(54px + env(safe-area-inset-bottom, 0px)); }
  #bar { grid-template-columns: 1fr auto; padding: 0 16px; }
  .brand { font-size: 11.5px; }
  .me { min-width: 110px; }
  #tabs { position: fixed; z-index: 20; left: 0; right: 0; bottom: 0; height: calc(54px + env(safe-area-inset-bottom, 0px)); padding-bottom: env(safe-area-inset-bottom, 0px); gap: 0; background: #0E0A1C; box-shadow: 0 -1px 0 var(--line); }
  #tabs a { flex: 1; justify-content: center; padding: 0 2px; font-size: 8.5px; letter-spacing: .08em; }
  #tabs a::after { left: 14%; right: 14%; top: 0; bottom: auto; transform-origin: 50% 50%; }
  .panel { overflow-y: auto; padding: 18px 16px 24px; display: block; }
  .panel > .art { height: 62vh; bottom: auto; }
  .panel.lead .lead-text { padding-top: 40vh; padding-bottom: 20px; }
  .lead-text h1 { font-size: 36px; }
  .side { margin-top: 8px; height: auto; }
  .ulist { max-height: none; }
  .dhead { flex-direction: column; align-items: flex-start; gap: 10px; }
  .fplates { grid-template-columns: 1fr; grid-auto-rows: 132px; overflow: visible; }
  .dplates { grid-template-columns: 1fr; grid-auto-rows: 150px; }
  .deckpage { grid-template-columns: 1fr; overflow: visible; }
  .deckinfo { position: static; }
  .cards { overflow: visible; padding-right: 0; }
  .cgrid { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); }
  .glist { max-height: 46vh; }
  #p-progress > .art { height: 46vh; }
  .road { grid-template-columns: 1fr; padding: 0 0 0 30px; margin: 22px 0; gap: 0; }
  .road::before, .road::after { left: 6px; right: auto; top: 0; bottom: 0; width: 14px; height: auto; background:
    linear-gradient(currentColor, currentColor) 0 0 / 4px 100% no-repeat, linear-gradient(currentColor, currentColor) 6px 0 / 3px 100% no-repeat,
    linear-gradient(currentColor, currentColor) 10px 0 / 2px 100% no-repeat, linear-gradient(currentColor, currentColor) 13px 0 / 1px 100% no-repeat; }
  .road::after { background:
    linear-gradient(var(--amber), var(--amber)) 0 0 / 4px 100% no-repeat, linear-gradient(var(--peach), var(--peach)) 6px 0 / 3px 100% no-repeat,
    linear-gradient(var(--danger), var(--danger)) 10px 0 / 2px 100% no-repeat, linear-gradient(var(--plum), var(--plum)) 13px 0 / 1px 100% no-repeat;
    clip-path: inset(0 0 calc(100% - var(--done, 0%)) 0); }
  .stop { grid-template-columns: 34px minmax(0, 1fr) auto; justify-items: start; align-items: baseline; text-align: left; gap: 10px; padding: 9px 0; }
  .stop .lv { order: 1; font-size: 15px; } .stop .rw { order: 2; min-height: 0; font-size: 14.5px; } .stop .at { order: 3; position: static; margin: 0; }
  .stop .post { display: none; }
  .stop.here .lv { font-size: 22px; }
  .facrow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facp { height: 110px; }

  #p-profile { padding: 0 0 24px; }
  #p-profile > .art { width: 100%; height: 56vh; }
  .prof-plate { padding: 30vh 16px 20px; }
  .prof-record { padding: 0 16px; overflow: visible; }
  .rec { font-size: 14px; }
  .rec .opt { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .panel { animation: none; }
  .xp i::after, .road::after, #tabs a::after, .facp .a { transition: none; }
}

/* ---------------------------------------------------------------- HOME: the painting changes while you look at it */
#p-home > .art { transition: opacity 2.4s ease; }
#p-home > .art.next { opacity: 0; }
#p-home > .art.next.show { opacity: 1; }
.ulist { min-height: 0; overflow-y: auto; margin: 0 -6px; padding: 0 6px; }
.up { padding: 12px 0; border-top: 1px solid var(--line); }
.up:first-child { border-top: 0; padding-top: 0; }
.up b { display: block; font: 600 15.5px/1.3 var(--f-body); }
.up time { display: block; margin: 2px 0 6px; font-size: 12.5px; color: var(--muted); }
.up p { margin: 0; font-size: 14.5px; line-height: 1.5; color: var(--ink); opacity: .92; white-space: pre-line; overflow-wrap: anywhere; }
.up .del { margin-top: 6px; padding: 0; background: none; box-shadow: none; color: var(--danger); font: 400 12.5px/1 var(--f-body); text-decoration: underline; text-underline-offset: 3px; }
.upform { display: grid; gap: 8px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.upform[hidden] { display: none; }
.upform input, .upform textarea { padding: 9px 11px; color: var(--ink); background: rgba(14, 10, 28, .7); border: 1px solid var(--line); border-radius: 4px; font: inherit; resize: none; min-width: 0; }
.upform input::placeholder, .upform textarea::placeholder { color: var(--muted); }
.upform textarea:focus { outline: none; border-color: var(--peach); box-shadow: 0 0 0 3px rgba(244, 180, 138, .18); }
.uprow { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
#p-home .side { grid-template-rows: auto minmax(0, 1fr) auto; }

/* ---------------------------------------------------------------- DECKS: faction, then deck, then every card */
#p-decks { grid-template-rows: auto minmax(0, 1fr); gap: clamp(10px, 1.8vh, 18px); }
.dhead { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.crumbs { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; font: 400 clamp(13px, 1.25vw, 20px)/1.2 var(--f-disp); letter-spacing: .08em; text-transform: uppercase; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--ink); }
.crumbs .sep { color: var(--plum); }
.crumbs .at { color: var(--ink); }
.dtabs { display: flex; gap: 6px; flex: none; }
.dtabs span, .dtabs a { display: inline-flex; align-items: center; gap: 7px; padding: 9px 14px; border-radius: 4px; font: 400 10.5px/1 var(--f-disp); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); box-shadow: inset 0 0 0 1px var(--line); }
.dtabs .on { color: var(--ink); background: rgba(74, 60, 120, .5); box-shadow: inset 0 0 0 1px rgba(241, 230, 208, .2); }
.dtabs svg { width: 12px; height: 12px; }
.dtabs .soon { position: relative; cursor: not-allowed; }
.dtabs a { text-decoration: none; }
.dtabs a.open { color: var(--ink); cursor: pointer; box-shadow: inset 0 0 0 1px var(--amber); }
.dtabs a.open:hover { background: rgba(244, 196, 98, .14); }
.dtabs .soon::after { content: attr(data-tip); position: absolute; right: 0; top: calc(100% + 8px); z-index: 5; padding: 8px 12px; border-radius: 4px; background: var(--ink); color: #0E0A1C; font: 600 13px/1 var(--f-body); letter-spacing: 0; text-transform: none; white-space: nowrap; opacity: 0; transform: translateY(-4px); pointer-events: none; transition: opacity .18s, transform .18s; box-shadow: 0 8px 20px rgba(14, 10, 28, .6); }
.dtabs .soon:hover::after, .dtabs .soon:focus-visible::after { opacity: 1; transform: none; }
.dtabs .soon:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
.dview { min-height: 0; display: grid; }

/* six factions, each a standing plate */
.fplates { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: clamp(8px, .9vw, 16px); min-height: 0; }
.plate2 { position: relative; display: flex; flex-direction: column; justify-content: flex-end; min-height: 0; padding: clamp(12px, 1.2vw, 20px); overflow: hidden; border-radius: 4px; isolation: isolate; text-decoration: none; box-shadow: 0 0 0 1px rgba(241, 230, 208, .12), 0 10px 26px rgba(14, 10, 28, .5); transition: box-shadow .25s; }
.plate2 .a { position: absolute; inset: 0; z-index: -1; background: var(--panel) 50% 40% / cover no-repeat; transition: transform .7s cubic-bezier(.16, 1, .3, 1), filter .3s; }
.plate2 .a::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(14, 10, 28, .08) 0, rgba(14, 10, 28, .2) 42%, rgba(14, 10, 28, .93) 82%); }
.plate2.locked .a { filter: grayscale(.5) brightness(.7); }
.plate2:hover, .plate2:focus-visible { box-shadow: 0 0 0 1px var(--amber), 0 10px 26px rgba(14, 10, 28, .5); outline: none; }
.plate2:hover .a, .plate2:focus-visible .a { transform: scale(1.05); filter: none; }
.plate2 b { font: 400 clamp(12px, 1.05vw, 17px)/1.25 var(--f-disp); letter-spacing: .08em; text-transform: uppercase; }
.plate2 .id { margin-top: 6px; font-size: clamp(12.5px, .9vw, 14.5px); color: var(--amber); }
.plate2 .ln { margin-top: 6px; font-size: clamp(12.5px, .9vw, 14.5px); line-height: 1.4; color: var(--ink); opacity: .9; }
.plate2 .st { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 13px; }
.plate2 .st svg { width: 13px; height: 13px; flex: none; }
.plate2.owned .st { color: var(--teal); }
.plate2 .meter { position: relative; height: 3px; margin-top: 8px; background: rgba(241, 230, 208, .16); }
.plate2 .meter::after { content: ""; position: absolute; inset: 0; background: var(--peach); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); }

/* one faction: its four decks */
.dplates { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(10px, 1vw, 18px); min-height: 0; }
.dplates .plate2 .a { background-size: 150% auto; background-position: 50% 40%; }

/* one deck: what it is on the left, every card on the right */
.deckpage { display: grid; grid-template-columns: clamp(230px, 21vw, 330px) minmax(0, 1fr); gap: clamp(16px, 2vw, 34px); min-height: 0; }
.deckinfo { min-height: 0; overflow-y: auto; }
.deckinfo h1 { font-size: clamp(20px, 2vw, 32px); }
.deckinfo .ln { margin: 8px 0 0; line-height: 1.5; color: var(--ink); opacity: .9; }
.deckinfo .st { display: inline-flex; align-items: center; gap: 7px; margin-top: 14px; color: var(--teal); }
.deckinfo .st.off { color: var(--ink); display: block; }
.deckinfo .st svg { width: 14px; height: 14px; }
.deckinfo .meter { position: relative; height: 3px; margin: 8px 0 4px; background: rgba(241, 230, 208, .16); }
.deckinfo .meter::after { content: ""; position: absolute; inset: 0; background: var(--peach); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); }
.deckinfo .cnt { color: var(--muted); font-size: 13px; }
.counts { margin: 18px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.counts li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.counts li a { text-decoration: none; }
.counts li a:hover { color: var(--amber); }
.counts li span { color: var(--muted); }
.cards { min-height: 0; overflow-y: auto; padding-right: 10px; scroll-behavior: smooth; }
.cards h2 { position: sticky; top: 0; z-index: 2; margin: 0; padding: 8px 0 10px; background: linear-gradient(180deg, var(--bg) 70%, rgba(14, 10, 28, 0)); }
.cards h2 span { color: var(--muted); margin-left: 8px; }
.cgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(clamp(112px, 8.6vw, 160px), 1fr)); gap: clamp(8px, .8vw, 14px); margin-bottom: clamp(14px, 2.4vh, 26px); }
.cd { position: relative; padding: 0; background: var(--panel); border-radius: 6px; overflow: hidden; aspect-ratio: 411 / 561; box-shadow: 0 4px 12px rgba(14, 10, 28, .6), 0 0 0 1px rgba(241, 230, 208, .1); transition: transform .25s cubic-bezier(.16, 1, .3, 1), box-shadow .25s; }
.cd img { display: block; width: 100%; height: 100%; object-fit: cover; }
.cd:hover, .cd:focus-visible { transform: translateY(-4px); box-shadow: 0 12px 26px rgba(14, 10, 28, .7), 0 0 0 1px var(--amber); outline: none; }
.cd .x { position: absolute; right: 6px; bottom: 6px; padding: 3px 7px; border-radius: 3px; background: rgba(14, 10, 28, .88); color: var(--amber); font: 600 12.5px/1 var(--f-body); }
.cd .nm { position: absolute; inset: auto 0 0 0; padding: 8px; background: rgba(14, 10, 28, .85); font: 600 12.5px/1.25 var(--f-body); color: var(--ink); text-align: left; }

/* a card, large */
.cardview2 { width: min(880px, 94vw); max-height: 92vh; max-height: 92dvh; padding: 0; border: 0; border-radius: 6px; background: var(--panel); color: var(--ink); box-shadow: 0 30px 80px rgba(0, 0, 0, .7), 0 0 0 1px rgba(241, 230, 208, .16); overflow: hidden; }
.cardview2[open] { display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); }
.cardview2::backdrop { background: rgba(14, 10, 28, .78); }
.cardview2 img { display: block; width: 100%; height: auto; }
.cardview2 .cvtext { padding: 26px 26px 26px 24px; overflow-y: auto; }
.cardview2 h3 { margin: 0 0 6px; font: 400 18px/1.3 var(--f-disp); letter-spacing: .05em; text-transform: uppercase; }
.cardview2 .cvmeta { margin: 0 0 14px; color: var(--amber); font-size: 13.5px; }
.cardview2 #cvbody { margin: 0; line-height: 1.55; white-space: pre-line; }
.cardview2 form { position: absolute; top: 10px; right: 10px; z-index: 2; }
.cardview2 .cvx { padding: 7px 12px; background: rgba(14, 10, 28, .6); color: var(--ink); box-shadow: 0 0 0 1px rgba(241, 230, 208, .22); font: 600 13px/1 var(--f-body); }
.cardview2 .cvnav { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border-top: 1px solid rgba(241, 230, 208, .12); background: rgba(14, 10, 28, .5); }
.cardview2 .cvnav[hidden] { display: none; }
.cardview2 .cvnav button { min-height: 40px; padding: 8px 16px; background: rgba(241, 230, 208, .07); color: var(--ink); box-shadow: 0 0 0 1px rgba(241, 230, 208, .22); font: 600 13.5px/1 var(--f-body); }
.cardview2 .cvnav button:hover:not(:disabled) { background: rgba(241, 230, 208, .15); filter: none; }
.cardview2 .cvnav span { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
@media (max-width: 700px) { .cardview2 .cvnav { position: sticky; bottom: 0; background: var(--panel); } }
@media (max-width: 700px) { .cardview2[open] { grid-template-columns: 1fr; overflow-y: auto; } .cardview2 img { max-height: 56vh; object-fit: contain; background: #0E0A1C; } }
@media (max-width: 860px) { #tabs a { font-size: 7.5px; letter-spacing: .04em; } }

/* ---------------------------------------------------------------- fixes after the first look (11 Nov 2026) */
#p-home .lead-text { max-width: 820px; }
#p-home .lead-text h1 { font-size: clamp(30px, 3.7vw, 62px); line-height: 1.12; }
/* a deck plate: the faction's painting, with the deck's lead card standing on it */
.dplates .plate2 .a { background-size: cover; background-position: 50% 40%; }
.dplates .plate2 .a::after { background: linear-gradient(180deg, rgba(14, 10, 28, .35) 0, rgba(14, 10, 28, .5) 48%, rgba(14, 10, 28, .95) 80%); }
.plate2 .cover { position: absolute; z-index: -1; left: 50%; top: 6%; height: 54%; width: auto; aspect-ratio: 411 / 561; transform: translateX(-50%); border-radius: 6px; box-shadow: 0 14px 34px rgba(14, 10, 28, .75), 0 0 0 1px rgba(241, 230, 208, .14); transition: transform .5s cubic-bezier(.16, 1, .3, 1); }
.plate2:hover .cover, .plate2:focus-visible .cover { transform: translateX(-50%) translateY(-6px); }
.plate2.locked .cover { filter: grayscale(.55) brightness(.7); }
.dtabs span { white-space: nowrap; }

@media (max-width: 860px) {
  #p-decks:not([hidden]) { display: block; }
  .dhead { flex-direction: column; align-items: flex-start; gap: 10px; margin-bottom: 14px; }
  .dtabs span { padding: 8px 10px; font-size: 9px; }
  .dview { display: block; }
  .fplates { grid-template-columns: 1fr; grid-auto-rows: 150px; gap: 10px; }
  .plate2 .ln { display: none; }
  .dplates { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 250px; gap: 10px; }
  .dplates .plate2 .ln { display: none; }
  .plate2 .cover { height: 50%; }
  .deckpage { display: block; }
  .deckinfo { overflow: visible; margin-bottom: 18px; }
  .cards { overflow: visible; padding-right: 0; }
  .cards h2 { top: -18px; }
  .cgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  #p-home .lead-text h1 { font-size: 30px; }
  .side { height: auto; }
}

@media (max-width: 860px) { #p-home .lead-text h1 { font-size: 25px; letter-spacing: .03em; } }

/* a deck plate (11 Nov 2026): faction art only, and the facts of the deck under its name */
.facts { display: grid; gap: 5px; width: 100%; margin-top: 12px; padding-top: 10px; border-top: 1px solid rgba(241, 230, 208, .2); font-size: clamp(12px, .86vw, 14px); line-height: 1.35; }
.facts > span { display: grid; grid-template-columns: clamp(78px, 6.4vw, 104px) minmax(0, 1fr); gap: 8px; }
.facts i { font-style: normal; color: var(--muted); }
.dplates .plate2 .a { background-position: 50% 22%; }
.dplates .plate2 .a::after { background: linear-gradient(180deg, rgba(14, 10, 28, .05) 0, rgba(14, 10, 28, .3) 30%, rgba(14, 10, 28, .9) 56%, rgba(14, 10, 28, .97)); }
@media (max-width: 860px) { .dplates { grid-template-columns: 1fr; grid-auto-rows: auto; } .dplates .plate2 { min-height: 300px; } .dplates .plate2 .ln { display: block; } }

/* sign-in, the newsletter choice and account removal (11 Nov 2026) */
.signnote { margin-top: 12px; max-width: 58ch; }
.homepage button.quiet { background: rgba(14, 10, 28, .35); color: var(--ink); box-shadow: 0 0 0 1px rgba(241, 230, 208, .22); padding: 9px 16px; }
.homepage button.quiet.danger { color: var(--danger); box-shadow: 0 0 0 1px rgba(227, 111, 90, .5); }
.newsask { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.newsask[hidden], .setrow[hidden] { display: none; }
.newsask p { margin: 0 0 10px; font-size: 14.5px; line-height: 1.5; }
.newsask .uprow { justify-content: flex-start; }
.sethint.warn { color: var(--danger); }
#p-home .side { grid-template-rows: auto minmax(0, 1fr) auto auto; }

/* Play is the home screen (11 Nov 2026): the playlist, and the side split into Announcements and Open games */
.playlist { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(10px, 1vw, 16px); margin-top: clamp(16px, 2.6vh, 28px); max-width: 860px; }
.pl { display: grid; gap: 8px; align-content: start; text-align: left; min-height: clamp(110px, 15vh, 150px); padding: clamp(14px, 1.8vh, 20px) clamp(14px, 1.2vw, 20px); border: 0; border-radius: 6px; text-decoration: none; cursor: pointer; color: #0E0A1C !important; box-shadow: 0 12px 30px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .35); transition: transform .18s cubic-bezier(.16, 1, .3, 1), filter .18s; }
.pl b { font: 400 clamp(13px, 1.05vw, 17px)/1.2 var(--f-disp); letter-spacing: .12em; text-transform: uppercase; }
.pl span { font-size: clamp(12.5px, .9vw, 14.5px); line-height: 1.4; font-weight: 600; opacity: .85; }
.pl:hover:not(:disabled) { transform: translateY(-4px); filter: brightness(1.06); }
.pl:disabled { filter: saturate(.35) brightness(.75); cursor: default; }
.pl.on, .pl.on:hover:not(:disabled) { transform: none; box-shadow: 0 0 0 2px #F1E6D0, 0 12px 30px rgba(0, 0, 0, .45); }
.playlist { max-width: 860px; }
.plrow { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: clamp(10px, 1vw, 16px); align-items: stretch; }
.plrow .pl { min-height: clamp(84px, 11vh, 112px); }
.plopts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(10px, 1vw, 16px); animation: plout .22s cubic-bezier(.16, 1, .3, 1); }
@keyframes plout { from { opacity: 0; transform: translateX(-12px); } }
.plopts[hidden] { display: none; }
.plo { display: grid; gap: 6px; align-content: start; text-align: left; padding: 12px clamp(14px, 1.2vw, 20px); border: 0; border-radius: 6px; text-decoration: none; cursor: pointer; color: #0E0A1C !important; box-shadow: 0 8px 20px rgba(0, 0, 0, .4), inset 0 1px 0 rgba(255, 255, 255, .35); transition: transform .18s cubic-bezier(.16, 1, .3, 1), filter .18s; }
.plo b { font: 400 clamp(12px, .95vw, 15px)/1.2 var(--f-disp); letter-spacing: .12em; text-transform: uppercase; }
.plo span { font-size: clamp(12.5px, .9vw, 14px); line-height: 1.4; font-weight: 600; opacity: .85; }
.plo:hover:not(:disabled) { transform: translateY(-3px); filter: brightness(1.06); }
.plo:disabled { filter: saturate(.35) brightness(.75); cursor: default; }
@media (prefers-reduced-motion: reduce) { .pl, .plo { transition: none; } .plopts { animation: none; } }
.pl-ranked { background: linear-gradient(180deg, #F7D98A, #E2B048); }
.pl-casual { background: linear-gradient(180deg, #8FE3D6, #4CB8AC); }
#p-home .side.split { display: grid; grid-template-rows: minmax(0, 1.15fr) minmax(0, 1fr); gap: 16px; height: clamp(360px, 82%, 100%); padding: 0; background: none; box-shadow: none; }
.sbox { display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto; min-height: 0; padding: 16px 18px; background: var(--glass); box-shadow: 0 0 0 1px rgba(241, 230, 208, .1), 0 20px 50px rgba(0, 0, 0, .35); border-radius: 6px; }
/* Play on a phone (Theo, 14 Nov 2026: "less long", and the mode buttons looked unprofessional on mobile).
   Desktop keeps its tiles. On a phone the modes are one full-width list: title on one line, the line under it,
   a chevron that turns when Ranked or Casual opens its choices underneath. The painting is shorter, so a way to
   play is on the first screen, and the side boxes stack at their own height instead of the desktop split. */
@media (max-width: 860px) {
  #p-home > .art { height: 44vh; }
  #p-home .lead-text { padding-top: 22vh; padding-bottom: 12px; }
  #p-home .lead-text > p { margin-top: 8px; font-size: 14.5px; line-height: 1.45; }
  #p-home .playlist { gap: 8px; margin-top: 18px; }
  #p-home .plrow { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  #p-home .pl, #p-home .plo { grid-template-columns: minmax(0, 1fr) 16px; column-gap: 12px; row-gap: 3px; align-items: center; min-height: 64px; padding: 12px 14px 12px 16px; box-shadow: 0 6px 16px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .35); }
  #p-home .plo { min-height: 56px; padding: 10px 14px 10px 16px; }
  #p-home .pl b, #p-home .pl span, #p-home .plo b, #p-home .plo span { grid-column: 1; }
  #p-home .pl b, #p-home .plo b { font-size: 13px; letter-spacing: .1em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  #p-home .plo b { font-size: 12px; }
  #p-home .pl span, #p-home .plo span { font-size: 13px; line-height: 1.35; }
  #p-home .pl::after, #p-home .plo::after { content: ""; grid-column: 2; grid-row: 1 / span 2; width: 16px; height: 16px; background: currentColor; opacity: .62; transition: transform .22s cubic-bezier(.16, 1, .3, 1);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 5l7 7-7 7'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 5l7 7-7 7'/%3E%3C/svg%3E") center / contain no-repeat; }
  #p-home .pl[aria-expanded="true"]::after { transform: rotate(90deg); }
  #p-home .pl:hover:not(:disabled), #p-home .plo:hover:not(:disabled) { transform: none; }
  #p-home .pl:active:not(:disabled), #p-home .plo:active:not(:disabled) { transform: scale(.985); filter: brightness(.95); }
  #p-home .plopts { grid-template-columns: minmax(0, 1fr); gap: 6px; margin: 0 0 4px 14px; animation-name: pldown; }
  #p-home .side.split { grid-template-rows: auto auto; height: auto; margin-top: 20px; gap: 12px; }
  #p-home .sbox { grid-template-rows: auto; }
  #p-home .glist { max-height: none; }
}
@keyframes pldown { from { opacity: 0; transform: translateY(-6px); } }
@media (max-width: 860px) and (prefers-reduced-motion: reduce) { #p-home .pl::after, #p-home .plo::after { transition: none; } }
@media (max-width: 860px) { .plrow { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); } .plopts { grid-template-columns: 1fr; gap: 8px; } .plo { padding: 10px 12px; } .pl { min-height: 0; } #p-home .side.split { height: auto; } }
@media (max-width: 860px) { #p-home .pl .plk { grid-column: 1; } #p-home .pl-lesson::after { grid-row: 1 / span 3; } #p-home .pl-lesson b { font-size: 15px; } #p-home .plrow.lessonrow .pl { min-height: 76px; } #p-home .plrow.lessonrow.seen .pl { min-height: 0; } }   /* Learn to play on a phone */
/* The Home Screen nudge (15 Nov 2026) */
.a2hs { display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 10px 12px; border: 1px solid rgba(241, 230, 208, .22); border-radius: 10px; background: rgba(241, 230, 208, .06); font-size: 13.5px; line-height: 1.4; }
.a2hs[hidden] { display: none; }
.a2hs > div { flex: 1; min-width: 0; }
.a2hs b { display: block; color: var(--amber); font-weight: 600; }
.a2hs span { opacity: .85; }
.a2hs button { flex: none; border: 0; border-radius: 8px; min-height: 40px; padding: 0 14px; font: 600 14px/1 var(--f-body, sans-serif); background: var(--amber); color: #1A1204; cursor: pointer; }
.a2hs button[hidden] { display: none; }
.a2hs .a2hsx { min-width: 40px; padding: 0; background: transparent; color: inherit; font-size: 20px; opacity: .7; }
.a2hs button:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }

/* Ranked vs AI: how many opponents, as a small tab on the button's own card (18 Nov 2026). The card is the gold
   tile; the button fills its top and the tab sits along its foot, so the row of buttons keeps its shape. */
.plai { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; min-width: 0; border-radius: 6px; overflow: hidden; box-shadow: 0 8px 20px rgba(0, 0, 0, .4), inset 0 1px 0 rgba(255, 255, 255, .35); transition: transform .2s, filter .2s; }
.plai:hover { transform: translateY(-3px); filter: brightness(1.04); }
.plai > .plo { background: none !important; box-shadow: none !important; border-radius: 0; }
.plai > .plo:hover:not(:disabled) { transform: none; filter: none; }
.aiseg { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; padding: 8px clamp(14px, 1.2vw, 20px) 11px; border-top: 1px solid rgba(14, 10, 28, .16); }
.aiseg span { flex: 1 1 100%; margin: 0 0 1px; font: 400 10px/1 var(--f-disp); letter-spacing: .14em; text-transform: uppercase; color: #0E0A1C; opacity: .72; }
.aiseg button { flex: 1 1 0; min-width: 0; height: 28px; padding: 0; border-radius: 5px; border: 1px solid rgba(14, 10, 28, .4); background: rgba(14, 10, 28, .06); color: #0E0A1C; font: 700 14px/1 var(--f-num); cursor: pointer; box-shadow: none; }
.aiseg button:hover { background: rgba(14, 10, 28, .16); }
.aiseg button[aria-pressed="true"] { background: #0E0A1C; border-color: #0E0A1C; color: #F7D98A; }
@media (prefers-reduced-motion: reduce) { .plai { transition: none; } }
@media (max-width: 860px) { .plai:hover { transform: none; } .aiseg { padding: 6px 14px 9px 16px; } .aiseg button { height: 34px; } }

/* Back to your game (20 Nov 2026): the first thing on the Play screen while a game you sat in is still going. */
.resume { display: flex; flex-direction: column; gap: 4px; margin: 0 0 16px; padding: 14px 18px; border-radius: 12px; border: 1px solid var(--amber, #FFB81C); background: rgba(255, 184, 28, .12); color: var(--ink); text-decoration: none; }
.resume[hidden] { display: none; }
.resume b { font-size: 18px; color: var(--amber, #FFB81C); }
.resume span { font-size: 14px; opacity: .9; }

/* ---------------------------------------------------------------- Profile, second look (24 Nov 2026)
   Theo: "pretty dated and basic compared to the rest, and is also only using 2/3rds of the screen". The record and the
   pictures now stand side by side across the whole width. The record is four figures and then one row a faction, in
   that faction's colours with its emblem, a bar for the share won and a pip for each deck open. It stays in view while
   the pictures scroll. Under 1180px the two go back to one column. */
#p-profile { grid-template-columns: minmax(280px, 30vw) minmax(0, 1fr); }
#p-profile > .art { width: 30vw; background-position: 50% 22%; }
.prof-fav { margin: 8px 0 0; font-size: 13px; color: var(--muted); }
.prof-record { max-width: none; align-self: stretch; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: clamp(24px, 3vw, 56px); align-content: start; padding-right: clamp(18px, 2.4vw, 40px); }
.prof-record h2 { margin-top: 22px; }
.prof-col > h2:first-child, .prof-tiles + h2 { margin-top: 0; }
#profmain { position: sticky; top: 0; align-self: start; container-type: inline-size; }
@container (max-width: 560px) { #profmain .prof-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.prof-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 26px; }
/* The number is sized from its own tile, not the window (25 Nov 2026): on a laptop the tiles share half the page, and
   "100%" ran out of its box into the next one. */
.ptile { container-type: inline-size; min-width: 0; padding: 16px 14px 13px; border-radius: 6px; background: rgba(241, 230, 208, .045); box-shadow: inset 0 0 0 1px rgba(241, 230, 208, .1), inset 0 2px 0 var(--amber); }
.ptile b { display: block; white-space: nowrap; font: 400 clamp(15px, 21cqw, 38px)/1 var(--f-disp); letter-spacing: .02em; color: var(--ink); }
.ptile b small { font: 400 12px/1 var(--f-body); color: var(--muted); letter-spacing: 0; }
.ptile span { display: block; margin-top: 9px; font: 400 10px/1.2 var(--f-disp); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.recf { display: grid; gap: 6px; }
.recrow { display: grid; grid-template-columns: 30px minmax(0, 1.15fr) minmax(60px, 1.5fr) 66px auto; align-items: center; gap: 14px; padding: 11px 14px 11px 12px; border-radius: 6px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--fac) 17%, transparent), color-mix(in srgb, var(--fac) 4%, transparent) 62%, transparent); box-shadow: inset 3px 0 0 var(--fac); }
.recrow .em svg { display: block; width: 26px; height: 26px; color: var(--fac-ink); }
.recrow .who b { display: block; font: 600 15.5px/1.2 var(--f-body); }
.recrow .who small { display: block; margin-top: 2px; font-size: 12.5px; color: var(--muted); }
.recrow .bar { height: 6px; border-radius: 3px; background: rgba(241, 230, 208, .1); overflow: hidden; }
.recrow .bar i { display: block; height: 100%; width: calc(var(--p, 0) * 100%); border-radius: 3px; background: var(--fac); }
.recrow .rate { text-align: right; white-space: nowrap; font: 400 14px/1 var(--f-disp); color: var(--fac-ink); }
.recrow .pips { display: inline-flex; gap: 4px; }
.recrow .pips i { width: 8px; height: 12px; border-radius: 2px; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--fac) 60%, transparent); }
.recrow .pips i.on { background: var(--fac-ink); box-shadow: none; }
.recrow.none { opacity: .55; }
@media (max-width: 1180px) { .prof-record { grid-template-columns: minmax(0, 1fr); } #profmain { position: static; } }
@media (max-width: 860px) { #p-profile > .art { width: 100%; } .prof-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } .recrow { grid-template-columns: 26px minmax(0, 1fr) 44px auto; } .recrow .bar { display: none; } }

/* a scenario's kind of fight, beside its name (24 Nov 2026) */
.sctag { margin-left: 10px; padding: 2px 7px; border-radius: 3px; font: 600 10.5px/1.4 var(--f-body); font-style: normal; letter-spacing: .08em; text-transform: uppercase; color: var(--amber); box-shadow: inset 0 0 0 1px rgba(242, 196, 109, .4); vertical-align: 2px; }

/* today's Daily Operation leads the list (24 Nov 2026) */
#scenlist li.daily { margin-bottom: 6px; padding-left: 14px; border-left: 3px solid var(--amber); background: linear-gradient(90deg, rgba(242, 196, 109, .09), transparent 60%); }
#scenlist li.daily .sctag { color: #1B1430; background: var(--amber); box-shadow: none; }
