:root {
  --ink: #2b2620;
  --paper: rgba(255, 251, 243, 0.94);
  --glass: rgba(20, 24, 32, 0.42);
  --glass-line: rgba(255, 255, 255, 0.18);
  --accent: #e0703a;
  --stamp: #c4382b;
  --font: Pretendard, "Noto Sans KR", system-ui, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: #1d2b4c;
  font-family: var(--font);
  color: #fff;
  -webkit-tap-highlight-color: transparent;
}

#scene {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  touch-action: none;
  display: block;
}

button { font-family: inherit; cursor: pointer; }

/* ---------- HUD ---------- */
/* 위쪽 바: 왼쪽(맵·날씨·물/물때) + 오른쪽(버튼들·오늘의 1등). 좁은 화면에선 위아래로 쌓여서 겹치지 않아요.
   아래 안내·알림·메뉴는 --below-top(위쪽 바 바로 아래)에 맞춰 놓여요. */
.topbar {
  position: fixed;
  top: max(10px, env(safe-area-inset-top));
  left: 16px;
  right: 16px;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  pointer-events: none;
}
.topbar > * { pointer-events: auto; }
.topbar-right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.hud-right { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }

.place { display: flex; align-items: baseline; gap: 8px; text-shadow: 0 1px 6px rgba(0, 0, 0, 0.45); }
.place-name { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }
.map-pick { position: relative; display: inline-flex; align-items: center; }
.map-pick::after { content: '▾'; position: absolute; right: 8px; font-size: 13px; pointer-events: none; }
#map-select {
  appearance: none;
  -webkit-appearance: none;
  font: inherit;
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  background: var(--glass);
  border: 1px solid var(--glass-line);
  border-radius: 12px;
  padding: 4px 26px 4px 10px;
  backdrop-filter: blur(10px);
  cursor: pointer;
}
#map-select option { color: var(--ink); background: #fff; }

/* 핸드폰 점프 버튼: 터치 화면에서만 보여요 */
.touch-jump {
  position: fixed;
  right: 16px;
  bottom: calc(150px + env(safe-area-inset-bottom));
  z-index: 5;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 0;
  background: rgba(224, 112, 58, 0.88);
  color: #fff;
  font-size: 22px;
  font-weight: 900;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
  touch-action: manipulation;
}
.touch-jump small { font-size: 10px; font-weight: 700; }
.touch-jump:active { transform: scale(0.92); }
/* 터치 기기(body.touch)에서만 점프 버튼·조이스틱이 보여요 */
body.touch .touch-jump:not([hidden]) { display: flex; }

.joystick {
  position: fixed;
  left: 18px;
  bottom: calc(132px + env(safe-area-inset-bottom));
  z-index: 5;
  width: 112px;
  height: 112px;
  border-radius: 50%;
  background: rgba(20, 24, 32, 0.32);
  border: 2px solid rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(6px);
  touch-action: none;
  display: none;
}
body.touch .joystick:not([hidden]) { display: block; }
.joy-knob {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 50px;
  height: 50px;
  margin: -25px 0 0 -25px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  pointer-events: none;
}
/* 확대·축소·풍경 모드 버튼 (오른쪽 가운데) */
.zoom {
  position: fixed;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.zoom[hidden] { display: none; }
.zoom button {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--glass-line);
  background: var(--glass);
  backdrop-filter: blur(10px);
  color: #fff;
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
  touch-action: manipulation;
}
.zoom button:active { transform: scale(0.92); }

/* 🏞️ 풍경 모드: 화면 위 글자·버튼을 모두 숨기고 풍경만 */
.scenic-exit {
  position: fixed;
  left: 50%;
  bottom: calc(22px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 9;
  display: none;
  border: 1px solid var(--glass-line);
  background: rgba(20, 24, 32, 0.35);
  backdrop-filter: blur(8px);
  color: #fff;
  border-radius: 999px;
  padding: 9px 16px;
  font-size: 13px;
}
body.scenic .scenic-exit { display: block; }
body.scenic .hud,
body.scenic .actions,
body.scenic .ctx-chips,
body.scenic .log,
body.scenic .champ,
body.scenic .joystick,
body.scenic .touch-jump,
body.scenic .zoom,
body.scenic .hint,
body.scenic .warp-menu,
body.scenic .trash-picker,
body.scenic .chatbar { display: none !important; }

/* 조이스틱 자리만큼 말 기록을 위로 올려요 */
body.touch .log { bottom: calc(256px + env(safe-area-inset-bottom)); }

/* 뱃길 */
.voyage { position: fixed; inset: 0; z-index: 6; pointer-events: none; }
.voyage button { pointer-events: auto; }
.voyage-card {
  position: absolute;
  top: calc(var(--below-top, 96px) + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 251, 243, 0.82);
  color: var(--ink);
  border-radius: 14px;
  padding: 6px 12px;
  text-align: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  width: max-content;
  max-width: calc(100vw - 32px);
}
.voyage-route { margin: 0; font-size: 11px; color: #6b6156; }
.voyage-line { margin: 2px 0 0; font-size: 13px; white-space: nowrap; }
.voyage-status { font-weight: 800; }
.voyage-fast { position: absolute; left: 16px; bottom: calc(24px + env(safe-area-inset-bottom)); }
.place-elev { font-size: 13px; opacity: 0.85; }
.place-info { margin-top: 2px; font-size: 13px; opacity: 0.92; text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5); }

.chip {
  border: 1px solid var(--glass-line);
  background: var(--glass);
  backdrop-filter: blur(10px);
  color: #fff;
  border-radius: 999px;
  padding: 7px 11px;
  font-size: 13px;
}

.island-hud { display: flex; gap: 6px; margin-top: 6px; }
.mini-chip {
  font-size: 12px;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--glass);
  border: 1px solid var(--glass-line);
  backdrop-filter: blur(8px);
  white-space: nowrap;
}
.mini-chip.warn { background: rgba(200, 85, 61, 0.85); }
.flash {
  position: fixed;
  inset: 0;
  z-index: 12;
  background: #fff;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s;
}
.flash.on { opacity: 0.9; transition: none; }
.fade {
  position: fixed;
  inset: 0;
  z-index: 12;
  background: #0d1220;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s;
}
.fade.on { opacity: 1; }

