/* Copenhagen trip — design notes:
   - Nordic palette: cream paper, ink black, danish red accent, harbor blue
   - Fraunces serif for titles (warmth, hygge), Inter for body
   - Mobile-first, generous spacing, soft shadows, no rounded-everything blandness
*/

:root {
  --cream: #f7f3eb;
  --cream-2: #f1ece1;
  --paper: #ffffff;
  --ink: #1a1916;
  --ink-soft: #4a4843;
  --muted: #8a857a;
  --line: #e6dfd0;
  --red: #c8102e;
  --red-soft: #e64c66;
  --harbor: #2a5a73;
  --harbor-soft: #4a8aa4;
  --gold: #c89846;
  --green: #5a7a44;
  --shadow: 0 1px 2px rgba(20,18,12,.04), 0 8px 24px rgba(20,18,12,.06);
  --shadow-up: 0 -2px 16px rgba(20,18,12,.08);
  --radius: 14px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--cream);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  font-size: 15px;
  line-height: 1.5;
  overscroll-behavior: none;
}
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
input, textarea { font: inherit; color: inherit; }
.hidden { display: none !important; }
.muted-sm { font-size: 12px; color: var(--muted); letter-spacing: .02em; text-transform: uppercase; font-weight: 600; }

/* ─── Topbar ─────────────────────────────────────────── */
.topbar {
  background: var(--cream);
  position: sticky; top: 0; z-index: 30;
  padding: calc(var(--safe-top) + 14px) 18px 12px;
  border-bottom: 1px solid var(--line);
}
.topbar-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-variation-settings: 'opsz' 100;
  font-size: 32px;
  margin: 0; line-height: 1;
  letter-spacing: -.02em;
  color: var(--ink);
}
.brand::first-letter { color: var(--red); }
.brand-sub { margin: 4px 0 0; font-size: 12.5px; color: var(--muted); font-weight: 500; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.weather-pill {
  display: flex; align-items: center; gap: 10px;
  background: var(--paper); border: 1px solid var(--line);
  padding: 8px 12px 8px 10px; border-radius: 999px;
  box-shadow: var(--shadow);
}
.icon-btn {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--paper);
  border: 1px solid var(--line);
  color: var(--muted);
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow);
  flex-shrink: 0;
}
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn:active { color: var(--red); transform: scale(.94); }
.icon-btn:disabled { opacity: .4; }
.weather-emoji { font-size: 22px; line-height: 1; }
.weather-temp { font-size: 14px; font-weight: 600; line-height: 1; }
.weather-lbl { font-size: 11px; color: var(--muted); margin-top: 2px; }

/* ─── Views ─────────────────────────────────────────── */
.view {
  display: none;
  padding: 16px 14px calc(var(--safe-bottom) + 96px);
  min-height: calc(100vh - 80px);
}
.view.active { display: block; }
#view-map, #view-map.active { padding: 0; }
#view-map { position: fixed; inset: 0; padding-top: calc(var(--safe-top) + 80px); padding-bottom: calc(var(--safe-bottom) + 72px); }
#view-map.active { display: block; }
#view-chat { display: none; }
#view-chat.active { display: flex; flex-direction: column; padding: 0; height: 100vh; padding-top: calc(var(--safe-top) + 80px); padding-bottom: calc(var(--safe-bottom) + 72px); }

/* ─── Cards ─────────────────────────────────────────── */
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
}
.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.card-head h3 {
  font-family: 'Fraunces', serif; font-weight: 600;
  margin: 0; font-size: 18px; letter-spacing: -.01em;
}
.ghost-btn { font-size: 13px; color: var(--harbor); font-weight: 600; }

.hero {
  background: linear-gradient(135deg, #fff 0%, var(--cream-2) 100%);
  border-color: var(--line);
}
.hero-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 2px;
}
.hero-nav .muted-sm { flex: 1; text-align: center; margin: 0; }
.day-nav-btn {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--paper);
  border: 1px solid var(--line);
  color: var(--ink);
  font-family: 'Fraunces', serif;
  font-size: 22px; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  padding: 0 0 2px;
}
.day-nav-btn:active:not(:disabled) { background: var(--cream-2); transform: scale(.94); }
.day-nav-btn:disabled { color: var(--line); border-color: var(--cream-2); background: transparent; }

