/* ============ DESIGN TOKENS ============ */
:root {
  /* Base palette — light mode */
  --c-bg-app: #faf9f6;
  --c-bg-card: #ffffff;
  --c-bg-subtle: #f7f8fa;
  --c-bg-muted: #eef0f5;

  --c-text-primary: #0f172a;
  --c-text-secondary: #475569;
  --c-text-muted: #64748b;
  --c-text-faint: #94a3b8;

  --c-border: #e8ecef;
  --c-border-strong: #cbd5e1;

  --c-brand: #1a2a3a;
  --c-brand-soft: #e0e7ff;
  --c-accent: #6366f1;

  --c-success: #10b981;
  --c-warn: #f59e0b;
  --c-danger: #ef4444;
  --c-gold: #f4c447;

  /* Spacing scale */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;

  /* Radius scale */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 22px;
  --r-2xl: 28px;
  --r-full: 9999px;

  /* Type */
  --font-he: 'Rubik', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-en: 'Inter', 'Rubik', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Shadows */
  --sh-sm: 0 2px 6px rgba(15, 23, 42, .05);
  --sh-md: 0 6px 16px rgba(15, 23, 42, .08);
  --sh-lg: 0 12px 28px rgba(15, 23, 42, .12);
}

/* Dark mode token overrides */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --c-bg-app: #0f1419;
    --c-bg-card: #1a2230;
    --c-bg-subtle: #1f2937;
    --c-bg-muted: #2a3441;

    --c-text-primary: #f1f5f9;
    --c-text-secondary: #cbd5e1;
    --c-text-muted: #94a3b8;
    --c-text-faint: #64748b;

    --c-border: #2a3441;
    --c-border-strong: #475569;

    --c-brand: #e0e7ff;
    --c-brand-soft: #1e293b;
  }
}
:root[data-theme="dark"] {
  --c-bg-app: #0f1419;
  --c-bg-card: #1a2230;
  --c-bg-subtle: #1f2937;
  --c-bg-muted: #2a3441;
  --c-text-primary: #f1f5f9;
  --c-text-secondary: #cbd5e1;
  --c-text-muted: #94a3b8;
  --c-text-faint: #64748b;
  --c-border: #2a3441;
  --c-border-strong: #475569;
  --c-brand: #e0e7ff;
  --c-brand-soft: #1e293b;
}

*, *::before, *::after { box-sizing: border-box; }
/* Light-only app — force the UA to render light form controls/scrollbars even on
   dark-mode phones (the app is intentionally light; dark mode is disabled). */
html { color-scheme: light; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-he);
  background: #1a3a5e;
  color: var(--c-text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
/* Fixed gradient backdrop as a single composited layer instead of
   background-attachment: fixed — which forces a costly full-page repaint on
   every scroll frame on mobile (and was hanging headless screenshots).
   Same visual, far cheaper. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background-color: #1a3a5e;
  background-image:
    radial-gradient(at 20% 10%, #6ea5d8 0%, transparent 40%),
    radial-gradient(at 80% 30%, #4d7fb5 0%, transparent 50%),
    radial-gradient(at 50% 80%, #2c5a8a 0%, transparent 60%),
    linear-gradient(180deg, #5a8fc5 0%, #2c4a78 100%);
}
/* English text inside Hebrew gets the English-tuned font for visual harmony */
code, kbd, pre, samp, .font-en { font-family: var(--font-en); }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; padding: 0; }
input { font-family: inherit; }
a { color: inherit; text-decoration: none; }
ul { padding: 0; margin: 0; list-style: none; }
img { max-width: 100%; display: block; }

.bg-blur, .bg-blob { position: fixed; pointer-events: none; z-index: 0; }
.bg-blob { width: 480px; height: 480px; border-radius: 50%; filter: blur(80px); opacity: .35; }
.bg-blob.a { top: -100px; right: -150px; background: #f0c060; }
.bg-blob.b { bottom: -100px; left: -150px; background: #4080c0; }

/* On phones (≤430px) the opaque device fills the viewport and fully covers this
   decorative backdrop, so rasterizing the blurred blobs + gradient is wasted work.
   Skip them entirely — zero visual change on mobile, real paint saving. They still
   show in the desktop "phone frame" layout where the device is centered with margins. */
@media (max-width: 430px) {
  .bg-blob, .bg-blur { display: none; }
  body::before { display: none; }
}

/* ========== DEVICE FRAME ========== */
.device {
  position: relative;
  z-index: 1;
  background: var(--c-bg-app);
  /* No backdrop-filter here — it creates a containing block that breaks
     position:fixed for the settings sheet, edit modal, install dialog, etc. */
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: visible;
}
@media (min-width: 600px) {
  body { padding: 32px 0; }
  .device {
    border-radius: 44px;
    border: 1px solid rgba(255,255,255,.4);
    box-shadow: 0 20px 60px rgba(0,0,0,.25);
    height: 880px;
    min-height: auto;
  }
}

.phone-status { display: none; }

/* ========== SCREENS ========== */
.screen {
  flex: 1;
  display: flex; flex-direction: column;
  overflow: hidden;
  /* Clear the fixed topbar + breathing room. The notch/safe-area inset is already
     applied once on `.device` (padding-top) — do NOT add env(safe-area-inset-top)
     here too, or iOS double-counts it and opens a ~47px gap above every screen. */
  padding-top: 110px;
}
.screen[data-screen="day"] { padding-top: 0; overflow: visible; }
/* Calendar has an in-flow header (.cal-head), not a fixed topbar — so it must
   NOT inherit the 110px top padding that clears the fixed topbar elsewhere. */
.screen[data-screen="calendar"] { padding-top: 14px; }
/* Home: the fixed topbar is only ~78px tall, so the default 110px left a visible
   empty band above the clock. Tighten so the content sits just below the header. */
.screen[data-screen="home"] { padding-top: 80px; }
.screen[hidden] { display: none !important; }

.content-pad {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 100px;
}
.content-pad::-webkit-scrollbar { display: none; }

/* ========== TOPBAR (fixed at top of viewport) ========== */
.topbar {
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: 14px 24px 12px;
  gap: 12px;
  position: fixed;
  top: 0;
  left: 0; right: 0;
  max-width: 430px;
  margin: 0 auto;
  z-index: 80;
  /* Fully opaque background — prevents content showing through during overscroll */
  background: #faf9f6;
  border-bottom: 1px solid rgba(0,0,0,.06);
  /* Cover the safe-area inset (notch) area too */
  padding-top: calc(14px + env(safe-area-inset-top, 0));
}
/* Solid extension that fills any space above the topbar (notch / device top) */
.topbar::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0;
  height: env(safe-area-inset-top, 0);
  background: #faf9f6;
  z-index: -1;
}
/* Top spacing handled by .screen padding-top now */
.content-pad { padding-top: 8px; }
/* On day-detail screen, the cover replaces the topbar — keep static */
.screen[data-screen="day"] .topbar { position: static; background: transparent; border: none; padding-top: 14px; }
.screen[data-screen="day"] .topbar::before { display: none; }
.screen[data-screen="day"] .content-pad { padding-top: 0; }
/* Lock overscroll bounce on body so we don't see anything behind the device */
html, body { overscroll-behavior: none; }
.loc-line {
  font-size: 12px; color: #5a7090;
  font-weight: 600;
  margin-bottom: 4px;
  display: inline-flex; align-items: center; gap: 4px;
}
.page-title {
  font-family: 'Rubik', sans-serif;
  font-size: 32px; font-weight: 800;
  margin: 0;
  letter-spacing: -1px;
  line-height: 1.1;
  color: #1a2a3a;
}
.page-title em {
  font-style: normal;
  background: #f4c447;
  color: #2a1f00;
  padding: 0 12px 3px;
  border-radius: 8px;
}

.ico-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(0,0,0,.04);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 700;
  color: #1a2a3a;
  flex: 0 0 40px;
  transition: all .15s;
  position: relative; /* anchor the tap-target overlay below */
}
/* Extend the touch target to the 44px accessibility minimum without growing the
   visible 40px circle — a transparent centered overlay captures the tap. */
.ico-btn::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 44px; height: 44px;
  transform: translate(-50%, -50%);
}
.ico-btn:active { transform: scale(0.94); }
.ico-btn.glass {
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.4);
}

/* ========== SEARCH ========== */
.search-bar {
  margin: 0 24px 14px;
  background: rgba(0,0,0,.04);
  border-radius: 100px;
  padding: 12px 18px;
  display: flex; align-items: center; gap: 10px;
}
.search-bar input {
  flex: 1; border: none; outline: none;
  background: transparent; font-size: 14px;
  color: #1a2a3a;
  text-align: right;
}
.search-bar input::placeholder { color: #8a98a8; }
.search-ico { color: #5a7090; font-size: 16px; }

/* ========== SEGMENTED ========== */
.seg-wrap { padding: 0 24px 16px; }
.seg {
  background: rgba(0,0,0,.05);
  border-radius: 100px;
  padding: 4px;
  display: flex;
}
.seg-item {
  flex: 1;
  padding: 9px 8px;
  border-radius: 100px;
  font-size: 12px; font-weight: 600;
  color: #5a6878;
  white-space: nowrap;
  transition: all .2s;
}
.seg-item.active {
  background: #fff; color: #1a2a3a;
  box-shadow: 0 2px 6px rgba(0,0,0,.06);
}

/* ========== JOURNAL CARDS ========== */
.journal-list { padding: 0 20px; }

.j-card {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  margin-bottom: 16px;
  height: 230px;
  box-shadow: 0 12px 28px rgba(0,0,0,.18);
  cursor: pointer;
  transition: transform .15s ease;
}
.j-card:active { transform: scale(0.98); }
.j-card img.bg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s;
}
.j-card:hover img.bg { transform: scale(1.05); }
.j-card .grad {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 25%, rgba(0,0,0,.55) 75%, rgba(0,0,0,.75));
}
.j-card .info {
  position: absolute; bottom: 0; right: 0; left: 0;
  padding: 16px 18px;
  color: #fff;
  z-index: 2;
}
.j-card .j-day-num {
  font-size: 11px; font-weight: 700;
  background: rgba(255,255,255,.22);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.3);
  padding: 4px 10px; border-radius: 100px;
  display: inline-block;
  margin-bottom: 8px;
}
.j-card .j-title {
  font-size: 22px; font-weight: 800;
  margin: 0 0 4px;
  letter-spacing: -0.5px;
  line-height: 1.15;
}
.j-card .j-loc {
  font-size: 12px; opacity: .92;
  display: inline-flex; align-items: center; gap: 4px;
  margin-bottom: 10px;
}
.j-card .j-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.j-tag {
  padding: 5px 11px;
  background: rgba(255,255,255,.22);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 100px;
  font-size: 11px; font-weight: 600;
  color: #fff;
}

.j-wx {
  position: absolute; top: 14px; right: 14px;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(10px);
  padding: 6px 12px; border-radius: 100px;
  font-size: 12px; font-weight: 700;
  color: #1a2a3a;
  display: inline-flex; align-items: center; gap: 5px;
  z-index: 2;
}

.thumb-stack {
  position: absolute; top: 14px; left: 14px;
  display: flex; flex-direction: column; gap: 4px;
  z-index: 2;
}
.thumb-stack img, .thumb-stack .more {
  width: 42px; height: 42px;
  border-radius: 12px;
  object-fit: cover;
  border: 2px solid rgba(255,255,255,.85);
  box-shadow: 0 2px 6px rgba(0,0,0,.15);
}
.thumb-stack .more {
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(10px);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
  color: #fff;
}

.j-fav {
  position: absolute; bottom: 14px; left: 14px;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,.9);
  display: inline-flex; align-items: center; justify-content: center;
  z-index: 2;
  font-size: 14px;
  color: #1a2a3a;
}

/* country banner separator */
.country-banner {
  margin: 8px 0 14px;
  text-align: center;
  font-size: 11px; font-weight: 700;
  color: #5a7090;
  letter-spacing: 2px;
  text-transform: uppercase;
  display: flex; align-items: center; gap: 12px;
}
.country-banner::before, .country-banner::after {
  content: ''; flex: 1; height: 1px; background: rgba(0,0,0,.08);
}

.empty-state {
  text-align: center;
  padding: 50px 20px;
  color: #8a98a8;
}
.empty-state .emo { font-size: 40px; margin-bottom: 8px; }

/* ========== DAY DETAIL SCREEN ========== */
.screen[data-screen="day"] { background: #fff; }

/* Push the cover down past the notch / camera so the top isn't hidden behind the OS bar.
   The .screen padding-top already accounts for safe-area; this gives extra breathing room. */
.day-cover {
  position: sticky;
  top: 0;
  z-index: 0;
  height: calc(250px + env(safe-area-inset-top, 0));
  margin: calc(-1 * env(safe-area-inset-top, 0)) 0 0;
  border-radius: 0;
  overflow: hidden;
  flex-shrink: 0;
}

/* Sticky back + menu buttons — always visible above any scroll, with a backdrop so they
   stay readable on top of either the cover image or the white content below. */
.screen[data-screen="day"] .day-cover-overlay .ico-btn.back,
.screen[data-screen="day"] .day-cover-overlay .cover-menu {
  position: fixed;
  top: calc(14px + env(safe-area-inset-top, 0));
  z-index: 60;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(0, 0, 0, 0.08);
  color: #1a2a3a;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}
.screen[data-screen="day"] .day-cover-overlay .ico-btn.back  { right: 20px; left: auto; }
.screen[data-screen="day"] .day-cover-overlay .cover-menu    { left: 20px; right: auto; }
.day-cover img {
  width: 100%; height: 100%;
  object-fit: cover;
}
/* Now that we no longer overlay text on the image, drop the heavy bottom gradient */
.day-cover-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.32) 0%, transparent 24%, transparent 50%, rgba(0,0,0,.72) 100%);
  pointer-events: none;
}
.day-cover-overlay .ico-btn { pointer-events: auto; }
.day-cover-overlay .ico-btn {
  position: absolute; top: 16px;
}
.day-cover-overlay .ico-btn.back { right: 16px; }
.day-cover-overlay .ico-btn.fav { left: 16px; font-size: 18px; }
.cover-bottom {
  position: absolute; bottom: 16px; right: 16px; left: 16px;
  display: flex; justify-content: space-between; align-items: flex-end;
}
.cover-flag {
  background: rgba(255,255,255,.92);
  padding: 6px 12px; border-radius: 100px;
  font-size: 12px; font-weight: 700;
  color: #1a2a3a;
}
.cover-thumbs {
  display: flex;
  align-items: center;
}
.cover-thumbs img, .cover-thumbs .thumb-more {
  width: 36px; height: 36px;
  border-radius: 12px;
  object-fit: cover;
  border: 2px solid #fff;
  margin-left: -8px;
  box-shadow: 0 2px 6px rgba(0,0,0,.2);
}
.cover-thumbs .thumb-more {
  background: rgba(0,0,0,.6);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
  color: #fff;
}

.day-sheet {
  background: #fff;
  border-radius: 28px 28px 0 0;
  margin-top: -20px;
  position: relative;
  z-index: 1;
  /* Match the 16px cover inset (and the home-screen gutter) so the sheet content
     lines up with the cover image edge above it. */
  padding: 16px 16px 110px;
  min-height: calc(100vh - 230px);
  scrollbar-width: none;
}
.day-sheet::-webkit-scrollbar { display: none; }
.sheet-handle {
  width: 40px; height: 4px;
  background: #d8d8d8;
  border-radius: 100px;
  margin: 4px auto 14px;
}

