/* けしけし消防隊 — 100dvh フルスクリーンレイアウト */

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  background: #10131a;
  color: #eef2f7;
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Noto Sans JP", "Yu Gothic", sans-serif;
  -webkit-font-smoothing: antialiased;
  touch-action: manipulation;
  overflow: hidden;
}

#app {
  height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* ---- HUD (プレイ中のみ表示) ---- */
#hud {
  flex: 0 0 auto;
  display: flex;
  gap: 1.4em;
  justify-content: center;
  align-items: center;
  padding: 6px 12px;
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  background: #171b25;
  border-bottom: 1px solid #2a3040;
}
#hud-time { color: #ffd54f; font-variant-numeric: tabular-nums; }
#hud-time.warn { color: #ff5252; }

/* ---- ステージ ---- */
#stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
}
#c {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: crosshair;
}

/* ---- タイトル / ゲームオーバー画面 ---- */
.screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  text-align: center;
  padding: 24px;
  background: rgba(10, 13, 20, 0.58);
  backdrop-filter: blur(1.5px);
  -webkit-backdrop-filter: blur(1.5px);
  user-select: none;
  -webkit-user-select: none;
}
.screen h1 {
  font-size: clamp(1.5rem, 6.5vw, 2.5rem);
  letter-spacing: 0.05em;
  text-shadow: 0 2px 12px rgba(255, 90, 40, 0.45);
}
.screen .sub {
  font-size: 0.9rem;
  color: #b4bcc8;
  max-width: 24em;
  line-height: 1.6;
}
.hint {
  font-size: 0.78rem;
  color: #8b93a2;
  max-width: 27em;
  line-height: 1.7;
  display: none;
}

.btn-main {
  padding: 12px 44px;
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  color: #fff;
  background: #e53935;
  box-shadow: 0 4px 0 #a02724;
}
.btn-main:active { transform: translateY(3px); box-shadow: 0 1px 0 #a02724; }

.diff-row { display: flex; gap: 8px; }
.diff-btn {
  padding: 7px 16px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  border: 2px solid #3a4256;
  border-radius: 6px;
  background: #1e2330;
  color: #9aa3b2;
}
.diff-btn.selected {
  border-color: #e53935;
  color: #fff;
  background: #3a1512;
}

.sound-btn {
  padding: 5px 16px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  border: 2px solid #4dd0e1;
  border-radius: 20px;
  color: #4dd0e1;
  background: #12303a;
}
.sound-btn.off { border-color: #566; color: #889; background: #1a1e28; }

.over-score {
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffd54f;
}

.footer-note { margin-top: 6px; font-size: 0.8rem; line-height: 1.7; }
/* 開始画面はバージョン番号＋CC BYを明示するので、shared/nav.css の
   自動付与(" · CC BY 4.0")は重複回避のため止める */
#screen-title .footer-note::after { content: none; }

/* 中身が画面より高いとき、中央寄せだと上端が切れるので上下の余白で寄せる */
.screen { justify-content: flex-start; overflow-y: auto; }
.screen > :first-child { margin-top: auto; }
.screen > :last-child  { margin-bottom: auto; }

/* ---- なまえ入力 ---- */
.name-box {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: #b4bcc8;
}
.name-box input {
  width: 10em;
  padding: 6px 10px;
  font-size: 1rem;           /* 16px未満だとiOSで入力時にズームされる */
  border: 2px solid #3a4256;
  border-radius: 6px;
  background: #1e2330;
  color: #eef2f7;
}
.name-box input:focus { outline: none; border-color: #4dd0e1; }

/* ---- ランキング ---- */
#ranking {
  width: min(100%, 22em);
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.35);
  font-size: 0.85rem;
}
#ranking h3 {
  font-size: 0.85rem;
  color: #4dd0e1;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}
#ranking table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
#ranking td { padding: 2px 4px; }
#ranking td:first-child { width: 2em; text-align: right; color: #8b93a2; }
#ranking td.name {
  max-width: 8em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
}
#ranking td.lv { color: #8b93a2; }
#ranking td.score { text-align: right; font-weight: 800; }
#ranking tr.me td { color: #ffd54f; }
#ranking p { color: #8b93a2; margin-top: 2px; }

/* 2026.11.02(02) */
