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

:root {
  color-scheme: dark;
  --bg: #1a1418;
  --ink: #f8f0e4;
  --mint: #5ee0b8;
  --grape: #6b3a8a;
  --gold: #f0c866;
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: "Hiragino Sans", Meiryo, sans-serif;
  background:
    radial-gradient(circle at 18% 12%, rgba(132, 65, 146, 0.24), transparent 32rem),
    radial-gradient(circle at 86% 38%, rgba(33, 116, 111, 0.14), transparent 28rem),
    #120f17;
  color: var(--ink);
}

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

.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,
.summary-panel {
  margin-top: 8vh;
  padding: 34px 24px 30px;
  text-align: center;
  border: 1px solid rgba(240, 200, 102, 0.42);
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.07), transparent 45%),
    linear-gradient(180deg, #351b48, #1c152c);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35), inset 0 0 0 5px rgba(255, 255, 255, 0.025);
}

.start-panel::before {
  content: "◖  ◗";
  display: grid;
  place-items: center;
  width: 112px;
  height: 62px;
  margin: 0 auto 20px;
  color: #231433;
  font-size: 2.15rem;
  letter-spacing: 0.25rem;
  border-radius: 56% 56% 46% 46%;
  background: linear-gradient(135deg, #ffe5a1, #c5812c);
  box-shadow: 0 0 38px rgba(240, 200, 102, 0.25);
}

.kicker {
  margin: 0 0 8px;
  color: #7ce3c3;
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.18em;
}

h1 {
  margin: 0;
  color: #fff2c9;
  font-size: clamp(2rem, 9vw, 2.65rem);
  line-height: 1;
  text-shadow: 0 3px 0 #6b2d53;
}

h1 span {
  display: block;
  margin-top: 8px;
  font-size: 0.72em;
}

.lede {
  margin: 22px auto 18px;
  color: #e8ddea;
  font-size: 0.96rem;
  line-height: 1.8;
}

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

.canvas-wrap {
  display: flex;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(180deg, #2a2038, #1a1428);
  border: 1px solid rgba(240, 200, 102, 0.28);
  border-radius: 20px;
  padding: 0;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.34);
}

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

.btn-primary,
.btn-secondary,
.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;
  box-shadow: 0 8px 20px rgba(198, 120, 42, 0.25);
}

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

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

.hint {
  text-align: center;
  color: #b8a8c8;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
}

.summary-panel h2 {
  margin: 0 0 12px;
  color: #fff0bd;
  font-size: 1.8rem;
}

.summary-panel p {
  color: #e4d9e8;
  line-height: 1.7;
}

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

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

html[data-promo="shot"] body {
  background: #120f17;
}

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

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

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

@media (min-width: 720px) {
  .app {
    max-width: 420px;
  }
}

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