.warp-menu {
  position: fixed;
  top: calc(var(--below-top, 56px) + 4px);
  right: 16px;
  z-index: 8;
  display: grid;
  gap: 4px;
  padding: 8px;
  border-radius: 14px;
  background: var(--paper);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  min-width: 170px;
}
.warp-menu button {
  border: 0;
  background: #f4efe6;
  color: var(--ink);
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 14px;
  text-align: left;
}
.warp-menu button:hover { background: #fff3df; }
.warp-menu p { margin: 4px 6px; font-size: 12px; color: #8a7f72; }
@media (max-width: 560px) {
}
.dex { grid-template-columns: repeat(2, 1fr); }

.champ {
  position: static;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
  padding: 6px 12px;
  border-radius: 14px;
  background: rgba(255, 214, 102, 0.92);
  color: #3a2c10;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
  max-width: calc(100vw - 32px);
  animation: champ-in 0.4s ease-out;
}
.champ-label { font-size: 10.5px; font-weight: 700; opacity: 0.75; }
.champ b { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; }
@keyframes champ-in { from { transform: translateY(-6px); opacity: 0; } }

/* ---------- 말 기록 ---------- */
.log {
  position: fixed;
  left: 16px;
  bottom: calc(96px + env(safe-area-inset-bottom));
  z-index: 4;
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: min(360px, calc(100vw - 32px));
  pointer-events: none;
}
/* 아래 기록 글: 한 줄씩 짧게, 몇 초 뒤 사라져요 (게임 화면을 덜 가리게) */
.log-line {
  background: rgba(20, 24, 32, 0.38);
  backdrop-filter: blur(6px);
  border-radius: 9px;
  padding: 3px 9px;
  font-size: 12px;
  line-height: 1.4;
  transition: opacity 1s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  align-self: flex-start;
  max-width: 100%;
}
.log.off { display: none; }
.log-line b { font-weight: 700; color: #ffd9a8; }
.log-line.mine b { color: #ffe9a6; }
.log-line.system { opacity: 0.8; font-size: 12px; }
.log-line.fade { opacity: 0; }

/* ---------- 행동 버튼 ---------- */
.actions {
  position: fixed;
  left: 50%;
  bottom: max(16px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 5;
  display: flex;
  gap: 6px;
  padding: 6px;
  border-radius: 20px;
  background: var(--glass);
  border: 1px solid var(--glass-line);
  backdrop-filter: blur(12px);
  max-width: calc(100vw - 16px);
  overflow-x: auto;
}
.actions button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 72px;
  padding: 7px 8px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: #fff;
  font-size: 12px;
}
.actions button i { font-style: normal; font-size: 20px; }
.actions button:hover { background: rgba(255, 255, 255, 0.12); }
.actions button.ready { background: rgba(224, 112, 58, 0.85); animation: pulse 1.4s infinite; }
@keyframes pulse { 50% { transform: scale(1.06); } }

/* ---------- 말 입력 ---------- */
.chatbar {
  position: fixed;
  left: 50%;
  bottom: calc(92px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 6;
  display: flex;
  gap: 6px;
  width: min(440px, calc(100vw - 32px));
}
.chatbar input {
  flex: 1;
  min-width: 0;
  border: 0;
  border-radius: 12px;
  padding: 11px 14px;
  font: inherit;
  font-size: 15px;
  background: var(--paper);
  color: var(--ink);
}
.chatbar button {
  border: 0;
  border-radius: 12px;
  padding: 0 14px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
}

.ctx-chips {
  position: fixed;
  left: 50%;
  bottom: calc(92px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 5;
  display: flex;
  gap: 6px;
  white-space: nowrap;
}
.pack-chip {
  border: 1px solid var(--glass-line);
  background: var(--glass);
  backdrop-filter: blur(10px);
  color: #fff;
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 13px;
}

.pack-chip.good { background: rgba(70, 120, 60, 0.75); }
.pack-chip.game { background: rgba(224, 160, 40, 0.85); font-weight: 700; animation: pulse 1.4s infinite; }

.trash-picker {
  position: fixed;
  left: 50%;
  bottom: calc(92px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 7;
  background: var(--paper);
  color: var(--ink);
  border-radius: 16px;
  padding: 10px 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  text-align: center;
  width: max-content;
  max-width: calc(100vw - 32px);
}
.trash-picker p { margin: 0 0 8px; font-size: 12px; color: #7a6f63; }
.trash-picker div { display: flex; gap: 6px; }
.trash-picker .poop-btn {
  display: block;
  width: 100%;
  margin-top: 6px;
  background: #fff3df;
}
.trash-picker .poop-btn small { color: #8a7f72; font-size: 11px; }
.trash-picker button {
  border: 1px solid #ddd3c4;
  background: #fff;
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 13px;
  color: var(--ink);
}

.gender-row { display: flex; gap: 8px; }
.gender-row button {
  flex: 1;
  border: 2px solid #ddd3c4;
  background: #fff;
  border-radius: 12px;
  padding: 9px;
  font-size: 15px;
  color: var(--ink);
}
.gender-row button[aria-pressed="true"] { border-color: var(--ink); background: #fff3df; font-weight: 700; }

/* ---------- 그림자 줄넘기 ---------- */
.game-hud { position: fixed; inset: 0; z-index: 6; pointer-events: none; }
.game-hud button { pointer-events: auto; }
.game-top {
  position: absolute;
  top: calc(56px + env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}
.game-count b { font-size: 64px; font-weight: 900; line-height: 1; }
.game-count span { font-size: 20px; margin-left: 4px; }
.game-sub { font-size: 13px; opacity: 0.9; margin-top: 4px; }
.game-msg {
  position: absolute;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 80px;
  font-weight: 900;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}
.game-over {
  position: absolute;
  top: 42%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--paper);
  color: var(--ink);
  border-radius: 20px;
  padding: 20px;
  width: min(320px, calc(100vw - 32px));
  text-align: center;
  pointer-events: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}
.game-result { margin: 0 0 4px; font-size: 20px; font-weight: 800; }
.game-best { margin: 0 0 14px; font-size: 13px; color: #6b6156; }
.game-over-actions { display: flex; flex-direction: column; gap: 6px; }
.ghost-light { border: 0; background: transparent; color: #6b6156; padding: 8px; font-size: 14px; }
.game-jump {
  position: absolute;
  right: 20px;
  bottom: calc(24px + env(safe-area-inset-bottom));
  width: 96px;
  height: 96px;
  border-radius: 50%;
  border: 0;
  background: rgba(224, 112, 58, 0.92);
  color: #fff;
  font-size: 20px;
  font-weight: 900;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  touch-action: manipulation;
}
.game-jump small { font-size: 11px; font-weight: 600; opacity: 0.85; }
.game-jump:active { transform: scale(0.94); }
.game-quit { position: absolute; left: 16px; bottom: calc(24px + env(safe-area-inset-bottom)); }
.game-help {
  position: absolute;
  left: 50%;
  bottom: calc(132px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  margin: 0;
  font-size: 12px;
  background: var(--glass);
  border-radius: 999px;
  padding: 6px 12px;
  white-space: nowrap;
}

#status-label {
  display: inline-block;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: bottom;
}

.hint {
  position: fixed;
  top: calc(var(--below-top, 64px) + 6px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  background: var(--glass);
  backdrop-filter: blur(8px);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 12px;
  white-space: nowrap;
  max-width: calc(100vw - 32px);
  overflow: hidden;
  text-overflow: ellipsis;
}

.toast {
  position: fixed;
  left: 50%;
  top: calc(var(--below-top, 64px) + 44px);
  transform: translate(-50%, -8px);
  z-index: 9;
  background: var(--paper);
  color: var(--ink);
  border-radius: 12px;
  padding: 10px 16px;
  font-size: 14px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  max-width: calc(100vw - 32px);
  text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 창 ---------- */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 10;
  /* 글자가 커지는 브라우저(카톡 등)에서도 카드가 화면 밖으로 안 나가게 flex 로 가운데 정렬 */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow-y: auto;
  background: rgba(10, 14, 24, 0.35);
}
.card {
  width: 100%;
  max-width: 380px;
  min-width: 0;
  max-height: calc(100% - 8px);
  overflow-y: auto;
  margin: auto;
  background: var(--paper);
  color: var(--ink);
  border-radius: 22px;
  padding: 26px 22px 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}
.intro { text-align: center; }
.intro-icon { font-size: 40px; }
.intro h1 { margin: 6px 0 4px; font-size: 26px; letter-spacing: -0.03em; }
.tagline { margin: 0 0 18px; color: #6b6156; }
.field { display: block; text-align: left; margin-bottom: 14px; }
.field > span:first-child { display: block; font-size: 13px; font-weight: 700; margin-bottom: 6px; color: #5c5248; }
.name-row { display: flex; gap: 6px; }
.field em { font-style: normal; font-weight: 400; color: #9a8f82; }
.text-input { display: block; width: 100%; }
.name-row input, .text-input {
  flex: 1;
  min-width: 0;
  border: 1px solid #ddd3c4;
  border-radius: 12px;
  padding: 10px 12px;
  font: inherit;
  font-size: 15px;
  background: #fff;
}
.ghost { border: 1px solid #ddd3c4; background: #fff; border-radius: 12px; padding: 0 12px; font-size: 18px; }
.swatches { display: flex; gap: 8px; }
.swatch {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 3px solid transparent;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.6);
}
.swatch[aria-pressed="true"] { border-color: var(--ink); }
.primary {
  width: 100%;
  border: 0;
  border-radius: 14px;
  padding: 13px;
  font-size: 16px;
  font-weight: 800;
  background: var(--accent);
  color: #fff;
}
.fine { margin: 14px 0 0; font-size: 11.5px; line-height: 1.5; color: #8a7f72; }

/* ---------- 발도장 여권 ---------- */
.passport h2 { margin: 0 0 4px; font-size: 20px; }
.passport-note { margin: 0 0 16px; font-size: 13px; color: #6b6156; }
.stamps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px 8px; margin-bottom: 18px; }
.stamp-cell { text-align: center; }
.stamp-mark {
  width: 74px;
  height: 74px;
  margin: 0 auto 4px;
  border-radius: 50%;
  border: 2px dashed #cfc3b2;
  display: grid;
  place-items: center;
  font-size: 22px;
  color: #b4a894;
}
.stamp-cell.soon .stamp-mark { font-size: 11px; opacity: 0.6; }
.stamp-cell.done .stamp-mark {
  border: 3px double var(--stamp);
  color: var(--stamp);
  transform: rotate(-12deg);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1px;
}
.stamp-cell.done .stamp-place { font-size: 15px; font-weight: 900; }
.stamp-cell.done .stamp-date { font-size: 9px; }
.stamp-label { font-size: 12px; color: #5c5248; }
.passport { max-height: calc(100vh - 32px); overflow-y: auto; }
.rewards { border-top: 1px dashed #ddd3c4; padding-top: 12px; margin-bottom: 16px; }
.rewards h3 { margin: 0 0 2px; font-size: 15px; }
.rewards-score { margin: 0 0 8px; font-size: 13px; font-weight: 700; color: #5f7f4e; }
.rewards ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.rewards li { font-size: 12.5px; color: #a49a8d; padding: 5px 8px; border-radius: 8px; background: #f4efe6; }
.rewards li.on { color: var(--ink); background: #fff3df; font-weight: 700; }
.rewards-note { margin: 8px 0 0; font-size: 11px; color: #9a8f82; }
.copyright { margin: 10px 0 0; text-align: center; font-size: 11px; color: #9a8f82; }

/* 🎮 게임 목록 */
.games h2, .share-card h2 { margin: 0 0 2px; font-size: 20px; }
.games-sub { margin: 0 0 12px; font-size: 12.5px; color: #7a6f63; }
.games-list { display: grid; gap: 8px; margin-bottom: 12px; }
.game-card {
  border-radius: 14px;
  background: #f4efe6;
  padding: 10px 12px;
  display: grid;
  gap: 4px;
}
.game-card h3 { margin: 0; font-size: 15px; }
.game-card p { margin: 0; font-size: 12.5px; color: #6b6156; line-height: 1.4; }
.game-card .status { color: #5f7f4e; font-weight: 700; }
.game-card button {
  justify-self: start;
  margin-top: 2px;
  border: 0;
  border-radius: 10px;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 700;
  background: var(--accent);
  color: #fff;
}
.game-card button:disabled { background: #cfc5b6; }
.share-btn {
  width: 100%;
  border: 2px solid var(--accent);
  background: #fff;
  color: var(--accent);
  border-radius: 14px;
  padding: 11px;
  font-size: 15px;
  font-weight: 800;
  margin-bottom: 8px;
}
.share-card img { width: 100%; border-radius: 12px; display: block; margin-bottom: 10px; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2); }
.share-actions { display: grid; gap: 6px; text-align: center; }
.share-card .ghost-light { display: block; width: 100%; text-align: center; text-decoration: none; }
.support-link {
  display: block;
  margin-top: 10px;
  padding: 9px 12px;
  border-radius: 12px;
  background: #fff3df;
  color: #8a5a1c;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
}
.support-link[hidden] { display: none; }
#btn-games.attn { background: rgba(224, 160, 40, 0.85); animation: pulse 1.4s infinite; }

.stamp-pop {
  position: fixed;
  inset: 0;
  z-index: 11;
  display: grid;
  place-items: center;
  pointer-events: none;
}
.stamp-big {
  width: 190px;
  height: 190px;
  border-radius: 50%;
  border: 7px double var(--stamp);
  background: rgba(255, 248, 238, 0.9);
  color: var(--stamp);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-weight: 900;
}
.stamp-big .stamp-place { font-size: 40px; letter-spacing: -0.02em; }
.stamp-big .stamp-elev { font-size: 15px; }
.stamp-big .stamp-date { font-size: 13px; font-weight: 700; }
.stamp-pop.play .stamp-big { animation: stamp 2.6s ease-out forwards; }
@keyframes stamp {
  0% { transform: scale(2.4) rotate(8deg); opacity: 0; }
  14% { transform: scale(0.95) rotate(-12deg); opacity: 1; }
  20% { transform: scale(1) rotate(-12deg); }
  80% { opacity: 1; }
  100% { transform: scale(1) rotate(-12deg); opacity: 0; }
}

/* 좁은 화면: 오른쪽 위 버튼들을 날씨 줄 아래로 내려서 맵 선택을 가리지 않게 */
@media (max-width: 560px) {
  .topbar { flex-direction: column; align-items: stretch; gap: 6px; }
  .topbar-right { align-items: flex-end; }
}
@media (pointer: coarse) {
  .log { max-width: calc(100vw - 100px); }
}

@media (max-width: 480px) {
  .actions { gap: 0; padding: 4px; }
  .actions button { min-width: 0; width: 49px; padding: 6px 0; font-size: 10px; }
  .actions button i { font-size: 18px; }
  .game-help { white-space: normal; width: calc(100vw - 32px); text-align: center; border-radius: 12px; }
  #status-label { max-width: 64px; }
  .place-name { font-size: 19px; }
  .hud-right .chip { padding: 6px 9px; font-size: 12px; }
}

/* ---------- 🌬️ 텐트 바람 버티기 ---------- */
.wind-hud { position: fixed; inset: 0; z-index: 6; pointer-events: none; color: #fff; }
.wind-hud button { pointer-events: auto; }
.wind-top {
  position: absolute;
  top: calc(56px + env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  width: min(520px, calc(100vw - 32px));
}
.wind-time b { font-size: 56px; font-weight: 900; line-height: 1; font-variant-numeric: tabular-nums; }
.wind-time span { font-size: 20px; margin-left: 4px; }
.wind-sub { font-size: 13px; opacity: 0.9; margin-top: 4px; }
.wind-pegs { font-size: 22px; letter-spacing: 4px; margin-top: 6px; }
.wind-stage {
  position: absolute;
  top: 46%;
  left: 50%;
  width: 240px;
  height: 240px;
  transform: translate(-50%, -50%);
}
.wind-tent {
  position: absolute;
  inset: 60px 50px;
  transition: transform 0.25s ease-out;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.35));
}
.wind-tent svg { width: 100%; height: 100%; }
.wind-tent.shake { animation: wind-shake 0.35s; }
.wind-tent.fly { animation: wind-fly 1.1s ease-in forwards; }
@keyframes wind-shake {
  0%, 100% { translate: 0 0; }
  25% { translate: -10px 2px; rotate: -6deg; }
  75% { translate: 10px -2px; rotate: 6deg; }
}
@keyframes wind-fly {
  to { translate: 220px -260px; rotate: 160deg; opacity: 0; }
}
.wind-ring {
  position: absolute;
  inset: 10px;
  border: 4px solid rgba(255, 255, 255, 0.85);
  border-radius: 50%;
  transform: scale(0);
  pointer-events: none;
}
.wind-gust {
  position: absolute;
  font-size: 54px;
  font-weight: 900;
  opacity: 0;
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.5);
  white-space: nowrap;
}
.wind-gust.on { opacity: 1; }
.wind-gust.from-left { left: -20px; top: 50%; transform: translateY(-50%); }
.wind-gust.from-right { right: -20px; top: 50%; transform: translateY(-50%); }
.wind-gust.from-up { top: -24px; left: 50%; transform: translateX(-50%); }
.wind-gust.from-down { bottom: -24px; left: 50%; transform: translateX(-50%); }
.wind-msg {
  position: absolute;
  top: 24%;
  left: 50%;
  transform: translateX(-50%);
  font-size: 22px;
  font-weight: 800;
  text-align: center;
  text-shadow: 0 3px 14px rgba(0, 0, 0, 0.55);
  white-space: nowrap;
}
.wind-msg.pop { animation: wind-pop 0.4s; }
@keyframes wind-pop { from { scale: 1.3; } to { scale: 1; } }
.wind-pad {
  position: absolute;
  right: 20px;
  bottom: calc(24px + env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: repeat(3, 64px);
  grid-template-rows: repeat(3, 64px);
  gap: 6px;
}
.wind-btn {
  border: 0;
  border-radius: 18px;
  background: rgba(20, 24, 32, 0.55);
  color: #fff;
  font-size: 30px;
  font-weight: 900;
  touch-action: manipulation;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
}
.wind-btn.hot { background: rgba(224, 112, 58, 0.95); }
.wind-btn:active { transform: scale(0.92); }
.wind-up { grid-column: 2; grid-row: 1; }
.wind-left { grid-column: 1; grid-row: 2; }
.wind-right { grid-column: 3; grid-row: 2; }
.wind-down { grid-column: 2; grid-row: 3; }
.wind-help { bottom: calc(240px + env(safe-area-inset-bottom)); }
@media (prefers-reduced-motion: reduce) {
  .wind-tent, .wind-tent.shake, .wind-msg.pop { animation: none; transition: none; }
}

/* ---------- 🛷 선자령 눈썰매 ---------- */
.sled-hud { position: fixed; inset: 0; z-index: 7; color: #1d2b4c; touch-action: none; }
.sled-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.sled-top {
  position: absolute;
  top: calc(16px + env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  width: min(420px, calc(100vw - 32px));
  pointer-events: none;
}
.sled-dist b { font-size: 52px; font-weight: 900; line-height: 1; font-variant-numeric: tabular-nums; }
.sled-dist span { font-size: 20px; margin-left: 4px; }
.sled-sub { font-size: 13px; margin-top: 4px; color: #3d4b66; }
.sled-bar { height: 6px; border-radius: 999px; background: rgba(29, 43, 76, 0.15); margin-top: 8px; overflow: hidden; }
.sled-bar i { display: block; height: 100%; width: 0; background: #e0703a; border-radius: inherit; }
.sled-msg {
  position: absolute;
  top: 46%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 72px;
  font-weight: 900;
  color: #1d2b4c;
  pointer-events: none;
}
.sled-btn {
  position: absolute;
  bottom: calc(24px + env(safe-area-inset-bottom));
  width: 88px;
  height: 88px;
  border-radius: 50%;
  border: 0;
  background: rgba(29, 43, 76, 0.78);
  color: #fff;
  font-size: 30px;
  touch-action: none;
  box-shadow: 0 8px 22px rgba(29, 43, 76, 0.3);
  /* 꾹 눌러도 글자 선택·복사 메뉴가 안 뜨게 */
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}
.sled-btn.on { background: #e0703a; transform: scale(0.94); }
.sled-left { left: max(20px, env(safe-area-inset-left)); }
.sled-right { right: max(20px, env(safe-area-inset-right)); }
.sled-quit { top: calc(16px + env(safe-area-inset-top)); bottom: auto; left: 16px; }
.sled-over { color: var(--ink); }

/* ---------- ⛺ 텐트 모양 고르기 ---------- */
.shape-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 6px; margin-top: 4px; }
.game-card .shape-btn {
  justify-self: stretch;
  margin: 0;
  display: grid;
  justify-items: center;
  gap: 2px;
  padding: 8px 4px;
  background: #fff;
  color: var(--ink);
  border: 2px solid transparent;
  font-weight: 600;
}
.game-card .shape-btn:disabled { background: #ebe4d8; color: #8a7f72; }
.game-card .shape-btn[aria-pressed="true"] { border-color: var(--accent); background: #fff3df; }
.shape-icon { font-size: 22px; line-height: 1.1; }
.shape-btn b { font-size: 12px; }
.shape-btn small { font-size: 10.5px; color: #8a7f72; text-align: center; line-height: 1.25; }
.game-msg.note { font-size: 34px; white-space: nowrap; }

/* ---------- ⛺ 텐트 안 구경 ---------- */
.tent-view { background: rgba(10, 14, 22, 0.55); }
.tent-card { display: grid; gap: 10px; }
.tent-title { margin: 0; font-size: 18px; }
.tent-status { margin: -6px 0 0; font-size: 13px; color: #6b6156; }
.tent-kind { margin: -6px 0 0; width: fit-content; display: block; padding: 4px 10px; border-radius: 999px; background: #f2ece1; font-size: 13px; font-weight: 800; color: #5a4630; }
.tent-art svg { display: block; width: 100%; height: auto; border-radius: 14px; }
.tent-gear { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.tent-gear li { display: grid; grid-template-columns: 14px 1fr; column-gap: 8px; align-items: center; font-size: 13px; }
.tent-gear small { grid-column: 2; color: #8a7f72; font-size: 11.5px; }
.tent-dot { width: 14px; height: 14px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.15); }
.tent-actions { display: flex; flex-direction: column; gap: 6px; }

/* ---------- 🎒 퀘스트 & 장비 ---------- */
.quest-list { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 6px; }
.quest-list li { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; font-size: 12.5px; background: #fff; border-radius: 10px; padding: 7px 9px; }
.quest-list li.done { background: #e8f1e1; }
.quest-list .q-title { font-weight: 700; color: var(--ink); min-width: 0; }
.quest-list .q-prog { font-variant-numeric: tabular-nums; color: #6b6156; }
.quest-list .q-reward { grid-column: 1 / -1; color: #6b6156; font-size: 11.5px; }
.quest-bar { grid-column: 1 / -1; height: 5px; border-radius: 999px; background: #ebe4d8; overflow: hidden; }
.quest-bar i { display: block; height: 100%; background: var(--accent); border-radius: inherit; }
.quest-list li.done .quest-bar i { background: #5f7f4e; }
.gear-slot { margin-top: 6px; }
.gear-slot h4 { margin: 0 0 4px; font-size: 13px; }
.gear-row { display: flex; flex-wrap: wrap; gap: 6px; }
.game-card .gear-btn {
  justify-self: auto; margin: 0; display: inline-flex; align-items: center; gap: 6px;
  background: #fff; color: var(--ink); border: 2px solid transparent; font-weight: 600; padding: 6px 10px;
}
.game-card .gear-btn[aria-pressed="true"] { border-color: var(--accent); background: #fff3df; }
.game-card .gear-btn:disabled { background: #ebe4d8; color: #8a7f72; }
.gear-btn i { width: 12px; height: 12px; border-radius: 50%; display: inline-block; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.15); }

/* ---------- 🍢 모닥불 구워 먹기 ---------- */
.cook {
  position: fixed; left: 50%; bottom: calc(150px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  z-index: 6; width: min(340px, calc(100vw - 32px)); background: var(--paper); color: var(--ink);
  border-radius: 16px; padding: 12px 14px; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3); display: grid; gap: 8px;
}
.cook h3 { margin: 0; font-size: 15px; }
.cook-foods { display: flex; flex-wrap: wrap; gap: 6px; }
.cook-foods button, .cook-actions button { border: 0; border-radius: 10px; padding: 8px 10px; font-size: 14px; font-weight: 700; background: #f4efe6; color: var(--ink); }
.cook-actions { display: flex; gap: 6px; }
.cook-actions .primary { flex: 1; }
.cook-meter { position: relative; height: 16px; border-radius: 999px; background: linear-gradient(90deg, #f4efe6 0%, #f0d9a8 45%, #6fbf73 58%, #6fbf73 74%, #8a4b2a 86%, #2b2620 100%); overflow: hidden; }
.cook-meter i { position: absolute; top: -2px; bottom: -2px; width: 4px; background: var(--ink); border-radius: 2px; left: 0; }
.cook-hint { margin: 0; font-size: 12px; color: #6b6156; }

/* ---------- 🐶 반려견 이름 짓기 ---------- */
.dog-card { display: grid; gap: 10px; }
.dog-card h2 { margin: 0; font-size: 18px; }
.dog-breeds { display: flex; flex-wrap: wrap; gap: 6px; }
.dog-breeds .gear-btn { display: inline-flex; align-items: center; gap: 6px; border: 2px solid transparent; border-radius: 10px; padding: 6px 10px; background: #fff; color: var(--ink); font-weight: 600; font-size: 13px; }
.dog-breeds .gear-btn[aria-pressed="true"] { border-color: var(--accent); background: #fff3df; }
.dog-breeds .gear-btn i { width: 12px; height: 12px; border-radius: 50%; display: inline-block; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.2); }

/* ---------- 🏕️ 박지 인증샷 공모 ---------- */
.share-btn.contest { border-color: #5f7f4e; color: #3f6a35; }
.share-contest { display: grid; gap: 6px; margin: 8px 0; }
.share-caption { margin: 0; white-space: pre-wrap; font: 12.5px/1.5 var(--font); background: #fff; border-radius: 10px; padding: 8px 10px; color: var(--ink); user-select: all; max-height: 120px; overflow: auto; }

/* ---------- 👕 옷장 ---------- */
.closet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 8;
  max-height: 46vh; overflow-y: auto;
  background: var(--paper); color: var(--ink);
  border-radius: 20px 20px 0 0; box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.3);
  padding: 12px max(16px, env(safe-area-inset-right, 0px)) calc(14px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left, 0px));
  display: grid; gap: 10px;
}
.closet-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.closet-head h2 { margin: 0; font-size: 17px; }
.closet-head-actions { display: flex; gap: 6px; align-items: center; }
.closet-head-actions .primary { padding: 8px 14px; border-radius: 10px; }
.closet-tabs { display: flex; gap: 6px; overflow-x: auto; }
.closet-tabs button { border: 0; border-radius: 999px; padding: 7px 14px; font-size: 14px; font-weight: 700; background: #ebe4d8; color: var(--ink); flex: none; }
.closet-tabs button[aria-selected="true"] { background: var(--ink); color: #fff; }
.closet-body { display: grid; gap: 10px; }
.closet-items { display: flex; flex-wrap: wrap; gap: 6px; }
.closet-item { border: 2px solid transparent; border-radius: 12px; padding: 8px 12px; font-size: 13.5px; font-weight: 700; background: #fff; color: var(--ink); }
.closet-item[aria-pressed="true"] { border-color: var(--accent); background: #fff3df; }
.closet-colors { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch { width: 34px; height: 34px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15); }
.swatch[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--accent); }
.closet-hint { margin: 0; font-size: 12px; color: #6b6156; }

/* ---------- ☰ 위쪽 버튼: 큰 화면은 한 줄로, 핸드폰은 🎒·👕·☰ 세 개만 ---------- */
.more-menu { display: contents; }
.more-btn { display: none; }
.lbl-more { display: none; }
.main-chip { font-weight: 700; }

/* ---------- 🎣 갯바위 낚시 ---------- */
.fish-hud { position: fixed; inset: 0; z-index: 6; pointer-events: none; color: #fff; }
.fish-hud button { pointer-events: auto; }
.fish-top {
  position: absolute;
  top: calc(var(--below-top, 64px) + 6px);
  left: 50%;
  transform: translateX(-50%);
  display: grid;
  gap: 2px;
  text-align: center;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.55);
  width: min(460px, calc(100vw - 32px));
}
.fish-top b { font-size: 18px; }
.fish-sub { font-size: 12.5px; opacity: 0.92; }
.fish-msg {
  position: absolute;
  top: 24%;
  left: 50%;
  transform: translateX(-50%);
  font-size: clamp(20px, 6.4vw, 28px);
  font-weight: 900;
  width: max-content;
  max-width: calc(100vw - 32px);
  text-align: center;
  word-break: keep-all;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.55);
}
.fish-msg.pop { animation: fish-pop 0.35s ease-out; }
@keyframes fish-pop { from { transform: translateX(-50%) scale(1.35); } }
.fish-panel {
  position: absolute;
  left: 50%;
  bottom: calc(18px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: min(420px, calc(100vw - 24px));
  display: grid;
  gap: 8px;
  padding: 12px 14px 14px;
  border-radius: 20px;
  background: rgba(20, 24, 32, 0.55);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-line);
  pointer-events: auto;
}
.fish-meter-label { font-size: 12.5px; font-weight: 700; opacity: 0.9; }
.fish-meter { position: relative; height: 16px; border-radius: 999px; background: rgba(255, 255, 255, 0.18); overflow: hidden; }
.fish-meter.hidden { visibility: hidden; height: 0; }
.fish-meter i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: inherit; background: linear-gradient(90deg, #7fd36b, #ffd166, #ff6b3d); }
.fish-meter.tension { background: linear-gradient(90deg, rgba(255, 255, 255, 0.15) 0 80%, rgba(255, 75, 43, 0.55) 80% 100%); }
.fish-meter.tension i { background: #8fd3ff; }
.fish-meter.tension.danger i { background: #ff6b3d; }
.fish-dist { font-size: 13px; font-weight: 700; min-height: 0; }
.fish-dist:empty { display: none; }
.fish-btn {
  border: 0;
  border-radius: 16px;
  padding: 18px;
  font-size: 20px;
  font-weight: 900;
  color: #fff;
  background: var(--accent);
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
.fish-btn.wait { background: #4c5a72; }
.fish-btn.hot { background: #e0443a; animation: pulse 0.4s infinite; }
.fish-btn.reel { background: #2f7fb8; }
.fish-btn.reel:active { background: #24689a; transform: scale(0.98); }
.fish-over { position: absolute; top: 46%; left: 50%; transform: translate(-50%, -50%); width: min(320px, calc(100vw - 32px)); background: var(--paper); color: var(--ink); border-radius: 22px; padding: 18px 18px 14px; text-align: center; pointer-events: auto; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35); }
.fish-catch-icon { font-size: 64px; line-height: 1.1; }
.fish-catch-name { margin: 6px 0 2px; font-size: 21px; font-weight: 900; }
.fish-catch-note { margin: 0 0 12px; font-size: 13px; color: #6b6156; line-height: 1.45; }
.fish-hud .game-quit { top: calc(var(--below-top, 64px) + 6px); bottom: auto; left: 12px; }
body.fishing .ctx-chips, body.fishing #joystick, body.fishing #btn-jump, body.fishing #zoom, body.fishing .actions, body.fishing .log { display: none !important; }
.cook-foods .fish-food { background: #e6f1fb; }

/* ---------- 🎒 가방 ---------- */
.bag-card { max-width: 420px; padding: 18px 16px 14px; display: grid; gap: 10px; }
.bag-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.bag-head h2 { margin: 0; font-size: 20px; }
.bag-weight { font-size: 12px; color: #8a7f72; font-weight: 700; }
.bag-tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.bag-tabs button { flex: none; border: 0; border-radius: 999px; padding: 7px 12px; font-size: 13px; font-weight: 700; background: #ebe4d8; color: var(--ink); }
.bag-tabs button[aria-selected="true"] { background: var(--ink); color: #fff; }
.bag-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  padding: 8px;
  border-radius: 16px;
  background: #5b4a38;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.35);
  max-height: 46vh;
  overflow-y: auto;
}
.bag-slot {
  position: relative;
  aspect-ratio: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 4px 3px;
  border: 2px solid #8a7258;
  border-radius: 12px;
  background: linear-gradient(#efe4d0, #e2d3b8);
  color: var(--ink);
}
.bag-slot.empty { background: rgba(255, 255, 255, 0.07); border-color: rgba(255, 255, 255, 0.12); }
.bag-slot[aria-pressed="true"] { border-color: #ffd166; box-shadow: 0 0 0 2px #ffd166; }
.bag-icon {
  font-size: 26px;
  line-height: 1;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 60%, color-mix(in srgb, var(--tint, #fff) 45%, transparent), transparent 70%);
}
.bag-name { font-size: 10.5px; font-weight: 700; line-height: 1.15; text-align: center; max-width: 100%; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; word-break: keep-all; }
.bag-count { position: absolute; right: 4px; bottom: 2px; font-size: 11px; font-weight: 900; color: #fff; text-shadow: 0 1px 2px #000, 0 0 4px #000; }
.bag-tag { position: absolute; left: 3px; top: 3px; font-style: normal; font-size: 9px; font-weight: 800; padding: 1px 5px; border-radius: 6px; background: #5f7f4e; color: #fff; max-width: calc(100% - 6px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bag-detail { min-height: 64px; padding: 10px 12px; border-radius: 14px; background: #fff; font-size: 13px; color: #6b6156; }
.bag-detail.is-hint { display: grid; place-items: center; text-align: center; }
.bag-detail h3 { margin: 0 0 4px; font-size: 15px; color: var(--ink); }
.bag-detail p { margin: 0; line-height: 1.45; }
.bag-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.bag-actions button { background: #f4efe6; border-radius: 10px; color: var(--ink); font-weight: 700; font-size: 13px; padding: 7px 10px; }

/* ---------- 📸 자랑하기 (스토리) ---------- */
.share-card img { max-height: 52vh; width: auto; max-width: 100%; margin: 0 auto 10px; }
.share-story { display: grid; gap: 4px; margin-top: 6px; }
.share-story a { display: block; text-align: center; text-decoration: none; }
.closet-head-actions .share-story { background: #fff3df; color: var(--accent); font-weight: 800; border-radius: 10px; }
.closet-head-actions .ghost-light { padding: 8px 9px; }

/* ---------- 📱 핸드폰 화면 정리 ---------- */
@media (max-width: 560px) {
  .topbar { flex-direction: row; align-items: flex-start; gap: 8px; left: 12px; right: 12px; }
  .topbar > header { min-width: 0; flex: 1; }
  .place-info { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12px; }
  .place-elev { display: none; }
  .island-hud { flex-wrap: wrap; }
  .hud-right { flex-wrap: nowrap; position: relative; gap: 6px; }
  .hud-right .lbl { display: none; }
  .hud-right .main-chip { width: 40px; height: 40px; padding: 0; font-size: 18px; display: grid; place-items: center; }
  .more-btn { display: grid; }
  .more-menu {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 9;
    min-width: 168px;
    padding: 6px;
    border-radius: 16px;
    background: rgba(20, 24, 32, 0.82);
    backdrop-filter: blur(14px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
  }
  .more-menu.open { display: grid; gap: 4px; }
  .more-menu .chip { border: 0; background: transparent; text-align: left; border-radius: 10px; padding: 10px 12px; font-size: 14px; }
  .more-menu .chip:active { background: rgba(255, 255, 255, 0.12); }
  .lbl-more { display: inline; }
  #btn-log::after { content: ' 대화 기록'; }
  #btn-sound::after { content: ' 소리'; }
  .champ { flex-direction: row; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12px; max-width: 64vw; }
  .champ-label { font-size: 10px; white-space: nowrap; }
  .champ b { font-size: 11.5px; max-width: 34vw; }
  /* 아래 글: 최근 두 줄만 */
  .log .log-line:nth-last-child(n + 3) { display: none; }
  .log { bottom: calc(254px + env(safe-area-inset-bottom)); left: 12px; max-width: calc(100vw - 100px); }
  .ctx-chips { flex-wrap: wrap; justify-content: center; width: calc(100vw - 24px); bottom: calc(84px + env(safe-area-inset-bottom)); }
  .pack-chip { padding: 7px 12px; font-size: 12.5px; }
  .pack-chip.game { animation: none; box-shadow: 0 0 0 2px rgba(255, 209, 102, 0.5); }
}
/* 핸드폰은 두 손가락으로 확대·축소가 돼서 ＋/－ 버튼은 숨겨요 */
body.touch #zoom-in, body.touch #zoom-out { display: none; }
.closet-head-actions button { white-space: nowrap; }
@media (max-width: 560px) {
  .closet-head h2 { display: none; }
  .closet-head { justify-content: flex-end; }
  .closet-head-actions { width: 100%; }
  .closet-head-actions .primary { margin-left: auto; width: auto; }
  .closet { max-height: 48vh; }
}

/* ---------- ❓ 도움말 ---------- */
.help-card { max-width: 440px; padding: 18px 16px 14px; display: flex; flex-direction: column; gap: 10px; }
.help-head { display: flex; align-items: center; justify-content: space-between; }
.help-head h2 { margin: 0; font-size: 19px; }
.help-tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.help-tabs::-webkit-scrollbar { display: none; }
.help-tabs button {
  flex: none;
  border: 1px solid #ddd3c4;
  background: #fff;
  border-radius: 999px;
  padding: 7px 11px;
  font-size: 13px;
  font-weight: 700;
  color: #5c5248;
}
.help-tabs button[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.help-body { overflow-y: auto; max-height: min(62vh, 520px); display: grid; gap: 10px; }
.help-sec { background: #fff; border-radius: 14px; padding: 12px 14px; }
.help-sec + .help-sec { margin-top: 8px; }
.help-sec h3 { margin: 0 0 6px; font-size: 15px; }
.help-sub { margin: 0 0 6px; font-size: 12.5px; color: #8a7f72; line-height: 1.5; }
.help-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 7px; }
.help-list li { display: grid; gap: 1px; font-size: 13.5px; line-height: 1.45; }
.help-list li small { color: #7a7065; font-size: 12.5px; }
.help-list.plain li { display: list-item; list-style: '· '; margin-left: 12px; }
.help-text { resize: vertical; min-height: 84px; margin-bottom: 8px; font-size: 14px; }
.help-support { display: block; text-align: center; text-decoration: none; }
body.scenic .help-btn { display: none; }

@media (max-width: 560px) {
  /* 시작 안내는 위쪽 버튼·1등 배지를 가리지 않게 조이스틱·대화 줄 위에 */
  .hint {
    top: auto;
    bottom: calc(340px + env(safe-area-inset-bottom));
    white-space: normal;
    text-align: center;
    width: max-content;
    max-width: calc(100vw - 40px);
    line-height: 1.45;
  }
}

/* ---------- 🔑 내 캠프 코드 ---------- */
.camp-code { margin: 4px 0 10px; padding: 12px; border-radius: 12px; background: #f4ede2; text-align: center; font-size: 24px; font-weight: 900; letter-spacing: 0.12em; font-variant-numeric: tabular-nums; user-select: all; }
.help-sec .text-input + .primary { margin-top: 8px; }
.restore-link { display: block; width: 100%; margin-top: 8px; font-size: 13px; color: #7a6a58; text-decoration: underline; }
.restore-box { display: grid; gap: 8px; margin-top: 6px; }

/* 알림은 창(도움말·시작 화면) 위에도 보여요 */
.toast { z-index: 20; }

/* ---------- 📸 다 같이 찍기 ---------- */
.zoom .group-shot { background: var(--accent); color: #fff; }
.photo-pick { text-align: center; display: grid; gap: 12px; }
.photo-pick h2 { margin: 0; font-size: 21px; }
.photo-pick-sub { margin: 0; font-size: 13px; color: #6b6156; line-height: 1.5; }
.photo-poses { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.photo-pose { display: grid; gap: 4px; place-items: center; border: 1px solid #ddd3c4; background: #fff; border-radius: 16px; padding: 14px 8px; font-size: 15px; }
.photo-pose span { font-size: 34px; }
.photo-pose:active { transform: scale(0.96); }
.photo-count {
  position: fixed; left: 50%; top: 38%; z-index: 15; transform: translate(-50%, -50%);
  font-size: 96px; font-weight: 900; color: #fff; pointer-events: none;
  text-shadow: 0 6px 24px rgba(0, 0, 0, 0.45);
}
.photo-count.pop { animation: photo-pop 0.5s ease-out; }
@keyframes photo-pop { from { transform: translate(-50%, -50%) scale(1.6); opacity: 0; } to { transform: translate(-50%, -50%) scale(1); opacity: 1; } }

/* ---------- 📖 방명록 ---------- */
.gb { background: #fff; border-radius: 14px; padding: 12px; display: grid; gap: 8px; text-align: left; }
.gb-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.gb-head b { font-size: 14.5px; }
.gb-head small { color: #8a7f72; font-size: 12px; white-space: nowrap; }
.gb-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; max-height: 190px; overflow-y: auto; }
.gb-list li { display: grid; grid-template-columns: auto 1fr auto; gap: 6px; align-items: baseline; font-size: 13px; padding: 6px 8px; border-radius: 10px; background: #f6f0e6; }
.gb-list li b { white-space: nowrap; max-width: 90px; overflow: hidden; text-overflow: ellipsis; }
.gb-list li small { color: #9a8f82; font-size: 11px; white-space: nowrap; }
.gb-list .gb-empty { display: block; background: transparent; color: #8a7f72; text-align: center; }
.gb-quick { display: flex; flex-wrap: wrap; gap: 6px; }
.gb-quick button { border: 1px solid #ddd3c4; background: #fffaf2; border-radius: 999px; padding: 6px 10px; font-size: 12.5px; }
.gb-row { display: flex; gap: 6px; }
.gb-row .text-input { flex: 1; min-width: 0; }
.gb-row .primary { width: auto; padding: 10px 14px; font-size: 14px; }
.gb-card { display: grid; gap: 12px; }
.gb-card h2 { margin: 0; font-size: 19px; }

/* ---------- 🛷 눈썰매 난이도 · 🏁 레이스 ---------- */
.sled-stars { font-style: normal; font-size: 22px; font-weight: 900; margin-left: 10px; color: #e0703a; }
.sled-pick { color: var(--ink); }
.sled-pick-row { display: grid; gap: 10px; margin-top: 6px; }
.sled-mode { display: grid; gap: 2px; text-align: left; border: 1px solid #ddd3c4; background: #fff; border-radius: 16px; padding: 14px 16px; }
.sled-mode b { font-size: 17px; }
.sled-mode small { color: #7a7065; font-size: 12.5px; }
.sled-board { margin: 8px 0 4px; padding: 0; list-style: none; display: grid; gap: 4px; font-size: 14px; text-align: left; }
.sled-board li { background: #f6f0e6; border-radius: 10px; padding: 6px 10px; }
.sled-board li.me { background: #ffe6c7; font-weight: 800; }
.race-card { display: grid; gap: 10px; text-align: center; }
.race-card h2 { margin: 0; font-size: 20px; }
.race-sub { margin: 0; font-size: 13px; color: #6b6156; }
.race-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; text-align: left; }
.race-list li { background: #fff; border-radius: 12px; padding: 10px 12px; font-weight: 700; }
.race-list li.empty { background: transparent; border: 1px dashed #ddd3c4; color: #a99d8f; font-weight: 500; }
.race-actions { display: grid; gap: 6px; }

/* ---------- 🌀 줄넘기 방식 ---------- */
.jr-modes { display: grid; gap: 10px; }

/* ---------- 😆 이모지 반응 · 🔥 불멍 타임 ---------- */
.zoom #btn-react.on { background: var(--accent); color: #fff; }
.react-bar {
  position: fixed; z-index: 6; left: 50%; transform: translateX(-50%);
  bottom: calc(150px + env(safe-area-inset-bottom));
  display: flex; gap: 4px; padding: 6px 8px; border-radius: 999px;
  background: rgba(255, 251, 243, 0.94); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}
.react-bar button { border: 0; background: transparent; font-size: 26px; width: 40px; height: 40px; border-radius: 50%; }
.react-bar button:active { background: rgba(0, 0, 0, 0.08); transform: scale(1.2); }
.fire-topic {
  position: fixed; z-index: 5; left: 50%; transform: translateX(-50%);
  top: calc(var(--below-top, 64px) + 44px);
  max-width: calc(100vw - 32px); text-align: center;
  background: rgba(43, 26, 14, 0.82); color: #ffe3b8; border-radius: 16px; padding: 8px 14px;
  box-shadow: 0 0 24px rgba(255, 140, 60, 0.45); display: grid; gap: 2px;
}
.fire-topic small { font-size: 11px; opacity: 0.8; }
.fire-topic b { font-size: 14px; line-height: 1.4; }
body.scenic .react-bar, body.scenic .fire-topic { display: none !important; }
@media (max-width: 560px) {
  /* 핸드폰: 조이스틱 위로 */
  .react-bar { bottom: calc(292px + env(safe-area-inset-bottom)); gap: 2px; padding: 5px 6px; }
  .react-bar button { width: 36px; height: 36px; font-size: 23px; }
}

/* ---------- 🌿 오늘의 클린 지수 ---------- */
.clean-chip { display: inline-block; margin-top: 6px; border: 0; background: rgba(76, 175, 80, 0.85); color: #fff; font-weight: 800; cursor: pointer; }
body.scenic .clean-chip { display: none; }

/* ---------- ⛄ 눈싸움 · ❄️ 설동 ---------- */
#btn-snowthrow { background: #3f7fbf; color: #fff; }

/* ---------- 👤 접속자 수 (오른쪽 위) ---------- */
.sub-row { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.people-chip {
  border: 0; border-radius: 999px; padding: 5px 10px; font-size: 12.5px; font-weight: 700; white-space: nowrap;
  background: rgba(20, 24, 32, 0.6); color: #fff; backdrop-filter: blur(8px); cursor: pointer;
}
.people-chip b { font-size: 14px; font-variant-numeric: tabular-nums; }
body.scenic .people-chip { display: none; }

/* ---------- 📱 아래쪽 겹침 정리: 칩 높이(--chips-h)만큼 조이스틱·점프·대화 줄을 올려요 ---------- */
@media (max-width: 560px) {
  .ctx-chips { max-width: calc(100vw - 24px); }
  .joystick, .touch-jump { bottom: calc(96px + var(--chips-h, 0px) + 10px + env(safe-area-inset-bottom)); }
  .log { bottom: calc(96px + var(--chips-h, 0px) + 132px + env(safe-area-inset-bottom)); }
  .react-bar { bottom: calc(96px + var(--chips-h, 0px) + 128px + env(safe-area-inset-bottom)); }
  /* 📸·🤳·😆 버튼 줄은 점프 버튼 바로 위에 (칩이 많아져도 겹치지 않게 같이 올라가요) */
  .zoom { top: auto; transform: none; bottom: calc(96px + var(--chips-h, 0px) + 10px + 64px + 14px + env(safe-area-inset-bottom)); }
  .toast { font-size: 13px; padding: 8px 14px; max-width: calc(100vw - 48px); }
}

/* ---------- 🎁 잠긴 꾸미기 ---------- */
.closet-item.locked { opacity: 0.6; display: inline-grid; gap: 1px; text-align: center; }
.closet-item.locked small { font-size: 10.5px; color: #8a7f72; font-weight: 600; }

/* ---------- 👑🔥 줍깅왕의 불 ---------- */
.royal-chip { background: linear-gradient(90deg, #ffd84a, #ff9a3d); color: #3a2c10; font-weight: 900; border: 0; box-shadow: 0 0 14px rgba(255, 190, 60, 0.7); }

/* 🛒 텐트 상점 */
.game-card .shape-wallet { margin: 4px 0 8px; font-size: 13px; font-weight: 700; color: #3d5a40; }
.game-card .shape-btn.shop { border-style: dashed; background: #f4fbf1; }

/* ✈️ 비행 장면 */
.flight { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; background: linear-gradient(#7fb6e6, #d9ecf8 70%, #f4f8fb); animation: flight-in 0.6s ease; }
.flight-sky { position: relative; width: min(92vw, 520px); height: 220px; text-align: center; color: #1f3550; }
.flight-sky b { display: block; margin-top: 140px; font-size: 20px; }
.flight-sky small { display: block; margin-top: 6px; font-size: 14px; opacity: 0.8; }
.flight-plane { position: absolute; left: -10%; top: 40px; font-size: 64px; animation: flight-go 3.2s ease-in-out forwards; }
.flight-sky::before, .flight-sky::after { content: '☁️'; position: absolute; font-size: 54px; opacity: 0.9; animation: flight-cloud 3.2s linear forwards; }
.flight-sky::before { top: 10px; right: 0; }
.flight-sky::after { top: 90px; right: 30%; font-size: 40px; }
@keyframes flight-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes flight-go { from { transform: translate(0, 30px) rotate(-8deg); } to { transform: translate(calc(min(92vw, 520px) + 40px), -10px) rotate(0); } }
@keyframes flight-cloud { from { transform: translateX(0); } to { transform: translateX(-260px); } }
.game-card .shape-btn .shape-thumb { display: block; width: 100%; max-width: 120px; height: auto; aspect-ratio: 16 / 11; margin: 0 auto 2px; border-radius: 8px; background: #efe7d8; }
.game-card .shape-btn:disabled .shape-thumb { filter: grayscale(0.7) opacity(0.6); }

/* 🗺️ 입장 화면 장소 고르기 */
.place-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.place-btn { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 7px 2px; border: 2px solid #e3d9c8; border-radius: 12px; background: #fffaf1; cursor: pointer; font: inherit; color: #3b3328; }
.place-btn i { font-style: normal; font-size: 22px; line-height: 1.1; }
.place-btn b { font-size: 12.5px; }
.place-btn small { font-size: 10.5px; opacity: 0.7; white-space: nowrap; }
.place-btn[aria-pressed="true"] { border-color: var(--accent, #d9542b); background: #fff1dc; }

/* ✈️ 비행 중 화면: 위쪽 노선 이름 + 진행 막대 + 건너뛰기 */
.flight-hud { position: fixed; left: 50%; top: calc(env(safe-area-inset-top, 0px) + 64px); transform: translateX(-50%); z-index: 30; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 16px; border-radius: 16px; background: rgba(20, 38, 60, 0.72); color: #fff; min-width: 240px; }
.flight-hud b { font-size: 15px; }
.flight-bar { width: 100%; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.25); overflow: hidden; }
.flight-bar i { display: block; height: 100%; width: 0; background: #8fd0ff; transition: width 0.2s linear; }
.flight-hud button { border: 0; border-radius: 10px; padding: 4px 12px; background: rgba(255, 255, 255, 0.18); color: #fff; font: inherit; font-size: 12.5px; cursor: pointer; }
body.in-flight .pack-chip, body.in-flight #joystick, body.in-flight #btn-jump { display: none !important; }
body.in-flight #actions, body.in-flight #log { display: none !important; }

/* 🏕️ 사이트 꾸미기: 아래쪽 시트 (위로 게임이 보이고, 걸어 다닐 수 있어요) */
.decor-overlay { background: transparent; pointer-events: none; align-items: flex-end; }
.decor-card { pointer-events: auto; width: min(560px, 100vw); max-height: 52vh; overflow-y: auto; margin: 0 auto calc(env(safe-area-inset-bottom, 0px) + 8px); padding: 14px 14px 12px; border-radius: 18px; }
.decor-card h2 { margin: 0 0 4px; font-size: 17px; }
.decor-sub { margin: 0 0 8px; font-size: 12px; color: #6a5f52; }
.decor-warn { margin: 0 0 8px; font-size: 12.5px; color: #b0482b; font-weight: 700; }
.decor-row { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-top: 1px solid #efe6d8; }
.decor-row img { width: 64px; height: 44px; border-radius: 8px; background: #efe7d8; flex: none; }
.decor-info { flex: 1; min-width: 0; }
.decor-info b { display: block; font-size: 13.5px; }
.decor-info small { display: block; font-size: 11px; color: #7a6f62; line-height: 1.3; }
.decor-ctrl { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; max-width: 46%; }
.decor-btn { border: 1.5px solid #e3d9c8; border-radius: 10px; background: #fffaf1; padding: 5px 8px; font: inherit; font-size: 12px; cursor: pointer; white-space: nowrap; }
.decor-btn.buy { background: #f4fbf1; border-color: #9fd0a3; }
.decor-card .primary { width: 100%; margin-top: 10px; }
.overlay.decor-overlay { place-items: end center; display: grid; }
.decor-card { background: #fffaf2 !important; }
.decor-sec { margin: 10px 0 2px; font-size: 14px; color: #3d5a40; }
.decor-btn.on { background: #fff1dc; border-color: #e0a33a; }

/* 🗓️ 오늘의 캠핑 루틴 */
.routine-chip { background: rgba(255, 244, 222, 0.94); color: #6a4a1e; }
.routine-chip.done { background: #ffe7a8; }
.routine-card { width: min(420px, 92vw); }
.routine-card h2 { margin: 0 0 4px; }
.routine-card h3 { margin: 14px 0 2px; font-size: 15px; }
.routine-card h3 small { color: #8a7f72; font-weight: 600; }
.routine-sub { margin: 0 0 8px; font-size: 12px; color: #6a5f52; }
.routine-list { list-style: none; margin: 0; padding: 0; }
.routine-list li { display: flex; align-items: center; gap: 8px; padding: 7px 4px; border-top: 1px solid #efe6d8; }
.routine-list li span { width: 24px; text-align: center; }
.routine-list li b { flex: 1; font-size: 13.5px; }
.routine-list li small { color: #8a7f72; font-weight: 700; }
.routine-list li.ok b { color: #3d5a40; }
.routine-card .primary { width: 100%; margin-top: 12px; }

/* 🏪 후모톳바라 매점 메뉴 */
.menu-icon { width: 44px; height: 44px; display: grid; place-items: center; font-size: 26px; border-radius: 10px; background: #fff1dc; flex: none; }
/* 🪁 연날리기 */
.kite-hud { position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom, 0px) + 18px); transform: translateX(-50%); z-index: 30; width: min(360px, 92vw); padding: 10px 12px; border-radius: 16px; background: rgba(255, 250, 242, 0.95); text-align: center; }
.kite-top { display: flex; justify-content: space-between; align-items: baseline; }
.kite-h { font-size: 24px; color: #2f62a8; }
.kite-t { color: #6a5f52; font-weight: 700; }
.kite-bar { height: 8px; margin: 6px 0 4px; border-radius: 4px; background: #e8e0d2; overflow: hidden; }
.kite-bar i { display: block; height: 100%; width: 0; background: #7fd08a; transition: width 0.15s linear; }
.kite-tip { display: block; font-size: 11.5px; color: #7a6f62; margin-bottom: 6px; }
.kite-btns { display: flex; gap: 8px; }
.kite-btns button { flex: 1; padding: 14px 6px; border: 0; border-radius: 12px; font: inherit; font-weight: 800; font-size: 15px; cursor: pointer; touch-action: none; user-select: none; }
.kite-out { background: #2f62a8; color: #fff; }
.kite-pull { background: #f2c230; color: #3b3328; }
body:has(.kite-hud) #actions, body:has(.kite-hud) .pack-chip, body:has(.kite-hud) #joystick { display: none !important; }
/* ✕ 창 닫기: 아래까지 내리지 않아도 오른쪽 위에서 바로 닫아요 */
.x-close { position: sticky; top: 0; float: right; z-index: 5; width: 36px; height: 36px; margin: -6px -6px 0 8px; border: 0; border-radius: 50%; background: rgba(60, 50, 40, 0.12); color: #3b3328; font-size: 18px; font-weight: 800; line-height: 36px; text-align: center; cursor: pointer; }
.x-close:active { background: rgba(60, 50, 40, 0.25); }
/* 🎮 게임 중엔 게임 버튼만 */
body.game-focus .pack-chip, body.game-focus #actions, body.game-focus #react-bar, body.game-focus #btn-react, body.game-focus #log, body.game-focus .mini-chip, body.game-focus #people-chip { display: none !important; }
/* 👆 버튼끼리 잘못 눌리지 않게 조금 더 크게·띄워서 */
.pack-chip { min-height: 38px; padding: 8px 15px; }

/* 👥 꽉 찼어요 */
.room-full { width: min(400px, 92vw); text-align: center; }
.room-full-maps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0; }

/* 💬 말할 땐 입력창·보내기만: 다른 버튼은 잠깐 숨기고, 뒤 화면은 어둡게 덮어서 텐트·응가가 안 눌려요 */
.type-dim { position: fixed; inset: 0; z-index: 5; background: rgba(10, 14, 20, 0.35); }
body.type-focus .chatbar { z-index: 7; bottom: calc(14px + env(safe-area-inset-bottom)); }
body.type-focus #log { z-index: 7; bottom: calc(70px + env(safe-area-inset-bottom)) !important; }
body.type-focus #actions, body.type-focus .pack-chip, body.type-focus #joystick, body.type-focus #btn-jump, body.type-focus #react-bar, body.type-focus #btn-react, body.type-focus #hint, body.type-focus #zoom, body.type-focus .ctx-chips, body.type-focus #btn-photo-group, body.type-focus .float-btn { display: none !important; }
.chatbar .chat-x { background: rgba(255, 255, 255, 0.85); color: #3b3328; padding: 0 12px; font-size: 16px; }

/* 🦀 갯벌 체험 */
.mudflat { position: fixed; inset: 0; z-index: 40; display: flex; flex-direction: column; background: #3a3128; }
.mf-head { display: flex; align-items: center; gap: 10px; padding: calc(env(safe-area-inset-top, 0px) + 10px) 14px 6px; color: #fff; }
.mf-head b { font-size: 17px; }
.mf-time { font-weight: 800; color: #ffd166; }
.mf-bag { flex: 1; text-align: right; font-weight: 700; }
.mf-quit { border: 0; border-radius: 10px; padding: 6px 12px; background: rgba(255, 255, 255, 0.18); color: #fff; font: inherit; }
.mf-tip { margin: 0 14px 6px; color: #e8dcc6; font-size: 12.5px; }
.mf-field { position: relative; flex: 1; margin: 0 10px calc(env(safe-area-inset-bottom, 0px) + 10px); border-radius: 18px; overflow: hidden;
  background: radial-gradient(circle at 20% 30%, #7a6c5c 0 8%, transparent 9%), radial-gradient(circle at 70% 60%, #6c5f50 0 10%, transparent 11%), radial-gradient(circle at 45% 80%, #8a7c6a 0 7%, transparent 8%), linear-gradient(160deg, #6a5b4b, #4f4337); }
.mf-hole { position: absolute; width: 64px; height: 40px; margin: -20px 0 0 -32px; border: 0; border-radius: 50%; background: radial-gradient(ellipse at center, #2f2822 0 35%, #4a3f34 60%, transparent 70%); font-size: 28px; line-height: 40px; touch-action: none; }
.mf-hole.on { animation: mf-bub 0.8s ease-in-out infinite alternate; }
@keyframes mf-bub { from { transform: translateY(0); } to { transform: translateY(-4px); } }
.mf-crab { position: absolute; margin: -22px 0 0 -22px; width: 44px; height: 44px; border: 0; background: none; font-size: 34px; touch-action: none; }
.mf-pop { position: absolute; transform: translate(-50%, -110%); color: #ffd166; font-weight: 800; font-size: 14px; pointer-events: none; animation: mf-pop 0.7s ease-out forwards; white-space: nowrap; }
@keyframes mf-pop { to { transform: translate(-50%, -220%); opacity: 0; } }

/* ♨️ 온천 모드: 온천 메뉴만, 나머지는 잠깐 숨겨요 */
body.bath-mode #actions, body.bath-mode .pack-chip, body.bath-mode #joystick, body.bath-mode #btn-jump, body.bath-mode #react-bar, body.bath-mode #zoom, body.bath-mode #hint, body.bath-mode .ctx-chips, body.bath-mode #log { display: none !important; }
.bath-hud { position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom, 0px) + 14px); transform: translateX(-50%); z-index: 20; width: min(440px, calc(100vw - 24px)); padding: 8px 8px 8px; border-radius: 18px; background: rgba(255, 250, 244, 0.9); box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25); }
.bath-top { display: flex; align-items: baseline; justify-content: space-between; margin: 0 4px 6px; }
.bath-top b { font-size: 16px; color: #3b3328; }
.bath-state { color: #b0482b; font-weight: 700; font-size: 12px; }
.bath-acts { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; }
.bath-acts button { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 6px 0; border: 0; border-radius: 12px; background: #fff1e6; font: inherit; font-size: 10.5px; letter-spacing: -0.03em; white-space: nowrap; font-weight: 700; color: #3b3328; cursor: pointer; }
.bath-acts button i { font-style: normal; font-size: 22px; }
.bath-acts .bath-out { background: #e8eef6; }
/* 🪨 갯벌 돌멩이 거품: 살짝 회색 · 파면 화면이 진흙에 퍽 */
.mf-hole.rock { font-size: 20px; letter-spacing: -6px; }
.mudflat.mf-splash .mf-field { animation: mf-splash 0.35s ease-out; }
@keyframes mf-splash { 0%, 100% { transform: translateX(0); filter: none; } 25% { transform: translateX(-6px); filter: brightness(0.7); } 60% { transform: translateX(5px); } }
/* 💬 폰에서도 대화 줄은 조이스틱 위로 (칩이 많아지면 같이 올라가요) */
@media (max-width: 560px) {
  body.touch .log { bottom: calc(96px + var(--chips-h, 0px) + 132px + env(safe-area-inset-bottom)); }
}

/* 🎮 게임 메뉴 탭 · 🏕️ 옷장 캠핑 장비 탭 */
.games-tabs { margin: 2px 0 8px; }
.closet-body .game-card { margin-top: 10px; }
.gear-slots { display: grid; gap: 8px; }
/* 👕 옷장: 캐릭터와 옷장 판만 (위쪽 칩·대화 줄·버튼은 잠깐 숨겨요) */
body.closet-open .mini-chip, body.closet-open .people-chip, body.closet-open #log, body.closet-open #zoom, body.closet-open #btn-jump, body.closet-open #joystick, body.closet-open .ctx-chips, body.closet-open #react-bar, body.closet-open #hint, body.closet-open .leader-banner, body.closet-open .sub-row, body.closet-open #info { display: none !important; }
.closet-head { flex-wrap: wrap; }
.closet-head-actions { flex-wrap: wrap; justify-content: flex-end; }
/* 고르는 칸: 테두리를 또렷하게, 고른 건 진하게 채워서 ✓ */
.closet-item { border: 2px solid #ddd2c0; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06); }
.closet-item[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: #fff; }
.closet-item[aria-pressed="true"]::before { content: '✓ '; }
.swatch { box-shadow: 0 0 0 1.5px rgba(0, 0, 0, 0.25); }
.swatch[aria-pressed="true"] { box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--ink); }
/* ♨️ 온천: 위쪽 칩도 숨기고, 온천 메뉴는 화면 아래에 따로 (3D 화면을 덮지 않아요) */
body.bath-mode .mini-chip, body.bath-mode .sub-row, body.bath-mode .people-chip, body.bath-mode #info, body.bath-mode #routine-chip { display: none !important; }
body.bath-mode .bath-hud { left: 0; right: 0; bottom: 0; transform: none; width: auto; border-radius: 18px 18px 0 0; background: #fffaf4; padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 10px); box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.2); }
/* 🛷 3D 썰매: 반짝 메시지 (⭐ +1 등) */
.sled-pop { position: absolute; left: 50%; top: 52%; transform: translate(-50%, -20px); font-size: 30px; font-weight: 900; color: #e0703a; text-shadow: 0 2px 0 #fff, 0 0 12px rgba(255, 255, 255, 0.8); pointer-events: none; white-space: nowrap; }
/* 🪨 물수제비 · 🍡 마시멜로 챌린지: 화면 하나짜리 게임 */
.mg { position: fixed; inset: 0; z-index: 40; touch-action: none; color: #fff; }
.mg-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.mg-head { position: absolute; left: 0; right: 0; top: 0; display: flex; align-items: center; gap: 10px; padding: calc(env(safe-area-inset-top, 0px) + 12px) 14px 8px; }
.mg-head b { font-size: 17px; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4); }
.mg-score { flex: 1; text-align: right; font-weight: 900; font-size: 18px; color: #ffe08a; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5); }
.mg-quit { border: 0; border-radius: 10px; padding: 6px 12px; background: rgba(255, 255, 255, 0.2); color: #fff; font: inherit; }
.mg-tip { position: absolute; left: 50%; bottom: calc(env(safe-area-inset-bottom, 0px) + 104px); transform: translateX(-50%); width: min(420px, calc(100vw - 32px)); margin: 0; text-align: center; font-size: 14px; font-weight: 700; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6); pointer-events: none; }
.mg-btn { position: absolute; left: 50%; bottom: calc(env(safe-area-inset-bottom, 0px) + 28px); transform: translateX(-50%); min-width: 220px; padding: 16px 24px; border: 0; border-radius: 999px; background: #e0703a; color: #fff; font: inherit; font-size: 18px; font-weight: 900; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35); touch-action: none; }
.mg-btn:active { transform: translateX(-50%) scale(0.95); }
.mg-over { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(360px, calc(100vw - 40px)); padding: 20px; border-radius: 20px; background: rgba(255, 250, 244, 0.96); color: #3b3328; text-align: center; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4); }
.mg-over h3 { margin: 0 0 6px; font-size: 20px; }
.mg-over p { margin: 4px 0; font-size: 13.5px; color: #6b6156; }
.mg-over-row { display: flex; gap: 8px; justify-content: center; margin-top: 14px; }
.cook-foods .cook-challenge { grid-column: 1 / -1; background: #e0703a; color: #fff; font-weight: 800; }
/* 🧹 줍깅 타임어택 */
.rush-hud { position: fixed; left: 50%; top: calc(env(safe-area-inset-top, 0px) + 64px); transform: translateX(-50%); z-index: 9; display: flex; align-items: center; gap: 12px; padding: 8px 16px; border-radius: 999px; background: rgba(255, 250, 244, 0.94); color: #3b3328; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25); }
.rush-hud b { font-size: 26px; font-variant-numeric: tabular-nums; min-width: 34px; text-align: center; }
.rush-hud.hurry b { color: #d8352a; }
.rush-score { font-weight: 900; font-size: 18px; }
.rush-combo { font-style: normal; font-weight: 900; color: #e0703a; }
.rush-quit { border: 0; border-radius: 999px; padding: 5px 10px; background: #ebe4d8; font: inherit; font-size: 12px; }
.mg-over-row button { flex: 1; }
.mg-ui { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.mg-pop { position: absolute; left: 50%; top: 40%; transform: translate(-50%, 0); font-size: 34px; font-weight: 900; color: #ffe08a; text-shadow: 0 2px 0 rgba(0, 0, 0, 0.35), 0 0 18px rgba(255, 200, 90, 0.8); pointer-events: none; white-space: nowrap; opacity: 0; }
.mg-head { background: linear-gradient(rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0)); }
.rush-pop { position: fixed; left: 50%; top: 42%; z-index: 9; transform: translate(-50%, 0); font-size: 30px; font-weight: 900; color: #ffe08a; text-shadow: 0 2px 0 rgba(0, 0, 0, 0.35), 0 0 14px rgba(255, 200, 90, 0.9); pointer-events: none; animation: rush-pop 0.9s ease-out forwards; }
@keyframes rush-pop { 0% { transform: translate(-50%, 10px) scale(0.6); opacity: 0; } 20% { transform: translate(-50%, 0) scale(1.15); opacity: 1; } 100% { transform: translate(-50%, -40px) scale(1); opacity: 0; } }
.rush-hud { background: linear-gradient(135deg, #fffaf0, #ffe9c7); border: 2px solid #f2c46b; }

/* 🎣 낚시: 고기가 달리는 방향 · 📏 잡아 올린 줄자 */
.fish-run { position: fixed; left: 50%; top: 32%; transform: translateX(-50%); z-index: 8; padding: 8px 16px; border-radius: 999px; background: rgba(216, 53, 42, 0.92); color: #fff; font-weight: 900; font-size: 15px; white-space: nowrap; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25); pointer-events: none; animation: fish-run 0.5s ease-in-out infinite alternate; }
.fish-run.good { background: rgba(61, 140, 80, 0.92); animation: none; }
.fish-run.left { margin-left: -24px; }
.fish-run.right { margin-left: 24px; }
@keyframes fish-run { from { filter: brightness(1); } to { filter: brightness(1.25); } }
.fish-ruler { position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom, 0px) + 28px); transform: translateX(-50%); z-index: 8; width: min(340px, calc(100vw - 32px)); padding: 12px 16px; border-radius: 18px; background: rgba(255, 250, 244, 0.95); color: #3b3328; text-align: center; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3); display: grid; gap: 4px; }
.fish-ruler b { font-size: 17px; }
.fish-ruler-bar { height: 14px; border-radius: 4px; background: repeating-linear-gradient(90deg, #f2c230 0 9px, #3b3328 9px 10px); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.2); animation: ruler-grow 0.8s ease-out; }
@keyframes ruler-grow { from { width: 0 !important; } }
.fish-ruler-cm { font-size: 30px; font-weight: 900; color: #e0703a; }
.fish-ruler small { color: #b08a1e; font-weight: 800; }
/* 📖 물고기 도감 */
.dex-card { max-width: 420px; }
.dex-card h2 small { font-size: 14px; color: #8a7f72; }
.dex-sub { margin: 0 0 10px; color: #b08a1e; font-weight: 800; font-size: 13px; }
.dex-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 12px; }
.dex-cell { display: grid; justify-items: center; gap: 1px; padding: 8px 2px; border: 2px solid #e2d8c8; border-radius: 14px; background: #fff; font: inherit; color: var(--ink); }
.dex-cell i { font-style: normal; font-size: 30px; }
.dex-cell b { font-size: 12.5px; }
.dex-cell small { font-size: 10.5px; color: #8a7f72; }
.dex-cell em { font-style: normal; font-size: 10px; color: #e0a81e; letter-spacing: -1px; }
.dex-cell.locked i { filter: brightness(0) opacity(0.35); }
.dex-cell.locked b { color: #b0a698; }
.dex-cell.rare { border-color: #f2c46b; background: #fff8e8; }

.rush-hud { position: fixed; overflow: hidden; }
.rush-fever { position: absolute; left: 0; bottom: 0; height: 4px; width: 0; background: linear-gradient(90deg, #ff6b6b, #ffd166, #6bd68a, #5aa0ff, #b56bff); }
.rush-hud.fever { background: linear-gradient(135deg, #fff1f7, #eef6ff); border-color: #b56bff; animation: rush-fever 0.4s ease-in-out infinite alternate; }
@keyframes rush-fever { from { box-shadow: 0 6px 20px rgba(181, 107, 255, 0.35); } to { box-shadow: 0 6px 26px rgba(255, 209, 102, 0.7); } }
/* ⛺ 텐트 안에서 밖 보기: 위쪽 칩·안내 줄은 잠깐 숨겨요 */
body.tent-pov .mini-chip, body.tent-pov .sub-row, body.tent-pov .ctx-chips, body.tent-pov #joystick, body.tent-pov #btn-jump, body.tent-pov #hint, body.tent-pov #zoom, body.tent-pov #log { display: none !important; }

/* 🎤 음성 메시지 */
.chat-voice, .chat-voice-off { flex: none; border: 0; border-radius: 999px; width: 40px; height: 40px; font-size: 18px; background: #f4efe6; touch-action: none; user-select: none; -webkit-user-select: none; }
.chat-voice.rec { background: #d8352a; color: #fff; animation: voice-rec 0.8s ease-in-out infinite alternate; }
@keyframes voice-rec { from { box-shadow: 0 0 0 0 rgba(216, 53, 42, 0.6); } to { box-shadow: 0 0 0 8px rgba(216, 53, 42, 0); } }

/* 🍡 마시멜로: 🔄 돌리기 · 😋 먹기 두 버튼 */
.mg-roast .mg-btn { left: 70%; min-width: 0; width: 42%; }
.mg-roast .mg-flip { left: 28%; background: #3d6fb3; }
.mg-roast .mg-over ~ .mg-flip { }

/* 🌅 노을 멍 자리: 풍경만 보이게 */
body.sunsit #actions, body.sunsit .pack-chip, body.sunsit #joystick, body.sunsit #btn-jump, body.sunsit #react-bar, body.sunsit #zoom, body.sunsit #hint, body.sunsit .ctx-chips, body.sunsit .mini-chip, body.sunsit .sub-row, body.sunsit .people-chip, body.sunsit #log { display: none !important; }
.sunsit-exit { position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom, 0px) + 24px); transform: translateX(-50%); z-index: 9; padding: 12px 22px; border: 0; border-radius: 999px; background: rgba(255, 250, 244, 0.9); color: #3b3328; font: inherit; font-weight: 800; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3); }
.sunsit-exit[hidden] { display: none; }

/* ❄️ 설동 안에서 쉬기 */
.cave-rest-bar { position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom, 0px) + 22px); transform: translateX(-50%); z-index: 9; display: flex; align-items: center; gap: 8px; padding: 8px 10px 8px 14px; max-width: calc(100vw - 16px); box-sizing: border-box; border-radius: 999px; background: rgba(240, 248, 255, 0.94); color: #1d3a55; font-weight: 800; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3); white-space: nowrap; }
.cave-rest-bar button { border: 0; border-radius: 999px; padding: 8px 12px; font: inherit; font-weight: 800; background: #dbe9f5; color: #1d3a55; }
.cave-rest-bar .cave-out { background: #1d3a55; color: #fff; }
body.cave-rest #actions { display: none !important; }
.decor-group { margin: 12px 0 4px; font-size: 14px; color: #6b6156; }
/* 🎣 감기: 초록 구간에서 감으면 빨라요 · ❗ 당기기 예고 */
.fish-meter.tension { background: linear-gradient(90deg, rgba(255, 255, 255, 0.15) 0 45%, rgba(90, 220, 120, 0.5) 45% 85%, rgba(255, 75, 43, 0.6) 85% 100%); }
.fish-meter.tension.zone i { background: #7dff9a; }
.fish-meter.tension.warn { animation: fish-shake 0.12s linear infinite; box-shadow: 0 0 0 2px #ff6b3d; }
@keyframes fish-shake { 50% { transform: translateX(3px); } }
/* 💓 입질 직전 화면 가장자리 어둡게 */
.fish-vignette { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 0.3s; background: radial-gradient(ellipse at 50% 55%, transparent 35%, rgba(0, 0, 0, 0.85) 100%); }
/* 챔질 판정 */
.fish-judge { position: absolute; top: 36%; left: 50%; transform: translate(-50%, -50%) scale(0.6); opacity: 0; pointer-events: none; font-size: 30px; font-weight: 900; width: max-content; max-width: calc(100vw - 32px); text-align: center; word-break: keep-all; text-shadow: 0 4px 20px rgba(0, 0, 0, 0.6); transition: opacity 0.2s, transform 0.25s; }
.fish-judge.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.fish-judge.perfect { color: #ffe066; font-size: 36px; }
.fish-judge.good { color: #b8f5c4; }
.fish-judge.late { color: #ffb0a0; font-size: 22px; }
/* 🎣 낚싯대 업그레이드 */
.rod-card { max-width: 420px; max-height: calc(100dvh - 40px); overflow-y: auto; }
.rod-card > button.ghost, .dex-card > button.ghost { width: 100%; padding: 10px; font-size: 14px; font-weight: 800; margin-bottom: 8px; }
.rod-list { display: grid; gap: 8px; margin-bottom: 10px; }
.rod-row { display: grid; gap: 6px; padding: 10px 12px; border: 2px solid #e2d8c8; border-radius: 14px; background: #fff; }
.rod-row.now { border-color: #e0703a; background: #fff4ea; }
.rod-row.done { opacity: 0.6; }
.rod-row.next { border-color: #2f62a8; box-shadow: 0 4px 14px rgba(47, 98, 168, 0.18); }
.rod-row.locked { opacity: 0.55; }
.rod-head { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 8px; }
.rod-head i { font-style: normal; font-size: 28px; text-align: center; }
.rod-head b { display: block; font-size: 15px; }
.rod-head small { display: block; font-size: 11.5px; color: #8a7f72; }
.rod-head em { font-style: normal; font-weight: 900; font-size: 13px; color: #e0703a; white-space: nowrap; }
.rod-need { display: grid; grid-template-columns: 1fr 64px 40px; align-items: center; gap: 6px; font-size: 12.5px; }
.rod-need small { text-align: right; font-weight: 800; color: #8a7f72; }
.rod-need.ok span { color: #3f8a4a; font-weight: 800; }
.rod-bar { height: 8px; border-radius: 99px; background: #eee6d8; overflow: hidden; }
.rod-bar i { display: block; height: 100%; background: linear-gradient(90deg, #7fd36b, #3f8a4a); }
.rod-row .primary { margin-top: 2px; }
.rod-row .primary:disabled { opacity: 0.55; filter: grayscale(0.6); }
.rod-lock { font-size: 12px; color: #8a7f72; }
.rod-tip { margin: 0 0 10px; font-size: 12px; color: #8a7f72; line-height: 1.5; }
.dex-cell.deep { background: #eef3f8; border-color: #b9c8d8; }
.dex-cell.deep.rare { border-color: #e8b84a; }
.rod-row.pick { cursor: pointer; }
.rod-row.done.pick { opacity: 0.85; }
.rod-card > .primary { width: 100%; margin-bottom: 8px; }

/* 🧹 줍기 버튼: 점프 버튼 바로 아래 (같은 자리에 고정) */
.touch-pick {
  position: fixed;
  right: 16px;
  bottom: calc(150px + env(safe-area-inset-bottom));
  z-index: 5;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 0;
  background: rgba(63, 138, 74, 0.92);
  color: #fff;
  font-size: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
  touch-action: manipulation;
  cursor: pointer;
}
.touch-pick[hidden] { display: none; }
.touch-pick small { font-size: 10px; font-weight: 800; }
.touch-pick:active { transform: scale(0.92); }
/* 터치 기기에선 점프를 한 칸 위로 올리고 그 아래에 줍기 */
body.touch .touch-jump { bottom: calc(150px + 74px + env(safe-area-inset-bottom)); }
@media (max-width: 560px) {
  body.touch .touch-jump { bottom: calc(96px + var(--chips-h, 0px) + 10px + 74px + env(safe-area-inset-bottom)); }
  .touch-pick { bottom: calc(96px + var(--chips-h, 0px) + 10px + env(safe-area-inset-bottom)); }
  /* 오른쪽 확대·사진·이모지 버튼도 같이 한 칸 위로 (점프와 안 겹치게) */
  body.touch .zoom { bottom: calc(96px + var(--chips-h, 0px) + 10px + 64px + 14px + 74px + env(safe-area-inset-bottom)); }
}
body.fishing #btn-pick, body.in-flight #btn-pick, body.game-focus #btn-pick, body.type-focus #btn-pick, body.bath-mode #btn-pick, body.closet-open #btn-pick, body.tent-pov #btn-pick, body.sunsit #btn-pick, body.scenic #btn-pick, body.cave-rest #btn-pick { display: none !important; }

/* 🛌 침낭 체험 */
body.bag-mode #actions, body.bag-mode .pack-chip, body.bag-mode #joystick, body.bag-mode #btn-jump, body.bag-mode #btn-pick, body.bag-mode #react-bar, body.bag-mode #zoom, body.bag-mode #hint, body.bag-mode .ctx-chips, body.bag-mode #log { display: none !important; }
.bag-hud { position: fixed; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 9; width: min(420px, calc(100vw - 24px)); padding: 12px; border-radius: 18px; background: rgba(246, 243, 234, 0.96); color: #2a2c31; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25); display: grid; gap: 8px; }
.bag-top { display: grid; text-align: center; }
.bag-top b { font-size: 15px; letter-spacing: 0.02em; }
.bag-top small { font-size: 11.5px; color: #7a7466; }
.bag-colors, .bag-acts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.bag-colors button, .bag-acts button { display: grid; justify-items: center; gap: 2px; padding: 7px 4px; border: 1.5px solid #ddd6c6; border-radius: 12px; background: #fff; font: inherit; font-size: 12px; color: #2a2c31; cursor: pointer; }
.bag-colors button i { width: 26px; height: 16px; border-radius: 8px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.15); }
.bag-colors button[aria-pressed="true"] { border-color: #2a2c31; background: #ece7da; font-weight: 800; }
.bag-acts button i { font-style: normal; font-size: 20px; }

/* 🪱 미끼 고르기 */
.bait-box { display: grid; gap: 6px; margin-bottom: 10px; padding-top: 4px; border-top: 1.5px dashed #e2d8c8; }
.bait-title { margin: 6px 0 2px; font-weight: 900; font-size: 14px; }
.bait-title small { font-weight: 700; font-size: 11.5px; color: #8a7f72; }
.bait-row { display: grid; grid-template-columns: 30px 1fr auto; grid-template-areas: "i t n" "i t buy"; align-items: center; gap: 2px 8px; padding: 8px 10px; border: 2px solid #e2d8c8; border-radius: 12px; background: #fff; cursor: pointer; }
.bait-row > i { grid-area: i; font-style: normal; font-size: 24px; text-align: center; }
.bait-row > div { grid-area: t; }
.bait-row b { display: block; font-size: 13.5px; }
.bait-row small { display: block; font-size: 11px; color: #8a7f72; line-height: 1.35; }
.bait-row > em { grid-area: n; font-style: normal; font-weight: 900; font-size: 12px; color: #3f8a4a; white-space: nowrap; justify-self: end; }
.bait-row.on { border-color: #3f8a4a; background: #f1f8ef; }
.bait-row.empty > em { color: #b0a594; }
.bait-buy { grid-area: buy; justify-self: end; border: 0; border-radius: 99px; padding: 4px 9px; background: #e0703a; color: #fff; font: inherit; font-size: 11.5px; font-weight: 800; cursor: pointer; white-space: nowrap; }

/* 👥 첫 화면 맵별 인원 */
.place-btn .place-now { display: block; font-style: normal; font-size: 10.5px; font-weight: 800; color: #9a907f; margin-top: 2px; }
.place-btn .place-now.on { color: #3f8a4a; }
/* 🔄 새 버전 알림 */
.update-bar { position: fixed; top: calc(10px + env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); z-index: 40; display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 14px; border-radius: 99px; background: #2b3a55; color: #fff; font-size: 13px; font-weight: 800; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3); white-space: nowrap; }
.update-bar button { border: 0; border-radius: 99px; padding: 6px 12px; background: #ffd166; color: #2b3a55; font: inherit; font-weight: 900; cursor: pointer; }
.update-bar button.x { background: transparent; color: #fff; padding: 6px 8px; }

/* 🛡️ 방명록 안전장치 */
.gb-warn { margin: 6px 0 0; font-size: 12px; font-weight: 800; color: #c8382f; }
.gb-rule { margin: 4px 0 0; font-size: 10.5px; color: #9a907f; }

/* 🌄 켜두는 모드 (경치 멍) */
body.ambient > *:not(#scene):not(.amb) { display: none !important; }
.amb { position: fixed; inset: 0; z-index: 30; color: #fff; user-select: none; -webkit-user-select: none; }
.amb-shade { position: absolute; inset: 0; background: #000; opacity: 0; pointer-events: none; }
.amb-title { position: absolute; left: 50%; top: calc(18px + env(safe-area-inset-top)); transform: translateX(-50%); display: grid; text-align: center; gap: 2px; text-shadow: 0 2px 12px rgba(0, 0, 0, 0.55); transition: opacity 1.2s; white-space: nowrap; }
.amb-title b { font-size: 18px; font-weight: 900; letter-spacing: 0.02em; }
.amb-title small { font-size: 12px; opacity: 0.9; }
.amb-bar { position: absolute; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); transform: translateX(-50%); display: flex; gap: 6px; padding: 6px; border-radius: 18px; background: rgba(20, 24, 34, 0.45); backdrop-filter: blur(6px); transition: opacity 1.2s; }
.amb-bar button { display: grid; justify-items: center; gap: 1px; min-width: 56px; padding: 6px 4px; border: 0; border-radius: 12px; background: rgba(255, 255, 255, 0.12); color: #fff; font: inherit; font-size: 11px; font-weight: 700; cursor: pointer; }
.amb-bar button i { font-style: normal; font-size: 18px; }
.amb-mix { position: absolute; left: 50%; bottom: calc(92px + env(safe-area-inset-bottom)); transform: translateX(-50%); width: min(320px, calc(100vw - 32px)); display: grid; gap: 8px; padding: 12px 14px; border-radius: 16px; background: rgba(20, 24, 34, 0.6); backdrop-filter: blur(6px); transition: opacity 1.2s; }
.amb-mix[hidden] { display: none; }
.amb-mix-row { display: grid; grid-template-columns: 96px 1fr; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; }
.amb-mix-row input { width: 100%; accent-color: #ffd166; }
/* 4초 동안 안 만지면 버튼·글자가 스르르 사라져요 (화면을 톡 누르면 다시) */
.amb.calm .amb-bar, .amb.calm .amb-mix, .amb.calm .amb-title { opacity: 0; pointer-events: none; }
.amb-night { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; gap: 6px; background: rgba(0, 0, 0, 0.92); opacity: 0; pointer-events: none; transition: opacity 20s; }
.amb-night.on { opacity: 1; pointer-events: auto; }
.amb-night b { font-size: 22px; }
.amb-night small { font-size: 12px; opacity: 0.6; }

/* 🌐 주소 이사 중 */
.move-cover { position: fixed; inset: 0; z-index: 100; display: grid; place-content: center; padding: 24px; text-align: center; background: #1d2b4c; color: #fff; font-size: 17px; font-weight: 800; }
/* 📱 아래 칩은 한 줄로만 (여러 개면 옆으로 밀어서 봐요) → 조이스틱·점프·줍기 자리가 안 움직여요 */
@media (max-width: 560px) {
  .ctx-chips { flex-wrap: nowrap; justify-content: safe center; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; padding: 2px 4px; }
  .ctx-chips::-webkit-scrollbar { display: none; }
  .ctx-chips .pack-chip { flex: 0 0 auto; }
}

/* 🛌 침낭 체험: 위쪽 HUD 도 다 숨기고(온천처럼) 아래는 한 줄 패널 */
body.bag-mode #topbar, body.bag-mode .sub-row, body.bag-mode .mini-chip, body.bag-mode .people-chip, body.bag-mode #info, body.bag-mode #routine-chip, body.bag-mode .champ, body.bag-mode .float-btn, body.bag-mode #btn-photo-group { display: none !important; }
.bag-hud { gap: 6px; padding: 8px; grid-template-columns: auto 1fr; align-items: center; }
.bag-hud .bag-colors { display: flex; gap: 6px; }
.bag-hud .bag-colors button { width: 46px; padding: 5px 2px; }
.bag-hud .bag-colors button i { width: 22px; height: 22px; border-radius: 50%; }
.bag-hud .bag-colors button span { font-size: 10.5px; }
.bag-hud .bag-acts { grid-template-columns: repeat(4, 1fr); gap: 5px; }
.bag-hud .bag-acts button { padding: 5px 2px; font-size: 10.5px; }
.bag-hud .bag-acts button i { font-size: 17px; }
/* 📸 인증샷: 캔버스와 워터마크만 */
body.bag-shot > *:not(#scene):not(.bag-mark) { display: none !important; }
.bag-mark { position: fixed; left: 50%; bottom: calc(26px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 50; display: grid; justify-items: center; gap: 2px; padding: 8px 16px; border-radius: 14px; background: rgba(246, 243, 234, 0.9); color: #2a2c31; text-align: center; pointer-events: none; }
.bag-mark b { font-size: 16px; letter-spacing: 0.16em; font-weight: 900; }
.bag-mark span { font-size: 10px; letter-spacing: 0.14em; font-weight: 800; color: #7f8f6a; }
.bag-mark em { font-style: normal; font-size: 10.5px; color: #8a7f72; margin-top: 2px; transition: opacity 0.6s; }
.bag-mark.quiet em { display: none; }
/* 🛌 색이 넷이라 동그라미만 (이름은 눌러서) */
.bag-hud .bag-colors { gap: 4px; }
.bag-hud .bag-colors button { width: 36px; padding: 6px 2px; }
.bag-hud .bag-colors button span { display: none; }
.bag-hud .bag-colors button i { width: 24px; height: 24px; }

/* 🎫 배·비행기 좌석 고르기 */
.seat-card { max-width: 400px; }
.seat-route { margin: -4px 0 10px; font-size: 13px; font-weight: 800; color: #6b6255; }
.seat-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.seat-opt { position: relative; display: grid; justify-items: center; align-content: start; gap: 3px; padding: 14px 8px 12px; border: 2px solid #e2d8c8; border-radius: 16px; background: #fff; font: inherit; color: var(--ink); text-align: center; cursor: pointer; }
.seat-opt i { font-style: normal; font-size: 34px; }
.seat-opt b { font-size: 16px; }
.seat-opt em { font-style: normal; font-weight: 900; font-size: 13px; color: #3f8a4a; }
.seat-opt small { font-size: 11px; color: #8a7f72; line-height: 1.4; }
.seat-opt.first { border-color: #e8b84a; background: linear-gradient(160deg, #fffaf0, #fff1d0); box-shadow: 0 6px 18px rgba(232, 184, 74, 0.3); }
.seat-opt.first em { color: #c8892a; }
.seat-badge { position: absolute; top: -10px; left: 50%; transform: translateX(-50%); padding: 2px 9px; border-radius: 99px; background: #e8b84a; color: #fff; font-size: 10.5px; font-weight: 900; white-space: nowrap; }
.seat-note { margin: 0 0 10px; font-size: 11.5px; color: #8a7f72; line-height: 1.5; }
.seat-card .seat-cancel { width: 100%; padding: 10px; font-size: 14px; }
/* ✈️ 비행 중엔 위쪽 칩·오른쪽 버튼도 숨겨요 (비행 안내와 안 겹치게) */
body.in-flight #topbar, body.in-flight .sub-row, body.in-flight #zoom, body.in-flight #btn-pick, body.in-flight .mini-chip { display: none !important; }
body.in-flight .toast { top: calc(env(safe-area-inset-top, 0px) + 176px); }
body.arriving #intro { visibility: hidden; }
/* ✈️ 비행기 도착 중: 접속 창 대신 하늘 화면 (비행 끝 화면과 이어져요) */
html.arriving-air #intro { visibility: hidden; }
html.arriving-air body::after { content: '🛬 도착했어요! 캠핑장으로 가는 중…'; position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; background: linear-gradient(#7fb6e6, #d9ecf8 70%, #f4f8fb); color: #1f3550; font: 700 18px Pretendard, sans-serif; }

/* 🛷 눈썰매 화면 전체: 길게 눌러도 글자 선택·복사 메뉴 안 뜨게 */
.sled-hud { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }

/* 🧊 설동 안 버튼: 핸드폰에서도 한 줄에 다 보이게 (글자·여백을 줄여요) */
@media (max-width: 560px) {
  .cave-rest-bar { gap: 4px; padding: 5px 6px; width: calc(100vw - 16px); justify-content: space-between; }
  .cave-rest-bar .cave-with { display: none; }
  .cave-rest-bar button { flex: 1 1 0; min-width: 0; padding: 8px 4px; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}

/* 🎒 설동에 짐 놓고 가기 */
.cave-leave-card { max-width: 420px; }
.cave-leave-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0; max-height: 52vh; overflow-y: auto; }
.cave-leave-item { display: grid; gap: 2px; padding: 10px 8px; border: 2px solid #dbe9f5; border-radius: 14px; background: #f6faff; font: inherit; color: #1d3a55; text-align: left; cursor: pointer; }
.cave-leave-item b { font-size: 14px; }
.cave-leave-item small { font-size: 11px; color: #6a7f93; }
.cave-item-act { position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom, 0px) + 84px); transform: translateX(-50%); z-index: 9; display: flex; align-items: center; gap: 6px; padding: 6px 8px 6px 12px; border-radius: 999px; background: rgba(29, 58, 85, 0.92); color: #fff; font-weight: 800; font-size: 13px; max-width: calc(100vw - 16px); box-sizing: border-box; white-space: nowrap; }
.cave-item-act span { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.cave-item-act button { border: 0; border-radius: 999px; padding: 7px 10px; font: inherit; font-weight: 800; background: #ffd27a; color: #1d3a55; flex: none; }

/* 🪨 큰말해변 돌탑 쌓기 */
.stone-hud { position: fixed; inset: 0; z-index: 40; background: #cfe6f2; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-action: none; }
.stone-hud[hidden] { display: none; }
.stone-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.stone-wind { position: absolute; top: calc(14px + env(safe-area-inset-top)); left: 12px; padding: 8px 12px; border-radius: 999px; background: rgba(255,255,255,0.9); font-weight: 900; font-size: 13px; color: #1d3a55; }
.stone-best { position: absolute; top: calc(14px + env(safe-area-inset-top)); right: 12px; max-width: 58vw; padding: 8px 12px; border-radius: 999px; background: #f2c230; font-weight: 900; font-size: 12px; color: #4a3a12; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stone-quit { position: absolute; top: calc(58px + env(safe-area-inset-top)); left: 12px; padding: 6px 10px; border: 0; border-radius: 999px; background: rgba(29,43,76,0.75); color: #fff; font: inherit; font-size: 11px; font-weight: 800; }
.stone-top { position: absolute; top: calc(58px + env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); text-align: center; color: #1d2b4c; pointer-events: none; }
.stone-top b { display: block; font-size: 46px; font-weight: 900; line-height: 1; }
.stone-top small { font-size: 13px; font-weight: 800; color: #4b5b72; }
.stone-tip { position: absolute; bottom: calc(104px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); padding: 8px 14px; border-radius: 14px; background: rgba(255,255,255,0.92); font-weight: 800; font-size: 13px; color: #33404e; white-space: nowrap; pointer-events: none; transition: transform 0.15s; }
.stone-tip.on { background: #fff1b8; transform: translateX(-50%) scale(1.08); }
.stone-drop { position: absolute; bottom: calc(26px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); padding: 18px 34px; border: 0; border-radius: 999px; background: #e0703a; color: #fff; font: inherit; font-size: 20px; font-weight: 900; box-shadow: 0 8px 22px rgba(224,112,58,0.45); white-space: nowrap; }
.stone-drop:active { transform: translateX(-50%) scale(0.95); }
.stone-over { position: absolute; bottom: calc(22px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); width: min(340px, 90vw); box-sizing: border-box; padding: 18px 16px 14px; border-radius: 22px; background: #fffaf0; box-shadow: 0 14px 40px rgba(0,0,0,0.25); text-align: center; color: #2b2620; }
.stone-over[hidden] { display: none; }
.stone-over h2 { margin: 0 0 4px; font-size: 22px; }
.stone-over p { margin: 2px 0; font-size: 13px; color: #6b6255; }
.stone-rank { margin: 10px 0; padding: 8px; border-radius: 12px; background: #fff1d0; font-weight: 900; font-size: 13px; color: #8a5a12; }
.stone-btns { display: flex; gap: 8px; margin-top: 10px; }
.stone-btns button { flex: 1; padding: 11px 0; border: 0; border-radius: 999px; background: #e0703a; color: #fff; font: inherit; font-weight: 900; font-size: 14px; }
.stone-btns button.ghost { background: #efe7da; color: #6b6255; }

/* ---------- 🧹 화면 정리: 상태 칩 한 줄 · 📸 하나로 · 😆 말 걸기 안 · 🐾 발도장 자동 ---------- */
.status-row { display: flex; align-items: center; gap: 4px; margin-top: 6px; flex-wrap: nowrap; }
.status-row .island-hud:not([hidden]) { display: contents; }
.status-row .mini-chip { margin: 0; font-size: 11px; padding: 3px 7px; }
#btn-ambient, #btn-group, #btn-react, .actions [data-act="stamp"] { display: none !important; }
.zoom-pick { position: absolute; right: calc(100% + 8px); bottom: 0; display: grid; gap: 6px; padding: 8px; border-radius: 16px; background: #fffaf0; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35); }
.zoom-pick[hidden] { display: none; }
.zoom .zoom-pick button { width: auto; height: auto; padding: 10px 12px; border-radius: 10px; background: #f1e8da; color: #2b2620; font: inherit; font-size: 13px; font-weight: 800; white-space: nowrap; box-shadow: none; }
body.type-focus #react-bar:not([hidden]) { display: flex !important; z-index: 7; bottom: calc(66px + env(safe-area-inset-bottom)); }
body.type-focus #log { bottom: calc(122px + env(safe-area-inset-bottom)) !important; }
.bag-closet { margin-left: auto; padding: 6px 12px; font-size: 13px; }

/* 🛒 장비 상점: ✕ 는 머리와 같이 올라가고, '다 꾸몄어요' 는 아래에 붙어 있어요 (장비 줄 버튼과 안 겹치게) */
.decor-card > .x-close { position: relative; }
.decor-card > .primary:last-child { position: sticky; bottom: -12px; z-index: 2; box-shadow: 0 -8px 12px #fffaf2; }

/* ⛺ OEL NYX 팝업존 카드: 검정 머리 · 실사진 넘겨 보기 · 상세 SPEC */
.pack-chip.nyx { background: #141416; color: #fff; border-color: #141416; }
.pack-chip.sierra { background: #f2b705; color: #1e1f22; border-color: #f2b705; }
/* 🏔️ 시에라 하프돔 다운 카드: 노랑 머리 · 검정 로고 */
.airlight-card.sierra-card .nyx-head { background: #f2b705; }
.sierra-card .sd-logo { height: 26px; width: auto; }
.airlight-card.sierra-card .nyx-head span { color: #1e1f22; font-weight: 800; letter-spacing: 0.12em; }
.sierra-card .nyx-buy { background: #1e1f22 !important; }
/* 공식몰 사진은 세로로 길어서 잘리지 않게 다 보여 줘요 */
.sierra-card .airlight-photo { aspect-ratio: 4 / 5; background: #fff; }
.sierra-card .airlight-photo img { object-fit: contain; }
.nyx-card { position: relative; width: min(420px, calc(100vw - 32px)); max-height: 86vh; overflow-y: auto; padding: 0 !important; background: #fff !important; }
.nyx-card > .x-close { position: absolute; top: 10px; right: 10px; margin: 0; background: rgba(255, 255, 255, 0.18); color: #fff; }
.nyx-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 54px 14px 18px; background: #141416; }
.nyx-head img { height: 22px; }
.nyx-head span { font-size: 11px; font-weight: 800; letter-spacing: 3px; color: #bdbdbd; }
.nyx-photos { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; background: #f3f3f1; scrollbar-width: none; }
.nyx-photos::-webkit-scrollbar { display: none; }
.nyx-photos img { flex: 0 0 100%; width: 100%; aspect-ratio: 1; object-fit: cover; scroll-snap-align: center; }
.nyx-dots { display: flex; justify-content: center; gap: 5px; padding: 8px 0 0; }
.nyx-dots i { width: 6px; height: 6px; border-radius: 50%; background: #d4d4d0; }
.nyx-dots i.on { width: 16px; border-radius: 3px; background: #141416; }
.nyx-body { padding: 6px 18px 16px; text-align: left; }
.nyx-body h2 { margin: 4px 0 0; font-size: 22px; letter-spacing: -0.3px; }
.nyx-tag { margin: 2px 0 6px; font-size: 11px; font-weight: 800; letter-spacing: 2px; color: #8a8a86; }
.nyx-price { display: block; font-size: 19px; }
.nyx-points { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 4px; }
.nyx-points span { padding: 5px 10px; border-radius: 999px; background: #f1f1ee; font-size: 12px; font-weight: 800; color: #2a2a2a; }
.nyx-body h3 { margin: 16px 0 6px; font-size: 13px; letter-spacing: 1px; }
.nyx-spec { display: grid; grid-template-columns: 88px 1fr; margin: 0; border-top: 2px solid #141416; font-size: 12.5px; }
.nyx-spec dt, .nyx-spec dd { margin: 0; padding: 8px 0; border-bottom: 1px solid #ececea; line-height: 1.45; }
.nyx-spec dt { font-weight: 800; color: #6b6b67; }
.nyx-spec dd { color: #1f1f1f; }
.nyx-buy { display: block; margin-top: 16px; text-align: center; text-decoration: none; background: #141416 !important; color: #fff !important; }
.nyx-body .ghost-light { width: 100%; margin-top: 6px; }
/* ☕ PC 후원 QR 카드 */
.support-qr { width: min(340px, calc(100vw - 32px)); text-align: center; }
.support-qr h2 { margin: 0 0 6px; }
.support-qr-sub { margin: 0 0 12px; color: #5a4630; line-height: 1.5; }
.support-qr-box { position: relative; display: inline-grid; place-items: center; padding: 10px; border-radius: 18px; background: #ffeb00; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12); }
.support-qr-box canvas { display: block; width: 200px; height: 200px; border-radius: 10px; image-rendering: pixelated; }
.support-qr-pay { margin-top: 6px; font-weight: 900; font-size: 13px; letter-spacing: 0.02em; color: #1d1d1f; }
.support-qr-amount { margin: 12px 0 0; font-size: 16px; }
.support-qr-note { margin: 10px 0 12px; font-size: 12px; color: #8a7a66; }
.support-qr button { width: 100%; margin-top: 6px; }
/* 🦆 오리 몰기 */
.duck-hud { position: fixed; top: calc(70px + env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); z-index: 40; display: flex; align-items: center; gap: 10px; padding: 6px 8px 6px 14px; border-radius: 999px; background: rgba(255, 252, 244, 0.94); box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18); font-weight: 900; font-size: 16px; color: #3a2a1a; white-space: nowrap; }
.duck-hud span { white-space: nowrap; }
/* 오리 몰기 중엔 1등 알림 띠는 잠깐 숨겨요 (시간표와 겹치지 않게) */
body:has(#duck-hud) .champ { display: none !important; }
.duck-hud .duck-time.low { color: #d4161f; }
.duck-hud button { border: 0; border-radius: 999px; padding: 5px 12px; background: #efe6d2; font-weight: 800; color: #5a4630; white-space: nowrap; font-size: 14px; }
.duck-rank { width: min(360px, calc(100vw - 32px)); }
.duck-rank h2 { margin: 0 0 4px; }
.duck-rank .duck-score { font-size: 30px; font-weight: 900; margin: 6px 0 2px; }
.duck-rank ol { margin: 10px 0 12px; padding: 0; list-style: none; display: grid; gap: 4px; }
.duck-rank li { display: flex; justify-content: space-between; padding: 6px 10px; border-radius: 10px; background: #f6f1e6; font-weight: 700; }
.duck-rank li.me { background: #ffe9a8; }
.duck-rank li b { margin-right: 8px; }
/* 🎬 촬영 모드: 버튼·글자 숨기고 조이스틱만 거의 투명하게 (걸으며 찍어요) */
.film-exit { position: fixed; top: calc(10px + env(safe-area-inset-top)); right: 10px; z-index: 60; display: none; width: 34px; height: 34px; border: 0; border-radius: 50%; background: rgba(0, 0, 0, 0.22); color: rgba(255, 255, 255, 0.75); font-size: 16px; }
body.film .film-exit { display: block; }
body.film .hud,
body.film .actions,
body.film .ctx-chips,
body.film .log,
body.film .champ,
body.film .zoom,
body.film .hint,
body.film .warp-menu,
body.film .trash-picker,
body.film .chatbar,
body.film .touch-pick,
body.film .touch-jump,
body.film #topbar,
body.film .toast-skip { display: none !important; }
body.film .joystick { opacity: 0.08; }
/* 🤍 꼴로르 에어라이트 720 카드 */
.airlight-card .nyx-head { background: #1d1d1f; }
.airlight-card .cc-logo { color: #f2f0ea; letter-spacing: 0.32em; font-weight: 600; }
.airlight-card .nyx-head span { color: #a7a29a; }
.airlight-photo { background: #f4f3ef; aspect-ratio: 1 / 1; display: grid; place-items: center; overflow: hidden; }
.airlight-photo img { width: 100%; height: 100%; object-fit: cover; }
.airlight-colors { display: flex; gap: 6px; justify-content: center; padding: 10px 12px 0; flex-wrap: wrap; }
.airlight-colors button { display: flex; align-items: center; gap: 6px; border: 1px solid #e2dfd6; background: #fff; border-radius: 999px; padding: 5px 10px 5px 6px; font-size: 12px; font-weight: 700; color: #3a3530; }
.airlight-colors button i { width: 16px; height: 16px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, 0.15); }
.airlight-colors button[aria-pressed="true"] { border-color: #1d1d1f; box-shadow: 0 0 0 1px #1d1d1f; }
/* 👋 친구 부르기 */
.invite-chip { margin-left: 6px; background: rgba(224, 112, 58, 0.92); }
body.scenic .invite-chip { display: none; }
.invite-pop {
  position: fixed; z-index: 60; top: calc(var(--below-top, 70px) + 10px); left: 50%; transform: translateX(-50%);
  width: min(340px, calc(100vw - 32px)); box-sizing: border-box; padding: 13px 14px;
  background: var(--paper); color: var(--ink); border-radius: 16px; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
}
.invite-pop b { display: block; font-size: 15.5px; }
.invite-pop small { display: block; margin-top: 3px; font-size: 12.5px; color: #7a6f62; }
.invite-pop div { display: flex; gap: 8px; margin-top: 10px; }
.invite-pop button { flex: 1; border: 0; border-radius: 10px; padding: 9px 0; font-weight: 800; font-size: 13px; }
.invite-pop .go { background: var(--accent); color: #fff; }
.invite-pop .later { background: #ece5d8; color: #5a5048; }
.invite-old { margin: 4px 0 12px; padding: 10px 12px; border-radius: 12px; background: #f2ece1; text-align: center; }
.invite-old p { margin: 0 0 8px; font-size: 12.5px; color: #6a5f52; }
.invite-old div { display: flex; gap: 6px; }
.invite-old a, .invite-old button { flex: 1; border: 0; border-radius: 10px; padding: 9px 4px; font-size: 12.5px; font-weight: 800; text-decoration: none; background: #fff; color: var(--ink); }
.invite-old a.go { background: var(--accent); color: #fff; }
.invite-sheet { align-items: flex-end; }
.invite-sheet .sheet { width: min(420px, 100vw); box-sizing: border-box; background: var(--paper); color: var(--ink); border-radius: 22px 22px 0 0; padding: 16px 16px calc(14px + env(safe-area-inset-bottom)); }
.invite-sheet .ttl { display: block; font-size: 16px; margin-bottom: 8px; }
.invite-sheet .msg { white-space: pre-line; background: #f2ece1; border-radius: 12px; padding: 10px 12px; font-size: 13px; line-height: 1.45; word-break: break-all; }
.invite-sheet .apps { display: flex; justify-content: space-around; margin: 14px 0 10px; }
.invite-sheet .app { border: 0; background: none; padding: 0; display: flex; flex-direction: column; align-items: center; gap: 5px; font-size: 11.5px; color: #5a5048; }
.invite-sheet .app i { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 14px; font-style: normal; font-size: 21px; font-weight: 900; color: #fff; }
.invite-sheet .kakao i { background: #fee500; color: #3a1d1d; }
.invite-sheet .insta i { background: linear-gradient(45deg, #f9b233, #e1306c, #833ab4); }
.invite-sheet .sms i { background: #4cd964; }
.invite-sheet .copy i { background: #8e8e93; }
.invite-sheet .more i { background: #3d6fb3; }
.invite-sheet .close { width: 100%; border: 0; border-radius: 12px; padding: 11px 0; background: #ece5d8; color: #5a5048; font-weight: 800; }
