/* ============================================================
   florence.sugar.casa — mobile-first travel tool
   Palette: cream, navy, terracotta.
   Priorities: scan-ability, quick action, thumb reach.
   ============================================================ */

:root {
  --cream: #f5efe4;
  --cream-warm: #fbf7ef;
  --paper: #efe7d7;
  --stone: #d9d2c4;

  --ink: #17223d;         /* deep navy */
  --ink-soft: #2a3350;
  --navy-2: #3d4a6b;
  --navy-3: #6b7690;

  --terracotta: #b8593e;
  --terracotta-2: #c97b5c;
  --gold: #a68a3f;

  --text: #17223d;
  --text-muted: #6b7080;
  --line: rgba(23, 34, 61, 0.10);
  --line-strong: rgba(23, 34, 61, 0.18);

  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif;

  --radius: 12px;
  --radius-sm: 8px;
  --tap: 44px;

  --gutter: 16px;
  --max: 780px;

  --tabbar-h: calc(56px + env(safe-area-inset-bottom, 0px));
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 12px;
}

body {
  margin: 0;
  padding: 0 0 calc(var(--tabbar-h) + 24px);
  background: var(--cream);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--terracotta); color: var(--cream); }

img, svg { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; }

button { font-family: inherit; }

.skiplink {
  position: absolute; left: -9999px;
  padding: 8px 12px; background: var(--ink); color: var(--cream);
  border-radius: 6px;
}
.skiplink:focus { left: 12px; top: 12px; z-index: 100; }

/* -------------------- TOP NAV (desktop only) -------------------- */
.topnav {
  display: none;
  position: sticky; top: 0; z-index: 30;
  gap: 24px;
  padding: 12px 24px;
  background: rgba(245, 239, 228, 0.9);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
  align-items: center;
  justify-content: space-between;
}
.topnav__brand { display: flex; align-items: center; gap: 10px; }
.topnav__mark {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--ink); color: var(--cream);
  display: grid; place-items: center;
  font-family: var(--serif); font-size: 16px; font-style: italic;
}
.topnav__title { font-family: var(--serif); font-size: 20px; font-weight: 500; }
.topnav__sub { color: var(--text-muted); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; margin-left: 8px; }
.topnav__links {
  display: flex; gap: 22px;
  list-style: none; margin: 0; padding: 0;
}
.topnav__links a {
  font-size: 13px; font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s;
}
.topnav__links a:hover { border-bottom-color: var(--terracotta); }
.topnav__links a.is-current { border-bottom-color: var(--terracotta); }
@media (min-width: 900px) { .topnav { display: flex; } }

/* -------------------- HERO (compact) -------------------- */
.hero {
  padding: 24px var(--gutter) 20px;
  max-width: var(--max); margin: 0 auto;
}
.hero__eyebrow {
  display: block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--terracotta);
  margin-bottom: 8px;
}
.hero__title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 44px;
  line-height: 1;
  letter-spacing: -0.01em;
  margin: 0;
}
.hero__meta {
  margin: 10px 0 0;
  color: var(--text-muted);
  font-size: 14px;
  display: flex; flex-wrap: wrap; gap: 6px;
}
.hero__meta .dot { color: var(--line-strong); }
@media (min-width: 640px) {
  .hero { padding-top: 40px; padding-bottom: 28px; }
  .hero__title { font-size: 64px; }
}

