:root {
  color-scheme: light;
  --ink: #111417;
  --chalk: #fbfbf7;
  --atlantic: #006fb7;
  --turquoise: #18a5c3;
  --sand: #d8c49b;
  --mist: #e8f3f5;
  --soft-sand: #f3eee2;
  --muted: #667078;
  --line: rgba(17, 20, 23, 0.16);
  --line-strong: rgba(17, 20, 23, 0.34);
  --accent-deep: #063e5e;
  --accent-deeper: #003e68;
  --accent-hover: #00588f;
  --label-ink: #225366;
  --text-soft: #4f5960;
  --hero-gradient: linear-gradient(135deg, var(--accent-deeper), var(--atlantic) 62%, var(--turquoise));
  --page-glow: rgba(24, 165, 195, 0.11);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --radius-card: 24px;
  --radius-shell: 32px;
  --shadow-soft: 0 18px 50px rgba(13, 35, 48, 0.08);
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--chalk); scroll-behavior: smooth; }
body {
  min-width: 320px;
  margin: 0;
  padding: 0 0 calc(98px + var(--safe-bottom));
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 90% 4%, var(--page-glow), transparent 24rem),
    linear-gradient(180deg, #fff 0, var(--chalk) 20rem);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

[hidden] { display: none !important; }
button, input, select { min-height: 44px; font: inherit; }
button, select, input[type="checkbox"], input[type="range"] { cursor: pointer; }
button { color: inherit; }
a { color: var(--atlantic); }
h1, h2, h3, p { overflow-wrap: anywhere; }
h1, h2, h3 { margin: 0; font-family: Georgia, "Times New Roman", serif; line-height: 1.05; letter-spacing: -0.025em; }
h1 { font-size: clamp(2.15rem, 10vw, 3.65rem); }
h2 { font-size: clamp(1.55rem, 7vw, 2.35rem); }
h3 { font-size: 1.18rem; }
:focus-visible { outline: 3px solid var(--turquoise); outline-offset: 3px; }

.skip-link {
  position: fixed; top: 8px; left: 8px; z-index: 100;
  padding: 10px 14px; color: white; background: var(--ink); border-radius: 12px;
  transform: translateY(-160%); transition: transform 160ms ease;
}
.skip-link:focus { transform: translateY(0); }
.backdrop-engraving {
  position: fixed; right: -15rem; bottom: 3rem; z-index: -1;
  width: min(52rem, 130vw); opacity: 0.055; filter: grayscale(1) contrast(1.3); pointer-events: none;
}
.app-shell { width: min(100% - 24px, 780px); margin: 0 auto; }

.app-header {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: max(14px, env(safe-area-inset-top)) 2px 10px;
}
.app-brand { display: flex; min-width: 0; align-items: center; gap: 11px; }
.region-mark {
  width: 46px; height: 46px; flex: 0 0 auto;
  filter: drop-shadow(0 5px 8px rgba(17, 20, 23, 0.12));
}
.app-brand__eyebrow { margin: 0; color: var(--atlantic); font-size: 0.64rem; font-weight: 800; letter-spacing: 0.13em; text-transform: uppercase; }
.app-brand__name { margin: 1px 0 0; font-family: Georgia, "Times New Roman", serif; font-size: 1.2rem; font-weight: 700; }
.saved-shortcut {
  display: inline-flex; min-width: 48px; align-items: center; justify-content: center; gap: 3px;
  padding: 8px 10px; color: var(--ink); background: white; border: 1px solid var(--line); border-radius: 999px;
}
.saved-shortcut svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.saved-shortcut span { font-size: 0.72rem; font-weight: 850; }

.pwa-strip {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin-bottom: 8px; padding: 7px 11px; color: var(--muted); background: rgba(255,255,255,.72);
  border: 1px solid var(--line); border-radius: 14px; font-size: 0.7rem;
}
.pwa-strip p { margin: 0; }
.pwa-strip button { min-height: 32px; padding: 3px 9px; color: white; background: var(--atlantic); border: 0; border-radius: 999px; font-size: 0.68rem; font-weight: 800; }

.app-view { padding: 9px 0 24px; }
.view-head { margin: 12px 2px 18px; }
.view-head--split { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.overline { margin: 0 0 5px; color: var(--atlantic); font-size: 0.67rem; font-weight: 850; letter-spacing: .14em; text-transform: uppercase; }
.lede { max-width: 38rem; margin: 10px 0 0; color: var(--muted); font-family: Georgia, "Times New Roman", serif; font-size: 1.02rem; }
.date-line { margin: 7px 0 0; color: var(--muted); font-size: .78rem; font-weight: 750; }

.editorial-hero {
  position: relative; padding: 24px 20px 20px; overflow: hidden;
  color: white; background: var(--hero-gradient);
  border-radius: var(--radius-shell); box-shadow: var(--shadow-soft);
}
.editorial-hero::after {
  position: absolute; right: -28px; top: -22px; width: 145px; height: 145px;
  border: 1px solid rgba(255,255,255,.34); border-radius: 45% 55% 54% 46%; content: "";
}
.editorial-hero .overline { color: rgba(255,255,255,.8); }
.editorial-hero .control-group legend { color: rgba(255,255,255,.8); }
.editorial-hero .choice-chip {
  color: white; background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.5);
}
.editorial-hero .choice-chip[aria-pressed="true"] {
  color: var(--accent-deeper); background: white; border-color: white;
}
.editorial-hero h1 { max-width: 12ch; }
.editorial-hero p:last-child { max-width: 29rem; margin: 12px 0 0; color: rgba(255,255,255,.84); font-family: Georgia, "Times New Roman", serif; }

.section-card {
  margin-top: 14px; padding: 18px; background: rgba(255,255,255,.9);
  border: 1px solid var(--line); border-radius: var(--radius-card); box-shadow: 0 12px 35px rgba(17,20,23,.04);
}
.section-card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 13px; }
.section-card__head p { margin: 4px 0 0; color: var(--muted); font-size: .78rem; }

