:root {
  --sunset: #e87858;
  --amber: #f0b060;
  --cream: #fff4e0;
  --violet: #3a2848;
  --mint: #78d8c8;
}

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

body {
  margin: 0;
  min-height: 100dvh;
  font-family: "Hiragino Maru Gothic ProN", "Yu Gothic UI", sans-serif;
  color: var(--cream);
  background: linear-gradient(180deg, #2a1838 0%, #5a3848 45%, #c87858 100%);
}

a {
  color: var(--mint);
}

.masthead {
  display: flex;
  justify-content: space-between;
  padding: 0.65rem 0.85rem;
  font-size: 0.88rem;
}

#sound {
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(0, 0, 0, 0.2);
  color: #fff;
  border-radius: 8px;
  padding: 0.35rem 0.65rem;
  cursor: pointer;
}

.intro {
  text-align: center;
  padding: 0 1rem 0.25rem;
}

.intro .eyebrow {
  margin: 0;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  opacity: 0.85;
}

.intro h1 span {
  color: var(--amber);
}

.play-shell {
  max-width: 560px;
  margin: 0 auto;
  padding: 0 0.45rem 1rem;
}

.hud {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  font-size: 0.72rem;
  margin-bottom: 0.2rem;
}

.hud strong {
  display: block;
  font-size: 1.1rem;
  line-height: 1.1;
}

.hearts {
  font-size: 1.15rem;
  letter-spacing: 0.08em;
  color: #ff8a78;
}

.banner {
  text-align: center;
  margin: 0.15rem 0;
  padding: 0.35rem 0.5rem;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.25);
  font-weight: 700;
  font-size: 0.9rem;
}

.live {
  text-align: center;
  font-size: 0.88rem;
  margin: 0.1rem 0 0.35rem;
  min-height: 1.3em;
}

.stage-wrap {
  position: relative;
  max-width: 540px;
  margin: 0 auto;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(20, 8, 24, 0.45);
}

#game {
  display: block;
  width: 100%;
  height: auto;
  touch-action: none;
  background: #4a3848;
}

.controls {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.5rem;
  padding: 0 0.15rem;
  min-height: 108px;
}

.stick-zone {
  flex: 0 0 42%;
  max-width: 200px;
  touch-action: none;
}

.stick-base {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  max-width: 120px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 2px solid rgba(255, 220, 180, 0.25);
}

.stick-knob {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 44%;
  height: 44%;
  margin: -22% 0 0 -22%;
  border-radius: 50%;
  background: rgba(255, 240, 210, 0.55);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  pointer-events: none;
}

.btn-slash {
  flex: 1;
  max-width: 200px;
  min-height: 88px;
  border: none;
  border-radius: 18px;
  font-size: 1.35rem;
  font-weight: 800;
  color: #2a1830;
  background: linear-gradient(180deg, #ffd898 0%, #f0a050 100%);
  box-shadow: 0 6px 0 #a06030, 0 10px 20px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  touch-action: manipulation;
}

.btn-slash:active {
  transform: translateY(4px);
  box-shadow: 0 2px 0 #a06030;
}

.btn-slash.pulse {
  animation: slash-pulse 0.85s ease-in-out infinite;
}

@keyframes slash-pulse {
  0%,
  100% {
    filter: brightness(1);
    transform: scale(1);
  }
  50% {
    filter: brightness(1.12);
    transform: scale(1.04);
  }
}

.start-btn {
  display: block;
  width: 100%;
  margin-top: 0.65rem;
  padding: 0.75rem;
  font-size: 1rem;
  font-weight: 700;
  border: none;
  border-radius: 12px;
  background: var(--mint);
  color: #1a2830;
  cursor: pointer;
}

.reward-panel {
  margin-top: 0.5rem;
  padding: 0.65rem;
  border-radius: 12px;
  background: rgba(20, 12, 28, 0.55);
}

.reward-title {
  margin: 0 0 0.5rem;
  text-align: center;
  font-weight: 700;
}

.reward-choices {
  display: grid;
  gap: 0.45rem;
}

.reward-choices button {
  text-align: left;
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 220, 180, 0.3);
  background: rgba(255, 255, 255, 0.08);
  color: var(--cream);
  cursor: pointer;
  font-size: 0.9rem;
}

.reward-choices button strong {
  display: block;
  color: var(--amber);
}

.result-panel {
  margin-top: 0.65rem;
  padding: 0.85rem;
  border-radius: 12px;
  background: rgba(12, 8, 20, 0.72);
  text-align: center;
}

.result-panel.defeat {
  background: rgba(28, 12, 18, 0.82);
  border: 1px solid rgba(255, 120, 100, 0.25);
}

.result-panel.victory {
  border: 1px solid rgba(255, 200, 120, 0.35);
}

.rank-badge {
  font-size: 2.2rem;
  font-weight: 800;
  margin: 0;
  color: var(--amber);
}

.result-panel h2 {
  margin: 0.2rem 0;
  font-size: 1.05rem;
}

.result-panel p {
  font-size: 0.85rem;
  line-height: 1.45;
}

.result-panel button {
  margin: 0.35rem 0.25rem 0;
  padding: 0.5rem 0.85rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  cursor: pointer;
}

.guide {
  max-width: 560px;
  margin: 1rem auto 2rem;
  padding: 0 1rem;
  font-size: 0.88rem;
  color: rgba(255, 244, 224, 0.9);
}

.guide ul {
  padding-left: 1.2rem;
}

.records {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.35rem;
  font-size: 0.75rem;
}

.records dd {
  margin: 0;
  font-weight: 700;
}

.reset {
  margin-top: 0.5rem;
  font-size: 0.8rem;
  background: transparent;
  border: 1px dashed rgba(255, 255, 255, 0.35);
  color: inherit;
  padding: 0.35rem 0.5rem;
  border-radius: 6px;
  cursor: pointer;
}

html[data-capture="1"] .masthead,
html[data-capture="1"] .intro,
html[data-capture="1"] .guide,
html[data-capture="1"] .start-btn,
html[data-capture="1"] .result-panel .share,
html[data-capture="1"] .records,
html[data-capture="1"] .reset {
  display: none !important;
}

html[data-promo="shot"] .masthead,
html[data-promo="shot"] .intro,
html[data-promo="shot"] .guide,
html[data-promo="shot"] .hud,
html[data-promo="shot"] .banner,
html[data-promo="shot"] .live,
html[data-promo="shot"] .controls,
html[data-promo="shot"] .start-btn,
html[data-promo="shot"] .reward-panel,
html[data-promo="shot"] .result-panel {
  display: none !important;
}

html[data-promo="shot"] .play-shell {
  max-width: none;
  padding: 0;
  margin: 0;
}

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

@media (prefers-reduced-motion: reduce) {
  .btn-slash.pulse {
    animation: none;
    filter: brightness(1.08);
  }
}

@media (min-width: 720px) {
  .controls {
    max-width: 540px;
    margin-inline: auto;
  }
}