.hero-title {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 26px;
  line-height: 1.15;
  margin: 6px 0 8px;
  letter-spacing: -.02em;
}
.plan-b {
  font-size: 13px;
  color: var(--ink-soft);
  margin: 6px 0 0;
  padding: 8px 10px;
  background: var(--cream-2);
  border-left: 3px solid var(--gold);
  border-radius: 4px;
}
.plan-b:empty { display: none; }

/* ─── Slots ─────────────────────────────────────────── */
.slots { display: flex; flex-direction: column; gap: 2px; }
.slot {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 12px;
  padding: 12px 4px;
  border-top: 1px solid var(--line);
  align-items: start;
}
.slot:first-child { border-top: 0; }
.slot-time { font-variant-numeric: tabular-nums; font-weight: 600; font-size: 13.5px; color: var(--red); padding-top: 2px; }
.slot-body { min-width: 0; }
.slot-title { font-weight: 600; font-size: 15px; line-height: 1.35; }
.slot-note { font-size: 13px; color: var(--ink-soft); margin-top: 4px; line-height: 1.4; }
.slot-poi {
  display: inline-block;
  margin-top: 6px;
  font-size: 12px;
  color: var(--harbor);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px dashed var(--harbor-soft);
}
.slot-meta { display: flex; gap: 6px; }
.slot-icon { width: 22px; height: 22px; color: var(--muted); }
.slot.now { background: linear-gradient(90deg, rgba(200,16,46,.06), transparent); border-radius: 8px; padding-left: 10px; margin-left: -10px; }
.slot.past { opacity: .42; }