.date-select, .field-select, .text-input {
  width: 100%; padding: 10px 36px 10px 13px; color: var(--ink); background: var(--chalk);
  border: 1px solid var(--line-strong); border-radius: 14px;
}
.field-label { display: block; margin: 0 0 7px; font-size: .7rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.field-note { margin: 5px 0 0; color: var(--muted); font-size: .7rem; }
.preference-grid { display: grid; gap: 17px; }
.control-group { min-width: 0; margin: 0; padding: 0; border: 0; }
.control-group legend { width: 100%; margin-bottom: 8px; font-size: .71rem; font-weight: 850; letter-spacing: .07em; text-transform: uppercase; }
.chip-row { display: flex; gap: 7px; padding: 3px 2px 6px; overflow-x: auto; scrollbar-width: none; }
.chip-row::-webkit-scrollbar { display: none; }
.choice-chip, .filter-chip, .place-chip {
  min-height: 40px; flex: 0 0 auto; padding: 7px 12px; color: var(--ink); background: var(--chalk);
  border: 1px solid var(--line); border-radius: 999px; font-size: .75rem; font-weight: 760;
}
.choice-chip[aria-pressed="true"], .filter-chip[aria-pressed="true"], .place-chip[aria-pressed="true"] {
  color: white; background: var(--atlantic); border-color: var(--atlantic);
}
.range-row { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px; }
.range-row input { width: 100%; accent-color: var(--atlantic); }
.range-row output { min-width: 58px; color: var(--atlantic); font-size: .76rem; font-weight: 850; text-align: right; }
.toggle-row { display: flex; align-items: center; gap: 10px; min-height: 48px; }
.toggle-row input { width: 21px; height: 21px; accent-color: var(--atlantic); }
.toggle-row span { font-size: .82rem; font-weight: 720; }

.carousel-head { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.carousel-controls { display: flex; gap: 6px; }
.icon-button, .carousel-arrow {
  display: inline-grid; width: 44px; min-height: 44px; padding: 0; place-items: center;
  color: var(--ink); background: white; border: 1px solid var(--line); border-radius: 50%; font-size: 1.35rem;
}
.place-carousel { position: relative; touch-action: pan-y; }
.place-card {
  position: relative; display: block; width: 100%; min-height: 335px; padding: 0; overflow: hidden;
  color: white; background: var(--accent-deep); border: 0; border-radius: 28px; text-align: left; box-shadow: var(--shadow-soft);
}
.place-card img { width: 100%; height: 335px; display: block; object-fit: cover; }
.place-card::after { position: absolute; inset: 30% 0 0; background: linear-gradient(transparent, rgba(8,21,28,.84)); content: ""; }
.place-card__copy { position: absolute; right: 0; bottom: 0; left: 0; z-index: 1; padding: 24px 20px; }
.place-card__copy span { display: block; margin-bottom: 6px; font-size: .68rem; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.place-card__copy strong { display: block; max-width: 13ch; font-family: Georgia, "Times New Roman", serif; font-size: 2rem; line-height: 1; letter-spacing: -.03em; }
.place-card__copy small { display: block; margin-top: 9px; color: rgba(255,255,255,.8); font-size: .74rem; }
.carousel-pager { display: flex; justify-content: center; gap: 8px; margin-top: 12px; }
.carousel-pager button { width: 38px; min-height: 28px; padding: 0; background: transparent; border: 0; }
.carousel-pager button::after { display: block; width: 7px; height: 7px; margin: auto; background: var(--line-strong); border-radius: 99px; content: ""; transition: width 160ms ease, background 160ms ease; }
.carousel-pager button[aria-current="true"]::after { width: 24px; background: var(--atlantic); }

.primary-button, .secondary-button, .text-button, .danger-button {
  min-height: 46px; padding: 10px 15px; border-radius: 15px; font-weight: 820;
}
.primary-button { color: white; background: var(--atlantic); border: 1px solid var(--atlantic); }
.primary-button:hover { background: var(--accent-hover); }
.secondary-button { color: var(--atlantic); background: var(--mist); border: 1px solid rgba(0,111,183,.23); }
.text-button { color: var(--atlantic); background: transparent; border: 0; }
.danger-button { color: #8a2727; background: #fff0ee; border: 1px solid #e9b5ae; }
.wide-button { width: 100%; }
.action-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 15px; }

.bottom-nav {
  position: fixed; right: 8px; bottom: calc(8px + var(--safe-bottom)); left: 8px; z-index: 40;
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 2px;
  max-width: 720px; margin: auto; padding: 7px;
  background: rgba(251,251,247,.94); border: 1px solid var(--line); border-radius: 25px;
  box-shadow: 0 18px 55px rgba(13,35,48,.18); backdrop-filter: blur(16px);
}
.bottom-nav button {
  display: grid; min-width: 0; min-height: 58px; place-items: center; align-content: center; gap: 2px;
  padding: 5px 1px; color: var(--muted); background: transparent; border: 0; border-radius: 18px;
  font-size: .61rem; font-weight: 760;
}
.bottom-nav svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.bottom-nav button[aria-current="page"] { color: var(--atlantic); background: var(--mist); }

.place-sheet { position: fixed; inset: 0; z-index: 70; display: grid; align-items: end; }
.place-sheet__scrim { position: absolute; inset: 0; width: 100%; height: 100%; background: rgba(7,15,20,.45); border: 0; }
.place-sheet__panel {
  position: relative; z-index: 1; width: min(100%, 720px); max-height: 86vh; margin: 0 auto; padding: 12px 20px calc(22px + var(--safe-bottom));
  overflow-y: auto; background: var(--chalk); border-radius: 30px 30px 0 0; box-shadow: 0 -18px 55px rgba(7,15,20,.18);
}
.sheet-handle { width: 42px; height: 4px; margin: 1px auto 18px; background: var(--line-strong); border-radius: 99px; }
.place-sheet__close, .save-dialog__close { position: absolute; top: 14px; right: 16px; }
.place-sheet__panel > p:not(.overline) { color: var(--muted); }
.place-sheet__meta { display: flex; flex-wrap: wrap; gap: 7px; margin: 16px 0; }
.meta-pill { padding: 7px 10px; background: var(--soft-sand); border-radius: 999px; font-size: .74rem; font-weight: 760; }
.sheet-actions { display: grid; gap: 8px; margin-top: 18px; }

.save-dialog { width: min(calc(100% - 24px), 480px); padding: 0; color: var(--ink); background: var(--chalk); border: 0; border-radius: 26px; box-shadow: 0 24px 70px rgba(7,15,20,.25); }
.save-dialog::backdrop { background: rgba(7,15,20,.48); }
.save-dialog form { position: relative; padding: 26px 20px 20px; }
.save-dialog label { display: block; margin: 20px 0 6px; font-size: .72rem; font-weight: 800; }
.save-dialog input { width: 100%; padding: 10px 12px; background: white; border: 1px solid var(--line-strong); border-radius: 13px; }

.context-bar { display: flex; align-items: center; justify-content: space-between; gap: 9px; margin: 0 0 11px; padding: 10px 12px; color: #043c5d; background: var(--mist); border: 1px solid rgba(0,111,183,.18); border-radius: 16px; font-size: .77rem; }
.context-bar button { min-height: 36px; padding: 4px 8px; color: var(--atlantic); background: transparent; border: 0; font-weight: 800; }
.result-summary { margin: 0 2px 10px; color: var(--muted); font-size: .76rem; }
.card-list, .food-groups, .saved-groups { display: grid; gap: 11px; }
.content-card {
  position: relative; padding: 16px; background: rgba(255,255,255,.92); border: 1px solid var(--line);
  border-radius: var(--radius-card); box-shadow: 0 10px 30px rgba(17,20,23,.035);
}
.content-card__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.content-card__meta { margin: 5px 0 0; color: var(--muted); font-size: .72rem; font-weight: 720; }
.content-card__summary { margin: 10px 0 0; color: var(--text-soft); font-size: .84rem; }
.label-row { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.small-label { padding: 4px 7px; color: var(--label-ink); background: var(--mist); border-radius: 999px; font-size: .64rem; font-weight: 790; }
.caution-label { color: #633c08; background: #fff0c7; border: 1px solid #e7bd57; }
.event-label { color: white; background: var(--atlantic); }
.star-button { display: inline-grid; width: 44px; min-width: 44px; min-height: 44px; padding: 0; place-items: center; color: var(--atlantic); background: transparent; border: 1px solid var(--line); border-radius: 50%; font-size: 1.25rem; }
.star-button[aria-pressed="true"] { color: white; background: var(--atlantic); border-color: var(--atlantic); }
.card-actions { display: flex; align-items: center; gap: 7px; margin-top: 13px; }
.card-actions .primary-button, .card-actions .secondary-button { flex: 1; font-size: .76rem; }
.details-block { margin-top: 11px; padding-top: 10px; border-top: 1px solid var(--line); color: var(--muted); font-size: .73rem; }
.details-block summary { min-height: 36px; color: var(--atlantic); font-weight: 800; }
.details-block p { margin: 6px 0; }
.details-block .caution-note { padding: 8px 10px; color: #5b3a0a; background: #fff8e5; border-left: 3px solid #d9a62e; border-radius: 0 8px 8px 0; }
.quality-line { margin: 8px 0 0; color: var(--atlantic); font-size: .73rem; font-weight: 850; }
.source-link { font-weight: 800; text-underline-offset: 3px; }
.food-section h2, .saved-section h2 { margin: 19px 2px 10px; font-size: 1.35rem; }
.food-section:first-child h2 { margin-top: 0; }
.empty-state { padding: 22px 18px; color: var(--muted); background: var(--soft-sand); border-radius: var(--radius-card); text-align: center; }
.empty-state p { margin: 0; font-family: Georgia, "Times New Roman", serif; }
.warning-note { margin-top: 10px; padding: 9px 11px; color: #704c00; background: #fff7de; border: 1px solid #ead18a; border-radius: 13px; font-size: .73rem; font-weight: 750; }

.dayline { position: relative; display: grid; gap: 12px; }
.dayline::before { position: absolute; top: 22px; bottom: 22px; left: 19px; width: 1px; background: var(--line-strong); content: ""; }
.day-slot { position: relative; min-height: 102px; padding: 15px 15px 15px 52px; background: rgba(255,255,255,.86); border: 1px solid var(--line); border-radius: var(--radius-card); }
.day-slot::before { position: absolute; top: 18px; left: 12px; z-index: 1; width: 15px; height: 15px; background: var(--chalk); border: 4px solid var(--atlantic); border-radius: 50%; content: ""; }
.day-slot__label { margin: 0 0 8px; color: var(--atlantic); font-size: .67rem; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.day-slot__item { margin-top: 8px; padding: 10px 11px; background: var(--mist); border-radius: 14px; }
.day-slot__item strong { display: block; font-family: Georgia, "Times New Roman", serif; }
.day-slot__item small { color: var(--muted); }
.food-alternatives { margin-top: 13px; padding: 13px; background: var(--soft-sand); border-radius: 18px; }
.food-alternatives h3 { font-size: 1rem; }
.food-alternatives ul { margin: 8px 0 0; padding-left: 20px; font-size: .78rem; }
.food-alternatives li { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.saved-plan { padding: 16px; background: white; border: 1px solid var(--line); border-radius: var(--radius-card); }
.saved-plan__head { display: flex; justify-content: space-between; gap: 9px; }
.saved-plan ul { margin: 10px 0 0; padding-left: 19px; color: var(--muted); font-size: .78rem; }
.favorite-strip { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 9px; }
.favorite-item { padding: 12px; background: white; border: 1px solid var(--line); border-radius: 16px; font-size: .75rem; font-weight: 760; }

.sr-live { position: fixed; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.noscript-note { position: fixed; inset: auto 12px 100px; z-index: 100; padding: 14px; color: white; background: var(--ink); border-radius: 14px; }
.load-error { margin-top: 20px; padding: 22px; color: #7c2222; background: #fff0ee; border: 1px solid #e8b0aa; border-radius: var(--radius-card); }

@media (min-width: 620px) {
  .app-shell { width: min(100% - 48px, 780px); }
  .preference-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .place-card, .place-card img { height: 390px; }
  .card-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .food-groups .card-list { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

@media (max-width: 390px) {
  .app-shell { width: min(100% - 16px, 780px); }
  .app-header { padding-inline: 2px; }
  .app-brand__eyebrow { font-size: .57rem; }
  .app-brand__name { font-size: 1.05rem; }
  .breton-flag { width: 51px; height: 34px; }
  .editorial-hero { padding: 21px 17px 18px; border-radius: 27px; }
  .section-card { padding: 15px; }
  .place-card, .place-card img { min-height: 310px; height: 310px; }
  .place-card__copy { padding: 20px 17px; }
  .bottom-nav { right: 5px; bottom: calc(5px + var(--safe-bottom)); left: 5px; padding: 5px; border-radius: 22px; }
  .bottom-nav button { min-height: 56px; font-size: .57rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}

@media print {
  body { padding: 0; }
  .bottom-nav, .pwa-strip, .saved-shortcut, .carousel-controls { display: none !important; }
  .app-shell { width: 100%; }
}

.stay-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.stay-field { display: grid; gap: 4px; min-width: 0; }
.stay-row input[type="date"] { width: 100%; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 14px; background: white; font: inherit; }
