/* Ink and watercolour pages on a night-blue table: every card, enemy and event is mostly picture, with text kept in tight bands. */
:root { color-scheme: dark; --night: #0d1420; --night2: #16202f; --ink: #10141b; --paper: #efe4cc; --gold: #e2b04a; --crimson: #c22f3a; --teal: #2f9a96; --abyss: #a3142a; --mute: #9aa3ae; --guard: #6fa7c4; --good: #7bc48c; --display: 'Cinzel', 'Times New Roman', serif; --body: 'Alegreya', Georgia, serif; --ui: 'Alegreya Sans SC', 'Trebuchet MS', sans-serif; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; margin: 0; overflow: hidden; background: radial-gradient(ellipse at 50% 0, #1c2a3f, var(--night) 70%); color: var(--paper); font: 16px/1.42 var(--body); }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; touch-action: manipulation; }
button:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
button:disabled { cursor: default; }
#app { height: 100%; display: flex; flex-direction: column; padding-left: max(12px, env(safe-area-inset-left, 0px)); padding-right: max(12px, env(safe-area-inset-right, 0px)); max-width: 560px; margin: 0 auto; position: relative; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; margin: 0; text-wrap: balance; letter-spacing: .01em; }
h2 { font-size: 25px; line-height: 1.12; color: var(--gold); }
.h3 { font: 13px var(--ui); letter-spacing: .12em; color: var(--mute); text-transform: uppercase; }
p { margin: 0; }
.noart { display: block; background: linear-gradient(135deg, #24324a, #0d1420); }
.b { min-height: 44px; padding: 10px 14px; border: 1px solid rgba(226, 176, 74, .5); border-radius: 6px; background: rgba(22, 32, 47, .9); font: 17px var(--ui); letter-spacing: .04em; }
.b.big { width: 100%; min-height: 54px; font-size: 20px; }
.b.hot { background: linear-gradient(180deg, #d63b45, #8d1a26); border-color: var(--gold); color: #fff6e2; }
.b:disabled { opacity: .4; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.scr { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; padding-block: 14px 26px; -webkit-overflow-scrolling: touch; }
.note { color: var(--mute); font-size: 14px; text-align: center; }
.center { text-align: center; }
.tag { align-self: flex-start; font: 13px var(--ui); letter-spacing: .14em; color: var(--gold); border-bottom: 1px solid var(--gold); }
.center .tag { align-self: center; }
.hero { width: 100%; height: 260px; object-fit: cover; object-position: 50% 22%; flex: none; border-radius: 8px; box-shadow: 0 10px 30px #000a; }

/* Title */
.titlebox { position: relative; border-radius: 10px; overflow: hidden; min-height: 330px; display: flex; align-items: flex-end; box-shadow: 0 16px 40px #000; }
.tart { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }
.tt { position: relative; padding: 16px; width: 100%; background: linear-gradient(transparent, rgba(13, 20, 32, .96) 34%); }
.tt small { font: 13px var(--ui); letter-spacing: .14em; color: var(--gold); }
.tt h1 { font-size: clamp(36px, 11vw, 52px); line-height: 1; color: #fff3d6; text-shadow: 0 3px 0 var(--crimson); }
.tt p { margin-top: 6px; font-style: italic; }
.heroes { display: grid; gap: 10px; }
.herob { display: grid; grid-template-columns: 104px 1fr; gap: 12px; text-align: left; background: var(--night2); border: 1px solid rgba(226, 176, 74, .35); border-radius: 10px; overflow: hidden; padding: 0; height: auto; box-shadow: none; }
.himg { width: 104px; height: 138px; object-fit: cover; object-position: 50% 15%; }
.herob span { padding: 10px 10px 10px 0; display: flex; flex-direction: column; gap: 3px; }
.herob b { font: 700 20px var(--display); color: var(--gold); }
.herob small { font: 13px var(--ui); letter-spacing: .08em; color: var(--mute); }
.herob em { font-size: 15px; } .herob i { font: 12.5px var(--ui); color: var(--teal); font-style: normal; }
.soon { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.soon span { font: 13px var(--ui); color: var(--mute); background: rgba(22, 32, 47, .6); padding: 6px 8px; border-radius: 6px; }
.soon b { display: block; color: var(--paper); font-weight: 400; font-size: 14px; }
.kit { display: grid; grid-template-columns: 92px 1fr; gap: 12px; align-items: start; }
.kimg { width: 92px; height: 122px; object-fit: cover; object-position: 50% 15%; border-radius: 8px; }
.kit p { font-size: 15px; margin-top: 4px; } .kit b { color: var(--gold); font-weight: 400; font-family: var(--display); }
.rule { border-left: 3px solid var(--abyss); padding: 8px 12px; background: rgba(163, 20, 42, .14); }
.rule b { font-family: var(--display); color: #ff8b95; } .rule p { font-size: 15px; }

/* Map */
.banner { position: relative; min-height: 190px; display: flex; flex-direction: column; justify-content: space-between; gap: 8px; padding: 12px; border-radius: 10px; overflow: hidden; background: linear-gradient(rgba(13, 20, 32, .25), rgba(13, 20, 32, .92)), var(--bg) center / cover; }
.mt { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.mt small { font: 13px var(--ui); letter-spacing: .14em; color: var(--gold); }
.prog { display: flex; gap: 6px; flex-wrap: wrap; }
.prog span { font: 12.5px var(--ui); background: rgba(13, 20, 32, .8); padding: 3px 8px; border-radius: 20px; border: 1px solid rgba(226, 176, 74, .35); }
.status { font: 13.5px var(--ui); }
.offer { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.mapcard { position: relative; display: flex; flex-direction: column; text-align: left; background: var(--night2); border-radius: 10px; overflow: hidden; border: 1px solid rgba(226, 176, 74, .3); min-width: 0; }
.mimg { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; object-position: 50% 20%; display: block; }
.mapcard b { padding: 6px 7px 0; font: 700 14px/1.12 var(--display); overflow-wrap: anywhere; }
.mapcard small { padding: 3px 7px 8px; font: 12px/1.2 var(--ui); color: var(--mute); }
.mk { position: absolute; top: 6px; left: 6px; font: 11.5px var(--ui); letter-spacing: .1em; padding: 2px 7px; border-radius: 20px; background: rgba(13, 20, 32, .85); }
.mk.k-elite { background: var(--crimson); } .mk.k-opp { background: var(--teal); } .mk.k-story { background: var(--gold); color: var(--ink); } .mk.k-camp { background: #3c6a4a; }
.mapcard.k-story { border-color: var(--gold); } .mapcard.k-elite { border-color: var(--crimson); } .mapcard.k-opp { border-color: var(--teal); }
.bossb { width: 100%; text-align: left; background: linear-gradient(90deg, #5a0f1a, #16202f); border-color: var(--crimson); }
.bossb b { display: block; font: 700 18px var(--display); } .bossb small { color: var(--mute); font: 13px var(--ui); }
.region { display: grid; grid-template-columns: 110px 1fr; gap: 12px; align-items: center; text-align: left; background: var(--night2); border: 1px solid var(--gold); border-radius: 10px; overflow: hidden; }
.region.off { grid-template-columns: 1fr; padding: 12px; border-style: dashed; border-color: var(--mute); opacity: .6; }
.rimg { width: 110px; height: 82px; object-fit: cover; }
.region b { display: block; font: 700 17px var(--display); } .region small { font: 13px var(--ui); color: var(--mute); }

.opt { text-align: left; background: rgba(22, 32, 47, .9); border-left: 3px solid var(--gold); padding: 11px 13px; border-radius: 4px; }
.opt b { display: block; font: 700 17px/1.2 var(--display); } .opt small { color: var(--mute); font-size: 14px; }
.wrap { display: block; width: 100%; text-align: left; }
.rewards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.price { position: absolute; right: 6px; bottom: 6px; font: 13px var(--ui); background: var(--gold); color: var(--ink); padding: 2px 8px; border-radius: 20px; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0; }
.stats div { background: var(--night2); padding: 8px; border-radius: 6px; } .stats dt { font: 13px var(--ui); color: var(--mute); } .stats dd { margin: 0; font: 700 22px var(--display); color: var(--gold); }

/* Cards: art first, text in a band */
.card { position: relative; display: flex; flex-direction: column; background: var(--paper); color: var(--ink); border-radius: 10px; overflow: hidden; border: 2px solid #c9b88e; box-shadow: 0 6px 18px #000b; }
.card .art { aspect-ratio: 4 / 3; overflow: hidden; background: #222; } .card .art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card .body { padding: 7px 9px 9px; display: flex; flex-direction: column; gap: 2px; }
.card h3 { font-size: 16px; line-height: 1.08; } .card small { font: 12px var(--ui); color: #6b5b3e; } .card p { font-size: 14.5px; line-height: 1.25; } .card p b { font-weight: 700; }
.cost { position: absolute; top: 6px; left: 6px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font: 700 17px var(--display); background: radial-gradient(circle at 35% 30%, #fff1c7, var(--gold) 55%, #8a6420); color: var(--ink); border: 2px solid var(--ink); }
.cost:empty { display: none; }
.kor { position: absolute; top: 6px; right: 6px; min-width: 30px; height: 30px; padding: 0 6px; border-radius: 15px; display: grid; place-items: center; font: 700 15px var(--ui); background: radial-gradient(circle, #ff4d5c, var(--abyss) 60%, #3a0008); color: #fff; border: 2px solid var(--ink); }
.kor::before { content: '◉ '; font-size: 11px; }
.card.t-guard { background: #dfe7ea; border-color: #9fb6c2; } .card.t-skill { background: #e6eadd; border-color: #a9b98f; } .card.t-curse { background: #2a2230; color: var(--paper); border-color: #533; }
.card.corrupt { border-color: var(--abyss); box-shadow: 0 0 0 1px #000, 0 0 18px rgba(194, 20, 42, .55); }
.card.wide { flex-direction: row; height: 100%; } .card.wide .art { aspect-ratio: auto; width: 36%; flex: none; } .card.wide .body { padding-right: 86px; }
.card .play { position: absolute; right: 7px; bottom: 7px; min-height: 40px; padding: 5px 13px; background: linear-gradient(180deg, #d63b45, #8d1a26); border-color: var(--gold); color: #fff; }
.card .play.dark { background: linear-gradient(180deg, #3a0711, #a3142a); box-shadow: 0 0 12px rgba(255, 60, 80, .6); }
.card .play:disabled { background: #6b6b6b; box-shadow: none; }

/* Fight */
.fight { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 6px; padding-block: 7px 8px; }
.top { display: flex; gap: 8px; align-items: center; }
.ava { width: 46px; height: 46px; object-fit: cover; object-position: 50% 15%; border-radius: 50%; border: 2px solid var(--gold); flex: none; }
.vit { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.bar { height: 18px; background: #2a1a20; position: relative; overflow: hidden; border-radius: 3px; }
.bar i, .hp i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, #8d1a26, var(--crimson)); transition: width .3s; }
.bar u, .hp u { position: absolute; inset: 0; display: grid; place-items: center; text-decoration: none; font: 12.5px var(--ui); color: #fff; }
.gd { position: absolute; right: 0; top: 0; bottom: 0; padding: 0 7px; background: var(--guard); font: 12.5px/18px var(--ui); color: var(--ink); } .gd.pr { right: auto; left: 0; background: var(--teal); color: #fff; }
.abyss { display: grid; grid-template-columns: auto 1fr auto auto; gap: 6px; align-items: center; font: 12px var(--ui); color: var(--mute); }
.ab { position: relative; height: 8px; background: #2a1a20; border-radius: 4px; overflow: hidden; }
.ab i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, #5a0f1a, #ff3048); transition: width .25s; }
.ab em { position: absolute; top: 0; bottom: 0; width: 2px; background: rgba(226, 176, 74, .7); }
.abyss b { font: 700 14px var(--ui); color: var(--paper); } .abyss b small { color: var(--mute); font-weight: 400; } .mult { color: #ff8b95; }
.abyss.risk { color: #ff8b95; } .abyss.risk .ab { box-shadow: 0 0 10px #ff3048; animation: pulse 1s infinite; }
.tools { display: flex; gap: 4px; flex: none; }
.ic { width: 36px; height: 36px; border: 1px solid rgba(226, 176, 74, .45); border-radius: 6px; font: 14px var(--ui); color: var(--gold); background: rgba(13, 20, 32, .7); }
.ic.sm { font-size: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 3px; }
.chip { font: 11px var(--ui); padding: 1px 6px; border-radius: 10px; background: #3a4458; }
.s-mark { background: var(--teal); } .s-exposed, .s-bleed { background: var(--crimson); } .s-weak { background: #6b5b3e; } .s-fury { background: #a35a14; }
.stage { flex: 1; min-height: 0; display: grid; gap: 6px; padding: 6px; align-items: stretch; border-radius: 10px; background: linear-gradient(rgba(13, 20, 32, .55), rgba(13, 20, 32, .9)), var(--bg) center / cover; }
.stage.n1 { grid-template-columns: minmax(0, 1fr); } .stage.n2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .stage.n3, .stage.n4 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.foe { min-width: 0; min-height: 0; display: flex; flex-direction: column; gap: 3px; text-align: center; padding: 3px; border-radius: 8px; border: 1px solid transparent; overflow: hidden; }
.foe.tgt { border-color: var(--gold); background: rgba(226, 176, 74, .08); } .foe.dead { opacity: .2; }
.fimg { flex: 1 1 70px; min-height: 40px; width: 100%; object-fit: cover; object-position: 50% 18%; border-radius: 6px; }
.foe.boss .fimg, .stage.n1 .fimg { object-fit: contain; }
.fn { font: 700 14px/1.05 var(--display); color: var(--gold); } .foe.elite .fn, .foe.boss .fn { color: #ff8b95; }
.hp { position: relative; height: 15px; background: #2a1a20; overflow: hidden; display: block; flex: none; border-radius: 3px; } .hp u { font-size: 11px; }
.foe .chips { justify-content: center; }
.intent { display: flex; flex-direction: column; background: rgba(13, 20, 32, .92); padding: 3px 4px; border-radius: 6px; flex: none; }
.intent b { font: 700 13px/1.05 var(--display); } .intent span { font: 12px var(--ui); color: var(--gold); }
.k-atk span { color: #ff9d94; } .k-def span { color: var(--guard); } .k-stun span { color: var(--good); }
.cue { position: relative; height: 16px; margin-top: 2px; background: #2a1a20; border-radius: 3px; overflow: hidden; }
.cue i { position: absolute; inset: 0 auto 0 0; background: #a37a22; } .cue span { position: absolute; inset: 0; display: grid; place-items: center; color: #fff !important; font-size: 10.5px !important; }
.preview { height: 118px; flex: none; }
.say { height: 100%; display: grid; place-items: center; text-align: center; font: italic 16px/1.25 var(--body); padding: 4px 12px; }
.hand { flex: none; height: 104px; display: flex; gap: 4px; justify-content: center; }
.mini { flex: 1 1 0; min-width: 0; max-width: 84px; position: relative; display: flex; flex-direction: column; background: var(--paper); color: var(--ink); border-radius: 8px; overflow: hidden; border: 2px solid #c9b88e; transition: transform .12s; text-align: left; }
.hand:has(.mini:nth-child(6)) .mini { margin-right: -12px; }
.mart { width: 100%; flex: 1; min-height: 0; object-fit: cover; }
.mini b { font: 700 11px/1.05 var(--display); padding: 3px 4px 4px; overflow-wrap: anywhere; }
.mini .cost { width: 23px; height: 23px; font-size: 13px; top: 3px; left: 3px; } .mini .kor { min-width: 23px; height: 23px; font-size: 11px; top: 3px; right: 3px; padding: 0 3px; } .mini .kor::before { content: ''; }
.mini.t-guard { background: #dfe7ea; } .mini.t-skill { background: #e6eadd; } .mini.t-curse { background: #2a2230; color: var(--paper); }
.mini.corrupt { border-color: var(--abyss); }
.mini.off { filter: grayscale(.7) brightness(.55); } .mini.sel { transform: translateY(-8px); border-color: var(--gold); z-index: 2; box-shadow: 0 0 14px rgba(226, 176, 74, .7); }
.mini.deal { animation: deal .28s both; animation-delay: calc(var(--i) * 45ms); }
.ctl { flex: none; display: grid; grid-template-columns: 50px 1fr auto 82px; gap: 6px; align-items: stretch; }
.orb { display: grid; place-items: center; align-content: center; width: 50px; height: 50px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff1c7, var(--gold) 55%, #8a6420); color: var(--ink); border: 2px solid var(--ink); }
.orb b { font: 700 20px/1 var(--display); } .orb small { font: 9px var(--ui); }
.b.sm { padding: 3px 6px; font-size: 14px; line-height: 1.05; } .b.sm small { display: block; font-size: 11px; color: var(--mute); }
.pots { display: flex; gap: 4px; } .pot { min-width: 44px; padding: 3px; font: 11px/1.05 var(--ui); border: 1px solid var(--teal); border-radius: 6px; background: rgba(47, 154, 150, .18); }
.end { padding: 3px; background: linear-gradient(180deg, #2a3c55, #16202f); font-size: 17px; line-height: 1; }
.wait .hand, .wait .ctl { opacity: .35; pointer-events: none; }
.modal { position: absolute; inset: 0; z-index: 20; background: rgba(5, 8, 14, .8); display: flex; align-items: flex-end; }
.sheet { width: 100%; max-height: 88%; overflow-y: auto; background: var(--night2); border-top: 2px solid var(--gold); border-radius: 14px 14px 0 0; padding: 16px 14px; display: flex; flex-direction: column; gap: 12px; }
.terms { margin: 0; display: grid; gap: 9px; } .terms dt { font: 700 16px var(--display); color: var(--gold); } .terms dd { margin: 0; font-size: 15px; }

/* Effects */
.vfx { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 39; }
#fxl { position: fixed; inset: 0; pointer-events: none; z-index: 40; overflow: hidden; }
.fl { position: fixed; transform: translate(-50%, 0); font: 700 24px var(--display); color: #fff; text-shadow: 0 2px 0 #000, 0 0 8px #000; animation: rise 1.1s ease-out both; white-space: nowrap; }
.fl.big { font-size: 36px; color: var(--gold); } .fl.hurt { color: #ff6e65; } .fl.heal { color: var(--good); } .fl.guard { color: var(--guard); font-size: 17px; } .fl.miss { color: var(--mute); font-size: 15px; } .fl.cue { color: var(--gold); font-size: 22px; } .fl.ally { color: var(--teal); font-size: 18px; }
.banner-fx { position: fixed; top: 34%; left: 6%; right: 6%; text-align: center; font: 700 19px/1.15 var(--display); padding: 8px; background: rgba(13, 20, 32, .94); border-block: 1px solid var(--gold); animation: fade .6s both; }
.toast { position: fixed; bottom: 20%; left: 10%; right: 10%; text-align: center; font: 14px var(--ui); padding: 8px; background: var(--paper); color: var(--ink); border-radius: 8px; animation: fade 1.7s both; }
.curtain i { position: fixed; top: 0; bottom: 0; width: 51%; background: linear-gradient(90deg, #0d1420, #1c2a3f); border-inline: 2px solid var(--gold); }
.curtain i:first-child { left: 0; animation: cl 1s .1s cubic-bezier(.6, 0, .3, 1) both; } .curtain i:last-child { right: 0; animation: cr 1s .1s cubic-bezier(.6, 0, .3, 1) both; }
.flash { position: fixed; inset: 0; background: var(--gold); animation: fade .8s both; } .flash.abyss-fx { background: radial-gradient(circle, #ff3048, #3a0008); }
.hit { animation: hit .24s; } .lunge { animation: lunge .34s; } .shake { animation: shake .34s; }
@keyframes rise { 0% { opacity: 0; transform: translate(-50%, 8px) scale(.8); } 16% { opacity: 1; transform: translate(-50%, -6px) scale(1.12); } 100% { opacity: 0; transform: translate(-50%, -50px); } }
@keyframes fade { 0%, 100% { opacity: 0; } 15%, 75% { opacity: 1; } }
@keyframes cl { to { transform: translateX(-100%); } } @keyframes cr { to { transform: translateX(100%); } }
@keyframes deal { from { opacity: 0; transform: translateY(40px) rotate(5deg); } }
@keyframes hit { 30% { filter: brightness(2.2) saturate(.4); transform: translateX(-4px); } 60% { transform: translateX(3px); } }
@keyframes lunge { 45% { transform: translateY(12px) scale(1.04); } }
@keyframes shake { 20% { transform: translate(-6px, 2px); } 45% { transform: translate(5px, -3px); } 70% { transform: translate(-3px, 1px); } }
@keyframes pulse { 50% { box-shadow: 0 0 2px #ff3048; } }
@media (max-height: 660px) { .preview { height: 96px; } .hand { height: 86px; } .ava { width: 38px; height: 38px; } }
@media (prefers-reduced-motion: reduce) { .fl, .banner-fx, .toast, .flash, .mini.deal, .hit, .lunge, .shake, .abyss.risk .ab { animation-duration: .01s; animation-iteration-count: 1; } }

/* ---------- Relics, mastery, heat, hero state ---------- */
.relics { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.rel { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; border: 1px solid var(--gold); box-shadow: 0 0 8px rgba(226, 176, 74, .35); display: block; }
.rel.big { width: 64px; height: 64px; }
.relopt { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: center; }
.relopt .rel { width: 52px; height: 52px; }
.relopt .rel.big { width: 64px; height: 64px; }
.mast { position: relative; display: block; height: 18px; margin-top: 6px; background: rgba(13, 20, 32, .8); border: 1px solid rgba(226, 176, 74, .4); border-radius: 9px; overflow: hidden; }
.mast i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, var(--teal), var(--gold)); opacity: .55; }
.mast u { position: relative; display: block; text-align: center; text-decoration: none; font: 11.5px/18px var(--ui); letter-spacing: .08em; color: var(--paper); }
.mlist { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.mlist li { font-size: 14.5px; color: var(--mute); padding: 6px 10px; border-radius: 6px; background: rgba(22, 32, 47, .55); }
.mlist li.on { color: var(--paper); background: rgba(31, 107, 107, .35); }
.mlist li b { display: inline-block; width: 20px; font-family: var(--display); color: var(--gold); }
.mlist small { float: right; color: var(--mute); font: 12px var(--ui); }
.heat { display: flex; gap: 6px; flex-wrap: wrap; } .heat .hb { flex: 1 0 40px; }
.hb { flex: 1; height: 40px; border-radius: 6px; border: 1px solid rgba(194, 47, 58, .5); background: rgba(13, 20, 32, .8); color: var(--paper); font: 700 16px var(--display); }
.hb.on { background: var(--crimson); border-color: #ff7a7a; box-shadow: 0 0 12px rgba(194, 47, 58, .6); }
.hb:disabled { opacity: .3; }
.hstate { font: 11.5px var(--ui); padding: 1px 7px; border-radius: 10px; background: rgba(31, 107, 107, .6); color: #dff; letter-spacing: .04em; }
.chip.s-prey { background: var(--crimson); color: #fff; }
.chip.s-clue, .chip.s-deduced { background: #5a4a1f; } .chip.s-disguise { background: #24406f; } .chip.s-mist { background: #4a5168; }
.pot { padding: 0; overflow: hidden; width: 44px; height: 44px; }
.pimg { width: 100%; height: 100%; object-fit: cover; display: block; }
.region em { color: var(--gold); font-style: normal; }

/* ---------- Story systems: companions, quests, attributes, daily, leaderboard, war ---------- */
.rel.comp { border-color: var(--teal); box-shadow: 0 0 8px rgba(47, 154, 150, .5); border-radius: 8px; object-position: 50% 15%; }
.qline { font: 12.5px/1.4 var(--ui); color: var(--mute); margin-top: 6px; } .qline b { color: var(--gold); font-weight: 400; } .qline i { color: var(--crimson); font-style: normal; }
.attrs { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 0; font: 12px var(--ui); letter-spacing: .05em; }
.attrs span { background: rgba(13, 20, 32, .75); border: 1px solid rgba(226, 176, 74, .3); border-radius: 6px; padding: 2px 7px; color: var(--mute); }
.attrs b { color: var(--paper); font-size: 13px; } .attrs small { color: var(--mute); font-size: 10.5px; }
.daily { background: linear-gradient(180deg, rgba(31, 107, 107, .18), rgba(13, 20, 32, .6)); border: 1px solid rgba(226, 176, 74, .35); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.dh { display: grid; grid-template-columns: 84px 1fr; gap: 12px; align-items: start; }
.dimg { width: 84px; height: 112px; object-fit: cover; object-position: 50% 15%; border-radius: 8px; border: 1px solid var(--gold); }
.dh h2 { margin: 2px 0; } .dh p { font-size: 14.5px; margin: 2px 0; }
.board { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.board li { display: grid; grid-template-columns: 22px 1fr auto; grid-template-rows: auto auto; column-gap: 8px; padding: 6px 10px; border-radius: 6px; background: rgba(13, 20, 32, .7); }
.board li.me { background: rgba(194, 47, 58, .3); border: 1px solid var(--crimson); }
.board b { grid-row: span 2; font: 700 16px var(--display); color: var(--gold); align-self: center; }
.board span { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .board small { grid-column: 2; font: 11.5px var(--ui); color: var(--mute); }
.board em { grid-row: 1 / span 2; grid-column: 3; align-self: center; font: 700 17px var(--display); color: var(--paper); font-style: normal; }
.opt.quest { position: relative; overflow: hidden; } .qbar { position: absolute; left: 0; bottom: 0; height: 3px; background: var(--teal); }
.opt.quest.ready { border-left-color: var(--teal); box-shadow: 0 0 14px rgba(47, 154, 150, .45); }
.war { position: relative; height: 26px; border-radius: 13px; overflow: hidden; background: rgba(13, 20, 32, .8); border: 1px solid var(--crimson); }
.war i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, #5a0712, var(--crimson)); }
.war u { position: relative; display: block; text-align: center; font: 12px/26px var(--ui); text-decoration: none; letter-spacing: .05em; }

/* Details on demand */
[data-i] { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
button[data-i]:not(.mini):not(.foe) { position: relative; }
.ib { position: absolute; top: 6px; right: 6px; z-index: 3; width: 22px; height: 22px; border-radius: 50%; border: 1px solid rgba(226, 176, 74, .65); background: rgba(5, 8, 14, .7); color: var(--gold); font: italic 700 13px/20px Georgia, serif; text-align: center; }
.ib::after { content: ''; position: absolute; inset: -10px; }
.opt[data-i] { padding-right: 34px; }
.dis { opacity: .45; cursor: default; }
.attrs span[data-i], .relics span[data-i], .chip[data-i] { cursor: help; }
.pw { position: relative; display: inline-flex; } .pi { position: absolute; top: -6px; right: -6px; width: 18px; height: 18px; border-radius: 50%; background: var(--night2); border: 1px solid var(--gold); color: var(--gold); font: italic 700 11px/16px Georgia, serif; text-align: center; }
.ibig .card { min-height: 150px; }
.moves { margin: 4px 0 0; padding-left: 18px; display: grid; gap: 4px; font-size: 14.5px; } .moves b { color: var(--gold); font-weight: 700; }
.rec { color: var(--teal); font: 700 12px var(--ui); letter-spacing: .08em; text-transform: uppercase; font-style: normal; }
em.rec { margin-left: 6px; padding: 1px 6px; border: 1px solid var(--teal); border-radius: 10px; vertical-align: 2px; }
.opt.recd { border-left-color: var(--teal); box-shadow: 0 0 12px rgba(47, 154, 150, .3); }
.gain { color: #cfe9e5 !important; }
span.ib.ib { display: block; padding: 0; margin: 0; gap: 0; flex: none; width: 22px; height: 22px; font: italic 700 13px/20px Georgia, serif; color: var(--gold); letter-spacing: 0; text-transform: none; }

.mapcard span.ib.ib { top: auto; bottom: 6px; right: 6px; width: 20px; height: 20px; font-size: 12px; line-height: 18px; }
.mapcard small { padding-right: 28px; }
.tools span.ib.ib, .ctl span.ib.ib, .heat span.ib.ib { display: none; }
.prog span[data-i] { cursor: help; text-decoration: underline dotted rgba(226, 176, 74, .5); text-underline-offset: 3px; }

.nameform { display: flex; gap: 8px; margin-bottom: 8px; } .nameform input { flex: 1; min-width: 0; font: 16px var(--body, serif); padding: 8px 10px; border-radius: 6px; border: 1px solid rgba(226, 176, 74, .45); background: rgba(5, 8, 14, .6); color: inherit; }
.herob span.mast { padding: 0; display: block; }

/* Coach, records, achievements */
.coach { background: rgba(47, 154, 150, .16); border: 1px solid var(--teal); border-radius: 8px; padding: 8px 10px; font-size: 15px; margin-bottom: 6px; animation: coachin .4s both; }
.coach b { color: var(--teal); font: 700 13px var(--ui); margin-right: 4px; }
@keyframes coachin { from { opacity: 0; transform: translateY(6px); } }
.coach-hl { outline: 2px solid var(--teal); outline-offset: 3px; border-radius: 10px; animation: coachpulse 1.4s ease-in-out infinite; }
@keyframes coachpulse { 50% { outline-color: rgba(47, 154, 150, .25); } }
@media (prefers-reduced-motion: reduce) { .coach, .coach-hl { animation: none; } }
.titlebar { display: flex; gap: 8px; flex-wrap: wrap; } .titlebar .b { flex: 1 1 auto; }
.achs, .hrec { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.achs li { display: grid; grid-template-columns: 1fr auto; gap: 0 10px; padding: 8px 10px; border-radius: 6px; background: rgba(22, 32, 47, .9); border-left: 3px solid var(--mute); opacity: .7; }
.achs li.on { border-left-color: var(--gold); opacity: 1; } .achs b { font: 700 15px var(--display); } .achs small { grid-column: 1; color: var(--mute); font-size: 13.5px; } .achs em { grid-column: 2; grid-row: 1 / span 2; align-self: center; font: 12px var(--ui); color: var(--gold); font-style: normal; }
.hrec li { display: flex; justify-content: space-between; gap: 10px; font-size: 15px; border-bottom: 1px solid rgba(226, 176, 74, .15); padding: 4px 0; } .hrec small { color: var(--mute); text-align: right; }

.hand { position: relative; }
.hand .coach { position: absolute; left: 4px; right: 4px; bottom: calc(100% + 14px); z-index: 6; margin: 0; background: rgba(10, 30, 34, .96); box-shadow: 0 6px 18px rgba(0, 0, 0, .5); }

.bk { width: 100%; box-sizing: border-box; height: 64px; font: 11px/1.3 ui-monospace, monospace; background: rgba(5, 8, 14, .6); color: var(--mute); border: 1px solid rgba(226, 176, 74, .3); border-radius: 6px; padding: 6px; resize: none; }

.herob.locked { opacity: .62; } .herob.locked .himg { filter: grayscale(.85) brightness(.7); } .herob.locked em { color: var(--gold); font-style: normal; font-size: 14px; }

.tt .subt { margin: -2px 0 6px; font: 700 15px var(--ui); letter-spacing: .32em; text-transform: uppercase; color: var(--gold); }
/* Skill picker */
.skh { margin: 10px 0 4px; font: 12.5px var(--ui); letter-spacing: .12em; text-transform: uppercase; color: var(--mute); }
.skg { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.skb { position: relative; text-align: left; background: rgba(22, 32, 47, .9); border: 1px solid rgba(226, 176, 74, .25); border-radius: 8px; padding: 9px 30px 9px 10px; color: var(--paper); min-height: 54px; }
.skb b { display: block; font: 700 15px/1.2 var(--display); color: var(--paper); }
.skb small { display: block; margin-top: 2px; font: 12px/1.25 var(--ui); color: var(--mute); }
.skb.on { border-color: var(--gold); background: rgba(90, 64, 20, .55); box-shadow: 0 0 12px rgba(226, 176, 74, .35); }
.skb.on b { color: var(--gold); } .skb.on small { color: var(--gold); }
.skb.lk { opacity: .6; } .skb.lk b { color: var(--mute); } .skb.f { opacity: 1; border-color: var(--teal); }
.ctl .acts { display: grid; gap: 4px; min-width: 0; } .ctl .acts.two { grid-template-columns: 1fr 1fr; }
.ctl .acts .b { min-width: 0; } .ctl .acts.two .b b { font-size: 13px; line-height: 1.1; } .ctl .acts.two .b small { font-size: 11px; }
.rule.season { display: grid; grid-template-columns: 64px 1fr; gap: 12px; align-items: start; border-color: var(--gold); }
.rule.season .rel { width: 64px; height: 64px; border-radius: 8px; object-fit: cover; }
/* Community */
.tabs { display: flex; gap: 6px; margin: 4px 0 10px; flex-wrap: wrap; }
.share { display: flex; gap: 6px; margin-top: 8px; } .share input { flex: 1; min-width: 0; font: 14px var(--ui); padding: 8px 10px; border-radius: 6px; border: 1px solid rgba(226, 176, 74, .35); background: rgba(10, 16, 26, .8); color: var(--paper); }
.nameform input + input { margin-left: 0; }
.scr { overflow-x: hidden; }
/* Feats */
.feats { display: grid; gap: 6px; }
.feat { display: grid; grid-template-columns: 22px 1fr auto; gap: 8px; align-items: baseline; padding: 8px 10px; border-radius: 6px; background: rgba(22, 32, 47, .6); font-size: 14.5px; color: var(--mute); }
.feat b { color: var(--mute); font-size: 16px; } .feat em { font: 12px var(--ui); font-style: normal; color: var(--mute); }
.feat.on { color: var(--paper); background: rgba(90, 64, 20, .35); } .feat.on b { color: var(--gold); }
.herob.gold { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold), 0 0 16px rgba(226, 176, 74, .35); }
/* Codex */
.cxgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.cx { display: grid; gap: 4px; justify-items: center; text-align: center; background: rgba(22, 32, 47, .7); border: 1px solid rgba(226, 176, 74, .25); border-radius: 8px; padding: 6px; color: var(--paper); min-width: 0; }
.cx small { font: 11.5px/1.2 var(--ui); color: var(--paper); overflow-wrap: anywhere; }
.cximg { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; max-width: 100%; }
.cx.un { opacity: .45; } .cx.un small { color: var(--mute); }
.cximg.q { display: grid; place-items: center; font: 700 26px var(--display); color: var(--mute); background: rgba(10, 16, 26, .8); }
.cxheroes { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 4px; }
.kimg.big { width: 100%; max-width: 320px; height: auto; display: block; margin: 0 auto 8px; border-radius: 8px; }
/* First-time tips */
.tipbar { position: fixed; left: 50%; transform: translateX(-50%); top: calc(64px + env(safe-area-inset-top, 0px)); width: min(520px, calc(100% - 24px)); z-index: 40; display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 10px; background: rgba(14, 22, 34, .97); border: 1px solid var(--gold); box-shadow: 0 8px 24px rgba(0, 0, 0, .5); font-size: 14px; line-height: 1.35; color: var(--paper); }
.tipbar b { color: var(--gold); margin-right: 4px; font: 700 11px var(--ui); letter-spacing: .1em; text-transform: uppercase; } .tipbar span { flex: 1; min-width: 0; }

/* ===== Readability pass (Phase 2-4 night): tidier grids, clearer sections, bigger touch targets ===== */
.titlebar { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; } .titlebar .b { min-height: 48px; font-size: 15px; letter-spacing: .06em; }
.h3 { margin-top: 6px; padding-bottom: 6px; border-bottom: 1px solid rgba(226, 176, 74, .18); }
/* Heroes: a two-column gallery instead of a long list */
.heroes { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.herob { grid-template-columns: 1fr; grid-template-rows: auto 1fr; gap: 0; position: relative; }
.herob .himg { width: 100%; height: auto; aspect-ratio: 4 / 4.4; object-position: 50% 12%; }
.herob span { padding: 8px 10px 10px; gap: 4px; }
.herob b { font-size: 17px; line-height: 1.1; }
.herob small { font-size: 11.5px; line-height: 1.25; letter-spacing: .05em; }
.herob em { font-size: 13px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.herob.locked em { font-size: 12.5px; -webkit-line-clamp: 3; }
.herob span.mast { margin-top: 2px; }
.herob span.ib.ib { position: absolute; top: 6px; right: 6px; background: rgba(13, 20, 32, .85); }
/* Sections read as separate cards with breathing room */
.daily { gap: 12px; }
.rule { border-radius: 0 8px 8px 0; padding: 10px 14px; } .rule p { line-height: 1.45; }
.rule b + small, .rule small { color: var(--mute); }
.kit h2 { line-height: 1.1; }
.note { line-height: 1.45; }
/* Skills: clearer group labels */
.skh { padding-top: 6px; border-top: 1px dashed rgba(226, 176, 74, .18); }
/* Modal sheets: comfortable width and scroll */
.sheet { max-height: calc(100% - 24px); overflow-y: auto; }
.sheet h2 { margin-bottom: 4px; }
/* Buttons in stacks get a little more separation */
.stack { gap: 8px; }
.opt { line-height: 1.3; }
@media (min-width: 700px) { .heroes { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); } }
.kit > div { min-width: 0; } .kit p { overflow-wrap: anywhere; }
.loadout { display: grid; gap: 8px; }
.lo { display: grid; grid-template-columns: 74px 1fr; gap: 10px; align-items: start; padding: 10px 12px; border-radius: 8px; background: rgba(22, 32, 47, .75); border: 1px solid rgba(226, 176, 74, .18); }
.lo i { font: 10.5px/1.2 var(--ui); font-style: normal; letter-spacing: .1em; text-transform: uppercase; color: var(--gold); padding-top: 3px; }
.lo b { font: 700 16px var(--display); color: var(--paper); } .lo small { font: 12px var(--ui); color: var(--teal); }
.lo p { font-size: 14px; line-height: 1.4; color: #d8cdb5; margin-top: 2px; }
/* Map header: the region name gets its own line under the tools so long names never fight the buttons */
.banner .mt { flex-wrap: wrap; } .banner .mt > div:first-child { order: 2; flex: 1 1 100%; min-width: 0; } .banner .mt .tools { order: 1; margin-left: auto; }
.banner .mt h2 { font-size: clamp(22px, 6.4vw, 30px); line-height: 1.08; text-wrap: balance; }
.mapcard b { line-height: 1.12; }

.lore { border-left: 2px solid var(--gold); padding: 6px 10px; margin: 8px 0; background: rgba(90, 64, 20, .18); } .lore small { font: 11.5px var(--ui); letter-spacing: .08em; color: var(--gold); text-transform: uppercase; } .lore p { font-size: 14.5px; line-height: 1.45; font-style: italic; margin-top: 4px; }
/* Hand: card names never take more than two lines (tap shows the full card) */
.mini b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.hand { justify-content: safe center; padding-inline: 2px; } .hand:has(.mini:nth-child(6)) .mini { margin-right: -16px; } .hand:has(.mini:nth-child(6)) .mini:last-child { margin-right: 0; }
.rewards { align-items: flex-start; align-content: flex-start; }
/* PineLion Studios */
.studio { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 28px auto 8px; opacity: .85; }
.studio .simg { width: 52px; height: 52px; border-radius: 50%; box-shadow: 0 0 0 1px rgba(226, 176, 74, .5); }
.studio span { display: flex; flex-direction: column; line-height: 1.15; text-align: left; }
.studio small { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; opacity: .7; }
.studio b { font-family: Cinzel, Georgia, serif; color: #e2b04a; letter-spacing: .06em; font-size: 15px; }
.splash { position: fixed; inset: 0; z-index: 999; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; background: #12141e; cursor: pointer; transition: opacity .45s; }
.splash.out { opacity: 0; }
.splash .splimg { width: min(46vw, 220px); height: min(46vw, 220px); border-radius: 50%; margin-bottom: 14px; box-shadow: 0 0 40px rgba(226, 176, 74, .25); animation: splscale 1.9s ease-out both; }
.splash b { font-family: Cinzel, Georgia, serif; font-size: clamp(28px, 8vw, 44px); color: #e2b04a; letter-spacing: .08em; text-transform: uppercase; }
.splash small { font-family: Cinzel, Georgia, serif; letter-spacing: .35em; text-transform: uppercase; color: #f0e4cd; font-size: 12px; }
@keyframes splscale { from { transform: scale(.94); } }
@media (prefers-reduced-motion: reduce) { .splash .splimg { animation: none; } }

/* ---------- Main menu ---------- */
.scr.menu { position: relative; isolation: isolate; gap: 0; padding-block: max(12px, env(safe-area-inset-top, 0px)) max(14px, env(safe-area-inset-bottom, 0px)); }
.menu .mbg { position: fixed; inset: 0; z-index: -2; overflow: hidden; background: #0b0d16; }
.menu .mbgimg { width: 100%; height: 100%; object-fit: cover; object-position: 50% 38%; filter: saturate(1.08) brightness(.6); transform-origin: 50% 40%; animation: kb 46s ease-in-out infinite alternate; }
.menu .mvig { position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 28%, transparent 0 30%, rgba(8, 10, 18, .55) 72%), linear-gradient(to bottom, rgba(8, 10, 18, .35), rgba(8, 10, 18, .05) 26%, rgba(12, 14, 24, .78) 52%, #0f121c 78%); }
.menu .mfx { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
@keyframes kb { from { transform: scale(1.08) translate(-1.6%, .4%); } to { transform: scale(1.2) translate(1.6%, -1.8%); } }
@property --ink { syntax: '<percentage>'; inherits: false; initial-value: 140%; }
.menu.enter .mbg { -webkit-mask-image: radial-gradient(circle at 50% 36%, #000 var(--ink), transparent calc(var(--ink) + 18%)); mask-image: radial-gradient(circle at 50% 36%, #000 var(--ink), transparent calc(var(--ink) + 18%)); animation: inkIn 1.7s cubic-bezier(.3, .6, .2, 1) both; }
@keyframes inkIn { from { --ink: 0%; } to { --ink: 140%; } }
.mtop { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.acc { display: flex; align-items: center; gap: 9px; min-height: 44px; padding: 5px 14px 5px 5px; border-radius: 999px; background: rgba(14, 17, 27, .62); border: 1px solid rgba(226, 176, 74, .35); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); max-width: 70%; }
.av { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: #222638; color: var(--paper); }
.av svg { width: 17px; height: 17px; } .av.google { background: #fff; } .av.apple { background: #000; color: #fff; }
.acc span { display: flex; flex-direction: column; line-height: 1.1; text-align: left; min-width: 0; }
.acc small { font: 10.5px var(--ui); letter-spacing: .12em; text-transform: uppercase; color: var(--mute); }
.acc b { font: 15px var(--display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inkp { display: flex; align-items: baseline; gap: 5px; padding: 8px 14px; border-radius: 999px; background: rgba(14, 17, 27, .62); border: 1px solid rgba(226, 176, 74, .35); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.inkp b { font: 700 17px var(--display); color: var(--gold); } .inkp small { font: 12px var(--ui); color: var(--mute); letter-spacing: .1em; }
.mlogo { text-align: center; margin-top: auto; padding: 6vh 0 3.2vh; }
.mlogo small { font: 13px var(--ui); letter-spacing: .3em; color: var(--gold); text-transform: uppercase; opacity: .85; }
.mlogo h1 { font-size: clamp(48px, 15vw, 82px); line-height: 1; letter-spacing: .03em; margin: 6px 0 2px; color: #f1d58e; background: linear-gradient(100deg, #e2b04a 0 38%, #fff4d2 48%, #ffe9a8 52%, #e2b04a 62% 100%); background-size: 260% 100%; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; filter: drop-shadow(0 3px 0 #000) drop-shadow(0 0 22px rgba(226, 176, 74, .35)); animation: shine 7s ease-in-out infinite; }
@keyframes shine { 0%, 52% { background-position: 100% 0; } 82%, 100% { background-position: 0 0; } }
.mlogo .subt { font: 15px var(--ui); letter-spacing: .34em; text-transform: uppercase; color: var(--paper); opacity: .85; }
.mnav { display: grid; gap: 9px; width: 100%; max-width: 440px; margin: 0 auto; }
.mi { position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: flex-start; gap: 1px; text-align: left; padding: 12px 18px; min-height: 58px; border-radius: 14px; border: 1px solid rgba(226, 176, 74, .3); background: linear-gradient(180deg, rgba(28, 33, 50, .84), rgba(17, 20, 32, .88)); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); box-shadow: 0 8px 22px rgba(0, 0, 0, .35); transition: transform .15s ease, border-color .2s; }
.mi b { font: 700 18px var(--display); color: #f3dfb0; letter-spacing: .03em; }
.mi small { font-size: 13.5px; color: var(--mute); line-height: 1.3; }
.mi.hot { border-color: rgba(226, 176, 74, .8); background: linear-gradient(180deg, rgba(160, 36, 44, .94), rgba(96, 18, 28, .94)); box-shadow: 0 0 26px rgba(214, 59, 69, .28), 0 8px 22px rgba(0, 0, 0, .4); }
.mi.hot small { color: #f6d7cf; }
.mi.ev { border-color: rgba(47, 154, 150, .8); }
.mi::after { content: ''; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255, 230, 170, .13) 50%, transparent 70%); transform: translateX(-110%); transition: transform .7s ease; pointer-events: none; }
.mi:hover::after, .mi:focus-visible::after { transform: translateX(110%); }
.mi:active { transform: scale(.985); }
.menu.enter .mlogo { animation: logoIn 1.1s cubic-bezier(.2, .8, .2, 1) both .15s; }
.menu.enter .mi { animation: miIn .6s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i, 0) * 75ms + 420ms); }
.menu.enter .mtop, .menu.enter .studio { animation: fadeIn .8s ease both .9s; }
@keyframes logoIn { from { opacity: 0; transform: scale(.86); filter: blur(8px); } }
@keyframes miIn { from { opacity: 0; transform: translateY(16px) scale(.94); } }
@keyframes fadeIn { from { opacity: 0; } }
.menu .studio { margin: 22px auto 0; }
.studio em { font: 11px var(--ui); color: var(--mute); font-style: normal; opacity: .7; align-self: flex-end; }
/* New Night page */
.scr.title.play .titlebox, .scr.title.play .titlebar { display: none; }
.backbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.backbar span { font: 13px var(--ui); letter-spacing: .14em; color: var(--gold); }
/* Gallery */
.gal { display: grid; gap: 12px; }
.gt { position: relative; overflow: hidden; display: flex; align-items: flex-end; min-height: 128px; padding: 0; border-radius: 14px; border: 1px solid rgba(226, 176, 74, .38); background: #141826; text-align: left; transition: transform .25s ease-out; will-change: transform; box-shadow: 0 10px 26px rgba(0, 0, 0, .45); }
.gt .gtimg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; filter: brightness(.58) saturate(1.05); transition: transform .5s ease, filter .3s; }
.gt:hover .gtimg { transform: scale(1.05); filter: brightness(.68); }
.gt .glint { position: absolute; inset: 0; background: radial-gradient(circle at var(--gx, 50%) var(--gy, 40%), rgba(255, 226, 160, .25), transparent 48%); opacity: 0; transition: opacity .25s; pointer-events: none; }
.gt:hover .glint { opacity: 1; }
.gt span { position: relative; width: 100%; padding: 26px 16px 13px; display: flex; flex-direction: column; background: linear-gradient(to top, rgba(10, 12, 20, .94), rgba(10, 12, 20, .5) 65%, transparent); }
.gt b { font: 700 20px var(--display); color: #f3dfb0; } .gt small { font-size: 13.5px; color: var(--mute); }
.gback { align-self: flex-start; }
.gspark { position: fixed; width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%; background: radial-gradient(circle, #fff7da 0 30%, #e2b04a 55%, transparent 72%); pointer-events: none; animation: gsp .8s cubic-bezier(.15, .7, .3, 1) both; }
@keyframes gsp { from { opacity: 1; transform: translate(0, 0) scale(1.2); } to { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(.2); } }
.ends { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.endt { display: flex; flex-direction: column; gap: 6px; } .endt b { font: 15px var(--display); color: var(--paper); }
.endimg { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 8px; border: 1px solid rgba(226, 176, 74, .35); }
.endt.un .endimg { display: grid; place-items: center; background: #151a28; font: 700 40px var(--display); color: var(--mute); } .endt.un b { color: var(--mute); }
/* Unlocks */
.urow { display: flex; align-items: center; gap: 12px; text-align: left; padding: 8px 10px; border-radius: 10px; background: rgba(22, 32, 47, .9); border: 1px solid rgba(226, 176, 74, .18); }
.urow > span:last-child { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.urow b { font: 700 16px var(--display); } .urow small { font-size: 13px; color: var(--mute); line-height: 1.3; }
.urow.locked { opacity: .72; } .urow.locked .uimg { filter: grayscale(1) brightness(.6); }
.uimg { flex: none; width: 48px; height: 48px; border-radius: 50%; object-fit: cover; object-position: 50% 20%; border: 1px solid rgba(226, 176, 74, .45); }
.uimg.q { display: grid; place-items: center; background: #151a28; font: 700 22px var(--display); color: var(--mute); }
.ubar { display: block; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .08); overflow: hidden; } .ubar u { display: block; height: 100%; background: linear-gradient(90deg, #a77a26, var(--gold)); }
.pips { display: flex; gap: 6px; justify-content: center; } .pips i { width: 22px; height: 8px; border-radius: 4px; background: rgba(255, 255, 255, .1); } .pips i.on { background: linear-gradient(90deg, #d63b45, #ff9a3c); box-shadow: 0 0 8px rgba(255, 120, 60, .5); }
/* Options */
.olist { display: flex; flex-direction: column; }
.orow { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 2px; border-bottom: 1px solid rgba(255, 255, 255, .07); }
.orow span { display: flex; flex-direction: column; } .orow b { font: 700 17px var(--display); } .orow small { font-size: 13.5px; color: var(--mute); line-height: 1.3; }
.tog { flex: none; min-width: 64px; min-height: 36px; border-radius: 999px; border: 1px solid rgba(226, 176, 74, .45); background: #1b2030; color: var(--mute); font: 15px var(--ui); letter-spacing: .06em; }
.tog.on { background: var(--gold); color: #1d1608; border-color: var(--gold); font-weight: 700; }
.opt.on { border-left-color: var(--teal); }
.opt.danger b { color: #ff8b95; } .opt.danger { border-left-color: var(--crimson); } .opt.danger.on { background: rgba(163, 20, 42, .3); }
.about { display: flex; gap: 12px; align-items: center; } .about .simg { width: 56px; height: 56px; border-radius: 50%; flex: none; } .about p { font-size: 14px; color: var(--mute); }
/* Support */
.kinds { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.kind { display: flex; flex-direction: column; align-items: flex-start; text-align: left; gap: 2px; padding: 10px 12px; border-radius: 10px; border: 1px solid rgba(226, 176, 74, .22); background: rgba(22, 32, 47, .9); }
.kind b { font: 700 16px var(--display); } .kind small { font-size: 12.5px; color: var(--mute); line-height: 1.25; }
.kind.on { border-color: var(--gold); background: rgba(226, 176, 74, .14); box-shadow: inset 0 0 0 1px var(--gold); }
.fbtext, .fbmail { width: 100%; font: 16px var(--body); color: var(--paper); background: #0f1622; border: 1px solid rgba(226, 176, 74, .35); border-radius: 10px; padding: 10px 12px; }
.fbtext { min-height: 140px; resize: vertical; }
.fbtext:focus, .fbmail:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
.fbn { text-align: right; font: 12px var(--ui); color: var(--mute); margin-top: -6px; }
.chkrow { display: flex; align-items: flex-start; gap: 10px; text-align: left; font-size: 14px; color: var(--mute); padding: 4px 0; }
.chk { flex: none; width: 20px; height: 20px; margin-top: 1px; border-radius: 5px; border: 1px solid var(--gold); display: grid; place-items: center; }
.chk.on { background: var(--gold); } .chk.on::after { content: ''; width: 9px; height: 5px; border: 2px solid #1d1608; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
/* Account */
.accnow { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 12px; background: rgba(22, 32, 47, .9); border: 1px solid rgba(226, 176, 74, .25); }
.accnow > span { display: flex; flex-direction: column; gap: 2px; } .accnow b { font: 700 17px var(--display); } .accnow small { font-size: 13.5px; color: var(--mute); line-height: 1.35; }
.accnow .av { width: 42px; height: 42px; } .accnow .av svg { width: 20px; height: 20px; }
.prov { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 50px; padding: 0 16px; border-radius: 10px; font: 600 17px -apple-system, system-ui, 'Segoe UI', Roboto, sans-serif; position: relative; }
.prov.apple { background: #000; color: #fff; border: 1px solid #333; } .prov.google { background: #fff; color: #1f1f1f; border: 1px solid #dadce0; }
.prov.guest { border: 1px solid rgba(226, 176, 74, .45); color: var(--paper); font: 16px var(--ui); letter-spacing: .04em; }
.prov .pico { display: grid; place-items: center; width: 20px; height: 20px; } .prov .pico svg { width: 18px; height: 18px; }
.prov em { position: absolute; right: 10px; font: 11px var(--ui); font-style: normal; letter-spacing: .1em; text-transform: uppercase; padding: 3px 7px; border-radius: 999px; background: rgba(226, 176, 74, .9); color: #1d1608; }
.prov:disabled { opacity: .6; }
.cmp { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; } .cmp > div { display: flex; flex-direction: column; gap: 2px; padding: 12px; border-radius: 10px; background: rgba(22, 32, 47, .9); border: 1px solid rgba(226, 176, 74, .25); }
.cmp i { font: 12px var(--ui); letter-spacing: .1em; text-transform: uppercase; color: var(--gold); font-style: normal; } .cmp b { font: 700 19px var(--display); } .cmp small { color: var(--mute); }
html.calm .menu .mbgimg, html.calm .mlogo h1 { animation: none; }
@media (prefers-reduced-motion: reduce) { .menu .mbgimg, .mlogo h1, .menu.enter .mbg, .menu.enter .mi, .menu.enter .mlogo, .menu.enter .mtop, .menu.enter .studio { animation: none !important; } .gt { transition: none; } }
@media (max-height: 760px) { .mlogo { padding: 3vh 0 2.2vh; } .mi { min-height: 50px; padding: 9px 16px; } .mi small { font-size: 12.5px; } .mnav { gap: 7px; } }
.langs { display: flex; gap: 6px; flex: none; }
