:root {
  color-scheme: dark;
  --bg:#0c120f; --panel:#151e18; --panel2:#1e2a21; --line:#3a4434;
  --text:#e9e5d5; --muted:#9aab98; --accent:#c8a66a; --accent2:#edce91;
  --danger:#de8673; --good:#a2c6a0; --blk:#91b6c0;
  --bulwark:#8ca8b7; --cinderist:#dba075; --shade:#b2a0bd; --chorister:#9fbc95; --thornbow:#b3c685; --lamplighter:#e6bd74; --junk:#969586;
  --card-width:166px; --card-height:250px;
  --serif:"Palatino Linotype","Book Antiqua",Georgia,serif;
  font-synthesis:none;
}
* { box-sizing:border-box; }
html,body { margin:0; height:100%; }
body { background:var(--bg); color:var(--text); font:14px/1.5 "Segoe UI",system-ui,sans-serif; overflow:hidden; }
body::before { content:""; position:fixed; inset:0; z-index:-2; background:linear-gradient(90deg,#090f0bcc,#09100c38 65%,#090f0b75),url('assets/gloam-sanctuary.png') center/cover; }
body::after { content:""; position:fixed; inset:0; pointer-events:none; z-index:4; opacity:.035; background-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Cpath filter='url(%23n)' opacity='.6' d='M0 0h180v180H0z'/%3E%3C/svg%3E"); }
#app { position:relative; isolation:isolate; height:100%; height:100dvh; display:flex; flex-direction:column; }
button,input { font:inherit; }
button { color:inherit; }
button:focus-visible,[role=button]:focus-visible,input:focus-visible { outline:2px solid var(--accent2); outline-offset:4px; }
button { -webkit-tap-highlight-color:transparent; }
h1,h2,h3,p { margin:0; }
h1,h2 { font-family:var(--serif); font-weight:400; line-height:1.15; }
h3 { display:flex; align-items:center; gap:10px; color:var(--accent); font-size:11px; font-weight:600; letter-spacing:.17em; text-transform:uppercase; margin:0 0 14px; }
h3 .small { margin-left:auto; letter-spacing:0; text-transform:none; font-weight:400; }
.muted { color:var(--muted); } .small { font-size:12px; }
.icon { display:inline-block; flex-shrink:0; width:20px; height:20px; vertical-align:middle; }
.gold-icon { object-fit:contain; filter:drop-shadow(0 1px 1px #22170a80); }
.eyebrow { color:var(--accent); font-size:9px; font-weight:600; letter-spacing:.22em; text-transform:uppercase; }
.brand { display:inline-flex; align-items:center; gap:10px; font:17px var(--serif); letter-spacing:.2em; color:var(--text); white-space:nowrap; }
.brand>.icon { width:28px; height:34px; color:var(--accent2); filter:drop-shadow(0 0 10px #dba44a60); }
.btn { display:inline-flex; align-items:center; justify-content:center; gap:8px; padding:9px 16px; background:#1a251bc7; border:1px solid #5b604449; border-radius:3px; color:#d7d9c7; cursor:pointer; transition:background .2s,border-color .2s,box-shadow .2s,transform .2s; }
.btn .icon { width:17px; height:17px; }
.btn:hover:not(:disabled) { border-color:var(--accent); background:#2c3422; color:var(--accent2); box-shadow:0 3px 20px #0003; }
.btn:active:not(:disabled) { transform:translateY(2px); }
.btn:disabled { opacity:.4; cursor:default; }
.btn.primary { background:linear-gradient(115deg,#ddc28a,#b99a5f); border:1px solid #e1c994; box-shadow:inset 0 0 0 3px #342b2720,0 4px 20px #0004; color:#222719; font-weight:650; }
.btn.primary:hover:not(:disabled) { background:linear-gradient(115deg,#ebd39f,#cbb075); color:#1a2015; box-shadow:0 0 25px #c5a36b30; }
.btn.big { padding:14px 20px; font-size:14px; }
.btn.big .icon:last-child { margin-left:auto; }
.btn.ghost { border-color:transparent; background:transparent; color:var(--muted); }
.btn.ghost:hover:not(:disabled) { border-color:#9f945c55; background:#a8995320; }
input { width:100%; min-width:0; outline:none; padding:12px 14px; color:var(--text); background:#090f0bcc; border:1px solid #67705455; border-radius:3px; transition:border-color .2s,box-shadow .2s; }
input::placeholder { color:#7e8a77; }
input:focus { border-color:var(--accent); box-shadow:0 0 0 3px #c8a66a10; }
.panel { background:linear-gradient(135deg,#1c291eea,#101a13f5); border:1px solid #8d845e55; border-radius:4px; padding:24px; box-shadow:0 14px 50px #0003,inset 0 0 0 4px #0001; }
.center-screen { margin:auto; text-align:center; }
.center-screen h1 { font-size:48px; }
.loading-lantern { color:var(--accent); margin-bottom:18px; animation:lantern-glow 2s ease-in-out infinite; }
.loading-lantern .icon { width:52px; height:66px; }
.offline { position:fixed; top:12px; left:50%; transform:translateX(-50%); padding:9px 20px; border:1px solid #de867380; background:#341b16f5; z-index:90; color:#f0c3b5; }
.ambience { position:fixed; inset:0; overflow:hidden; pointer-events:none; z-index:2; }
.ambience i { position:absolute; left:var(--x); bottom:-10px; width:2px; height:2px; border-radius:50%; background:#e7c78b; box-shadow:0 0 5px 1px #e2b86655; animation:ember-rise var(--duration) var(--delay) linear infinite; }
@keyframes ember-rise { 0%{transform:translate(0,0);opacity:0} 12%{opacity:.6} 80%{opacity:.3} 100%{transform:translate(var(--drift),-95vh);opacity:0} }
@keyframes lantern-glow { 50%{filter:drop-shadow(0 0 18px #e5b85090)} }

/* The threshold */
.home-shell { display:flex; flex-direction:column; height:100%; overflow:auto; padding:0 clamp(24px,5vw,88px); background:linear-gradient(0deg,#080e0cdd,transparent 45%,#080f0b50); }
.home-nav { min-height:88px; display:flex; align-items:center; gap:24px; border-bottom:1px solid #cab17d26; }
.nav-note { color:#b4b7a0; font-size:9px; letter-spacing:.22em; margin-left:auto; }
.sound-toggle { font-size:11px; white-space:nowrap; }
.home { width:min(1180px,100%); flex:1; min-height:520px; margin:auto; display:grid; grid-template-columns:1.25fr 1fr; gap:50px; align-items:center; padding:54px 0 40px; }
.hero { padding-bottom:20px; text-shadow:0 2px 30px #000; }
.hero .eyebrow { display:flex; align-items:center; gap:12px; font-size:9px; letter-spacing:.2em; }
.hero .eyebrow>span { width:25px; height:1px; background:var(--accent); }
.hero h1 { font-size:clamp(65px,7.5vw,114px); letter-spacing:-.065em; color:#efe6c9; margin:18px 0 20px -5px; text-shadow:0 2px 35px #000a; }
.hero-motto { font:32px/1.3 var(--serif); color:#e1dfc9; }
.hero-motto em { color:var(--accent2); font-weight:400; }
.hero .tagline { margin:22px 0 28px; color:#b8c1ac; font-size:15px; line-height:1.8; }
.hero-meta { display:flex; align-items:center; gap:15px; color:#b3b8a1; font-size:10px; }
.hero-meta span { display:flex; align-items:center; gap:6px; }
.hero-meta .icon { width:15px; height:15px; color:var(--accent); }
.hero-meta i { font-size:5px; color:var(--accent); }
.home-entry { position:relative; width:min(370px,100%); justify-self:end; margin-top:100px; }
.home-card { position:relative; display:grid; gap:12px; padding:30px; background:linear-gradient(135deg,#19241cf7,#101812fc); box-shadow:0 24px 75px #0008,inset 0 0 0 5px #c8a66a06; border-color:#b8a57170; }
.home-card::before,.home-card::after { content:"◆"; position:absolute; font-size:9px; color:var(--accent); top:-8px; left:12px; background:#182019; padding:0 7px; }
.home-card::after { top:auto; bottom:-8px; left:auto; right:12px; }
.home-card h2 { font-size:27px; margin-bottom:10px; }
.home-card label { font-size:9px; letter-spacing:.15em; color:#aeb7a2; margin-top:5px; }
.home-card .panel-ornament { position:absolute; right:23px; top:20px; color:#c8a66a66; }
.panel-ornament .icon { width:26px; height:32px; }
.home-card .or { display:flex; align-items:center; gap:10px; font-size:8px; letter-spacing:.1em; color:var(--muted); margin:6px 0; }
.home-card .or span { flex:1; height:1px; background:#85876740; }
.join-row { display:grid; grid-template-columns:1fr auto; gap:8px; }
#code { text-transform:uppercase; letter-spacing:.3em; text-align:center; }
.entry-note { font-size:10px; color:#91a08b; text-align:center; padding-top:3px; }
.preview-cards { position:absolute; top:-150px; left:0; right:0; height:200px; pointer-events:none; }
.preview-cards .card { position:absolute; width:130px; height:194px; box-shadow:0 5px 30px #0008; }
.preview-cards .card:nth-child(1) { left:24px; top:16px; transform:rotate(-18deg); }
.preview-cards .card:nth-child(2) { left:118px; top:0; transform:rotate(0deg); }
.preview-cards .card:nth-child(3) { left:210px; top:16px; transform:rotate(18deg); }
.preview-cards .card .cname { font-size:13px; }
.preview-cards .card .cdesc { font-size:10px; }
.preview-cards .card .ctype { font-size:7px; }
.preview-cards .card .cost { width:27px; height:27px; font-size:15px; }
.home-footer { display:flex; align-items:center; gap:30px; min-height:94px; border-top:1px solid #cab17d26; }
.home-modes { display:flex; gap:40px; }
.hm { display:flex; align-items:center; gap:13px; }
.hm>.icon { width:24px; height:28px; color:var(--accent); }
.hm b { display:block; color:#d4d7c2; font:15px var(--serif); margin-bottom:5px; }
.hm span { display:block; color:#8e9b86; font-size:10px; }
.footer-note { margin-left:auto; color:#89957b; font-size:8px; letter-spacing:.2em; white-space:nowrap; }

/* Gathering the party */
.lobby { width:min(1440px,94%); margin:0 auto; padding:0 0 30px; height:100%; overflow:auto; scrollbar-width:thin; scrollbar-color:#7d7850 transparent; }
.lobby-head { min-height:76px; display:flex; align-items:center; gap:14px; border-bottom:1px solid #cab17d30; }
.lobby-head .sp { flex:1; }
.lobby-room { display:flex; gap:10px; align-items:center; color:var(--muted); font-size:9px; letter-spacing:.12em; margin-left:30px; }
.code { font:17px Consolas,monospace; letter-spacing:.2em; color:var(--accent2); padding:5px 11px 5px 14px; border:1px dashed #a2915c66; background:#131d1466; }
.lobby-title { padding:26px 0; }
.lobby-title h1 { margin:8px 0; font-size:37px; color:#e5e2cb; }
.lobby-title p { font-size:12px; color:var(--muted); }
.lobby-grid { display:grid; grid-template-columns:minmax(0,1fr) 280px; gap:24px; align-items:start; }
.step { display:grid; place-items:center; width:24px; height:24px; border:1px solid #8a805654; color:var(--accent); font:12px var(--serif); }
.class-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.class-card { position:relative; display:grid; grid-template-rows:auto 1fr; overflow:hidden; padding:0; text-align:left; background:#101a13; border:1px solid #626a4855; border-radius:4px; cursor:pointer; transition:transform .25s,border-color .25s,box-shadow .25s; }
.class-role { display:block; font-size:16px; color:var(--muted); margin-top:3px; }
.class-info { margin-top:6px; font-size:17px; color:var(--muted); }
.class-info summary { width:fit-content; min-height:44px; padding:9px 2px; cursor:pointer; color:var(--accent2); }
.class-info summary:focus-visible { outline:2px solid var(--accent2); outline-offset:2px; }
.class-info p { margin:0 0 8px; }
.class-info b { color:var(--text); }
.class-card:hover { transform:translateY(-5px); border-color:#a7a67e; }
.class-card.on { border-color:var(--c); box-shadow:0 0 0 2px color-mix(in srgb,var(--c) 22%,transparent),0 10px 35px #0005; }
.portrait { display:block; flex:none; object-fit:cover; object-position:var(--face-x,50%) var(--face-y,39%); background-color:#e9dbc2; }
.portrait-bulwark { --face-x:43%; --face-y:23%; }
.portrait-cinderist { --face-x:49%; --face-y:29%; }
.portrait-shade { --face-x:65%; --face-y:26%; }
.portrait-chorister { --face-x:60%; --face-y:24%; }
.portrait-thornbow { --face-x:52%; --face-y:35%; }
.portrait-lamplighter { --face-x:50%; --face-y:37%; }
.class-portrait { width:100%; height:auto; aspect-ratio:3/2; border-bottom:1px solid #6a614b; }
.class-copy { width:100%; padding:10px 14px; background:#0d1712; }
.class-card .top { display:flex; align-items:center; gap:6px; color:var(--c); }
.class-card .top b { font:19px var(--serif); }
.class-card .top>.icon { width:17px; height:17px; }
.class-card .hp { display:flex; align-items:center; gap:3px; margin-left:auto; font-size:10px; color:#c4bfa5; }
.class-card .hp .icon { width:12px; height:12px; }
.class-card p { margin:7px 0; font-size:10.5px; line-height:1.5; color:#b3bda8; min-height:32px; }
.class-card .tr { padding-top:7px; border-top:1px solid #77764f45; font-size:9px; line-height:1.5; }
.class-card .tr b { display:block; color:#d6c293; font-size:10px; font-weight:500; }
.class-card .tr span { color:#939f89; }
.class-check { position:absolute; right:10px; top:10px; display:grid; place-items:center; width:23px; height:23px; border-radius:50%; background:var(--c); color:#101810; opacity:0; transform:scale(.7); transition:opacity .2s,transform .2s; }
.class-check .icon { width:15px; height:15px; }
.class-card.on .class-check { opacity:1; transform:scale(1); }
.lobby-party { align-self:stretch; padding:20px; margin-top:38px; }
.lobby-party h3 { justify-content:space-between; }
.plist { display:grid; gap:8px; }
.prow-l { display:flex; align-items:center; gap:7px; flex-wrap:wrap; min-height:48px; padding:7px; background:#090f0b50; border:1px solid #79805b30; border-radius:3px; }
.party-avatar { width:30px; height:36px; border-radius:2px; border:1px solid #8d82534d; }
.prow-l .nm { font-size:12px; font-weight:500; }
.prow-l .muted { font-size:9px; }
.prow-l .sp { flex:1; }
.prow-l.empty { opacity:.48; border-style:dashed; color:var(--muted); font-size:10px; }
.prow-l.empty .ic { font-size:18px; margin:0 5px; }
.tag { display:inline-block; padding:1px 5px; border:1px solid #7a866550; font-size:7px; letter-spacing:.1em; text-transform:uppercase; color:var(--muted); border-radius:2px; }
.tag.you { color:var(--accent2); border-color:#b19a5a66; }
.dot { display:inline-block; width:5px; height:5px; border-radius:50%; background:var(--good); box-shadow:0 0 8px #9bbf8560; }
.dot.off { background:var(--danger); box-shadow:none; }
.party-promise { display:flex; align-items:center; gap:12px; padding-top:23px; color:#9ea88e; font:14px/1.5 var(--serif); }
.party-promise .icon { width:28px; height:36px; color:var(--accent); }
.mode-list { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; }
.mode-card { display:flex; align-items:center; gap:10px; min-height:76px; padding:14px; background:#121e15bd; border:1px solid #69734d50; border-radius:3px; text-align:left; cursor:pointer; transition:background .2s,border-color .2s; }
.mode-card>.icon { width:24px; height:28px; color:#a0a780; }
.mode-card .top { flex:1; }
.mode-card b { display:block; font:16px var(--serif); color:#c9cfb9; }
.mode-card .top span { display:block; margin-top:5px; color:var(--muted); font-size:9px; }
.mode-card.on { border-color:#b7a06b; background:#29301caa; }
.mode-card.on>.icon,.mode-card.on b { color:var(--accent2); }
.mode-card:disabled { cursor:default; }
.mode-radio { width:11px; height:11px; border:1px solid #7c8261; border-radius:50%; }
.mode-card.on .mode-radio { background:var(--accent); border-color:var(--accent); box-shadow:inset 0 0 0 3px #252b1e; }
.timer-row { display:flex; align-items:center; gap:7px; flex-wrap:wrap; margin-top:14px; }
.timer-label { display:flex; align-items:center; gap:7px; color:var(--muted); font-size:8px; letter-spacing:.14em; margin-right:8px; }
.timer-label .icon { width:14px; height:14px; }
.timer-row .btn { padding:5px 10px; font-size:10px; }
.timer-row .btn.on { border-color:var(--accent); color:var(--accent2); background:#c8a66a15; }
.timer-row>.small { font-size:9px; margin-left:7px; }
.lobby-start { align-self:stretch; display:flex; align-items:flex-end; }
.start-row { display:grid; gap:12px; width:100%; }
.start-row>.small { text-align:center; font-size:8px; letter-spacing:.2em; }

/* Expedition chrome */
.game { display:flex; flex-direction:column; height:100%; min-height:0; background:#0b140e70; }
.topbar { display:flex; align-items:center; gap:16px; min-height:64px; padding:10px 25px; border-bottom:1px solid #a08c5550; background:#0d1711eb; box-shadow:0 3px 20px #0002; z-index:9; }
.topbar .brand { font-size:14px; letter-spacing:.14em; }
.topbar .brand>.icon { width:23px; height:28px; }
.topbar .where { color:#a8b29d; font-size:10px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.topbar .where b { color:#ddd9c2; font-weight:500; }
.topbar .sp { flex:1; }
.badge { display:inline-flex; align-items:center; gap:5px; white-space:nowrap; font-size:9px; padding:4px 9px; border:1px solid #9f925548; border-radius:2px; color:#c9bd8f; }
.badge .icon { width:13px; height:15px; }
.clock { font:11px Consolas,monospace; color:#b7bfa8; white-space:nowrap; }
.clock.warn { color:var(--accent2); } .clock.over { color:var(--danger); }
.stat { display:inline-flex; align-items:center; gap:5px; font-size:12px; font-variant-numeric:tabular-nums; white-space:nowrap; }
.stat .icon { width:16px; height:16px; }
.stat small { color:var(--muted); font-size:10px; }
.health-stat .icon { color:var(--danger); } .gold-stat { color:var(--accent2); }
.gold-stat .gold-icon { width:20px; height:20px; }
.trinkets { display:flex; gap:3px; max-width:116px; overflow:hidden; }
.trinket-ic { display:grid; place-items:center; width:26px; height:26px; flex:none; font-size:16px; filter:saturate(.55); background:#c8a66a0b; border:1px solid #8f8b5c44; border-radius:3px; cursor:help; }
.trinket-ic>.icon { width:17px; height:17px; color:#c9b37c; }
.topbar .btn { padding:6px 9px; font-size:10px; }
.stage { display:flex; flex:1; min-height:0; }
.main { display:flex; flex-direction:column; flex:1; min-width:0; padding:28px 32px; overflow:auto; background:linear-gradient(#0c170f8c,#0b140ce6); }
.side { width:230px; flex:none; padding:24px 18px; border-left:1px solid #8d86512e; background:#0d1811d9; overflow:auto; }
.side .sp-row { padding:12px 10px; margin-bottom:10px; border:1px solid #73805236; border-radius:3px; background:#13201790; }
.side .sp-row.me { border-color:#9e915651; }
.sp-head { display:flex; align-items:center; gap:7px; font-size:12px; }
.sp-head .st { font-size:8px; color:var(--muted); margin-left:auto; }
.sp-head .st.ok { color:var(--good); }
.sp-meta { display:flex; gap:14px; margin-top:7px; color:var(--muted); font-size:10px; }
.sp-meta>span { display:flex; align-items:center; gap:5px; }
.sp-meta .icon { width:13px; height:13px; color:var(--accent); }
.mini-tr { display:flex; gap:5px; margin-top:8px; font-size:14px; filter:saturate(.5); }
.mini-tr>span { cursor:help; }
.mini-tr .icon { width:16px; height:16px; color:#c3af76; }
.hpbar { position:relative; overflow:hidden; height:15px; margin-top:6px; border:1px solid #253227; background:#070d09; border-radius:2px; }
.hpbar .fill { position:absolute; inset:0 auto 0 0; background:linear-gradient(90deg,#7c4035,#b76a56); border-right:1px solid #deab82aa; }
.hpbar>span { position:relative; display:block; color:#eee0cc; text-align:center; font-size:9px; line-height:13px; font-weight:600; text-shadow:0 1px 3px #000; font-variant-numeric:tabular-nums; }
.hpbar i { font-style:normal; opacity:.6; margin:0 2px; }
.hpbar.shielded { border-color:#7da9b3; box-shadow:0 0 7px #65a5ae25; }
.screen { margin:auto; width:min(980px,100%); padding:15px 0; text-align:center; }
.screen h2 { font-size:38px; color:#e6dfc4; }
.screen .eyebrow { margin-bottom:10px; }
.screen .sub { color:var(--muted); margin:10px 0 25px; font-size:12px; }
.row { display:flex; justify-content:center; flex-wrap:wrap; gap:18px; }
.loot { display:flex; justify-content:center; gap:12px; flex-wrap:wrap; margin:5px 0 25px; }
.loot:has(.reward-gold) { align-items:center; }
.reward-gold { display:inline-flex; align-items:center; gap:9px; padding:2px 6px; color:#efcb89; font:600 17px/1 var(--font-body); }
.reward-gold .gold-icon { width:clamp(36px,5vw,50px); height:auto; }
.reward-amount { display:inline-block; color:#ffdf97; font:800 clamp(32px,4.2vw,44px)/1 var(--font-display); font-variant-numeric:tabular-nums; text-align:center; text-shadow:0 2px 0 #422d1c; }
.pill { display:inline-flex; gap:5px; align-items:center; padding:6px 13px; border:1px solid #9d8f4f44; border-radius:2px; background:#31382160; font-size:11px; color:#e0d5ad; }
.waiting { color:var(--muted); font:italic 14px var(--serif); margin-top:22px; }

/* Cards: painted art, brass inlay, and parchment typography */
.card { --c:var(--junk); position:relative; width:var(--card-width); height:var(--card-height); flex:none; border:1px solid #a19266; border-radius:7px 7px 12px 12px; overflow:visible; background:#182219; color:#e5e1cf; box-shadow:0 9px 18px #0008,inset 0 0 0 3px #0a100c; text-align:center; user-select:none; transition:transform .23s cubic-bezier(.2,.7,.2,1),box-shadow .23s,filter .23s,border-color .2s; transform-style:preserve-3d; }
.cls-bulwark { --c:var(--bulwark); } .cls-cinderist { --c:var(--cinderist); } .cls-shade { --c:var(--shade); } .cls-chorister { --c:var(--chorister); }
.cls-thornbow { --c:var(--thornbow); } .cls-lamplighter { --c:var(--lamplighter); }
.card::before { content:""; position:absolute; inset:4px; border:1px solid color-mix(in srgb,var(--c) 46%,transparent); border-radius:4px 4px 9px 9px; pointer-events:none; z-index:3; }
.card::after { content:"◆"; position:absolute; right:8px; top:6px; font-size:7px; color:#d4c498; text-shadow:0 1px 4px #000; z-index:3; }
.card-art { position:absolute; inset:5px 5px auto; height:66%; border-radius:3px 3px 0 0; background-image:url('assets/card-atlas.png'); background-position:var(--art-x) var(--art-y); background-size:400% 400%; }
.card .cost { position:absolute; left:-11px; top:10px; z-index:5; width:34px; height:34px; display:grid; place-items:center; color:#eddbad; font:20px var(--serif); border:1px solid #ddc690; border-radius:50%; background:radial-gradient(circle at 40% 30%,#454b30,#182219 70%); box-shadow:0 0 0 3px #131d14,0 3px 10px #0008,inset 0 0 0 3px #c8a66a18; }
.card .cname { position:absolute; top:15px; left:22px; right:10px; min-height:28px; display:grid; place-items:center; font:16px/1.1 var(--serif); color:#f1e7c9; text-shadow:0 2px 6px #000,0 1px 3px #000; }
.card.up .cname { color:#c4e1a4; }
.card-copy { position:absolute; inset:61% 9px 23px; display:flex; flex-direction:column; gap:5px; }
.card .ctype { display:flex; align-items:center; justify-content:center; gap:4px; font-size:8px; letter-spacing:.12em; text-transform:uppercase; color:var(--c); }
.card .ctype .icon { width:11px; height:11px; }
.card .cdesc { display:flex; align-items:center; justify-content:center; flex:1; flex-wrap:wrap; display:block; align-content:center; font-size:12px; line-height:1.45; color:#d3d8c5; }
.cdesc strong { color:#e6d9b1; font-weight:600; }
.card.text-long .cdesc { font-size:10.5px; line-height:1.35; }
.card-foot { position:absolute; bottom:9px; left:13px; right:12px; display:flex; justify-content:space-between; align-items:center; gap:5px; padding-top:5px; border-top:1px solid #9e9c632d; font-size:7px; letter-spacing:.13em; text-transform:uppercase; color:#9ca487; }
.rarity-gems { font-size:5px; letter-spacing:1px; color:#b8aa72; }
.card.rarity-uncommon { border-color:#b0bca3; } .card.rarity-rare { border-color:#d9b673; box-shadow:0 9px 20px #0008,0 0 14px #cfb36618; }
.card.rarity-rare .rarity-gems { color:#ead093; }
.card.pickable { cursor:pointer; }
.card.pickable:hover,.card.pickable:focus-visible { transform:translateY(-9px) scale(1.035); box-shadow:0 0 0 1px var(--accent2),0 18px 35px #000b,0 0 35px #c7a35920; z-index:5; }
.card.chosen { box-shadow:0 0 0 2px var(--good),0 12px 25px #0008; }
.card.faded { opacity:.28; filter:grayscale(.75); }
.card-grid { display:flex; flex-wrap:wrap; justify-content:center; gap:23px; padding:12px 8px 27px; }
.card-key { position:absolute; bottom:-24px; left:50%; transform:translateX(-50%); color:#b2b99d; }
kbd { display:inline-grid; place-items:center; min-width:16px; height:17px; padding:0 3px; background:#111b14; border:1px solid #5f674655; border-radius:2px; font:9px "Segoe UI",sans-serif; color:#a8b294; }
.price { position:absolute; left:50%; bottom:-13px; transform:translateX(-50%); padding:3px 12px; background:#1b2518; border:1px solid #b5a56b; color:#edce91; border-radius:2px; font-size:11px; white-space:nowrap; }
.price.poor { color:var(--danger); border-color:var(--danger); }
.price .icon { width:12px; height:12px; }

/* The battlefield */
.combat { display:flex; flex:1; flex-direction:column; min-width:0; min-height:0; background:linear-gradient(#0a130c28,#08110b50),url('assets/gloam-sanctuary.png') center 56%/cover; }
.cbanner { display:flex; align-items:center; justify-content:space-between; gap:20px; padding:17px 30px 8px; background:linear-gradient(#0b140cb3,transparent); }
.encounter { display:flex; align-items:center; gap:13px; }
.encounter-icon { display:grid; place-items:center; width:40px; height:43px; border:1px solid #c8a66a45; color:#d4bd85; background:#111d1590; }
.encounter-icon .icon { width:23px; height:23px; }
.encounter .eyebrow { font-size:8px; letter-spacing:.17em; }
.encounter b { display:block; margin-top:4px; color:#e3ddc4; font:23px var(--serif); text-shadow:0 2px 10px #000; }
.turn-info { display:flex; flex-direction:column; align-items:flex-end; gap:2px; }
.turn-number { font-size:8px; letter-spacing:.2em; color:#b1b89b; }
.turn-number b { font:23px var(--serif); margin-left:8px; color:#e4d3a4; }
.pressure { font-size:9px; color:#9da88d; }
.pressure .press { color:var(--danger); }
.battlefield { display:flex; flex:1; flex-direction:column; position:relative; min-height:0; }
.foes { display:flex; align-items:center; justify-content:center; gap:clamp(20px,6vw,100px); flex:1; min-height:200px; padding:0 22px 156px; }
.foes:has(.rank-boss) { padding-bottom:170px; }
.enemy { position:relative; flex:none; width:176px; text-align:center; border-radius:5px; transition:filter .2s,background .2s; }
.sprite { position:relative; width:190px; height:185px; margin:0 -7px -9px; }
.creature-art { position:absolute; inset:0; background-image:url('assets/bestiary-atlas.png'); background-position:var(--art-x) var(--art-y); background-size:400% 300%; mask-image:radial-gradient(ellipse 65% 68% at 50% 47%,#000 48%,transparent 80%); animation:creature-breathe 6s ease-in-out infinite; filter:drop-shadow(0 8px 8px #0008); }
.enemy:nth-child(2n) .creature-art { animation-delay:-2.5s; }
.enemy:nth-child(3n) .creature-art { animation-delay:-4s; }
.creature-art.depth-creature { background-image:url('assets/depths-atlas.png'); background-size:400% 400%; }
.enemy-ground { position:absolute; bottom:5px; left:20%; right:20%; height:12px; background:#000; filter:blur(8px); opacity:.6; z-index:-1; }
@keyframes creature-breathe { 50%{transform:translateY(-5px) scale(1.015)} }
.enemy .ename { position:relative; font:17px var(--serif); color:#dedcc4; text-shadow:0 2px 5px #000; }
.enemy .hpbar { width:84%; margin:7px auto 0; height:14px; }
.enemy.rank-elite { width:194px; } .enemy.rank-boss { width:230px; }
.enemy.rank-elite .sprite { width:214px; height:204px; margin-left:-10px; }
.enemy.rank-boss .sprite { width:250px; height:230px; margin-left:-10px; }
.enemy.rank-boss .ename { color:#e3cba0; font-size:22px; }
.enemy.rank-elite .ename { color:#d8b991; }
.enemy.dead { opacity:.2; filter:grayscale(1); }
.enemy.dead .creature-art { animation:none; transform:translateY(7px); }
.target-reticle { position:absolute; inset:0; display:grid; place-items:center; color:#eddba3; opacity:0; transition:opacity .2s; }
.target-reticle>.icon { width:34px; height:34px; padding:5px; border:1px solid currentColor; border-radius:50%; background:#111b12aa; }
.enemy.targetable,.enemy.drag-targetable { cursor:crosshair; background:radial-gradient(ellipse,#bdac5020,transparent 70%); }
.enemy.targetable .hpbar,.enemy.drag-targetable .hpbar { border-color:#c9b476; }
.enemy.targetable:hover .target-reticle,.enemy.drop-target .target-reticle { opacity:1; }
.enemy.targetable:hover .creature-art,.enemy.drop-target .creature-art { filter:brightness(1.2) drop-shadow(0 0 10px #dcc27860); }
.enemy.acting { animation:lunge .5s cubic-bezier(.2,.8,.3,1); }
@keyframes lunge { 35%{transform:translateY(22px) scale(1.06)} }
.shake { animation:shake .32s; }
@keyframes shake { 20%{transform:translateX(-6px)} 45%{transform:translateX(5px)} 70%{transform:translateX(-3px)} }
.blockbadge { display:inline-flex; align-items:center; gap:3px; margin-top:4px; padding:1px 7px; border:1px solid #7fa1a770; border-radius:2px; color:#b4d1d1; background:#1b3435aa; font-size:10px; }
.blockbadge>.icon { width:12px; height:12px; }
.party { display:flex; align-items:flex-end; justify-content:flex-start; gap:10px; padding:0 30px; position:absolute; left:0; right:0; bottom:12px; z-index:2; }
.pcard { position:relative; flex:1; max-width:266px; min-width:0; min-height:96px; padding:10px 12px 9px; background:linear-gradient(100deg,#102017c9,#122016ef); border:1px solid #94a36c45; border-radius:3px; box-shadow:0 4px 20px #0003; }
.pcard.me { border-color:color-mix(in srgb,var(--c) 65%,transparent); }
.combat-portrait { position:absolute; left:0; bottom:0; width:72px; height:99px; border-radius:3px 0 0 3px; mask-image:linear-gradient(90deg,#000 60%,transparent); }
.player-info { padding-left:64px; }
.ph { display:flex; align-items:center; gap:5px; }
.ph .nm { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font:14px var(--serif); color:#e4dcc1; }
.ph .st { margin-left:auto; font-size:7px; white-space:nowrap; color:#a9b497; }
.ph .st.ok { color:var(--good); } .ph .st.bad { color:var(--danger); }
.player-class { display:flex; align-items:center; gap:4px; color:var(--c); font-size:8px; margin-top:3px; }
.player-class .icon { width:10px; height:10px; }
.pcard .hpbar { height:13px; margin-top:5px; }
.pcard .hpbar>span { line-height:11px; font-size:8px; }
.pm { display:flex; align-items:center; gap:8px; margin-top:6px; font-size:9px; color:#b0bda2; }
.pm>span { display:flex; align-items:center; gap:3px; }
.pm .icon { width:11px; height:11px; }
.pm .b { color:var(--blk); }
.pm .inc { margin-left:auto; color:var(--danger); cursor:help; }
.pm .inc.safe { color:var(--good); }
.pcard.downed { opacity:.5; filter:grayscale(.8); }
.pcard.targetable,.pcard.drag-targetable { outline:1px dashed #b8d29c; outline-offset:3px; cursor:pointer; }
.pcard.targetable:hover,.pcard.drop-target { box-shadow:0 0 25px #a9c78140; background:#2c4523de; }
.arena-caption { position:absolute; bottom:40px; right:30px; font:italic 12px var(--serif); letter-spacing:.04em; color:#c5c09d66; text-shadow:0 2px 10px #000; }
.battlefield:has(.pcard:nth-child(2)) .arena-caption { display:none; }
.bottom { position:relative; display:flex; align-items:flex-end; gap:15px; flex:none; padding:17px 30px 33px; background:linear-gradient(#09120bc4,#0b140ff7 25%,#0b140f 100%); border-top:1px solid #ac965b44; box-shadow:0 -12px 60px #07100960; }
.bl,.br { display:flex; flex-direction:column; align-items:center; gap:8px; width:133px; flex:none; padding-bottom:22px; }
.energy { display:grid; place-items:center; position:relative; width:73px; height:73px; color:#ede3ba; font:31px var(--serif); background:radial-gradient(circle at 40% 35%,#627751,#233e2c 55%,#102117); border:1px solid #baa46a; border-radius:50%; box-shadow:0 0 0 4px #16251a,0 0 0 5px #8f86563d,0 0 28px #a9b86020,inset 0 0 15px #c4d59b10; }
.energy::after { content:""; position:absolute; inset:5px; border:1px solid #c1c18a42; border-radius:50%; }
.energy small { font-size:14px; color:#b4c3a0; margin-left:1px; }
.energy.empty { filter:grayscale(.6) brightness(.65); box-shadow:0 0 0 4px #16251a,0 0 0 5px #8f86563d; }
.energy-label { color:#a0ad8c; letter-spacing:.22em; font-size:7px; margin:0 0 10px; }
.pilebtn { display:grid; grid-template-columns:16px 1fr auto; width:100%; gap:7px; padding:7px 9px; font-size:9px; text-align:left; color:#a3b295; }
.pilebtn>.icon { width:15px; height:15px; color:#9fa77e; }
.pilebtn b { font:13px var(--serif); color:#d3cb9f; }
.draw-pile { min-height:43px; border-color:#8b8c5347; }
.endturn { min-height:45px; width:100%; padding:10px 13px; font-size:13px; }
.endturn>.icon { margin-left:auto; width:16px; height:16px; }
.tt { min-height:20px; color:#d3c492; font:14px Consolas,monospace; }
.tt.low { color:var(--danger); animation:timer-urgent 1s ease-in-out infinite; }
@keyframes timer-urgent { 50%{opacity:.4} }
.hand-area { flex:1; min-width:0; container-type:inline-size; }
.enemy-phase .encounter-icon { color:var(--danger); border-color:#b17b5e88; }
.card-drag { position:fixed; z-index:5; width:58px; height:58px; transform:translate(-50%,-50%);
  pointer-events:none; border-radius:50%; }
.card-drag.valid { box-shadow:0 0 0 2px #ffdfa0,0 0 12px #ffd17599; }
.card-drag.locked { width:46px; height:46px; }
.dragging,.dragging * { cursor:grabbing!important; user-select:none; }

/* The quieter rooms between fights */
.choice-list { display:grid; gap:12px; width:min(580px,100%); margin:0 auto; }
.choice { display:grid; justify-content:stretch; gap:5px; text-align:left; padding:15px 20px; }
.choice b { font:18px var(--serif); color:#dbc99d; }
.choice span { font-size:11px; color:var(--muted); }
.choice.quest-choice { grid-template-columns:24px 1fr; column-gap:14px; border-color:#a38552; background:linear-gradient(100deg,#383125,#242421); }
.quest-choice>.icon { grid-row:1 / span 3; align-self:center; color:#e2bc77; width:23px; height:23px; }
.quest-choice small { color:#e2bc77; font-size:10px; letter-spacing:.09em; text-transform:uppercase; }
.quest-choice span { line-height:1.5; }
.big-ic { color:var(--accent); margin:0 auto 18px; }
.big-ic>.icon { width:52px; height:60px; filter:drop-shadow(0 0 25px #c3a35c20); }
.story { max-width:580px; margin:18px auto 25px; font:17px/1.8 var(--serif); color:#c7ccb4; }
.result { max-width:580px; margin:0 auto 22px; padding:20px; border:1px solid #a1915e66; background:#22331b99; font:17px/1.7 var(--serif); color:#d8dabd; }
.inn-room { flex:1; min-width:0; display:grid; grid-template-rows:minmax(80px,1fr) auto; overflow:auto; background:#211c17; }
.inn-room::before {
  content:""; background:linear-gradient(0deg,#211c17,transparent 15%),url('assets/inn/room.webp') 54% 54%/cover no-repeat;
}
.inn-room .inn-screen { margin:0 auto; width:min(100%,910px); padding:0 clamp(16px,3vw,34px) max(16px,env(safe-area-inset-bottom)); text-align:left; }
.inn-screen #inn-title { display:flex; align-items:center; gap:10px; margin:0 0 12px; color:#f1deb6; font:700 clamp(29px,4vw,42px)/1.1 var(--font-display); }
.inn-screen #inn-title .icon { flex:none; width:.85em; height:.85em; color:#e8bf7b; }
.inn-choices { display:grid; grid-auto-flow:column; grid-auto-columns:minmax(0,1fr); gap:8px; }
.inn-recipes { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,200px),1fr)); gap:8px; }
.btn.inn-choice {
  display:grid; grid-template-columns:26px minmax(0,1fr); align-content:center; justify-content:stretch; gap:2px 10px;
  min-height:67px; padding:9px 13px; text-align:left; color:#e8dbbf; background:#2f2821; border:1px solid #816d4e;
}
.btn.inn-choice:is(:hover,:focus-visible):enabled { background:#403529; border-color:#dbb678; }
.inn-choice .icon { grid-row:span 2; align-self:center; width:24px; height:24px; color:#dfb570; }
.inn-choice b { font:700 23px/1 var(--font-display); }
.inn-choice span,.inn-story { font:500 17px/1.25 var(--font-body); color:#ddceb3; }
.inn-story { margin:0 0 10px; }
.inn-story summary { width:fit-content; cursor:pointer; }
.inn-story p { margin:5px 0 0; }
.inn-screen .result { margin:0 0 8px; }
@media (max-width:600px) and (orientation:portrait) {
  .inn-choices { grid-auto-flow:row; }
  .btn.inn-choice { min-height:55px; padding:7px 12px; }
}
.shop-sec { margin-bottom:27px; }
.shop-sec h3,.screen>h3 { justify-content:center; }
.services { display:flex; flex-wrap:wrap; justify-content:center; gap:12px; }
.stats { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; width:min(540px,100%); margin:27px auto; }
.stats>div { padding:16px; border:1px solid #8f91564a; background:#1e2c1a99; color:var(--muted); font-size:10px; }
.stats b { display:block; margin-bottom:7px; color:var(--accent2); font:30px var(--serif); }
.end-title { font-size:54px!important; }
.end-title.lose { color:#d5bba0!important; }

/* Overlays and tactile feedback */
.modal-back { position:fixed; inset:0; z-index:50; display:grid; place-items:center; padding:24px; background:#050c08dc; backdrop-filter:blur(7px); }
.modal { width:min(1100px,100%); max-height:88vh; display:flex; flex-direction:column; padding:24px 27px; background:linear-gradient(135deg,#1d2a1c,#101b13); border:1px solid #b1a16a66; border-radius:4px; box-shadow:0 25px 90px #000a,inset 0 0 0 5px #b5a46b05; }
.modal.narrow { width:min(560px,100%); }
.modal-head { display:flex; align-items:center; gap:12px; flex-wrap:wrap; padding-bottom:16px; border-bottom:1px solid #87925436; }
.modal-head h2 { margin-right:auto; color:#e1d6b1; font-size:27px; }
.modal-head .btn { font-size:11px; }
.modal-body { overflow:auto; padding:20px 6px 10px; scrollbar-width:thin; scrollbar-color:#7a8055 transparent; }
.tabs { display:flex; gap:5px; }
.tabs .btn { padding:5px 9px; font-size:10px; }
.tabs .btn.on { color:var(--accent2); border-color:var(--accent); }
.gloss { display:grid; grid-template-columns:auto 1fr; gap:10px 18px; font-size:12px; }
.gloss b { color:#d3c392; white-space:nowrap; }
.help p { margin-bottom:15px; color:#bbc5ac; font-size:12px; line-height:1.8; }
.help p b { color:#e4d5af; }
.logbox { display:grid; gap:5px; color:#b8c1a7; font-size:12px; line-height:1.6; }
.logbox>div { padding-bottom:5px; border-bottom:1px solid #87925416; }
#aim { position:fixed; inset:0; width:100%; height:100%; z-index:58; color:#e4d3ad; pointer-events:none; opacity:0; }
#aim.visible { opacity:1; } #aim.valid { color:#ffd268; } #aim.friendly { color:#a9efc8; }
#aim-status,.sr-only { position:absolute; width:1px; height:1px; padding:0; overflow:hidden; clip-path:inset(50%); white-space:nowrap; pointer-events:none; }
@keyframes path-flow { to{stroke-dashoffset:-90} }
.aim-line,.aim-keyline { fill:none; stroke-linecap:round; stroke-linejoin:round; }
.aim-line { stroke:currentColor; stroke-width:2; stroke-dasharray:5 7; animation:path-flow 8s linear infinite; marker-end:url(#aim-arrow); }
.aim-keyline { stroke:#332a23; stroke-width:4; opacity:.55; }
#aim.valid .aim-line { stroke-width:3; stroke-dasharray:none; animation:none; marker-end:none; }
#aim.valid .aim-keyline { stroke-width:6; opacity:.92; }
.aim-reticle { display:none; }
#aim.valid .aim-reticle { display:inline; }
.aim-sight { fill:none; stroke-linejoin:bevel; }
.sight-edge { stroke:#32251e; stroke-width:7; }
.sight-gold { stroke:currentColor; stroke-width:3.5; }
.sight-center { fill:currentColor; stroke:#32251e; stroke-width:2; }
@media (max-width:760px), (orientation:landscape) and (max-height:540px) { .aim-sight { transform:scale(.72); } }
@media (forced-colors:active) { #aim.valid { color:Highlight; } .aim-keyline,.sight-edge { stroke:Canvas; } }
#fx { position:fixed; inset:0; z-index:60; pointer-events:none; overflow:hidden; }
.float { position:absolute; transform:translate(-50%,-50%); white-space:nowrap; color:#e6dbb9; font:600 24px var(--serif); text-shadow:0 2px 4px #000,0 0 12px #000; animation:float-up 1.15s ease-out forwards; }
.float.downed { color:#f0b09a; font-size:38px; } .float.heal { color:#c3dda5; font-size:30px; }
.float.blk { color:#b4f0dc; font:700 22px/1.05 var(--font-display); text-shadow:0 1px 3px #152c2c; -webkit-text-stroke:2.5px #1c3535; paint-order:stroke fill; }
.float.buff { color:#c5d7a4; font-size:16px; } .float.debuff { color:#e8bc9d; font-size:16px; }
.float.note { font-size:16px; color:#e3ce94; }
.float.legendary { margin-top:-26px; padding:3px 9px; border:1px solid #bd94cd; background:#2d2034ee; color:#f2d6ff; font-size:16px; }
.float.move { color:#502c23; font:800 clamp(19px,1.7vw,26px)/1.1 var(--font-display); -webkit-text-stroke:3px #f5e3c5; paint-order:stroke fill; text-shadow:0 2px 2px #362b2390; }
.float.play { font-size:13px; padding:4px 13px; background:#0b170ded; border:1px solid #c9b47444; }
@keyframes float-up { 0%{opacity:0;margin-top:12px;transform:translate(-50%,-50%) scale(.8)} 15%{opacity:1;transform:translate(-50%,-50%) scale(1.06)} 100%{opacity:0;margin-top:-65px;transform:translate(-50%,-50%) scale(.95)} }
.impact-ring { position:absolute; width:88px; height:88px; border:2px solid #e9c7a0; border-radius:50%; box-shadow:0 0 25px #d9a56e70,inset 0 0 15px #d9a56e30; }
.impact-block { border-color:#bbdce1; box-shadow:0 0 30px #99cbd370,inset 0 0 20px #99cbd330; }
.impact-heal { border-color:#c0dba5; box-shadow:0 0 30px #b8d57b70; }
.turn-flash { position:fixed; left:50%; top:38%; transform:translate(-50%,-50%); padding:15px 65px; text-align:center; color:#f0dfac; background:linear-gradient(90deg,transparent,#132017ed 20%,#132017ed 80%,transparent); border-block:1px solid #c6ac623d; font:25px var(--serif); white-space:nowrap; text-shadow:0 2px 10px #000; }
.turn-flash small { display:block; margin-bottom:5px; font:8px "Segoe UI",sans-serif; letter-spacing:.3em; color:#b7b58a; }
#tip { position:fixed; z-index:80; display:none; max-width:300px; padding:12px 15px; border:1px solid #c0ac6a90; border-radius:3px; color:#d3d9be; background:#0e1b12f5; box-shadow:0 8px 25px #0008; font-size:11px; line-height:1.7; white-space:pre-line; pointer-events:none; }
#toast { position:fixed; bottom:30px; left:50%; transform:translateX(-50%); z-index:85; display:none; width:max-content; max-width:90vw; padding:12px 22px; background:#2e2219f5; border:1px solid #b98d68; color:#ecd4b8; border-radius:3px; box-shadow:0 10px 40px #0008; font-size:12px; }
#toast.info { background:#20311af5; border-color:#a5b982; color:#d8e1be; }
::-webkit-scrollbar { width:7px; height:7px; } ::-webkit-scrollbar-thumb { background:#596344; border-radius:9px; } ::-webkit-scrollbar-track { background:#09120c55; }

/* A table-sized game, down to a pocket-sized lantern. */
@media (min-width:1600px) and (min-height:900px) {
  :root { --card-width:186px; --card-height:278px; }
  .enemy { width:210px; } .sprite { width:240px; height:238px; margin-left:-15px; }
  .enemy.rank-boss .sprite { width:300px; height:290px; margin-left:-35px; }
  .enemy .ename { font-size:20px; } .card .cname { font-size:19px; } .card .cdesc { font-size:13px; }
  .party { padding-bottom:20px; } .bottom { padding-top:24px; }
}
@media (max-width:1200px) {
  .topbar { gap:10px; padding:10px 18px; } .trinkets { display:none; } .topbar .where { max-width:210px; }
  .hero-meta { gap:8px; font-size:9px; } .hero-meta>span:last-child { display:none; } .hero-meta>i:last-of-type { display:none; }
  .home { gap:30px; } .home-modes { gap:25px; } .footer-note { display:none; }
  .lobby-grid { grid-template-columns:minmax(0,1fr) 250px; gap:18px; }
  .class-grid { gap:8px; } .class-copy { padding-left:10px; padding-right:10px; } .class-card .top b { font-size:17px; }
  .class-card .top>.icon { display:none; } .class-card p { font-size:10px; }
  .mode-card { padding:12px 10px; gap:8px; } .mode-card b { font-size:14px; } .mode-card>.icon { width:20px; }
  .side { width:210px; } .main { padding:24px; }
  .foes { gap:35px; } .arena-caption { display:none; }
}
@media (max-height:780px) {
  :root { --card-width:148px; --card-height:222px; }
  .card .cname { font-size:14px; } .card .cdesc { font-size:10.5px; line-height:1.45; } .card .ctype { font-size:7px; }
  .card-copy { gap:3px; } .card .cost { width:31px; height:31px; font-size:19px; }
  .card.text-long .cdesc { font-size:9.5px; line-height:1.35; }
  .cbanner { padding-top:12px; } .encounter b { font-size:21px; } .encounter-icon { height:37px; width:37px; }
  .foes { min-height:166px; } .sprite { width:169px; height:150px; margin:0 auto -7px; }
  .enemy.rank-elite .sprite { width:184px; height:162px; margin:auto; }
  .enemy.rank-boss .sprite { width:214px; height:184px; margin:auto; }
  .enemy .ename { font-size:16px; } .enemy.rank-boss .ename { font-size:19px; }
  .bottom { padding-top:10px; } .bl,.br { padding-bottom:19px; } .energy { width:64px; height:64px; font-size:28px; }
  .bottom { padding-top:4px; padding-bottom:27px; }
  .sprite { height:140px; } .foes { min-height:210px; }
  .lobby-head { min-height:64px; } .lobby-title { padding:18px 0; } .lobby-title h1 { font-size:32px; }
  .class-card { min-height:288px; } .lobby-grid { row-gap:20px; }
  .lobby-party { padding:16px; } .lobby-party .prow-l { min-height:46px; padding:5px 6px; } .lobby-party .party-promise { display:none; }
  .party { padding-top:0; padding-bottom:0; } .pcard { min-height:85px; padding-top:7px; padding-bottom:7px; }
  .combat-portrait { height:90px; } .home-nav { min-height:73px; } .home-footer { min-height:77px; }
  .home { min-height:500px; padding-top:35px; } .hero h1 { font-size:clamp(65px,7.5vw,98px); }
  .hero-motto { font-size:28px; } .home-card { padding:26px; }
}
@media (max-width:1000px) {
  .lobby-grid { grid-template-columns:1fr; } .lobby-classes { grid-column:1; } .lobby-party { grid-row:3; margin-top:0; }
  .lobby-start { grid-row:4; } .start-row { max-width:360px; margin-left:auto; }
  .lobby-party .plist { grid-template-columns:repeat(4,1fr); } .party-promise { display:none; }
  .class-card { min-height:320px; } .class-card .top>.icon { display:block; }
  .lobby-room { margin-left:5px; } .lobby-head .btn { font-size:10px; }
  .side { display:none; } .topbar .where { max-width:150px; } .topbar .badge { display:none; }
  .topbar .health-stat { display:none; } .bottom { padding-left:20px; padding-right:20px; gap:8px; }
  .bl,.br { width:112px; } .party { padding-left:20px; padding-right:20px; }
  .pcard { padding-left:7px; padding-right:7px; } .combat-portrait { width:52px; } .player-info { padding-left:43px; }
  .ph .st { display:none; } .foes { gap:15px; }
}
@media (max-width:760px) {
  .home-shell { padding:0 24px; } .home-nav { min-height:65px; gap:10px; } .nav-note { display:none; }
  .home-nav .sound-toggle { margin-left:auto; } .home-nav .brand { font-size:14px; }
  .home { grid-template-columns:1fr; gap:38px; padding:35px 0; }
  .hero { text-align:center; padding:0; } .hero .eyebrow { justify-content:center; font-size:7px; } .hero .eyebrow>span { width:15px; }
  .hero h1 { font-size:clamp(57px,13vw,90px); margin:16px 0; } .hero-motto { font-size:27px; }
  .hero .tagline { font-size:13px; margin:17px 0; } .hero-meta { justify-content:center; }
  .home-entry { justify-self:center; margin-top:120px; width:min(370px,100%); }
  .home-footer { padding:20px 0; } .home-modes { width:100%; justify-content:space-between; gap:15px; } .hm { gap:7px; }
  .hm>.icon { width:18px; height:22px; } .hm b { font-size:12px; } .hm span { font-size:8px; max-width:100px; }
  .lobby-head { flex-wrap:wrap; gap:10px; padding:15px 0; } .lobby-head .brand { width:100%; }
  .lobby-title h1 { font-size:29px; } .lobby-head .lobby-room { margin-left:0; } .lobby-head>.btn.ghost { padding:7px; }
  .lobby-title { padding:23px 0; } .class-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
  .class-card { min-height:310px; } .class-card .top b { font-size:20px; } .class-card p { font-size:11px; }
  .class-copy { padding-left:15px; padding-right:15px; } h3 .small { display:none; }
  .mode-list { grid-template-columns:1fr; } .mode-card { min-height:64px; padding:12px 16px; gap:14px; }
  .mode-card b { font-size:17px; } .mode-card .top span { font-size:10px; }
  .lobby-party .plist { grid-template-columns:repeat(2,1fr); } .timer-row>.small { width:100%; margin:6px 0 0; }
  .topbar { min-height:56px; padding:8px 12px; gap:6px; flex-wrap:wrap; }
  .topbar .brand { font-size:12px; letter-spacing:.1em; } .topbar .brand>.icon { width:19px; height:25px; }
  .topbar .where,.topbar .clock { display:none; } .topbar .btn { font-size:9px; padding:5px 6px; }
  .topbar .btn[data-act=log],.topbar .btn[data-act=help],.topbar .sound-toggle { display:none; }
  .topbar .gold-stat { font-size:11px; margin-left:auto; } .topbar .sp { display:none; }
  .main { padding:21px 15px; } .screen h2 { font-size:30px; } .screen .sub { font-size:11px; }
  .card-grid { gap:20px 17px; } .card { --card-width:148px; --card-height:222px; }
  .cbanner { padding:12px 14px 4px; gap:10px; } .encounter { gap:8px; } .encounter-icon { width:31px; height:35px; }
  .encounter .eyebrow { font-size:6px; letter-spacing:.1em; } .encounter b { font-size:18px; } .pressure { display:none; }
  .turn-number { font-size:7px; } .turn-number b { font-size:20px; margin-left:4px; }
  .combat { overflow-y:auto; overflow-x:hidden; }
  .battlefield { flex:1 0 auto; min-height:300px; } .foes { min-height:220px; gap:6px; padding:5px 7px; }
  .foes:has(.rank-boss) { padding:5px 7px; min-height:250px; }
  .enemy { flex:1; min-width:0; max-width:160px; width:auto; } .enemy .sprite { width:100%; height:132px; margin:0 0 -7px; }
  .enemy.rank-elite { width:min(32vw,180px); } .enemy.rank-boss { width:min(43vw,220px); }
  .enemy.rank-elite .sprite,.enemy.rank-boss .sprite { width:100%; height:150px; margin:0 0 -7px; }
  .enemy .ename { font-size:13px; } .enemy.rank-boss .ename { font-size:16px; }
  .party { position:relative; bottom:auto; padding:5px 12px 9px; flex-wrap:wrap; gap:7px; }
  .pcard { flex:1 1 43%; max-width:250px; min-height:79px; } .combat-portrait { height:82px; width:52px; }
  .ph .nm { font-size:12px; } .pm { font-size:8px; gap:5px; } .player-class { font-size:7px; }
  .bottom { min-height:281px; padding:9px 10px 34px; gap:6px; }
  .bl,.br { width:76px; gap:6px; padding-bottom:21px; }
  .energy { width:52px; height:52px; font-size:25px; } .energy small { font-size:11px; } .energy-label { font-size:6px; margin-bottom:5px; }
  .pilebtn { grid-template-columns:1fr auto; padding:6px 5px; gap:3px; font-size:8px; } .pilebtn>.icon { display:none; }
  .endturn { min-height:38px; font-size:10px; padding:8px 5px; gap:1px; } .endturn>.icon { display:none; }
  .tt { font-size:12px; min-height:16px; }
  .bottom { padding-bottom:24px; }
  .modal-back { padding:12px; } .modal { padding:18px 12px; max-height:93dvh; } .modal-head h2 { font-size:23px; }
  .modal-body { padding-left:5px; padding-right:5px; } .modal .card-grid { gap:24px 16px; }
  .tabs { order:3; width:100%; } .gloss { font-size:10px; gap:10px; } .gloss b { white-space:normal; }
}
@media (max-width:420px) {
  .home-shell { padding:0 18px; } .home-card { padding:25px 22px; } .home-card h2 { font-size:25px; }
  .preview-cards .card:nth-child(1) { left:3px; } .preview-cards .card:nth-child(2) { left:90px; } .preview-cards .card:nth-child(3) { left:175px; }
  .hm>.icon { display:none; } .hm b { font-size:12px; } .hm span { max-width:94px; }
  .class-card { min-height:320px; } .class-copy { padding-left:10px; padding-right:10px; } .class-card .top b { font-size:18px; }
  .class-card .top>.icon { display:none; } .class-card p { font-size:10px; }
  .topbar .brand { font-size:11px; } .topbar .btn[data-act=deck]>.icon { display:none; }
  .bl,.br { width:65px; }
  .card-grid .card { width:137px; height:211px; } .card-grid { gap:23px 16px; }
}
@media (max-height:590px) and (min-width:761px) {
  .combat { overflow-y:auto; } .battlefield { min-height:250px; } .cbanner { flex:none; }
  .topbar { min-height:51px; } .home { min-height:520px; }
}
@media (prefers-reduced-motion:reduce) {
  *,*::before,*::after { animation-duration:.01ms!important; animation-iteration-count:1!important; transition-duration:.01ms!important; scroll-behavior:auto!important; }
  .ambience { display:none; }
}
