:root {
  --ink: #1c2a44;
  --mint: #5fbfb1;
  --cream: #faf6ee;
  --walnut: #6b4423;
  --bg: #efe2cf;
}

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Hiragino Maru Gothic ProN", "Hiragino Sans", "Yu Gothic UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
}

.workshop-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 20% 10%, rgba(95, 191, 177, 0.15), transparent 45%),
    radial-gradient(circle at 80% 0%, rgba(212, 98, 42, 0.12), transparent 40%);
}

.masthead {
  padding: 12px 16px 0;
}

.back {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.9rem;
}

.courier-app {
  max-width: 420px;
  margin: 0 auto;
  padding: 8px 16px 32px;
}

.hero h1 {
  font-size: 1.55rem;
  margin: 0.2rem 0;
}

.hero h1 span {
  color: var(--walnut);
}

.kicker {
  letter-spacing: 0.12em;
  font-size: 0.65rem;
  opacity: 0.7;
}

.catch {
  margin-top: 0.35rem;
}

.btn-primary,
.btn-ghost,
.btn-text {
  font: inherit;
  cursor: pointer;
  border-radius: 999px;
  border: 2px solid var(--ink);
}

.btn-primary {
  background: var(--mint);
  color: var(--ink);
  padding: 0.65rem 1.2rem;
  font-weight: 700;
}

.btn-ghost {
  background: transparent;
  padding: 0.55rem 1rem;
}

.btn-text {
  background: transparent;
  border: none;
  text-decoration: underline;
  padding: 0.25rem;
}

.rule-lead,
.kb-hint,
.records,
.live-msg,
.disclaimer {
  font-size: 0.88rem;
  line-height: 1.5;
}

.hud {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 0.82rem;
  margin-bottom: 6px;
}

.hud span {
  background: rgba(255, 255, 255, 0.55);
  padding: 4px 8px;
  border-radius: 8px;
}

.canvas-wrap {
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
  touch-action: none;
}

#game-canvas {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 16px;
  box-shadow: 0 10px 28px rgba(28, 42, 68, 0.15);
  background: #f3e8d8;
}

.action-row {
  margin-top: 8px;
  text-align: center;
}

.summary-panel h2 {
  margin-top: 0;
}

.cta-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.utility-row {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

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

html[data-capture="1"] .start-panel,
html[data-promo-shot="1"] .start-panel {
  display: none !important;
}

html[data-capture="1"] #play-panel,
html[data-promo-shot="1"] #play-panel {
  display: block !important;
}

html[data-promo-shot="1"] .hero {
  display: none !important;
}

html[data-promo-shot="1"],
html[data-promo-shot="1"] body {
  height: 844px;
  min-height: 844px;
  overflow: hidden;
}

html[data-promo-shot="1"] .courier-app {
  max-width: 390px;
  width: 100%;
  margin: 0 auto;
  padding: 0;
  min-height: 844px;
  height: 844px;
}

html[data-promo-shot="1"] #play-panel {
  display: flex !important;
  flex-direction: column;
  height: 844px;
  padding: 0;
  margin: 0;
}

html[data-promo-shot="1"] .workshop-bg {
  height: 844px;
}

html[data-promo-shot="1"] .hud,
html[data-promo-shot="1"] .live-msg,
html[data-promo-shot="1"] .action-row {
  display: none !important;
}

html[data-promo-shot="1"] .canvas-wrap {
  flex: 1 1 auto;
  width: 100%;
  max-width: 390px;
  margin: 0;
  min-height: 0;
}

html[data-promo-shot="1"] #game-canvas {
  width: 100% !important;
  height: 844px !important;
  max-height: 844px;
  border-radius: 0;
  box-shadow: none;
}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
  }
}

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