/* ============================================================
   Ionian · Corfu + Albania field guide
   Warm charcoal chrome, sand background, white sheets.
   Type: Cabinet Grotesk (display) + General Sans (UI).
   Structure from Kydonia; colouring from Claire's palette.
   ============================================================ */

:root {
  /* chrome */
  --chrome:      #1e1d1b;
  --chrome-deep: #161410;
  --chrome-soft: #eddcc1;
  /* surfaces */
  --sheet:       #ffffff;
  --bg:          #fdf6ec;
  --bg-tint:     #f7eede;
  /* ink */
  --ink:         #2b2824;
  --ink-soft:    #6b6459;
  --ink-faint:   #9a9184;
  --line:        #ece2d1;
  /* accents */
  --accent:      #ee6c52;
  --accent-deep: #bc402a;
  --accent-soft: #fbe4dd;
  --sun:         #f7ba61;
  --sunny:       #f9bf6e;   /* sunny-300: countdown + warm cards */
  --sun-soft:    #fdf1dc;
  --sea:         #3e7c74;
  --olive:       #84913a;
  /* on-chrome text */
  --on-chrome:      #faf3e8;
  --on-chrome-dim:  rgba(250, 243, 232, 0.72);
  --on-chrome-line: rgba(250, 243, 232, 0.26);
  /* claire flags */
  --flag-safe:   #5f6b26;  --flag-safe-bg:  #f2f4e6;  --flag-safe-line:  #d6dcb4;
  --flag-adapt:  #b06e18;  --flag-adapt-bg: #fdf3e2;  --flag-adapt-line: #f0dcae;
  --flag-avoid:  #bc402a;  --flag-avoid-bg: #fbe8e2;  --flag-avoid-line: #f2c9bd;

  --font-display: "Cabinet Grotesk", "Avenir Next", sans-serif;
  --font-ui: "General Sans", "Avenir Next", sans-serif;

  --r-chip: 10px;
  --r-tile: 16px;
  --r-card: 22px;
  --r-sheet: 28px;

  --shadow-card: 0 1px 2px rgba(120, 90, 50, 0.05), 0 14px 34px -14px rgba(190, 150, 100, 0.30);
  --shadow-float: 0 1px 2px rgba(120, 90, 50, 0.06), 0 22px 44px -18px rgba(190, 150, 100, 0.42);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --t-fast: 170ms;
  --t-med: 240ms;

  --z-rail: 5;
  --z-fab: 35;
  --z-nav: 40;
  --z-sheet-backdrop: 50;
  --z-sheet: 55;
  --z-overlay: 60;
  --z-lightbox: 70;

  --nav-h: 84px;
  --pad: 20px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  overscroll-behavior-y: none;
  font-variant-numeric: tabular-nums;
}
#app { max-width: 560px; margin: 0 auto; min-height: 100dvh; position: relative; background: var(--bg); }
@media (min-width: 900px) {
  body { background: #e3cdad; }
  #app { max-width: 480px; box-shadow: 0 0 90px -20px rgba(120, 90, 50, 0.45); background: var(--bg); min-height: 100dvh; }
}

img { display: block; max-width: 100%; }
a { color: var(--sea); text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, textarea { font: inherit; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.12; margin: 0; text-wrap: balance; }
p { margin: 0; }
[hidden] { display: none !important; }
.ic { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.tnum { font-variant-numeric: tabular-nums; }

.view { padding-bottom: calc(var(--nav-h) + 28px); min-height: 100dvh; }
.view-map { padding-bottom: 0; }

/* ---------- skeleton shimmer ---------- */
.ph {
  background: linear-gradient(100deg, var(--bg-tint) 40%, #fbf3e6 50%, var(--bg-tint) 60%);
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
}
@keyframes shimmer { to { background-position: -200% 0; } }

/* ============================================================
   HOME
   ============================================================ */
.home-photo {
  position: relative;
  height: clamp(220px, 34vh, 400px);
  overflow: hidden;
  background: var(--bg-tint);
}
.home-photo-media, .home-photo-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.home-photo-media img { opacity: 0; transition: opacity 700ms ease; }
.home-photo-media img.is-loaded { opacity: 1; }
.home-photo-fade {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to top, var(--bg) 1%, rgba(253, 246, 236, 0.55) 15%, transparent 40%);
}
.home-intro { padding: 20px var(--pad) 0; }
.home-date { font-size: 12px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); }
.home-title { font-size: 46px; font-weight: 800; letter-spacing: -0.02em; color: var(--ink); line-height: 1.0; margin-top: 10px; }
.home-title .accent { color: var(--accent); }
.home-search {
  display: flex; align-items: center; gap: 12px; width: 100%;
  margin-top: 18px;
  background: var(--sheet); color: var(--ink-soft);
  border-radius: 999px; padding: 15px 20px;
  font-size: 15px; font-weight: 500;
  box-shadow: var(--shadow-card);
  transition: transform var(--t-fast) var(--ease);
}
.home-search:active { transform: scale(0.98); }
.home-search .ic { color: var(--accent); }

.home-section { padding: 26px var(--pad) 0; }
.home-section:last-child { padding-bottom: 8px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 14px; gap: 10px; }
.section-head h2 { font-size: 22px; font-weight: 700; letter-spacing: -0.01em; }
.section-link { font-size: 13.5px; font-weight: 600; color: var(--sea); flex: none; }

/* countdown card (Claire's sunny card) */
.count-card {
  background: var(--sunny); color: var(--ink);
  border-radius: var(--r-sheet); padding: 22px 20px 20px;
  box-shadow: var(--shadow-card);
}
.cd-label { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink); margin-bottom: 16px; }
.cd-label .ic { width: 15px; height: 15px; }
.cd-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; }
.cd-tile { background: var(--bg); border-radius: var(--r-tile); padding: 16px 4px; text-align: center; }
.cd-n { font-family: var(--font-display); font-weight: 800; font-size: 32px; line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; }
.cd-l { font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); margin-top: 6px; }
.cd-target { font-size: 12.5px; font-weight: 500; color: rgba(43, 40, 36, 0.75); margin-top: 16px; line-height: 1.45; }
.cd-during { margin: 4px 0 2px; }
.cd-daybig { font-family: var(--font-display); font-weight: 800; font-size: 30px; letter-spacing: -0.015em; }
.cd-bar { height: 8px; border-radius: 999px; background: rgba(43, 40, 36, 0.16); margin: 14px 0 6px; overflow: hidden; }
.cd-bar > span { display: block; height: 100%; border-radius: 999px; background: var(--accent); transform-origin: left; transition: transform var(--t-med) var(--ease); }
.cd-signoff { font-family: var(--font-display); font-weight: 800; font-size: 24px; letter-spacing: -0.015em; margin: 4px 0 8px; }
.milestone-chip {
  display: inline-flex; align-items: center; gap: 7px; margin-top: 16px;
  background: var(--accent); color: #fff;
  border-radius: 999px; padding: 7px 14px; font-size: 12.5px; font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.milestone-chip .ic { width: 14px; height: 14px; }

/* to-do card */
.todo-card {
  display: flex; align-items: center; gap: 16px;
  background: var(--sheet); border-radius: var(--r-card);
  padding: 17px 18px; box-shadow: var(--shadow-card);
  width: 100%; text-align: left;
  transition: transform var(--t-fast) var(--ease);
}
.todo-card:active { transform: scale(0.985); }
.ring-mini { position: relative; width: 54px; height: 54px; flex: none; }
.ring-mini svg { width: 54px; height: 54px; transform: rotate(-90deg); }
.ring-mini .track { fill: none; stroke: var(--line); stroke-width: 5.5; }
.ring-mini .prog { fill: none; stroke: var(--accent); stroke-width: 5.5; stroke-linecap: round; transition: stroke-dashoffset var(--t-med) var(--ease); }
.ring-mini .n { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; font-size: 14px; color: var(--ink); font-variant-numeric: tabular-nums; }
.todo-card .t { flex: 1; min-width: 0; }
.todo-card .t .h { font-family: var(--font-display); font-weight: 700; font-size: 16px; }
.todo-card .t .s { font-size: 13px; color: var(--ink-soft); margin-top: 3px; }
.todo-card .chev { color: var(--ink-faint); }

/* weather strip */
.wx-strip { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.wx-tile {
  display: flex; align-items: center; gap: 12px;
  background: var(--sheet); border-radius: var(--r-tile);
  padding: 13px 15px; box-shadow: var(--shadow-card);
  border: 1.5px solid transparent;
}
.wx-tile.is-here { border-color: var(--accent); }
.wx-tile .ic { width: 30px; height: 30px; color: var(--accent); stroke-width: 1.6; flex: none; }
.wx-tile .t { min-width: 0; }
.wx-tile .city { font-size: 11.5px; font-weight: 600; color: var(--ink-soft); display: flex; align-items: center; gap: 5px; }
.wx-tile .city .now { color: var(--accent); font-size: 9.5px; letter-spacing: 0.04em; text-transform: uppercase; }
.wx-tile .temp { font-family: var(--font-display); font-weight: 800; font-size: 22px; color: var(--ink); font-variant-numeric: tabular-nums; line-height: 1.05; margin-top: 2px; }

/* chips */
.chip-row { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; padding-bottom: 2px; }
.chip-row::-webkit-scrollbar { display: none; }
.chip {
  flex: none; padding: 10px 16px; border-radius: 999px; min-height: 40px;
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--sheet); color: var(--ink-soft);
  font-size: 13.5px; font-weight: 600;
  border: 1px solid var(--line);
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
}
.chip.is-on { background: var(--sunny); color: var(--ink); border-color: var(--sunny); }
.chip.solid-chip.is-on { background: var(--olive); color: #fff; border-color: var(--olive); }
.chip.hearts-chip.is-on { background: var(--accent); color: #fff; border-color: var(--accent); }

/* featured / place cards rail */
.card-rail { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin: 0 calc(var(--pad) * -1); padding: 4px var(--pad) 18px; }
.card-rail::-webkit-scrollbar { display: none; }
.pcard {
  flex: none; width: 232px; height: 320px; position: relative;
  border-radius: var(--r-card); overflow: hidden;
  scroll-snap-align: start;
  background: var(--bg-tint);
  box-shadow: var(--shadow-card);
  transition: transform var(--t-fast) var(--ease);
}
.pcard:active { transform: scale(0.98); }
.pcard > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pcard-pill {
  position: absolute; left: 10px; right: 10px; bottom: 10px;
  background: var(--sheet); border-radius: var(--r-tile);
  padding: 11px 13px;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  box-shadow: 0 4px 14px rgba(30, 29, 27, 0.18);
}
.pcard-pill .t { min-width: 0; }
.pcard-pill .name { display: block; font-family: var(--font-display); font-weight: 700; font-size: 15.5px; letter-spacing: -0.01em; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pcard-pill .area { display: block; font-size: 12px; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.rating-chip {
  flex: none; display: inline-flex; align-items: center; gap: 4px;
  background: var(--sunny); color: var(--ink);
  font-size: 12.5px; font-weight: 700; font-variant-numeric: tabular-nums;
  border-radius: 999px; padding: 5px 9px;
}
.rating-chip .ic { width: 13px; height: 13px; stroke-width: 2.2; fill: var(--ink); stroke: var(--ink); }
.safe-chip {
  flex: none; display: inline-flex; align-items: center; gap: 4px;
  background: var(--flag-safe-bg); color: var(--flag-safe);
  border: 1px solid var(--flag-safe-line);
  font-size: 11.5px; font-weight: 700;
  border-radius: 999px; padding: 4px 9px;
}
.safe-chip .ic { width: 12px; height: 12px; stroke-width: 2.2; }

/* ============================================================
   PAGE HEADS / GUIDE
   ============================================================ */
.page-head { padding: max(26px, calc(env(safe-area-inset-top) + 14px)) var(--pad) 6px; }
.page-head h1 { font-size: 32px; font-weight: 800; letter-spacing: -0.02em; }
.page-sub { font-size: 14px; color: var(--ink-soft); margin-top: 6px; max-width: 44ch; }
.back-line { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 600; color: var(--ink-soft); margin-bottom: 8px; }
.back-line .ic { width: 16px; height: 16px; }

.search-bar {
  margin: 14px var(--pad) 12px;
  display: flex; align-items: center; gap: 10px;
  background: var(--sheet); border-radius: 999px;
  padding: 4px 8px 4px 18px;
  box-shadow: var(--shadow-card);
}
.search-bar .ic { color: var(--accent); }
.search-bar input {
  flex: 1; border: 0; outline: none; background: none;
  padding: 12px 0; font-size: 15px; color: var(--ink); min-width: 0;
}
.search-bar input::placeholder { color: var(--ink-faint); }
#view-places .chip-row { padding: 2px var(--pad) 10px; }
#view-places #places-area-chips { padding-top: 0; padding-bottom: 12px; }

.place-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; padding: 6px var(--pad) 0; }
.gcard {
  position: relative; border-radius: var(--r-card); overflow: hidden;
  aspect-ratio: 3 / 3.9; background: var(--bg-tint);
  box-shadow: var(--shadow-card);
  transition: transform var(--t-fast) var(--ease);
  text-align: left;
}
.gcard:active { transform: scale(0.97); }
.gcard > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.gcard-scrim { position: absolute; inset: 0; background: linear-gradient(to top, rgba(22, 20, 16, 0.84), transparent 54%); }
.gcard-body { position: absolute; left: 12px; right: 12px; bottom: 11px; color: var(--on-chrome); }
.gcard-body .name { display: block; font-family: var(--font-display); font-weight: 700; font-size: 15.5px; letter-spacing: -0.01em; line-height: 1.18; }
.gcard-body .meta { display: flex; align-items: center; gap: 6px; margin-top: 4px; font-size: 12px; color: var(--on-chrome-dim); }
.gcard-body .meta .ic { width: 12px; height: 12px; stroke-width: 2.4; fill: var(--sun); stroke: var(--sun); }
.gcard-tag {
  position: absolute; top: 10px; left: 10px;
  background: rgba(255, 255, 255, 0.92); color: var(--ink);
  font-size: 11px; font-weight: 600; border-radius: 999px; padding: 4px 9px;
  backdrop-filter: blur(6px);
}
.gcard-safe {
  position: absolute; top: 10px; left: 10px;
  background: var(--flag-safe-bg); color: var(--flag-safe);
  font-size: 10.5px; font-weight: 700; border-radius: 999px; padding: 4px 8px;
  display: inline-flex; align-items: center; gap: 4px;
}
.gcard-safe .ic { width: 11px; height: 11px; stroke-width: 2.4; }
.gcard-heart { position: absolute; top: 5px; right: 5px; padding: 8px; color: rgba(255, 255, 255, 0.92); }
.gcard-heart .ic { width: 19px; height: 19px; filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.4)); }
.gcard-heart.is-on .ic { fill: var(--accent); stroke: var(--accent); }
.gcard-verified {
  position: absolute; bottom: 46px; right: 10px;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--sea); color: #fff; display: grid; place-items: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}
.gcard-verified .ic { width: 13px; height: 13px; stroke-width: 2.6; }

.empty-note { grid-column: 1 / -1; text-align: center; color: var(--ink-soft); font-size: 14px; padding: 40px 20px; }

/* ============================================================
   PLACE DETAIL
   ============================================================ */
.detail-cover { position: relative; height: 56dvh; min-height: 390px; background: var(--bg-tint); overflow: hidden; }
.detail-cover img.cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity 300ms ease; }
.detail-cover-scrim { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(22, 20, 16, 0.42), transparent 30%), linear-gradient(to top, rgba(22, 20, 16, 0.66), transparent 48%); }
.detail-top {
  position: absolute; top: 0; left: 0; right: 0;
  display: flex; justify-content: space-between;
  padding: max(14px, calc(env(safe-area-inset-top) + 6px)) 14px 0;
}
.circle-btn {
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.94); color: var(--ink);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
  transition: transform var(--t-fast) var(--ease);
}
.circle-btn:active { transform: scale(0.92); }
.circle-btn.is-on { color: var(--accent); }
.circle-btn.is-on .ic { fill: currentColor; }
.area-photo-tag {
  position: absolute; left: 16px; bottom: 16px;
  background: rgba(22, 20, 16, 0.6); color: var(--on-chrome-dim);
  font-size: 10.5px; font-weight: 600; border-radius: 999px; padding: 4px 10px;
  backdrop-filter: blur(4px);
}
.detail-title { position: absolute; left: calc(var(--pad) + 2px); right: 84px; bottom: 34px; color: var(--on-chrome); }
.detail-title h1 { font-size: 32px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.08; }
.detail-title .loc { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 13.5px; color: var(--on-chrome-dim); flex-wrap: wrap; }
.detail-title .loc .ic { width: 15px; height: 15px; }
.detail-title .vbadge { display: inline-flex; align-items: center; gap: 4px; color: var(--sun); }
.detail-title .vbadge .ic { width: 13px; height: 13px; stroke-width: 2.6; }

