[hidden] { display: none !important; }
@font-face { font-family: "Galmuri11"; src: url("/fonts/Galmuri11.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Galmuri11"; font-weight: 700; src: url("/fonts/Galmuri11-Bold.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Galmuri14"; src: url("/fonts/Galmuri14.woff2") format("woff2"); font-display: swap; }

:root {
  --sky: #bfe7f2; --sky2: #e6f7fb;
  --grass: #6cc24a; --grass-d: #4a9a32; --grass-l: #9be07a;
  --dirt: #9b6a3c; --dirt-d: #6e4626;
  --leaf: #f28c28; --leaf-d: #d9602a; --maple: #d9442b;
  --cream: #fff6e3; --paper: #fffaf0;
  --ink: #2a2118; --ink-2: #5b4c3d; --line: #2a2118;
  --sign: #2e9e4f; --sign-d: #1f7a3a;
  --red: #e23b3b; --red-d: #b52525;
  --gold: #ffc93c; --gold-d: #e0a01a;
  --blue: #3d7be0; --navy: #2b2e5a;
  --pixel: "Galmuri11", "Pretendard Variable", system-ui, sans-serif;
  --pixel-big: "Galmuri14", "Galmuri11", "Pretendard Variable", sans-serif;
  --body: "Pretendard Variable", "Pretendard", system-ui, -apple-system, sans-serif;
  --r: 0px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; color: var(--ink); font-family: var(--body); font-size: 15px; line-height: 1.55;
  background: linear-gradient(180deg, var(--sky) 0%, var(--sky2) 55%, #f4fbf0 100%);
  word-break: keep-all; overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }

/* pixel frame utility: chunky border + hard shadow */
.panel, .ticket, .timer, .stats li, .btn, .chip, .badge, .sns, .combo__list, .tabbar, .treat, .toast, .machine, .pp, .ep, .board li, .live {
  border: 3px solid var(--line);
}

/* background clouds */
.sky { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.cloud { position: absolute; width: 120px; height: 32px; background: #fff; box-shadow: 24px -16px 0 #fff, 56px -16px 0 #fff, 80px 0 0 #fff; opacity: .9; animation: drift 60s linear infinite; }
.c1 { top: 8%; left: -20%; } .c2 { top: 30%; left: -40%; animation-duration: 85s; transform: scale(.7); } .c3 { top: 62%; left: -30%; animation-duration: 110s; transform: scale(1.2); opacity: .7; }
@keyframes drift { to { left: 120%; } }

.app { max-width: 480px; margin: 0 auto; padding: 0 12px calc(110px + var(--safe-b)); position: relative; }

/* top bar */
.top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 2px; background: linear-gradient(var(--sky) 70%, rgba(191,231,242,0)); }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; }
.brand img { image-rendering: pixelated; border: 2px solid var(--line); background: var(--cream); }
.brand span { display: flex; flex-direction: column; line-height: 1.1; }
.brand b { font: 700 17px var(--pixel); letter-spacing: -.02em; }
.brand small { font: 11px var(--pixel); color: var(--ink-2); }
.top__links { display: flex; gap: 6px; }
.sns { display: grid; place-items: center; min-width: 38px; height: 32px; padding: 0 8px; font: 700 11px var(--pixel); text-decoration: none; background: var(--cream); box-shadow: 0 3px 0 var(--line); cursor: pointer; }
.sns--ig { background: #ffd1e6; } .sns--yt { background: #ffd7d0; }
.sns:active { transform: translateY(3px); box-shadow: none; }

/* hero */
.hero { padding-top: 4px; }
.hero__stage { position: relative; height: 340px; margin: 0 -12px; }
#island { width: 100%; height: 100%; display: block; touch-action: pan-y; cursor: grab; }
#island:active { cursor: grabbing; }
.hero__fallback { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.sign { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); padding: 6px 14px; background: var(--red); color: #fff; font: 700 15px var(--pixel); border: 3px solid var(--line); box-shadow: 0 4px 0 var(--line); white-space: nowrap; animation: bob 2.6s ease-in-out infinite; }
.sign::after { content: ""; position: absolute; left: 50%; bottom: -15px; width: 6px; height: 12px; background: var(--dirt-d); transform: translateX(-50%); }
@keyframes bob { 50% { transform: translate(-50%, -4px); } }
.hero__tip { position: absolute; bottom: 6px; left: 50%; transform: translateX(-50%); white-space: nowrap; padding: 3px 8px; background: rgba(255,251,235,.85); text-align: center; margin: 0; pointer-events: none; font: 11px var(--pixel); color: var(--ink-2); }
.hero__copy { text-align: center; padding: 6px 4px 0; }
.chip { display: inline-block; padding: 4px 10px; font: 700 12px var(--pixel); background: var(--cream); box-shadow: 0 3px 0 var(--line); }
.chip--green { background: var(--sign); color: #fff; }
h1 { margin: 14px 0 8px; font: 28px/1.25 var(--pixel-big); letter-spacing: -.02em; }
h1 em { font-style: normal; color: var(--red); }
.lead { margin: 0 auto; max-width: 30em; color: var(--ink-2); }
.lead b { color: var(--ink); }

.timer { margin: 18px 0 10px; display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; align-items: center; padding: 12px 14px; background: var(--navy); color: #fff; box-shadow: 0 4px 0 var(--line); }
.timer__label { font: 12px var(--pixel); opacity: .8; }
.timer__clock { grid-row: span 2; font: 26px var(--pixel-big); color: var(--gold); letter-spacing: .04em; font-variant-numeric: tabular-nums; }
.timer__round { font: 11px var(--pixel); opacity: .6; }
.stats { list-style: none; padding: 0; margin: 0 0 22px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stats li { background: var(--paper); padding: 8px 4px; text-align: center; box-shadow: 0 3px 0 var(--line); }
.stats b { display: block; font: 20px var(--pixel-big); }
.stats span { font: 11px var(--pixel); color: var(--ink-2); }

/* panels */
.panel { position: relative; margin: 0 0 22px; padding: 18px 16px 20px; background: var(--paper); box-shadow: 0 6px 0 var(--line); scroll-margin-top: 64px; }
.panel__head { margin-bottom: 14px; }
.panel h2 { margin: 10px 0 6px; font: 21px/1.3 var(--pixel-big); letter-spacing: -.02em; }
.panel__head p { margin: 0; color: var(--ink-2); font-size: 14px; }
.badge { display: inline-block; padding: 3px 9px; font: 700 12px var(--pixel); background: var(--sign); color: #fff; }
.badge--red { background: var(--red); } .badge--gold { background: var(--gold); color: var(--ink); } .badge--green { background: var(--grass-d); }
.badge--blue { background: var(--blue); } .badge--navy { background: var(--navy); }
.empty { text-align: center; color: var(--ink-2); font: 13px var(--pixel); margin: 16px 0 4px; }

/* form */
.counter { background: linear-gradient(var(--paper), var(--paper)) padding-box; }
.counter::before { content: ""; position: absolute; left: -3px; right: -3px; top: -14px; height: 14px; background: repeating-linear-gradient(90deg, var(--red) 0 18px, var(--cream) 18px 36px); border: 3px solid var(--line); border-bottom: 0; }
.form { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; border: 0; padding: 0; margin: 0; min-width: 0; }
.field > span, .field legend { font: 700 13px var(--pixel); padding: 0; }
.field i { font-style: normal; font-weight: 400; color: var(--ink-2); }
input:not([type=radio]), textarea {
  width: 100%; padding: 11px 12px; background: #fff; border: 3px solid var(--line); border-radius: 0; outline: none; font-size: 16px;
  box-shadow: inset 0 3px 0 rgba(42,33,24,.08);
}
input:focus, textarea:focus { border-color: var(--blue); }
textarea { resize: vertical; }
.hint { font: 11px var(--pixel); color: var(--ink-2); }
.hint.is-warn { color: var(--red-d); }
.hint.is-ok { color: var(--sign-d); }
.combo { position: relative; }
.combo__list { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 4px); margin: 0; padding: 4px; list-style: none; background: #fff; box-shadow: 0 4px 0 var(--line); max-height: 260px; overflow: auto; }
.combo__list li { display: flex; justify-content: space-between; gap: 8px; padding: 9px 10px; cursor: pointer; font-size: 15px; }
.combo__list li small { font: 11px var(--pixel); color: var(--ink-2); }
.combo__list li[aria-selected="true"], .combo__list li:hover { background: var(--sky2); }
.combo__list li .v { font: 700 10px var(--pixel); color: #fff; background: var(--sign); padding: 2px 5px; }
.row2 { display: grid; gap: 14px; }
.seg { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; }
.seg span { display: block; text-align: center; padding: 8px 0; font: 700 12px var(--pixel); background: #fff; border: 3px solid var(--line); cursor: pointer; }
.seg input:checked + span { background: var(--ink); color: var(--gold); }
.seg input:focus-visible + span { outline: 3px solid var(--blue); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 13px 18px; font: 700 15px var(--pixel); text-decoration: none; cursor: pointer; background: var(--cream); box-shadow: 0 5px 0 var(--line); transition: transform .08s; }
.btn:active { transform: translateY(5px); box-shadow: none; }
.btn:disabled { opacity: .6; cursor: wait; }
.btn--stamp { width: 100%; background: var(--red); color: #fff; font-size: 17px; padding: 15px; }
.btn--gold { background: var(--gold); }
.btn--ig { background: #ffd1e6; } .btn--yt { background: #ffd7d0; }
.fineprint { margin: 0; text-align: center; font: 11px var(--pixel); color: var(--ink-2); }

/* ticket */
.ticket { margin-top: 18px; padding: 16px; background: var(--cream); position: relative; box-shadow: 0 5px 0 var(--line); animation: print .5s steps(6) both; }
.ticket::before, .ticket::after { content: ""; position: absolute; top: 50%; width: 14px; height: 14px; background: var(--paper); border: 3px solid var(--line); transform: translateY(-50%); }
.ticket::before { left: -10px; border-left: 0; } .ticket::after { right: -10px; border-right: 0; }
@keyframes print { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0 0); } }
.ticket__top { display: flex; justify-content: space-between; font: 11px var(--pixel); color: var(--ink-2); border-bottom: 3px dashed var(--line); padding-bottom: 8px; margin-bottom: 10px; }
.ticket__place { font: 26px var(--pixel-big); margin: 0; }
.ticket__msg { margin: 6px 0 12px; }
.ticket__row { display: flex; gap: 8px; flex-wrap: wrap; }
.ticket__stamp { position: absolute; right: 14px; top: 34px; width: 74px; height: 74px; border: 3px solid var(--red); color: var(--red); border-radius: 50%; display: grid; place-items: center; text-align: center; font: 700 12px/1.1 var(--pixel); transform: rotate(-14deg); opacity: .85; animation: stamp .35s .4s both cubic-bezier(.2,1.6,.4,1); }
.ticket__stamp--visited { border-color: var(--sign); color: var(--sign); }
@keyframes stamp { from { transform: rotate(-14deg) scale(2.2); opacity: 0; } }

/* live ticker */
.live { display: flex; align-items: center; gap: 8px; margin: 0 0 22px; padding: 8px 10px; background: var(--ink); color: #fff; overflow: hidden; box-shadow: 0 4px 0 rgba(42,33,24,.35); }
.live__dot { width: 8px; height: 8px; background: var(--red); flex: none; animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: .2; } }
.live__label { font: 700 12px var(--pixel); color: var(--gold); flex: none; }
.live__track { overflow: hidden; flex: 1; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.live__track ul { display: flex; gap: 22px; margin: 0; padding: 0; list-style: none; width: max-content; animation: ticker 40s linear infinite; font: 12px var(--pixel); white-space: nowrap; }
.live__track b { color: var(--gold); font-weight: 700; }
@keyframes ticker { to { transform: translateX(-50%); } }

/* board */
.board { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.board li { display: grid; grid-template-columns: 34px 1fr auto; gap: 4px 10px; align-items: center; padding: 10px; background: #fff; position: relative; overflow: hidden; }
.board li.is-top { background: #fffbe6; }
.board li.is-top::after { content: "추첨 후보"; position: absolute; right: 0; top: 0; font: 700 9px var(--pixel); background: var(--gold); padding: 1px 5px; border-left: 3px solid var(--line); border-bottom: 3px solid var(--line); }
.board .rk { font: 18px var(--pixel-big); text-align: center; }
.board li:nth-child(1) .rk { color: var(--red); } .board li:nth-child(2) .rk { color: var(--leaf-d); } .board li:nth-child(3) .rk { color: var(--gold-d); }
.board .nm { font: 700 16px var(--pixel); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.board .nm small { font: 11px var(--pixel); color: var(--ink-2); font-weight: 400; }
.board .nm .v { font: 700 10px var(--pixel); color: #fff; background: var(--sign); padding: 1px 5px; }
.board .bar { grid-column: 2; height: 10px; background: var(--sky2); border: 2px solid var(--line); display: flex; }
.board .bar i { display: block; height: 100%; }
.board .bar .ig { background: #ff8fc2; } .board .bar .yt { background: #ff6b5a; } .board .bar .tt { background: #4dd0e1; } .board .bar .etc { background: #b9a88f; }
.board .plus { grid-row: span 2; display: grid; place-items: center; min-width: 54px; padding: 6px 8px; font: 700 13px var(--pixel); background: var(--cream); border: 3px solid var(--line); box-shadow: 0 3px 0 var(--line); cursor: pointer; }
.board .plus b { font: 16px var(--pixel-big); display: block; }
.board .plus.is-on { background: var(--sign); color: #fff; }
.board .plus:active { transform: translateY(3px); box-shadow: none; }
.board-legend { display: flex; gap: 10px; justify-content: flex-end; margin-top: 8px; font: 10px var(--pixel); color: var(--ink-2); }
.board-legend i { display: inline-block; width: 8px; height: 8px; margin-right: 3px; border: 1px solid var(--line); }

/* draw machine */
.draw { background: #fff7d6; }
.machine { position: relative; background: var(--navy); padding: 10px; box-shadow: 0 5px 0 var(--line); }
#drawCanvas { width: 100%; height: auto; display: block; image-rendering: pixelated; }
.machine__result { position: absolute; left: 10px; right: 10px; bottom: 10px; text-align: center; font: 700 15px var(--pixel); color: #fff; text-shadow: 0 2px 0 var(--line); }
.machine__result b { color: var(--gold); font: 24px var(--pixel-big); display: block; }
.draw__actions { margin: 16px 0 6px; display: grid; }
.history { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 6px; }
.history li { display: flex; justify-content: space-between; gap: 8px; align-items: center; padding: 8px 10px; background: #fff; border: 3px solid var(--line); font: 12px var(--pixel); }
.history li b { font: 15px var(--pixel-big); }
.history code { font: 10px ui-monospace, monospace; color: var(--ink-2); }
.how { margin-top: 12px; font-size: 13px; color: var(--ink-2); }
.how summary { cursor: pointer; font: 700 12px var(--pixel); color: var(--ink); }

/* map */
.mapwrap { position: relative; background: #a9dcef; border: 3px solid var(--line); box-shadow: 0 5px 0 var(--line); }
#mapCanvas { width: 100%; display: block; image-rendering: pixelated; cursor: zoom-in; }
.mapwrap { overflow: hidden; }
.mapreset { position: absolute; right: 8px; top: 8px; z-index: 6; padding: 6px 10px; font: 700 12px var(--pixel); background: var(--cream); border: 3px solid var(--line); box-shadow: 0 3px 0 var(--line); cursor: pointer; }
.maphint { margin: 10px 2px 0; font-size: 12px; color: var(--ink-2); }
.mappick { margin-top: 10px; display: grid; gap: 6px; }
.mappick p { margin: 0; font: 700 12px var(--pixel); }
.mappick button { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; text-align: left; padding: 10px 12px; background: #fff; border: 3px solid var(--line); box-shadow: 0 3px 0 var(--line); font: inherit; color: var(--ink); cursor: pointer; }
.mappick b { font: 700 15px var(--pixel); }
.mappick small { color: var(--ink-2); }
.mappick span { font: 700 12px var(--pixel); color: var(--red); }
.maptip { position: absolute; z-index: 5; pointer-events: none; padding: 6px 9px; background: var(--ink); color: #fff; font: 12px var(--pixel); white-space: nowrap; transform: translate(-50%, calc(-100% - 10px)); }
.maptip b { color: var(--gold); }
.legend { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 12px; margin: 12px 0 0; padding: 0; font: 11px var(--pixel); color: var(--ink-2); }
.lg { display: inline-block; width: 12px; height: 12px; border: 2px solid var(--line); margin-right: 4px; vertical-align: -2px; }
.lg--0 { background: var(--grass-l); } .lg--1 { background: #ffd36b; } .lg--2 { background: var(--leaf); } .lg--3 { background: var(--maple); }
.lg--flag { background: var(--sign); }

/* episodes */
.ep { background: #fff; box-shadow: 0 5px 0 var(--line); }
.ep__cover { position: relative; aspect-ratio: 540/610; overflow: hidden; background: var(--sky); border-bottom: 3px solid var(--line); }
.ep__cover img { width: 100%; height: 100%; object-fit: cover; }
.ep__no { position: absolute; left: 10px; top: 10px; padding: 4px 9px; background: var(--sign); color: #fff; font: 700 13px var(--pixel); border: 3px solid var(--line); }
.ep__status { position: absolute; right: 10px; top: 10px; padding: 4px 9px; background: var(--gold); font: 700 12px var(--pixel); border: 3px solid var(--line); }
.ep__body { padding: 14px; }
.ep__body h3 { margin: 0 0 4px; font: 22px var(--pixel-big); }
.ep__sub { margin: 0 0 8px; font: 12px var(--pixel); color: var(--ink-2); }
.ep__body > p { margin: 0 0 12px; }
.spots { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; counter-reset: s; }
.spots li { display: grid; grid-template-columns: 64px 1fr; gap: 10px; padding: 10px 0; border-top: 3px dashed rgba(42,33,24,.25); counter-increment: s; }
.spots img, .spots .noimg { width: 64px; height: 64px; object-fit: cover; border: 3px solid var(--line); background: var(--sky2); }
.spots .noimg { display: grid; place-items: center; font: 18px var(--pixel-big); color: var(--sign); }
.spots b { display: block; font: 700 15px var(--pixel); }
.spots b::before { content: counter(s) ". "; color: var(--sign); }
.spots small { display: inline-block; font: 11px var(--pixel); color: #fff; background: var(--sign); padding: 1px 6px; margin: 2px 0 4px; }
.spots p { margin: 0; font-size: 13.5px; color: var(--ink-2); }
.ep__cta { display: grid; margin-top: 12px; }

/* passport */
.passport { background: #eef3ff; }
.pp { display: grid; grid-template-columns: 120px 1fr; background: #fff; box-shadow: 0 5px 0 var(--line); }
.pp__cover { background: var(--navy); color: var(--gold); padding: 12px 10px; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; border-right: 3px solid var(--line); }
.pp__cover b { font: 13px var(--pixel); letter-spacing: .12em; }
.pp__cover span { font: 10px var(--pixel); opacity: .8; }
.pp__face { width: 64px; height: 64px; margin: 8px 0; border: 3px solid var(--gold); background: var(--cream); }
.pp__face img { image-rendering: pixelated; width: 100%; }
.pp__cover strong { font: 12px var(--pixel); color: #fff; word-break: break-all; }
.pp__page { padding: 10px; background: repeating-linear-gradient(0deg, #fff 0 22px, #f1f4fb 22px 23px); min-height: 180px; }
.stamps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.stamps li { aspect-ratio: 1; border: 3px dashed var(--ink-2); display: grid; place-items: center; text-align: center; font: 12px/1.2 var(--pixel); padding: 4px; color: var(--ink-2); transform: rotate(var(--rot, -4deg)); }
.stamps li b { display: block; font: 16px var(--pixel-big); color: var(--ink); }
.stamps li.is-won { border: 3px solid var(--red); color: var(--red); background: #fff1ef; }
.stamps li.is-won b { color: var(--red); }

/* follow + footer */
.follow { text-align: center; background: #ffeef6; }
.follow p { color: var(--ink-2); margin: 0 0 14px; }
.follow__btns { display: grid; gap: 10px; }
.foot { padding: 6px 4px 20px; font-size: 12px; color: var(--ink-2); }
.foot p { margin: 0 0 6px; }
.foot__credit { opacity: .7; }

/* tab bar */
.tabbar { position: fixed; z-index: 40; left: 50%; bottom: calc(10px + var(--safe-b)); transform: translateX(-50%); width: min(456px, calc(100% - 24px)); display: grid; grid-template-columns: repeat(5, 1fr); background: var(--cream); box-shadow: 0 5px 0 var(--line); }
.tabbar a { display: grid; justify-items: center; gap: 1px; padding: 7px 0 6px; text-decoration: none; font: 11px var(--pixel); }
.tabbar a + a { border-left: 3px solid var(--line); }
.tabbar i { font-style: normal; font-size: 15px; line-height: 1; }
.tabbar a.is-on { background: var(--ink); color: var(--gold); }

/* treat button */
.treat { position: fixed; z-index: 41; right: max(12px, calc(50% - 228px)); bottom: calc(76px + var(--safe-b)); display: flex; align-items: center; gap: 6px; padding: 8px 12px 8px 8px; background: var(--gold); box-shadow: 0 4px 0 var(--line); cursor: pointer; font: 700 12px var(--pixel); }
.treat:active { transform: translateY(4px); box-shadow: none; }
.treat__bone { width: 26px; height: 12px; background: #fff; border: 2px solid var(--line); position: relative; }
.treat__bone::before, .treat__bone::after { content: ""; position: absolute; width: 8px; height: 16px; background: #fff; border: 2px solid var(--line); top: -4px; }
.treat__bone::before { left: -6px; } .treat__bone::after { right: -6px; }
.treat.pop { animation: pop .3s; }
@keyframes pop { 50% { transform: scale(1.15); } }

.toast { position: fixed; z-index: 60; left: 50%; bottom: calc(130px + var(--safe-b)); transform: translateX(-50%); max-width: calc(100% - 32px); padding: 10px 14px; background: var(--ink); color: #fff; font: 13px var(--pixel); box-shadow: 0 4px 0 rgba(0,0,0,.25); animation: rise .25s both; }
@keyframes rise { from { transform: translate(-50%, 10px); opacity: 0; } }

@media (min-width: 720px) {
  .row2 { grid-template-columns: 1fr 1.3fr; }
  .hero__stage { height: 380px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* sound button */
.sns--bgm { background: #e6f3ff; min-width: 38px; }
.sns--bgm.is-on { background: var(--gold); }
/* reasons on the board */
.board .why { grid-column: 1 / -1; margin-top: 4px; border-top: 2px dashed #e4dccb; padding-top: 6px; }
.board .why ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.board .why li { all: unset; display: grid; grid-template-columns: 1fr auto; grid-template-areas: "q like" "who like"; gap: 2px 8px; align-items: center; padding: 7px 9px; background: #fffdf5; border: 2px solid #eadfc8; }
.board .why q { grid-area: q; font-size: 13px; line-height: 1.45; color: var(--ink); quotes: "“" "”"; word-break: keep-all; overflow-wrap: anywhere; }
.board .why .who { grid-area: who; font: 11px var(--pixel); color: var(--ink-2); }
.board .why .like { grid-area: like; padding: 4px 8px; font: 700 12px var(--pixel); color: var(--ink-2); background: #fff; border: 2px solid var(--line); box-shadow: 0 2px 0 var(--line); cursor: pointer; }
.board .why .like.is-on { color: #fff; background: var(--red); }
.board .why .like:active { transform: translateY(2px); box-shadow: none; }
.board .why__more { margin-top: 6px; padding: 0; background: none; border: 0; font: 700 12px var(--pixel); color: var(--sign); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.board li.is-top .why li { background: #fff; }
/* passport extras */
.pp__sum { margin: 0 0 8px; font: 12px var(--pixel); color: var(--ink-2); }
.pp__sum b { color: var(--navy); font-size: 14px; }
.pp__more { margin-top: 10px; width: 100%; padding: 8px; font: 700 12px var(--pixel); background: var(--cream); border: 3px solid var(--line); box-shadow: 0 3px 0 var(--line); cursor: pointer; }

/* HQ status board */
.hq { margin: -8px 0 22px; padding: 12px; background: var(--navy); color: #fff; border: 3px solid var(--line); box-shadow: 0 5px 0 var(--line); }
.hq__title { margin: 0 0 10px; font: 700 12px var(--pixel); color: var(--gold); letter-spacing: .08em; }
.hq__title::before { content: "● "; color: #6be27d; animation: blink 1.6s steps(2) infinite; }
@keyframes blink { 50% { opacity: .2; } }
.hq__row { display: grid; gap: 4px; padding: 8px 10px; background: rgba(255,255,255,.07); border: 2px solid rgba(255,255,255,.14); }
.hq__row--wide { grid-template-columns: 1fr auto; align-items: end; margin-bottom: 8px; }
.hq__k { font: 11px var(--pixel); color: #c7cbf2; }
.hq__v b { font: 22px var(--pixel-big); color: var(--gold); }
.hq__v small { margin-left: 4px; font: 11px var(--pixel); color: #c7cbf2; }
.hq__bar { grid-column: 1 / -1; height: 14px; background: #1b1d3d; border: 2px solid #fff; display: block; position: relative; }
.hq__bar i { display: block; height: 100%; min-width: 4px; background: repeating-linear-gradient(90deg, #6be27d 0 6px, #2e9e4f 6px 8px); transition: width .8s steps(12); }
.hq__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.hq__grid > :nth-child(3) { grid-column: 1 / -1; }

.maptabs { display: flex; gap: 6px; margin-bottom: 8px; }
.maptabs button { flex: 1; padding: 8px; font: 700 13px var(--pixel); background: var(--cream); border: 3px solid var(--line); box-shadow: 0 3px 0 var(--line); cursor: pointer; color: var(--ink); }
.maptabs button.is-on { background: var(--sign); color: #fff; }
#mapWorld { width: 100%; display: block; image-rendering: pixelated; cursor: zoom-in; }
.mapwrap { background: #8fd0ea; }

/* labeled sns buttons with small pixel glyphs (generic camera / play) */
.sns--ig, .sns--yt { display: inline-flex; gap: 5px; align-items: center; padding: 0 8px; }
.sns span { font: 700 11px var(--pixel); }
.px { display: inline-block; width: 12px; height: 12px; image-rendering: pixelated; background-size: 100% 100%; flex: none; }
.px--cam { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 6 6' shape-rendering='crispEdges'%3E%3Cpath fill='%232a2118' d='M2 0h2v1H2zM0 1h6v5H0z'/%3E%3Cpath fill='%23fff' d='M2 2h2v3H2zM1 3h1v1H1zM4 3h1v1H4z'/%3E%3Cpath fill='%232a2118' d='M2 3h2v1H2z'/%3E%3C/svg%3E"); }
.px--play { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 6 6' shape-rendering='crispEdges'%3E%3Cpath fill='%232a2118' d='M1 0h1v1h1v1h1v1h1v1H4v1H3v1H2v1H1z'/%3E%3C/svg%3E"); }
@media (max-width: 360px) { .sns span { display: none; } }
.top__links { gap: 5px; flex: none; }
.brand { min-width: 0; }
.brand span { min-width: 0; }
.brand b { white-space: nowrap; }
.sns { min-width: 32px; padding: 0 6px; }
.sns--ig, .sns--yt { padding: 0 7px; gap: 4px; }
@media (max-width: 400px) { .brand small { display: none; } .brand b { font-size: 15px; } .sns--share, .sns--bgm { min-width: 30px; padding: 0 5px; } }
@media (max-width: 350px) { .sns span { display: none; } }

/* treat button lives on the island stage (right side) */
.hero__stage .treat { position: absolute; right: 18px; top: 44%; bottom: auto; transform: translateY(-50%); flex-direction: column; gap: 8px; padding: 10px 10px 8px; z-index: 6; }
.hero__stage .treat:active { transform: translateY(calc(-50% + 4px)); }
.hero__stage .treat.pop { animation: treatpop .3s; }
@keyframes treatpop { 50% { transform: translateY(-50%) scale(1.12); } }
.treat__plus { position: absolute; left: 50%; top: -6px; font: 700 13px var(--pixel); color: var(--red); pointer-events: none; animation: plusup .8s ease-out forwards; }
@keyframes plusup { from { opacity: 1; transform: translate(-50%, 0); } to { opacity: 0; transform: translate(-50%, -34px); } }
@media (prefers-reduced-motion: reduce) { .treat__plus { animation: none; opacity: 0; } }
.hero__stage .treat { top: 64px; right: 10px; transform: none; }
.hero__stage .treat:active { transform: translateY(4px); }
@keyframes treatpop { 50% { transform: scale(1.12); } }
