/* Steel & Scroll: "Illuminated" style. Tokens and components from docs/03-style-guide.md. */

@font-face { font-family: "Cinzel"; font-weight: 600; font-display: swap; src: url("fonts/cinzel-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Cinzel"; font-weight: 700; font-display: swap; src: url("fonts/cinzel-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Cinzel"; font-weight: 800; font-display: swap; src: url("fonts/cinzel-latin-800-normal.woff2") format("woff2"); }
@font-face { font-family: "Atkinson Hyperlegible"; font-weight: 400; font-display: swap; src: url("fonts/atkinson-hyperlegible-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Atkinson Hyperlegible"; font-weight: 700; font-display: swap; src: url("fonts/atkinson-hyperlegible-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Atkinson Hyperlegible"; font-weight: 400; font-style: italic; font-display: swap; src: url("fonts/atkinson-hyperlegible-latin-400-italic.woff2") format("woff2"); }

:root {
  --ink: #2B2118;
  --parchment: #EFE4CB;
  --parchment-light: #F7F0DE;
  --parchment-page: #FBF6EA;
  --parchment-muted: #EAE0C6;
  --bar-track: #DCCFB2;
  --ink-muted: #6B5843;
  --ink-soft: #4A3C2E;
  --gold: #B8862B;
  --gold-light: #D9B45A;
  --crimson: #8C2F23;
  --resolve-green: #2F5D3A;
  --stamina-amber: #C98A2B;
  --cream: #F3E9D2;
  --bar-dark: #5C4A38;
  --gloss-text: #7A2418;
  --gloss-bg: #F3DCC8;
  --CHARGE: #9B2C1F; --VOLLEY: #2E6A4A; --WALL: #2D4E7A; --TRICK: #5B3E7A; --STRIKE: #5A4A3A; --GUARD: #6B5843;
  --display: "Cinzel", Georgia, serif;
  --body: "Atkinson Hyperlegible", system-ui, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--parchment); color: var(--ink); font-family: var(--body); font-size: 16px; line-height: 1.45; -webkit-text-size-adjust: 100%; }
a { color: var(--gloss-text); }
button, input, select { font-family: inherit; font-size: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--display); margin: 0; line-height: 1.15; }
h1 { font-weight: 800; font-size: 30px; }
h2 { font-weight: 700; font-size: 22px; }
h3 { font-weight: 700; font-size: 17px; }
p { margin: 0; }

/* --- top bar --- */
.topbar { min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 20px; background: var(--ink); color: var(--cream); flex-wrap: wrap; }
.topbar .brand { display: flex; align-items: center; gap: 12px; font-family: var(--display); font-weight: 700; font-size: 18px; letter-spacing: 0.08em; color: var(--cream); text-decoration: none; }
.topbar .title { font-family: var(--display); font-weight: 700; font-size: 22px; letter-spacing: 0.04em; }
.topbar nav { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.topbtn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; min-width: 44px; padding: 0 14px; border-radius: 8px; border: 1.5px solid var(--bar-dark); background: transparent; color: var(--cream); text-decoration: none; font-size: 15px; font-weight: 700; cursor: pointer; }
.topbtn[aria-pressed="true"] { background: var(--bar-dark); }
.chip { font-size: 13px; padding: 4px 10px; border-radius: 999px; background: var(--bar-dark); color: var(--cream); }

/* --- layout --- */
.wrap { max-width: 1180px; margin: 0 auto; padding: 18px 20px 28px; display: flex; flex-direction: column; gap: 18px; }
.cols { display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr); gap: 18px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.between { justify-content: space-between; }
@media (max-width: 860px) { .cols { grid-template-columns: minmax(0, 1fr); } }

/* --- components --- */
.panel { background: var(--parchment-light); border: 2px solid var(--ink); border-radius: 14px; padding: 16px; }
.label { font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-muted); }
.muted { color: var(--ink-muted); }
.small { font-size: 13px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 8px 20px; border-radius: 12px; border: 3px solid var(--ink); background: var(--crimson); color: #FFFFFF; font-family: var(--display); font-weight: 800; font-size: 17px; letter-spacing: 0.04em; text-decoration: none; cursor: pointer; box-shadow: 0 5px 0 var(--ink); }
.btn:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--ink); }
.btn.quiet { background: var(--parchment-light); color: var(--ink); }
.btn.small { min-height: 44px; font-size: 14px; padding: 6px 14px; box-shadow: 0 3px 0 var(--ink); border-width: 2px; }
.btn[disabled], .btn.locked { background: #CFC2A4; color: var(--ink-soft); border: 2px dashed #8E7D62; box-shadow: none; cursor: not-allowed; transform: none; }

.badge { font-size: 12px; font-weight: 700; letter-spacing: 0.1em; padding: 4px 10px; border-radius: 6px; background: var(--gold); color: var(--ink); text-transform: uppercase; white-space: nowrap; }
.pill { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: 0.06em; padding: 3px 9px; border-radius: 999px; color: #FFFFFF; }
.pill.CHARGE { background: var(--CHARGE); } .pill.VOLLEY { background: var(--VOLLEY); } .pill.WALL { background: var(--WALL); }
.pill.TRICK { background: var(--TRICK); } .pill.STRIKE { background: var(--STRIKE); } .pill.GUARD { background: var(--GUARD); }
.tag { font-size: 12px; padding: 4px 8px; border-radius: 6px; border: 1.5px solid var(--ink); white-space: nowrap; }

.bar { height: 14px; border-radius: 7px; background: var(--bar-track); border: 1.5px solid var(--ink); overflow: hidden; display: flex; }
.bar > i { display: block; height: 100%; background: var(--ink); }
.bar > i.gain { background: #7FA889; }
.bar.resolve > i { background: var(--resolve-green); }
.bar.stamina { height: 10px; border-radius: 5px; }
.bar.stamina > i { background: var(--stamina-amber); }
.bar > i { transition: width 0.6s ease; }

/* --- warrior card --- */
.card { background: var(--ink); border-radius: 24px; padding: 12px; }
.card-inner { background: var(--parchment); border-radius: 16px; border: 3px solid var(--gold); padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.ovr { width: 78px; height: 78px; flex-shrink: 0; border-radius: 14px; background: var(--ink); color: var(--cream); display: flex; flex-direction: column; align-items: center; justify-content: center; border: 3px solid var(--gold); }
.ovr b { font-family: var(--display); font-weight: 800; font-size: 34px; line-height: 1; }
.ovr span { font-size: 11px; font-weight: 700; letter-spacing: 0.14em; color: var(--gold-light); }
.art { border-radius: 12px; border: 3px solid var(--ink); background: var(--WALL); display: flex; align-items: center; justify-content: center; padding: 18px; }
.art svg { width: 150px; height: 150px; }
.statgrid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; text-align: center; }
.statgrid div { background: var(--parchment-light); border: 1.5px solid var(--ink); border-radius: 8px; padding: 6px 0; }
.statgrid b { display: block; font-family: var(--display); font-size: 20px; }
.statgrid span { font-size: 11px; font-weight: 700; color: var(--bar-dark); }

.attr { display: grid; grid-template-columns: 96px minmax(0, 1fr) 70px; gap: 10px; align-items: center; font-size: 14px; }
.attr b { font-weight: 700; }
.attr .num { text-align: right; font-variant-numeric: tabular-nums; }

.lesson-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 10px 0; border-top: 1.5px dashed #B8A98C; }
.lesson-row:first-of-type { border-top: none; }
.lesson-row .name { font-weight: 700; }
.score { font-family: var(--display); font-weight: 700; font-size: 18px; min-width: 54px; text-align: center; }

.move { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border-radius: 12px; border: 2px solid var(--ink); background: var(--parchment-light); }
.move.locked { border-style: dashed; border-color: #A8977A; background: #E6DBC0; color: var(--ink-muted); }
.move .name { font-family: var(--display); font-weight: 700; font-size: 16px; }
.movegrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }

/* --- lesson page --- */
.stepper { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.step { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 10px; background: var(--parchment-light); border: 2px solid #C9B996; min-height: 60px; text-align: left; width: 100%; cursor: pointer; }
.step.current { border-color: var(--crimson); }
.step.locked { background: #E6DBC0; border-style: dashed; border-color: #A8977A; cursor: not-allowed; }
.step .n { width: 30px; height: 30px; flex-shrink: 0; border-radius: 50%; border: 2px solid var(--ink-muted); color: var(--ink-muted); display: flex; align-items: center; justify-content: center; font-weight: 700; }
.step.current .n, .step.done .n { background: var(--crimson); border-color: var(--crimson); color: #FFFFFF; }
.step.done .n { background: var(--resolve-green); border-color: var(--resolve-green); }
.step b { display: block; font-size: 15px; }
.step .sub { font-size: 13px; color: var(--ink-muted); }
.thin { height: 6px; border-radius: 3px; background: var(--bar-track); overflow: hidden; margin-top: 4px; }
.thin i { display: block; height: 100%; background: var(--crimson); width: 0; }

.reader { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; }
@media (max-width: 900px) { .reader { grid-template-columns: minmax(0, 1fr); } .stepper { grid-template-columns: minmax(0, 1fr); } }
.page { position: relative; background: var(--parchment-page); border: 2px solid var(--ink); border-radius: 14px; padding: 26px 40px 30px 44px; height: calc(100vh - 190px); min-height: 420px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.prose { font-size: var(--read-size, 19px); line-height: 1.65; display: flex; flex-direction: column; gap: 14px; max-width: 70ch; }
.prose h1 { font-size: 34px; }
.prose h2 { font-size: 22px; margin-top: 6px; }
.prose ul, .prose ol { margin: 0; padding-left: 26px; display: flex; flex-direction: column; gap: 8px; }
.prose blockquote { margin: 0; padding: 10px 18px; border-left: 4px solid var(--gold); background: var(--parchment-muted); border-radius: 0 10px 10px 0; font-style: italic; }
.prose a { word-break: break-word; }
.gloss { font: inherit; font-weight: 700; color: var(--gloss-text); background: var(--gloss-bg); border: none; border-bottom: 2.5px dotted var(--gloss-text); padding: 0 3px; cursor: pointer; border-radius: 3px 3px 0 0; }
.popover { position: fixed; z-index: 20; width: min(320px, calc(100vw - 32px)); background: var(--ink); color: var(--cream); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; box-shadow: 0 10px 24px rgba(43, 33, 24, 0.35); }
.popover b { font-family: var(--display); font-size: 17px; }
.popover .added { font-size: 13px; color: var(--gold-light); }
.gainrow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; text-align: center; font-size: 12px; }
.gainrow div { background: var(--parchment-muted); border-radius: 8px; padding: 6px 0; }
.gainrow div:first-child { background: #DDE9DF; }
.gainrow b { display: block; font-size: 16px; }
.word { font-size: 14px; padding: 4px 10px; border-radius: 6px; border: 1.5px dashed #A8977A; color: var(--ink-muted); }
.word.have { background: var(--gloss-bg); border: 1.5px solid transparent; color: var(--ink); font-weight: 700; }

/* --- quiz --- */
.question { background: var(--parchment-light); border: 2px solid var(--ink); border-radius: 14px; padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.question .prompt { font-size: 19px; line-height: 1.5; }
.opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 760px) { .opts { grid-template-columns: minmax(0, 1fr); } }
.opt { position: relative; display: flex; }
.opt input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.opt span { flex: 1; min-height: 56px; display: flex; align-items: center; padding: 10px 14px; border-radius: 10px; border: 2px solid var(--ink); background: var(--parchment-page); font-size: 17px; line-height: 1.35; }
.opt input:checked + span { border-color: var(--gold); border-width: 3px; padding: 9px 13px; background: #FFF8E6; box-shadow: 0 4px 0 var(--ink); }
.opt input:focus-visible + span { outline: 3px solid var(--WALL); outline-offset: 2px; }
.mark { font-weight: 700; padding: 3px 9px; border-radius: 6px; font-size: 13px; white-space: nowrap; }
.mark.right { background: #DDE9DF; color: var(--resolve-green); }
.mark.wrong { background: var(--gloss-bg); color: var(--gloss-text); }
.bigscore { font-family: var(--display); font-weight: 800; font-size: 54px; line-height: 1; }

/* --- tables (teacher) --- */
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th { text-align: left; font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-muted); padding: 6px 8px; }
td { padding: 8px; border-top: 1.5px dashed #B8A98C; }
.scroll { overflow-x: auto; }
input[type="text"], input[type="date"], select { min-height: 44px; padding: 6px 12px; border-radius: 10px; border: 2px solid var(--ink); background: var(--parchment-page); }

/* --- choose --- */
.choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; }
.choice { display: flex; flex-direction: column; gap: 12px; }
.choice .art svg { width: 120px; height: 120px; }

/* --- lobby --- */
.person { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 0; border-top: 1.5px dashed #B8A98C; }
.person:first-child { border-top: none; }
.dot { width: 12px; height: 12px; border-radius: 50%; background: var(--bar-track); border: 1.5px solid var(--ink); }
.dot.on { background: var(--resolve-green); }

/* --- battle screen --- */
body.battle { height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
.rounddots { display: flex; gap: 6px; }
.rounddots span { width: 12px; height: 12px; border-radius: 50%; background: var(--bar-dark); }
.rounddots span.past { background: var(--gold-light); }
.rounddots span.now { background: var(--cream); outline: 2px solid var(--gold-light); outline-offset: 2px; }
.terrainchip { padding: 6px 12px; border-radius: 999px; background: var(--cream); color: var(--ink); font-size: 14px; font-weight: 700; }
.timer { display: flex; align-items: center; gap: 8px; font-size: 15px; min-width: 150px; }
.timer b { font-size: 20px; font-variant-numeric: tabular-nums; }
.arena { flex: 1; min-height: 0; display: grid; grid-template-columns: 270px minmax(0, 1fr) 270px; gap: 16px; padding: 16px 20px 12px; }
.fighter { display: flex; flex-direction: column; gap: 10px; padding: 14px; overflow: hidden; }
.fighter .who { display: flex; gap: 12px; align-items: center; }
.fighter .who svg { width: 72px; height: 72px; flex-shrink: 0; }
.fighter .bigovr { font-family: var(--display); font-size: 28px; line-height: 1; }
.barline { display: flex; justify-content: space-between; font-size: 13px; font-weight: 700; margin-bottom: 4px; }
.minis { margin-top: auto; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; font-size: 12px; text-align: center; }
.minis div { background: var(--parchment-muted); border-radius: 8px; padding: 6px 2px; }
.minis b { display: block; font-size: 17px; }
.note { margin-top: auto; font-size: 12px; background: var(--parchment-muted); border-radius: 8px; padding: 8px 10px; line-height: 1.4; }
.loadline { display: flex; justify-content: space-between; gap: 6px; font-size: 13px; }
.field { display: flex; flex-direction: column; gap: 10px; min-width: 0; min-height: 0; }
.scene { position: relative; flex: 1; min-height: 320px; border: 2px solid var(--ink); border-radius: 14px; overflow: hidden; background: #C9D6CF; }
.scene > svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.scrollbox { position: absolute; left: 50%; top: 14px; transform: translateX(-50%); width: min(440px, calc(100% - 28px)); max-height: 56%; overflow-y: auto; background: var(--parchment-light); border: 2px solid var(--ink); border-radius: 12px; padding: 14px 18px; display: flex; flex-direction: column; gap: 7px; box-shadow: 0 6px 0 var(--ink); z-index: 3; }
.token { position: absolute; bottom: 7%; width: 132px; display: flex; flex-direction: column; align-items: center; gap: 6px; z-index: 2; }
.token.you { left: 9%; }
.token.them { right: 9%; }
.tokbody { width: 104px; height: 104px; filter: drop-shadow(0 6px 0 rgba(43, 33, 24, 0.45)); animation: bob 2.6s ease-in-out infinite; }
.token.them .tokbody { animation-delay: -1.3s; }
.tokbody svg { width: 100%; height: 100%; display: block; }
.token.guarding .tokbody { filter: drop-shadow(0 0 0 #2B2118) drop-shadow(0 0 10px #D9B45A); }
.token.gone .tokbody { opacity: 0.25; filter: grayscale(1); animation: none; }
.token .status { font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--ink); color: var(--cream); white-space: nowrap; }
.token .status.set { background: var(--resolve-green); color: #FFFFFF; }
.token .status.alert { background: var(--gold); color: var(--ink); }
.movecard { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 10px; border-radius: 10px; border: 2px solid var(--ink); background: var(--parchment-light); box-shadow: 0 3px 0 var(--ink); font-family: var(--display); font-weight: 700; font-size: 13px; text-align: center; line-height: 1.15; animation: flipin 0.35s ease-out; }
.fx { position: absolute; inset: 0; pointer-events: none; z-index: 4; }
.arrow { position: absolute; width: 34px; height: 3px; background: var(--ink); border-radius: 2px; }
.arrow::after { content: ""; position: absolute; right: -2px; top: -4px; border-left: 9px solid var(--ink); border-top: 5.5px solid transparent; border-bottom: 5.5px solid transparent; }
.arrow.left { transform: scaleX(-1); }
.dmg { position: absolute; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; font-family: var(--display); font-weight: 800; font-size: 40px; line-height: 1; color: var(--crimson); text-shadow: 0 2px 0 var(--parchment-light), 2px 0 0 var(--parchment-light), -2px 0 0 var(--parchment-light), 0 -2px 0 var(--parchment-light); white-space: nowrap; }
.dmg small { font-family: var(--body); font-size: 13px; font-weight: 700; color: var(--ink); background: var(--parchment-light); border: 1.5px solid var(--ink); border-radius: 999px; padding: 2px 9px; margin-top: 4px; text-shadow: none; }
.caption { font-size: 16px; line-height: 1.4; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes flipin { from { transform: rotateX(80deg); opacity: 0; } to { transform: rotateX(0); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .tokbody, .movecard { animation: none; } }
.scrollbox .verdict { font-family: var(--display); font-weight: 700; font-size: 21px; line-height: 1.2; }
.scrollbox .history { font-size: 14px; font-style: italic; line-height: 1.45; padding-top: 8px; border-top: 1.5px dashed #B8A98C; }
.good { font-size: 13px; font-weight: 700; color: var(--resolve-green); }
.scrollbox .big { font-family: var(--display); font-weight: 800; font-size: 30px; }
.t-CHARGE { color: var(--CHARGE); } .t-VOLLEY { color: var(--VOLLEY); } .t-WALL { color: var(--WALL); } .t-TRICK { color: var(--TRICK); } .t-STRIKE { color: var(--STRIKE); } .t-GUARD { color: var(--GUARD); }
.loop { display: flex; justify-content: center; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; flex-wrap: wrap; }
.tray { flex-shrink: 0; min-height: 168px; display: flex; gap: 12px; padding: 0 20px 18px; align-items: stretch; }
.tray.wrapmoves { flex-wrap: wrap; }
.movebtn { flex: 1; min-width: 130px; min-height: 132px; text-align: left; cursor: pointer; background: var(--parchment-light); border: 3px solid var(--ink); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 5px; color: var(--ink); box-shadow: 0 3px 0 var(--ink); }
.movebtn .name { font-family: var(--display); font-weight: 700; font-size: 16px; line-height: 1.15; }
.movebtn .rule { font-size: 12px; color: var(--ink-soft); line-height: 1.3; }
.movebtn .extra { margin-top: auto; font-size: 12px; font-weight: 700; color: var(--resolve-green); }
.movebtn[aria-pressed="true"] { background: #FFF8E6; border-color: var(--gold); box-shadow: 0 7px 0 var(--ink); transform: translateY(-4px); }
.movebtn[disabled] { opacity: 0.55; cursor: not-allowed; }
.movebtn[disabled] .extra { color: var(--gloss-text); }
.lockbtn { width: 150px; flex-shrink: 0; min-height: 80px; border: 3px solid var(--ink); border-radius: 12px; background: var(--crimson); color: #FFFFFF; font-family: var(--display); font-weight: 800; font-size: 19px; letter-spacing: 0.04em; cursor: pointer; box-shadow: 0 5px 0 var(--ink); padding: 10px; line-height: 1.2; }
.lockbtn[disabled] { background: var(--bar-dark); cursor: default; }
.lockbtn.wide { width: auto; flex: 1; }
.offline { color: var(--gloss-text); font-weight: 700; font-size: 13px; }

@media (max-width: 900px), (orientation: portrait) {
  body.battle { height: auto; min-height: 100vh; overflow: auto; }
  .arena { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .field { grid-column: 1 / -1; grid-row: 1; }
  .minis, .fighter .earned { display: none; }
  .tray { flex-wrap: wrap; }
  .lockbtn { width: 100%; }
}
@media print { .topbar, .btn { display: none; } }

/* --- card art --- */
.art.has-art { position: relative; padding: 0; margin: 0; overflow: hidden; background: var(--ink); }
.art.has-art img { display: block; width: 100%; height: auto; }
.credit { position: absolute; left: 0; right: 0; bottom: 0; padding: 4px 10px; font-size: 11px; letter-spacing: 0.04em; color: var(--cream); background: rgba(43, 33, 24, 0.78); }
.roundel { display: inline-block; flex-shrink: 0; border-radius: 50%; overflow: hidden; border: 3px solid var(--gold-light); background: var(--ink); }
.roundel img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; }
.fighter .who .roundel { width: 72px; height: 72px; }
.tokbody .roundel { width: 100%; height: 100%; }

/* --- trading cards (Warriors gallery) --- */
.tcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 20px; }
.tcard { background: var(--ink); border-radius: 18px; padding: 9px; box-shadow: 0 6px 0 rgba(43, 33, 24, 0.35); }
.tcard-inner { height: 100%; background: var(--parchment); border: 3px solid var(--gold); border-radius: 11px; padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.tcard.soon .tcard-inner { border-color: #A8977A; }
.tcard-name { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 10px; background: var(--parchment-light); border: 2px solid var(--ink); border-radius: 8px; }
.tcard-name h2 { font-size: 17px; line-height: 1.15; }
.tcard-week { flex-shrink: 0; font-family: var(--display); font-weight: 700; font-size: 12px; padding: 3px 8px; border-radius: 999px; background: var(--ink); color: var(--gold-light); white-space: nowrap; }
.tcard-art { position: relative; aspect-ratio: 1 / 1; border: 2px solid var(--ink); border-radius: 6px; overflow: hidden; background: var(--WALL); }
.tcard-art img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 15%; }
.tcard.soon .tcard-art img { filter: saturate(0.8); }
.tcard-noart { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: var(--cream); font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; background: repeating-linear-gradient(45deg, #2D4E7A, #2D4E7A 14px, #335A8A 14px, #335A8A 28px); }
.tcard-flag { position: absolute; top: 8px; left: 8px; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; padding: 3px 8px; border-radius: 6px; background: var(--gold); color: var(--ink); border: 1.5px solid var(--ink); }
.tcard-type { padding: 4px 10px; font-size: 12px; font-weight: 700; background: var(--parchment-muted); border: 2px solid var(--ink); border-radius: 8px; }
.tcard-text { flex: 1; display: flex; flex-direction: column; gap: 6px; padding: 8px 10px; font-size: 14px; line-height: 1.4; background: var(--parchment-page); border: 2px solid var(--ink); border-radius: 6px; }
.tcard-sig { font-size: 13px; color: var(--ink-soft); }
.tcard-stats { margin-top: auto; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 3px; text-align: center; font-size: 9px; font-weight: 700; color: var(--bar-dark); }
.tcard-stats div { background: var(--parchment-muted); border-radius: 5px; padding: 3px 0; }
.tcard-stats b { display: block; font-family: var(--display); font-size: 14px; color: var(--ink); }
.tcard-foot { display: flex; justify-content: space-between; gap: 8px; font-size: 10.5px; color: var(--ink-muted); padding: 0 4px; }
.tcard-status { font-weight: 700; color: var(--ink); white-space: nowrap; }
.tcard.playable .tcard-status { color: var(--resolve-green); }