.thumb-rail {
  position: absolute; right: 12px; bottom: -26px; z-index: var(--z-rail);
  display: flex; flex-direction: column; gap: 9px;
}
.thumb-rail button {
  width: 56px; height: 56px; border-radius: 15px; overflow: hidden;
  border: 2.5px solid var(--sheet);
  box-shadow: 0 3px 12px rgba(30, 29, 27, 0.22);
  background: var(--bg-tint);
  transition: transform var(--t-fast) var(--ease);
}
.thumb-rail button:active { transform: scale(0.93); }
.thumb-rail button.is-on { border-color: var(--accent); }
.thumb-rail img { width: 100%; height: 100%; object-fit: cover; }
.thumb-more { display: grid; place-items: center; font-size: 12px; font-weight: 700; color: var(--accent); background: var(--sheet); }

.detail-sheet {
  position: relative; z-index: 2;
  margin-top: -28px;
  background: var(--bg);
  border-radius: var(--r-sheet) var(--r-sheet) 0 0;
  padding: 26px var(--pad) 10px;
  animation: sheet-up var(--t-med) var(--ease);
}
@keyframes sheet-up { from { transform: translateY(26px); opacity: 0.4; } to { transform: none; opacity: 1; } }

.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 18px; }
.stat {
  background: var(--sheet); border-radius: var(--r-tile);
  padding: 12px 8px; text-align: center; box-shadow: var(--shadow-card);
}
.stat .v { font-family: var(--font-display); font-weight: 700; font-size: 16px; font-variant-numeric: tabular-nums; color: var(--chrome); display: flex; align-items: center; justify-content: center; gap: 5px; }
.stat .v .ic { width: 14px; height: 14px; stroke-width: 2.2; }
.stat .v .star { fill: var(--sun); stroke: var(--sun); }
.stat .l { font-size: 11px; color: var(--ink-soft); margin-top: 3px; font-weight: 500; }

