/* ==========================================================================
   The Beach Retreat — Ocean Days, Holland-on-Sea
   One accent colour, hairline rules, plenty of white space.
   ========================================================================== */

:root {
  /* One blue, used sparingly. --sea-600 is the accent; the rest support it. */
  --sea-900: #08252f;
  --sea-800: #0b3a49;
  --sea-700: #0d4c5e;
  --sea-600: #0f6076;
  --sea-500: #2a8298;
  --sea-300: #a9c9d2;
  --sea-100: #e2eef1;
  --sea-50: #f3f9fa;

  --ink: #0f1c22;
  --ink-soft: #59696f;
  --ink-faint: #93a2a8;

  --paper: #ffffff;
  --shell: #f6f8f9;
  --line: #e6ecee;

  --ok: #1c7a58;
  --ok-bg: #eaf5f0;
  --warn: #a8761f;
  --warn-bg: #fcf5e9;
  --stop: #a8433f;
  --stop-bg: #f9eeed;

  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 18px;

  /* Barely-there depth: structure comes from hairlines, not shadows. */
  --shadow-sm: 0 1px 2px rgba(15, 28, 34, 0.04);
  --shadow-md: 0 4px 16px rgba(15, 28, 34, 0.06);
  --shadow-lg: 0 24px 60px rgba(8, 37, 47, 0.28);

  --wrap: 1120px;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Author `display` declarations beat the `hidden` attribute's UA rule, and
   several toggled elements below set display: flex/grid. Keep hidden honest. */
[hidden] {
  display: none !important;
}

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
  margin: 0 0 0.5em;
  line-height: 1.12;
  letter-spacing: -0.03em;
  font-weight: 700;
  text-wrap: balance;
}

h1 { font-size: clamp(2.15rem, 4.4vw, 3.35rem); }
h2 { font-size: clamp(1.65rem, 2.8vw, 2.2rem); }
h3 { font-size: 1.12rem; }

p { margin: 0 0 1em; }
a { color: var(--sea-600); }

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

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: 24px;
}

.wrap--narrow { max-width: 760px; }

.section {
  padding: clamp(64px, 8vw, 108px) 0;
}

.section--shell { background: var(--shell); }

/* White sections that meet each other need a line to tell them apart; a tinted
   section already draws its own edge. */
.section + .section:not(.section--shell) { border-top: 1px solid var(--line); }
.section--shell + .section { border-top: 0; }

.section-head {
  max-width: 620px;
  margin-bottom: clamp(32px, 4vw, 48px);
}

.section-head h2 { margin-bottom: 10px; }

.section-head p {
  color: var(--ink-soft);
  font-size: 1.05rem;
  margin: 0;
}

