:root {
  --orange: #FF8A3D;
  --orange-deep: #E65F32;
  --orange-dark: #B9472C;
  --cream: #FFF4D6;
  --ink: #26314A;
  --muted: #8B8790;
  --glass: rgba(25, 37, 61, .78);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; overscroll-behavior: none; }
body { background: #172640; color: #fff; font-family: "PingFang SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, sans-serif; user-select: none; -webkit-user-select: none; touch-action: none; }
button { border: 0; margin: 0; font: inherit; color: inherit; cursor: pointer; touch-action: none; }
button:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.is-hidden { display: none !important; }
.game { position: fixed; inset: 0; overflow: hidden; isolation: isolate; background: #8FD9E8; }
.scene-artwork { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; transition: filter .6s ease; }
#gameCanvas { position: absolute; inset: 0; z-index: 1; display: block; width: 100%; height: 100%; }
.screen { position: absolute; inset: 0; z-index: 5; }

/* Home and level selection */
.start-screen {
  display: grid;
  grid-template-columns: minmax(310px, 1fr) minmax(355px, 435px);
  align-items: center;
  gap: clamp(24px, 5vw, 80px);
  padding: max(24px, env(safe-area-inset-top)) max(5vw, env(safe-area-inset-right)) max(28px, env(safe-area-inset-bottom)) max(5vw, env(safe-area-inset-left));
  background: linear-gradient(90deg, rgba(23,40,62,.72) 0%, rgba(23,40,62,.36) 40%, rgba(23,40,62,.05) 64%, rgba(23,40,62,.18) 100%);
}
.start-brand { align-self: center; min-width: 0; text-shadow: 0 3px 0 rgba(45,50,70,.12); }
.version-pill { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 15px 5px; padding: 7px 13px; border: 1px solid rgba(255,255,255,.38); border-radius: 999px; background: rgba(32,50,71,.42); box-shadow: inset 0 1px 0 rgba(255,255,255,.14); color: #FFF0C1; font-size: 11px; font-weight: 800; letter-spacing: .1em; backdrop-filter: blur(8px); }
.version-pill span { width: 7px; height: 7px; border-radius: 50%; background: #FFD66B; box-shadow: 0 0 0 4px rgba(255,214,107,.15); }
.brand-lockup { transform: rotate(-2deg); transform-origin: left center; animation: brand-in .65s cubic-bezier(.2,.9,.25,1.2) both; }
.brand-kicker { display: flex; align-items: center; gap: 9px; margin: 0 0 5px 6px; color: #FFF0C1; font-size: clamp(10px, 1.7vh, 14px); font-weight: 800; letter-spacing: .25em; }
.brand-kicker span { width: 22px; height: 3px; border-radius: 3px; background: #FFD66B; }
.brand-lockup h1 { display: flex; align-items: baseline; margin: 0; font-size: clamp(52px, 11.5vh, 94px); line-height: .98; font-weight: 1000; letter-spacing: -.08em; filter: drop-shadow(0 7px 0 rgba(119,56,43,.24)); }
.brand-lockup h1 span, .brand-lockup h1 strong { -webkit-text-stroke: clamp(1px, .35vh, 3px) #fff9e9; paint-order: stroke fill; }
.brand-lockup h1 span { color: #FFD25F; }
.brand-lockup h1 strong { color: var(--orange); font-weight: 1000; }
.brand-lockup p { margin: 13px 0 0 7px; color: #fff; font-size: clamp(14px, 2.35vh, 20px); font-weight: 700; letter-spacing: .08em; }
.enemy-ribbon { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 24px 0 0 6px; color: rgba(255,255,255,.92); font-size: 11px; font-weight: 700; text-shadow: 0 2px 5px rgba(22,32,50,.5); }
.enemy-ribbon span { display: inline-flex; align-items: center; gap: 5px; }
.enemy-ribbon .mp-icon { color: #FFE07A; font-size: 18px; }
.enemy-ribbon b { width: 3px; height: 3px; border-radius: 50%; background: rgba(255,255,255,.55); }
.level-panel { position: relative; width: 100%; padding: 22px; border: 1px solid rgba(255,255,255,.72); border-radius: 28px; background: linear-gradient(155deg, rgba(255,253,244,.96), rgba(255,239,211,.93)); box-shadow: 0 14px 0 rgba(28,44,61,.16), 0 25px 60px rgba(25,37,54,.25), inset 0 2px 0 #fff; color: var(--ink); text-shadow: none; animation: actions-in .55s .08s cubic-bezier(.2,.9,.25,1.1) both; }
.level-panel::before { content: ""; position: absolute; inset: 8px; border: 1px dashed rgba(218,143,82,.18); border-radius: 21px; pointer-events: none; }
.level-panel-title { position: relative; display: flex; align-items: center; justify-content: space-between; margin-bottom: 13px; padding: 0 2px; }
.level-panel-title small { display: block; margin-bottom: 2px; color: #D77A44; font-size: 8px; font-weight: 900; letter-spacing: .18em; }
.level-panel-title h2 { margin: 0; color: #333B50; font-size: 22px; line-height: 1.15; font-weight: 1000; }
.level-panel-title > span { padding: 6px 10px; border-radius: 10px; background: #F3E3CC; color: #9A765D; font-size: 10px; font-weight: 800; }
.level-list { position: relative; display: grid; gap: 9px; }
.level-card { position: relative; display: grid; grid-template-columns: 51px 1fr auto; align-items: center; gap: 11px; width: 100%; min-height: 68px; padding: 9px 12px 9px 9px; overflow: hidden; border: 2px solid transparent; border-radius: 18px; background: rgba(255,255,255,.7); box-shadow: 0 3px 0 rgba(118,89,62,.09), inset 0 0 0 1px rgba(193,158,119,.13); color: var(--ink); text-align: left; transition: transform .14s, border-color .14s, background .14s, box-shadow .14s; }
.level-card::after { content: ""; position: absolute; right: -22px; bottom: -32px; width: 85px; height: 85px; border-radius: 50%; background: var(--card-color, #FF8A3D); opacity: .055; }
.level-card:not(.locked):active { transform: translateY(3px) scale(.99); box-shadow: 0 1px 0 rgba(118,89,62,.08); }
.level-card.selected { border-color: var(--orange); background: #FFF9EC; box-shadow: 0 4px 0 rgba(213,106,48,.18), 0 7px 18px rgba(208,118,60,.12); }
.level-card.selected::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 4px; border-radius: 0 4px 4px 0; background: var(--orange); }
.level-number { position: relative; display: grid; place-items: center; width: 51px; height: 48px; border-radius: 14px; background: linear-gradient(145deg, var(--card-color, #FFAD59), var(--card-deep, #E96B3B)); box-shadow: inset 0 2px 0 rgba(255,255,255,.32), 0 3px 0 rgba(111,68,47,.14); color: #fff; font-size: 22px; font-weight: 1000; font-variant-numeric: tabular-nums; text-shadow: 0 2px 0 rgba(100,55,38,.18); }
.level-number .mp-icon { position: absolute; right: -3px; bottom: -3px; padding: 2px; border-radius: 50%; background: #fff; color: var(--card-deep, #E96B3B); font-size: 15px; text-shadow: none; }
.level-copy { min-width: 0; }
.level-copy strong { display: block; margin-bottom: 3px; color: #3A4154; font-size: 14px; font-weight: 900; }
.level-copy small { display: block; overflow: hidden; color: #9A8C80; font-size: 9px; font-weight: 600; white-space: nowrap; text-overflow: ellipsis; }
.level-status { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; color: #B0A398; font-size: 9px; font-weight: 700; }
.level-status .mp-icon { font-size: 18px; color: #D5C4B1; }
.level-card.selected .level-status { color: #DC773E; }
.level-card.selected .level-status .mp-icon { color: var(--orange); }
.level-card .mini-stars { display: flex; gap: 1px; }
.level-card .mini-stars .mp-icon { color: #DCD2C4; font-size: 11px; }
.level-card .mini-stars .mp-icon.on { color: #FFB83E; }
.level-card.locked { cursor: default; filter: saturate(.35); opacity: .64; }
.level-card.locked .level-number { background: linear-gradient(145deg, #A7ADB4, #777F8C); }
.start-actions { position: relative; margin-top: 15px; }
.primary-button { position: relative; display: grid; grid-template-columns: 50px 1fr; grid-template-rows: 1fr 1fr; align-items: center; width: 100%; min-height: 70px; padding: 10px 21px 10px 15px; border: 3px solid rgba(255,255,255,.92); border-radius: 22px; background: linear-gradient(180deg, #FFA451 0%, #FF843D 55%, #F26B35 100%); color: #fff; box-shadow: 0 7px 0 #BE4F31, 0 12px 22px rgba(79,54,41,.22), inset 0 2px 0 rgba(255,255,255,.35); text-align: left; text-shadow: 0 2px 0 rgba(170,70,36,.35); transition: transform .12s, box-shadow .12s, filter .12s; }
.primary-button::after { content: ""; position: absolute; inset: 5px 9px auto; height: 28%; border-radius: 18px; background: linear-gradient(180deg, rgba(255,255,255,.2), transparent); pointer-events: none; }
.primary-button > .mp-icon { grid-row: 1 / 3; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.22); font-size: 30px; }
.primary-button > span { align-self: end; font-size: 19px; line-height: 1.2; font-weight: 900; letter-spacing: .08em; }
.primary-button > small { align-self: start; margin-top: 3px; color: #FFF1D5; font-size: 10px; font-weight: 600; }
.primary-button:hover { filter: brightness(1.04); }
.primary-button:active { transform: translateY(5px) scale(.99); box-shadow: 0 2px 0 #BE4F31, 0 5px 12px rgba(79,54,41,.2), inset 0 2px 0 rgba(255,255,255,.3); }
.quick-tip { display: flex; align-items: center; justify-content: center; gap: 4px; margin-top: 14px; color: #9C8775; font-size: 9px; font-weight: 700; }
.quick-tip .mp-icon { display: grid; place-items: center; width: 21px; height: 21px; border: 1px solid #DECAB1; border-radius: 6px; background: rgba(255,255,255,.55); color: #8F7968; font-size: 16px; }
.quick-tip b { width: 1px; height: 12px; margin: 0 6px; background: #DECAB1; }
.start-footer { position: absolute; left: max(5vw, env(safe-area-inset-left)); bottom: max(14px, env(safe-area-inset-bottom)); display: flex; align-items: center; gap: 7px; color: rgba(255,255,255,.82); font-size: 10px; font-weight: 500; text-shadow: 0 2px 5px rgba(22,32,50,.6); }
.pulse-dot { width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; background: #FFE075; box-shadow: 0 0 0 0 rgba(255,224,117,.5); animation: pulse 2s infinite; }

/* In-game HUD */
.hud { position: absolute; z-index: 8; top: max(13px, env(safe-area-inset-top)); left: max(17px, env(safe-area-inset-left)); right: max(17px, env(safe-area-inset-right)); display: grid; grid-template-columns: 1fr auto 1fr; align-items: flex-start; gap: 18px; pointer-events: none; }
.hud-left { width: clamp(185px, 25vw, 320px); }
.level-chip, .time-chip, .icon-button, .monster-chip { background: var(--glass); border: 1px solid rgba(255,255,255,.24); box-shadow: 0 5px 0 rgba(20,30,48,.2), inset 0 1px 0 rgba(255,255,255,.12); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.level-chip { display: inline-flex; align-items: center; height: 39px; gap: 8px; padding: 0 8px 0 13px; border-radius: 14px; font-size: 12px; font-weight: 700; letter-spacing: .04em; }
.level-chip b { display: grid; place-items: center; height: 25px; min-width: 29px; padding: 0 6px; border-radius: 9px; background: var(--orange); color: #fff; font-size: 12px; }
.level-dot { width: 7px; height: 7px; border-radius: 50%; background: #FFE07A; box-shadow: 0 0 0 4px rgba(255,224,122,.13); }
.progress-track { position: relative; width: 100%; height: 8px; margin-top: 11px; border: 2px solid rgba(255,255,255,.5); border-radius: 999px; background: rgba(29,44,68,.4); box-shadow: 0 2px 5px rgba(25,37,61,.18); }
.progress-track i { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #FFD764, var(--orange)); transition: width .12s linear; }
.progress-track span { position: absolute; top: 50%; left: 0; width: 15px; height: 15px; margin: -7.5px 0 0 -6px; border: 3px solid #fff; border-radius: 50%; background: var(--orange); box-shadow: 0 2px 5px rgba(30,38,60,.3); transition: left .12s linear; }
.monster-chip { align-self: start; display: flex; align-items: center; gap: 6px; height: 39px; padding: 0 13px; border-radius: 14px; color: rgba(255,255,255,.75); font-size: 10px; font-weight: 700; }
.monster-chip .mp-icon { color: #FFB65D; font-size: 20px; }
.monster-chip strong { color: #fff; font-size: 13px; font-variant-numeric: tabular-nums; }
.hud-right { justify-self: end; display: flex; align-items: center; gap: 9px; pointer-events: auto; }
.time-chip { height: 42px; display: flex; align-items: center; gap: 8px; padding: 0 14px; border-radius: 14px; font-variant-numeric: tabular-nums; font-size: 15px; font-weight: 800; letter-spacing: .03em; }
.time-chip .mp-icon { color: #FFD764; font-size: 20px; }
.icon-button { width: 42px; height: 42px; padding: 0; display: grid; place-items: center; border-radius: 14px; transition: transform .12s, background .12s; }
.icon-button .mp-icon { font-size: 22px; }
.icon-button:active { transform: translateY(3px); background: rgba(255,138,61,.88); box-shadow: 0 2px 0 rgba(20,30,48,.22); }
.toast { position: absolute; z-index: 10; left: 50%; bottom: max(116px, calc(env(safe-area-inset-bottom) + 105px)); max-width: min(80vw, 520px); padding: 10px 18px; transform: translate(-50%, 12px); border: 1px solid rgba(255,255,255,.32); border-radius: 999px; background: rgba(31,43,63,.84); box-shadow: 0 7px 22px rgba(23,32,49,.24); color: #fff; font-size: 12px; font-weight: 700; text-align: center; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; backdrop-filter: blur(8px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.checkpoint-notice { position: absolute; z-index: 10; top: 25%; left: 50%; display: flex; align-items: center; gap: 9px; padding: 12px 21px; transform: translate(-50%,-12px) scale(.94); border: 2px solid rgba(255,255,255,.7); border-radius: 17px; background: linear-gradient(145deg, rgba(255,166,77,.95), rgba(238,105,49,.95)); box-shadow: 0 6px 0 rgba(155,66,39,.35), 0 12px 30px rgba(29,38,53,.2); font-size: 14px; font-weight: 900; opacity: 0; pointer-events: none; transition: opacity .2s, transform .25s; }
.checkpoint-notice .mp-icon { color: #FFF2B6; font-size: 22px; }
.checkpoint-notice.show { opacity: 1; transform: translate(-50%,0) scale(1); }
.level-intro { position: absolute; z-index: 9; top: 28%; left: 50%; display: flex; flex-direction: column; align-items: center; min-width: 280px; padding: 15px 32px 17px; transform: translate(-50%,-50%); border-top: 2px solid rgba(255,255,255,.5); border-bottom: 2px solid rgba(255,255,255,.5); background: linear-gradient(90deg, transparent, rgba(27,40,59,.72) 18%, rgba(27,40,59,.72) 82%, transparent); text-align: center; text-shadow: 0 3px 7px rgba(22,31,47,.45); pointer-events: none; animation: intro-in 2.5s both; }
.level-intro span { color: #FFD978; font-size: 10px; font-weight: 900; letter-spacing: .24em; }
.level-intro strong { margin: 3px 0; font-size: 28px; font-weight: 1000; letter-spacing: .08em; }
.level-intro small { color: rgba(255,255,255,.86); font-size: 11px; }

/* Touch controls */
.controls { position: absolute; inset: 0; z-index: 7; pointer-events: none; }
.move-controls { position: absolute; left: max(23px, env(safe-area-inset-left)); bottom: max(22px, env(safe-area-inset-bottom)); display: flex; gap: 13px; }
.control-button { pointer-events: auto; width: clamp(58px, 10.5vh, 78px); height: clamp(58px, 10.5vh, 78px); display: grid; place-items: center; padding: 0; border: 2px solid rgba(255,255,255,.6); border-radius: 23px; background: rgba(35,48,71,.57); box-shadow: 0 6px 0 rgba(24,33,51,.35), inset 0 1px 0 rgba(255,255,255,.18); backdrop-filter: blur(7px); -webkit-backdrop-filter: blur(7px); transition: transform .08s, background .08s, box-shadow .08s; }
.control-button .mp-icon { font-size: clamp(27px, 5vh, 38px); filter: drop-shadow(0 2px 0 rgba(20,30,45,.25)); }
.control-button.is-pressed, .control-button:active { transform: translateY(4px) scale(.96); background: rgba(255,138,61,.9); box-shadow: 0 2px 0 rgba(24,33,51,.3), inset 0 2px 5px rgba(158,66,35,.18); }
.jump-button { position: absolute; right: max(27px, env(safe-area-inset-right)); bottom: max(24px, env(safe-area-inset-bottom)); width: clamp(72px, 13vh, 96px); height: clamp(72px, 13vh, 96px); border-radius: 50%; border: 3px solid rgba(255,255,255,.8); background: linear-gradient(145deg, rgba(255,170,80,.94), rgba(240,102,48,.94)); box-shadow: 0 7px 0 rgba(164,67,40,.6), 0 10px 20px rgba(32,39,57,.22), inset 0 2px 0 rgba(255,255,255,.35); }
.jump-button .mp-icon { margin-top: 7px; font-size: clamp(31px, 5.5vh, 43px); line-height: 1; }
.jump-button span { margin-top: -12px; font-size: 11px; font-weight: 800; letter-spacing: .12em; }
.stomp-tip { position: absolute; right: max(34px, env(safe-area-inset-right)); bottom: max(126px, calc(env(safe-area-inset-bottom) + 112px)); display: flex; align-items: center; gap: 5px; padding: 6px 10px; border-radius: 10px; background: rgba(32,45,64,.48); color: rgba(255,255,255,.82); font-size: 9px; font-weight: 700; text-shadow: 0 2px 4px rgba(20,30,45,.4); animation: tip-fade 6s 2s both; }
.stomp-tip .mp-icon { color: #FFE083; font-size: 16px; }

/* Pause and result */
.modal-screen { z-index: 12; display: grid; place-items: center; padding: 24px; background: rgba(20,31,50,.57); backdrop-filter: blur(7px); -webkit-backdrop-filter: blur(7px); }
.modal-card { position: relative; width: min(390px, 88vw); padding: 43px 32px 22px; border: 2px solid rgba(255,255,255,.85); border-radius: 29px; background: linear-gradient(160deg, #FFFDF4, #FFF1D8); color: var(--ink); box-shadow: 0 14px 0 rgba(26,38,57,.2), 0 25px 70px rgba(18,29,47,.35), inset 0 2px 0 #fff; text-align: center; animation: modal-in .3s cubic-bezier(.2,.85,.25,1.15) both; }
.modal-emblem { position: absolute; top: 0; left: 50%; width: 65px; height: 65px; display: grid; place-items: center; transform: translate(-50%,-50%) rotate(-5deg); border: 4px solid #FFF7E4; border-radius: 22px; background: linear-gradient(145deg, #71809D, #3D4B67); box-shadow: 0 6px 0 rgba(38,49,74,.22); color: #fff; }
.modal-emblem .mp-icon { font-size: 33px; }
.modal-emblem.success { background: linear-gradient(145deg, #FFBA4D, #F47B38); box-shadow: 0 6px 0 #C66035; }
.modal-card .eyebrow { margin: 4px 0 4px; color: #D87842; font-size: 10px; font-weight: 800; letter-spacing: .2em; }
.modal-card h2 { margin: 0; color: #2F3850; font-size: 28px; font-weight: 1000; letter-spacing: .04em; }
.modal-card > p:not(.eyebrow):not(.result-hint) { margin: 8px 0 16px; color: #8A8D96; font-size: 12px; }
.primary-button.compact { display: flex; justify-content: center; gap: 9px; width: 100%; min-height: 51px; margin-top: 18px; padding: 10px 18px; border-radius: 17px; text-align: center; box-shadow: 0 6px 0 #BE4F31, 0 10px 18px rgba(109,66,43,.16), inset 0 2px 0 rgba(255,255,255,.3); }
.primary-button.compact > .mp-icon { width: auto; height: auto; background: none; font-size: 25px; }
.primary-button.compact > span { align-self: center; font-size: 16px; }
.primary-button.compact:active { box-shadow: 0 1px 0 #BE4F31; }
.modal-secondary-actions { display: flex; align-items: center; justify-content: center; gap: 9px; margin-top: 8px; }
.text-button { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-height: 38px; padding: 7px 12px; border-radius: 12px; background: transparent; color: #8A796D; font-size: 11px; font-weight: 700; }
.text-button .mp-icon { font-size: 17px; }
.text-button:active { background: #F5E4CE; color: #D16F3E; }
.result-card { width: min(480px, 90vw); padding-top: 39px; }
.stars { display: flex; justify-content: center; gap: 6px; height: 46px; margin: 5px 0 7px; }
.stars .mp-icon { color: #D9D5C9; font-size: 39px; line-height: 46px; filter: drop-shadow(0 3px 0 rgba(89,74,53,.1)); transform: scale(.85); }
.stars .mp-icon.earned { color: #FFC84D; -webkit-text-stroke: 1px #F0A835; animation: star-in .4s cubic-bezier(.2,.8,.3,1.4) both; }
.stars .mp-icon:nth-child(2) { font-size: 45px; }
.result-stats { display: flex; align-items: center; justify-content: center; gap: clamp(13px, 3vw, 26px); padding: 12px 9px; border: 1px solid #F0DEC4; border-radius: 16px; background: rgba(255,255,255,.53); }
.result-stats > div { min-width: 75px; }
.result-stats span { display: block; margin-bottom: 4px; color: #A39486; font-size: 9px; font-weight: 600; }
.result-stats strong { color: #41485A; font-size: 16px; font-weight: 900; font-variant-numeric: tabular-nums; }
.result-stats > i { width: 1px; height: 28px; background: #EAD8BF; }
.result-hint { margin: 10px 0 0; color: #A0795C; font-size: 10px; font-weight: 600; }
.result-card .primary-button.compact { margin-top: 14px; }

@keyframes brand-in { from { opacity: 0; transform: translateX(-25px) rotate(-5deg); } to { opacity: 1; transform: translateX(0) rotate(-2deg); } }
@keyframes actions-in { from { opacity: 0; transform: translateY(18px) scale(.97); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes modal-in { from { opacity: 0; transform: translateY(18px) scale(.9); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(255,224,117,0); } 100% { box-shadow: 0 0 0 0 rgba(255,224,117,0); } }
@keyframes star-in { from { opacity: 0; transform: scale(.2) rotate(-40deg); } to { opacity: 1; transform: scale(1) rotate(0); } }
@keyframes intro-in { 0% { opacity: 0; transform: translate(-50%,-35%) scale(.9); } 14%,70% { opacity: 1; transform: translate(-50%,-50%) scale(1); } 100% { opacity: 0; transform: translate(-50%,-65%) scale(1.02); } }
@keyframes tip-fade { 0%,65% { opacity: 1; } 100% { opacity: 0; } }

@media (max-height: 620px) {
  .start-screen { padding-top: 15px; padding-bottom: 18px; }
  .version-pill { margin-bottom: 9px; padding: 5px 10px; }
  .brand-lockup h1 { font-size: clamp(47px, 12vh, 72px); }
  .brand-lockup p { margin-top: 9px; }
  .enemy-ribbon { margin-top: 15px; }
  .level-panel { padding: 16px 18px; border-radius: 24px; }
  .level-panel-title { margin-bottom: 9px; }
  .level-panel-title h2 { font-size: 19px; }
  .level-list { gap: 7px; }
  .level-card { min-height: 57px; grid-template-columns: 43px 1fr auto; gap: 9px; padding: 6px 10px 6px 7px; border-radius: 15px; }
  .level-number { width: 43px; height: 41px; border-radius: 12px; font-size: 19px; }
  .level-copy strong { font-size: 12px; }
  .start-actions { margin-top: 11px; }
  .primary-button { min-height: 59px; border-radius: 18px; }
  .primary-button > span { font-size: 16px; }
  .primary-button > .mp-icon { width: 36px; height: 36px; font-size: 26px; }
  .quick-tip { margin-top: 10px; }
  .modal-card { padding: 34px 28px 15px; }
  .modal-emblem { width: 56px; height: 56px; border-radius: 18px; }
  .modal-emblem .mp-icon { font-size: 28px; }
  .modal-card h2 { font-size: 24px; }
  .result-card { padding-top: 31px; }
  .stars { height: 36px; margin: 3px 0 5px; }
  .stars .mp-icon { font-size: 32px; line-height: 36px; }
  .stars .mp-icon:nth-child(2) { font-size: 37px; }
  .result-stats { padding: 8px; }
  .result-card .primary-button.compact, .primary-button.compact { min-height: 45px; margin-top: 11px; }
  .modal-secondary-actions { margin-top: 4px; }
  .text-button { min-height: 32px; padding: 5px 10px; }
}
@media (max-height: 450px) {
  .start-screen { grid-template-columns: minmax(260px,1fr) minmax(340px,410px); gap: 22px; }
  .version-pill { margin-bottom: 6px; font-size: 9px; }
  .brand-kicker { font-size: 9px; }
  .brand-lockup h1 { font-size: 49px; }
  .brand-lockup p { font-size: 13px; }
  .enemy-ribbon { gap: 7px; margin-top: 12px; font-size: 9px; }
  .enemy-ribbon .mp-icon { font-size: 15px; }
  .level-panel { padding: 12px 15px; }
  .level-panel-title small { display: none; }
  .level-panel-title h2 { font-size: 17px; }
  .level-card { min-height: 49px; grid-template-columns: 38px 1fr auto; }
  .level-number { width: 38px; height: 36px; font-size: 17px; }
  .level-copy strong { margin-bottom: 1px; font-size: 11px; }
  .level-copy small { font-size: 8px; }
  .level-status { font-size: 8px; }
  .level-status > .mp-icon { display: none; }
  .primary-button { min-height: 51px; padding-top: 6px; padding-bottom: 6px; }
  .primary-button > span { font-size: 14px; }
  .primary-button > small { font-size: 8px; }
  .quick-tip { display: none; }
  .start-footer { font-size: 8px; bottom: 8px; }
  .modal-screen { padding: 20px; }
  .modal-card { transform-origin: center; }
  .modal-card > p:not(.eyebrow):not(.result-hint) { margin: 5px 0 9px; }
  .result-hint { margin-top: 7px; }
}
@media (max-width: 800px) {
  .start-screen { grid-template-columns: minmax(230px,.8fr) minmax(330px,1.2fr); gap: 18px; padding-left: 24px; padding-right: 24px; }
  .enemy-ribbon b, .enemy-ribbon span:nth-of-type(2) { display: none; }
  .monster-chip > span { display: none; }
  .hud { gap: 9px; }
  .time-chip { padding: 0 10px; }
}
@media (max-width: 620px) {
  .start-screen { grid-template-columns: 1fr; justify-items: center; padding: 18px; background: rgba(23,40,62,.5); }
  .start-brand { display: none; }
  .level-panel { width: min(430px, 94vw); }
  .start-footer { left: 50%; width: 90%; justify-content: center; transform: translateX(-50%); text-align: center; }
  .hud { grid-template-columns: 1fr auto; }
  .monster-chip { display: none; }
  .hud-right { grid-column: 2; }
  .time-chip { font-size: 12px; }
  .level-chip { font-size: 10px; }
  .stomp-tip { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}


/* 1.1 input feedback and compact landscape tuning */
button.is-pressing { filter: brightness(.96) saturate(1.06); }
.level-card.is-pressing:not(.locked) { transform: translateY(3px) scale(.99); box-shadow: 0 1px 0 rgba(118,89,62,.08); }
.icon-button.is-pressing, .control-button.is-pressing { transform: translateY(2px) scale(.96); }
.level-card:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }
@media (max-height: 430px) and (orientation: landscape) {
  .start-screen { padding-top: 14px; padding-bottom: 18px; gap: 24px; }
  .version-pill { margin-bottom: 8px; padding-top: 5px; padding-bottom: 5px; }
  .brand-lockup h1 { font-size: clamp(46px, 15vh, 66px); }
  .brand-lockup p { margin-top: 8px; font-size: 13px; }
  .enemy-ribbon { margin-top: 13px; }
  .level-panel { padding: 15px 17px; border-radius: 22px; }
  .level-panel-title { margin-bottom: 8px; }
  .level-panel-title h2 { font-size: 18px; }
  .level-list { gap: 6px; }
  .level-card { min-height: 54px; padding-top: 6px; padding-bottom: 6px; border-radius: 14px; }
  .level-number { width: 44px; height: 40px; font-size: 18px; }
  .level-card { grid-template-columns: 44px 1fr auto; }
  .start-actions { margin-top: 10px; }
  .primary-button { min-height: 56px; border-radius: 17px; }
  .primary-button > span { font-size: 16px; }
  .quick-tip { margin-top: 10px; }
  .start-footer { display: none; }
}