/* Claire panel */
.claire-panel {
  background: var(--sheet); border-radius: var(--r-card);
  box-shadow: var(--shadow-card); padding: 18px 18px 6px; margin-bottom: 18px;
  border: 1px solid var(--line);
}
.claire-panel .cp-head { display: flex; align-items: center; gap: 9px; margin-bottom: 4px; }
.claire-panel .cp-head .badge { width: 30px; height: 30px; border-radius: 9px; background: var(--flag-safe-bg); color: var(--flag-safe); display: grid; place-items: center; flex: none; }
.claire-panel .cp-head .badge .ic { width: 17px; height: 17px; }
.claire-panel .cp-head h2 { font-size: 18px; font-weight: 700; letter-spacing: -0.01em; }
.claire-panel .cp-head .sub { font-size: 11.5px; color: var(--ink-faint); margin-top: 1px; }
.cp-group { padding: 13px 0; border-bottom: 1px solid var(--line); }
.cp-group:last-of-type { border-bottom: 0; }
.cp-label { display: flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 9px; }
.cp-label .dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.cp-label.safe { color: var(--flag-safe); } .cp-label.safe .dot { background: var(--flag-safe); }
.cp-label.adapt { color: var(--flag-adapt); } .cp-label.adapt .dot { background: var(--flag-adapt); }
.cp-label.avoid { color: var(--flag-avoid); } .cp-label.avoid .dot { background: var(--flag-avoid); }
.flag-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.flag-chip {
  font-size: 12.5px; font-weight: 600; line-height: 1.3;
  border-radius: var(--r-chip); padding: 6px 11px; border: 1px solid transparent;
}
.flag-chip.safe { background: var(--flag-safe-bg); color: var(--flag-safe); border-color: var(--flag-safe-line); }
.flag-chip.adapt { background: var(--flag-adapt-bg); color: var(--flag-adapt); border-color: var(--flag-adapt-line); }
.flag-chip.avoid { background: var(--flag-avoid-bg); color: var(--flag-avoid); border-color: var(--flag-avoid-line); }
.cp-tip {
  display: flex; gap: 10px; align-items: flex-start;
  background: var(--sun-soft); border-radius: var(--r-tile);
  padding: 12px 14px; margin: 14px 0; font-size: 13px; line-height: 1.5; color: #7a5a1e;
}
.cp-tip .ic { width: 16px; height: 16px; flex: none; margin-top: 1px; color: var(--sun); }
.cp-card-btn {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  width: 100%; background: var(--accent); color: #fff;
  border-radius: var(--r-tile); padding: 14px; margin-bottom: 14px;
  font-weight: 600; font-size: 14.5px;
  transition: transform var(--t-fast) var(--ease);
}
.cp-card-btn:active { transform: scale(0.98); }
.cp-card-btn .ic { width: 18px; height: 18px; }

.detail-body h2 { font-size: 19px; font-weight: 700; margin: 22px 0 9px; letter-spacing: -0.01em; }
.detail-body > p, .prose { font-size: 14.5px; line-height: 1.62; color: var(--ink-soft); max-width: 68ch; text-wrap: pretty; }
.readmore { color: var(--sea); font-weight: 600; font-size: 13.5px; }

