:root {
  --ink: #09080f;
  --panel: rgba(18, 17, 28, .88);
  --line: rgba(255, 255, 255, .1);
  --text: #f7f4ed;
  --muted: #a6a2b2;
  --acid: #d8ff3e;
  --mint: #60ffd2;
  --danger: #ff4b61;
  --amber: #ffb94e;
  --cyan: #74e7ff;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans JP", sans-serif;
  color: var(--text);
  background: var(--ink);
  font-synthesis: none;
}

* { box-sizing: border-box; }

html {
  min-height: 100%;
  background: #09080f;
  overscroll-behavior: none;
}

body {
  min-width: 320px;
  min-height: 100%;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 8% 8%, rgba(112, 75, 255, .16), transparent 29rem),
    radial-gradient(circle at 90% 76%, rgba(216, 255, 62, .08), transparent 30rem),
    #09080f;
  color: var(--text);
}

button { font: inherit; color: inherit; }
button:focus-visible { outline: 3px solid var(--cyan); outline-offset: 4px; }
.hidden { display: none !important; }

.app {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  isolation: isolate;
}

.noise {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .16;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.22'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}

.glow { position: fixed; z-index: -2; border-radius: 50%; filter: blur(40px); pointer-events: none; }
.glow-a { width: 34rem; height: 34rem; top: -22rem; right: -8rem; background: rgba(105, 78, 255, .22); }
.glow-b { width: 28rem; height: 28rem; bottom: -20rem; left: 18%; background: rgba(203, 255, 54, .11); }

.topbar {
  width: min(1460px, calc(100% - 56px));
  height: 88px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.logo {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
  cursor: pointer;
}

.logo-mark {
  position: relative;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(216, 255, 62, .5);
  transform: rotate(45deg);
}

.logo-mark::before, .logo-mark::after { content: ""; position: absolute; background: var(--acid); }
.logo-mark::before { width: 4px; height: 4px; border-radius: 50%; box-shadow: 0 0 14px var(--acid); }
.logo-mark::after { width: 22px; height: 1px; opacity: .5; }
.logo-mark i { width: 22px; height: 22px; border: 1px solid rgba(255,255,255,.3); }

.logo > span:last-child { display: flex; flex-direction: column; gap: 2px; }
.logo b { font-size: 13px; letter-spacing: .24em; }
.logo small { color: #777483; font-size: 8px; letter-spacing: .19em; }
.top-actions { display: flex; align-items: center; gap: 12px; }

.best-pill {
  height: 39px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: rgba(255,255,255,.025);
}

.best-pill span { color: #747180; font-size: 8px; font-weight: 800; letter-spacing: .18em; }
.best-pill b { font-size: 14px; letter-spacing: .06em; }
.best-pill i { color: var(--acid); font-style: normal; }

.sound-button {
  width: 39px;
  height: 39px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: rgba(255,255,255,.025);
  cursor: pointer;
}

.sound-button[aria-pressed="false"] { color: #65616f; }
.screen { width: min(1420px, calc(100% - 80px)); margin: 0 auto; }

.start-screen {
  min-height: calc(100svh - 88px);
  display: grid;
  grid-template-columns: .88fr 1.12fr;
  grid-template-rows: 1fr auto;
  column-gap: clamp(30px, 6vw, 112px);
  align-items: center;
  padding: clamp(54px, 7vh, 98px) 1.5% 34px;
}

.hero-copy { position: relative; z-index: 2; }
.signal, .objective-card > p {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 20px;
  color: var(--acid);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .28em;
}

.signal span, .objective-card > p span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 14px currentColor;
  animation: pulse 1.5s ease-in-out infinite;
}

h1 {
  margin: 0;
  font-size: clamp(64px, 7.2vw, 112px);
  font-weight: 950;
  line-height: .86;
  letter-spacing: -.085em;
  text-wrap: nowrap;
}

h1 em {
  position: relative;
  color: transparent;
  font-style: normal;
  -webkit-text-stroke: 1px rgba(255,255,255,.76);
}

h1 em::after {
  content: "ZERO TOUCH";
  position: absolute;
  left: calc(100% + 18px);
  bottom: 13px;
  color: var(--danger);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .24em;
  -webkit-text-stroke: 0;
  transform: rotate(-90deg);
  transform-origin: left bottom;
}

.hero-rule { margin: 28px 0 28px; color: #aaa6b5; font-size: clamp(14px, 1.2vw, 18px); line-height: 1.8; }
.hero-rule strong { color: var(--text); font-size: 1.12em; letter-spacing: .03em; }

.start-button, .next-button, .retry-button {
  position: relative;
  width: min(100%, 425px);
  min-height: 74px;
  display: flex;
  align-items: center;
  gap: 17px;
  padding: 11px 19px;
  overflow: hidden;
  border: 0;
  border-radius: 3px;
  background: var(--acid);
  color: #10120a;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 13px 42px rgba(216,255,62,.12);
  transition: transform .18s ease, box-shadow .18s ease;
}

.start-button::after, .next-button::after, .retry-button::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 25%, rgba(255,255,255,.58) 48%, transparent 70%);
  transform: translateX(-110%);
  transition: transform .55s ease;
}

.start-button:hover, .next-button:hover, .retry-button:hover { transform: translateY(-3px); box-shadow: 0 18px 52px rgba(216,255,62,.22); }
.start-button:hover::after, .next-button:hover::after, .retry-button:hover::after { transform: translateX(110%); }
.start-icon { width: 49px; height: 49px; display: grid; place-items: center; border: 1px solid rgba(0,0,0,.32); font-size: 21px; }
.start-button > span:nth-child(2), .next-button > span, .retry-button > span { display: flex; flex: 1; flex-direction: column; gap: 5px; }
.start-button b, .next-button b, .retry-button b { font-size: 16px; font-weight: 900; letter-spacing: .04em; }
.start-button small, .next-button small, .retry-button small { font-size: 7px; font-weight: 950; letter-spacing: .2em; opacity: .62; }
.start-button > i { font-size: 23px; font-style: normal; }

.mode-points { margin-top: 29px; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.mode-points span { min-width: 0; display: grid; grid-template-columns: 26px 1fr; padding: 16px 6px 0 0; }
.mode-points i { grid-row: span 2; color: var(--acid); font-size: 16px; font-weight: 900; font-style: normal; }
.mode-points b { font-size: 10px; white-space: nowrap; }
.mode-points small { margin-top: 3px; color: #65616e; font-size: 6px; font-weight: 900; letter-spacing: .12em; }

.hero-visual { position: relative; width: min(100%, 650px); aspect-ratio: 1; justify-self: center; }
.warning-ring { position: absolute; border: 1px solid rgba(216,255,62,.14); border-radius: 50%; animation: spin 24s linear infinite; }
.warning-ring::before, .warning-ring::after { content: ""; position: absolute; width: 9px; height: 9px; border: 2px solid var(--acid); border-radius: 50%; background: var(--ink); }
.ring-a { inset: 6%; border-style: dashed; }
.ring-a::before { left: 12%; top: 12%; }.ring-a::after { right: 12%; bottom: 12%; }
.ring-b { inset: 17%; border-color: rgba(255,255,255,.09); animation-direction: reverse; animation-duration: 18s; }
.ring-b::before { right: 1%; top: 48%; border-color: var(--danger); }.ring-b::after { left: 1%; top: 48%; border-color: var(--mint); }

.mini-maze {
  position: absolute;
  inset: 22%;
  overflow: hidden;
  border: 3px solid rgba(255,255,255,.42);
  background:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px),
    rgba(16,15,25,.9);
  background-size: 25% 25%;
  box-shadow: inset 0 0 60px rgba(0,0,0,.8), 0 35px 100px rgba(0,0,0,.4);
  transform: rotate(-4deg);
}

.mini-wall { position: absolute; z-index: 2; background: #bab5c6; box-shadow: 0 0 8px rgba(255,255,255,.22); }
.mw1 { left: 25%; top: 0; width: 4px; height: 52%; }.mw2 { left: 25%; top: 51%; width: 51%; height: 4px; }
.mw3 { left: 51%; top: 26%; width: 4px; height: 26%; }.mw4 { left: 51%; top: 25%; width: 49%; height: 4px; }
.mw5 { left: 75%; top: 51%; width: 4px; height: 49%; }.mw6 { left: 0; top: 75%; width: 51%; height: 4px; }
.trace { position: absolute; z-index: 1; height: 4px; border-radius: 4px; background: var(--acid); box-shadow: 0 0 13px var(--acid); transform-origin: left center; opacity: .48; }
.tr1 { left: 13%; top: 88%; width: 31%; transform: rotate(-90deg); }.tr2 { left: 13%; top: 57%; width: 28%; }.tr3 { left: 40%; top: 57%; width: 35%; transform: rotate(-90deg); }
.hero-core { position: absolute; left: 9%; bottom: 8%; width: 29px; height: 29px; border: 2px solid var(--acid); border-radius: 50%; box-shadow: 0 0 20px var(--acid); background: #0e1008; }
.hero-core b { position: absolute; inset: 7px; border-radius: 50%; background: var(--acid); animation: pulse 1s ease-in-out infinite; }
.hero-goal { position: absolute; width: 32px; height: 32px; top: 7%; right: 8%; border: 2px solid var(--mint); box-shadow: 0 0 19px var(--mint); transform: rotate(45deg); }
.hero-chip { position: absolute; color: var(--cyan); font-size: 22px; text-shadow: 0 0 12px var(--cyan); }.chip-a { left: 34%; top: 58%; }.chip-b { right: 13%; top: 38%; }

.danger-tag, .floor-tag { position: absolute; z-index: 4; padding: 13px 16px; border: 1px solid var(--line); background: rgba(12,11,18,.92); box-shadow: 0 16px 46px rgba(0,0,0,.35); }
.danger-tag { top: 22%; right: 0; width: 154px; }
.floor-tag { left: 3%; bottom: 21%; }
.danger-tag small, .floor-tag small { display: block; margin-bottom: 6px; color: #6f6b79; font-size: 6px; font-weight: 900; letter-spacing: .2em; }
.danger-tag b { color: var(--danger); font-size: 15px; letter-spacing: .05em; }
.danger-tag i { display: block; height: 2px; margin-top: 8px; background: linear-gradient(90deg, var(--danger) 72%, #27232d 72%); }
.floor-tag b { font-size: 12px; }.floor-tag span { color: var(--acid); font-size: 19px; }

.how-to {
  grid-column: 1 / -1;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(14px, 3vw, 42px);
  padding: 18px 24px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.018);
}

.how-to > div { display: flex; align-items: center; gap: 12px; }
.how-to > div > i { color: var(--acid); font-size: 9px; font-weight: 900; font-style: normal; }
.how-to span { display: flex; flex-direction: column; gap: 2px; }
.how-to b { font-size: 11px; }.how-to small { color: #777382; font-size: 8px; }
.how-to > em { color: #46424e; font-size: 24px; font-style: normal; }

.game-screen { width: min(1460px, calc(100% - 56px)); padding: 21px 0 34px; }
.run-header { min-height: 65px; display: grid; grid-template-columns: 150px repeat(3, minmax(110px, 1fr)) 76px; align-items: stretch; border: 1px solid var(--line); background: rgba(255,255,255,.018); }
.run-header > div { padding: 10px 20px; border-right: 1px solid var(--line); }
.run-header small { display: block; margin-bottom: 4px; color: #706c79; font-size: 7px; font-weight: 900; letter-spacing: .18em; }
.run-header b { font-size: 17px; letter-spacing: .05em; }
.run-header b i { color: #77727f; font-style: normal; }
.floor-box { display: flex; align-items: center; gap: 14px; background: rgba(216,255,62,.055); }
.floor-box small { margin: 0; }.floor-box strong { font-size: 28px; line-height: 1; }.floor-box strong i { margin-left: 2px; color: var(--acid); font-size: 11px; font-style: normal; }
.cores-stat b { color: var(--cyan); }.score-stat b { color: var(--acid); }
.pause-button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border: 0; background: transparent; cursor: pointer; }
.pause-button span { font-weight: 800; }.pause-button small { margin: 0; font-size: 6px; }

.play-layout { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 20px; margin-top: 20px; }
.maze-wrap { position: relative; min-width: 0; aspect-ratio: 1; max-height: calc(100svh - 200px); justify-self: center; border: 1px solid rgba(255,255,255,.12); background: #0d0c14; box-shadow: 0 28px 80px rgba(0,0,0,.38); touch-action: none; }
.maze-wrap::before { content: ""; position: absolute; inset: -8px; z-index: -1; border: 1px solid rgba(216,255,62,.09); }
#mazeCanvas { display: block; width: 100%; height: 100%; cursor: crosshair; touch-action: none; }
.maze-wrap.dragging #mazeCanvas { cursor: grabbing; }
.corner { position: absolute; z-index: 4; width: 20px; height: 20px; pointer-events: none; }
.corner::before, .corner::after { content: ""; position: absolute; background: var(--acid); }
.corner::before { width: 20px; height: 2px; }.corner::after { width: 2px; height: 20px; }
.tl { left: -3px; top: -3px; }.tr { right: -3px; top: -3px; transform: rotate(90deg); }
.br { right: -3px; bottom: -3px; transform: rotate(180deg); }.bl { left: -3px; bottom: -3px; transform: rotate(-90deg); }
.maze-status { position: absolute; left: 16px; right: 16px; bottom: 12px; display: flex; justify-content: space-between; align-items: center; color: rgba(255,255,255,.52); font-size: 7px; font-weight: 900; letter-spacing: .18em; pointer-events: none; }
.maze-status b { display: flex; align-items: center; gap: 7px; color: rgba(216,255,62,.7); font-size: 6px; }
.maze-status b i { width: 5px; height: 5px; border-radius: 50%; background: var(--acid); box-shadow: 0 0 8px var(--acid); }

.grab-hint { position: absolute; left: 50%; bottom: 11%; display: flex; flex-direction: column; align-items: center; padding: 13px 18px; border: 1px solid rgba(216,255,62,.24); background: rgba(10,9,15,.9); transform: translateX(-50%); pointer-events: none; transition: opacity .25s ease; }
.grab-hint span { color: var(--acid); font-size: 19px; }.grab-hint b { margin: 3px 0; font-size: 10px; }.grab-hint small { color: #706c79; font-size: 6px; letter-spacing: .14em; }
.grab-hint.dismissed { opacity: 0; }
.pause-layer { position: absolute; inset: 0; z-index: 9; display: grid; place-content: center; justify-items: center; background: rgba(7,6,12,.84); backdrop-filter: blur(8px); }
.pause-layer > span { color: var(--acid); font-size: 35px; }.pause-layer h2 { margin: 10px 0 5px; font-size: 28px; }.pause-layer p { margin: 0 0 19px; color: var(--muted); font-size: 12px; }
.pause-layer button { padding: 12px 27px; border: 1px solid var(--acid); background: transparent; color: var(--acid); font-size: 11px; font-weight: 900; cursor: pointer; }
.toast { position: absolute; top: 18px; left: 50%; z-index: 6; margin: 0; padding: 9px 15px; border: 1px solid rgba(116,231,255,.25); background: rgba(8,11,16,.9); color: var(--cyan); font-size: 9px; font-weight: 900; letter-spacing: .08em; opacity: 0; transform: translate(-50%, -8px); transition: .22s ease; pointer-events: none; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.side-panel { display: flex; flex-direction: column; gap: 12px; }
.objective-card, .tension-card, .control-card, .risk-card { border: 1px solid var(--line); background: var(--panel); }
.objective-card { padding: 22px; }.objective-card > p { margin-bottom: 13px; font-size: 7px; }
.objective-card h2 { margin: 0 0 18px; font-size: 21px; letter-spacing: -.03em; }
.preview-shot .objective-card h2 { font-size: 35px; line-height: 1.05; letter-spacing: -.07em; white-space: pre-line; }
.objective { display: flex; align-items: center; gap: 13px; padding: 13px; background: rgba(116,231,255,.055); }
.objective > i { color: var(--cyan); font-size: 25px; font-style: normal; text-shadow: 0 0 14px var(--cyan); }
.objective span { display: flex; flex-direction: column; gap: 3px; }.objective b { font-size: 10px; }.objective small { color: #76717f; font-size: 7px; }
.tension-card { padding: 18px 20px; }.tension-card > div { display: flex; justify-content: space-between; align-items: center; }
.tension-card span { color: #75717e; font-size: 7px; font-weight: 900; letter-spacing: .18em; }.tension-card b { color: var(--mint); font-size: 9px; letter-spacing: .1em; }
.tension-card > i { display: block; height: 4px; margin: 12px 0 9px; background: #29262f; overflow: hidden; }
.tension-card > i em { display: block; width: 8%; height: 100%; background: var(--mint); box-shadow: 0 0 11px currentColor; transition: width .12s linear, background .12s linear; }
.tension-card p { margin: 0; color: #888391; font-size: 8px; line-height: 1.5; }
.control-card { padding: 17px 20px; }.control-card p { margin: 11px 0 0; color: #827e8b; font-size: 8px; line-height: 1.7; }
.mouse-demo { display: flex; align-items: center; gap: 11px; }.mouse-demo > span { position: relative; width: 31px; height: 31px; display: grid; place-items: center; border: 1px dashed #4f4a57; border-radius: 50%; }
.mouse-demo > span::after { content: ""; width: 10px; height: 10px; border: 1px solid var(--acid); border-radius: 50%; box-shadow: 0 0 9px var(--acid); }.mouse-demo b { font-size: 8px; letter-spacing: .15em; }
.risk-card { display: flex; align-items: center; gap: 12px; padding: 15px 18px; border-color: rgba(255,75,97,.18); }
.risk-card > span { color: var(--danger); font-size: 21px; }.risk-card p { display: flex; flex-direction: column; gap: 4px; margin: 0; }.risk-card b { color: var(--danger); font-size: 7px; letter-spacing: .16em; }.risk-card small { color: #77717e; font-size: 7px; line-height: 1.5; }

.overlay { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 20px; background: rgba(5,4,8,.79); backdrop-filter: blur(14px); }
.overlay-card { position: relative; width: min(540px, 100%); max-height: calc(100svh - 32px); overflow-y: auto; padding: clamp(28px, 5vh, 52px); border: 1px solid rgba(255,255,255,.16); background: linear-gradient(145deg, rgba(27,25,36,.98), rgba(12,11,17,.98)); text-align: center; box-shadow: 0 30px 110px rgba(0,0,0,.62); }
.overlay-card::before { content: ""; position: absolute; inset: 8px; border: 1px solid rgba(255,255,255,.04); pointer-events: none; }
.clear-orbit { position: relative; width: 82px; height: 82px; display: grid; place-items: center; margin: 0 auto 20px; border: 1px solid rgba(216,255,62,.25); border-radius: 50%; }
.clear-orbit i { position: absolute; inset: 8px; border: 1px dashed rgba(216,255,62,.34); border-radius: 50%; animation: spin 8s linear infinite; }
.clear-orbit i:nth-child(2) { inset: -7px; border-color: rgba(255,255,255,.1); animation-direction: reverse; }
.clear-orbit span { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; background: var(--acid); color: #13150b; font-size: 23px; font-weight: 900; box-shadow: 0 0 28px rgba(216,255,62,.38); }
.overlay-label { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 0 0 8px; color: var(--acid); font-size: 7px; font-weight: 900; letter-spacing: .22em; }
.overlay-label span { width: 25px; height: 1px; background: currentColor; opacity: .45; }.overlay-label.danger { color: var(--danger); }
.overlay-card h2 { margin: 0; font-size: clamp(37px, 7vw, 56px); letter-spacing: -.07em; }.overlay-card > p:not(.overlay-label) { margin: 12px 0 25px; color: #9792a0; font-size: 12px; line-height: 1.8; }
.clear-stats, .run-stats { display: grid; grid-template-columns: repeat(3, 1fr); margin-bottom: 23px; border: 1px solid var(--line); }
.clear-stats div, .run-stats div { padding: 13px 6px; border-right: 1px solid var(--line); }.clear-stats div:last-child, .run-stats div:last-child { border: 0; }
.clear-stats small, .run-stats small { display: block; margin-bottom: 5px; color: #696572; font-size: 6px; font-weight: 900; letter-spacing: .14em; }.clear-stats b, .run-stats b { font-size: 14px; }
.clear-stats div:last-child b { color: var(--acid); }.next-button { width: 100%; }.next-button em { font-size: 24px; font-style: normal; }
.impact { position: relative; width: 80px; height: 80px; display: grid; place-items: center; margin: 0 auto 20px; }
.impact::before, .impact::after { content: ""; position: absolute; width: 100%; height: 1px; background: var(--danger); box-shadow: 0 0 15px var(--danger); transform: rotate(45deg); }.impact::after { transform: rotate(-45deg); }
.impact i { position: absolute; inset: 11px; border: 1px solid rgba(255,75,97,.5); transform: rotate(45deg); }.impact span { z-index: 1; width: 43px; height: 43px; display: grid; place-items: center; border-radius: 50%; background: #161018; color: var(--danger); font-size: 25px; font-weight: 900; }
.fail-card h2 { color: var(--danger); }
.final-score { position: relative; display: flex; flex-direction: column; align-items: center; margin: 0 0 18px; padding: 17px; background: rgba(255,75,97,.045); }
.final-score small { color: #6f6975; font-size: 7px; font-weight: 900; letter-spacing: .19em; }.final-score strong { margin-top: 3px; font-size: 40px; letter-spacing: -.05em; }.final-score span { position: absolute; right: 11px; top: 11px; padding: 4px 7px; background: var(--acid); color: #11130a; font-size: 6px; font-weight: 950; letter-spacing: .1em; }
.fail-actions { display: grid; grid-template-columns: .7fr 1.3fr; gap: 10px; }.ghost-button { border: 1px solid var(--line); background: transparent; color: #aaa5b1; font-size: 10px; cursor: pointer; }.retry-button { min-height: 68px; width: 100%; }.retry-button i { font-size: 20px; font-style: normal; }

.app.impact-shake { animation: impact-shake .36s ease both; }

@keyframes pulse { 0%,100% { opacity: .55; transform: scale(.86); } 50% { opacity: 1; transform: scale(1.1); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes impact-shake { 0%,100% { transform: translate(0); } 15% { transform: translate(-8px, 3px); } 34% { transform: translate(7px, -4px); } 55% { transform: translate(-4px, 2px); } 72% { transform: translate(3px, -1px); } }

@media (max-width: 980px) {
  .start-screen { grid-template-columns: .92fr 1.08fr; width: min(100% - 38px, 900px); column-gap: 22px; }
  .hero-visual { width: 100%; }
  .mode-points small { display: none; }
  .play-layout { grid-template-columns: minmax(0, 1fr) 250px; }
  .side-panel { gap: 9px; }.objective-card { padding: 17px; }.control-card { padding: 14px 16px; }
}

@media (max-width: 760px) {
  .topbar { width: calc(100% - 28px); height: 67px; }.logo-mark { width: 31px; height: 31px; }.logo-mark i { width: 17px; height: 17px; }.logo b { font-size: 10px; }.logo small { font-size: 6px; }
  .best-pill { height: 34px; padding: 0 10px; }.sound-button { width: 34px; height: 34px; }
  .start-screen { min-height: calc(100svh - 67px); grid-template-columns: 1fr; grid-template-rows: auto auto auto; gap: 25px; width: calc(100% - 34px); padding: 42px 0 22px; }
  .hero-copy { text-align: center; }.signal { justify-content: center; } h1 { font-size: clamp(59px, 19vw, 88px); } h1 em::after { display: none; }
  .hero-rule { margin: 22px 0; }.start-button { margin: 0 auto; }.mode-points { text-align: left; }.hero-visual { width: min(100%, 440px); order: 2; }.how-to { order: 3; padding: 14px 10px; gap: 8px; }.how-to small { display: none; }.how-to b { font-size: 9px; }.how-to > em { font-size: 16px; }
  .game-screen { width: calc(100% - 20px); padding-top: 10px; }.run-header { grid-template-columns: 86px repeat(3, 1fr) 47px; min-height: 54px; }.run-header > div { padding: 8px; }.run-header small { font-size: 5px; letter-spacing: .08em; }.run-header b { font-size: 12px; }.floor-box { gap: 7px; }.floor-box strong { font-size: 21px; }.pause-button small { display: none; }
  .play-layout { grid-template-columns: 1fr; gap: 10px; margin-top: 10px; }.maze-wrap { width: 100%; max-height: none; }.side-panel { display: grid; grid-template-columns: 1.2fr .8fr; }.control-card, .risk-card { display: none; }.objective-card, .tension-card { min-height: 116px; }.objective-card { padding: 14px; }.objective-card > p { margin-bottom: 8px; }.objective-card h2 { margin-bottom: 9px; font-size: 16px; }.objective { padding: 8px; }.objective small { display: none; }.tension-card { padding: 14px; display: flex; flex-direction: column; justify-content: center; }
  .maze-status { bottom: 8px; left: 11px; right: 11px; }.grab-hint { bottom: 8%; padding: 10px 13px; }.grab-hint span { font-size: 14px; }.grab-hint b { font-size: 8px; }
}

@media (max-width: 430px) {
  .logo small { display: none; }.best-pill span { display: none; }.top-actions { gap: 7px; }
  .start-screen { padding-top: 32px; }.hero-rule { font-size: 13px; }.start-button { min-height: 67px; }.start-icon { width: 42px; height: 42px; }.start-button b { font-size: 14px; }
  .mode-points b { font-size: 8px; }.mode-points i { font-size: 14px; }.hero-visual { width: 100%; }.danger-tag { right: -7px; transform: scale(.85); transform-origin: right center; }.floor-tag { left: -7px; transform: scale(.85); transform-origin: left center; }
  .how-to { justify-content: space-around; }.how-to > div { gap: 5px; }.how-to > div > i { font-size: 7px; }.how-to b { font-size: 7px; }
  .run-header { grid-template-columns: 69px repeat(3, 1fr) 38px; }.run-header > div { padding: 7px 5px; }.run-header b { font-size: 10px; }.floor-box strong { font-size: 18px; }.maze-status b { font-size: 5px; }
  .side-panel { grid-template-columns: 1fr; }.tension-card { min-height: 90px; }.objective-card { min-height: 105px; }.overlay-card { padding: 31px 22px; }.clear-stats b, .run-stats b { font-size: 11px; }.fail-actions { grid-template-columns: 1fr; }.ghost-button { min-height: 44px; order: 2; }
}

@media (max-height: 720px) and (min-width: 761px) {
  .topbar { height: 68px; }.game-screen { padding-top: 12px; }.run-header { min-height: 55px; }.play-layout { margin-top: 12px; }.maze-wrap { max-height: calc(100svh - 149px); }
  .objective-card { padding: 16px; }.objective-card h2 { margin-bottom: 10px; }.control-card { padding: 12px 16px; }.risk-card { padding: 10px 15px; }
}

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