.eyebrow {
  display: inline-block;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 10px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 13px 24px;
  font: inherit;
  font-weight: 600;
  font-size: 0.97rem;
  line-height: 1;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.btn:disabled { opacity: 0.45; cursor: not-allowed; }

.btn--primary { background: var(--sea-600); color: #fff; }
.btn--primary:hover:not(:disabled) { background: var(--sea-700); }

.btn--ghost {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--line);
}
.btn--ghost:hover:not(:disabled) { border-color: var(--ink-faint); }

/* Text-weight action that sits beside a primary button. */
.btn--quiet {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn--quiet:hover:not(:disabled) { background: var(--shell); border-color: var(--ink-faint); }

.btn--light {
  background: #fff;
  color: var(--sea-800);
}
.btn--light:hover:not(:disabled) { background: var(--sea-50); }

.btn--sm { padding: 9px 16px; font-size: 0.87rem; }
.btn--block { width: 100%; }
.btn--lg { padding: 16px 30px; font-size: 1.02rem; }

:where(a, button, input, select, textarea):focus-visible {
  outline: 2px solid var(--sea-600);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
}

.brand__mark {
  width: 36px;
  height: 36px;
  flex: none;
  /* 23% matches the rounding baked into logo.svg (rx 15 of 64), so the CSS
     corner lands on the artwork's own corner instead of shaving it. */
  border-radius: 23%;
}

.brand small {
  display: block;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav__links a {
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.93rem;
  font-weight: 550;
}

.nav__links a:not(.btn):hover { color: var(--ink); }

/* `.nav__links a` would otherwise out-specify `.btn--primary`'s colour. */
.nav__links a.btn { margin-left: 10px; }
.nav__links a.btn--primary { color: #fff; }
.nav__links a.btn--primary:hover { background: var(--sea-700); }

@media (max-width: 760px) {
  /* Links go; the one that matters — Book — stays. */
  .nav__inner { height: 64px; }
  .nav__links a:not(.btn) { display: none; }
  .nav__links a.btn { margin-left: 0; }

  /* Neither line may wrap: a longer business name set in Settings ellipsises
     rather than pushing the button off the bar. */
  .brand { font-size: 0.98rem; gap: 10px; min-width: 0; }
  .brand > span { min-width: 0; }

  .brand [data-brand="company"],
  .brand small {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .brand small { font-size: 0.6rem; }
}

/* ---------- hero ---------- */

.hero {
  padding: clamp(48px, 7vw, 96px) 0 clamp(56px, 8vw, 104px);
}

.hero__inner {
  display: grid;
  grid-template-columns: 1fr 0.85fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

.hero__copy { min-width: 0; }

/* Announcement from Settings — hidden when there's nothing to say. */
.hero__badge {
  display: inline-block;
  margin: 0 0 20px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--sea-50);
  color: var(--sea-700);
  font-size: 0.8rem;
  font-weight: 650;
  letter-spacing: 0.02em;
}

.hero h1 { margin-bottom: 20px; }

.hero__lede {
  font-size: clamp(1.05rem, 1.6vw, 1.18rem);
  color: var(--ink-soft);
  max-width: 46ch;
  margin-bottom: 30px;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 28px;
  list-style: none;
  margin: 34px 0 0;
  padding: 20px 0 0;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 0.94rem;
}

.hero__photo {
  margin: 0;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--shell);
}

.hero__photo img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  cursor: zoom-in;
}

@media (max-width: 860px) {
  /* Stacked, the photo does more good above the words than below them. */
  .hero { padding-top: clamp(28px, 5vw, 48px); }
  .hero__inner { grid-template-columns: 1fr; gap: 32px; }
  .hero__photo { order: -1; max-width: 560px; }
  .hero__photo img { aspect-ratio: 5 / 4; }
}

@media (max-width: 560px) {
  /* Two buttons of different widths look accidental; match them up. */
  .hero__cta { flex-direction: column; align-items: stretch; }
  .hero__cta .btn { width: 100%; }
}

/* ---------- gallery ---------- */

.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(14px, 1.6vw, 22px);
}

.shot { margin: 0; }

/* The tour is the only moving thing on the page, and a 4-up tile sold it
   short — give it a block four times the size of a photo. */
.shot--video {
  grid-column: span 2;
  grid-row: span 2;
  display: flex;
  flex-direction: column;
}

.shot--video video {
  flex: 1;
  min-height: 0;
  height: auto;
  aspect-ratio: auto;
}

.shot img,
.shot video {
  display: block;
  width: 100%;
  /* `height: auto` is required — the width/height attributes on the <img> make
     both dimensions definite, and aspect-ratio is then ignored. */
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--r-md);
  background: var(--shell);
}

.shot img { cursor: zoom-in; }
.shot video { background: var(--sea-900); }

.shot figcaption {
  margin-top: 10px;
  font-size: 0.86rem;
  color: var(--ink-soft);
}

@media (max-width: 900px) {
  .gallery { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 620px) {
  .gallery { grid-template-columns: 1fr 1fr; gap: 12px; }
  .shot figcaption { font-size: 0.8rem; margin-top: 8px; }

  /* Full width on a phone, at the clip's own portrait shape — no cropping,
     and near enough its native size to stay sharp. */
  .shot--video { grid-row: auto; }
  .shot--video video { flex: none; aspect-ratio: 9 / 16; }
}

/* ---------- lightbox ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 20px;
  background: rgba(8, 37, 47, 0.95);
  backdrop-filter: blur(6px);
}

.lightbox__figure {
  margin: 0;
  justify-self: center;
  text-align: center;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.lightbox__figure img {
  max-width: 100%;
  max-height: 82vh;
  width: auto;
  margin-inline: auto;
  border-radius: var(--r-md);
}

.lightbox__figure figcaption {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.92rem;
}

.lightbox__close,
.lightbox__nav {
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: transparent;
  color: #fff;
  border-radius: 50%;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-family: inherit;
  transition: background 0.15s ease;
}

.lightbox__close:hover,
.lightbox__nav:hover { background: rgba(255, 255, 255, 0.14); }

.lightbox__nav {
  width: 46px;
  height: 46px;
  font-size: 1.6rem;
  line-height: 1;
}

.lightbox__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 42px;
  height: 42px;
  font-size: 1.4rem;
  line-height: 1;
}

@media (max-width: 640px) {
  .lightbox { padding: 12px; gap: 4px; }
  .lightbox__nav { width: 38px; height: 38px; font-size: 1.3rem; }
  .lightbox__figure img { max-height: 74vh; }
}

/* ---------- plain fact lists ---------- */

.specs {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  column-gap: clamp(24px, 4vw, 56px);
}

.specs li {
  padding: 18px 0;
  border-top: 1px solid var(--line);
}

/* The sprite itself is never painted — only its symbols, via <use>. */
.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.specs li:has(> .specs__icon) {
  display: flex;
  align-items: flex-start;
  gap: 13px;
}

.specs__icon {
  flex: none;
  width: 22px;
  height: 22px;
  margin-top: 3px;
  fill: none;
  stroke: var(--sea-600);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.specs strong {
  display: block;
  font-size: 0.99rem;
  font-weight: 650;
  margin-bottom: 3px;
}

.specs span {
  display: block;
  color: var(--ink-soft);
  font-size: 0.92rem;
  line-height: 1.5;
}

@media (max-width: 900px) {
  .specs { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
  .specs { grid-template-columns: 1fr; }
  .specs li { padding: 15px 0; }
}

/* ---------- seafront map ---------- */

.map-figure {
  margin: 0 0 clamp(28px, 4vw, 44px);
}

/* The map needs a minimum width to stay legible, so it scrolls inside its own
   box rather than pushing the page sideways. */
.map-scroll {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--paper);
  -webkit-overflow-scrolling: touch;
}

.map {
  display: block;
  width: 100%;
  min-width: 1040px;
  height: auto;
}

/* Phones and small tablets get the portrait map instead — it runs down the
   screen, so there's nothing to scroll sideways. */
@media (max-width: 860px) {
  .map-scroll {
    overflow-x: hidden;
    max-width: 430px;
    margin-inline: auto;
  }

  .map { min-width: 0; }
}

/* ---------- closing call to action ---------- */

.cta {
  background: var(--sea-900);
  color: #fff;
  padding: clamp(56px, 7vw, 88px) 0;
}

.cta__inner { text-align: center; }
.cta h2 { margin-bottom: 24px; color: #fff; }
.cta .btn--primary { background: #fff; color: var(--sea-900); }
.cta .btn--primary:hover { background: var(--sea-50); }

/* ==========================================================================
   Calendar and booking
   ========================================================================== */

.booking-layout {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 24px;
  align-items: start;
}

@media (max-width: 940px) {
  .booking-layout { grid-template-columns: 1fr; }
}

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 26px;
}

.card--sticky { position: sticky; top: 92px; }

@media (max-width: 940px) {
  .card--sticky { position: static; }
}

.cal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}

.cal__month {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
}

.cal__nav { display: flex; gap: 6px; }

.icon-btn {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  font-size: 1rem;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.icon-btn:hover:not(:disabled) { border-color: var(--ink-faint); }
.icon-btn:disabled { opacity: 0.3; cursor: not-allowed; }

.cal__dow,
.cal__grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.cal__dow { margin-bottom: 8px; }

.cal__dow span {
  text-align: center;
  font-size: 0.7rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.day {
  position: relative;
  aspect-ratio: 1 / 1;
  min-height: 46px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  background: var(--shell);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink-faint);
  cursor: default;
  padding: 2px;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.day--pad { background: transparent; }

.day__price {
  font-size: 0.66rem;
  font-weight: 600;
  color: var(--ink-faint);
  letter-spacing: -0.01em;
}

/* Two states do all the work for a visitor: you can have this day, or you
   can't. Everything unavailable reads the same. */
.day--available {
  background: var(--paper);
  border-color: var(--line);
  color: var(--ink);
  cursor: pointer;
}

.day--available:hover {
  border-color: var(--sea-600);
  background: var(--sea-50);
}

.day--selected,
.day--selected:hover {
  background: var(--sea-600);
  border-color: var(--sea-600);
  color: #fff;
}
.day--selected .day__price { color: rgba(255, 255, 255, 0.8); }

.day--booked,
.day--held,
.day--blocked,
.day--unopened,
.day--past {
  background: var(--shell);
  border-color: transparent;
  color: var(--ink-faint);
}

/* Only bookable days show a price out front. */
.day:not(.day--available):not(.day--selected) .day__price { display: none; }

.day--today::after {
  content: '';
  position: absolute;
  bottom: 5px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.6;
}

/* The dashboard needs the detail the public page hides: which days are held,
   confirmed or closed, and what every day is priced at. */
.admin .day--held { background: var(--warn-bg); color: #7d5715; }
.admin .day--booked { background: var(--ok-bg); color: #146144; }
.admin .day--blocked,
.admin .day--past,
.admin .day--unopened { background: var(--shell); color: var(--ink-faint); }
.admin .day .day__price { display: block; }
.admin .day--selected .day__price { color: rgba(255, 255, 255, 0.8); }

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 0.83rem;
  color: var(--ink-soft);
}

.legend span { display: inline-flex; align-items: center; gap: 7px; }

.swatch {
  width: 13px;
  height: 13px;
  border-radius: 4px;
  flex: none;
}
.swatch--available { background: var(--paper); border: 1px solid var(--line); }
.swatch--selected { background: var(--sea-600); }
.swatch--taken { background: var(--shell); border: 1px solid var(--line); }
.swatch--held { background: var(--warn-bg); border: 1px solid var(--warn); }
.swatch--booked { background: var(--ok-bg); border: 1px solid var(--ok); }
.swatch--blocked { background: var(--shell); border: 1px solid var(--ink-faint); }

.cal__loading {
  text-align: center;
  padding: 40px 0;
  color: var(--ink-faint);
  font-size: 0.92rem;
}

/* On narrow screens `min-height` + `aspect-ratio` would force a cell width
   wider than the viewport can fit, pushing Sunday off-screen. Let the seven
   columns shrink and take the height from the aspect ratio instead. */
@media (max-width: 480px) {
  .wrap { padding-inline: 18px; }
  .card { padding: 18px; }
  .cal__grid,
  .cal__dow { gap: 4px; }

  .day {
    min-height: 0;
    font-size: 0.88rem;
    border-radius: 8px;
  }
  .day__price { font-size: 0.6rem; }
  .cal__dow span { font-size: 0.62rem; letter-spacing: 0.03em; }
  .legend { font-size: 0.8rem; gap: 6px 14px; }
}

/* ---------- booking panel ---------- */

.panel__title {
  font-size: 1.12rem;
  margin-bottom: 4px;
}

.panel__hint {
  color: var(--ink-soft);
  font-size: 0.9rem;
  margin-bottom: 18px;
}

.panel__foot {
  margin: 12px 0 0;
  text-align: center;
  color: var(--ink-faint);
  font-size: 0.84rem;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chips:not(:empty) { margin-bottom: 16px; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--sea-50);
  border: 1px solid var(--sea-100);
  color: var(--sea-800);
  border-radius: 999px;
  padding: 6px 8px 6px 14px;
  font-size: 0.85rem;
  font-weight: 600;
}

.chip button {
  border: 0;
  background: rgba(15, 28, 34, 0.08);
  color: inherit;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.8rem;
  line-height: 1;
  display: grid;
  place-items: center;
}
.chip button:hover { background: rgba(15, 28, 34, 0.16); }

.total-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 16px 0;
  margin-bottom: 8px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.total-row span { color: var(--ink-soft); font-size: 0.92rem; }
.total-row strong { font-size: 1.45rem; letter-spacing: -0.03em; }

.field { margin-bottom: 14px; }

.field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 650;
  margin-bottom: 6px;
  color: var(--ink);
}

.field__optional { color: var(--ink-faint); font-weight: 400; }

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  font: inherit;
  font-size: 0.95rem;
  background: var(--paper);
  color: var(--ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--sea-600);
  box-shadow: 0 0 0 3px rgba(15, 96, 118, 0.12);
}

.field input::placeholder,
.field textarea::placeholder { color: var(--ink-faint); }

.field textarea { resize: vertical; min-height: 76px; }

.field__hint {
  margin: 6px 0 0;
  font-size: 0.82rem;
  color: var(--ink-soft);
}

.check {
  display: flex !important;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  cursor: pointer;
  margin: 0 !important;
  font-weight: 550 !important;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.check:hover { border-color: var(--ink-faint); }
.check:has(input:checked) { border-color: var(--sea-600); background: var(--sea-50); }

.check input {
  width: 18px;
  height: 18px;
  flex: none;
  accent-color: var(--sea-600);
  cursor: pointer;
  margin: 0;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 400px) {
  .field-row { grid-template-columns: 1fr; }
}

.notice {
  border-radius: var(--r-sm);
  padding: 12px 14px;
  font-size: 0.9rem;
  margin-bottom: 14px;
}
.notice--error { background: var(--stop-bg); color: #8b3733; }
.notice--ok { background: var(--ok-bg); color: #146144; }
.notice--info { background: var(--sea-50); color: var(--sea-800); }

.success {
  text-align: center;
  padding: 8px 4px;
}
.success__mark {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--ok-bg);
  color: var(--ok);
  display: grid;
  place-items: center;
  font-size: 1.6rem;
  margin: 0 auto 16px;
}
.success__ref {
  display: inline-block;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 1.02rem;
  font-weight: 700;
  background: var(--shell);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 8px 16px;
  margin: 6px 0 16px;
}

/* ---------- faq ---------- */

.faq { border-top: 1px solid var(--line); }

.faq details { border-bottom: 1px solid var(--line); }

.faq summary {
  cursor: pointer;
  padding: 20px 0;
  font-size: 1.02rem;
  font-weight: 650;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
}

.faq summary:hover { color: var(--sea-600); }
.faq summary::-webkit-details-marker { display: none; }

.faq summary::after {
  content: '+';
  font-size: 1.3rem;
  color: var(--ink-faint);
  font-weight: 400;
  transition: transform 0.2s ease;
}
.faq details[open] summary::after { transform: rotate(45deg); }

.faq details p {
  color: var(--ink-soft);
  margin: 0 0 20px;
  font-size: 0.97rem;
  max-width: 68ch;
}

/* ---------- footer ---------- */

.footer {
  background: var(--paper);
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  padding: 28px 0;
  font-size: 0.88rem;
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 28px;
}

.footer__brand {
  font-size: 0.98rem;
  text-decoration: none;
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 18px;
  flex: 1;
}

.footer__links > span {
  display: contents; /* contact links sit inline with the rest */
}

.footer a { color: var(--ink-soft); text-decoration: none; }
.footer a:hover { color: var(--ink); }

.footer__meta {
  color: var(--ink-faint);
  font-size: 0.82rem;
}

@media (max-width: 720px) {
  .footer__inner { gap: 12px 20px; }
  .footer__meta { width: 100%; }
}

.specs--tight li { padding: 14px 0; }

/* ==========================================================================
   Admin
   ========================================================================== */

body.admin { background: var(--shell); }

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--shell);
}

.login-card {
  width: 100%;
  max-width: 392px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 36px 32px;
  text-align: center;
}

.login-card h1 { font-size: 1.5rem; margin-bottom: 4px; }
.login-card > p { color: var(--ink-soft); font-size: 0.92rem; margin-bottom: 24px; }
.login-card .field { text-align: left; }

.admin-shell { min-height: 100vh; display: flex; flex-direction: column; }

.admin-bar {
  background: var(--sea-900);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 50;
}

.admin-bar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 62px;
}

.admin-bar .brand { color: #fff; }
.admin-bar .brand small { color: var(--sea-300); }

.admin-bar__actions { display: flex; align-items: center; gap: 8px; }

.tabs {
  display: flex;
  gap: 4px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  padding: 0 22px;
  overflow-x: auto;
  position: sticky;
  top: 62px;
  z-index: 40;
}

.tab {
  border: 0;
  background: none;
  font: inherit;
  font-weight: 600;
  font-size: 0.94rem;
  color: var(--ink-soft);
  padding: 15px 16px;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
}

.tab:hover { color: var(--sea-700); }
.tab[aria-selected='true'] { color: var(--sea-700); border-bottom-color: var(--sea-600); }

.admin-main {
  flex: 1;
  padding: 28px 22px 64px;
  max-width: 1240px;
  width: 100%;
  margin-inline: auto;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 26px;
}

.stat {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
}

.stat span {
  display: block;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 6px;
}

.stat strong {
  font-size: 1.9rem;
  letter-spacing: -0.03em;
  line-height: 1.1;
  display: block;
}

.stat em {
  font-style: normal;
  font-size: 0.84rem;
  color: var(--ink-soft);
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 18px;
}

.toolbar input[type='search'],
.toolbar select {
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  font: inherit;
  font-size: 0.92rem;
  background: var(--paper);
}

.toolbar input[type='search'] { min-width: 220px; flex: 1 1 220px; max-width: 340px; }
.toolbar .spacer { flex: 1; }

.booking-list { display: flex; flex-direction: column; gap: 12px; }

.booking {
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 4px solid var(--ink-faint);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  padding: 18px 20px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: start;
}

.booking[data-status='pending'] { border-left-color: var(--warn); }
.booking[data-status='confirmed'] { border-left-color: var(--ok); }
.booking[data-status='cancelled'] { border-left-color: var(--ink-faint); opacity: 0.68; }

@media (max-width: 760px) {
  .booking { grid-template-columns: 1fr; }
}

.booking__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.booking__name { font-weight: 700; font-size: 1.06rem; }

.booking__ref {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.8rem;
  color: var(--ink-faint);
  background: var(--shell);
  padding: 2px 8px;
  border-radius: 5px;
}

.pill {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 999px;
}
.pill--pending { background: var(--warn-bg); color: var(--warn); }
.pill--confirmed { background: var(--ok-bg); color: var(--ok); }
.pill--cancelled { background: var(--shell); color: var(--ink-faint); }
.pill--paid { background: var(--sea-100); color: var(--sea-700); }
.pill--repeat { background: #fdf1dc; color: #8a5f12; }

/* ---------- saved wording and pictures ---------- */

.snippet-form { margin-bottom: 18px; }

.snippet-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.snippet {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 12px 14px;
  background: var(--shell);
}

.snippet__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.snippet__actions {
  display: flex;
  gap: 6px;
}

/* Kept as written — line breaks in saved wording are part of the wording. */
.snippet__body {
  margin: 0;
  font: inherit;
  font-size: 0.9rem;
  color: var(--ink-soft);
  white-space: pre-wrap;
  word-break: break-word;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.photo {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--shell);
  display: flex;
  flex-direction: column;
}

.photo img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--line);
}

.photo figcaption {
  padding: 8px 10px 0;
  font-size: 0.8rem;
  color: var(--ink-soft);
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.photo__name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.photo__size {
  color: var(--ink-faint);
  flex: none;
}

.photo__actions {
  display: flex;
  gap: 4px;
  padding: 8px 10px 10px;
  margin-top: auto;
}

.photo__actions .btn { padding: 5px 9px; font-size: 0.78rem; }

/* A returning guest's earlier bookings, folded away until asked for. */
.booking__history {
  font-size: 0.86rem;
  color: var(--ink-soft);
  margin-top: 8px;
}

.booking__history summary {
  cursor: pointer;
  color: var(--sea-700);
  font-weight: 550;
}

.booking__history ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

.booking__history li { margin-bottom: 3px; }

/* Notes only ever seen here. Kept visually distinct from the guest's own
   notes above so the two can't be confused at a glance. */
.booking__private {
  margin-top: 8px;
  font-size: 0.86rem;
}

.booking__private summary {
  cursor: pointer;
  color: var(--ink-soft);
  font-weight: 600;
}

.booking__private-hint { font-weight: 400; color: var(--ink-faint); }

.booking__private-box {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: #fffdf7;
  font: inherit;
  font-size: 0.9rem;
  color: var(--ink);
  resize: vertical;
}

.booking__private-box:focus {
  outline: 2px solid var(--sea-300);
  outline-offset: 1px;
}

.booking__private-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}

.booking__private-state {
  font-size: 0.82rem;
  color: var(--sea-700);
}

.booking__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  font-size: 0.9rem;
  color: var(--ink-soft);
  margin-bottom: 8px;
}

.booking__meta a { color: var(--ink-soft); text-decoration: none; }
.booking__meta a:hover { color: var(--sea-600); text-decoration: underline; }

.booking__dates {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.date-tag {
  font-size: 0.8rem;
  font-weight: 600;
  background: var(--sea-50);
  color: var(--sea-800);
  border-radius: 6px;
  padding: 3px 9px;
}

.booking__notes {
  font-size: 0.9rem;
  color: var(--ink-soft);
  background: var(--shell);
  border-radius: var(--r-sm);
  padding: 9px 12px;
  margin-top: 6px;
}

.booking__side {
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

@media (max-width: 760px) {
  .booking__side { align-items: flex-start; text-align: left; }
}

.booking__total { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.03em; }
.booking__actions { display: flex; flex-wrap: wrap; gap: 6px; }

.empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--ink-faint);
  background: var(--paper);
  border: 1px dashed var(--line);
  border-radius: var(--r-md);
}

.empty__icon { font-size: 2.4rem; margin-bottom: 10px; }

.panel-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 20px;
  align-items: start;
}

@media (max-width: 940px) {
  .panel-grid { grid-template-columns: 1fr; }
}

.card h2 { font-size: 1.15rem; margin-bottom: 4px; }
.card__sub { color: var(--ink-soft); font-size: 0.9rem; margin-bottom: 18px; }

.list-rows { display: flex; flex-direction: column; gap: 6px; max-height: 320px; overflow-y: auto; }

.list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  background: var(--shell);
  border-radius: var(--r-sm);
  font-size: 0.9rem;
}

