/* ==========================================================
   CONY · Soft Seoul
   여행 지도 · cultural transit map
   ========================================================== */

:root {
  /* Lock light hanok palette regardless of OS dark-mode preference */
  color-scheme: light;
  /* warm paper neutrals */
  --paper: #f5efe4;
  --paper-2: #ede5d4;
  --paper-3: #fbf8f1;
  --ink: #2b251f;
  --ink-2: #5a4f43;
  --ink-3: #8a7f72;
  --hair: rgba(43, 37, 31, 0.10);
  --hair-2: rgba(43, 37, 31, 0.16);

  /* accents — sage / coral / gold */
  --sage: #7a8d6b;
  --sage-soft: #b6c1a2;
  --sage-bg: #e8ecdf;
  --coral: #d4775c;
  --coral-soft: #e8b5a3;
  --coral-bg: #f5e1d8;
  --gold: #b8924c;
  --gold-soft: #ddc497;
  --gold-bg: #f1e6cf;

  --display: 'Noto Serif KR', 'Cormorant Garamond', 'Apple SD Gothic Neo', serif;
  --sans: 'Noto Sans KR', 'Pretendard', -apple-system, 'Apple SD Gothic Neo', sans-serif;
  /* keep monospace for ticket/code alignment but list Korean fonts so CJK glyphs render in Noto */
  --mono: 'JetBrains Mono', 'Noto Sans KR', ui-monospace, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  width: 100%;
  height: 100%;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* iOS PWA safe-area (notch / dynamic island / home indicator) */
  overscroll-behavior: none;
  -webkit-tap-highlight-color: transparent;
}
/* respect iPhone safe area when running as PWA */
@supports (padding: env(safe-area-inset-top)) {
  body { padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom); }
}

#root {
  width: 100vw;
  height: 100vh;
  position: relative;
  overflow: hidden;
}

/* mobile: allow page-level vertical scroll so users can reach panels & deep-dive content */
@media (max-width: 760px) {
  html, body {
    height: auto;
    min-height: 100%;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  #root {
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }
}

button {
  font-family: inherit;
  border: none;
  background: none;
  cursor: pointer;
  color: inherit;
}

/* ---------------- background paper texture ---------------- */

.bg-paper {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 30% 20%, rgba(184, 146, 76, 0.06), transparent 60%),
    radial-gradient(ellipse 70% 60% at 80% 90%, rgba(122, 141, 107, 0.06), transparent 60%),
    var(--paper);
  pointer-events: none;
}

.bg-noise {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.4;
  background-image: radial-gradient(rgba(43,37,31,0.08) 0.5px, transparent 0.5px);
  background-size: 4px 4px;
  mix-blend-mode: multiply;
}

/* ---------------- top bar ---------------- */

.topbar {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  z-index: 60;
  background: linear-gradient(180deg, rgba(245, 239, 228, 0.95), rgba(245, 239, 228, 0));
  pointer-events: none;
}
.topbar > * { pointer-events: auto; }

.brand {
  display: flex;
  align-items: baseline;
  gap: 14px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 24px;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.brand-mark {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--coral);
  align-self: center;
  margin-right: 4px;
}
.brand-kr {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-3);
  letter-spacing: 0.04em;
  font-family: var(--sans);
}