.tag-row { display: flex; flex-wrap: wrap; gap: 7px; }
.tag { background: var(--bg-tint); color: var(--ink); font-size: 12.5px; font-weight: 600; padding: 6px 12px; border-radius: 999px; }
.tag.sun { background: var(--sun-soft); color: #8a621b; }

.info-list { display: flex; flex-direction: column; gap: 2px; margin-top: 4px; }
.info-row { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.info-row:last-child { border-bottom: 0; }
.info-row .ic { color: var(--accent); width: 18px; height: 18px; margin-top: 1px; flex: none; }
.info-row .k { font-weight: 600; color: var(--ink); min-width: 74px; flex: none; }
.info-row .val { color: var(--ink-soft); flex: 1; line-height: 1.5; word-break: break-word; }
.info-row .val a { color: var(--sea); }

.action-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 22px 0 8px; }
.action-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 999px; padding: 14px 12px; min-height: 48px;
  font-weight: 600; font-size: 14px;
  background: var(--sheet); color: var(--ink);
  box-shadow: var(--shadow-card);
  transition: transform var(--t-fast) var(--ease);
}
.action-btn:active { transform: scale(0.97); }
.action-btn.primary { background: var(--accent); color: #fff; grid-column: 1 / -1; padding: 16px; font-size: 15px; }
.action-btn .ic { width: 18px; height: 18px; }

.mini-map { border-radius: var(--r-card); overflow: hidden; height: 200px; margin-top: 12px; box-shadow: var(--shadow-card); background: var(--bg-tint); position: relative; }
.mini-map-approx {
  position: absolute; top: 10px; left: 10px; z-index: 1;
  background: rgba(255, 255, 255, 0.92); color: var(--ink-soft);
  font-size: 10.5px; font-weight: 600; border-radius: 999px; padding: 4px 10px;
  display: inline-flex; align-items: center; gap: 5px; backdrop-filter: blur(4px);
}
.mini-map-approx .ic { width: 12px; height: 12px; color: var(--accent); }

.menu-cta {
  display: flex; align-items: center; gap: 13px;
  background: var(--sunny); color: var(--ink);
  border-radius: var(--r-card); padding: 16px 18px; margin-top: 20px;
  width: 100%; text-align: left;
  box-shadow: var(--shadow-card);
  transition: transform var(--t-fast) var(--ease);
}
.menu-cta:active { transform: scale(0.98); }
.menu-cta .t { min-width: 0; }
.menu-cta .t .h { display: block; font-family: var(--font-display); font-weight: 700; font-size: 16px; }
.menu-cta .t .s { display: block; font-size: 12.5px; color: rgba(43, 40, 36, 0.72); margin-top: 2px; }
.menu-cta .chev { margin-left: auto; }

.gallery-strip { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; margin: 12px calc(var(--pad) * -1) 0; padding: 0 var(--pad) 8px; }
.gallery-strip::-webkit-scrollbar { display: none; }
.gallery-strip button { flex: none; width: 132px; height: 100px; border-radius: var(--r-tile); overflow: hidden; background: var(--bg-tint); }
.gallery-strip img { width: 100%; height: 100%; object-fit: cover; }

.status-banner {
  display: flex; gap: 10px; align-items: flex-start;
  background: var(--bg-tint); color: var(--ink-soft);
  border-radius: var(--r-tile); padding: 13px 15px; margin-top: 20px;
  font-size: 12.5px; line-height: 1.5;
}
.status-banner .ic { width: 16px; height: 16px; margin-top: 1px; flex: none; color: var(--ink-faint); }
.status-banner.verified { background: #eef3ef; color: #35594f; }
.status-banner.verified .ic { color: var(--sea); }

/* ============================================================
   MENU SHEET
   ============================================================ */
.sheet-backdrop {
  position: fixed; inset: 0; z-index: var(--z-sheet-backdrop);
  background: rgba(22, 20, 16, 0.5);
  opacity: 0; transition: opacity var(--t-med) ease;
}
.sheet-backdrop.is-open { opacity: 1; }
.menu-sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: var(--z-sheet);
  max-width: 560px; margin: 0 auto;
  max-height: 88dvh; overflow-y: auto;
  background: var(--sheet);
  border-radius: var(--r-sheet) var(--r-sheet) 0 0;
  padding: 10px var(--pad) 36px;
  transform: translateY(100%);
  transition: transform var(--t-med) var(--ease);
  overscroll-behavior: contain;
}
@media (min-width: 900px) { .menu-sheet { max-width: 480px; } }
.menu-sheet.is-open { transform: none; }
.sheet-grab { width: 40px; height: 4px; border-radius: 2px; background: var(--line); margin: 6px auto 14px; }
.menu-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
.menu-head h2 { font-size: 23px; font-weight: 800; letter-spacing: -0.015em; }
.menu-head .sub { font-size: 12.5px; color: var(--ink-soft); margin-top: 4px; }
.menu-legend { display: flex; gap: 12px; flex-wrap: wrap; margin: 14px 0 4px; }
.menu-legend .lg { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; color: var(--ink-soft); }
.menu-legend .lg .dot { width: 9px; height: 9px; border-radius: 50%; }
.menu-legend .lg.safe .dot { background: var(--flag-safe); }
.menu-legend .lg.adapt .dot { background: var(--flag-adapt); }
.menu-legend .lg.avoid .dot { background: var(--flag-avoid); }

.menu-section-h {
  font-family: var(--font-display); font-weight: 700; font-size: 16.5px;
  margin: 22px 0 4px; letter-spacing: -0.01em; color: var(--ink);
}
.mi { display: flex; gap: 12px; align-items: flex-start; padding: 11px 0; border-bottom: 1px solid var(--line); }
.mi:last-child { border-bottom: 0; }
.mi .t { flex: 1 1 auto; min-width: 0; }
.mi .n { font-weight: 600; font-size: 14px; color: var(--ink); line-height: 1.4; }
.mi .desc { font-size: 12.5px; color: var(--ink-soft); line-height: 1.45; margin-top: 3px; max-width: 56ch; }
.mflag {
  flex: none; font-size: 10.5px; font-weight: 700; letter-spacing: 0.03em;
  border-radius: 999px; padding: 4px 9px; text-transform: uppercase;
  align-self: flex-start; margin-top: 1px;
}
.mflag.safe { background: var(--flag-safe-bg); color: var(--flag-safe); }
.mflag.adapt { background: var(--flag-adapt-bg); color: var(--flag-adapt); }
.mflag.avoid { background: var(--flag-avoid-bg); color: var(--flag-avoid); }
.mflag.none { background: var(--bg-tint); color: var(--ink-faint); }
.menu-recency { font-size: 12px; color: var(--ink-faint); line-height: 1.5; margin-top: 22px; padding-top: 12px; border-top: 1px solid var(--line); }
.menu-recency b { color: var(--ink-soft); font-weight: 600; }

/* ============================================================
   PLAN / DAYS
   ============================================================ */
#days-list, #flex-list { padding: 10px var(--pad) 0; display: flex; flex-direction: column; gap: 13px; }
.days-sub-h { padding: 30px var(--pad) 0; font-size: 22px; font-weight: 700; letter-spacing: -0.01em; }
.days-sub-p { padding: 6px var(--pad) 0; font-size: 13.5px; color: var(--ink-soft); max-width: 46ch; }
.day-card {
  display: flex; border-radius: var(--r-card); overflow: hidden;
  min-height: 120px; background: var(--sheet);
  box-shadow: var(--shadow-card); text-align: left; width: 100%;
  transition: transform var(--t-fast) var(--ease);
}
.day-card:active { transform: scale(0.985); }
.day-card .thumb { position: relative; width: 38%; min-width: 118px; flex: none; background: var(--bg-tint); }
.day-card .thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.day-card .b { flex: 1; min-width: 0; padding: 15px 16px; display: flex; flex-direction: column; justify-content: center; }
.day-card .d { display: block; font-size: 11.5px; font-weight: 700; color: var(--accent); letter-spacing: 0.02em; }
.day-card .n { display: block; font-family: var(--font-display); font-weight: 800; font-size: 19px; letter-spacing: -0.015em; line-height: 1.14; margin-top: 4px; color: var(--ink); }
.day-card .s { font-size: 12.5px; color: var(--ink-soft); margin-top: 6px; line-height: 1.42; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.day-card.flex-card .flex-badge { position: absolute; top: 10px; left: 10px; background: var(--sunny); color: var(--ink); font-size: 10px; font-weight: 700; border-radius: 999px; padding: 4px 9px; z-index: 1; }
.day-card .drive-badge { display: inline-flex; align-items: center; gap: 5px; margin-top: 8px; font-size: 11.5px; font-weight: 600; color: var(--ink-soft); background: var(--bg); border-radius: 999px; padding: 4px 10px; width: fit-content; }
.day-card .drive-badge .ic { width: 13px; height: 13px; color: var(--accent); }

.day-hero { position: relative; height: 38dvh; min-height: 270px; background: var(--bg-tint); overflow: hidden; }
.day-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.day-hero .scrim { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(22, 20, 16, 0.44), transparent 32%), linear-gradient(to top, rgba(22, 20, 16, 0.76), transparent 54%); }
.day-hero .b { position: absolute; left: calc(var(--pad) + 2px); right: var(--pad); bottom: 30px; color: var(--on-chrome); }
.day-hero .d { font-size: 13px; font-weight: 600; color: var(--sun); }
.day-hero h1 { font-size: 29px; font-weight: 800; letter-spacing: -0.02em; margin-top: 5px; line-height: 1.08; }
.day-hero .drive { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 12.5px; font-weight: 600; background: rgba(250, 243, 232, 0.16); border-radius: 999px; padding: 5px 12px; }
.day-hero .drive .ic { width: 14px; height: 14px; }

.day-summary { padding: 22px var(--pad) 0; font-size: 14.5px; line-height: 1.6; color: var(--ink-soft); }

.timeline { padding: 22px var(--pad) 8px; position: relative; }
.tl-block { position: relative; padding: 0 0 24px 34px; }
.tl-block::before {
  content: ""; position: absolute; left: 9px; top: 24px; bottom: 2px;
  width: 2px; background: var(--line); border-radius: 1px;
}
.tl-block:last-child::before { display: none; }
.tl-dot {
  position: absolute; left: 0; top: 2px;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--accent); color: #fff;
  display: grid; place-items: center;
}
.tl-dot .ic { width: 11px; height: 11px; stroke-width: 2.4; }
.tl-time { font-size: 12px; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: 0.05em; }
.tl-h { font-family: var(--font-display); font-weight: 700; font-size: 17px; margin-top: 3px; letter-spacing: -0.01em; }
.tl-body { font-size: 13.5px; line-height: 1.6; color: var(--ink-soft); margin-top: 6px; max-width: 62ch; text-wrap: pretty; }
.tl-places { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin-top: 10px; padding-bottom: 2px; }
.tl-places::-webkit-scrollbar { display: none; }
.tl-place {
  flex: none; display: flex; align-items: center; gap: 8px;
  background: var(--sheet); border-radius: 999px; padding: 5px 12px 5px 5px;
  box-shadow: var(--shadow-card); font-size: 12.5px; font-weight: 600; color: var(--ink);
}
.tl-place img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; background: var(--bg-tint); }
.tl-place .safe-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--flag-safe); flex: none; }