.list-row strong { font-weight: 650; }
.list-row em { font-style: normal; color: var(--ink-soft); }

.link-btn {
  border: 0;
  background: none;
  color: var(--stop);
  font: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  padding: 2px 4px;
}
.link-btn:hover { text-decoration: underline; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translate(-50%, 20px);
  background: var(--sea-900);
  color: #fff;
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
  z-index: 90;
}

.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast--error { background: #8f2f2f; }

@media (max-width: 560px) {
  /* The two-line brand overflows the fixed-height bar on narrow screens. */
  .admin-bar .brand small { display: none; }
  .admin-bar .brand { font-size: 1rem; }
  .admin-bar__inner { height: 56px; }
  .tabs { top: 56px; padding-inline: 8px; }
  .tab { padding: 13px 12px; font-size: 0.9rem; }

  .admin-main { padding: 20px 16px 56px; }

  /* Two-up so the booking list isn't five cards down the page. */
  .stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat { padding: 14px; }
  .stat span { font-size: 0.66rem; letter-spacing: 0.06em; }
  .stat strong { font-size: 1.5rem; }
  .stat em { font-size: 0.78rem; }

  .booking { padding: 16px; }
  .booking__actions .btn { flex: 1 1 auto; }
  .toolbar input[type='search'] { max-width: none; }
}

/* ==========================================================================
   The guest's own booking page
   ========================================================================== */

.guest {
  padding: clamp(32px, 6vw, 64px) 0 clamp(48px, 8vw, 88px);
  background: var(--shell);
  min-height: 70vh;
}

.guest__loading,
.guest__missing {
  text-align: center;
  color: var(--ink-soft);
  padding: 40px 0;
}

.guest__missing h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); }
.guest__missing p { max-width: 460px; margin-inline: auto; }

