:root {
  --ink: #16204a; --st: max(10px, env(safe-area-inset-top)); --sb: max(12px, env(safe-area-inset-bottom));
  --sl: max(10px, env(safe-area-inset-left)); --sr: max(10px, env(safe-area-inset-right));
  --gold: #ffd23c; --orange: #ff8a2b; --blue: #2f6bff; --cyan: #38e3ff;
  font-family: Nunito, ui-rounded, system-ui, -apple-system, Segoe UI, sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #8cc8ff; overscroll-behavior: none; }
body { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
#app { position: fixed; inset: 0; overflow: hidden; touch-action: none; }
#c { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
#ui { position: absolute; inset: 0; pointer-events: none; color: #fff; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; }
svg { display: block; }
.scr { position: absolute; inset: 0; pointer-events: none; opacity: 0; visibility: hidden; transition: opacity .25s, visibility 0s .25s; }
.scr.on { opacity: 1; visibility: visible; transition: opacity .25s; }
.scr.on .pe { pointer-events: auto; }
#vig { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse at 50% 46%, transparent 58%, rgba(10, 20, 60, .32) 100%); }
#warn { position: absolute; inset: 0; pointer-events: none; opacity: 0; box-shadow: inset 0 0 90px 30px rgba(255, 40, 60, .75); transition: opacity .15s; }
#flash { position: absolute; inset: 0; pointer-events: none; opacity: 0; background: #fff; }

/* loader */
#loader { position: absolute; inset: 0; z-index: 50; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 26px;
  background: linear-gradient(180deg, #2b7bff 0%, #7cc4ff 60%, #dff6ff 100%); transition: opacity .45s; }
#loader.hide { opacity: 0; pointer-events: none; }
#loader .lplane { width: 110px; animation: lbob .7s ease-in-out infinite alternate; filter: drop-shadow(0 8px 10px rgba(10, 40, 120, .3)); }
@keyframes lbob { from { transform: translateY(4px) rotate(3deg); } to { transform: translateY(-6px) rotate(-4deg); } }
#loader .lbar { width: min(240px, 66vw); height: 14px; border-radius: 99px; background: rgba(255,255,255,.45); overflow: hidden; }
#loader .lbar i { display: block; height: 100%; width: 10%; background: linear-gradient(90deg, #ffd23c, #ff8a2b); border-radius: 99px; transition: width .25s; }

/* shared */
.pill { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 14px 0 8px; border-radius: 99px; background: rgba(14, 26, 74, .5);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); font-weight: 900; font-size: 18px; color: #fff; white-space: nowrap; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.18); }
.ico { width: 24px; height: 24px; flex: none; display: inline-block; background-size: contain; background-repeat: no-repeat; }
.ico.star { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2.5l2.9 6 6.6.8-4.9 4.6 1.3 6.6L12 17.2l-5.9 3.3 1.3-6.6-4.9-4.6 6.6-.8z' fill='%23ffd23c' stroke='%23c98400' stroke-width='1.4' stroke-linejoin='round'/%3E%3Cpath d='M12 5.5l1.8 3.8 2.4.3' fill='none' stroke='%23fff6c8' stroke-width='1.4' stroke-linecap='round'/%3E%3C/svg%3E"); }
.ico.coin { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='%23ffc626' stroke='%23c98400' stroke-width='1.6'/%3E%3Ccircle cx='12' cy='12' r='6' fill='none' stroke='%23fff0a8' stroke-width='1.6'/%3E%3Cpath d='M10 9.5l2-1.5v8' fill='none' stroke='%23b06d00' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 10px 20px; border-radius: 18px; font-weight: 900; font-size: 18px;
  color: #fff; background: linear-gradient(180deg, #ffb347, #ff7a1f); box-shadow: 0 5px 0 #c4520c, 0 12px 26px rgba(20, 30, 90, .3); white-space: nowrap; transition: transform .08s; position: relative; }
.btn:active { transform: translateY(3px); box-shadow: 0 2px 0 #c4520c; }
.btn svg { width: 24px; height: 24px; flex: none; }
.btn.blue { background: linear-gradient(180deg, #5a8dff, #2f62f0); box-shadow: 0 5px 0 #1f3cb8, 0 12px 26px rgba(20, 30, 90, .3); }
.btn.yel { background: linear-gradient(180deg, #ffe46b, #ffc21f); color: #4a2d00; box-shadow: 0 5px 0 #c98a00, 0 12px 26px rgba(20, 30, 90, .3); }
.btn.teal { background: linear-gradient(180deg, #4fe3c8, #14b5a8); box-shadow: 0 5px 0 #0b7f78, 0 12px 26px rgba(20, 30, 90, .3); }
.btn.grey { background: linear-gradient(180deg, #a7afc8, #8790ad); box-shadow: 0 5px 0 #616a88; }
.btn.big { font-size: 24px; min-height: 62px; padding: 10px 34px; border-radius: 22px; }
.ibtn { width: 46px; height: 46px; border-radius: 15px; display: flex; align-items: center; justify-content: center; background: rgba(14, 26, 74, .55); flex: none;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.ibtn svg { width: 24px; height: 24px; }
.ibtn:active { transform: scale(.93); }
.topbar { position: absolute; top: var(--st); left: var(--sl); right: calc(var(--sr) + 56px); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* title */
#title .logo { position: absolute; left: 50%; top: calc(var(--st) + 58px); transform: translateX(-50%); display: flex; align-items: center; gap: 10px; animation: logoIn .7s cubic-bezier(.2,1.4,.4,1) both; }
#title .logo .lplane { width: 78px; filter: drop-shadow(0 4px 0 rgba(15, 30, 90, .35)); animation: lbob 1.2s ease-in-out infinite alternate; }
#title .logo b { font-weight: 900; font-size: 64px; line-height: .9; letter-spacing: 1px; -webkit-text-stroke: 3px #16204a; paint-order: stroke fill; text-shadow: 0 6px 0 #16204a, 0 12px 24px rgba(10, 20, 60, .35); }
#title .logo .l1 { color: #fff; } #title .logo .l2 { color: var(--gold); }
@keyframes logoIn { from { opacity: 0; transform: translate(-50%, -30px) scale(.8); } }
.tmain { position: absolute; left: 50%; bottom: calc(var(--sb) + 18px); transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 16px; width: min(560px, 94vw); }
#playBtn { flex-direction: row; min-width: 230px; animation: pulse 1.6s ease-in-out infinite; }
#playBtn small { position: absolute; left: 0; right: 0; bottom: -22px; font-size: 13px; font-weight: 800; color: #fff; text-shadow: 0 2px 4px rgba(10, 20, 60, .6); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@keyframes pulse { 50% { transform: scale(1.04); } }
.trow { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 10px; }
.trow .btn { font-size: 16px; padding: 8px 16px; min-height: 48px; }

/* missions sheet */
#maps { background: linear-gradient(180deg, rgba(20, 40, 110, .55), rgba(20, 40, 110, .25) 40%, rgba(20, 40, 110, .45)); }
#maps .sheet { position: absolute; inset: var(--st) var(--sr) var(--sb) var(--sl); display: flex; flex-direction: column; gap: 10px; }
.shead { display: flex; align-items: center; gap: 10px; padding-right: 54px; }
.stitle { font-size: 26px; font-weight: 900; flex: 1; -webkit-text-stroke: 2px #16204a; paint-order: stroke fill; text-shadow: 0 3px 0 #16204a; }
#mapTabs { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 8px; scrollbar-width: none; flex: none; }
#mapTabs::-webkit-scrollbar { display: none; }
.mtab { position: relative; flex: none; width: 150px; height: 86px; border-radius: 18px; overflow: hidden; box-shadow: 0 4px 0 rgba(10, 20, 60, .35); outline: 3px solid transparent; transition: transform .15s, outline-color .15s; }
.mtab.on { outline-color: #fff; transform: translateY(-2px); }
.mtab svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.mtab b { position: absolute; left: 8px; bottom: 6px; right: 8px; font-weight: 900; font-size: 14px; text-align: left; text-shadow: 0 2px 4px rgba(0,0,0,.6); line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mtab .lk { position: absolute; inset: 0; background: rgba(14, 20, 50, .58); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-weight: 900; font-size: 13px; }
.mtab .lk svg { position: static; width: 22px; height: 22px; }
.mtab .st { position: absolute; right: 8px; top: 7px; font-size: 12px; font-weight: 900; background: rgba(14, 26, 74, .55); border-radius: 99px; padding: 1px 8px 1px 4px; display: flex; align-items: center; gap: 3px; }
.mtab .st i { width: 15px; height: 15px; }
#misGrid { flex: 1; min-height: 0; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; align-content: start; padding: 2px 2px 10px; }
.mis { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-height: 96px; padding: 10px 12px; border-radius: 18px; text-align: left;
  background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(232, 240, 255, .96)); color: var(--ink); box-shadow: 0 4px 0 #b9c6e8, 0 10px 22px rgba(10, 20, 60, .2); }
.mis:active { transform: translateY(2px); box-shadow: 0 2px 0 #b9c6e8; }
.mis .mi { width: 40px; height: 40px; border-radius: 13px; display: flex; align-items: center; justify-content: center; }
.mis .mi svg { width: 26px; height: 26px; }
.mis b { font-weight: 900; font-size: 15px; line-height: 1.1; }
.mis .stars { position: absolute; right: 10px; top: 12px; display: flex; gap: 1px; }
.mis .stars i { width: 18px; height: 18px; }
.mis .stars i.off { filter: grayscale(1) brightness(1.5); opacity: .45; }
.mis .num { font-size: 12px; font-weight: 800; color: #6a75a0; }
.mis.lock { opacity: .62; }
.mis.lock::after { content: ''; position: absolute; right: 12px; bottom: 12px; width: 22px; height: 22px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='5' y='10' width='14' height='11' rx='3' fill='%2316204a'/%3E%3Cpath d='M8 10V7a4 4 0 0 1 8 0v3' fill='none' stroke='%2316204a' stroke-width='2.4'/%3E%3C/svg%3E") no-repeat center/contain; }
.mis.next { outline: 3px solid var(--gold); }
.ico.off { opacity: .35; filter: grayscale(1); }

/* hangar */
.hcard { position: absolute; left: 50%; bottom: var(--sb); transform: translateX(-50%); width: min(420px, calc(100vw - 20px)); padding: 12px 14px 14px; border-radius: 24px;
  background: rgba(14, 26, 74, .62); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); display: flex; flex-direction: column; gap: 9px; box-shadow: 0 14px 40px rgba(5, 10, 40, .35); }
.hname { display: flex; align-items: center; gap: 8px; }
.hname b { flex: 1; text-align: center; font-size: 26px; font-weight: 900; -webkit-text-stroke: 2px #16204a; paint-order: stroke fill; }
#hStats { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; align-items: center; font-weight: 800; font-size: 14px; }
.bar { height: 10px; border-radius: 99px; background: rgba(255,255,255,.18); display: grid; grid-template-columns: repeat(5, 1fr); gap: 3px; padding: 0; }
.bar i { border-radius: 99px; background: rgba(255,255,255,.14); }
.bar i.on { background: linear-gradient(90deg, #ffd23c, #ff9a2e); }
#hPaints { display: flex; gap: 7px; overflow-x: auto; padding: 4px 2px; scrollbar-width: none; }
#hPaints::-webkit-scrollbar { display: none; }
.sw { position: relative; flex: none; width: 44px; height: 44px; border-radius: 14px; box-shadow: inset 0 0 0 2px rgba(255,255,255,.35); overflow: hidden; }
.sw.on { box-shadow: inset 0 0 0 3px #fff, 0 0 0 3px var(--gold); }
.sw .pr { position: absolute; left: 0; right: 0; bottom: 0; font-size: 10px; font-weight: 900; background: rgba(10, 16, 40, .7); line-height: 15px; }
.sw.lockd::after { content: ''; position: absolute; inset: 0; background: rgba(10, 16, 40, .35); }
#hAct { width: 100%; }
#hAd .btn { width: 100%; font-size: 15px; min-height: 44px; }
#hTitleSub { font-size: 13px; }

/* modal (difficulty) */
#modal { display: flex; align-items: center; justify-content: center; background: rgba(10, 14, 40, .5); }
#modal .card { width: min(360px, 92vw); padding: 18px; border-radius: 24px; background: #fff; color: var(--ink); text-align: center; display: flex; flex-direction: column; gap: 10px; box-shadow: 0 18px 50px rgba(0,0,0,.35); }
#modal .card b.h { font-size: 22px; font-weight: 900; }
#modal .card .btn { width: 100%; justify-content: space-between; }
#modal .card .btn span.st { display: flex; gap: 2px; }
#modal .card .btn span.st i { width: 18px; height: 18px; }
#modal .card .x { color: #6a75a0; font-weight: 800; background: none; min-height: 44px; }

/* HUD */
.panel { background: rgba(14, 26, 74, .48); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); border-radius: 16px; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.15); }
#obj { position: absolute; top: var(--st); left: var(--sl); padding: 6px 12px 6px 8px; display: flex; flex-direction: column; gap: 1px; max-width: 46vw; }
.orow { display: flex; align-items: center; gap: 7px; font-weight: 900; font-size: 20px; }
.oico { width: 26px; height: 26px; flex: none; background-size: contain; background-repeat: no-repeat; }
.otime { font-variant-numeric: tabular-nums; color: #bfe9ff; font-size: 18px; }
.otime.low { color: #ff6b7d; animation: blink .5s steps(2) infinite; }
@keyframes blink { 50% { opacity: .45; } }
.srow { display: flex; align-items: baseline; gap: 3px; font-weight: 800; font-size: 14px; opacity: .9; font-variant-numeric: tabular-nums; }
.srow small { font-size: 10px; opacity: .8; }
.srow .sep { width: 8px; }
#scorebox { position: absolute; top: var(--st); left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; opacity: 0; transition: opacity .3s; }
#scorebox.on { opacity: 1; }
#score { font-weight: 900; font-size: 30px; line-height: 1; -webkit-text-stroke: 2px #16204a; paint-order: stroke fill; text-shadow: 0 3px 0 #16204a; font-variant-numeric: tabular-nums; }
#combo { display: flex; flex-direction: column; align-items: center; gap: 2px; opacity: 0; transition: opacity .2s; }
#combo.on { opacity: 1; }
#comboX { font-weight: 900; font-size: 18px; color: var(--gold); -webkit-text-stroke: 1.5px #16204a; paint-order: stroke fill; }
#comboBar { display: block; height: 5px; width: 70px; border-radius: 99px; background: linear-gradient(90deg, #ffd23c, #ff6b2e); transform-origin: left; }
#radar { position: absolute; top: calc(var(--st) + 54px); right: var(--sr); width: 92px; height: 92px; border-radius: 50%; }
#tgt { position: absolute; left: 0; top: 0; width: 40px; height: 40px; margin: -20px 0 0 -20px; display: none; will-change: transform; }
#tgt svg { position: absolute; inset: 0; width: 40px; height: 40px; filter: drop-shadow(0 2px 2px rgba(0,0,0,.4)); }
#tgt .ar { display: none; }
#tgt.edge .mk { display: none; } #tgt.edge .ar { display: block; }
#tgtD { position: absolute; top: 40px; left: 50%; transform: translateX(-50%); font-weight: 900; font-size: 13px; text-shadow: 0 1px 3px rgba(0,0,0,.7); white-space: nowrap; }
#pops { position: absolute; left: 0; right: 0; top: 24%; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.pop { font-weight: 900; font-size: 26px; color: #fff; -webkit-text-stroke: 2px #16204a; paint-order: stroke fill; text-shadow: 0 3px 0 #16204a; animation: popIn 1.4s ease-out forwards; white-space: nowrap; }
.pop small { color: var(--gold); font-size: 22px; margin-left: 6px; }
.pop.big { font-size: 34px; color: var(--gold); }
.pop.bad { color: #ff6b7d; }
.pop.good { color: #6dffb0; }
@keyframes popIn { 0% { transform: scale(.4); opacity: 0; } 12% { transform: scale(1.18); opacity: 1; } 22% { transform: scale(1); } 75% { opacity: 1; transform: translateY(-6px); } 100% { opacity: 0; transform: translateY(-26px); } }
#msg { position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%); padding: 7px 16px; border-radius: 99px; background: rgba(14, 26, 74, .6); font-weight: 900; font-size: 18px; opacity: 0; transition: opacity .25s; text-align: center; max-width: 90vw; }
#msg.on { opacity: 1; }
#msg.red { background: rgba(220, 30, 60, .78); }
#count { position: absolute; left: 50%; top: 36%; transform: translate(-50%, -50%); font-weight: 900; font-size: 92px; color: #fff; -webkit-text-stroke: 4px #16204a; paint-order: stroke fill; text-shadow: 0 6px 0 #16204a; opacity: 0; }
#count.go { animation: cnt .8s ease-out; }
@keyframes cnt { 0% { transform: translate(-50%, -50%) scale(2); opacity: 0; } 20% { opacity: 1; transform: translate(-50%, -50%) scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -50%) scale(.9); } }
/* touch controls */
#ctl { position: absolute; inset: 0; display: none; }
.touch #ctl { display: block; }
#stickZone { position: absolute; left: 0; bottom: 0; width: 50%; height: 62%; }
#stickBase { position: absolute; left: calc(var(--sl) + 28px); bottom: calc(var(--sb) + 26px); width: 128px; height: 128px; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.08) 40%, rgba(255,255,255,.2) 70%, rgba(255,255,255,.08)); box-shadow: inset 0 0 0 3px rgba(255,255,255,.4), 0 6px 18px rgba(10, 20, 60, .2); transition: opacity .2s; }
#stickBase::before { content: ''; position: absolute; inset: 22px; border-radius: 50%; border: 2px dashed rgba(255,255,255,.25); }
#stickKnob { position: absolute; left: 50%; top: 50%; width: 58px; height: 58px; margin: -29px 0 0 -29px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #ffffff, #dfe8ff 60%, #b8c6ee); box-shadow: 0 4px 0 #8796c4, 0 8px 16px rgba(10, 20, 60, .35); }
#thrZone { position: absolute; right: calc(var(--sr) + 4px); bottom: calc(var(--sb) + 18px); width: 56px; height: 170px; }
#thrTrack { position: absolute; left: 16px; right: 16px; top: 10px; bottom: 10px; border-radius: 99px; background: rgba(14, 26, 74, .45); box-shadow: inset 0 0 0 2px rgba(255,255,255,.35); overflow: visible; }
#thrFill { position: absolute; left: 3px; right: 3px; bottom: 3px; height: 60%; border-radius: 99px; background: linear-gradient(0deg, #38e3ff, #5dff9a); }
#thrThumb { position: absolute; left: 50%; width: 48px; height: 26px; margin-left: -24px; margin-bottom: -13px; bottom: 60%; border-radius: 10px; background: linear-gradient(180deg, #fff, #d5def5); box-shadow: 0 3px 0 #8796c4, 0 6px 12px rgba(10, 20, 60, .3); }
#thrThumb::after { content: ''; position: absolute; left: 10px; right: 10px; top: 11px; height: 4px; border-radius: 2px; background: #9aa6c9; }
#boostBtn { position: absolute; right: calc(var(--sr) + 74px); bottom: calc(var(--sb) + 30px); width: 86px; height: 86px; border-radius: 50%; background: radial-gradient(circle at 40% 35%, rgba(255, 170, 70, .92), rgba(240, 80, 30, .9)); box-shadow: inset 0 0 0 3px rgba(255,255,255,.55), 0 6px 18px rgba(10, 20, 60, .35); }
#boostBtn.on { transform: scale(.93); background: radial-gradient(circle at 40% 35%, #ffe08a, #ff7a1f); }
#boostBtn.empty { filter: grayscale(.8) brightness(.8); }
#boostBtn .ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
#boostBtn .ring circle { fill: none; stroke-width: 7; }
#boostBtn .ring .bg { stroke: rgba(255,255,255,.22); }
#boostBtn .ring .fg { stroke: #ffd23c; stroke-linecap: round; stroke-dasharray: 283; stroke-dashoffset: 0; }
#boostBtn .flame { position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; margin: -22px 0 0 -22px; filter: drop-shadow(0 2px 0 rgba(120, 30, 0, .45)); }
/* tutorial */
#tut { position: absolute; inset: 0; pointer-events: none; }
#hand { position: absolute; width: 64px; height: 64px; left: 0; top: 0; opacity: 0; transition: opacity .3s; filter: drop-shadow(0 4px 6px rgba(0,0,0,.35)); }
#hand.on { opacity: 1; }
#hand svg { width: 64px; height: 64px; }
#hand.drag svg { animation: hdrag 1.6s ease-in-out infinite; }
#hand.side svg { animation: hside 1.4s ease-in-out infinite; }
#hand.tap svg { animation: htap .9s ease-in-out infinite; }
#hand.down svg { animation: hdown 1.6s ease-in-out infinite; }
@keyframes hdrag { 0%, 100% { transform: translate(0, 0); } 25% { transform: translate(0, -34px); } 50% { transform: translate(30px, -10px); } 75% { transform: translate(-30px, -10px); } }
@keyframes hside { 0%, 100% { transform: translate(0, 0); } 40%, 60% { transform: translate(46px, 0); } }
@keyframes htap { 0%, 100% { transform: scale(1); } 50% { transform: scale(.85) translateY(4px); } }
@keyframes hdown { 0% { transform: translate(0, -50px); } 60%, 100% { transform: translate(0, 30px); } }
#keys { position: absolute; left: 50%; bottom: calc(var(--sb) + 30px); transform: translateX(-50%); display: none; gap: 6px; align-items: flex-end; }
#keys.on { display: flex; }
#keys .k { min-width: 44px; height: 44px; padding: 0 10px; border-radius: 11px; background: #fff; color: var(--ink); font-weight: 900; font-size: 18px; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 0 #9aa6c9; }
#keys .k.hot { background: var(--gold); animation: htap .8s ease-in-out infinite; }
#keys .col { display: flex; flex-direction: column; align-items: center; gap: 6px; }
#keys .row { display: flex; gap: 6px; }
/* toast */
#toast { position: absolute; left: 50%; bottom: calc(var(--sb) + 210px); transform: translate(-50%, 20px); padding: 9px 18px; border-radius: 99px; background: rgba(14, 26, 74, .78); font-weight: 900; font-size: 16px; opacity: 0; transition: opacity .25s, transform .25s; white-space: nowrap; }
#toast.on { opacity: 1; transform: translate(-50%, 0); }
/* result additions inside the SDK card */
.rstars { display: flex; justify-content: center; gap: 6px; margin: 2px 0 8px; }
.rstars i { width: 46px; height: 46px; animation: starIn .45s cubic-bezier(.2,1.6,.4,1) both; }
.rstars i.off { filter: grayscale(1) brightness(1.6); opacity: .35; animation: none; }
.rstars i:nth-child(2) { animation-delay: .25s; margin-top: -10px; } .rstars i:nth-child(3) { animation-delay: .5s; }
@keyframes starIn { from { transform: scale(0) rotate(-40deg); } }
.rcoins { display: inline-flex; align-items: center; gap: 6px; font-weight: 900; font-size: 18px; color: #b06d00; background: #fff4c4; border-radius: 99px; padding: 4px 14px 4px 6px; margin-bottom: 6px; }
.rnote { font-weight: 800; color: #6a7193; font-size: 14px; margin: -4px 0 6px; }

/* phones */
@media (max-width: 560px) {
  #scorebox { top: calc(var(--st) + 62px); left: var(--sl); transform: none; align-items: flex-start; }
  #scorebox #combo { align-items: flex-start; }
}
@media (max-width: 420px) {
  #title .logo b { font-size: 48px; } #title .logo .lplane { width: 58px; }
  .btn.big { font-size: 21px; min-height: 58px; padding: 8px 26px; }
  .trow .btn { font-size: 14px; padding: 8px 12px; gap: 6px; }
  .trow .btn svg { width: 20px; height: 20px; }
  .orow { font-size: 17px; } .otime { font-size: 15px; }
  #score { font-size: 24px; }
  .pop { font-size: 21px; } .pop.big { font-size: 27px; } .pop small { font-size: 18px; }
  #radar { width: 78px; height: 78px; }
  #misGrid { grid-template-columns: repeat(2, 1fr); }
  .mtab { width: 128px; height: 76px; }
}
@media (max-height: 460px) {
  #title .logo { top: calc(var(--st) + 6px); } #title .logo b { font-size: 46px; } #title .logo .lplane { width: 56px; }
  .tmain { gap: 8px; bottom: calc(var(--sb) + 8px); }
  .btn.big { min-height: 52px; font-size: 20px; }
  .trow { margin-top: 12px; }
  .hcard { left: auto; right: var(--sr); transform: none; bottom: var(--sb); width: min(380px, 52vw); gap: 6px; padding: 10px 12px; }
  .hname b { font-size: 21px; }
  #stickBase { width: 116px; height: 116px; bottom: calc(var(--sb) + 14px); }
  #thrZone { height: 140px; bottom: calc(var(--sb) + 10px); }
  #boostBtn { width: 76px; height: 76px; bottom: calc(var(--sb) + 20px); }
  #pops { top: 18%; }
  #count { font-size: 70px; }
  #toast { bottom: calc(var(--sb) + 150px); }
  .mtab { height: 66px; width: 136px; }
  .mis { min-height: 80px; }
}
