/*!
 * Finger Window Runner
 * Copyright (c) 2026 Kazu. All rights reserved.
 * 無断での複製・再配布・公開・改変を禁じます（詳細は LICENSE / NOTICE 参照）。
 */
:root {
  color-scheme: light;
  --ink: #13202b;
  --muted: #6d7781;
  --panel: rgba(255, 255, 255, 0.84);
  --line: rgba(255, 255, 255, 0.58);
  --shadow: 0 28px 80px rgba(14, 29, 43, 0.26);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  display: grid;
  place-items: center;
  background:
    linear-gradient(145deg, rgba(23, 40, 55, 0.14), rgba(87, 152, 191, 0.12)),
    #e7f4f8;
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
}

button {
  font: inherit;
}

.game-shell {
  width: min(100vw, 1280px);
  padding: clamp(12px, 2.6vw, 32px);
}

.game-stage {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 8px;
  background: #111d26;
  box-shadow: var(--shadow);
  isolation: isolate;
}

canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: pointer;
  touch-action: manipulation;
}

.hud {
  position: absolute;
  top: clamp(12px, 2vw, 22px);
  left: clamp(12px, 2vw, 24px);
  z-index: 3;
  display: flex;
  gap: 10px;
}

.hud > div {
  min-width: 92px;
  padding: 9px 12px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(13, 27, 39, 0.46);
  color: #fff;
  backdrop-filter: blur(14px);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.24);
}

.hud-label {
  display: block;
  margin-bottom: 2px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.hud strong {
  display: block;
  font-size: clamp(20px, 3vw, 34px);
  line-height: 1;
}

.pause-button {
  position: absolute;
  top: clamp(12px, 2vw, 22px);
  right: clamp(12px, 2vw, 24px);
  z-index: 5;
  display: inline-flex;
  width: clamp(42px, 5vw, 52px);
  height: clamp(42px, 5vw, 52px);
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.52);
  border-radius: 50%;
  background: rgba(13, 27, 39, 0.54);
  color: #fff;
  font-size: 17px;
  font-weight: 900;
  letter-spacing: 0;
  cursor: pointer;
  backdrop-filter: blur(14px);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.24);
}

.pause-button:hover {
  background: rgba(34, 64, 82, 0.72);
}

.pause-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  background: rgba(8, 15, 22, 0.22);
  pointer-events: none;
  backdrop-filter: blur(2px);
}

.pause-overlay.is-hidden {
  display: none;
}

.pause-overlay p {
  margin: 0;
  padding: 12px 20px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 8px;
  background: rgba(13, 27, 39, 0.64);
  color: #fff;
  font-size: clamp(20px, 4vw, 38px);
  font-weight: 900;
  letter-spacing: 0.12em;
}

.status-panel {
  position: absolute;
  z-index: 4;
  top: 50%;
  left: 50%;
  width: min(460px, calc(100% - 32px));
  padding: clamp(18px, 3.2vw, 30px);
  border: 1px solid rgba(255, 255, 255, 0.66);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 24px 64px rgba(12, 24, 35, 0.24);
  transform: translate(-50%, -50%);
  backdrop-filter: blur(18px);
}

.status-panel.is-hidden {
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -47%);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.status-kicker {
  margin: 0 0 8px;
  color: #25739a;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1 {
  margin: 0 0 10px;
  font-size: clamp(28px, 5vw, 48px);
  line-height: 1.05;
  letter-spacing: 0;
}

.status-panel p:not(.status-kicker) {
  margin: 0 0 18px;
  color: #3f4d56;
  font-size: clamp(14px, 1.7vw, 16px);
  line-height: 1.72;
}

.audio-choice {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  padding: 4px;
  border: 1px solid rgba(19, 32, 43, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.48);
}

.audio-choice legend {
  padding: 0 6px;
  color: #25739a;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.08em;
}

.audio-choice label {
  position: relative;
  display: inline-flex;
  min-width: 58px;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  color: #3f4d56;
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
}

.audio-choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.audio-choice input:checked + span {
  background: #13202b;
  color: #fff;
  box-shadow: 0 8px 20px rgba(19, 32, 43, 0.18);
}

.audio-choice span {
  display: inline-flex;
  width: 100%;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
}

.status-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.status-panel button,
.footer-share-button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border: 0;
  border-radius: 8px;
  background: #13202b;
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

.share-button {
  border: 1px solid rgba(19, 32, 43, 0.18);
  background: rgba(255, 255, 255, 0.78);
  color: #13202b;
}

.share-button.is-hidden {
  display: none;
}

.status-panel button:hover,
.footer-share-button:hover {
  background: #224052;
}

.share-button:hover {
  background: #fff;
}

.game-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 12px 0 0;
}

.control-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

/* 著作権表記（画面下部の控えめなクレジット） */
.copyright-note {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
  opacity: 0.8;
}

.footer-share-button {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 12px;
}

@media (max-width: 700px) {
  .game-shell {
    padding: 10px;
  }

  .hud {
    gap: 6px;
  }

  .hud > div {
    min-width: 72px;
    padding: 7px 9px 8px;
  }
}