.guest__head {
  max-width: 640px;
  margin-bottom: 28px;
}

.guest__hello {
  font-size: clamp(2rem, 5vw, 3rem);
  margin: 12px 0 10px;
}

.guest__lede {
  font-size: 1.1rem;
  color: var(--ink-soft);
  margin: 0;
}

.guest__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 20px;
  align-items: start;
}

.guest__h2 {
  font-size: 1.05rem;
  margin-bottom: 14px;
}

.guest__days {
  list-style: none;
  margin: 0;
  padding: 0;
}

.guest__day {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  font-weight: 600;
}

.guest__day--off {
  opacity: 0.55;
  text-decoration: line-through;
}

.guest__total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-top: 14px;
  font-size: 1.05rem;
}

.guest__total strong { font-size: 1.5rem; }

.guest__paid {
  margin: 12px 0 0;
  color: var(--ok);
  font-weight: 650;
}

.guest__facts {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 18px;
  margin: 0 0 16px;
  font-size: 0.95rem;
}

.guest__facts dt { color: var(--ink-faint); }
.guest__facts dd { margin: 0; font-weight: 600; }

.guest__aside .btn { margin-top: 8px; }

.guest__next { margin-top: 20px; }

.guest__steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}

.guest__step {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.guest__step-icon {
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--sea-50);
  color: var(--sea-700);
  display: grid;
  place-items: center;
  font-size: 0.82rem;
  font-weight: 700;
}
.guest__step strong { display: block; margin-bottom: 2px; }
.guest__step span { font-size: 0.9rem; color: var(--ink-soft); }