/* ─── Days ─────────────────────────────────────────── */
.day {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 14px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.day-head {
  display: flex; align-items: baseline; justify-content: space-between;
  padding: 16px 16px 12px; gap: 12px;
  width: 100%;
  text-align: left;
}
.day-date { font-size: 12px; color: var(--muted); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.day-label { font-family: 'Fraunces', serif; font-weight: 600; font-size: 19px; letter-spacing: -.01em; line-height: 1.2; margin: 2px 0 0; }
.day-body { padding: 0 16px 8px; }
.day-plan-b { margin: 8px 16px 16px; }

/* ─── Weather grid ─────────────────────────────────── */
.weather-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.weather-day {
  text-align: center;
  padding: 8px 4px;
  background: var(--cream-2);
  border-radius: 8px;
}
.weather-day .wd-date { font-size: 11px; color: var(--muted); font-weight: 600; }
.weather-day .wd-emoji { font-size: 22px; line-height: 1.2; margin: 2px 0; }
.weather-day .wd-max { font-size: 13px; font-weight: 700; }
.weather-day .wd-min { font-size: 11px; color: var(--muted); }
.weather-day .wd-rain { font-size: 10px; color: var(--harbor); margin-top: 2px; }

/* ─── Bullets ─────────────────────────────────────── */
.bullet-list { list-style: none; padding: 0; margin: 0; }
.bullet-list li {
  padding: 8px 0 8px 18px;
  font-size: 14px;
  color: var(--ink-soft);
  position: relative;
  border-top: 1px solid var(--line);
}
.bullet-list li:first-child { border-top: 0; }
.bullet-list li::before {
  content: '·'; position: absolute; left: 4px; top: 6px;
  color: var(--red); font-size: 22px; line-height: 1;
}

/* ─── Map ─────────────────────────────────────────── */
#map { width: 100%; height: 100%; }
.leaflet-control-attribution { font-size: 9px !important; }
.poi-detail {
  position: absolute;
  left: 12px; right: 12px;
  bottom: calc(var(--safe-bottom) + 84px);
  background: var(--paper);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: 0 -4px 28px rgba(20,18,12,.18);
  max-height: 60vh;
  overflow-y: auto;
  z-index: 1000;
}
.poi-close {
  position: absolute; top: 8px; right: 8px; width: 32px; height: 32px;
  font-size: 22px; color: var(--muted);
  border-radius: 50%;
}
.poi-inner { padding: 18px; }
.poi-inner h3 { font-family: 'Fraunces', serif; font-size: 22px; margin: 0 0 4px; letter-spacing: -.01em; }
.poi-inner .cat { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--red); font-weight: 700; }
.poi-inner p { font-size: 14px; color: var(--ink-soft); margin: 10px 0; line-height: 1.5; }
.poi-inner .tip { background: var(--cream-2); padding: 10px 12px; border-radius: 8px; font-size: 13px; border-left: 3px solid var(--harbor); }
.poi-inner .meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.poi-inner .pill { font-size: 11px; background: var(--cream-2); padding: 4px 10px; border-radius: 999px; color: var(--ink-soft); font-weight: 500; }
.poi-inner .warn { background: #fcefe5; border-color: #d97045; color: #823c19; }

.leaflet-marker-icon.poi-marker {
  background: var(--red);
  width: 24px !important; height: 24px !important;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  margin-left: -12px !important; margin-top: -24px !important;
  border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,.3);
  display: flex; align-items: center; justify-content: center;
}
.leaflet-marker-icon.poi-marker.cat-museum { background: var(--harbor); }
.leaflet-marker-icon.poi-marker.cat-park { background: var(--green); }
.leaflet-marker-icon.poi-marker.cat-food { background: var(--gold); }
.leaflet-marker-icon.poi-marker.cat-shop { background: #6b4a82; }
.leaflet-marker-icon.poi-marker.cat-service { background: #4a4843; }
.leaflet-marker-icon.poi-marker.cat-amusement { background: #d4374f; }
.leaflet-marker-icon.poi-marker.hotel { background: var(--ink); width: 28px !important; height: 28px !important; margin-left: -14px !important; margin-top: -28px !important; }

/* ─── Chat ─────────────────────────────────────────── */
.chat-view { background: var(--cream); }
.chat-log {
  flex: 1; overflow-y: auto;
  padding: 16px 14px;
  display: flex; flex-direction: column; gap: 10px;
}
.chat-empty { color: var(--muted); font-size: 14px; padding: 32px 0; text-align: center; }
.chat-empty .suggest {
  display: block; width: 100%;
  margin: 8px 0 0;
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 13.5px;
  color: var(--ink-soft);
  text-align: left;
  box-shadow: var(--shadow);
}
.chat-empty .suggest:active { background: var(--cream-2); }

.msg {
  max-width: 88%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 14.5px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-wrap: break-word;
}
.msg.user { align-self: flex-end; background: var(--red); color: white; border-bottom-right-radius: 4px; }
.msg.assistant { align-self: flex-start; background: var(--paper); border: 1px solid var(--line); border-bottom-left-radius: 4px; box-shadow: var(--shadow); }
.msg.tool {
  align-self: flex-start;
  background: var(--cream-2);
  font-size: 12px;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, monospace;
  padding: 6px 10px;
  border-radius: 8px;
}
.msg.tool::before { content: '⚙ '; }
.msg.assistant.streaming::after {
  content: '▍';
  animation: blink 1.1s infinite;
  color: var(--red);
  font-weight: 700;
}
@keyframes blink { 50% { opacity: 0; } }

.chat-input {
  display: flex; gap: 8px;
  padding: 10px 12px calc(var(--safe-bottom) + 10px);
  background: var(--paper);
  border-top: 1px solid var(--line);
  position: sticky; bottom: 72px;
}
.chat-input textarea {
  flex: 1;
  background: var(--cream-2);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 9px 14px;
  font-size: 15px;
  resize: none;
  max-height: 140px;
  outline: none;
  line-height: 1.35;
}
.chat-input textarea:focus { border-color: var(--harbor-soft); }
.chat-input button {
  width: 38px; height: 38px;
  background: var(--red); color: white;
  border-radius: 50%;
  font-size: 18px; font-weight: 700;
  flex-shrink: 0;
}
.chat-input button:disabled { background: var(--muted); }

/* ─── Bottom nav ─────────────────────────────────────── */
.bottom-nav {
  position: fixed; left: 0; right: 0;
  bottom: 0;
  display: grid; grid-template-columns: repeat(6, 1fr);
  background: var(--paper);
  border-top: 1px solid var(--line);
  padding: 6px 0 calc(var(--safe-bottom) + 6px);
  z-index: 40;
  box-shadow: var(--shadow-up);
}
.nav-btn span { font-size: 11px; }
.nav-btn {
  padding: 8px 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  border-radius: 8px;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.nav-btn::before {
  content: '';
  display: block;
  width: 20px; height: 20px;
  background-repeat: no-repeat; background-position: center;
  background-size: contain;
  opacity: .7;
}
.nav-btn[data-view="today"]::before {
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M12 3v2M5.2 5.2l1.4 1.4M3 12h2M5.2 18.8l1.4-1.4M12 21v-2M18.8 18.8l-1.4-1.4M21 12h-2M18.8 5.2l-1.4 1.4'/%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3C/svg%3E");
}
.nav-btn[data-view="program"]::before {
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath stroke-linecap='round' d='M3 9h18M8 3v4M16 3v4'/%3E%3C/svg%3E");
}
.nav-btn[data-view="map"]::before {
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke-linejoin='round' d='M9 3 3 5v16l6-2 6 2 6-2V3l-6 2-6-2Z'/%3E%3Cpath d='M9 3v16M15 5v16'/%3E%3C/svg%3E");
}
.nav-btn[data-view="chat"]::before {
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M21 12a8 8 0 0 1-11.6 7.1L4 21l1.9-5.4A8 8 0 1 1 21 12Z'/%3E%3C/svg%3E");
}
.nav-btn[data-view="checklist"]::before {
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M9 11l3 3L22 4'/%3E%3Cpath d='M21 12v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11'/%3E%3C/svg%3E");
}
.nav-btn[data-view="calc"]::before {
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='5' y='3' width='14' height='18' rx='2'/%3E%3Crect x='8' y='6' width='8' height='3' rx='.5' fill='currentColor' fill-opacity='.15'/%3E%3Ccircle cx='9' cy='13' r='.7' fill='currentColor'/%3E%3Ccircle cx='12' cy='13' r='.7' fill='currentColor'/%3E%3Ccircle cx='15' cy='13' r='.7' fill='currentColor'/%3E%3Ccircle cx='9' cy='16' r='.7' fill='currentColor'/%3E%3Ccircle cx='12' cy='16' r='.7' fill='currentColor'/%3E%3Ccircle cx='15' cy='16' r='.7' fill='currentColor'/%3E%3C/svg%3E");
}

/* ─── Calculator ───────────────────────────────────── */
.calc-row {
  display: flex; flex-direction: column;
  gap: 6px;
  margin-bottom: 4px;
}
.calc-row label {
  font-size: 11px; text-transform: uppercase; letter-spacing: .08em;
  color: var(--muted); font-weight: 600;
}
.calc-row input {
  width: 100%;
  background: var(--cream-2);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 16px 18px;
  font-family: 'Fraunces', serif;
  font-size: 32px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  outline: none;
  color: var(--ink);
  letter-spacing: -.01em;
}
.calc-row input:focus { border-color: var(--red); background: #fff; }
.calc-swap {
  text-align: center;
  font-size: 18px;
  color: var(--muted);
  margin: 8px 0 2px;
}
.calc-rate {
  margin: 14px 0 0;
  font-size: 12.5px;
  color: var(--muted);
  text-align: center;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}
.calc-rate strong { color: var(--ink); font-weight: 600; }

.calc-presets {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.preset-btn {
  background: var(--cream-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 12.5px;
  color: var(--ink-soft);
  display: inline-flex; align-items: center; gap: 6px;
  text-align: left;
}
.preset-btn:active { background: var(--paper); }
.preset-btn strong { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }

.budget-list { list-style: none; padding: 0; margin: 0; }
.budget-list li {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 9px 0;
  border-top: 1px solid var(--line);
  font-size: 14px;
  gap: 12px;
}
.budget-list li:first-child { border-top: 0; }
.budget-list .b-label { color: var(--ink-soft); }
.budget-list .b-val { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.budget-list .b-eur { color: var(--muted); font-weight: 500; font-size: 12.5px; margin-left: 6px; }
.budget-total {
  margin-top: 12px; padding-top: 12px;
  border-top: 2px solid var(--ink);
  display: flex; justify-content: space-between; align-items: baseline;
  font-family: 'Fraunces', serif; font-size: 18px; font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.nav-btn.active { color: var(--red); }
.nav-btn.active::before { opacity: 1; }

/* ─── Checklist ─────────────────────────────────────── */
.cl-cat {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.cl-cat:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.cl-cat h4 {
  margin: 0 0 8px;
  font-family: 'Fraunces', serif;
  font-size: 15px; font-weight: 600;
  letter-spacing: -.005em;
}
.cl-cat h4 .cl-count {
  font-family: 'Inter', sans-serif;
  font-size: 11px; font-weight: 500;
  color: var(--muted);
  margin-left: 6px;
}
.cl-cat ul { list-style: none; padding: 0; margin: 0; }
.cl-cat li {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 7px 4px;
  font-size: 14px; line-height: 1.4;
  color: var(--ink);
  cursor: pointer;
  user-select: none;
}
.cl-cat li .cl-box {
  width: 18px; height: 18px; flex-shrink: 0;
  border: 1.5px solid var(--muted);
  border-radius: 4px;
  margin-top: 2px;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent;
  transition: background .15s, border-color .15s;
}
.cl-cat li .cl-box::after {
  content: '';
  width: 10px; height: 6px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg) translate(1px, -1px);
  opacity: 0;
}
.cl-cat li.checked .cl-box { background: var(--green); border-color: var(--green); }
.cl-cat li.checked .cl-box::after { opacity: 1; }
.cl-cat li.checked .cl-label { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(0,0,0,.3); text-decoration-thickness: 1.5px; }
.cl-cat li.custom .cl-label::after {
  content: '·';
  margin-left: 6px;
  color: var(--gold);
  font-weight: 700;
}
.cl-remove {
  margin-left: auto;
  color: var(--muted);
  font-size: 14px;
  padding: 2px 8px;
  border-radius: 4px;
  flex-shrink: 0;
  align-self: center;
  background: transparent;
}
.cl-remove:active { color: var(--red); background: rgba(200,16,46,.08); }

.cl-add-row {
  padding: 6px 0 2px !important;
  cursor: default !important;
  gap: 6px !important;
}
.cl-add-btn {
  color: var(--harbor);
  font-size: 13px; font-weight: 600;
  padding: 4px 0;
}
.cl-add-btn:active { opacity: .6; }
.cl-add-input {
  flex: 1;
  background: var(--cream-2);
  border: 1px solid var(--harbor-soft);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 14px;
  outline: none;
  font-family: inherit;
  color: var(--ink);
}
.cl-add-input:focus { background: #fff; }
.cl-add-ok, .cl-add-cancel {
  width: 30px; height: 30px;
  border-radius: 50%;
  font-size: 15px; font-weight: 600;
  flex-shrink: 0;
}
.cl-add-ok { background: var(--green); color: white; }
.cl-add-cancel { background: var(--cream-2); color: var(--muted); }

.cl-cat li .cl-tag {
  font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em;
  color: var(--harbor);
  padding: 1px 6px;
  background: rgba(74,138,164,.1);
  border-radius: 999px;
  margin-left: auto;
  white-space: nowrap;
  flex-shrink: 0;
  align-self: center;
}

.visit-day {
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.visit-day:first-child { border-top: 0; padding-top: 4px; }
.visit-day .vd-head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 6px;
}
.visit-day h4 {
  margin: 0;
  font-family: 'Fraunces', serif;
  font-size: 15px; font-weight: 600;
}
.visit-day .vd-meta { font-size: 12px; color: var(--muted); }
.visit-day ul { list-style: none; padding: 0; margin: 0; }
.visit-day li {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 2px;
  font-size: 13.5px;
  color: var(--ink-soft);
}
.visit-day li .dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
  background: var(--red);
}
.visit-day li .dot.museum { background: var(--harbor); }
.visit-day li .dot.park { background: var(--green); }
.visit-day li .dot.amusement { background: var(--gold); }
.visit-day li .dot.shop { background: #6b4a82; }
.visit-day li .dot.neighborhood { background: var(--ink-soft); }
.visit-day .vd-empty { font-size: 13px; color: var(--muted); font-style: italic; }

/* ─── Lock screen ─────────────────────────────────────── */
.lock-screen {
  position: fixed; inset: 0; z-index: 9999;
  background:
    radial-gradient(ellipse at top, #fff 0%, transparent 60%),
    linear-gradient(180deg, var(--cream) 0%, var(--cream-2) 100%);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  animation: fadein 0.3s ease;
}
.lock-screen[hidden] { display: none; }
@keyframes fadein { from { opacity: 0 } to { opacity: 1 } }

.lock-card {
  text-align: center;
  width: 100%; max-width: 340px;
}
.lock-brand h1 {
  font-family: 'Fraunces', serif; font-weight: 600;
  font-size: 44px; margin: 0; line-height: 1; letter-spacing: -.02em;
}
.lock-brand h1::first-letter { color: var(--red); }
.lock-brand p { color: var(--muted); font-size: 13px; margin: 6px 0 0; letter-spacing: .04em; }

.lock-figs {
  display: flex; align-items: flex-end; justify-content: center;
  gap: 14px;
  margin: 38px 0 28px;
  height: 80px;
}
.fig {
  height: 100%;
  fill: currentColor;
  transform-origin: 50% 100%;
  filter: drop-shadow(0 2px 0 rgba(20,18,12,.08));
  transition: color .3s;
}
.fig-dad { color: #2a4a64; height: 100%; }
.fig-mom { color: #c8102e; height: 88%; }
.fig-kid { color: #c89846; height: 66%; }
.fig-kid + .fig-kid { color: #5a7a44; }
.fig.jump { animation: figjump .55s cubic-bezier(.34,1.6,.64,1); }
@keyframes figjump {
  0%   { transform: translateY(0) scaleY(1) scaleX(1); }
  20%  { transform: translateY(0) scaleY(.86) scaleX(1.08); }
  45%  { transform: translateY(-22px) scaleY(1.08) scaleX(.94); }
  70%  { transform: translateY(-18px) scaleY(1.05) scaleX(.96); }
  90%  { transform: translateY(0) scaleY(.92) scaleX(1.05); }
  100% { transform: translateY(0) scaleY(1) scaleX(1); }
}

#lock-pw {
  width: 100%;
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: 14px;
  padding: 16px 18px;
  font-size: 20px;
  text-align: center;
  letter-spacing: .3em;
  font-family: ui-monospace, SFMono-Regular, monospace;
  outline: none;
  color: var(--ink);
}
#lock-pw::placeholder { letter-spacing: .02em; font-family: 'Inter', sans-serif; color: var(--muted); }
#lock-pw:focus { border-color: var(--red); box-shadow: 0 0 0 4px rgba(200,16,46,.08); }
#lock-submit {
  width: 100%;
  margin-top: 10px;
  background: var(--red); color: white;
  padding: 14px;
  border-radius: 14px;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: .03em;
  box-shadow: 0 4px 12px rgba(200,16,46,.18);
}
#lock-submit:active { transform: translateY(1px); }
#lock-submit:disabled { background: var(--muted); box-shadow: none; }
.lock-err {
  color: var(--red); font-size: 13px;
  min-height: 18px; margin: 10px 0 0;
}
.lock-screen.shake .lock-card { animation: shake .35s; }
@keyframes shake {
  0%,100% { transform: translateX(0) }
  20% { transform: translateX(-8px) }
  40% { transform: translateX(8px) }
  60% { transform: translateX(-5px) }
  80% { transform: translateX(5px) }
}

/* ─── Edit drawer ─────────────────────────────────────── */
.drawer-bg { position: fixed; inset: 0; background: rgba(20,18,12,.4); z-index: 49; display: none; }
.drawer-bg.open { display: block; }
.drawer {
  position: fixed; left: 0; right: 0; bottom: 0;
  background: var(--paper); z-index: 50;
  border-radius: 18px 18px 0 0;
  padding: 18px 18px calc(var(--safe-bottom) + 18px);
  transform: translateY(100%);
  transition: transform .25s ease;
  box-shadow: 0 -8px 32px rgba(0,0,0,.2);
}
.drawer.open { transform: translateY(0); }
.drawer h3 { font-family: 'Fraunces', serif; margin: 0 0 12px; font-size: 18px; }
.drawer label { display: block; margin: 8px 0 4px; font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; }
.drawer input, .drawer textarea {
  width: 100%; background: var(--cream-2); border: 1px solid var(--line);
  border-radius: 8px; padding: 8px 10px; font-size: 14px;
}
.drawer-actions { display: flex; gap: 8px; margin-top: 14px; }
.drawer-actions button {
  flex: 1; padding: 10px; border-radius: 10px; font-weight: 600; font-size: 14px;
}
.btn-primary { background: var(--red); color: white; }
.btn-secondary { background: var(--cream-2); color: var(--ink); }
.btn-danger { background: transparent; color: var(--red); }
