/* ─── Base (Airbnb Minimal) ─── */
:root {
  --primary: #ff5a5f;
  --primary-dark: #e0484d;
  --ink: #222222;
  --ink-2: #717171;
  --ink-3: #b0b0b0;
  --bg: #ffffff;
  --bg-2: #f7f7f7;
  --bg-3: #ebebeb;
  --line: #ebebeb;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-md: 0 6px 20px rgba(0,0,0,0.12);
  --radius: 14px;
  --radius-lg: 20px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Pretendard",
               "Apple SD Gothic Neo", "Noto Sans KR", "Noto Sans CJK KR", sans-serif;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}
button, input, select { font-family: inherit; }
a { color: inherit; }

/* ─── App container ─── */
.app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg);
  position: relative;
}

/* ─── Top bar ─── */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(8px);
  position: sticky; top: 0; z-index: 50;
}
.topbar .brand { font-weight: 700; font-size: 18px; letter-spacing: -0.5px; }
.topbar .brand .accent { color: var(--primary); }
.topbar select {
  padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px;
  background: white; font-size: 13px; cursor: pointer;
}
.topbar .back-link { color: var(--primary); text-decoration: none; font-weight: 500; font-size: 14px; }

/* ─── Splash / Quiz Intro ─── */
.splash {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  height: 80vh; padding: 32px; text-align: center;
}
.splash h1 { font-size: 36px; font-weight: 800; letter-spacing: -1px; margin-bottom: 12px; }
.splash h1 .accent { color: var(--primary); }
.splash p { font-size: 16px; color: var(--ink-2); margin-bottom: 32px; max-width: 320px; }

/* ─── Buttons ─── */
.btn {
  padding: 14px 24px; border-radius: 12px; font-size: 16px; font-weight: 600;
  border: 0; cursor: pointer; transition: 0.15s; display: inline-flex; align-items: center; gap: 8px;
}
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-primary:disabled { background: var(--ink-3); cursor: not-allowed; }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-outline { background: white; color: var(--ink); border: 1px solid var(--line); }
.btn-outline:hover { border-color: var(--ink); }
.btn-block { display: flex; width: 100%; justify-content: center; }

/* ─── Quiz ─── */
.quiz-progress {
  display: flex; gap: 4px; padding: 16px 20px;
}
.quiz-progress .dot {
  flex: 1; height: 3px; background: var(--bg-3); border-radius: 2px;
}
.quiz-progress .dot.done { background: var(--primary); }
.quiz-progress .dot.active { background: var(--primary); }

.quiz-question { padding: 20px 20px 8px; }
.quiz-question .num { color: var(--ink-2); font-size: 13px; margin-bottom: 8px; }
.quiz-question h2 {
  font-size: 26px; font-weight: 700; line-height: 1.3; letter-spacing: -0.5px;
  margin-bottom: 24px;
}

.quiz-options {
  display: grid; gap: 12px; padding: 0 20px 24px;
}
.quiz-option {
  position: relative; border-radius: var(--radius); overflow: hidden;
  cursor: pointer; aspect-ratio: 5 / 3; border: 0; padding: 0;
  background: var(--bg-2); transition: transform 0.15s;
}
.quiz-option:hover { transform: translateY(-2px); }
.quiz-option .img {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
}
.quiz-option .overlay {
  position: absolute; inset: 0; padding: 16px;
  display: flex; flex-direction: column; justify-content: flex-end;
  background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,0.7) 100%);
  color: white;
}
.quiz-option .label { font-size: 18px; font-weight: 600; }
.quiz-option .sub { font-size: 13px; opacity: 0.9; }