/* -------------------- NOW / TODAY PANEL -------------------- */
.now {
  max-width: var(--max);
  margin: 0 auto 8px;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
@media (min-width: 640px) {
  .now { grid-template-columns: 0.9fr 1.2fr 1.2fr; gap: 12px; }
}

.now__card {
  display: block;
  padding: 16px 18px;
  border-radius: var(--radius);
  background: var(--cream-warm);
  border: 1px solid var(--line);
  min-height: var(--tap);
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}
.now__card:active { transform: scale(0.985); }

.now__card--time {
  background: var(--ink);
  color: var(--cream-warm);
  border-color: transparent;
}
.now__card--time .micro { color: var(--terracotta-2); }
.now__time {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 38px;
  line-height: 1;
  margin: 6px 0 4px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.005em;
}
.now__date {
  display: block;
  font-size: 13px;
  color: rgba(245, 239, 228, 0.75);
}

.now__card--next {
  background: var(--terracotta);
  color: var(--cream-warm);
  border-color: transparent;
  display: flex; flex-direction: column; gap: 4px;
}
.now__card--next .micro { color: rgba(245, 239, 228, 0.85); }
.now__card--next .rowlink { color: var(--cream-warm); }
.now__next-name {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
  line-height: 1.15;
  margin-top: 4px;
}
.now__next-meta {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  font-size: 13px;
  color: rgba(245, 239, 228, 0.85);
}

.now__card--hotel {
  display: flex; flex-direction: column; gap: 4px;
}
.now__hotel-name {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
  line-height: 1.15;
  margin-top: 4px;
}
.now__hotel-addr {
  font-size: 13px;
  color: var(--text-muted);
}

.rowlink {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.micro {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.micro--accent { color: var(--terracotta); }
.micro--katie { color: var(--navy-2); }

.pill {
  display: inline-flex;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(245, 239, 228, 0.16);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
}

/* -------------------- SECTIONS -------------------- */
.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 32px var(--gutter) 0;
}
.section--accent {
  background: linear-gradient(180deg, transparent, rgba(184, 89, 62, 0.06));
  padding-top: 32px;
  padding-bottom: 24px;
  border-radius: 0;
}
.section__head {
  margin: 0 0 14px;
  display: flex; flex-direction: column; gap: 4px;
}
.h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 28px;
  line-height: 1;
  margin: 0;
  letter-spacing: -0.01em;
}
.section__sub {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
}
.subhead {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 18px;
  margin: 24px 0 8px;
  color: var(--ink-soft);
  letter-spacing: -0.005em;
}

/* -------------------- ROWS (tap-first list) -------------------- */
.rows {
  list-style: none;
  padding: 0; margin: 0;
  display: flex; flex-direction: column;
  gap: 8px;
}
.rows > li { list-style: none; }

.row {
  display: flex; align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 14px 16px;
  background: var(--cream-warm);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  transition: transform 0.15s ease, background 0.2s ease;
}
.row--action {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.row--action:hover { background: #fff; }
.row--action:active { transform: scale(0.985); background: #fff; }

.row__lead {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; gap: 2px;
}
.row__title {
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 600;
  margin: 0;
  color: var(--text);
  line-height: 1.25;
  letter-spacing: -0.005em;
}
.row__sub {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.4;
}

.row__date {
  flex: 0 0 44px;
  display: flex; flex-direction: column; align-items: center;
  padding: 6px 0;
  border-right: 1px solid var(--line);
  margin-right: 4px;
}
.row__date-num {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 500;
  line-height: 1;
  color: var(--ink);
}
.row__date-mo {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 2px;
}

.row--confirmed { border-left: 3px solid var(--terracotta); }
.row--katie-home { border-left: 3px solid var(--gold); }
.row--watch { border-left: 3px solid #5e3a26; }
.row--vfashion { border-left: 3px solid #8a4a5c; }
.row--unverified {
  background: transparent;
  border-style: dashed;
  color: var(--text-muted);
}

.linkline {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-muted);
}
.linkline a {
  color: var(--terracotta);
  text-decoration: underline;
  text-decoration-color: rgba(184, 89, 62, 0.3);
  text-underline-offset: 2px;
}
.linkline a:hover { text-decoration-color: var(--terracotta); }

.fine {
  margin: -4px 0 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--paper);
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.5;
}
.fine strong { color: var(--ink); }

/* -------------------- Map details sheet -------------------- */
.msheet {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 60;
  background: var(--cream-warm);
  border-top: 1px solid var(--line-strong);
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -20px 40px -20px rgba(23, 34, 61, 0.25);
  padding: 20px 20px calc(20px + env(safe-area-inset-bottom, 0px));
  max-height: 75vh;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.msheet.is-open { transform: translateY(0); }
@media (min-width: 900px) {
  .msheet {
    left: auto; right: 24px; bottom: 24px;
    max-width: 400px;
    border-radius: 16px;
    border: 1px solid var(--line-strong);
    padding: 20px;
    transform: translateY(30px);
    opacity: 0;
  }
  .msheet.is-open { transform: translateY(0); opacity: 1; }
}
.msheet__close {
  position: absolute;
  top: 10px; right: 10px;
  width: 40px; height: 40px;
  border: none; background: transparent;
  cursor: pointer;
  color: var(--text-muted);
  display: grid; place-items: center;
  border-radius: 8px;
}
.msheet__close:hover { background: var(--paper); color: var(--ink); }
.msheet__cat {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--terracotta);
  margin-right: 40px;
}
.msheet__name {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 24px;
  line-height: 1.15;
  margin: 6px 40px 12px 0;
  letter-spacing: -0.01em;
}
.msheet__body {
  display: flex; flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}
.msheet__row {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 8px;
  padding: 6px 0;
  border-top: 1px solid var(--line);
  font-size: 13.5px;
  line-height: 1.4;
}
.msheet__row:last-of-type { border-bottom: 1px solid var(--line); }
.msheet__k {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  padding-top: 2px;
}
.msheet__row a {
  color: var(--terracotta);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.msheet__row--accent { grid-template-columns: 1fr; color: var(--terracotta); font-weight: 600; }
.msheet__row--hi { background: rgba(166, 138, 63, 0.08); }
.msheet__note {
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-soft);
  margin-top: 4px;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--paper);
}
.msheet__warn {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(184, 89, 62, 0.08);
  border: 1px dashed rgba(184, 89, 62, 0.4);
}
.msheet__actions {
  display: flex; flex-wrap: wrap; gap: 8px;
}
[hidden] { display: none !important; }
.btn {
  flex: 1 1 auto;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--paper);
  color: var(--ink);
  font-weight: 600;
  font-size: 14px;
  text-align: center;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line);
  transition: background 0.15s ease;
}
.btn:hover { background: #fff; }
.btn--primary {
  background: var(--ink);
  color: var(--cream-warm);
  border-color: var(--ink);
}
.btn--primary:hover { background: var(--ink-soft); }

.chev {
  color: var(--text-muted);
  font-size: 20px;
  line-height: 1;
  padding: 0 4px;
  transition: transform 0.15s ease, color 0.15s ease;
}
.row--action:hover .chev { color: var(--terracotta); transform: translateX(2px); }

/* -------------------- TAGS -------------------- */
.tag {
  display: inline-flex; align-items: center;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink-soft);
  border: 1px solid var(--line);
  white-space: nowrap;
}
.tag--confirmed { background: var(--terracotta); color: var(--cream-warm); border-color: transparent; }
.tag--katie { background: var(--ink); color: var(--cream-warm); border-color: transparent; }
.tag--xs {
  font-size: 9px;
  padding: 2px 6px;
  letter-spacing: 0.1em;
  margin-left: 6px;
  vertical-align: middle;
}
.tag--confirmed-xs { background: var(--terracotta); color: var(--cream-warm); border-color: transparent; }
.tag--katie-xs { background: var(--ink); color: var(--cream-warm); border-color: transparent; }

/* -------------------- FILTER CHIPS -------------------- */
.chipbar {
  display: flex; gap: 8px;
  overflow-x: auto;
  padding: 4px 0 12px;
  margin: 0 0 8px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.chipbar::-webkit-scrollbar { display: none; }
.fchip {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 6px 14px;
  background: var(--cream-warm);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
  letter-spacing: 0.01em;
}
.fchip:hover { border-color: var(--ink-soft); }
.fchip.is-on {
  background: var(--ink);
  color: var(--cream-warm);
  border-color: var(--ink);
}

/* -------------------- DAYS -------------------- */
.days {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column;
  gap: 12px;
}
.day {
  padding: 16px;
  background: var(--cream-warm);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.day--marked { border-left: 3px solid var(--terracotta); }

.day__head {
  display: flex; align-items: baseline; gap: 10px;
  margin-bottom: 10px;
}
.day__wd {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--terracotta);
}
.day__num {
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 500;
  line-height: 1;
  color: var(--ink);
}
.day__theme {
  font-size: 13px;
  color: var(--text-muted);
  margin-left: auto;
  font-style: italic;
}

.day__list {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column;
  gap: 8px;
}
.day__list li {
  display: flex; gap: 8px;
  font-size: 14.5px;
  line-height: 1.45;
  color: var(--ink-soft);
}
.day__list strong { color: var(--ink); font-weight: 600; }

.chip {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 42px;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--stone);
  color: var(--ink);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  flex-shrink: 0;
  align-self: flex-start;
  margin-top: 2px;
}
.chip--confirmed { background: var(--terracotta); color: var(--cream-warm); }
.chip--katie { background: var(--ink); color: var(--cream-warm); }

/* -------------------- MAP -------------------- */
.map {
  margin: 0 0 20px;
  padding: 0;
  background: var(--paper);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  overflow: hidden;
}
.map__canvas {
  width: 100%;
  height: 320px;
  background: var(--paper);
}
@media (min-width: 640px) { .map__canvas { height: 440px; } }

.map__legend {
  display: flex; flex-wrap: wrap; gap: 8px 14px;
  padding: 10px 14px;
  border-top: 1px solid var(--line);
  background: var(--cream-warm);
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
}
.map__legend span { display: inline-flex; align-items: center; gap: 6px; }
.map__legend i {
  width: 8px; height: 8px; border-radius: 50%;
  display: inline-block;
}
.map__hint {
  margin: 0;
  padding: 8px 14px 12px;
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  font-style: italic;
  background: var(--cream-warm);
}

/* -------------------- HOODS (collapsible) -------------------- */
.hoods {
  display: flex; flex-direction: column;
  gap: 8px;
}
.hood {
  background: var(--cream-warm);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.hood__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px;
  min-height: var(--tap);
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  gap: 12px;
}
.hood__head::-webkit-details-marker { display: none; }
.hood__head::after {
  content: "▾";
  color: var(--text-muted);
  font-size: 14px;
  transition: transform 0.2s ease;
}
.hood[open] .hood__head::after { transform: rotate(180deg); }
.hood__name {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.005em;
}
.hood__count {
  margin-left: auto;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--paper);
}
.hood__list {
  list-style: none; padding: 0 8px 8px; margin: 0;
  display: flex; flex-direction: column;
  gap: 2px;
}
.rowlite {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  padding: 12px 12px;
  min-height: var(--tap);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 14.5px;
  transition: background 0.15s ease;
}
.rowlite:hover { background: var(--paper); }
.rowlite:active { background: var(--paper); }
.mins {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

/* -------------------- FOOT -------------------- */
.foot {
  max-width: var(--max);
  margin: 40px auto 0;
  padding: 20px var(--gutter);
  color: var(--text-muted);
  font-size: 12px;
  text-align: center;
  border-top: 1px solid var(--line);
}

/* -------------------- BOTTOM TAB BAR (mobile) -------------------- */
.tabbar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 40;
  display: flex;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: rgba(245, 239, 228, 0.94);
  backdrop-filter: saturate(140%) blur(16px);
  -webkit-backdrop-filter: saturate(140%) blur(16px);
  border-top: 1px solid var(--line-strong);
}
.tab {
  flex: 1;
  min-height: 56px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 3px;
  padding: 6px 0 8px;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
.tab svg {
  width: 22px; height: 22px;
}
.tab:active { color: var(--ink); }
.tab.is-current { color: var(--terracotta); }

@media (min-width: 900px) {
  .tabbar { display: none; }
  body { padding-bottom: 40px; }
}

/* -------------------- Reduced motion -------------------- */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
  html { scroll-behavior: auto; }
}
