:root {
  --night: #15111f;
  --night2: #1e1830;
  --dark: #251e3b;
  --dark-line: #3a3157;
  --on-dark: #f3effb;
  --on-dark-2: #bcb2d6;
  --parch: #f4e9d0;
  --parch-2: #e9dab6;
  --parch-line: #dcc9a1;
  --ink: #2a2017;
  --ink-2: #5c4b38;
  --gold: #e8c068;
  --gold-2: #f6dc98;
  --gold-deep: #7d520c;
  --red: #a8322a;
  --red-soft: #f7d9d2;
  --xp: linear-gradient(90deg, #c78a1c, #f4d27a);
  --title: Copperplate, 'Copperplate Gothic Bold', 'Iowan Old Style', Georgia, serif;
  --story: 'Iowan Old Style', ui-serif, Georgia, serif;
  --ui: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', system-ui, sans-serif;
  --top-inset: max(env(safe-area-inset-top), 44px);
  --bottom-inset: env(safe-area-inset-bottom);
  --tabs-h: 58px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { background: var(--night); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: calc(100vh + 1px);
  min-height: calc(100lvh + 1px);
  background:
    radial-gradient(1200px 500px at 50% -120px, #2e2450 0%, rgba(46, 36, 80, 0) 70%),
    var(--night);
  color: var(--on-dark);
  font: 16px/1.4 var(--ui);
  -webkit-tap-highlight-color: transparent;
}
body.sheet-open { overflow: hidden; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-align: inherit; }
button:disabled { opacity: 0.35; cursor: default; }
input, textarea { font: inherit; }
.topstrip { position: fixed; inset: 0 0 auto 0; height: var(--top-inset); background: var(--night); z-index: 30; }
#app { padding: calc(var(--top-inset) + 14px) 14px calc(var(--tabs-h) + var(--bottom-inset) + 28px); max-width: 560px; margin: 0 auto; }

/* ---------- tabs ---------- */
#tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; justify-content: space-around;
  padding: 6px 8px calc(var(--bottom-inset) + 4px);
  background: #110d1a; border-top: 1px solid #2c2442;
  transform: translateZ(0);
}
#tabs[hidden] { display: none; }
#tabs button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 0; color: #9b90b8; font-size: 11px; font-weight: 600; letter-spacing: 0.02em; }
#tabs svg { width: 26px; height: 26px; }
#tabs button[aria-current='page'] { color: var(--gold); }

/* ---------- hero bar ---------- */
.herobar { display: flex; gap: 12px; align-items: center; padding: 10px 14px 12px 8px; border-radius: 20px; background: linear-gradient(160deg, #2c2347, #1c1630); border: 1px solid #3b3160; cursor: pointer; }
.hb-crest { flex: none; display: grid; place-items: center; width: 64px; }
.hb-main { flex: 1; min-width: 0; }
.hb-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.hb-name { font: 600 22px/1.15 var(--story); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hb-lvl { font: 700 15px var(--title); color: var(--gold); letter-spacing: 0.04em; white-space: nowrap; }
.hb-title { font-size: 13px; color: var(--on-dark-2); margin: 1px 0 7px; }
.xpbar { height: 10px; border-radius: 6px; background: #0f0b18; box-shadow: inset 0 0 0 1px #3a3157; overflow: hidden; }
.xpbar i { display: block; height: 100%; border-radius: 6px; background: var(--xp); box-shadow: 0 0 10px #f4d27a66; transition: width 0.6s ease; }
.hb-xp { display: flex; justify-content: space-between; font-size: 12px; color: var(--on-dark-2); margin-top: 5px; font-variant-numeric: tabular-nums; }
.dayline { text-align: center; margin: 12px 0 14px; font: 600 13px var(--title); letter-spacing: 0.08em; color: var(--gold-2); text-transform: uppercase; }
.dayline span { color: #6f6590; }

/* ---------- cards ---------- */
.card { display: block; width: 100%; border-radius: 20px; padding: 16px; margin: 0 0 14px; }
.card.parch { background: var(--parch); color: var(--ink); box-shadow: 0 1px 0 #fff8 inset, 0 8px 24px #0006; }
.card.dark { background: var(--dark); border: 1px solid var(--dark-line); }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; }
h1, h2, h3 { margin: 0; }
h2 { font: 700 19px/1.2 var(--title); letter-spacing: 0.05em; }
.card.parch h2 { color: var(--ink); }
.sub { margin: -2px 0 10px; font-size: 14px; color: var(--ink-2); }
.sub.light, .muted.light { color: var(--on-dark-2); }
.muted { color: var(--ink-2); font-size: 15px; margin: 8px 0 4px; }
.count { font: 700 15px var(--ui); color: var(--gold-deep); }

/* banner cards */
.banner { display: flex; align-items: center; gap: 12px; text-align: left; background: linear-gradient(135deg, #f6dc98, #e2b04f); color: #2e1f05; box-shadow: 0 8px 24px #0006; }
.banner b { display: block; font: 700 17px var(--title); letter-spacing: 0.04em; }
.banner small { display: block; font-size: 14px; margin-top: 2px; color: #4a3409; }
.banner .b-icon { font-size: 30px; }
.banner .chev { margin-left: auto; font-size: 26px; }
.banner.warn { background: linear-gradient(135deg, #f3c9bd, #e39a87); color: #3a0f08; }
.banner.warn small { color: #561a10; }

/* ---------- daily quests ---------- */
.daynav { display: flex; align-items: center; gap: 2px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.daynav button { width: 34px; height: 34px; border-radius: 17px; font-size: 22px; line-height: 1; display: grid; place-items: center; color: var(--ink); }
.daynav span { min-width: 82px; text-align: center; }
.quests { list-style: none; margin: 0; padding: 0; }
.quests li + li { border-top: 1px solid var(--parch-line); }
.qrow { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 8px 2px; }
.qicon { font-size: 24px; width: 30px; text-align: center; flex: none; }
.qname { flex: 1; font-size: 17px; font-weight: 500; }
.qxp { font-size: 12px; font-weight: 700; color: var(--gold-deep); letter-spacing: 0.03em; white-space: nowrap; }
.check { flex: none; width: 30px; height: 30px; border-radius: 50%; border: 2.5px solid #a8916b; display: grid; place-items: center; background: #fffaf0; }
.qrow.done .check, .prow.done .check { background: linear-gradient(135deg, #e7b546, #b77f14); border-color: #8d5f0b; }
.qrow.done .check::after, .prow.done .check::after { content: ''; width: 12px; height: 7px; border: solid #fff; border-width: 0 0 3px 3px; transform: translateY(-2px) rotate(-45deg); }
.qrow.done .qname { color: var(--ink-2); }
.qrow.pop .check { animation: pop 0.35s ease; }
@keyframes pop { 40% { transform: scale(1.3); } 100% { transform: scale(1); } }

/* ---------- week ---------- */
.week .wk-top { display: flex; justify-content: space-between; align-items: baseline; }
.wk-count { font: 700 28px var(--ui); font-variant-numeric: tabular-nums; }
.wk-count small { font-size: 15px; color: var(--on-dark-2); font-weight: 600; }
.wkbar { height: 14px; border-radius: 8px; background: #0f0b18; box-shadow: inset 0 0 0 1px #3a3157; margin: 10px 0; overflow: hidden; }
.wkbar i { display: block; height: 100%; background: linear-gradient(90deg, #6b4fc2, #a990f0); border-radius: 8px; transition: width 0.5s ease; }
.wkbar.won i { background: var(--xp); box-shadow: 0 0 12px #f4d27a88; }
.wk-line { margin: 0; font-size: 15px; color: var(--on-dark); }
.wk-streak { margin: 6px 0 0; font-size: 14px; color: var(--gold-2); }

/* ---------- log ---------- */
.logbtns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.logbtn { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px; border-radius: 14px; background: #fffaf0; box-shadow: inset 0 0 0 1px var(--parch-line); }
.logbtn span { font-size: 24px; }
.logbtn b { font-size: 15px; }
.logbtn small { font-size: 13px; color: var(--ink-2); }

/* ---------- promises ---------- */
.promises { list-style: none; margin: 0; padding: 0; }
.prow { display: flex; align-items: center; gap: 6px; }
.promises li + li { border-top: 1px solid var(--parch-line); }
.pcheck { flex: none; width: 48px; height: 56px; display: grid; place-items: center; }
.pmain { flex: 1; display: flex; flex-direction: column; min-height: 56px; justify-content: center; padding: 6px 0; }
.ptitle { font-size: 17px; font-weight: 500; }
.pmeta { font-size: 13px; color: var(--ink-2); }
.prow.late .ptitle { color: var(--red); font-weight: 600; }
.prow.late .pmeta { color: var(--red); }
.kept .pmain { padding-left: 4px; }
.kept .ptitle { color: var(--ink-2); text-decoration: line-through; text-decoration-color: #a8916b; }
.fold { margin-top: 8px; }
.fold summary { cursor: pointer; font-weight: 600; font-size: 15px; color: var(--ink-2); padding: 8px 0; list-style: none; }
.fold summary::-webkit-details-marker { display: none; }
.fold summary::before { content: '▸ '; }
.fold[open] summary::before { content: '▾ '; }
.fold.light summary { color: var(--on-dark-2); }

/* ---------- enemies ---------- */
.enemies { list-style: none; margin: 0; padding: 0; }
.erow { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 0; }
.enemies li + li { border-top: 1px solid var(--dark-line); }
.eicon { font-size: 40px; width: 52px; text-align: center; flex: none; filter: drop-shadow(0 4px 8px #0008); }
.emain { flex: 1; min-width: 0; }
.emain b { display: block; font: 700 16px var(--title); letter-spacing: 0.03em; }
.emain small { display: block; font-size: 13px; color: var(--on-dark-2); margin-top: 4px; font-variant-numeric: tabular-nums; }
.hp { height: 10px; border-radius: 6px; background: #0f0b18; box-shadow: inset 0 0 0 1px #4a2a35; margin-top: 6px; overflow: hidden; }
.hp i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, #c0392b, #ef6f55); transition: width 0.9s cubic-bezier(.3,.9,.3,1); }
.hp.big { height: 16px; margin: 14px 0 8px; }
.erow.slain { opacity: 0.75; }
.erow.slain .eicon { filter: grayscale(1); }

/* ---------- hero tab ---------- */
.hero-top { text-align: center; padding: 6px 0 18px; }
.ht-crest { display: grid; place-items: center; margin-bottom: 4px; }
.hero-top h1 { font: 600 34px/1.1 var(--story); }
.ht-title { margin: 6px 0 0; font: 700 17px var(--title); color: var(--gold); letter-spacing: 0.05em; }
.ht-title span { color: var(--on-dark-2); font-weight: 400; }
.ht-quest { margin: 10px auto 0; max-width: 320px; font: italic 17px/1.4 var(--story); color: var(--on-dark); }
.xpbar.wide { max-width: 360px; margin: 16px auto 6px; height: 12px; }
.ht-xp { margin: 0 0 16px; font-size: 13px; color: var(--on-dark-2); }
.stats { list-style: none; margin: 0; padding: 0; }
.stats li { display: flex; align-items: center; gap: 12px; padding: 8px 0; }
.stats li + li { border-top: 1px solid var(--parch-line); }
.s-icon { font-size: 22px; width: 28px; text-align: center; }
.s-name { width: 92px; font-weight: 600; font-size: 16px; }
.s-name small { display: block; font-weight: 400; font-size: 12px; color: var(--ink-2); }
.s-bar { flex: 1; height: 8px; border-radius: 5px; background: var(--parch-2); overflow: hidden; }
.s-bar i { display: block; height: 100%; background: linear-gradient(90deg, #b8801a, #e3b14a); border-radius: 5px; }
.s-score { width: 54px; text-align: right; font: 700 24px var(--ui); font-variant-numeric: tabular-nums; }
.s-score small { display: block; font-size: 12px; color: var(--gold-deep); font-weight: 700; margin-top: -2px; }
.vitals { margin: 0; }
.vitals div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; }
.vitals div + div { border-top: 1px solid var(--parch-line); }
.vitals dt { font-weight: 600; font-size: 15px; white-space: nowrap; }
.vitals dd { margin: 0; text-align: right; font: 700 17px var(--ui); font-variant-numeric: tabular-nums; }
.vitals dd small { display: block; font-weight: 400; font-size: 12px; color: var(--ink-2); }
.journey-bar { height: 8px; border-radius: 5px; background: #0f0b18; overflow: hidden; margin: 6px 0 8px; }
.journey-bar i { display: block; height: 100%; min-width: 3px; background: var(--xp); }
.chapters { list-style: none; margin: 8px 0 0; padding: 0; }
.chapters li { display: flex; align-items: center; gap: 12px; padding: 8px 0; color: var(--on-dark-2); }
.chapters li + li { border-top: 1px solid var(--dark-line); }
.c-num { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font: 700 14px var(--title); border: 1.5px solid #4a4070; flex: none; }
.c-main { flex: 1; }
.c-main b { display: block; color: var(--on-dark); font: 700 15px var(--title); letter-spacing: 0.04em; }
.c-main small { font-size: 12px; }
.c-state { font-size: 13px; font-weight: 700; color: var(--gold); }
.chapters li.now .c-num { border-color: var(--gold); color: var(--gold); box-shadow: 0 0 12px #e8c06855; }
.chapters li.past .c-num { background: var(--gold); color: #2e1f05; border-color: var(--gold); }
.trophies { list-style: none; margin: 0; padding: 0; }
.trophies li { display: flex; gap: 12px; align-items: center; padding: 8px 0; }
.trophies li + li { border-top: 1px solid var(--parch-line); }
.t-icon { font-size: 28px; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: #fffaf0; box-shadow: inset 0 0 0 1px var(--parch-line); flex: none; }
.trophies b { display: block; font-size: 15px; }
.trophies small { font-size: 13px; color: var(--ink-2); }
.settings { padding: 4px 16px; }
.srow { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 54px; }
.settings .srow + .srow { border-top: 1px solid var(--parch-line); }
.srow span:first-child { font-size: 20px; width: 26px; text-align: center; }
.srow b { font-weight: 600; }
.srow small { margin-left: auto; font-size: 13px; color: var(--ink-2); }
.chev { font-size: 22px; color: #a8916b; }
.build { text-align: center; font-size: 12px; color: #8e84ad; margin: 6px 0 0; }

/* crest stars */
.crest .cstar.lit { filter: drop-shadow(0 0 6px #f4d27a); }
.crest .cstar.now { fill: #a99adb; animation: twinkle 2.4s ease-in-out infinite; }
@keyframes twinkle { 50% { fill: #f4d27a; } }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px; border-radius: 14px; font-weight: 700; font-size: 16px; }
.btn.block { display: flex; width: 100%; margin-top: 10px; }
.btn.gold { background: linear-gradient(180deg, #f3d387, #d9a43c); color: #2e1f05; box-shadow: 0 2px 0 #9b6a16, 0 6px 18px #0005; }
.btn.ghost { background: #fffaf0; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--parch-line); }
.btn.ghost-light { background: transparent; color: var(--gold-2); box-shadow: inset 0 0 0 1.5px #5a4e85; }
.btn.danger { background: transparent; color: var(--red); box-shadow: inset 0 0 0 1.5px #e3b5ab; }
.btn.small { min-height: 36px; padding: 0 14px; font-size: 14px; border-radius: 11px; }
.filebtn { cursor: pointer; }

/* ---------- setup ---------- */
.setup { text-align: center; padding-top: 8px; }
.setup-crest { display: grid; place-items: center; }
.kicker { margin: 6px 0 4px; font: 700 13px var(--title); letter-spacing: 0.14em; color: var(--gold); text-transform: uppercase; }
.setup h1 { font: 600 32px/1.15 var(--story); }
.story { font: 17px/1.45 var(--story); color: var(--on-dark-2); margin: 10px auto 18px; max-width: 340px; }
.setup form { text-align: left; }

/* ---------- forms and sheets ---------- */
.field { display: block; margin: 0 0 14px; }
.field > span, .field-label { display: block; font-size: 14px; font-weight: 700; color: var(--ink-2); margin: 0 0 6px; }
.field input, .field textarea { width: 100%; font-size: 17px; padding: 12px 14px; border-radius: 12px; border: 1.5px solid var(--parch-line); background: #fffdf7; color: var(--ink); }
.field input:focus, .field textarea:focus { outline: none; border-color: #c08a2c; box-shadow: 0 0 0 3px #e8c06855; }
.field textarea { resize: none; font-family: var(--story); }
.field small { display: block; font-size: 13px; color: var(--ink-2); margin-top: 5px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.err { color: var(--red); font-weight: 600; font-size: 14px; margin: 4px 0; min-height: 0; }
.err:empty { display: none; }
.hint { font-size: 14px; color: var(--ink-2); margin: 0 0 12px; }
.rows { display: grid; gap: 8px; margin: 0 0 14px; }
.row-opt { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: #fffdf7; box-shadow: inset 0 0 0 1.5px var(--parch-line); cursor: pointer; }
.row-opt input { appearance: none; -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; border: 2px solid #a8916b; margin: 0; flex: none; }
.row-opt input:checked { border: 7px solid #b77f14; }
.row-opt:has(input:checked) { box-shadow: inset 0 0 0 2px #b77f14; background: #fff6df; }
.row-opt b { display: block; font-weight: 600; }
.row-opt small { display: block; font-size: 13px; color: var(--ink-2); }

#sheet { position: fixed; inset: 0; z-index: 40; }
#sheet[hidden] { display: none; }
.scrim { position: absolute; inset: 0; background: #07050cb3; animation: fade 0.2s ease; }
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0; margin: 0 auto; max-width: 560px;
  max-height: calc(100% - var(--top-inset) - 12px); overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
  background: var(--parch); color: var(--ink); border-radius: 22px 22px 0 0;
  padding: 8px 18px calc(var(--bottom-inset) + 22px);
  animation: rise 0.28s cubic-bezier(.2,.9,.3,1);
}
.sheet.out { animation: sink 0.22s ease forwards; }
#sheet.closing .scrim { opacity: 0; transition: opacity 0.2s; }
.grab { width: 40px; height: 5px; border-radius: 3px; background: var(--parch-line); margin: 0 auto 10px; }
.sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.sheet-head h3 { font: 700 20px/1.2 var(--title); letter-spacing: 0.04em; }
.x { width: 36px; height: 36px; border-radius: 18px; background: var(--parch-2); display: grid; place-items: center; font-size: 15px; color: var(--ink-2); flex: none; }
.sheet-monster { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; font-size: 52px; }
.sheet-monster > div { flex: 1; font-size: 13px; color: var(--ink-2); }
.sheet-monster .hp { background: var(--parch-2); box-shadow: none; margin-bottom: 6px; }
.qedit { list-style: none; margin: 0; padding: 0; }
.qedit button { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; }
.qedit li + li { border-top: 1px solid var(--parch-line); }
.qedit b { flex: 1; font-weight: 500; }
.qedit small { color: var(--ink-2); font-size: 13px; }
.rules { margin: 0; padding-left: 18px; font-size: 15px; }
.rules li { margin-bottom: 9px; }
.share-preview { display: grid; place-items: center; min-height: 200px; }
.share-preview img { width: 100%; max-width: 340px; border-radius: 16px; box-shadow: 0 6px 18px #0004; }
.toggles { display: flex; gap: 10px; margin: 14px 0 4px; }
.toggle { flex: 1; display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 12px; background: #fffdf7; box-shadow: inset 0 0 0 1.5px var(--parch-line); font-weight: 600; font-size: 15px; }
.toggle input { width: 20px; height: 20px; accent-color: #b77f14; margin: 0; }

/* ---------- effects ---------- */
#fx { position: fixed; inset: 0; pointer-events: none; z-index: 60; }
#fx > * { pointer-events: auto; }
.toast {
  position: absolute; left: 14px; right: 14px; top: calc(var(--top-inset) + 8px); margin: 0 auto; max-width: 520px;
  display: flex; gap: 12px; align-items: center; padding: 12px 16px; border-radius: 18px;
  background: linear-gradient(135deg, #f6dc98, #e0ab45); color: #2e1f05; box-shadow: 0 10px 30px #000a;
  animation: drop 0.35s cubic-bezier(.2,.9,.3,1.2);
}
.toast.out { animation: lift 0.25s ease forwards; }
.toast-icon { font-size: 30px; }
.toast b { display: block; font: 700 16px var(--title); letter-spacing: 0.04em; }
.toast small { display: block; font-size: 14px; color: #4a3409; }
.xpfloat { position: absolute; font: 800 18px var(--ui); color: #f6dc98; text-shadow: 0 2px 6px #000, 0 0 12px #c78a1c; pointer-events: none !important; animation: floatup 0.95s ease-out forwards; }
.overlay { position: absolute; inset: 0; display: grid; place-items: center; background: radial-gradient(600px 420px at 50% 38%, #3a2c66 0%, #120d1f 70%), #0b0814; padding: 24px; animation: fade 0.25s ease; }
.overlay.out { animation: fadeout 0.25s ease forwards; }
.lu-card, .st-card { position: relative; text-align: center; width: 100%; max-width: 360px; }
.lu-crest { display: grid; place-items: center; animation: forge 0.9s cubic-bezier(.2,.9,.3,1.3); }
.lu-kicker { margin: 10px 0 0; font: 700 15px var(--title); letter-spacing: 0.18em; color: var(--gold); text-transform: uppercase; }
.lu-level { margin: 2px 0; font: 700 54px/1 var(--title); color: #fff; text-shadow: 0 0 24px #e8c068aa; }
.lu-title { margin: 6px 0 10px; font: 600 22px var(--story); color: var(--gold-2); }
.lu-note { margin: 0 0 12px; color: var(--on-dark-2); font-size: 15px; }
.lu-card .btn, .st-card .btn { margin-top: 14px; min-width: 200px; }
.lu-sparks { position: absolute; left: 50%; top: 90px; width: 0; height: 0; }
.lu-sparks i { position: absolute; width: 6px; height: 16px; border-radius: 3px; background: #f4d27a; transform: rotate(var(--a)) translateY(0); opacity: 0; animation: spark 1.1s var(--d) ease-out forwards; }
.st-monster { font-size: 120px; line-height: 1.1; animation: hit 0.6s ease 0.15s; filter: drop-shadow(0 10px 20px #000); }
.st-monster.slain { animation: hit 0.5s ease 0.15s, fall 0.8s ease 0.7s forwards; }
.st-dmg { font: 800 40px var(--ui); color: #ff7a5c; text-shadow: 0 2px 10px #000; animation: dmg 0.9s ease-out; }
.st-name { margin: 8px 0 0; font: 700 20px var(--title); letter-spacing: 0.04em; color: #fff; }
.st-line { margin: 0; color: var(--on-dark-2); font-size: 16px; }
.st-card .hp.big { max-width: 300px; margin-left: auto; margin-right: auto; }

@keyframes rise { from { transform: translateY(100%); } }
@keyframes sink { to { transform: translateY(100%); } }
@keyframes fade { from { opacity: 0; } }
@keyframes fadeout { to { opacity: 0; } }
@keyframes drop { from { transform: translateY(-140%); opacity: 0; } }
@keyframes lift { to { transform: translateY(-140%); opacity: 0; } }
@keyframes floatup { from { transform: translateY(0); opacity: 1; } to { transform: translateY(-46px); opacity: 0; } }
@keyframes forge { 0% { transform: scale(0.3) rotate(-12deg); opacity: 0; filter: brightness(3); } 60% { transform: scale(1.12) rotate(3deg); opacity: 1; } 100% { transform: scale(1); filter: brightness(1); } }
@keyframes spark { 0% { opacity: 1; transform: rotate(var(--a)) translateY(-30px); } 100% { opacity: 0; transform: rotate(var(--a)) translateY(-170px); } }
@keyframes hit { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-18px) rotate(-8deg); filter: brightness(2) drop-shadow(0 0 20px #f00); } 40% { transform: translateX(14px) rotate(6deg); } 60% { transform: translateX(-8px); } 80% { transform: translateX(4px); } }
@keyframes fall { to { transform: translateY(40px) rotate(90deg); opacity: 0.25; filter: grayscale(1); } }
@keyframes dmg { from { transform: translateY(20px) scale(0.6); opacity: 0; } 40% { transform: translateY(-6px) scale(1.15); opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media (min-width: 600px) {
  .sheet { border-radius: 22px; bottom: 24px; }
}