/* ─── DNA Result ─── */
.dna-result { padding: 32px 20px; text-align: center; }
.dna-badge {
  margin: 24px auto;
  background: linear-gradient(135deg, #fff5f5 0%, #ffeaea 100%);
  border: 2px solid var(--primary);
  border-radius: var(--radius-lg);
  padding: 24px;
  max-width: 320px;
}
.dna-badge .label { font-size: 13px; color: var(--ink-2); text-transform: uppercase; letter-spacing: 1px; }
.dna-badge .name { font-size: 28px; font-weight: 800; margin: 8px 0; color: var(--primary); }
.dna-badge .scores { display: flex; flex-direction: column; gap: 6px; margin-top: 16px; }
.dna-badge .row { display: flex; justify-content: space-between; font-size: 14px; }
.dna-badge .row .pct { font-weight: 600; }

.dna-quote {
  font-style: italic; color: var(--ink-2); margin: 24px auto;
  max-width: 280px; font-size: 16px; line-height: 1.6;
}

.dna-actions { display: flex; gap: 12px; padding: 16px 20px; }

/* ─── Chat (Conversational Soul) ─── */
.chat-window {
  padding: 16px; padding-bottom: 200px; min-height: calc(100vh - 60px);
  display: flex; flex-direction: column; gap: 12px;
}
.bubble {
  max-width: 85%; padding: 12px 16px; border-radius: 18px;
  line-height: 1.5; font-size: 15px;
}
.bubble.user {
  background: var(--primary); color: white; align-self: flex-end;
  border-bottom-right-radius: 6px;
}
.bubble.soul {
  background: var(--bg-2); color: var(--ink); align-self: flex-start;
  border-bottom-left-radius: 6px;
}
.bubble .course-mini {
  display: flex; gap: 12px; margin-top: 12px;
  background: white; padding: 10px; border-radius: 12px;
  box-shadow: var(--shadow-sm); cursor: pointer; text-decoration: none; color: var(--ink);
}
.bubble .course-mini img { width: 80px; height: 80px; border-radius: 8px; object-fit: cover; }
.bubble .course-mini h4 { font-size: 15px; margin-bottom: 2px; }
.bubble .course-mini p { font-size: 12px; color: var(--ink-2); margin-bottom: 4px; }
.bubble .open-link { color: var(--primary); font-size: 12px; font-weight: 600; }

.typing { display: flex; gap: 4px; padding: 4px 0; }
.typing span {
  width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3);
  animation: bounce 1.4s infinite ease-in-out both;
}
.typing span:nth-child(1) { animation-delay: -0.32s; }
.typing span:nth-child(2) { animation-delay: -0.16s; }
@keyframes bounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40% { transform: scale(1); opacity: 1; }
}

.chat-input {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px;
  background: rgba(255,255,255,0.97); backdrop-filter: blur(8px);
  border-top: 1px solid var(--line); padding: 12px;
}
.suggest-row {
  display: flex; gap: 8px; overflow-x: auto; padding-bottom: 10px;
  scrollbar-width: none;
}
.suggest-row::-webkit-scrollbar { display: none; }
.suggest-row .chip { flex-shrink: 0; }
.input-row { display: flex; gap: 8px; align-items: center; }
.text-input {
  flex: 1; padding: 12px 16px; border: 1px solid var(--line);
  border-radius: 100px; font-size: 15px;
}
.text-input:focus { outline: 2px solid var(--primary); border-color: var(--primary); }
.send-btn {
  width: 44px; height: 44px; border-radius: 50%; border: 0;
  background: var(--primary); color: white; font-size: 22px; font-weight: 700; cursor: pointer;
}
.send-btn:disabled { background: var(--ink-3); cursor: not-allowed; }

/* ─── Mood Now widget ─── */
.mood-bar {
  display: flex; gap: 8px; padding: 12px 16px; overflow-x: auto;
  background: rgba(255,255,255,0.95); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 60px; z-index: 40;
  scrollbar-width: none;
}
.mood-bar::-webkit-scrollbar { display: none; }
.mood-chip {
  flex-shrink: 0; padding: 8px 14px; border-radius: 100px;
  border: 1px solid var(--line); background: white;
  font-size: 13px; cursor: pointer; display: flex; align-items: center; gap: 6px;
  transition: 0.15s; white-space: nowrap;
}
.mood-chip:hover { border-color: var(--ink); }
.mood-chip.active { background: var(--primary); color: white; border-color: var(--primary); }
.mood-chip .emoji { font-size: 16px; }

