/* ============================================================
   14 — SUPER MARIO
   Konsep: platformer cerah. Blok, koin, pipa, kastil, bendera.
   Layout horizontal bertingkat, HUD klasik, bonus room gelap.
   ============================================================ */

:root {
  --sm-sky: #5fb8ff;
  --sm-sky-2: #bfe9ff;
  --sm-ink: #2b1608;
  --sm-ink-soft: #5a3a1e;
  --sm-cream: #fff8e7;
  --sm-cream-2: #f6e7c8;
  --sm-gold: #f6b73c;
  --sm-gold-2: #ffd95e;
  --sm-brick: #c96f2e;
  --sm-brick-dark: #8a4a1e;
  --sm-green: #4caf50;
  --sm-green-dark: #2e7d32;
  --sm-red: #e52521;
  --sm-blue: #2b5cff;
  --sm-rose: #ff7a9e;
  --sm-purple: #1a0f2e;
  --sm-pixel: "Press Start 2P", "Courier New", monospace;
  --sm-body: "Nunito", "Trebuchet MS", "Segoe UI", sans-serif;
  --sm-shadow: 5px 5px 0 rgba(43, 22, 8, 0.28);
  --sm-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

html { scroll-behavior: smooth; scroll-padding-top: 96px; }

body {
  margin: 0;
  background: var(--sm-sky-2);
  color: var(--sm-ink);
  font-family: var(--sm-body);
  font-size: 17px;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
body.sm-locked { overflow: hidden; }

[hidden] { display: none !important; }

::selection { background: var(--sm-gold); color: var(--sm-ink); }

/* ================= SHARED SPRITES ================= */
.sm-cloud {
  position: absolute; width: 86px; height: 24px;
  background: #fff; border-radius: 14px;
  box-shadow: 16px -12px 0 0 #fff, 42px -7px 0 0 #fff, 0 4px 0 rgba(43, 22, 8, 0.06);
  opacity: 0.92;
}
.sm-cloud--a { left: 7%; top: 13%; animation: smDrift 34s linear infinite; }
.sm-cloud--b { right: 8%; top: 24%; transform: scale(0.72); animation: smDrift 46s linear infinite reverse; }
.sm-cloud--c { left: 52%; top: 7%; transform: scale(0.55); opacity: 0.7; animation: smDrift 40s linear infinite; }
.sm-cloud--d { right: 16%; top: 12%; transform: scale(0.8); }
@keyframes smDrift { 50% { transform: translateX(26px); } }

.sm-hill {
  position: absolute; bottom: 0; display: block;
  width: 320px; height: 150px;
  background: #6cc96c;
  border: 4px solid var(--sm-green-dark);
  border-bottom: 0;
  border-radius: 52% 52% 0 0;
}
.sm-hill--a { left: -60px; width: 340px; height: 170px; }
.sm-hill--b { right: -70px; width: 300px; height: 140px; background: #57bd57; }
.sm-hill--c { left: -30px; width: 230px; height: 110px; opacity: 0.9; }
.sm-bush {
  position: absolute; bottom: 0; width: 120px; height: 56px;
  background: #4caf50; border: 4px solid var(--sm-green-dark); border-bottom: 0;
  border-radius: 40px 40px 0 0;
}
.sm-bush::before, .sm-bush::after {
  content: ""; position: absolute; bottom: 0; background: #4caf50;
  border: 4px solid var(--sm-green-dark); border-bottom: 0;
  border-radius: 50% 50% 0 0;
}
.sm-bush::before { left: -34px; width: 70px; height: 38px; }
.sm-bush::after { right: -34px; width: 70px; height: 44px; }
.sm-bush--a { left: 18%; }
.sm-bush--b { right: 26%; transform: scale(0.8); }

.sm-castle {
  position: absolute; display: block;
  width: 170px; height: 150px;
  background: #7a3a1e;
  clip-path: polygon(
    0 100%, 0 34%, 12% 34%, 12% 18%, 26% 18%, 26% 34%,
    36% 34%, 36% 12%, 50% 12%, 50% 0, 62% 0, 62% 12%,
    74% 12%, 74% 34%, 84% 34%, 84% 18%, 100% 18%, 100% 100%
  );
  filter: drop-shadow(4px 4px 0 rgba(43, 22, 8, 0.18));
}
.sm-castle::before {
  content: ""; position: absolute; left: 44%; bottom: 0;
  width: 26px; height: 42px; border-radius: 14px 14px 0 0;
  background: #2b1608;
}
.sm-castle::after {
  content: ""; position: absolute; left: 16%; bottom: 56px;
  width: 9px; height: 13px; background: var(--sm-gold-2);
  box-shadow: 42px 0 0 var(--sm-gold-2), 84px 0 0 var(--sm-gold-2);
}

.sm-coin {
  position: relative; display: inline-block;
  width: 18px; height: 22px; border-radius: 50%;
  background: linear-gradient(90deg, #e09a17, #ffd95e 40%, #fff3b0 52%, #ffd95e 66%, #e09a17);
  border: 2px solid #8a5a0a;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.28);
}
.sm-coin--float { position: absolute; width: 20px; height: 25px; animation: smCoinSpin 2.6s ease-in-out infinite; }
.sm-coin--a { left: 18%; top: 48%; animation-delay: 0.3s; }
.sm-coin--b { right: 22%; top: 40%; animation-delay: 1.1s; }
.sm-coin--c { left: 44%; top: 56%; animation-delay: 1.8s; }
.sm-coin--d { left: 74%; top: 30%; }
@keyframes smCoinSpin { 50% { transform: scaleX(0.25); } }

.sm-ground {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 74px;
  background-color: var(--sm-brick);
  background-image:
    linear-gradient(90deg, rgba(43, 22, 8, 0.32) 3px, transparent 3px),
    linear-gradient(rgba(43, 22, 8, 0.32) 3px, transparent 3px);
  background-size: 46px 23px;
  border-top: 4px solid var(--sm-ink);
  box-shadow: inset 0 8px 0 rgba(255, 255, 255, 0.14);
}

/* ================= GATE ================= */
.sm-gate {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  padding: 24px 16px calc(96px + env(safe-area-inset-bottom));
  overflow: hidden;
  background: linear-gradient(180deg, #55b4ff 0%, #9ddcff 55%, #d9f3ff 100%);
  transition: opacity 0.5s ease, visibility 0.5s;
}
.sm-gate.is-out { opacity: 0; visibility: hidden; pointer-events: none; }
.sm-gate__sky { position: absolute; inset: 0; pointer-events: none; }
.sm-gate__sky .sm-castle { right: 8%; bottom: 74px; width: 130px; height: 118px; opacity: 0.9; }
.sm-gate__sky .sm-hill--a { height: 130px; opacity: 0.8; }
.sm-gate__sky .sm-hill--b { height: 110px; opacity: 0.8; }
.sm-gate__ground {
  position: absolute; left: 0; right: 0; bottom: 0; height: 74px;
  background-color: var(--sm-brick);
  background-image:
    linear-gradient(90deg, rgba(43, 22, 8, 0.32) 3px, transparent 3px),
    linear-gradient(rgba(43, 22, 8, 0.32) 3px, transparent 3px);
  background-size: 46px 23px;
  border-top: 4px solid var(--sm-ink);
}
.sm-gate__card {
  position: relative; z-index: 2;
  width: min(430px, 100%);
  text-align: center;
  padding: 24px 20px 20px;
  background: rgba(255, 248, 231, 0.94);
  border: 4px solid var(--sm-ink);
  box-shadow: 8px 8px 0 rgba(43, 22, 8, 0.28);
  animation: smDropIn 0.6s var(--sm-ease) both;
}
@keyframes smDropIn {
  from { opacity: 0; transform: translateY(-18px); }
  to { opacity: 1; transform: none; }
}
.sm-gate__world {
  font-family: var(--sm-pixel); font-size: 0.4rem; letter-spacing: 0.1em;
  color: var(--sm-ink-soft); margin-bottom: 12px;
}
.sm-gate__super {
  font-family: var(--sm-pixel); font-size: 0.62rem; letter-spacing: 0.26em;
  color: var(--sm-red); margin-bottom: 4px;
}
.sm-gate__title {
  font-family: var(--sm-pixel); font-weight: 400;
  font-size: clamp(1.7rem, 9.6vw, 2.7rem); line-height: 1.3;
  color: var(--sm-ink);
  text-shadow: 3px 3px 0 var(--sm-gold-2), 6px 6px 0 rgba(43, 22, 8, 0.15);
  margin-bottom: 6px;
}
.sm-gate__title span { color: var(--sm-red); }
.sm-gate__date {
  font-family: var(--sm-pixel); font-size: 0.44rem; letter-spacing: 0.12em;
  color: var(--sm-ink-soft); margin-bottom: 12px;
}
.sm-gate__sub { font-size: 0.92rem; line-height: 1.6; color: var(--sm-ink-soft); margin-bottom: 14px; }
.sm-gate__guest {
  border: 3px dashed rgba(43, 22, 8, 0.3);
  padding: 8px 10px; margin-bottom: 16px;
  background: rgba(246, 231, 200, 0.55);
}
.sm-gate__guest span {
  display: block; font-family: var(--sm-pixel); font-size: 0.3rem;
  letter-spacing: 0.12em; color: var(--sm-ink-soft); margin-bottom: 4px;
}
.sm-gate__guest strong { font-size: 0.98rem; font-weight: 800; }
.sm-gate__hint {
  margin-top: 12px; font-family: var(--sm-pixel); font-size: 0.3rem;
  letter-spacing: 0.08em; color: rgba(43, 22, 8, 0.55);
  animation: smBlink 1.4s steps(2) infinite;
}
@keyframes smBlink { 50% { opacity: 0.25; } }
.sm-gate__back {
  display: inline-block; margin-top: 12px;
  font-size: 0.76rem; color: var(--sm-ink-soft); text-decoration: none;
  border-bottom: 1px solid transparent;
}
.sm-gate__back:hover { border-color: currentColor; }

/* ================= BUTTONS ================= */
.sm-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 17px;
  background: var(--sm-gold);
  color: var(--sm-ink);
  border: 3px solid var(--sm-ink);
  box-shadow: 4px 4px 0 var(--sm-ink);
  font-family: var(--sm-pixel); font-size: 0.46rem; line-height: 1.6;
  letter-spacing: 0.03em; text-decoration: none; cursor: pointer;
  transition: transform 0.12s, box-shadow 0.12s, background 0.18s;
}
.sm-btn:hover, .sm-btn:focus-visible { background: var(--sm-gold-2); transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--sm-ink); }
.sm-btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--sm-ink); }
.sm-btn--ghost { background: var(--sm-cream); }
.sm-btn--ghost:hover { background: #fff; }
.sm-btn--start { background: var(--sm-red); color: #fff; box-shadow: 4px 4px 0 var(--sm-ink); }
.sm-btn--start:hover { background: #ff3b36; color: #fff; }
.sm-btn--full { width: 100%; }
.sm-btn--start span[aria-hidden] { font-size: 0.5rem; }

/* ================= HUD ================= */
.sm-hud {
  position: fixed; top: 0; left: 0; right: 0; z-index: 90;
  height: calc(46px + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) 8px 0;
  display: flex; align-items: center; gap: 0;
  background: #180d06;
  border-bottom: 3px solid #000;
  color: #fff;
  opacity: 0; visibility: hidden; transform: translateY(-100%);
  transition: opacity 0.4s, transform 0.4s var(--sm-ease), visibility 0.4s;
}
body.sm-live .sm-hud { opacity: 1; visibility: visible; transform: none; }
.sm-hud__cell {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 0 4px; min-width: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.14);
}
.sm-hud__cell span {
  font-family: var(--sm-pixel); font-size: 0.28rem; letter-spacing: 0.06em;
  color: #d7b98f; white-space: nowrap;
}
.sm-hud__cell strong {
  font-family: var(--sm-pixel); font-size: 0.5rem; font-weight: 400;
  color: #fff; white-space: nowrap; font-variant-numeric: tabular-nums;
}
.sm-hud__cell strong span { color: var(--sm-gold-2); font-size: inherit; }
.sm-hud__sfx {
  margin-left: 6px; padding: 6px 5px; flex: 0 0 auto;
  background: transparent; border: 2px solid rgba(255, 255, 255, 0.25);
  color: #d7b98f; font-family: var(--sm-pixel); font-size: 0.26rem;
  transition: color 0.2s, border-color 0.2s;
}
.sm-hud__sfx[aria-pressed="true"] { color: var(--sm-gold-2); border-color: var(--sm-gold); }

/* ================= PROGRESS ================= */
.sm-progress {
  position: fixed; left: 0; right: 0; z-index: 85;
  top: calc(46px + env(safe-area-inset-top));
  height: 22px; padding: 0 10px;
  background: rgba(24, 13, 6, 0.55);
  border-bottom: 2px solid rgba(0, 0, 0, 0.5);
  opacity: 0; visibility: hidden;
  transition: opacity 0.4s, visibility 0.4s;
}
body.sm-live .sm-progress { opacity: 1; visibility: visible; }
.sm-progress__track { position: relative; height: 100%; }
.sm-progress__track::before {
  content: ""; position: absolute; left: 0; right: 0; top: 50%;
  height: 4px; transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.18);
}
.sm-progress__fill {
  position: absolute; left: 0; top: 50%; height: 4px;
  transform: translateY(-50%);
  width: 0%; background: var(--sm-gold-2);
  box-shadow: 0 0 8px rgba(255, 217, 94, 0.7);
  transition: width 0.12s linear;
}
.sm-progress__hero {
  position: absolute; top: 50%;
  left: clamp(13px, var(--p, 0%), calc(100% - 13px));
  width: 26px; height: 26px;
  transform: translate(-50%, -58%);
  transition: left 0.12s linear;
  filter: drop-shadow(0 2px 0 rgba(0, 0, 0, 0.45));
}
.sm-progress__hero svg { width: 100%; height: 100%; }
.sm-progress__hero.is-jump { animation: smHeroJump 0.5s var(--sm-ease); }
@keyframes smHeroJump {
  0%, 100% { transform: translate(-50%, -58%); }
  45% { transform: translate(-50%, -130%) rotate(-8deg); }
  70% { transform: translate(-50%, -58%); }
}

/* ================= APP / HERO ================= */
.sm-app {
  opacity: 0; visibility: hidden;
  transition: opacity 0.6s ease, visibility 0.6s;
}
body.sm-live .sm-app { opacity: 1; visibility: visible; }

.sm-hero {
  position: relative;
  min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  padding: calc(112px + env(safe-area-inset-top)) 18px 150px;
  overflow: hidden;
  background: linear-gradient(180deg, #55b4ff 0%, #9ddcff 58%, #e2f6ff 100%);
}
.sm-hero__sky { position: absolute; inset: 0; pointer-events: none; }
.sm-hero__sky .sm-castle { right: 5%; bottom: 74px; opacity: 0.85; }
.sm-hero__content { position: relative; z-index: 2; width: min(760px, 100%); margin: 0 auto; }
.sm-hero__world {
  display: inline-block;
  font-family: var(--sm-pixel); font-size: 0.42rem; letter-spacing: 0.12em;
  color: var(--sm-ink);
  background: var(--sm-cream);
  border: 3px solid var(--sm-ink); padding: 6px 9px;
  box-shadow: 3px 3px 0 rgba(43, 22, 8, 0.25);
}
.sm-hero__title {
  margin: 16px 0 10px;
  font-family: var(--sm-pixel); font-weight: 400;
  font-size: clamp(2rem, 10.5vw, 4.6rem); line-height: 1.18;
  color: var(--sm-cream);
  text-shadow:
    3px 3px 0 var(--sm-ink), -3px 3px 0 var(--sm-ink),
    3px -3px 0 var(--sm-ink), -3px -3px 0 var(--sm-ink),
    7px 7px 0 rgba(43, 22, 8, 0.22);
}
.sm-hero__title span { color: var(--sm-gold-2); }
.sm-hero__date {
  font-family: var(--sm-pixel); font-size: 0.46rem; letter-spacing: 0.1em;
  color: var(--sm-ink); margin-bottom: 18px;
}
.sm-hero__lead {
  max-width: 50ch; padding: 13px 15px;
  background: rgba(255, 248, 231, 0.86);
  border: 3px solid var(--sm-ink);
  box-shadow: 4px 4px 0 rgba(43, 22, 8, 0.18);
  font-size: 0.98rem; line-height: 1.6; color: var(--sm-ink-soft);
  margin-bottom: 18px;
}
.sm-hero__actions { display: flex; flex-wrap: wrap; gap: 10px; }

.sm-levelnav {
  position: relative; z-index: 2;
  width: min(900px, 100%); margin: 28px auto 0;
  display: flex; gap: 6px;
  overflow-x: auto; padding: 4px 2px 8px;
  scrollbar-width: none;
}
.sm-levelnav::-webkit-scrollbar { display: none; }
.sm-levelnav a {
  flex: 0 0 auto;
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 8px;
  font-size: 0.74rem; font-weight: 700; color: var(--sm-ink-soft);
  text-decoration: none;
  background: rgba(255, 248, 231, 0.8);
  border: 2px solid var(--sm-ink);
  transition: background 0.18s, color 0.18s, transform 0.15s;
}
.sm-levelnav a b { font-family: var(--sm-pixel); font-size: 0.3rem; color: var(--sm-red); font-weight: 400; }
.sm-levelnav a:hover { background: var(--sm-cream); transform: translateY(-2px); }
.sm-hero__sky .sm-block--a { left: 78%; top: 30%; }
.sm-hero__sky .sm-block--b { left: 66%; top: 24%; }

/* ================= BLOCKS ================= */
.sm-block {
  position: relative;
  width: 46px; height: 46px; flex: 0 0 auto;
  display: inline-grid; place-items: center;
  font-family: var(--sm-pixel); font-size: 18px; color: #fff;
  background: linear-gradient(180deg, var(--sm-gold-2), var(--sm-gold));
  border: 3px solid var(--sm-ink);
  box-shadow:
    inset 3px 3px 0 rgba(255, 255, 255, 0.55),
    inset -3px -3px 0 rgba(138, 74, 30, 0.35),
    4px 4px 0 rgba(43, 22, 8, 0.22);
}
.sm-block::before, .sm-block::after {
  content: ""; position: absolute; width: 3px; height: 3px;
  background: rgba(43, 22, 8, 0.5);
}
.sm-block::before { left: 4px; top: 4px; box-shadow: 33px 0 0 rgba(43, 22, 8, 0.5), 0 33px 0 rgba(43, 22, 8, 0.5), 33px 33px 0 rgba(43, 22, 8, 0.5); }
.sm-block::after { display: none; }
.sm-block--brick {
  background-color: var(--sm-brick);
  background-image:
    linear-gradient(90deg, rgba(43, 22, 8, 0.3) 2px, transparent 2px),
    linear-gradient(rgba(43, 22, 8, 0.3) 2px, transparent 2px);
  background-size: 21px 11px;
  color: transparent;
}
.sm-block--used { background-color: #a8784c; opacity: 0.85; }
.sm-block--float { position: absolute; animation: smFloat 3.4s ease-in-out infinite; }
.sm-block--float.sm-block--b { animation-delay: 0.7s; }
@keyframes smFloat { 50% { transform: translateY(-7px); } }
.sm-block.is-hit { animation: smBump 0.32s var(--sm-ease); }
@keyframes smBump {
  0%, 100% { transform: translateY(0); }
  40% { transform: translateY(-12px); }
}
.sm-block__coin {
  position: absolute; left: 50%; top: 0; z-index: 3;
  width: 20px; height: 25px; margin-left: -10px;
  pointer-events: none;
  animation: smCoinPop 0.7s var(--sm-ease) forwards;
}
@keyframes smCoinPop {
  0% { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(-70px) scale(1.25); }
}

.sm-blockrow {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px;
  margin: 18px 0 22px;
}
.sm-blockrow__hint {
  flex: 1 1 140px;
  font-family: var(--sm-pixel); font-size: 0.34rem; line-height: 1.8;
  letter-spacing: 0.04em; color: var(--sm-ink-soft);
}
.sm-blockrow__hint span { color: var(--sm-red); }

/* ================= ZONES ================= */
.sm-zone {
  position: relative;
  padding: 54px max(18px, calc((100vw - 900px) / 2)) 58px;
  border-top: 4px solid rgba(43, 22, 8, 0.14);
  background: var(--sm-cream);
}
.sm-zone::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(43, 22, 8, 0.055) 1px, transparent 1px);
  background-size: 16px 16px;
  opacity: 0.5;
}
.sm-zone > * { position: relative; z-index: 1; }
.sm-zone--story { background: #fff3d8; }
.sm-zone--event { background: #dff3ff; }
.sm-zone--countdown { background: #eaf8ff; }
.sm-zone--castle { background: linear-gradient(180deg, #bfe9ff, #e8f8ff); }
.sm-zone--rsvp { background: #fff3d8; }
.sm-zone--clear { background: linear-gradient(180deg, #bfe9ff 0%, #fff8e7 55%); }

.sm-zone__head { max-width: 700px; margin-bottom: 4px; }
.sm-zone__badge {
  display: inline-block;
  font-family: var(--sm-pixel); font-size: 0.32rem; letter-spacing: 0.08em;
  color: #fff; background: var(--sm-red);
  border: 2px solid var(--sm-ink); padding: 4px 6px;
  box-shadow: 2px 2px 0 rgba(43, 22, 8, 0.2);
  margin-bottom: 12px;
}
.sm-zone__head h2 {
  font-family: var(--sm-pixel); font-weight: 400;
  font-size: clamp(1.1rem, 5.4vw, 1.75rem); line-height: 1.5;
  color: var(--sm-ink); margin-bottom: 8px;
}
.sm-zone__head p { font-size: 0.96rem; line-height: 1.6; color: var(--sm-ink-soft); max-width: 58ch; }
.sm-zone__head--light h2 { color: var(--sm-cream); text-shadow: 3px 3px 0 rgba(0, 0, 0, 0.3); }
.sm-zone__head--light p { color: #cbb8e6; }
.sm-zone__head--light .sm-zone__badge { background: var(--sm-gold); color: var(--sm-ink); }

/* ================= PANELS ================= */
.sm-panel {
  margin-top: 4px;
  padding: 16px;
  background: var(--sm-cream);
  border: 4px solid var(--sm-ink);
  box-shadow: var(--sm-shadow);
  animation: smPanel 0.4s var(--sm-ease);
}
@keyframes smPanel {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

/* ================= PLAYER CARDS ================= */
.sm-players { display: grid; gap: 14px; }
.sm-player {
  position: relative;
  border: 3px solid var(--sm-ink);
  background: #fffdf6;
  box-shadow: 4px 4px 0 rgba(43, 22, 8, 0.16);
  overflow: hidden;
}
.sm-player--p1 { border-top: 8px solid var(--sm-rose); }
.sm-player--p2 { border-top: 8px solid var(--sm-blue); }
.sm-player__photo { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--sm-cream-2); }
.sm-player__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 24%; transition: transform 0.7s var(--sm-ease); }
.sm-player:hover .sm-player__photo img { transform: scale(1.035); }
.sm-player__badge {
  position: absolute; left: 8px; top: 8px;
  font-family: var(--sm-pixel); font-size: 0.34rem; letter-spacing: 0.05em;
  color: #fff; background: var(--sm-red); border: 2px solid var(--sm-ink);
  padding: 4px 6px;
}
.sm-player--p2 .sm-player__badge { background: var(--sm-blue); }
.sm-player__lives {
  position: absolute; right: 8px; top: 8px;
  font-family: var(--sm-pixel); font-size: 0.5rem; color: var(--sm-red);
  letter-spacing: 2px; text-shadow: 1px 1px 0 var(--sm-ink);
}
.sm-player__body { padding: 14px 15px 16px; }
.sm-player__name { font-family: var(--sm-pixel); font-size: 0.72rem; line-height: 1.7; color: var(--sm-ink); }
.sm-player__role {
  display: inline-block; margin-top: 4px;
  font-family: var(--sm-pixel); font-size: 0.28rem; letter-spacing: 0.06em;
  color: var(--sm-ink-soft);
}
.sm-player__bio { font-size: 0.92rem; line-height: 1.6; color: var(--sm-ink-soft); margin: 9px 0 10px; }
.sm-player__parents { font-size: 0.84rem; line-height: 1.55; color: #6d4a29; border-top: 2px dashed rgba(43, 22, 8, 0.18); padding-top: 9px; }
.sm-player__ig {
  display: inline-block; margin-top: 8px;
  font-size: 0.82rem; font-weight: 800; color: var(--sm-blue);
  text-decoration: none; border-bottom: 2px solid transparent;
}
.sm-player__ig:hover { border-color: currentColor; }

/* ================= STORY ================= */
.sm-story__map {
  display: flex; gap: 8px;
  overflow-x: auto; padding: 4px 2px 12px;
  scrollbar-width: thin;
}
.sm-story__node {
  flex: 0 0 auto; width: 96px;
  padding: 8px 6px;
  background: #fffdf6; border: 2px solid var(--sm-ink);
  color: var(--sm-ink-soft); text-align: center;
  transition: background 0.18s, transform 0.15s, box-shadow 0.18s;
}
.sm-story__node:hover { transform: translateY(-3px); box-shadow: 3px 3px 0 rgba(43, 22, 8, 0.2); }
.sm-story__node.is-active { background: var(--sm-gold-2); box-shadow: 3px 3px 0 rgba(43, 22, 8, 0.25); }
.sm-story__flag {
  display: block; width: 16px; height: 22px; margin: 0 auto 5px;
  background: var(--sm-green); border: 2px solid var(--sm-ink);
  clip-path: polygon(0 0, 100% 0, 72% 50%, 100% 100%, 0 100%);
  position: relative;
}
.sm-story__flag::before {
  content: ""; position: absolute; left: -5px; top: -4px; width: 3px; height: 30px;
  background: var(--sm-ink);
}
.sm-story__node.is-active .sm-story__flag { background: var(--sm-red); }
.sm-story__code { display: block; font-family: var(--sm-pixel); font-size: 0.28rem; color: var(--sm-red); margin-bottom: 4px; }
.sm-story__title { display: block; font-size: 0.74rem; font-weight: 800; line-height: 1.25; color: var(--sm-ink); }
.sm-story__date { display: block; font-size: 0.64rem; color: #8a6a48; margin-top: 3px; }

.sm-story__detail { margin-top: 4px; border-top: 2px dashed rgba(43, 22, 8, 0.18); padding-top: 14px; }
.sm-story__media {
  position: relative; aspect-ratio: 16 / 9; overflow: hidden;
  border: 3px solid var(--sm-ink); background: var(--sm-cream-2);
  margin-bottom: 12px;
}
.sm-story__media img { width: 100%; height: 100%; object-fit: cover; }
.sm-story__media span {
  position: absolute; left: 8px; bottom: 8px;
  font-family: var(--sm-pixel); font-size: 0.3rem;
  background: var(--sm-cream); border: 2px solid var(--sm-ink);
  padding: 3px 5px;
}
.sm-story__meta {
  font-family: var(--sm-pixel); font-size: 0.3rem; letter-spacing: 0.05em;
  color: var(--sm-red); margin-bottom: 6px;
}
.sm-story__heading { font-size: 1.3rem; font-weight: 800; line-height: 1.2; color: var(--sm-ink); margin-bottom: 6px; }
.sm-story__text { font-size: 0.95rem; line-height: 1.68; color: var(--sm-ink-soft); }
.sm-story__nav { display: flex; gap: 8px; margin-top: 14px; }
.sm-story__nav button {
  flex: 1; padding: 8px 6px;
  background: var(--sm-cream-2); border: 2px solid var(--sm-ink);
  font-family: var(--sm-pixel); font-size: 0.3rem; color: var(--sm-ink);
  transition: background 0.18s, transform 0.12s;
}
.sm-story__nav button:hover { background: var(--sm-gold-2); }
.sm-story__nav button:active { transform: translateY(2px); }

/* ================= EVENTS ================= */
.sm-event__date {
  font-family: var(--sm-pixel); font-size: 0.42rem; letter-spacing: 0.08em;
  color: var(--sm-red); text-align: center; margin-bottom: 14px;
}
.sm-events { display: grid; gap: 12px; }
.sm-event {
  border: 3px solid var(--sm-ink); background: #fffdf6;
  box-shadow: 4px 4px 0 rgba(43, 22, 8, 0.16);
  overflow: hidden;
}
.sm-event__top {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px;
  background-color: var(--sm-brick);
  background-image: linear-gradient(rgba(43, 22, 8, 0.25) 2px, transparent 2px);
  background-size: 100% 11px;
  border-bottom: 3px solid var(--sm-ink);
  color: #fff;
}
.sm-event__icon { font-size: 15px; }
.sm-event__name { font-family: var(--sm-pixel); font-size: 0.42rem; letter-spacing: 0.05em; text-shadow: 2px 2px 0 rgba(43, 22, 8, 0.5); }
.sm-event__body { padding: 13px 14px 15px; }
.sm-event__time {
  display: inline-block;
  font-family: var(--sm-pixel); font-size: 0.34rem; color: var(--sm-ink);
  background: var(--sm-gold-2); border: 2px solid var(--sm-ink);
  padding: 4px 6px; margin-bottom: 9px;
}
.sm-event__venue { font-size: 1.1rem; font-weight: 800; line-height: 1.25; color: var(--sm-ink); }
.sm-event__addr { font-size: 0.86rem; line-height: 1.55; color: var(--sm-ink-soft); margin: 3px 0 12px; }
.sm-event__actions { display: flex; flex-wrap: wrap; gap: 7px; }
.sm-event__actions .sm-btn { padding: 8px 9px; font-size: 0.3rem; border-width: 2px; box-shadow: 3px 3px 0 var(--sm-ink); }

/* ================= COUNTDOWN PIPES ================= */
.sm-pipes {
  position: relative;
  display: flex; justify-content: center; align-items: flex-end; gap: 6px;
  max-width: 620px; margin: 22px auto 0;
  padding: 18px 0 12px;
}
.sm-pipe { position: relative; z-index: 1; width: 23%; max-width: 128px; display: flex; flex-direction: column; align-items: center; }
.sm-pipe__mouth {
  width: 100%; padding: 11px 2px 9px; text-align: center;
  background: #123d18;
  border: 3px solid var(--sm-ink);
  border-bottom: 0;
  box-shadow: inset 0 6px 0 rgba(255, 255, 255, 0.08), inset 0 -4px 0 rgba(0, 0, 0, 0.3);
}
.sm-pipe__mouth strong {
  display: block;
  font-family: var(--sm-pixel); font-weight: 400;
  font-size: clamp(0.85rem, 4.2vw, 1.5rem); line-height: 1.3;
  color: var(--sm-gold-2); font-variant-numeric: tabular-nums;
  text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.5);
}
.sm-pipe__body {
  width: 82%; height: 58px;
  background: linear-gradient(90deg, #2e7d32 0%, #66bb6a 26%, #4caf50 52%, #3d9142 74%, #2e7d32 100%);
  border: 3px solid var(--sm-ink);
  border-top: 0;
  box-shadow: inset 6px 0 0 rgba(255, 255, 255, 0.18), inset -6px 0 0 rgba(0, 0, 0, 0.16);
}
.sm-pipe__label {
  margin-top: 8px;
  font-family: var(--sm-pixel); font-size: 0.3rem; letter-spacing: 0.08em;
  color: var(--sm-ink-soft);
}
.sm-pipes__shadow {
  position: absolute; left: 6%; right: 6%; bottom: 22px; height: 10px; z-index: 0;
  background: rgba(43, 22, 8, 0.12); border-radius: 50%;
}
.sm-count__date {
  text-align: center; margin-top: 8px;
  font-family: var(--sm-pixel); font-size: 0.34rem; line-height: 1.9;
  color: var(--sm-ink-soft);
}
.sm-count__date span[aria-hidden] { color: var(--sm-red); }

/* ================= BONUS ROOM ================= */
.sm-zone--bonus {
  background: var(--sm-purple);
  border-top: 4px solid #000;
  background-image:
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 3px, transparent 3px),
    linear-gradient(rgba(255, 255, 255, 0.03) 3px, transparent 3px);
  background-size: 46px 23px;
}
.sm-bonus {
  border: 4px solid #6b4fa0;
  background: rgba(12, 6, 24, 0.72);
  padding: 14px;
  box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.4), 8px 8px 0 rgba(0, 0, 0, 0.4);
}
.sm-bonus__bar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  border-bottom: 2px dashed rgba(255, 255, 255, 0.18);
  padding-bottom: 10px; margin-bottom: 12px;
}
.sm-bonus__label { font-family: var(--sm-pixel); font-size: 0.3rem; letter-spacing: 0.06em; color: #b9a3e6; }
.sm-bonus__bar strong {
  font-family: var(--sm-pixel); font-size: 0.52rem; color: var(--sm-gold-2);
  display: flex; align-items: center; gap: 6px;
}
.sm-bonus__bar strong::before {
  content: ""; width: 13px; height: 16px; border-radius: 50%;
  background: linear-gradient(90deg, #e09a17, #ffd95e 45%, #fff3b0 55%, #ffd95e 65%, #e09a17);
  border: 1px solid #8a5a0a;
}
.sm-gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.sm-shot {
  position: relative; padding: 0; border: 3px solid #6b4fa0;
  background: #0b0518; overflow: hidden;
  transition: border-color 0.2s, transform 0.25s var(--sm-ease);
}
.sm-shot:hover { border-color: var(--sm-gold); transform: translateY(-3px); }
.sm-shot img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; filter: saturate(0.92) brightness(0.95); transition: transform 0.6s var(--sm-ease), filter 0.3s; }
.sm-shot:hover img { transform: scale(1.04); filter: saturate(1.05) brightness(1); }
.sm-shot__coin {
  position: absolute; right: 7px; top: 7px; z-index: 2;
  width: 18px; height: 22px; border-radius: 50%;
  background: linear-gradient(90deg, #e09a17, #ffd95e 42%, #fff3b0 54%, #ffd95e 66%, #e09a17);
  border: 2px solid #8a5a0a;
  box-shadow: 0 0 8px rgba(255, 217, 94, 0.55);
  animation: smCoinSpin 2.2s ease-in-out infinite;
}
.sm-shot__cap {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 16px 7px 5px;
  font-size: 0.72rem; font-weight: 700; color: #fff;
  background: linear-gradient(to top, rgba(5, 2, 12, 0.9), transparent);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  opacity: 0; transition: opacity 0.2s;
}
.sm-shot:hover .sm-shot__cap, .sm-shot:focus-visible .sm-shot__cap { opacity: 1; }
.sm-shot.is-collected { border-color: #3c2b5e; }
.sm-shot.is-collected img { filter: saturate(0.5) brightness(0.7); }
.sm-shot.is-collected .sm-shot__coin { display: none; }
.sm-shot.is-collected::after {
  content: "✓"; position: absolute; right: 8px; top: 6px; z-index: 2;
  font-family: var(--sm-pixel); font-size: 0.5rem; color: var(--sm-gold-2);
  text-shadow: 2px 2px 0 #000;
}
.sm-bonus__clear {
  margin-top: 12px; text-align: center;
  font-family: var(--sm-pixel); font-size: 0.4rem; line-height: 1.9;
  color: var(--sm-gold-2);
  animation: smBlink 1.2s steps(2) infinite;
}
.sm-bonus__hint { margin-top: 11px; font-size: 0.78rem; color: #b9a3e6; text-align: center; }

/* ================= CASTLE SCENE ================= */
.sm-castlescene {
  position: relative; height: 300px; overflow: hidden;
  border: 4px solid var(--sm-ink);
  background: linear-gradient(180deg, #7fcaff, #c9eeff);
  box-shadow: var(--sm-shadow);
}
.sm-castlescene__sky { position: absolute; inset: 0; pointer-events: none; }
.sm-castlescene__sky .sm-cloud--d { top: 14%; right: 22%; }
.sm-castlescene__sky .sm-hill--c { bottom: 58px; left: -20px; width: 260px; height: 120px; opacity: 0.7; }
.sm-castlescene .sm-castle { right: 8%; bottom: 58px; width: 150px; height: 132px; }
.sm-castlescene__ground {
  position: absolute; left: 0; right: 0; bottom: 0; height: 58px;
  background-color: var(--sm-brick);
  background-image:
    linear-gradient(90deg, rgba(43, 22, 8, 0.32) 3px, transparent 3px),
    linear-gradient(rgba(43, 22, 8, 0.32) 3px, transparent 3px);
  background-size: 42px 21px;
  border-top: 4px solid var(--sm-ink);
}
.sm-castlescene__path {
  position: absolute; left: 8%; right: 26%; bottom: 50px; height: 14px;
  background: #e8c88f; border-top: 3px dashed rgba(43, 22, 8, 0.35);
  transform: skewY(-1.5deg);
}
.sm-castlescene__hint {
  position: absolute; left: 12px; bottom: 10px;
  font-family: var(--sm-pixel); font-size: 0.26rem; letter-spacing: 0.08em;
  color: #fff; text-shadow: 1px 1px 0 var(--sm-ink);
}
.sm-flagpole {
  position: absolute; left: 16%; bottom: 58px;
  width: 60px; height: 200px;
  background: none; border: 0; padding: 0;
  z-index: 2; cursor: pointer;
}
.sm-flagpole__pole {
  position: absolute; left: 50%; bottom: 0; width: 6px; height: 100%;
  transform: translateX(-50%);
  background: linear-gradient(90deg, #cfd8dc, #fff, #90a4ae);
  border: 2px solid var(--sm-ink);
}
.sm-flagpole__base {
  position: absolute; left: 50%; bottom: 0; width: 34px; height: 16px;
  transform: translateX(-50%);
  background: var(--sm-green);
  border: 3px solid var(--sm-ink);
  box-shadow: inset 0 4px 0 rgba(255, 255, 255, 0.2);
}
.sm-flagpole__flag {
  position: absolute; left: 50%; top: 6px;
  width: 44px; height: 30px;
  margin-left: 1px;
  display: grid; place-items: center;
  background: var(--sm-red); border: 3px solid var(--sm-ink);
  color: #fff; font-size: 13px;
  clip-path: polygon(0 0, 100% 0, 78% 50%, 100% 100%, 0 100%);
  transition: transform 0.9s var(--sm-ease);
  transform-origin: left center;
}
.sm-flagpole.is-down .sm-flagpole__flag { transform: translateY(120px); }
.sm-flagpole:hover .sm-flagpole__flag { filter: brightness(1.08); }

.sm-location {
  margin-top: 14px;
  padding: 16px;
  background: #fffdf6;
  border: 4px solid var(--sm-ink);
  box-shadow: var(--sm-shadow);
}
.sm-location__tag { font-family: var(--sm-pixel); font-size: 0.32rem; letter-spacing: 0.05em; color: var(--sm-red); margin-bottom: 6px; }
.sm-location__venue { font-size: 1.25rem; font-weight: 800; line-height: 1.25; }
.sm-location__address { font-size: 0.9rem; color: var(--sm-ink-soft); margin: 3px 0 13px; }
.sm-location__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.sm-location__actions .sm-btn { padding: 9px 11px; font-size: 0.32rem; }
.sm-location__note { font-size: 0.8rem; line-height: 1.55; color: #7a5a38; margin-top: 11px; }

/* ================= RSVP ================= */
.sm-formwrap {
  max-width: 620px; margin: 0 auto;
  border: 4px solid var(--sm-ink);
  background: #fffdf6;
  box-shadow: 7px 7px 0 rgba(43, 22, 8, 0.2);
  overflow: hidden;
}
.sm-formwrap__top {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 14px;
  background: var(--sm-ink); color: var(--sm-cream);
  border-bottom: 4px solid var(--sm-ink);
}
.sm-formwrap__icon {
  width: 34px; height: 34px; display: grid; place-items: center;
  font-size: 18px; background: var(--sm-red); border: 2px solid var(--sm-cream);
}
.sm-formwrap__kicker { font-family: var(--sm-pixel); font-size: 0.28rem; letter-spacing: 0.08em; color: var(--sm-gold-2); }
.sm-formwrap__title { font-size: 0.95rem; font-weight: 800; line-height: 1.3; }
.sm-formwrap__lives { margin-left: auto; font-family: var(--sm-pixel); font-size: 0.5rem; color: var(--sm-red); letter-spacing: 2px; }
.sm-form { padding: 16px 15px 18px; display: grid; gap: 12px; }
.sm-field { display: grid; gap: 5px; }
.sm-field > span { font-family: var(--sm-pixel); font-size: 0.3rem; letter-spacing: 0.04em; color: var(--sm-ink-soft); }
.sm-field input, .sm-field select, .sm-field textarea {
  width: 100%; padding: 10px 11px;
  background: #fff;
  border: 3px solid var(--sm-ink);
  border-radius: 0;
  font-family: var(--sm-body); font-size: 0.98rem; color: var(--sm-ink);
  outline: 0; -webkit-appearance: none; appearance: none;
  transition: box-shadow 0.18s, background 0.18s;
}
.sm-field select {
  background-image: linear-gradient(45deg, transparent 50%, var(--sm-ink) 50%), linear-gradient(135deg, var(--sm-ink) 50%, transparent 50%);
  background-position: calc(100% - 17px) 52%, calc(100% - 11px) 52%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}
.sm-field input::placeholder, .sm-field textarea::placeholder { color: #a98a68; }
.sm-field input:focus, .sm-field select:focus, .sm-field textarea:focus {
  background: #fffef9; box-shadow: 0 0 0 3px var(--sm-gold);
}
.sm-field textarea { resize: vertical; min-height: 80px; line-height: 1.55; }
.sm-fieldrow { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sm-form__hint { font-size: 0.78rem; line-height: 1.5; color: #7a5a38; text-align: center; }
.sm-form__done {
  font-size: 0.88rem; font-weight: 700; color: #1f6b2d;
  background: #e5f7e6; border: 2px solid #4caf50; padding: 9px 10px;
}

/* ================= CLEAR / CLOSING ================= */
.sm-clear { max-width: 680px; margin: 0 auto; text-align: center; padding: 16px 0 8px; }
.sm-clear__banner {
  display: inline-block;
  font-family: var(--sm-pixel); font-size: clamp(0.85rem, 4.6vw, 1.35rem);
  color: #fff; background: var(--sm-red);
  border: 4px solid var(--sm-ink); padding: 10px 14px;
  box-shadow: 5px 5px 0 rgba(43, 22, 8, 0.3);
  transform: rotate(-2deg);
  margin-bottom: 20px;
}
.sm-clear__flag {
  width: 46px; height: 46px; margin: 0 auto 14px;
  display: grid; place-items: center;
  background: var(--sm-gold); border: 3px solid var(--sm-ink);
  box-shadow: 4px 4px 0 rgba(43, 22, 8, 0.25);
  color: var(--sm-red); font-size: 20px;
}
.sm-clear__title {
  font-family: var(--sm-pixel); font-weight: 400;
  font-size: clamp(1.05rem, 5.2vw, 1.8rem); line-height: 1.7;
  color: var(--sm-ink); text-shadow: 3px 3px 0 var(--sm-gold-2);
  margin-bottom: 18px;
}
.sm-clear__quote {
  font-size: 1.02rem; line-height: 1.75; color: var(--sm-ink-soft);
  border-top: 3px dashed rgba(43, 22, 8, 0.2); border-bottom: 3px dashed rgba(43, 22, 8, 0.2);
  padding: 16px 6px; margin-bottom: 16px;
}
.sm-clear__message { max-width: 54ch; margin: 0 auto 8px; font-size: 0.92rem; line-height: 1.7; color: var(--sm-ink-soft); }
.sm-clear__thanks { font-size: 0.86rem; color: #7a5a38; }
.sm-clear__hash {
  font-family: var(--sm-pixel); font-size: clamp(0.7rem, 3.6vw, 1rem);
  color: var(--sm-red); margin: 18px 0 12px;
}
.sm-clear__score {
  display: inline-flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px;
  padding: 9px 12px; margin-bottom: 18px;
  background: var(--sm-ink); color: var(--sm-cream);
  border: 3px solid var(--sm-ink); box-shadow: 4px 4px 0 rgba(43, 22, 8, 0.2);
  font-family: var(--sm-pixel); font-size: 0.32rem; letter-spacing: 0.04em;
}
.sm-clear__score strong { color: var(--sm-gold-2); font-weight: 400; }
.sm-clear__credit { margin-top: 16px; font-size: 0.76rem; color: #7a5a38; }
.sm-footer {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 5px;
  padding: 20px max(18px, calc((100vw - 900px) / 2)) calc(22px + env(safe-area-inset-bottom));
  background: var(--sm-ink); color: #c8ab86;
  font-size: 0.76rem;
  border-top: 4px solid #000;
}
.sm-footer strong { color: var(--sm-cream); font-weight: 700; }

/* ================= JUMP / TOAST ================= */
.sm-jump {
  position: fixed; right: 14px; bottom: calc(16px + env(safe-area-inset-bottom));
  z-index: 70;
  width: 62px; height: 62px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  background: var(--sm-red); color: #fff;
  border: 3px solid var(--sm-ink);
  box-shadow: 4px 4px 0 var(--sm-ink);
  font-family: var(--sm-pixel); font-size: 0.3rem; letter-spacing: 0.04em;
  opacity: 0; visibility: hidden; transform: translateY(14px);
  transition: opacity 0.4s, visibility 0.4s, transform 0.3s var(--sm-ease);
}
body.sm-live .sm-jump { opacity: 1; visibility: visible; transform: none; }
.sm-jump span { font-size: 0.7rem; line-height: 1; }
.sm-jump:hover { background: #ff3b36; }
.sm-jump:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--sm-ink); }
.sm-jump.is-jump { animation: smJump 0.5s var(--sm-ease); }
@keyframes smJump {
  0%, 100% { transform: translateY(0); }
  40% { transform: translateY(-16px) rotate(-6deg); }
}
.sm-toast {
  position: fixed; left: 50%; bottom: calc(88px + env(safe-area-inset-bottom));
  z-index: 210; transform: translateX(-50%) translateY(8px);
  padding: 9px 13px;
  background: var(--sm-ink); color: var(--sm-cream);
  border: 3px solid var(--sm-gold);
  font-family: var(--sm-pixel); font-size: 0.32rem; line-height: 1.8; text-align: center;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.35);
  opacity: 0; transition: opacity 0.2s, transform 0.25s var(--sm-ease);
  pointer-events: none; max-width: calc(100vw - 30px);
}
.sm-toast.is-on { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ================= REVEAL ================= */
[data-reveal] { transform: translateY(14px); transition-duration: 0.7s; }

/* ================= RESPONSIVE ================= */
@media (min-width: 520px) {
  .sm-hud__cell span { font-size: 0.32rem; }
  .sm-hud__cell strong { font-size: 0.58rem; }
  .sm-hud__sfx { font-size: 0.3rem; padding: 7px 8px; }
  .sm-gate__card { padding: 30px 28px 24px; }
  .sm-players { grid-template-columns: 1fr 1fr; }
  .sm-gallery { grid-template-columns: repeat(3, 1fr); }
  .sm-events { grid-template-columns: 1fr 1fr; }
  .sm-story__media { max-width: 460px; }
}

@media (min-width: 700px) {
  .sm-zone { padding-top: 64px; padding-bottom: 68px; }
  .sm-zone__head { margin-bottom: 8px; }
  .sm-gallery { grid-template-columns: repeat(4, 1fr); }
  .sm-bonus { padding: 18px; }
  .sm-block { width: 50px; height: 50px; }
  .sm-story__map { gap: 10px; }
  .sm-story__node { width: 108px; }
  .sm-story__detail { display: grid; grid-template-columns: 300px 1fr; gap: 18px; align-items: start; }
  .sm-story__media { margin-bottom: 0; }
  .sm-story__nav { grid-column: 2; }
  .sm-castlescene { height: 360px; }
  .sm-hero { padding-top: calc(124px + env(safe-area-inset-top)); }
  .sm-pipes { gap: 12px; }
  .sm-pipe__body { height: 74px; }
  .sm-jump { right: 22px; bottom: calc(22px + env(safe-area-inset-bottom)); width: 68px; height: 68px; }
}

@media (min-width: 960px) {
  .sm-hero__content { max-width: 800px; }
  .sm-levelnav { justify-content: center; }
  .sm-hero__lead { font-size: 1.02rem; }
  .sm-location { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 14px; }
  .sm-location__tag, .sm-location__venue, .sm-location__address { grid-column: 1; }
  .sm-location__actions { grid-column: 2; grid-row: 1 / span 3; align-self: center; }
  .sm-location__note { grid-column: 1 / -1; }
}

@media (max-width: 480px) {
  .sm-jump { width: 48px; height: 48px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); font-size: 0.22rem; opacity: 0.92; }
  .sm-jump span { font-size: 0.52rem; }
}

@media (max-width: 380px) {
  .sm-zone { padding-left: 15px; padding-right: 15px; }
  .sm-hud__cell span { font-size: 0.24rem; }
  .sm-hud__cell strong { font-size: 0.42rem; }
  .sm-hud__sfx { font-size: 0.22rem; padding: 5px 4px; margin-left: 3px; }
  .sm-block { width: 40px; height: 40px; font-size: 15px; }
  .sm-block::before { box-shadow: 27px 0 0 rgba(43, 22, 8, 0.5), 0 27px 0 rgba(43, 22, 8, 0.5), 27px 27px 0 rgba(43, 22, 8, 0.5); }
  .sm-gate__title { font-size: 1.5rem; }
  .sm-gate__card { padding: 20px 15px 16px; }
  .sm-fieldrow { grid-template-columns: 1fr; }
  .sm-castlescene { height: 260px; }
  .sm-flagpole { height: 170px; }
  .sm-castlescene .sm-castle { width: 120px; height: 108px; }
  .sm-clear__banner { font-size: 0.72rem; }
}

@media (max-height: 660px) {
  .sm-gate { padding-top: 14px; padding-bottom: 82px; }
  .sm-gate__sub { display: none; }
  .sm-gate__title { font-size: clamp(1.35rem, 8vw, 2.2rem); }
  .sm-gate__hint { margin-top: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .sm-cloud, .sm-coin, .sm-coin--float, .sm-block--float, .sm-gate__hint,
  .sm-bonus__clear, .sm-progress__hero.is-jump, .sm-jump.is-jump { animation: none !important; }
  .sm-gate__card, .sm-panel { animation: none; }
  .sm-flagpole__flag { transition: none; }
  .sm-shot:hover, .sm-story__node:hover { transform: none; }
}