/* ============================================================
   MAP
   ============================================================ */
.view-map { position: relative; height: 100dvh; }
#gmap { position: absolute; inset: 0; background: var(--bg-tint); }
.map-chips {
  position: absolute; top: max(14px, calc(env(safe-area-inset-top) + 6px)); left: 0; right: 0;
  padding: 0 var(--pad); z-index: 2;
}
.map-chips .chip { box-shadow: var(--shadow-card); }
.map-leg-toggle {
  position: absolute; top: max(62px, calc(env(safe-area-inset-top) + 54px)); left: var(--pad); z-index: 2;
  display: flex; background: var(--sheet); border-radius: 999px; padding: 3px; box-shadow: var(--shadow-card);
}
.map-leg-toggle button { padding: 7px 14px; border-radius: 999px; font-size: 12.5px; font-weight: 700; color: var(--ink-soft); }
.map-leg-toggle button.is-on { background: var(--sunny); color: var(--ink); }
.map-card {
  position: absolute; left: var(--pad); right: var(--pad);
  bottom: calc(var(--nav-h) + 18px); z-index: 2;
  background: var(--sheet); border-radius: var(--r-card);
  box-shadow: var(--shadow-float);
  display: flex; gap: 13px; padding: 11px; align-items: center;
  animation: sheet-up var(--t-med) var(--ease);
}
.map-card img { width: 68px; height: 68px; border-radius: var(--r-tile); object-fit: cover; flex: none; background: var(--bg-tint); }
.map-card .t { flex: 1; min-width: 0; }
.map-card .name { font-family: var(--font-display); font-weight: 700; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.map-card .meta { font-size: 12.5px; color: var(--ink-soft); margin-top: 2px; }
.map-card .approx { color: var(--accent); }
.map-card .chev { color: var(--ink-faint); }

/* ============================================================
   KIT
   ============================================================ */
.kit-section { padding: 8px var(--pad) 18px; }
.kit-h { font-size: 19px; font-weight: 700; letter-spacing: -0.01em; margin-bottom: 12px; }
.kit-h-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.kit-h-row .kit-h { margin-bottom: 0; }
.kit-lead { font-size: 13px; color: var(--ink-soft); margin: -4px 0 14px; line-height: 1.5; max-width: 48ch; }
.text-btn { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--sea); }
.text-btn .ic { width: 15px; height: 15px; }
.kit-card {
  background: var(--sheet); border-radius: var(--r-card);
  padding: 17px; box-shadow: var(--shadow-card); margin-bottom: 10px;
}
.kit-card-h { font-family: var(--font-display); font-weight: 700; font-size: 16px; margin-bottom: 4px; display: flex; align-items: center; gap: 8px; }
.kit-card-h .ic { width: 18px; height: 18px; color: var(--accent); }
.kit-card-h .pill { margin-left: auto; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; border-radius: 999px; padding: 3px 9px; background: var(--flag-avoid-bg); color: var(--flag-avoid); }

.kit-quick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.qtile {
  display: flex; align-items: center; gap: 11px;
  background: var(--sunny); color: var(--ink);
  border-radius: var(--r-tile); padding: 15px;
  font-weight: 600; font-size: 14px;
  box-shadow: var(--shadow-card);
  transition: transform var(--t-fast) var(--ease);
}
.qtile:active { transform: scale(0.97); }
.qtile.alt { background: var(--sheet); color: var(--ink); }
.qtile .ic { color: var(--accent); }