/* ─── Discovery Feed (TikTok-style vertical) ─── */
.feed {
  height: calc(100vh - 60px);
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  scrollbar-width: none;
}
.feed::-webkit-scrollbar { display: none; }
.feed-card {
  height: calc(100vh - 60px);
  scroll-snap-align: start;
  position: relative;
  background: black;
  display: flex; flex-direction: column;
}
.feed-card .hero {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
}
.feed-card .gradient {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.3) 0%, transparent 30%, transparent 50%, rgba(0,0,0,0.85) 100%);
}
.feed-card .content {
  position: relative; margin-top: auto;
  padding: 24px 24px 100px; color: white;
}
.feed-card .match {
  display: inline-block; background: rgba(255,255,255,0.2); backdrop-filter: blur(10px);
  padding: 4px 10px; border-radius: 12px; font-size: 12px; font-weight: 600; margin-bottom: 8px;
}
.feed-card h2 {
  font-size: 32px; font-weight: 800; line-height: 1.1; margin-bottom: 8px; letter-spacing: -1px;
}
.feed-card .concept {
  font-size: 16px; opacity: 0.95; margin-bottom: 12px; line-height: 1.4;
}
.feed-card .meta {
  font-size: 13px; opacity: 0.8; display: flex; gap: 12px;
}
.feed-card .actions {
  position: absolute; right: 16px; bottom: 100px;
  display: flex; flex-direction: column; gap: 16px;
}
.feed-card .action {
  width: 48px; height: 48px; border-radius: 50%; border: 0;
  background: rgba(255,255,255,0.2); backdrop-filter: blur(10px);
  color: white; font-size: 22px; cursor: pointer; transition: 0.15s;
  display: flex; align-items: center; justify-content: center;
}
.feed-card .action:hover { background: rgba(255,255,255,0.35); transform: scale(1.05); }
.feed-card .action.saved { background: var(--primary); }

.feed-cta {
  position: absolute; bottom: 24px; left: 24px; right: 80px;
}

/* ─── Course Detail (Storybook accent) ─── */
.story {
  background: #fdfcf8; /* warm cream */
  min-height: 100vh;
}
.story .hero {
  width: 100%; aspect-ratio: 16/10; background-size: cover; background-position: center;
  position: relative;
}
.story .hero .back {
  position: absolute; top: 16px; left: 16px;
  background: rgba(255,255,255,0.9); border: 0; border-radius: 50%;
  width: 40px; height: 40px; cursor: pointer; font-size: 20px;
  display: flex; align-items: center; justify-content: center;
}
.story .body { padding: 28px 24px 100px; }
.story .concept-tag {
  display: inline-block; color: var(--primary); font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 10px;
}
.story h1 {
  font-family: Georgia, "Noto Serif KR", serif;
  font-size: 32px; font-weight: 700; line-height: 1.2; margin-bottom: 16px;
  letter-spacing: -0.5px; color: #2a2520;
}
.story .narrative {
  font-family: Georgia, "Noto Serif KR", serif;
  font-size: 17px; line-height: 1.75; color: #3a3530;
}
.story .narrative p { margin-bottom: 16px; }
.story .narrative p:first-letter { font-size: 1.6em; font-weight: 700; color: var(--primary); }

.story #map { width: 100%; height: 280px; border-radius: var(--radius); margin: 24px 0; }

