/* TodoQuests game themes. The game pieces (foes, the map, the board, the bag) and each theme's own look. A theme
   borrows the look a whole genre shares, never one game's own art, names or UI, and keeps its palette in light or dark. */

/* ---------- game pieces, shared by every theme ---------- */
.seal { display: inline-block; padding: 0 8px; border-radius: 6px; font: 800 11px/21px var(--font); letter-spacing: .04em; text-transform: uppercase; }
.seal.bounty { background: linear-gradient(135deg, #ffe066, #f59f00); color: #4a2a00; }
.seal.weak, .seal.lucky { background: linear-gradient(135deg, #fff3bf, #ffd43b); color: #5c3d00; }
.seal.step { background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent); }
.seal.super { background: linear-gradient(135deg, #d3f9d8, #8ce99a); color: #134b1c; text-transform: none; letter-spacing: 0; }
.task.bounty .row-in { background: linear-gradient(90deg, color-mix(in srgb, var(--gold) 14%, var(--panel)), var(--panel) 60%); }
.task.weak .row-in { box-shadow: inset 3px 0 0 #fcc419; }
.gem { flex: none; min-width: 36px; height: 26px; padding: 0 6px; display: grid; place-items: center; font: 800 12px var(--font); color: #fff; clip-path: polygon(14% 0, 86% 0, 100% 50%, 86% 100%, 14% 100%, 0 50%); }
.gem.g-small { background: linear-gradient(135deg, #a5b4c6, #6c7a8f); } .gem.g-medium { background: linear-gradient(135deg, #69db7c, #2b8a3e); }
.gem.g-big { background: linear-gradient(135deg, #74c0fc, #1864ab); } .gem.g-boss { background: linear-gradient(135deg, #ffa94d, #c92a2a); }
.task.done .gem { opacity: .45; }
.fights { display: grid; gap: 8px; margin-top: 6px; }
.foe { display: flex; align-items: center; gap: 12px; padding: 8px 12px 8px 8px; border-radius: var(--radius); text-decoration: none; color: var(--fg); background: linear-gradient(100deg, color-mix(in srgb, var(--hp) 10%, var(--panel)), var(--panel) 60%); border: 1px solid var(--line); box-shadow: var(--shadow); min-height: 60px; }
.foe.elite { padding: 5px 12px 5px 8px; }
.foe .portrait { width: 64px; height: 64px; object-fit: contain; flex: none; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .35)); }
.foe.elite .portrait { width: 46px; height: 46px; }
.foe.lg .portrait { width: 88px; height: 88px; }
.foe .info { flex: 1; min-width: 0; display: grid; gap: 3px; }
.foe b { font: 750 15px var(--title); } .foe.elite b { font-size: 13.5px; }
.foe small { color: var(--mute); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.foe.dead .portrait, .bosscard.dead .portrait { filter: grayscale(1) brightness(.6); }
.foe.cleared { display: grid; padding: 12px 14px; gap: 2px; background: linear-gradient(100deg, color-mix(in srgb, var(--good) 14%, var(--panel)), var(--panel)); }
img.echo { filter: hue-rotate(200deg) saturate(.8) brightness(1.1) drop-shadow(0 0 10px #a5d8ff); opacity: .9; }
.hp { position: relative; height: 12px; border-radius: 99px; background: var(--sunk); overflow: hidden; }
.foe.elite .hp { height: 8px; }
.hp i { position: absolute; inset: 0 auto 0 0; border-radius: inherit; }
.hp .trail { background: var(--hp-trail); transition: width .5s ease; }
.hp .fill { background: linear-gradient(90deg, var(--hp), color-mix(in srgb, var(--hp) 60%, var(--gold))); transition: width .18s ease-out; }
.hp span { position: absolute; inset: 0; font: 800 9px/12px var(--font); color: #fff; text-align: center; text-shadow: 0 1px 1px #000a; }
.foe.elite .hp span { display: none; }
.pfeed { display: flex; gap: 8px; overflow-x: auto; margin: 10px -14px 0; padding: 2px 14px 4px; scrollbar-width: none; overscroll-behavior-x: contain; }
.pf { flex: none; max-width: 270px; display: flex; align-items: center; gap: 8px; padding: 5px; border-radius: 99px; background: var(--panel); border: 1px solid var(--line); font-size: 12.5px; }
.pf img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; background: var(--sunk); flex: none; }
.pf span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.five { flex: none; width: 38px; height: 38px; min-height: 0; padding: 0; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--gold) 24%, var(--sunk)); border: 0; color: var(--fg); }
.five.done, .fived { color: var(--good); font-weight: 800; padding: 0 6px; }
.ai { font-style: normal; font-size: 11px; font-weight: 700; color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); padding: 0 6px; border-radius: 6px; }

.worldmap { position: relative; height: min(580px, 130vw); overflow: hidden; border: 0; padding: 0; }
.worldmap .mapbg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.worldmap::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 70%, rgba(0, 0, 0, .25)); pointer-events: none; }
.wp { position: absolute; z-index: 2; transform: translate(-50%, -50%); width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; text-decoration: none; background: conic-gradient(var(--good) calc(var(--p) * 1%), rgba(255, 255, 255, .6) 0); box-shadow: 0 4px 10px rgba(0, 0, 0, .45); }
.wp span { width: 40px; height: 40px; border-radius: 50%; background: #1d2230; color: #fff; display: grid; place-items: center; font: 800 16px var(--title); }
.wp.past span { background: #2b3d2b; } .wp.now { width: 58px; height: 58px; animation: bob 1.8s ease-in-out infinite; } .wp.now span { background: var(--accent); color: var(--on-accent); }
.wp img { position: absolute; width: 46px; height: 46px; left: 36px; top: -26px; border-radius: 50%; border: 2px solid #fff; background: #1d2230; object-fit: cover; }
.lair { position: absolute; z-index: 2; left: 50%; top: 2%; width: 30%; transform: translateX(-50%); filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .6)); }
.bosscard { display: flex; gap: 14px; padding: 14px; align-items: center; }
.bosscard .portrait.lg { width: 130px; height: 130px; object-fit: contain; flex: none; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .4)); }
.bosscard .info { flex: 1; min-width: 0; display: grid; gap: 8px; }
.bosscard .bn { font: 800 19px var(--title); }
.split { display: flex; height: 6px; border-radius: 99px; overflow: hidden; background: var(--sunk); }
.split i { display: block; height: 100%; } .split .p0, .who .c0 { background: var(--p0); color: var(--p0); } .split .p1, .who .c1 { background: var(--p1); color: var(--p1); }
.who b { background: none !important; } .who { display: flex; flex-wrap: wrap; gap: 10px; font-size: 13px; }
.who span { display: inline-flex; align-items: center; gap: 5px; } .who img { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; background: var(--sunk); }
@media (max-width: 480px) { .bosscard { flex-direction: column; text-align: center; } .who { justify-content: center; } }
.log { margin-top: 8px; padding: 10px 14px; } .log summary { cursor: pointer; font-weight: 650; min-height: 36px; } .log ul { margin: 8px 0 0; padding-left: 18px; font-size: 13px; } .log b { color: var(--hp); }
.trophies { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.trophy { padding: 10px; display: grid; justify-items: center; text-align: center; gap: 2px; } .trophy img { width: 90px; height: 90px; object-fit: contain; } .trophy span { font-size: 12px; color: var(--mute); }

.winner { display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin-bottom: 10px; position: relative; text-align: left; }
.winner img:first-child { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; } .winner .crown { position: absolute; width: 30px; left: 25px; top: -4px; }
.winner div { display: grid; gap: 2px; } .winner span { font-size: 13.5px; }
.pquest { padding: 12px 14px; display: grid; gap: 4px; margin-bottom: 12px; }
.bar3 { height: 10px; border-radius: 99px; background: var(--sunk); overflow: hidden; } .bar3 i { display: block; height: 100%; background: linear-gradient(90deg, var(--good), var(--gold)); border-radius: inherit; }
.players { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin-bottom: 12px; }
.player { padding: 10px 12px; display: flex; gap: 12px; align-items: center; }
.pav { position: relative; width: 52px; height: 52px; flex: none; } .pav img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; background: var(--sunk); }
.pav .dot { position: absolute; right: 0; bottom: 0; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--panel); }
.dot.p0 { background: var(--p0); } .dot.p1 { background: var(--p1); } .dot.p2 { background: var(--p2); } .dot.p3 { background: var(--p3); }
.board { position: relative; display: grid; grid-template-columns: repeat(7, 1fr); grid-template-rows: repeat(7, 1fr); gap: 4px; aspect-ratio: 1 / 1; max-width: 560px; margin: 0 auto; padding: 8px; border-radius: 22px; background: color-mix(in srgb, #1c7ed6 30%, var(--sunk)); }
.board .island { grid-area: 2 / 2 / 7 / 7; width: 100%; height: 100%; object-fit: cover; border-radius: 16px; }
.space { position: relative; border-radius: 10px; display: grid; place-items: center; font: 800 11px var(--font); color: rgba(255, 255, 255, .9); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .25); }
.space.blue { background: #4c6ef5; } .space.red { background: #f03e3e; } .space.event { background: #12b886; } .space.starsp { background: #845ef7; } .space.start { background: #495057; }
.space.hasstar { background: #fab005; box-shadow: 0 0 14px #ffd43b, inset 0 -3px 0 rgba(0, 0, 0, .2); } .space .star { width: 80%; height: 80%; object-fit: contain; }
.piece { position: absolute; width: 74%; height: 74%; border-radius: 50%; object-fit: cover; border: 2px solid #fff; box-shadow: 0 3px 6px rgba(0, 0, 0, .5); background: #222; z-index: 2; }
.piece.p0 { border-color: var(--p0); left: -6%; top: -12%; } .piece.p1 { border-color: var(--p1); right: -6%; bottom: -12%; } .piece.p2 { border-color: var(--p2); right: -6%; top: -12%; } .piece.p3 { border-color: var(--p3); left: -6%; bottom: -12%; }
.piece.hop { animation: hop .15s ease-out; } @keyframes hop { 50% { transform: translateY(-40%) scale(1.15); } }
.rollbar { display: grid; gap: 6px; justify-items: center; text-align: center; margin: 14px 0; }
.roll { display: inline-flex; align-items: center; gap: 10px; font-size: 17px; padding: 10px 24px 10px 12px; border-radius: 99px; min-height: 56px; } .roll img { width: 40px; height: 40px; }
.feed { list-style: none; margin: 0; padding: 0; } .feed li { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-top: 1px solid var(--line); font-size: 14px; } .feed li:first-child { border-top: 0; }
.feed img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; background: var(--sunk); flex: none; } .feed span { flex: 1; min-width: 0; } .feed small { display: block; color: var(--mute); font-size: 12px; }
.dieroll { position: fixed; left: 50%; top: 42%; transform: translate(-50%, -50%); z-index: 86; display: grid; place-items: center; }
.dieroll img { width: 130px; height: 130px; animation: tumble .65s cubic-bezier(.3, .8, .4, 1); } .dieroll b { position: absolute; font: 900 46px var(--title); color: #3b2a00; text-shadow: 0 2px 0 #fff; }
.dieroll.landed img { animation: land .3s ease-out; }
@keyframes tumble { 0% { transform: translateY(-200px) rotate(-540deg) scale(.5); } 80% { transform: translateY(10px) rotate(15deg); } 100% { transform: none; } } @keyframes land { 50% { transform: scale(1.2); } }
.rewards { width: 100%; display: flex; align-items: center; gap: 12px; padding: 10px 14px; margin-bottom: 12px; text-align: left; background: linear-gradient(100deg, color-mix(in srgb, var(--gold) 26%, var(--panel)), var(--panel)); }
.rewards img { width: 56px; height: 56px; animation: bob 1.4s ease-in-out infinite; } .rewards b { flex: 1; font-size: 16px; }
.hero { display: flex; gap: 14px; padding: 12px 14px; align-items: center; } .hero .av { width: 96px; height: 96px; border-radius: 18px; object-fit: cover; background: var(--sunk); flex: none; }
.hero > div { display: grid; gap: 4px; min-width: 0; } .hero b { font: 800 19px var(--title); } .hero small { color: var(--mute); font-size: 12.5px; }
.perks { display: flex; flex-wrap: wrap; gap: 4px; }
.shop { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.ware { display: grid; justify-items: center; text-align: center; gap: 3px; padding: 12px; min-height: 0; font-weight: 400; } .ware > img { width: 64px; height: 64px; object-fit: contain; }
.ware b { font-size: 14.5px; } .ware small { color: var(--mute); font-size: 12px; line-height: 1.35; }
.price { font: 800 14px var(--font); color: var(--gold); display: inline-flex; gap: 3px; align-items: center; } .price img { width: 18px; height: 18px; }
.codex { padding: 10px 12px 12px; margin-bottom: 10px; } .codex header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.codex.done { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold); }
.relics { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; } @media (max-width: 430px) { .relics { grid-template-columns: repeat(4, 1fr); } }
.relic { position: relative; aspect-ratio: 1 / 1; padding: 4px; min-height: 0; border-radius: 12px; background: var(--sunk); border: 2px solid var(--r-c); display: grid; place-items: center; }
.relic img { width: 100%; height: 100%; object-fit: contain; }
.relic.r-u { border-color: var(--r-u); } .relic.r-r { border-color: var(--r-r); } .relic.r-l { border-color: var(--r-l); box-shadow: 0 0 10px color-mix(in srgb, var(--r-l) 50%, transparent); }
.relic.missing { border-color: var(--line); box-shadow: none; } .relic.missing img, .relicview img.missing { filter: brightness(0) opacity(.28); }
.relic i { position: absolute; right: 3px; bottom: 1px; font: 800 11px var(--font); font-style: normal; color: var(--mute); }
.relicview { text-align: center; } .relicview img { width: 160px; height: 160px; object-fit: contain; }

/* ---------- Retro Quest: 16-bit pixel adventure ---------- */
:root[data-theme=retro] { --bg: #1d2230; --panel: #272e40; --sunk: #1a1f2c; --fg: #f4ecd8; --mute: #b3aa94; --line: #3d465c; --accent: #ffd43b; --on-accent: #2a1d00; --good: #69db7c; --bad: #ff6b6b; --gold: #ffd43b; --xp: #ffd43b; --xp-gain: #fff3bf; --radius: 6px; --title: "Courier New", ui-monospace, monospace; --shadow: 0 3px 0 rgba(0, 0, 0, .45); color-scheme: dark; }
:root[data-theme=retro] body { background: #1d2230 repeating-linear-gradient(45deg, rgba(255, 255, 255, .02) 0 8px, transparent 8px 16px); }
:root[data-theme=retro] :is(.card, .bar, .bottom, dialog, .menu-list, .quick, .foe, .big) { border: 3px solid #0e1119; box-shadow: inset 0 0 0 2px #4a5470, 0 3px 0 rgba(0, 0, 0, .45); border-radius: 6px; }
:root[data-theme=retro] .bar, :root[data-theme=retro] .bottom { border-radius: 0; }
:root[data-theme=retro] :is(h1, .brand, .foe b, .big h2) { text-shadow: 2px 2px 0 #000; letter-spacing: 0; }
:root[data-theme=retro] .check > span { border-radius: 3px; border-color: #f4ecd8; }
:root[data-theme=retro] img { image-rendering: auto; }

/* ---------- Crystal Saga: anime JRPG windows ---------- */
:root[data-theme=crystal] { --bg: #0b1238; --panel: #1b2a78; --sunk: #101a52; --fg: #f4f6ff; --mute: #bcc6f4; --line: #e8ecff; --accent: #ffd43b; --on-accent: #10184a; --good: #63e6be; --bad: #ff8787; --gold: #ffd43b; --xp: #8ce99a; --xp-gain: #d3f9d8; --hp: #ff6b6b; --hp-trail: #ffe3e3; --radius: 10px; --title: "Trebuchet MS", "Segoe UI", system-ui, sans-serif; --shadow: 0 3px 0 rgba(0, 0, 0, .5); color-scheme: dark; }
:root[data-theme=crystal] body { background: radial-gradient(ellipse at 50% -10%, #3b5bdb 0%, #0b1238 55%) fixed; }
:root[data-theme=crystal] :is(.card, .bar, .bottom, dialog, .menu-list, .quick, .foe, .big, .pf, .row-in) { background: linear-gradient(180deg, #3a59c8 0%, #1b2a78 45%, #0f1854 100%); }
:root[data-theme=crystal] :is(.card, .bar, .bottom, dialog, .menu-list, .quick, .foe, .big, .pf) { border: 2px solid #e8ecff; box-shadow: inset 0 0 0 2px #0a113a, 0 3px 0 rgba(0, 0, 0, .5); color: #f4f6ff; }
:root[data-theme=crystal] .bar, :root[data-theme=crystal] .bottom { border-width: 0 0 2px; border-radius: 0; } :root[data-theme=crystal] .bottom { border-width: 2px 0 0; }
:root[data-theme=crystal] .tasks .row-in { background: transparent; } :root[data-theme=crystal] .task { border-top-color: rgba(255, 255, 255, .15); }
:root[data-theme=crystal] :is(h1, .title, .brand, .foe b, .big h2) { text-shadow: 2px 2px 0 #050826; }
:root[data-theme=crystal] h2 { color: #d0d8ff; }
:root[data-theme=crystal] .task:is(:hover, :focus-within) .row-in::before { content: "\25B6"; position: absolute; left: 2px; top: 50%; transform: translateY(-50%); color: #ffd43b; font-size: 10px; animation: nudge .5s steps(2) infinite; }
@keyframes nudge { 50% { transform: translate(3px, -50%); } }
:root[data-theme=crystal] .check > span { border-radius: 6px; border-color: #e8ecff; }
:root[data-theme=crystal] :is(input, select, textarea) { background: #0c1546; border-color: #8a9ae0; color: #fff; }
:root[data-theme=crystal] .quick input { background: transparent; }
:root[data-theme=crystal] button { background: #24369a; border-color: #e8ecff; color: #fff; } :root[data-theme=crystal] button.primary { background: #ffd43b; color: #10184a; border-color: #fff3bf; }
:root[data-theme=crystal] .big h2 { color: #ffd43b; } :root[data-theme=crystal] .moment { background: rgba(160, 190, 255, .18); }

/* ---------- Wasteland: green phosphor terminal ---------- */
:root[data-theme=wasteland] { --bg: #020602; --panel: #051105; --sunk: #0a1e0a; --fg: #46ff7f; --mute: #2fbf5c; --line: #1e6b34; --accent: #46ff7f; --on-accent: #021002; --good: #46ff7f; --bad: #ffb000; --gold: #ffb000; --xp: #46ff7f; --xp-gain: #b6ffcc; --hp: #ffb000; --hp-trail: #5a3c00; --r-c: #2fbf5c; --r-u: #8cff9e; --r-r: #3df0ff; --r-l: #ffb000; --radius: 2px; --font: ui-monospace, "Cascadia Mono", Consolas, "Courier New", monospace; --title: var(--font); --shadow: 0 0 14px rgba(70, 255, 127, .12); color-scheme: dark; }
:root[data-theme=wasteland] body { text-shadow: 0 0 6px rgba(70, 255, 127, .5); letter-spacing: .01em; }
:root[data-theme=wasteland] body::after { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 95; background: repeating-linear-gradient(0deg, rgba(0, 0, 0, .26) 0 1px, transparent 1px 3px), radial-gradient(ellipse at center, transparent 60%, rgba(0, 0, 0, .55)); animation: flick 7s infinite steps(1); }
@keyframes flick { 0%, 97%, 100% { opacity: 1; } 98% { opacity: .8; } }
:root[data-theme=wasteland] :is(h1, h2, .big h2) { text-transform: uppercase; } :root[data-theme=wasteland] h1::before { content: "> "; }
:root[data-theme=wasteland] :is(.check > span, button, input, select, textarea, .chip span, .seal, .tag, .gem) { border-radius: 0; }
:root[data-theme=wasteland] .check > span { border-color: var(--fg); }
:root[data-theme=wasteland] .task.done .title::after { content: " [DONE]"; }
:root[data-theme=wasteland] button { background: #031003; border-color: var(--line); } :root[data-theme=wasteland] button.primary { background: var(--fg); color: #021002; text-shadow: none; }
:root[data-theme=wasteland] .gem { background: transparent !important; color: var(--fg); border: 1px solid var(--line); clip-path: none; }
:root[data-theme=wasteland] .big { background: #020a02; border: 1px solid var(--fg); box-shadow: 0 0 30px rgba(70, 255, 127, .35); border-radius: 0; }
:root[data-theme=wasteland] .big h2::before { content: "> "; } :root[data-theme=wasteland] .big h2::after { content: "_"; animation: blink .6s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- Ashen: dark fantasy, gold serif, slow heavy banners ---------- */
:root[data-theme=ashen] { --bg: #080706; --panel: #13110e; --sunk: #1c1915; --fg: #ebe3d0; --mute: #9e937d; --line: #322c22; --accent: #c9a45c; --on-accent: #120f09; --good: #c9a45c; --bad: #b3261e; --gold: #c9a45c; --xp: #c9a45c; --xp-gain: #f0dcae; --hp: #b02a1f; --hp-trail: #e8c07a; --radius: 3px; --title: "Cormorant Garamond", Georgia, "Times New Roman", serif; --shadow: none; color-scheme: dark; }
:root[data-theme=ashen] body { background: radial-gradient(ellipse at 50% -10%, #2c2318 0%, #080706 60%) fixed; }
:root[data-theme=ashen] :is(h1, h2, .brand, .foe b, .bosscard .bn, .big h2) { font-family: var(--title); letter-spacing: .12em; text-transform: uppercase; font-weight: 500; }
:root[data-theme=ashen] h2 { color: var(--accent); }
:root[data-theme=ashen] :is(.card, .foe) { border-color: #3a3326; background: linear-gradient(180deg, #16130f, #0e0c0a); }
:root[data-theme=ashen] .row-in { background: transparent; } :root[data-theme=ashen] .tasks { background: linear-gradient(180deg, #16130f, #0e0c0a); }
:root[data-theme=ashen] .task .title { font-family: var(--title); font-size: 18px; }
:root[data-theme=ashen] .check > span { border-radius: 0; transform: rotate(45deg) scale(.82); border-color: #6b5c40; } :root[data-theme=ashen] .check svg { transform: rotate(-45deg); }
:root[data-theme=ashen] .hp { height: 7px; border-radius: 0; border: 1px solid #5a4b31; background: #000; } :root[data-theme=ashen] .hp i { border-radius: 0; } :root[data-theme=ashen] .hp span { display: none; }
:root[data-theme=ashen] button.primary { background: transparent; color: var(--accent); border-color: var(--accent); letter-spacing: .06em; }
:root[data-theme=ashen] .moment { background: transparent; }
:root[data-theme=ashen] .moment:not(.small)::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 270px; transform: translateY(-50%); background: linear-gradient(90deg, transparent, rgba(0, 0, 0, .88) 12%, rgba(0, 0, 0, .88) 88%, transparent); }
:root[data-theme=ashen] .big { background: transparent; box-shadow: none; animation: soulsIn 1.2s cubic-bezier(.2, .7, .2, 1); }
:root[data-theme=ashen] .big h2 { font-size: clamp(26px, 7vw, 46px); color: #d9b56c; text-shadow: 0 0 22px rgba(217, 181, 108, .55); }
:root[data-theme=ashen] .big p { color: #b9ab8d; letter-spacing: .1em; text-transform: uppercase; font-size: 13px; } :root[data-theme=ashen] .big .art { width: 120px; height: 120px; }
@keyframes soulsIn { from { opacity: 0; transform: scale(1.06); filter: blur(4px); } }

/* ---------- Party Island: glossy, chunky, bright ---------- */
:root[data-theme=party] { --bg: #3b1f8a; --panel: #ffffff; --sunk: #f1ebff; --fg: #221a3d; --mute: #6b6290; --line: #e2d8ff; --accent: #7048e8; --on-accent: #fff; --good: #12b886; --bad: #fa5252; --gold: #fab005; --xp: #f06595; --xp-gain: #ffc9de; --radius: 20px; --title: "Arial Rounded MT Bold", "Trebuchet MS", system-ui, sans-serif; --shadow: 0 5px 0 rgba(43, 26, 94, .3); color-scheme: light; }
:root[data-theme=party] body { background: #3b1f8a radial-gradient(circle at 15% 10%, #7048e8 0, transparent 40%), radial-gradient(circle at 90% 80%, #f06595 0, transparent 35%) fixed; }
:root[data-theme=party] :is(.page > .head h1, .page > h2, .head .sub, .page > p.mute, .seg + .head h1) { color: #fff; text-shadow: 0 2px 0 #1a0f3d; }
:root[data-theme=party] .head .iconbtn { background: #fff; color: #221a3d; }
:root[data-theme=party] .bar { background: #fff; } :root[data-theme=party] .card { border: 0; }
:root[data-theme=party] button { border-radius: 99px; font-family: var(--title); } :root[data-theme=party] button.primary { background: #fab005; border-color: #fab005; color: #3b2a00; box-shadow: 0 3px 0 #c77d00; }
:root[data-theme=party] .check > span { border-width: 3px; } :root[data-theme=party] .task.done .check > span { background: #fab005; border-color: #fab005; }
:root[data-theme=party] .ring span { background: #3b1f8a; color: #fff; }

/* ---------- Wildlands: watercolor open world ---------- */
:root[data-theme=wild] { --bg: #e9efe1; --panel: #fbfaf4; --sunk: #eef1e4; --fg: #22301f; --mute: #66735f; --line: #d5dcc6; --accent: #3f7f4a; --on-accent: #fff; --good: #3f9a54; --bad: #c2453a; --gold: #d99a1f; --xp: #3f7f4a; --xp-gain: #b7d9b9; --radius: 16px; --title: "Trebuchet MS", "Segoe UI", system-ui, sans-serif; --shadow: 0 2px 0 rgba(60, 90, 50, .15); color-scheme: light; }
:root[data-theme=wild] body { background: linear-gradient(180deg, #cfe4f2 0%, #e9efe1 260px) fixed; }
:root[data-theme=wild] .bar { background: rgba(251, 250, 244, .85); }
:root[data-theme=wild] .card { border-color: #cdd6bb; }
:root[data-theme=wild] h2 { color: #4f7a52; }
:root[data-theme=wild] .check > span { border-color: #8aa47e; }

/* Theme button styles never dress the check circle or a chest you tap. */
:root[data-theme] :is(.check, .chestbtn) { background: transparent; border-color: transparent; box-shadow: none; }
:root[data-theme] .five { border: 0; }

/* ---------- each world wins its own way ---------- */
.v-term pre { font: 700 15px/1.6 ui-monospace, 'Courier New', monospace; color: #46ff7f; text-shadow: 0 0 8px rgba(70, 255, 127, .6); background: rgba(0, 12, 0, .92); border: 2px solid #1f7a3a; padding: 18px 20px; margin: 0; white-space: pre-wrap; max-width: 92vw; overflow: hidden; animation: typeIn 1.4s steps(40) both; }
@keyframes typeIn { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0 0); } }
.v-win .win { background: linear-gradient(180deg, #2a3d9e, #141f5e); border: 3px solid #e7ecff; border-radius: 10px; box-shadow: 0 0 0 2px #141f5e, 0 10px 30px rgba(0, 0, 0, .5); padding: 14px 22px; margin-top: 8px; text-align: left; min-width: 240px; }
.v-win .win h2 { color: #ffd43b; margin: 0 0 4px; }
.v-bonk .stamp { position: absolute; top: 18%; left: 50%; transform: translateX(-50%) rotate(-12deg); font: 900 54px var(--title); color: #ffd43b; -webkit-text-stroke: 3px #c92a2a; animation: bonk .45s cubic-bezier(.2, 1.8, .4, 1) both .15s; pointer-events: none; }
@keyframes bonk { from { transform: translateX(-50%) rotate(-12deg) scale(3); opacity: 0; } }
.v-glow::before { content: ""; position: absolute; inset: -30%; background: radial-gradient(circle, rgba(178, 242, 187, .55), rgba(165, 216, 255, .2) 40%, transparent 65%); animation: shrine 1.6s ease-out both; z-index: -1; }
@keyframes shrine { from { transform: scale(.2); opacity: 0; } }
.v-stage h2 { animation: stageflash .6s steps(2) 3; }
@keyframes stageflash { 50% { opacity: .2; } }
.big.kill { position: relative; }

/* ---------- evolution ---------- */
img.form2 { filter: drop-shadow(0 0 5px color-mix(in srgb, var(--accent) 70%, transparent)); }
img.form3 { filter: drop-shadow(0 0 7px #ffd43b) saturate(1.15); }
img.final { filter: drop-shadow(0 0 10px #ff6b6b) contrast(1.08); animation: finalpulse 2.4s ease-in-out infinite; }
@keyframes finalpulse { 50% { filter: drop-shadow(0 0 16px #ffa94d) contrast(1.08); } }
.lv { display: inline-block; font: 800 10px/16px var(--font); padding: 0 5px; border-radius: 4px; background: rgba(0, 0, 0, .35); color: #ffe066; vertical-align: 2px; letter-spacing: .03em; }
.epi { display: block; font-size: 11.5px; opacity: .8; font-style: italic; }
.bestiary { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.beast { display: grid; justify-items: center; text-align: center; padding: 8px 6px; gap: 2px; }
.beast img { width: 72px; height: 72px; object-fit: contain; }
.beast b { font-size: 12.5px; line-height: 1.2; }
.beast small { font-size: 11px; opacity: .75; }
.beast.unseen img { filter: brightness(0); opacity: .3; }
.big.evolve { position: relative; }
.big.evolve .art { width: 180px; height: 180px; }
.big.evolve .from { position: absolute; left: 50%; transform: translateX(-50%); animation: evoOut 1.6s ease-in forwards; }
.big.evolve .to { animation: evoIn 1.6s ease-out both; }
@keyframes evoOut { 0%, 40% { opacity: 1; filter: brightness(1); } 70% { filter: brightness(6); } 100% { opacity: 0; filter: brightness(6); } }
@keyframes evoIn { 0%, 60% { opacity: 0; filter: brightness(6); } 100% { opacity: 1; filter: brightness(1) drop-shadow(0 0 10px #ffd43b); } }
@media (prefers-reduced-motion: reduce) { img.final { animation: none; } }

/* ---------- hits you can see ---------- */
.hp.seg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent calc(33.3% - 1px), rgba(0, 0, 0, .45) 33.3%, transparent calc(33.3% + 1px), transparent calc(66.6% - 1px), rgba(0, 0, 0, .45) 66.6%, transparent calc(66.6% + 1px)); pointer-events: none; }
.hp .today { position: absolute; top: 0; bottom: 0; background: #fff3bf; opacity: .55; border-radius: 0; }
.foechip { position: fixed; left: 50%; z-index: 60; display: flex; align-items: center; gap: 10px; width: min(330px, calc(100vw - 24px)); padding: 6px 12px 6px 6px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); box-shadow: 0 8px 20px rgba(0, 0, 0, .3); transform: translate(-50%, -140%); opacity: 0; transition: transform .25s cubic-bezier(.2, .9, .3, 1.2), opacity .2s; pointer-events: none; }
.foechip.on { transform: translate(-50%, 0); opacity: 1; }
.foechip .portrait { width: 46px; height: 46px; object-fit: contain; }
.foechip > div { flex: 1; display: grid; gap: 4px; font-size: 13px; }
.sigban { position: fixed; left: 50%; top: 38%; z-index: 87; transform: translateX(-50%); display: grid; justify-items: center; pointer-events: none; animation: sig 1.5s ease-out forwards; }
.sigban b { font: 900 30px var(--title); color: #ffe066; text-shadow: 0 3px 0 #7a4b00, 0 0 18px rgba(255, 200, 60, .6); letter-spacing: .03em; }
.sigban span { font-weight: 700; color: #fff; text-shadow: 0 1px 3px #000; }
.sigban.v-wasteland b { font-family: ui-monospace, monospace; color: #46ff7f; text-shadow: 0 0 10px #46ff7f; }
.sigban.v-ashen b { font-family: var(--title); color: #e9d6a8; text-shadow: 0 0 14px #ff9a3c; letter-spacing: .12em; }
.sigban.v-crystal b { color: #fff; text-shadow: 0 0 6px #74c0fc, 0 0 22px #a5d8ff; }
@keyframes sig { 0% { opacity: 0; transform: translate(-50%, 12px) scale(.8); } 15% { opacity: 1; transform: translate(-50%, 0) scale(1.06); } 75% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -16px); } }
/* boss intro and the month's big win */
.big.intro .taunt { font-style: italic; opacity: .9; margin: 4px 0 10px; }
.big.intro .art { animation: arrive 1s cubic-bezier(.2, .9, .3, 1.1) both; }
@keyframes arrive { from { transform: scale(.4) translateY(40px); opacity: 0; filter: brightness(0); } 60% { filter: brightness(0); } }
.bosswin { display: grid; justify-items: center; gap: 4px; }
.bosswin .bw-foe .art { animation: bwfall 1.3s ease-in both .3s; }
@keyframes bwfall { 60% { transform: scale(1.08); filter: brightness(3); } 100% { transform: scale(.6) translateY(40px); opacity: 0; filter: brightness(3); } }
.bosswin h2 { animation: mIn .4s both 1.2s; font-size: 30px; }
.bw-team { display: flex; gap: 8px; animation: mIn .4s both 1.6s; }
.bw-team .hw { width: 64px; height: 64px; object-fit: contain; }
.bw-loot { display: grid; justify-items: center; position: relative; animation: mIn .4s both 2.2s; }
.bw-loot .chest { width: 84px; height: 84px; }
.bw-loot .chest.open { position: absolute; top: 0; opacity: 0; animation: opn .3s both 3s; }
.bw-loot span { font-size: 13px; opacity: .9; }
@keyframes opn { to { opacity: 1; } }
.moment.boss-win { background: radial-gradient(circle at 50% 40%, rgba(255, 220, 120, .35), rgba(0, 0, 0, .7)); }
/* each world's board */
:root[data-theme=ashen] .space { background: #2b241b; color: #d9c49a; border: 1px solid #5a4b31; border-radius: 2px; }
:root[data-theme=ashen] .space.red { background: #3a1d14; } :root[data-theme=ashen] .space.event { background: #1f2a2b; }
:root[data-theme=wasteland] .space { background: #031a07; color: #46ff7f; border: 1px solid #1f7a3a; border-radius: 0; font-family: ui-monospace, monospace; }
:root[data-theme=wasteland] .space.red { background: #1a1503; color: #ffd43b; } :root[data-theme=wasteland] .space.event { background: #04140f; color: #66d9e8; }
:root[data-theme=retro] .space { border-radius: 0; box-shadow: inset -3px -3px 0 rgba(0, 0, 0, .3), inset 3px 3px 0 rgba(255, 255, 255, .25); }
:root[data-theme=crystal] .space { border-radius: 50%; box-shadow: 0 0 8px rgba(165, 216, 255, .6); }
:root[data-theme=wild] .space { border-radius: 40% 60% 55% 45%; }

/* Today: the two foes side by side in one slim row, so the list starts high on the screen */
.fights.duo { grid-template-columns: 1fr 1fr; gap: 6px; }
.fights.duo .foe { padding: 6px 8px 6px 4px; gap: 6px; }
.fights.duo .foe .portrait { width: 44px; height: 44px; }
.fights.duo .foe .info > b { font-size: 12.5px; }
.fights.duo .foe .lv { display: none; }
.fights.duo .foe .epi { display: none; }
.fights.duo .foe small { font-size: 10.5px; }
.fights.duo .foe .hp { height: 8px; } .fights.duo .foe .hp span { display: none; }
.fights.duo .foe.cleared { grid-column: auto; padding: 8px; font-size: 12px; }
/* readable small text in the bright Party and Wild themes */
:root[data-theme=party] { --mute: #4f4672; }
:root[data-theme=party] .ware small, :root[data-theme=party] .rollbar .mute, :root[data-theme=wild] .ware small { color: #3a3355; }
.hp span { font-size: 10px; }
/* each world's board frame and shop */
:root[data-theme=ashen] .board { background: #14110d; border: 1px solid #5a4b31; }
:root[data-theme=wasteland] .board { background: #010a03; border: 1px solid #1f7a3a; }
:root[data-theme=ashen] .ware { background: #17130f; border-color: #3d3324; }
:root[data-theme=wasteland] .ware { background: #031207; border-color: #1f7a3a; border-radius: 0; }
:root[data-theme=wasteland] .pill { border-radius: 0; background: #031a07; color: #46ff7f; }
:root[data-theme=ashen] .pill { background: #1c1712; color: #e9d6a8; }

/* the slim foe row: under 64px a foe, full names readable */
.fights.duo .foe { min-height: 0; padding: 5px 8px 5px 4px; align-items: center; }
.fights.duo .foe .portrait { width: 40px; height: 40px; }
.fights.duo .foe .info { gap: 4px; }
.fights.duo .foe .info > b { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 12.5px; line-height: 1.2; }
.fights.duo .foe small:not(.todaydmg) { display: none; }
.fights.duo .foe .todaydmg { font-size: 11px; margin: 0; }
.ki { margin-right: 3px; }
.foe small, .lv, .epi { font-size: 11.5px; }
.lv { font-size: 11px; }
/* headings stay on one line in every world */
:root[data-theme]:not([data-theme=clean]) .head h1 { font-size: clamp(19px, 5.6vw, 26px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Party Island: everything sitting on the purple is light */
:root[data-theme=party] #main > :is(h2, p.mute, .sect-actions, .rollbar, .head) , :root[data-theme=party] #main > .donegrp > summary, :root[data-theme=party] #main > details.earlier > summary, :root[data-theme=party] .rollbar .mute, :root[data-theme=party] .head .sub { color: #f6f1ff; }
:root[data-theme=party] .donegrp summary span { background: rgba(255, 255, 255, .2); color: #fff; }
:root[data-theme=party] .ware small, :root[data-theme=party] .price { color: #2d2550; }
:root[data-theme=wild] .ware small, :root[data-theme=wild] .price { color: #1f3324; }
:root[data-theme=party] .bottom a:not([aria-current=page]) { color: #4a4170; }
:root[data-theme=ashen] .seal.super { background: #2a2418; color: #e9d6a8; border: 1px solid #8a7444; }
:root[data-theme=wasteland] .seal.super { background: #031a07; color: #46ff7f; border: 1px solid #1f7a3a; }

/* round 3: a backed signature banner, a solid boss-win stage, Crystal's limit gauge */
.sigban { background: rgba(10, 10, 20, .82); border: 2px solid rgba(255, 224, 102, .7); border-radius: 14px; padding: 10px 18px; gap: 2px; box-shadow: 0 10px 30px rgba(0, 0, 0, .45); }
.sigban img { width: 38px; height: 38px; animation: dieroll .5s ease-out; }
@keyframes dieroll { from { transform: rotate(-200deg) scale(.4); } }
.sigban .stamp { font-style: normal; font-size: 28px; color: #b2f2bb; animation: bonk .4s both; }
.sigban .log { font-style: normal; font-family: ui-monospace, monospace; color: #46ff7f; }
.sigban.v-wasteland { background: #010a03; border-color: #1f7a3a; border-radius: 0; }
.sigban.v-ashen { background: rgba(8, 6, 4, .92); border-color: #8a7444; border-radius: 2px; }
.sigban.v-crystal { background: linear-gradient(180deg, #2a3d9e, #141f5e); border-color: #e7ecff; }
.sigban.v-party { background: #fff; border-color: #fab005; } .sigban.v-party b { color: #7048e8; text-shadow: none; } .sigban.v-party span { color: #221a3d; text-shadow: none; }
.moment.boss-win { background: rgba(6, 6, 14, .94); }
:root[data-theme=crystal] .moment.boss-win { background: radial-gradient(circle at 50% 35%, #2a3d9e, #070b24 75%); }
:root[data-theme=ashen] .moment.boss-win { background: radial-gradient(circle at 50% 35%, #3a2a14, #050403 70%); }
:root[data-theme=wasteland] .moment.boss-win { background: #010a03; }
:root[data-theme=party] .moment.boss-win { background: radial-gradient(circle at 50% 35%, #7048e8, #2b1566 75%); }
:root[data-theme=wild] .moment.boss-win { background: radial-gradient(circle at 50% 35%, #3f7f4a, #0d2414 75%); }
:root[data-theme=retro] .moment.boss-win { background: #10131c; }
.bosswin .bw-foe .art { animation: bwhit 1.3s ease-in-out both .3s; width: 150px; height: 150px; }
@keyframes bwhit { 40% { transform: scale(1.1); filter: brightness(3); } 100% { transform: scale(.9) rotate(-6deg); filter: grayscale(.8) brightness(.7); opacity: .55; } }
.bw-team .hw { width: 96px; height: 96px; }
.bosswin h2, .bosswin p { color: #fff; text-shadow: 0 2px 6px #000; }
.limit { display: flex; align-items: center; gap: 4px; margin: 6px 2px 2px; font: 800 11px var(--font); letter-spacing: .12em; color: #a5d8ff; }
.limit i { width: 22px; height: 7px; border-radius: 2px; background: rgba(165, 216, 255, .2); border: 1px solid rgba(165, 216, 255, .5); }
.limit i.on { background: linear-gradient(90deg, #74c0fc, #e599f7); box-shadow: 0 0 6px #a5d8ff; }
.limit small { margin-left: 6px; letter-spacing: 0; color: #ffe066; }
.todaydmg { white-space: nowrap; }
.seal.super { font-size: 12px; }

.foechip { position: fixed; }
.foechip .cn { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); display: grid; justify-items: end; font: 900 22px var(--title); color: #ffe066; -webkit-text-stroke: 1px #000; text-shadow: 0 2px 0 #000; opacity: 0; pointer-events: none; }
.foechip .cn small { font: 800 10.5px var(--font); letter-spacing: .04em; text-transform: uppercase; -webkit-text-stroke: 0; color: #fff; text-shadow: 0 1px 2px #000; }
.foechip .cn.on { animation: cnpop 1.6s ease-out forwards; }
@keyframes cnpop { 0% { opacity: 0; transform: translateY(-30%) scale(1.6); } 15% { opacity: 1; transform: translateY(-50%) scale(1); } 80% { opacity: 1; } 100% { opacity: 0; } }
.foechip > div { padding-right: 64px; }
.sigban { z-index: 84; }
.beat { margin: 6px 2px 0; font-size: 12.5px; color: var(--mute); }
:root[data-theme=party] .beat, :root[data-theme=wild] .beat { color: #f6f1ff; }
:root[data-theme=wasteland] .beat { font-family: ui-monospace, monospace; color: #46ff7f; }
.dmg { -webkit-text-stroke: 1.5px #000; text-shadow: 0 2px 0 #000, 0 0 6px rgba(0, 0, 0, .6); }

/* round 3 phone polish: Ashen's heading fits, small print is at least 11.5-12px, priority reads as marks */
:root[data-theme=ashen] .head h1 { letter-spacing: .04em; font-size: clamp(18px, 5.2vw, 24px); }
.todaydmg, .lv, .hp span, .coop i, .ai, .limit small { font-size: 12px !important; }
.limit { font-size: 12px; }
.meta .prio { letter-spacing: 1px; font-size: 13px; }
.invbar .more { flex: none; font-weight: 700; color: var(--mute); }
