/* © 2026 Hittcraft Bullet Gifts LLC. All rights reserved. */
:root { --bg: #120d0b; --ink: #f4e9df; --quiet: #a8968a; --ember: #ff7a2f; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.title { min-height: 100%; container-type: inline-size; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 24px; padding: 24px; background: radial-gradient(circle at 50% 40%, #3a1c10 0%, var(--bg) 60%); }
.emblem { width: 96px; height: 96px; border-radius: 50%;
  background: radial-gradient(circle at 50% 60%, #ffd29a 0%, var(--ember) 35%, #7a1f05 70%, transparent 72%);
  box-shadow: 0 0 60px #ff7a2f66; }
button { font: 600 18px/1 inherit; color: var(--bg); background: var(--ember); border: 0; border-radius: 12px;
  padding: 16px 32px; min-width: 220px; cursor: pointer; }
button:disabled { opacity: 0.6; cursor: default; }
.dob { display: flex; flex-direction: column; gap: 8px; align-items: center; color: var(--quiet); font-size: 14px; }
.dob input { font: 16px/1.2 inherit; color: var(--ink); background: #1e1512; border: 1px solid #5a4844;
  border-radius: 8px; padding: 12px 16px; min-width: 220px; color-scheme: dark; }
#status { min-height: 1.5em; margin: 0; color: var(--quiet); text-align: center; }
footer { position: fixed; bottom: 8px; right: 12px; font-size: 12px; color: var(--quiet); }

/* ---- summon screen ---- */
#app { position: fixed; inset: 0; font-family: Inter, system-ui, sans-serif; container-type: size; }
#scene { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.loading { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; color: var(--quiet); font: 600 14px/1 Inter, sans-serif; letter-spacing: 2px; }
.hud { position: absolute; top: max(12px, env(safe-area-inset-top)); left: 16px; right: 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { font: 800 12px/1 Cinzel, serif; letter-spacing: 4px; color: var(--quiet); }
button.profile { min-width: 0; max-width: 42cqw; height: 34px; padding: 0 12px; border-radius: 999px; background: #120a08cc; border: 1px solid #4a2a1e;
  color: var(--ink); font: 800 13px/1 Cinzel, serif; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; backdrop-filter: blur(6px); }
button.profile.unset { color: #ffb04a; border-color: #ff8a3d; }
.wallet { display: flex; gap: 8px; }
.pill { display: inline-flex; gap: 6px; align-items: center; padding: 8px 12px; border-radius: 999px; background: #120a08cc;
  border: 1px solid #4a2a1e; font: 600 14px/1 Inter, sans-serif; backdrop-filter: blur(6px); }
.pill.gems { color: #ff9a5a; } .pill.scrolls { color: #e9c77a; } .pill b { color: var(--ink); }
.banner-ui, .reveal-ui, .results { position: absolute; left: 0; right: 0; bottom: 0; padding: 0 16px max(16px, env(safe-area-inset-bottom));
  display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center;
  background: linear-gradient(transparent, #070405e6 40%); padding-top: 64px; }
#app:not([data-mode="banner"]) .banner-ui { display: none; }
.tabs { display: flex; gap: 6px; background: #120a08cc; padding: 4px; border-radius: 14px; border: 1px solid #3a2219; }
.tabs button { min-width: 0; height: 36px; padding: 0 14px; border-radius: 10px; background: transparent; color: var(--quiet);
  font: 600 13px/1 Inter, sans-serif; }
.tabs button.on { background: #3a1d12; color: var(--ink); }
.eyebrow { margin: 4px 0 0; font: 600 11px/1 Inter, sans-serif; letter-spacing: 3px; text-transform: uppercase; color: #ffb04a; }
.banner-info h2 { margin: 2px 0; font: 800 clamp(26px, 7cqw, 40px)/1.1 Cinzel, serif; text-shadow: 0 2px 16px #000; }
.banner-info h2:empty { display: none; }
.quiet { margin: 0; color: var(--quiet); font-size: 13px; } .small { font-size: 12px; max-width: 420px; }
.pull-row { display: flex; gap: 10px; width: 100%; max-width: 440px; }
.pull { flex: 1; min-width: 0; height: 60px; display: flex; flex-direction: column; justify-content: center; gap: 6px; padding: 0 12px;
  background: #2a1610; color: var(--ink); border: 1px solid #6b3a26; font: 800 15px/1 Cinzel, serif; }
.pull.primary, button.primary { background: linear-gradient(#ff8a3d, #c4430e); color: #1a0a05; border: 0; }
.pull .cost { font: 600 13px/1 Inter, sans-serif; opacity: 0.9; }
button.ghost { background: transparent; color: var(--ink); border: 1px solid #6b3a26; }
.error { margin: 0; min-height: 1em; color: #ff8a6a; font-size: 13px; }
.error:empty { min-height: 0; }
.links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; }
.links .link { flex: none; white-space: nowrap; }
button.link { min-width: 0; height: auto; padding: 6px 2px; background: none; color: var(--ink); font: 600 13px/1 Inter, sans-serif;
  text-decoration: underline; text-underline-offset: 4px; text-decoration-color: #6b3a26; }
.reveal-ui { background: linear-gradient(transparent, #070405cc 50%); }
.reveal-ui button, .results > button { min-width: 200px; }
.stars { font-size: 22px; letter-spacing: 6px; color: #ffd27a; }
.rarity { font: 800 15px/1.4 Cinzel, serif; letter-spacing: 5px; text-transform: uppercase; margin-top: 4px; }
.name { font: 800 clamp(28px, 7cqw, 44px)/1.1 Cinzel, serif; margin: 4px 0 12px; text-shadow: 0 2px 16px #000; }
.r-legendary { color: #ffb04a; } .r-epic { color: #c08bff; } .r-rare { color: #6fb8ff; }
.new { display: inline-block; padding: 3px 8px; border-radius: 6px; background: #ff5a2a; color: #1a0a05; font: 800 11px/1 Inter, sans-serif; letter-spacing: 1px; }
.new:empty { display: none; }
.results { gap: 14px; }
.grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; width: 100%; max-width: 560px; }
.card { position: relative; min-width: 0; height: auto; aspect-ratio: 3 / 4; padding: 8px 4px; border-radius: 10px; display: flex;
  flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; background: #160c09; border: 1px solid currentColor;
  font: 600 11px/1.1 Inter, sans-serif; box-shadow: inset 0 -30px 40px -20px currentColor; }
.card .stars { font-size: 10px; letter-spacing: 1px; } .card .nm { color: var(--ink); word-break: break-word; } .card .copies { color: var(--quiet); }
.card .new { position: absolute; top: 4px; left: 4px; font-size: 9px; padding: 2px 4px; }
@container (max-width: 420px) { .grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 5px; } .card { font-size: 9px; } }
dialog { width: min(520px, calc(100vw - 32px)); max-height: min(80vh, 720px); padding: 20px; border: 1px solid #4a2a1e; border-radius: 16px;
  background: #120a08; color: var(--ink); overflow: auto; }
dialog::backdrop { background: #000a; }
dialog h2 { margin: 0 0 12px; font: 800 20px/1.2 Cinzel, serif; }
dialog .grid { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); margin-bottom: 16px; }
.sheet h3 { margin: 16px 0 6px; font: 600 12px/1 Inter, sans-serif; letter-spacing: 2px; text-transform: uppercase; color: var(--quiet); }
.sheet p { margin: 6px 0; font-size: 14px; line-height: 1.45; }
.sheet table { width: 100%; border-collapse: collapse; font-size: 14px; }
.sheet td { padding: 6px 0; border-bottom: 1px solid #2a1a14; } .sheet td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.sheet em { font-style: normal; font-size: 11px; color: #ffb04a; margin-left: 4px; }
.btn-close { width: 100%; margin-top: 16px; }
#confirm p { color: var(--quiet); }
#app:not([hidden]) ~ footer { display: none; }
#app [hidden] { display: none !important; }
.pull-row > button { min-width: 0; flex: 1; }
.flash { animation: flash 0.9s ease-out; }
@keyframes flash { 0%, 30% { color: #ff8a6a; transform: scale(1.04); } 100% { color: var(--quiet); transform: none; } }

/* ---- battles ---- */
#battle-scene { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.mainnav { width: min(360px, calc(100cqw - 32px)); position: absolute; top: calc(max(12px, env(safe-area-inset-top)) + 46px); left: 50%; transform: translateX(-50%);
  display: flex; gap: 4px; padding: 4px; border-radius: 14px; background: #120a08cc; border: 1px solid #3a2219; backdrop-filter: blur(6px); }
.mainnav button { min-width: 0; flex: 1 1 auto; height: 34px; padding: 0 6px; white-space: nowrap; border-radius: 10px; background: transparent; color: var(--quiet);
  font: 800 13px/1 Cinzel, serif; letter-spacing: 0.5px; }
.mainnav button.on { background: linear-gradient(#ff8a3d, #c4430e); color: #1a0a05; }
#app:not([data-mode="banner"]):not([data-mode="campaign"]):not([data-mode="pvp"]):not([data-mode="clan"]) .mainnav { display: none; }
.campaign { position: absolute; left: 0; right: 0; bottom: 0; top: calc(max(12px, env(safe-area-inset-top)) + 96px); display: flex; flex-direction: column;
  align-items: center; padding: 0 16px max(16px, env(safe-area-inset-bottom)); background: linear-gradient(#07040500, #070405f0 18%); }
#app:not([data-mode="campaign"]) .campaign:not(.pvp):not(.clan) { display: none; }
#app:not([data-mode="pvp"]) .pvp { display: none; }
#app:not([data-mode="clan"]) .clan { display: none; }
.campaign h2 { margin: 8px 0 10px; font: 800 24px/1 Cinzel, serif; letter-spacing: 2px; text-shadow: 0 2px 16px #000; }
.stages { width: 100%; max-width: 520px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding-bottom: 8px; }
.stage { display: flex; align-items: center; gap: 12px; width: 100%; min-width: 0; height: 64px; padding: 0 14px; border-radius: 12px; text-align: left;
  background: #1a0e0acc; color: var(--ink); border: 1px solid #3a2219; font: 600 14px/1.2 Inter, sans-serif; }
.stage.open { border-color: #ff8a3d; box-shadow: 0 0 24px -6px #ff7a2f; background: #2a1209e6; }
.stage.locked { opacity: 0.45; }
.stage .no { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: #3a1d12; font: 800 15px/1 Cinzel, serif; flex: none; }
.stage.open .no { background: linear-gradient(#ff8a3d, #c4430e); color: #1a0a05; }
.stage .info { flex: 1; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.stage .info b { font: 800 15px/1 Cinzel, serif; }
.stage .info .quiet { font-size: 12px; }
.stage .rw { font-size: 13px; color: #ff9a5a; white-space: nowrap; }
.stage .done { color: #7ad79a; font-size: 12px; letter-spacing: 1px; text-transform: uppercase; }
/* story chapters (js/story.js) */
.chapter { margin: 10px 2px 2px; text-align: left; }
.chapter:first-child { margin-top: 0; }
.chapter .eyebrow { margin: 0 0 4px; }
.chapter h3 { margin: 0; font: 800 18px/1.15 Cinzel, serif; color: #ffd9a8; text-shadow: 0 2px 12px #000; }
.stage.boss { border-color: #7a2a18; background: linear-gradient(90deg, #3a0f08e6, #1a0e0acc); }
.stage.boss .no { background: #5a160c; color: #ffb08a; font-size: 18px; }
.stage.boss.open .no { background: linear-gradient(#ff5a2d, #8a1a08); color: #1a0505; }
.story { max-width: 420px; text-align: center; }
.whatsnew { max-width: 440px; }
/* daily rewards (js/daily.js) */
.daily-btn { position: absolute; top: calc(max(12px, env(safe-area-inset-top)) + 92px); right: 16px; width: auto; min-width: 0; height: 30px; padding: 0 12px; border-radius: 99px;
  background: #1a0e0acc; border: 1px solid #5a2a14; color: #ffd27a; font: 700 12px/1 Cinzel, serif; letter-spacing: 1px; z-index: 2; }
.daily-btn.dot::after { content: ''; position: absolute; top: -2px; right: -2px; width: 9px; height: 9px; border-radius: 50%; background: #ff5a2d; box-shadow: 0 0 8px #ff5a2d; }
#app:not([data-mode="banner"]):not([data-mode="campaign"]):not([data-mode="pvp"]):not([data-mode="clan"]) .daily-btn { display: none; }
.daily { max-width: 440px; max-height: 88vh; overflow-y: auto; }
.daily h2 { margin: 0 0 8px; font: 800 24px/1.1 Cinzel, serif; }
.daily section { margin: 0 0 14px; } .daily h3 { margin: 0 0 8px; font: 800 15px/1 Cinzel, serif; color: #ffd9a8; }
.lstrip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; margin: 0 0 10px; }
.lday { display: flex; flex-direction: column; gap: 4px; align-items: center; padding: 6px 2px; border-radius: 8px; background: #1a0e0a; border: 1px solid #2a1a14; font-size: 9px; text-align: center; }
.lday span { color: var(--quiet); } .lday b { font-weight: 600; color: #ffcf9a; line-height: 1.25; }
.lday.done { opacity: 0.45; } .lday.today { border-color: #ff8a3d; box-shadow: 0 0 12px -2px #ff7a2f; }
.quest { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border-radius: 10px; background: #1a0e0a; border: 1px solid #2a1a14; margin: 0 0 6px; }
.quest > div { flex: 1; display: flex; flex-direction: column; gap: 3px; min-width: 0; } .quest b { font-size: 13px; } .quest .quiet { font-size: 11px; }
.quest button { flex: none; width: auto; min-width: 86px; height: 32px; padding: 0 14px; font-size: 13px; } .quest.claimed { opacity: 0.55; } .quest.bonus { border-color: #5a2a14; }
.sbar { height: 8px; border-radius: 99px; background: #1a0e0a; border: 1px solid #2a1a14; overflow: hidden; margin: 0 0 6px; }
.sbar i { display: block; height: 100%; background: linear-gradient(90deg, #c9441a, #ff9a4a); }
.daily section > .btn-wide + .btn-wide { margin-top: 6px; }
.strack { margin-top: 8px; } .strack summary { cursor: pointer; color: #ffcf9a; font-size: 13px; padding: 4px 0; }
.srow { display: grid; grid-template-columns: 28px 1fr 1fr; gap: 6px; align-items: center; padding: 5px 6px; font-size: 11px; border-bottom: 1px solid #2a1a14; }
.srow.head { color: var(--quiet); text-transform: uppercase; letter-spacing: 1px; font-size: 10px; }
.srow .stier { font-weight: 800; color: var(--quiet); } .srow.got .stier { color: #ff9a4a; }
.srow .locked { opacity: 0.45; } .srow .taken { text-decoration: line-through; opacity: 0.5; }
.offers { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 8px; margin: 0 0 6px; }
.offer { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: linear-gradient(135deg, #2a120a, #160b08); border: 1px solid #5a2a14; }
.offer > div { flex: 1; display: flex; flex-direction: column; gap: 3px; min-width: 0; } .offer b { font: 800 15px/1.1 Cinzel, serif; color: #ffd9a8; }
.offer span { font-size: 12px; color: #ffcf9a; } .offer .quiet { font-size: 11px; color: var(--quiet); }
.offer button { flex: none; width: auto; min-width: 86px; height: 38px; padding: 0 12px; font-size: 14px; }
.quest .done { color: #7ad79a; font-size: 11px; letter-spacing: 1px; text-transform: uppercase; }
.whatsnew h2 { margin: 0 0 10px; font: 800 24px/1.1 Cinzel, serif; }
.whatsnew .eyebrow { margin: 12px 0 6px; }
.whatsnew ul { margin: 0; padding-left: 18px; } .whatsnew li { margin: 0 0 7px; font-size: 14px; line-height: 1.45; color: #ecd9c6; }
.story h2 { margin: 4px 0 12px; font: 800 26px/1.15 Cinzel, serif; }
.story #story-body { margin: 0 0 6px; font-size: 15px; line-height: 1.55; color: #ecd9c6; }
#squad .card { cursor: pointer; }
#squad .card.picked { outline: 2px solid #ff8a3d; outline-offset: 1px; background: #2a1209; }
#squad .card .pick { position: absolute; top: 4px; right: 6px; font: 800 12px/1 Inter, sans-serif; color: #ff9a5a; }
#squad-power { margin: 4px 0 14px; text-align: center; }
#squad-hint { margin: -6px 0 12px; }
.battle-ui { position: absolute; inset: 0; pointer-events: none; }
.battle-ui button { pointer-events: auto; }
.battle-overlay { position: absolute; inset: 0; overflow: hidden; }
.battle-top { position: absolute; top: max(12px, env(safe-area-inset-top)); left: 16px; right: 16px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.battle-top .eyebrow { margin: 0; }
.timer { font: 800 18px/1 Cinzel, serif; font-variant-numeric: tabular-nums; text-shadow: 0 2px 8px #000; }
.toggles { display: flex; gap: 6px; }
button.chip { min-width: 52px; height: 32px; padding: 0 12px; border-radius: 999px; background: #120a08cc; color: var(--ink); border: 1px solid #4a2a1e; font: 600 13px/1 Inter, sans-serif; }
button.chip.on { background: linear-gradient(#ff8a3d, #c4430e); color: #1a0a05; border-color: transparent; }
.hint { position: absolute; top: 18%; left: 50%; transform: translateX(-50%); width: min(340px, 86cqw); margin: 0; padding: 10px 14px; border-radius: 12px;
  background: #120a08e6; border: 1px solid #6b3a26; text-align: center; font-size: 14px; }
.hpbar { position: absolute; left: 0; top: 0; width: 64px; height: 7px; border-radius: 4px; background: #000a; border: 1px solid #0008; overflow: hidden; transition: opacity 0.4s; }
.hpbar i { position: absolute; left: 0; top: 0; bottom: 0; transition: width 0.25s; }
.hpbar .fill { background: linear-gradient(#ff9a5a, #d8501a); }
.hpbar.side1 .fill { background: linear-gradient(#ff5a5a, #a01818); }
.hpbar .shield { background: #8ac8ff; z-index: 1; opacity: 0.85; }

.num { position: absolute; left: 0; top: 0; font: 800 15px/1 Cinzel, serif; color: #fff; text-shadow: 0 2px 4px #000, 0 0 10px #000; white-space: nowrap; pointer-events: none; }
.num.dmg { color: #ffe0c4; } .num.hurt { color: #ff7a6a; } .num.crit { color: #ffd23a; font-size: 20px; } .num.heal { color: #6aff9a; } .num.dot { color: #c88aff; font-size: 12px; } .num.strong { color: #ff9a3a; font-size: 18px; }
.callout { position: absolute; left: 50%; top: 30%; transform: translateX(-50%); font: 800 clamp(24px, 7cqw, 40px)/1 Cinzel, serif; letter-spacing: 3px;
  color: #ffd27a; text-shadow: 0 0 24px #ff7a2f, 0 2px 6px #000; animation: callout 1.4s ease-out forwards; white-space: nowrap; }
.callout.side1 { color: #ff8a8a; text-shadow: 0 0 24px #ff2020, 0 2px 6px #000; top: 22%; }
@keyframes callout { 0% { opacity: 0; transform: translateX(-50%) scale(1.4); } 15% { opacity: 1; transform: translateX(-50%) scale(1); } 75% { opacity: 1; } 100% { opacity: 0; transform: translateX(-50%) translateY(-12px); } }
.ults { position: absolute; left: 0; right: 0; bottom: 0; padding: 12px 8px max(12px, env(safe-area-inset-bottom)); display: flex; justify-content: center; gap: 6px;
  background: linear-gradient(transparent, #070405e6 45%); }
.ult { flex: 1; max-width: 86px; min-width: 0; height: auto; padding: 4px 2px; display: flex; flex-direction: column; align-items: center; gap: 4px;
  background: none; border: 0; color: var(--ink); font: 600 11px/1 Inter, sans-serif; }
.ult .ring { position: relative; width: 56px; height: 56px; display: grid; place-items: center; }
.ult svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.ult circle { fill: #160c09; stroke-width: 3; }
.ult .bg { stroke: #3a2219; } .ult .en { fill: none; stroke: currentColor; stroke-linecap: round; stroke-dasharray: 0 100; transition: stroke-dasharray 0.15s; }
.ult .ini { position: relative; font: 800 18px/1 Cinzel, serif; color: var(--ink); }
.ult.r-legendary { color: #ffb04a; } .ult.r-epic { color: #c08bff; } .ult.r-rare { color: #6fb8ff; }
.ult .nm { color: var(--ink); }
.ult .nm { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ult .hp { width: 48px; height: 4px; border-radius: 2px; background: #000a; overflow: hidden; } .ult .hp i { display: block; height: 100%; background: #ff8a3d; }
.ult.ready .ring { animation: ready 0.9s ease-in-out infinite alternate; }
.ult.ready circle.bg { fill: #3a1708; }
.ult.dead { opacity: 0.35; filter: grayscale(1); }
@keyframes ready { from { filter: drop-shadow(0 0 4px currentColor); transform: scale(1); } to { filter: drop-shadow(0 0 14px currentColor); transform: scale(1.08); } }
.battle-result { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 24px;
  background: radial-gradient(circle at 50% 45%, #07040599, #070405e6 70%); pointer-events: auto; text-align: center; }
.battle-result h2 { margin: 0; font: 800 clamp(40px, 12cqw, 64px)/1 Cinzel, serif; letter-spacing: 4px; }
.battle-result h2.win { color: #ffc46a; text-shadow: 0 0 40px #ff7a2f; } .battle-result h2.lose { color: #b8a8a0; text-shadow: 0 0 30px #000; }
.battle-result p { margin: 4px 0 18px; color: var(--ink); font-size: 15px; max-width: 360px; }
#app[data-mode="battle"] .hud { display: none; }

/* ---- levelling ---- */
.pill.gold { color: #ffd23a; }
.cost.gold { color: inherit; }
.stage .rw { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.stage .again { font-size: 11px; color: #e9c77a; opacity: 0.8; }
#replays { margin: -4px 0 8px; }
.energy { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 10px; margin: -2px 0 10px; font: 600 13px/1 Inter, sans-serif; color: #ffd27a; }
.energy > span { white-space: nowrap; }
.energy button { width: auto; height: 28px; padding: 0 12px; font-size: 12px; }
.hero-sheet { text-align: center; }
.hero-head h2 { margin: 4px 0 2px; font: 800 28px/1.1 Cinzel, serif; }
.hero-head .stars { font-size: 16px; letter-spacing: 4px; }
.realm-line { margin: 6px 0 0; font-size: 13px; color: #e9c77a; } .realm-line b { font: 800 13px/1 Cinzel, serif; letter-spacing: 1px; color: #ffd27a; }
.hero-head .bio { margin: 8px auto 0; max-width: 34em; font: italic 400 13px/1.45 Lora, Georgia, serif; color: #d9c4ae; }
.card .realm { display: block; margin-top: 2px; font: 700 10px/1.2 Cinzel, serif; letter-spacing: 1px; color: var(--quiet); }
.card .realm.strong { color: #ff9a3a; }
.hero-level { margin: 10px 0; font: 800 16px/1 Cinzel, serif; color: #ffd27a; }
.hero-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 0 0 16px; }
.hero-stats div { display: flex; flex-direction: column; gap: 4px; padding: 8px 4px; border-radius: 10px; background: #1a0e0a; border: 1px solid #2a1a14; }
.hero-stats span { font-size: 11px; color: var(--quiet); } .hero-stats b { font: 600 15px/1 Inter, sans-serif; font-variant-numeric: tabular-nums; }
.hero-sheet .pull-row { margin: 0 auto; }
.hero-sheet .pull { font-size: 14px; }
#hero-note { margin: 10px auto 0; min-height: 1.2em; }
.btn-wide { width: 100%; margin-top: 12px; }
@container (max-width: 420px) { .pill { padding: 7px 9px; font-size: 13px; } .wallet { gap: 5px; } .brand { display: none; } button.profile { max-width: 34cqw; padding: 0 10px; font-size: 12px; } }

/* ---- pvp ---- */
.pvp-card { width: 100%; max-width: 520px; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 14px;
  background: linear-gradient(135deg, #2a1209e6, #160c09e6); border: 1px solid #6b3a26; margin-bottom: 10px; }
.pvp-card .rating { display: flex; flex-direction: column; gap: 4px; } .pvp-card .rating b { font: 800 32px/1 Cinzel, serif; color: #ffc46a; }
.pvp-card .right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; font-size: 13px; text-align: right; }
.pvp-defense { width: 100%; max-width: 520px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pvp-defense .eyebrow { margin: 0; flex: 0 0 100%; } .chips { display: flex; flex-wrap: wrap; gap: 4px; flex: 1; }
.chip-hero { padding: 4px 8px; border-radius: 999px; background: #1a0e0a; border: 1px solid currentColor; font: 600 11px/1 Inter, sans-serif; }
#pvp-note { margin: 8px 0; }
.rival { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: #1a0e0acc; border: 1px solid #3a2219; }
.rival .who { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.rival .who b { font: 800 15px/1 Cinzel, serif; } .rival .quiet { font-size: 12px; }
.rival .team { display: flex; flex-wrap: wrap; gap: 3px 8px; } .rival .team i { font-style: normal; font-size: 10px; white-space: nowrap; }
.rival .pull { flex: none; width: 84px; height: 44px; min-width: 0; font-size: 14px; }
#pvp-refresh { min-width: 180px; height: 40px; padding: 0 16px; font-size: 14px; margin-top: 4px; }

/* ---- names + leaderboard ---- */
.name-row { display: flex; gap: 8px; }
.name-row input { flex: 1; min-width: 0; font: 600 16px/1.2 Inter, sans-serif; color: var(--ink); background: #1e1512; border: 1px solid #5a4844; border-radius: 10px; padding: 12px 14px; }
.name-row .chip { height: auto; }
#name-error { margin: 8px 0 0; } #name-note { margin: 6px 0 16px; }
button.report { align-self: flex-start; min-width: 0; height: auto; padding: 2px 0; background: none; color: var(--quiet); font: 600 10px/1.2 Inter, sans-serif;
  text-decoration: underline; text-underline-offset: 2px; }
button.report.confirm { color: #ff8a6a; }
.pvp-actions { display: flex; gap: 8px; } .pvp-actions button { min-width: 140px; height: 40px; padding: 0 14px; font-size: 14px; margin-top: 4px; }
#pvp-refresh { min-width: 140px; }
.board { display: flex; flex-direction: column; gap: 4px; }
.board .row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: #1a0e0a; }
.board .row.me { outline: 1px solid #ff8a3d; background: #2a1209; }
.board .rk { width: 28px; text-align: right; font: 800 14px/1 Cinzel, serif; color: #ffc46a; }
.board .nm { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; }
.board .rt { font-variant-numeric: tabular-nums; font-size: 14px; }
#board-me { margin: -6px 0 10px; }

/* ---- clans + raids ---- */
.clan-none, .clan-mine { width: 100%; max-width: 520px; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; padding-bottom: 8px; }
.clan-none > p { margin: 0; }
input.search { font: 500 15px/1.2 Inter, sans-serif; color: var(--ink); background: #1e1512; border: 1px solid #3a2a24; border-radius: 10px; padding: 10px 12px; }
.clan-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.clan-head h3 { margin: 0; font: 800 20px/1.1 Cinzel, serif; }
.boss-card { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; border-radius: 14px; border: 1px solid #8a2a1a;
  background: radial-gradient(circle at 80% 0%, #4a120acc, #160c09e6 70%); }
.boss-top { display: flex; justify-content: space-between; align-items: baseline; } .boss-top b { font: 800 24px/1 Cinzel, serif; color: #ff8a6a; }
.boss-top .eyebrow { margin: 0; }
.boss-bar { position: relative; height: 18px; border-radius: 9px; background: #000a; border: 1px solid #5a1a10; overflow: hidden; }
.boss-bar i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(#ff5a3a, #a01a0a); transition: width 0.4s; }
.boss-bar span { position: relative; display: block; text-align: center; font: 600 11px/18px Inter, sans-serif; text-shadow: 0 1px 2px #000; }
.boss-card p { margin: 0; font-size: 14px; }
#raid-attack { height: 50px; flex: none; }
.board .row em { font-style: normal; font-size: 10px; color: #ffb04a; margin-left: 4px; }
.board .row .report { flex: none; }
#clan-leave { min-width: 0; height: 40px; font-size: 14px; align-self: center; padding: 0 20px; }
#clan-leave.confirm { color: #ff8a6a; border-color: #ff8a6a; }
.hpbar.boss { width: 150px; height: 10px; }

/* ---- gem shop ---- */
button.pill { min-width: 0; height: auto; cursor: pointer; }
.pill .plus { font-style: normal; margin-left: 2px; width: 16px; height: 16px; border-radius: 50%; display: inline-grid; place-items: center;
  background: #ff8a3d; color: #1a0a05; font: 800 12px/1 Inter, sans-serif; }
.shop-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.pack { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 18px 8px 10px; border-radius: 12px;
  background: radial-gradient(circle at 50% 0%, #3a1a0e, #160c09 70%); border: 1px solid #4a2a1e; text-align: center; }
.pack.popular, .pack.best { border-color: #ff8a3d; }
.pack .tag { position: absolute; top: -8px; padding: 3px 8px; border-radius: 6px; background: #ff8a3d; color: #1a0a05; font: 800 10px/1 Inter, sans-serif; letter-spacing: 1px; text-transform: uppercase; }
.pack .gems { font: 800 20px/1 Cinzel, serif; color: #ff9a5a; }
.pack .bonus { min-height: 14px; font-size: 11px; color: #ffd27a; }
.pack .pull { width: 100%; height: 42px; flex: none; font: 800 15px/1 Inter, sans-serif; }
#shop-note { margin: 12px 0 0; line-height: 1.45; }
.toast { position: fixed; left: 50%; bottom: max(24px, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 50; margin: 0;
  padding: 12px 18px; border-radius: 12px; background: #2a1209f2; border: 1px solid #ff8a3d; font-size: 14px; max-width: min(90cqw, 420px); text-align: center; }

/* ---- accounts + legal ---- */
.signin { display: flex; flex-direction: column; gap: 10px; align-items: stretch; width: min(320px, 86cqw); }
.signin input, #acct input { font: 16px/1.2 inherit; color: var(--ink); background: #1e1512; border: 1px solid #5a4844; border-radius: 10px; padding: 12px 14px; color-scheme: dark; }
.signin button[type="submit"] { min-width: 0; }
.signin .error { margin: 0; text-align: center; }
button.link { min-width: 0; padding: 6px 2px; background: none; color: var(--ink); font: 600 13px/1.3 Inter, system-ui, sans-serif;
  text-decoration: underline; text-underline-offset: 4px; text-decoration-color: #6b3a26; }
.legal { margin: 0; color: var(--quiet); font-size: 12px; text-align: center; } .legal a { color: #ff9a5a; }
#acct-body { display: flex; flex-direction: column; gap: 10px; }
#acct-body p { margin: 0; } #acct details { margin-top: 4px; } #acct summary { cursor: pointer; color: var(--quiet); font-size: 14px; padding: 6px 0; }
#acct details > input, #acct details > button { margin-top: 8px; width: 100%; }
#acct .danger summary { color: #ff8a6a; }
#acct .code { font: 800 22px/1.2 ui-monospace, Menlo, monospace; letter-spacing: 2px; text-align: center; padding: 12px; border-radius: 10px; background: #1e1512; border: 1px dashed #ff8a3d; user-select: all; }
#acct .legal { margin-top: 14px; }
#name-account { display: block; margin: 10px auto 0; }
[hidden] { display: none !important; }

/* ---- portrait only (Spencer, Nov 13) ----
   Wide screens (computers, tablets held sideways) show the game in a centred 9:16 column; phones held sideways get
   a "turn your phone upright" card. The phone apps lock portrait in their own settings. Sizes inside #app use cqw
   (the column's width), not vw. */
@media (min-aspect-ratio: 3/4) {
  body { background: radial-gradient(ellipse at 50% 40%, #2a140b 0%, #0b0706 70%); }
  #app, .title { position: fixed; inset: 0; margin: 0 auto; width: min(100vw, max(390px, calc(100dvh * 9 / 16))); }
  #app { overflow: hidden; box-shadow: 0 0 0 1px #2a1a14, 0 0 120px #000; }
  .title { min-height: 0; overflow-y: auto; box-shadow: 0 0 0 1px #2a1a14, 0 0 120px #000; }
}
.rotate { display: none; }
@media (orientation: landscape) and (max-height: 500px) and (pointer: coarse) {
  .rotate { position: fixed; inset: 0; z-index: 1000; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
    background: var(--bg); color: var(--ink); font: 600 16px/1.4 Inter, system-ui, sans-serif; text-align: center; padding: 24px; }
  .rotate i { width: 34px; height: 56px; border: 3px solid var(--ember); border-radius: 8px; animation: rotate-hint 1.8s ease-in-out infinite; }
}
@keyframes rotate-hint { 0%, 30% { transform: rotate(-90deg); } 60%, 100% { transform: rotate(0deg); } }

/* gear (0.24.0) */
.hero-gear { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 0 0 10px; }
.gslot { display: flex; flex-direction: column; align-items: center; gap: 2px; width: auto; min-width: 0; height: auto; padding: 8px 4px; border-radius: 10px;
  background: #1a0e0a; border: 1px solid #2a1a14; color: inherit; font: inherit; text-align: center; }
.gslot i { font-style: normal; font-size: 18px; color: #ffb27a; } .gslot b { font-size: 11px; font-weight: 700; } .gslot span { font-size: 10px; color: var(--quiet); }
.gslot.empty { opacity: 0.7; border-style: dashed; }
.gslot.r-rare, .gitem.r-rare { border-color: #3d6fb8; } .gslot.r-epic, .gitem.r-epic { border-color: #9a4ad8; } .gslot.r-legendary, .gitem.r-legendary { border-color: #ff9a3d; box-shadow: 0 0 10px -3px #ff9a3d; }
.gear-dlg { max-width: 440px; max-height: 88vh; overflow-y: auto; } .gear-dlg h2 { margin: 0 0 10px; font: 800 22px/1.1 Cinzel, serif; }
.gear-dlg .btn-wide { margin: 0 0 8px; }
.gitem { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: #1a0e0a; border: 1px solid #2a1a14; margin: 0 0 6px; }
.gitem > i { font-style: normal; font-size: 18px; color: #ffb27a; width: 20px; text-align: center; }
.gitem > div:not(.gact) { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; } .gitem b { font-size: 13px; } .gitem span { font-size: 11px; color: var(--quiet); }
.gact { display: flex; gap: 6px; flex: none; } .gact button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; width: auto; min-width: 64px; height: 40px; padding: 0 8px; font-size: 12px; line-height: 1.1; }
.gact button small { font-size: 10px; opacity: 0.85; }

/* raid aspect (0.25.0) */
.raid-lore { margin: 2px 0 8px; font: italic 13px/1.35 'Lora', Georgia, serif; color: #d9c2a8; }
.raid-aspect { margin: 8px 0 4px; font-size: 13px; line-height: 1.4; color: #ffcf9a; }
.raid-aspect b { color: #ffb066; } .raid-aspect .quiet { display: block; font-size: 12px; color: var(--quiet); }

/* featured banner points (0.26.0) */
.pick-row { display: flex; align-items: center; gap: 8px; margin: 4px auto 0; max-width: 92%; font-size: 12px; color: var(--quiet); }
.pick-bar { flex: 0 0 70px; height: 6px; border-radius: 99px; background: #1a0e0a; border: 1px solid #2a1a14; overflow: hidden; }
.pick-bar i { display: block; height: 100%; background: linear-gradient(90deg, #c9441a, #ffb066); }
.pick-row .chip { width: auto; height: 26px; padding: 0 12px; font-size: 12px; }

.first-gift { grid-column: 1 / -1; padding: 8px 12px; border-radius: 10px; background: linear-gradient(90deg, #3a1a6a55, #1a0e0a); border: 1px solid #7a4ab8; font-size: 12px; color: #e8d6ff; }
.first-gift b { color: #d9b8ff; }

.rates-line { margin: 6px auto 0; max-width: 94%; text-align: center; font-size: 11px; line-height: 1.4; color: var(--quiet); }
.rates-line .link { width: auto; height: auto; min-width: 0; padding: 0; font-size: 11px; }

.hero-level .shared { display: inline-block; margin-left: 8px; padding: 2px 8px; border-radius: 99px; background: #2a1a4a; border: 1px solid #7a4ab8; color: #d9b8ff; font: 700 10px/1.4 Inter, sans-serif; letter-spacing: 1px; text-transform: uppercase; vertical-align: middle; }

/* step-up banner (0.28.0) */
.steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; margin: 6px auto 0; max-width: 94%; }
.step { position: relative; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 5px 2px; border-radius: 8px; background: #160b08cc; border: 1px solid #2a1a14; font-size: 10px; color: var(--quiet); }
.step b { font: 800 13px/1 Cinzel, serif; color: #ffcf9a; } .step em { font-style: normal; font-size: 8px; letter-spacing: .5px; text-transform: uppercase; color: #ffb066; }
.step.now { border-color: #ff8a3d; box-shadow: 0 0 12px -3px #ff7a2f; color: #ffe2c2; } .step.done { opacity: .45; }

.daily .btn-wide.quick { margin-top: 6px; font-size: 13px; }

/* gear sets (0.29.0) */
.gitem .gset { font-size: 10px; color: #ffcf9a; } .gitem .glore { font: italic 11px/1.35 Lora, Georgia, serif; color: #bfa892; }
.gsets { grid-column: 1 / -1; margin: 2px 0 0; font-size: 11px; color: var(--quiet); text-align: center; }
.set-draksaal { color: #7fc4ff !important; } .set-myrrhak { color: #ff7a4a !important; } .set-ithuren { color: #5fe0c8 !important; } .set-zarovin { color: #c78bff !important; }
.hero-stats .skillpow { grid-column: 1 / -1; margin: 2px 0 0; font-size: 11px; color: var(--quiet); text-align: center; }

.callout.side2 { top: 38%; z-index: 5; font-size: clamp(16px, 5.4cqw, 26px); letter-spacing: 2px; color: #ffe0d2; text-shadow: 0 0 18px #ff2a10, 0 0 36px #ff2a10, 0 2px 6px #000; animation: callout 2.2s ease-out forwards; }

/* ================================================================================================================
   Premium pass (0.30.0): "forged iron and molten ember". Panels read as blackened metal plates with a thin brass edge
   and a lit top bevel; primary actions are molten metal; motion only answers the player (dialogs forge in, buttons
   press, hits pop). One bold idea (the forged frames), everything else kept quiet.
   ================================================================================================================ */
:root {
  --ash: #0c0705; --iron: #1a110d; --iron-hi: #2b1c15; --brass: #8a6a3e; --brass-hi: #d8b27a; --gold: #f0c878;
  --plate: linear-gradient(180deg, #24170f 0%, #150d09 46%, #0e0806 100%);
  --bevel: inset 0 1px 0 #ffdcae22, inset 0 -1px 0 #00000080, inset 0 0 0 1px #0000004d;
  --molten: linear-gradient(180deg, #ffc27e 0%, #ff8a3d 30%, #e0561a 62%, #9a300b 100%);
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* --- forged plates: dialogs, rows and tiles share one material --- */
dialog { background: var(--grain), var(--plate); border: 1px solid var(--brass); border-radius: 14px;
  box-shadow: var(--bevel), 0 0 0 1px #000, 0 30px 80px -10px #000, 0 0 60px -20px #ff6a2a33; }
dialog::before { content: ''; position: absolute; inset: 6px; pointer-events: none; border-radius: 10px;
  background:
    linear-gradient(var(--brass-hi), var(--brass-hi)) top left / 14px 1px no-repeat, linear-gradient(var(--brass-hi), var(--brass-hi)) top left / 1px 14px no-repeat,
    linear-gradient(var(--brass-hi), var(--brass-hi)) top right / 14px 1px no-repeat, linear-gradient(var(--brass-hi), var(--brass-hi)) top right / 1px 14px no-repeat,
    linear-gradient(var(--brass-hi), var(--brass-hi)) bottom left / 14px 1px no-repeat, linear-gradient(var(--brass-hi), var(--brass-hi)) bottom left / 1px 14px no-repeat,
    linear-gradient(var(--brass-hi), var(--brass-hi)) bottom right / 14px 1px no-repeat, linear-gradient(var(--brass-hi), var(--brass-hi)) bottom right / 1px 14px no-repeat;
  opacity: .55; }
dialog[open] { animation: forge-in .24s cubic-bezier(.2, .8, .2, 1); }
dialog[open]::backdrop { background: radial-gradient(ellipse at 50% 40%, #1a0a0599, #000000d9); backdrop-filter: blur(3px); animation: veil-in .24s ease-out; }
@keyframes forge-in { from { opacity: 0; transform: translateY(8px) scale(.965); filter: brightness(1.7) saturate(1.3); } }
@keyframes veil-in { from { opacity: 0; } }
dialog h2 { letter-spacing: .5px; text-shadow: 0 1px 0 #000, 0 0 18px #ff7a2f33; }

.stage, .quest, .offer, .pack, .gitem, .lday, .gslot, .step, .boss-card, .hero-stats > div, .srow:not(.head) {
  background: var(--grain), var(--plate); border-color: #4a3220; box-shadow: var(--bevel); }
.stage.open, .lday.today, .step.now { border-color: #ff9a4a; box-shadow: var(--bevel), 0 0 0 1px #ff7a2f55, 0 0 26px -6px #ff7a2f; }
.stage.boss { background: var(--grain), linear-gradient(90deg, #3c0f08 0%, #1a0c08 70%); border-color: #8a2a18; }
.offer { background: var(--grain), linear-gradient(135deg, #34160b 0%, #1a0d08 55%, #120907 100%); border-color: #7a4a24; }
.pack.popular, .pack.best { border-color: var(--gold); box-shadow: var(--bevel), 0 0 0 1px #f0c87844, 0 0 30px -8px #f0c87866; }
.first-gift { box-shadow: var(--bevel), 0 0 24px -8px #b77cff88; }

/* --- molten primary actions --- */
button.primary, .pull.primary, .mainnav button.on, button.chip.on, .stage.open .no {
  background: var(--molten); color: #2a0c02; border: 0; text-shadow: 0 1px 0 #ffd6a066;
  box-shadow: inset 0 1px 0 #ffe7c4, inset 0 -2px 0 #6a1e04, 0 0 0 1px #2a0e04, 0 8px 20px -8px #ff6a2acc; }
button.primary:not(:disabled):hover, .pull.primary:not(:disabled):hover { filter: brightness(1.07) saturate(1.05); }
button:not(:disabled):active { transform: translateY(1px) scale(.99); filter: brightness(.94); }
button { transition: transform .08s ease, filter .12s ease, box-shadow .12s ease; }

/* --- iron secondary actions --- */
.pull:not(.primary), button.ghost, button.chip:not(.on), button.profile, .tabs, .mainnav {
  background: var(--grain), linear-gradient(180deg, #2a1b13, #160d09); border: 1px solid #5c4026; box-shadow: var(--bevel); }
.tabs button.on { background: linear-gradient(180deg, #4a2a18, #2a160d); color: var(--gold); box-shadow: inset 0 1px 0 #ffd9a033, 0 0 0 1px #8a5a30; }
.pull:not(.primary) .cost, .pull.primary .cost { font-variant-numeric: tabular-nums; }

/* --- HUD pills: crisp coin-like chips --- */
.pill { background: linear-gradient(180deg, #1c120dee, #0d0806ee); border: 1px solid #5c4026; box-shadow: var(--bevel), 0 4px 14px -6px #000;
  font-variant-numeric: tabular-nums; }
.pill b, .pill span { font-weight: 700; }

/* --- headings in the world's voice --- */
.banner-info h2, .name { background: linear-gradient(180deg, #fff3df 0%, #f2d6a8 55%, #c99a5e 100%); -webkit-background-clip: text; background-clip: text;
  color: transparent; text-shadow: none; filter: drop-shadow(0 2px 10px #000) drop-shadow(0 0 22px #ff7a2f40); }

/* --- battle: readable, punchy numbers and framed health bars --- */
.num { -webkit-text-stroke: 3px #120604; paint-order: stroke fill; text-shadow: 0 0 14px #000; animation: num-pop .32s cubic-bezier(.2, 1.6, .4, 1); }
.num { font-size: 14px; -webkit-text-stroke-width: 2.5px; }
.num.dot { font-size: 11px; opacity: .9; }
.num.crit { font-size: 19px; color: #ffe066; text-shadow: 0 0 14px #ff9a1a, 0 0 4px #000; }
.num.strong { font-size: 16px; }
.num.heal { color: #7dffae; }
@keyframes num-pop { 0% { scale: .4; } 60% { scale: 1.18; } 100% { scale: 1; } }
.hpbar { height: 8px; border: 1px solid #000; border-radius: 3px; background: linear-gradient(#1a0c08, #2a140e);
  box-shadow: 0 0 0 1px #8a6a3e66, 0 2px 6px #000c; }
.hpbar .fill { box-shadow: inset 0 1px 0 #ffffff55; }
.hpbar.boss { height: 12px; box-shadow: 0 0 0 1px #d8b27a99, 0 0 18px -4px #ff2a10; }

/* --- accessibility floor --- */
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  dialog[open], dialog[open]::backdrop, .num, .callout { animation: none !important; }
  button { transition: none; }
}

/* --- title: the one orchestrated moment: the ember sigil ignites, then rests --- */
.title { background: var(--grain), radial-gradient(ellipse at 50% 38%, #3a180b 0%, #160b07 45%, var(--ash) 75%); }
.emblem { width: 168px; height: 168px; border-radius: 0; background: none; box-shadow: none; filter: drop-shadow(0 0 30px #ff6a2a88); }
.emblem svg { width: 100%; height: 100%; display: block; overflow: visible; }
.emblem .ring { transform-origin: 100px 100px; animation: sigil-turn 1.8s cubic-bezier(.2, .7, .2, 1) both; }
.emblem circle[fill] { transform-origin: 100px 100px; animation: sigil-ignite 1.4s ease-out both; }
@keyframes sigil-turn { from { transform: rotate(-70deg) scale(.86); opacity: 0; } }
@keyframes sigil-ignite { 0% { transform: scale(.2); opacity: 0; } 55% { transform: scale(1.15); opacity: 1; } 100% { transform: scale(1); } }
.title > button:not(.link), .title-form > button:not(.link), .signin button[type="submit"] { background: var(--molten); color: #2a0c02; font: 800 18px/1 Cinzel, serif; letter-spacing: 1px;
  box-shadow: inset 0 1px 0 #ffe7c4, inset 0 -2px 0 #6a1e04, 0 0 0 1px #2a0e04, 0 10px 26px -8px #ff6a2acc; }
.dob input, .signin input { background: linear-gradient(180deg, #0c0705, #1a110d); border: 1px solid #5c4026; box-shadow: inset 0 2px 6px #000c, 0 1px 0 #ffdcae14; }
.dob input:focus, .signin input:focus { border-color: var(--brass-hi); outline: none; box-shadow: inset 0 2px 6px #000c, 0 0 0 3px #f0c87833; }
@media (prefers-reduced-motion: reduce) { .emblem .ring, .emblem circle[fill] { animation: none; } }

/* --- card emblems until portraits exist --- */
.card .mono { position: absolute; top: 14%; left: 0; right: 0; text-align: center; font: 800 clamp(30px, 11cqw, 52px)/1 Cinzel, serif;
  color: var(--mono, #ffb06a); text-shadow: 0 0 18px var(--mono, #ff7a2f), 0 2px 0 #000; opacity: .9; pointer-events: none; }
.card .mono::after { content: ''; position: absolute; left: 50%; top: 50%; width: 1.7em; height: 1.7em; translate: -50% -50%; border-radius: 50%;
  border: 1px solid var(--mono, #ffb06a); opacity: .35; box-shadow: 0 0 20px -4px var(--mono, #ff7a2f); }
.realm-draksaal { --mono: #8fd0ff; } .realm-myrrhak { --mono: #ff6a34; } .realm-ithuren { --mono: #4fefd2; } .realm-zarovin { --mono: #c28cff; }
.realm-light { --mono: #ffd98a; } .realm-dark { --mono: #a876ff; }
.card { background: var(--grain), linear-gradient(180deg, #1e130e 0%, #110a07 60%, #0c0705 100%); }
/* sound (0.31.0): speaker button under Daily, sliders on forged rails */
.sound-btn { position: absolute; top: calc(max(12px, env(safe-area-inset-top)) + 130px); right: 16px; width: 30px; min-width: 0; height: 30px; padding: 0; border-radius: 50%;
  background: #1a0e0acc; border: 1px solid #5a2a14; color: #ffd27a; z-index: 2; display: grid; place-items: center; }
.sound-btn svg { width: 16px; height: 16px; fill: currentColor; stroke: currentColor; stroke-width: 0; }
.sound-btn svg .w { fill: none; stroke-width: 1.8; stroke-linecap: round; }
.sound-btn.muted svg .w { opacity: 0.15; }
#app:not([data-mode="banner"]):not([data-mode="campaign"]):not([data-mode="pvp"]):not([data-mode="clan"]) .sound-btn { display: none; }
.sound-dlg { max-width: 380px; }
.sound-dlg .slider { display: grid; grid-template-columns: 5.5em 1fr 3em; align-items: center; gap: 12px; margin: 14px 0; font: 700 14px/1 Cinzel, serif; color: #f0d9b8; }
.sound-dlg output { text-align: right; font: 600 13px/1 system-ui, sans-serif; color: #c9a77a; }
.sound-dlg input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: 3px; background: linear-gradient(#0a0605, #2a1810); border: 1px solid #5a3a20; }
.sound-dlg input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #ffd9a0, #ff7a2a 45%, #8a2a08); border: 1px solid #ffcf8a; box-shadow: 0 0 10px #ff6a2a88; }
.sound-dlg input[type=range]::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #ffd9a0, #ff7a2a 45%, #8a2a08); border: 1px solid #ffcf8a; }
/* first-time guide (0.32.0, js/tutorial.js): a spotlight ring + a forged bubble; never blocks taps */
.coach { position: fixed; inset: 0; width: auto; height: auto; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: none; overflow: visible; pointer-events: none; z-index: 50; }
.coach[hidden] { display: none; }
.coach::backdrop { display: none; }
.coach-hole { position: fixed; border-radius: 14px; box-shadow: 0 0 0 9999px #05020180, 0 0 0 2px #ffcf8a, 0 0 22px 4px #ff7a2a99; transition: left .25s, top .25s, width .25s, height .25s; animation: coach-pulse 1.6s ease-in-out infinite; }
@keyframes coach-pulse { 50% { box-shadow: 0 0 0 9999px #05020180, 0 0 0 3px #ffe0a8, 0 0 34px 8px #ff7a2acc; } }
.coach-bubble { position: fixed; pointer-events: auto; padding: 12px 14px 10px; border-radius: 12px; color: #f6e2c4; font: 600 15px/1.35 system-ui, sans-serif;
  background: var(--plate, linear-gradient(#2a1a12, #140c08)); border: 1px solid #c79a5a; box-shadow: 0 10px 30px #000c; }
.coach-bubble::before { content: ''; position: absolute; left: var(--ax, 50%); bottom: -7px; width: 12px; height: 12px; margin-left: -6px; transform: rotate(45deg); background: #1a100b; border-right: 1px solid #c79a5a; border-bottom: 1px solid #c79a5a; }
.coach-bubble.up::before { bottom: auto; top: -7px; transform: rotate(225deg); }
.coach-bubble p { margin: 0 0 8px; }
.coach-act { display: flex; gap: 8px; justify-content: flex-end; }
.coach-act button { width: auto; min-width: 0; padding: 6px 12px; font-size: 13px; }
.coach-act .coach-skip { background: none; border: 0; color: #b89a78; text-decoration: underline; padding: 6px 4px; }
@media (prefers-reduced-motion: reduce) { .coach-hole { animation: none; transition: none; } }
/* squad picker: one-tap recommended squad (0.34.0) */
.link-btn { display: block; width: auto; min-width: 0; margin: 0 auto 10px; padding: 4px 8px; background: none; border: 0; box-shadow: none; color: #ffcf8a; font: 600 14px/1.2 system-ui, sans-serif; text-decoration: underline; text-underline-offset: 3px; }
/* squad picker: heroes scroll, power line + Recommended + Fight stay in view (0.34.0) */
#squad[open] { display: flex; flex-direction: column; overflow: hidden; }
#squad #squad-grid { flex: 1 1 auto; min-height: 120px; overflow-y: auto; margin-bottom: 8px; padding: 2px; }
#squad #squad-power, #squad .pull-row, #squad #squad-auto { flex: none; }
/* instant wins in the squad picker (0.35.0) */
#squad .sweep-row { flex: none; display: flex; gap: 10px; margin: 0 0 8px; }
#squad .sweep-row button { flex: 1; min-width: 0; padding: 8px 6px; font-size: 14px; display: flex; flex-direction: column; align-items: center; gap: 2px; }
#squad .sweep-row small { font-size: 12px; color: #c9a77a; }
#squad #sweep-note { flex: none; margin: 0 0 10px; text-align: center; }
#squad #squad-grid:focus { outline: none; }
/* Lightflecks (0.36.0) */
.motes-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: -4px 0 12px; color: #f0d9b8; font: 600 14px/1.2 system-ui, sans-serif; }
.motes-bar b { color: #ffe3a0; }
.motes-bar button { width: auto; min-width: 0; padding: 6px 14px; font-size: 13px; }
.motes-dlg { max-width: 440px; }
.motes-list { display: grid; gap: 8px; max-height: 52vh; overflow-y: auto; margin-bottom: 8px; }
.mrow { display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: #0d0806aa; border: 1px solid #3a2416; }
.mrow .mono { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--mono, #ffb06a); font: 800 20px/1 Cinzel, serif; color: var(--mono, #ffb06a); text-shadow: 0 0 12px var(--mono, #ff7a2f); }
.mrow b { display: block; font: 700 15px/1.2 Cinzel, serif; color: #f6e2c4; }
.mrow span { font-size: 12px; color: #b89a78; }
.mrow button { width: auto; min-width: 84px; padding: 8px 10px; font-size: 14px; }
.hero-spare { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 6px 0 10px; padding: 8px 10px; border-radius: 10px; background: #1c120c; border: 1px dashed #6a4a2a; font-size: 13px; color: #d9bf9a; }
.hero-spare button { width: auto; min-width: 0; padding: 6px 10px; font-size: 13px; white-space: nowrap; }
.mrow .stars { letter-spacing: 0; font-size: 11px; color: #ffcf6a; }
.motes-list:focus { outline: none; }
#motes-intro { margin: -4px 0 12px; }
.hero-spare { flex-wrap: wrap; }
.hero-spare span { flex: 1 1 160px; }
/* limited-time events (0.37.0) */
.event-card { display: grid; gap: 2px; width: 100%; margin: 4px 0 10px; padding: 12px 14px; text-align: left; border-radius: 12px; border: 1px solid var(--mono, #c79a5a);
  background: radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--mono, #ff7a2a) 28%, transparent), transparent 60%), var(--grain), var(--plate, #1a100b);
  box-shadow: 0 0 22px -8px var(--mono, #ff7a2a), inset 0 1px 0 #ffffff14; color: #f6e2c4; }
.event-card .eyebrow { font: 700 11px/1 system-ui, sans-serif; letter-spacing: .14em; text-transform: uppercase; color: var(--mono, #ffcf8a); }
.event-card b { font: 800 19px/1.15 Cinzel, serif; }
.event-card span:last-child { font-size: 13px; color: #d9bf9a; }
.event-dlg { max-width: 460px; }
.event-dlg[open] { display: flex; flex-direction: column; overflow: hidden; }
.event-dlg .eyebrow { margin: 0; color: var(--mono, #ffcf8a); }
.event-dlg h2 { margin: 2px 0 2px; }
.event-dlg #event-meta { margin: 0 0 10px; }
.ev-tabs { display: flex; gap: 6px; margin-bottom: 10px; flex: none; }
.ev-tabs button { flex: 1; min-width: 0; padding: 8px; font-size: 14px; background: #0d0806; border: 1px solid #3a2416; color: #c9a77a; }
.ev-tabs button.on { background: color-mix(in srgb, var(--mono, #ff7a2a) 22%, #140c08); border-color: var(--mono, #c79a5a); color: #fff1dc; }
.event-body { flex: 1 1 auto; overflow-y: auto; display: grid; gap: 8px; align-content: start; min-height: 120px; }
.event-body:focus { outline: none; }
.event-dlg .pull-row { flex: none; margin-top: 8px; }
/* graphics setting (0.40.0) */
.gfx-row { display: grid; grid-template-columns: 5.5em 1fr; align-items: center; gap: 12px; margin: 16px 0 6px; font: 700 14px/1 Cinzel, serif; color: #f0d9b8; }
.seg { display: flex; border: 1px solid #5a3a20; border-radius: 10px; overflow: hidden; }
.seg button { flex: 1; min-width: 0; padding: 8px 4px; border: 0; border-radius: 0; background: #0d0806; color: #c9a77a; font: 600 13px/1 system-ui, sans-serif; box-shadow: none; }
.seg button + button { border-left: 1px solid #3a2416; }
.seg button.on { background: linear-gradient(#ff9a4a, #c2410c); color: #1a0802; }
#gfx-note { margin: 4px 0 10px; min-height: 2.6em; }
#gfx-reload { margin-bottom: 10px; }
/* Ossareth's Deep (0.41.0): dark violet, the colour of the god who ate the sun */
.deep-card, .deep-dlg { --mono: #a876ff; }
.deep-next { display: grid; gap: 6px; padding: 14px; border-radius: 12px; border: 1px solid #6a4ab0; background: radial-gradient(120% 120% at 50% 0%, #2a1a48, #0f0a16 70%); }
.deep-next.ruler { border-color: #b03a2a; background: radial-gradient(120% 120% at 50% 0%, #3a1410, #12080a 70%); }
.deep-next b { font: 800 22px/1.1 Cinzel, serif; color: #f2e3ff; }
.deep-next .eyebrow { color: #c9a8ff; margin: 0; }
.deep-h { margin: 12px 0 4px; font: 700 14px/1 Cinzel, serif; color: #c9a8ff; }
.board-row { display: grid; grid-template-columns: 3em 1fr auto; gap: 8px; padding: 8px 10px; border-radius: 8px; background: #0d0806aa; border: 1px solid #2a1c14; }
.board-row.me { border-color: #a876ff; background: #1a1028; }
/* Trials of Thaldrevan seasons (0.42.0) */
.pvp-season { display: grid; gap: 8px; margin: 10px 0; }
.season-now { display: grid; gap: 4px; padding: 10px 12px; border-radius: 12px; border: 1px solid #5a3a20; background: #120b08cc; font-size: 13px; color: #e8d2b2; }
.season-claim { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 12px; border: 1px solid #c79a5a; background: linear-gradient(#2a1a10, #160d08); font-size: 13px; }
.season-claim button { width: auto; min-width: 0; padding: 8px 14px; }
.tier-badge { justify-self: start; padding: 4px 12px; border-radius: 99px; font: 800 13px/1 Cinzel, serif; letter-spacing: .04em; border: 1px solid currentColor; }
.tier-iron { color: #a8a29a; } .tier-bronze { color: #d08a4a; } .tier-silver { color: #d8dde6; } .tier-gold { color: #ffd166; }
.tier-obsidian { color: #b58cff; } .tier-radiant { color: #fff3c4; text-shadow: 0 0 10px #ffd27a; }
/* long screen titles stay clear of the Daily / sound buttons on the right */
#pvp-title { align-self: stretch; text-align: left; padding-right: 96px; font-size: clamp(18px, 6cqw, 24px); letter-spacing: 1px; line-height: 1.15; }
.pvp-season { width: 100%; max-width: 520px; }
/* goals + collection (0.45.0) */
.goals-dlg { --mono: #ffcf6a; }
.links .link.dot { position: relative; }
.links .link.dot::after { content: ''; position: absolute; top: -2px; right: -8px; width: 8px; height: 8px; border-radius: 50%; background: #ff5a2d; box-shadow: 0 0 8px #ff5a2d; }
.goal .gbar { display: block; height: 4px; margin-top: 6px; border-radius: 2px; background: #2a1a10; overflow: hidden; }
.goal .gbar i { display: block; height: 100%; background: linear-gradient(90deg, #c2410c, #ffb04a); }
.coll h3 { margin: 12px 0 6px; font: 700 15px/1 Cinzel, serif; color: var(--mono, #f0d9b8); }
.coll-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.coll-hero { display: grid; justify-items: center; gap: 4px; padding: 10px 4px 8px; border-radius: 10px; border: 1px solid #3a2416; background: #0d0806aa; font-size: 12px; text-align: center; }
.coll-hero .mono { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--mono); font: 800 20px/1 Cinzel, serif; color: var(--mono); text-shadow: 0 0 12px var(--mono); }
.coll-hero small { color: #ffcf6a; font-size: 10px; }
.coll-hero.missing { opacity: .45; filter: grayscale(.8); }
.coll-hero.missing .mono { text-shadow: none; }

/* 0.46.1 QA: the replays line sits between the Daily/sound buttons */
#replays { padding: 0 56px; text-align: center; }
#clan-intro { padding-right: 48px; }
.pull-row > button.wide { flex: 2; }
.gear-dlg #gear-close { margin-top: 12px; }
/* world map (0.47.0): full-screen 3D map of Vaelgrim; markers are HTML buttons that follow their places */
.map-card { --mono: #d9b37a; }
dialog.worldmap { width: min(560px, 100vw); height: min(100dvh, 980px); max-width: 100vw; max-height: 100dvh; padding: 0; overflow: hidden; border-radius: 0; }
@media (min-width: 600px) { dialog.worldmap { border-radius: 14px; height: min(92dvh, 980px); } }
.wm-stage { position: absolute; inset: 0; background: #05030a; }
.wm-canvas { width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; }
.wm-labels { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.wm-mark { position: absolute; left: 0; top: 0; pointer-events: auto; display: flex; align-items: center; gap: 5px; min-width: 0; min-height: 0; padding: 5px 9px;
  border-radius: 999px; font: 600 12px/1.1 system-ui, sans-serif; color: #f3e6d0; background: #0d0806d9; border: 1px solid var(--mono, #c79a5a);
  white-space: nowrap; box-shadow: 0 0 12px -3px var(--mono, #c79a5a); transition: opacity .2s; }
.wm-mark i { font-style: normal; color: var(--mono, #ffcf8a); }
.wm-mark.locked { opacity: .7; filter: grayscale(.7); }
.wm-mark.current { animation: wmPulse 1.6s ease-in-out infinite; }
.wm-mark.sel { background: var(--mono, #c79a5a); color: #120a06; } .wm-mark.sel i { color: #120a06; }
.wm-head { position: absolute; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: center; gap: 8px;
  padding: max(12px, env(safe-area-inset-top)) 16px 10px; background: linear-gradient(#000d, #0000); pointer-events: none; }
.wm-head > * { pointer-events: auto; } .wm-head h2 { margin: 0; }
.wm-hint { position: absolute; top: calc(max(12px, env(safe-area-inset-top)) + 44px); left: 16px; right: 16px; margin: 0; font-size: 12px; color: #cbb89a; text-align: center; pointer-events: none; }
.wm-info { position: absolute; left: 12px; right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); padding: 14px 16px; border-radius: 14px;
  background: var(--grain), var(--plate); border: 1px solid var(--mono, var(--brass)); }
.wm-info .eyebrow { margin: 0; color: var(--mono, #ffcf8a); } .wm-info h3 { margin: 4px 0; font: 800 19px/1.15 Cinzel, serif; } .wm-info p { margin: 0; }
.wm-info button { width: 100%; margin-top: 10px; }
@keyframes wmPulse { 50% { box-shadow: 0 0 20px 2px var(--mono, #c79a5a); } }
@media (prefers-reduced-motion: reduce) { .wm-mark.current { animation: none; } }
.wm-head button { width: auto; flex: 0 0 auto; min-width: 0; padding: 8px 16px; }

/* 0.49.5 ultimate name feed: small, under the top bar, out of the fight's way (yours left, enemy right) */
.ultfeed { position: absolute; top: calc(env(safe-area-inset-top) + 58px); display: flex; flex-direction: column; gap: 4px; z-index: 4; pointer-events: none; max-width: 46%; }
.ultfeed.side0 { left: 8px; align-items: flex-start; } .ultfeed.side1 { right: 8px; align-items: flex-end; }
.ultname { font: 700 13px/1 Cinzel, serif; letter-spacing: 1px; padding: 5px 9px; border-radius: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
  background: linear-gradient(90deg, #1a0c08e6, #1a0c0899); border-left: 2px solid #ffb04a; color: #ffd9a8; text-shadow: 0 1px 2px #000; animation: ultin .22s ease-out; transition: opacity .3s, transform .3s; }
.ultfeed.side1 .ultname { background: linear-gradient(270deg, #1e0808e6, #1e080899); border-left: 0; border-right: 2px solid #ff4a3a; color: #ffb0a8; }
.ultname.out { opacity: 0; transform: translateY(-4px); }
@keyframes ultin { from { opacity: 0; transform: translateX(-10px); } to { opacity: 1; transform: none; } }
.ultfeed.side1 .ultname { animation-name: ultin-r; } @keyframes ultin-r { from { opacity: 0; transform: translateX(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .ultname { animation: none; transition: none; } }

/* 0.52.3 loading cover: up until every piece of the scene has arrived and its shaders are compiled, then one fade */
.veil { position: absolute; inset: 0; z-index: 40; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  background: radial-gradient(circle at 50% 44%, #2a1209 0%, #0d0706 55%, #050303 100%); opacity: 1; transition: opacity 0.42s ease; }
.veil.out { opacity: 0; pointer-events: none; }
.veil[hidden] { display: none; }
.veil-sigil { width: 56px; height: 56px; border-radius: 50%; position: relative;
  background: conic-gradient(from 0deg, #ff7a3000 0deg, #ff7a30 300deg, #ffd27a 350deg, #ff7a3000 360deg);
  -webkit-mask: radial-gradient(circle, transparent 23px, #000 24px); mask: radial-gradient(circle, transparent 23px, #000 24px);
  animation: veil-spin 1.1s linear infinite; filter: drop-shadow(0 0 10px #ff5a1a88); }
.veil-text { margin: 0; color: #d9c2a8; font: 600 13px/1 Cinzel, serif; letter-spacing: 3px; text-transform: none; }
@keyframes veil-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .veil-sigil { animation: none; } .veil { transition: none; } }
/* 0.58.6: the world map's loading cover sits under its title bar, so Close works while it loads */
#wm-veil { z-index: 1; } .wm-head { z-index: 2; }
/* story cards on the realm painting + the Story book (0.59.0) */
.story.painted { background: linear-gradient(180deg, #0a060580 0%, #0a0605b8 40%, #0a0605f0 75%), var(--paint) center 30% / cover no-repeat, var(--plate); }
.story.painted #story-body { white-space: pre-line; text-shadow: 0 1px 2px #000; }
.story.painted h2, .story.painted .eyebrow { text-shadow: 0 2px 8px #000; }
.lore-card { --mono: #e8c48a; }
.lore-dlg { --mono: #e8c48a; }
.lore-dlg .ev-tabs button { padding: 8px 2px; font-size: 13px; }
.lore-page { position: relative; padding: 16px 16px 12px; border-radius: 12px; border: 1px solid color-mix(in srgb, var(--mono) 55%, #2a1c14);
  background: linear-gradient(180deg, #0a060599, #0a0605d9 55%, #0a0605f2), var(--paint) center 30% / cover no-repeat, #120a08; }
.lore-page .eyebrow { margin: 0; font: 700 11px/1 system-ui, sans-serif; letter-spacing: .14em; text-transform: uppercase; color: var(--mono); }
.lore-page h3 { margin: 4px 0 8px; font: 800 21px/1.15 Cinzel, serif; color: #fff1dc; text-shadow: 0 2px 8px #000; }
.lore-page p { margin: 0 0 8px; font-size: 14.5px; line-height: 1.55; color: #ecd9c6; text-shadow: 0 1px 2px #000; }
.lore-page .lore-ruler { font-style: italic; color: #f6dcc4; }
.lore-page .lore-ruler b { font-style: normal; color: var(--mono); }
.lore-page .lore-meta { font-size: 13px; color: var(--mono); }
.lore-page .lore-lock { font-size: 13px; color: #b89a7a; }
.lore-h { margin: 8px 0 0; font: 700 14px/1 Cinzel, serif; color: var(--mono); }
.lore-hero { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; padding: 10px; border-radius: 10px; background: #0d0806aa; border: 1px solid #2a1c14; }
.lore-hero b { font: 700 15px/1.2 Cinzel, serif; color: #fff1dc; }
.lore-hero p { margin: 4px 0 0; font-size: 13.5px; line-height: 1.5; font-style: italic; color: #d9bf9a; }
.lore-hero.missing { opacity: .55; }

/* 0.59.41 loading screens as storyboard panels (js/loadscreen.js): the realm's painting drifting behind, one card
   (a hint, a line of lore or a hero speaking) at the bottom, changing every few seconds */
.veil > * { position: relative; z-index: 1; }
.veil > .veil-art { position: absolute; inset: 0; z-index: 0; background: center / cover no-repeat; opacity: .5; }
.veil > .veil-art::after { content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, #050303d9 0%, #05030333 28%, #05030340 58%, #050303f2 88%); }
.veil-art.drift { animation: veil-drift 16s ease-out forwards; }
@keyframes veil-drift { from { transform: scale(1.04); } to { transform: scale(1.15) translateY(-1.5%); } }
.veil.story .veil-sigil { margin-top: -14%; }
.veil > .veil-card { position: absolute; left: 24px; right: 24px; bottom: 9%; margin: 0 auto; max-width: 30em; text-align: center; }
.veil-card::before { content: ''; display: block; width: 64px; height: 1px; margin: 0 auto 14px; background: linear-gradient(90deg, transparent, #f0c878, transparent); }
.veil-kicker { color: #f0c878; font: 600 13px/1.2 Cinzel, serif; letter-spacing: 1.5px; }
.veil-body { margin: 10px 0 0; color: #efe2d0; font: 400 15px/1.55 Inter, sans-serif; text-wrap: balance; }
.veil-card[data-kind="lore"] .veil-body { font: 600 16px/1.55 Cinzel, serif; color: #f3e4cc; }
.veil-card[data-kind="voice"] .veil-body { font-style: italic; font-size: 16px; }
.veil-card.in { animation: card-in .7s ease-out both; }
@keyframes card-in { from { opacity: 0; transform: translateY(10px); } }
/* startup screen: the dead sun drifting, the world's name, one line; tap to skip, once per browser session */
.boot { position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  background: #050303; transition: opacity .6s ease; cursor: pointer; }
.boot.out { opacity: 0; pointer-events: none; }
.booted .boot { display: none; }
.boot > * { position: relative; }
.boot-art { position: absolute; inset: 0; background: url("../assets/env/backdrop/dark.jpg") center / cover no-repeat; animation: boot-art 3.2s ease-out both; }
.boot-art::after { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 45%, #05030340 0%, #050303c0 60%, #050303 100%); }
@keyframes boot-art { 0% { opacity: 0; transform: scale(1.14); } 45% { opacity: .62; } 100% { opacity: .55; transform: scale(1.03); } }
.boot-sigil { animation: veil-spin 1.1s linear infinite, boot-fade .8s ease-out both; }
.boot-name { color: #f3dcb8; font: 800 clamp(40px, 11vw, 76px)/1 Cinzel, serif; letter-spacing: .14em; padding-left: .14em;
  text-shadow: 0 0 28px #ff6a2a99, 0 2px 0 #2a0c02; animation: boot-name 2.2s cubic-bezier(.2, .7, .2, 1) .25s both; }
@keyframes boot-name { from { opacity: 0; letter-spacing: .42em; filter: blur(8px); } }
.boot-line { margin: 0; color: #d9c2a8; font: 400 15px/1.5 Inter, sans-serif; padding: 0 24px; text-align: center; animation: boot-fade 1s ease-out 1.1s both; }
@keyframes boot-fade { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .veil-art.drift, .veil-card.in, .boot-art, .boot-name, .boot-line, .boot-sigil { animation: none; } }

/* 0.59.42 game title (Spencer, Nov 27): Ossareth: Devoured Sun. The title and subtitle stay in English in
   every language (like hero and realm names); only the tagline is translated. */
.boot-name { margin: 0; }
.boot-sub { position: relative; margin: -6px 0 0; color: #e8b678; font: 600 clamp(13px, 3.6vw, 18px)/1.2 Cinzel, serif; letter-spacing: .18em;
  text-align: center; padding: 0 24px; animation: boot-fade 1s ease-out .9s both; }
.boot-line { animation-delay: 1.5s; letter-spacing: .04em; }
.wordmark { margin: -6px 0 4px; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.wm-name { color: #f3dcb8; font: 800 clamp(34px, 12cqw, 52px)/1 Cinzel, serif; letter-spacing: .12em; padding-left: .12em;
  text-shadow: 0 0 22px #ff6a2a77, 0 2px 0 #2a0c02; }
.wm-sub { color: #e8b678; font: 600 clamp(11px, 3.4cqw, 15px)/1.2 Cinzel, serif; letter-spacing: .16em; }
@media (prefers-reduced-motion: reduce) { .boot-sub { animation: none; } }

/* 0.59.44 3D logo (Spencer picked option A, Nov 27): assets/ui/logo.webp, rendered with three.js (scratchpad l3d/logo.html).
   It replaces the text wordmark and the ember sigil on the title screen, and the name on the startup screen. */
.logo-img { display: block; width: 100%; height: auto; }
.boot-name { width: min(92vw, 560px); letter-spacing: 0; padding: 0; text-shadow: none; filter: drop-shadow(0 6px 24px #000c); }
@keyframes boot-name { from { opacity: 0; transform: scale(1.06); filter: blur(8px); } }
.wordmark { width: min(94cqw, 420px); margin: 0 0 6px; filter: drop-shadow(0 6px 18px #000b); }
.title .emblem { display: none; }

/* 0.59.47 title screen polish (Spencer, Nov 27): the dead-sun painting behind the logo, rising embers, the tagline,
   and the sign-up form as one column at the bottom (field and button the same width). */
@media not all and (min-aspect-ratio: 3/4) { .title { position: relative; overflow: hidden; } }
.title { isolation: isolate; justify-content: flex-start; gap: 0;
  padding: max(20px, env(safe-area-inset-top)) 24px max(36px, calc(env(safe-area-inset-bottom) + 24px)); background: var(--ash); }
.title > * { position: relative; z-index: 1; }
.title > .title-art, .title > .title-embers { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; pointer-events: none; }
.title-art { background: url("../assets/env/backdrop/dark.jpg") 50% 0 / cover no-repeat; animation: title-drift 38s ease-in-out infinite alternate; transform-origin: 50% 30%; }
.title-art::after { content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse 90% 55% at 50% 36%, #0503030d 0%, #05030366 60%, transparent 100%),
    linear-gradient(180deg, #05030359 0%, #05030326 22%, #0503038c 46%, #050303e6 64%, #050303 82%); }
@keyframes title-drift { from { transform: scale(1.08) translateY(-1%); } to { transform: scale(1.0) translateY(0); } }
.title .wordmark { width: min(92cqw, 440px); margin: auto 0 0; filter: drop-shadow(0 10px 22px #000) drop-shadow(0 0 26px #ff4a1033);
  animation: title-in 1.4s cubic-bezier(.2, .7, .2, 1) .1s both; }
.title-tag { margin: 6px 0 0; color: #d9c2a8; font: 600 clamp(12px, 3.5cqw, 15px)/1.3 Cinzel, serif; letter-spacing: .2em;
  padding-left: .2em; text-align: center; text-shadow: 0 2px 8px #000; animation: title-fade 1.2s ease-out .7s both; }
.title-form { width: min(84cqw, 320px); margin-top: auto; display: flex; flex-direction: column; align-items: stretch; gap: 14px;
  animation: title-fade 1s ease-out .9s both; }
.title-form > .dob { gap: 8px; color: #c9b39a; font-size: 13px; letter-spacing: .04em; }
.title-form .dob input { width: 100%; min-width: 0; box-sizing: border-box; height: 54px; padding: 0 18px; border-radius: 12px; font-size: 17px; }
.title-form > button:not(.link) { width: 100%; min-width: 0; height: 58px; padding: 0 20px; border-radius: 14px; font-size: 18px; letter-spacing: 2px; }
.title-form > #status { margin: -4px 0 0; min-height: 0; text-align: center; }
.title-form > #status:empty { display: none; }
.title-form > button.link { align-self: center; margin-top: 4px; font-size: 15px; color: #e9dcc6; }
.title-form > .signin { width: 100%; }
.title > .legal { margin-top: 22px; max-width: min(84cqw, 340px); line-height: 1.5; color: #a8957f; animation: title-fade 1s ease-out 1.1s both; }
@keyframes title-in { from { opacity: 0; transform: scale(1.06); filter: blur(6px); } }
@keyframes title-fade { from { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) { .title-art, .title .wordmark, .title-tag, .title-form, .title > .legal { animation: none; } }

/* 0.59.48 summon screen polish (Spencer, Nov 27): small name button, a dark fade behind the banner panel, a full-width
   points bar, and the chances line wrapping between items (tap it for the full odds sheet). */
.hud button.profile { height: 32px; max-width: 30cqw; padding: 0 12px; font: 600 12px/1 Inter, system-ui, sans-serif; letter-spacing: .02em;
  text-transform: none; font-variant: normal; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.banner-ui { background: linear-gradient(180deg, #05030300 0%, #05030370 18%, #050303c8 46%, #050303ee 100%); padding-top: 18px; }
.pick-row { flex-direction: column; gap: 6px; width: min(80cqw, 300px); max-width: none; margin: 8px auto 2px; }
.pick-row .pick-bar { flex: none; width: 100%; height: 8px; background: #24140c; border-color: #5a3a24; box-shadow: inset 0 1px 3px #000a; }
.pick-row #pick-text { order: -1; text-align: center; }
.pick-row { gap: 5px; }
.rates-line { cursor: pointer; max-width: min(92cqw, 380px); }
.rates-line span { white-space: nowrap; }
.rates-line .rl-k { color: #b8a58a; }

/* 0.59.49 battle screen polish (Spencer, Nov 27): the four big cards become a 2x2 grid of painted tiles so the stages
   show without scrolling; a darker fade under the title; energy as a slim bar (refill only when not full); locked
   stages show their rewards dimmed; boss rows stand out. */
.campaign { background: linear-gradient(#070405b8, #070405f2 16%); }
.camp-tiles { width: 100%; max-width: 520px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 2px 0 10px; }
.camp-tiles > .event-card { margin: 0; width: auto; min-width: 0; box-sizing: border-box; min-height: 86px; padding: 10px 12px; align-content: end; gap: 3px; overflow: hidden; position: relative; isolation: isolate;
  background: var(--tile, none) center / cover no-repeat, #120a08; }
.camp-tiles > .event-card::before { content: ''; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, #0a060533 0%, #0a0605b0 48%, #0a0605f2 100%); }
.camp-tiles > .event-card[hidden] { display: none; }
.camp-tiles .eyebrow { font-size: 10px; letter-spacing: .12em; text-shadow: 0 1px 4px #000; }
.camp-tiles b { font: 800 15px/1.15 Cinzel, serif; text-shadow: 0 2px 6px #000; }
.camp-tiles > .event-card > span:last-child:not(.eyebrow) { font-size: 11px; line-height: 1.3; color: #e2ccad; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.camp-tiles .map-card { --tile: url("../assets/ui/map-tile.webp"); }
.camp-tiles .lore-card { --tile: url("../assets/env/backdrop/light.jpg"); }
.camp-tiles .deep-card { --tile: url("../assets/env/backdrop/dark.jpg"); }
.camp-tiles .event-card.realm-draksaal { --tile: url("../assets/env/backdrop/draksaal.jpg"); }
.camp-tiles .event-card.realm-myrrhak { --tile: url("../assets/env/backdrop/myrrhak.jpg"); }
.camp-tiles .event-card.realm-ithuren { --tile: url("../assets/env/backdrop/ithuren.jpg"); }
.camp-tiles .event-card.realm-zarovin { --tile: url("../assets/env/backdrop/zarovin.jpg"); }
.camp-tiles .event-card.realm-dark { --tile: url("../assets/env/backdrop/dark.jpg"); }
.camp-tiles .event-card.realm-light { --tile: url("../assets/env/backdrop/light.jpg"); }
.energy { position: relative; width: min(100%, 520px); justify-content: space-between; margin: 0 0 10px; padding: 0 0 7px; }
.energy::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; border-radius: 99px;
  background: linear-gradient(90deg, #ffb34a, #ff7a2a) 0 0 / var(--en, 100%) 100% no-repeat, #24140c; box-shadow: inset 0 1px 2px #000a; }
.energy button[hidden] { display: none; }
.stage .rw .lk { opacity: .7; font-size: 12px; }
.stage.locked { opacity: 0.55; }
.stage.boss { height: 70px; }
.stage.boss .no { box-shadow: 0 0 0 2px #8a2a18, 0 0 18px -2px #ff3a1a88; }

/* 0.59.50 PvP polish (Spencer, Nov 27): the light realm's painting behind the screen (PvP fights in Thaldrevan); one
   rating card; the page scrolls as a whole (no inner list box clipping cards) with the buttons floating at the bottom;
   defense as hero chips; opponents carry a difficulty tag and the rating at stake. */
#app[data-mode="pvp"] { background: #070405 url("../assets/env/backdrop/light.jpg") 50% 0 / auto 52% no-repeat; }
#app[data-mode="pvp"] #scene { visibility: hidden; }
.pvp { background: linear-gradient(#0704055c, #070405e8 20%, #070405f5 46%); }
#pvp-title { font-size: clamp(17px, 5.4cqw, 22px); letter-spacing: .5px; white-space: nowrap; margin: 10px 0 12px; }
.pvp-body { flex: 1; min-height: 0; width: 100%; max-width: 520px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px;
  padding-bottom: 64px; scrollbar-width: none; overscroll-behavior: contain; }
.pvp-body::-webkit-scrollbar { display: none; }
.pvp-body .season-claim { margin: 0; }
.pvp-card { display: grid; gap: 8px; align-items: stretch; justify-content: stretch; padding: 14px 16px 12px; max-width: none; }
.pc-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pc-main { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.pc-rating { font: 800 clamp(34px, 11cqw, 44px)/1 Cinzel, serif; color: #ffc46a; text-shadow: 0 2px 14px #ff7a2a55; }
.pc-bar { height: 6px; border-radius: 99px; background: #24140c; box-shadow: inset 0 1px 2px #000a; overflow: hidden; }
.pc-bar i { display: block; height: 100%; width: var(--p); border-radius: inherit; background: linear-gradient(90deg, #c4561a, #ffb34a); box-shadow: 0 0 8px #ff7a2a88; }
.pc-next { display: flex; justify-content: space-between; gap: 8px; color: #e8d2b2; }
.pc-foot { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; padding-top: 8px; border-top: 1px solid #ffffff12; font-size: 13px; }
.pc-foot > .quiet { margin-left: auto; white-space: nowrap; }
.pips { display: inline-flex; gap: 4px; } .pips i { width: 9px; height: 9px; border-radius: 50%; background: #2c1a10; border: 1px solid #6a4426; }
.pips i.on { background: radial-gradient(circle at 35% 35%, #ffd79a, #ff7a2a); border-color: #ffb46a; box-shadow: 0 0 6px #ff7a2a99; }
.pc-rw { margin: 0; }
.pvp-defense { display: grid; gap: 8px; max-width: none; }
.pvp-dhead { display: flex; align-items: center; justify-content: space-between; }
.pvp-h { font: 700 15px/1 Cinzel, serif; color: #e8b678; }
.pvp-dhead .chip { width: auto; min-width: 0; height: 32px; padding: 0 14px; font-size: 13px; }
.def-row { display: flex; flex-wrap: wrap; gap: 6px; }
.def-hero { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 3px; border-radius: 99px; background: #140b08d9; border: 1px solid #4a2e1c; font-size: 12px; color: #ead8bc; }
.def-hero .mono { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--mono, #ffb06a); font: 800 13px/1 Cinzel, serif; color: var(--mono, #ffb06a); text-shadow: 0 0 8px var(--mono, #ff7a2f); }
.def-hero.r-legendary { border-color: #8a6a2e; }
.def-set { width: 100%; height: 44px; font-size: 15px; }
#pvp-note { margin: 0; }
.rivals { display: flex; flex-direction: column; gap: 8px; }
.rival { align-items: center; padding: 12px; }
.rival .nm { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rival .team i { font-size: 11px; }
.diff { padding: 3px 8px; border-radius: 99px; font: 700 10px/1 Inter, sans-serif; letter-spacing: .02em; border: 1px solid currentColor; }
.diff.easy { color: #8fd38a; } .diff.even { color: #e8c27a; } .diff.hard { color: #ff7a5a; }
.rival .go { flex: none; display: flex; flex-direction: column; align-items: center; gap: 5px; }
.rival .pull { width: 76px; height: 38px; font-size: 13px; }
.stake { font-size: 11px; color: var(--quiet); white-space: nowrap; } .stake .up { color: #8fd38a; } .stake .dn { color: #ff8a6a; }
.rival .report { justify-self: start; align-self: flex-start; background: none; border: 0; padding: 0; min-width: 0; width: auto; height: auto; font-size: 11px; color: #8a7a66; text-decoration: underline; box-shadow: none; }
.pvp .error:empty { display: none; }
.pvp-actions { position: relative; z-index: 1; margin-top: -56px; width: 100%; max-width: 520px; justify-content: center; padding-top: 18px;
  background: linear-gradient(#07040500, #070405f2 45%); }
.pvp-actions button { flex: 1; max-width: 200px; min-width: 0; }

/* 0.59.51 the title screen doubles as the startup screen: html.intro (first visit per browser session) shows only the
   painting, logo and tagline while the art loads, then the form, legal line and version fade in where they already
   sit, so nothing jumps. The separate #boot overlay is gone. */
.title-form, .title > .legal, #version { transition: opacity .8s ease, visibility 0s linear 0s; }
html.intro .title-form, html.intro .title > .legal, html.intro #version { opacity: 0; visibility: hidden; transition: none; }
html.intro .title { cursor: pointer; }

/* 0.59.52 the logo screen is the loading screen for signed-in players too: html.boot-load hides the form and shows a small
   ember spinner + "Loading…" where the form sits; summon.js keeps the title over the game (.cover) until the stage is
   ready, then fades it out (.leaving). */
html.boot-load .title-form, html.boot-load .title > .legal, html.boot-load #version { opacity: 0; visibility: hidden; transition: none; }
.title-load { display: none; position: absolute; left: 0; right: 0; bottom: max(14%, calc(env(safe-area-inset-bottom) + 90px));
  flex-direction: column; align-items: center; gap: 12px; color: #d9c2a8; font: 600 12px/1 Cinzel, serif; letter-spacing: 3px; }
html.boot-load .title-load { display: flex; animation: title-fade .6s ease-out both; }
.title-load .veil-sigil { width: 34px; height: 34px; -webkit-mask: radial-gradient(circle, transparent 14px, #000 15px); mask: radial-gradient(circle, transparent 14px, #000 15px); }
.title.cover { position: fixed; inset: 0; z-index: 60; }
@media (min-aspect-ratio: 3/4) { .title.cover { margin: 0 auto; } }
.title.leaving { opacity: 0; transition: opacity .6s ease; pointer-events: none; }

/* 0.59.63 hero portraits: full-art cards; round crops where the initial sat in a circle */
.mono.pic img { display: block; width: 100%; height: 100%; object-fit: cover; }
.card .mono.pic { position: absolute; inset: 0; top: 0; border-radius: inherit; overflow: hidden; opacity: 1; font-size: 0; text-shadow: none; z-index: 0; }
.card .mono.pic::after { content: ''; inset: 0; top: auto; left: 0; width: auto; height: 62%; translate: none; border: 0; border-radius: 0; opacity: 1; position: absolute;
  background: linear-gradient(180deg, transparent, #0b0604d9 58%, #080403); box-shadow: none; }
.card .mono.pic img { transform: scale(1.04); transform-origin: 50% 10%; }
.card:has(.mono.pic) > :not(.mono) { position: relative; z-index: 1; text-shadow: 0 1px 2px #000; }
.mrow .mono.pic, .coll-hero .mono.pic, .def-hero .mono.pic, .lore-hero .mono.pic { overflow: hidden; padding: 0; font-size: 0; }
.mrow .mono.pic img, .coll-hero .mono.pic img, .def-hero .mono.pic img, .lore-hero .mono.pic img { transform: scale(2.1); transform-origin: 50% 12%; }
.coll-hero.missing .mono.pic img, .lore-hero.missing .mono.pic img { filter: grayscale(1) brightness(.45); }
.lore-hero .mono { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--mono, #ffb06a); font: 800 22px/1 Cinzel, serif; color: var(--mono, #ffb06a); }