.itinerary { margin-top: 24px; }
.itinerary h3 { font-size: 18px; font-weight: 700; margin-bottom: 12px; }
.stops { list-style: none; }
.stops li {
  display: grid; grid-template-columns: 56px 1fr; gap: 12px;
  padding: 14px; background: white; margin-bottom: 8px;
  border-radius: var(--radius); border-left: 3px solid var(--primary);
  box-shadow: var(--shadow-sm);
}
.stops .time { font-weight: 700; color: var(--primary); font-size: 14px; }
.stops .stop h4 { font-size: 16px; font-weight: 600; margin-bottom: 2px; }
.stops .duration { color: var(--ink-2); font-size: 13px; }
.stops .transit { color: var(--ink-2); font-size: 12px; margin-top: 6px; font-style: italic; }

.story-actions {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px;
  padding: 12px 16px;
  background: rgba(255,255,255,0.95); backdrop-filter: blur(8px);
  border-top: 1px solid var(--line);
  display: flex; gap: 8px;
}

/* ─── Chat Refine modal ─── */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5);
  z-index: 100; display: flex; align-items: flex-end; justify-content: center;
}
.modal {
  background: white; width: 100%; max-width: 480px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: 24px; max-height: 85vh; overflow-y: auto;
  animation: slideUp 0.25s ease-out;
}
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.modal h3 { font-size: 20px; margin-bottom: 4px; }
.modal .helper { color: var(--ink-2); font-size: 14px; margin-bottom: 16px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 20px; }
.chip {
  padding: 8px 14px; border: 1px solid var(--line); border-radius: 100px;
  background: white; cursor: pointer; font-size: 13px; transition: 0.15s;
}
.chip:hover, .chip.active { background: var(--primary); color: white; border-color: var(--primary); }

.refine-input {
  width: 100%; padding: 12px; border: 1px solid var(--line); border-radius: 12px;
  font-size: 15px; resize: vertical; min-height: 80px; margin-bottom: 16px;
}
.refine-input:focus { outline: 2px solid var(--primary); border-color: var(--primary); }

