/* Kannada Kali — UI styles. Mobile-first. */
:root {
  --y: #ffd100; --r: #d2232a; --ink: #1a1028; --ink2: #2a1d3e; --ink3: #3b2a56; --cream: #fff3d6; --green: #2fae66; --sky: #6cc3e6;
  --px: 'Press Start 2P', ui-monospace, monospace; --kn: 'Baloo Tamma 2', 'Noto Sans Kannada', system-ui, sans-serif;
  /* Running text and romanised Kannada (ā ī ū ē ō ṭ ḍ ḷ ṇ): system fonts place these marks correctly; Baloo Tamma 2 misplaces them. */
  --ro: system-ui, -apple-system, 'Segoe UI', Roboto, 'Noto Sans', 'Helvetica Neue', Arial, sans-serif;
  --sat: env(safe-area-inset-top, 0px); --sab: env(safe-area-inset-bottom, 0px); --sal: env(safe-area-inset-left, 0px); --sar: env(safe-area-inset-right, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--ink); color: var(--cream); font-family: var(--ro); overflow: hidden; overscroll-behavior: none; }
[lang="kn"] { font-family: var(--kn); }
html, body { touch-action: manipulation; -webkit-text-size-adjust: 100%; }
#s-play, #s-play * { touch-action: none; }
body { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
button { font: inherit; color: inherit; cursor: pointer; }
.hidden { display: none !important; }
.kn { font-family: var(--kn); }
.px { image-rendering: pixelated; image-rendering: crisp-edges; }
#app { position: fixed; inset: 0; overflow: hidden; }

.screen { position: absolute; inset: 0; display: none; flex-direction: column; padding: var(--sat) var(--sar) var(--sab) var(--sal); }
.screen.on { display: flex; animation: fadein .25s ease; }
.screen.dim { background: rgba(10, 6, 20, .82); align-items: center; justify-content: center; backdrop-filter: blur(2px); overflow-y: auto; }
@keyframes fadein { from { opacity: 0; } }

/* ---------- buttons ---------- */
.btn { background: var(--y); color: var(--ink); border: 0; border-radius: 4px; padding: 12px 14px; font-family: var(--px); font-size: 10px; letter-spacing: .5px;
  box-shadow: 0 4px 0 #a07800, 0 6px 0 rgba(0,0,0,.35); transition: transform .06s; white-space: nowrap; }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #a07800; }
.btn.big { font-size: 13px; padding: 16px 20px; background: var(--r); color: #fff; box-shadow: 0 4px 0 #7a1018, 0 6px 0 rgba(0,0,0,.35); }
.btn.big:active { box-shadow: 0 1px 0 #7a1018; }
.btn.ghost { background: var(--ink3); color: var(--cream); box-shadow: 0 4px 0 #120a1e; }
.btn.green { background: var(--green); color: #fff; box-shadow: 0 4px 0 #1a6a3c; }
.btn:disabled { opacity: .45; }
.icon { background: rgba(0,0,0,.35); border: 2px solid rgba(255,255,255,.15); border-radius: 6px; width: 40px; height: 40px; font-size: 16px; display: inline-grid; place-items: center; flex: none; }
.link { background: none; border: 0; color: var(--y); text-decoration: underline; padding: 4px; font-size: 13px; }
.row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 12px; }
.pulse { animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.06); } }

/* ---------- title ---------- */
.bgcanvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
@media (orientation: portrait) {
  #s-title .bgcanvas { position: relative; inset: auto; height: auto; aspect-ratio: 400 / 224; flex: none; object-fit: fill; }
  #s-title::after { display: none; }
  .title-wrap { justify-content: flex-start; padding-top: 22px; }
}
#s-title::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(26,16,40,.15) 0%, rgba(26,16,40,.55) 55%, rgba(26,16,40,.92) 100%); z-index: 0; pointer-events: none; }
#s-title > *:not(.bgcanvas) { position: relative; z-index: 1; }
.ribbon { background: linear-gradient(180deg, var(--y) 0 50%, var(--r) 50% 100%); color: var(--ink); overflow: hidden; white-space: nowrap; font-weight: 800; font-size: 13px; padding: 3px 0; }
.ribbon span { display: inline-block; padding-right: 8px; }
.ribbon span + span { color: #fff; }
.marquee { display: inline-block; animation: marq 26s linear infinite; }
@keyframes marq { to { transform: translateX(-50%); } }
.title-wrap { flex: 1 0 auto; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 16px; text-align: center; }
.logo { background: none; border: 0; display: flex; flex-direction: column; align-items: center; animation: bob 2.4s ease-in-out infinite; }
.logo.spin { animation: spin .8s ease; }
@keyframes bob { 50% { transform: translateY(-6px); } }
@keyframes spin { to { transform: rotate(360deg) scale(1.1); } }
.logo-kn { font-family: 'Noto Sans Kannada', var(--kn); font-weight: 700; font-size: clamp(48px, 15vw, 96px); line-height: 1.1; color: var(--y);
  text-shadow: 3px 3px 0 var(--r), 6px 6px 0 var(--ink), 0 0 30px rgba(255,209,0,.35); }
.logo-en { font-family: var(--px); font-size: clamp(14px, 4.4vw, 24px); color: #fff; text-shadow: 3px 3px 0 var(--r); margin-top: 4px; letter-spacing: 2px; }
.tag { margin: 6px 0 4px; font-size: 16px; line-height: 1.3; text-shadow: 0 2px 0 var(--ink); }
.menu { display: flex; flex-direction: column; align-items: center; margin-top: 8px; }
.menu .row { margin-top: 14px; }
.vs { background: var(--r); color: #fff; border: 3px solid var(--y); padding: 10px 12px; border-radius: 6px; font-size: 15px; max-width: 360px; animation: pulse 1.6s infinite; }
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; padding: 8px 12px; }
.ver { font-family: var(--px); font-size: 8px; opacity: .7; }

/* ---------- top bar ---------- */
.topbar { display: flex; align-items: center; gap: 10px; padding: 8px 10px; background: var(--ink2); border-bottom: 3px solid var(--ink3); }
.tb-mid { flex: 1; display: flex; flex-direction: column; line-height: 1.1; }
.tb-mid b { font-size: 20px; color: var(--y); }
.tb-mid small { font-size: 12px; opacity: .8; }
.pill { background: var(--ink3); border-radius: 99px; padding: 6px 10px; font-size: 14px; font-weight: 700; white-space: nowrap; }

/* ---------- map ---------- */
.map-area { flex: 1; display: flex; align-items: center; justify-content: center; padding: 8px; min-height: 0;
  background: radial-gradient(circle at 30% 40%, #2a6a9a 0, #1e4f7a 45%, #163a5c 100%); }
.map-box { position: relative; height: 100%; max-height: 100%; aspect-ratio: 2 / 3; max-width: 100%; }
@supports not (aspect-ratio: 1) { .map-box { width: 66vh; } }
.map-box canvas { width: 100%; height: 100%; display: block; }
#map-nodes { position: absolute; inset: 0; }
.node { position: absolute; transform: translate(-50%, -50%); background: none; border: 0; padding: 0; display: flex; flex-direction: column; align-items: center; z-index: 2; }
.node .dot { width: 34px; height: 34px; border-radius: 50%; background: var(--y); color: var(--ink); border: 3px solid var(--ink); box-shadow: 0 3px 0 var(--ink), 0 0 0 3px var(--r);
  display: grid; place-items: center; font-family: var(--px); font-size: 11px; }
.node .lbl { margin-top: 4px; background: rgba(26,16,40,.85); border-radius: 4px; padding: 1px 6px; font-size: 13px; font-weight: 700; white-space: nowrap; line-height: 1.3; }
.node .st { font-size: 10px; color: var(--y); letter-spacing: 1px; }
.node.locked .dot { background: #6a6178; box-shadow: 0 3px 0 var(--ink); }
.node.locked .lbl { opacity: .7; }
.node.next .dot { animation: pulse 1s infinite; }
.node.secret .dot { background: #b06ae0; color: #fff; box-shadow: 0 3px 0 var(--ink), 0 0 0 3px #fff; }
.node.mystery .dot { background: rgba(255,255,255,.12); color: #fff; border-style: dashed; box-shadow: none; }
.node.mystery .lbl { display: none; }
.node.secret .lbl, .node.bonus .lbl { font-size: 11px; }
.node.bonus .dot { background: #2fae66; color: #fff; box-shadow: 0 3px 0 var(--ink), 0 0 0 3px var(--y); }
.ticker { background: var(--ink2); border-top: 3px solid var(--ink3); padding: 10px 14px; font-size: 14px; min-height: 52px; line-height: 1.35; }
.ticker b { color: var(--y); }

/* ---------- sheets & cards ---------- */
.sheet { background: var(--ink2); border: 3px solid var(--ink3); border-radius: 10px; padding: 16px; width: min(560px, 94vw); max-height: 94%; overflow-y: auto; box-shadow: 0 10px 0 rgba(0,0,0,.4); margin: auto; }
.sheet.center { text-align: center; }
.sheet h2 { margin: 6px 0 4px; display: flex; flex-direction: column; line-height: 1.15; }
.sheet h2 .kn { color: var(--y); font-size: 32px; }
.sheet h2 small { font-family: var(--px); font-size: 10px; opacity: .85; margin-top: 6px; }
.sheet h3 { font-family: var(--px); font-size: 9px; margin: 14px 0 8px; color: #c8b8e8; }
.sheet p { line-height: 1.4; margin: 8px 0; font-size: 15px; }
.topic { color: var(--y); font-weight: 700; }
.postcard { position: relative; border: 4px solid var(--cream); border-radius: 4px; box-shadow: 4px 4px 0 var(--r); background: #000; }
.postcard canvas { width: 100%; display: block; aspect-ratio: 400 / 224; }
.pc-stamp { position: absolute; top: 6px; right: 6px; background: var(--r); color: #fff; font-family: var(--px); font-size: 10px; padding: 6px 7px; border: 2px dashed #fff; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0; }
.chip { background: var(--ink3); border-radius: 99px; padding: 5px 10px; font-size: 13px; font-weight: 700; }
.chip.on { background: var(--y); color: var(--ink); }
.stars { font-size: 40px; letter-spacing: 6px; text-align: center; color: #5a4a70; }
.stars .lit { color: var(--y); text-shadow: 0 3px 0 #a07800; display: inline-block; animation: pop .4s backwards; }
.stars .lit:nth-child(2) { animation-delay: .3s; } .stars .lit:nth-child(3) { animation-delay: .6s; }
@keyframes pop { from { transform: scale(0) rotate(-90deg); } }
.wordchips { display: flex; flex-wrap: wrap; gap: 6px; }
.wchip { background: var(--cream); color: var(--ink); border: 0; border-radius: 6px; padding: 6px 9px; text-align: left; line-height: 1.1; }
.wchip b { font-size: 17px; display: block; }
.wchip small { font-size: 12px; }
.fact { margin-top: 14px; background: rgba(255,209,0,.1); border-left: 4px solid var(--y); padding: 10px; font-size: 14px; line-height: 1.4; }
.fact b { display: block; color: var(--y); font-family: var(--px); font-size: 9px; margin-bottom: 4px; }
.clear-h .kn { font-size: 40px !important; }

/* ---------- play ---------- */
#s-play { background: #0d0816; }
.hud { display: flex; align-items: center; gap: 10px; padding: 6px 10px; background: rgba(13,8,22,.9); font-size: 15px; font-weight: 800; z-index: 3; }
.h-hearts { color: #ff5a7a; letter-spacing: 1px; min-width: 50px; }
.h-letters { display: flex; gap: 3px; }
.h-letters i { font-style: normal; background: #2a2238; color: #5a4a70; border-radius: 3px; padding: 0 5px; font-size: 14px; }
.h-letters i.on { background: var(--y); color: var(--r); }
.h-pause { width: 34px; height: 34px; font-size: 11px; }
#b-hfs { font-size: 15px; margin-left: auto; }
.stage { position: relative; width: 100%; aspect-ratio: 400 / 224; background: #000; flex: none; }
.stage canvas { width: 100%; height: 100%; display: block; touch-action: none; }
.banner { position: absolute; left: 0; right: 0; top: 34%; text-align: center; font-family: var(--px); font-size: clamp(14px, 4vw, 28px); color: var(--y); text-shadow: 3px 3px 0 var(--r), 5px 5px 0 #000; pointer-events: none; animation: pop .3s; }
.banner small { display: block; font-family: var(--kn); font-size: .7em; color: #fff; margin-top: 8px; text-shadow: 2px 2px 0 #000; }
.toasts { flex: 1; display: flex; flex-direction: column; justify-content: flex-start; gap: 8px; padding: 10px; min-height: 0; overflow: hidden; }
.wtoast { background: var(--cream); color: var(--ink); border-radius: 8px; padding: 8px 12px 8px 12px; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 0 8px;
  border-left: 8px solid var(--y); box-shadow: 0 4px 0 rgba(0,0,0,.4); animation: slidein .25s ease; }
.wtoast.bonus { border-left-color: var(--green); }
.wtoast .wk { font-family: 'Noto Sans Kannada', var(--kn); font-size: 24px; font-weight: 700; line-height: 1.15; color: #7a1018; }
.wtoast .wr { font-weight: 800; font-size: 15px; }
.wtoast .we { font-size: 14px; }
.wtoast .wt { font-size: 12.5px; opacity: .75; grid-column: 1 / -1; }
.wtoast .say { grid-row: 1 / 4; grid-column: 2; background: var(--y); border: 0; width: 44px; height: 44px; color: var(--ink); }
.wtoast.out { animation: slideout .3s ease forwards; }
@keyframes slidein { from { transform: translateY(-20px); opacity: 0; } }
@keyframes slideout { to { transform: translateX(110%); opacity: 0; } }
.pad { flex: none; height: clamp(150px, 30vh, 220px); display: flex; align-items: center; justify-content: space-between; padding: 10px 18px calc(10px + var(--sab)); touch-action: none; }
.dpad { width: 168px; height: 92px; border-radius: 46px; background: rgba(255,255,255,.08); border: 3px solid rgba(255,255,255,.18); display: flex; touch-action: none; }
.dpad .arrow { flex: 1; display: grid; place-items: center; font-size: 28px; color: rgba(255,255,255,.75); border-radius: 46px; }
.dpad .arrow.on { background: rgba(255,209,0,.35); color: #fff; }
.rdpad { display: flex; flex-direction: column; gap: 10px; }
.rdpad .arrow { width: 84px; height: 60px; border-radius: 14px; background: rgba(255,255,255,.1); border: 3px solid rgba(255,255,255,.2); font-size: 24px; touch-action: none; }
.rdpad .arrow.on { background: rgba(255,209,0,.4); }
.abtn { width: 104px; height: 104px; border-radius: 50%; background: var(--r); border: 4px solid #7a1018; box-shadow: 0 6px 0 #4a0810; display: flex; flex-direction: column; align-items: center; justify-content: center; touch-action: none; color: #fff; }
.abtn span { font-family: var(--px); font-size: 12px; }
.abtn small { font-size: 15px; font-weight: 800; margin-top: 4px; }
.abtn.on { transform: translateY(4px); box-shadow: 0 2px 0 #4a0810; }

/* landscape phones: overlay the controls on the game */
@media (orientation: landscape) and (max-height: 560px) {
  #s-play { flex-direction: row; flex-wrap: wrap; }
  .hud { position: absolute; top: var(--sat); left: 50%; transform: translateX(-50%); border-radius: 0 0 10px 10px; background: rgba(13,8,22,.7); padding: 4px 12px; }
  .stage { position: absolute; inset: 0; margin: auto; height: 100%; width: auto; max-width: 100%; }
  .toasts { position: absolute; right: calc(8px + var(--sar)); top: 44px; width: min(300px, 40vw); padding: 0; pointer-events: none; }
  .wtoast { pointer-events: auto; padding: 6px 10px; }
  .wtoast .wk { font-size: 19px; } .wtoast .wt { display: none; } .wtoast .say { width: 36px; height: 36px; }
  .pad { position: absolute; left: 0; right: 0; bottom: 0; height: auto; background: none; pointer-events: none; padding: 0 calc(16px + var(--sar)) calc(12px + var(--sab)) calc(16px + var(--sal)); }
  .pad > * { pointer-events: auto; opacity: .7; }
  .dpad { width: 150px; height: 80px; } .abtn { width: 88px; height: 88px; }
}
/* desktop: no touch controls needed but keep visible-and-small hint */
@media (hover: hover) and (pointer: fine) and (min-width: 900px) {
  #s-play { align-items: center; }
  .stage { width: min(100%, calc((100vh - 260px) * 400 / 224)); }
  .toasts { width: min(100%, 720px); }
  .pad { display: none; }
}

/* ---------- mission (GTA-ish cinematic) ---------- */
.cine { background: rgba(0,0,0,.88); justify-content: center; }
.bars { position: absolute; left: 0; right: 0; height: 7vh; background: #000; z-index: 2; animation: bars .5s ease; }
.bars.top { top: 0; } .bars.bottom { bottom: 0; }
@keyframes bars { from { height: 0; } }
.mission { width: min(560px, 94vw); margin: auto; padding: 8vh 0; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; max-height: 100%; }
.m-head { font-family: var(--px); font-size: 11px; color: var(--y); text-shadow: 2px 2px 0 var(--r); }
.m-npc { display: flex; align-items: center; gap: 10px; }
.m-npc canvas { width: 72px; height: 72px; border: 3px solid var(--y); border-radius: 6px; background: #2a2238; }
.m-npc b { font-size: 20px; }
.bubble { position: relative; background: #fff; color: var(--ink); border-radius: 12px; padding: 12px 56px 12px 14px; }
.bubble::before { content: ''; position: absolute; left: 22px; top: -12px; border: 12px solid transparent; border-bottom-color: #fff; border-top: 0; }
.big-kn { font-family: 'Noto Sans Kannada', var(--kn); font-size: 24px; font-weight: 700; color: #7a1018; line-height: 1.3; }
.bubble .ro { font-weight: 800; font-size: 16px; }
.bubble .en { font-size: 15px; margin-top: 4px; }
.bubble .link { color: #3a5ac8; padding: 4px 0; }
.bubble .say { position: absolute; right: 8px; top: 10px; background: var(--y); border: 0; color: var(--ink); }
.m-q { font-family: var(--px); font-size: 9px; margin: 6px 0 0; color: #c8b8e8; }
.opts { display: flex; flex-direction: column; gap: 8px; }
.opt { text-align: left; background: var(--ink3); border: 3px solid #5a4880; border-radius: 8px; padding: 10px 12px; line-height: 1.25; }
.opt b { display: block; font-family: 'Noto Sans Kannada', var(--kn); font-size: 19px; color: var(--y); }
.opt span { font-size: 14px; }
.opt.bad { border-color: var(--r); animation: shake .35s; opacity: .6; }
.opt.good { border-color: var(--green); background: #1f5a3a; }
@keyframes shake { 25% { transform: translateX(-8px); } 75% { transform: translateX(8px); } }
.m-fb { background: rgba(255,255,255,.08); border-radius: 8px; padding: 10px; font-size: 15px; line-height: 1.35; }
.passed { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; z-index: 5; background: rgba(0,0,0,.55); pointer-events: none; }
.passed b { font-family: var(--px); font-size: clamp(18px, 6vw, 40px); color: var(--y); text-shadow: 4px 4px 0 #000; animation: pop .35s; }
.passed span { font-family: var(--px); font-size: clamp(12px, 3.5vw, 22px); color: #fff; margin-top: 14px; text-shadow: 3px 3px 0 #000; }

/* ---------- lists ---------- */
.tabs { display: flex; gap: 6px; overflow-x: auto; padding: 8px 10px; background: var(--ink2); flex: none; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: none; background: var(--ink3); border: 0; border-radius: 99px; padding: 6px 12px; font-weight: 700; font-size: 14px; }
.tab.on { background: var(--y); color: var(--ink); }
.list { flex: 1; overflow-y: auto; padding: 10px; display: flex; flex-direction: column; gap: 8px; -webkit-overflow-scrolling: touch; }
.item { background: var(--ink2); border: 2px solid var(--ink3); border-radius: 8px; padding: 10px 12px; display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; align-items: center; }
.item .k { font-family: 'Noto Sans Kannada', var(--kn); font-size: 22px; font-weight: 700; color: var(--y); line-height: 1.2; }
.item .r { font-weight: 800; }
.item .e { font-size: 14px; opacity: .9; }
.item .t { font-size: 13px; opacity: .65; grid-column: 1 / -1; }
.item.locked { opacity: .5; }
.item .say { grid-row: 1 / 4; grid-column: 2; background: var(--y); color: var(--ink); border: 0; }
.item.badge { grid-template-columns: auto 1fr; }
.item.badge .ico { font-size: 30px; grid-row: 1 / 3; }
.item.badge b { color: var(--y); }
.lb-row { display: grid; grid-template-columns: 32px 1fr auto; gap: 8px; padding: 10px 12px; background: var(--ink2); border-radius: 8px; align-items: center; }
.lb-row .rk { font-family: var(--px); font-size: 10px; color: var(--y); }
.lb-row .sc { font-family: var(--px); font-size: 10px; }
.note { background: rgba(255,209,0,.1); border: 2px dashed rgba(255,209,0,.4); border-radius: 8px; padding: 12px; font-size: 14px; line-height: 1.4; }

/* ---------- modal ---------- */
.modal { position: absolute; inset: 0; background: rgba(5,3,10,.8); display: flex; z-index: 20; padding: var(--sat) 10px var(--sab); animation: fadein .2s; }
.modal .sheet { position: relative; }
.modal img.card { width: 100%; border-radius: 6px; display: block; border: 3px solid var(--ink3); }
.modal .close { position: absolute; top: 8px; right: 8px; }
.wotd { text-align: center; }
.wotd .k { font-family: 'Noto Sans Kannada', var(--kn); font-size: 54px; font-weight: 700; color: var(--y); text-shadow: 3px 3px 0 var(--r); line-height: 1.3; }
.wotd .r { font-size: 22px; font-weight: 800; }
.wotd .e { font-size: 18px; }
.field { width: 100%; font: inherit; font-size: 20px; padding: 12px; border-radius: 6px; border: 3px solid var(--ink3); background: #fff; color: var(--ink); margin: 8px 0; text-align: center; -webkit-user-select: text; user-select: text; }

/* ---------- cheat console ---------- */
.console { position: absolute; inset: 0; background: rgba(0,0,0,.75); z-index: 30; display: flex; align-items: center; justify-content: center; padding: 12px; }
.crt { width: min(560px, 96vw); background: #031a08; border: 4px solid #2a5a32; border-radius: 14px; padding: 14px; color: #5cff7a; font-family: var(--px); font-size: 10px; line-height: 1.8;
  box-shadow: 0 0 40px rgba(92,255,122,.25), inset 0 0 40px rgba(0,0,0,.6); background-image: repeating-linear-gradient(0deg, rgba(0,0,0,.25) 0 1px, transparent 1px 3px); }
.crt-out { max-height: 40vh; overflow-y: auto; white-space: pre-wrap; margin-bottom: 8px; }
.crt form { display: flex; gap: 8px; align-items: center; }
.crt input { flex: 1; min-width: 0; background: transparent; border: 0; border-bottom: 2px solid #5cff7a; color: #5cff7a; font-family: var(--px); font-size: 14px; padding: 6px 2px; outline: none; text-transform: uppercase; -webkit-user-select: text; user-select: text; }
.crt .btn { background: #5cff7a; color: #031a08; box-shadow: none; }
.crt .link { color: #5cff7a; font-family: var(--px); font-size: 9px; margin-top: 8px; }

.toast-top { position: absolute; top: calc(10px + var(--sat)); left: 50%; transform: translateX(-50%); z-index: 40; background: var(--y); color: var(--ink); font-weight: 800; padding: 10px 16px; border-radius: 8px;
  box-shadow: 0 4px 0 var(--r); max-width: 92vw; text-align: center; font-size: 15px; animation: slidein .25s; pointer-events: none; }
.rotate-hint { position: absolute; bottom: calc(8px + var(--sab)); left: 50%; transform: translateX(-50%); font-size: 12px; opacity: .6; z-index: 2; pointer-events: none; white-space: nowrap; }

/* confetti */
.confetti { position: absolute; top: -10px; width: 8px; height: 12px; z-index: 50; pointer-events: none; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); } }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; } }

/* ---------- account, ranks, fullscreen chip ---------- */
.acct { margin-top: 14px; font-size: 14px; }
.foot-l { display: flex; gap: 8px; }
.rankbox { background: linear-gradient(180deg, rgba(255,209,0,.14), rgba(255,209,0,.04)); border: 2px solid rgba(255,209,0,.45); border-radius: 8px; padding: 10px 12px; margin: 10px 0; text-align: left; }
.rk-main { display: flex; align-items: center; gap: 12px; }
.rk-main b { font-family: var(--px); font-size: 22px; color: var(--y); text-shadow: 2px 2px 0 var(--r); white-space: nowrap; }
.rk-main span { font-weight: 800; font-size: 15px; line-height: 1.25; }
.rk-main small { display: block; font-weight: 500; opacity: .75; font-size: 12.5px; }
.rk-nudge { font-size: 14px !important; margin: 6px 0 0 !important; }
.rankbox .row { margin-top: 8px; justify-content: flex-start; }
.rk-pv { display: block; margin-top: 8px; font-size: 11px; opacity: .6; letter-spacing: .3px; }
.rk-load { font-size: 13px; opacity: .7; }
.lb-row.me { background: var(--y); color: var(--ink); }
.lb-row.me .rk { color: var(--r); }
.lb-row small { opacity: .65; font-size: 12px; }
.lb-gap { text-align: center; opacity: .5; letter-spacing: 4px; }
.fs-chip { position: absolute; top: calc(6px + var(--sat)); left: calc(8px + var(--sal)); z-index: 15; background: var(--y); color: var(--ink); border: 0; border-radius: 99px; padding: 7px 12px; font-weight: 800; font-size: 13px; box-shadow: 0 3px 0 var(--r); animation: pulse 1.6s 3; }

.lb-row .sc { text-align: right; }
.lb-row .tm { display: block; font-family: var(--kn); font-size: 12px; opacity: .7; margin-top: 3px; }
.made { order: 3; flex-basis: 100%; font-family: var(--kn); font-size: 12px; opacity: .7; text-align: center; margin-top: 4px; }
@media (max-height: 700px) { .foot { padding-top: 2px; padding-bottom: 2px; } .made { font-size: 11px; line-height: 1.2; margin-top: 0; } }

/* ---------- title screen: plain-HTML intro below the fold (read by search and AI crawlers, and by curious players) ---------- */
#s-title { overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; }
.logo-h1 { margin: 0; font: inherit; }
.foot { flex: none; }
.learn { flex: none; background: var(--ink); padding: 22px 18px calc(28px + var(--sab)); line-height: 1.55; font-size: 15px; border-top: 3px solid var(--ink3); }
.learn > * { max-width: 640px; margin-left: auto; margin-right: auto; }
.learn h2 { font-family: var(--px); font-size: 13px; color: var(--y); text-shadow: 2px 2px 0 var(--r); margin: 6px auto 12px; line-height: 1.6; }
.learn h3 { font-family: var(--px); font-size: 10px; color: #c8b8e8; margin: 20px auto 8px; }
.learn p { margin-top: 8px; margin-bottom: 8px; }
.learn a { color: var(--y); }
.learn .worlds { padding-left: 18px; }
.learn .worlds li { margin: 6px 0; }
.learn .worlds b, .learn summary { color: var(--y); }
.learn [lang="kn"] { font-family: 'Noto Sans Kannada', var(--kn); font-weight: 700; }
.learn details { background: var(--ink2); border: 2px solid var(--ink3); border-radius: 6px; padding: 8px 12px; margin-top: 8px; margin-bottom: 8px; }
.learn summary { cursor: pointer; font-weight: 800; }
.learn .learn-play { text-align: center; margin-top: 18px; }
.learn .btn { display: inline-block; text-decoration: none; }
