:root {
  --ink: #070707;
  --panel: #101011;
  --panel2: #151516;
  --line: rgba(233, 228, 216, 0.14);
  --line2: rgba(233, 228, 216, 0.3);
  --bone: #e9e4d8;
  --bone2: #c9c4b8;
  --muted: #9b968b;
  --dim: #6b675f;
  --gold: #c9a24a;
  --gold-l: #e8c873;
  --gold-t: #f0dca6;
  --red: #a8231c;
  --red-l: #d0473d;
  --green: #6f8a58;
  --serif: 'EB Garamond', Georgia, serif;
  --black: 'Grenze Gotisch', 'EB Garamond', serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: #000; color: var(--bone); font-family: var(--serif); }
body { overscroll-behavior: none; }
button { font-family: inherit; color: inherit; }
button:focus-visible { outline: 1px solid var(--gold-l); outline-offset: 2px; }
[hidden] { display: none !important; }

#app { position: relative; width: 100%; max-width: 430px; height: 100vh; height: 100dvh; margin: 0 auto; overflow: hidden; background: var(--ink); user-select: none; -webkit-user-select: none; }
@media (min-width: 600px) { #app { border-left: 1px solid #1c1b19; border-right: 1px solid #1c1b19; } }
#game { position: absolute; inset: 0; touch-action: none; }
#game canvas { display: block; touch-action: none; }

.px { image-rendering: pixelated; width: 24px; height: 24px; }
.sc { font-variant-caps: all-small-caps; letter-spacing: 2px; }
.bl { font-family: var(--black); font-weight: 700; line-height: 1; }
.num { font-variant-numeric: lining-nums tabular-nums; }
.gold { color: var(--gold-l); }
.red { color: var(--red-l); }
.muted { color: var(--muted); }
.dim { color: var(--dim); }

/* ---------------------------------------------------------------- HUD */
#hud { position: absolute; inset: 0; pointer-events: none; }
#hud > * { pointer-events: auto; }
#hud::before { content: ''; position: absolute; left: 0; top: 0; right: 0; height: 160px; background: linear-gradient(180deg, rgba(5,5,5,.92), rgba(5,5,5,.55) 60%, rgba(5,5,5,0)); pointer-events: none; }
#hud::after { content: ''; position: absolute; left: 0; bottom: 0; right: 0; height: 240px; background: linear-gradient(0deg, rgba(5,5,5,.9), rgba(5,5,5,.4) 55%, rgba(5,5,5,0)); pointer-events: none; }
.hud-top { position: absolute; left: 12px; right: 12px; top: calc(12px + env(safe-area-inset-top)); display: flex; align-items: center; gap: 10px; z-index: 2; }
.avatar { position: relative; width: 54px; height: 54px; flex: none; padding: 0; border-radius: 50%; border: 1px solid var(--gold); background: #1a1714; overflow: visible; cursor: pointer; }
.avatar .face { position: relative; display: block; width: 54px; height: 54px; border-radius: 50%; overflow: hidden; }
.avatar .face > img { width: 54px; height: 54px; object-fit: cover; object-position: 50% 18%; display: block; }
.avatar .look.in-avatar { position: absolute; inset: 0; border-radius: 50%; }
.avatar .look.in-avatar img { width: 170%; height: 170%; left: -35%; top: -12%; }
.fcard .look.in-fcard { position: absolute; inset: 0; aspect-ratio: auto; background: none; }
.fcard .look.in-fcard img { object-position: 50% 20%; }
.avatar .lvl { position: absolute; right: -6px; bottom: -4px; min-width: 24px; height: 22px; padding: 0 4px; background: #0b0b0b; border: 1px solid var(--gold); color: var(--gold-l); font-size: 15px; line-height: 20px; text-align: center; }
.hud-res { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.hud-money { display: flex; gap: 14px; font-size: 17px; }
.res { display: flex; align-items: center; gap: 4px; font-variant-numeric: lining-nums tabular-nums; }
.res b { font-weight: 500; }
.hud-xp { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.bar { height: 6px; background: #17140c; border: 1px solid #3a3018; }
.bar i { display: block; height: 100%; width: 0; background: linear-gradient(180deg, #e8c873, #9a6e1c); transition: width .3s; }
.bar.hp { background: #1c1010; border-color: #3a1814; height: 10px; }
.bar.hp i { background: linear-gradient(180deg, #c8342a, #7a1612); }
.hud-xp .bar { width: 110px; }
.icon-btn { width: 46px; height: 46px; flex: none; display: flex; align-items: center; justify-content: center; background: rgba(8,8,8,.7); border: 1px solid var(--line2); color: var(--bone); cursor: pointer; }
.hud-stack { position: absolute; left: 12px; right: 12px; top: calc(82px + env(safe-area-inset-top)); display: flex; flex-direction: column; align-items: stretch; gap: 8px; z-index: 2; pointer-events: none; }
.hud-stack > * { pointer-events: auto; }
.hud-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; z-index: 2; pointer-events: none; }
.hud-row > * { pointer-events: auto; }
.heat { display: flex; align-items: center; gap: 6px; padding: 5px 9px 5px 5px; background: rgba(8,8,8,.72); border: 1px solid rgba(168,35,28,.5); color: var(--red-l); font-size: 14px; }
.hbar { width: 74px; height: 8px; background: #2a1614; border: 1px solid #4a201c; }
.hbar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #8a1f18, #e0352b); transition: width .3s; }
.heat b { font-weight: 500; font-size: 13px; color: #f0c8c0; min-width: 34px; text-align: right; }
.segs { display: flex; gap: 3px; }
.segs i { width: 13px; height: 8px; background: #2a1614; border: 1px solid #4a201c; }
.segs i.on { background: #c8342a; border-color: #c8342a; }
.heat.hot { animation: pulse 1s infinite alternate; }
@keyframes pulse { to { box-shadow: 0 0 14px rgba(208,71,61,.6); } }
.hud-right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.hud-right > * { pointer-events: auto; }
.tracker.daily { border-left-color: #f0c95a; }
.tracker.daily .trk-name { font-size: 15px; }
.tracker.daily .trk-time b { font-size: 13px; color: #f0c95a; }
.tracker { max-width: 190px; display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 7px 10px; background: rgba(8,8,8,.75); border: none; border-left: 2px solid var(--gold); text-align: left; cursor: pointer; }
.tracker .sc { font-size: 12px; color: var(--muted); }
.trk-name { font-size: 16px; line-height: 1.15; }
.trk-time { display: flex; align-items: center; gap: 4px; color: var(--gold-l); font-size: 15px; font-variant-numeric: lining-nums tabular-nums; }
.tracker.ready { border-left-color: var(--gold-l); box-shadow: 0 0 16px rgba(201,162,74,.35); }
.tracker.ready .sc { color: var(--gold-l); }
.zoom { position: absolute; right: 12px; bottom: calc(304px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 6px; z-index: 2; }
.zoom button { width: 44px; height: 44px; background: rgba(8,8,8,.75); border: 1px solid var(--line2); color: var(--bone); font-size: 24px; line-height: 1; cursor: pointer; }

/* map labels */
#labels { position: absolute; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; }
.wl { position: absolute; left: 0; top: 0; padding: 2px 7px; background: rgba(8,8,8,.8); border: 1px solid rgba(233,228,216,.32); color: var(--bone); font-size: 13px; line-height: 1.2; white-space: nowrap; will-change: transform; }
.wl b { color: var(--gold-l); margin-right: 4px; }
.wl-shop { border-color: rgba(233,228,216,.5); }
.wl-service { border-color: rgba(201,162,74,.7); color: #f0e6cc; }
.wl-mine { border-color: var(--gold); color: var(--gold-l); }
.wl-rival { border-color: rgba(208,71,61,.8); color: #e6a49c; }
.wl-free { border-color: #6b675f; color: var(--muted); }
.wl-arena { border-color: var(--gold); color: var(--gold-t); }
.wl-place { border-color: rgba(233,228,216,.22); color: var(--bone2); }
.wl-district { background: none; border: none; padding: 0; font-family: var(--black); font-size: 22px; color: rgba(233,228,216,.82); text-shadow: 0 2px 3px #000, 0 0 10px #000; }
.wl-turf { font-size: 13px; }
.wl-turf.mine { border-width: 2px; }
.wl-turf.free { border-style: dashed; border-color: #6b675f; color: var(--muted); }
.wl-dim { background: rgba(8,8,8,.55); border-color: transparent; color: #8a857a; font-size: 12px; }
.wl-npc { border-color: rgba(233,228,216,.55); font-size: 14px; }
.wl-boss { border-color: rgba(208,71,61,.8); color: #f0d0c8; font-size: 14px; }
.wl-boss b { color: var(--red-l); }
.wl-me { border-color: var(--gold); color: var(--gold-l); font-size: 12px; }
.wl.ready { border-color: var(--gold-l); color: var(--gold-t); box-shadow: 0 0 12px rgba(201,162,74,.6); }

.poi-tag { position: absolute; left: 50%; bottom: calc(250px + env(safe-area-inset-bottom)); transform: translateX(-50%); padding: 4px 10px; background: rgba(8,8,8,.85); border: 1px solid var(--line2); font-size: 15px; white-space: nowrap; z-index: 2; pointer-events: none; }
.joystick { position: absolute; left: 24px; bottom: calc(92px + env(safe-area-inset-bottom)); width: 124px; height: 124px; border-radius: 50%; border: 1px solid rgba(233,228,216,.28); background: radial-gradient(circle, rgba(233,228,216,.08), rgba(233,228,216,.02) 70%); z-index: 2; touch-action: none; }
.knob { position: absolute; left: 35px; top: 35px; width: 54px; height: 54px; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #3a3835, #121212); border: 1px solid rgba(233,228,216,.4); box-shadow: 0 4px 12px rgba(0,0,0,.7); }
.action { position: absolute; right: 24px; bottom: calc(106px + env(safe-area-inset-bottom)); width: 96px; height: 96px; border-radius: 50%; background: radial-gradient(circle, #1f1b14, #0b0a08 70%); border: 1px solid var(--gold); box-shadow: 0 0 22px rgba(201,162,74,.35); color: var(--gold-t); font-size: 18px; line-height: 1.1; padding: 6px; z-index: 2; cursor: pointer; }
.hud-left { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.buffs { display: flex; gap: 5px; }
.buff { display: flex; align-items: center; gap: 4px; padding: 3px 7px 3px 4px; background: rgba(8,8,8,.78); border: 1px solid var(--line2); font-size: 13px; color: var(--bone); line-height: 1; }
.buff svg { width: 15px; height: 15px; }
.buff b { font-variant-numeric: tabular-nums; }
.buff small { color: #9b968b; font-variant-numeric: tabular-nums; }
.buff.red { border-color: rgba(212,42,34,.7); }
.buff.blue { border-color: rgba(47,111,224,.75); }
.buff.green { border-color: rgba(60,207,78,.6); }
.buff.shadow { border-color: rgba(185,180,168,.55); }
.buff.daily { border-color: rgba(240,201,90,.6); }
.buff.daily small { color: #f0c95a; }
/* daily missions: a chest next to the money with today's progress */
.icon-btn.chest { position: relative; color: #f0c95a; }
.icon-btn.chest .badge { position: absolute; right: -6px; bottom: -6px; min-width: 22px; height: 18px; padding: 0 4px; background: #0b0b0b; border: 1px solid rgba(240,201,90,.7); color: #f0c95a; font-size: 12px; line-height: 16px; text-align: center; font-variant-numeric: lining-nums tabular-nums; }
.icon-btn.chest.ready { box-shadow: 0 0 14px rgba(240,201,90,.45); }
.icon-btn.chest.ready .badge { background: #f0c95a; color: #0b0b0b; }
/* gangs */
.gtag { flex: none; display: inline-flex; align-items: center; justify-content: center; min-width: 52px; height: 52px; padding: 0 6px; border: 2px solid; background: #0b0b0c; font-family: var(--black); font-size: 20px; letter-spacing: 1px; }
.gtag.free { border: 1px dashed #6b675f; color: #6b675f; }
.gtag.big { min-width: 64px; height: 64px; font-size: 26px; }
.card.turf.mine { border-color: rgba(201,162,74,.6); }
.ghead { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.ghead .s { font-size: 15px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 4px 9px; border: 1px solid rgba(201,162,74,.6); color: var(--gold-l); font-size: 14px; font-variant-numeric: tabular-nums; }
.grow { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.grow .mid { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.grow .t { font-size: 18px; }
.grow .s { font-size: 14px; color: var(--muted); }
.swatches { display: flex; gap: 10px; }
.sw { width: 44px; height: 44px; border: 2px solid transparent; outline: 1px solid var(--line2); cursor: pointer; }
.sw.sel { border-color: #070707; outline: 2px solid var(--bone); }
.war { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
/* hideout: the HUD chip while the police leave you alone, and the screen inside */
/* weekend events: HUD chip, title banner, cards */
.event-tag { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 4px 9px; background: rgba(8,8,8,.85); border: 1px solid rgba(232,200,115,.55); border-left: 3px solid #e8c873; color: #e8c873; font: inherit; font-size: 13px; text-align: left; cursor: pointer; box-shadow: 0 0 12px rgba(232,200,115,.2); }
.event-tag b { font-weight: 400; font-size: 12px; color: #b9b4a8; font-variant-numeric: tabular-nums; }
.ev-banner { margin: 2px 0 14px; padding: 8px 10px; border: 1px solid rgba(232,200,115,.5); background: rgba(232,200,115,.08); color: #e8c873; font-size: 16px; text-align: center; }
.ev-banner small { display: block; font-size: 13px; color: #b9b4a8; }
.evcard { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; margin-bottom: 8px; border: 1px solid var(--line2); border-left: 3px solid #9b968b; background: var(--panel); }
.evcard.lepsi { border-left-color: #e8c873; }
.evcard.on { box-shadow: 0 0 14px rgba(232,200,115,.18); }
.evcard .ic { flex: none; width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid rgba(232,200,115,.5); border-radius: 50%; color: #e8c873; font-size: 17px; }
.evcard .t { display: block; font-size: 18px; color: #efe9dc; }
.evcard .t small { font-size: 12px; color: #9b968b; font-style: italic; }
.evcard .s { display: block; font-size: 15px; color: #b9b4a8; }
.wanted { padding: 2px 8px; background: rgba(8,8,8,.8); border: 1px solid #3a3835; font-size: 17px; letter-spacing: 2px; color: #4f4c46; }
.wanted b { color: #f0c95a; font-weight: 400; text-shadow: 0 0 6px rgba(240,201,90,.6); }
.wanted.chase { border-color: rgba(224,53,43,.7); animation: pulse 1s infinite alternate; }
.shadow-tag { padding: 4px 9px; background: rgba(8,8,8,.8); border: 1px solid #3a3835; border-left: 3px solid #b9b4a8; color: #d8d3c7; font-size: 14px; }
.shadow-tag b { color: #efe9dc; font-variant-numeric: tabular-nums; }
.hide-scr { min-height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 40px 24px; text-align: center; background: radial-gradient(ellipse 70% 50% at 50% 40%, #1b1a18, #050505 75%); }
.hide-scr .bl { font-size: 40px; color: #efe9dc; }
.hide-scr .clock { font-size: 46px; color: var(--gold-l); font-variant-numeric: tabular-nums; }
.hide-scr p { max-width: 340px; color: #9b968b; font-size: 17px; margin: 0; }
#hud-heat, #hud-wanted { cursor: pointer; }
/* a feature that opens later: what it is and from which level */
.locked-scr { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 40px 12px; text-align: center; }
.locked-scr .sc { color: #9b968b; }
.locked-scr .bl { font-size: 38px; color: var(--gold-l); }
.locked-scr p { max-width: 340px; margin: 0; color: #c9c4b8; font-size: 17px; }
.locked-scr .note { color: #8a857a; font-size: 15px; }
/* how the police works: one screen with every term */
.help-list { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.help-list > div { padding: 10px 12px; border: 1px solid var(--line); border-left: 3px solid var(--gold); background: rgba(255,255,255,.02); }
.help-list b { display: block; color: var(--gold-l); font-weight: 500; margin-bottom: 2px; }
.help-list span { color: #c9c4b8; font-size: 16px; }
/* daily missions: edge arrow on the map, task cards, the 15-day calendar */
.daily-arrow { position: absolute; left: 0; top: 0; width: 34px; height: 34px; pointer-events: none; z-index: 3; }
.daily-arrow i { position: absolute; inset: 0; }
.daily-arrow i::after { content: ''; position: absolute; right: -6px; top: 50%; margin-top: -7px; border: 7px solid transparent; border-left: 10px solid #f0c95a; filter: drop-shadow(0 0 3px rgba(0,0,0,.8)); }
.daily-arrow b { position: absolute; inset: 4px; display: grid; place-items: center; border-radius: 50%; background: rgba(8,8,8,.85); border: 1.5px solid #f0c95a; color: #f0c95a; font: 700 14px 'Grenze Gotisch', serif; }
.daily-card .dbadge { width: 46px; height: 46px; flex: none; display: grid; place-items: center; border: 1.5px solid #f0c95a; border-radius: 50%; color: #f0c95a; font: 700 24px 'Grenze Gotisch', serif; margin: 0 4px; }
.dtask { padding: 10px 12px; margin-bottom: 8px; border: 1px solid var(--line2); border-left: 3px solid #f0c95a; background: var(--panel); }
.dtask .top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.dtask .t { font-size: 18px; color: #efe9dc; }
.dtask .s { font-size: 15px; color: #b9b4a8; }
.dtask .sc { font-size: 12px; }
.dtask .g-easy { color: #8fc98a; } .dtask .g-action { color: #f0c95a; } .dtask .g-hard { color: #e6806f; }
.dtask.done { opacity: .6; border-left-color: #8fc98a; }
.dcal { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; }
.dday { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 7px 2px; border: 1px solid var(--line2); background: var(--panel); text-align: center; }
.dday small { font-size: 11px; color: #8a857a; }
.dday b { font-size: 13px; font-weight: 600; color: #d8d3c7; line-height: 1.15; }
.dday.t-level b { color: #9cc4ff; } .dday.t-bars b { color: #f0c95a; } .dday.t-legendary { border-color: #e8c873; } .dday.t-legendary b { color: #e8c873; }
.dday.past { opacity: .4; }
.dday.now { border-color: #f0c95a; box-shadow: 0 0 12px rgba(240,201,90,.35); }
.dday.got { border-color: #8fc98a; }
/* hall of fame */
.hrow { display: grid; grid-template-columns: 34px 1fr auto 56px; align-items: center; gap: 8px; width: 100%; padding: 10px 8px; margin: 0; border: 0; border-bottom: 1px solid var(--line); background: none; color: #e9e4d8; font: inherit; font-size: 17px; text-align: left; cursor: pointer; }
.hrow:hover { background: rgba(201,162,74,.06); }
.hrow .rk { color: #9b968b; font-size: 15px; }
.hrow .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hrow .nm small { color: #9b968b; font-style: italic; }
.hrow .cl { color: #9b968b; font-size: 14px; }
.hrow .lv { color: var(--gold-l); text-align: right; font-size: 15px; }
.hrow.me { background: rgba(201,162,74,.1); }
.ghrow { cursor: default; }
.ghrow .gtag { min-width: 34px; height: 24px; font-size: 13px; border-width: 1px; vertical-align: middle; }
.seg { display: flex; gap: 0; margin-bottom: 10px; border: 1px solid var(--line2); }
.seg button { flex: 1; padding: 8px 0; border: 0; background: none; color: #9b968b; font: inherit; font-size: 16px; cursor: pointer; }
.seg button.on { background: rgba(201,162,74,.14); color: var(--gold-l); }
.hrow:nth-child(-n+3) .rk { color: var(--gold-l); }
.wrow { padding: 6px 6px 8px; margin-bottom: 6px; border: 1px solid var(--line); background: var(--panel); transition: opacity .3s, border-color .3s; }
.wrow .top { display: flex; justify-content: space-between; gap: 6px; font-size: 15px; margin-bottom: 4px; }
.wrow.on { border-color: var(--gold); }
.wrow.out { opacity: .35; }
.buffs-list { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.reaper-tag { align-self: flex-start; padding: 5px 10px; background: rgba(8,8,8,.8); border: 1px solid rgba(208,71,61,.8); border-left: 3px solid var(--red-l); color: #f0c8c0; font-size: 14px; z-index: 2; animation: pulse 1s infinite alternate; }
.reaper-tag b { color: var(--gold-l); font-variant-numeric: tabular-nums; }
.attack { position: absolute; right: 36px; bottom: calc(214px + env(safe-area-inset-bottom)); width: 72px; height: 72px; border-radius: 50%; background: radial-gradient(circle, #2a1210, #0b0808 70%); border: 1px solid rgba(208,71,61,.85); box-shadow: 0 0 18px rgba(208,71,61,.3); color: #f0c8c0; font-size: 16px; z-index: 2; cursor: pointer; touch-action: none; }
.attack:active { transform: scale(.94); }
.tabs { position: absolute; left: 0; right: 0; bottom: 0; height: calc(64px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-top: 1px solid rgba(233,228,216,.18); background: rgba(6,6,6,.95); z-index: 3; }
.tabs button { background: none; border: none; font-size: 17px; color: #a9a497; cursor: pointer; }
.tabs button.on { background: radial-gradient(ellipse 70% 90% at 50% 100%, rgba(201,162,74,.3), rgba(201,162,74,0) 70%); border-top: 2px solid var(--gold); color: var(--gold-t); }
.tabs button.locked { color: #4f4c46; }

/* ---------------------------------------------------------------- screens */
#screen { position: absolute; inset: 0; z-index: 10; background: var(--ink); overflow: hidden; display: flex; flex-direction: column; }
#screen.overlay { background: rgba(4,4,4,.82); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.hdr { flex: none; height: calc(60px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 12px 0 4px; display: flex; align-items: center; gap: 6px; border-bottom: 1px solid var(--line); }
.hdr h1 { margin: 0; flex: 1; font-family: var(--black); font-weight: 700; font-size: 34px; line-height: 1; color: #efe9dc; }
.hdr .right { font-size: 16px; color: var(--muted); }
.back { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; background: none; border: none; cursor: pointer; color: var(--bone); }
.body::-webkit-scrollbar, .title-scr::-webkit-scrollbar { width: 6px; }
.body::-webkit-scrollbar-thumb, .title-scr::-webkit-scrollbar-thumb { background: #3a3835; }
.body::-webkit-scrollbar-track, .title-scr::-webkit-scrollbar-track { background: transparent; }
.title-scr { scrollbar-width: thin; scrollbar-color: #3a3835 transparent; }
.body { scrollbar-width: thin; scrollbar-color: #3a3835 transparent; flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 14px 14px 24px; }
.body.tight { padding: 0; }

.orn { display: flex; align-items: center; gap: 8px; margin: 6px 0; }
.orn::before, .orn::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, rgba(233,228,216,0), rgba(233,228,216,.45)); }
.orn::after { background: linear-gradient(90deg, rgba(233,228,216,.45), rgba(233,228,216,0)); }
.orn i { width: 8px; height: 8px; transform: rotate(45deg); border: 1px solid var(--gold); }

.menu { display: flex; flex-direction: column; }
.menu button { min-height: 48px; background: none; border: none; border-bottom: 1px solid rgba(233,228,216,.08); font-size: 21px; color: #a9a497; cursor: pointer; }
.menu button:last-child { border-bottom: none; }
.menu button.sel, .menu button:hover { background: radial-gradient(ellipse 50% 100% at 50% 50%, rgba(201,162,74,.42), rgba(201,162,74,0) 75%); color: #f6e6b8; text-shadow: 0 0 14px rgba(232,200,115,.85); }
.menu button.locked { color: #55524c; }
.menu button.locked:hover { background: none; color: #55524c; text-shadow: none; }

.btn { min-height: 48px; padding: 0 20px; background: transparent; border: 1px solid var(--line2); color: var(--bone2); font-size: 19px; cursor: pointer; }
.btn.gold { background: linear-gradient(180deg, #1f1b14, #0c0b0a); border-color: var(--gold); color: var(--gold-t); box-shadow: 0 0 18px rgba(201,162,74,.25), inset 0 1px 0 rgba(255,240,200,.15); }
.btn.small { min-height: 36px; padding: 0 12px; font-size: 16px; }
.btn.wide { width: 100%; }
.btn.danger { border-color: #8a2a22; color: #e6a49c; }
.btn:disabled { opacity: .4; cursor: default; }
.row { display: flex; gap: 10px; }
.row > * { flex: 1; }
.note { margin: 8px 0 0; text-align: center; font-size: 14px; color: var(--dim); }
.chance { margin: 12px 0 0; text-align: center; font-size: 18px; font-weight: 600; }
.p { margin: 0 0 10px; font-size: 17px; line-height: 1.4; color: var(--bone2); }

.card { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px; margin-bottom: 8px; text-align: left; background: var(--panel); border: 1px solid var(--line); cursor: pointer; }
.card.sel { background: linear-gradient(90deg, rgba(201,162,74,.16), rgba(201,162,74,.03)); border-color: var(--gold); box-shadow: 0 0 16px rgba(201,162,74,.2); }
.card img { width: 62px; height: 62px; flex: none; }
.card .mid { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.card .t { font-size: 19px; line-height: 1.1; }
.card .s { font-size: 14px; color: var(--muted); }
.card .end { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; font-variant-numeric: lining-nums tabular-nums; }

.sec { display: flex; align-items: center; gap: 10px; margin: 14px 0 8px; font-size: 14px; color: var(--muted); }
.sec::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, rgba(233,228,216,.3), rgba(233,228,216,0)); }

.seg3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.seg3 button { min-height: 64px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; background: var(--panel); border: 1px solid var(--line); color: var(--bone2); cursor: pointer; padding: 4px; }
.seg3 button span { font-size: 17px; }
.seg3 button small { font-size: 13px; color: var(--muted); font-variant-numeric: lining-nums; }
.seg3 button.sel { background: radial-gradient(ellipse 80% 100% at 50% 50%, rgba(201,162,74,.25), rgba(201,162,74,.04)); border-color: var(--gold); color: #f3ead2; }

/* giver strip */
.giver { position: relative; height: 196px; flex: none; background: radial-gradient(ellipse 55% 80% at 25% 60%, #2e2620, #0b0a09 70%); border-bottom: 1px solid rgba(201,162,74,.4); }
.giver img { position: absolute; left: 2px; bottom: 0; width: 172px; height: 195px; }
.giver .txt { position: absolute; left: 178px; right: 14px; top: 26px; display: flex; flex-direction: column; gap: 8px; }
.giver .txt q { font-size: 18px; font-style: italic; line-height: 1.3; color: #d8d3c7; }

.giver.photo { height: 220px; overflow: hidden; }
.giver.photo img { left: 0; top: 0; bottom: auto; width: 100%; height: 100%; object-fit: cover; }
.giver.photo .shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(7,7,7,0) 35%, rgba(7,7,7,.92) 88%), linear-gradient(90deg, rgba(7,7,7,.55), rgba(7,7,7,0) 60%); }
.giver.photo .txt { left: 16px; right: 16px; top: auto; bottom: 14px; gap: 4px; }
.giver.photo .txt q { font-size: 17px; }
.card img.ph, .foe img.ph { object-fit: cover; object-position: 50% 15%; background: #1a1714; border: 1px solid var(--line); }
.story { margin: 6px 0 10px; padding: 10px 12px; font-size: 17px; font-style: italic; line-height: 1.4; color: #ddd7ca; background: linear-gradient(90deg, rgba(201,162,74,.08), rgba(201,162,74,0)); border-left: 2px solid rgba(201,162,74,.6); }
.foe { display: flex; align-items: center; gap: 10px; font-size: 17px; }
.foe img { width: 48px; height: 60px; flex: none; }
.foe b { font-weight: 600; color: #efe9dc; }

/* fight cards */
.fcard { position: absolute; bottom: 12px; width: 142px; height: 182px; margin: 0; overflow: hidden; border: 1px solid; background: radial-gradient(ellipse at 50% 35%, #2e2620, #0d0c0b 70%); box-shadow: 0 10px 24px rgba(0,0,0,.7); }
.fcard img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; display: block; }
.fcard.me { left: 16px; border-color: var(--gold); }
.fcard.foe { right: 16px; border-color: rgba(208,71,61,.8); }
.stage .fcard.hit { animation: hit .25s; }
/* fight animation: the attacker's weapon, muzzle flash and bullet */
.stage .wfx { position: absolute; z-index: 5; pointer-events: none; opacity: 0; filter: drop-shadow(0 6px 8px rgba(0,0,0,.65)); }
.stage .mflash { position: absolute; z-index: 6; width: 30px; height: 30px; border-radius: 50%; pointer-events: none; background: radial-gradient(circle, #fff8d6 0, #ffc04a 40%, rgba(255,120,0,0) 70%); }
.stage .bullet { position: absolute; z-index: 6; width: 12px; height: 3px; margin: -1.5px 0 0 -6px; border-radius: 2px; pointer-events: none; background: #ffe7a0; box-shadow: 0 0 6px #ffc655; }
.stage .fcard.out { filter: grayscale(1) brightness(.45); transition: filter .4s; }

/* character */
.char { display: grid; grid-template-columns: 64px minmax(0, 1fr) 64px; gap: 10px; }
.slots { display: flex; flex-direction: column; gap: 6px; }
.slot { display: flex; flex-direction: column; align-items: center; gap: 2px; background: none; border: none; padding: 0; cursor: pointer; }
.slot .box { width: 64px; height: 64px; background: #111112; border: 1px solid var(--line2); display: flex; align-items: center; justify-content: center; position: relative; }
.slot .box img { width: 62px; height: 62px; }
.slot .box.empty { background: #0c0c0d; border-style: dashed; border-color: rgba(233,228,216,.22); color: #3a3835; font-size: 24px; }
.slot .box .up { position: absolute; right: 2px; bottom: 0; font-size: 12px; color: var(--gold-l); }
.slot small { font-size: 12px; color: #8a857a; }
.portrait { position: relative; height: 338px; overflow: hidden; background: radial-gradient(ellipse 75% 60% at 50% 40%, #2e2620, #0d0c0b 70%); border: 1px solid rgba(201,162,74,.35); }
.portrait img { position: absolute; left: 50%; top: 28px; width: 240px; height: 272px; transform: translateX(-50%); }
/* character look: layers stacked on one square canvas */
.look { position: relative; aspect-ratio: 1 / 1; overflow: hidden; background: #1a1714; }
.look img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.look.big { width: 100%; max-width: 360px; margin: 0 auto 10px; border: 1px solid rgba(201,162,74,.35); }
.portrait .look.in-portrait { position: absolute; inset: 0; aspect-ratio: auto; background: none; }
.portrait .look.in-portrait img { left: 0; top: 0; transform: none; width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }
.portrait .look-edit { position: absolute; right: 6px; top: 6px; z-index: 2; background: rgba(8,8,8,.75); }
.lookrow { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.lookrow .mid { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 1px; }
.lookrow .sc { font-size: 12px; color: var(--muted); }
.lookrow b { font-weight: 500; font-size: 18px; }
.lookrow small { font-size: 12px; color: var(--dim); }
.lookrow .btn { min-width: 48px; font-size: 22px; }
.portrait .cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 0 10px; display: flex; flex-direction: column; align-items: center; background: linear-gradient(180deg, rgba(8,8,8,0), rgba(8,8,8,.95) 60%); }
.statrow { min-height: 50px; display: flex; align-items: center; gap: 8px; border-bottom: 1px solid rgba(233,228,216,.08); }
.statrow .n { flex: 1; font-size: 18px; color: var(--bone2); }
.statrow .v { width: 44px; text-align: right; font-size: 20px; font-variant-numeric: lining-nums tabular-nums; }
.statrow .v small { display: block; font-size: 12px; color: var(--green); }
.statrow.cls { background: linear-gradient(90deg, rgba(201,162,74,.12), rgba(201,162,74,0)); }
.statrow.cls .n { color: var(--gold-l); }

/* items */
.rar-bezny { border-color: rgba(90,169,255,.6) !important; }
.rar-epicky { border-color: rgba(255,106,168,.8) !important; box-shadow: 0 0 10px rgba(255,106,168,.25); }
.bm { margin-bottom: 14px; padding: 10px; border: 1px solid rgba(255,106,168,.45); background: linear-gradient(180deg, rgba(255,106,168,.08), rgba(255,106,168,0)); }
.rar-legendarny { border-color: var(--gold) !important; box-shadow: 0 0 10px rgba(201,162,74,.3); }
.item { display: flex; gap: 10px; align-items: center; padding: 8px; margin-bottom: 8px; background: var(--panel); border: 1px solid var(--line); }
.item img { width: 64px; height: 64px; flex: none; }
.item .mid { flex: 1; min-width: 0; }
.item .t { font-size: 18px; }
.item .s { font-size: 14px; color: var(--muted); }
.item .acts { display: flex; flex-direction: column; gap: 6px; }

/* fight */
.stage { position: relative; height: 330px; flex: none; overflow: hidden; }
.stage .bg { position: absolute; left: 0; top: 30px; width: 100%; height: 300px; object-fit: cover; }
.stage .bg.full { top: 0; height: 100%; }
.stage .fade-t { position: absolute; inset: 0 0 auto 0; height: 110px; background: linear-gradient(180deg, var(--ink) 30%, rgba(7,7,7,0)); }
.stage .fade-b { position: absolute; inset: auto 0 0 0; height: 60px; background: linear-gradient(180deg, rgba(7,7,7,0), var(--ink)); }
.stage .title { position: absolute; left: 0; right: 0; top: 52px; display: flex; flex-direction: column; align-items: center; }
.stage .title .bl { font-weight: 900; font-size: 48px; color: #efe9dc; text-shadow: 0 3px 0 #000, 0 0 18px rgba(0,0,0,.9); }
.stage .fa { position: absolute; left: -6px; bottom: 0; width: 170px; height: 193px; transition: transform .15s; }
.stage .fb { position: absolute; right: -10px; bottom: 0; width: 196px; height: 222px; transition: transform .15s; }
.stage .fb.mirror { transform: scaleX(-1); }
.stage .vs { position: absolute; left: 50%; top: 214px; transform: translateX(-50%); font-family: var(--black); font-weight: 900; font-size: 44px; color: var(--gold); text-shadow: 0 0 18px rgba(201,162,74,.6), 0 2px 0 #000; }
.stage .hit { animation: hit .25s; }
@keyframes hit { 30% { filter: brightness(2.2) saturate(0); transform: translateX(6px); } }
.stage .fb.mirror.hit { animation: hitm .25s; }
@keyframes hitm { 30% { filter: brightness(2.2) saturate(0); transform: scaleX(-1) translateX(6px); } }
.dmg { position: absolute; font-family: var(--black); font-weight: 900; font-size: 34px; color: #fff; text-shadow: 0 2px 0 #000; animation: rise .9s forwards; pointer-events: none; }
.dmg.crit { color: var(--gold-l); font-size: 44px; }
.dmg.miss { color: var(--muted); font-size: 26px; }
@keyframes rise { from { opacity: 1; transform: translateY(0); } to { opacity: 0; transform: translateY(-50px); } }
.hpgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; padding: 4px 14px 8px; }
.hpgrid .top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 4px; }
.hpgrid .bl { font-size: 22px; }
.flog { list-style: none; margin: 0; padding: 0 14px; border-top: 1px solid var(--line); }
.flog li { display: flex; gap: 10px; padding: 7px 0; border-bottom: 1px solid rgba(233,228,216,.07); font-size: 16px; color: var(--bone2); }
.flog li .r { width: 46px; flex: none; font-size: 13px; letter-spacing: 1px; font-variant-caps: all-small-caps; color: var(--dim); padding-top: 2px; }
.flog li.crit { background: linear-gradient(90deg, rgba(201,162,74,.12), rgba(201,162,74,0)); }

/* ---------------------------------------------------------------- title */
.title-scr { position: absolute; inset: 0; background: #060606; overflow-y: auto; }
.title-scr .glow { position: absolute; left: 0; right: 0; top: 0; height: 470px; background: radial-gradient(ellipse 60% 55% at 50% 42%, #3a3026, #16120f 45%, #060606 80%); }
.title-scr .key { position: absolute; left: 50%; top: 40px; width: 300px; height: 340px; transform: translateX(-50%); }
.title-scr .fade { position: absolute; left: 0; right: 0; top: 300px; height: 150px; background: linear-gradient(180deg, rgba(6,6,6,0), #060606 85%); }
.title-scr .inner { position: relative; padding: 350px 40px 30px; display: flex; flex-direction: column; align-items: stretch; }
/* title poster (logo included): the form sits in its dark lower part, which fades into the page black */
.title-scr .poster { position: absolute; left: 0; right: 0; top: 0; }
.title-scr .poster img { display: block; width: 100%; height: auto; }
.title-scr .poster::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 14%; background: linear-gradient(180deg, rgba(6,6,6,0), #060606 90%); }
.title-scr .poster ~ .inner { padding-top: 164%; }
.title-scr .poster ~ .inner .tag { margin-top: 0; }
.logo.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.logo { margin: 0; text-align: center; font-family: var(--black); font-weight: 900; font-size: 70px; line-height: .95; color: #efe9dc; text-shadow: 0 3px 0 #000, 0 0 24px rgba(0,0,0,.95); }
.logo span { color: var(--gold); }
.tag { margin: 2px 0 16px; text-align: center; font-size: 17px; font-style: italic; color: #8a857a; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.field label { font-size: 14px; color: var(--muted); }
.field input { height: 46px; padding: 0 12px; background: #0e0e0f; border: 1px solid var(--line2); color: var(--bone); font-family: var(--serif); font-size: 19px; }
.field input:focus { outline: none; border-color: var(--gold); }
.field textarea { min-height: 130px; padding: 10px 12px; background: #0e0e0f; border: 1px solid var(--line2); color: var(--bone); font-family: var(--serif); font-size: 18px; line-height: 1.35; resize: vertical; }
.field textarea:focus { outline: none; border-color: var(--gold); }
.classes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-bottom: 8px; }
.classes button { padding: 10px 4px; background: var(--panel); border: 1px solid var(--line); cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.classes button .bl { font-size: 24px; color: #efe9dc; }
.classes button small { font-size: 13px; color: var(--muted); }
.classes button.sel { border-color: var(--gold); background: radial-gradient(ellipse 80% 100% at 50% 50%, rgba(201,162,74,.22), rgba(201,162,74,.03)); }

/* ---------------------------------------------------------------- modal & toasts */
#modal { position: absolute; inset: 0; z-index: 30; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(0,0,0,.72); }
.mbox { width: 100%; max-width: 360px; max-height: 90%; overflow-y: auto; padding: 18px 18px 16px; background: linear-gradient(180deg, #121211, #0a0a0a); border: 1px solid var(--line2); box-shadow: 0 20px 60px rgba(0,0,0,.8); text-align: center; }
.mbox h2 { margin: 2px 0 6px; font-family: var(--black); font-weight: 900; font-size: 42px; line-height: 1; color: #efe9dc; }
.mbox h2.win { color: var(--gold-l); text-shadow: 0 0 18px rgba(201,162,74,.5); }
.mbox h2.lose { color: var(--red-l); }
.mbox .sub { margin: 0 0 12px; font-size: 16px; color: var(--muted); }
.mbox .rew { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 18px; margin: 6px 0 12px; font-size: 19px; font-variant-numeric: lining-nums tabular-nums; }
.mbox .loot { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; padding: 8px; background: var(--panel); border: 1px solid var(--line); text-align: left; }
.mbox .loot img { width: 56px; height: 56px; }
.mbox .warn { margin: 0 0 12px; padding: 8px 10px; border: 1px solid rgba(168,35,28,.6); background: rgba(168,35,28,.1); color: #e6a49c; font-size: 16px; }
.mbox .acts { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
#toasts { position: absolute; left: 0; right: 0; top: calc(140px + env(safe-area-inset-top)); z-index: 40; display: flex; flex-direction: column; align-items: center; gap: 6px; pointer-events: none; }
.toast { max-width: 88%; padding: 8px 14px; background: rgba(8,8,8,.92); border: 1px solid var(--line2); border-left: 2px solid var(--gold); font-size: 16px; animation: tin .25s; }
.toast.bad { border-left-color: var(--red-l); }
@keyframes tin { from { opacity: 0; transform: translateY(-8px); } }

/* pause menu */
.pause { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; align-items: center; justify-content: safe center; padding: 56px 30px 24px; }
/* always-visible way out of the menu, even when the list is taller than the screen */
.menu-x { position: absolute; z-index: 2; top: calc(10px + env(safe-area-inset-top)); left: 10px; display: flex; align-items: center; gap: 8px; padding: 8px 14px 8px 10px; background: rgba(7,7,7,.85); border: 1px solid rgba(233,228,216,.25); color: #e9e4d8; font: inherit; font-size: 16px; cursor: pointer; }
.pause .menu { width: 100%; max-width: 320px; }
.pause .desc { margin: 12px 0 0; min-height: 44px; text-align: center; font-size: 17px; color: #d8d3c7; }
.pause .hints { display: flex; gap: 18px; margin-top: 8px; font-size: 14px; color: #8a857a; }
.pause .hints span { display: flex; align-items: center; gap: 6px; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--gold); display: inline-block; }
.dot.o { background: none; border: 1px solid #b9b4a8; }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 18px; }
.ladder li { display: flex; justify-content: space-between; padding: 6px 2px; border-bottom: 1px solid rgba(233,228,216,.07); font-size: 16px; }
.ladder li.me { color: var(--gold-l); }
.ladder { list-style: none; margin: 0; padding: 0; }
.boss-list { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; margin-top: 4px; }
.boss-list span { padding: 6px 2px; text-align: center; font-size: 13px; background: var(--panel); border: 1px solid var(--line); color: var(--dim); }
.boss-list span.done { color: var(--muted); text-decoration: line-through; }
.boss-list span.now { color: var(--red-l); border-color: rgba(208,71,61,.6); }
.cls-art { display: block; width: 100%; height: 150px; object-fit: cover; margin: 0 0 8px; border: 1px solid var(--line2); }
.desc { margin-top: 3px; font-size: 14px; font-style: italic; line-height: 1.3; color: #8f8a80; }
/* new-player tutorial: one line under the HUD */
.tut { display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: rgba(8,8,8,.82); border: 1px solid rgba(201,162,74,.45); border-left: 3px solid var(--gold); box-shadow: 0 0 16px rgba(201,162,74,.18); }
.tut[hidden] { display: none; }
.tut .sc { flex: none; font-size: 12px; color: var(--gold-l); }
.tut-text { flex: 1; font-size: 15px; line-height: 1.2; color: var(--bone); }
.tut-acts { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.tut-x { background: none; border: none; color: var(--muted); font-size: 12px; text-decoration: underline; cursor: pointer; padding: 2px; }
.tut.ready { border-color: var(--gold-l); box-shadow: 0 0 20px rgba(201,162,74,.45); }
.tut.ready .tut-text { color: var(--gold-t); }
/* hot mission offers: a harder rival for a double reward */
.hot { display: inline-block; align-self: flex-start; margin: 2px 0 1px; padding: 1px 6px; border: 1px solid rgba(208,71,61,.8); color: #f0c8c0; font-size: 12px; letter-spacing: .04em; }
.card.hotcard { border-color: rgba(208,71,61,.55); }
.hotnote { color: #e6a49c; }
.unlock-k { margin: 0 0 2px; text-align: center; font-size: 13px; letter-spacing: .12em; color: var(--gold-l); }

/* medals and the gold portrait frame (js/medals.js) */
.mframe { position: absolute; inset: 0; z-index: 3; pointer-events: none; border: 1px solid #3a3530; --w: 2px; }
.mframe.st2, .mframe.st3, .mframe.st4 { --w: 3px; }
.mframe.st5 { --w: 4px; animation: mfglow 2.4s ease-in-out infinite alternate; }
.mframe.st4 { box-shadow: 0 0 12px rgba(232,200,115,.22); }
.mframe i { position: absolute; }
.mframe .h { height: var(--w); width: var(--len); background: linear-gradient(90deg, #8a6218, #f3d98a 50%, #b88f34); }
.mframe .v { width: var(--w); height: var(--len); background: linear-gradient(180deg, #8a6218, #f3d98a 50%, #b88f34); }
.mframe .tl { top: -1px; left: -1px; } .mframe .tr { top: -1px; right: -1px; }
.mframe .bl { bottom: -1px; left: -1px; } .mframe .br { bottom: -1px; right: -1px; }
.mframe b { display: none; position: absolute; width: 11px; height: 11px; transform: rotate(45deg); background: linear-gradient(135deg, #fff3bf, #e2b648 55%, #7a5410); border: 1px solid #2a1d06; }
.mframe.st3 b, .mframe.st4 b, .mframe.st5 b { display: block; }
.mframe b.tl { top: -7px; left: -7px; } .mframe b.tr { top: -7px; right: -7px; }
.mframe b.bl { bottom: -7px; left: -7px; } .mframe b.br { bottom: -7px; right: -7px; }
.mframe.st4::after, .mframe.st5::after { content: ''; position: absolute; inset: 6px; border: 1px solid rgba(232,200,115,.5); }
@keyframes mfglow { from { box-shadow: 0 0 12px rgba(232,200,115,.3), inset 0 0 8px rgba(232,200,115,.15); } to { box-shadow: 0 0 26px rgba(232,200,115,.55), inset 0 0 16px rgba(232,200,115,.3); } }
.pframe { position: relative; min-width: 0; }
.medals-wrap { margin-top: 12px; }
.medals { display: flex; justify-content: space-between; gap: 2px; }
.medal-b { background: none; border: none; padding: 0; cursor: pointer; line-height: 0; }
.medal-b .medal { width: 34px; height: auto; }
.medals-cap { display: flex; justify-content: space-between; margin-top: 4px; font-size: 13px; color: var(--muted); }
.msteps { display: flex; flex-direction: column; gap: 6px; margin: 10px 0; }
.mstep { display: flex; align-items: center; gap: 10px; opacity: .55; font-size: 16px; }
.mstep.on { opacity: 1; }
.mstep span:nth-child(2) { flex: 1; text-align: left; }
.mgots { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin: 8px 0; }
.mgot { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 84px; font-size: 14px; text-align: center; }
.mgot small { color: var(--muted); }

/* legal links and the sign-up agreement */
.title-scr .legal { margin: 22px 0 6px; text-align: center; font-size: 14px; color: #8f8a80; }
.title-scr .legal a, .note a, .agree a { color: #c9a24a; }
.agree { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 12px; font-size: 15px; line-height: 1.35; color: #b9b4a8; text-align: left; }
.agree input { width: 22px; height: 22px; margin: 2px 0 0; flex: none; accent-color: #c9a24a; }
