:root {
  color-scheme: dark;
  --bg: #05060f;
  --ink: #f4f2ff;
  --ink-dim: rgba(244, 242, 255, 0.62);
  --accent: #ffb27a;
  --accent-2: #8fd8ff;
  --panel-bg: rgba(12, 12, 26, 0.55);
  --panel-border: rgba(255, 255, 255, 0.14);
  --font-display: "M PLUS Rounded 1c", "Zen Kaku Gothic New", sans-serif;
  --font-body: "Zen Kaku Gothic New", "M PLUS Rounded 1c", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}

#scene-host {
  position: fixed;
  inset: 0;
  z-index: 0;
  touch-action: none;
}

#scene-host canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.app-shell {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  pointer-events: none;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom)
    env(safe-area-inset-left);
}

/* 猫は下のcanvasで拾うので、透明な帯であるトップバー/ステージ/フッターは
   クリックを素通しにし、実際に触れるボタン類だけ auto に戻す。 */
.mini-button,
.brand {
  pointer-events: auto;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: 0.02em;
  font-size: 15px;
  opacity: 0.85;
}

.brand i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
}

.title-lockup {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.title-lockup small {
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--ink-dim);
}

.title-lockup strong {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
}

.mini-button {
  margin-left: auto;
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 13px;
  padding: 9px 16px;
  border-radius: 999px;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: transform 0.15s ease, background 0.15s ease;
}

.mini-button:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}

.stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 24px;
}

.intro-copy {
  max-width: 520px;
  pointer-events: none;
}

.eyebrow {
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--accent-2);
  margin: 0 0 10px;
  text-transform: uppercase;
}

.intro-copy h1 {
  font-family: var(--font-display);
  font-size: clamp(28px, 6vw, 46px);
  line-height: 1.28;
  margin: 0 0 12px;
  font-weight: 800;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.6);
}

.intro-copy h1 em {
  font-style: normal;
  color: var(--accent);
}

.lede {
  margin: 0;
  color: var(--ink-dim);
  font-size: 15px;
}

.loading-note {
  margin-top: 18px;
  font-size: 13px;
  color: var(--ink-dim);
  animation: pulse 1.6s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.4;
  }
  50% {
    opacity: 0.9;
  }
}

.footer-note {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 16px 22px 20px;
  font-size: 12px;
  color: var(--ink-dim);
}

.footer-note span {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--ink);
  opacity: 0.7;
}

.footer-note p {
  margin: 0;
}

.game-dialog {
  border: 1px solid var(--panel-border);
  border-radius: 20px;
  padding: 26px 24px 22px;
  max-width: 360px;
  width: calc(100% - 48px);
  background: linear-gradient(165deg, rgba(20, 20, 40, 0.96), rgba(8, 8, 18, 0.96));
  color: var(--ink);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(14px);
}

.game-dialog::backdrop {
  background: rgba(2, 2, 8, 0.72);
  backdrop-filter: blur(2px);
}

.dialog-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--panel-border);
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}

.game-dialog .eyebrow {
  margin-bottom: 6px;
}

.game-dialog h2 {
  font-family: var(--font-display);
  font-size: 20px;
  margin: 0 0 18px;
}

.game-dialog ol {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.game-dialog li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.game-dialog li span {
  font-size: 20px;
  line-height: 1.3;
}

.game-dialog li strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
}

.game-dialog li small {
  display: block;
  color: var(--ink-dim);
  font-size: 12.5px;
  margin-top: 2px;
}

.primary-button {
  width: 100%;
  border: none;
  border-radius: 999px;
  padding: 13px 18px;
  background: linear-gradient(135deg, var(--accent), #ff8a5c);
  color: #1a0a02;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
}

@media (max-width: 560px) {
  .topbar {
    padding: 14px 16px;
  }

  .title-lockup {
    display: none;
  }

  .stage {
    padding: 0 18px;
  }
}

/* ?saver: スクリーンセーバー用。UIを全部隠して、猫だけを見せる */
html[data-mode="saver"] .app-shell {
  display: none;
}

html[data-mode="saver"] body {
  cursor: none;
}
