:root {
  color-scheme: dark;
  --ink: #14110f; --paper: #f3ead7; --gold: #ffd60a; --red: #d62828; --blue: #2a6fdb; --green: #43aa8b;
  --panel: rgba(20, 17, 15, .82);
  --ui: "Hind Siliguri", "Noto Sans Bengali", system-ui, sans-serif;
  --disp: "Galada", "Hind Siliguri", cursive;
  --tk-h: 34px;
}
* { box-sizing: border-box; margin: 0; }
html, body { height: 100%; overflow: hidden; background: var(--ink); color: #fff; font-family: var(--ui); -webkit-user-select: none; user-select: none; touch-action: none; }
canvas#c { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
.hidden { display: none !important; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
kbd { font: 600 .82em/1 var(--ui); background: #fff; color: var(--ink); border-radius: 4px; padding: 3px 6px; border-bottom: 2px solid #b9b2a3; }

#vignette { position: fixed; inset: 0; pointer-events: none; opacity: 0; transition: opacity .25s; box-shadow: inset 0 0 120px 18px rgba(214, 40, 40, .7); }

/* ---------- HUD ---------- */
#hud { position: fixed; inset: 0; pointer-events: none; padding: 12px; display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.panel { background: var(--panel); border: 2px solid var(--ink); border-radius: 10px; padding: 10px 12px; box-shadow: 4px 4px 0 rgba(0, 0, 0, .45); }
.hud-l { min-width: 190px; }
.who { display: flex; flex-direction: column; line-height: 1.15; }
.who span { font-size: .78rem; opacity: .75; }
.who b { font: 400 1.25rem var(--disp); color: var(--gold); }
.money { font: 700 1.7rem/1.1 var(--ui); margin: 4px 0 6px; font-variant-numeric: tabular-nums; }
.money.pop { animation: pop .3s; }
@keyframes pop { 50% { transform: scale(1.14); color: var(--gold); } }
.bar { position: relative; height: 12px; background: rgba(255, 255, 255, .14); border-radius: 6px; overflow: hidden; }
.bar i { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: 6px; transition: width .2s; }
.bar.xp { height: 18px; }
.bar.xp i { background: linear-gradient(90deg, #e09f3e, var(--gold)); }
.bar.xp span { position: absolute; inset: 0; font-size: .72rem; font-weight: 700; line-height: 18px; text-align: center; color: #fff; text-shadow: 0 1px 2px #000; }
.hud-c { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; }
#h-zone { font: 400 1.2rem var(--disp); background: var(--panel); padding: 4px 16px 2px; border-radius: 20px; border: 2px solid var(--ink); }
#h-zone i { font: 600 .72rem var(--ui); margin-left: 8px; padding: 1px 8px; border-radius: 10px; background: #777; color: #fff; vertical-align: middle; }
#h-status { font-size: .85rem; font-weight: 700; background: var(--gold); color: var(--ink); padding: 2px 12px; border-radius: 12px; }
#h-status:empty { display: none; }
.hud-r { width: 200px; display: flex; flex-direction: column; gap: 5px; }
.meter { display: grid; grid-template-columns: 78px 1fr; align-items: center; gap: 6px; font-size: .74rem; font-weight: 600; }
.meter.rage i { background: linear-gradient(90deg, #f77f00, var(--red)); }
.meter.heat i { background: var(--blue); }
.meter.hp i { background: var(--green); }
.meter.stam i { background: #e9e2cf; }
.meter.crit label { color: #ff6b6b; animation: blink .5s infinite; }
@keyframes blink { 50% { opacity: .35; } }
#minimap { width: 174px; height: 126px; border-radius: 6px; margin-top: 4px; border: 1px solid rgba(255, 255, 255, .25); image-rendering: pixelated; }

/* ---------- banner / prompt / bubbles ---------- */
#banner { position: fixed; left: 50%; top: 20%; transform: translate(-50%, -20px) scale(.9); opacity: 0; pointer-events: none; text-align: center; transition: opacity .25s, transform .25s; background: var(--ink); color: #fff; border: 3px solid var(--gold); padding: 10px 26px 8px; border-radius: 12px; box-shadow: 6px 6px 0 rgba(0, 0, 0, .5); max-width: min(92vw, 620px); z-index: 5; }
#banner.on { opacity: 1; transform: translate(-50%, 0) scale(1); }
#banner b { display: block; font: 400 2rem/1.2 var(--disp); color: var(--gold); }
#banner span { display: block; font-size: .95rem; margin-top: 2px; }
#banner.red { border-color: var(--red); } #banner.red b { color: #ff6b6b; }
#banner.blue { border-color: var(--blue); } #banner.blue b { color: #8ab4ff; }
#prompt { position: fixed; left: 50%; bottom: calc(var(--tk-h) + 22px); transform: translateX(-50%); background: var(--panel); border: 2px solid var(--gold); border-radius: 22px; padding: 6px 18px; font-size: 1rem; font-weight: 600; white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity .15s; max-width: 94vw; overflow: hidden; text-overflow: ellipsis; }
#prompt.on { opacity: 1; }
#prompt.dim { border-color: #777; color: #cfc8b8; }
#bubbles { position: fixed; inset: 0; pointer-events: none; overflow: hidden; }
.bubble { position: absolute; left: 0; top: 0; background: #fff; color: var(--ink); font-size: .86rem; font-weight: 600; padding: 4px 10px; border-radius: 12px; border: 2px solid var(--ink); white-space: nowrap; will-change: transform; }
.bubble::after { content: ""; position: absolute; left: 50%; bottom: -8px; margin-left: -6px; border: 6px solid transparent; border-top-color: var(--ink); border-bottom: 0; }
.bubble.me { background: var(--ink); color: var(--gold); border-color: var(--gold); }
.bubble.me::after { border-top-color: var(--gold); }
.bubble.angry { background: var(--red); color: #fff; }
.bubble.float { background: none; border: 0; font: 700 1.3rem var(--ui); color: var(--gold); text-shadow: 2px 2px 0 var(--ink), -1px -1px 0 var(--ink), 1px -1px 0 var(--ink), -1px 1px 0 var(--ink); }
.bubble.float::after { display: none; }
.bubble.float.hit { font: 400 1.9rem "Bangers", var(--disp); color: #fff; }
.bubble.float.bad { color: #ff6b6b; }

/* ---------- GOK GOK ---------- */
#gok { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 6; }
#gok span { position: absolute; font: 400 clamp(64px, 13vw, 170px)/1 "Bangers", Impact, sans-serif; letter-spacing: .04em; color: var(--gold); -webkit-text-stroke: 5px var(--ink); paint-order: stroke fill; text-shadow: 7px 7px 0 var(--red), 12px 12px 0 var(--ink); transform: translate(-50%, -50%) rotate(var(--r)) scale(0); animation: gok .62s cubic-bezier(.2, 1.6, .4, 1) forwards; }
#gok span::before { content: ""; position: absolute; inset: -30% -18%; z-index: -1; background: #fff; opacity: .92; clip-path: polygon(50% 0, 61% 22%, 82% 8%, 78% 32%, 100% 36%, 82% 52%, 96% 74%, 72% 70%, 68% 96%, 50% 76%, 30% 98%, 28% 70%, 4% 76%, 18% 52%, 0 34%, 22% 32%, 18% 8%, 40% 22%); }
@keyframes gok { 0% { transform: translate(-50%, -50%) rotate(var(--r)) scale(0); opacity: 1; } 35% { transform: translate(-50%, -50%) rotate(var(--r)) scale(calc(var(--s) * 1.15)); } 70% { transform: translate(-50%, -50%) rotate(var(--r)) scale(var(--s)); opacity: 1; } 100% { transform: translate(-50%, -50%) rotate(var(--r)) scale(calc(var(--s) * 1.05)); opacity: 0; } }

/* ---------- fake Facebook post ---------- */
#fb { position: fixed; left: 14px; bottom: calc(var(--tk-h) + 16px); width: min(320px, 80vw); background: #fff; color: #1c1e21; border-radius: 10px; padding: 12px; box-shadow: 0 8px 30px rgba(0, 0, 0, .5); font-size: .9rem; animation: slide .3s; z-index: 4; }
@keyframes slide { from { transform: translateY(30px); opacity: 0; } }
.fb-head { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; }
.fb-av { width: 36px; height: 36px; border-radius: 50%; background: var(--ink); color: var(--gold); font: 400 1.1rem/36px "Bangers", sans-serif; text-align: center; font-style: normal; }
.fb-head b { display: block; font-size: .92rem; } .fb-head small { color: #65676b; font-size: .74rem; }
.fb-foot { display: flex; justify-content: space-between; color: #65676b; font-size: .78rem; border-top: 1px solid #e4e6eb; margin-top: 8px; padding-top: 6px; }

/* ---------- actions + touch ---------- */
#actions { position: fixed; right: 12px; bottom: calc(var(--tk-h) + 14px); display: flex; gap: 8px; align-items: flex-end; }
#actions button { position: relative; width: 66px; height: 58px; border-radius: 10px; background: var(--panel); border: 2px solid rgba(255, 255, 255, .35); display: flex; flex-direction: column; align-items: center; justify-content: center; overflow: hidden; touch-action: none; }
#actions button b { font-size: .78rem; line-height: 1.1; }
#actions button small { font-size: .66rem; opacity: .7; }
#actions button.main { width: 78px; height: 70px; border-color: var(--gold); background: rgba(255, 214, 10, .16); }
#actions button.main b { font-size: .95rem; color: var(--gold); }
#actions button.hot { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(255, 214, 10, .35); }
#actions button.locked { display: none; }
#actions button i { position: absolute; inset: auto 0 0 0; height: 0; background: rgba(0, 0, 0, .7); }
#actions button:active { transform: scale(.94); }
#touch #joy { position: fixed; left: 22px; bottom: calc(var(--tk-h) + 22px); width: 124px; height: 124px; border-radius: 50%; background: rgba(255, 255, 255, .12); border: 2px solid rgba(255, 255, 255, .4); touch-action: none; }
#joy-knob { position: absolute; left: 50%; top: 50%; width: 54px; height: 54px; margin: -27px; border-radius: 50%; background: rgba(255, 214, 10, .85); border: 2px solid var(--ink); }
#sprint { position: fixed; left: 160px; bottom: calc(var(--tk-h) + 26px); width: 60px; height: 60px; border-radius: 50%; background: var(--panel); border: 2px solid rgba(255, 255, 255, .4); font-size: .8rem; font-weight: 700; touch-action: none; }

/* ---------- ticker ---------- */
#ticker { position: fixed; left: 0; right: 0; bottom: 0; height: var(--tk-h); background: var(--ink); display: flex; align-items: stretch; border-top: 2px solid var(--red); font-size: .95rem; z-index: 3; }
#ticker > b { background: var(--red); padding: 0 14px; display: flex; align-items: center; font-weight: 700; }
.tk-wrap { flex: 1; position: relative; overflow: hidden; }
#tk { position: absolute; left: 0; top: 0; line-height: calc(var(--tk-h) - 2px); white-space: nowrap; will-change: transform; }

#corner { position: fixed; display: flex; gap: 6px; right: 226px; top: 12px; z-index: 8; }
#corner button { width: 36px; height: 36px; border-radius: 50%; background: var(--panel); border: 2px solid rgba(255, 255, 255, .35); font-size: 1rem; font-weight: 700; }
#corner button.off { opacity: .45; text-decoration: line-through; }

/* ---------- overlays ---------- */
.overlay { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; padding: 16px; overflow-y: auto; z-index: 10; -webkit-user-select: text; user-select: text; touch-action: auto; }
#intro { background: radial-gradient(ellipse at center, rgba(20, 17, 15, .72), rgba(20, 17, 15, .93)); }
.intro-card { width: min(640px, 100%); text-align: center; margin: auto; }
.logo { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; }
.badge { font: 400 2.2rem/1 "Bangers", sans-serif; background: var(--gold); color: var(--ink); padding: 8px 12px 4px; border-radius: 8px; transform: rotate(-6deg); box-shadow: 4px 4px 0 var(--red); }
.logo h1 { font: 400 clamp(2.4rem, 8vw, 4.4rem)/1 "Bangers", Impact, sans-serif; letter-spacing: .03em; color: #fff; text-shadow: 4px 4px 0 var(--red); }
.logo h1 em { font-style: normal; color: var(--gold); }
.bn-title { font: 400 1.7rem var(--disp); color: var(--gold); margin-top: 4px; }
.tag { font-size: 1.05rem; margin: 6px 0 16px; opacity: .92; }
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.facts div { background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .16); border-radius: 10px; padding: 10px 6px 8px; }
.facts b { display: block; font: 700 1.9rem/1 var(--ui); color: #ff6b6b; }
.facts span { font-size: .78rem; opacity: .85; line-height: 1.25; display: block; margin-top: 4px; }
.src { font-size: .74rem; opacity: .7; margin: 8px 0 16px; }
.src a { color: #cfe3ff; }
.start-row { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
#name { font: 600 1.05rem var(--ui); padding: 12px 14px; border-radius: 10px; border: 2px solid rgba(255, 255, 255, .3); background: rgba(255, 255, 255, .1); color: #fff; width: min(260px, 100%); text-align: center; outline: none; }
#name:focus { border-color: var(--gold); }
#name::placeholder { color: rgba(255, 255, 255, .55); }
.btn { font: 700 1.1rem var(--ui); padding: 12px 26px; border-radius: 10px; background: var(--gold); color: var(--ink); border: 2px solid var(--ink); box-shadow: 4px 4px 0 var(--red); transition: transform .1s, box-shadow .1s; }
.btn:hover:not(:disabled) { transform: translate(-1px, -1px); box-shadow: 6px 6px 0 var(--red); }
.btn:active:not(:disabled) { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--red); }
.btn:disabled { opacity: .6; cursor: wait; }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: none; }
.how { list-style: none; padding: 0; margin: 18px auto 10px; font-size: .88rem; line-height: 2; opacity: .92; }
.best { color: var(--gold); font-weight: 600; min-height: 1.2em; font-size: .9rem; }
.disc { font-size: .76rem; opacity: .62; margin-top: 8px; }
#pause { background: rgba(20, 17, 15, .8); }
.card { background: var(--ink); border: 3px solid var(--gold); border-radius: 14px; padding: 26px 34px; text-align: center; }
.card h2 { font: 400 2.2rem var(--disp); color: var(--gold); } .card p { margin: 6px 0 18px; }

/* ---------- newspaper ---------- */
#over { background: rgba(20, 17, 15, .86); }
.paper { width: min(680px, 100%); margin: auto; background: var(--paper); color: var(--ink); padding: 22px 26px 18px; border-radius: 4px; box-shadow: 0 20px 60px rgba(0, 0, 0, .6); transform: rotate(-1deg); animation: drop .5s cubic-bezier(.2, 1.3, .4, 1); background-image: repeating-linear-gradient(0deg, rgba(0, 0, 0, .018) 0 2px, transparent 2px 4px); }
@keyframes drop { from { transform: rotate(-14deg) scale(.3); opacity: 0; } }
.paper header { display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 10px; border-bottom: 4px double var(--ink); padding-bottom: 6px; font-size: .74rem; }
.paper header span:last-child { text-align: right; }
.paper header h1 { font: 400 2.6rem/1 var(--disp); color: var(--red); }
.paper h2 { font: 700 clamp(1.4rem, 4.4vw, 2.1rem)/1.28 var(--ui); margin: 14px 0 8px; }
#np-sub { font-size: 1rem; line-height: 1.6; }
.np-cols { display: grid; grid-template-columns: 1.1fr 1fr; gap: 18px; margin: 14px 0; padding-top: 12px; border-top: 1px solid rgba(0, 0, 0, .3); }
#np-stats { list-style: none; padding: 0; font-size: .95rem; }
#np-stats li { display: flex; justify-content: space-between; gap: 10px; padding: 4px 0; border-bottom: 1px dotted rgba(0, 0, 0, .35); }
#np-stats b { font-variant-numeric: tabular-nums; }
#np-side { font-size: .88rem; line-height: 1.6; border-left: 1px solid rgba(0, 0, 0, .3); padding-left: 16px; }
#np-side h3 { font-size: .95rem; margin-bottom: 4px; color: var(--red); }
.np-actions { display: flex; gap: 12px; justify-content: center; margin: 6px 0 12px; flex-wrap: wrap; }
.paper footer { font-size: .78rem; text-align: center; border-top: 4px double var(--ink); padding-top: 8px; font-weight: 600; }

#rotate { display: none; position: fixed; left: 50%; top: 8px; transform: translateX(-50%); background: var(--gold); color: var(--ink); font-size: .8rem; font-weight: 700; padding: 4px 12px; border-radius: 12px; z-index: 20; white-space: nowrap; }

/* ---------- small screens ---------- */
@media (max-width: 760px), (max-height: 520px) {
  :root { --tk-h: 28px; }
  #hud { padding: 6px; gap: 6px; }
  .panel { padding: 6px 8px; border-radius: 8px; }
  .hud-l { min-width: 0; width: 136px; }
  .who b { font-size: 1rem; } .who span { display: none; }
  .money { font-size: 1.2rem; margin: 2px 0 4px; }
  .hud-r { width: 136px; gap: 3px; }
  .meter { grid-template-columns: 62px 1fr; font-size: .64rem; }
  .meter.stam { display: none; }
  .bar { height: 9px; }
  #minimap { width: 118px; height: 86px; }
  #h-zone { font-size: .95rem; padding: 2px 10px 0; }
  #h-zone i { display: none; }
  #corner { right: 150px; top: 6px; } #corner button { width: 30px; height: 30px; font-size: .85rem; }
  #banner b { font-size: 1.4rem; } #banner span { font-size: .8rem; } #banner { top: 26%; padding: 6px 16px; }
  #prompt { font-size: .82rem; padding: 4px 12px; bottom: auto; top: 96px; }
  #ticker { font-size: .8rem; }
  #actions { gap: 6px; right: 8px; flex-wrap: wrap-reverse; justify-content: flex-end; max-width: 190px; }
  #actions button { width: 58px; height: 52px; } #actions button.main { width: 70px; height: 62px; }
  #actions button small { display: none; }
  .facts { grid-template-columns: repeat(2, 1fr); }
  .how { font-size: .78rem; line-height: 1.8; }
  .np-cols { grid-template-columns: 1fr; gap: 10px; }
  #np-side { border-left: 0; padding-left: 0; border-top: 1px solid rgba(0, 0, 0, .3); padding-top: 8px; }
  .paper { padding: 16px 16px 12px; }
  .paper header { grid-template-columns: 1fr; text-align: center; } .paper header span:last-child { text-align: center; }
  .paper header h1 { font-size: 2rem; }
}
@media (pointer: coarse) and (orientation: portrait) { body.playing #rotate { display: block; } }
.how .tc { display: none; }
@media (pointer: coarse) { #prompt kbd { display: none; } .how .kb { display: none; } .how .tc { display: list-item; } }
@media (max-height: 520px) {
  .paper { padding: 10px 16px 8px; transform: none; }
  .paper header { grid-template-columns: 1fr auto 1fr; text-align: left; padding-bottom: 2px; }
  .paper header h1 { font-size: 1.5rem; }
  .paper h2 { font-size: 1.1rem; margin: 6px 0 2px; }
  #np-sub { font-size: .8rem; line-height: 1.4; }
  .np-cols { margin: 6px 0; padding-top: 6px; }
  #np-side { display: none; }
  #np-stats { display: grid; grid-template-columns: 1fr 1fr; column-gap: 18px; font-size: .78rem; }
  #np-stats li { padding: 1px 0; }
  .np-actions { margin: 4px 0 6px; } .np-actions .btn { padding: 7px 18px; font-size: .92rem; }
  .paper footer { font-size: .66rem; padding-top: 4px; }
  .intro-card .how, .intro-card .disc { font-size: .72rem; line-height: 1.5; margin-top: 8px; }
  .facts { grid-template-columns: repeat(4, 1fr); } .facts div { padding: 5px 4px; } .facts b { font-size: 1.3rem; }
  .logo h1 { font-size: 2.2rem; } .badge { font-size: 1.4rem; } .bn-title { font-size: 1.2rem; margin: 0; } .tag { margin: 2px 0 8px; font-size: .9rem; } .src { margin: 4px 0 8px; }
}
@media (prefers-reduced-motion: reduce) { #gok span { animation-duration: .9s; } .paper { animation: none; } }

/* ---------- v2: wanted stars, the cut, bosses, zones, tips ---------- */
.hud-l .meter { margin-top: 6px; }
.stars { display: flex; gap: 3px; justify-content: center; margin-bottom: 2px; }
.stars i { width: 22px; height: 22px; background: rgba(255, 255, 255, .16); clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); transition: background .2s; }
.stars i.on { background: #fff; }
.stars i.half { background: linear-gradient(90deg, #fff 50%, rgba(255, 255, 255, .16) 50%); }
.stars.maxed i { background: #ff4d4d; animation: blink .6s infinite; }
.stars.beyond i { animation: beyond .22s infinite alternate; }
@keyframes beyond { from { background: #ff1e1e; transform: scale(1.15); } to { background: #3a86ff; transform: scale(.9); } }
.dues { font-size: .74rem; font-weight: 600; display: flex; flex-direction: column; gap: 3px; padding: 4px 0 2px; }
.dues b { color: var(--gold); }
.dues .bar { height: 6px; }
.dues .bar i { background: #3a86ff; }
.dues.warn .bar i { background: #f77f00; } .dues.warn { color: #ffd166; }
.dues.bad .bar i { background: var(--red); } .dues.bad { color: #ff8080; animation: blink .8s infinite; }
.dues.ok { opacity: .7; }
#bossbar { width: min(340px, 60vw); background: var(--panel); border: 2px solid var(--red); border-radius: 10px; padding: 4px 10px 6px; text-align: center; }
#bossbar b { display: block; font: 400 1.05rem var(--disp); color: #ff8080; }
#bossbar .bar { height: 10px; } #bossbar .bar i { background: linear-gradient(90deg, #9d0208, #ff4d4d); }
#bossbar.raid { border-color: #f77f00; } #bossbar.raid b { color: #ffb703; } #bossbar.raid .bar i { background: #f77f00; }
.bubble.cop { background: #1d3557; color: #fff; border-color: #a8dadc; }
#zonecard { position: fixed; left: 50%; bottom: calc(var(--tk-h) + 64px); transform: translate(-50%, 10px); opacity: 0; pointer-events: none; transition: opacity .35s, transform .35s; width: min(440px, 88vw); text-align: center; background: var(--panel); border: 2px solid var(--gang, var(--gold)); border-radius: 12px; padding: 8px 16px 10px; z-index: 4; }
#zonecard.on { opacity: 1; transform: translate(-50%, 0); }
#zonecard small { display: block; font-size: .75rem; color: var(--gang, var(--gold)); font-weight: 700; }
#zonecard b { display: block; font: 400 1.8rem/1.2 var(--disp); color: #fff; }
#zonecard p { font-size: .86rem; opacity: .9; margin-top: 2px; }
#tip { position: fixed; left: 12px; top: 168px; width: min(300px, 70vw); background: rgba(255, 214, 10, .95); color: var(--ink); border-radius: 10px; padding: 8px 12px; font-size: .86rem; line-height: 1.45; box-shadow: 4px 4px 0 rgba(0, 0, 0, .4); opacity: 0; transform: translateX(-20px); transition: opacity .3s, transform .3s; pointer-events: none; z-index: 4; }
#tip.on { opacity: 1; transform: none; }
#tip b { display: block; font-size: .72rem; letter-spacing: .04em; opacity: .7; }
#corner { right: 226px; }
#corner #mapbtn { width: auto; padding: 0 12px; border-radius: 18px; font-size: .82rem; }
.link { font: 600 .86rem var(--ui); color: #cfe3ff; text-decoration: underline; background: none; border: 0; cursor: pointer; margin-top: 8px; }
#corner #mute-gok { width: auto; padding: 0 10px; border-radius: 18px; font: 400 .95rem 'Bangers', var(--ui); letter-spacing: .04em; color: var(--gold); }

/* difficulty picker (intro + pause) and sound toggles */
.diff-pick { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 14px auto 0; flex-wrap: wrap; }
.diff-pick > span { font: 600 .86rem var(--ui); opacity: .8; margin-right: 2px; }
.diff-pick button { font: 700 .9rem var(--ui); color: #fff; background: rgba(255, 255, 255, .08); border: 2px solid rgba(255, 255, 255, .25); border-radius: 18px; padding: 5px 14px; cursor: pointer; }
.diff-pick button:hover { border-color: rgba(255, 255, 255, .55); }
.diff-pick button[aria-checked="true"] { background: var(--gold); border-color: var(--gold); color: #14110f; }
.diff-pick small { flex-basis: 100%; text-align: center; font: 400 .78rem var(--ui); opacity: .7; }
.snd-row { display: flex; justify-content: center; gap: 4px 18px; flex-wrap: wrap; }
.card .snd-row .link { display: inline-block; margin: 12px 0 0; }

/* guide arrow + risk words */
#guide { position: fixed; left: 0; top: 0; pointer-events: none; opacity: 0; transition: opacity .25s; z-index: 2; }
#guide.on { opacity: 1; }
#guide i { position: absolute; left: -14px; top: -14px; width: 28px; height: 28px; background: var(--gold); clip-path: polygon(100% 50%, 10% 0, 30% 50%, 10% 100%); filter: drop-shadow(0 0 2px #000); }
#guide span { position: absolute; left: 0; top: 16px; transform: translateX(-50%); white-space: nowrap; font-size: .72rem; font-weight: 700; background: rgba(20, 17, 15, .78); color: #fff; padding: 1px 8px; border-radius: 10px; }
.risk { font-weight: 700; padding: 0 6px; border-radius: 8px; }
.risk.r0 { background: #2d6a4f; } .risk.r1 { background: #b07d00; } .risk.r2 { background: var(--red); }
.card .keys { font-size: .78rem; line-height: 2; max-width: 460px; opacity: .85; margin: 14px auto 0; }
.card .link { display: block; margin: 12px auto 0; }

/* city map */
#bigmap { background: rgba(10, 9, 8, .86); z-index: 9; cursor: pointer; }
.map-wrap { display: flex; gap: 18px; align-items: flex-start; margin: auto; }
#bigmap-c { max-height: calc(100vh - 40px); max-width: 70vw; height: auto; border: 2px solid var(--gold); border-radius: 6px; image-rendering: pixelated; }
.legend { list-style: none; padding: 0; font-size: .85rem; display: flex; flex-direction: column; gap: 8px; }
.legend i { display: inline-block; width: 14px; height: 14px; margin-right: 8px; vertical-align: middle; font-style: normal; }
.lg-you { background: #fff; clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.lg-hide { border: 2px solid #ffd60a; }
.lg-oc { background: #3a86ff; border-radius: 50%; } .lg-neta { background: #fff; border-radius: 50%; }
.lg-shop { background: #ffd60a; transform: scale(.6); }
.lg-boss { color: #d00000; font-size: 1rem; line-height: 14px; }
.legend .hint { opacity: .6; font-size: .75rem; margin-top: 8px; }

/* story */
#story { background: radial-gradient(ellipse at center, rgba(20, 17, 15, .6), rgba(20, 17, 15, .95)); z-index: 11; }
.story-card { width: min(620px, 100%); margin: auto; animation: storyIn .5s ease-out; }
@keyframes storyIn { from { opacity: 0; transform: translateY(16px); } }
.story-card small { display: block; font: 400 1.5rem var(--disp); color: var(--gold); margin-bottom: 8px; }
.story-card p { font-size: clamp(1.1rem, 2.6vw, 1.45rem); line-height: 1.75; text-wrap: pretty; }
.story-nav { display: flex; align-items: center; gap: 16px; margin-top: 26px; }
.story-nav .link { margin: 0 0 0 auto; }
#story-dots { display: flex; gap: 6px; }
#story-dots i { width: 9px; height: 9px; border-radius: 50%; background: rgba(255, 255, 255, .25); }
#story-dots i.on { background: var(--gold); }
#escape { position: fixed; inset: 0; background: #000; z-index: 12; display: flex; align-items: center; justify-content: center; padding: 24px; opacity: 0; transition: opacity .6s; }
#escape.on { opacity: 1; }
#escape p { max-width: 640px; text-align: center; font-size: clamp(1.1rem, 3vw, 1.5rem); line-height: 1.7; opacity: 0; }
#escape p.in { animation: fadeLine .7s forwards; }
#escape p.big { font: 400 clamp(2.6rem, 9vw, 5rem) var(--disp); color: var(--gold); }
@keyframes fadeLine { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

@media (max-width: 760px), (max-height: 520px) {
  .stars i { width: 15px; height: 15px; }
  .dues { font-size: .62rem; }
  #corner { right: 150px; }
  #tip { left: 50%; top: 84px; width: min(420px, 52vw); transform: translate(-50%, -8px); font-size: .7rem; padding: 5px 10px; line-height: 1.35; }
  #tip.on { transform: translate(-50%, 0); }
  #tip b { display: none; }
  #zonecard { bottom: calc(var(--tk-h) + 6px); width: min(300px, 46vw); padding: 4px 10px 6px; } #zonecard small { font-size: .62rem; } #zonecard b { font-size: 1.3rem; } #zonecard p { display: none; }
  #bossbar b { font-size: .85rem; }
  .map-wrap { flex-direction: column; align-items: center; } .legend { flex-direction: row; flex-wrap: wrap; font-size: .7rem; gap: 6px 12px; }
  #bigmap-c { max-height: calc(100vh - 90px); }
}
