:root {
  --text: #f1f3ff;
  --muted: #b4bfd6;
  --red: #d64045;
  --red-soft: rgba(214, 64, 69, 0.4);
  --line: rgba(239, 242, 255, 0.28);
  --shadow: rgba(0, 0, 0, 0.65);
}

* { box-sizing: border-box; }
.game-stage,
.game-stage *,
.play-screen,
.play-screen *,
.draggable,
.interactive,
.hud,
.control-layer {
  user-select: none;
  -webkit-user-select: none;
}

.game-stage,
.draggable,
.interactive,
.control-layer {
  touch-action: none;
}

html, body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #070b18;
  color: var(--text);
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

.app {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

.hidden {
  opacity: 0 !important;
  pointer-events: none !important;
  visibility: hidden !important;
}

.screen {
  position: absolute;
  inset: 0;
  display: none;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}
.screen.active {
  display: block;
  opacity: 1;
  pointer-events: auto;
}

.scene-bg,
.scene-fx,
.vignette,
#noiseCanvas,
.shake-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.scene-bg { background-size: cover; background-position: center; transform: scale(1.015); }
.title-bg { background-image: image-set(url("./assets/title-bg.webp") type("image/webp"), url("./assets/title-bg.png") type("image/png")); }
.play-bg { background-image: image-set(url("./assets/play-bg.webp") type("image/webp"), url("./assets/play-bg.png") type("image/png")); }
.clear-bg { background-image: image-set(url("./assets/clear-bg.webp") type("image/webp"), url("./assets/clear-bg.png") type("image/png")); }
.gameover-bg { background-image: image-set(url("./assets/gameover-bg.webp") type("image/webp"), url("./assets/gameover-bg.png") type("image/png")); }

.scene-fx {
  background:
    radial-gradient(circle at 70% 26%, rgba(255, 255, 255, 0.08), transparent 44%),
    radial-gradient(circle at 40% 74%, rgba(4, 13, 46, 0.45), transparent 50%),
    repeating-linear-gradient(0deg, transparent 0 3px, rgba(255, 255, 255, 0.015) 3px 4px);
  mix-blend-mode: screen;
}

.vignette { background: radial-gradient(circle, transparent 38%, rgba(0, 0, 0, 0.7) 100%); }
.vignette.heavy { background: radial-gradient(circle, rgba(0, 0, 0, 0.05) 32%, rgba(0, 0, 0, 0.8) 100%); }

.title-overlay,
.result-overlay {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: min(86vw, 560px);
  text-align: center;
  border: 1px solid var(--line);
  background: rgba(6, 12, 28, 0.34);
  backdrop-filter: blur(2px);
  box-shadow: 0 20px 60px var(--shadow), inset 0 0 30px rgba(255, 255, 255, 0.05);
  z-index: 20;
  pointer-events: auto;
}

.title-overlay { top: 50%; transform: translate(-50%, -54%); padding: clamp(18px, 2.8vw, 26px); }

.kicker { margin: 0; letter-spacing: 0.26em; font-size: 0.75rem; color: rgba(228, 233, 255, 0.86); }
h1 { margin: 10px 0 4px; font-size: clamp(2.2rem, 8.4vw, 4.1rem); font-weight: 500; text-shadow: 0 6px 30px rgba(0, 0, 0, 0.7); }
.tagline { margin: 0 0 16px; color: #f2f6ff; font-size: clamp(1rem, 3.8vw, 1.35rem); }

.difficulty { display: flex; justify-content: center; gap: 8px; margin-bottom: 14px; }
.diff-btn,
.btn-primary,
.btn-secondary {
  border: 1px solid var(--line);
  background: rgba(10, 14, 30, 0.45);
  min-height: 48px;
  padding: 0 16px;
  pointer-events: auto;
  touch-action: manipulation;
}
.diff-btn.active { border-color: rgba(214, 64, 69, 0.8); color: #ffd6d8; box-shadow: 0 0 18px rgba(214, 64, 69, 0.3); }
.btn-primary { width: min(340px, 75vw); background: linear-gradient(180deg, rgba(214, 64, 69, 0.42), rgba(67, 16, 20, 0.72)); }
.mini-note { margin: 12px auto 0; max-width: 36ch; color: var(--muted); font-size: 0.88rem; line-height: 1.5; }

.playfield { pointer-events: auto; position: absolute; inset: 0; z-index: 20; }
.hud-top {
  position: absolute;
  top: 3.2vh;
  left: 0;
  right: 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 4.5vw;
}
.hud-time { justify-self: start; color: var(--red); font-size: clamp(1.5rem, 4.3vw, 2.45rem); text-shadow: 0 0 24px rgba(214, 64, 69, 0.42); }
.hud-phase-wrap { text-align: center; min-width: min(72vw, 460px); border-top: 1px solid rgba(223, 227, 242, 0.2); border-bottom: 1px solid rgba(223, 227, 242, 0.2); padding: 7px 10px 8px; }
.hud-phase { margin: 0; letter-spacing: 0.08em; font-size: clamp(1rem, 2.7vw, 2rem); }
.phase-dots { margin-top: 7px; display: flex; justify-content: center; gap: 10px; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, 0.25); }
.dot.active { background: var(--red); box-shadow: 0 0 10px var(--red-soft); }
.pause-btn { justify-self: end; width: 58px; height: 58px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.5); background: rgba(5, 11, 25, 0.22); color: var(--text); font-size: 1.1rem; min-width: 44px; min-height: 44px; pointer-events: auto; }
.pause-btn:focus-visible { outline: 3px solid #ffe8ab; outline-offset: 2px; }
.pause-btn[aria-pressed="true"] { border-color: rgba(255, 224, 224, 0.95); box-shadow: 0 0 18px rgba(214, 64, 69, 0.6); }

.hud-left,
.hud-right { position: absolute; top: 27vh; text-align: center; }
.hud-left { left: 3.4vw; }
.hud-right { right: 3.4vw; }
.hint-label { margin: 0; color: var(--red); font-size: clamp(1rem, 2vw, 1.6rem); letter-spacing: 0.08em; }
.hint-line { width: 2px; height: 28vh; margin: 10px auto 0; background: linear-gradient(180deg, rgba(255, 255, 255, 0.65), rgba(255, 255, 255, 0.05)); }

.timing-ring {
  position: absolute;
  left: 50%;
  top: 39vh;
  width: clamp(110px, 16vw, 190px);
  height: clamp(110px, 16vw, 190px);
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.timing-ring.phase-tap {
  left: 50%;
  top: 50%;
  width: max(88px, 13.5vmin);
  height: max(88px, 13.5vmin);
  min-width: 88px;
  min-height: 88px;
  transform: translate(-50%, -50%);
}
.timing-ring.phase-tap .success-zone,
.timing-ring.phase-tap .shrinking-ring,
.timing-ring.phase-tap .ring-flash {
  display: none;
}
.timing-ring.phase-tap .now-label {
  transform: translate(-50%, -50%);
}

.timing-ring > * {
  position: absolute;
  left: 50%;
  top: 50%;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.success-zone,
.shrinking-ring {
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.success-zone {
  border: 3px solid rgba(255, 255, 255, 0.42);
  box-shadow: 0 0 16px rgba(255, 255, 255, 0.15);
}
.shrinking-ring {
  border: 2px solid rgba(255, 255, 255, 0.78);
  box-shadow: 0 0 26px rgba(255, 255, 255, 0.22);
  pointer-events: auto;
}
.ring-flash {
  width: 110%;
  height: 110%;
  opacity: 0;
  background: radial-gradient(circle, rgba(255, 246, 208, 0.74) 0%, rgba(255, 224, 145, 0.44) 45%, rgba(255, 133, 133, 0.18) 70%, rgba(255, 133, 133, 0) 100%);
  filter: blur(1px);
  transition: opacity 0.08s linear;
}
.shrinking-ring.active-target { pointer-events: auto; }
.success-zone.good-window,
.shrinking-ring.good-window {
  border-color: rgba(255, 233, 168, 0.98);
  box-shadow: 0 0 28px rgba(255, 228, 150, 0.8), 0 0 48px rgba(214, 64, 69, 0.36);
}
.success-zone.pulse-ok { animation: okPulseCentered 0.24s ease; }
.shrinking-ring.pulse-bad { animation: badNoise 0.14s linear; }
.ring-flash.peak,
.ring-flash.hit { opacity: 1; }
.ring-flash.bad { animation: badNoise 0.14s linear; }

.now-label {
  transform: translate(-50%, calc(-50% + clamp(84px, 11vw, 112px)));
  margin: 0;
  font-size: clamp(0.9rem, 2.2vw, 1.2rem);
  letter-spacing: 0.14em;
  color: rgba(240, 244, 255, 0.72);
  text-shadow: 0 0 14px rgba(0, 0, 0, 0.7);
  border-radius: 0;
}
.now-label.hot { color: #ffeec1; text-shadow: 0 0 18px rgba(255, 225, 131, 0.9); }

.chair {
  position: absolute;
  left: 21%;
  top: 56%;
  width: max(11.8vmin, 84px);
  max-width: 118px;
  aspect-ratio: 1.3;
  border-radius: 8px;
  border: 1px solid rgba(186, 170, 146, 0.7);
  background: linear-gradient(180deg, rgba(65, 57, 52, 0.86), rgba(24, 21, 20, 0.96));
  box-shadow: 0 14px 24px rgba(0, 0, 0, 0.5);
  opacity: 1;
  transition: opacity 0.22s ease;
}
.chair.is-hidden { opacity: 0; pointer-events: none; }
.chair.active-target { box-shadow: 0 0 16px rgba(255, 255, 255, 0.45), 0 0 35px rgba(214, 64, 69, 0.5), 0 14px 24px rgba(0, 0, 0, 0.5); }

.target-feet {
  position: absolute;
  left: 50%;
  top: 66%;
  width: clamp(112px, 18vw, 210px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 2px dashed rgba(255, 255, 255, 0.48);
  background: radial-gradient(circle, rgba(255, 255, 255, 0.09), rgba(214, 64, 69, 0.05) 55%, rgba(0, 0, 0, 0.1) 75%);
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  pointer-events: none;
}
.target-feet.active { opacity: 0.92; box-shadow: 0 0 24px rgba(255, 255, 255, 0.24), 0 0 44px rgba(214, 64, 69, 0.26); }
.target-feet.near { border-color: rgba(255, 230, 234, 0.95); box-shadow: 0 0 34px rgba(255, 255, 255, 0.45), 0 0 62px rgba(214, 64, 69, 0.55); }
.target-feet.ok { border-color: rgba(255, 239, 196, 0.95); box-shadow: 0 0 40px rgba(255, 230, 160, 0.7); }
.target-label { position: absolute; top: -24px; left: 50%; transform: translateX(-50%); padding: 4px 10px; border: 1px solid rgba(255, 255, 255, 0.6); background: rgba(7, 12, 24, 0.6); font-size: 0.78rem; white-space: nowrap; }

.hold-ring {
  width: clamp(96px, 14vw, 156px);
  height: clamp(96px, 14vw, 156px);
  min-width: 96px;
  min-height: 96px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.6);
  background: radial-gradient(circle at center, rgba(214, 64, 69, 0.38), rgba(9, 14, 28, 0.75) 65%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  pointer-events: auto;
  touch-action: none;
}
.hold-ring.active-target { box-shadow: 0 0 18px rgba(255, 255, 255, 0.34), 0 0 36px rgba(214, 64, 69, 0.5); }
.hold-ring.holding { border-color: rgba(255, 224, 224, 0.95); box-shadow: 0 0 24px rgba(255, 236, 176, 0.5), 0 0 44px rgba(214, 64, 69, 0.75); }
.hold-text { letter-spacing: 0.12em; color: #ffd9dd; }
.hold-meter-circle {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.62);
  background: rgba(8, 12, 24, 0.9);
}
.hold-meter-fill {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 0%;
  background: linear-gradient(180deg, rgba(255, 239, 188, 0.95), rgba(214, 64, 69, 0.9));
  transition: height 0.08s linear;
}

.tension-control { position: absolute; left: 50%; top: 17%; transform: translateX(-50%); width: min(70vw, 560px); display: none; }
.tension-label { margin: 0 0 8px; text-align: center; font-size: 0.86rem; color: #ffd8dd; }
.tension-track { position: relative; height: 56px; border: 1px solid rgba(255, 255, 255, 0.58); background: rgba(10, 14, 24, 0.45); border-radius: 999px; touch-action: none; }
.tension-center { position: absolute; left: 50%; top: 1px; bottom: 1px; width: 2px; transform: translateX(-50%); background: rgba(255, 255, 255, 0.78); }
.rope-shadow { position: absolute; left: 50%; top: 50%; width: 44px; height: 18px; background: linear-gradient(90deg, rgba(150, 20, 30, 0.95), rgba(255, 118, 118, 0.95)); border-radius: 999px; transform: translate(-50%, -50%); display: block; box-shadow: 0 0 18px rgba(214, 64, 69, 0.64); pointer-events: none; }

.tap-cluster {
  position: absolute;
  right: 3.4vw;
  bottom: 15.4%;
  width: max(88px, 13.5vmin);
  height: max(88px, 13.5vmin);
  min-width: 88px;
  min-height: 88px;
  display: none;
}

.tap-cluster > * {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.beat-ring {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.48);
  background: rgba(8, 12, 24, 0.4);
  pointer-events: auto;
  touch-action: none;
  transition: box-shadow 0.08s linear, border-color 0.08s linear;
}
.beat-ring.peak { box-shadow: 0 0 22px rgba(255, 225, 130, 0.85), 0 0 42px rgba(255, 134, 134, 0.6); border-color: rgba(255, 241, 188, 0.95); }
.beat-ring.good { animation: okPulseCentered 0.24s ease; }
.beat-ring.bad { animation: badNoise 0.14s linear; }

.tap-pad {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.55);
  background: rgba(9, 13, 27, 0.42);
  color: var(--red);
  display: block;
  touch-action: none;
}
.tap-pad.active-target { box-shadow: 0 0 18px rgba(255, 255, 255, 0.35), 0 0 30px rgba(214, 64, 69, 0.5); }
.tap-pad.pulse { animation: tapPulse 0.95s ease-in-out infinite; }
.tap-pad.peak {
  border-color: rgba(255, 241, 188, 0.95);
  box-shadow: 0 0 28px rgba(255, 230, 151, 0.9), 0 0 56px rgba(255, 126, 126, 0.55);
  color: #ffe8ab;
}
.tap-pad.idle {
  border-color: rgba(255, 255, 255, 0.36);
  color: rgba(214, 64, 69, 0.62);
}
.tap-flash {
  width: 128%;
  height: 128%;
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.72) 0%, rgba(255, 245, 210, 0.32) 35%, rgba(255, 122, 122, 0.12) 65%, rgba(255, 122, 122, 0) 100%);
}
.tap-flash.good { animation: whitePulse 0.24s ease; }
.tap-flash.bad { animation: redNoise 0.2s linear; }

.hud-bottom { position: absolute; left: 50%; bottom: 6.6vh; transform: translateX(-50%); width: min(70vw, 620px); text-align: center; }
.rescue-label { margin: 0 0 9px; font-size: clamp(1.2rem, 2.9vw, 2rem); letter-spacing: 0.08em; }
.gauge-track { height: 14px; border: 1px solid rgba(255, 255, 255, 0.58); background: rgba(7, 11, 19, 0.72); }
.gauge-fill { height: 100%; width: 0%; background: linear-gradient(90deg, rgba(214, 64, 69, 0.95), rgba(255, 226, 230, 0.9)); box-shadow: 0 0 20px rgba(214, 64, 69, 0.54); transition: width 0.15s linear; }
.status-text { margin: 12px 0 0; color: #ecf0ff; text-shadow: 0 0 16px rgba(0, 0, 0, 0.85); }
.feedback-text { position: absolute; left: 50%; top: 57%; transform: translateX(-50%); margin: 0; font-size: 0.92rem; color: #ffe2e7; opacity: 0; transition: opacity 0.16s ease; }
.feedback-text.show { opacity: 1; }

.shake-layer.shaking { animation: shake 0.22s linear 1; }
@keyframes shake { 0% { transform: translate(0, 0); } 25% { transform: translate(-3px, 2px); } 50% { transform: translate(3px, -1px); } 75% { transform: translate(-2px, -2px); } 100% { transform: translate(0, 0); } }
@keyframes tapPulse { 0%, 100% { transform: translate(-50%, -50%) scale(1); } 50% { transform: translate(-50%, -50%) scale(1.08); } }
@keyframes okPulseCentered {
  0% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-50%, -50%) scale(1.08); }
  100% { transform: translate(-50%, -50%) scale(1); }
}
@keyframes badNoise { 0% { filter: brightness(1); } 50% { filter: brightness(0.6) saturate(1.3); } 100% { filter: brightness(1); } }
@keyframes whitePulse { 0% { opacity: 0.25; transform: translate(-50%, -50%) scale(0.9); } 60% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); } 100% { opacity: 0; transform: translate(-50%, -50%) scale(1.22); } }
@keyframes redNoise { 0% { opacity: 0.15; filter: saturate(1); } 40% { opacity: 0.62; filter: saturate(1.6); } 100% { opacity: 0; filter: saturate(1); } }

.hud-left.dimmed,
.hud-right.dimmed,
.tension-control.dimmed,
.target-feet.dimmed,
.timing-ring.dimmed,
.tap-cluster.dimmed {
  opacity: 0.12;
}

.timing-ring.emphasis,
.tap-cluster.emphasis,
.hud-left.emphasis,
.hud-right.emphasis,
.tension-control.emphasis,
.target-feet.emphasis {
  opacity: 1;
}

.result-overlay { top: 50%; transform: translate(-50%, -50%); padding: clamp(18px, 3vw, 28px); }
h2 { margin: 10px 0 8px; font-size: clamp(2rem, 8vw, 3.5rem); font-weight: 500; }
#resultLead { margin: 0 auto; width: min(90%, 34ch); color: #e4e9f8; }
.result-stats { margin: 16px 0; border-top: 1px solid rgba(255, 255, 255, 0.28); border-bottom: 1px solid rgba(255, 255, 255, 0.28); padding: 10px 0; }
.result-stats p { margin: 8px 0; }
.result-stats strong { color: #ffdee0; }
.result-actions { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.result-actions .btn-primary,
.result-actions .btn-secondary { width: min(320px, 82vw); min-height: 52px; }
.btn-secondary { background: rgba(8, 13, 27, 0.42); }

@media (max-width: 820px) {
  .title-overlay,
  .result-overlay { width: min(92vw, 520px); }
  .hud-top { padding: 0 3vw; top: 2vh; }
  .pause-fake { width: 48px; height: 48px; }
  .hud-left { left: 2vw; top: 28vh; }
  .hud-right { right: 2vw; top: 25vh; }
  .hint-line { height: 20vh; }

  .tension-control { width: min(86vw, 560px); top: 20%; }
  .hud-bottom { bottom: 3.2vh; width: min(86vw, 640px); }
  .status-text { font-size: 0.88rem; margin-top: 10px; }

  .tap-cluster { right: 3vw; bottom: 18.4%; }
  .timing-ring.phase-tap { width: max(84px, 14vmin); height: max(84px, 14vmin); }
}

/* ---- a11y / navigation / content layer ---- */
.skip-link {
  position: fixed;
  top: -200px;
  left: 12px;
  z-index: 1000;
  padding: 10px 16px;
  background: #070b18;
  color: #ffe8ab;
  border: 1px solid var(--line);
  border-radius: 8px;
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 8px 16px;
  background: rgba(6, 10, 22, 0.72);
  backdrop-filter: blur(4px);
  border-bottom: 1px solid var(--line);
}
.site-nav a { color: var(--text); text-decoration: none; font-size: 0.86rem; padding: 6px 8px; min-height: 24px; display: inline-flex; align-items: center; border-radius: 4px; }
.site-nav a:hover { color: #ffe8ab; }
.site-nav-brand { letter-spacing: 0.06em; font-weight: 600; }
.site-nav ul { display: flex; gap: 14px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.site-nav a:focus-visible { outline: 3px solid #ffe8ab; outline-offset: 2px; border-radius: 4px; }

.kbd-hint {
  position: absolute;
  left: 50%;
  top: calc(3.2vh + 64px);
  transform: translateX(-50%);
  margin: 0;
  font-size: 0.72rem;
  color: rgba(228, 233, 255, 0.6);
  pointer-events: none;
  text-align: center;
  width: 90vw;
}

/* howto brief on title */
.howto-brief {
  margin: 14px auto 0;
  max-width: 36ch;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(6, 12, 28, 0.4);
  padding: 8px 14px;
  color: var(--muted);
  font-size: 0.84rem;
}
.howto-brief summary { cursor: pointer; color: #ffd9dd; letter-spacing: 0.04em; }
.howto-brief summary:focus-visible { outline: 3px solid #ffe8ab; outline-offset: 2px; }
.diff-legend { display: grid; gap: 4px; margin: 10px 0; }
.diff-legend div { display: grid; grid-template-columns: 64px 1fr; gap: 8px; }
.diff-legend dt { color: #ffd9dd; font-weight: 600; margin: 0; }
.diff-legend dd { margin: 0; }
.op-legend { list-style: none; padding: 0; margin: 8px 0; display: grid; gap: 6px; }
.op-legend li { display: flex; align-items: center; gap: 8px; }
.op-tag {
  flex: none;
  min-width: 52px;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 2px 6px;
  color: #ffe8ab;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
}
.howto-more { margin: 6px 0 2px; }
.howto-more a { color: #ffe8ab; }

.noscript-note {
  position: relative;
  z-index: 50;
  max-width: 640px;
  margin: 90px auto 40px;
  padding: 18px 20px;
  background: rgba(6, 12, 28, 0.6);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  line-height: 1.6;
}
.noscript-note a { color: #ffe8ab; }

/* content pages (how-to-play, about, accessibility, updates, privacy, credits) */
.content { color: var(--text); max-width: 760px; margin: 90px auto 60px; padding: 0 20px; line-height: 1.8; }
.content a { color: #ffe8ab; text-decoration: underline; }
.content a:hover { color: #fff; }
.content a:focus-visible { outline: 3px solid #ffe8ab; outline-offset: 2px; }
.content h2 { color: #f1f3ff; }
.content table { border-collapse: collapse; width: 100%; margin: 1em 0; }
.content th, .content td { border: 1px solid var(--line); padding: 8px 12px; text-align: left; }
.content th { background: rgba(214, 64, 69, 0.15); }

/* chair keyboard-selected state */
.chair.selected { box-shadow: 0 0 0 3px #ffe8ab, 0 0 18px rgba(255, 232, 171, 0.6); }

/* reduced motion: stop ambient + shake */
@media (prefers-reduced-motion: reduce) {
  .shake-layer.shaking { animation: none; }
  .scene-fx { animation: none; }
  .tap-pad.pulse { animation: none; }
  .app * { transition-duration: 0.001ms !important; }
}

/* DAILY RESCUE */
.daily-row { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-top: 10px; }
.btn-daily {
  background: linear-gradient(135deg, #2b3da8, #6a3df0);
  color: #fff; border: 1px solid #8b7bff; border-radius: 10px;
  padding: 12px 22px; font-size: 1rem; font-weight: 700; letter-spacing: 0.04em;
  cursor: pointer;
}
.btn-daily:hover { filter: brightness(1.1); }
.btn-daily:focus-visible { outline: 3px solid #ffe8ab; outline-offset: 2px; }
.daily-info { font-size: 0.78rem; color: #b4bfd6; margin: 0; text-align: center; line-height: 1.5; }
.btn-link {
  background: none; border: none; color: #9fb0d6; text-decoration: underline;
  cursor: pointer; font-size: 0.78rem; padding: 0;
}
.btn-link:hover { color: #ffe8ab; }
.btn-link:focus-visible { outline: 2px solid #ffe8ab; outline-offset: 2px; }

.result-daily {
  margin-top: 8px; padding: 8px 10px; border: 1px solid var(--line);
  border-radius: 8px; font-size: 0.8rem; color: #cdd6ec; background: rgba(43, 61, 168, 0.18);
}

.practice-hint {
  margin-top: 10px; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: 10px; background: rgba(255, 122, 89, 0.12);
  font-size: 0.85rem; color: #e7ecf7;
}
.practice-hint-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.practice-hint-label strong { color: var(--red); }
.practice-dismiss {
  border: 1px solid var(--line); background: transparent; color: #cdd6ec;
  width: 26px; height: 26px; border-radius: 6px; cursor: pointer; line-height: 1;
}
.practice-dismiss:hover, .practice-dismiss:focus-visible { background: rgba(255,255,255,0.08); outline: 2px solid var(--red); }
.practice-hint-reason { margin: 6px 0 4px; }
.practice-hint-note { margin: 0; font-size: 0.72rem; color: #9aa6c2; }

/* daily theme variants (cosmetic; applied via data-daily-theme) */
:root[data-daily-theme="ember"] { --red: #ff7a59; }
:root[data-daily-theme="tide"] { --red: #4fd0e0; }
:root[data-daily-theme="rose"] { --red: #ff6fae; }