/* Passport pill — shows player's current passport country in TopBar */
.passport-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: 10px;
  padding: 3px 8px 3px 6px;
  background: var(--gold-bg, rgba(184,146,76,0.10));
  border: 0.5px solid rgba(184,146,76,0.35);
  border-radius: 999px;
  font-size: 11px;
  font-family: 'JetBrains Mono', 'Noto Sans KR', monospace;
  letter-spacing: 0.04em;
  cursor: default;
  transition: background 0.18s ease;
}
.passport-pill:hover { background: var(--gold-bg, rgba(184,146,76,0.18)); }
.passport-pill .pp-flag { font-size: 14px; line-height: 1; }
.passport-pill .pp-code { color: var(--ink-2); font-weight: 700; }
.passport-pill .pp-tier {
  font-size: 9.5px;
  padding: 1px 5px;
  border-radius: 6px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.passport-pill .pp-tier[data-tier="1"] { background: #7ec78a; color: white; }
.passport-pill .pp-tier[data-tier="2"] { background: #b8924c; color: white; }
.passport-pill .pp-tier[data-tier="3"] { background: #d4a574; color: white; }
.passport-pill .pp-tier[data-tier="4"] { background: #c97b6a; color: white; }
.passport-pill .pp-tier[data-tier="5"] { background: #8a5444; color: white; }
@media (max-width: 640px) {
  .passport-pill { margin-left: 6px; padding: 2px 6px 2px 5px; }
  .passport-pill .pp-code { display: none; }
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.topbar-stat {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--ink-3);
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid var(--hair);
  border-radius: 999px;
}
.topbar-stat .v {
  color: var(--ink);
  font-weight: 500;
  margin-left: 6px;
}
.topbar-stat .v.warn { color: var(--coral); }
.topbar-stat .v.ok { color: var(--sage); }

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: var(--paper-3);
  border: 1px solid var(--hair);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--ink-2);
  transition: all 0.15s;
}
.icon-btn:hover {
  background: white;
  border-color: var(--hair-2);
  color: var(--ink);
}

/* TopBar Upgrade pill — only shown for free-tier players.
   Pulses + has the price inline so a single tap is enough to start payment. */
.topbar-upgrade-btn {
  height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--coral, #d4775c) 0%, #e89478 100%);
  color: white;
  border: 0;
  font-family: 'Noto Serif KR', serif;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.04em;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  box-shadow: 0 4px 18px rgba(212,119,92,0.45), 0 0 0 0 rgba(244,160,139,0.55);
  transition: transform 0.18s ease, filter 0.18s ease;
}
.topbar-upgrade-btn:hover { transform: translateY(-1px); filter: brightness(1.08); }
.topbar-upgrade-btn:active { transform: translateY(0); }
.topbar-upgrade-btn .tu-spark { font-size: 13px; line-height: 1; }
.topbar-upgrade-btn .tu-label { font-weight: 700; }
.topbar-upgrade-btn .tu-price {
  font-family: 'JetBrains Mono', 'Noto Sans KR', monospace;
  font-size: 12px;
  font-weight: 800;
  padding: 2px 8px;
  background: rgba(255,255,255,0.22);
  border-radius: 999px;
  letter-spacing: 0.02em;
}
.topbar-upgrade-btn.pulse {
  animation: topbarUpgradePulse 2.4s ease-in-out infinite;
}
@keyframes topbarUpgradePulse {
  0%, 100% {
    box-shadow: 0 4px 18px rgba(212,119,92,0.45), 0 0 0 0 rgba(244,160,139,0.55);
  }
  50% {
    box-shadow: 0 6px 24px rgba(212,119,92,0.55), 0 0 0 10px rgba(244,160,139,0);
  }
}
@media (max-width: 480px) {
  .topbar-upgrade-btn { height: 34px; padding: 0 10px; font-size: 12px; gap: 5px; }
  .topbar-upgrade-btn .tu-price { font-size: 11px; padding: 1px 6px; }
}

/* ---------------- map ---------------- */

.map-stage {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
}
.map-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* world map continents — soft Korean paper feel */
.world-map .continent {
  fill: #f3ede0;
  stroke: rgba(43, 37, 31, 0.18);
  stroke-width: 0.4;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.route-path {
  fill: none;
  stroke-width: 1.4;
}
.route-path.plane  { stroke: var(--coral); stroke-dasharray: 2 3; opacity: 0.8; }
.route-path.subway { stroke: var(--sage); opacity: 0.85; }
.route-path.bus    { stroke: var(--gold); stroke-dasharray: 4 2; opacity: 0.85; }
.route-path.ship   { stroke: #6c8088; stroke-dasharray: 1 3; opacity: 0.8; }

@keyframes routeDraw {
  from { stroke-dashoffset: 600; }
  to   { stroke-dashoffset: 0; }
}
.route-path.animate {
  stroke-dasharray: 600;
  animation: routeDraw 1.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* ---------------- city nodes ---------------- */

.city {
  position: absolute;
  transform: translate(-50%, -50%);
  cursor: pointer;
  user-select: none;
}

.city-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--sage);
  box-shadow: 0 0 0 3px var(--paper);
  position: relative;
  z-index: 2;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.city:hover .city-dot {
  transform: scale(1.3);
}

.city-pulse {
  position: absolute;
  top: 50%; left: 50%;
  width: 8px; height: 8px;
  border-radius: 50%;
  border: 1px solid var(--sage);
  transform: translate(-50%, -50%);
  animation: cityPulse 3.4s ease-out infinite;
  z-index: 1;
  opacity: 0;
}
@keyframes cityPulse {
  0%   { width: 8px; height: 8px; opacity: 0.5; }
  100% { width: 38px; height: 38px; opacity: 0; }
}

.city.active .city-dot {
  background: var(--coral);
  width: 10px; height: 10px;
}
.city.active .city-pulse { border-color: var(--coral); }

.city.current .city-dot {
  background: var(--gold);
  width: 11px; height: 11px;
  box-shadow: 0 0 0 3px var(--paper), 0 0 0 4px var(--gold-soft);
}
.city.current .city-pulse { border-color: var(--gold); }

.city-label {
  position: absolute;
  top: 12px; left: 14px;
  white-space: nowrap;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--ink);
  padding: 4px 8px;
  background: rgba(251, 248, 241, 0.92);
  border: 1px solid var(--hair);
  border-radius: 4px;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease, background 0.2s, border-color 0.2s, color 0.2s;
  backdrop-filter: blur(4px);
  opacity: 0;
  transform: translateY(-2px);
  z-index: 3;
}
.city-label .label-name { display: block; }
.city-label .label-meta {
  display: block;
  color: var(--ink-3);
  font-size: 9px;
  font-family: var(--mono);
  letter-spacing: 0.06em;
  margin-top: 1px;
}
.city:hover { z-index: 5; }
.city:hover .city-label,
.city.active .city-label,
.city.current .city-label {
  opacity: 1;
  transform: translateY(0);
}
.city:hover .city-label {
  border-color: var(--hair-2);
  background: white;
}
.city.active .city-label {
  background: var(--coral-bg);
  border-color: var(--coral-soft);
  color: var(--coral);
}
.city.current .city-label {
  background: var(--gold-bg);
  border-color: var(--gold-soft);
  color: var(--gold);
}

/* ---------------- vehicle marker ---------------- */

.vehicle-trail {
  position: absolute;
  width: 18px;
  height: 18px;
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
}
.vehicle-trail::before {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background: var(--paper);
  opacity: 0.7;
}
.vehicle-trail svg {
  width: 14px;
  height: 14px;
  position: relative;
  z-index: 1;
}
.vehicle-trail.plane  { color: var(--coral); }
.vehicle-trail.subway { color: var(--sage); }
.vehicle-trail.bus    { color: var(--gold); }
.vehicle-trail.ship   { color: #6c8088; }

/* ---------------- transport bar ---------------- */

.transport-bar {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px;
  background: var(--paper-3);
  border: 1px solid var(--hair);
  border-radius: 999px;
  z-index: 60;
  box-shadow: 0 12px 32px rgba(43, 37, 31, 0.06), 0 2px 6px rgba(43, 37, 31, 0.04);
}

.transport-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px 10px 14px;
  border-radius: 999px;
  cursor: pointer;
  background: transparent;
  color: var(--ink-3);
  transition: all 0.2s ease;
}
.transport-option:hover { color: var(--ink); }
.transport-option.disabled {
  opacity: 0.35;
  cursor: not-allowed;
  filter: saturate(0.4);
}
.transport-option.disabled:hover { color: var(--ink-3); }
.transport-option.disabled .transport-meta {
  color: var(--coral);
  font-style: italic;
}
.transport-option.active {
  background: var(--ink);
  color: var(--paper);
}
.transport-option.active .transport-meta { color: var(--paper-2); opacity: 0.7; }

.transport-icon {
  width: 22px; height: 22px;
  display: flex; align-items: center; justify-content: center;
}
.transport-icon svg {
  width: 100%; height: 100%;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}
.transport-name {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.transport-meta {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  color: var(--ink-3);
}

/* depart button */
.depart-btn {
  position: absolute;
  bottom: 32px;
  left: calc(50% + 240px);
  padding: 14px 24px 14px 20px;
  background: var(--coral);
  color: white;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 60;
  box-shadow: 0 8px 24px rgba(212, 119, 92, 0.35), 0 2px 4px rgba(212, 119, 92, 0.2);
  transition: all 0.2s;
  animation: departIn 0.3s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
@keyframes departIn {
  from { opacity: 0; transform: translateX(-12px) scale(0.92); }
  to   { opacity: 1; transform: translateX(0) scale(1); }
}
.depart-btn:hover {
  background: #c66247;
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(212, 119, 92, 0.45);
}
.depart-btn .key {
  font-family: var(--mono);
  font-size: 9px;
  padding: 2px 6px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  letter-spacing: 0.08em;
}

/* ---------------- city panel ---------------- */

.city-panel {
  position: absolute;
  top: 80px;
  right: 24px;
  width: 420px;
  max-height: calc(100vh - 110px);
  background: var(--paper-3);
  border: 1px solid var(--hair);
  border-radius: 16px;
  z-index: 70;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 60px rgba(43, 37, 31, 0.12), 0 4px 12px rgba(43, 37, 31, 0.04);
  animation: panelIn 0.4s cubic-bezier(0.2, 0.9, 0.3, 1);
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.city-panel::-webkit-scrollbar { width: 6px; }
.city-panel::-webkit-scrollbar-thumb { background: rgba(43, 37, 31, 0.18); border-radius: 3px; }
/* keep the panel header pinned at the top while the body scrolls */
.city-panel .panel-header {
  position: sticky;
  top: 0;
  background: linear-gradient(180deg, white, var(--paper-3));
  z-index: 2;
}
@keyframes panelIn {
  from { opacity: 0; transform: translateX(16px); }
  to   { opacity: 1; transform: translateX(0); }
}

.panel-header {
  padding: 24px 26px 20px;
  border-bottom: 1px solid var(--hair);
  position: relative;
  background: linear-gradient(180deg, white, var(--paper-3));
}
.panel-tag {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--coral);
  text-transform: uppercase;
  margin-bottom: 10px;
}
.panel-title {
  font-family: var(--display);
  font-weight: 700;
  font-size: 38px;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1;
}
.panel-subtitle {
  margin-top: 6px;
  font-size: 13px;
  color: var(--ink-2);
  letter-spacing: 0;
}
.panel-subtitle .sep {
  display: inline-block;
  width: 3px; height: 3px;
  border-radius: 50%;
  background: var(--ink-3);
  vertical-align: middle;
  margin: 0 8px;
}
.panel-coords {
  display: flex;
  gap: 18px;
  margin-top: 16px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.04em;
}
.panel-coords .l { color: var(--ink-3); margin-right: 6px; }
.panel-coords .v { color: var(--ink); font-weight: 500; }

.panel-close {
  position: absolute;
  top: 18px; right: 18px;
  width: 30px; height: 30px;
  border-radius: 999px;
  background: var(--paper-2);
  color: var(--ink-2);
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}
.panel-close:hover {
  background: var(--ink);
  color: var(--paper);
}

.panel-section-title {
  padding: 18px 26px 10px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--ink-3);
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 12px;
}
.panel-section-title .count {
  color: var(--ink-3);
  opacity: 0.7;
}
.panel-section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--hair);
}

.landmark-list {
  padding: 4px 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
}

.landmark {
  background: white;
  border: 1px solid var(--hair);
  border-radius: 12px;
  padding: 14px 16px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.landmark:hover {
  border-color: var(--hair-2);
  box-shadow: 0 2px 8px rgba(43, 37, 31, 0.04);
}
.landmark.expanded {
  background: var(--paper-3);
  border-color: var(--coral-soft);
  box-shadow: 0 4px 16px rgba(212, 119, 92, 0.08);
}

.landmark-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}
.landmark-name {
  font-family: var(--display);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -0.01em;
  color: var(--ink);
  line-height: 1.2;
}
.landmark-zh {
  font-size: 12px;
  color: var(--ink-3);
  margin-top: 2px;
}
.landmark-meta {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  color: var(--ink-3);
  text-transform: uppercase;
  padding: 4px 8px;
  background: var(--paper-2);
  border-radius: 4px;
  white-space: nowrap;
  margin-top: 4px;
}

.media-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
  animation: fadeIn 0.3s;
}
/* country-level fallback cards have slightly more breathing room and a hanok-warm tint */
.media-grid.country-media {
  margin-top: 8px;
  padding: 8px 10px;
  background: linear-gradient(180deg, rgba(217,119,87,0.06) 0%, rgba(217,119,87,0.02) 100%);
  border: 0.5px solid rgba(217,119,87,0.20);
  border-radius: 12px;
}
.media-grid.country-media .media-card {
  border-bottom: 0.5px solid rgba(0,0,0,0.08);
}
.media-grid.country-media .media-card:last-child {
  border-bottom: none;
}
/* Cuisine subsection — separated from cultural works, sage-tinted */
.media-grid.cuisine-media {
  background: linear-gradient(180deg, rgba(122,141,107,0.08) 0%, rgba(122,141,107,0.03) 100%);
  border-color: rgba(122,141,107,0.22);
}
.panel-section-title.cuisine-title,
.cc-section-title.cuisine-title {
  margin-top: 18px;
  color: var(--sage, #7a8d6b);
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.media-card {
  border-bottom: 1px solid var(--hair);
  padding: 4px 0;
}
.media-card:last-child { border-bottom: none; }
.media-card.tap { cursor: pointer; }
.media-card.tap:hover .media-title { color: var(--coral); }

.media-row {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px 4px;
}

.media-type-tag {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  color: var(--ink-2);
  font-weight: 500;
  text-transform: uppercase;
}
.media-type-tag.SONG    { color: var(--sage); }
.media-type-tag.FILM    { color: var(--coral); }
.media-type-tag.BOOK    { color: var(--gold); }
.media-type-tag.MUSICAL { color: #8a6cb6; }
.media-type-tag.ANIME   { color: #c97b56; }
.media-type-tag.GAME    { color: #4a8a8a; }
.media-type-tag.SHOW    { color: #b8567c; }
.media-type-tag.FOOD    { color: var(--sage); }
.media-type-tag.LANDMARK{
  color: var(--coral, #d4775c);
  background: rgba(217,119,87,0.10);
  padding: 3px 8px;
  border-radius: 4px;
  border: 0.5px solid rgba(217,119,87,0.30);
}

/* Landmark card variant — unified with cultural cards, with expandable nested media */
.media-card.landmark-card {
  background: rgba(217,119,87,0.04);
  border-bottom: 0.5px solid rgba(217,119,87,0.18);
}
.media-card.landmark-card.expanded {
  background: rgba(217,119,87,0.10);
}
.landmark-media-nested {
  margin: 4px 0 12px 16px;
  padding: 8px 10px 4px;
  background: rgba(184,146,76,0.04);
  border-left: 2px solid rgba(184,146,76,0.30);
  border-radius: 0 8px 8px 0;
}
.media-grid.landmark-grid {
  background: linear-gradient(180deg, rgba(217,119,87,0.04) 0%, rgba(217,119,87,0.01) 100%);
  border-color: rgba(217,119,87,0.18);
}

.media-body {
  display: flex; flex-direction: column; gap: 2px;
  min-width: 0;
}
.media-title {
  font-size: 13px;
  color: var(--ink);
  font-weight: 500;
  letter-spacing: -0.005em;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.media-credit {
  font-size: 11px;
  color: var(--ink-3);
}
.media-year {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
}

/* scrollbar */
.landmark-list::-webkit-scrollbar { width: 6px; }
.landmark-list::-webkit-scrollbar-track { background: transparent; }
.landmark-list::-webkit-scrollbar-thumb { background: var(--hair); border-radius: 999px; }
.landmark-list::-webkit-scrollbar-thumb:hover { background: var(--hair-2); }

/* ---------------- song preview ---------------- */
.song-preview {
  display: flex; flex-direction: column; gap: 8px;
  padding: 12px 14px 12px;
  background:
    linear-gradient(to right, rgba(122, 141, 107, 0.04), rgba(184, 146, 76, 0.04));
  border-radius: 6px;
  margin-top: -2px;
  position: relative;
}
.song-preview::before {
  content: ''; position: absolute;
  left: 14px; right: 14px; top: 0;
  height: 1px; background: var(--hair);
}

/* youtube cover (pre-load placeholder) */
.yt-cover {
  display: flex; align-items: center; gap: 12px;
  width: 100%;
  padding: 10px 14px;
  background: linear-gradient(135deg, #2b251f 0%, #4a4036 100%);
  border: none; border-radius: 8px;
  cursor: pointer;
  color: var(--paper);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-align: left;
}
.yt-cover:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(43,37,31,0.18); }
.yt-cover-disc {
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
  background: radial-gradient(circle at 35% 30%, #5a4f43 0%, #2b251f 60%, #1a1612 100%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.06);
  position: relative;
}
.yt-cover-disc::after {
  content:''; position:absolute; inset:42%; border-radius:50%;
  background: var(--coral);
}
.yt-cover-play {
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--coral); color: var(--paper);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 0 2px rgba(245,239,228,0.15);
}
.yt-cover-meta { display:flex; flex-direction:column; gap:2px; flex:1; min-width:0; }
.yt-cover-title { font-family: var(--display); font-size: 13px; font-weight: 600; color: var(--paper); }
.yt-cover-credit {
  font-family: var(--mono); font-size: 9px;
  color: rgba(245,239,228,0.6);
  letter-spacing: 0.08em; text-transform: uppercase;
}

.yt-frame-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(43,37,31,0.18);
}
.yt-frame { width: 100%; height: 100%; border: 0; }

.song-note a { color: var(--ink-2); text-decoration: underline; }
.song-note a:hover { color: var(--coral); }

.song-play {
  position: relative;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: none;
  padding: 0;
  cursor: pointer;
  flex-shrink: 0;
  background: transparent;
  color: var(--paper);
  transition: transform 0.2s ease;
  isolation: isolate;
}
.song-play:hover { transform: scale(1.05); }
.song-play:active { transform: scale(0.96); }

.song-play-disc {
  position: absolute; inset: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, #4a4036 0%, #2b251f 60%, #1a1612 100%);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.08),
    inset 0 0 0 1px rgba(255, 255, 255, 0.04),
    0 2px 6px rgba(43, 37, 31, 0.25),
    0 1px 0 rgba(255, 255, 255, 0.4);
  z-index: 0;
}
/* groove ring */
.song-play-disc::before {
  content: ''; position: absolute;
  inset: 4px;
  border-radius: 50%;
  border: 1px solid rgba(245, 239, 228, 0.06);
}
/* center label dot */
.song-play-disc::after {
  content: ''; position: absolute;
  inset: 38%;
  border-radius: 50%;
  background: var(--coral);
  box-shadow: 0 0 0 1px rgba(245, 239, 228, 0.2);
  transition: background 0.3s;
}

.song-play.on .song-play-disc {
  animation: discSpin 2.4s linear infinite;
}
.song-play.on .song-play-disc::after {
  background: var(--gold);
}
@keyframes discSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.song-play-icon {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  z-index: 2;
  color: var(--paper);
  pointer-events: none;
}
.song-play-icon svg {
  width: 14px; height: 14px;
  filter: drop-shadow(0 1px 1px rgba(0,0,0,0.4));
}

/* expanding rings when playing */
.song-play-rings {
  position: absolute; inset: -2px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
}
.song-play.on .song-play-rings::before,
.song-play.on .song-play-rings::after {
  content: ''; position: absolute; inset: 0;
  border-radius: 50%;
  border: 1.5px solid var(--coral);
  opacity: 0;
  animation: songRing 2s ease-out infinite;
}
.song-play.on .song-play-rings::after {
  animation-delay: 1s;
}
@keyframes songRing {
  0%   { transform: scale(0.9); opacity: 0.7; }
  100% { transform: scale(1.6); opacity: 0; }
}

.song-meta {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; gap: 8px;
}
.song-phrases {
  display: flex; flex-direction: column; gap: 4px;
}
.phrase {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 9px;
  color: var(--ink-3);
  opacity: 0.45;
  transition: opacity 0.3s ease, color 0.3s ease;
}
.phrase.on { opacity: 1; color: var(--ink-2); }
.phrase-n { letter-spacing: 0.1em; min-width: 16px; }
.phrase-bar {
  flex: 1; height: 3px;
  background: var(--hair);
  border-radius: 999px;
  position: relative;
  overflow: hidden;
}
.phrase-fill {
  position: absolute; inset: 0;
  background: linear-gradient(to right, var(--sage), var(--coral));
  transform: scaleX(0); transform-origin: left;
  border-radius: 999px;
}
.phrase.active .phrase-fill {
  animation: phraseFill 1.4s linear forwards;
}
.phrase.on:not(.active) .phrase-fill {
  transform: scaleX(1);
}
@keyframes phraseFill {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}
.song-note {
  font-family: var(--mono); font-size: 8.5px;
  color: var(--ink-3); opacity: 0.65;
  letter-spacing: 0.08em;
  white-space: nowrap;
  text-transform: uppercase;
}

/* ---------------- book quote ---------------- */
.book-quote {
  position: relative;
  margin: 4px 12px 12px 60px;
  padding: 14px 22px 16px;
  background: var(--gold-bg);
  border-radius: 4px;
  border-left: 2px solid var(--gold);
  font-family: var(--display);
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--ink);
  font-style: italic;
  letter-spacing: 0.01em;
}
.book-quote .qmark {
  font-family: var(--display);
  color: var(--gold);
  font-size: 22px;
  font-style: normal;
  line-height: 0;
  vertical-align: -2px;
  margin-right: 2px;
}
.book-quote .qmark.right { margin-left: 4px; margin-right: 0; }
.book-quote .qbody { color: var(--ink); }

/* ---------------- visa modal ---------------- */
.visa-overlay { align-items: center; justify-content: center; }
.visa-modal {
  width: 92vw; max-width: 480px;
  background: linear-gradient(180deg, var(--paper-3, #fbf8f1) 0%, var(--paper, #f5efe4) 100%);
  border: 1px solid rgba(184,146,76,0.32);
  border-radius: 16px;
  padding: 22px 24px;
  box-shadow: 0 24px 60px rgba(43,37,31,0.20);
  font-family: 'Noto Serif KR', serif;
}
.visa-head { text-align: center; margin-bottom: 18px; }
.visa-stamp {
  display: inline-block;
  padding: 6px 18px;
  background: var(--gold-bg, rgba(184,146,76,0.12));
  border: 1px dashed var(--gold, #b8924c);
  color: var(--gold, #b8924c);
  border-radius: 4px;
  font-family: 'JetBrains Mono', 'Noto Sans KR', monospace;
  font-size: 11px;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  font-weight: 700;
}
.visa-route {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 0.5px solid var(--hair);
  margin-bottom: 16px;
}
.visa-end { flex: 1; text-align: center; }
.visa-flag { font-size: 36px; line-height: 1; margin-bottom: 4px; }
.visa-label {
  font-family: 'JetBrains Mono', 'Noto Sans KR', monospace;
  font-size: 10px; letter-spacing: 0.10em; text-transform: uppercase;
  color: var(--ink-3); margin-bottom: 4px;
}
.visa-country {
  font-family: 'Noto Serif KR', serif;
  font-size: 16px; font-weight: 600; color: var(--ink);
}
.visa-arrow {
  font-size: 24px; color: var(--ink-3); padding: 0 8px;
}
.visa-stats { margin-bottom: 18px; }
.visa-row {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 8px 0;
  border-bottom: 0.5px solid var(--hair);
  font-size: 13.5px;
}
.visa-row:last-child { border-bottom: none; }
.visa-row-label { color: var(--ink-2); font-family: 'Noto Sans KR', sans-serif; }
.visa-row-val { font-family: 'JetBrains Mono', 'Noto Sans KR', monospace; font-weight: 700; color: var(--ink); }
.visa-row-val.warn { color: var(--coral, #d4775c); }
.visa-disclaimer {
  margin-top: 10px;
  font-size: 11.5px; color: var(--ink-3);
  font-style: italic;
  text-align: center;
}
.visa-actions { display: flex; gap: 10px; }
.visa-actions .btn { flex: 1; }
.visa-result { text-align: center; padding: 30px 0 18px; }
.visa-result-stamp {
  display: inline-block;
  padding: 14px 32px;
  border: 3px solid currentColor;
  border-radius: 8px;
  font-family: 'JetBrains Mono', 'Noto Sans KR', monospace;
  font-size: 20px; font-weight: 700; letter-spacing: 0.18em;
  transform: rotate(-4deg);
}
.visa-result.approved .visa-result-stamp { color: var(--sage, #7a8d6b); }
.visa-result.denied .visa-result-stamp { color: var(--coral, #d4775c); }
.visa-result-text {
  margin-top: 14px;
  font-family: 'Noto Serif KR', serif; font-size: 13px;
  color: var(--ink-2);
}

/* ---------------- game over modal ---------------- */
.game-over-overlay {
  align-items: center; justify-content: center;
  background: rgba(20,16,12,0.85);
  backdrop-filter: blur(10px);
}
.game-over-modal {
  width: 92vw; max-width: 520px; max-height: 90vh;
  background: linear-gradient(180deg, #2a2520 0%, #1c1814 100%);
  border: 1px solid rgba(244,236,223,0.20);
  border-radius: 16px;
  padding: 28px 26px 22px;
  color: #f4ecdf;
  font-family: 'Noto Serif KR', serif;
  display: flex; flex-direction: column;
  box-shadow: 0 30px 80px rgba(0,0,0,0.5);
}
.go-stamp {
  text-align: center;
  font-family: 'JetBrains Mono', 'Noto Sans KR', monospace;
  font-size: 28px;
  letter-spacing: 0.20em;
  font-weight: 700;
  color: var(--coral, #d4775c);
  margin-bottom: 4px;
}
.go-sub {
  text-align: center;
  font-size: 14px;
  color: rgba(244,236,223,0.7);
  margin-bottom: 22px;
}
.go-stats,
.go-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 12px 14px;
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 0.5px solid rgba(244,236,223,0.15);
}
.go-header { margin-bottom: 18px; }
.go-medal-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: linear-gradient(135deg, rgba(184,146,76,0.20) 0%, rgba(217,119,87,0.10) 100%);
  border: 1px solid rgba(184,146,76,0.40);
  border-radius: 14px;
  margin-bottom: 18px;
}
.go-medal { font-size: 48px; line-height: 1; }
.go-medal-info { flex: 1; }
.go-medal-label {
  font-family: 'Noto Serif KR', serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--gold, #b8924c);
  letter-spacing: 0.02em;
  margin-bottom: 4px;
}
.go-medal-passport {
  font-family: 'Noto Sans KR', sans-serif;
  font-size: 12px;
  color: rgba(244,236,223,0.75);
  letter-spacing: 0.04em;
}
.go-list-count {
  font-family: 'JetBrains Mono', 'Noto Sans KR', monospace;
  font-size: 11px;
  color: rgba(244,236,223,0.55);
  font-weight: 400;
  letter-spacing: 0.05em;
}
@media (max-width: 640px) {
  .go-stats-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .go-medal { font-size: 38px; }
  .go-medal-label { font-size: 17px; }
}
.go-stat { flex: 1; text-align: center; }
.go-stat-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 32px; font-weight: 700;
  color: var(--gold, #b8924c);
}
.go-stat-lbl {
  font-size: 11px;
  color: rgba(244,236,223,0.6);
  letter-spacing: 0.04em;
  margin-top: 4px;
}
.go-list-title {
  font-family: 'JetBrains Mono', 'Noto Sans KR', monospace;
  font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  color: rgba(244,236,223,0.55);
  margin-bottom: 12px;
}
.go-list {
  flex: 1; min-height: 0;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
  padding-right: 4px;
  margin-bottom: 18px;
}
.go-stamp-row {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px;
  background: rgba(244,236,223,0.06);
  border: 0.5px solid rgba(244,236,223,0.18);
  border-radius: 10px;
  font-size: 13px;
}
.go-stamp-flag { font-size: 16px; }
.go-stamp-name { color: rgba(244,236,223,0.88); font-family: 'Noto Serif KR', serif; }
.go-empty {
  text-align: center; padding: 20px;
  color: rgba(244,236,223,0.55); font-style: italic;
}
.go-rebirth {
  width: 100%;
  padding: 14px 20px;
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  background: linear-gradient(135deg, var(--coral, #d4775c), #f4a08b);
  border: none;
  color: white;
  border-radius: 12px;
  box-shadow: 0 0 24px rgba(217,119,87,0.45);
}
.go-rebirth:hover { transform: translateY(-1px); filter: brightness(1.05); }

@media (max-width: 640px) {
  .visa-modal { width: 96vw; padding: 20px 18px; }
  .visa-flag { font-size: 30px; }
  .visa-country { font-size: 14.5px; }
  .game-over-modal { width: 96vw; padding: 22px 18px; }
  .go-stamp { font-size: 22px; }
  .go-list { grid-template-columns: repeat(2, 1fr); }
}

/* friend travel record modal */
.friend-travel-overlay { align-items: center; justify-content: center; }
.friend-travel-modal {
  width: 92vw; max-width: 460px;
  max-height: 86vh;
  padding: 22px 24px;
  background: var(--paper-3);
  border: 1px solid var(--hair);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}
.ft-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}
.ft-avatar {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--coral);
  color: white;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Noto Serif KR', serif;
  font-size: 22px;
  font-weight: 700;
}
.ft-name {
  font-family: 'Noto Serif KR', serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
}
.ft-city { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.ft-passport {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--gold-bg);
  border: 0.5px solid rgba(184,146,76,0.30);
  border-radius: 999px;
  margin-bottom: 16px;
  font-size: 13px;
  font-family: 'Noto Serif KR', serif;
}
.ft-flag { font-size: 18px; }
.ft-label {
  font-family: 'JetBrains Mono', 'Noto Sans KR', monospace;
  font-size: 10px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 700;
}
.ft-country { flex: 1; color: var(--ink); }
.ft-tier {
  padding: 2px 8px;
  border-radius: 6px;
  color: white;
  font-size: 11px;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
}
.ft-tier[data-tier="1"] { background: #7ec78a; }
.ft-tier[data-tier="2"] { background: #b8924c; }
.ft-tier[data-tier="3"] { background: #d4a574; }
.ft-tier[data-tier="4"] { background: #c97b6a; }
.ft-tier[data-tier="5"] { background: #8a5444; }
.ft-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  gap: 10px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 0.5px solid var(--hair);
}
.ft-stat { text-align: center; }
.ft-stat-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 22px;
  font-weight: 700;
  color: var(--gold, #b8924c);
}
.ft-stat-lbl {
  font-size: 10px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
  margin-top: 2px;
}
.ft-stamps-title {
  font-family: 'JetBrains Mono', 'Noto Sans KR', monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 700;
  margin-bottom: 8px;
}
.ft-stamps {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 6px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}
.ft-stamp {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: var(--paper-2);
  border-radius: 8px;
  font-size: 12px;
}
.ft-stamp-flag { font-size: 14px; }
.ft-stamp-name {
  font-family: 'Noto Serif KR', serif;
  color: var(--ink-2);
}
.ft-loading, .ft-empty {
  text-align: center;
  padding: 30px 20px;
  color: var(--ink-3);
  font-family: 'Noto Serif KR', serif;
  font-style: italic;
}

.ft-diary-title {
  font-family: 'JetBrains Mono', 'Noto Sans KR', monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 700;
  margin: 14px 0 8px;
}
.ft-diary-empty {
  color: var(--ink-3);
  font-family: 'Noto Serif KR', serif;
  font-style: italic;
  padding: 8px 2px 4px;
}
.ft-diary-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  min-height: 0;
}
.ft-diary-entry {
  padding: 10px 12px;
  background: var(--paper-2);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ft-diary-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.ft-diary-mood { font-size: 16px; }
.ft-diary-ttl {
  font-family: 'Noto Serif KR', serif;
  font-weight: 600;
  color: var(--ink-1);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ft-diary-ago {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--ink-3);
  white-space: nowrap;
}
.ft-diary-loc {
  font-size: 11px;
  color: var(--ink-3);
  font-family: 'Noto Serif KR', serif;
}
.ft-diary-body {
  font-family: 'Noto Serif KR', serif;
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.fr-row .fr-travel-btn {
  padding: 6px 10px;
  font-size: 12px;
}

@media (max-width: 640px) {
  .friend-travel-modal { width: 96vw; padding: 18px; }
  .ft-stamps { grid-template-columns: repeat(2, 1fr); }
}

/* ---------------- media detail modal (rich book / film / song / food) ---------------- */
.media-detail-overlay {
  align-items: center;
  justify-content: center;
}
.media-detail-modal {
  width: 92vw;
  max-width: 560px;
  max-height: 88vh;
  background: linear-gradient(180deg, var(--paper-3, #fbf8f1) 0%, var(--paper, #f5efe4) 100%);
  border: 1px solid var(--hair);
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  padding: 22px 24px 16px;
  position: relative;
  box-shadow: 0 24px 60px rgba(43,37,31,0.18), 0 4px 12px rgba(43,37,31,0.06);
  overflow: hidden;
}
.media-detail-modal .modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(43,37,31,0.06);
  border: none;
  color: var(--ink-2);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s;
}
.media-detail-modal .modal-close:hover { background: rgba(43,37,31,0.12); }

.mdm-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 4px 0 8px;
}
.mdm-type-pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-family: 'JetBrains Mono', 'Noto Sans KR', monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 700;
}
.mdm-type-pill.BOOK    { background: var(--gold-bg);  color: var(--gold); }
.mdm-type-pill.FILM    { background: var(--coral-bg); color: var(--coral); }
.mdm-type-pill.ANIME   { background: var(--coral-bg); color: var(--coral); }
.mdm-type-pill.SONG    { background: var(--sage-bg);  color: var(--sage); }
.mdm-type-pill.MUSICAL { background: var(--sage-bg);  color: var(--sage); }
.mdm-type-pill.FOOD    { background: var(--sage-bg);  color: var(--sage); }
.mdm-type-pill.GAME    { background: var(--gold-bg);  color: var(--gold); }
.mdm-year {
  font-family: 'JetBrains Mono', 'Noto Sans KR', monospace;
  font-size: 11px;
  color: var(--ink-3, #8a7f72);
  letter-spacing: 0.05em;
}

.mdm-title {
  font-family: 'Noto Serif KR', 'Cormorant Garamond', serif;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink, #2b251f);
  line-height: 1.25;
  margin-bottom: 6px;
}
.mdm-credit-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 0.5px solid var(--hair);
}
.mdm-credit-label {
  font-family: 'JetBrains Mono', 'Noto Sans KR', monospace;
  font-size: 10px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--ink-3, #8a7f72);
  font-weight: 600;
}
.mdm-credit-val {
  font-family: 'Noto Serif KR', serif;
  font-size: 13.5px;
  color: var(--ink-2, #5a4f43);
}

.mdm-poster-wrap {
  margin: 0 -24px 14px;
  background: var(--paper-2, #ede5d4);
  max-height: 240px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mdm-poster {
  width: 100%;
  max-height: 240px;
  object-fit: cover;
  display: block;
}

.mdm-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  padding-right: 4px;
  margin-right: -4px;
}
.mdm-body::-webkit-scrollbar { width: 5px; }
.mdm-body::-webkit-scrollbar-thumb { background: rgba(43,37,31,0.16); border-radius: 3px; }

.mdm-quote {
  margin: 0 0 14px;
  padding: 12px 16px;
  background: var(--gold-bg, rgba(184,146,76,0.08));
  border-left: 3px solid var(--gold, #b8924c);
  border-radius: 4px;
  font-family: 'Noto Serif KR', 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--ink, #2b251f);
}
.mdm-qmark {
  color: var(--gold, #b8924c);
  font-size: 20px;
  font-style: normal;
  vertical-align: -3px;
  margin-right: 2px;
  line-height: 0;
}
.mdm-qmark.right { margin-left: 4px; margin-right: 0; }

.mdm-summary {
  margin: 0 0 14px;
  font-family: 'Noto Serif KR', serif;
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--ink, #2b251f);
}

.mdm-song { margin: 8px 0 12px; }

.mdm-wiki {
  margin: 16px 0 8px;
  padding-top: 14px;
  border-top: 0.5px solid var(--hair);
}
.mdm-wiki-label {
  font-family: 'JetBrains Mono', 'Noto Sans KR', monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3, #8a7f72);
  font-weight: 600;
  margin-bottom: 8px;
}
.mdm-wiki-text {
  font-family: 'Noto Serif KR', serif;
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink-2, #5a4f43);
  white-space: pre-wrap;
}
.mdm-wiki-loading, .mdm-wiki-empty {
  font-family: 'Noto Sans KR', sans-serif;
  font-size: 12px;
  color: var(--ink-3, #8a7f72);
  text-align: center;
  padding: 12px 0;
  font-style: italic;
}

.mdm-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 0.5px solid var(--hair);
  flex-shrink: 0;
}
.mdm-actions .btn { flex: 1; }

/* "Write culture entry" CTA inside the media detail modal */
.mdm-write-culture {
  margin-top: 14px;
  padding: 12px 16px;
  background: linear-gradient(135deg, #fdfaf2 0%, #f5efe2 100%);
  border: 1.5px solid var(--coral, #d4775c);
  color: var(--coral, #d4775c);
  border-radius: 12px;
  font-family: 'Noto Serif KR', serif;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease;
  -webkit-tap-highlight-color: transparent;
}
.mdm-write-culture:hover { transform: translateY(-1px); background: var(--coral); color: white; }
.mdm-write-culture:active { transform: translateY(0); }
.mwc-label { letter-spacing: 0.03em; }
.mwc-bonus {
  font-family: 'JetBrains Mono', 'Noto Sans KR', monospace;
  font-size: 10.5px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  font-weight: 700;
  padding: 4px 8px;
  background: var(--coral, #d4775c);
  color: white;
  border-radius: 999px;
  white-space: nowrap;
}
.mdm-write-culture:hover .mwc-bonus { background: white; color: var(--coral, #d4775c); }

/* Generic confirm/alert dialog · replaces native browser confirm/alert */
.cony-dialog-overlay {
  align-items: center;
  justify-content: center;
  z-index: 9500;  /* above bonus-claim (9000) and ordinary modals */
}
.modal.cony-dialog {
  width: 86vw;
  max-width: 380px;
  padding: 22px 22px 16px;
  background: linear-gradient(180deg, #fbf7ed 0%, #f5efe2 100%);
  border: 1px solid var(--hair);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 24px 60px rgba(43,37,31,0.28);
}
.modal.cony-dialog.tone-warn { border-color: var(--coral, #d4775c); }
.modal.cony-dialog.tone-danger { border-color: #b85d44; }
.cony-dialog .cd-title {
  font-family: 'Cormorant Garamond', 'Noto Serif KR', serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--ink, #2a2520);
}
.cony-dialog .cd-msg {
  font-family: 'Noto Serif KR', serif;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-1, #2a2520);
  white-space: pre-wrap;
}
.cony-dialog .cd-actions {
  display: flex;
  gap: 10px;
  margin-top: 4px;
  justify-content: flex-end;
}
.cony-dialog .cd-actions .btn { min-width: 88px; padding: 10px 18px; }
.cony-dialog .cd-actions .btn.primary.danger {
  background: linear-gradient(135deg, #b85d44, #d4775c) !important;
  color: white !important;
}

/* Bonus claim modal — appears after a qualifying entry, player taps Claim */
.bonus-claim-overlay {
  align-items: center;
  justify-content: center;
  z-index: 9000;  /* must sit above every other modal so it can't be hidden */
}
.modal.bonus-claim-modal {
  width: 88vw; max-width: 380px;
  padding: 28px 24px 20px;
  background: linear-gradient(180deg, #fbf7ed 0%, #f0e6d0 100%);
  border: 1px solid var(--coral, #d4775c);
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  box-shadow: 0 30px 80px rgba(43,37,31,0.30), 0 0 50px rgba(212,119,92,0.30);
  position: relative;
  animation: bonusClaimIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.bc-orn {
  font-size: 32px;
  animation: bonusOrnSpin 2.2s ease-in-out infinite;
}
@keyframes bonusOrnSpin {
  0%, 100% { transform: rotate(-8deg) scale(1); }
  50%      { transform: rotate(8deg) scale(1.08); }
}
@keyframes bonusClaimIn {
  from { opacity: 0; transform: scale(0.86); }
  to   { opacity: 1; transform: scale(1); }
}
.bc-tag {
  font-family: 'JetBrains Mono', 'Noto Sans KR', monospace;
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--coral, #d4775c);
  font-weight: 700;
}
.bc-title {
  font-family: 'Cormorant Garamond', 'Noto Serif KR', serif;
  font-size: 24px;
  font-weight: 600;
  color: var(--ink, #2a2520);
  line-height: 1.2;
}
.bc-sub {
  font-family: 'Noto Serif KR', serif;
  font-size: 13px;
  color: var(--ink-2, #5a4a37);
  line-height: 1.45;
  margin-bottom: 6px;
}
.bc-queue {
  margin: -2px 0 4px;
  padding: 4px 10px;
  background: rgba(212,119,92,0.10);
  border-radius: 999px;
  font-family: 'JetBrains Mono', 'Noto Sans KR', monospace;
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: var(--coral, #d4775c);
  font-weight: 700;
}
.bc-amount {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  padding: 6px 4px;
  font-family: 'Orbitron', 'JetBrains Mono', monospace;
}
.bc-currency { font-size: 22px; color: var(--coral, #d4775c); font-weight: 700; }
.bc-num {
  font-size: 56px;
  font-weight: 800;
  color: var(--coral, #d4775c);
  letter-spacing: -0.02em;
  text-shadow: 0 2px 8px rgba(212,119,92,0.30);
}
.bc-topic {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(212,119,92,0.10);
  border: 0.5px solid rgba(212,119,92,0.30);
  border-radius: 999px;
  font-family: 'Noto Serif KR', serif;
  font-size: 12px;
  max-width: 90%;
}
.bc-topic-lbl {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--coral, #d4775c);
  font-weight: 700;
}
.bc-topic-val {
  color: var(--ink, #2a2520);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}
.bc-actions {
  display: flex;
  gap: 10px;
  width: 100%;
  margin-top: 10px;
}
.bc-actions .btn { flex: 1; padding: 12px; }
.bc-claim {
  background: linear-gradient(135deg, var(--coral, #d4775c) 0%, #e89478 100%) !important;
  color: white !important;
  font-weight: 700;
  box-shadow: 0 6px 20px rgba(212,119,92,0.40);
}
.bc-claim:hover { filter: brightness(1.06); transform: translateY(-1px); }
.bc-claim:active { transform: translateY(0); }
.bc-claim.busy { opacity: 0.75; }
.bc-success {
  margin-top: 8px;
  padding: 14px 18px;
  background: linear-gradient(135deg, #7a8d6b 0%, #54664a 100%);
  color: #fff5e8;
  border-radius: 12px;
  font-family: 'Noto Serif KR', serif;
  font-weight: 700;
  font-size: 15px;
  width: 100%;
  letter-spacing: 0.03em;
}
.bonus-claim-modal.claimed .bc-num {
  color: var(--sage, #54664a);
  transition: color 0.4s ease;
}
@media (max-width: 480px) {
  .modal.bonus-claim-modal { width: 92vw; padding: 24px 18px 16px; }
  .bc-num { font-size: 46px; }
}

/* Bonus toast — fires whenever the $1000 stipend is paid, from any path */
.bonus-toast {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 14px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  background: linear-gradient(135deg, #7a8d6b 0%, #54664a 100%);
  color: #fff5e8;
  border-radius: 999px;
  font-family: 'Noto Serif KR', serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.03em;
  box-shadow: 0 12px 32px rgba(43,37,31,0.30), 0 0 24px rgba(122,141,107,0.40);
  animation: bonusToastIn 0.32s ease-out, bonusToastOut 0.4s ease-in 2.6s forwards;
  max-width: 86vw;
  pointer-events: none;
}
.bt-amt { font-size: 14px; }
.bt-topic {
  padding: 2px 10px;
  background: rgba(255, 245, 232, 0.18);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  max-width: 35vw;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@keyframes bonusToastIn {
  from { opacity: 0; transform: translate(-50%, -16px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}
@keyframes bonusToastOut {
  from { opacity: 1; transform: translate(-50%, 0); }
  to   { opacity: 0; transform: translate(-50%, -10px); }
}

/* ===== Culture diary modal ===== */
.culture-diary-overlay { align-items: center; justify-content: center; }
.modal.culture-diary-modal {
  width: 92vw; max-width: 480px;
  max-height: 88vh;
  padding: 20px 22px 18px;
  background: #fdfaf2;
  border: 1px solid var(--hair);
  border-radius: 18px;
  display: flex; flex-direction: column;
  gap: 10px;
  box-shadow: 0 28px 70px rgba(43,37,31,0.22);
  position: relative;
  overflow-y: auto;
}
.culture-diary-modal .modal-close {
  position: absolute;
  top: 10px; right: 12px;
  background: none; border: none;
  font-size: 24px; color: var(--ink-3);
  cursor: pointer; line-height: 1;
}
.cd-head { padding-right: 36px; }
.cd-title {
  font-family: 'Cormorant Garamond', 'Noto Serif KR', serif;
  font-size: 22px;
  font-weight: 600;
  color: var(--ink);
}
.cd-sub {
  font-family: 'JetBrains Mono', 'Noto Sans KR', monospace;
  font-size: 11px;
  letter-spacing: 0.10em;
  color: var(--ink-3);
  margin-top: 2px;
}
.cd-topic {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(212,119,92,0.08);
  border: 0.5px solid rgba(212,119,92,0.30);
  border-radius: 10px;
}
.cd-topic-type {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9.5px;
  letter-spacing: 0.16em;
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--coral, #d4775c);
  color: white;
  font-weight: 700;
}
.cd-topic-body { flex: 1; min-width: 0; }
.cd-topic-title {
  font-family: 'Noto Serif KR', serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
}
.cd-topic-credit {
  font-size: 11px;
  color: var(--ink-3);
  margin-top: 1px;
}
.cd-title-input {
  padding: 10px 12px;
  border: 1px solid var(--hair);
  border-radius: 10px;
  font-family: 'Noto Serif KR', serif;
  font-size: 14px;
  background: white;
  outline: none;
  color: var(--ink);
}
.cd-title-input:focus { border-color: var(--coral); }
.cd-body {
  padding: 12px;
  border: 1px solid var(--hair);
  border-radius: 10px;
  font-family: 'Noto Serif KR', serif;
  font-size: 14px;
  line-height: 1.6;
  background: white;
  outline: none;
  color: var(--ink);
  resize: vertical;
  min-height: 160px;
}
.cd-body:focus { border-color: var(--coral); }
.cd-counter {
  display: flex;
  align-items: baseline;
  gap: 4px;
  font-family: 'JetBrains Mono', 'Noto Sans KR', monospace;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ink-3);
}
.cd-counter-n { font-size: 16px; font-weight: 700; color: var(--ink-2); }
.cd-counter.ok .cd-counter-n { color: var(--sage, #54664a); }
.cd-counter.ok .cd-counter-lbl { color: var(--sage, #54664a); }

.cd-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin: 2px 0 4px;
}
.cd-chips-lbl {
  font-family: 'JetBrains Mono', 'Noto Sans KR', monospace;
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3, #6b6259);
  font-weight: 700;
  margin-right: 2px;
}
.cd-chip {
  padding: 5px 11px;
  background: rgba(212,119,92,0.08);
  border: 1px solid rgba(212,119,92,0.35);
  color: var(--coral, #d4775c);
  border-radius: 999px;
  font-family: 'Noto Serif KR', serif;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.14s ease, background 0.18s ease, color 0.18s ease;
  white-space: nowrap;
}
.cd-chip:hover { background: var(--coral, #d4775c); color: white; }
.cd-chip:active { transform: scale(0.96); }

.cd-checks-lead {
  font-family: 'JetBrains Mono', 'Noto Sans KR', monospace;
  font-size: 10.5px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--coral, #d4775c);
  font-weight: 700;
  margin: 6px 0 4px;
}
.cd-checks {
  list-style: none;
  margin: 4px 0;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: rgba(255,255,255,0.5);
  border-radius: 8px;
}
.cd-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Noto Serif KR', serif;
  font-size: 12.5px;
  color: var(--ink-3);
  transition: color 0.2s ease;
}
.cd-check .cd-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: rgba(43,37,31,0.10);
  color: var(--ink-3);
  font-size: 11px;
  font-weight: 800;
}
.cd-check.ok { color: var(--sage, #54664a); font-weight: 600; }
.cd-check.ok .cd-mark { background: var(--sage, #7a8d6b); color: white; }
.cd-status {
  font-family: 'JetBrains Mono', 'Noto Sans KR', monospace;
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--ink-3);
  padding: 2px 0;
}
.cd-status.warn {
  color: var(--coral, #d4775c);
  font-weight: 700;
}
.cd-quality-warn {
  margin-top: 6px;
  padding: 10px 12px;
  background: rgba(212, 119, 92, 0.12);
  border-left: 3px solid var(--coral, #d4775c);
  border-radius: 6px;
  font-family: 'Noto Serif KR', serif;
  font-size: 12.5px;
  color: var(--coral, #b85d44);
  line-height: 1.5;
}
.cd-quality-reason {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  font-family: 'JetBrains Mono', 'Noto Sans KR', monospace;
  letter-spacing: 0.04em;
  opacity: 0.85;
}
.cd-pub {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  font-family: 'Noto Serif KR', serif;
  font-size: 13px;
}
.cd-pub input { width: 16px; height: 16px; accent-color: var(--coral); }
.cd-pub-lbl { color: var(--ink); font-weight: 600; }
.cd-pub-hint { color: var(--ink-3); font-size: 11px; font-style: italic; }
.cd-actions {
  display: flex;
  gap: 10px;
  margin-top: 4px;
  padding-top: 8px;
  border-top: 0.5px solid var(--hair);
}
.cd-actions .btn { flex: 1; }
.cd-save.with-bonus {
  background: linear-gradient(135deg, var(--coral, #d4775c) 0%, #e89478 100%) !important;
  box-shadow: 0 4px 18px rgba(212,119,92,0.40);
}
.cd-success {
  margin-top: 6px;
  padding: 14px 16px;
  background: var(--sage, #7a8d6b);
  color: #fff5e8;
  border-radius: 12px;
  font-family: 'Noto Serif KR', serif;
  font-weight: 700;
  text-align: center;
  font-size: 14px;
  letter-spacing: 0.03em;
}

@media (max-width: 480px) {
  .modal.culture-diary-modal { width: 94vw; padding: 18px; }
  .mwc-bonus { font-size: 9.5px; }
}

.media-detail-cue {
  font-size: 18px;
  color: var(--ink-3, #8a7f72);
  margin-left: 4px;
  opacity: 0.6;
}

/* ---- responsive ---- */
@media (max-width: 760px) {
  .media-detail-modal {
    width: 96vw;
    max-height: 92vh;
    padding: 20px 18px 14px;
    border-radius: 16px;
  }
  .mdm-title { font-size: 21px; }
  .mdm-summary, .mdm-wiki-text { font-size: 13.5px; line-height: 1.65; }
  .mdm-quote { font-size: 13.5px; padding: 10px 13px; }
  .mdm-poster-wrap { margin: 0 -18px 12px; max-height: 180px; }
  .mdm-poster { max-height: 180px; }
}
@media (max-width: 420px) {
  .media-detail-modal {
    width: 100vw;
    max-height: 100vh;
    border-radius: 0;
    padding: 18px 14px calc(14px + env(safe-area-inset-bottom));
  }
  .mdm-title { font-size: 19px; }
  .mdm-poster-wrap { margin: 0 -14px 10px; max-height: 150px; }
  .mdm-poster { max-height: 150px; }
  .mdm-actions .btn { padding: 11px 12px; font-size: 13px; }
}

/* ---------------- inline media detail (replaces Google jump confirm modal) ---------------- */
.media-detail {
  margin: 8px 12px 12px 60px;
  padding: 12px 14px;
  background: var(--paper-3, #fbf8f1);
  border-left: 2px solid var(--gold, #b8924c);
  border-radius: 4px;
  font-family: 'Noto Serif KR', 'Cormorant Garamond', serif;
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink, #2b251f);
  animation: fadeIn 0.25s;
}
.book-detail { border-left-color: var(--gold, #b8924c); }
.film-detail { border-left-color: var(--coral, #d4775c); }
.food-detail { border-left-color: var(--sage, #7a8d6b); }

.md-quote {
  font-style: italic;
  margin: 0 0 10px;
  color: var(--ink, #2b251f);
}
.md-qmark {
  color: var(--gold, #b8924c);
  font-size: 18px;
  font-style: normal;
  line-height: 0;
  vertical-align: -2px;
  margin-right: 2px;
}
.md-qmark.right { margin-left: 4px; margin-right: 0; }

.md-meta {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 0 0 6px;
  font-size: 11.5px;
  font-family: 'Noto Sans KR', sans-serif;
  letter-spacing: 0.02em;
  color: var(--ink-2, #5a4f43);
}
.md-meta-label {
  font-size: 10px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--ink-3, #8a7f72);
  font-weight: 600;
}
.md-meta-val { color: var(--ink-2, #5a4f43); }

.md-summary {
  font-size: 13px;
  line-height: 1.62;
  color: var(--ink-2, #5a4f43);
  margin-top: 4px;
}
.md-summary-empty {
  color: var(--ink-3, #8a7f72);
  font-style: italic;
  font-size: 12px;
}
.md-summary-secondary {
  margin-top: 6px;
  font-size: 12px;
  color: var(--ink-3, #8a7f72);
}

@media (max-width: 640px) {
  .media-detail {
    margin: 6px 8px 10px 36px;
    padding: 10px 12px;
    font-size: 12.5px;
  }
  .md-summary { font-size: 12.5px; line-height: 1.55; }
}

/* ---------------- traveling overlay ---------------- */

.travel-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 80;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 110px;
}
.travel-card {
  background: white;
  border: 1px solid var(--hair);
  padding: 18px 26px;
  border-radius: 14px;
  text-align: center;
  min-width: 380px;
  box-shadow: 0 20px 50px rgba(43, 37, 31, 0.15), 0 4px 12px rgba(43, 37, 31, 0.06);
}

.travel-status {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--coral);
  text-transform: uppercase;
  margin-bottom: 10px;
}
.travel-route {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  font-family: var(--display);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-bottom: 14px;
}
.travel-route .arrow {
  color: var(--coral);
  font-family: var(--sans);
  font-size: 14px;
  animation: arrowPulse 1.4s ease-in-out infinite;
}
@keyframes arrowPulse {
  0%, 100% { opacity: 0.4; transform: translateX(0); }
  50%      { opacity: 1; transform: translateX(4px); }
}
.travel-progress {
  height: 3px;
  background: var(--paper-2);
  border-radius: 999px;
  margin: 12px 0 8px;
  overflow: hidden;
}
.travel-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--sage), var(--coral));
  border-radius: 999px;
  width: 0;
  transition: width 0.05s linear;
}
.travel-progress-meta {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
}

/* ---------------- intro / tutorial ---------------- */

.intro {
  position: absolute;
  inset: 0;
  background: var(--paper);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  animation: introFade 0.5s;
  padding: 40px;
}
@keyframes introFade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.intro-inner {
  width: 100%;
  max-width: 720px;
  text-align: center;
}
.intro-inner.intro-spawn {
  max-width: 480px;
}
.spawn-card {
  margin: 28px auto 24px;
  padding: 28px 24px 22px;
  background: linear-gradient(180deg, var(--paper-3, #fbf8f1) 0%, var(--paper-2, #ede5d4) 100%);
  border: 1px solid var(--gold, #b8924c);
  border-radius: 18px;
  box-shadow: 0 12px 40px rgba(43,37,31,0.10), inset 0 0 0 3px rgba(184,146,76,0.08);
  font-family: 'Noto Serif KR', serif;
}
.spawn-label {
  font-family: 'JetBrains Mono', 'Noto Sans KR', monospace;
  font-size: 11px;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  color: var(--ink-3, #8a7f72);
  font-weight: 700;
  margin-bottom: 14px;
}
.spawn-flag {
  font-size: 64px;
  line-height: 1;
  margin-bottom: 14px;
}
.spawn-city {
  font-family: 'Noto Serif KR', 'Cormorant Garamond', serif;
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink, #2a2520);
  margin-bottom: 4px;
}
.spawn-country {
  font-family: 'Noto Sans KR', sans-serif;
  font-size: 14px;
  color: var(--ink-2, #5a4f43);
  letter-spacing: 0.04em;
  margin-bottom: 20px;
}
.spawn-tier-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  background: var(--paper, #f5efe4);
  border: 0.5px solid var(--hair);
  border-radius: 999px;
  font-family: 'JetBrains Mono', 'Noto Sans KR', monospace;
  font-size: 11px;
  margin-bottom: 16px;
}
.spawn-tier-label {
  color: var(--ink-3);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.spawn-tier-pill {
  padding: 2px 9px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.spawn-hint {
  font-family: 'Noto Serif KR', serif;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--ink-3);
  max-width: 360px;
  margin: 0 auto;
}
.spawn-buttons {
  display: flex;
  gap: 10px;
  justify-content: center;
  align-items: stretch;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.spawn-reroll {
  padding: 14px 22px;
  background: rgba(245, 239, 226, 0.40);
  border: 1px solid var(--hair);
  color: var(--ink-2);
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 600;
  font-family: 'Noto Serif KR', serif;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all 0.18s ease;
}
.spawn-reroll:hover {
  background: rgba(245, 239, 226, 0.70);
  color: var(--ink);
  transform: translateY(-1px);
}
.spawn-buttons .intro-cta { margin-top: 0; }
@media (max-width: 640px) {
  .spawn-card { padding: 22px 18px 18px; }
  .spawn-flag { font-size: 50px; }
  .spawn-city { font-size: 28px; }
  .intro-inner.intro-spawn { padding: 0 16px; max-width: 100%; }
  .spawn-buttons { flex-direction: column; gap: 8px; }
  .spawn-buttons .spawn-reroll,
  .spawn-buttons .intro-cta { width: 100%; padding: 14px 18px; font-size: 14px; }
}

.intro-mark {
  font-family: var(--display);
  font-weight: 700;
  font-size: 88px;
  letter-spacing: -0.04em;
  color: var(--ink);
  line-height: 1;
  position: relative;
  display: inline-block;
}
.intro-mark .dot {
  display: inline-block;
  width: 12px; height: 12px;
  background: var(--coral);
  border-radius: 50%;
  vertical-align: super;
  margin-left: 4px;
  position: relative;
  top: -4px;
}
.intro-kr {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 14px;
  color: var(--ink-3);
  letter-spacing: 0.32em;
  margin-top: 18px;
  text-transform: uppercase;
}
.intro-tag {
  font-family: var(--display);
  font-weight: 400;
  font-style: italic;
  font-size: 16px;
  color: var(--ink-2);
  margin-top: 10px;
}

.intro-steps {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
  margin-top: 56px;
  text-align: left;
}
.intro-step {
  background: var(--paper-3);
  border: 1px solid var(--hair);
  border-radius: 14px;
  padding: 22px 22px 24px;
  position: relative;
}
.intro-step-num {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--coral);
  margin-bottom: 8px;
}
.intro-step-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--paper-2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  color: var(--ink);
}
.intro-step-icon svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}
.intro-step-title {
  font-family: var(--display);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.intro-step-kr {
  font-size: 12px;
  color: var(--ink-3);
  margin-top: 2px;
}
.intro-step-body {
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink-2);
  margin-top: 10px;
}

.intro-cta {
  margin-top: 36px;
  padding: 14px 32px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: all 0.2s;
}
.intro-cta:hover {
  background: #1a1612;
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(43, 37, 31, 0.2);
}
.intro-cta .arrow { font-size: 14px; }
.intro-skip {
  display: block;
  margin-top: 16px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.08em;
}

/* ---------------- hint banner ---------------- */

.hint {
  position: absolute;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: white;
  border: 1px solid var(--hair);
  border-radius: 999px;
  padding: 10px 20px;
  font-size: 13px;
  color: var(--ink-2);
  z-index: 55;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 4px 16px rgba(43, 37, 31, 0.06);
  animation: hintIn 0.3s;
}
@keyframes hintIn {
  from { opacity: 0; transform: translate(-50%, -8px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}
.hint .num {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--coral);
  color: white;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hint strong { color: var(--ink); font-weight: 600; }

/* ---------------- responsive ---------------- */
@media (max-width: 1100px) {
  .city-panel { width: 380px; }
  .topbar-stat { display: none; }
}
@media (max-width: 760px) {
  /* world city panel: let it grow with content and scroll naturally with the page */
  .city-panel {
    position: relative;
    width: calc(100% - 24px);
    margin: 12px auto;
    right: auto; top: auto;
    max-height: none;
    overflow: visible;
  }
  .panel-content { overflow: visible !important; }
  .intro-steps { grid-template-columns: 1fr; }
  .intro-mark { font-size: 64px; }
  .depart-btn {
    position: fixed;
    left: 16px;
    right: 16px;
    width: auto;
    bottom: 16px;
    z-index: 80;
  }
  .topbar { padding: 10px 14px; }
  .map-stage { min-height: 100vh; }
}

/* ======================================================================
   icon button extras (pet, log) + badge + photo
   ====================================================================== */
.icon-btn { position: relative; padding: 0; }
.icon-btn.pet-btn,
.icon-btn.log-btn { width: 36px; height: 36px; }
.icon-btn.end-game-btn {
  color: rgba(212, 119, 92, 0.65);
  transition: color 0.18s ease, background 0.18s ease;
}
.icon-btn.end-game-btn:hover {
  color: var(--coral, #d4775c);
  background: rgba(212, 119, 92, 0.10);
}
.icon-btn.pet-btn.has { border-color: var(--coral, #d4775c); color: var(--coral, #d4775c); }
.ib-pet-photo {
  width: 100%; height: 100%;
  border-radius: 50%;
  object-fit: cover;
}
.ib-badge {
  position: absolute;
  top: -4px; right: -4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 100px;
  background: var(--coral, #d4775c);
  color: #fff5e8;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  box-shadow: 0 1px 4px rgba(43,37,31,0.25);
}

.media-link-arrow {
  font-size: 11px;
  color: var(--ink-3, rgba(43,37,31,0.45));
  margin-left: 4px;
  flex-shrink: 0;
}
.media-card.tap:hover .media-link-arrow {
  color: var(--coral, #d4775c);
}

/* ======================================================================
   class picker (world-level plane / ship)
   ====================================================================== */
.class-picker {
  position: fixed;
  left: 50%;
  bottom: 168px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(255, 250, 242, 0.92);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(43, 37, 31, 0.10);
  border-radius: 100px;
  box-shadow: 0 8px 24px rgba(43, 37, 31, 0.10);
  z-index: 25;
  pointer-events: auto;
}
.class-picker .cp-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--ink-soft, #6b6256);
  text-transform: uppercase;
  padding: 0 4px 0 8px;
}
.class-picker .cp-pills {
  display: flex;
  gap: 4px;
}
.class-picker .cp-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 6px 14px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 100px;
  cursor: pointer;
  font-family: 'Noto Serif KR', serif;
  color: var(--ink, #2a2520);
  transition: all 0.16s ease;
  line-height: 1.1;
}
.class-picker .cp-pill .cp-name { font-size: 13px; font-weight: 600; }
.class-picker .cp-pill .cp-hint {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.14em;
  color: var(--ink-soft, #6b6256);
  text-transform: uppercase;
}
.class-picker .cp-pill:hover {
  background: rgba(212, 119, 92, 0.08);
  border-color: rgba(212, 119, 92, 0.20);
}
.class-picker .cp-pill.active {
  background: var(--coral, #d4775c);
  border-color: var(--coral, #d4775c);
  color: #fff5e8;
}
.class-picker .cp-pill.active .cp-hint { color: rgba(255, 245, 232, 0.78); }

/* ======================================================================
   modal (travel log + pet panel) shared
   ====================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(43, 37, 31, 0.55);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  animation: mFade 0.25s ease;
  padding: 20px;
}
@keyframes mFade { from { opacity: 0; } to { opacity: 1; } }

.modal {
  width: 100%;
  max-width: 560px;
  max-height: 86vh;
  background: #fffaf2;
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 32px 80px rgba(0,0,0,0.3), 0 4px 12px rgba(0,0,0,0.10);
  overflow: hidden;
  animation: mPop 0.32s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
@keyframes mPop {
  from { opacity: 0; transform: translateY(8px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px 12px;
  border-bottom: 1px solid rgba(43, 37, 31, 0.08);
}
.modal-title {
  font-family: 'Noto Serif KR', serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--ink, #2a2520);
  letter-spacing: 0.04em;
}
.modal-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid rgba(43, 37, 31, 0.18);
  color: var(--ink, #2a2520);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: all 0.16s ease;
}
.modal-close:hover {
  background: var(--ink, #2a2520);
  color: #fff5e8;
  border-color: var(--ink, #2a2520);
}
.modal-summary {
  padding: 12px 22px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--ink-soft, #6b6256);
  letter-spacing: 0.06em;
  border-bottom: 1px solid rgba(43, 37, 31, 0.06);
}
.modal-summary strong {
  color: var(--coral, #d4775c);
  font-weight: 700;
  font-size: 14px;
}
.modal-body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 18px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 0;
  -webkit-overflow-scrolling: touch;
}
.modal-body::-webkit-scrollbar { width: 8px; }
.modal-body::-webkit-scrollbar-thumb { background: rgba(43,37,31,0.18); border-radius: 4px; }
.modal-body::-webkit-scrollbar-thumb:hover { background: rgba(43,37,31,0.35); }
/* travel log wraps print-header + modal-body in print-container so the body
   still gets flex:1 and scrolls properly */
.print-container {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}
.print-container > .print-header { flex-shrink: 0; }
.print-container > .modal-body {
  flex: 1 1 auto;
  overflow-y: auto;
  min-height: 0;
}
/* fallback for browsers that don't compute flex chain right */
.travel-log .modal-body { max-height: calc(86vh - 220px); }
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 22px;
  border-top: 1px solid rgba(43, 37, 31, 0.08);
  background: rgba(245, 239, 226, 0.5);
}

.btn {
  padding: 10px 18px;
  border-radius: 8px;
  border: 0;
  font-family: 'Noto Serif KR', serif;
  font-size: 13px;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all 0.16s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn.primary {
  background: var(--coral, #d4775c);
  color: #fff5e8;
  box-shadow: 0 4px 12px rgba(212,119,92,0.28);
}
.btn.primary:hover { background: #c2624c; transform: translateY(-1px); }
.btn.ghost {
  background: transparent;
  color: var(--ink, #2a2520);
  border: 1px solid rgba(43, 37, 31, 0.18);
}
.btn.ghost:hover { background: rgba(43, 37, 31, 0.06); }

.empty {
  text-align: center;
  font-family: 'Noto Serif KR', serif;
  font-size: 14px;
  color: var(--ink-soft, #6b6256);
  line-height: 1.65;
  padding: 32px 12px;
}

/* ======================================================================
   travel log + ticket
   ====================================================================== */
.travel-log .ticket-list {
  gap: 14px;
}
.ticket {
  display: flex;
  background: #fffaf2;
  border: 1px solid rgba(43, 37, 31, 0.10);
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 2px 8px rgba(43, 37, 31, 0.06);
}
.ticket::before {
  content: '';
  position: absolute;
  left: 96px;
  top: -6px;
  bottom: -6px;
  width: 12px;
  background:
    radial-gradient(circle at 0 6px, transparent 6px, rgba(43,37,31,0.10) 6px, rgba(43,37,31,0.10) 7px, transparent 7px) 0 0/100% 14px,
    #fffaf2;
  pointer-events: none;
  z-index: 1;
}
.tk-stub {
  width: 96px;
  flex-shrink: 0;
  padding: 14px 12px;
  background: linear-gradient(180deg, var(--ink, #2a2520), #1f1c17);
  color: #fff5e8;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
}
.ticket.tk-plane .tk-stub { background: linear-gradient(180deg, var(--coral, #d4775c), #b85d44); }
.ticket.tk-ship .tk-stub  { background: linear-gradient(180deg, #6c8088, #4f6168); }
.ticket.tk-bus .tk-stub   { background: linear-gradient(180deg, var(--gold, #b8924c), #8e6d34); }
.ticket.tk-subway .tk-stub{ background: linear-gradient(180deg, var(--sage, #7a8d6b), #54664a); }
.tk-stub-meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.85;
  line-height: 1.3;
}
.tk-stub-no {
  font-family: 'JetBrains Mono', monospace;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.05em;
}
.tk-stub-bar {
  height: 22px;
  margin-top: 8px;
  background: repeating-linear-gradient(90deg,
    rgba(255,245,232,0.85) 0 1.5px,
    transparent 1.5px 3px,
    rgba(255,245,232,0.85) 3px 5px,
    transparent 5px 7px);
  border-radius: 2px;
}
.tk-main {
  flex: 1;
  padding: 14px 18px 14px 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.tk-route {
  display: flex;
  align-items: center;
  gap: 14px;
}
.tk-side { min-width: 0; }
.tk-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.18em;
  color: var(--ink-soft, #6b6256);
  text-transform: uppercase;
}
.tk-city {
  font-family: 'Noto Serif KR', serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--ink, #2a2520);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tk-arrow {
  flex: 1;
  text-align: center;
  color: var(--coral, #d4775c);
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: -0.06em;
  font-size: 13px;
}
.tk-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
}
.tk-row > div { display: inline-flex; gap: 6px; align-items: baseline; }
.tk-l {
  color: var(--ink-soft, #6b6256);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 9px;
}
.tk-v { color: var(--ink, #2a2520); font-weight: 600; }
.tk-pet {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Noto Serif KR', serif;
  font-size: 12px;
  color: var(--ink-soft, #6b6256);
  padding-top: 8px;
  border-top: 1px dashed rgba(43, 37, 31, 0.12);
}
.tk-pet-photo {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(43, 37, 31, 0.10);
}
.tk-pet-icon { font-size: 14px; }

/* ======================================================================
   pet panel
   ====================================================================== */
.pet-panel .modal-body { padding-bottom: 8px; }
.pet-photo-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 6px;
}
.pet-photo-img {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--coral, #d4775c);
  flex-shrink: 0;
}
.pet-photo-placeholder {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  border: 2px dashed rgba(43, 37, 31, 0.20);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--ink-soft, #6b6256);
  text-align: center;
  line-height: 1.3;
  padding: 10px;
  flex-shrink: 0;
}
.pet-photo-btn { cursor: pointer; }
.pet-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.pf-l, .pet-field > span {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--ink-soft, #6b6256);
  text-transform: uppercase;
}
.pet-field input {
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid rgba(43, 37, 31, 0.18);
  background: #fff;
  font-family: 'Noto Serif KR', serif;
  font-size: 14px;
  color: var(--ink, #2a2520);
  outline: none;
  transition: border-color 0.16s ease;
}
.pet-field input:focus { border-color: var(--coral, #d4775c); }
.chip-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.chip {
  padding: 6px 12px;
  background: transparent;
  border: 1px solid rgba(43, 37, 31, 0.18);
  border-radius: 100px;
  font-family: 'Noto Serif KR', serif;
  font-size: 13px;
  color: var(--ink, #2a2520);
  cursor: pointer;
  transition: all 0.16s ease;
}
.chip:hover { border-color: var(--coral, #d4775c); color: var(--coral, #d4775c); }
.chip.active {
  background: var(--ink, #2a2520);
  color: #fff5e8;
  border-color: var(--ink, #2a2520);
}

/* mobile tweaks */
@media (max-width: 640px) {
  .class-picker { bottom: 132px; max-width: 92vw; padding: 8px 10px; gap: 6px; }
  .class-picker .cp-pill { padding: 4px 10px; }
  .ticket::before { left: 76px; }
  .tk-stub { width: 76px; padding: 12px 8px; }
  .tk-main { padding-left: 22px; padding-right: 14px; }
}

/* ======================================================================
   wallet (topbar) + depart-btn cost + insufficient
   ====================================================================== */
.topbar-stat.wallet {
  position: relative;
  background: linear-gradient(135deg, rgba(184, 146, 76, 0.12), rgba(212, 119, 92, 0.08));
  border: 1px solid rgba(184, 146, 76, 0.30);
  border-radius: 100px;
  padding: 4px 12px 4px 14px;
  gap: 8px;
}
.topbar-stat.wallet .v {
  color: var(--gold, #b8924c);
  font-weight: 700;
  letter-spacing: 0.04em;
}
.topbar-stat.wallet .v.warn { color: var(--coral, #d4775c); }
.topbar-stat.wallet .v-local {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--ink-soft, #6b6256);
  letter-spacing: 0.06em;
}

.depart-btn .cost {
  display: inline-block;
  margin-left: 12px;
  padding: 2px 8px;
  background: rgba(255, 245, 232, 0.18);
  border-radius: 100px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: rgba(255, 245, 232, 0.92);
}
.depart-btn.insufficient {
  background: linear-gradient(135deg, #6b6256, #4a443c);
  cursor: not-allowed;
  opacity: 0.78;
  box-shadow: none;
}
.depart-btn.insufficient .cost { background: rgba(212, 119, 92, 0.32); color: #fff5e8; }
.depart-btn:disabled { transform: none !important; }

/* ======================================================================
   intro · starting-city grid
   ====================================================================== */
.intro-section-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.20em;
  color: var(--ink-soft, #6b6256);
  text-transform: uppercase;
  margin: 24px 0 10px;
  text-align: center;
}
.intro-starter-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}
.starter-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 14px 8px 12px;
  background: #fffaf2;
  border: 1px solid rgba(43, 37, 31, 0.10);
  border-radius: 12px;
  cursor: pointer;
  font-family: 'Noto Serif KR', serif;
  transition: all 0.18s ease;
  color: var(--ink, #2a2520);
}
.starter-card:hover {
  border-color: rgba(212, 119, 92, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(43, 37, 31, 0.10);
}
.starter-card.active {
  border-color: var(--coral, #d4775c);
  background: linear-gradient(135deg, rgba(212, 119, 92, 0.12), rgba(184, 146, 76, 0.06));
  box-shadow: 0 6px 18px rgba(212, 119, 92, 0.20);
}
.starter-card .sc-flag {
  font-size: 28px;
  line-height: 1;
}
.starter-card .sc-name {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.starter-card .sc-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.10em;
  color: var(--ink-soft, #6b6256);
  text-align: center;
  line-height: 1.3;
}
.intro-rules {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 18px;
  margin: 8px 0 18px;
  padding: 12px 16px;
  background: rgba(245, 239, 226, 0.6);
  border-radius: 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
}
.intro-rules > div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.intro-rules .ir-l {
  color: var(--ink-soft, #6b6256);
  letter-spacing: 0.10em;
  text-transform: uppercase;
}
.intro-rules .ir-v {
  color: var(--ink, #2a2520);
  font-weight: 600;
}

@media (max-width: 720px) {
  .intro-starter-grid { grid-template-columns: repeat(2, 1fr); }
  .intro-rules { grid-template-columns: 1fr; }
}

/* ======================================================================
   job board (working holiday)
   ====================================================================== */
.job-board {
  margin: 14px 0 0;
  padding: 14px 16px 12px;
  background: linear-gradient(135deg, rgba(122, 141, 107, 0.10), rgba(184, 146, 76, 0.06));
  border: 1px solid rgba(122, 141, 107, 0.30);
  border-radius: 12px;
}
.jb-head { margin-bottom: 10px; }
.jb-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.20em;
  color: var(--sage, #7a8d6b);
  text-transform: uppercase;
  font-weight: 700;
}
.jb-title {
  font-family: 'Noto Serif KR', serif;
  font-size: 14px;
  color: var(--ink, #2a2520);
  margin-top: 2px;
}
.jb-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.job-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: #fffaf2;
  border: 1px solid rgba(43, 37, 31, 0.08);
  border-radius: 10px;
  transition: all 0.2s ease;
}
.job-card.busy {
  background: linear-gradient(90deg, #fffaf2 0%, rgba(184, 146, 76, 0.20) 50%, #fffaf2 100%);
  background-size: 200% 100%;
  animation: jbBusy 1.2s linear infinite;
}
@keyframes jbBusy { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.job-card.done {
  border-color: var(--sage, #7a8d6b);
  background: rgba(122, 141, 107, 0.10);
}
.job-card .jc-info { flex: 1; min-width: 0; }
.job-card .jc-title {
  font-family: 'Noto Serif KR', serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink, #2a2520);
}
.job-card .jc-meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--ink-soft, #6b6256);
  margin-top: 2px;
}
.job-card .jc-pay {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  font-weight: 700;
  color: var(--gold, #b8924c);
  flex-shrink: 0;
}
.job-card .jc-go {
  padding: 6px 12px;
  background: var(--sage, #7a8d6b);
  color: #fff5e8;
  border: 0;
  border-radius: 8px;
  font-family: 'Noto Serif KR', serif;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.16s ease;
  flex-shrink: 0;
}
.job-card .jc-go:hover:not(:disabled) { background: #54664a; }
.job-card .jc-go:disabled { opacity: 0.5; cursor: not-allowed; }
.jb-flash {
  margin-top: 8px;
  padding: 8px 12px;
  background: rgba(122, 141, 107, 0.16);
  border-radius: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--sage, #7a8d6b);
  text-align: center;
  letter-spacing: 0.06em;
  animation: jbFlash 0.4s ease;
}
@keyframes jbFlash { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

/* ======================================================================
   travel log · tabs + summary row + pet fee + payslip
   ====================================================================== */
.modal-summary .ms-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin-bottom: 10px;
}
.modal-summary .ms-row strong {
  font-size: 13px;
  color: var(--coral, #d4775c);
}
.ms-tabs {
  display: flex;
  gap: 6px;
  border-top: 1px dashed rgba(43, 37, 31, 0.10);
  padding-top: 10px;
}
.ms-tab {
  flex: 1;
  padding: 8px 12px;
  background: transparent;
  border: 1px solid rgba(43, 37, 31, 0.14);
  border-radius: 8px;
  font-family: 'Noto Serif KR', serif;
  font-size: 13px;
  color: var(--ink, #2a2520);
  cursor: pointer;
  transition: all 0.16s ease;
}
.ms-tab:hover { border-color: var(--coral, #d4775c); color: var(--coral, #d4775c); }
.ms-tab.active {
  background: var(--ink, #2a2520);
  color: #fff5e8;
  border-color: var(--ink, #2a2520);
}

.tk-fare {
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px dashed rgba(43, 37, 31, 0.12);
}
.tk-fare .tk-total { color: var(--coral, #d4775c); font-size: 13px; }

.dbd-pet {
  display: block;
  font-size: 9px;
  letter-spacing: 0.10em;
  margin-top: 1px;
  opacity: 0.85;
}

/* === payslip === */
.payslip-list { gap: 14px; }
.payslip {
  background: #fffaf2;
  border: 1px solid rgba(122, 141, 107, 0.30);
  border-radius: 12px;
  padding: 16px 20px 18px;
  position: relative;
  box-shadow: 0 2px 8px rgba(43, 37, 31, 0.06);
  background-image:
    repeating-linear-gradient(0deg, transparent, transparent 24px, rgba(122, 141, 107, 0.05) 24px, rgba(122, 141, 107, 0.05) 25px);
}
.ps-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: 2px solid rgba(122, 141, 107, 0.30);
  padding-bottom: 8px;
  margin-bottom: 10px;
}
.ps-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.22em;
  color: var(--sage, #7a8d6b);
  font-weight: 700;
  text-transform: uppercase;
}
.ps-no {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--ink-soft, #6b6256);
}
.ps-title {
  font-family: 'Noto Serif KR', serif;
  font-size: 17px;
  font-weight: 600;
  color: var(--ink, #2a2520);
}
.ps-meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--ink-soft, #6b6256);
  margin: 4px 0 12px;
}
.ps-rows {
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-top: 1px dashed rgba(43, 37, 31, 0.12);
  padding-top: 8px;
}
.ps-row {
  display: flex;
  justify-content: space-between;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
}
.ps-row span:first-child {
  color: var(--ink-soft, #6b6256);
  letter-spacing: 0.10em;
  text-transform: uppercase;
  font-size: 10px;
}
.ps-row span:last-child {
  color: var(--ink, #2a2520);
  font-weight: 600;
}
.ps-row.deduct span:last-child { color: var(--coral, #d4775c); }
.ps-row.total {
  border-top: 2px solid rgba(122, 141, 107, 0.40);
  margin-top: 4px;
  padding-top: 6px;
}
.ps-row.total span {
  font-size: 14px !important;
  color: var(--sage, #7a8d6b) !important;
  font-weight: 700;
  letter-spacing: 0.04em !important;
  text-transform: none !important;
}
.ps-pet {
  margin-top: 10px;
  font-family: 'Noto Serif KR', serif;
  font-size: 11px;
  color: var(--ink-soft, #6b6256);
  font-style: italic;
}

.print-header { display: none; }

/* depart-btn cost composition */
.depart-btn .cost-pet {
  display: block;
  font-size: 10px;
  letter-spacing: 0.12em;
  opacity: 0.78;
}
.depart-btn .cost-local {
  display: block;
  font-size: 10px;
  letter-spacing: 0.06em;
  opacity: 0.85;
  margin-top: 1px;
}

/* ======================================================================
   print mode (window.print() friendly)
   ====================================================================== */
@media print {
  body.cony-printing > *:not(.modal-overlay) { display: none !important; }
  .modal-overlay {
    position: static !important;
    background: white !important;
    backdrop-filter: none !important;
    padding: 0 !important;
    z-index: auto !important;
  }
  .modal {
    box-shadow: none !important;
    max-height: none !important;
    border-radius: 0 !important;
    border: 0 !important;
    width: 100% !important;
    max-width: none !important;
    background: white !important;
  }
  .no-print { display: none !important; }
  .print-header {
    display: block !important;
    padding: 16px 22px;
    border-bottom: 2px solid #2a2520;
    margin-bottom: 16px;
  }
  .print-header .ph-title {
    font-family: 'Noto Serif KR', serif;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #2a2520;
  }
  .print-header .ph-sub {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.06em;
    color: #6b6256;
    margin-top: 4px;
  }
  .print-header .ph-date {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: #6b6256;
    margin-top: 4px;
    letter-spacing: 0.10em;
  }
  .modal-body {
    overflow: visible !important;
    padding: 0 22px !important;
  }
  .ticket, .payslip {
    page-break-inside: avoid;
    box-shadow: none !important;
    border: 1px solid #2a2520 !important;
    margin-bottom: 12px;
  }
  .ticket .tk-stub {
    background: #2a2520 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .ticket.tk-plane .tk-stub  { background: #d4775c !important; }
  .ticket.tk-ship .tk-stub   { background: #6c8088 !important; }
  .ticket.tk-bus .tk-stub    { background: #b8924c !important; }
  .ticket.tk-subway .tk-stub { background: #7a8d6b !important; }
}

/* ======================================================================
   passport · stamps + skin picker
   ====================================================================== */
.passport {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.pp-summary {
  display: flex;
  gap: 18px;
  padding: 14px 16px;
  background: linear-gradient(135deg, #fffaf2, #f5efe2);
  border: 1px solid rgba(43, 37, 31, 0.10);
  border-radius: 12px;
}
.pp-stat { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.pp-stat .pps-l {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--ink-soft, #6b6256);
  text-transform: uppercase;
}
.pp-stat .pps-v {
  font-family: 'Noto Serif KR', serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--coral, #d4775c);
}
.pp-stat .pps-dim {
  font-size: 14px;
  color: var(--ink-soft, #6b6256);
  font-weight: 400;
}

.pp-section-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.20em;
  color: var(--ink-soft, #6b6256);
  text-transform: uppercase;
  margin: 4px 0 -4px;
}

.pp-skins {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 8px;
}
.pp-skin {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 10px 10px;
  background: #fffaf2;
  border: 1px solid rgba(43, 37, 31, 0.10);
  border-radius: 10px;
  cursor: pointer;
  text-align: left;
  font-family: 'Noto Serif KR', serif;
  transition: all 0.16s ease;
  position: relative;
  overflow: hidden;
}
.pp-skin:disabled, .pp-skin.locked {
  opacity: 0.45;
  cursor: not-allowed;
  filter: grayscale(0.5);
}
.pp-skin.unlocked:hover { transform: translateY(-2px); border-color: var(--coral, #d4775c); }
.pp-skin.active {
  border-color: var(--coral, #d4775c);
  background: rgba(212, 119, 92, 0.08);
  box-shadow: 0 4px 12px rgba(212, 119, 92, 0.18);
}
.pps-skin-strip { display: block; height: 8px; border-radius: 100px; }
.pp-skin.sk-classic .pps-skin-strip { background: linear-gradient(90deg, #2a2520, #6b6256); }
.pp-skin.sk-vintage .pps-skin-strip { background: linear-gradient(90deg, #b8924c, #8e6d34, #b8924c); }
.pp-skin.sk-neon    .pps-skin-strip { background: linear-gradient(90deg, #d4775c, #e94f8a, #b864ff); }
.pp-skin.sk-sakura  .pps-skin-strip { background: linear-gradient(90deg, #f5b7c5, #e89aae, #f5b7c5); }
.pp-skin.sk-gold    .pps-skin-strip { background: linear-gradient(90deg, #d4af37, #ffd700, #d4af37); }
.pps-skin-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink, #2a2520);
}
.pps-skin-hint {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.10em;
  color: var(--ink-soft, #6b6256);
  text-transform: uppercase;
}

.pp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 8px;
}
.pp-stamp {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 14px 8px 10px;
  background: #fffaf2;
  border: 2px dashed rgba(43, 37, 31, 0.18);
  border-radius: 10px;
  position: relative;
  transition: all 0.18s ease;
}
.pp-stamp.stamped {
  border: 2px solid var(--coral, #d4775c);
  background: linear-gradient(135deg, rgba(212, 119, 92, 0.06), rgba(184, 146, 76, 0.04));
  transform: rotate(-1deg);
  animation: stampBob 0.45s cubic-bezier(0.2, 0.9, 0.3, 1.4);
}
.pp-stamp.stamped::after {
  content: 'VISITED';
  position: absolute;
  top: 4px;
  right: 4px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 8px;
  font-weight: 700;
  color: var(--coral, #d4775c);
  border: 1px solid var(--coral, #d4775c);
  border-radius: 3px;
  padding: 1px 4px;
  letter-spacing: 0.10em;
  transform: rotate(8deg);
  opacity: 0.78;
}
.pp-stamp.locked { opacity: 0.55; filter: grayscale(0.6); }
.pp-stamp .pps-flag { font-size: 28px; line-height: 1; }
.pp-stamp .pps-name {
  font-family: 'Noto Serif KR', serif;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink, #2a2520);
  text-align: center;
}
.pp-stamp .pps-visits {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  color: var(--ink-soft, #6b6256);
  letter-spacing: 0.10em;
}
@keyframes stampBob {
  0%   { transform: rotate(-12deg) scale(1.4); opacity: 0; }
  60%  { transform: rotate(2deg) scale(1.05); opacity: 1; }
  100% { transform: rotate(-1deg) scale(1); }
}

/* ticket skins (apply to all .ticket inside the colored list container) */
.ticket-list.ts-vintage .ticket {
  background-image: repeating-linear-gradient(45deg, transparent 0 8px, rgba(184, 146, 76, 0.06) 8px 9px);
  border-color: rgba(184, 146, 76, 0.40) !important;
}
.ticket-list.ts-vintage .tk-stub { filter: sepia(0.4) saturate(1.2); }

.ticket-list.ts-neon .ticket {
  border-color: rgba(233, 79, 138, 0.40) !important;
  box-shadow: 0 0 0 1px rgba(184, 100, 255, 0.20), 0 8px 28px rgba(212, 119, 92, 0.22) !important;
}
.ticket-list.ts-neon .tk-stub {
  background: linear-gradient(180deg, #d4775c, #b864ff) !important;
}
.ticket-list.ts-neon .tk-city { color: #d4775c; }

.ticket-list.ts-sakura .ticket {
  border-color: rgba(232, 154, 174, 0.50) !important;
  background: linear-gradient(135deg, #fff7fa, #fffaf2) !important;
}
.ticket-list.ts-sakura .tk-stub {
  background: linear-gradient(180deg, #f5b7c5, #e89aae) !important;
}

.ticket-list.ts-gold .ticket {
  border: 2px solid #d4af37 !important;
  background: linear-gradient(135deg, #fffce8, #fffaf2) !important;
  box-shadow: 0 0 0 1px rgba(255, 215, 0, 0.30), 0 8px 24px rgba(212, 175, 55, 0.20) !important;
}
.ticket-list.ts-gold .tk-stub {
  background: linear-gradient(180deg, #d4af37, #b8924c) !important;
}
.ticket-list.ts-gold .tk-city { color: #b8924c; }

/* ======================================================================
   image-capture mode (overrides for html-to-image to fit ALL content)
   ====================================================================== */
body.cony-image-capture .modal-overlay {
  position: static !important;
  background: transparent !important;
  backdrop-filter: none !important;
  padding: 0 !important;
}
body.cony-image-capture .modal {
  box-shadow: none !important;
  max-height: none !important;
  height: auto !important;
  overflow: visible !important;
}
body.cony-image-capture .print-container {
  overflow: visible !important;
  height: auto !important;
  max-height: none !important;
}
body.cony-image-capture .modal-body {
  overflow: visible !important;
  max-height: none !important;
  height: auto !important;
}
body.cony-image-capture .travel-log .modal-body {
  max-height: none !important;
}
body.cony-image-capture .ticket,
body.cony-image-capture .payslip {
  box-shadow: none !important;
  page-break-inside: avoid;
  break-inside: avoid;
}
body.cony-image-capture .print-header {
  display: block !important;
  padding: 22px 26px 16px;
  background: linear-gradient(180deg, #fffaf2, #f5efe2);
  border-bottom: 2px solid #2a2520;
}
body.cony-image-capture .print-header .ph-title {
  font-family: 'Noto Serif KR', serif;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #2a2520;
}
body.cony-image-capture .print-header .ph-sub {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: #6b6256;
  margin-top: 6px;
}
body.cony-image-capture .print-header .ph-date {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: #6b6256;
  margin-top: 4px;
  letter-spacing: 0.10em;
}

/* total summary banner (tickets / payslips) */
.total-banner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
  padding: 14px 18px;
  background: linear-gradient(135deg, var(--ink, #2a2520) 0%, #3a342c 100%);
  color: #fff5e8;
  border-radius: 12px;
  margin-bottom: 6px;
}
.total-banner.green {
  background: linear-gradient(135deg, var(--sage, #7a8d6b) 0%, #54664a 100%);
}
.total-banner .tb-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.total-banner .tb-l {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  opacity: 0.7;
  text-transform: uppercase;
}
.total-banner .tb-v {
  font-family: 'Noto Serif KR', serif;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.total-banner .tb-v small {
  font-size: 12px;
  opacity: 0.75;
  font-weight: 400;
}

/* ======================================================================
   weather pill (top-right of city card hero)
   ====================================================================== */
.weather-pill {
  position: absolute;
  top: 12px;
  right: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(43, 37, 31, 0.55);
  backdrop-filter: blur(6px);
  border-radius: 100px;
  color: #fff5e8;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.06em;
  pointer-events: none;
  z-index: 2;
}
.weather-pill .wp-icon { font-size: 16px; }
.weather-pill .wp-temp { font-weight: 700; font-size: 13px; }
.weather-pill .wp-cond { opacity: 0.85; }

/* ======================================================================
   city tasks
   ====================================================================== */
.city-tasks {
  margin: 6px 0 16px;
  padding: 12px 14px;
  background: rgba(122, 141, 107, 0.06);
  border: 1px solid rgba(122, 141, 107, 0.30);
  border-radius: 10px;
}
.ct-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
}
.ct-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.20em;
  color: var(--sage, #7a8d6b);
  font-weight: 700;
  text-transform: uppercase;
}
.ct-progress {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--ink-soft, #6b6256);
  letter-spacing: 0.06em;
}
.ct-list { display: flex; flex-direction: column; gap: 4px; }
.ct-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 4px 0;
  font-family: 'Noto Serif KR', serif;
  font-size: 13px;
  color: var(--ink, #2a2520);
}
.ct-row.done { color: var(--sage, #7a8d6b); }
.ct-row.done .ct-label { text-decoration: line-through; opacity: 0.7; }
.ct-mark {
  width: 18px;
  text-align: center;
  font-weight: 700;
  color: var(--ink-soft, #6b6256);
}
.ct-row.done .ct-mark { color: var(--sage, #7a8d6b); }
.ct-label { flex: 1; }
.ct-hint {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.06em;
  color: var(--ink-soft, #6b6256);
  opacity: 0.7;
}

/* ======================================================================
   encounter modal
   ====================================================================== */
.modal.encounter {
  max-width: 460px;
  padding: 26px 28px;
}
.encounter-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.22em;
  color: var(--coral, #d4775c);
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.encounter-title {
  font-family: 'Noto Serif KR', serif;
  font-size: 22px;
  font-weight: 600;
  color: var(--ink, #2a2520);
  letter-spacing: 0.04em;
}
.encounter-text {
  font-family: 'Noto Serif KR', serif;
  font-size: 15px;
  color: var(--ink, #2a2520);
  line-height: 1.7;
  margin: 12px 0 18px;
  padding-left: 14px;
  border-left: 3px solid var(--coral, #d4775c);
}
.encounter-choices { display: flex; flex-direction: column; gap: 8px; }
.encounter-choice {
  padding: 12px 16px;
  background: #fffaf2;
  border: 1px solid rgba(43, 37, 31, 0.18);
  border-radius: 10px;
  font-family: 'Noto Serif KR', serif;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
  color: var(--ink, #2a2520);
  transition: all 0.16s ease;
}
.encounter-choice:hover {
  border-color: var(--coral, #d4775c);
  background: rgba(212, 119, 92, 0.06);
  transform: translateX(2px);
}
.encounter-result { animation: encResultPop 0.4s cubic-bezier(0.2, 0.9, 0.3, 1.4); }
.enc-tip {
  font-family: 'Noto Serif KR', serif;
  font-size: 14px;
  color: var(--ink, #2a2520);
  font-style: italic;
  line-height: 1.6;
  padding: 12px 14px;
  background: rgba(122, 141, 107, 0.10);
  border-radius: 8px;
}
.enc-reward {
  margin-top: 10px;
  text-align: right;
  font-family: 'JetBrains Mono', monospace;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.enc-reward.gain { color: var(--sage, #7a8d6b); }
.enc-reward.loss { color: var(--coral, #d4775c); }
@keyframes encResultPop {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ======================================================================
   message board (per-city)
   ====================================================================== */
.message-board {
  margin-top: 16px;
  border-top: 1px dashed rgba(43, 37, 31, 0.16);
  padding-top: 14px;
}
.mb-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.mb-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.22em;
  color: var(--coral, #d4775c);
  font-weight: 700;
  text-transform: uppercase;
}
.mb-filters {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-left: auto;
}
.mb-filter {
  padding: 3px 9px;
  background: transparent;
  border: 1px solid rgba(43, 37, 31, 0.14);
  border-radius: 100px;
  font-family: 'Noto Serif KR', serif;
  font-size: 11px;
  color: var(--ink-soft, #6b6256);
  cursor: pointer;
  transition: all 0.16s ease;
}
.mb-filter:hover { border-color: var(--coral, #d4775c); color: var(--coral, #d4775c); }
.mb-filter.active {
  background: var(--ink, #2a2520);
  border-color: var(--ink, #2a2520);
  color: #fff5e8;
}
.mb-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}
.mb-empty {
  padding: 14px;
  text-align: center;
  font-family: 'Noto Serif KR', serif;
  font-size: 12px;
  color: var(--ink-soft, #6b6256);
  font-style: italic;
}
.mb-msg {
  padding: 10px 12px;
  background: #fffaf2;
  border: 1px solid rgba(43, 37, 31, 0.08);
  border-radius: 10px;
  position: relative;
}
.mb-msg.mine {
  border-left: 3px solid var(--coral, #d4775c);
  background: rgba(212, 119, 92, 0.04);
}
.mb-row1 {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  margin-bottom: 4px;
}
.mb-mood { font-size: 14px; }
.mb-nick { font-weight: 700; color: var(--ink, #2a2520); font-size: 12px; font-family: 'Noto Serif KR', serif; }
.mb-topic {
  padding: 1px 6px;
  background: rgba(43, 37, 31, 0.08);
  border-radius: 100px;
  letter-spacing: 0.06em;
  color: var(--ink-soft, #6b6256);
}
.mb-topic.book   { background: rgba(184, 146, 76, 0.18); color: var(--gold, #b8924c); }
.mb-msg.topic-book .mb-topic   { background: rgba(184, 146, 76, 0.18); color: var(--gold, #b8924c); }
.mb-msg.topic-music .mb-topic  { background: rgba(122, 141, 107, 0.18); color: var(--sage, #7a8d6b); }
.mb-msg.topic-film .mb-topic   { background: rgba(212, 119, 92, 0.16); color: var(--coral, #d4775c); }
.mb-msg.topic-food .mb-topic   { background: rgba(108, 128, 136, 0.18); color: #6c8088; }
.mb-time { color: var(--ink-soft, #6b6256); margin-left: auto; opacity: 0.75; }
.mb-content {
  font-family: 'Noto Serif KR', serif;
  font-size: 13px;
  color: var(--ink, #2a2520);
  line-height: 1.55;
}
.mb-row2 {
  display: flex;
  margin-top: 6px;
  justify-content: flex-end;
}
.mb-like {
  background: transparent;
  border: 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--ink-soft, #6b6256);
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  transition: all 0.16s ease;
}
.mb-like:hover { color: var(--coral, #d4775c); background: rgba(212, 119, 92, 0.06); }
.mb-like.on { color: var(--coral, #d4775c); font-weight: 700; }

.mb-compose {
  background: #fffaf2;
  border: 1px solid rgba(43, 37, 31, 0.10);
  border-radius: 10px;
  padding: 10px;
}
.mbc-row {
  display: flex;
  gap: 6px;
  align-items: center;
}
.mbc-bottom { margin-top: 6px; justify-content: space-between; }
.mbc-topic, .mbc-mood {
  padding: 5px 8px;
  border: 1px solid rgba(43, 37, 31, 0.14);
  border-radius: 6px;
  background: #fff;
  font-family: 'Noto Serif KR', serif;
  font-size: 12px;
  color: var(--ink, #2a2520);
  cursor: pointer;
}
.mbc-input {
  width: 100%;
  margin-top: 6px;
  padding: 8px 10px;
  border: 1px solid rgba(43, 37, 31, 0.14);
  border-radius: 8px;
  resize: vertical;
  font-family: 'Noto Serif KR', serif;
  font-size: 13px;
  color: var(--ink, #2a2520);
  outline: none;
  box-sizing: border-box;
}
.mbc-input:focus { border-color: var(--coral, #d4775c); }
.mbc-hint {
  display: block;
  margin-top: 6px;
  text-align: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.06em;
  color: var(--ink-soft, #6b6256);
  opacity: 0.75;
}
.mbc-send {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 10px 16px;
  background: var(--coral, #d4775c);
  color: #fff5e8;
  border: 0;
  border-radius: 8px;
  font-family: 'Noto Serif KR', serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all 0.16s ease;
  box-shadow: 0 4px 12px rgba(212, 119, 92, 0.28);
}
.mbc-send:hover:not(:disabled) { background: #c2624c; transform: translateY(-1px); box-shadow: 0 6px 16px rgba(212, 119, 92, 0.40); }
.mbc-send:disabled { background: #6b6256; opacity: 0.45; cursor: not-allowed; box-shadow: none; }

/* ======================================================================
   visited markers · flags on the world map + country deep-dive
   ====================================================================== */
.city.visited .city-dot {
  background: var(--coral, #d4775c);
  box-shadow: 0 0 0 2px rgba(212, 119, 92, 0.20);
}
.city-flag {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translate(-50%, 4px);
  font-size: 18px;
  line-height: 1;
  pointer-events: none;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.25));
  animation: flagPlant 0.45s cubic-bezier(0.2, 0.9, 0.3, 1.4);
  z-index: 4;
}
@keyframes flagPlant {
  0%   { transform: translate(-50%, -8px) scale(1.6); opacity: 0; }
  60%  { transform: translate(-50%, 5px)  scale(1.05); opacity: 1; }
  100% { transform: translate(-50%, 4px)  scale(1); }
}

/* ======================================================================
   message board · replies
   ====================================================================== */
.mb-row2 {
  display: flex;
  margin-top: 6px;
  justify-content: flex-end;
  gap: 6px;
}
.mb-reply-btn {
  background: transparent;
  border: 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--ink-soft, #6b6256);
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  transition: all 0.16s ease;
}
.mb-reply-btn:hover { color: var(--coral, #d4775c); background: rgba(212, 119, 92, 0.06); }
.mb-replies {
  margin-top: 8px;
  padding-left: 12px;
  border-left: 2px solid rgba(212, 119, 92, 0.20);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.mb-reply {
  padding: 6px 8px;
  background: rgba(245, 239, 226, 0.55);
  border-radius: 6px;
}
.mbr-nick {
  font-family: 'Noto Serif KR', serif;
  font-size: 11px;
  font-weight: 700;
  color: var(--ink, #2a2520);
  margin-right: 6px;
}
.mbr-time {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  color: var(--ink-soft, #6b6256);
  opacity: 0.78;
}
.mbr-content {
  font-family: 'Noto Serif KR', serif;
  font-size: 12px;
  color: var(--ink, #2a2520);
  line-height: 1.55;
  margin-top: 2px;
}
.mb-reply-compose {
  margin-top: 8px;
  padding: 8px;
  background: #fffaf2;
  border: 1px solid rgba(43, 37, 31, 0.10);
  border-radius: 6px;
}
.mbrc-input {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid rgba(43, 37, 31, 0.14);
  border-radius: 6px;
  resize: vertical;
  font-family: 'Noto Serif KR', serif;
  font-size: 12px;
  outline: none;
  box-sizing: border-box;
}
.mbrc-input:focus { border-color: var(--coral, #d4775c); }
.mbrc-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 6px;
}
.mbrc-hint {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  color: var(--ink-soft, #6b6256);
  opacity: 0.7;
}
.mbrc-send {
  padding: 5px 12px;
  background: var(--coral, #d4775c);
  color: #fff5e8;
  border: 0;
  border-radius: 4px;
  font-family: 'Noto Serif KR', serif;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.16s ease;
}
.mbrc-send:hover:not(:disabled) { background: #c2624c; }
.mbrc-send:disabled { background: #6b6256; opacity: 0.4; cursor: not-allowed; }

/* ======================================================================
   immersive cabin scene during travel · per-transport + per-class
   ====================================================================== */
.travel-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(43, 37, 31, 0.55);
  backdrop-filter: blur(6px);
  pointer-events: none;
}
.travel-overlay .travel-card {
  pointer-events: auto;
  margin-top: 18px;
  background: rgba(255, 250, 242, 0.95);
  border-radius: 14px;
  padding: 14px 22px;
  box-shadow: 0 12px 36px rgba(0,0,0,0.30);
  font-family: 'Noto Serif KR', serif;
  text-align: center;
  min-width: 320px;
  max-width: 420px;
}
.travel-overlay .travel-status {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--coral, #d4775c);
  text-transform: uppercase;
}
.travel-overlay .travel-route {
  font-size: 18px;
  margin: 6px 0 12px;
  display: flex; gap: 10px; justify-content: center; align-items: center;
}
.travel-overlay .travel-route .arrow { color: var(--coral, #d4775c); }
.travel-overlay .travel-progress {
  height: 4px;
  background: rgba(43, 37, 31, 0.10);
  border-radius: 100px;
  overflow: hidden;
}
.travel-overlay .travel-progress-bar {
  height: 100%;
  background: var(--coral, #d4775c);
  transition: width 0.18s linear;
}
.travel-overlay .travel-progress-meta {
  display: flex; justify-content: space-between;
  font-family: 'JetBrains Mono', monospace; font-size: 11px;
  margin-top: 6px; color: var(--ink-soft, #6b6256);
}

.cabin {
  position: relative;
  width: min(640px, 92vw);
  height: 320px;
  background: #fffaf2;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0,0,0,0.30);
  display: flex;
  flex-direction: column;
}
.cabin.plane.premium { background: linear-gradient(180deg, #faf3e8, #f0e2c8); }
.cabin.plane.economy { background: linear-gradient(180deg, #f5efe2, #e9e1cd); }
.cabin.bus           { background: linear-gradient(180deg, #f5efe2, #e3dac0); }
.cabin.train.first   { background: linear-gradient(180deg, #f3e9d2, #e2d3ad); }
.cabin.train.standard{ background: linear-gradient(180deg, #f5efe2, #ddd1b2); }
.cabin.ship.suite    { background: linear-gradient(180deg, #e6f0f7, #c9def1); }
.cabin.ship.sea      { background: linear-gradient(180deg, #ecf3f8, #d6e5ee); }
.cabin.ship.inside   { background: linear-gradient(180deg, #2d2a26, #1a1815); color: #fff5e8; }

.cabin-window {
  position: relative;
  width: 100%;
  background: linear-gradient(180deg, #87b8d8, #b8d4ea);
  overflow: hidden;
}
.plane-window { height: 110px; border-bottom: 6px solid rgba(43,37,31,0.18); }
.bus-window   { height: 90px;  border-bottom: 4px solid rgba(43,37,31,0.18); }
.train-window { height: 110px; border-bottom: 4px solid rgba(43,37,31,0.18); }
.cabin-window.porthole {
  width: 110px; height: 110px;
  border-radius: 50%;
  margin: 16px auto -10px;
  border: 6px solid rgba(43,37,31,0.30);
  box-shadow: inset 0 0 0 4px rgba(255,255,255,0.30);
  overflow: hidden;
  background: linear-gradient(180deg, #6c8088, #3d4f57);
}

.window-scene {
  position: absolute;
  inset: 0;
  width: 200%;
  height: 100%;
  background-repeat: repeat-x;
  background-size: 200px 100%;
  transition: transform 0.18s linear;
}
.window-scene.clouds {
  background-image:
    radial-gradient(ellipse 50px 18px at 30px 40%, rgba(255,255,255,0.85), transparent 70%),
    radial-gradient(ellipse 80px 22px at 130px 60%, rgba(255,255,255,0.70), transparent 70%);
  background-color: transparent;
}
.window-scene.ocean {
  background-image:
    repeating-linear-gradient(180deg, rgba(255,255,255,0.10) 0 2px, transparent 2px 14px),
    radial-gradient(ellipse 60px 6px at 50% 70%, rgba(255,255,255,0.40), transparent 70%);
  background-color: rgba(108, 128, 136, 0.30);
}
.window-scene.highway {
  background-image:
    linear-gradient(180deg, transparent 0 60%, #6b6256 60% 100%),
    repeating-linear-gradient(90deg, #fff5e8 0 30px, transparent 30px 80px);
  background-position: 0 0, 0 75%;
  background-size: 200px 100%, 110px 4px;
}
.window-scene.mountains {
  background-image:
    linear-gradient(180deg, transparent 0 50%, #7a8d6b 50%, #54664a 90%, #2a2520 100%),
    repeating-linear-gradient(90deg, transparent 0 60px, rgba(255,255,255,0.10) 60px 65px);
}

.cabin-interior {
  flex: 1;
  position: relative;
  padding: 10px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cabin-label {
  position: absolute;
  bottom: 8px; left: 0; right: 0;
  text-align: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--ink-soft, #6b6256);
  text-transform: uppercase;
  opacity: 0.78;
}
.cabin.ship.inside .cabin-label { color: rgba(255,245,232,0.65); }

.seat-row {
  display: flex;
  gap: 6px;
  justify-content: center;
}
.seat-row.back { transform: scale(0.85); opacity: 0.6; margin-top: -4px; }
.seat-row.train-row.premium { gap: 24px; margin-top: 14px; }
.seat {
  width: 48px;
  height: 38px;
  background: linear-gradient(180deg, #4a4239, #2a2520);
  border-radius: 6px 6px 4px 4px;
  position: relative;
  border: 1px solid rgba(0,0,0,0.30);
}
.seat::before {
  content: '';
  position: absolute;
  top: 4px; left: 6px; right: 6px; height: 8px;
  background: rgba(255, 245, 232, 0.10);
  border-radius: 4px;
}
.seat.economy { background: linear-gradient(180deg, #6b6256, #4a4239); }
.seat.bus-seat { background: linear-gradient(180deg, #5a4f3e, #3a3128); width: 56px; height: 42px; }
.seat.train-seat { background: linear-gradient(180deg, #4a5544, #2e3829); width: 50px; height: 40px; }
.seat.train-seat.wide { width: 90px; height: 56px; background: linear-gradient(180deg, #6c7a5c, #3e4a3a); }
.seat.you {
  border-color: var(--coral, #d4775c);
  box-shadow: 0 0 0 2px rgba(212, 119, 92, 0.45);
}
.seat.you::after {
  content: '你';
  position: absolute;
  top: -10px; left: 50%; transform: translateX(-50%);
  font-family: 'Noto Serif KR', serif;
  font-size: 10px;
  background: var(--coral, #d4775c);
  color: #fff5e8;
  padding: 1px 6px;
  border-radius: 100px;
  white-space: nowrap;
}
.aisle { width: 18px; }

.seat-tray {
  position: absolute;
  bottom: -10px; left: 50%; transform: translateX(-50%);
  width: 48px; height: 6px;
  background: rgba(255, 245, 232, 0.85);
  border-radius: 2px;
  display: flex; align-items: center; justify-content: center;
}
.snack { font-size: 8px; }

/* plane premium */
.lay-flat {
  width: 80%;
  margin: 0 auto;
  height: 80px;
  background: linear-gradient(180deg, #faecc6, #e3cb8c);
  border-radius: 10px;
  position: relative;
  display: flex; align-items: center; padding: 0 18px;
}
.seat-blanket {
  position: absolute; left: 18px; right: 18px; top: 30px; bottom: 12px;
  background: linear-gradient(135deg, #d4775c 25%, #c2624c 50%, #d4775c 75%);
  background-size: 14px 14px;
  border-radius: 6px;
}
.seat-pillow {
  position: absolute; left: 22px; top: 8px;
  width: 28px; height: 18px;
  background: #fff5e8;
  border-radius: 50% 50% 30% 30%;
}
.tray.champagne {
  position: absolute; right: 24px; top: 14px;
  width: 36px; height: 50px;
  background: rgba(255,245,232,0.50);
  border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
}
.champagne-glass { font-size: 22px; }

/* ship */
.suite-bed {
  width: 75%;
  margin: 6px auto;
  height: 70px;
  background: linear-gradient(180deg, #fff5e8, #f0d8b4);
  border-radius: 6px;
  display: flex; gap: 10px; padding: 14px;
}
.bed-pillow { width: 30px; height: 18px; background: #fff5e8; border-radius: 4px; box-shadow: 0 1px 0 rgba(0,0,0,0.10); }
.suite-table {
  position: absolute; right: 28px; bottom: 36px;
  width: 30px; height: 24px;
  background: #d4af37;
  border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
}
.suite-table span { font-size: 16px; }
.bunk {
  width: 75%; margin: 14px auto;
  height: 50px;
  background: linear-gradient(180deg, #6b6256, #3a3128);
  border-radius: 4px;
  display: flex; align-items: center; padding: 8px;
}
.bunk-stack {
  width: 75%; margin: 8px auto;
  display: flex; flex-direction: column; gap: 4px;
}
.bunk.small { height: 30px; padding: 4px; }
.bunk.you {
  border: 2px solid var(--coral, #d4775c);
  box-shadow: 0 0 0 1px rgba(212,119,92,0.40);
}
.cabin.ship.inside .bunk.you::after {
  content: '你';
  position: absolute;
  font-family: 'Noto Serif KR', serif;
  font-size: 10px;
  background: var(--coral, #d4775c);
  color: #fff5e8;
  padding: 1px 6px;
  border-radius: 100px;
  margin-left: -36px;
  margin-top: -16px;
}

/* mobile compact */
@media (max-width: 640px) {
  .cabin { height: 260px; width: 96vw; }
  .plane-window, .bus-window, .train-window { height: 80px; }
  .seat { width: 40px; height: 32px; }
  .seat.bus-seat { width: 46px; height: 36px; }
  .seat.train-seat { width: 42px; height: 34px; }
  .seat.train-seat.wide { width: 70px; height: 44px; }
  .lay-flat { height: 70px; }
}

/* ======================================================================
   depart confirm modal · boarding-pass preview
   ====================================================================== */
.modal.depart-confirm {
  max-width: 520px;
  padding: 0;
  overflow: hidden;
  background: #fffaf2;
}
.dc-head {
  padding: 16px 22px 12px;
  border-bottom: 1px dashed rgba(43, 37, 31, 0.18);
}
.dc-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--coral, #d4775c);
  font-weight: 700;
  text-align: center;
}
.dc-ticket {
  display: flex;
  margin: 14px 18px;
  background: #fffaf2;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 4px 14px rgba(43, 37, 31, 0.08);
  border: 1px solid rgba(43, 37, 31, 0.10);
}
.dc-ticket::before {
  content: '';
  position: absolute;
  left: 110px;
  top: -6px; bottom: -6px;
  width: 12px;
  background:
    radial-gradient(circle at 0 6px, transparent 6px, rgba(43,37,31,0.12) 6px, rgba(43,37,31,0.12) 7px, transparent 7px) 0 0/100% 14px,
    #fffaf2;
  pointer-events: none;
  z-index: 1;
}
.dc-stub {
  width: 110px;
  flex-shrink: 0;
  padding: 16px 14px;
  background: linear-gradient(180deg, var(--ink, #2a2520), #1f1c17);
  color: #fff5e8;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.dc-ticket.tk-plane .dc-stub  { background: linear-gradient(180deg, var(--coral, #d4775c), #b85d44); }
.dc-ticket.tk-ship .dc-stub   { background: linear-gradient(180deg, #6c8088, #4f6168); }
.dc-ticket.tk-bus .dc-stub    { background: linear-gradient(180deg, var(--gold, #b8924c), #8e6d34); }
.dc-ticket.tk-subway .dc-stub { background: linear-gradient(180deg, var(--sage, #7a8d6b), #54664a); }
.dc-stub-meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.85;
  line-height: 1.3;
}
.dc-stub-no {
  font-family: 'JetBrains Mono', monospace;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.05em;
}
.dc-stub-bar {
  height: 22px;
  background: repeating-linear-gradient(90deg,
    rgba(255,245,232,0.85) 0 1.5px,
    transparent 1.5px 3px,
    rgba(255,245,232,0.85) 3px 5px,
    transparent 5px 7px);
  border-radius: 2px;
}
.dc-main {
  flex: 1;
  padding: 16px 18px 14px 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.dc-route {
  display: flex;
  align-items: center;
  gap: 12px;
}
.dc-side { min-width: 0; flex: 1; }
.dc-tag-sm {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.18em;
  color: var(--ink-soft, #6b6256);
  text-transform: uppercase;
}
.dc-city {
  font-family: 'Noto Serif KR', serif;
  font-size: 19px;
  font-weight: 600;
  color: var(--ink, #2a2520);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.02em;
}
.dc-arrow {
  text-align: center;
  color: var(--coral, #d4775c);
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  letter-spacing: -0.06em;
  flex-shrink: 0;
}
.dc-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
}
.dc-row > div { display: inline-flex; gap: 6px; align-items: baseline; }
.dc-l {
  color: var(--ink-soft, #6b6256);
  letter-spacing: 0.10em;
  text-transform: uppercase;
  font-size: 9px;
}
.dc-v { color: var(--ink, #2a2520); font-weight: 600; }
.dc-fare {
  margin-top: 2px;
  padding-top: 10px;
  border-top: 1px dashed rgba(43, 37, 31, 0.16);
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.dc-fare-row {
  display: flex;
  justify-content: space-between;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--ink-soft, #6b6256);
}
.dc-fare-row.total {
  border-top: 1px solid rgba(43, 37, 31, 0.16);
  margin-top: 4px;
  padding-top: 6px;
  color: var(--ink, #2a2520);
}
.dc-fare-row.total strong {
  color: var(--coral, #d4775c);
  font-size: 16px;
  font-weight: 700;
}
.dc-local {
  font-style: normal;
  color: var(--ink-soft, #6b6256);
  font-size: 10px;
  margin-left: 8px;
  font-weight: 400;
}
.dc-pet {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px dashed rgba(43, 37, 31, 0.12);
  font-family: 'Noto Serif KR', serif;
  font-size: 12px;
  color: var(--ink-soft, #6b6256);
}
.dc-pet-photo {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(43, 37, 31, 0.10);
}
.dc-warn {
  margin: 4px 18px 0;
  padding: 8px 14px;
  background: rgba(212, 119, 92, 0.10);
  border: 1px solid rgba(212, 119, 92, 0.32);
  border-radius: 8px;
  text-align: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--coral, #d4775c);
  letter-spacing: 0.06em;
}
.dc-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 18px 18px;
}
.dc-go { font-size: 14px; padding: 12px 22px; }

@media (max-width: 640px) {
  .dc-stub { width: 84px; padding: 14px 10px; }
  .dc-ticket::before { left: 84px; }
  .dc-main { padding-left: 22px; padding-right: 14px; }
  .dc-city { font-size: 16px; }
}

/* ======================================================================
   cabin scene · animations + class differentiation
   ====================================================================== */
/* class banner across the top of every cabin */
.cabin-banner {
  position: absolute;
  top: 12px; left: 50%; transform: translateX(-50%);
  padding: 6px 16px;
  border-radius: 100px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.22em;
  font-weight: 700;
  z-index: 5;
  white-space: nowrap;
  display: flex; gap: 6px; align-items: baseline;
}
.cabin-banner .cb-sub { opacity: 0.75; font-weight: 500; letter-spacing: 0.10em; }
.cabin-banner.tier-first {
  background: linear-gradient(135deg, #d4af37 0%, #ffe07a 50%, #d4af37 100%);
  color: #2a2520;
  box-shadow: 0 4px 14px rgba(212, 175, 55, 0.55);
}
.cabin-banner.tier-business {
  background: linear-gradient(135deg, #6c8088 0%, #a4b8bf 50%, #6c8088 100%);
  color: #fff5e8;
}
.cabin-banner.tier-economy {
  background: rgba(43, 37, 31, 0.75);
  color: #fff5e8;
}

/* ambient golden glow for premium */
.ambient-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(212, 175, 55, 0.30) 0%, transparent 55%);
  pointer-events: none;
  animation: ambientPulse 4s ease-in-out infinite;
  z-index: 1;
}
.ambient-glow.soft {
  background: radial-gradient(ellipse at 50% 0%, rgba(212, 175, 55, 0.18) 0%, transparent 55%);
}
@keyframes ambientPulse {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}

/* parallax scrolling layers in the window */
.window-scene {
  position: absolute;
  inset: 0;
  width: 200%; height: 100%;
  background-repeat: repeat-x;
}
.window-scene.layer-1 { animation: scrollLayer 12s linear infinite; }
.window-scene.layer-2 { animation: scrollLayer 7s  linear infinite; opacity: 0.65; }
.window-scene.layer-3 { animation: scrollLayer 18s linear infinite; opacity: 0.45; }
@keyframes scrollLayer {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.window-scene.clouds.layer-1 {
  background-image:
    radial-gradient(ellipse 60px 20px at 80px 50%, rgba(255,255,255,0.85), transparent 70%),
    radial-gradient(ellipse 90px 28px at 240px 40%, rgba(255,255,255,0.70), transparent 70%);
  background-size: 320px 100%;
  background-color: rgba(135, 184, 216, 0.25);
}
.window-scene.clouds.layer-2 {
  background-image:
    radial-gradient(ellipse 40px 14px at 60px 70%, rgba(255,255,255,0.65), transparent 70%),
    radial-gradient(ellipse 50px 16px at 200px 30%, rgba(255,255,255,0.60), transparent 70%);
  background-size: 240px 100%;
}
.window-scene.clouds.layer-3 {
  background-image: linear-gradient(180deg, transparent 50%, rgba(135, 184, 216, 0.3) 50%, rgba(108, 128, 136, 0.4) 100%);
  background-size: 100% 100%;
}
.window-scene.ocean.layer-1 {
  background-image:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.18) 0 4px, transparent 4px 26px),
    linear-gradient(180deg, #87b8d8 0%, #4a7a9a 60%, #2d4f5e 100%);
  background-size: 200px 100%, 100% 100%;
}
.window-scene.ocean.layer-2 {
  background-image: repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.30) 0 2px, transparent 2px 14px);
  opacity: 0.5;
}
.sun {
  position: absolute;
  top: 14%; right: 22%;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: radial-gradient(circle, #ffe07a, #d4af37);
  box-shadow: 0 0 30px rgba(255, 224, 122, 0.85);
  z-index: 2;
}
.window-scene.highway.layer-1 {
  background-image:
    linear-gradient(180deg, #87b8d8 0%, #d4c8a8 60%, #6b6256 60%, #2a2520 100%),
    repeating-linear-gradient(90deg, transparent 0 80px, #fff5e8 80px 110px);
  background-position: 0 0, 0 75%;
  background-size: 100% 100%, 200px 4px;
}
.window-scene.highway.layer-2 {
  background-image: repeating-linear-gradient(90deg, transparent 0 100px, rgba(43,37,31,0.30) 100px 102px);
  background-size: 200px 100%;
  background-position: 0 70%;
}
.window-scene.mountains.layer-1 {
  background-image:
    linear-gradient(180deg, #b8d4ea 0%, #87b8d8 50%, transparent 50%),
    linear-gradient(180deg, transparent 50%, #7a8d6b 50%, #54664a 80%, #2a2520 100%);
  background-size: 100% 100%, 200px 100%;
}
.window-scene.mountains.layer-2 {
  background-image: linear-gradient(45deg, transparent 0 30%, #a3b393 30% 35%, transparent 35% 60%, #8aa07a 60% 65%, transparent 65%);
  background-size: 280px 100%;
  opacity: 0.4;
}

/* turbulence / float / rocking — class-aware ambient motion */
.cabin-anim-turb     { animation: turb 3.6s ease-in-out infinite; }
.cabin-anim-float    { animation: smoothFloat 6s ease-in-out infinite; }
.cabin-anim-rock     { animation: shipRock 5s ease-in-out infinite; }
.cabin-anim-inside   { animation: shipRock 4s ease-in-out infinite; opacity: 0.95; }
.cabin-anim-bumpy    { animation: bumpy 1.6s ease-in-out infinite; }
.cabin-anim-glide    { animation: smoothFloat 8s ease-in-out infinite; }
.cabin-anim-glide-fast{animation: smoothFloat 4s ease-in-out infinite; }
@keyframes turb {
  0%, 100% { transform: translate(0, 0) rotate(0); }
  17% { transform: translate(0, -2px) rotate(-0.3deg); }
  34% { transform: translate(1px, 1px) rotate(0.4deg); }
  51% { transform: translate(0, -1px) rotate(-0.2deg); }
  68% { transform: translate(-1px, 1px) rotate(0.3deg); }
  85% { transform: translate(0, 0) rotate(0); }
}
@keyframes smoothFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}
@keyframes shipRock {
  0%, 100% { transform: rotate(-1deg); }
  50% { transform: rotate(1deg); }
}
@keyframes bumpy {
  0%, 100% { transform: translateY(0); }
  25% { transform: translateY(-2px); }
  50% { transform: translateY(0); }
  75% { transform: translateY(2px); }
}

/* champagne glass with rising bubbles — premium plane only */
.champagne-glass {
  position: relative;
  width: 32px; height: 56px;
  margin: 0 auto;
}
.champagne-glass::before {
  content: '';
  position: absolute;
  top: 0; left: 50%; transform: translateX(-50%);
  width: 30px; height: 36px;
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.4), rgba(255, 224, 122, 0.7));
  border: 1.5px solid rgba(255, 245, 232, 0.85);
  border-bottom: 0;
}
.cg-stem {
  position: absolute;
  bottom: 0; left: 50%; transform: translateX(-50%);
  width: 2px; height: 20px;
  background: rgba(255, 245, 232, 0.85);
}
.cg-stem::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 50%; transform: translateX(-50%);
  width: 16px; height: 2px;
  background: rgba(255, 245, 232, 0.85);
  border-radius: 4px;
}
.cg-bubbles {
  position: absolute;
  top: 4px; left: 0;
  width: 100%; height: 30px;
  overflow: hidden;
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
}
.cg-bubble {
  position: absolute;
  bottom: 0;
  width: 3px; height: 3px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  animation: bubbleRise 2.2s ease-in infinite;
}
@keyframes bubbleRise {
  0%   { bottom: 0%;   opacity: 0; transform: scale(0.6); }
  20%  { opacity: 1; }
  100% { bottom: 95%;  opacity: 0; transform: scale(1.1); }
}

/* premium plane lay-flat extras */
.tray-side {
  position: absolute;
  right: 30px; top: 60px;
  display: flex; flex-direction: column; gap: 8px;
  align-items: center;
  z-index: 3;
}
.meal { font-size: 26px; }
.seat-tv {
  position: absolute;
  top: 12px; right: 14px;
  width: 32px; height: 22px;
  background: linear-gradient(135deg, #2a2520, #4a4239);
  color: #d4775c;
  font-size: 9px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 3px;
  border: 1px solid rgba(255, 245, 232, 0.20);
  box-shadow: 0 0 8px rgba(212, 119, 92, 0.40);
  animation: tvFlicker 3s ease-in-out infinite;
}
@keyframes tvFlicker {
  0%, 100% { box-shadow: 0 0 8px rgba(212, 119, 92, 0.40); }
  50%      { box-shadow: 0 0 14px rgba(212, 119, 92, 0.65); }
}
.cabin-curtain {
  position: absolute;
  right: 0; top: 130px; bottom: 30px;
  width: 14px;
  background: repeating-linear-gradient(180deg, #b8924c 0 6px, #8e6d34 6px 12px);
  border-radius: 6px 0 0 6px;
  opacity: 0.7;
  z-index: 1;
}

/* economy seatbelt sign */
.seatbelt-sign {
  position: absolute;
  bottom: 30px;
  left: 50%; transform: translateX(-50%);
  padding: 3px 10px;
  background: rgba(212, 119, 92, 0.85);
  color: #fff5e8;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.12em;
  border-radius: 3px;
  animation: signBlink 2s ease-in-out infinite;
}
@keyframes signBlink {
  0%, 50% { opacity: 1; }
  60%, 80% { opacity: 0.5; }
}

/* ship suite extras */
.suite-bed {
  width: 70%;
  margin: 18px auto 8px;
  height: 80px;
  background: linear-gradient(180deg, #fff5e8 0%, #faecc6 50%, #e3cb8c 100%);
  border-radius: 8px;
  position: relative;
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.20);
}
.bed-blanket {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 30px;
  background: linear-gradient(180deg, transparent, #d4af37 60%);
  border-radius: 0 0 8px 8px;
}
.suite-table {
  position: absolute;
  right: 24px; bottom: 36px;
  display: flex; gap: 6px;
  background: #d4af37;
  padding: 4px 8px;
  border-radius: 4px;
}
.suite-tray { font-size: 16px; }
.suite-rug {
  position: absolute;
  bottom: 30px; left: 24px;
  width: 60%; height: 16px;
  background: repeating-linear-gradient(90deg, #d4775c 0 8px, #b85d44 8px 16px);
  border-radius: 4px;
  opacity: 0.65;
}

/* ship sea view */
.bunk.sea {
  width: 70%; margin: 10px auto;
  height: 60px;
  background: linear-gradient(180deg, #fff5e8, #f0d8b4);
  border-radius: 6px;
  display: flex;
  padding: 10px;
  position: relative;
}
.balcony-rail {
  position: absolute;
  bottom: 30px; left: 12%; right: 12%;
  height: 4px;
  background: rgba(43, 37, 31, 0.50);
  border-radius: 2px;
}
.balcony-rail::after {
  content: '';
  position: absolute;
  bottom: -10px; left: 0; right: 0;
  height: 1px;
  background: rgba(43, 37, 31, 0.30);
}

/* ship inside (cramped) */
.cabin-bulb {
  position: absolute;
  top: 56px; left: 50%; transform: translateX(-50%);
  width: 10px; height: 10px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff5e8, #b8924c);
  box-shadow: 0 0 18px rgba(255, 245, 232, 0.65);
  animation: bulbFlick 5s ease-in-out infinite;
  z-index: 2;
}
.cabin-bulb::before {
  content: '';
  position: absolute;
  top: -16px; left: 50%; transform: translateX(-50%);
  width: 1px; height: 16px;
  background: rgba(43, 37, 31, 0.50);
}
@keyframes bulbFlick {
  0%, 100% { box-shadow: 0 0 18px rgba(255, 245, 232, 0.65); }
  92%, 95% { box-shadow: 0 0 4px rgba(255, 245, 232, 0.30); }
}
.cabin-portshut {
  position: absolute;
  bottom: 36px; left: 50%; transform: translateX(-50%);
  width: 60px; height: 30px;
  background: linear-gradient(180deg, #2a2520, #1a1815);
  border: 4px solid rgba(108, 128, 136, 0.50);
  border-radius: 50%;
}

/* big window for suite */
.cabin-window.big-window {
  width: 80%;
  margin: 12px auto -4px;
  height: 90px;
  border-radius: 8px;
  border: 4px solid rgba(43, 37, 31, 0.40);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,0.30);
  overflow: hidden;
}

/* ======================================================================
   iOS / mobile polish · large touch targets, system fonts, frosted blur,
   touch feedback, softer shadows
   ====================================================================== */
@media (max-width: 760px) {
  /* prefer iOS system stack on phones for native look + readability */
  html, body, button, input, textarea, select {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
                 "Microsoft YaHei", "SF Pro SC", "SF Pro Display", "Helvetica Neue",
                 'Noto Sans CJK SC', sans-serif;
  }
  body { font-size: 15px; line-height: 1.55; }

  /* generous tap targets — Apple HIG ≥ 44pt */
  .icon-btn, .deck-btn, .modal-close { min-width: 44px; min-height: 44px; }
  .mb-filter, .chip, .db-pill, .db-class, .ms-tab { min-height: 36px; padding: 8px 14px; }
  .btn { min-height: 44px; padding: 12px 18px; font-size: 15px; }
  button { -webkit-tap-highlight-color: transparent; }
  /* press-down feedback */
  button:active, .starter-card:active, .city:active, .media-card.tap:active {
    transform: scale(0.97);
    transition: transform 0.08s ease;
  }

  /* frosted top bar like iOS — wrap content to two rows on phone */
  .topbar {
    background: rgba(245, 239, 226, 0.86);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 0.5px solid rgba(43, 37, 31, 0.10);
    padding: 10px 12px env(safe-area-inset-bottom, 10px);
    box-shadow: 0 1px 0 rgba(43, 37, 31, 0.04);
    height: auto;
    flex-wrap: wrap;
    gap: 6px 8px;
    align-items: center;
  }
  .topbar .brand-kr { display: none; }
  .topbar .brand { font-size: 18px; gap: 8px; flex: 0 0 auto; }
  .topbar-right {
    flex: 1 1 100%;
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    flex-wrap: nowrap;
    gap: 6px;
    padding: 4px 0 6px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .topbar-right::-webkit-scrollbar { display: none; }
  .topbar-right > * { flex: 0 0 auto; }
  .topbar-stat { padding: 5px 10px; font-size: 10px; }
  .topbar-stat .v { font-size: 12px; font-weight: 600; }
  .topbar-stat.wallet {
    padding: 5px 10px;
    background: linear-gradient(135deg, rgba(184,146,76,0.18), rgba(212,119,92,0.10));
    border: 0.5px solid rgba(184, 146, 76, 0.40);
  }
  .auth-pill { padding: 6px 10px; font-size: 12px; }
  .auth-pill .ap-name { max-width: 80px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  /* shrink icon-btn slightly on phone but keep tappable */
  .icon-btn { width: 40px; height: 40px; }

  /* softer card shadows · iOS style */
  .modal, .city-card, .ticket, .payslip, .ticket-list .ticket {
    box-shadow:
      0 1px 0 rgba(43, 37, 31, 0.04),
      0 4px 14px rgba(43, 37, 31, 0.08),
      0 12px 28px rgba(43, 37, 31, 0.06);
  }
  .modal { border-radius: 22px; }

  /* taller, more cinematic cabin scene on phone */
  .cabin { height: 360px; width: 96vw; border-radius: 22px; }
  .plane-window, .train-window { height: 100px; }
  .bus-window { height: 90px; }
  .cabin-window.porthole { width: 130px; height: 130px; margin: 18px auto -8px; }
  .cabin-window.big-window { height: 110px; }
  .cabin-banner { font-size: 11px; padding: 7px 18px; }
  .cabin-label { font-size: 10px; bottom: 10px; }

  /* stickier modal action buttons */
  .modal-actions {
    padding: 14px 18px calc(14px + env(safe-area-inset-bottom));
  }

  /* smoother overlay backdrops */
  .modal-overlay {
    background: rgba(43, 37, 31, 0.45);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
  }

  /* depart-btn refined for thumb reach */
  .depart-btn {
    border-radius: 100px !important;
    box-shadow: 0 8px 24px rgba(212, 119, 92, 0.40), 0 2px 0 rgba(43, 37, 31, 0.08);
    font-size: 16px;
    padding: 14px 22px;
    bottom: calc(20px + env(safe-area-inset-bottom)) !important;
  }

  /* hero / city cards: more breathing room */
  .cc-hero { height: 200px; padding: 22px 24px 20px; }
  .cc-hero .cc-name { font-size: 30px; }
  .cc-content { padding: 22px 22px 20px; }
  .cc-content .cc-brief { font-size: 15px; }
  .cc-section-title { margin: 18px 0 10px; }

  /* media card padding */
  .media-card { padding: 14px 16px; border-radius: 12px; }
  .media-card .media-title { font-size: 15px; }

  /* deck controls bigger thumb-friendly */
  .deck-btn { width: 48px; height: 48px; }
  .deck-count { font-size: 14px; min-width: 64px; }

  /* nicer chips / pills */
  .chip, .db-pill, .db-class, .mb-filter, .cp-pill {
    border-radius: 100px;
  }

  /* tighten transport-bar for one-thumb */
  .transport-bar {
    gap: 6px;
    padding: 10px 14px;
    flex-wrap: wrap;
    justify-content: center;
  }
  .transport-option {
    padding: 10px 6px;
    flex: 1 1 calc(50% - 6px);
    min-width: 0;
  }
  .transport-option .transport-name { font-size: 13px; }
  .transport-option .transport-meta { font-size: 11px; }

  /* country deep map: full screen on phone, no zoom-in animation */
  .country-overlay { padding: 0 !important; }
  .country-zoom    { width: 100% !important; height: 100% !important; max-width: none !important; max-height: none !important; }
  .country-stage   { padding: 12px !important; }
  .country-header .ch-title { font-size: 22px; }
  .country-header .ch-tag,
  .country-header .ch-sub { font-size: 11px; }
  .country-body    { flex-direction: column !important; gap: 10px; }
  .country-map-wrap{ height: 40vh; min-height: 240px; }

  /* every modal: full-width, max 96vw, scroll-able body, safe-area bottom */
  .modal {
    max-width: 96vw !important;
    max-height: 88vh;
    margin: 0 auto;
  }
  .modal-body { max-height: calc(72vh - env(safe-area-inset-bottom, 0px)); overflow-y: auto; -webkit-overflow-scrolling: touch; }
  .modal-head .modal-title { font-size: 16px; }

  /* depart-confirm fits phones */
  .depart-confirm { width: 96vw; padding: 14px; }
  .dc-row { flex-wrap: wrap; gap: 6px 14px; }
  .dc-route .dc-city { font-size: 16px; }
  .dc-actions .btn { flex: 1 1 0; }

  /* job board on phone */
  .job-board { padding: 12px 14px; }
  .job-card  { gap: 8px; padding: 10px 12px; flex-wrap: wrap; }
  .jc-info   { flex: 1 1 60%; min-width: 0; }
  .jc-title  { font-size: 14px; }
  .jc-meta   { font-size: 11px; }
  .jc-pay    { font-size: 14px; }

  /* city-panel: wider use of viewport, comfortable thumb scroll */
  .city-panel .panel-tag { font-size: 11px; }
  .city-panel .panel-title { font-size: 22px; }
  .city-panel .panel-coords { gap: 12px; flex-wrap: wrap; }

  /* Map + city dots: bigger tap targets for fingers */
  .city-dot { width: 12px; height: 12px; }
  .city-pulse { width: 26px; height: 26px; }
  .city-label .label-name { font-size: 11px; }
  .city-label .label-meta { font-size: 9px; }

  /* country sub-city deep map labels readable on phone */
  .sub-label { font-size: 3.6px; }
  .province-label { font-size: 4px; opacity: 0.55; }

  /* big-screen dynamic island spacing */
  @supports (padding-top: env(safe-area-inset-top)) {
    .topbar { padding-top: calc(10px + env(safe-area-inset-top)); }
  }

  /* prevent iOS auto-zoom on input focus */
  input, textarea, select { font-size: 16px; }
}

/* very small phones — extra-tight */
@media (max-width: 380px) {
  .topbar .brand { font-size: 16px; }
  .topbar-stat { padding: 4px 8px; font-size: 10px; }
  .icon-btn { width: 36px; height: 36px; }
  .auth-pill .ap-name { display: none; }
  .deck-btn { width: 44px; height: 44px; }
}

/* iOS standalone (added-to-home-screen) only — extra polish */
@media (display-mode: standalone) {
  /* hide any browser-only UI */
  .pwa-hide { display: none !important; }
  body {
    background: var(--paper);
    /* slight bump to compensate for status bar in standalone */
  }
}

/* ======================================================================
   travel skip button + save-file modal
   ====================================================================== */
.travel-skip-btn {
  margin-top: 10px;
  padding: 8px 16px;
  background: rgba(43, 37, 31, 0.10);
  border: 1px solid rgba(43, 37, 31, 0.18);
  border-radius: 100px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.10em;
  color: var(--ink, #2a2520);
  cursor: pointer;
  transition: all 0.16s ease;
}
.travel-skip-btn:hover { background: rgba(43, 37, 31, 0.20); }
.travel-skip-btn:active { transform: scale(0.97); }

.save-file-modal { max-width: 460px; }
.sf-desc {
  font-family: 'Noto Serif KR', serif;
  font-size: 13px;
  color: var(--ink-soft, #6b6256);
  line-height: 1.6;
  margin: 0 0 12px;
}
.sf-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}
.sf-stats > div {
  background: rgba(245, 239, 226, 0.6);
  border-radius: 10px;
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.sf-stats > div span {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--ink-soft, #6b6256);
  text-transform: uppercase;
}
.sf-stats > div strong {
  font-family: 'Noto Serif KR', serif;
  font-size: 16px;
  color: var(--coral, #d4775c);
}
.sf-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}
.sf-file {
  width: 100%;
  padding: 10px;
  border: 1px dashed rgba(43, 37, 31, 0.30);
  border-radius: 8px;
  background: rgba(245, 239, 226, 0.5);
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  margin-bottom: 8px;
  cursor: pointer;
}
.sf-textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid rgba(43, 37, 31, 0.18);
  border-radius: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  resize: vertical;
  box-sizing: border-box;
  background: rgba(245, 239, 226, 0.4);
}

.icon-btn.save-btn { color: var(--gold, #b8924c); }

/* ======================================================================
   cabin v2 · realistic interior details
   ====================================================================== */
/* plane: roof with reading lights + overhead bins */
.cabin-roof {
  position: absolute;
  top: 50px; left: 0; right: 0;
  height: 8px;
  background: linear-gradient(180deg, rgba(43,37,31,0.10), transparent);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 2;
}
.roof-light {
  width: 4px; height: 4px;
  border-radius: 50%;
  background: radial-gradient(circle, #ffe07a 30%, rgba(255, 224, 122, 0.30));
  box-shadow: 0 4px 8px rgba(255, 224, 122, 0.45);
  animation: roofGlow 4s ease-in-out infinite alternate;
}
.cabin.plane.economy .roof-light { animation-duration: 2s; }
@keyframes roofGlow {
  from { opacity: 0.6; }
  to   { opacity: 1; }
}
.overhead-bin {
  position: absolute;
  top: 60px; left: 12px; right: 12px;
  height: 22px;
  background: linear-gradient(180deg, #5a4f3e 60%, rgba(0,0,0,0.30) 100%);
  border-bottom: 2px solid rgba(43,37,31,0.40);
  border-radius: 4px 4px 0 0;
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 2;
  box-shadow: inset 0 -3px 0 rgba(43,37,31,0.50);
}
.bin-no {
  font-family: 'JetBrains Mono', monospace;
  font-size: 8px;
  color: #fff5e8;
  letter-spacing: 0.10em;
  opacity: 0.65;
}
.cabin.plane .cabin-window.plane-window { margin-top: 90px; height: 90px; }

.window-frame {
  position: absolute;
  inset: 0;
  border: 4px solid rgba(43,37,31,0.55);
  border-radius: 24px;
  pointer-events: none;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,0.20);
}

/* cabin interior aisle */
.aisle-strip {
  position: absolute;
  bottom: 28px;
  left: 50%; transform: translateX(-50%);
  width: 36%;
  height: 60%;
  background: linear-gradient(180deg, transparent, rgba(108, 90, 70, 0.30));
  border-left: 1px dashed rgba(43,37,31,0.20);
  border-right: 1px dashed rgba(43,37,31,0.20);
  pointer-events: none;
  z-index: 0;
}

/* seat headrest */
.seat-head {
  position: absolute;
  top: -4px; left: 50%; transform: translateX(-50%);
  width: 80%; height: 6px;
  background: rgba(255, 245, 232, 0.22);
  border-radius: 4px 4px 0 0;
}

/* premium plane extras */
.suite-divider {
  position: absolute;
  left: 50%; top: 100px; bottom: 30px;
  width: 2px;
  background: repeating-linear-gradient(180deg, #b8924c 0 8px, #8e6d34 8px 16px);
  border-radius: 2px;
  opacity: 0.6;
  z-index: 1;
}
.reading-lamp {
  position: absolute;
  left: 18px; top: -10px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: radial-gradient(circle, #ffe07a, rgba(255, 224, 122, 0.30));
  box-shadow: 0 0 14px rgba(255, 224, 122, 0.65);
}
.slippers { font-size: 16px; opacity: 0.85; }
.seat-tv {
  font-size: 10px;
  white-space: nowrap;
}

/* ship: wood paneling + lifebuoy */
.ship-wood-wall {
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(0deg,
      rgba(108, 75, 45, 0.06) 0 18px,
      rgba(108, 75, 45, 0.10) 18px 19px,
      rgba(108, 75, 45, 0.06) 19px 38px,
      rgba(108, 75, 45, 0.10) 38px 39px);
  pointer-events: none;
  z-index: 0;
}
.ship-lifebuoy {
  position: absolute;
  bottom: 16px; left: 16px;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, #d4775c 0 25%, #fff5e8 25% 50%, #d4775c 50% 75%, #fff5e8 75% 100%);
  border: 3px solid rgba(43, 37, 31, 0.30);
  box-shadow: 0 2px 8px rgba(0,0,0,0.20);
  font-size: 0;
  z-index: 3;
}
.ship-lifebuoy::before {
  content: '';
  position: absolute;
  inset: 24%;
  background: rgba(245, 239, 226, 0.95);
  border-radius: 50%;
}
.porthole-rim {
  position: absolute;
  inset: 0;
  border: 8px solid rgba(108, 90, 70, 0.40);
  border-radius: 50%;
  box-shadow: inset 0 0 0 4px rgba(255,255,255,0.20), 0 4px 12px rgba(0,0,0,0.25);
  pointer-events: none;
}

/* bus: front view with windshield, driver, steering wheel */
.bus-front {
  position: relative;
  height: 110px;
  background: linear-gradient(180deg, #2d2a26 0%, #5a4f3e 80%, #6b6256 100%);
  border-bottom: 4px solid rgba(43,37,31,0.50);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  overflow: hidden;
}
.bus-windshield {
  position: relative;
  width: 70%;
  height: 60px;
  margin-top: 10px;
  background: linear-gradient(180deg, #87b8d8, #b8d4ea);
  border: 3px solid rgba(43,37,31,0.50);
  border-radius: 8px 8px 30px 30px;
  overflow: hidden;
  box-shadow: inset 0 -8px 16px rgba(255,255,255,0.18);
}
.bus-windshield .window-scene {
  width: 200%;
}
.bus-mirror {
  position: absolute;
  bottom: -8px;
  width: 12px; height: 18px;
  background: linear-gradient(180deg, #2a2520, #1a1815);
  border-radius: 0 0 6px 6px;
  z-index: 3;
}
.bus-mirror.left { left: -6px; transform: rotate(8deg); }
.bus-mirror.right { right: -6px; transform: rotate(-8deg); }
.bus-driver {
  position: absolute;
  bottom: 6px; left: 50%; transform: translate(-50%, 0);
  z-index: 4;
}
.driver-head {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: linear-gradient(180deg, #d4a574, #b88a5c);
  margin: 0 auto 2px;
}
.driver-shoulders {
  width: 50px; height: 18px;
  background: linear-gradient(180deg, #6c4f2a, #4a3520);
  border-radius: 8px 8px 0 0;
}
.bus-wheel {
  position: absolute;
  bottom: 4px;
  right: 30%;
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 4px solid #2a2520;
  z-index: 5;
  background: radial-gradient(circle, #6b6256 30%, transparent 31%);
}
.bus-window.side { display: none; } /* kept for legacy class refs */

/* mobile: scale down realistic details so they still fit */
@media (max-width: 640px) {
  .overhead-bin { height: 18px; top: 56px; }
  .bin-no { font-size: 7px; }
  .cabin.plane .cabin-window.plane-window { margin-top: 80px; height: 80px; }
  .bus-front { height: 92px; }
  .bus-windshield { height: 52px; }
  .driver-head { width: 18px; height: 18px; }
  .driver-shoulders { width: 40px; height: 14px; }
  .ship-lifebuoy { width: 30px; height: 30px; }
}

/* ======================================================================
   travel card v2 · airport / boarding-pass aesthetic
   ====================================================================== */
.travel-card.v2 {
  background: rgba(255, 250, 242, 0.96);
  border-radius: 18px;
  padding: 18px 22px 14px;
  min-width: 360px;
  max-width: 480px;
  box-shadow: 0 18px 48px rgba(0,0,0,0.30);
}
.travel-card.v2 .tv-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px dashed rgba(43, 37, 31, 0.18);
}
.tv-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.22em;
  color: var(--coral, #d4775c);
  font-weight: 700;
  text-transform: uppercase;
}
.tv-class {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.18em;
  padding: 3px 10px;
  background: var(--ink, #2a2520);
  color: #fff5e8;
  border-radius: 100px;
  text-transform: uppercase;
}
.travel-overlay.premium .tv-class {
  background: linear-gradient(135deg, #d4af37, #ffe07a, #d4af37);
  color: #2a2520;
}

.tv-route-row {
  display: grid;
  grid-template-columns: 1fr 1.6fr 1fr;
  align-items: center;
  gap: 10px;
}
.tv-side { text-align: center; }
.tv-code {
  font-family: 'Orbitron', 'JetBrains Mono', monospace;
  font-size: 28px;
  font-weight: 800;
  color: var(--ink, #2a2520);
  letter-spacing: 0.10em;
  line-height: 1;
}
.tv-city {
  font-family: 'Noto Serif KR', serif;
  font-size: 11px;
  color: var(--ink-soft, #6b6256);
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tv-mid { text-align: center; }
.tv-km {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.18em;
  color: var(--ink-soft, #6b6256);
  margin-bottom: 4px;
}
.tv-line {
  position: relative;
  height: 16px;
}
.tv-track {
  position: absolute;
  top: 7px;
  left: 6px;
  right: 6px;
  height: 2px;
  border-top: 1px dashed rgba(43, 37, 31, 0.40);
}
.tv-pin {
  position: absolute;
  top: 5px;
  left: 0;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--ink, #2a2520);
  box-shadow: 0 0 0 2px rgba(43, 37, 31, 0.10);
}
.tv-pin.end {
  left: auto;
  right: 0;
  background: var(--coral, #d4775c);
  box-shadow: 0 0 0 2px rgba(212, 119, 92, 0.30), 0 0 12px rgba(212, 119, 92, 0.55);
}
.tv-vehicle {
  position: absolute;
  top: -6px;
  font-size: 18px;
  transform: translateX(-50%);
  transition: left 0.22s linear;
  text-shadow: 0 2px 4px rgba(0,0,0,0.20);
  z-index: 2;
}
.tv-eta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.10em;
  color: var(--ink, #2a2520);
  margin-top: 4px;
}

/* keep old class names visible in case html still renders them */
.travel-card.v2 .travel-status,
.travel-card.v2 .travel-route,
.travel-card.v2 .travel-progress,
.travel-card.v2 .travel-progress-meta { display: none; }

@media (max-width: 640px) {
  .travel-card.v2 { min-width: 290px; max-width: 92vw; padding: 16px 16px 12px; }
  .tv-code { font-size: 22px; }
  .tv-route-row { gap: 6px; }
}

/* ======================================================================
   reward popup · satisfying claim animation with falling coins
   ====================================================================== */
/* reward popup · 韩式柔和审美（米白 / 软桃 / 茶绿，去金光去赌场感） */
.reward-popup-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(43, 37, 31, 0.30);
  -webkit-backdrop-filter: blur(12px) saturate(120%);
  backdrop-filter: blur(12px) saturate(120%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 220;
  animation: rpFade 0.30s ease;
  cursor: pointer;
}
@keyframes rpFade { from { opacity: 0; } to { opacity: 1; } }

.reward-popup {
  position: relative;
  background: #fdfaf2;
  border-radius: 28px;
  padding: 36px 32px 26px;
  text-align: center;
  cursor: default;
  box-shadow: 0 18px 48px rgba(43, 37, 31, 0.12), 0 4px 12px rgba(43, 37, 31, 0.06);
  min-width: 300px;
  max-width: 340px;
  overflow: hidden;
  animation: rpPop 0.42s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes rpPop {
  0%   { opacity: 0; transform: translateY(16px) scale(0.96); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
.reward-popup::after {
  content: '';
  position: absolute;
  top: -50px; right: -50px;
  width: 160px; height: 160px;
  background: radial-gradient(circle, #fce4cf 0%, transparent 70%);
  pointer-events: none;
}
.reward-popup::before {
  content: '';
  position: absolute;
  bottom: -70px; left: -50px;
  width: 180px; height: 180px;
  background: radial-gradient(circle, rgba(184, 200, 171, 0.55) 0%, transparent 65%);
  pointer-events: none;
}

.rp-tag {
  font-family: 'Pretendard', 'Apple SD Gothic Neo', 'Noto Sans KR', -apple-system, sans-serif;
  font-size: 11px;
  letter-spacing: 0.20em;
  color: #b88a5c;
  font-weight: 600;
  margin-bottom: 16px;
  position: relative;
  z-index: 2;
}
.rp-amount {
  font-family: 'Pretendard', 'Apple SD Gothic Neo', 'Noto Sans KR', -apple-system, sans-serif;
  font-weight: 700;
  color: #5a4a37;
  line-height: 1;
  letter-spacing: -0.02em;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
  position: relative;
  z-index: 2;
  text-shadow: none;
}
.rp-plus {
  font-size: 26px;
  color: #c79670;
  font-weight: 500;
  vertical-align: baseline;
}
.rp-num {
  font-size: 56px;
  background: none;
  -webkit-text-fill-color: initial;
  color: #5a4a37;
  font-weight: 700;
}
.rp-source {
  font-family: 'Pretendard', 'Apple SD Gothic Neo', 'Noto Sans KR', sans-serif;
  font-size: 13px;
  color: #8b7355;
  margin-top: 12px;
  letter-spacing: 0.02em;
  position: relative;
  z-index: 2;
}
.rp-queue-hint {
  margin-top: 4px;
  font-family: 'Pretendard', 'Apple SD Gothic Neo', sans-serif;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: #b88a5c;
  opacity: 0.80;
  position: relative;
  z-index: 2;
}
.rp-claim-btn {
  display: block;
  width: 100%;
  margin-top: 22px;
  padding: 14px 22px;
  background: #d4a780;
  color: #fdfaf2;
  border: 0;
  border-radius: 16px;
  font-family: 'Pretendard', 'Apple SD Gothic Neo', 'Noto Sans KR', sans-serif;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  box-shadow: 0 4px 0 #b88a5c;
  transition: all 0.16s ease;
  position: relative;
  z-index: 2;
}
.rp-claim-btn:hover:not(:disabled) {
  background: #c79670;
  transform: translateY(-1px);
  box-shadow: 0 5px 0 #b88a5c;
}
.rp-claim-btn:active:not(:disabled) {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #b88a5c;
}
.rp-claim-btn.going {
  background: #b8c8ab;
  box-shadow: 0 4px 0 #94a487;
  cursor: default;
}

.reward-popup.claimed { animation: rpClaimed 0.7s cubic-bezier(0.4, 0, 0.6, 1) forwards; }
@keyframes rpClaimed {
  0%   { transform: scale(1); opacity: 1; }
  100% { transform: scale(0.95) translateY(-6px); opacity: 0; }
}

/* 落瓣 — 软花瓣 / 茶叶 / 星点，替代金币 */
.rp-coin-rain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
}
.rp-coin {
  position: absolute;
  top: -10px;
  font-size: 18px;
  animation: paperFall 1.6s cubic-bezier(0.45, 0.05, 0.55, 0.95) forwards;
}
.rp-coin > * { display: none; }
.rp-coin::before { content: '✿'; color: #d4a780; }
.rp-coin:nth-child(2n)::before { content: '☘'; color: #94a487; }
.rp-coin:nth-child(3n)::before { content: '✦'; color: #c79670; }
.rp-coin:nth-child(5n)::before { content: '✿'; color: #f7c5a8; }
@keyframes paperFall {
  0%   { transform: translateY(-40px) rotate(-30deg); opacity: 0; }
  20%  { opacity: 0.95; }
  100% { transform: translateY(320px) rotate(220deg); opacity: 0; }
}

@media (max-width: 640px) {
  .reward-popup { padding: 30px 26px 22px; min-width: 240px; }
  .rp-num { font-size: 48px; }
  .rp-plus { font-size: 22px; }
}

/* ======================================================================
   seasonal hero badge + daily sale banner + album + diary (basic)
   ====================================================================== */
.seasonal-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px 6px 8px;
  background: rgba(253, 250, 242, 0.92);
  border-radius: 100px;
  font-family: 'Pretendard', 'Noto Sans KR', sans-serif;
  font-size: 11px;
  font-weight: 600;
  color: #5a4a37;
  letter-spacing: 0.04em;
  z-index: 2;
  box-shadow: 0 2px 8px rgba(43, 37, 31, 0.15);
}
.seasonal-badge .sb-emoji { font-size: 14px; }
.seasonal-badge.tone-sakura  { background: rgba(255, 230, 235, 0.95); color: #b85d77; }
.seasonal-badge.tone-summer  { background: rgba(180, 215, 230, 0.92); color: #2d5972; }
.seasonal-badge.tone-autumn,
.seasonal-badge.tone-harvest { background: rgba(220, 130, 70, 0.95); color: #fdfaf2; }
.seasonal-badge.tone-aurora  { background: rgba(108, 70, 130, 0.95); color: #fdfaf2; }
.seasonal-badge.tone-winter,
.seasonal-badge.tone-snow,
.seasonal-badge.tone-xmas    { background: rgba(184, 60, 60, 0.95); color: #fdfaf2; }
.seasonal-badge.tone-lavender{ background: rgba(180, 150, 215, 0.92); color: #fdfaf2; }
.seasonal-badge.tone-carnival{ background: linear-gradient(135deg, #d4775c, #d4af37); color: #fdfaf2; }

/* daily sale banner under topbar */
.daily-sale-banner {
  position: fixed;
  top: 60px;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  background: linear-gradient(135deg, #d4775c 0%, #b85d44 100%);
  color: #fdfaf2;
  border-radius: 100px;
  font-family: 'Pretendard', 'Noto Sans KR', sans-serif;
  font-size: 12px;
  letter-spacing: 0.04em;
  z-index: 60;
  box-shadow: 0 4px 14px rgba(212, 119, 92, 0.35);
  animation: salePulse 2.5s ease-in-out infinite;
}
@keyframes salePulse {
  0%, 100% { box-shadow: 0 4px 14px rgba(212, 119, 92, 0.35); }
  50%      { box-shadow: 0 6px 20px rgba(212, 119, 92, 0.55); }
}
.dsb-tag {
  font-family: 'Pretendard', monospace;
  font-size: 10px;
  letter-spacing: 0.20em;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.18);
  padding: 2px 8px;
  border-radius: 100px;
}
.dsb-text { font-weight: 500; }
.dsb-pct {
  background: rgba(255, 255, 255, 0.95);
  color: #b85d44;
  padding: 2px 8px;
  border-radius: 100px;
  font-weight: 700;
  font-size: 11px;
}
@media (max-width: 640px) {
  .daily-sale-banner {
    top: calc(60px + env(safe-area-inset-top, 0px));
    font-size: 11px;
    padding: 6px 12px;
    max-width: 92vw;
  }
  .dsb-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 40vw; }
}

/* photo album */
.modal.photo-album { max-width: 600px; }
.album-group { margin-bottom: 18px; }
.album-group-title {
  font-family: 'Pretendard', 'Noto Serif KR', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #5a4a37;
  margin-bottom: 8px;
  padding-bottom: 4px;
  border-bottom: 1px dashed rgba(43, 37, 31, 0.16);
}
.album-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}
.album-photo {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  background: #fdfaf2;
  box-shadow: 0 2px 8px rgba(43, 37, 31, 0.10);
  aspect-ratio: 1;
}
.album-photo img {
  width: 100%; height: 70%;
  object-fit: cover;
  display: block;
}
.album-photo .ap-meta {
  padding: 6px 8px;
  font-family: 'Pretendard', 'Noto Sans KR', sans-serif;
  font-size: 10px;
  position: relative;
}
.ap-cap {
  font-size: 11px;
  color: #5a4a37;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ap-date {
  color: #8b7355;
  font-size: 9px;
  margin-top: 2px;
}
.ap-del {
  position: absolute;
  top: 6px; right: 6px;
  width: 22px; height: 22px;
  background: rgba(255, 255, 255, 0.9);
  border: 0;
  border-radius: 50%;
  font-size: 14px;
  color: #b88a5c;
  cursor: pointer;
  line-height: 1;
}
.ap-del:hover { background: #fff; color: #b85d44; }

/* diary timeline */
.diary { display: flex; flex-direction: column; gap: 14px; }
.diary-write-btn {
  width: 100%;
  padding: 12px 16px;
  background: linear-gradient(135deg, #fdfaf2, #fce4cf);
  border: 1px dashed #c79670;
  border-radius: 12px;
  font-family: 'Pretendard', 'Noto Sans KR', sans-serif;
  font-size: 14px;
  color: #8b7355;
  cursor: pointer;
  transition: all 0.16s ease;
}
.diary-write-btn:hover {
  background: #fce4cf;
  color: #5a4a37;
  border-color: #b88a5c;
}
.diary-compose {
  background: #fdfaf2;
  border: 1px solid rgba(43, 37, 31, 0.10);
  border-radius: 12px;
  padding: 14px;
}
.dc-row { display: flex; gap: 8px; }
.dc-mood {
  width: 56px;
  padding: 8px 10px;
  background: #fff;
  border: 1px solid rgba(43, 37, 31, 0.14);
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
}
.dc-title {
  flex: 1;
  padding: 8px 12px;
  background: #fff;
  border: 1px solid rgba(43, 37, 31, 0.14);
  border-radius: 8px;
  font-family: 'Pretendard', 'Noto Sans KR', sans-serif;
  font-size: 14px;
  color: #5a4a37;
  outline: none;
  box-sizing: border-box;
}
.dc-title:focus { border-color: #c79670; }
.dc-body {
  width: 100%;
  margin-top: 8px;
  padding: 10px 12px;
  border: 1px solid rgba(43, 37, 31, 0.14);
  border-radius: 8px;
  font-family: 'Pretendard', 'Noto Sans KR', sans-serif;
  font-size: 14px;
  color: #5a4a37;
  resize: vertical;
  outline: none;
  background: #fff;
  box-sizing: border-box;
  line-height: 1.55;
}
.dc-body:focus { border-color: #c79670; }
.dc-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
}
.dc-count {
  font-family: 'Pretendard', sans-serif;
  font-size: 11px;
  color: #8b7355;
}
.dc-buttons { display: flex; gap: 8px; }

.diary-timeline { display: flex; flex-direction: column; gap: 14px; }
.diary-persist-note {
  margin: 8px 0 12px;
  padding: 6px 10px;
  background: rgba(122,141,107,0.10);
  border-radius: 6px;
  font-family: 'JetBrains Mono', 'Noto Sans KR', monospace;
  font-size: 10.5px;
  letter-spacing: 0.04em;
  color: var(--sage, #54664a);
  line-height: 1.45;
}
.diary-entry {
  position: relative;
  padding-left: 32px;
}
.diary-entry .de-line {
  position: absolute;
  left: 14px; top: 30px; bottom: -14px;
  width: 1px;
  background: rgba(43, 37, 31, 0.15);
}
.diary-entry:last-child .de-line { display: none; }
.de-dot {
  position: absolute;
  left: 0; top: 0;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: #fdfaf2;
  border: 2px solid #c79670;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
}
.de-card {
  background: #fdfaf2;
  border: 1px solid rgba(43, 37, 31, 0.08);
  border-radius: 10px;
  padding: 10px 14px;
}
.de-title {
  font-family: 'Pretendard', 'Noto Serif KR', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #5a4a37;
}
.de-meta {
  display: flex;
  gap: 10px;
  margin: 4px 0 6px;
  font-family: 'Pretendard', sans-serif;
  font-size: 10px;
  color: #8b7355;
  align-items: center;
}
.de-actions {
  margin-left: auto;
  display: inline-flex;
  gap: 4px;
}
.de-act {
  background: rgba(184,138,92,0.10);
  border: 0;
  border-radius: 999px;
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: #8b7355;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: background 0.16s ease, color 0.16s ease;
  -webkit-tap-highlight-color: transparent;
}
.de-act:hover { background: rgba(184,138,92,0.22); }
.de-act.edit:hover { color: var(--sage, #54664a); }
.de-act.del:hover { background: rgba(212,119,92,0.20); color: var(--coral, #b85d44); }

/* Editing-mode banner inside the compose form */
.diary-compose.editing {
  border-color: var(--coral, #d4775c) !important;
  box-shadow: 0 0 0 3px rgba(212,119,92,0.10);
}
.dc-editing-tag {
  font-family: 'JetBrains Mono', 'Noto Sans KR', monospace;
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--coral, #d4775c);
  font-weight: 700;
  margin-bottom: 8px;
}
.de-body {
  font-family: 'Pretendard', 'Noto Serif KR', sans-serif;
  font-size: 13px;
  color: #5a4a37;
  line-height: 1.65;
  white-space: pre-wrap;
}

/* ======================================================================
   ship suite · 韩系审美升级 · 落日海景 + 简约暖白舱内
   ====================================================================== */
.cabin.ship.suite {
  background: linear-gradient(180deg, #fef3e8 0%, #fdfaf2 40%, #f5efe2 100%);
}
.cabin.ship.suite .cabin-window.big-window {
  background: linear-gradient(180deg,
    #fce4cf 0%,
    #f8c8a4 18%,
    #f29773 35%,
    #d97a78 48%,
    #8e7099 60%,
    #5a708c 75%,
    #2d4d6e 100%);
  border: 6px solid #c79670;
  box-shadow:
    inset 0 -20px 40px rgba(255, 200, 150, 0.25),
    0 8px 24px rgba(43, 37, 31, 0.12);
}
/* override default ocean for suite — replace with calm gradient */
.cabin.ship.suite .window-scene.ocean.layer-1 {
  background: linear-gradient(180deg,
    transparent 0%, transparent 58%,
    rgba(255, 220, 180, 0.45) 60%,
    rgba(217, 122, 120, 0.30) 70%,
    rgba(45, 77, 110, 0.30) 100%);
}
.cabin.ship.suite .window-scene.ocean.layer-2 {
  background-image:
    repeating-linear-gradient(90deg, rgba(255, 245, 232, 0.42) 0 3px, transparent 3px 22px);
  background-position: 0 75%;
  opacity: 0.7;
  height: 40%;
  top: auto;
  bottom: 0;
}
/* big warm sun + reflection */
.cabin.ship.suite .sun {
  width: 56px; height: 56px;
  top: 24%; right: 32%;
  background: radial-gradient(circle, #fff5cc 20%, #ffd980 50%, #ff9a55 90%);
  box-shadow: 0 0 60px rgba(255, 200, 130, 0.95), 0 0 100px rgba(255, 154, 85, 0.40);
}
.cabin.ship.suite .sun::after {
  content: '';
  position: absolute;
  top: 100%; left: 50%; transform: translateX(-50%);
  width: 14px; height: 50px;
  background: linear-gradient(180deg, rgba(255, 220, 130, 0.85), rgba(255, 200, 130, 0.10));
  filter: blur(6px);
}

/* soft clouds */
.cabin.ship.suite .cabin-window.big-window::before {
  content: '';
  position: absolute;
  top: 18%; left: 8%;
  width: 80px; height: 14px;
  background: rgba(255, 245, 232, 0.55);
  border-radius: 50%;
  filter: blur(4px);
  z-index: 1;
}
.cabin.ship.suite .cabin-window.big-window::after {
  content: '';
  position: absolute;
  top: 30%; right: 10%;
  width: 60px; height: 10px;
  background: rgba(255, 245, 232, 0.40);
  border-radius: 50%;
  filter: blur(3px);
  z-index: 1;
}

/* suite interior · 简约暖白 */
.cabin.ship.suite .ship-wood-wall {
  background:
    linear-gradient(180deg, transparent 0%, rgba(184, 200, 171, 0.06) 100%),
    repeating-linear-gradient(0deg,
      rgba(184, 200, 171, 0.04) 0 30px,
      rgba(184, 200, 171, 0.08) 30px 31px);
}
.cabin.ship.suite .ship-lifebuoy {
  display: none;
}
.cabin.ship.suite .suite-bed {
  width: 70%;
  margin: 22px auto 6px;
  height: 88px;
  background: linear-gradient(180deg, #fdfaf2 0%, #fef3e8 70%, #f8e3d0 100%);
  border-radius: 14px;
  padding: 14px;
  box-shadow: 0 3px 12px rgba(43, 37, 31, 0.08);
  display: flex;
  gap: 6px;
  align-items: flex-start;
}
.cabin.ship.suite .bed-pillow {
  width: 36px; height: 22px;
  background: #fdfaf2;
  border: 1px solid #e8d8b6;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(43, 37, 31, 0.08);
}
.cabin.ship.suite .bed-pillow:nth-child(2) {
  background: #b8c8ab;
  border-color: #94a487;
}
.cabin.ship.suite .bed-blanket {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 36px;
  background: linear-gradient(180deg, transparent, rgba(199, 150, 112, 0.30) 60%);
  border-radius: 0 0 14px 14px;
}
.cabin.ship.suite .suite-table {
  bottom: 38px; right: 28px;
  background: #fdfaf2;
  border: 1px solid #d4a780;
  padding: 5px 10px;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(43, 37, 31, 0.08);
}
.cabin.ship.suite .suite-rug {
  bottom: 28px; left: 18%; right: 18%;
  width: auto;
  height: 8px;
  background: repeating-linear-gradient(90deg, #b8c8ab 0 12px, #94a487 12px 24px);
  border-radius: 100px;
  opacity: 0.45;
}
/* small plant at corner */
.cabin.ship.suite .cabin-interior::before {
  content: '🪴';
  position: absolute;
  bottom: 26px; left: 18px;
  font-size: 22px;
  z-index: 3;
}
/* hanging string light decoration */
.cabin.ship.suite .cabin-interior::after {
  content: '';
  position: absolute;
  top: 16px; left: 8%; right: 8%;
  height: 18px;
  background:
    radial-gradient(circle 3px at 12% 70%, #ffe07a, transparent 70%),
    radial-gradient(circle 3px at 28% 70%, #ffe07a, transparent 70%),
    radial-gradient(circle 3px at 44% 70%, #ffe07a, transparent 70%),
    radial-gradient(circle 3px at 60% 70%, #ffe07a, transparent 70%),
    radial-gradient(circle 3px at 76% 70%, #ffe07a, transparent 70%),
    radial-gradient(circle 3px at 92% 70%, #ffe07a, transparent 70%);
  z-index: 1;
  animation: stringLightFlicker 4s ease-in-out infinite alternate;
}
@keyframes stringLightFlicker {
  0%   { opacity: 0.65; }
  100% { opacity: 1; }
}

/* ======================================================================
   achievements + companion + weather delay
   ====================================================================== */
.ach-section { margin-top: 24px; padding-top: 18px; border-top: 1px dashed rgba(43, 37, 31, 0.16); }
.achievements .ach-summary {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--ink-soft, #6b6256);
  margin-bottom: 12px;
}
.achievements .ach-summary strong {
  color: var(--coral, #d4775c);
  font-size: 13px;
}
.ach-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(116px, 1fr));
  gap: 8px;
}
.ach-item {
  background: #fdfaf2;
  border: 1px solid rgba(43, 37, 31, 0.10);
  border-radius: 12px;
  padding: 12px 10px 10px;
  text-align: center;
  position: relative;
  transition: all 0.18s ease;
}
.ach-item.on {
  border-color: var(--coral, #d4775c);
  background: linear-gradient(135deg, rgba(212, 119, 92, 0.06), rgba(184, 146, 76, 0.04));
  box-shadow: 0 4px 12px rgba(212, 119, 92, 0.18);
}
.ach-item.off { opacity: 0.45; filter: grayscale(0.6); }
.ach-icon {
  font-size: 28px;
  margin-bottom: 6px;
}
.ach-name {
  font-family: 'Noto Serif KR', serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink, #2a2520);
}
.ach-desc {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.06em;
  color: var(--ink-soft, #6b6256);
  margin-top: 3px;
  line-height: 1.4;
}
.ach-item.on::after {
  content: '✓';
  position: absolute;
  top: 6px; right: 8px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--coral, #d4775c);
  color: #fff5e8;
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

/* companion picker */
.modal.companion-modal { max-width: 520px; }
.comp-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.comp-card {
  background: #fdfaf2;
  border: 1.5px solid rgba(43, 37, 31, 0.10);
  border-radius: 12px;
  padding: 14px;
  text-align: center;
  cursor: pointer;
  transition: all 0.16s ease;
}
.comp-card:hover {
  border-color: rgba(212, 119, 92, 0.40);
  transform: translateY(-2px);
}
.comp-card.on {
  border-color: var(--coral, #d4775c);
  background: linear-gradient(135deg, rgba(212, 119, 92, 0.10), rgba(184, 146, 76, 0.06));
  box-shadow: 0 6px 18px rgba(212, 119, 92, 0.20);
}
.comp-avatar { font-size: 38px; line-height: 1; }
.comp-name {
  font-family: 'Noto Serif KR', serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink, #2a2520);
  margin-top: 6px;
}
.comp-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.10em;
  color: var(--ink-soft, #6b6256);
  margin-top: 2px;
}
.comp-style {
  display: inline-block;
  margin-top: 4px;
  padding: 2px 8px;
  background: rgba(212, 119, 92, 0.10);
  border-radius: 100px;
  font-family: 'Noto Serif KR', serif;
  font-size: 10px;
  color: var(--coral, #d4775c);
}

/* companion chatter bubble during travel */
.comp-chatter {
  position: fixed;
  left: 20px; bottom: 28px;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  z-index: 100;
  animation: chatterSlide 0.4s cubic-bezier(0.2, 0.9, 0.3, 1.3);
  pointer-events: none;
}
@keyframes chatterSlide {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}
.cc-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: #fdfaf2;
  border: 2px solid var(--coral, #d4775c);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(43, 37, 31, 0.20);
}
.cc-bubble {
  background: #fdfaf2;
  border-radius: 12px 12px 12px 0;
  padding: 8px 14px;
  max-width: 280px;
  box-shadow: 0 4px 14px rgba(43, 37, 31, 0.25);
}
.cc-name {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.10em;
  color: var(--coral, #d4775c);
  font-weight: 700;
}
.cc-line {
  font-family: 'Noto Serif KR', serif;
  font-size: 13px;
  color: var(--ink, #2a2520);
  margin-top: 2px;
  line-height: 1.4;
}

/* weather delay modal */
.modal.weather-delay {
  max-width: 380px;
  text-align: center;
  padding: 28px 26px 22px;
}
.wd-icon {
  font-size: 48px;
  margin-bottom: 8px;
}
.wd-title {
  font-family: 'Noto Serif KR', serif;
  font-size: 20px;
  font-weight: 600;
  color: var(--ink, #2a2520);
}
.wd-sub {
  font-family: 'Noto Serif KR', serif;
  font-size: 13px;
  color: var(--ink-soft, #6b6256);
  margin: 8px 0 18px;
}
.wd-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.wd-actions .btn {
  flex: 1 1 auto;
  min-width: 88px;
  font-size: 12px;
  padding: 10px 12px;
  line-height: 1.3;
}
.wd-actions .btn .dim {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  opacity: 0.7;
  letter-spacing: 0.06em;
}

/* TopBar companion button */
.icon-btn.companion-btn { color: var(--sage, #7a8d6b); }

/* online/offline indicator on message board */
.mb-online {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.10em;
  padding: 2px 8px;
  border-radius: 100px;
  font-weight: 700;
}
.mb-online.on {
  background: rgba(122, 141, 107, 0.18);
  color: var(--sage, #7a8d6b);
}
.mb-online.off {
  background: rgba(184, 146, 76, 0.14);
  color: var(--gold, #b8924c);
}

/* ======================================================================
   link confirm modal (replaces native confirm) · 韩式柔和
   ====================================================================== */
.modal.link-confirm {
  max-width: 360px;
  padding: 32px 28px 22px;
  text-align: center;
  background: #fdfaf2;
  border-radius: 24px;
  position: relative;
  overflow: hidden;
}
.modal.link-confirm::after {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 130px; height: 130px;
  background: radial-gradient(circle, #fce4cf 0%, transparent 70%);
  pointer-events: none;
}
.modal.link-confirm::before {
  content: '';
  position: absolute;
  bottom: -50px; left: -40px;
  width: 140px; height: 140px;
  background: radial-gradient(circle, rgba(184, 200, 171, 0.40) 0%, transparent 65%);
  pointer-events: none;
}
.lc-icon {
  width: 56px; height: 56px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: rgba(212, 119, 92, 0.10);
  color: var(--coral, #d4775c);
  display: flex; align-items: center; justify-content: center;
  position: relative; z-index: 2;
}
.lc-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.20em;
  color: var(--ink-soft, #6b6256);
  text-transform: uppercase;
  margin-bottom: 8px;
  position: relative; z-index: 2;
}
.lc-title {
  font-family: 'Noto Serif KR', serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--ink, #2a2520);
  letter-spacing: 0.02em;
  position: relative; z-index: 2;
}
.lc-credit {
  font-family: 'Noto Serif KR', serif;
  font-size: 13px;
  color: var(--ink-soft, #6b6256);
  margin-top: 2px;
  font-style: italic;
  position: relative; z-index: 2;
}
.lc-host {
  margin-top: 14px;
  padding: 8px 14px;
  background: rgba(245, 239, 226, 0.7);
  border-radius: 100px;
  display: inline-block;
  font-family: 'Noto Serif KR', serif;
  font-size: 12px;
  color: var(--ink-soft, #6b6256);
  position: relative; z-index: 2;
}
.lc-actions {
  display: flex;
  gap: 10px;
  margin-top: 22px;
  position: relative; z-index: 2;
}
.lc-actions .btn { flex: 1; }
.lc-actions .btn.primary {
  background: var(--coral, #d4775c);
  color: #fff5e8;
  border: 0;
  padding: 12px 18px;
  border-radius: 100px;
  font-family: 'Noto Serif KR', serif;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(212, 119, 92, 0.30);
}
.lc-actions .btn.ghost {
  background: transparent;
  color: var(--ink-soft, #6b6256);
  border: 1px solid rgba(43, 37, 31, 0.16);
  border-radius: 100px;
  padding: 12px 18px;
  font-family: 'Noto Serif KR', serif;
  font-size: 14px;
}

/* daily sale banner — make clickable + add hover */
.daily-sale-banner {
  cursor: pointer;
  user-select: none;
}
.daily-sale-banner:hover {
  transform: translateX(-50%) translateY(-1px);
  box-shadow: 0 6px 20px rgba(212, 119, 92, 0.55);
}
.daily-sale-banner:active { transform: translateX(-50%) scale(0.98); }

/* ======================================================================
   diary city picker + city memory modal
   ====================================================================== */
.dc-city-pick {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: #fff;
  border: 1px solid rgba(43, 37, 31, 0.14);
  border-radius: 8px;
  font-family: 'Noto Serif KR', serif;
  font-size: 13px;
  color: #5a4a37;
  cursor: pointer;
}
.dc-city-pick:hover { border-color: #c79670; }
.dccp-flag { font-size: 16px; }
.dccp-name { flex: 1; text-align: left; }
.dccp-arrow { color: #b88a5c; font-size: 10px; }

.dc-city-list {
  margin-top: 6px;
  max-height: 220px;
  overflow-y: auto;
  background: #fdfaf2;
  border: 1px solid rgba(43, 37, 31, 0.14);
  border-radius: 8px;
  padding: 6px;
}
.dc-city-search {
  width: 100%;
  padding: 6px 10px;
  border: 1px solid rgba(43, 37, 31, 0.10);
  border-radius: 6px;
  background: #fff;
  font-family: inherit;
  font-size: 13px;
  margin-bottom: 4px;
  outline: none;
  box-sizing: border-box;
}
.dc-city-opt {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: transparent;
  border: 0;
  text-align: left;
  font-family: 'Noto Serif KR', serif;
  font-size: 13px;
  color: #5a4a37;
  cursor: pointer;
  border-radius: 6px;
}
.dc-city-opt:hover { background: rgba(199, 150, 112, 0.08); }

.de-flag { margin-right: 6px; font-size: 14px; }

/* city memory modal */
.modal.city-memory { max-width: 560px; }
.city-memory .modal-title {
  display: flex;
  align-items: center;
  gap: 8px;
}
.cm-flag { font-size: 22px; }
.cm-section-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--ink-soft, #6b6256);
  text-transform: uppercase;
  margin: 12px 0 8px;
  padding-bottom: 4px;
  border-bottom: 1px dashed rgba(43, 37, 31, 0.16);
}
.cm-diary-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.cm-diary-entry {
  background: #fdfaf2;
  border: 1px solid rgba(43, 37, 31, 0.10);
  border-radius: 10px;
  padding: 10px 14px;
}
.cm-diary-entry .de-mood { margin-right: 6px; font-size: 16px; }
.cm-diary-entry .de-meta { font-size: 10px; }

/* make city flag on map clickable (was display only) */
.city-flag {
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
}
.city-flag:hover {
  transform: translate(-50%, 4px) scale(1.2);
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.40));
}

/* ======================================================================
   safety scenario modal · 韩式柔和（警示但不刺眼）
   ====================================================================== */
.modal.safety-modal {
  max-width: 420px;
  padding: 28px 26px 22px;
  background: #fdfaf2;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.modal.safety-modal::after {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 130px; height: 130px;
  background: radial-gradient(circle, rgba(212, 119, 92, 0.14) 0%, transparent 70%);
  pointer-events: none;
}
.sf-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.20em;
  color: var(--coral, #d4775c);
  font-weight: 700;
  text-transform: uppercase;
  position: relative; z-index: 2;
}
.sf-icon {
  font-size: 56px;
  margin: 8px 0 6px;
  position: relative; z-index: 2;
}
.sf-title {
  font-family: 'Noto Serif KR', serif;
  font-size: 22px;
  font-weight: 600;
  color: var(--ink, #2a2520);
  position: relative; z-index: 2;
}
.sf-loc {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--ink-soft, #6b6256);
  margin: 4px 0 14px;
  letter-spacing: 0.06em;
  position: relative; z-index: 2;
}
.sf-text {
  background: rgba(245, 239, 226, 0.55);
  border-left: 3px solid var(--coral, #d4775c);
  padding: 12px 14px;
  border-radius: 0 8px 8px 0;
  font-family: 'Noto Serif KR', serif;
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink, #2a2520);
  text-align: left;
  margin-bottom: 16px;
  position: relative; z-index: 2;
}
.sf-choices {
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative; z-index: 2;
}
.sf-choice {
  padding: 12px 16px;
  background: #fdfaf2;
  border: 1px solid rgba(43, 37, 31, 0.16);
  border-radius: 12px;
  font-family: 'Noto Serif KR', serif;
  font-size: 14px;
  color: var(--ink, #2a2520);
  text-align: left;
  cursor: pointer;
  transition: all 0.16s ease;
}
.sf-choice:hover {
  border-color: var(--coral, #d4775c);
  background: rgba(212, 119, 92, 0.04);
  transform: translateX(2px);
}
.sf-result {
  position: relative; z-index: 2;
  animation: sfPop 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes sfPop { from { opacity:0; transform: translateY(8px); } to { opacity:1; transform: translateY(0); } }
.sf-tip {
  padding: 14px 16px;
  border-radius: 10px;
  font-family: 'Noto Serif KR', serif;
  font-size: 14px;
  line-height: 1.6;
  text-align: left;
}
.outcome-good .sf-tip { background: rgba(122, 141, 107, 0.14); color: #54664a; border: 1px solid rgba(122, 141, 107, 0.30); }
.outcome-bad .sf-tip  { background: rgba(212, 119, 92, 0.14); color: #b85d44; border: 1px solid rgba(212, 119, 92, 0.30); }
.outcome-mid .sf-tip  { background: rgba(184, 146, 76, 0.14); color: #8e6d34; border: 1px solid rgba(184, 146, 76, 0.30); }

.sf-rule {
  margin-top: 12px;
  padding: 12px 14px;
  background: #fdfaf2;
  border: 1px dashed rgba(43, 37, 31, 0.20);
  border-radius: 10px;
  text-align: left;
}
.sfr-h {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--coral, #d4775c);
  font-weight: 700;
  margin-bottom: 4px;
}
.sfr-body {
  font-family: 'Noto Serif KR', serif;
  font-size: 13px;
  color: var(--ink, #2a2520);
  line-height: 1.65;
}
.sf-close { width: 100%; margin-top: 14px; }

/* language picker */
.modal.lang-picker { max-width: 380px; }
.lang-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}
.lang-opt {
  padding: 14px 18px;
  background: #fdfaf2;
  border: 1.5px solid rgba(43, 37, 31, 0.14);
  border-radius: 14px;
  font-family: 'Noto Serif KR', serif;
  font-size: 16px;
  color: var(--ink, #2a2520);
  cursor: pointer;
  transition: all 0.16s ease;
}
.lang-opt:hover {
  border-color: var(--coral, #d4775c);
  transform: translateY(-1px);
}
.lang-opt.active {
  background: var(--coral, #d4775c);
  border-color: var(--coral, #d4775c);
  color: #fff5e8;
}
.lang-note {
  font-family: 'Noto Serif KR', serif;
  font-size: 12px;
  color: var(--ink-soft, #6b6256);
  text-align: center;
  line-height: 1.55;
}

/* ======================================================================
   auth modal · 邮箱登录 + 档案设置
   ====================================================================== */
.modal.auth-modal { max-width: 380px; }
.auth-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.20em;
  color: var(--coral, #d4775c);
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.auth-desc {
  font-family: 'Noto Serif KR', serif;
  font-size: 13px;
  line-height: 1.65;
  color: var(--ink, #2a2520);
  margin: 0 0 16px;
}
.auth-desc .dim { color: var(--ink-soft, #6b6256); font-size: 12px; }
.auth-input {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid rgba(43, 37, 31, 0.16);
  border-radius: 10px;
  font-family: 'Noto Serif KR', serif;
  font-size: 14px;
  color: var(--ink, #2a2520);
  outline: none;
  margin-bottom: 12px;
  box-sizing: border-box;
}
.auth-input:focus { border-color: var(--coral, #d4775c); }
.auth-send {
  width: 100%;
  padding: 13px 22px;
  border-radius: 100px;
  background: var(--coral, #d4775c);
  color: #fff5e8;
  border: 0;
  font-family: 'Noto Serif KR', serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(212, 119, 92, 0.30);
}
.auth-send:hover:not(:disabled) { background: #c2624c; transform: translateY(-1px); }
.auth-send:disabled { opacity: 0.5; cursor: wait; }

.auth-sent { text-align: center; padding: 8px 0; }
.auth-sent-icon {
  width: 64px; height: 64px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: rgba(212, 119, 92, 0.10);
  color: var(--coral, #d4775c);
  font-size: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.auth-sent-title {
  font-family: 'Noto Serif KR', serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--ink, #2a2520);
  margin-bottom: 8px;
}
.auth-sent-body {
  font-family: 'Noto Serif KR', serif;
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink-soft, #6b6256);
}
.auth-sent-body .dim { font-size: 11px; opacity: 0.75; }

/* topbar account button */
.icon-btn.auth-btn.on {
  background: var(--coral, #d4775c);
  color: #fff5e8;
  border-color: var(--coral, #d4775c);
}
.ab-initial {
  font-family: 'Noto Serif KR', serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0;
}

/* ======================================================================
   friends modal + friend message highlight + online friends bar
   ====================================================================== */
.modal.friends-modal { max-width: 520px; }
.friends-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.friend-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: #fdfaf2;
  border: 1px solid rgba(43, 37, 31, 0.10);
  border-radius: 12px;
}
.fr-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--coral, #d4775c), #b85d44);
  color: #fff5e8;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Noto Serif KR', serif;
  font-size: 18px;
  font-weight: 700;
  flex-shrink: 0;
}
.fr-info { flex: 1; min-width: 0; }
.fr-name {
  font-family: 'Noto Serif KR', serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink, #2a2520);
}
.fr-city {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--ink-soft, #6b6256);
  margin-top: 2px;
}
.fr-act {
  padding: 7px 12px;
  font-size: 12px;
  flex-shrink: 0;
}
.friends-search .fs-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* friend message highlight on board */
.mb-msg.friend {
  border-color: var(--sage, #7a8d6b);
  border-left: 4px solid var(--sage, #7a8d6b);
  background: rgba(122, 141, 107, 0.06);
}
.mb-msg.real.mine {
  border-color: var(--coral, #d4775c);
  border-left: 4px solid var(--coral, #d4775c);
  background: rgba(212, 119, 92, 0.06);
}
.mb-friend-badge {
  background: var(--sage, #7a8d6b);
  color: #fff5e8;
  padding: 1px 6px;
  border-radius: 100px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.10em;
  font-weight: 700;
}
.mb-mine-badge {
  background: var(--coral, #d4775c);
  color: #fff5e8;
  padding: 1px 6px;
  border-radius: 100px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.10em;
  font-weight: 700;
}

/* online friends bar (pinned just under topbar) */
.online-friends-bar {
  position: fixed;
  top: 60px;
  right: 16px;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: rgba(253, 250, 242, 0.92);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(43, 37, 31, 0.10);
  border-radius: 100px;
  box-shadow: 0 4px 14px rgba(43, 37, 31, 0.12);
  max-width: calc(100vw - 32px);
}
.ofb-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.18em;
  color: var(--coral, #d4775c);
  font-weight: 700;
  text-transform: uppercase;
  flex-shrink: 0;
}
.ofb-list {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.ofb-list::-webkit-scrollbar { display: none; }
.ofb-friend {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px 2px 2px;
  background: rgba(122, 141, 107, 0.10);
  border-radius: 100px;
  font-family: 'Noto Serif KR', serif;
  font-size: 12px;
  white-space: nowrap;
  flex-shrink: 0;
}
.ofb-avatar {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--sage, #7a8d6b);
  color: #fff5e8;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px;
  font-weight: 700;
}
.ofb-name { color: var(--ink, #2a2520); font-weight: 600; }
.ofb-city { color: var(--ink-soft, #6b6256); font-size: 11px; }
@media (max-width: 760px) {
  .online-friends-bar {
    top: calc(58px + env(safe-area-inset-top, 0px));
    right: 8px;
    padding: 6px 10px;
    font-size: 11px;
  }
}

/* ======================================================================
   prominent login pill in topbar
   ====================================================================== */
.auth-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 100px;
  font-family: 'Noto Serif KR', serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all 0.16s ease;
  white-space: nowrap;
}
.auth-pill.off {
  background: var(--coral, #d4775c);
  color: #fff5e8;
  border: 0;
  box-shadow: 0 3px 10px rgba(212, 119, 92, 0.35);
}
.auth-pill.off:hover {
  background: #c2624c;
  transform: translateY(-1px);
  box-shadow: 0 5px 14px rgba(212, 119, 92, 0.50);
}
.auth-pill.on {
  background: rgba(122, 141, 107, 0.14);
  color: var(--sage, #54664a);
  border: 1px solid rgba(122, 141, 107, 0.35);
}
.auth-pill.on:hover { background: rgba(122, 141, 107, 0.20); }
.auth-pill .ap-avatar {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--sage, #7a8d6b);
  color: #fff5e8;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px;
  font-weight: 700;
}
.auth-pill .ap-text { font-weight: 600; }
.auth-pill .ap-name { font-weight: 600; }

@media (max-width: 640px) {
  .auth-pill .ap-text { display: none; }
  .auth-pill.off::after { content: '登录'; }
  .auth-pill { padding: 6px 10px; }
}

/* ======================================================================
   depart confirm · invite friends along
   ====================================================================== */
.dc-invite {
  margin: 4px 18px 0;
  padding: 10px 14px;
  background: rgba(122, 141, 107, 0.08);
  border: 1px solid rgba(122, 141, 107, 0.30);
  border-radius: 12px;
}
.dc-invite-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--sage, #54664a);
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.dc-invite-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.dc-invite-sub {
  font-family: 'Noto Serif KR', serif;
  font-size: 11px;
  color: var(--ink-3, #6b6259);
  margin: 2px 0 8px;
  font-style: italic;
}
.dc-invite-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px 6px 6px;
  background: #fdfaf2;
  border: 1.5px solid rgba(43, 37, 31, 0.22);
  border-radius: 100px;
  font-family: 'Noto Serif KR', serif;
  font-size: 13px;
  color: var(--ink, #2a2520);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: transform 0.14s ease, background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}
.dc-invite-pill:hover { border-color: var(--sage, #7a8d6b); }
.dc-invite-pill:active { transform: scale(0.96); }
.dc-invite-pill.on {
  background: var(--sage, #7a8d6b);
  border-color: var(--sage, #54664a);
  color: #fff5e8;
  box-shadow: 0 2px 8px rgba(84,102,74,0.30);
}
.dcip-avatar {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--sage, #54664a);
  color: #fff5e8;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}
.dc-invite-pill.on .dcip-avatar { background: rgba(255, 245, 232, 0.30); }
.dcip-name { white-space: nowrap; }
.dcip-mark {
  margin-left: 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: rgba(43,37,31,0.08);
  color: var(--ink-3, #6b6259);
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  transition: background 0.18s ease, color 0.18s ease;
}
.dc-invite-pill.on .dcip-mark {
  background: #fff5e8;
  color: var(--sage, #54664a);
}
.dc-invite-hint {
  margin-top: 8px;
  font-family: 'Noto Serif KR', serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--sage, #54664a);
  padding: 6px 10px;
  background: rgba(122,141,107,0.10);
  border-radius: 8px;
  display: inline-block;
}

/* ticket companions row */
.tk-companions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  padding-top: 8px;
  border-top: 1px dashed rgba(43, 37, 31, 0.12);
}
.tk-companion-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px 2px 2px;
  background: rgba(122, 141, 107, 0.14);
  border-radius: 100px;
  font-family: 'Noto Serif KR', serif;
  font-size: 11px;
  color: var(--ink, #2a2520);
}
.tcc-avatar {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--sage, #7a8d6b);
  color: #fff5e8;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px;
  font-weight: 700;
}

/* ======================================================================
   OAuth login buttons (Google / Apple)
   ====================================================================== */
.oauth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  margin-bottom: 10px;
  padding: 14px 22px;
  border-radius: 14px;
  font-family: 'Noto Serif KR', 'Pretendard', sans-serif;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all 0.18s ease;
  border: 1.5px solid transparent;
}
.oauth-btn:disabled { opacity: 0.6; cursor: wait; }
.oauth-btn .oauth-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px; height: 24px;
}
.oauth-btn.google {
  background: #fff;
  color: #2a2520;
  border-color: rgba(43, 37, 31, 0.18);
}
.oauth-btn.google:hover:not(:disabled) {
  border-color: rgba(43, 37, 31, 0.40);
  box-shadow: 0 4px 14px rgba(43, 37, 31, 0.10);
  transform: translateY(-1px);
}

/* Email/password sign-in — secondary path, mainly for App Review */
.auth-email-toggle {
  display: block;
  margin: 12px auto 0;
  padding: 6px 12px;
  background: transparent;
  border: none;
  color: var(--ink-3, #6b6259);
  font-family: 'Noto Serif KR', serif;
  font-size: 12px;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: rgba(43,37,31,0.20);
  text-underline-offset: 3px;
}
.auth-email-toggle:hover { color: var(--ink-2, #2a2520); }
.auth-email-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
  padding: 12px;
  background: rgba(43,37,31,0.04);
  border-radius: 10px;
}
.auth-email-form .auth-input {
  padding: 9px 12px;
  border: 1px solid var(--hair);
  border-radius: 8px;
  font-family: 'Noto Serif KR', serif;
  font-size: 14px;
  background: white;
  outline: none;
  color: var(--ink);
}
.auth-email-form .auth-input:focus { border-color: var(--coral); }
.auth-email-form .btn { padding: 10px; }
.auth-email-hint {
  margin: 2px 0 0;
  font-family: 'Noto Serif KR', serif;
  font-size: 10.5px;
  color: var(--ink-3, #6b6259);
  font-style: italic;
  line-height: 1.4;
}
.oauth-btn.apple {
  background: #2a2520;
  color: #fff5e8;
  border-color: #2a2520;
}
.oauth-btn.apple:hover:not(:disabled) {
  background: #1a1815;
  box-shadow: 0 4px 14px rgba(43, 37, 31, 0.30);
  transform: translateY(-1px);
}
.auth-foot {
  margin-top: 14px;
  font-family: 'Noto Serif KR', sans-serif;
  font-size: 11px;
  color: var(--ink-soft, #6b6256);
  line-height: 1.6;
  text-align: center;
  opacity: 0.85;
}

/* media link arrow as separate button (for BOOK/SONG/MUSICAL) */
.media-link-btn {
  background: rgba(212, 119, 92, 0.10);
  border: 1px solid rgba(212, 119, 92, 0.35);
  border-radius: 100px;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--coral, #d4775c);
  cursor: pointer;
  margin-left: 4px;
  transition: all 0.16s ease;
  flex-shrink: 0;
}
.media-link-btn:hover {
  background: var(--coral, #d4775c);
  color: #fff5e8;
}

/* ======================================================================
   PWA / mobile · 安全区 + 可触摸尺寸 + 防双击缩放 + 滚动惯性
   ====================================================================== */
@media (max-width: 760px) {
  /* iOS 标准安全区填充（适配刘海/底部 home 条） */
  body {
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }
  .topbar {
    padding-top: calc(10px + env(safe-area-inset-top));
  }
  .depart-btn {
    bottom: calc(20px + env(safe-area-inset-bottom)) !important;
  }
  .modal-overlay {
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
  }

  /* 触摸尺寸 ≥ 40pt（Apple HIG）*/
  .icon-btn, .deck-btn, .modal-close, .auth-pill,
  .ms-tab, .chip, .db-pill, .db-class, .cp-pill, .mb-filter,
  .lang-opt, .oauth-btn { min-height: 40px; }
  .media-link-btn { width: 28px; height: 28px; font-size: 14px; }

  /* 防 iOS 双击缩放 */
  button, a, .city, .city-flag, .media-card, .starter-card, .comp-card {
    touch-action: manipulation;
  }

  /* 平滑滚动惯性 */
  .modal-body, .country-overlay, .cc-content, .ofb-list, .country-panel, body {
    -webkit-overflow-scrolling: touch;
  }

  /* 文字大小不被自动缩放 */
  body { -webkit-text-size-adjust: 100%; }

  /* 输入框不缩放（iOS 16px 以下会自动放大）*/
  input, textarea, select { font-size: 16px !important; }

  /* 弹窗占满屏幕（PWA 全屏体验）*/
  .modal {
    max-width: 100%;
    max-height: calc(100vh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 20px);
    border-radius: 22px 22px 18px 18px;
  }
  .modal-overlay { padding: 10px; }

  /* 底部输入区不被键盘挡住（iOS）*/
  .mb-compose, .diary-compose, .auth-modal .modal-body {
    padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  }
}

/* PWA 独立模式（添加到主屏幕后）的特殊优化 */
@media (display-mode: standalone) {
  /* 隐藏"添加到主屏幕"提示 */
  .pwa-prompt { display: none; }
  /* 顶栏背景更不透明（无浏览器 chrome）*/
  .topbar {
    background: rgba(245, 239, 226, 0.96);
  }
  /* 拒绝双击放大 */
  html { touch-action: manipulation; }
  /* 长按禁用菜单（iOS）*/
  body { -webkit-touch-callout: none; }
}

/* daily sale detail modal */
.modal.sale-detail { max-width: 420px; text-align: center; }
.sd-pct-big {
  font-family: 'Pretendard', 'Noto Serif KR', sans-serif;
  font-size: 64px;
  font-weight: 800;
  color: var(--coral, #d4775c);
  line-height: 1;
  margin: 8px 0 16px;
  letter-spacing: -0.04em;
}
.sd-desc {
  font-family: 'Noto Serif KR', serif;
  font-size: 14px;
  color: var(--ink, #2a2520);
  line-height: 1.7;
  margin: 0 0 16px;
}
.sd-rule {
  background: rgba(245, 239, 226, 0.6);
  border-radius: 10px;
  padding: 12px 14px;
  text-align: left;
}
.sd-section {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--ink-soft, #6b6256);
  text-transform: uppercase;
  margin: 16px 0 6px;
}
.sd-cities {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}
.sd-city {
  padding: 4px 12px;
  background: rgba(212, 119, 92, 0.12);
  border: 1px solid rgba(212, 119, 92, 0.30);
  border-radius: 100px;
  font-family: 'Noto Serif KR', serif;
  font-size: 12px;
  color: var(--ink, #2a2520);
}
.sd-foot { margin-top: 16px; font-size: 11px; }
.sd-foot.dim { color: var(--ink-soft, #6b6256); opacity: 0.75; }

/* daily sale banner is now a button */
button.daily-sale-banner {
  border: 0;
  cursor: pointer;
  font: inherit;
}

/* ===== diary feed (public entries + comments + likes) ===== */
.diary-subtabs {
  display: flex;
  gap: 6px;
  padding: 8px 0 12px;
  border-bottom: 1px solid var(--hair);
  margin-bottom: 12px;
}
.diary-feed {
  padding: 4px 0 24px;
}
.df-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.df-tag { font-weight: 600; color: var(--ink-2); }
.df-online { padding: 3px 8px; border-radius: 999px; background: var(--paper-3); border: 1px solid var(--hair); }
.df-online.on  { color: var(--sage); border-color: rgba(122,141,107,0.4); }
.df-online.off { color: var(--ink-3); }
.df-loginhint {
  background: rgba(184,146,76,0.10);
  border: 1px solid rgba(184,146,76,0.30);
  color: var(--ink-2);
  padding: 8px 14px;
  border-radius: 12px;
  font-size: 13px;
  margin-bottom: 12px;
}
.df-list { display: flex; flex-direction: column; gap: 14px; }
.df-card {
  background: var(--paper);
  border: 1px solid var(--hair);
  border-radius: 14px;
  padding: 14px 16px;
}
.df-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--ink-3);
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.df-avatar {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--coral);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
}
.df-author { font-weight: 600; color: var(--ink); }
.df-flag, .df-city, .df-time { font-size: 12px; }
.df-time { margin-left: auto; opacity: 0.7; }
.df-title { font-size: 16px; font-weight: 600; margin: 4px 0 6px; }
.df-body  { font-size: 14px; line-height: 1.6; color: var(--ink-2); white-space: pre-wrap; }
.df-actions {
  display: flex;
  gap: 16px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed var(--hair);
  font-size: 13px;
}
.df-like, .df-reply-btn {
  background: none;
  border: 0;
  color: var(--ink-3);
  cursor: pointer;
  padding: 4px 0;
  font: inherit;
}
.df-like.on { color: var(--coral); }
.df-like:disabled, .df-reply-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.df-comments {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.df-comment {
  padding: 6px 10px;
  background: var(--paper-3);
  border-radius: 10px;
  font-size: 13px;
}
.df-c-name { font-weight: 600; color: var(--ink-2); margin-right: 8px; }
.df-c-time { font-size: 11px; color: var(--ink-3); }
.df-c-body { margin-top: 2px; line-height: 1.5; white-space: pre-wrap; }
.df-compose {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.df-compose textarea {
  width: 100%;
  border: 1px solid var(--hair);
  border-radius: 10px;
  padding: 8px 10px;
  font: inherit;
  font-size: 14px;
  resize: vertical;
  min-height: 56px;
  background: var(--paper);
}
.df-compose-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.df-c-count { font-size: 11px; color: var(--ink-3); }
.de-vis { font-size: 11px; color: var(--ink-3); }

/* ===================================================================
 * mobile polish v3 — compact, denser, iOS-tight
 * Design rule: smaller is more elegant. 13/15/18/24 type scale.
 * ================================================================== */
@media (max-width: 760px) {
  :root {
    --card-w: 92vw;
    --card-radius: 14px;
    --card-shadow:
      0 0.5px 0 rgba(43,37,31,0.04),
      0 4px 12px rgba(43,37,31,0.05),
      0 12px 24px rgba(43,37,31,0.04);
  }

  .modal,
  .ticket,
  .payslip,
  .depart-confirm,
  .city-panel {
    width: var(--card-w);
    max-width: var(--card-w);
    border-radius: var(--card-radius);
    box-shadow: var(--card-shadow);
  }
  /* .city-card lives inside .deck-stack (which is inside the country panel
     with its own padding). Let the parent drive width so cards never
     overflow horizontally on phone.                                  */
  .city-card {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    border-radius: var(--card-radius);
    box-shadow: var(--card-shadow);
    /* scroll moved to .cc-inner (so border-radius keeps clipping the hero cleanly) */
  }
  .deck-stack { width: 100%; max-width: 100%; }
  .city-deck  { width: 100%; max-width: 100%; }
  /* CityTasks + JobBoard must stack vertically — add explicit spacing to prevent visual overlap */
  .cc-inner > .job-board { margin-top: 16px; }
  .cc-content + .job-board { margin-top: 8px; }

  /* Compact type scale — Apple-like density */
  body { font-size: 14px; line-height: 1.45; letter-spacing: -0.003em; }
  .modal-title { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
  .panel-title, .cc-name, .ch-title, .df-title {
    font-size: 18px; font-weight: 700; letter-spacing: -0.015em;
  }
  .cc-section-title, .panel-section-title, .pp-section-title, .df-tag, .ch-tag, .jb-tag, .ct-tag {
    font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase;
    color: var(--ink-3); font-weight: 600;
  }
  .media-title, .ach-name, .friend-row .fr-name { font-size: 13px; font-weight: 600; }
  .media-credit, .panel-subtitle, .ach-desc { font-size: 11px; color: var(--ink-2); }

  /* Tight spacing grid — 6 / 10 / 14 */
  .modal-head { padding: 12px 14px 10px; }
  .modal-body { padding: 4px 14px 14px; }
  .modal-summary { padding: 0 14px 10px; font-size: 11px; color: var(--ink-3); }
  .modal-actions { padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); gap: 8px; }
  .modal-actions .btn { flex: 1 1 0; }
  .panel-header { padding: 12px 14px 10px; }
  .panel-coords { gap: 10px; flex-wrap: wrap; padding-top: 6px; }

  .modal-summary, .modal-head { border-bottom: 0.5px solid rgba(43,37,31,0.08); }
  .modal-actions { border-top: 0.5px solid rgba(43,37,31,0.08); }

  /* Compact buttons — 40px height */
  .btn { min-height: 40px; border-radius: 10px; padding: 9px 14px; font-size: 13px; font-weight: 600; }
  .btn.primary { box-shadow: 0 1px 4px rgba(212,119,92,0.28); }
  .btn.ghost { background: var(--paper-3); border: 0.5px solid rgba(43,37,31,0.10); }

  /* CityCard hero: shorter for a phone */
  .cc-inner { width: 100%; max-width: 100%; box-sizing: border-box; }
  .cc-hero { height: 44vw; max-height: 200px; padding: 14px 16px 12px; border-radius: var(--card-radius) var(--card-radius) 0 0; }
  .cc-hero .cc-name { font-size: 22px; }
  .cc-hero .cc-tag { font-size: 9px; }
  .cc-content { padding: 14px 16px 12px; }
  .cc-content .cc-brief { font-size: 13px; line-height: 1.45; color: var(--ink-2); }
  .cc-section-title { margin: 12px 0 8px; }

  /* Smaller pills */
  .chip, .db-pill, .db-class, .mb-filter, .cp-pill, .ms-tab {
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 12px;
    min-height: 32px;
    border: 0.5px solid rgba(43,37,31,0.10);
  }
  .ms-tab.active, .mb-filter.active, .cp-pill.active, .db-pill.active, .db-class.active, .chip.active {
    background: var(--ink); color: var(--paper); border-color: var(--ink);
  }

  /* Tickets compact */
  .ticket { padding: 12px 14px; margin: 8px auto; }
  .tk-row { gap: 6px 12px; flex-wrap: wrap; }
  .tk-l { font-size: 9px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); display: block; }
  .tk-v { font-size: 13px; font-weight: 500; }
  .tk-stub { width: 64px; padding: 14px 8px; }
  .tk-stub-meta { font-size: 8px; }
  .tk-stub-no { font-size: 12px; }

  /* Totals banner — compact */
  .total-banner { gap: 6px 12px; padding: 10px 12px; flex-wrap: wrap; border-radius: 10px; }
  .total-banner .tb-cell { flex: 1 1 calc(50% - 12px); min-width: 0; }
  .tb-l { font-size: 9px; }
  .tb-v { font-size: 14px; }

  /* Diary / Album / Achievements — radius 10 */
  .diary-entry .de-card, .album-photo, .ach-item, .df-card { border-radius: 10px; }
  .album-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }

  .friend-row { padding: 10px 12px; border-radius: 10px; gap: 10px; }
  .fr-avatar { width: 32px; height: 32px; font-size: 14px; }

  .mb-filters {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    margin: 0 -4px;
    padding: 0 4px;
  }
  .mb-filters::-webkit-scrollbar { display: none; }
  .mb-filter { flex: 0 0 auto; }

  .df-card { padding: 11px 13px; }
  .df-card-head { gap: 6px; font-size: 11px; }
  .df-avatar { width: 24px; height: 24px; font-size: 11px; }
  .df-title { font-size: 14px; margin: 4px 0 4px; }
  .df-body { font-size: 13px; }
  .df-actions { padding-top: 8px; gap: 14px; font-size: 12px; }

  /* TopBar — denser */
  .topbar { padding: 8px 10px env(safe-area-inset-bottom, 8px); gap: 4px 6px; }
  .topbar .brand { font-size: 16px; gap: 6px; }
  .topbar-right { gap: 5px; padding: 3px 0 4px; }
  .topbar-stat { font-size: 10px; padding: 3px 8px; min-height: 26px; }
  .topbar-stat .v { font-size: 11px; }
  .auth-pill { min-height: 28px; padding: 4px 8px; font-size: 11px; }
  .auth-pill .ap-name { max-width: 60px; }
  .icon-btn { width: 32px; height: 32px; min-width: 32px; min-height: 32px; }

  /* Deck — compact */
  .deck-btn { width: 40px; height: 40px; min-width: 40px; min-height: 40px; }
  .deck-controls { gap: 10px; padding: 6px 0; }
  .deck-count { font-size: 12px; min-width: 56px; }

  /* Depart button — slim */
  .depart-btn {
    left: 12px !important; right: 12px !important; width: auto !important;
    min-height: 48px;
    font-size: 14px;
    padding: 10px 18px;
    border-radius: 14px !important;
    bottom: calc(12px + env(safe-area-inset-bottom)) !important;
    box-shadow: 0 8px 20px rgba(212,119,92,0.30), 0 1px 0 rgba(43,37,31,0.06);
  }
  .depart-btn .cost { font-size: 11px; opacity: 0.85; }
  .depart-btn .key { display: none; }

  /* TransportBar — compact 4 columns inline */
  .transport-bar {
    gap: 4px;
    padding: 8px 10px;
    flex-wrap: wrap;
    justify-content: center;
  }
  .transport-option {
    padding: 6px 4px;
    flex: 1 1 calc(50% - 4px);
    min-width: 0;
    border-radius: 10px;
  }
  .transport-option .transport-name { font-size: 11px; }
  .transport-option .transport-meta { font-size: 9px; }
  .transport-icon { width: 18px; height: 18px; }

  /* Encounter / safety modal compact */
  .encounter, .safety-modal, .weather-delay { padding: 14px; }
  .encounter-tag, .sf-tag { font-size: 10px; }
  .encounter-title, .sf-title { font-size: 15px; margin-top: 6px; }
  .encounter-text, .sf-text { font-size: 13px; line-height: 1.5; }
  .encounter-choice, .sf-choice { padding: 10px 12px; font-size: 13px; min-height: 40px; }

  /* Panel coords */
  .panel-coords > span { flex: 1 1 33%; min-width: 0; font-size: 10px; }
  .panel-coords .l { font-size: 9px; opacity: 0.6; display: block; }
  .panel-coords .v { font-size: 12px; font-weight: 500; }

  /* DepartConfirm route */
  .dc-route { padding: 2px 0 6px; }
  .dc-route .dc-city { font-size: 14px; font-weight: 600; }
  .dc-arrow { opacity: 0.4; font-size: 14px; }
  .dc-tag { font-size: 10px; }
  .dc-stub { width: 60px; padding: 12px 6px; }
  .dc-l { font-size: 9px; }
  .dc-v { font-size: 12px; }
  .dc-fare-row { font-size: 12px; padding: 4px 0; }
  .dc-fare-row.total { font-size: 14px; }

  /* Stamps + Achievements — compact grid */
  .pp-summary { padding: 8px 12px; gap: 12px; font-size: 11px; }
  .pp-stat .pps-l { font-size: 10px; }
  .pp-stat .pps-v { font-size: 16px; }
  .pp-grid { grid-template-columns: repeat(4, 1fr); gap: 6px; }
  .pp-stamp { aspect-ratio: 1 / 1; font-size: 9px; padding: 6px 2px; gap: 2px; border-radius: 8px; }
  .pps-flag { font-size: 22px; }
  .pps-name { font-size: 9px; line-height: 1.1; }
  .pps-visits { font-size: 9px; }

  .ach-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .ach-item { padding: 10px 8px; min-height: 84px; text-align: center; border-radius: 10px; }
  .ach-icon { font-size: 20px; margin-bottom: 2px; }
  .ach-name { font-size: 12px; }
  .ach-desc { font-size: 10px; line-height: 1.3; }

  /* Skin picker compact */
  .pp-skins { display: flex; gap: 6px; overflow-x: auto; padding: 4px 0; scrollbar-width: none; }
  .pp-skins::-webkit-scrollbar { display: none; }
  .pp-skin { flex: 0 0 auto; min-width: 92px; padding: 8px 10px; border-radius: 10px; font-size: 11px; }
  .pps-skin-name { font-size: 12px; }
  .pps-skin-hint { font-size: 9px; }

  /* Cabin scenes shrink */
  .cabin { height: 280px; width: var(--card-w); border-radius: var(--card-radius); }
  .cabin-banner { font-size: 10px; padding: 5px 14px; }
  .cabin-label { font-size: 9px; }

  /* Job board */
  .job-board { padding: 10px 12px; border-radius: var(--card-radius); }
  .jb-title { font-size: 12px; }
  .job-card { padding: 8px 10px; gap: 6px; border-radius: 10px; }
  .jc-title { font-size: 12px; }
  .jc-meta { font-size: 10px; }
  .jc-pay { font-size: 13px; }
  .jc-go { padding: 6px 12px; font-size: 11px; min-height: 32px; }

  /* MessageBoard */
  .message-board { padding: 10px 12px; }
  .mb-tag { font-size: 10px; }
  .mb-msg { padding: 8px 10px; border-radius: 10px; font-size: 12px; }
  .mb-row1 { font-size: 10px; gap: 4px; flex-wrap: wrap; }
  .mb-content { font-size: 12px; line-height: 1.45; padding: 4px 0; }
  .mb-row2 { font-size: 11px; gap: 8px; }
  .mb-compose textarea, .df-compose textarea { font-size: 13px; padding: 8px 10px; border-radius: 8px; }

  /* HintBanner / ms-tabs (sub-tabs) */
  .hint { padding: 8px 12px; font-size: 12px; gap: 8px; }
  .hint .num { width: 22px; height: 22px; font-size: 11px; }
  .ms-tabs { gap: 4px; flex-wrap: wrap; padding: 6px 0; }

  /* CountryView */
  .country-stage { padding: 8px !important; }
  .country-header .ch-title { font-size: 18px; }
  .country-header .ch-tag { font-size: 9px; }
  .country-body { gap: 8px; }
  .country-map-wrap { height: 36vh; min-height: 200px; }

  /* Diary */
  .diary-write-btn { font-size: 13px; padding: 10px 14px; border-radius: 10px; min-height: 40px; }
  .dc-mood, .mbc-topic, .mbc-mood { font-size: 14px; padding: 6px 8px; min-height: 36px; border-radius: 8px; }
  .dc-title, .dc-body, .dc-textarea { font-size: 13px; padding: 8px 10px; border-radius: 8px; }
  .de-title { font-size: 14px; }
  .de-meta { font-size: 10px; }
  .de-body { font-size: 12px; line-height: 1.5; }

  /* Save File */
  .save-file-modal .sf-desc { font-size: 12px; line-height: 1.45; }
  .sf-stats { font-size: 11px; gap: 8px 14px; }

  /* Subtle press feedback */
  button:active, .city:active, .city-card:active, .ach-item:active, .pp-stamp:active {
    transform: scale(0.97);
    transition: transform 0.08s ease-out;
  }

  /* Background subtler */
  .bg-paper, .bg-noise { opacity: 0.5; }
}

/* very narrow phones (< 380px) — even tighter */
@media (max-width: 380px) {
  body { font-size: 13px; }
  .modal-title { font-size: 14px; }
  .panel-title, .cc-name, .ch-title, .df-title { font-size: 16px; }
  .btn { font-size: 12px; padding: 8px 12px; min-height: 38px; }
  .total-banner .tb-cell { flex: 1 1 calc(50% - 8px); }
  .ach-grid { grid-template-columns: repeat(2, 1fr); gap: 6px; }
  .pp-grid { grid-template-columns: repeat(3, 1fr); gap: 5px; }
  .topbar .brand { font-size: 14px; }
  .auth-pill .ap-name { display: none; }
  .pp-stamp { font-size: 8px; }
  .pps-flag { font-size: 18px; }
  .icon-btn { width: 30px; height: 30px; }
}

/* ===================================================================
 * mobile polish v3.1 — finer adjustments + missing surfaces
 * ================================================================== */
@media (max-width: 760px) {
  /* World map: fill viewport, no overflow */
  .map-stage { min-height: 100dvh; }
  body, html { overscroll-behavior: none; }

  /* Intro screen — denser starter grid, max 2 columns on phone */
  .intro { padding: 18px 14px; }
  .intro-inner { padding: 0; max-width: 100%; }
  .intro-mark { font-size: 44px; }
  .intro-kr { font-size: 12px; }
  .intro-tag { font-size: 12px; margin-bottom: 18px; }
  .intro-section-title { font-size: 11px; margin: 14px 0 8px; }
  .intro-starter-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 14px;
  }
  .starter-card { padding: 10px 6px 8px; border-radius: 10px; }
  .starter-card .sc-flag { font-size: 22px; }
  .starter-card .sc-name { font-size: 13px; }
  .starter-card .sc-tag { font-size: 8px; }
  .intro-rules { grid-template-columns: 1fr 1fr; gap: 6px 10px; font-size: 11px; }
  .intro-cta { min-height: 48px; font-size: 14px; padding: 12px 18px; border-radius: 14px; margin-top: 14px; }
  .intro-skip { font-size: 11px; margin-top: 10px; }

  /* Travel overlay during flight — fit on phone with no overflow */
  .travel-overlay .travel-card.v2 {
    min-width: 0;
    max-width: 96vw;
    padding: 12px 14px 10px;
    margin: 12px auto;
  }
  .travel-card.v2 .tv-header { margin-bottom: 8px; padding-bottom: 6px; }
  .travel-card.v2 .tv-tag { font-size: 9px; letter-spacing: 0.18em; }
  .travel-card.v2 .tv-class { font-size: 8px; }
  .travel-card.v2 .tv-route-row { gap: 10px; }
  .travel-card.v2 .tv-code { font-size: 18px; }
  .travel-card.v2 .tv-city { font-size: 11px; }
  .travel-card.v2 .tv-km { font-size: 10px; }
  .travel-card.v2 .tv-eta { font-size: 10px; }
  .travel-overlay .travel-skip-btn { font-size: 11px; padding: 6px 10px; margin-top: 8px; }

  /* Language picker — scrollable list on phone */
  .modal.lang-picker { max-height: 80vh; }
  .lang-picker .lang-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    max-height: 62vh;
    overflow-y: auto;
    padding: 4px 0;
  }
  .lang-picker .lang-opt {
    padding: 9px 10px;
    font-size: 13px;
    border-radius: 10px;
    min-height: 38px;
  }

  /* CityDeck arrows positioning */
  .city-deck-controls, .deck-controls {
    position: sticky; bottom: 0;
    padding: 10px 0 calc(10px + env(safe-area-inset-bottom));
  }

  /* CompanionPicker — 2 cols */
  .comp-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .comp-card { padding: 10px 8px; border-radius: 10px; }
  .comp-avatar { font-size: 22px; }
  .comp-name { font-size: 13px; }
  .comp-tag, .comp-style { font-size: 10px; }

  /* CompanionChatter floating bubble */
  .companion-chatter {
    bottom: calc(90px + env(safe-area-inset-bottom));
    max-width: 86vw;
    font-size: 12px;
    padding: 10px 12px;
    border-radius: 12px;
  }

  /* Reward popup — narrower */
  .reward-popup { padding: 18px 16px; max-width: 86vw; border-radius: 16px; }
  .rp-amount { font-size: 36px; }
  .rp-num { font-size: 36px; }
  .rp-claim-btn { font-size: 14px; padding: 10px 14px; min-height: 42px; border-radius: 12px; }

  /* OnlineFriendsBar */
  .online-friends-bar { padding: 6px 10px; gap: 6px; }
  .ofb-tag { font-size: 10px; }
  .ofb-friend { padding: 4px 8px; font-size: 11px; }
  .ofb-avatar { width: 22px; height: 22px; font-size: 11px; }

  /* Weather pill */
  .weather-pill { font-size: 11px; padding: 4px 8px; border-radius: 999px; gap: 4px; }
  .wp-icon { font-size: 13px; }
  .wp-temp { font-size: 12px; }

  /* Seasonal badge on city card */
  .seasonal-badge { padding: 4px 8px; font-size: 10px; border-radius: 999px; gap: 4px; }
  .sb-emoji { font-size: 12px; }

  /* Landmark list — denser */
  .landmark-list { gap: 6px; }
  .landmark { padding: 10px 12px; border-radius: 10px; }
  .landmark-name { font-size: 14px; }
  .landmark-zh { font-size: 11px; }
  .landmark-meta { font-size: 10px; }

  /* MediaCard inner — smaller */
  .media-card { padding: 10px 12px; border-radius: 10px; }
  .media-card .media-title { font-size: 13px; }
  .media-card .media-credit { font-size: 11px; }
  .media-card .media-type-tag { font-size: 9px; padding: 2px 6px; min-width: 38px; }
  .media-card .media-year { font-size: 10px; }
  .media-link-arrow, .media-link-btn { font-size: 14px; }

  /* Book quote panel — phone */
  .book-quote { padding: 10px 12px; font-size: 12px; line-height: 1.5; border-radius: 10px; }
  .book-quote .qmark { font-size: 16px; }

  /* SongPreview — phone */
  .song-preview { padding: 10px 12px; }
  .yt-cover { padding: 10px; gap: 10px; }
  .yt-cover-title { font-size: 13px; }
  .yt-cover-credit { font-size: 10px; }
  .song-note { font-size: 11px; }

  /* DiarySubtabs */
  .diary-subtabs { gap: 4px; padding: 6px 0 8px; }

  /* DepartConfirm friend invite chips smaller */
  .dc-invite { padding: 8px 0; }
  .dc-invite-tag { font-size: 10px; }
  .dc-invite-pill { padding: 4px 8px; font-size: 11px; gap: 4px; }
  .dcip-avatar { width: 18px; height: 18px; font-size: 9px; }

  /* DomesticTravelBar */
  .domestic-bar { padding: 8px 10px; gap: 6px; border-radius: 10px; }
  .db-from { font-size: 11px; }
  .db-transports { gap: 4px; flex-wrap: wrap; }
  .db-classes { gap: 4px; flex-wrap: wrap; }
  .db-depart { min-height: 44px; padding: 8px 14px; border-radius: 12px; font-size: 13px; }
  .dbd-label { font-size: 13px; }
  .dbd-cost { font-size: 11px; opacity: 0.85; }
  .dbd-pet { font-size: 10px; }

  /* ClassPicker bar */
  .class-picker { padding: 6px 8px; gap: 4px; max-width: 92vw; }
  .cp-label { font-size: 10px; }
  .cp-pill { padding: 4px 10px; font-size: 11px; min-height: 28px; }
  .cp-name { font-size: 11px; }
  .cp-hint { font-size: 9px; }
}

/* Very narrow phones */
@media (max-width: 380px) {
  .intro-starter-grid { grid-template-columns: 1fr 1fr; }
  .starter-card .sc-flag { font-size: 20px; }
  .lang-picker .lang-list { grid-template-columns: 1fr; }
  .comp-grid { grid-template-columns: 1fr; }
  .travel-card.v2 .tv-code { font-size: 16px; }
  .travel-card.v2 .tv-city { font-size: 10px; }
  .intro-rules { grid-template-columns: 1fr; }
}

/* ===================================================================
 * world map on phone — big & pannable
 * map-scroll is a horizontally + vertically scrollable wrapper;
 * map-stage inside is bigger than viewport so user drags to pan.
 * ================================================================== */
.map-scroll {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.map-scroll .map-stage {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
}

@media (max-width: 760px) {
  /* outer wrapper handles touch scroll; inner stage is the big map */
  .map-scroll {
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    scroll-behavior: smooth;
    /* hide scrollbars (still pannable by touch) */
    scrollbar-width: none;
  }
  .map-scroll::-webkit-scrollbar { display: none; }

  /* map fills available vertical space; width derived from height so the
     16:11 ratio is preserved and the map is wider than viewport (user pans
     horizontally with finger). No empty space below the map.            */
  .map-scroll .map-stage {
    position: relative;
    top: auto; left: auto;
    height: 100%;
    min-height: 100%;
    width: auto;
    aspect-ratio: 16 / 11;
    /* fallback for browsers without aspect-ratio */
    min-width: 160vw;
  }
  /* hide horizontal scrollbar artifacts on the inner SVG */
  .map-scroll .map-svg { overflow: visible; }
}

/* ===================================================================
 * landscape mode on phone — wider map, slimmer top bar
 * ================================================================== */
@media (max-width: 932px) and (orientation: landscape) {
  /* slim top bar to give map more vertical space */
  .topbar {
    height: auto;
    padding: 6px 12px env(safe-area-inset-bottom, 6px);
    gap: 4px;
    flex-wrap: nowrap;
  }
  .topbar .brand { font-size: 14px; }
  .topbar-right {
    flex: 0 0 auto;
    overflow-x: visible;
    width: auto;
    gap: 5px;
    padding: 0;
  }
  .topbar-stat { padding: 3px 8px; min-height: 24px; font-size: 10px; }
  .icon-btn { width: 30px; height: 30px; min-width: 30px; min-height: 30px; }
  .auth-pill { min-height: 26px; padding: 3px 8px; font-size: 11px; }
  .auth-pill .ap-name { max-width: 80px; }

  /* map: landscape ratio (closer to 16:9), still bigger than viewport */
  .map-scroll .map-stage {
    width: 140vw;
    height: 90vw;     /* ~16:10 */
    min-height: 90vw;
    max-height: 100vh;
  }

  /* city panel: drawer from right rather than full-screen */
  .city-panel {
    width: 56vw !important;
    max-width: 460px !important;
    height: auto;
    max-height: calc(100vh - 80px) !important;
    position: fixed !important;
    top: 60px !important;
    right: 14px !important;
    left: auto !important;
    margin: 0;
    overflow-y: auto !important;
  }
  .panel-content { overflow: visible !important; }

  /* transport bar: keep at bottom but narrower */
  .transport-bar { padding: 4px 8px; gap: 4px; }
  .transport-option {
    flex: 1 1 calc(25% - 4px) !important;
    padding: 4px 6px;
  }
  .transport-option .transport-icon { width: 16px; height: 16px; }
  .transport-option .transport-name { font-size: 10px; }
  .transport-option .transport-meta { font-size: 9px; }

  /* depart-btn: short button right-edge in landscape */
  .depart-btn {
    left: auto !important;
    right: 14px !important;
    bottom: calc(60px + env(safe-area-inset-bottom)) !important;
    width: 220px !important;
    min-height: 44px;
    padding: 8px 16px;
    font-size: 13px;
  }

  /* modals: max-width to look good on landscape phone */
  .modal { max-width: 86vw !important; max-height: 86vh; }
  .city-card { width: 60vw; max-width: 480px; }

  /* travel overlay: compact horizontal layout */
  .travel-overlay .travel-card.v2 { max-width: 78vw; }
  .cabin { height: min(70vh, 320px); width: 90vw; }
}

/* very narrow landscape (iPhone SE etc) */
@media (max-height: 480px) and (orientation: landscape) {
  .topbar .brand-kr { display: none; }
  .city-panel { top: 50px !important; max-height: calc(100vh - 60px) !important; }
  .map-scroll .map-stage { height: 80vw; }
}

/* ===================================================================
 * RESPONSIVE LAYOUT — fluid type scale + 5 breakpoint tiers
 * Tiers: phone (≤480) · phone-l (≤760) · tablet (≤1024) ·
 *        laptop (≤1440) · desktop (>1440)
 * ================================================================== */

/* ------- fluid type scale (uses clamp so it lerps between sizes) --- */
:root {
  /* type tokens — auto-scale from phone to desktop */
  --ft-xs:   clamp(10px, 0.7vw + 8px, 12px);
  --ft-sm:   clamp(11px, 0.8vw + 9px, 13px);
  --ft-base: clamp(13px, 1.0vw + 11px, 15px);
  --ft-md:   clamp(14px, 1.1vw + 12px, 16px);
  --ft-lg:   clamp(15px, 1.3vw + 13px, 18px);
  --ft-xl:   clamp(17px, 1.8vw + 14px, 22px);
  --ft-2xl:  clamp(20px, 2.4vw + 16px, 28px);
  --ft-3xl:  clamp(24px, 3vw + 18px, 36px);

  /* spacing tokens */
  --sp-1: clamp(4px,  0.5vw + 3px, 6px);
  --sp-2: clamp(6px,  0.8vw + 4px, 10px);
  --sp-3: clamp(10px, 1.2vw + 6px, 14px);
  --sp-4: clamp(14px, 1.6vw + 8px, 20px);
  --sp-5: clamp(18px, 2vw + 10px,  28px);

  /* radii */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 22px;
}

/* ------- TABLET (portrait & small landscape) 761px–1024px ---------- */
@media (min-width: 761px) and (max-width: 1024px) {
  /* slightly larger map cards, side-by-side city panel */
  .city-panel {
    width: 360px;
    top: 76px;
    right: 16px;
    max-height: calc(100vh - 100px);
  }
  .modal { max-width: 640px; max-height: 86vh; }
  .city-card { width: 480px; }
  .country-overlay .country-stage { padding: 20px; }
  .country-body { flex-direction: row; gap: 16px; }
  .country-map-wrap { flex: 1 1 50%; height: auto; aspect-ratio: 16/11; }

  /* topbar size */
  .topbar { padding: 12px 24px; height: auto; min-height: 60px; }
  .topbar-stat { padding: 6px 12px; font-size: 12px; }
  .icon-btn { width: 36px; height: 36px; }

  /* transport bar — single row */
  .transport-bar {
    bottom: 16px;
    left: 50%; right: auto;
    transform: translateX(-50%);
    max-width: 560px;
    flex-wrap: nowrap;
  }
  .transport-option { flex: 1 1 0; padding: 10px 8px; min-width: 100px; }

  /* map: full screen on tablet, not pannable */
  .map-scroll { overflow: hidden; }
  .map-scroll .map-stage {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    min-height: 0;
  }

  /* fonts use the fluid token */
  body { font-size: var(--ft-base); }
  .modal-title { font-size: var(--ft-lg); }
  .panel-title, .cc-name, .ch-title, .df-title { font-size: var(--ft-2xl); }
  .btn { min-height: 44px; padding: 11px 18px; font-size: var(--ft-md); }

  /* grids tuned for tablet */
  .pp-grid { grid-template-columns: repeat(6, 1fr); }
  .ach-grid { grid-template-columns: repeat(3, 1fr); }
  .album-grid { grid-template-columns: repeat(3, 1fr); }
  .intro-starter-grid { grid-template-columns: repeat(4, 1fr); }
  .lang-picker .lang-list { grid-template-columns: repeat(3, 1fr); max-height: 60vh; }
  .comp-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ------- LAPTOP 1025px–1440px ------------------------------------- */
@media (min-width: 1025px) and (max-width: 1440px) {
  .modal { max-width: 720px; }
  .city-panel { width: 380px; }
  .city-card { width: 520px; }
  .pp-grid { grid-template-columns: repeat(7, 1fr); }
  .lang-picker .lang-list { grid-template-columns: repeat(4, 1fr); }
  body { font-size: 14px; }
}

/* ------- DESKTOP > 1440px ----------------------------------------- */
@media (min-width: 1441px) {
  .modal { max-width: 820px; }
  .city-panel { width: 420px; }
  .city-card { width: 560px; }
  .country-overlay .country-stage { padding: 28px; }
  .pp-grid { grid-template-columns: repeat(8, 1fr); }
  .ach-grid { grid-template-columns: repeat(4, 1fr); }
  .lang-picker .lang-list { grid-template-columns: repeat(5, 1fr); }
  .intro-starter-grid { grid-template-columns: repeat(8, 1fr); }
}

/* ------- ULTRA-WIDE > 1920 ---------------------------------------- */
@media (min-width: 1921px) {
  body { max-width: 1920px; margin: 0 auto; }
  .topbar, .map-scroll, .transport-bar { max-width: 1920px; }
}

/* ------- iPad portrait specifically (768×1024) --------------------- */
@media (min-width: 768px) and (max-width: 834px) and (orientation: portrait) {
  .city-panel {
    width: 92vw;
    max-width: 460px;
    position: fixed;
    top: 70px;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    max-height: 70vh;
  }
}

/* ------- big phones (e.g. iPhone 15 Pro Max 428px) ----------------- */
@media (min-width: 380px) and (max-width: 480px) {
  /* a touch more breathing room */
  :root { --card-w: 94vw; }
  body { font-size: 14.5px; }
  .modal-title { font-size: 16px; }
  .panel-title, .cc-name, .ch-title, .df-title { font-size: 19px; }
}

/* ------- ultra narrow (foldables closed, very old phones) ---------- */
@media (max-width: 320px) {
  body { font-size: 12.5px; }
  .modal-title { font-size: 13px; }
  .panel-title, .cc-name, .ch-title, .df-title { font-size: 15px; }
  .btn { font-size: 11px; min-height: 34px; padding: 7px 10px; }
  .topbar .brand { font-size: 12px; }
  .icon-btn { width: 28px; height: 28px; min-width: 28px; min-height: 28px; }
  .intro-starter-grid { grid-template-columns: 1fr; }
  .pp-grid { grid-template-columns: repeat(3, 1fr); }
  .ach-grid { grid-template-columns: 1fr; }
}

/* ------- print (keep ticket / passport print as-is) ---------------- */
@media print {
  .topbar, .transport-bar, .depart-btn, .map-scroll { display: none !important; }
  body { background: white; }
}

/* ===================================================================
 * RESPONSIVE POLISH v2 — last-mile refinements
 *   • touch vs hover detection (no hover lift on touch screens)
 *   • landscape notch safe-areas (left/right)
 *   • prefers-reduced-motion (a11y)
 *   • prefers-color-scheme: dark (subtle adaptation)
 *   • keyboard focus rings
 *   • iOS viewport (100vh → 100dvh) fix
 *   • input/keyboard handling (don't zoom on focus)
 *   • PWA standalone refinement
 * ================================================================== */

/* --- 100dvh fix: iOS Safari shrinks 100vh when address bar shows --- */
@supports (height: 100dvh) {
  body, html { min-height: 100dvh; }
  .map-stage, .map-scroll { min-height: 100dvh; }
}

/* --- touch vs hover : disable hover-translate on touch devices ----- */
@media (hover: none) {
  .starter-card:hover, .city-card:hover, .ach-item:hover,
  .pp-stamp:hover, .friend-row:hover, .media-card:hover,
  .icon-btn:hover, .btn:hover {
    transform: none !important;
    box-shadow: initial;
  }
}

/* hover devices get a subtle lift */
@media (hover: hover) and (pointer: fine) {
  .btn:hover { filter: brightness(1.04); }
  .icon-btn:hover { background: white; transform: translateY(-1px); }
  .starter-card:hover, .ach-item:hover { transform: translateY(-2px); }
}

/* --- prefers-reduced-motion : honor a11y preference --------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .cabin-anim-float, .cabin-anim-turb, .cabin-anim-bumpy,
  .cabin-anim-glide, .cabin-anim-glide-fast { animation: none !important; }
}

/* Dark mode disabled — Pathfinder locks the hanok-cream palette in all environments.
   color-scheme: light declared in :root so form controls + scrollbars also stay light. */

/* --- keyboard focus rings (accessibility) -------------------------- */
:focus-visible {
  outline: 2px solid var(--coral, #d4775c);
  outline-offset: 2px;
  border-radius: 6px;
}
button:focus { outline: none; }
button:focus-visible {
  outline: 2px solid var(--coral, #d4775c);
  outline-offset: 2px;
}

/* --- prevent iOS auto-zoom on input focus (16px+ font) ------------- */
input, textarea, select { font-size: max(16px, var(--ft-base, 14px)); }

/* --- landscape notch safe-areas (iPhone notch on left/right) ------- */
@media (orientation: landscape) {
  @supports (padding: env(safe-area-inset-left)) {
    .topbar       { padding-left:  calc(14px + env(safe-area-inset-left));
                    padding-right: calc(14px + env(safe-area-inset-right)); }
    .transport-bar{ padding-left:  calc(12px + env(safe-area-inset-left));
                    padding-right: calc(12px + env(safe-area-inset-right)); }
    .map-scroll   { padding-left:  env(safe-area-inset-left);
                    padding-right: env(safe-area-inset-right); }
    .depart-btn   { right: calc(14px + env(safe-area-inset-right)) !important; }
  }
}

/* --- PWA standalone mode (added to home screen) -------------------- */
@media (display-mode: standalone) {
  /* push topbar below status bar already done elsewhere via env() */
  body { user-select: none; -webkit-user-select: none; }
  /* keep text selectable in inputs and content */
  input, textarea, .media-credit, .cc-brief, .book-quote, .df-body, .de-body,
  .mb-content, .panel-subtitle, .landmark-name, .landmark-zh, .ach-desc {
    user-select: auto; -webkit-user-select: auto;
  }
}

/* --- smooth orientation change transitions ------------------------- */
.topbar, .transport-bar, .city-panel, .modal, .map-stage, .map-scroll,
.depart-btn, .city-card, .country-stage {
  transition: width 0.25s ease, height 0.25s ease,
              max-width 0.25s ease, padding 0.2s ease,
              border-radius 0.2s ease, transform 0.2s ease;
}
@media (prefers-reduced-motion: reduce) {
  .topbar, .transport-bar, .city-panel, .modal, .map-stage, .map-scroll,
  .depart-btn, .city-card, .country-stage { transition: none !important; }
}

/* --- foldable phones (Surface Duo / Galaxy Z Fold) ---------------- */
@media (horizontal-viewport-segments: 2) {
  /* place content on left segment, leave right for chrome / multitask */
  .map-scroll { padding-right: env(viewport-segment-right 0 0); }
  .modal { left: calc(50% - env(viewport-segment-right 0 0) / 2) !important; }
}

/* --- high-dpi sharpness for borders -------------------------------- */
@media (min-resolution: 2dppx), (-webkit-min-device-pixel-ratio: 2) {
  .hairline-divider,
  .modal-summary, .modal-head, .modal-actions { border-width: 0.5px; }
}

/* --- mobile keyboard up: prevent depart-btn covering input ---------- */
@media (max-width: 760px) {
  body.input-focused .depart-btn { display: none; }
}

/* --- container-query opt-ins for components that adapt to their box - */
@supports (container-type: inline-size) {
  .city-panel { container-type: inline-size; }
  /* if panel is narrower than 320, even tighter inner spacing */
  @container (max-width: 320px) {
    .panel-header { padding: 10px 12px 8px; }
    .panel-title { font-size: 16px; }
    .landmark { padding: 8px 10px; }
  }
}

/* --- avoid horizontal scroll on body  ------------------------------ */
html, body {
  max-width: 100%;
  overflow-x: hidden;
}
/* but allow .map-scroll itself to scroll */
.map-scroll { overflow-x: auto; }
@media (min-width: 761px) {
  .map-scroll { overflow: hidden; }
}

/* ===================================================================
 * Mobile portrait: fix banners covering buttons
 * The two-row TopBar on phone is ~96px tall.
 * Push absolute-positioned banners (hint, online-friends) below it.
 * ================================================================== */
@media (max-width: 760px) and (orientation: portrait) {
  /* online friends bar — sits right under the 2-row topbar */
  .online-friends-bar {
    top: calc(96px + env(safe-area-inset-top, 0px)) !important;
    right: 12px !important;
    max-width: calc(100vw - 24px);
  }

  /* hint banner — same: just under topbar, centered, full width minus 12 */
  .hint {
    top: calc(102px + env(safe-area-inset-top, 0px)) !important;
    left: 12px !important;
    right: 12px !important;
    transform: none !important;
    max-width: calc(100vw - 24px);
    padding: 8px 14px;
    font-size: 12px;
  }

  /* map-scroll should sit below topbar (not behind) so its content doesn't
     get hidden by the icon row */
  .map-scroll {
    top: calc(96px + env(safe-area-inset-top, 0px)) !important;
    bottom: 0 !important;
    inset: calc(96px + env(safe-area-inset-top, 0px)) 0 0 0 !important;
  }
  .map-scroll .map-stage { padding-top: 6px; }

  /* if the OnlineFriendsBar is present AND HintBanner is present they
     would stack — make hint give priority and online bar slide down. */
  body:has(.hint) .online-friends-bar { top: calc(150px + env(safe-area-inset-top, 0px)) !important; }

  /* transport bar at bottom — ensure depart-btn doesn't cover its labels */
  .transport-bar {
    bottom: 0;
    padding-bottom: calc(8px + env(safe-area-inset-bottom)) !important;
  }
  /* depart-btn sits ABOVE the transport-bar, not on top of it */
  .depart-btn {
    bottom: calc(76px + env(safe-area-inset-bottom)) !important;
  }
}

/* same fix for tall phones in portrait */
@media (max-width: 480px) and (orientation: portrait) {
  .hint { top: calc(98px + env(safe-area-inset-top, 0px)) !important; font-size: 11px; }
  .online-friends-bar { top: calc(96px + env(safe-area-inset-top, 0px)) !important; }
}

/* ===================================================================
 * Mobile portrait: anchor the bottom area so it's not blank
 *  · transport-bar gets a frosted panel look
 *  · subtle gradient from map → transport bar
 * ================================================================== */
@media (max-width: 760px) and (orientation: portrait) {
  /* frosted glass transport bar — clearly defined zone at the bottom */
  .transport-bar {
    background: rgba(245, 239, 226, 0.94);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    backdrop-filter: saturate(180%) blur(14px);
    border-top: 0.5px solid rgba(43, 37, 31, 0.10);
    box-shadow: 0 -8px 24px rgba(43, 37, 31, 0.05);
    padding: 10px 10px calc(10px + env(safe-area-inset-bottom)) !important;
    border-radius: 0;
  }
  .transport-option {
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.50);
  }
  .transport-option.active {
    background: var(--ink);
    color: var(--paper);
  }
  .transport-option.disabled {
    opacity: 0.4;
  }

  /* fade map → transport bar with a soft scrim so the world atlas
     blends gracefully into the bottom UI                          */
  .map-scroll::after {
    content: '';
    position: absolute;
    left: 0; right: 0;
    bottom: 0;
    height: 88px;
    pointer-events: none;
    background: linear-gradient(180deg,
                  transparent 0%,
                  rgba(245, 239, 226, 0.35) 70%,
                  rgba(245, 239, 226, 0.60) 100%);
    z-index: 4;
  }
}

/* ===================================================================
 * mobile city-card overflow fix — desktop untouched
 * ================================================================== */
@media (max-width: 760px) {
  /* every child of city-card constrained to its container */
  .city-card * { box-sizing: border-box; max-width: 100%; }
  .city-card .cc-hero,
  .city-card .cc-content { width: 100%; max-width: 100%; }
  /* prevent horizontal overflow from any inner element */
  .city-card .media-card,
  .city-card .landmark,
  .city-card .job-board,
  .city-card .message-board,
  .city-card .domestic-bar { max-width: 100%; min-width: 0; }
  /* hero watermark letter can be huge — clip it */
  .city-card .cc-hero-watermark { max-width: 100%; overflow: hidden; }
  /* country panel: side padding small so card has room */
  .country-panel { padding: 6px 4px !important; overflow-x: hidden !important; }
  .country-body { overflow-x: hidden; }
}

/* ===================================================================
 * arrival popup — fired when a journey lands
 * ================================================================== */
.modal.arrival-popup {
  max-width: 380px;
  width: 92vw;
  padding: 28px 24px 22px;
  text-align: center;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255,250,242,1) 0%, rgba(245,239,226,1) 100%);
  box-shadow: 0 24px 60px rgba(43,37,31,0.18);
  animation: arrivalIn 0.45s cubic-bezier(0.22, 0.85, 0.28, 1);
}
@keyframes arrivalIn {
  from { opacity: 0; transform: translateY(20px) scale(0.92); }
  to   { opacity: 1; transform: translateY(0)    scale(1); }
}
.arrival-popup .ap-flag {
  font-size: 60px;
  line-height: 1;
  margin-bottom: 10px;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.10));
}
.arrival-popup .ap-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--coral);
  font-weight: 700;
  margin-bottom: 8px;
}
.arrival-popup .ap-city {
  font-family: 'Noto Serif KR', serif;
  font-size: 32px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
  margin-bottom: 6px;
}
.arrival-popup .ap-sub {
  font-size: 13px;
  color: var(--ink-3);
  margin-bottom: 18px;
}
.arrival-popup .ap-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.06em;
  margin-bottom: 20px;
  padding: 12px 0;
  border-top: 0.5px solid rgba(43,37,31,0.10);
  border-bottom: 0.5px solid rgba(43,37,31,0.10);
}
.arrival-popup .ap-cta {
  width: 100%;
  min-height: 48px;
  border-radius: 14px;
  font-size: 15px;
}

@media (max-width: 480px) {
  .modal.arrival-popup { max-width: 92vw; padding: 24px 20px 18px; }
  .arrival-popup .ap-flag { font-size: 48px; }
  .arrival-popup .ap-city { font-size: 26px; }
}

/* ===================================================================
 * Job tiers + progress (Standard / Express / Instant)
 * ================================================================== */
.jc-tier-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-left: 6px;
}
.jc-tier {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  padding: 6px 10px;
  background: var(--paper-3);
  border: 0.5px solid rgba(43,37,31,0.10);
  border-radius: 8px;
  color: var(--ink-2);
  cursor: pointer;
  text-align: center;
  letter-spacing: 0.04em;
  line-height: 1.25;
  min-width: 96px;
  transition: all 0.15s ease;
}
.jc-tier:disabled { opacity: 0.4; cursor: not-allowed; }
.jc-tier:hover:not(:disabled) { background: rgba(255,255,255,0.7); border-color: rgba(43,37,31,0.25); }
.jc-tier .jct-meta { font-size: 9px; color: var(--ink-3); }
.jc-tier.mid  { color: var(--gold); border-color: rgba(184,146,76,0.40); }
.jc-tier.fast { color: var(--coral); border-color: rgba(212,119,92,0.50); background: rgba(212,119,92,0.06); }
.jc-tier.fast:hover:not(:disabled) { background: rgba(212,119,92,0.12); }

.jc-progress {
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.jc-bar {
  flex: 1;
  height: 4px;
  background: rgba(43,37,31,0.10);
  border-radius: 999px;
  overflow: hidden;
}
.jc-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--sage), var(--coral));
  transition: width 0.2s ease-out;
}
.jc-remain {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--ink-3);
  letter-spacing: 0.06em;
}
.jc-cancel {
  width: 28px; height: 28px;
  border: 0.5px solid rgba(43,37,31,0.15);
  border-radius: 50%;
  background: var(--paper-3);
  color: var(--ink-3);
  font-size: 16px;
  cursor: pointer;
}
.jc-done-mark {
  font-size: 20px;
  color: var(--sage);
  padding: 0 10px;
}

@media (max-width: 760px) {
  .jc-tier-row { flex-direction: row; flex-wrap: wrap; margin-left: 0; margin-top: 6px; gap: 4px; }
  .jc-tier { min-width: 0; flex: 1 1 calc(33% - 4px); font-size: 9px; padding: 5px 6px; }
  .jc-tier .jct-meta { font-size: 8px; }
  .job-card { flex-wrap: wrap; }
  .jc-info { flex: 1 1 100%; min-width: 0; }
  .jc-pay { flex: 0 0 auto; align-self: flex-start; }
}

/* depart-label — the main text segment of depart-btn */
.depart-btn .depart-label {
  display: inline-block;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
@media (max-width: 760px) {
  .depart-btn .depart-label { font-size: 14px; }
}

/* ===================================================================
 * Language Picker v2 — Korean-aesthetic (hanok-inspired)
 * Warm paper, serif typography, subtle dot motif, hairline borders
 * ================================================================== */
.modal.lang-picker-v2 {
  width: 420px;
  max-width: 92vw;
  padding: 0;
  border-radius: 20px;
  background: linear-gradient(180deg, #fefaf3 0%, #f7f0e1 100%);
  box-shadow: 0 30px 80px rgba(43, 37, 31, 0.20), 0 1px 0 rgba(255,255,255,0.6) inset;
  overflow: hidden;
  position: relative;
}

/* hanok ornament — three soft circles + hairline */
.lp-ornament {
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 0 4px;
  border-bottom: 0.5px solid rgba(108, 90, 70, 0.18);
  position: relative;
}
.lp-ornament::before,
.lp-ornament::after {
  content: '';
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--coral);
  opacity: 0.8;
}
.lp-ornament::before { box-shadow: 8px 0 var(--coral), 16px 0 var(--gold), 24px 0 var(--sage); }
.lp-ornament::after  { box-shadow: -8px 0 var(--coral), -16px 0 var(--gold), -24px 0 var(--sage); }
.lp-ornament.bottom {
  border-bottom: none;
  border-top: 0.5px solid rgba(108, 90, 70, 0.18);
  padding: 4px 0 8px;
}

/* header */
.lp-head {
  padding: 14px 22px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.lp-title {
  font-family: 'Noto Serif KR', 'Noto Serif', serif;
  font-size: 18px;
  color: var(--ink);
  font-weight: 600;
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.lp-title-en {
  letter-spacing: 0.04em;
}
.lp-title-mark {
  font-size: 12px;
  color: var(--coral);
  opacity: 0.7;
}
.lp-title-native {
  font-size: 14px;
  color: var(--ink-2);
  font-weight: 500;
  font-style: italic;
}
.lp-close {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: transparent;
  border: 0.5px solid rgba(108, 90, 70, 0.20);
  color: var(--ink-3);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
}
.lp-close:hover { background: rgba(108, 90, 70, 0.08); color: var(--ink); }

/* popular row — horizontal, scroll on narrow */
.lp-popular-row {
  padding: 0 22px 12px;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}
.lp-popular-row::-webkit-scrollbar { display: none; }
.lp-chip {
  flex: 0 0 auto;
  padding: 8px 14px;
  border-radius: 100px;
  border: 0.5px solid rgba(108, 90, 70, 0.22);
  background: rgba(255, 255, 255, 0.65);
  font-family: 'Noto Serif KR', serif;
  font-size: 13px;
  color: var(--ink);
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
}
.lp-chip:hover {
  background: white;
  border-color: rgba(212, 119, 92, 0.40);
  transform: translateY(-1px);
}
.lp-chip.active {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
  box-shadow: 0 2px 8px rgba(43, 37, 31, 0.18);
}
.lp-chip-name {
  font-family: 'Noto Serif KR', sans-serif;
}

/* divider with traditional motif (◇) */
.lp-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 22px 6px;
  font-family: 'Noto Serif KR', serif;
  font-size: 11px;
  color: var(--ink-3);
}
.lp-divider::before,
.lp-divider::after {
  content: '';
  flex: 1;
  height: 0.5px;
  background: rgba(108, 90, 70, 0.18);
}
.lp-divider-dot {
  font-size: 12px;
  color: var(--coral);
  opacity: 0.8;
}

/* search */
.lp-search-row { padding: 0 22px 10px; }
.lp-search {
  width: 100%;
  padding: 9px 12px;
  background: rgba(255, 255, 255, 0.7);
  border: 0.5px solid rgba(108, 90, 70, 0.22);
  border-radius: 10px;
  font-family: 'Noto Serif KR', serif;
  font-size: 13px;
  color: var(--ink);
  outline: none;
  transition: border-color 0.15s;
}
.lp-search:focus { border-color: var(--coral); background: white; }
.lp-search::placeholder { color: var(--ink-3); font-style: italic; }

/* full list — scroll */
.lp-list {
  max-height: 320px;
  overflow-y: auto;
  padding: 4px 14px 14px;
  scrollbar-width: thin;
  scrollbar-color: rgba(108, 90, 70, 0.30) transparent;
}
.lp-list::-webkit-scrollbar { width: 6px; }
.lp-list::-webkit-scrollbar-thumb { background: rgba(108, 90, 70, 0.25); border-radius: 4px; }

.lp-row {
  width: 100%;
  padding: 9px 12px;
  background: transparent;
  border: none;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Noto Serif KR', serif;
  font-size: 13px;
  color: var(--ink-2);
  cursor: pointer;
  text-align: left;
  transition: background 0.12s;
}
.lp-row:hover { background: rgba(108, 90, 70, 0.06); color: var(--ink); }
.lp-row.active { background: rgba(212, 119, 92, 0.10); color: var(--ink); }
.lp-row-code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.10em;
  color: var(--ink-3);
  min-width: 28px;
}
.lp-row.active .lp-row-code { color: var(--coral); font-weight: 600; }
.lp-row-name {
  flex: 1;
}
.lp-row-check {
  color: var(--coral);
  font-size: 14px;
  font-weight: 600;
}
.lp-empty {
  text-align: center;
  padding: 18px 0;
  color: var(--ink-3);
  font-family: 'Noto Serif KR', serif;
  font-size: 13px;
}

/* mobile portrait */
@media (max-width: 480px) {
  .modal.lang-picker-v2 { width: 92vw; border-radius: 16px; }
  .lp-head { padding: 12px 18px 10px; }
  .lp-title { font-size: 16px; }
  .lp-title-native { font-size: 12px; }
  .lp-popular-row { padding: 0 18px 10px; }
  .lp-chip { padding: 6px 12px; font-size: 12px; }
  .lp-search-row { padding: 0 18px 8px; }
  .lp-list { max-height: 50vh; padding: 4px 12px 12px; }
  .lp-row { padding: 9px 10px; font-size: 13px; }
}

/* ===================================================================
 * Claim Funds Modal — one-time starting capital popup
 * Korean-aesthetic: warm paper, hanok dot ornaments, big serif amount
 * ================================================================== */
.modal.claim-funds-modal {
  width: 380px;
  max-width: 92vw;
  padding: 0 28px 26px;
  text-align: center;
  border-radius: 22px;
  background: linear-gradient(180deg, #fefaf3 0%, #f7f0e1 100%);
  box-shadow: 0 30px 80px rgba(43, 37, 31, 0.22);
  position: relative;
  animation: cfIn 0.55s cubic-bezier(0.22, 0.85, 0.28, 1);
  overflow: hidden;
}
@keyframes cfIn {
  from { opacity: 0; transform: translateY(20px) scale(0.92); }
  to   { opacity: 1; transform: translateY(0)    scale(1); }
}
.modal.claim-funds-modal.claimed {
  transform: scale(0.98);
  opacity: 0.85;
  transition: all 0.3s ease;
}
.cf-ornament {
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin: 0 -28px;
}
.cf-ornament::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--coral);
  box-shadow:
    -14px 0 var(--gold), 14px 0 var(--gold),
    -28px 0 var(--sage), 28px 0 var(--sage);
  opacity: 0.85;
}
.cf-ornament.bottom { margin-top: 18px; margin-bottom: -10px; }
.cf-icon {
  font-size: 32px;
  color: var(--coral);
  margin: 4px 0 6px;
  animation: cfPlane 3s ease-in-out infinite;
}
@keyframes cfPlane {
  0%,100% { transform: translateX(0) rotate(-12deg); }
  50%     { transform: translateX(8px) rotate(-6deg); }
}
.cf-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 8px;
}
.cf-title {
  font-family: 'Noto Serif KR', 'Noto Serif', serif;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
  line-height: 1.3;
  margin-bottom: 20px;
}
.cf-amount {
  font-family: 'Noto Serif KR', serif;
  font-weight: 800;
  color: var(--ink);
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
  margin-bottom: 12px;
}
.cf-currency {
  font-size: 24px;
  color: var(--coral);
  font-weight: 600;
}
.cf-num {
  font-size: 56px;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--coral), var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.cf-tip {
  font-size: 12px;
  color: var(--ink-3);
  margin-bottom: 22px;
  font-style: italic;
}
.cf-btn {
  width: 100%;
  min-height: 52px;
  padding: 14px 22px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--coral), #c66247);
  color: white;
  font-family: 'Noto Serif KR', serif;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(212,119,92,0.36);
  transition: all 0.2s ease;
}
.cf-btn:hover { transform: translateY(-1px); box-shadow: 0 12px 30px rgba(212,119,92,0.45); }
.cf-btn:active { transform: translateY(0); }
.cf-btn.going { background: linear-gradient(135deg, var(--sage), #6a7d5e); transform: scale(1.04); }
.cf-btn:disabled { cursor: not-allowed; opacity: 0.85; }

@media (max-width: 480px) {
  .modal.claim-funds-modal { width: 92vw; padding: 0 20px 22px; }
  .cf-title { font-size: 18px; }
  .cf-num { font-size: 48px; }
  .cf-currency { font-size: 20px; }
}

/* ===================================================================
 * Paywall · $9.99 one-time unlock
 * ================================================================== */
.paywall-overlay { align-items: center; justify-content: center; }
.modal.paywall-modal {
  width: 92vw; max-width: 420px;
  padding: 22px 22px 18px;
  background: linear-gradient(180deg, #fbf7ed 0%, #f5efe2 100%);
  border: 1px solid var(--hair);
  border-radius: 18px;
  display: flex; flex-direction: column; gap: 10px;
  box-shadow: 0 28px 70px rgba(43,37,31,0.22);
  position: relative;
}
.paywall-modal .modal-close {
  position: absolute;
  top: 10px; right: 12px;
  background: none; border: none;
  font-size: 24px; color: var(--ink-3);
  cursor: pointer;
  line-height: 1;
}
.pw-tag {
  font-family: 'JetBrains Mono', 'Noto Sans KR', monospace;
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--coral, #d4775c);
  font-weight: 700;
  margin-top: 4px;
}
.pw-title {
  font-family: 'Cormorant Garamond', 'Noto Serif KR', serif;
  font-size: 28px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.15;
}
.pw-sub {
  font-family: 'Noto Serif KR', serif;
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.5;
}
.pw-feats {
  margin: 6px 0 4px;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pw-feat {
  font-family: 'Noto Serif KR', serif;
  font-size: 13.5px;
  color: var(--ink-1);
  padding: 8px 12px;
  background: rgba(255,255,255,0.6);
  border-radius: 8px;
  border: 0.5px solid var(--hair);
}
.pw-price-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 10px 0 2px;
  padding: 12px 4px 4px;
  border-top: 0.5px dashed var(--hair);
}
.pw-price {
  font-family: 'Orbitron', 'JetBrains Mono', monospace;
  font-size: 32px;
  font-weight: 700;
  color: var(--ink);
}
.pw-price-note {
  font-family: 'JetBrains Mono', 'Noto Sans KR', monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.pw-buy {
  margin-top: 8px;
  padding: 14px;
  background: linear-gradient(135deg, var(--coral, #d4775c) 0%, #e89478 100%);
  color: white;
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: 999px;
  font-family: 'Noto Serif KR', serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  box-shadow: 0 6px 22px rgba(212,119,92,0.4);
  transition: transform 0.18s ease, filter 0.18s ease;
}
.pw-buy:hover { transform: translateY(-1px); filter: brightness(1.06); }
.pw-buy:active { transform: translateY(0); }
.pw-buy:disabled { cursor: not-allowed; opacity: 0.75; }
.pw-buy.busy { opacity: 0.7; }
.pw-buy.done { background: linear-gradient(135deg, var(--sage, #7a8d6b) 0%, #6a7d5e 100%); }
.pw-later {
  margin-top: 2px;
  padding: 10px;
  background: transparent;
  border: none;
  color: var(--ink-3);
  font-family: 'Noto Serif KR', serif;
  font-size: 13px;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: rgba(43,37,31,0.18);
  text-underline-offset: 3px;
}
.pw-later:hover { color: var(--ink-2); }
.pw-restore {
  margin-top: 2px;
  padding: 9px;
  background: transparent;
  border: 1px solid rgba(43,37,31,0.18);
  border-radius: 999px;
  color: var(--ink-2);
  font-family: 'Noto Serif KR', serif;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease;
}
.pw-restore:hover { background: rgba(212,119,92,0.08); border-color: var(--coral, #d4775c); color: var(--coral, #d4775c); }
.pw-restore:disabled { opacity: 0.55; cursor: not-allowed; }

@media (max-width: 480px) {
  .modal.paywall-modal { width: 94vw; padding: 18px 18px 14px; }
  .pw-title { font-size: 24px; }
  .pw-price { font-size: 28px; }
}

/* ===================================================================
 * Job board · simplified 2-state model
 * ================================================================== */
.jc-go {
  padding: 9px 16px;
  background: var(--ink);
  color: var(--paper);
  border: none;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  min-height: 38px;
  transition: all 0.15s;
}
.jc-go:hover { background: var(--coral); }
.jc-go:disabled { opacity: 0.45; cursor: not-allowed; }

.jc-end {
  padding: 8px 14px;
  background: rgba(212,119,92,0.10);
  color: var(--coral);
  border: 0.5px solid rgba(212,119,92,0.36);
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  min-height: 36px;
  transition: all 0.15s;
}
.jc-end:hover { background: var(--coral); color: white; }

/* the 50% milestone tick on the progress bar */
.jc-bar { position: relative; }
.jc-50-mark {
  position: absolute;
  top: -3px; bottom: -3px;
  left: 50%;
  width: 1px;
  background: var(--ink-3);
  opacity: 0.5;
}

/* flash variants */
.jb-flash.full    { color: var(--sage); }
.jb-flash.half    { color: var(--gold); }
.jb-flash.forfeit { color: var(--ink-3); opacity: 0.85; }

/* ===================================================================
 * Upgrade-cabin modal (mid-flight speed-up with confirmation)
 * ================================================================== */
.modal.upgrade-cabin-modal {
  max-width: 420px;
  border-radius: 18px;
}
.uc-current {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: var(--paper-3);
  border-radius: 10px;
  margin-bottom: 14px;
  font-size: 13px;
}
.uc-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.uc-name {
  font-family: 'Noto Serif KR', serif;
  font-weight: 600;
  color: var(--ink);
}
.uc-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.uc-option {
  width: 100%;
  padding: 12px 14px;
  background: white;
  border: 1px solid rgba(43,37,31,0.10);
  border-radius: 12px;
  text-align: left;
  cursor: pointer;
  transition: all 0.18s ease;
}
.uc-option:hover:not(.disabled) {
  border-color: var(--coral);
  background: rgba(212,119,92,0.04);
}
.uc-option.active {
  border-color: var(--coral);
  background: rgba(212,119,92,0.10);
  box-shadow: 0 0 0 1px var(--coral);
}
.uc-option.disabled { opacity: 0.45; cursor: not-allowed; }
.uc-opt-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 4px;
}
.uc-opt-name {
  font-family: 'Noto Serif KR', serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}
.uc-opt-cost {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  font-weight: 700;
  color: var(--coral);
}
.uc-opt-meta {
  display: flex;
  gap: 8px;
  font-size: 11px;
  color: var(--ink-3);
}
.uc-opt-saved {
  color: var(--sage);
  font-weight: 600;
}
.uc-opt-warn {
  color: var(--coral);
}

/* the travel-overlay upgrade + end row */
.travel-action-row {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}

/* Upgrade button — prominent, glowing, pulsing so users notice it */
.travel-upgrade-btn {
  padding: 12px 22px;
  background: linear-gradient(135deg, #d97757 0%, #f4a08b 100%);
  border: 1px solid rgba(255,255,255,0.35);
  color: white;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  cursor: pointer;
  font-family: 'Noto Serif KR', 'JetBrains Mono', serif;
  box-shadow: 0 0 24px rgba(217,119,87,0.55), 0 4px 14px rgba(0,0,0,0.25);
  animation: travelUpgradePulse 2.4s ease-in-out infinite;
  transition: transform 0.18s ease;
}
.travel-upgrade-btn:hover {
  transform: translateY(-2px) scale(1.04);
  filter: brightness(1.08);
}

/* Cancel-flight button — secondary action, but clearly visible.
 * Outlined coral-on-cream so it pairs with the filled coral Upgrade button
 * (looks intentionally "the other option" rather than half-hidden). */
.travel-cancel-btn {
  padding: 11px 20px;
  background: rgba(245,239,226,0.92);
  border: 1.5px solid var(--coral, #d4775c);
  color: var(--coral, #d4775c);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.05em;
  cursor: pointer;
  font-family: 'Noto Serif KR', 'JetBrains Mono', serif;
  box-shadow: 0 2px 10px rgba(0,0,0,0.18);
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease;
}
.travel-cancel-btn:hover {
  transform: translateY(-1px);
  background: var(--coral, #d4775c);
  color: white;
}
.travel-cancel-btn:active {
  transform: translateY(0);
}
@keyframes travelUpgradePulse {
  0%, 100% {
    box-shadow: 0 0 22px rgba(217,119,87,0.50), 0 4px 12px rgba(0,0,0,0.22);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 38px rgba(244,160,139,0.85), 0 6px 22px rgba(0,0,0,0.30);
    transform: scale(1.035);
  }
}

/* End-flight button — secondary, calm */
.travel-end-btn {
  padding: 12px 18px;
  background: rgba(20,20,20,0.55);
  border: 1px solid rgba(255,255,255,0.30);
  color: rgba(255,255,255,0.88);
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  cursor: pointer;
  font-family: 'Noto Serif KR', 'JetBrains Mono', serif;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all 0.2s ease;
}
.travel-end-btn:hover {
  background: rgba(0,0,0,0.65);
  border-color: rgba(255,255,255,0.55);
  color: white;
  transform: translateY(-1px);
}

/* ambient sound mixer — Korean-aesthetic multi-track */
.ambient-sound-mixer {
  margin-top: 14px;
  border-top: 0.5px solid rgba(255,255,255,0.18);
  padding-top: 12px;
  position: relative;
}
.asm-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  background: rgba(245, 239, 226, 0.08);
  border: 0.5px solid rgba(245, 239, 226, 0.25);
  color: rgba(245, 239, 226, 0.92);
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: 0.06em;
  cursor: pointer;
  font-family: 'Noto Serif KR', 'JetBrains Mono', serif;
  transition: all 0.22s ease;
}
.asm-toggle:hover {
  background: rgba(245, 239, 226, 0.14);
  border-color: rgba(245, 239, 226, 0.40);
}
/* When no track is playing, make the bar more inviting — fuller text + pulsing border */
.ambient-sound-mixer.idle .asm-toggle {
  background: rgba(245, 239, 226, 0.14);
  border-color: rgba(244, 160, 139, 0.55);
  color: rgba(245, 239, 226, 1);
  box-shadow: 0 0 0 0 rgba(244, 160, 139, 0.45);
  animation: asmIdlePulse 2.6s ease-in-out infinite;
}
@keyframes asmIdlePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(244,160,139,0.30); }
  50%      { box-shadow: 0 0 0 8px rgba(244,160,139,0); }
}
.asm-ico { font-size: 14px; }
.asm-lbl { font-weight: 600; }
.asm-count {
  margin-left: auto;
  background: var(--coral, #d97757);
  color: white;
  border-radius: 999px;
  padding: 1px 8px;
  font-size: 10.5px;
  font-weight: 700;
}
.asm-dot {
  margin-left: auto;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #f4a08b;
  box-shadow: 0 0 0 0 rgba(244,160,139,0.6);
  animation: asmDotPulse 1.8s ease-in-out infinite;
}
@keyframes asmDotPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(244,160,139,0.7); }
  50% { box-shadow: 0 0 0 7px rgba(244,160,139,0); }
}

/* first-time hint bubble */
.asm-hint {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translate(-50%, -100%);
  padding: 10px 14px;
  background: linear-gradient(135deg, #2a2520 0%, #3a2f24 100%);
  border: 0.5px solid rgba(244,160,139,0.55);
  color: #f5efe2;
  border-radius: 14px;
  font-size: 12px;
  font-family: 'Noto Serif KR', serif;
  letter-spacing: 0.03em;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(0,0,0,0.35), 0 0 22px rgba(244,160,139,0.30);
  animation: asmHintFloat 3s ease-in-out infinite;
  z-index: 20;
}
.asm-hint::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 12px; height: 12px;
  background: #3a2f24;
  border-right: 0.5px solid rgba(244,160,139,0.55);
  border-bottom: 0.5px solid rgba(244,160,139,0.55);
}
@keyframes asmHintFloat {
  0%, 100% { transform: translate(-50%, -100%); }
  50% { transform: translate(-50%, calc(-100% - 4px)); }
}

/* panel — hanok-style soft cream tones with traditional warmth */
.asm-panel {
  margin-top: 10px;
  padding: 14px;
  background: linear-gradient(180deg, rgba(245,239,226,0.10) 0%, rgba(245,239,226,0.05) 100%);
  border: 0.5px solid rgba(245,239,226,0.22);
  border-radius: 16px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.asm-sub {
  font-family: 'Noto Serif KR', serif;
  font-size: 11.5px;
  color: rgba(245,239,226,0.65);
  letter-spacing: 0.04em;
  margin-bottom: 10px;
  text-align: center;
}
.asm-tracks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
}
.asm-track {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.asm-track-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(245,239,226,0.06);
  border: 0.5px solid rgba(245,239,226,0.18);
  color: rgba(245,239,226,0.80);
  border-radius: 12px;
  font-size: 12px;
  font-family: 'Noto Serif KR', serif;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all 0.18s ease;
}
.asm-track-btn:hover {
  background: rgba(245,239,226,0.13);
  color: rgba(245,239,226,0.95);
}
.asm-track.on .asm-track-btn {
  background: linear-gradient(135deg, rgba(217,119,87,0.32) 0%, rgba(244,160,139,0.22) 100%);
  border-color: rgba(217,119,87,0.55);
  color: #fff;
}
.asm-track-emoji { font-size: 14px; }
.asm-track-name { flex: 1; font-weight: 500; }
.asm-track-led {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  border: 0.5px solid rgba(255,255,255,0.3);
}
.asm-track.on .asm-track-led {
  background: #7ec78a;
  border-color: #7ec78a;
  box-shadow: 0 0 8px rgba(126,199,138,0.6);
}
.asm-track-vol {
  width: 100%;
  accent-color: var(--coral, #d97757);
}
.asm-master-row {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 0.5px solid rgba(245,239,226,0.18);
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(245,239,226,0.72);
  font-size: 11.5px;
  font-family: 'Noto Serif KR', serif;
}
.asm-master-row input[type="range"] {
  flex: 1;
  accent-color: var(--coral, #d97757);
}
.asm-master-label { min-width: 58px; letter-spacing: 0.05em; }

@media (max-width: 640px) {
  .asm-tracks { grid-template-columns: repeat(2, 1fr); }
  .travel-upgrade-btn { padding: 10px 18px; font-size: 13px; }
  .travel-end-btn { padding: 10px 16px; font-size: 12px; }
  .asm-hint { font-size: 11px; padding: 9px 12px; max-width: 86vw; white-space: normal; text-align: center; }
}
@media (max-width: 420px) {
  .asm-tracks { grid-template-columns: repeat(2, 1fr); gap: 6px; }
  .asm-track-btn { padding: 7px 10px; font-size: 11.5px; }
}
