/* Dusk Paperback: the Table's brand layer (Theo, 5 Nov 2026).
   After Tim White's paperback covers: the painting carries the drama, the interface is calm, wide cover type on top.
   Paintings come from the General PB Art set (public/assets/art). Loaded after style.css and lobby.css. */

:root {
  --void: #0E0A1C;
  --dusk: #1E1738;
  --plum: #9B4C6E;
  --glass: linear-gradient(180deg, rgba(42, 33, 71, .94), rgba(22, 16, 42, .97));
  --btn: linear-gradient(180deg, #FFE3C2, var(--peach) 55%, #E39770);
  --btn-hi: inset 0 1px 0 rgba(255, 255, 255, .55), 0 0 0 1px rgba(14, 10, 28, .5);
  /* the one recurring mark: horizon stripes, gold to plum */
  --stripes: linear-gradient(var(--amber), var(--amber)) 0 0 / 100% 4px no-repeat,
             linear-gradient(var(--peach), var(--peach)) 0 7px / 100% 3px no-repeat,
             linear-gradient(var(--danger), var(--danger)) 0 13px / 100% 2px no-repeat,
             linear-gradient(var(--plum), var(--plum)) 0 18px / 100% 1px no-repeat;
}
html { font-synthesis-weight: none; }
html, body { font-family: var(--f-body); }
body { -webkit-font-smoothing: antialiased; }
::selection { background: var(--peach); color: var(--void); }

/* film grain over everything, very faint, like a printed cover */
body::after { content: ""; position: fixed; inset: 0; z-index: 2000; pointer-events: none; opacity: .055;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 .95  0 0 0 0 .85  0 0 0 .9 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"); }

/* ---------------------------------------------------------------- type: Michroma is wide, so it runs smaller */
h1 { font-size: 15px; letter-spacing: .1em; font-weight: 400; }
h2 { font-size: 10.5px; letter-spacing: .16em; font-weight: 400; }
.zhead { font-size: 11px; letter-spacing: .16em; font-weight: 400; }
.cardview .txt h3, .tokcard h3 { font-size: 16px; letter-spacing: .04em; font-weight: 400; line-height: 1.25; }
.dpfname { font-size: 10.5px; letter-spacing: .1em; font-weight: 400; }
.dprow b { font-size: 11px; letter-spacing: .05em; font-weight: 400; line-height: 1.3; }
.lrnkick { font-size: 10px; letter-spacing: .24em; font-weight: 400; }
.lrncard h2 { font-size: 19px; letter-spacing: .04em; font-weight: 400; line-height: 1.25; display: block; color: var(--ink); }
.lrncard h3 { font-size: 13.5px; letter-spacing: .05em; font-weight: 400; line-height: 1.3; }
.lrnpair b { font-size: 12px; letter-spacing: .06em; font-weight: 400; }
#combat .chead h3 { font-size: 13px; letter-spacing: .14em; font-weight: 400; }
#combat .cohead b { font-size: 10.5px; letter-spacing: .14em; font-weight: 400; }
#ctabs button { font-size: 11px; letter-spacing: .1em; font-weight: 400; }
.gover .k { font-size: 10.5px; letter-spacing: .3em; font-weight: 400; }
.gover h3 { font-size: 26px; letter-spacing: .05em; font-weight: 400; line-height: 1.2; text-wrap: balance; }
.kwx dt { font-weight: 700; letter-spacing: .06em; }

/* ---------------------------------------------------------------- buttons: the horizon glow is the primary action */
button { background: var(--btn); color: var(--void); border-radius: 4px; box-shadow: var(--btn-hi); font-weight: 600; letter-spacing: .01em; transition: filter .15s, transform .15s; }
button:hover:not(:disabled) { filter: brightness(1.06); }
button:active:not(:disabled) { transform: translateY(1px); }
/* small working buttons are raised plates, so the peach stays rare and means "the main thing" */
:is(#side, #right, #setupsec, #modalbody) button.small:not(.ghost), #copylink { 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); }
button.ghost { background: rgba(14, 10, 28, .35); color: var(--ink); border: 1px solid rgba(241, 230, 208, .22); box-shadow: none; }
button.ghost:hover:not(:disabled) { border-color: rgba(244, 180, 138, .6); filter: none; }
button.danger, button.ghost.danger { color: var(--danger); border-color: rgba(227, 111, 90, .55); }
button:focus-visible, a:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
input, select { background: rgba(14, 10, 28, .7); border-color: var(--line); border-radius: 4px; }
input:focus, select:focus { outline: none; border-color: var(--peach); box-shadow: 0 0 0 3px rgba(244, 180, 138, .18); }
#menu button, .lseg button, .lx, .switch, .step button, #ctabs button, .llink, #drawertab { box-shadow: none; }

/* ---------------------------------------------------------------- panels: dusk glass */
#side, #right { background: var(--glass); border-color: rgba(241, 230, 208, .1); }
#side footer { background: #19132F; }
#side header { position: relative; padding-bottom: 30px; }
#side header::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 8px; height: 19px; background: var(--stripes); opacity: .9; }
#side header h1, .lbrand, .obbrand { background: linear-gradient(180deg, #FFF8EA 0%, var(--ink) 44%, #B9A6C9 52%, var(--peach) 66%, #FFE6C0 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
#modalbox, #cardbox, .ldialog { background: var(--glass); border-color: rgba(241, 230, 208, .16); border-radius: 8px; }
#modal, #cardover { background: rgba(8, 5, 16, .62); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
#menu { background: var(--glass); border-color: rgba(241, 230, 208, .16); }
.step { border-radius: 4px; }
.step.current, .step.now { border-color: rgba(244, 180, 138, .55); }
#turn .whose { background: rgba(14, 10, 28, .6); border-radius: 4px; }
#setupsec.onboard { background: linear-gradient(180deg, #2A2147, #1A1433); border-color: rgba(241, 230, 208, .16); border-radius: 8px; }

/* resources: Ore is sunglow, Crys keeps its violet, Planet Points are bone */
.resbox { border-radius: 4px; background: rgba(14, 10, 28, .4); }
.resbox .v { font-weight: 700; font-variant-numeric: tabular-nums; }
.resbox .ore, .mchip.ore b, #mrespop .v.ore, .lrnpair b.ore { color: #F2A65A; }
.resbox .pp, .mchip.pp b, #mrespop .v.pp { color: var(--ink); }

/* deck picker rows: covers, not list items */
.dprow, .obrow { border-radius: 6px; background: linear-gradient(90deg, rgba(42, 33, 71, .95), rgba(26, 20, 51, .95)); border-color: rgba(241, 230, 208, .14); }
.dprow:hover { border-color: rgba(244, 180, 138, .55); }
.dprow.chosen { border-color: var(--peach); box-shadow: 0 0 0 1px var(--peach), 0 8px 24px -10px rgba(244, 180, 138, .5); }
.dprow .art::after, .obrow .art::after { background: linear-gradient(90deg, transparent 50%, rgba(42, 33, 71, .95)); }
.dprow b em, .obrow b em { background: var(--amber); color: var(--void); border-radius: 2px; }

/* ---------------------------------------------------------------- turn change: a painted card, two seconds, then gone */
#turnbanner { top: 38%; width: min(460px, calc(100% - 40px)); aspect-ratio: 16 / 7; padding: 0; border: 1px solid rgba(241, 230, 208, .3); border-bottom: 0; border-radius: 6px; overflow: hidden; display: grid; place-content: center; gap: 8px;
  background: radial-gradient(ellipse at center, rgba(14, 10, 28, .1), rgba(14, 10, 28, .78) 78%), var(--art, none) center / cover, var(--void);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .7), inset 0 -5px 0 var(--c, var(--amber));
  font: 400 clamp(18px, 2.6vw, 26px)/1.15 var(--f-disp); letter-spacing: .08em; text-shadow: 0 2px 18px rgba(14, 10, 28, .9), 0 0 30px rgba(244, 180, 138, .35);
  animation: bannerin .55s cubic-bezier(.16, 1, .3, 1); }
#turnbanner .sub { order: -1; font: 600 10.5px/1 var(--f-body); letter-spacing: .32em; text-transform: uppercase; color: var(--amber); margin: 0; }
@keyframes bannerin { from { opacity: 0; transform: translate(-50%, -46%) scale(.96); } }

/* ---------------------------------------------------------------- game over: the winner gets a painting */
.gover { margin: -14px -14px 0; padding: 120px 22px 22px; border-radius: 8px 8px 0 0; text-align: center;
  background: linear-gradient(180deg, rgba(14, 10, 28, 0) 20%, rgba(22, 16, 42, .9) 62%, rgba(22, 16, 42, 1)), url(assets/art/sm/cliff.jpg) center 30% / cover; }
.gover p { color: var(--ink); }
#modalbox:has(.gover) #modalclose { position: relative; z-index: 1; }

/* ---------------------------------------------------------------- learning layer: the welcome card opens on a painting */
.lrncard { background: var(--glass); border-color: rgba(241, 230, 208, .16); border-radius: 8px; }
#lrn.welcome .lrncard { padding-top: 0; overflow: hidden; }
#lrn.welcome .lrncard::before { content: ""; display: block; height: 150px; margin: 0 -22px 16px; background: linear-gradient(180deg, rgba(42, 33, 71, 0) 40%, rgba(42, 33, 71, .96)), url(assets/art/sm/bench-blue.jpg) center 40% / cover; }
.lrnopts button { box-shadow: none; border-radius: 6px; }
.lrnopts button:first-child { background: var(--btn); color: var(--void); }
#lrn.tour .lrncard { border-color: var(--peach); }
.lrnspot { border-radius: 6px; }

/* ---------------------------------------------------------------- phone */
@media (max-width: 760px), (max-height: 500px) {
  #monboard { background: linear-gradient(180deg, rgba(14, 10, 28, .25) 0%, rgba(14, 10, 28, .78) 34%, var(--bg) 62%), url(assets/art/sm/dusk-violet.jpg) 50% 0 / auto 46% no-repeat, var(--bg); }
  .obbrand { font-weight: 400; font-size: 24px; letter-spacing: .08em; margin-top: 18vh; padding-bottom: 26px; position: relative; text-shadow: none; filter: drop-shadow(0 2px 10px rgba(14, 10, 28, .9)); }
  .obbrand::after { content: ""; position: absolute; left: 0; width: 180px; bottom: 0; height: 19px; background: var(--stripes); }
  .obsub { font-weight: 400; font-size: 10.5px; letter-spacing: .2em; }
  .obgame b, .obrow b { font-weight: 400; font-size: 13px; letter-spacing: .05em; line-height: 1.3; }
  .obgo, .mend { background: var(--btn); color: var(--void); box-shadow: var(--btn-hi); border-radius: 6px; }
  #obname { border-radius: 6px; }
  .sheethead .t { font-weight: 400; font-size: 14px; letter-spacing: .06em; }
  #mbar { background: linear-gradient(180deg, rgba(42, 33, 71, .92), rgba(26, 20, 51, .92)); border-color: rgba(241, 230, 208, .14); border-radius: 8px; }
  #turnbanner { top: 30%; }
}
@media (prefers-reduced-motion: reduce) { #turnbanner { animation: none; } button { transition: none; } }

/* ---------------------------------------------------------------- lobby: the page opens on a painting */
body.lobbypage { background: var(--bg); }
#lsky { position: absolute; left: 0; right: 0; top: 0; height: min(560px, 72vh); overflow: hidden; z-index: 0; pointer-events: none;
  -webkit-mask-image: linear-gradient(180deg, #000 45%, transparent); mask-image: linear-gradient(180deg, #000 45%, transparent); }
#lsky::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(14, 10, 28, .35), rgba(14, 10, 28, .1) 30%, rgba(14, 10, 28, .55) 75%); }
#lsky img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 40%; opacity: 0; transform: scale(1.06); transition: opacity 2.4s ease, transform 16s linear; }
#lsky img.on { opacity: 1; transform: scale(1); }
#lobby { position: relative; z-index: 1; }
.lbrand { font-weight: 400; font-size: 17px; letter-spacing: .14em; filter: drop-shadow(0 2px 8px rgba(14, 10, 28, .8)); }
.lbrand span { -webkit-text-fill-color: var(--amber); font-weight: 400; letter-spacing: .14em; }
.lprofile { background: rgba(14, 10, 28, .6); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); border-color: rgba(241, 230, 208, .2); }
.lprofile .av { background: #2A2147; }
.lintro { margin: 150px 0 34px; position: relative; padding-top: 0; }
.lintro h1 { font-weight: 400; font-size: 34px; letter-spacing: .06em; line-height: 1.15; text-shadow: 0 2px 24px rgba(14, 10, 28, .9); padding-bottom: 30px; position: relative; }
.lintro h1::after { content: ""; position: absolute; left: 0; bottom: 0; width: 240px; height: 19px; background: var(--stripes); }
.lintro > p { color: var(--ink); text-shadow: 0 1px 12px rgba(14, 10, 28, .95); }
.lprimary, .gjoin.primary { background: var(--btn); color: var(--void); box-shadow: var(--btn-hi), 0 10px 26px -10px rgba(244, 180, 138, .6); border-radius: 6px; }
.lghost, .gjoin { border-radius: 6px; }
.lcode input { border-radius: 6px 0 0 6px; background: rgba(14, 10, 28, .78); }
.lcode button { border-radius: 0 6px 6px 0; }

/* game cards are small covers: painting on top, details on the plate */
.lgame { padding: 128px 16px 14px; border-radius: 6px; overflow: hidden; background: linear-gradient(180deg, rgba(14, 10, 28, 0) 0, rgba(30, 23, 56, .55) 70px, rgba(30, 23, 56, .97) 132px), var(--art, none) center top / 100% auto no-repeat, #1E1738; border-color: rgba(241, 230, 208, .16); transition: transform .3s cubic-bezier(.16, 1, .3, 1), border-color .3s, background-size .8s ease; }
.lgame:hover { border-color: rgba(244, 180, 138, .5); transform: translateY(-2px); background-size: auto, 106% auto, auto; }
.gtop h2 { font-weight: 400; font-size: 14px; letter-spacing: .06em; line-height: 1.35; }
.gstatus { position: absolute; top: 12px; right: 12px; border-radius: 3px; background: rgba(14, 10, 28, .72); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); letter-spacing: .14em; }
.gstatus.open { background: rgba(14, 10, 28, .72); }
.gstatus.live { background: rgba(14, 10, 28, .72); }
.pip { color: var(--void); }
.chip { border-radius: 3px; }
.lempty { border-radius: 6px; background: rgba(30, 23, 56, .6); }
.lempty h2 { font-family: var(--f-body); }
.ldtitle h2 { font-weight: 400; font-size: 16px; letter-spacing: .08em; }
.lrhead h3 { font-weight: 400; font-size: 11px; letter-spacing: .16em; }
.lseg { background: rgba(14, 10, 28, .7); border-radius: 6px; }
.lseg button { border-radius: 4px; }
.lseg button.on { background: #3A2E63; }
.step button { background: #2A2147; color: var(--ink); }
#adminbar { border-radius: 6px; background: rgba(14, 10, 28, .7); }
#adminbar b { font-size: 11px; letter-spacing: .16em; font-weight: 400; }
@media (max-width: 760px), (max-height: 500px) {
  #lsky { height: 420px; }
  .lintro { margin-top: 110px; }
  .lintro h1 { font-size: 24px; }
  .lbrand { font-size: 13px; letter-spacing: .1em; }
  .lgame { padding-top: 116px; }
}
@media (prefers-reduced-motion: reduce) { #lsky img { transition: none; transform: none; } .lgame { transition: none; } }