.seg { display: flex; background: var(--sheet); border-radius: 999px; padding: 4px; box-shadow: var(--shadow-card); margin-bottom: 12px; }
.seg-btn { flex: 1; padding: 11px; border-radius: 999px; font-size: 13.5px; font-weight: 600; color: var(--ink-soft); transition: background var(--t-fast), color var(--t-fast); min-height: 42px; }
.seg-btn.is-on { background: var(--sunny); color: var(--ink); }
.seg-leg { margin-bottom: 16px; }
.seg-leg .seg-btn.is-on { background: var(--accent); color: #fff; }

/* boarding pass (bright ticket) */
.pass {
  background: var(--sheet); color: var(--ink);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
  overflow: hidden; position: relative;
  border: 1px solid var(--line);
}
.pass-name-tab {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--sunny); color: var(--ink); padding: 10px 20px;
  font-family: var(--font-display); font-weight: 700; font-size: 15px; letter-spacing: -0.01em;
}
.pass-name-tab .leg { font-family: var(--font-ui); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: rgba(43, 40, 36, 0.7); }
.pass-top { padding: 18px 20px 16px; }
.pass-air { display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; color: var(--ink-soft); font-weight: 600; }
.pass-air .ref { font-variant-numeric: tabular-nums; letter-spacing: 0.06em; color: var(--ink); }
.pass-route { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; gap: 8px; }
.pass-route .apt { text-align: center; }
.pass-route .code { font-family: var(--font-display); font-weight: 800; font-size: 38px; letter-spacing: -0.01em; line-height: 1; color: var(--ink); }
.pass-route .city { font-size: 11px; color: var(--ink-faint); margin-top: 4px; }
.pass-route .mid { flex: 1; display: flex; align-items: center; gap: 6px; color: var(--accent); }
.pass-route .mid::before, .pass-route .mid::after { content: ""; flex: 1; border-top: 1.5px dashed var(--accent); opacity: 0.55; }
.pass-route .mid .ic { width: 19px; height: 19px; }
.pass-times { display: flex; justify-content: space-between; margin-top: 14px; font-variant-numeric: tabular-nums; }
.pass-times .t { text-align: center; }
.pass-times .hh { font-family: var(--font-display); font-weight: 700; font-size: 19px; color: var(--ink); }
.pass-times .ll { font-size: 10.5px; color: var(--ink-faint); text-transform: uppercase; letter-spacing: 0.07em; margin-top: 2px; }
.pass-tear { position: relative; height: 0; border-top: 2px dashed rgba(238, 108, 82, 0.5); margin: 0 14px; }
.pass-tear::before, .pass-tear::after {
  content: ""; position: absolute; top: -11px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--bg);
}
.pass-tear::before { left: -25px; }
.pass-tear::after { right: -25px; }
.pass-bottom { padding: 16px 20px 20px; display: flex; gap: 16px; align-items: center; }
.pass-meta { flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 8px; font-size: 12px; }
.pass-meta .l { color: var(--ink-faint); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.07em; }
.pass-meta .v { font-weight: 600; margin-top: 2px; font-variant-numeric: tabular-nums; color: var(--ink); }
.pass-qr {
  flex: none; width: 108px; height: 108px; border-radius: var(--r-tile);
  background: var(--bg);
  border: 1.8px dashed var(--accent);
  display: grid; place-items: center; text-align: center;
  color: var(--accent); font-size: 10.5px; font-weight: 600; line-height: 1.35;
  padding: 8px; overflow: hidden;
  transition: transform var(--t-fast) var(--ease);
}
.pass-qr:active { transform: scale(0.96); }
.pass-qr img { width: 100%; height: 100%; object-fit: contain; border-radius: 8px; background: #fff; }
.pass-qr.has-qr { border-style: solid; border-color: transparent; background: #fff; padding: 5px; }
.pass-qr .ic { width: 22px; height: 22px; margin-bottom: 4px; }
.pass-note { font-size: 11.5px; color: var(--ink-faint); margin-top: 10px; line-height: 1.5; text-align: center; }

/* lightbox for a stored pass at full brightness */
.pass-full {
  position: fixed; inset: 0; z-index: var(--z-lightbox);
  background: #fff; display: grid; place-items: center; padding: 24px;
}
.pass-full img { max-width: 100%; max-height: 86dvh; }
.pass-full .close { position: absolute; top: max(16px, env(safe-area-inset-top)); right: 16px; color: var(--ink); }
.pass-full .hint { position: absolute; bottom: 22px; left: 0; right: 0; text-align: center; font-size: 12px; color: var(--ink-faint); }

/* ferry / kv rows */
.kv-row { display: flex; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; align-items: flex-start; }
.kv-row:last-child { border-bottom: 0; }
.kv-row .ic { color: var(--accent); width: 18px; height: 18px; margin-top: 1px; flex: none; }
.kv-row .k { font-weight: 600; min-width: 92px; flex: none; }
.kv-row .val { color: var(--ink-soft); flex: 1; line-height: 1.5; }
.kv-list { list-style: none; margin: 0; padding: 0; }
.kv-list li { position: relative; padding: 7px 0 7px 20px; font-size: 13.5px; color: var(--ink-soft); line-height: 1.5; border-bottom: 1px solid var(--line); }
.kv-list li:last-child { border-bottom: 0; }
.kv-list li::before { content: ""; position: absolute; left: 2px; top: 14px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

/* weather cards (dual city) */
.wx-city { margin-bottom: 10px; }
.wx-city-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 10px; }
.wx-city-head .name { font-family: var(--font-display); font-weight: 700; font-size: 16px; }
.wx-city-head .ctry { font-size: 12px; color: var(--ink-faint); }
.wx-current { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.wx-current .ic { width: 38px; height: 38px; color: var(--accent); stroke-width: 1.5; }
.wx-current .temp { font-family: var(--font-display); font-weight: 800; font-size: 34px; color: var(--ink); font-variant-numeric: tabular-nums; line-height: 1; }
.wx-current .lbl { font-size: 13px; color: var(--ink-soft); }
.wx-days { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -3px; padding: 0 3px 4px; }
.wx-days::-webkit-scrollbar { display: none; }
.wx-day { flex: none; width: 66px; text-align: center; background: var(--bg); border-radius: var(--r-chip); padding: 10px 4px; }
.wx-day .dl { font-size: 10.5px; font-weight: 600; color: var(--ink-soft); }
.wx-day .ic { width: 20px; height: 20px; margin: 6px auto; color: var(--sea); stroke-width: 1.6; }
.wx-day .hi { font-size: 13.5px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.wx-day .lo { font-size: 11.5px; color: var(--ink-faint); font-variant-numeric: tabular-nums; }
.wx-updated { font-size: 12px; color: var(--ink-faint); margin: 0 0 12px; }
.wx-fail { font-size: 13.5px; color: var(--ink-soft); padding: 8px 0; }

/* money */
.fx-row { display: flex; align-items: stretch; gap: 8px; }
.fx-field { flex: 1; background: var(--bg); border-radius: var(--r-tile); padding: 10px 13px; min-width: 0; }
.fx-field .cur { font-size: 10px; font-weight: 700; color: var(--ink-faint); text-transform: uppercase; letter-spacing: 0.06em; }
.fx-field input { width: 100%; border: 0; background: none; outline: none; font-family: var(--font-display); font-weight: 700; font-size: 19px; color: var(--ink); padding: 2px 0 0; font-variant-numeric: tabular-nums; }
.fx-note { font-size: 12px; color: var(--ink-faint); margin-top: 12px; line-height: 1.5; }
.costs-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cost-cell { background: var(--bg); border-radius: var(--r-tile); padding: 11px 13px; }
.cost-cell .cv { font-family: var(--font-display); font-weight: 700; font-size: 16px; color: var(--chrome); font-variant-numeric: tabular-nums; }
.cost-cell .cl { font-size: 11.5px; color: var(--ink-soft); margin-top: 2px; line-height: 1.3; }

/* translate */
.tr-box textarea {
  width: 100%; border: 0; background: var(--bg); border-radius: var(--r-tile);
  padding: 13px 15px; font: inherit; font-size: 15px; resize: none; outline: none; color: var(--ink);
  min-height: 72px;
}
.tr-langs { display: flex; align-items: center; justify-content: space-between; margin: 10px 2px; font-size: 13px; font-weight: 700; color: var(--accent); }
.tr-langs button { color: var(--accent); display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--accent-soft); transition: transform var(--t-fast) var(--ease); }
.tr-langs button:active { transform: rotate(180deg); }
.tr-out { background: var(--sunny); color: var(--ink); border-radius: var(--r-tile); padding: 13px 15px; font-size: 16.5px; min-height: 50px; line-height: 1.5; font-weight: 500; }
.tr-hint { font-size: 12px; color: var(--ink-faint); margin-top: 10px; }

.phrase-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.phrase-row:last-child { border-bottom: 0; }
.phrase-row .meaning { font-size: 12.5px; color: var(--ink-soft); flex: 1; line-height: 1.4; }
.phrase-row button { display: flex; align-items: center; gap: 9px; text-align: right; flex: none; max-width: 58%; }
.phrase-row .native { font-weight: 700; font-size: 14px; color: var(--ink); text-align: right; }
.phrase-row .latin { font-size: 11px; color: var(--ink-faint); margin-top: 1px; text-align: right; }
.phrase-row .spk { width: 34px; height: 34px; border-radius: 50%; background: var(--bg); color: var(--accent); display: grid; place-items: center; flex: none; }
.phrase-row .spk .ic { width: 16px; height: 16px; }
.phrase-group-h { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-faint); margin: 4px 0 2px; }

.sos {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--sheet); border-radius: var(--r-card); padding: 16px 18px;
  box-shadow: var(--shadow-card);
}
.sos .t .h { font-weight: 700; font-size: 15px; }
.sos .t .s { font-size: 12.5px; color: var(--ink-soft); margin-top: 2px; }
.sos a { background: var(--accent); color: #fff; font-family: var(--font-display); font-weight: 800; font-size: 19px; border-radius: 999px; padding: 10px 22px; }

/* ============================================================
   FOOD (dietary guide)
   ============================================================ */
.food-hero { position: relative; height: 34dvh; min-height: 240px; background: var(--bg-tint); overflow: hidden; border-radius: 0 0 var(--r-sheet) var(--r-sheet); }
.food-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.food-hero .scrim { position: absolute; inset: 0; background: linear-gradient(to top, rgba(22, 20, 16, 0.82), transparent 58%); }
.food-hero .detail-top { position: absolute; }
.food-hero .b { position: absolute; left: calc(var(--pad) + 2px); right: var(--pad); bottom: 26px; color: var(--on-chrome); }
.food-hero .kick { font-size: 12px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--sun); }
.food-hero h1 { font-size: 27px; font-weight: 800; letter-spacing: -0.02em; margin-top: 6px; line-height: 1.1; }
.food-body { padding: 22px var(--pad) 10px; }
.food-rules { background: var(--sheet); border-radius: var(--r-card); box-shadow: var(--shadow-card); padding: 18px; margin-bottom: 16px; }
.food-rules ul { list-style: none; margin: 0; padding: 0; }
.food-rules li { position: relative; padding: 9px 0 9px 26px; font-size: 13.5px; color: var(--ink-soft); line-height: 1.55; border-bottom: 1px solid var(--line); }
.food-rules li:last-child { border-bottom: 0; }
.food-rules li .ic { position: absolute; left: 0; top: 10px; width: 16px; height: 16px; color: var(--accent); }
.golden {
  background: var(--sunny); color: var(--ink);
  border-radius: var(--r-card); padding: 18px; margin-bottom: 16px;
  box-shadow: var(--shadow-card);
}
.golden .h { display: flex; align-items: center; gap: 8px; font-family: var(--font-display); font-weight: 700; font-size: 16px; color: var(--accent-deep); margin-bottom: 8px; }
.golden .h .ic { width: 18px; height: 18px; }
.golden p { font-size: 14px; line-height: 1.6; color: var(--ink); }
.script-card { background: var(--sheet); border-radius: var(--r-tile); box-shadow: var(--shadow-card); padding: 15px 16px; margin-bottom: 10px; }
.script-card .lang { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--accent); margin-bottom: 6px; }
.script-card p { font-size: 13.5px; line-height: 1.55; color: var(--ink-soft); }
.food-section-h { font-size: 20px; font-weight: 800; letter-spacing: -0.015em; margin: 26px 0 4px; }
.food-section-sub { font-size: 13px; color: var(--ink-soft); margin-bottom: 12px; }
.dish-group { margin-bottom: 14px; }
.dish-group-h { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 8px; }
.dish-group-h .dot { width: 10px; height: 10px; border-radius: 50%; }
.dish-group.green .dish-group-h { color: var(--flag-safe); } .dish-group.green .dot { background: var(--flag-safe); }
.dish-group.amber .dish-group-h { color: var(--flag-adapt); } .dish-group.amber .dot { background: var(--flag-adapt); }
.dish-group.red .dish-group-h { color: var(--flag-avoid); } .dish-group.red .dot { background: var(--flag-avoid); }
.dish {
  background: var(--sheet); border-radius: var(--r-tile); box-shadow: var(--shadow-card);
  padding: 12px 14px; margin-bottom: 8px; border-left: 3px solid transparent;
}
.dish-group.green .dish { border-left-color: var(--flag-safe); }
.dish-group.amber .dish { border-left-color: var(--flag-adapt); }
.dish-group.red .dish { border-left-color: var(--flag-avoid); }
.dish .dn { font-weight: 600; font-size: 14px; color: var(--ink); line-height: 1.35; }
.dish .dnote { font-size: 12.5px; color: var(--ink-soft); margin-top: 4px; line-height: 1.45; }
.shop-card { background: var(--sheet); border-radius: var(--r-card); box-shadow: var(--shadow-card); padding: 18px; margin-top: 8px; }
.shop-note { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; line-height: 1.5; color: var(--ink-soft); padding: 8px 0; }
.shop-note .ic { width: 16px; height: 16px; color: var(--accent); flex: none; margin-top: 2px; }
.shop-note.warn { background: var(--sun-soft); color: #7a5a1e; border-radius: var(--r-tile); padding: 12px 14px; margin: 6px 0; }
.chip-list { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 8px; }
.chip-list .lit { background: var(--bg-tint); color: var(--ink); font-size: 12.5px; font-weight: 500; border-radius: 999px; padding: 6px 12px; }

/* ============================================================
   TO-DO
   ============================================================ */
.todo-head { padding: max(26px, calc(env(safe-area-inset-top) + 14px)) var(--pad) 0; display: flex; align-items: center; gap: 16px; }
.todo-head .ring-lg { position: relative; width: 66px; height: 66px; flex: none; }
.todo-head .ring-lg svg { width: 66px; height: 66px; transform: rotate(-90deg); }
.todo-head .ring-lg .track { fill: none; stroke: var(--line); stroke-width: 6; }
.todo-head .ring-lg .prog { fill: none; stroke: var(--accent); stroke-width: 6; stroke-linecap: round; transition: stroke-dashoffset var(--t-med) var(--ease); }
.todo-head .ring-lg .n { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; font-size: 15px; color: var(--ink); font-variant-numeric: tabular-nums; }
.todo-head .t h1 { font-size: 28px; font-weight: 800; letter-spacing: -0.02em; }
.todo-head .t p { font-size: 13px; color: var(--ink-soft); margin-top: 4px; }
.todo-sync { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--ink-faint); margin-top: 5px; }
.todo-sync .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--olive); }
.todo-add { display: flex; gap: 8px; padding: 18px var(--pad) 6px; }
.todo-add input {
  flex: 1; background: var(--sheet); border: 1px solid var(--line); border-radius: var(--r-tile);
  padding: 13px 15px; font-size: 15px; color: var(--ink); outline: none; min-width: 0;
}
.todo-add input:focus { border-color: var(--accent); }
.todo-add button { flex: none; width: 48px; border-radius: var(--r-tile); background: var(--accent); color: #fff; display: grid; place-items: center; }
.todo-add button .ic { width: 20px; height: 20px; }
.todo-list { list-style: none; margin: 0; padding: 8px var(--pad) 0; display: flex; flex-direction: column; gap: 9px; }
.todo-item { display: flex; align-items: flex-start; gap: 13px; background: var(--sheet); border-radius: var(--r-tile); padding: 14px 15px; box-shadow: var(--shadow-card); }
.todo-check { flex: none; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; margin-top: 1px; transition: background var(--t-fast), border-color var(--t-fast); }
.todo-check.done { background: var(--accent); border-color: var(--accent); color: #fff; }
.todo-check .ic { width: 15px; height: 15px; stroke-width: 2.6; opacity: 0; }
.todo-check.done .ic { opacity: 1; }
.todo-item .txt { flex: 1; font-size: 14px; color: var(--ink); line-height: 1.5; padding-top: 2px; }
.todo-item.done .txt { color: var(--ink-faint); text-decoration: line-through; text-decoration-color: var(--ink-faint); }
.todo-del { flex: none; color: var(--ink-faint); padding: 4px; }
.todo-del .ic { width: 18px; height: 18px; }
.todo-suggest { padding: 22px var(--pad) 0; }
.todo-suggest h2 { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.todo-suggest p { font-size: 12.5px; color: var(--ink-soft); margin-bottom: 12px; }
.sugg-chip { display: block; width: 100%; text-align: left; background: var(--sheet); border: 1px dashed var(--line); border-radius: var(--r-tile); padding: 13px 15px; margin-bottom: 8px; font-size: 13.5px; color: var(--ink); display: flex; align-items: center; gap: 10px; }
.sugg-chip .ic { width: 18px; height: 18px; color: var(--accent); flex: none; }

/* ============================================================
   SEARCH OVERLAY / LIGHTBOX / rrow
   ============================================================ */
.rank-list { display: flex; flex-direction: column; gap: 10px; }
.rrow { display: flex; align-items: center; gap: 13px; background: var(--sheet); border-radius: var(--r-tile); padding: 10px; box-shadow: var(--shadow-card); transition: transform var(--t-fast) var(--ease); }
.rrow:active { transform: scale(0.985); }
.rrow img { width: 58px; height: 58px; border-radius: 12px; object-fit: cover; flex: none; background: var(--bg-tint); }
.rrow .t { min-width: 0; flex: 1; }
.rrow .name { display: block; font-family: var(--font-display); font-weight: 700; font-size: 15.5px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rrow .meta { display: block; font-size: 12.5px; color: var(--ink-soft); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rrow .rating-chip { background: var(--bg-tint); color: var(--chrome); }
.rrow .rating-chip .ic { fill: var(--sun); stroke: var(--sun); }

.overlay { position: fixed; inset: 0; z-index: var(--z-overlay); background: var(--bg); overflow-y: auto; }
.overlay-panel { max-width: 560px; margin: 0 auto; padding: max(14px, env(safe-area-inset-top)) 0 40px; }
@media (min-width: 900px) { .overlay-panel { max-width: 480px; } }
.search-bar.is-overlay { margin-top: 4px; }
#overlay-results { padding: 6px var(--pad); display: flex; flex-direction: column; gap: 10px; }
.icon-btn { width: 42px; height: 42px; display: grid; place-items: center; color: var(--ink-soft); border-radius: 50%; }
.icon-btn:active { background: var(--bg-tint); }

.lightbox { position: fixed; inset: 0; z-index: var(--z-lightbox); background: rgba(20, 18, 14, 0.96); display: grid; place-items: center; padding: 20px; }
.lightbox img { max-width: 100%; max-height: 82dvh; border-radius: var(--r-tile); }
.lightbox-close { position: absolute; top: max(16px, env(safe-area-inset-top)); right: 16px; color: #fff; }
.lightbox-credit { position: absolute; bottom: 22px; left: 20px; right: 20px; text-align: center; color: rgba(255, 255, 255, 0.6); font-size: 12px; }

/* ============================================================
   KITCHEN CARD FAB
   ============================================================ */
.kc-fab {
  position: fixed; right: max(16px, calc(50% - 280px + 16px));
  bottom: calc(var(--nav-h) + 14px); z-index: var(--z-fab);
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent); color: #fff;
  border-radius: 999px; padding: 12px 18px 12px 15px;
  font-weight: 600; font-size: 13.5px;
  box-shadow: var(--shadow-float);
  transition: transform var(--t-fast) var(--ease);
}
.kc-fab:active { transform: scale(0.96); }
.kc-fab .ic { width: 19px; height: 19px; }
@media (min-width: 900px) { .kc-fab { right: calc(50% - 240px + 16px); } }

/* ============================================================
   TRAVELLER PICKER + WHOAMI
   ============================================================ */
.picker {
  position: fixed; inset: 0; z-index: var(--z-lightbox);
  background: var(--bg);
  display: grid; place-items: center; padding: 28px var(--pad);
  overflow-y: auto;
}
.picker-inner { width: 100%; max-width: 440px; }
.picker-date { font-size: 12px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); }
.picker-title { font-size: 42px; font-weight: 800; letter-spacing: -0.02em; color: var(--ink); line-height: 1; margin-top: 10px; }
.picker-title .accent { color: var(--accent); }
.picker-sub { font-size: 14.5px; line-height: 1.5; color: var(--ink-soft); margin-top: 14px; max-width: 38ch; }
.picker-cards { display: flex; flex-direction: column; gap: 12px; margin-top: 26px; }
.picker-card {
  display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 14px; row-gap: 2px;
  align-items: center; text-align: left;
  background: var(--sheet); border-radius: var(--r-card); padding: 18px 20px;
  box-shadow: var(--shadow-card); border: 1.5px solid transparent;
  transition: transform var(--t-fast) var(--ease), border-color var(--t-fast);
}
.picker-card:active { transform: scale(0.985); }
.picker-card:hover { border-color: var(--accent); }
.picker-card .pc-badge {
  grid-row: 1 / 3; width: 48px; height: 48px; border-radius: 50%;
  background: var(--accent); color: #fff; display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 800; font-size: 22px;
}
.picker-card .pc-badge.alt { background: var(--sunny); color: var(--ink); }
.picker-card .pc-h { font-family: var(--font-display); font-weight: 700; font-size: 18px; color: var(--ink); }
.picker-card .pc-s { font-size: 12.5px; color: var(--ink-soft); line-height: 1.4; }

.whoami {
  display: flex; align-items: center; gap: 11px;
  background: var(--sheet); border-radius: var(--r-tile);
  padding: 12px 15px; box-shadow: var(--shadow-card); margin-bottom: 10px;
}
.whoami .badge { width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-family: var(--font-display); font-weight: 800; font-size: 15px; flex: none; }
.whoami .badge.alt { background: var(--sunny); color: var(--ink); }
.whoami .t { flex: 1; min-width: 0; }
.whoami .t .l { font-size: 11px; color: var(--ink-faint); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700; }
.whoami .t .n { font-family: var(--font-display); font-weight: 700; font-size: 16px; color: var(--ink); margin-top: 1px; }
.whoami .switch { flex: none; font-size: 13px; font-weight: 600; color: var(--sea); }

.pass-slot { margin-bottom: 12px; }
.pass-expander {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 12px; margin: 2px 0 4px;
  background: var(--sheet); border: 1px dashed var(--line); border-radius: var(--r-tile);
  font-size: 13.5px; font-weight: 600; color: var(--ink-soft);
}
.pass-expander .ic { width: 16px; height: 16px; transition: transform var(--t-fast) var(--ease); }
.pass-expander[aria-expanded="true"] .ic { transform: rotate(90deg); }

.lowkey-row {
  display: flex; align-items: center; gap: 10px;
  background: var(--sheet); border-radius: var(--r-tile);
  padding: 14px 16px; box-shadow: var(--shadow-card);
  font-size: 14px; font-weight: 600; color: var(--ink);
}
.lowkey-row .ic { width: 18px; height: 18px; color: var(--olive); flex: none; }
.lowkey-row .chev { margin-left: auto; color: var(--ink-faint); }

/* ============================================================
   TAB BAR
   ============================================================ */
.tabbar {
  position: fixed; bottom: 14px; left: 50%; transform: translateX(-50%);
  z-index: var(--z-nav);
  width: min(calc(100% - 28px), 420px);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: 999px;
  box-shadow: var(--shadow-float);
  display: flex; justify-content: space-around; align-items: center;
  padding: 7px 10px calc(7px + env(safe-area-inset-bottom) * 0.4);
}
.tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--ink-faint); flex: 1; padding: 2px 0; }
.tabbar .tab-dot {
  width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.tabbar .tab-label { font-size: 9.5px; font-weight: 600; letter-spacing: 0.02em; transition: color var(--t-fast); }
.tabbar a.is-on { color: var(--ink); }
.tabbar a.is-on .tab-dot { background: var(--sunny); color: var(--ink); transform: translateY(-1px); }
.tabbar a.is-on .tab-label { color: var(--ink); }

/* ============================================================
   MISC
   ============================================================ */
:focus-visible { outline: 2.5px solid var(--sea); outline-offset: 2px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.toast {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(var(--nav-h) + 24px); z-index: var(--z-lightbox);
  background: var(--chrome); color: var(--on-chrome);
  border-radius: 999px; padding: 11px 20px;
  font-size: 13.5px; font-weight: 600;
  box-shadow: var(--shadow-float);
  animation: toast-in 240ms var(--ease);
}
@keyframes toast-in { from { transform: translate(-50%, 12px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  @keyframes sheet-up { from { opacity: 0; } to { opacity: 1; } }
}