/* ---------- the welcome pack further down the guest page ---------- */

.pack { margin-top: 40px; }

.pack__section {
  padding-top: 34px;
  margin-top: 34px;
  border-top: 1px solid var(--line);
}

.pack__section h2 {
  font-size: clamp(1.3rem, 2.6vw, 1.7rem);
  margin-bottom: 14px;
}

.pack__lede {
  color: var(--ink-soft);
  max-width: 620px;
}

/* Most ledes stop at a comfortable reading measure, but a couple of sections
   are better running the full width of the column. */
.pack__lede--wide { max-width: none; }

.keycode {
  display: grid;
  gap: 4px;
  background: var(--sea-900);
  color: #fff;
  border-radius: var(--r-md);
  padding: 18px 22px;
  margin-bottom: 22px;
}

.keycode__label {
  font-size: 0.74rem;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sea-300);
}

.keycode__value {
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1.1;
}

.keycode__hint {
  font-size: 0.86rem;
  color: rgba(255, 255, 255, 0.65);
  max-width: 52ch;
}

.pack__two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 18px;
}

.pack__h3 { font-size: 1rem; margin-bottom: 10px; }

.pack__list {
  margin: 0;
  padding-left: 20px;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.pack__list li { margin-bottom: 6px; }

.pack .map-figure { margin-top: 20px; }

@media (max-width: 720px) {
  .pack__two { grid-template-columns: 1fr; }
}

.guest__keep {
  margin: 22px 0 0;
  text-align: center;
  font-size: 0.88rem;
  color: var(--ink-faint);
}

@media (max-width: 860px) {
  .guest__grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Add / edit a booking
   ========================================================================== */

.sheet {
  width: min(560px, calc(100vw - 32px));
  max-height: min(88vh, 800px);
  border: none;
  border-radius: var(--r-lg);
  padding: 0;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  color: var(--ink);
}

/* Head and buttons stay put; the fields scroll on a short screen. */
.sheet form {
  display: flex;
  flex-direction: column;
  max-height: inherit;
}

.sheet__body {
  overflow-y: auto;
  min-height: 0;
}

.sheet::backdrop {
  background: rgba(8, 37, 47, 0.5);
  backdrop-filter: blur(2px);
}

.sheet__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 22px 0;
}

.sheet__head h2 { margin: 0; font-size: 1.2rem; }

.sheet__body { padding: 16px 22px 0; }

.sheet__dates {
  background: var(--shell);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 12px 14px;
  margin-bottom: 16px;
  font-size: 0.9rem;
}

.sheet__dates strong { display: block; margin-bottom: 4px; }

.sheet__foot {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 18px 22px 20px;
}

.sheet__check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  font-weight: 600;
}

.sheet__check input { width: 18px; height: 18px; accent-color: var(--sea-600); }

.booking__link {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  font-size: 0.82rem;
  color: var(--ink-faint);
}

.booking__link code {
  background: var(--shell);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 3px 7px;
  font-size: 0.8rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 260px;
}

@media print {
  .admin-bar, .tabs, .toolbar, .booking__actions { display: none !important; }
  body.admin { background: #fff; }
  .booking { break-inside: avoid; box-shadow: none; }
}

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