.day-meta {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  margin-bottom: 18px;
}
.day-meta > div:first-child { min-width: 0; }
/* Weather pill goes below the title block, full-width-ish, self-aligned to start */
.day-meta .weather-pill { align-self: flex-start; }
.day-eyebrow {
  font-size: 11px; color: #6a7888; font-weight: 700;
  margin-bottom: 4px;
}
.day-title {
  font-size: 24px; font-weight: 800;
  margin: 0 0 6px;
  color: #1a2a3a;
  letter-spacing: -0.5px;
  line-height: 1.15;
}
.day-loc { font-size: 13px; font-weight: 500; display: inline-flex; align-items: center; gap: 4px; }
.day-loc svg { width: 13px; height: 13px; }
.cover-info {
  position: absolute;
  right: 16px; bottom: 30px; left: auto;
  max-width: 82%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;   /* RTL: aligns children to the right edge */
  text-align: right;
  pointer-events: none;
  text-shadow: 0 1px 8px rgba(0,0,0,.55);
}
.cover-info .day-eyebrow { color: rgba(255,255,255,.92); margin-bottom: 2px; }
.cover-info .day-title { color: #fff; margin: 0 0 4px; }
.cover-info .day-loc { color: rgba(255,255,255,.92); }
/* Weather glass chip stacked above the day info — like the home hero */
.cover-info .weather-pill {
  position: static;
  margin: 0 0 8px;
  background: rgba(255,255,255,.22);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.32);
  border-radius: 100px;
  padding: 6px 12px;
  gap: 8px;
}
.cover-info .weather-pill .wx-temp,
.cover-info .weather-pill .wx-temp small { color: #fff; }
.cover-info .weather-pill .wx-label { display: none; }
.cover-info .weather-pill .wx-icon { font-size: 16px; }
.cover-info .weather-pill .wx-temp { font-size: 12px; }
.cover-info .weather-pill .wx-rain { font-size: 10px; padding: 2px 7px; }

.weather-pill {
  background: none;
  border: none;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.weather-pill .wx-icon { font-size: 22px; line-height: 1; flex-shrink: 0; }
.weather-pill .wx-temp {
  font-size: 14px; font-weight: 800;
  color: #1a2a3a;
  line-height: 1;
  white-space: nowrap;
}
.weather-pill .wx-temp small {
  font-size: 11px; font-weight: 600; color: #6a7888;
}
.weather-pill .wx-rain {
  font-size: 11px;
  font-weight: 700;
  color: #2962a8;
  background: rgba(41, 98, 168, 0.08);
  padding: 3px 8px;
  border-radius: 100px;
  white-space: nowrap;
}
.weather-pill .wx-label {
  font-size: 11px; color: #8a6d1c; font-weight: 600;
  white-space: nowrap;
  max-width: 90px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.seg2 {
  display: flex; gap: 4px;
  border-bottom: 1px solid #e5e8ec;
  margin-bottom: 16px;
}
.seg2-item {
  flex: 1;
  padding: 10px 0 12px;
  font-size: 13px; font-weight: 600;
  color: #6a7888;
  position: relative;
}
.seg2-item.active { color: #1a2a3a; }
.seg2-item.active::after {
  content: ''; position: absolute;
  bottom: -1px; left: 16%; right: 16%;
  height: 3px; border-radius: 100px;
  background: #f4c447;
}

.tab-content { animation: fadeIn .2s ease; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ========== TAB CONTENT ========== */
.note-pill {
  background: #fff8e0;
  border: 1px solid #f4dca0;
  border-radius: 14px;
  padding: 11px 14px;
  font-size: 13px;
  color: #8a6d1c;
  margin-bottom: 16px;
  display: flex; gap: 8px; align-items: flex-start;
  line-height: 1.5;
}
.note-pill.alert {
  background: #fdecec;
  border-color: #f3b4b4;
  color: #a02020;
  font-weight: 600;
}
.pf-alert { margin: 10px 14px 4px; }

.note-pill.is-editable {
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.note-pill.is-editable:hover {
  background: #fff1c4;
  border-color: #e8c870;
}
.note-pill-text { flex: 1; }
.note-pill-edit {
  flex: 0 0 auto;
  font-size: 14px;
  opacity: 0.7;
}
.add-note-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
  background: #fffaeb;
  border: 1.5px dashed #f4dca0;
  color: #8a6d1c;
  border-radius: 14px;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 16px;
  transition: background .15s, border-color .15s;
}
.add-note-btn:hover {
  background: #fff3d3;
  border-color: #e8c870;
}

.sec-title {
  font-size: 14px; font-weight: 800;
  margin: 18px 0 10px;
  color: #1a2a3a;
  display: flex; justify-content: space-between; align-items: center;
}
.sec-title small { font-size: 11px; font-weight: 600; color: #8a98a8; }

.cta-row { display: flex; gap: 8px; margin-bottom: 16px; }
.cta {
  flex: 1;
  padding: 13px 14px;
  border-radius: 100px;
  font-size: 13px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  transition: transform .12s;
}
.cta:active { transform: scale(0.97); }
.cta.primary { background: #1a2a3a; color: #fff; }
.cta.secondary {
  background: rgba(0,0,0,.05); color: #1a2a3a;
}
.cta.gold {
  background: #f4c447; color: #2a1f00;
}
.cta.cta-naver {
  background: #03c75a; color: #fff;
}

.map-block {
  border-radius: 18px;
  overflow: hidden;
  margin-bottom: 14px;
  background: #f5f7fa;
}
.map-block iframe { width: 100%; height: 220px; border: 0; display: block; }

.day-places { display: flex; flex-direction: column; gap: 8px; }
.dp-card {
  display: flex; gap: 12px;
  background: #f7f8fa;
  border-radius: 16px;
  padding: 10px;
  align-items: stretch;
  border: 1px solid #f0f1f4;
}
.dp-card.must {
  background: linear-gradient(135deg, #fff8e0, #ffffff);
  border-color: #f4dca0;
}
.dp-img {
  flex: 0 0 64px; width: 64px;
  border-radius: 12px;
  background: linear-gradient(135deg, #e0e8f0, #c5d3e0);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  position: relative;
  overflow: hidden;
}
.dp-card.must .dp-img {
  background: linear-gradient(135deg, #f4c447, #e89e30);
}
.dp-card.must .dp-img::before {
  content: '';
  position: absolute;
  top: -2px; right: -2px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23f4c447'%3E%3Cpath d='M12 3l2.5 6 6.5.5-5 4.2L17.6 20 12 16.4 6.4 20 8 13.7l-5-4.2 6.5-.5z'/%3E%3C/svg%3E") center / 11px no-repeat;
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 2px solid #f4c447;
}
.dp-body { flex: 1; min-width: 0; }
.dp-name {
  font-size: 14px; font-weight: 700;
  color: #1a2a3a;
  line-height: 1.3;
}
.dp-en {
  font-size: 11px; color: #8a98a8;
  direction: ltr; text-align: right;
  font-weight: 500;
}
.dp-meta {
  font-size: 11px; color: #6a7888;
  margin-top: 4px;
  display: flex; gap: 8px; flex-wrap: wrap;
}
.dp-notes {
  font-size: 12px; color: #5a6878;
  margin-top: 4px; line-height: 1.4;
}
.dp-actions {
  display: flex; gap: 6px;
  margin-top: 8px;
}
.dp-btn {
  font-size: 11px; font-weight: 700;
  padding: 5px 10px; border-radius: 100px;
  background: rgba(244,196,71,.18);
  color: #8a6d1c;
  display: inline-flex; align-items: center; gap: 4px;
}
.dp-btn svg { width: 13px; height: 13px; flex-shrink: 0; }
.dp-btn svg:last-child { width: 11px; height: 11px; opacity: 0.65; }
.dp-btn.outline {
  background: transparent;
  border: 1px solid #e5e8ec;
  color: #6a7888;
}

/* ============ EXTRA ATTRACTIONS CARD ============ */
.extras-card {
  margin: 18px 0;
  padding: 16px 18px;
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border: 1px solid #f5d98c;
  border-radius: 20px;
  box-shadow: 0 4px 12px rgba(180, 130, 20, 0.06);
}
.extras-header {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 12px;
}
.extras-icon {
  flex: 0 0 40px;
  width: 40px; height: 40px;
  background: #fff;
  border: 1px solid #f5d98c;
  border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 20px;
  box-shadow: 0 2px 6px rgba(0,0,0,.04);
}
.extras-titles { flex: 1; min-width: 0; }
.extras-title {
  font-size: 15px;
  font-weight: 800;
  color: #5a3d0a;
  letter-spacing: -0.2px;
  line-height: 1.2;
}
.extras-sub {
  font-size: 12px;
  font-weight: 500;
  color: #8a6a2a;
  margin-top: 2px;
}
.extras-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.extras-chip {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(245, 217, 140, 0.6);
  border-radius: 12px;
  transition: background .15s ease, border-color .15s ease, transform .1s ease;
  text-decoration: none;
  color: inherit;
  min-height: 44px;
  cursor: pointer;
}
.extras-chip:hover {
  background: #fff;
  border-color: #e0c068;
}
.extras-chip:active { transform: scale(0.98); }
.extras-chip-map {
  flex: 0 0 auto;
  font-size: 14px;
  opacity: 0.7;
  margin-top: 1px;
  transition: opacity .15s ease, transform .15s ease;
}
.extras-chip:hover .extras-chip-map { opacity: 1; transform: scale(1.1); }
.extras-item { display: flex; flex-direction: column; gap: 6px; }
.extras-site-link {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 2px;
  margin-right: 16px;
  padding: 4px 10px;
  background: #fff;
  border: 1px solid #e0c068;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  color: #8a6d1c;
  text-decoration: none;
  word-break: break-all;
}
.extras-site-link:hover { background: #fffaeb; color: #6a5520; }
.extras-site-link:active { transform: scale(0.98); }
.extras-chip-dot {
  flex: 0 0 auto;
  width: 6px; height: 6px;
  background: #c89000;
  border-radius: 50%;
  margin-top: 8px;
  font-size: 0; /* hide the • char, use the box itself */
}
.extras-chip-text {
  font-size: 13px;
  font-weight: 600;
  color: #3a2a0a;
  line-height: 1.45;
  flex: 1;
}

/* ========== BOTTOM PILL NAV ========== */
.bot-pill {
  position: absolute; bottom: 16px; left: 50%;
  transform: translateX(-50%);
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(0,0,0,.06);
  border-radius: 100px;
  padding: 8px 10px;
  display: flex; gap: 4px;
  box-shadow: 0 8px 20px rgba(0,0,0,.12);
  z-index: 50;
}
@media (max-width: 599px) {
  .bot-pill {
    bottom: calc(16px + env(safe-area-inset-bottom));
  }
}
.bp-item {
  width: 44px; height: 44px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 18px;
  color: #5a6878;
  transition: all .15s;
}
.bp-item.active {
  background: #1a2a3a;
  color: #fff;
}
.bp-item:active { transform: scale(0.94); }

[hidden] { display: none !important; }

/* ========== CALENDAR SCREEN ========== */
.screen[data-screen="calendar"] { background: #fff; }
.cal-head {
  padding: 8px 24px 14px;
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 12px;
}
.cal-title {
  font-size: 28px; font-weight: 800;
  margin: 0; letter-spacing: -1px;
  color: #1a2a3a;
}
.cal-title em {
  font-style: normal;
  background: #f4c447; color: #2a1f00;
  padding: 0 10px 2px; border-radius: 8px;
}
.cal-sub {
  font-size: 12px; color: #5a7090;
  font-weight: 600; margin-top: 4px;
}

.cal-legend {
  display: flex; gap: 8px;
  padding: 0 24px 14px;
  overflow-x: auto;
  scrollbar-width: none;
}
.cal-legend::-webkit-scrollbar { display: none; }
.cal-legend .lg {
  flex: 0 0 auto;
  padding: 5px 11px;
  border-radius: 100px;
  font-size: 11px; font-weight: 700;
  white-space: nowrap;
  display: inline-flex; align-items: center; gap: 5px;
}
.cal-legend .dot {
  width: 8px; height: 8px; border-radius: 50%;
}

.cal-months { padding: 0 16px 110px; flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.cal-months::-webkit-scrollbar { display: none; }

.cal-month {
  margin-bottom: 22px;
  background: #fafbfc;
  border-radius: 22px;
  padding: 16px 12px;
  border: 1px solid #f0f1f4;
}
.cal-month-name {
  font-size: 16px; font-weight: 800;
  text-align: center;
  margin: 0 0 12px;
  color: #1a2a3a;
}
.cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 8px;
}
.cal-weekdays span {
  text-align: center;
  font-size: 10px; font-weight: 700;
  color: #8a98a8;
  padding: 4px 0;
}
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.cal-cell {
  aspect-ratio: 1 / 1.15;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #f0f1f4;
  padding: 5px 4px;
  display: flex; flex-direction: column;
  justify-content: space-between;
  cursor: default;
  transition: transform .12s;
  position: relative;
  overflow: hidden;
  min-height: 56px;
}
.cal-cell.empty { background: transparent; border: none; opacity: 0; pointer-events: none; }
.cal-cell.outside { background: #f5f6f8; opacity: 0.55; }
.cal-cell.outside .cd-num { color: #aab2bc; }
.cal-cell.trip { cursor: pointer; }
.cal-cell.trip:active { transform: scale(0.94); }
.cal-cell.trip.jp { background: linear-gradient(135deg, #ffe4e8, #ffd0d6); border-color: #ffc8d0; }
.cal-cell.trip.kr { background: linear-gradient(135deg, #dde6f5, #c5d2e8); border-color: #b8c8e0; }

.cd-top {
  display: flex; justify-content: space-between; align-items: flex-start;
}
.cd-num {
  font-size: 12px; font-weight: 700;
  color: #1a2a3a;
  line-height: 1;
}
.cd-day-num {
  font-size: 8px; font-weight: 700;
  background: rgba(0,0,0,0.08);
  color: #5a6878;
  padding: 1px 4px; border-radius: 4px;
  line-height: 1.2;
}
.cd-city {
  font-size: 9px;
  font-weight: 700;
  color: #1a2a3a;
  text-align: center;
  line-height: 1.1;
  word-break: break-word;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.cd-tint {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 4px;
}

/* Region tints */
.t-tokyo    { background: #f5908a; }
.t-onsen    { background: #6b9a7a; }
.t-kyoto    { background: #d97050; }
.t-otsu     { background: #5a8ab0; }
.t-ine      { background: #7090b0; }
.t-osaka    { background: #6a4a90; }
.t-nara     { background: #8aa078; }
.t-kobe     { background: #3a5878; }
.t-island   { background: #4a9a9a; }
.t-hiroshima{ background: #6a85a0; }
.t-fukuoka  { background: #d97840; }
.t-beppu    { background: #8a7aa8; }
.t-seoul    { background: #2a3a78; }
.t-busan    { background: #4a7ab0; }
.t-jeju     { background: #4a9a78; }
.t-flight   { background: #6a8aa8; }

/* Live weather indicators */
.j-wx .wx-live-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #2ecc71;
  display: inline-block;
  box-shadow: 0 0 0 2px rgba(255,255,255,.7);
  animation: wxpulse 1.6s ease-in-out infinite;
}
@keyframes wxpulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.2); }
}
.weather-pill.is-live {
  position: relative;
}

/* ============ SETTINGS SHEET ============ */
/* ============ SETTINGS SHEET — refined design ============ */
.sheet-mask {
  position: fixed; inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 200;
  animation: fadeBg .25s ease;
}
@keyframes fadeBg { from { opacity: 0; } to { opacity: 1; } }

.settings-sheet {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(180deg, #ffffff 0%, #f7f8fb 100%);
  border-radius: 28px 28px 0 0;
  padding: max(8px, env(safe-area-inset-top, 0)) 20px max(20px, env(safe-area-inset-bottom));
  z-index: 201;
  max-height: min(92vh, calc(100vh - 44px));
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  box-shadow: 0 -24px 60px rgba(15, 23, 42, 0.22);
  animation: slideUp .32s cubic-bezier(.2, .8, .2, 1);
}
.settings-sheet::-webkit-scrollbar { display: none; }
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }

.ss-handle {
  width: 44px; height: 5px;
  background: #cfd5de;
  border-radius: 100px;
  margin: 6px auto 14px;
}
.ss-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 18px;
  padding: 0 4px;
}
.ss-title {
  font-size: 18px; font-weight: 800;
  margin: 0;
  color: #0f172a;
  letter-spacing: -0.3px;
}
.ss-close {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: #eef0f5;
  border: 0;
  font-size: 14px; font-weight: 700;
  color: #475569;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .15s ease;
}
.ss-close:hover { background: #e0e4ec; }
.ss-close:active { transform: scale(0.94); }

.ss-section {
  margin-bottom: 18px;
}
.ss-section:last-child { margin-bottom: 4px; }
.ss-section-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #94a3b8;
  margin: 0 4px 8px;
}
.ss-group {
  background: #fff;
  border: 1px solid #e8ecef;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
}
.ss-group .ss-item + .ss-item {
  border-top: 1px solid #f1f3f6;
}

.ss-item {
  display: flex; align-items: center; gap: 14px;
  width: 100%;
  min-height: 60px;
  padding: 12px 14px;
  background: transparent;
  border: 0;
  text-align: right;
  cursor: pointer;
  transition: background .15s ease;
  font: inherit;
}
.ss-item:hover { background: #f8fafc; }
.ss-item:active { background: #eef2f7; }
.ss-item:focus-visible {
  outline: 2px solid #6366f1;
  outline-offset: -2px;
}

.ss-ico {
  flex: 0 0 40px; width: 40px; height: 40px;
  border-radius: 12px;
  background: #f1f5f9;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 19px;
  transition: background .2s ease, transform .2s ease;
}
/* Tint icons per section/category — subtle, not loud */
.ss-ico-name   { background: #fce7f3; }   /* pink for personal name */
.ss-ico-trip   { background: #e0e7ff; }   /* indigo for travel */
.ss-ico-edit   { background: #fef3c7; }   /* amber for edit */
.ss-ico-reset  { background: #ffe4e6; }   /* rose for destructive-ish */
.ss-ico-dark   { background: #1e293b; color: #fbbf24; }  /* slate for dark mode */
.ss-ico-dev    { background: #f1f5f9; color: #475569; }
.ss-ico-info   { background: #dbeafe; }   /* blue for info */
.ss-ico-support{ background: #d1fae5; }   /* green for support */
.ss-ico-preflight { background: #ccf2ea; }  /* teal for pre-flight */
/* Settings-menu icons (SVG) — sized + tinted to match each row's category */
.ss-ico svg { width: 22px; height: 22px; display: block; }
.ss-ico-name svg      { color: #be185d; }
.ss-ico-trip svg      { color: #4f46e5; }
.ss-ico-preflight svg { color: #0d9488; }
.ss-ico-edit svg      { color: #b45309; }
.ss-ico-reset svg     { color: #be123c; }
.ss-ico-dev svg       { color: #475569; }
.ss-ico-info svg      { color: #1d4ed8; }
.ss-ico-support svg   { color: #047857; }
.ss-ico-terms svg, .ss-ico-privacy svg, .ss-ico-a11y svg { color: #475569; }

.ss-text {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column;
  gap: 2px;
}
.ss-text b {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.25;
  letter-spacing: -0.1px;
}
.ss-text small {
  font-size: 12px;
  font-weight: 500;
  color: #64748b;
  line-height: 1.35;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Chevron indicator on navigation items */
.ss-chev {
  flex: 0 0 auto;
  font-size: 20px;
  font-weight: 700;
  color: #cbd5e1;
  margin-right: -2px;
  transform: scaleX(-1); /* RTL: point left */
  transition: color .15s ease, transform .15s ease;
  line-height: 1;
}
.ss-item:hover .ss-chev { color: #475569; }

/* Toggle pill for edit-mode item */
.ss-toggle {
  flex: 0 0 auto;
  width: 40px; height: 24px;
  background: #cbd5e1;
  border-radius: 100px;
  position: relative;
  transition: background .2s ease;
}
.ss-toggle::before {
  content: '';
  position: absolute;
  top: 2px; right: 2px;
  width: 20px; height: 20px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0,0,0,.15);
  transition: transform .25s cubic-bezier(.2, .8, .2, 1);
}
.ss-item.is-active .ss-toggle { background: #10b981; }
.ss-item.is-active .ss-toggle::before { transform: translateX(-16px); }

/* "Set" state — indicates a custom value is configured */
.ss-item.is-set .ss-text small {
  color: #059669;
  font-weight: 600;
}

/* Destructive action styling */
.ss-item-danger .ss-text b { color: #b91c1c; }
.ss-item-danger:hover { background: #fef2f2; }
.ss-item-danger .ss-chev { color: #fca5a5; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .settings-sheet, .sheet-mask,
  .ss-item, .ss-toggle, .ss-toggle::before, .ss-chev, .ss-ico {
    animation: none !important;
    transition: none !important;
  }
}

/* ============ DAY NAV ARROWS (prev / next) ============ */
/* Sticky pill buttons at the bottom of the day screen, sitting just above the
   bottom nav bar (which is ~64–72px tall + safe-area). */
.day-nav-arrow {
  position: fixed;
  bottom: calc(80px + env(safe-area-inset-bottom, 0));
  z-index: 55;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(0, 0, 0, 0.08);
  color: #1a2a3a;
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
  transition: transform .15s ease, background .15s ease;
}
.day-nav-arrow:hover { background: #fff; transform: scale(1.08); }
.day-nav-arrow:active { transform: scale(0.92); }
.day-nav-arrow[hidden] { display: none !important; }
/* RTL: prev (older day) lives on the RIGHT, next on the LEFT */
.day-nav-prev { right: max(16px, env(safe-area-inset-right, 0)); }
.day-nav-next { left:  max(16px, env(safe-area-inset-left, 0)); }
/* Mid-size viewport: device frame is centered at 430px max-width — anchor inside it */
@media (min-width: 600px) and (max-width: 1023px) {
  .day-nav-prev { right: calc(50% - 199px); left: auto; }
  .day-nav-next { left:  calc(50% - 199px); right: auto; }
}
/* Wide desktop: device frame drops away (full-width). Use generous edge padding. */
@media (min-width: 1024px) {
  .day-nav-prev { right: 32px; left: auto; }
  .day-nav-next { left:  32px; right: auto; }
}
[data-theme="dark"] .day-nav-arrow {
  background: rgba(26, 34, 48, 0.95);
  color: #f1f5f9;
  border-color: rgba(255, 255, 255, 0.12);
}

/* ============ SCROLL LOCK (when sheet/modal is open) ============ */
body.scroll-locked {
  overflow: hidden;
  /* iOS Safari: position:fixed truly locks the page from rubber-band scrolling */
  position: fixed;
  top: 0; left: 0; right: 0;
  width: 100%;
}
/* Disable all interaction inside the device frame so scrollable containers
   (.content-pad, .day-sheet) don't receive touchmove behind the open sheet. */
body.scroll-locked .device {
  pointer-events: none;
  overflow: hidden;
  touch-action: none;
}
/* …but the sheets / masks / modals THEMSELVES live inside .device in this
   layout — re-enable interaction on them so they stay clickable. */
body.scroll-locked .sheet-mask,
body.scroll-locked .settings-sheet,
body.scroll-locked .currency-sheet,
body.scroll-locked .edit-modal,
body.scroll-locked .tour-modal,
body.scroll-locked .about-modal,
body.scroll-locked .onboarding-modal,
body.scroll-locked .ios-install-dialog {
  pointer-events: auto;
  touch-action: auto;
}

/* ============ CURRENCY CONVERTER SHEET ============ */
.currency-sheet {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(180deg, #ffffff 0%, #f7f8fb 100%);
  border-radius: 28px 28px 0 0;
  padding: 8px 20px max(20px, env(safe-area-inset-bottom));
  z-index: 201;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 -24px 60px rgba(15, 23, 42, 0.22);
  animation: slideUp .32s cubic-bezier(.2, .8, .2, 1);
}
[data-theme="dark"] .currency-sheet {
  background: linear-gradient(180deg, #1a2230 0%, #141a24 100%);
  color: var(--c-text-primary);
}
[data-theme="dark"] .currency-sheet .ss-title { color: var(--c-text-primary); }

.cv-body {
  display: flex; flex-direction: column;
  gap: 14px;
  padding: 6px 4px 12px;
}
.cv-row {
  display: flex; flex-direction: column;
  gap: 6px;
}
.cv-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--c-text-muted);
}
.cv-body input[type="number"],
.cv-body select {
  width: 100%;
  padding: 14px 14px;
  border: 1px solid var(--c-border);
  border-radius: 14px;
  font-size: 17px;
  font-weight: 600;
  background: var(--c-bg-card);
  color: var(--c-text-primary);
  font-family: inherit;
  direction: ltr;
  text-align: left;
  appearance: none;
  -webkit-appearance: none;
}
.cv-body select { text-align: right; direction: rtl; }
.cv-body input:focus, .cv-body select:focus {
  outline: none;
  border-color: var(--c-accent);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, .12);
}
.cv-swap {
  align-self: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--c-bg-card);
  border: 1px solid var(--c-border);
  font-size: 18px;
  color: var(--c-text-primary);
  cursor: pointer;
  transition: transform .2s ease, background .15s ease;
  margin: -4px 0;
}
.cv-swap:hover { background: var(--c-bg-muted); transform: rotate(180deg); }
/* Amount + currency on one line; either row can be typed into (bidirectional) */
.cv-pair { display: flex; gap: 10px; align-items: stretch; }
.cv-body input.cv-amount {
  flex: 1; min-width: 0;
  font-size: 22px; font-weight: 800;
  direction: ltr; text-align: right;
}
.cv-body select.cv-cur {
  flex: 0 0 118px; width: 118px;
  direction: ltr; text-align: center; text-align-last: center;
  font-size: 16px; font-weight: 800;
  padding-left: 12px; padding-right: 12px;
}
.cv-rate { text-align: center; margin-top: 2px; }
.cv-result-card {
  margin-top: 6px;
  padding: 18px 16px;
  border-radius: 18px;
  background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
  border: 1px solid #c7d2fe;
  text-align: center;
}
[data-theme="dark"] .cv-result-card {
  background: linear-gradient(135deg, #1e2541 0%, #2a3554 100%);
  border-color: #4a5578;
}
.cv-result-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--c-text-muted);
  margin-bottom: 6px;
}
.cv-result {
  font-size: 32px;
  font-weight: 900;
  color: var(--c-text-primary);
  letter-spacing: -0.5px;
  direction: ltr;
  line-height: 1.1;
}
.cv-rate {
  font-size: 12px;
  font-weight: 600;
  color: var(--c-text-muted);
  margin-top: 6px;
  direction: ltr;
}
.cv-source {
  font-size: 11px;
  color: var(--c-text-faint);
  text-align: center;
  margin: 4px 0 0;
}
.cv-source a {
  color: var(--c-accent);
  text-decoration: underline;
  cursor: pointer;
}

/* ============ SKELETON LOADERS (shimmer placeholders) ============ */
.is-skeleton {
  position: relative;
  overflow: hidden;
  background: #e6e8ec;
  background-image: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.6) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  background-size: 200% 100%;
  background-position: -100% 0;
  animation: skeleton-shimmer 1.2s ease-in-out infinite;
}
.is-skeleton > * { visibility: hidden; }
@keyframes skeleton-shimmer {
  to { background-position: 200% 0; }
}
[data-theme="dark"] .is-skeleton {
  background-color: #2a3441;
  background-image: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.08) 50%,
    rgba(255, 255, 255, 0) 100%
  );
}
@media (prefers-reduced-motion: reduce) {
  .is-skeleton { animation: none; }
}

/* Skeleton rows for text blocks */
.skel-row {
  height: 12px;
  border-radius: 6px;
  background: #e6e8ec;
  animation: skeleton-shimmer 1.2s ease-in-out infinite;
  background-image: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,.6) 50%, rgba(255,255,255,0) 100%);
  background-size: 200% 100%;
}
[data-theme="dark"] .skel-row { background-color: #2a3441; }
.skel-row + .skel-row { margin-top: 6px; }
.skel-row.w-60 { width: 60%; }
.skel-row.w-80 { width: 80%; }
.skel-row.w-40 { width: 40%; }

/* ============ OFFLINE BANNER ============ */
/* Floats at the TOP of the screen as a slim pill — doesn't cover the header
   (sits above it), and is purely informational: pointer-events disabled so it
   never blocks clicks on the buttons / sheets below. */
.offline-banner {
  position: fixed;
  top: max(12px, env(safe-area-inset-top, 0));
  left: 50%;
  transform: translateX(-50%);
  z-index: 150;
  background: #475569;
  color: #f1f5f9;
  font-size: 12px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 100px;
  box-shadow: 0 6px 16px rgba(0,0,0,.22);
  display: inline-flex; align-items: center; gap: 8px;
  animation: offlineIn .3s cubic-bezier(.2, .8, .2, 1);
  max-width: calc(100vw - 32px);
  white-space: nowrap;
  pointer-events: none;  /* informational only — never blocks taps below */
}
@keyframes offlineIn { from { transform: translate(-50%, -20px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }
.ob-ico { font-size: 14px; }
[data-theme="dark"] .offline-banner { background: #334155; color: #f1f5f9; }

/* ============ EDIT-MODE BANNER ============ */
.edit-mode-banner {
  position: fixed;
  top: max(12px, env(safe-area-inset-top, 0));
  left: 50%;
  transform: translateX(-50%);
  z-index: 160;
  background: linear-gradient(135deg, #f4c447, #e89e30);
  color: #2a1f00;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 8px 8px 16px;
  border-radius: 100px;
  box-shadow: 0 6px 18px rgba(232, 158, 48, .42), 0 2px 6px rgba(0,0,0,.1);
  display: inline-flex; align-items: center; gap: 10px;
  animation: editBannerIn .3s cubic-bezier(.2, .8, .2, 1), editBannerPulse 2.4s ease-in-out 0.5s infinite;
  max-width: calc(100vw - 32px);
}
.edit-mode-banner .emb-ico { font-size: 16px; line-height: 1; }
.edit-mode-banner .emb-text { white-space: nowrap; }
.edit-mode-banner .emb-exit {
  background: rgba(42,31,0,.92);
  color: #ffd97a;
  border: none;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 100px;
  cursor: pointer;
  min-height: 32px;
  display: inline-flex; align-items: center;
  transition: background .15s, transform .12s;
}
.edit-mode-banner .emb-exit:hover { background: #1a1300; }
.edit-mode-banner .emb-exit:active { transform: scale(0.96); }
@keyframes editBannerIn {
  from { opacity: 0; transform: translate(-50%, -8px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}
@keyframes editBannerPulse {
  0%, 100% { box-shadow: 0 6px 18px rgba(232, 158, 48, .42), 0 2px 6px rgba(0,0,0,.1); }
  50% { box-shadow: 0 6px 18px rgba(232, 158, 48, .42), 0 0 0 6px rgba(244, 196, 71, .25); }
}
/* Hide when offline banner is also showing (avoid stacking) — offline pushes edit below */
body.is-offline .edit-mode-banner {
  top: calc(max(12px, env(safe-area-inset-top, 0)) + 44px);
}
@media (prefers-reduced-motion: reduce) {
  .edit-mode-banner { animation: editBannerIn .2s ease-out; }
}

/* ============ TOAST (UNDO etc.) ============ */
.toast-host {
  position: fixed;
  /* Sits clearly above the bottom nav bar (~70px + safe area), not behind it */
  bottom: calc(env(safe-area-inset-bottom, 0px) + 100px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 280;
  display: flex; flex-direction: column;
  gap: 8px;
  pointer-events: none;
  width: min(360px, 92vw);
}
.toast {
  pointer-events: auto;
  display: flex; align-items: center; gap: 12px;
  background: #1a2230;
  color: #f1f5f9;
  border-radius: 14px;
  padding: 12px 14px;
  box-shadow: 0 12px 28px rgba(0,0,0,.35);
  animation: toastIn .25s cubic-bezier(.2, .8, .2, 1);
  font-size: 14px;
  font-weight: 600;
}
.toast-text { flex: 1; min-width: 0; }
.toast-action {
  flex: 0 0 auto;
  background: rgba(255,255,255,.15);
  color: #f1f5f9;
  border: 0;
  padding: 6px 12px;
  border-radius: 100px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s ease;
}
.toast-action:hover { background: rgba(255,255,255,.25); }
.toast.fading { animation: toastOut .25s ease forwards; }
@keyframes toastIn { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes toastOut { to { transform: translateY(20px); opacity: 0; } }

/* ============ DARK MODE OVERRIDES ============ */
[data-theme="dark"] .settings-sheet,
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) body { color: var(--c-text-primary); }
}
[data-theme="dark"] .settings-sheet,
:root:not([data-theme="light"]):not([data-theme="dark"]) {}

/* Settings sheet dark */
:where([data-theme="dark"], :root:not([data-theme="light"]):where(*)) {}

[data-theme="dark"] .device { background: var(--c-bg-app); }
[data-theme="dark"] .settings-sheet {
  background: linear-gradient(180deg, #1a2230 0%, #141a24 100%);
  color: var(--c-text-primary);
}
[data-theme="dark"] .ss-handle { background: #475569; }
[data-theme="dark"] .ss-title,
[data-theme="dark"] .ss-text b { color: var(--c-text-primary); }
[data-theme="dark"] .ss-text small,
[data-theme="dark"] .ss-section-label { color: var(--c-text-muted); }
[data-theme="dark"] .ss-group {
  background: var(--c-bg-card);
  border-color: var(--c-border);
}
[data-theme="dark"] .ss-group .ss-item + .ss-item { border-top-color: #232b38; }
[data-theme="dark"] .ss-item:hover { background: #232b38; }
[data-theme="dark"] .ss-close {
  background: #2a3441; color: #cbd5e1;
}

/* Cards on dark mode */
[data-theme="dark"] .hotel-card,
[data-theme="dark"] .dp-card,
[data-theme="dark"] .extras-card,
[data-theme="dark"] .pf-section,
[data-theme="dark"] .pf-hero,
[data-theme="dark"] .about-card,
[data-theme="dark"] .onboarding-card,
[data-theme="dark"] .edit-card {
  background: var(--c-bg-card);
  border-color: var(--c-border);
  color: var(--c-text-primary);
}

/* Day screen dark */
[data-theme="dark"] .screen[data-screen="day"] { background: var(--c-bg-app); }
[data-theme="dark"] .day-sheet { background: var(--c-bg-app); }

/* Generic muted surfaces */
[data-theme="dark"] .note-pill {
  background: #1f2937;
  color: var(--c-text-primary);
  border-color: var(--c-border);
}

/* === Dark mode: comprehensive text color overrides === */
[data-theme="dark"] {
  /* Headings + bold text on dark backgrounds */
  & .page-title, & .hero-mega, & .hero-stamp,
  & .day-title, & .day-eyebrow, & .day-loc,
  & .hl-name, & .hl-day, & .hl-loc, & .hl-en,
  & .dp-name, & .dp-en, & .dp-sub, & .dp-notes, & .dp-meta,
  & .hotel-name, & .hotel-name-jp, & .hotel-area, & .hotel-note, & .hotel-eyebrow,
  & .ch-name, & .ch-meta, & .ch-num, & .ch-emoji,
  & .extras-title, & .extras-chip-text,
  & .pf-hero-title, & .pf-hero-sub, & .pf-sec-title, & .pf-item-title, & .pf-note,
  & .route-city, & .route-meta,
  & .cal-title, & .lg, & .seg-item,
  & .qa-name, & .qa-ico,
  & .stats-strip .stat-num, & .stats-strip .stat-label,
  & .ss-text b, & .ss-title,
  & .about-title, & .about-tagline, & .about-stat-num, & .about-feature b,
  & .onboarding-title, & .onboarding-sub,
  & .tour-title, & .tour-body,
  & .loc-line,
  & .home-section-title,
  & .pf-filter, & .extras-sub, & .pf-sec-count,
  & .quote-card, & .install-banner b, & .install-banner small,
  & .edit-title, & .edit-label, & input, & textarea, & select,
  & .kr-map-note-title, & .kr-map-note-body,
  & .kr-app-btn,
  & .ico-btn,
  & .seg-item.active,
  & .hero-progress {
    color: var(--c-text-primary);
  }
  /* Secondary text — slightly dimmer */
  & .day-loc, & .hl-loc, & .hl-day, & .dp-sub, & .dp-notes, & .dp-meta,
  & .hotel-area, & .hotel-note, & .pf-note, & .extras-sub, & .pf-sec-count,
  & .ch-meta, & .about-tagline, & .onboarding-sub, & .tour-body,
  & .about-stat-lbl, & .about-feature small, & .ss-text small,
  & .route-meta, & .install-banner small {
    color: var(--c-text-muted);
  }
  /* Backgrounds on inputs and pills */
  & input[type="text"], & input[type="date"], & input[type="number"], & textarea, & select {
    background: var(--c-bg-card);
    border-color: var(--c-border);
    color: var(--c-text-primary);
  }
  /* Day journal cards (the list of all days) */
  & .j-card { background: var(--c-bg-card); border-color: var(--c-border); }
  & .j-card * { color: var(--c-text-primary); }
  & .j-card .j-day-sub, & .j-card .j-meta, & .j-card .j-temp { color: var(--c-text-muted); }
  /* Chapter cards */
  & .chapter { background: var(--c-bg-card); border-color: var(--c-border); }
  & .chapter * { color: var(--c-text-primary); }
  & .chapter .ch-meta { color: var(--c-text-muted); }
  /* Quote card */
  & .quote-card { background: var(--c-bg-card); border-color: var(--c-border); }
  /* Pills / segments */
  & .seg-item { background: var(--c-bg-card); color: var(--c-text-muted); border-color: var(--c-border); }
  & .seg-item.active { background: var(--c-brand); color: var(--c-bg-app); }
  /* Topbar links / icon buttons */
  & .ico-btn { background: var(--c-bg-card); color: var(--c-text-primary); border-color: var(--c-border); }
  /* Hero progress / extras card backgrounds need to stay readable */
  & .extras-card { background: linear-gradient(135deg, #2a2418 0%, #3a311f 100%); border-color: #6e5b2a; }
  & .extras-card *, & .extras-chip { color: #f5e6c8; }
  & .extras-chip { background: rgba(0,0,0,.3); border-color: #6e5b2a; }
  /* pf-hero progress */
  & .pf-hero { background: linear-gradient(135deg, #1a3024 0%, #1f3a2a 100%); border-color: #2a5a3a; }
  & .pf-hero * { color: #d6f0c6; }
  /* Korean map note */
  & .kr-map-note { background: linear-gradient(135deg, #1a2438 0%, #1f2a45 100%); border-color: #3a4a78; }
  & .kr-map-note * { color: #d8e9ff; }
  /* Note pill on day */
  & .note-pill { background: var(--c-bg-card); color: var(--c-text-primary); }
}

/* Same overrides when system prefers dark and user hasn't picked light */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    & .page-title, & .hero-mega, & .day-title, & .hl-name, & .dp-name,
    & .hotel-name, & .ch-name, & .extras-title, & .pf-hero-title,
    & .pf-sec-title, & .pf-item-title, & .route-city, & .cal-title,
    & .qa-name, & .ss-text b, & .ss-title, & .about-title,
    & .onboarding-title, & .tour-title, & .home-section-title,
    & .edit-title, & .kr-map-note-title, & .loc-line { color: var(--c-text-primary); }
    & .j-card, & .chapter, & .quote-card, & .ico-btn { background: var(--c-bg-card); border-color: var(--c-border); }
    & .j-card *, & .chapter *, & .ico-btn { color: var(--c-text-primary); }
    & input, & textarea, & select { background: var(--c-bg-card); color: var(--c-text-primary); border-color: var(--c-border); }
  }
}

/* Same overrides for system-pref dark when user hasn't picked light */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .device { background: var(--c-bg-app); }
  :root:not([data-theme="light"]) .settings-sheet {
    background: linear-gradient(180deg, #1a2230 0%, #141a24 100%);
    color: var(--c-text-primary);
  }
  :root:not([data-theme="light"]) .ss-handle { background: #475569; }
  :root:not([data-theme="light"]) .ss-title,
  :root:not([data-theme="light"]) .ss-text b { color: var(--c-text-primary); }
  :root:not([data-theme="light"]) .ss-text small,
  :root:not([data-theme="light"]) .ss-section-label { color: var(--c-text-muted); }
  :root:not([data-theme="light"]) .ss-group {
    background: var(--c-bg-card);
    border-color: var(--c-border);
  }
  :root:not([data-theme="light"]) .hotel-card,
  :root:not([data-theme="light"]) .dp-card,
  :root:not([data-theme="light"]) .extras-card,
  :root:not([data-theme="light"]) .about-card,
  :root:not([data-theme="light"]) .onboarding-card,
  :root:not([data-theme="light"]) .edit-card {
    background: var(--c-bg-card);
    border-color: var(--c-border);
    color: var(--c-text-primary);
  }
  :root:not([data-theme="light"]) .screen[data-screen="day"] { background: var(--c-bg-app); }
  :root:not([data-theme="light"]) .day-sheet { background: var(--c-bg-app); }
}

/* ============ ONBOARDING MODAL ============ */
.onboarding-modal { z-index: 250; }
.onboarding-card {
  max-width: 420px;
  padding: 28px 24px 22px;
  border-radius: 24px;
  background: linear-gradient(180deg, #ffffff 0%, #fafbfd 100%);
  box-shadow: 0 24px 60px rgba(15, 23, 42, .25);
}
.onboarding-hero {
  text-align: center;
  margin-bottom: 20px;
}
.onboarding-emoji {
  width: 64px; height: 64px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, #e0e7ff, #c7d2fe);
  display: flex; align-items: center; justify-content: center;
  font-size: 32px;
  box-shadow: 0 8px 20px rgba(99, 102, 241, .25);
}
.onboarding-title {
  font-size: 22px;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 6px;
  letter-spacing: -0.4px;
}
.onboarding-sub {
  font-size: 14px;
  font-weight: 500;
  color: #64748b;
  margin: 0;
  line-height: 1.45;
}
.onboarding-hint {
  font-size: 12px;
  color: #94a3b8;
  text-align: center;
  margin: 14px 0 6px;
}
.onboarding-card .edit-field {
  margin-bottom: 14px;
}
.onboarding-card input[type="text"],
.onboarding-card input[type="date"] {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 500;
  background: #fff;
  transition: border-color .15s ease, box-shadow .15s ease;
  box-sizing: border-box;
}
.onboarding-card input:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, .12);
}
.onboarding-card .edit-actions {
  margin-top: 18px;
  gap: 10px;
}
.onboarding-card .edit-btn.save {
  flex: 1;
  background: #1a2a3a;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  padding: 13px;
  border-radius: 12px;
}

/* ============ ABOUT MODAL ============ */
.about-modal { z-index: 250; }
.about-card {
  max-width: 440px;
  padding: 24px 22px 18px;
  border-radius: 24px;
  background: linear-gradient(180deg, #ffffff 0%, #fafbfd 100%);
  box-shadow: 0 24px 60px rgba(15, 23, 42, .25);
}
.about-hero {
  text-align: center;
  margin-bottom: 18px;
}
.about-logo {
  width: 64px; height: 64px;
  margin: 0 auto 10px;
  border-radius: 18px;
  background: #1a2a3a;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 24px rgba(26, 42, 58, .22);
}
.about-logo img { width: 40px; height: 40px; }
.about-title {
  font-size: 24px;
  font-weight: 900;
  color: #0f172a;
  margin: 0 0 4px;
  letter-spacing: -0.5px;
}
.about-tagline {
  font-size: 13px;
  font-weight: 500;
  color: #64748b;
  margin: 0;
  line-height: 1.4;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 0 0 18px;
  padding: 12px;
  background: #f1f5f9;
  border-radius: 16px;
}
.about-stat { text-align: center; }
.about-stat-num {
  font-size: 22px;
  font-weight: 900;
  color: #0f172a;
  letter-spacing: -0.5px;
}
.about-stat-lbl {
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  margin-top: 2px;
}

.about-features {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}
.about-feature {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid #eef0f5;
  border-radius: 12px;
}
.about-feature-ico {
  flex: 0 0 36px;
  width: 36px; height: 36px;
  background: #f1f5f9;
  border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 18px;
}
.about-feature-body { flex: 1; min-width: 0; }
.about-feature b {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.3;
}
.about-feature small {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: #64748b;
  line-height: 1.4;
  margin-top: 2px;
}

.about-footer {
  font-size: 11px;
  color: #94a3b8;
  text-align: center;
  margin: 14px 0 6px;
  font-weight: 500;
}
/* ============ PRODUCT TOUR ============ */
.tour-modal { z-index: 260; }
.tour-card {
  max-width: 420px;
  padding: 32px 24px 22px;
  border-radius: 24px;
  text-align: center;
}
.tour-slide { padding: 12px 4px 18px; }
.tour-emoji {
  font-size: 56px;
  margin-bottom: 16px;
  line-height: 1;
}
.tour-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--c-text-primary);
  margin: 0 0 10px;
  letter-spacing: -0.4px;
}
.tour-body {
  font-size: 14px;
  font-weight: 500;
  color: var(--c-text-muted);
  margin: 0;
  line-height: 1.55;
}
.tour-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin: 6px 0 14px;
}
.tour-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #cbd5e1;
  transition: background .2s ease, width .2s ease;
}
.tour-dot.active {
  background: var(--c-brand);
  width: 22px;
  border-radius: 100px;
}
.tour-actions { gap: 10px; }
.tour-actions .edit-btn.cancel {
  flex: 0 0 auto;
  background: transparent;
  color: var(--c-text-muted);
  font-weight: 600;
}
.tour-actions .edit-btn.save {
  flex: 1;
  background: var(--c-brand);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  padding: 13px;
  border-radius: 12px;
}

.about-card .edit-btn.save {
  width: 100%;
  background: #1a2a3a;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  padding: 13px;
  border-radius: 12px;
}

/* ============ HOME DASHBOARD ============ */
.home-section-title {
  font-size: 14px; font-weight: 800;
  margin: 22px 16px 12px;
  color: #1a2a3a;
  display: flex; justify-content: space-between; align-items: center;
}

/* Hero card */
.hero-card {
  margin: 0 16px 18px;
  border-radius: 28px;
  overflow: hidden;
  position: relative;
  height: 240px;
  box-shadow: 0 12px 28px rgba(0,0,0,.18);
  cursor: pointer;
  transition: transform .15s ease;
}
.hero-card:active { transform: scale(0.985); }
.hero-card:focus-visible {
  outline: 2px solid #f4c447;
  outline-offset: 3px;
}
.hero-bg {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
}
.hero-bg::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.05) 0%, rgba(0,0,0,.55) 100%);
}
.hero-content {
  position: absolute; inset: 0;
  padding: 22px 20px;
  display: flex; flex-direction: column; justify-content: flex-end;
  color: #fff;
  z-index: 2;
}
.hero-stamp {
  font-size: 11px; font-weight: 700;
  background: rgba(255,255,255,.22);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.3);
  padding: 5px 11px; border-radius: 100px;
  display: inline-block;
  margin-bottom: 10px;
  align-self: flex-start;
}
.hero-mega {
  font-size: 30px; font-weight: 800;
  line-height: 1.1;
  margin: 0 0 12px;
  letter-spacing: -0.8px;
}
.hero-mega em {
  font-style: normal;
  background: #f4c447;
  color: #2a1f00;
  padding: 0 10px 2px;
  border-radius: 6px;
}
.hero-progress {
  height: 6px;
  background: rgba(255,255,255,.25);
  border-radius: 100px;
  overflow: hidden;
}
.hero-progress-fill {
  height: 100%;
  background: #f4c447;
  border-radius: 100px;
  transition: width .6s cubic-bezier(.4,0,.2,1);
}

/* Top row of the hero: place stamp + live weather chip on one line */
.hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.hero-top .hero-stamp { margin-bottom: 0; }
.hero-wx {
  font-size: 12px; font-weight: 700;
  color: #fff;
  background: rgba(255,255,255,.22);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.3);
  padding: 5px 11px; border-radius: 100px;
  display: inline-flex; align-items: center; gap: 6px;
  white-space: nowrap;
  flex-shrink: 0;
}
.hero-wx[hidden] { display: none; }
.hero-wx-rain {
  font-size: 11px; font-weight: 700;
  color: #d6ecff;
}

/* Focus card (next-up smart card) */
.focus-card {
  margin: 0 16px 18px;
  border-radius: 24px;
  background: #fff;
  border: 1px solid #f0f1f4;
  padding: 14px;
  display: flex; gap: 12px;
  cursor: pointer;
  transition: transform .12s;
  box-shadow: 0 4px 14px rgba(0,0,0,.05);
}
.focus-card:active { transform: scale(0.98); }
.focus-img {
  flex: 0 0 88px;
  width: 88px; height: 88px;
  border-radius: 18px;
  background-size: cover;
  background-position: center;
  position: relative;
  overflow: hidden;
}
.focus-body { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: space-between; }
.focus-eyebrow {
  font-size: 10px; font-weight: 800;
  color: #c89000;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.focus-title {
  font-size: 17px; font-weight: 800;
  margin: 4px 0 4px;
  color: #1a2a3a;
  line-height: 1.2;
}
.focus-meta {
  display: flex; gap: 8px; flex-wrap: wrap;
  font-size: 11px; color: #6a7888;
  font-weight: 500;
}
.focus-meta span { display: inline-flex; gap: 3px; align-items: center; }

/* Stats strip */
.stats-strip {
  display: flex; gap: 6px;
  margin: 0 16px 18px;
  background: linear-gradient(135deg, #fff8e0, #fff2cc);
  border: 1px solid #f0d895;
  border-radius: 20px;
  padding: 12px 14px;
  overflow-x: auto;
  scrollbar-width: none;
}
.stats-strip::-webkit-scrollbar { display: none; }
.stat-item {
  flex: 1; min-width: 60px;
  text-align: center;
  border-left: 1px solid rgba(0,0,0,.06);
  padding: 0 4px;
}
.stat-item:last-child { border-left: none; }
.stat-num {
  font-size: 18px; font-weight: 800;
  color: #1a2a3a;
  line-height: 1;
}
.stat-label {
  font-size: 10px; color: #8a6d1c;
  font-weight: 600;
  margin-top: 4px;
  white-space: nowrap;
}

/* Chapters grid */
.chapters {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 0 16px;
  margin-bottom: 4px;
}
.chapter {
  border-radius: 18px;
  padding: 14px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: transform .15s;
  min-height: 110px;
  display: flex; flex-direction: column; justify-content: space-between;
  box-shadow: 0 4px 12px rgba(0,0,0,.08);
}
.chapter:active { transform: scale(0.97); }
.chapter::before {
  content: ''; position: absolute; inset: 0;
  background: var(--ch-bg, linear-gradient(135deg, #f5b5c0, #6b8aa0));
  opacity: 0.95;
  z-index: 0;
}
.chapter::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 30%, rgba(0,0,0,.4));
  z-index: 1;
}
.chapter > * { position: relative; z-index: 2; color: #fff; }
.ch-num {
  font-size: 10px; font-weight: 800;
  text-transform: uppercase;
  opacity: 0.85;
  letter-spacing: 1px;
}
.ch-emoji { font-size: 32px; line-height: 1; }
.ch-emoji svg { width: 28px; height: 28px; }
.ch-name {
  font-size: 14px; font-weight: 800;
  letter-spacing: -0.3px;
  line-height: 1.2;
}
.ch-meta { font-size: 11px; opacity: 0.9; }

/* Chapter theme backgrounds */
.ch-tokyo    { --ch-bg: linear-gradient(135deg, #f5b8c0, #5a7a98); }
.ch-onsen    { --ch-bg: linear-gradient(135deg, #d8e2d4, #5b8068); }
.ch-kyoto    { --ch-bg: linear-gradient(135deg, #f0c9a8, #8a3a2c); }
.ch-osaka    { --ch-bg: linear-gradient(135deg, #5a4878, #1a1438); }
.ch-island   { --ch-bg: linear-gradient(135deg, #a8d4d5, #2a5a5b); }
.ch-hiroshima{ --ch-bg: linear-gradient(135deg, #c2d2dc, #3a4a58); }
.ch-seoul    { --ch-bg: linear-gradient(135deg, #3a4878, #0a0a28); }
.ch-busan    { --ch-bg: linear-gradient(135deg, #f0a878, #1a3868); }
.ch-jeju     { --ch-bg: linear-gradient(135deg, #bcdcd2, #2a4a48); }
.ch-ine      { --ch-bg: linear-gradient(135deg, #a8c2d8, #2a3e55); }

/* Quick actions */
.quick-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 0 16px;
  margin-bottom: 18px;
}
.qa {
  background: #fff;
  border: 1px solid #ecedf0;
  border-radius: 18px;
  padding: 14px 14px 12px;
  display: flex; flex-direction: column;
  gap: 6px;
  text-align: right;
  transition: all .12s;
}
.qa:hover, .qa:active { background: #f7f8fa; transform: translateY(-2px); }
.qa-ico { font-size: 24px; line-height: 1; display: inline-flex; align-items: center; justify-content: center; }
.qa-ico svg { width: 24px; height: 24px; display: block; }
.qa.qa-today .qa-ico svg { width: 22px; height: 22px; }
.bn-ico svg { width: 22px; height: 22px; display: block; }
.qa-name { font-size: 14px; font-weight: 800; color: #1a2a3a; }
.qa small { font-size: 11px; color: #6a7888; font-weight: 500; }

/* Quote */
.quote-card {
  margin: 22px 16px 0;
  padding: 18px 18px;
  background: linear-gradient(135deg, #1a2a3a, #2a4a78);
  color: #fff;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.6;
  text-align: center;
  font-style: italic;
  position: relative;
}
.quote-card::before {
  content: '"';
  position: absolute;
  top: -10px; right: 16px;
  font-size: 60px;
  font-style: normal;
  color: #f4c447;
  line-height: 1;
  font-family: Georgia, serif;
}

/* ============ HIGHLIGHTS / ROUTE / PRE-FLIGHT ============ */
.cal-title { font-family: 'Rubik', sans-serif; font-size: 22px; font-weight: 800; margin: 0; }
.cal-title em { font-style: normal; background: #f4c447; color: #2a1f00; padding: 0 8px 2px; border-radius: 6px; }

.highlights-list { padding: 0 20px 100px; display: flex; flex-direction: column; gap: 12px; }
.hl-card {
  display: flex; gap: 12px;
  background: #fff; border: 1px solid #f0d895;
  border-radius: 18px; padding: 12px;
  cursor: pointer;
  position: relative;
}
.hl-card:active { transform: scale(0.98); }
.hl-img {
  flex: 0 0 72px; width: 72px; height: 72px;
  border-radius: 14px;
  background-size: cover; background-position: center;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px;
  color: #fff;
}
.hl-body { flex: 1; min-width: 0; }
.hl-day { font-size: 10px; color: #c89000; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; }
.hl-name { font-size: 15px; font-weight: 800; margin: 4px 0 2px; color: #1a2a3a; line-height: 1.25; }
.hl-en { font-size: 11px; color: #8a98a8; direction: ltr; text-align: right; }
.hl-loc { font-size: 11px; color: #6a7888; margin-top: 4px; }

.route-list { padding: 0 20px 100px; }
.route-item {
  display: flex; gap: 14px;
  padding: 14px 0;
  border-bottom: 1px dashed #ecedf0;
  cursor: pointer;
  align-items: flex-start;
}
.route-item:last-child { border-bottom: none; }
.route-num {
  flex: 0 0 32px;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: #1a2a3a;
  color: #fff;
  font-size: 12px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
.route-num::after {
  content: ''; position: absolute;
  top: 32px; right: 50%; transform: translateX(50%);
  width: 2px; height: 30px;
  background: #ecedf0;
  display: block;
}
.route-item:last-child .route-num::after { display: none; }
.route-info { flex: 1; }
.route-city { font-size: 15px; font-weight: 800; color: #1a2a3a; }
.route-meta { font-size: 12px; color: #6a7888; margin-top: 2px; }
.route-flag { font-size: 11px; padding: 3px 8px; border-radius: 100px; font-weight: 700; display: inline-block; margin-top: 4px; }
.route-flag.jp { background: #fee2e2; color: #b91c1c; }
.route-flag.kr { background: #dbeafe; color: #1e40af; }

#routeMap iframe { width: 100%; height: 280px; border: 0; }

/* Korea map note + day route map */
.kr-map-note {
  margin: 0 16px 12px;
  padding: 14px 16px;
  background: linear-gradient(135deg, #eef5ff, #d8e9ff);
  border: 1px solid #b9d4f5;
  border-radius: 16px;
  color: #1a2a3a;
}
.kr-map-note-title { font-size: 14px; font-weight: 800; letter-spacing: -0.2px; }
.kr-map-note-body { font-size: 12px; font-weight: 500; color: #2a4a6a; line-height: 1.5; margin-top: 4px; }
.kr-map-note-apps { display: flex; gap: 8px; margin-top: 10px; }
.kr-app-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 12px;
  background: #fff;
  border: 1px solid #b9d4f5;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 700;
  color: #1a2a3a;
  text-decoration: none;
  transition: background .15s ease, transform .1s ease;
}
.kr-app-btn:hover { background: #f0f6ff; }
.kr-app-btn:active { transform: scale(0.97); }

.kr-map-loading,
.kr-map-empty {
  display: flex; align-items: center; justify-content: center;
  height: 100%; min-height: 200px;
  color: #6a7888; font-size: 13px; font-weight: 600;
  background: #eef2f6;
}

/* Korea day map: same height + interaction style as the trip route map */
.screen[data-screen="day"] .map-block.leaflet-container {
  height: 280px;
}
#routeMap {
  width: calc(100% - 32px);
  margin: 0 16px 16px;
  height: 380px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid #e6e8ec;
  box-shadow: 0 6px 18px rgba(26,42,58,.08);
  background: #eef2f6;
}
/* Contain Leaflet's internal z-indexes (panes/controls reach 1000) within the map's
   own stacking context, so the map never paints over sheets/modals layered above it
   — e.g. the settings sheet (z-index 201) or any dialog opened from the map screen. */
.leaflet-container { isolation: isolate; }

/* Leaflet numbered chapter markers */
.route-marker { background: transparent; border: 0; }
.rm-pin {
  position: relative;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--ring, #1a2a3a);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 3px 10px rgba(0,0,0,.25);
  cursor: pointer;
}
.rm-num {
  font-family: 'Rubik', sans-serif;
  font-weight: 900;
  font-size: 14px;
  color: #1a2a3a;
  line-height: 1;
}
.rm-label {
  position: absolute;
  bottom: calc(100% + 6px);
  right: 50%;
  transform: translateX(50%);
  white-space: nowrap;
  font-family: 'Rubik', sans-serif;
  font-size: 11px;
  font-weight: 700;
  color: #1a2a3a;
  background: #fff;
  border: 1px solid #e6e8ec;
  padding: 3px 8px;
  border-radius: 100px;
  box-shadow: 0 2px 6px rgba(0,0,0,.12);
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s ease;
}
.rm-pin:hover .rm-label { opacity: 1; }

/* Hotel marker — gold ring with hotel emoji, sits alongside the route without being part of it */
.rm-pin-hotel {
  background: #fff7e0;
}
.rm-pin-hotel .rm-num { font-size: 16px; line-height: 1; }
.rm-pin-hotel .rm-label {
  background: #fff7e0;
  border-color: #e0c068;
  color: #5a3d0a;
}

/* Chapter legend chips below the map */
.route-list { padding: 0 16px 100px; display: flex; flex-direction: column; gap: 8px; }
.route-chip {
  display: flex; gap: 12px; align-items: center;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid #ecedf0;
  border-radius: 14px;
}
.route-chip .route-num {
  flex: 0 0 28px;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: #1a2a3a;
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 800;
}
.route-chip .route-info { flex: 1; min-width: 0; }

/* ============ PRE-FLIGHT CHECKLIST ============ */
.pf-progress { margin: 0 20px 14px; }

/* Hero card with progress ring */
.pf-hero {
  padding: 18px 18px;
  background: linear-gradient(135deg, #eef7e6 0%, #d8ecc6 100%);
  border: 1px solid #c4dfaa;
  border-radius: 22px;
  box-shadow: 0 6px 18px rgba(60,110,40,.08);
  transition: background .4s ease, border-color .4s ease;
}
.pf-hero.all-done {
  background: linear-gradient(135deg, #d6f0c6 0%, #aedb8e 100%);
  border-color: #7fbf5c;
}
.pf-hero-top {
  display: flex; align-items: center; gap: 16px;
}
.pf-ring {
  --p: 0;
  flex: 0 0 64px;
  width: 64px; height: 64px;
  border-radius: 50%;
  background:
    conic-gradient(#2a7a3a calc(var(--p) * 1%), rgba(255,255,255,.5) 0);
  display: flex; align-items: center; justify-content: center;
  transition: background .5s ease;
  position: relative;
}
.pf-ring::before {
  content: '';
  position: absolute; inset: 5px;
  border-radius: 50%;
  background: #fff;
}
.pf-ring-inner {
  position: relative;
  font-size: 15px;
  font-weight: 900;
  color: #1f5a2a;
  letter-spacing: -0.5px;
}
.pf-hero.all-done .pf-ring-inner { color: #1a4a1a; }
.pf-hero-text { flex: 1; min-width: 0; }
.pf-hero-title {
  font-size: 16px;
  font-weight: 800;
  color: #1a3a1a;
  line-height: 1.2;
  letter-spacing: -0.3px;
}
.pf-hero-sub {
  font-size: 12px;
  font-weight: 500;
  color: #4a6a4a;
  margin-top: 3px;
}

/* Filter pills */
.pf-filters {
  display: flex;
  gap: 6px;
  margin-top: 14px;
  padding: 4px;
  background: rgba(255,255,255,.55);
  border-radius: 14px;
}
.pf-filter {
  flex: 1;
  display: flex; align-items: center; justify-content: center;
  gap: 6px;
  padding: 9px 8px;
  background: transparent;
  border: 0;
  border-radius: 11px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  color: #4a6a4a;
  cursor: pointer;
  transition: background .2s ease, color .2s ease, box-shadow .2s ease;
  min-height: 36px;
}
.pf-filter:hover { color: #1a3a1a; }
.pf-filter.active {
  background: #fff;
  color: #1a3a1a;
  box-shadow: 0 2px 6px rgba(0,0,0,.06);
}
.pf-filter-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 22px;
  height: 18px;
  padding: 0 6px;
  background: rgba(26,58,26,.08);
  color: #2a4a2a;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 800;
}
.pf-filter.active .pf-filter-count {
  background: #2a7a3a;
  color: #fff;
}

/* List container */
.pf-list { padding: 0 16px 120px; }

/* Section card */
.pf-section {
  background: #fff;
  border: 1px solid #ecedf0;
  border-radius: 18px;
  margin-bottom: 12px;
  overflow: hidden;
  transition: border-color .25s ease, box-shadow .25s ease;
}
.pf-section.complete {
  border-color: #c8dca8;
  background: #fafdf6;
}

/* Section header (collapsible) */
.pf-sec-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 14px 16px;
  background: transparent;
  border: 0;
  cursor: pointer;
  font: inherit;
  text-align: right;
  min-height: 56px;
  transition: background .15s ease;
}
.pf-sec-header:hover { background: rgba(0,0,0,.02); }
.pf-sec-header:focus-visible {
  outline: 2px solid #2a7a3a;
  outline-offset: -2px;
}
.pf-sec-left { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.pf-sec-emoji {
  flex: 0 0 36px;
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  background: #f5f7f2;
  border-radius: 12px;
  font-size: 18px;
}
.pf-section.complete .pf-sec-emoji { background: #e8f3dc; }
.pf-sec-titles { flex: 1; min-width: 0; }
.pf-sec-title {
  font-size: 14px;
  font-weight: 800;
  color: #1a2a3a;
  line-height: 1.2;
  letter-spacing: -0.2px;
}
.pf-sec-count {
  font-size: 11px;
  font-weight: 600;
  color: #6a7888;
  margin-top: 2px;
}
.pf-section.complete .pf-sec-count { color: #2a7a3a; }
.pf-sec-right { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.pf-sec-bar {
  width: 56px;
  height: 5px;
  background: #ecedf0;
  border-radius: 100px;
  overflow: hidden;
}
.pf-sec-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #2a7a3a, #4ca64c);
  border-radius: 100px;
  transition: width .35s ease;
}
.pf-chev {
  display: inline-block;
  font-size: 14px;
  color: #6a7888;
  transition: transform .25s ease;
  transform: rotate(180deg);
  line-height: 1;
}
.pf-section.collapsed .pf-chev { transform: rotate(0deg); }

/* Section body */
.pf-sec-body {
  padding: 4px 12px 12px;
  display: flex; flex-direction: column;
  gap: 6px;
  max-height: 2000px;
  overflow: hidden;
  transition: max-height .3s ease, padding .3s ease, opacity .2s ease;
}
.pf-section.collapsed .pf-sec-body {
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  opacity: 0;
}

/* Item */
.pf-item {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px 12px;
  background: #fafbfc;
  border: 1px solid #eef0f3;
  border-radius: 12px;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease, transform .1s ease, opacity .25s ease;
  min-height: 48px;
}
.pf-item:hover { background: #f3f6fb; border-color: #dfe6f0; }
.pf-item:active { transform: scale(0.985); }
.pf-item:focus-visible {
  outline: 2px solid #2a7a3a;
  outline-offset: 2px;
}
.pf-item.checked {
  background: #f4f9ee;
  border-color: #d6e6c0;
  opacity: 0.72;
}

.pf-check {
  flex: 0 0 22px;
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 2px solid #c8cfd8;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px;
  font-weight: 800;
  color: transparent;
  background: #fff;
  margin-top: 1px;
  transition: background .2s ease, border-color .2s ease, color .2s ease, transform .2s ease;
}
.pf-item.checked .pf-check {
  background: #2a7a3a;
  border-color: #2a7a3a;
  color: #fff;
  animation: pfCheckPop .35s ease;
}
@keyframes pfCheckPop {
  0% { transform: scale(0.8); }
  60% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

.pf-text { flex: 1; min-width: 0; }
.pf-item-title {
  font-size: 14px;
  font-weight: 600;
  color: #1a2a3a;
  line-height: 1.4;
}
.pf-item.checked .pf-item-title {
  text-decoration: line-through;
  color: #6a7888;
}
.pf-note {
  font-size: 12px;
  color: #6a7888;
  margin-top: 3px;
  line-height: 1.35;
}
.pf-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.pf-link {
  font-size: 12px;
  font-weight: 600;
  color: #2962a8;
  background: rgba(41, 98, 168, .08);
  border: 1px solid rgba(41, 98, 168, .18);
  border-radius: 100px;
  padding: 5px 11px;
  display: inline-flex;
  align-items: center;
  transition: background .15s;
}
.pf-link:hover { background: rgba(41, 98, 168, .14); }
.pf-link:active { transform: scale(0.97); }

/* Empty state */
.pf-empty {
  text-align: center;
  padding: 48px 24px;
  color: #6a7888;
}
.pf-empty-ico { font-size: 40px; margin-bottom: 8px; }
.pf-empty-title {
  font-size: 16px; font-weight: 800; color: #1a2a3a;
  margin-bottom: 4px;
}
.pf-empty-sub { font-size: 13px; font-weight: 500; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .pf-hero, .pf-ring, .pf-sec-body, .pf-chev,
  .pf-sec-bar-fill, .pf-item, .pf-check {
    transition: none !important;
    animation: none !important;
  }
}

/* ============ SHIROYO BRAND ============ */
.brand-block { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.brand-mark {
  width: 44px; height: 44px;
  border-radius: 14px;
  flex: 0 0 44px;
  box-shadow: 0 4px 12px rgba(0,0,0,.12);
}
.page-title {
  font-family: 'Rubik', sans-serif;
  font-size: 28px; font-weight: 900;
  margin: 0;
  letter-spacing: -1px;
  line-height: 1.05;
  color: #1a2a3a;
  display: flex; align-items: baseline; gap: 8px;
  flex-wrap: wrap;
}
.page-title em {
  font-style: normal;
  font-weight: 500;
  font-size: 14px;
  color: #6a7888;
  letter-spacing: 0;
}

/* ============ INSTALL BANNER ============ */
.install-banner {
  display: flex; align-items: center; gap: 12px;
  width: calc(100% - 32px);
  margin: 0 16px 16px;
  padding: 14px 16px;
  background: linear-gradient(135deg, #1a2a3a, #2c4a78);
  color: #fff;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.08);
  text-align: right;
  cursor: pointer;
  transition: transform .15s;
  box-shadow: 0 6px 18px rgba(26,42,58,.25);
  position: relative;
  overflow: hidden;
}
.install-banner::before {
  content: ''; position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 4px; background: #f4c447;
}
.install-banner:active { transform: scale(0.98); }
.install-banner .ib-ico {
  font-size: 26px;
  flex: 0 0 44px;
  width: 44px; height: 44px;
  background: rgba(244,196,71,.18);
  border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
}
.install-banner .ib-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.install-banner .ib-text b { font-size: 14px; font-weight: 800; line-height: 1.2; }
.install-banner .ib-text small {
  font-size: 11px; color: rgba(255,255,255,.75); font-weight: 500; line-height: 1.3;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.install-banner .ib-arrow { color: #f4c447; font-weight: 800; flex: 0 0 auto; }
.install-banner .ib-ico svg { width: 24px; height: 24px; display: block; }

/* Pre-flight card — reuses the install-banner shell with a teal accent */
.preflight-card::before { background: #6fd0c0; }
.preflight-card .ib-ico { background: rgba(111,208,192,.20); }
.preflight-card .ib-arrow { color: #8fe0d2; }

/* Inline action link inside a section title (e.g. "על המפה") */
.section-link {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 700;
  color: #2c4a78;
  background: #eef2f8;
  border: 1px solid #dce4ef;
  padding: 5px 11px;
  border-radius: 999px;
  cursor: pointer;
  transition: background .15s, transform .15s;
}
.section-link:hover { background: #e3eaf4; }
.section-link:active { transform: scale(0.96); }
.section-link-ico { display: inline-flex; }
.section-link-ico svg { width: 15px; height: 15px; display: block; }

/* Inline text icons (replacing inline emoji like 📍 ⚠️ 💡), sized to surrounding text */
.inline-ico { display: inline-flex; align-items: center; vertical-align: -0.15em; }
.inline-ico svg { width: 1em; height: 1em; display: block; }
/* Transit card — SVG mode icon (train / plane / ferry …) */
.transit-icon svg { width: 28px; height: 28px; display: block; color: #2c4a78; }
/* Day note pills — warning/tip icon aligned to the first text line */
.note-pill .note-ico { align-items: flex-start; }
.note-pill .note-ico svg { width: 17px; height: 17px; margin-top: 1px; }
/* Extras map-pin chip */
.extras-chip-map svg { width: 14px; height: 14px; display: block; }
/* Hotel / lodging icons */
.hotel-icon svg { width: 26px; height: 26px; display: block; color: #c89000; }
.dp-img.dp-img-hotel svg { width: 22px; height: 22px; display: block; }
.hotel-eyebrow { display: flex; align-items: center; gap: 5px; }
.hotel-multi-eyebrow { display: flex; align-items: center; gap: 5px; }
.rm-num-icon { display: inline-flex; }
.rm-num-icon svg { width: 17px; height: 17px; display: block; color: #9a7820; }
/* Weather icons (flags stay emoji; weather converts to line icons) */
.wx-ico svg { width: 1.1em; height: 1.1em; }
.weather-pill .wx-icon svg { width: 20px; height: 20px; display: block; color: #1a2a3a; }
.cover-info .weather-pill .wx-icon svg { width: 17px; height: 17px; color: #fff; }
.j-side-wx { display: inline-flex; align-items: center; gap: 3px; }
.wx-rain { display: inline-flex; align-items: center; gap: 3px; }
.hero-wx-rain { display: inline-flex; align-items: center; gap: 3px; }
/* ============ UX PASS: clamped notes, linked cards, visited checks ============ */
/* Currency quick-amount chips */
.cv-chips { display: flex; gap: 8px; }
.cv-chip {
  flex: 1;
  padding: 8px 0;
  border-radius: 100px;
  background: var(--c-bg-card);
  border: 1px solid var(--c-border);
  font-size: 13px; font-weight: 700;
  color: var(--c-text-primary);
  direction: ltr;
  transition: background .15s, transform .1s;
}
.cv-chip:active { background: var(--c-bg-muted); transform: scale(0.96); }

/* Floating day-nav arrows fade out while scrolling */
.day-nav-prev, .day-nav-next { transition: opacity .25s ease; }
body.is-scrolling .day-nav-prev,
body.is-scrolling .day-nav-next { opacity: 0; pointer-events: none; }

/* All-days list: today highlight */
.j-card.is-today { box-shadow: 0 0 0 3px #f4c447, 0 10px 24px rgba(0, 0, 0, .18); }

/* Inline map-link hint at the bottom of a linked activity card */
.dp-map-link {
  display: inline-flex; align-items: center; gap: 4px;
  margin-top: 7px;
  font-size: 11.5px; font-weight: 700;
  color: #8a6d1c;
}
.dp-map-link svg { width: 12px; height: 12px; display: block; }

/* Phase-aware home chapters: finished = thin ✓ row, current = full-width + badge */
.chapter-done-row {
  grid-column: 1 / -1;
  display: flex; align-items: center; gap: 10px;
  padding: 11px 14px;
  background: #fff;
  border: 1px solid #ecedf0;
  border-radius: 14px;
  text-align: right;
  cursor: pointer;
  transition: background .15s;
}
.chapter-done-row:hover, .chapter-done-row:active { background: #f7f8fa; }
.cdr-check {
  width: 20px; height: 20px; flex: 0 0 20px;
  border-radius: 50%;
  background: #e6f6ef; color: #22a06b;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800;
}
.cdr-name {
  flex: 1; min-width: 0;
  color: #4a5a6a; font-size: 13px; font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cdr-meta { flex: 0 0 auto; font-size: 11px; color: #8a98a8; font-weight: 600; }
.chapter.is-current {
  grid-column: 1 / -1;
  position: relative;
  min-height: 150px;
  box-shadow: 0 10px 26px rgba(26, 42, 58, .28);
}
.ch-here {
  position: absolute; top: 10px; left: 10px;
  background: #f4c447; color: #1a2a3a;
  font-size: 10px; font-weight: 800; letter-spacing: .5px;
  padding: 3px 9px;
  border-radius: 100px;
  box-shadow: 0 2px 8px rgba(0,0,0,.18);
}

/* Long notes collapse to 2 lines; tapping "עוד…" expands them */
.is-clamped {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.is-clamped.is-expanded { display: block; -webkit-line-clamp: unset; }
.note-more {
  font-size: 12px; font-weight: 700;
  color: #2c4a78;
  padding: 2px 0 0;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.note-pill-body {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
}
.note-pill .note-more { color: inherit; opacity: .75; }

/* Whole activity card opens the map — quiet pin hint instead of a loud button */
.dp-card { position: relative; }
.dp-card.is-linked { cursor: pointer; padding-left: 40px; }
.dp-card.is-linked:active { transform: scale(0.99); }
/* "היינו" visited toggle */
.dp-visited {
  position: absolute; bottom: 10px; left: 10px;
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 1.5px solid #d5dbe2;
  background: #fff;
  color: transparent;
  font-size: 14px; font-weight: 800; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s, border-color .15s, color .15s, transform .1s;
  z-index: 2;
}
.dp-visited:active { transform: scale(0.88); }
.dp-visited.on { background: #22a06b; border-color: #22a06b; color: #fff; }
.dp-card.is-visited .dp-img,
.dp-card.is-visited .dp-body { opacity: .5; }

/* About / onboarding / tour icons */
.about-feature-ico svg { width: 21px; height: 21px; display: block; color: #2c4a78; }
.onboarding-emoji svg { width: 32px; height: 32px; display: block; color: #4f46e5; }
.tour-emoji svg { width: 56px; height: 56px; display: block; margin: 0 auto; color: #4f46e5; }
.hero-mega .mega-plane svg { width: 0.78em; height: 0.78em; }
#routeStopsLine { display: inline-flex; align-items: center; gap: 4px; }
/* Edit-mode controls */
.pec-btn svg { width: 16px; height: 16px; display: block; }
.pec-btn.move svg { color: #3a6fb0; }
.pec-btn.del svg { color: #d04545; }
.ch-del svg { width: 15px; height: 15px; display: block; }
.hotel-edit-btn svg { width: 16px; height: 16px; display: block; }
.hotel-arrow svg { width: 16px; height: 16px; display: block; }
.delete-day-btn svg, .delete-chapter-btn svg { width: 16px; height: 16px; }
/* Activity category icons (image fallback) */
.dp-img svg { width: 26px; height: 26px; display: block; }
.hl-img svg { width: 30px; height: 30px; display: block; color: #fff; }
.dp-meta > span { display: inline-flex; align-items: center; gap: 3px; }

/* iOS install dialog overlay */
.ios-install-dialog {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 220;
  display: flex; align-items: flex-end; justify-content: center;
  padding: 0;
}
.ios-install-card {
  background: #fff;
  border-radius: 24px 24px 0 0;
  padding: 24px 24px max(28px, env(safe-area-inset-bottom));
  width: 100%;
  text-align: center;
  animation: slideUp .25s cubic-bezier(.4,0,.2,1);
}
.ios-install-card h3 { font-size: 18px; font-weight: 800; margin: 0 0 6px; color: #1a2a3a; }
.ios-install-card p { font-size: 13px; color: #5a6878; margin: 0 0 16px; line-height: 1.5; }
.ios-install-steps { text-align: right; }
.ios-install-step {
  display: flex; gap: 10px; align-items: center;
  padding: 10px 12px; background: #f7f8fa; border-radius: 12px;
  margin-bottom: 6px; font-size: 13px; color: #1a2a3a;
}
.ios-install-step b {
  flex: 0 0 22px; width: 22px; height: 22px;
  background: #1a2a3a; color: #fff;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800;
}
.ios-install-close {
  margin-top: 14px;
  padding: 12px;
  background: #1a2a3a; color: #fff;
  border-radius: 100px;
  width: 100%;
  font-size: 14px; font-weight: 700;
  cursor: pointer;
}

/* ============ BIG DAY NUMBER ON CARD ============ */
.j-day-big {
  position: absolute;
  top: 14px; right: 14px;
  z-index: 3;
  display: flex; flex-direction: column;
  align-items: flex-end;
  line-height: 1;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,.45);
  pointer-events: none;
}
.j-day-big-label {
  font-size: 13px;
  font-weight: 700;
  opacity: 0.92;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}
.j-day-big-num {
  font-size: 64px;
  font-weight: 900;
  letter-spacing: -3px;
  line-height: 0.85;
}
/* nudge the j-wx pill to the LEFT side (top-left) so it doesn't collide with day number */
.j-card .j-wx {
  right: auto;
  left: 14px;
}
/* push thumb stack down a bit if it exists */
.j-card .thumb-stack {
  top: auto;
  bottom: 14px;
  left: 14px;
}
/* keep fav button on the right side now */
.j-card .j-fav {
  left: auto;
  right: 14px;
  bottom: 14px;
  top: auto;
}

/* ============ CENTERED CARD LAYOUT ============ */
/* Hide the old layout pieces */
.j-card .info, .j-card .j-wx, .j-card .thumb-stack, .j-card .j-day-big { display: none; }

/* Right side small info column */
.j-side-info {
  position: absolute;
  top: 14px; right: 14px;
  z-index: 3;
  display: flex; flex-direction: column;
  gap: 6px;
  align-items: flex-end;
  text-shadow: 0 1px 4px rgba(0,0,0,.5);
}
.j-side-info > span {
  background: rgba(255,255,255,.18);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.22);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 100px;
  white-space: nowrap;
  display: inline-flex; align-items: center; gap: 4px;
  text-shadow: none;
}
.j-side-date { font-weight: 700 !important; }
.j-side-wx .wx-live-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #2ecc71;
  display: inline-block;
}

/* Fav button — keep on left bottom */
.j-card .j-fav {
  bottom: 14px;
  left: 14px;
  right: auto;
  top: auto;
}

/* Centered "יום X" + destination */
.j-center {
  position: absolute; inset: 0;
  z-index: 2;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  color: #fff;
  text-align: center;
  padding: 20px;
  pointer-events: none;
}
.j-center-day {
  display: flex; flex-direction: column;
  align-items: center;
  line-height: 0.85;
  margin-bottom: 14px;
  text-shadow: 0 4px 14px rgba(0,0,0,.5);
}
.j-center-label {
  font-size: 14px;
  font-weight: 700;
  opacity: 0.95;
  letter-spacing: 1px;
  margin-bottom: 4px;
}
.j-center-num {
  font-size: 90px;
  font-weight: 900;
  letter-spacing: -3px;
  line-height: 0.85;
}
.j-center-dest {
  display: flex; flex-direction: column;
  align-items: center;
  gap: 4px;
  text-shadow: 0 2px 10px rgba(0,0,0,.55);
}
.j-center-title {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.4px;
  line-height: 1.15;
}
.j-center-loc {
  font-size: 13px;
  font-weight: 500;
  opacity: 0.92;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.j-center-loc svg { width: 12px; height: 12px; }

/* ============ EDIT MODE ============ */
.edit-banner {
  background: linear-gradient(135deg, #fff8e0, #ffe9a8);
  border: 1px solid #f0d895;
  border-radius: 14px;
  padding: 10px 14px;
  font-size: 12px; font-weight: 700;
  color: #8a6d1c;
  margin-bottom: 12px;
  text-align: center;
}

.dp-card.editable {
  position: relative;
  padding-left: 56px;
}
.place-edit-ctrl {
  position: absolute;
  left: 8px; top: 8px;
  display: flex; flex-direction: column;
  gap: 4px;
}
.pec-btn {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid #ecedf0;
  font-size: 13px;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
  cursor: pointer;
  transition: transform .12s;
}
.pec-btn:active { transform: scale(0.9); }
.pec-btn.del:hover, .pec-btn.del:active { background: #ffe2e2; border-color: #f0a0a0; }
.pec-btn.edit:hover, .pec-btn.edit:active { background: #e2eeff; border-color: #a0c0f0; }

.add-place-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: #fff8e0;
  border: 2px dashed #f0d895;
  border-radius: 16px;
  padding: 14px;
  font-size: 14px; font-weight: 700;
  color: #8a6d1c;
  margin-top: 8px;
  width: 100%;
  cursor: pointer;
  transition: all .12s;
}
.add-place-btn:hover, .add-place-btn:active { background: #ffe9a8; }
.apb-ico { font-size: 22px; font-weight: 800; line-height: 1; }

/* Edit modal */
.edit-modal {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 250;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.edit-card {
  background: #fff;
  border-radius: 22px;
  padding: 20px;
  width: 100%; max-width: 380px;
  max-height: 90%;
  overflow-y: auto;
  scrollbar-width: none;
  animation: fadeIn .2s ease;
}
.edit-card::-webkit-scrollbar { display: none; }
.edit-title {
  font-size: 18px; font-weight: 800;
  margin: 0 0 14px;
  color: #1a2a3a;
  text-align: center;
}
.edit-field { display: flex; flex-direction: column; margin-bottom: 12px; }
.edit-field .edit-label {
  font-size: 12px; font-weight: 700; color: #5a6878;
  margin-bottom: 5px;
}
.edit-field input, .edit-field textarea {
  border: 1px solid #ecedf0;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  background: #f7f8fa;
  text-align: right;
  transition: border-color .12s;
}
.edit-field input:focus, .edit-field textarea:focus {
  outline: none;
  border-color: #f4c447;
  background: #fff;
}
.edit-field textarea { min-height: 60px; resize: vertical; }
.edit-toggle {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px;
  background: #f7f8fa;
  border-radius: 10px;
  margin-bottom: 14px;
  font-size: 13px; font-weight: 600;
  color: #1a2a3a;
  cursor: pointer;
}
.edit-toggle input { width: 18px; height: 18px; cursor: pointer; }
.edit-actions { display: flex; gap: 8px; margin-top: 4px; }
.edit-btn {
  flex: 1;
  padding: 12px;
  border-radius: 100px;
  font-size: 14px; font-weight: 700;
  cursor: pointer;
  transition: transform .12s;
}
.edit-btn:active { transform: scale(0.97); }
.edit-btn.cancel {
  background: #f7f8fa; color: #5a6878;
  border: 1px solid #ecedf0;
}
.edit-btn.save { background: #1a2a3a; color: #fff; }

/* Tweaks for body class indicator */
body.edit-mode-on .ico-btn#menuBtn::after {
  content: '';
  position: absolute;
  bottom: -2px; left: -2px;
  background: #f4c447 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231a2a3a' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16.5 4.5a2.12 2.12 0 0 1 3 3L7.5 19.5 3 21l1.5-4.5z'/%3E%3Cpath d='M14.5 6.5l3 3'/%3E%3C/svg%3E") center / 10px no-repeat;
  border-radius: 50%;
  width: 18px; height: 18px;
}
.ico-btn#menuBtn { position: relative; }

/* Day cover menu button — positioned at the left (in RTL) opposite back button */
/* Note: explicit `left: 20px` + `right: auto` prevents the more-specific .ico-btn.back rule
   above from leaking its `right` value into this button via shared selector specificity. */
.day-cover-overlay .ico-btn.cover-menu {
  left: 20px;
  right: auto;
}

/* ⭐ must toggle button */
.pec-btn.must {
  background: #fff;
  border-color: #ecedf0;
  filter: grayscale(0.7);
  opacity: 0.55;
}
.pec-btn.must.active {
  background: #fff8e0;
  border-color: #f4c447;
  filter: none;
  opacity: 1;
  box-shadow: 0 2px 6px rgba(244,196,71,.35);
}

/* ============================================================ */
/* ============ DESKTOP LAYOUT (≥1024px) ====================== */
/* ============================================================ */

@media (min-width: 1024px) {
  body {
    background: linear-gradient(180deg, #e9ece6, #d8ddd1);
    background-attachment: fixed;
    padding: 0;
    color: #1a2a3a;
  }
  body::before {
    content: '';
    position: fixed; inset: 0;
    background-image:
      radial-gradient(at 15% 10%, rgba(244,196,71,.15) 0%, transparent 35%),
      radial-gradient(at 85% 80%, rgba(80,150,200,.12) 0%, transparent 40%);
    pointer-events: none; z-index: 0;
  }
  .bg-blur, .bg-blob { display: none; }

  /* Drop the phone frame entirely on desktop */
  .device {
    background: rgba(255,255,255,.92);
    /* Avoid backdrop-filter here: it creates a containing block that breaks position:fixed children (settings sheet, edit modal) */
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    max-width: 100%;
    height: auto;
    min-height: 100vh;
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
    margin: 0;
  }
  .phone-status { display: none; }

  /* Wide top topbar */
  .topbar.plain {
    max-width: 100%;
    padding: 16px 48px;
  }
  .page-title { font-size: 32px; }
  .brand-mark { width: 56px; height: 56px; border-radius: 18px; flex: 0 0 56px; }
  /* Content gets a max-width and centered */
  .content-pad {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 8px 48px 120px;
  }

  /* HERO — wider, taller */
  .hero-card {
    margin: 0 auto 28px;
    max-width: 1180px;
    height: 360px;
    border-radius: 32px;
  }
  .hero-mega { font-size: 44px; }
  .hero-content { padding: 32px 36px; }

  /* Install banner stays compact */
  .install-banner { max-width: 1180px; margin: 0 auto 20px; }

  /* STATS strip wider */
  .stats-strip {
    max-width: 1180px; margin: 0 auto 28px;
    padding: 18px 24px;
  }
  .stat-num { font-size: 24px; }
  .stat-label { font-size: 12px; }

  /* Section titles */
  .home-section-title {
    max-width: 1180px;
    margin: 28px auto 14px;
    padding: 0 4px;
    font-size: 18px;
  }

  /* CHAPTERS — 4 columns */
  .chapters {
    max-width: 1180px;
    margin: 0 auto;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    padding: 0;
  }
  .chapter { min-height: 150px; padding: 18px; }
  .ch-emoji { font-size: 40px; }
  .ch-name { font-size: 16px; }

  /* QUICK ACTIONS — 4 columns */
  .quick-actions {
    max-width: 1180px;
    margin: 0 auto 24px;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    padding: 0;
  }
  .qa { padding: 22px 20px; }
  .qa-ico { font-size: 32px; }
  .qa-name { font-size: 16px; }

  /* QUOTE wider but capped */
  .quote-card { max-width: 800px; margin: 36px auto 0; padding: 28px; font-size: 16px; }

  /* JOURNAL CARDS — 3-column grid */
  .journal-list {
    max-width: 1180px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    padding: 0;
  }
  .j-card { height: 280px; margin-bottom: 0; }
  .j-center-num { font-size: 110px; }
  .j-center-title { font-size: 22px; }
  .country-banner { grid-column: 1 / -1; margin: 12px 0 6px; font-size: 13px; }

  /* OVERVIEW (alldays etc) topbar wider */
  .topbar.plain { gap: 24px; }

  /* HIGHLIGHTS — 3 cols */
  .highlights-list {
    max-width: 1180px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    padding: 0;
  }

  /* ROUTE */
  .route-list, #routeMap { max-width: 900px; margin: 0 auto; }
  #routeMap iframe { height: 380px; }

  /* PRE-FLIGHT — 2 columns */
  .pf-list {
    max-width: 1180px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: start;
    gap: 24px;
    padding: 0 0 110px;
  }
  .pf-section { margin-bottom: 0; }
  .pf-section { padding: 0; }
  .pf-progress { max-width: 1180px; margin: 0 auto 22px; }

  /* CALENDAR — 3 months side by side */
  .cal-head { max-width: 1280px; margin: 0 auto; padding: 24px 48px; }
  .cal-legend { max-width: 1280px; margin: 0 auto; padding: 0 48px 18px; }
  .cal-months {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 48px 110px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
  }
  .cal-month { margin-bottom: 0; }
  .cal-cell { min-height: 70px; }
  .cd-num { font-size: 14px; }
  .cd-city { font-size: 11px; }

  /* DAY DETAIL — cover + sheet side by side */
  .screen[data-screen="day"] {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    max-width: 1280px;
    margin: 0 auto;
    padding: 24px 48px 120px;
  }
  .day-cover {
    margin: 0;
    height: 70vh;
    max-height: 720px;
    position: sticky;
    top: 24px;
    border-radius: 28px;
  }
  .day-sheet {
    margin-top: 0;
    border-radius: 28px;
    padding: 28px;
    box-shadow: 0 4px 18px rgba(0,0,0,.06);
    border: 1px solid #ecedf0;
  }
  .sheet-handle { display: none; }
  .day-title { font-size: 30px; }
  .place-edit-ctrl { flex-direction: row; }
  .day-places {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  .day-places .add-place-btn { grid-column: 1 / -1; }
  .map-block iframe { height: 360px; }

  /* Bottom pill — float to bottom-left as a thin nav, not centered */
  .bot-pill {
    bottom: 24px;
    left: 24px;
    right: auto;
    transform: none;
    margin: 0;
    padding: 6px 8px;
  }

  /* Settings sheet — proper centered modal on desktop */
  .settings-sheet {
    position: fixed;
    top: 50%;
    bottom: auto;
    left: 50%;
    right: auto;
    transform: translate(-50%, -50%);
    width: 420px;
    max-width: 420px;
    max-height: 82vh;
    border-radius: 22px;
    padding: 18px 22px 22px;
    box-shadow: 0 24px 60px rgba(0,0,0,.28), 0 4px 16px rgba(0,0,0,.08);
    animation: ssFadeScale .22s cubic-bezier(.4,0,.2,1);
  }
  @keyframes ssFadeScale {
    from { opacity: 0; transform: translate(-50%, -50%) scale(0.96); }
    to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  }
  .sheet-mask {
    position: fixed;
    background: rgba(15, 25, 40, .55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
  }
  .ss-handle { display: none; }
  .ss-title {
    font-size: 16px;
    margin: 0 0 14px;
    padding-top: 4px;
  }
  .ss-list { gap: 6px; }
  .ss-item {
    padding: 11px 14px;
    border-radius: 14px;
  }
  .ss-ico {
    flex: 0 0 36px; width: 36px; height: 36px;
    font-size: 17px; border-radius: 10px;
  }
  .ss-text b { font-size: 14px; }
  .ss-text small { font-size: 11px; }
  .ss-arrow { font-size: 16px; }

  /* Edit modal centered */
  .edit-modal { padding: 0; }
  .edit-card { max-width: 480px; }

  /* iOS install dialog centered */
  .ios-install-dialog { align-items: center; padding: 0; }
  .ios-install-card { max-width: 440px; border-radius: 22px; }
}

/* Extra-large screens (≥1440px) */
@media (min-width: 1440px) {
  .topbar.plain, .content-pad,
  .stats-strip, .hero-card, .install-banner,
  .chapters, .quick-actions, .journal-list,
  .highlights-list, .pf-list, .pf-progress,
  .home-section-title { max-width: 1320px; }
  .cal-head, .cal-legend, .cal-months,
  .screen[data-screen="day"] { max-width: 1400px; }
}

/* ============ DEV MODE — hidden settings for the developer ============ */
.ss-item[data-dev="1"] { display: none; }
body.dev-mode .ss-item[data-dev="1"] { display: flex; }
/* Hide the entire "כלי מפתח" section when not in dev mode */
.ss-section[data-dev-section="1"] { display: none; }
body.dev-mode .ss-section[data-dev-section="1"] { display: block; }
body.dev-mode .page-title::after {
  content: 'DEV';
  display: inline-block;
  margin-right: 8px;
  font-size: 10px;
  font-weight: 800;
  color: #fff;
  background: #e85040;
  padding: 2px 7px;
  border-radius: 100px;
  vertical-align: middle;
  letter-spacing: 1px;
}

/* Demo date banner — visible whenever demo date is active */
.demo-banner {
  display: flex; align-items: center; gap: 12px;
  margin: 0 16px 16px;
  padding: 12px 14px;
  background: linear-gradient(135deg, #fff8e0, #ffe9a8);
  border: 1px solid #f4dca0;
  border-radius: 16px;
}
.db-ico {
  font-size: 22px;
  flex: 0 0 36px;
  width: 36px; height: 36px;
  background: #fff;
  border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
}
.db-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.db-text b { font-size: 13px; font-weight: 800; color: #8a6d1c; line-height: 1.2; }
.db-text small { font-size: 11px; color: #a08530; font-weight: 500; margin-top: 2px; }
.db-close {
  font-size: 11px; font-weight: 700;
  padding: 8px 12px;
  border-radius: 100px;
  background: #1a2a3a;
  color: #fff;
  cursor: pointer;
  white-space: nowrap;
  flex: 0 0 auto;
}
.db-close:active { transform: scale(0.96); }
@media (min-width: 1024px) {
  .demo-banner { max-width: 1180px; margin: 0 auto 20px; }
}

/* Trip-dates modal extras */
.preset-row {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-bottom: 12px;
}
.preset-pill {
  padding: 7px 12px;
  border-radius: 100px;
  background: #f7f8fa;
  border: 1px solid #ecedf0;
  font-size: 12px; font-weight: 700;
  color: #5a6878;
  cursor: pointer;
  transition: all .12s;
}
.preset-pill:hover, .preset-pill:active {
  background: #fff8e0;
  border-color: #f4dca0;
  color: #8a6d1c;
  transform: scale(0.98);
}
.date-preview {
  padding: 12px 14px;
  background: #f7f8fa;
  border-radius: 12px;
  font-size: 13px; font-weight: 600;
  color: #1a2a3a;
  text-align: center;
  margin-bottom: 14px;
}

/* "Today" quick action — make it stand out */
.qa.qa-today {
  background: linear-gradient(135deg, #1a2a3a, #2c4a78);
  color: #fff;
  border-color: transparent;
  position: relative;
}
.qa.qa-today .qa-name { color: #fff; }
.qa.qa-today small { color: rgba(255,255,255,.8); }
.qa.qa-today .qa-ico {
  background: #f4c447;
  color: #2a1f00;
  border-radius: 12px;
  width: 36px; height: 36px;
  font-size: 22px;
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 4px;
}
.qa.qa-today.is-disabled {
  opacity: 0.55;
  filter: grayscale(0.4);
}

/* 4-card layout: 2x2 on mobile, 4 in a row on desktop */
.quick-actions { grid-template-columns: 1fr 1fr; }
@media (min-width: 1024px) {
  .quick-actions { grid-template-columns: repeat(4, 1fr); }
}

/* ============ TOP SAFE AREA (PWA notch) ============ */
.device {
  padding-top: env(safe-area-inset-top, 0);
}
@media (display-mode: standalone) {
  .device {
    padding-top: max(env(safe-area-inset-top, 0), 12px);
  }
}

/* ============ FULL BOTTOM NAV BAR ============ */
.bottom-nav-bar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  max-width: 430px;
  margin: 0 auto;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(0,0,0,.06);
  display: flex;
  justify-content: space-around;
  align-items: stretch;
  padding: 6px 4px max(8px, env(safe-area-inset-bottom));
  z-index: 100;
  box-shadow: 0 -4px 16px rgba(0,0,0,.04);
}
.bn-item {
  flex: 1;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 3px;
  padding: 8px 2px;
  border-radius: 12px;
  color: #6a7888;
  font-size: 10px; font-weight: 600;
  transition: all .15s;
  position: relative;
  cursor: pointer;
}
.bn-item .bn-ico {
  font-size: 20px;
  line-height: 1;
  filter: grayscale(0.3);
  opacity: 0.7;
  transition: all .15s;
}
.bn-item .bn-label {
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}
.bn-item.active {
  color: #1a2a3a;
}
.bn-item.active .bn-ico {
  filter: none;
  opacity: 1;
  transform: translateY(-1px) scale(1.05);
}
.bn-item.active .bn-label {
  font-weight: 800;
  color: #1a2a3a;
}
.bn-item.active::before {
  content: '';
  position: absolute;
  top: 4px;
  left: 50%; transform: translateX(-50%);
  width: 28px; height: 3px;
  background: #f4c447;
  border-radius: 100px;
}
.bn-item:active { transform: scale(0.94); }

/* Hide old pill nav (kept for safety if old class still present somewhere) */
.bot-pill { display: none; }

/* Padding bottom for content so nav bar doesn't cover */
.content-pad { padding-bottom: 96px; }

@media (min-width: 1024px) {
  .bottom-nav-bar {
    max-width: 100%;
    bottom: 0;
    border-radius: 0;
    padding: 8px 24px max(8px, env(safe-area-inset-bottom));
  }
  .bn-item { flex: 0 0 auto; padding: 8px 18px; flex-direction: row; gap: 8px; }
  .bn-item .bn-ico { font-size: 16px; }
  .bn-item .bn-label { font-size: 13px; }
  .bn-item.active::before { display: none; }
  .bn-item.active { background: #fff8e0; }
  .content-pad { padding-bottom: 120px; }
}

/* ============ PREVIEW MODE ============ */
.preview-banner {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  background: linear-gradient(135deg, #1a2a3a, #2c4a78);
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px max(8px, env(safe-area-inset-top, 0));
  padding-top: max(10px, env(safe-area-inset-top, 0));
  box-shadow: 0 4px 14px rgba(0,0,0,.18);
  max-width: 430px;
  margin: 0 auto;
}
.pb-emoji {
  font-size: 18px;
  background: rgba(244,196,71,.22);
  width: 32px; height: 32px;
  border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  flex: 0 0 auto;
}
.pb-text { flex: 1; min-width: 0; line-height: 1.2; }
.pb-text b { font-size: 13px; font-weight: 800; display: block; }
.pb-text small { font-size: 11px; opacity: 0.8; }
.pb-cta {
  background: #f4c447;
  color: #2a1f00;
  font-size: 12px;
  font-weight: 800;
  padding: 8px 12px;
  border-radius: 100px;
  white-space: nowrap;
  text-decoration: none;
  flex: 0 0 auto;
}
.pb-cta:hover { background: #ffd55a; }

/* Push the device down to make room for the preview banner */
body:has(.preview-banner) .device { padding-top: 64px; }
body:has(.preview-banner) .topbar { top: 64px; }

/* Paywall modal */
.preview-paywall .edit-card { text-align: center; max-width: 360px; }
.preview-paywall .edit-actions { flex-direction: column; gap: 8px; }
.preview-paywall .edit-btn.save {
  background: linear-gradient(135deg, #f4c447, #e89e30);
  color: #2a1f00;
  font-size: 15px;
  text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center;
}

@media (min-width: 1024px) {
  .preview-banner { max-width: 100%; }
  body:has(.preview-banner) .device { padding-top: 56px; }
}

/* In preview mode, simplify the home page */
body.preview-mode .chapters,
body.preview-mode .home-section-title,
body.preview-mode .quick-actions,
body.preview-mode .quote-card,
body.preview-mode .install-banner { display: none !important; }
body.preview-mode .stats-strip { margin-bottom: 16px; }

/* Add a big "see sample day" CTA card on home in preview */
.preview-cta-card {
  margin: 0 16px 18px;
  padding: 20px 18px;
  background: linear-gradient(135deg, #fff8e0, #ffe9a8);
  border: 2px solid #f4c447;
  border-radius: 22px;
  text-align: center;
  box-shadow: 0 8px 24px rgba(244,196,71,.18);
}
.preview-cta-card h3 { margin: 0 0 6px; font-size: 18px; font-weight: 800; color: #1a2a3a; }
.preview-cta-card p { margin: 0 0 14px; font-size: 13px; color: #8a6d1c; line-height: 1.5; }
.preview-cta-card .pcc-btns { display: flex; gap: 8px; flex-direction: column; }
.preview-cta-card a {
  padding: 12px 16px; border-radius: 100px; font-weight: 800; font-size: 14px;
  text-decoration: none; display: inline-flex; align-items: center; justify-content: center;
  transition: transform .12s;
}
.preview-cta-card a:active { transform: scale(0.97); }
.preview-cta-card a.primary { background: #1a2a3a; color: #fff; }
.preview-cta-card a.gold { background: linear-gradient(135deg, #f4c447, #e89e30); color: #2a1f00; }

/* ↔ Move-to-day button */
.pec-btn.move {
  background: #e8f0ff;
  border-color: #b8d0f0;
  color: #1a4a98;
  font-size: 16px; font-weight: 800;
}
.pec-btn.move:hover, .pec-btn.move:active { background: #d8e6f8; }

/* Delete-day button — big, dangerous */
.delete-day-btn {
  display: flex;
  align-items: center; justify-content: center;
  gap: 8px;
  width: 100%;
  margin: 22px 0 6px;
  padding: 14px;
  background: #fff;
  border: 2px dashed #f0a0a0;
  border-radius: 14px;
  color: #b03030;
  font-size: 14px; font-weight: 700;
  cursor: pointer;
  transition: all .15s;
}
.delete-day-btn:hover, .delete-day-btn:active {
  background: #ffe2e2;
  border-color: #b03030;
}

/* Move-day dialog list */
.move-day-list {
  display: flex; flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
  max-height: 50vh;
  overflow-y: auto;
}
.move-day-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
  background: #f7f8fa;
  border: 1px solid #ecedf0;
  border-radius: 12px;
  text-align: right;
  transition: all .12s;
  cursor: pointer;
}
.move-day-item:hover, .move-day-item:active {
  background: #fff8e0;
  border-color: #f4dca0;
  transform: translateX(-2px);
}
.mdi-num {
  flex: 0 0 auto;
  background: #1a2a3a;
  color: #fff;
  font-size: 11px; font-weight: 800;
  padding: 5px 10px;
  border-radius: 100px;
}
.mdi-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.mdi-info b { font-size: 13px; font-weight: 700; color: #1a2a3a; line-height: 1.2; }
.mdi-info small { font-size: 11px; color: #6a7888; margin-top: 2px; }

/* ============ EDIT MODE — Add day / Delete chapter ============ */
/* "+" button to add a new day, sits below the chapters grid (home, edit mode) */
#addDayWrap { padding: 0 16px; margin-top: 14px; }
.add-day-btn {
  display: flex;
  align-items: center; justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, #fff7d6 0%, #ffe9a8 100%);
  border: 2px dashed #c89000;
  border-radius: 16px;
  color: #6a4500;
  font-size: 15px; font-weight: 800;
  cursor: pointer;
  transition: all .15s;
  font-family: inherit;
}
.add-day-btn:hover, .add-day-btn:active {
  background: linear-gradient(135deg, #ffe9a8 0%, #f4c447 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(200,144,0,.25);
}
.add-day-btn .apb-ico {
  font-size: 22px; line-height: 1;
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: rgba(0,0,0,.08);
  color: #6a4500;
  font-weight: 900;
}

/* Per-chapter delete button on home (edit mode) */
.chapter .ch-del {
  position: absolute;
  top: 8px; left: 8px;
  z-index: 5;
  width: 32px; height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, .55);
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s, transform .15s;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.chapter .ch-del:hover, .chapter .ch-del:active {
  background: #b03030;
  transform: scale(1.08);
}

/* Chapter view edit actions (inside alldays filtered by chapter) */
.chapter-edit-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 18px 16px 30px;
}
.chapter-edit-actions .add-day-btn { margin: 0; }
.delete-chapter-btn {
  display: flex;
  align-items: center; justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px;
  background: #fff;
  border: 2px dashed #f0a0a0;
  border-radius: 14px;
  color: #b03030;
  font-size: 14px; font-weight: 700;
  cursor: pointer;
  transition: all .15s;
  font-family: inherit;
}
.delete-chapter-btn:hover, .delete-chapter-btn:active {
  background: #ffe2e2;
  border-color: #b03030;
}

/* Edit-modal select inputs (used in add-day dialog) */
.edit-card select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d0d8e0;
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  background: #fff;
  color: #1a2a3a;
  cursor: pointer;
  margin-top: 4px;
}
.edit-card select:focus {
  outline: none;
  border-color: #c89000;
  box-shadow: 0 0 0 3px rgba(244,196,71,.2);
}

/* Desktop layout for add-day button */
@media (min-width: 1024px) {
  #addDayWrap { padding: 0 0; max-width: 1280px; margin: 14px auto 0; }
  .chapter-edit-actions {
    flex-direction: row;
    justify-content: center;
    margin: 24px auto 30px;
    max-width: 720px;
  }
  .chapter-edit-actions .add-day-btn,
  .chapter-edit-actions .delete-chapter-btn { flex: 1; }
}

/* ============ HOTEL CARD (top of day overview) ============ */
.hotel-wrap { margin: 0 0 14px; }
.hotel-wrap-multi { display: flex; flex-direction: column; gap: 10px; }
.hotel-multi-eyebrow {
  font-size: 11px;
  font-weight: 800;
  color: #6a7888;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 4px;
  padding: 0 4px;
}
.hotel-wrap-multi .hotel-card { margin: 0; }
.hotel-name-jp {
  font-size: 13px;
  color: #8a98a8;
  font-weight: 500;
  margin-bottom: 4px;
  letter-spacing: 0;
}
.hotel-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  background: linear-gradient(135deg, #fff8ec 0%, #fff 100%);
  border: 1.5px solid #f4c447;
  border-radius: 16px;
  margin: 0 0 14px;
  box-shadow: 0 6px 18px rgba(244,196,71,.18);
  text-decoration: none;
  color: inherit;
  transition: transform .15s, box-shadow .15s;
}
a.hotel-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(244,196,71,.28);
}
.hotel-icon {
  font-size: 28px;
  width: 46px; height: 46px;
  border-radius: 12px;
  background: rgba(244,196,71,.2);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.hotel-body { flex: 1; min-width: 0; }
.hotel-eyebrow {
  font-size: 11px;
  font-weight: 800;
  color: #c89000;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.hotel-name {
  font-size: 16px;
  font-weight: 800;
  color: #1a2a3a;
  line-height: 1.3;
  margin-bottom: 4px;
}
.hotel-area {
  font-size: 12px;
  color: #6a7888;
  font-weight: 500;
}
.hotel-note {
  font-size: 12px;
  color: #6a7888;
  margin-top: 4px;
  line-height: 1.4;
}
.hotel-arrow {
  font-size: 22px;
  color: #c89000;
  font-weight: 700;
  flex-shrink: 0;
  align-self: flex-start;
}

/* Booking.com action button on hotel cards */
.hotel-actions {
  display: flex;
  gap: 6px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.hotel-booking-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: #003580;
  color: #fff;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  transition: background .15s ease, transform .1s ease;
}
.hotel-booking-btn:hover { background: #002a66; }
.hotel-booking-btn:active { transform: scale(0.97); }
.hotel-area.is-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  border-radius: 100px;
  background: rgba(244, 196, 71, 0.18);
  color: #8a6d1c;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  margin-top: 4px;
  transition: background .15s ease, transform .1s ease;
}
.hotel-area.is-link:hover { background: rgba(244, 196, 71, 0.32); }
.hotel-area.is-link:active { transform: scale(0.97); }
.hotel-area.is-link:focus-visible {
  outline: 2px solid #f4c447;
  outline-offset: 2px;
}

/* ============ LIVE CLOCKS (Israel / Japan / Korea) ============ */
.clocks-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0 16px 12px;
  padding: 4px 0;
  background: none;
  border: none;
  font-size: 12px;
  font-weight: 700;
  color: #6a5520;
  width: auto;
  font-variant-numeric: tabular-nums;
}
.clock-tz {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.clock-flag { font-size: 13px; line-height: 1; }
.clock-time { letter-spacing: 0.2px; }
.clock-sep { opacity: 0.4; }

/* URL inside an activity note — own line, copyable, tappable */
.dp-link {
  display: inline-block;
  margin-top: 4px;
  color: #c89000;
  font-weight: 600;
  word-break: break-all;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1.5px;
  user-select: text;
  -webkit-user-select: text;
}
.dp-link:hover { color: #9a6f00; }
.dp-link:focus-visible {
  outline: 2px solid #f4c447;
  outline-offset: 3px;
  border-radius: 4px;
}

/* Compact version inside the map-tab hotel pin card */
.dp-btn-booking {
  background: #003580;
  color: #fff;
  border-color: #003580;
}
.dp-btn-booking:hover { background: #002a66; }

/* ============ CHAPTER-END TRANSIT PLACEHOLDER ============ */
.transit-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 18px;
  background: #f7f8fa;
  border: 2px dashed #c8d0db;
  border-radius: 16px;
  margin: 14px 16px 16px;
  position: relative;
}
.transit-icon {
  font-size: 30px;
  width: 52px; height: 52px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid #ecedf0;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.transit-body { flex: 1; min-width: 0; }
.transit-eyebrow {
  font-size: 11px;
  font-weight: 800;
  color: #5a6878;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.transit-text {
  font-size: 14px;
  color: #1a2a3a;
  line-height: 1.6;
  font-weight: 500;
  white-space: pre-line;
}
.transit-map-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 10px;
  padding: 7px 14px;
  background: rgba(244, 196, 71, 0.2);
  color: #8a6d1c;
  border: 1px solid rgba(244, 196, 71, 0.5);
  border-radius: 100px;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  transition: background .15s ease, transform .1s ease;
}
.transit-map-btn:hover { background: rgba(244, 196, 71, 0.35); }
.transit-map-btn:active { transform: scale(0.97); }
.transit-alert {
  margin-top: 10px;
  padding: 10px 12px;
  background: #fdecec;
  border: 1px solid #f3b4b4;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  color: #a02020;
  line-height: 1.5;
}
.transit-tbd {
  display: inline-block;
  margin-top: 8px;
  font-size: 11px;
  color: #c89000;
  background: #fff8ec;
  padding: 3px 10px;
  border-radius: 100px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

@media (min-width: 1024px) {
  .transit-card { margin: 18px 0 8px; }
}

/* ============ SERVICE WORKER UPDATE BANNER ============ */
#swUpdateBanner {
  position: fixed;
  bottom: calc(env(safe-area-inset-bottom, 0) + 90px); /* above bottom-nav */
  left: 50%;
  transform: translateX(-50%);
  z-index: 999;
  display: flex;
  align-items: center;
  gap: 12px;
  background: #1a2a3a;
  color: #fff;
  padding: 10px 14px 10px 18px;
  border-radius: 100px;
  box-shadow: 0 12px 32px rgba(0,0,0,.28), 0 0 0 1px rgba(244,196,71,.4);
  font-size: 13.5px;
  font-weight: 600;
  animation: swuFadeIn .35s cubic-bezier(.2,.8,.2,1);
  max-width: calc(100vw - 32px);
}
.swu-text { white-space: nowrap; }
.swu-btn {
  background: #f4c447;
  color: #1a2a3a;
  border: none;
  padding: 7px 14px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  transition: transform .12s, background .15s;
}
.swu-btn:hover, .swu-btn:active {
  background: #fcd456;
  transform: translateY(-1px);
}
.swu-x {
  background: transparent;
  border: none;
  color: rgba(255,255,255,.6);
  font-size: 20px;
  width: 24px; height: 24px;
  padding: 0;
  cursor: pointer;
  line-height: 1;
  transition: color .15s;
  font-family: inherit;
}
.swu-x:hover { color: #fff; }
@keyframes swuFadeIn {
  from { opacity: 0; transform: translateX(-50%) translateY(20px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}
@media (max-width: 480px) {
  #swUpdateBanner {
    bottom: calc(env(safe-area-inset-bottom, 0) + 80px);
    font-size: 12.5px;
    padding: 9px 10px 9px 14px;
  }
}

/* ============ HOTEL EDIT (edit mode only) ============ */
.hotel-card.editable { position: relative; padding-right: 50px; }
.hotel-edit-btn {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(244, 196, 71, 0.95);
  color: #1a2a3a;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,.12);
  transition: background .15s, transform .15s;
  font-family: inherit;
  z-index: 2;
}
.hotel-edit-btn:hover, .hotel-edit-btn:active {
  background: #f4c447;
  transform: scale(1.08);
}
/* Stop the arrow from absorbing clicks meant for the card body */
.hotel-card.editable .hotel-arrow {
  position: relative;
  z-index: 1;
  padding: 4px 8px;
  border-radius: 8px;
  transition: background .15s;
}
.hotel-card.editable .hotel-arrow:hover { background: rgba(0,0,0,.05); }

/* "Ghost" style for the secondary action in hotel edit modal */
.edit-btn.ghost {
  background: transparent;
  color: #6a7888;
  border: 1px dashed #d0d8e0;
}
.edit-btn.ghost:hover {
  background: #f7f8fa;
  color: #1a2a3a;
  border-color: #1a2a3a;
}

/* Hotel pin in map tab — same shape as place cards but tinted gold */
.dp-card.dp-card-hotel {
  background: linear-gradient(135deg, #fffaec 0%, #fff7d6 100%);
  border-color: #f4dca0;
}
.dp-img.dp-img-hotel {
  background: rgba(244, 196, 71, 0.25);
  color: #6a4500;
  font-size: 18px;
}
.dp-card-hotel .dp-sub {
  font-size: 12px;
  color: #6a7888;
  font-weight: 500;
  margin-top: 2px;
}
