:root { --or: #ff8a1e; --or2: #ffb547; --pu: #b04dff; --pu2: #7a2cff; --ink: #fff4e6; --glass: rgba(34, 12, 52, 0.48); }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #12051d; color: var(--ink); font-family: "Avenir Next", "Segoe UI", Roboto, system-ui, sans-serif; -webkit-user-select: none; user-select: none; overscroll-behavior: none; }
#paint { position: fixed; inset: 0; background: radial-gradient(ellipse at 72% 18%, rgba(255,214,160,0.55) 0, rgba(255,140,90,0.18) 9%, rgba(0,0,0,0) 28%), linear-gradient(#0b0318 0%, #24093c 45%, #52184f 70%, #1a0a14 72%, #0c0610 100%); }
#paint .moon { position: absolute; left: 66%; top: 7%; width: 13vmin; height: 13vmin; border-radius: 50%; background: radial-gradient(circle at 40% 38%, #fffaf0, #ffe4b0 60%, #e9bf86); box-shadow: 0 0 60px 20px rgba(255, 210, 150, 0.35); }
#paint .fogp { position: absolute; left: 0; right: 0; bottom: 18%; height: 22%; background: linear-gradient(rgba(180,140,220,0), rgba(180,140,220,0.25), rgba(180,140,220,0)); filter: blur(8px); }
#gl, #fx2d { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
#fx2d { pointer-events: none; }
#flash { position: fixed; inset: 0; pointer-events: none; background: radial-gradient(circle, rgba(255,230,190,0.9), rgba(255,140,40,0.5)); opacity: 0; mix-blend-mode: screen; }
#vignette { position: fixed; inset: 0; pointer-events: none; background: radial-gradient(ellipse at center, rgba(0,0,0,0) 55%, rgba(10,0,20,0.55) 100%); }
.hidden { display: none !important; }
.glass { background: var(--glass); border: 1px solid rgba(255, 190, 120, 0.28); box-shadow: 0 0 0 1px rgba(176, 77, 255, 0.18) inset, 0 10px 40px rgba(0,0,0,0.45), 0 0 32px rgba(255, 120, 30, 0.12); -webkit-backdrop-filter: blur(12px) saturate(140%); backdrop-filter: blur(12px) saturate(140%); border-radius: 22px; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; }
button.big, button.mid { border-radius: 999px; font-weight: 900; letter-spacing: 0.06em; background: linear-gradient(180deg, #ffb547, #ff7a12 55%, #e0540a); color: #2a0a00; box-shadow: 0 0 0 2px rgba(255,220,160,0.5) inset, 0 6px 0 #8a2e00, 0 0 34px rgba(255,140,30,0.55); text-shadow: 0 1px 0 rgba(255,255,255,0.35); transition: transform .08s, filter .15s; }
button.big { font-size: clamp(22px, 3.4vw, 34px); padding: 16px 54px; }
button.mid { font-size: 16px; padding: 11px 20px; background: linear-gradient(180deg, #c27bff, #8a3cff 60%, #6420d0); color: #fff; box-shadow: 0 0 0 2px rgba(230,200,255,0.4) inset, 0 5px 0 #3a1080, 0 0 26px rgba(176,77,255,0.5); text-shadow: 0 1px 2px rgba(0,0,0,0.4); }
button.big:hover, button.mid:hover { filter: brightness(1.1); } button.big:active, button.mid:active { transform: translateY(3px); }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,200,140,0.25); font-weight: 700; font-size: 15px; cursor: pointer; }
.pill input { accent-color: var(--or); width: 18px; height: 18px; }
.seg { display: inline-flex; border-radius: 999px; overflow: hidden; border: 1px solid rgba(255,200,140,0.3); background: rgba(0,0,0,0.25); }
.seg button { padding: 8px 14px; font-weight: 800; font-size: 14px; background: transparent; opacity: 0.7; }
.seg button.on { background: linear-gradient(180deg, #ffb547, #ff7a12); color: #2a0a00; opacity: 1; }
.seg.small button { padding: 4px 10px; font-size: 12px; }
.screen { position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: space-between; padding: max(3vh, env(safe-area-inset-top)) 16px max(3vh, env(safe-area-inset-bottom)); pointer-events: none; }
.screen > * { pointer-events: auto; }
.titleBlock { text-align: center; pointer-events: none !important; margin-top: 2vh; }
.kicker { font-weight: 800; letter-spacing: 0.32em; text-transform: uppercase; font-size: clamp(11px, 1.5vw, 15px); color: #ffd9a8; text-shadow: 0 0 12px rgba(255,140,40,0.8); }
.title { margin: 0.1em 0 0.05em; line-height: 0.86; font-family: "Arial Black", "Avenir Next Heavy", Impact, sans-serif; font-weight: 900; font-size: clamp(56px, 12.5vw, 168px); letter-spacing: -0.01em; }
.title span { display: block; }
.title .t1 { background: linear-gradient(180deg, #fff3c4 0%, #ffb547 35%, #ff6a0a 70%, #b83a00 100%); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 0 18px rgba(255,120,20,0.85)) drop-shadow(0 6px 0 #5a1600); }
.title .t2 { background: linear-gradient(180deg, #f6e0ff 0%, #c47bff 40%, #7a2cff 80%, #4a10a0 100%); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 0 20px rgba(176,77,255,0.9)) drop-shadow(0 6px 0 #26064a); margin-top: 0.02em; }
.tag { font-weight: 700; font-size: clamp(14px, 2vw, 20px); color: #f3dcff; text-shadow: 0 2px 10px rgba(0,0,0,0.8); }
.startCard { padding: 22px 26px 16px; display: flex; flex-direction: column; align-items: center; gap: 14px; max-width: 640px; width: 100%; }
.how { font-size: 14px; opacity: 0.9; text-align: center; }
.row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; align-items: center; }
.best { font-size: 14px; opacity: 0.85; } .best b { color: var(--or2); }
#hud { position: fixed; left: 0; right: 0; top: 0; display: flex; justify-content: space-between; align-items: flex-start; padding: max(12px, env(safe-area-inset-top)) 14px 0; pointer-events: none; }
#hud button { pointer-events: auto; }
.hud-left { padding: 8px 18px 10px; min-width: 150px; border-radius: 18px; }
.lbl { font-size: 12px; letter-spacing: 0.25em; text-transform: uppercase; opacity: 0.8; font-weight: 800; }
#score { font-family: "Arial Black", Impact, sans-serif; font-size: clamp(30px, 4.6vw, 48px); line-height: 1; color: #ffe2a8; text-shadow: 0 0 16px rgba(255,140,30,0.9), 0 3px 0 #6a1e00; }
#score.bump { animation: bump .25s ease-out; } @keyframes bump { 0% { transform: scale(1.25); } 100% { transform: scale(1); } }
#mult { margin-top: 4px; display: inline-block; padding: 2px 10px; border-radius: 999px; font-weight: 900; background: linear-gradient(90deg, #ff6ad5, #b04dff); box-shadow: 0 0 18px rgba(255,100,220,0.7); animation: pulse 0.6s infinite alternate; }
@keyframes pulse { to { transform: scale(1.08); } }
.hud-mid { display: flex; flex-direction: column; align-items: center; gap: 8px; }
#timerWrap { position: relative; width: 84px; height: 84px; border-radius: 50%; }
#timerWrap svg { position: absolute; inset: 0; transform: rotate(-90deg); }
#timerWrap circle { fill: none; stroke-width: 7; } .trk { stroke: rgba(255,255,255,0.12); }
.ring { stroke: url(#none); stroke: #ff9a2a; stroke-linecap: round; stroke-dasharray: 276.5; filter: drop-shadow(0 0 6px #ff7a12); transition: stroke .3s; }
#timer { position: absolute; inset: 0; display: grid; place-items: center; font-family: "Arial Black", Impact, sans-serif; font-size: 32px; text-shadow: 0 0 12px rgba(255,140,30,0.8); }
#timerWrap.low .ring { stroke: #ff3a5a; } #timerWrap.low #timer { color: #ffb0b8; animation: pulse .5s infinite alternate; }
#bossBar { width: min(60vw, 520px); text-align: center; }
.bname { font-family: "Arial Black", Impact, sans-serif; font-size: 15px; letter-spacing: 0.3em; color: #ffcf8a; text-shadow: 0 0 10px #ff5a00; }
.btrack { height: 14px; border-radius: 999px; background: rgba(0,0,0,0.5); border: 1px solid rgba(255,180,100,0.5); overflow: hidden; box-shadow: 0 0 18px rgba(255,90,0,0.5); }
#bossFill { height: 100%; width: 100%; background: linear-gradient(90deg, #ff3a10, #ffb547); box-shadow: 0 0 12px #ff7a12 inset; transition: width .15s; }
.hud-right { display: flex; gap: 8px; }
.icon { width: 46px; height: 46px; border-radius: 50%; font-size: 20px; display: grid; place-items: center; }
#combo, #banner { position: fixed; left: 50%; top: 42%; transform: translate(-50%, -50%); pointer-events: none; text-align: center; font-family: "Arial Black", Impact, sans-serif; white-space: nowrap; }
#combo { top: 30%; font-size: clamp(36px, 7vw, 84px); color: #fff; opacity: 0; }
#combo.show { animation: comboPop 0.9s ease-out forwards; }
@keyframes comboPop { 0% { opacity: 0; transform: translate(-50%, -50%) scale(0.4) rotate(-6deg); } 15% { opacity: 1; transform: translate(-50%, -50%) scale(1.25) rotate(3deg); } 30% { transform: translate(-50%, -50%) scale(1) rotate(-2deg); } 75% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -62%) scale(1.05); } }
#combo .c { background: linear-gradient(180deg, #fff6c8, #ffb547 45%, #ff5a0a); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 0 14px rgba(255,120,20,0.95)) drop-shadow(0 5px 0 #4a1000); }
#combo .p { display: block; font-size: 0.42em; color: #f2d0ff; text-shadow: 0 0 12px #b04dff; }
#combo.hot .c { background: linear-gradient(180deg, #ffe0fb, #ff4fd8 38%, #9a2cff 80%); -webkit-background-clip: text; background-clip: text; filter: drop-shadow(0 0 22px rgba(255,90,230,1)) drop-shadow(0 5px 0 #2a0650); }
#banner { font-size: clamp(36px, 8vw, 112px); opacity: 0; }
#banner.show { animation: bannerIn 1.6s ease-out forwards; }
#banner span { background: linear-gradient(180deg, #fff6c8, #ffb547 45%, #ff5a0a); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 0 22px rgba(255,120,20,1)) drop-shadow(0 7px 0 #4a1000); }
#banner.purple span { background: linear-gradient(180deg, #ffffff, #d49bff 45%, #7a2cff); -webkit-background-clip: text; background-clip: text; filter: drop-shadow(0 0 24px rgba(176,77,255,1)) drop-shadow(0 7px 0 #1a0440); }
#banner small { display: block; font-size: 0.32em; letter-spacing: 0.2em; color: #ffe9c8; text-shadow: 0 0 14px #ff7a12; }
@keyframes bannerIn { 0% { opacity: 0; transform: translate(-50%, -50%) scale(1.6); } 12% { opacity: 1; transform: translate(-50%, -50%) scale(0.95); } 20% { transform: translate(-50%, -50%) scale(1.03); } 80% { opacity: 1; transform: translate(-50%, -50%) scale(1); } 100% { opacity: 0; transform: translate(-50%, -50%) scale(1.1); } }
.modal { position: fixed; inset: 0; display: grid; place-items: center; background: rgba(8,2,16,0.45); }
.panel { padding: 22px 26px; min-width: min(92vw, 460px); display: flex; flex-direction: column; gap: 14px; align-items: stretch; }
.panel h2 { margin: 0; text-align: center; font-family: "Arial Black", Impact, sans-serif; letter-spacing: 0.08em; color: #ffd9a8; text-shadow: 0 0 14px rgba(255,120,20,0.8); }
.field { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; font-weight: 700; }
.field input[type=range] { flex: 1; min-width: 160px; accent-color: var(--or); }
.hint { font-size: 13px; opacity: 0.8; text-align: right; margin-top: -8px; min-height: 1em; }
#end { justify-content: center; }
#endCard { width: min(94vw, 560px); padding: 20px 24px 18px; text-align: center; display: flex; flex-direction: column; gap: 10px; animation: cardIn .5s cubic-bezier(.2,1.4,.4,1); }
@keyframes cardIn { from { transform: scale(0.7) translateY(30px); opacity: 0; } }
.endTitle { font-family: "Arial Black", Impact, sans-serif; letter-spacing: 0.3em; font-size: 15px; color: #f2d0ff; text-shadow: 0 0 12px #b04dff; }
#endScore { font-family: "Arial Black", Impact, sans-serif; font-size: clamp(56px, 13vw, 96px); line-height: 1; background: linear-gradient(180deg, #fff3c4, #ffb547 45%, #ff6a0a); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 0 18px rgba(255,120,20,0.9)) drop-shadow(0 5px 0 #4a1000); }
#newBest { font-weight: 900; color: #fff; background: linear-gradient(90deg, #ff6ad5, #b04dff); border-radius: 999px; padding: 4px 14px; align-self: center; box-shadow: 0 0 20px rgba(255,100,220,0.8); animation: pulse .5s infinite alternate; }
#rank { font-size: 24px; font-weight: 900; color: #ffd9a8; text-shadow: 0 0 14px rgba(255,140,30,0.8); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.stats div { background: rgba(255,255,255,0.07); border-radius: 14px; padding: 8px 4px; display: flex; flex-direction: column; }
.stats b { font-size: 22px; color: #fff0d0; } .stats span { font-size: 11px; text-transform: uppercase; letter-spacing: 0.12em; opacity: 0.75; }
.nameRow { display: flex; gap: 10px; align-items: center; justify-content: center; font-weight: 700; }
.nameRow input { font: inherit; font-weight: 800; color: #fff; background: rgba(0,0,0,0.35); border: 1px solid rgba(255,190,120,0.45); border-radius: 12px; padding: 8px 12px; width: 200px; -webkit-user-select: text; user-select: text; }
.shareBox { background: rgba(0,0,0,0.28); border-radius: 14px; padding: 10px 12px; text-align: left; }
.shareHead { display: flex; justify-content: space-between; align-items: center; font-size: 12px; letter-spacing: 0.15em; text-transform: uppercase; opacity: 0.9; margin-bottom: 6px; }
#shareText { font-size: 14px; line-height: 1.4; white-space: pre-wrap; -webkit-user-select: text; user-select: text; }
.btns { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; align-items: center; margin-top: 4px; }
#toast { position: fixed; left: 50%; bottom: 7vh; transform: translateX(-50%); padding: 10px 18px; border-radius: 999px; background: rgba(30,10,46,0.85); border: 1px solid rgba(255,190,120,0.4); font-weight: 800; opacity: 0; transition: opacity .3s; pointer-events: none; text-align: center; max-width: 90vw; }
#toast.show { opacity: 1; }
body.playing #vignette { background: radial-gradient(ellipse at center, rgba(0,0,0,0) 60%, rgba(10,0,20,0.5) 100%); }
@media (max-width: 640px) {
  .hud-left { min-width: 110px; padding: 6px 12px; } #timerWrap { width: 66px; height: 66px; } #timer { font-size: 24px; } .icon { width: 40px; height: 40px; font-size: 17px; }
  .stats { grid-template-columns: repeat(2, 1fr); } .startCard { padding: 16px; gap: 10px; } button.big { padding: 14px 40px; }
}
@media (max-height: 560px) { .title { font-size: clamp(40px, 9vw, 90px); } .kicker, .tag { display: none; } }

/* ---------- ONE-TAP START (2026-10-23): one big glowing PLAY in the thumb zone, options in a sheet, 44 px targets ---------- */
#toast:not(.show) { visibility: hidden; }
#hint { position: fixed; left: 50%; top: calc(max(12px, env(safe-area-inset-top)) + 70px); transform: translate(-50%, -8px); width: max-content; max-width: min(92vw, 640px); padding: 10px 18px; border-radius: 18px; background: rgba(20,10,40,0.84); border: 1px solid rgba(255,190,120,0.45); box-shadow: 0 0 26px rgba(255,140,40,0.35); font-weight: 800; font-size: clamp(13px, 1.7vw, 16px); text-align: center; line-height: 1.35; pointer-events: none; opacity: 0; visibility: hidden; transition: opacity .35s, transform .35s, visibility 0s .35s; z-index: 8; }
#hint.show { opacity: 1; visibility: visible; transform: translate(-50%, 0); transition: opacity .35s, transform .35s; }
#start .startCard { gap: 12px; }
button.big.play { min-width: min(78vw, 340px); min-height: 72px; font-size: clamp(30px, 4.4vw, 44px); padding: 14px 56px; letter-spacing: 0.12em; position: relative; animation: playGlow 1.6s ease-in-out infinite alternate; }
@keyframes playGlow { from { box-shadow: 0 0 0 2px rgba(255,220,160,0.5) inset, 0 6px 0 #8a2e00, 0 0 26px rgba(255,140,30,0.55); } to { box-shadow: 0 0 0 2px rgba(255,235,190,0.8) inset, 0 6px 0 #8a2e00, 0 0 58px rgba(255,150,40,0.95), 0 0 110px rgba(176,77,255,0.45); } }
button.big.play:active { animation: none; }
#btnPlay.mid { min-height: 44px; }
.startRow { gap: 10px; flex-wrap: nowrap; justify-content: center; }
.pill, .seg button, button.mid { min-height: 44px; }
.seg button { min-width: 48px; }
.icon, #hud .icon { width: 44px; height: 44px; min-width: 44px; }
#nav button, #btnBack { min-height: 44px; }
.wheel button { height: 44px; }
.sheetHead { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sheetHead h2 { text-align: left; font-size: clamp(18px, 3vw, 24px); }
.xBtn { flex: none; background: rgba(255,255,255,0.1); border: 1px solid rgba(255,200,140,0.3); font-size: 18px; font-weight: 900; }
.hdBtns { display: flex; gap: 8px; flex: none; }
#settings .panel { max-height: calc(100dvh - 16px); overflow: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
#settings .how { font-size: 13px; opacity: 0.85; }
.fBtns { justify-content: flex-end; }
#tut .panel { max-height: calc(100dvh - 16px); overflow: auto; }
body.sheet #start .startCard, body.sheet #start .titleBlock, body.sheet #pauseScr { visibility: hidden; }
.fKM { flex-wrap: nowrap; justify-content: flex-start; gap: 8px; }
.fKM .pill { padding: 8px 12px; font-size: 14px; gap: 6px; white-space: nowrap; }
.vols { flex-wrap: nowrap; gap: 14px; align-items: flex-end; }
.vols label:not(.pill) { flex: 1; display: flex; flex-direction: column; gap: 0; font-size: 13px; min-width: 0; }
.vols input[type=range] { width: 100%; min-width: 0; min-height: 44px; accent-color: var(--or); }
.fSens .pill { flex: none; white-space: nowrap; font-size: 14px; }
@media (max-width: 640px) {
  .startCard { padding: 14px 12px 12px; }
  #settings .panel, #tut .panel { min-width: 0; width: min(96vw, 460px); padding: 14px 14px; gap: 10px; }
  .seg button { padding: 8px 10px; }
}
@media (max-width: 400px) { .fQ > span, .fLang > span { display: none; } .fQ, .fLang { justify-content: center; } .seg button { padding: 8px 7px; font-size: 13px; } .sheetHead h2 { font-size: 17px; } .fKM .pill, .fSens .pill { padding: 8px 9px; font-size: 13px; } }
@media (max-width: 360px) { #start.screen { padding-left: 8px; padding-right: 8px; } #start .startCard { padding-left: 8px; padding-right: 8px; } .startRow .pill { padding: 8px 10px; font-size: 14px; } }
@media (max-height: 760px) { #settings .fBtns, #settings .how, #settings .hint { display: none; } }
@media (max-height: 720px) and (max-aspect-ratio: 4/5) { .tag { display: none; } }
@media (max-height: 600px) and (max-aspect-ratio: 4/5) { .kicker { display: none; } button.big.play { min-height: 64px; } }
@media (max-height: 520px) and (min-aspect-ratio: 1/1) {
  .screen { padding-top: max(8px, env(safe-area-inset-top)); padding-bottom: max(8px, env(safe-area-inset-bottom)); }
  .titleBlock { margin-top: 0; }
  .startCard, #start .startCard { padding: 10px 14px; gap: 8px; max-width: 620px; }
  #start .best { display: none; }
  button.big.play { min-height: 56px; font-size: 28px; padding: 8px 44px; }
  #settings .panel { width: min(96vw, 760px); max-width: none; display: grid; grid-template-columns: 1fr 1fr; column-gap: 18px; row-gap: 8px; align-items: center; padding: 10px 16px;
    grid-template-areas: "h h" "km q" "l v" "w s"; }
  #settings .sheetHead { grid-area: h; } #settings .fKM:not(.fWalk) { grid-area: km; } #settings .fQ { grid-area: q; } #settings .fLang { grid-area: l; } #settings .vols:not(.fSens) { grid-area: v; } #settings .fWalk { grid-area: w; } #settings .fSens { grid-area: s; }
  .fQ > span, .fLang > span { display: none; }
  #tut .panel { padding: 10px 16px; gap: 8px; }
}
@media (pointer: coarse) { .pill, .seg button, button.mid, .icon { min-height: 44px; } .icon { min-width: 44px; } }

/* ---------- fit pass: the end card fits 375×667, 320×568 and phone landscape without scrolling ---------- */
.shareHead .seg.small button { min-height: 44px; min-width: 44px; padding: 4px 10px; }
@media (max-height: 760px) and (max-aspect-ratio: 4/5) {
  #endCard { padding: 12px 14px; gap: 6px; max-height: calc(100dvh - 12px); overflow: hidden; }
  .endTitle { font-size: 17px; } #endTime { font-size: 46px; } #endStars { font-size: 24px; letter-spacing: 4px; } #rank { font-size: 18px; } #newBest { font-size: 13px; padding: 3px 12px; }
  .stats { gap: 6px; } .stats div { padding: 4px 2px; border-radius: 10px; } .stats b { font-size: 16px; } .stats span { font-size: 9px; letter-spacing: 0.06em; }
  .bestRow { font-size: 14px; } .nameRow input { padding: 8px 10px; width: 170px; min-height: 44px; }
  .shareBox { padding: 4px 10px; } .shareHead { margin-bottom: 0; } #shareText { display: none; }
  .btns { gap: 8px; margin-top: 2px; } .btns button.mid { font-size: 14px; padding: 10px 14px; } .btns button.big { font-size: 22px; padding: 10px 34px; }
}
@media (max-height: 600px) and (max-aspect-ratio: 4/5) { #endStars { display: none; } #endTime { font-size: 40px; } .btns button.mid { padding: 10px 10px; font-size: 13px; } }
@media (max-height: 520px) and (min-aspect-ratio: 1/1) {
  #endCard { width: min(96vw, 780px); max-height: calc(100dvh - 10px); overflow: hidden; display: grid; grid-template-columns: 1fr 1fr; column-gap: 16px; row-gap: 4px; padding: 10px 16px; align-items: center; }
  #endCard > * { grid-column: 1; } #endCard > .nameRow, #endCard > .shareBox, #endCard > .btns { grid-column: 2; }
  #endCard > .nameRow { grid-row: 1 / 3; } #endCard > .shareBox { grid-row: 3 / 4; } #endCard > .btns { grid-row: 4 / 8; }
  .endTitle { font-size: 15px; } #endTime { font-size: 38px; } #endStars { font-size: 20px; } #rank { font-size: 16px; } #newBest { font-size: 12px; padding: 2px 10px; }
  .stats { gap: 4px; } .stats div { padding: 3px 2px; } .stats b { font-size: 14px; } .stats span { font-size: 9px; letter-spacing: 0.04em; } .bestRow { font-size: 13px; }
  #shareText { display: none; } .shareBox { padding: 4px 10px; } .shareHead { margin-bottom: 0; }
  .btns { gap: 6px; } .btns button.mid { font-size: 13px; padding: 9px 12px; } .btns button.big { font-size: 20px; padding: 8px 28px; }
}
@media (max-height: 760px) and (max-aspect-ratio: 4/5), (max-height: 520px) and (min-aspect-ratio: 1/1) {
  .btns { display: grid; grid-template-columns: 1fr 1fr; justify-items: stretch; }
  .btns button.mid { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-left: 8px; padding-right: 8px; }
  .btns #btnReplay, .btns #btnMenu { grid-column: 1 / -1; justify-self: center; }
  #newBest { justify-self: center; }
}
@media (max-width: 360px) { .btns button.big { font-size: 19px; padding: 10px 22px; } .btns button.mid { font-size: 12px; } }
/* fit pass 2: landscape sheet stays inside the screen, compact how-to card, 44 px end-card controls */
#settings .panel > * { min-width: 0; }
.btns button, .nameRow input { min-height: 44px; }
@media (max-height: 520px) and (min-aspect-ratio: 1/1) {
  #settings .panel { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-width: 0; }
  #settings .seg button { padding: 8px 8px; font-size: 13px; }
  #tut .panel { min-width: 0; width: min(96vw, 620px); padding: 8px 16px; gap: 4px; }
  #tutIcon { font-size: 26px; line-height: 1; margin: 0; } #tut h2 { font-size: 18px; margin: 0; } #tut p { margin: 0; font-size: 13px; line-height: 1.3; }
  #tut .row { gap: 10px; } #tutNext { font-size: 18px; padding: 8px 26px; min-height: 44px; }
}
