*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  color-scheme: dark;
  --bg: #120f17;
  --ink: #f8f0e4;
  --mint: #5ee0b8;
  --amber: #f0c866;
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: "Hiragino Sans", Meiryo, sans-serif;
  background:
    radial-gradient(circle at 20% 10%, rgba(100, 80, 160, 0.22), transparent 30rem),
    radial-gradient(circle at 88% 40%, rgba(40, 120, 110, 0.12), transparent 26rem),
    var(--bg);
  color: var(--ink);
}

.app {
  max-width: 390px;
  margin: 0 auto;
  padding: 0 12px 24px;
}

.masthead {
  max-width: 390px;
  margin: 0 auto;
  padding: 14px 12px 8px;
}

.back {
  color: var(--mint);
  font-weight: 700;
  text-decoration: none;
  font-size: 0.85rem;
}

.start-panel,
.review-panel,
.album-panel {
  margin-top: 6vh;
  padding: 32px 22px 28px;
  text-align: center;
  border: 1px solid rgba(240, 200, 102, 0.4);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(250, 245, 235, 0.06), transparent 40%),
    linear-gradient(180deg, #352848, #1c152c);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

.kicker {
  margin: 0 0 8px;
  color: var(--mint);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.16em;
}

h1 {
  margin: 0;
  color: #fff2c9;
  font-size: clamp(1.85rem, 8vw, 2.4rem);
  line-height: 1.1;
}

h1 span {
  display: block;
  margin-top: 6px;
  font-size: 0.78em;
}

.lede {
  margin: 18px auto 16px;
  color: #e4d9e8;
  line-height: 1.75;
  font-size: 0.94rem;
}

.play-panel {
  padding-top: 4px;
}

.canvas-wrap {
  display: flex;
  justify-content: center;
  background: #1a1428;
  border: 2px solid rgba(250, 245, 235, 0.28);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(94, 224, 184, 0.12);
}

#game-canvas {
  touch-action: none;
  width: 100%;
  max-width: 390px;
  display: block;
}

.controls {
  margin-top: 12px;
}

.btn-primary,
.btn-shutter,
.btn-share {
  min-height: 44px;
  width: 100%;
  font: inherit;
  border-radius: 999px;
  cursor: pointer;
  margin-top: 8px;
}

.btn-primary {
  border: 1px solid #ffdf8d;
  font-weight: 800;
  background: linear-gradient(180deg, #f0c866, #b86b24);
  color: #27152e;
}

.btn-shutter {
  border: 2px solid #faf7f0;
  font-weight: 800;
  background: linear-gradient(180deg, #5a4870, #2a2038);
  color: #faf7f0;
}

.btn-share {
  border: 1px solid #6a5068;
  background: transparent;
  color: var(--ink);
}

.live {
  min-height: 1.2em;
  color: var(--mint);
  font-weight: 700;
  font-size: 0.9rem;
}

.hint {
  text-align: center;
  color: #b8a8c8;
  font-size: 0.82rem;
}

html[data-capture="1"] .capture-hide {
  display: none !important;
}

html[data-promo="shot"] .masthead,
html[data-promo="shot"] .controls,
html[data-promo="shot"] .live {
  display: none;
}

html[data-promo="shot"] .app {
  padding: 0;
}

html[data-promo="shot"] .canvas-wrap {
  border: 0;
  border-radius: 0;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