/* ─── Loading ─── */
.loading-screen {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  height: 80vh; gap: 24px;
}
.spinner {
  width: 44px; height: 44px; border: 3px solid var(--bg-3);
  border-top-color: var(--primary); border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-screen p { color: var(--ink-2); font-style: italic; }

/* ─── Practical filters bar ─── */
.filter-bar {
  display: flex; gap: 6px; padding: 6px 16px; overflow-x: auto;
  scrollbar-width: none; border-bottom: 1px solid var(--line);
  background: white;
}
.filter-bar::-webkit-scrollbar { display: none; }
.filter-chip {
  flex-shrink: 0; padding: 6px 12px; border-radius: 100px;
  border: 1px solid var(--line); background: white;
  font-size: 12px; cursor: pointer; white-space: nowrap;
  display: flex; align-items: center; gap: 4px;
}
.filter-chip.active { background: var(--ink); color: white; border-color: var(--ink); }
.filter-chip .label { font-size: 12px; }

/* ─── Crowd badge on cards ─── */
.crowd-badge {
  display: inline-flex; align-items: center; gap: 4px;
  background: rgba(0,0,0,0.5); color: white;
  padding: 4px 8px; border-radius: 100px; font-size: 11px;
  backdrop-filter: blur(8px);
}
.crowd-badge .dot {
  width: 6px; height: 6px; border-radius: 50%;
}
.crowd-badge.free .dot { background: #5dd170; }
.crowd-badge.moderate .dot { background: #ffc043; }
.crowd-badge.busy .dot { background: #ff8e53; }
.crowd-badge.packed .dot { background: #ff5a5f; }

/* ─── Audio + Style picker on course ─── */
.course-tools {
  display: flex; gap: 8px; padding: 12px 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,0.7);
  position: sticky; top: 0; z-index: 30;
  backdrop-filter: blur(10px);
}
.course-tool-btn {
  padding: 8px 14px; border: 1px solid var(--line); border-radius: 100px;
  background: white; font-size: 13px; cursor: pointer; display: flex; align-items: center; gap: 6px;
}
.course-tool-btn.active { background: var(--primary); color: white; border-color: var(--primary); }

.style-picker {
  display: flex; gap: 6px; padding: 8px 16px; overflow-x: auto;
  scrollbar-width: none;
}
.style-picker::-webkit-scrollbar { display: none; }
.style-pill {
  flex-shrink: 0; padding: 6px 12px; border-radius: 100px;
  border: 1px solid var(--line); background: white;
  font-size: 12px; cursor: pointer; white-space: nowrap;
}
.style-pill.active { background: var(--ink); color: white; border-color: var(--ink); }

/* ─── 3-View Toggle ─── */
.view-toggle {
  display: flex; gap: 4px; padding: 8px;
  background: var(--bg-2); border-radius: 100px; margin: 8px 16px;
  position: sticky; top: 60px; z-index: 35;
}
.view-toggle button {
  flex: 1; padding: 8px 12px; border: 0; background: transparent;
  border-radius: 100px; font-size: 13px; font-weight: 500; cursor: pointer;
  color: var(--ink-2); display: flex; align-items: center; justify-content: center; gap: 4px;
}
.view-toggle button.active { background: white; color: var(--ink); box-shadow: var(--shadow-sm); }

/* ─── Today's Pick banner ─── */
.today-pick {
  margin: 12px 16px 8px; border-radius: var(--radius-lg); overflow: hidden;
  position: relative; cursor: pointer;
  box-shadow: var(--shadow-md);
  background: black;
}
.today-pick .img {
  position: absolute; inset: 0; background-size: cover; background-position: center;
  filter: brightness(0.7);
}
.today-pick .content {
  position: relative; padding: 20px; color: white;
  background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.6) 100%);
  min-height: 180px; display: flex; flex-direction: column; justify-content: flex-end;
}
.today-pick .badge {
  display: inline-block; background: var(--primary); padding: 4px 10px;
  border-radius: 100px; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1px; margin-bottom: 8px;
  width: fit-content;
}
.today-pick h3 { font-size: 22px; font-weight: 800; margin-bottom: 4px; }
.today-pick p { font-size: 14px; opacity: 0.9; }

/* ─── Reasoning chips on card ─── */
.reasons {
  display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px;
}
.reason {
  background: rgba(255,255,255,0.2); backdrop-filter: blur(8px);
  color: white; padding: 3px 8px; border-radius: 100px;
  font-size: 11px; display: flex; align-items: center; gap: 4px;
  white-space: nowrap;
}
.reason.dark { background: var(--bg-2); color: var(--ink-2); }

/* ─── Rows view (Netflix-style) ─── */
.rows-view { padding: 8px 0 80px; }
.row-section { margin-bottom: 24px; }
.row-header {
  padding: 0 16px; margin-bottom: 8px;
}
.row-header h3 { font-size: 17px; font-weight: 700; margin-bottom: 2px; }
.row-header .sub { color: var(--ink-2); font-size: 12px; }

.row-scroll {
  display: flex; gap: 12px; overflow-x: auto; padding: 0 16px 4px;
  scroll-snap-type: x mandatory; scrollbar-width: none;
}
.row-scroll::-webkit-scrollbar { display: none; }
.row-card {
  flex: 0 0 240px; scroll-snap-align: start;
  border-radius: var(--radius); overflow: hidden;
  background: white; box-shadow: var(--shadow-sm); cursor: pointer;
  transition: transform 0.15s;
}
.row-card:hover { transform: translateY(-2px); }
.row-card .row-img {
  width: 100%; aspect-ratio: 4/3; background-size: cover; background-position: center;
}
.row-card .row-body { padding: 10px 12px; }
.row-card h4 { font-size: 14px; font-weight: 600; margin-bottom: 2px; line-height: 1.3; }
.row-card .row-meta { font-size: 11px; color: var(--ink-2); }
.row-card .row-match {
  display: inline-block; background: rgba(255,90,95,0.1); color: var(--primary);
  padding: 2px 8px; border-radius: 100px; font-size: 11px; font-weight: 600;
  margin-top: 4px;
}

/* ─── Mock Map (replaces Leaflet) ─── */
.mock-map {
  position: relative; width: 100%;
  background:
    radial-gradient(circle at 30% 60%, rgba(120,180,200,0.25), transparent 40%),
    radial-gradient(circle at 70% 30%, rgba(100,160,180,0.2), transparent 35%),
    linear-gradient(135deg, #eef5f8 0%, #d6e7ec 100%);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
}
.mock-map.h-280 { height: 280px; }
.mock-map.h-full { height: calc(100vh - 60px - 60px); border-radius: 0; }
.mock-map::before {
  /* faint grid */
  content: ''; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.4) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.4) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
}
.mock-map .river {
  position: absolute; bottom: 18%; left: -10%; right: -10%;
  height: 22px;
  background: linear-gradient(90deg, transparent 0%, #a8d4e0 20%, #7ec0d0 50%, #a8d4e0 80%, transparent 100%);
  border-radius: 100%;
  transform: rotate(-2deg);
  opacity: 0.7;
}
.mock-map .label {
  position: absolute;
  font-size: 10px; color: rgba(60,80,90,0.5);
  text-transform: uppercase; letter-spacing: 1.5px; pointer-events: none;
}
.mock-pin {
  position: absolute;
  width: 32px; height: 32px;
  background: var(--primary);
  border: 3px solid white;
  border-radius: 50% 50% 50% 0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  display: flex; align-items: center; justify-content: center;
  color: white; font-weight: 700; font-size: 13px;
  transform: translate(-50%, -100%) rotate(-45deg);
  z-index: 3; cursor: pointer;
  transition: transform 0.15s;
}
.mock-pin span { transform: rotate(45deg); }
.mock-pin:hover { transform: translate(-50%, -100%) rotate(-45deg) scale(1.15); }
.mock-pin.active { background: #ff8e53; }
.mock-route {
  position: absolute; inset: 0; pointer-events: none; z-index: 2;
}
.mock-pin-label {
  position: absolute;
  background: white; padding: 4px 8px; border-radius: 8px;
  font-size: 11px; font-weight: 600; box-shadow: var(--shadow-sm);
  transform: translate(-50%, -180%); white-space: nowrap;
  z-index: 3; pointer-events: none;
}
.mock-heatmap {
  position: absolute; pointer-events: none;
  border-radius: 50%;
  filter: blur(20px);
  opacity: 0.6;
  z-index: 1;
}

/* ─── Map view ─── */
.map-view { position: relative; height: calc(100vh - 60px - 60px); }
.map-view #leafmap { width: 100%; height: 100%; }
.map-drawer {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: white; border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: 12px 0; box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
  z-index: 1000; max-height: 50%; overflow-y: auto;
}
.map-drawer .handle {
  width: 40px; height: 4px; background: var(--bg-3); border-radius: 2px;
  margin: 0 auto 12px;
}
.map-drawer-cards {
  display: flex; gap: 12px; overflow-x: auto; padding: 0 16px 12px;
  scroll-snap-type: x mandatory; scrollbar-width: none;
}
.map-drawer-cards::-webkit-scrollbar { display: none; }
.map-drawer-card {
  flex: 0 0 260px; scroll-snap-align: start;
  border-radius: var(--radius); overflow: hidden;
  background: white; border: 1px solid var(--line); cursor: pointer;
}
.map-drawer-card .img {
  width: 100%; height: 120px; background-size: cover; background-position: center;
}
.map-drawer-card .body { padding: 10px 12px; }
.map-drawer-card h4 { font-size: 14px; font-weight: 600; }
.map-drawer-card .small { font-size: 11px; color: var(--ink-2); margin-top: 2px; }

/* ─── Story preview overlay ─── */
.story-overlay {
  position: fixed; inset: 0; background: black; z-index: 200;
  display: flex; align-items: center; justify-content: center;
}
.story-frame {
  position: relative; width: 100%; max-width: 480px; height: 100vh;
  background-size: cover; background-position: center;
}
.story-progress {
  position: absolute; top: env(safe-area-inset-top, 0); left: 0; right: 0;
  display: flex; gap: 4px; padding: 12px;
}
.story-progress .bar {
  flex: 1; height: 3px; background: rgba(255,255,255,0.3); border-radius: 2px; overflow: hidden;
}
.story-progress .bar.done { background: white; }
.story-progress .bar.active::after {
  content: ''; display: block; height: 100%; background: white;
  animation: storyFill 4s linear forwards;
}
@keyframes storyFill { from {width: 0;} to {width: 100%;} }
.story-caption {
  position: absolute; bottom: 100px; left: 24px; right: 24px;
  color: white; font-size: 28px; font-weight: 800;
  text-shadow: 0 2px 12px rgba(0,0,0,0.7);
}
.story-actions {
  position: absolute; bottom: 32px; left: 16px; right: 16px;
  display: flex; gap: 8px;
}
.story-tap-zone {
  position: absolute; top: 0; bottom: 0; width: 33%;
}
.story-tap-zone.left { left: 0; }
.story-tap-zone.right { right: 0; }
.story-close {
  position: absolute; top: 24px; right: 16px;
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(0,0,0,0.5); color: white; border: 0;
  font-size: 20px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}

/* ─── Bottom Navigation ─── */
.bottom-nav {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px;
  background: rgba(255,255,255,0.97); backdrop-filter: blur(8px);
  border-top: 1px solid var(--line);
  display: flex; justify-content: space-around; padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
  z-index: 60;
}
.bottom-nav a {
  flex: 1; text-align: center; text-decoration: none;
  color: var(--ink-2); font-size: 11px; padding: 6px 0;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  transition: 0.15s;
}
.bottom-nav a .icon { font-size: 20px; }
.bottom-nav a.active { color: var(--primary); }
.bottom-nav a:hover { color: var(--ink); }

.feed { padding-bottom: 64px; }
.story .body { padding-bottom: 140px; }

/* ─── Wheel of Soul ─── */
.wheel-fab {
  position: fixed; right: 16px; bottom: 80px; z-index: 65;
  width: 56px; height: 56px; border-radius: 50%; border: 0;
  background: linear-gradient(135deg, #ff5a5f 0%, #ff8e53 100%);
  color: white; font-size: 26px; cursor: pointer;
  box-shadow: 0 6px 20px rgba(255,90,95,0.4);
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.2s;
}
.wheel-fab:hover { transform: scale(1.05); }
.wheel-fab.spinning { animation: spin 0.6s linear infinite; }

/* ─── Bucket List Picker ─── */
.bucket-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px;
  padding: 16px;
}
.bucket-item {
  position: relative; aspect-ratio: 1/1; border-radius: var(--radius);
  overflow: hidden; cursor: pointer; border: 0; padding: 0;
  background: var(--bg-2);
}
.bucket-item .img { position: absolute; inset: 0; background-size: cover; background-position: center; }
.bucket-item .label {
  position: absolute; bottom: 8px; left: 8px; right: 8px;
  color: white; font-weight: 600; font-size: 14px;
  text-shadow: 0 1px 4px rgba(0,0,0,0.6);
}
.bucket-item.selected {
  outline: 3px solid var(--primary); outline-offset: -3px;
}
.bucket-item.selected::after {
  content: '✓'; position: absolute; top: 8px; right: 8px;
  width: 28px; height: 28px; border-radius: 50%; background: var(--primary);
  color: white; display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 700;
}

/* ─── Utility ─── */
.hidden { display: none !important; }
.text-center { text-align: center; }
