/*
 * Casa Maria — the one stylesheet for the whole site
 * ==================================================
 *    1. Design tokens      colors, type, spacing, shape, motion — change the look here
 *    2. Fonts
 *    3. Base
 *    4. Layout
 *    5. Components         buttons, cards, messages, forms, photos, lists
 *    6. Public website
 *    7. Motion             fades, reveals and other movement — all optional decoration
 *    8. Guest guide
 *    9. Admin
 *   10. Finances           the money pages inside the admin
 *   11. Print
 *
 * Class names read as block__part--variant: .hero__title is the title inside
 * the hero, .btn--primary is the primary version of a button.
 *
 * The palette comes from the Casa Maria logo and the printed in-home signs:
 * warm cream paper, gold-taupe, dusty blue and sage. Terracotta is kept for
 * emergencies and warnings only.
 */


/* 1. Design tokens --------------------------------------------------------- */

:root {
  /* Paper and surfaces */
  --paper: #fbf8f3;
  --paper-deep: #f4ece0;
  --surface: #fffdf9;
  --surface-alt: #f8f2e8;

  /* Text */
  --ink: #443c2f;
  --ink-soft: #6e6353;
  --ink-faint: #776d5f;

  /* Gold-taupe, from the wordmark */
  --brand: #807050;
  --brand-deep: #6f6044;
  --brand-darker: #5c4f37;
  --brand-tint: #efe7d8;

  /* Dusty blue — links and the guest guide */
  --sky: #7e9ab2;
  --sky-deep: #4f6f88;
  --sky-tint: #e8eef3;

  /* Sage — ticks, success */
  --sage: #a6b598;
  --sage-deep: #5a7349;
  --sage-tint: #eaefe4;

  /* Terracotta — emergencies and warnings only */
  --alert: #ac5a50;
  --alert-deep: #8f4238;
  --alert-tint: #fbeeeb;

  --line: #e7dfd1;
  --line-soft: #f0e9dd;

  /* Charts (Finances) — warm, muted, and checked to stay apart for colour-blind
     readers. Slices of the expense chart: cleaning, repairs & maintenance,
     utilities, supplies, insurance, everything else. */
  --viz-income: #167a55;
  --viz-expense: #c08a3e;
  --viz-1: #167a55;
  --viz-2: #c08a3e;
  --viz-3: #3a7cb0;
  --viz-4: #b8644a;
  --viz-5: #7a63ad;
  --viz-other: #bdb19c;

  /* Type */
  --font-display: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-body: "Source Sans 3", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-code: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --text-small: 0.9rem;
  --text-base: 1.0625rem;
  --text-lead: 1.2rem;
  --text-h3: clamp(1.5rem, 1.25rem + 0.9vw, 2rem);
  --text-h2: clamp(1.8rem, 1.35rem + 1.7vw, 2.6rem);
  --text-h1: clamp(3rem, 1.6rem + 5.5vw, 5.75rem);

  /* Spacing */
  --space-2xs: 0.35rem;
  --space-xs: 0.6rem;
  --space-s: 1rem;
  --space-m: 1.5rem;
  --space-l: 2.25rem;
  --space-xl: 3.5rem;
  --space-section: clamp(4rem, 2.25rem + 6vw, 7.5rem);

  /* Shape */
  --radius-s: 0.6rem;
  --radius-m: 1rem;
  --radius-l: 1.5rem;
  --radius-pill: 999px;
  --shadow-s: 0 1px 2px rgb(68 60 47 / 0.05), 0 4px 14px -8px rgb(68 60 47 / 0.14);
  --shadow-m: 0 2px 6px rgb(68 60 47 / 0.05), 0 18px 40px -20px rgb(68 60 47 / 0.32);

  /* Motion */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);     /* fast start, long gentle finish */
  --fast: 0.18s;
  --slow: 0.7s;
  --rise: clamp(1rem, 0.6rem + 1.5vw, 1.75rem);   /* how far things travel as they fade in */

  --header-height: 4.5rem;
}


/* 2. Fonts ------------------------------------------------------------------ */
/* Stored on this site. Each file holds every weight (a "variable" font). */

@font-face {
  font-family: "Playfair Display";
  src: url("../fonts/playfair-display.woff2") format("woff2");
  font-weight: 400 900;
  font-display: swap;
}

@font-face {
  font-family: "Source Sans 3";
  src: url("../fonts/source-sans-3.woff2") format("woff2");
  font-weight: 200 900;
  font-display: swap;
}


/* 3. Base ------------------------------------------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;   /* no grey flash on tap; buttons have their own press */
  scroll-padding-top: calc(var(--header-height) + 1rem);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.65;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { display: block; max-width: 100%; height: auto; }
[hidden] { display: none !important; }
figure { margin: 0; }

h1, h2, h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.012em;
  color: var(--ink);
  text-wrap: balance;
}

p { margin: 0; text-wrap: pretty; }
p + p { margin-top: var(--space-s); }

a { color: var(--sky-deep); text-underline-offset: 0.2em; }

:focus-visible {
  outline: 3px solid var(--sky-deep);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection { background: var(--brand-tint); color: var(--ink); }

/* Smooth scrolling to #sections, and a soft fade between pages. */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  @view-transition { navigation: auto; }
}

/* Anyone who has asked their device for less motion gets none. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}


/* 4. Layout ----------------------------------------------------------------- */

.container {
  width: 100%;
  max-width: 76rem;
  margin-inline: auto;
  padding-inline: 1.25rem;
}
@media (min-width: 640px) { .container { padding-inline: 2rem; } }
@media (min-width: 1024px) { .container { padding-inline: 3rem; } }

.section { padding-block: var(--space-section); }
.section--flush-top { padding-top: 0; }
.section--alt {
  background: var(--surface-alt);
  border-block: 1px solid var(--line-soft);
}

.section-head { max-width: 42rem; margin-bottom: clamp(2rem, 1.25rem + 3vw, 3.5rem); }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head > p, .section-head > .lead { margin-top: var(--space-s); color: var(--ink-soft); }

.section-title { margin-top: var(--space-xs); font-size: var(--text-h2); }

.lead { font-size: var(--text-lead); line-height: 1.6; }
.muted { color: var(--ink-soft); }
.small { font-size: var(--text-small); }

/* Hidden on screen, still read out by screen readers and still clickable via its label. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  top: -4rem;
  left: 1rem;
  z-index: 100;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-pill);
  background: var(--brand-deep);
  color: #fff;
}
.skip-link:focus { top: 1rem; }


/* 5. Components ------------------------------------------------------------- */

/* Small capitals label, as on the printed signs. */
.eyebrow {
  display: block;
  margin: 0;
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--sky-deep);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 3rem;
  padding: 0 1.6rem;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font: 600 1rem/1.2 var(--font-body);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--fast), border-color var(--fast), color var(--fast),
              box-shadow var(--fast), transform var(--fast) var(--ease);
}
@media (hover: hover) { .btn:hover { transform: translateY(-1px); } }
.btn:active { transform: scale(0.97); }

.btn--primary { background: var(--brand-deep); color: #fff; box-shadow: 0 6px 18px -10px rgb(92 79 55 / 0.9); }
.btn--primary:hover { background: var(--brand-darker); }
.btn--secondary { background: var(--surface); border-color: var(--line); color: var(--ink); }
.btn--secondary:hover { border-color: var(--brand); }
.btn--guest { background: var(--surface); border-color: rgb(79 111 136 / 0.45); color: var(--sky-deep); }
.btn--guest:hover { border-color: var(--sky-deep); }
.btn--danger { background: transparent; border-color: rgb(172 90 80 / 0.45); color: var(--alert-deep); }
.btn--danger:hover { background: var(--alert-tint); }
.btn--small { min-height: 2.5rem; padding: 0 1.1rem; font-size: 0.925rem; }
.btn--block { width: 100%; }

.link-button {
  padding: 0;
  background: none;
  border: 0;
  color: var(--sky-deep);
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}

/* Cards and messages */
.card {
  padding: var(--space-m);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-s);
}

.notice {
  margin-bottom: var(--space-m);
  padding: 0.85rem 1.1rem;
  border: 1px solid;
  border-radius: var(--radius-m);
  font-weight: 600;
}
.notice--success { background: var(--sage-tint); border-color: rgb(166 181 152 / 0.7); color: var(--sage-deep); }
.notice--error { background: var(--alert-tint); border-color: rgb(172 90 80 / 0.35); color: var(--alert-deep); }
.notice--info { background: var(--sky-tint); border-color: rgb(126 154 178 / 0.4); color: var(--sky-deep); }

.badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 0.4rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  vertical-align: middle;
}
.badge--active { background: var(--sage-tint); color: var(--sage-deep); }
.badge--expired { background: var(--alert-tint); color: var(--alert-deep); }
.badge--disabled { background: var(--surface-alt); color: var(--ink-faint); }

/* Forms */
label {
  display: block;
  margin-bottom: var(--space-2xs);
  font-size: 0.95rem;
  font-weight: 600;
}

input, select, textarea {
  width: 100%;
  padding: 0.7rem 0.9rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  transition: border-color var(--fast), box-shadow var(--fast);
}
input[type="checkbox"] { width: auto; }
textarea { resize: vertical; line-height: 1.55; }
::placeholder { color: #b6ab98; opacity: 1; }
input:focus, select:focus, textarea:focus {
  border-color: var(--sky-deep);
  outline: none;
  box-shadow: 0 0 0 3px rgb(79 111 136 / 0.18);
}

.field { margin-bottom: 1.1rem; }
.hint { margin: -0.1rem 0 0.45rem; font-size: 0.875rem; color: var(--ink-faint); }

/* Photos fade in once they've loaded (only when JavaScript can mark them —
   without it they simply appear). */
.photo { background: var(--paper-deep); }
@media (scripting: enabled) {
  .photo { opacity: 0; transition: opacity var(--slow) var(--ease); }
  .photo.is-loaded { opacity: 1; }
}

/* An "important" line in the guide: text that starts with "! " */
.callout {
  margin-block: var(--space-s);
  padding: 0.85rem 1rem 0.85rem 1.1rem;
  background: var(--alert-tint);
  border-left: 3px solid var(--alert);
  border-radius: 0 var(--radius-s) var(--radius-s) 0;
  color: var(--alert-deep);
  font-weight: 600;
}

/* Tick-boxes (the checkout list) */
.checklist { margin: var(--space-xs) 0 0; padding: 0; list-style: none; }
.checklist li + li { margin-top: 0.35rem; }
.checklist label {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  margin: 0;
  padding: 0.55rem 0.7rem;
  border-radius: var(--radius-s);
  font-weight: 400;
  cursor: pointer;
  transition: background-color var(--fast);
}
.checklist label:hover { background: var(--surface-alt); }
.checklist input {
  flex: none;
  width: 1.3rem;
  height: 1.3rem;
  margin: 0.15rem 0 0;
  accent-color: var(--sage-deep);
}
.checklist input:checked + span { color: var(--ink-faint); text-decoration: line-through; text-decoration-color: var(--sage); }

/* Questions and answers that open when tapped */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.95rem 0;
  font-weight: 600;
  list-style: none;
  cursor: pointer;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  flex: none;
  color: var(--sky-deep);
  font-size: 1.3rem;
  line-height: 1;
  transition: transform var(--fast) var(--ease);
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > div { padding-bottom: 1rem; color: var(--ink-soft); }


/* 6. Public website --------------------------------------------------------- */

/* Header: stays at the top while you scroll, frosted over the page. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgb(251 248 243 / 0.86);
  border-bottom: 1px solid var(--line-soft);
  transition: background-color 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
}
.site-header__inner {
  display: flex;
  align-items: center;
  gap: 0.5rem 1.75rem;
  min-height: var(--header-height);
  padding-block: 0.6rem;
}

.wordmark {
  display: flex;
  align-items: baseline;
  gap: 0.8rem;
  color: var(--brand-deep);
  text-decoration: none;
}
.site-header .wordmark { margin-right: auto; }
.wordmark__name { font-family: var(--font-display); font-size: 1.6rem; line-height: 1; }
.wordmark__tagline {
  display: none;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
@media (min-width: 900px) { .wordmark__tagline { display: block; } }

.site-nav { display: flex; align-items: center; gap: 0.4rem 1.75rem; }
.site-nav a {
  color: var(--ink-soft);
  font-size: 0.975rem;
  font-weight: 600;
  text-decoration: none;
  transition: color var(--fast);
}
.site-nav a:hover { color: var(--brand-deep); }
.site-nav .site-nav__guest { color: var(--sky-deep); }
.site-nav__home, .menu-toggle { display: none; }

/* Phones: one slim row — the name, "Book" and a menu button. The links open
   in a panel below it. (Without JavaScript they simply sit on a second line.) */
@media (max-width: 719px) {
  :root { --header-height: 3.75rem; }
  .site-header {
    position: static;
    background: rgb(251 248 243 / 0.97);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;           /* cheaper to scroll on phones */
  }
  .site-header__inner { flex-wrap: wrap; gap: 0.5rem 1.25rem; padding-block: 0.5rem; }
  .wordmark__name { font-size: 1.45rem; }
  .site-header__more { display: none; }
  .site-nav { order: 3; width: 100%; }
}
@media (max-width: 719px) and (scripting: enabled) {
  .site-header { position: sticky; }
  .site-header.is-open { background: var(--paper); box-shadow: none; }
  .site-header::after {            /* dims the page behind the open menu; tapping it closes the menu */
    content: "";
    position: fixed;
    inset: var(--header-height) 0 0;
    z-index: -1;
    background: rgb(40 34 26 / 0.28);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s var(--ease), visibility 0s 0.3s;
  }
  .site-header.is-open::after { opacity: 1; visibility: visible; transition: opacity 0.3s var(--ease), visibility 0s; }
  .site-header__inner { flex-wrap: nowrap; }
  .site-header__book { box-shadow: none; }

  .menu-toggle {
    display: grid;
    place-items: center;
    flex: none;
    width: 2.75rem;
    height: 2.75rem;
    margin-right: -0.55rem;
    padding: 0;
    background: none;
    border: 0;
    border-radius: 50%;
    color: var(--ink);
    cursor: pointer;
  }
  .menu-toggle::before, .menu-toggle::after {   /* two lines that turn into an × */
    content: "";
    grid-area: 1 / 1;
    width: 1.3rem;
    height: 1.5px;
    background: currentColor;
    border-radius: 2px;
    transform: translateY(-3.5px);
    transition: transform 0.35s var(--ease-out);
  }
  .menu-toggle::after { transform: translateY(3.5px); }
  .is-open .menu-toggle::before { transform: rotate(45deg); }
  .is-open .menu-toggle::after { transform: rotate(-45deg); }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.25rem 1.25rem 1rem;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 28px 40px -30px rgb(68 60 47 / 0.5);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-0.5rem);
    transition: opacity 0.2s var(--ease), transform 0.3s var(--ease-out), visibility 0s 0.3s;
  }
  .is-open .site-nav {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity 0.25s var(--ease), transform 0.4s var(--ease-out), visibility 0s;
  }
  .site-nav a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.9rem 0.1rem;
    border-bottom: 1px solid var(--line-soft);
    color: var(--ink);
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 500;
  }
  .site-nav a:last-child { border-bottom: 0; }
  .site-nav a::after { content: "→"; font-family: var(--font-body); font-size: 1.1rem; color: var(--ink-faint); }
  .site-nav .site-nav__guest { color: var(--sky-deep); }
}

/* Hero */
.hero {
  padding-block: clamp(2.75rem, 1.5rem + 5vw, 5.5rem) var(--space-xl);
  background:
    radial-gradient(50rem 26rem at 90% 0%, rgb(239 231 216 / 0.85), transparent 70%),
    radial-gradient(36rem 22rem at 0% 100%, rgb(232 238 243 / 0.55), transparent 70%);
}
.hero__grid { display: grid; gap: var(--space-l); align-items: center; }
@media (min-width: 900px) { .hero__grid { grid-template-columns: 1.25fr 0.75fr; gap: var(--space-xl); } }
.hero__title { margin-top: var(--space-s); font-size: var(--text-h1); line-height: 0.98; letter-spacing: -0.02em; }
.hero__headline {
  margin-top: var(--space-s);
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 1.1rem + 1.3vw, 2.05rem);
  line-height: 1.28;
  color: var(--ink-soft);
}
.hero__text { max-width: 34rem; margin-top: var(--space-m); color: var(--ink-soft); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: var(--space-l); }
.hero__guest { margin-top: var(--space-m); font-size: 0.975rem; color: var(--ink-soft); }
.hero__guest a { font-weight: 600; }
.hero__art img {
  width: 100%;
  max-width: 17rem;
  margin-inline: auto;
  /* Soften the drawing's edges so its cream paper melts into the background. */
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent), linear-gradient(transparent, #000 6%, #000 96%, transparent);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent), linear-gradient(transparent, #000 6%, #000 96%, transparent);
  mask-composite: intersect;
}
@media (min-width: 900px) { .hero__art img { max-width: 25rem; } }

/* Phones: the buttons stack at full width, the same size, easy to tap. */
@media (max-width: 559px) {
  .hero { padding-block: 2.25rem 2.5rem; }
  .hero__grid { gap: var(--space-m); }
  .hero__title { margin-top: 0.75rem; }
  .hero__headline { margin-top: 0.75rem; }
  .hero__text { margin-top: var(--space-s); }
  .hero__actions { display: grid; gap: 0.6rem; margin-top: var(--space-m); }
  .hero__actions .btn { min-height: 3.25rem; }
  .hero__guest { font-size: 0.95rem; text-align: center; }
  .hero__art img { max-width: 14rem; }
}

/* Photo frames: rounded, with a soft shadow; the photo can move inside them. */
.hero-photo, .highlight__photo, .story-page__photo {
  overflow: hidden;
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-m);
  background: var(--paper-deep);
}

.hero-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
@media (min-width: 700px) { .hero-photo img { aspect-ratio: 2 / 1; } }

/* Highlights: photo and text side by side, alternating sides */
.highlights { display: grid; gap: var(--space-xl); }
@media (min-width: 860px) { .highlights { gap: 6rem; } }
.highlight { display: grid; gap: var(--space-m); align-items: center; }
@media (min-width: 860px) {
  .highlight { grid-template-columns: 1.15fr 1fr; gap: 4.5rem; }
  .highlight:nth-child(even) .highlight__photo { order: 2; }
}
.highlight__photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.highlight__body h3 { margin-top: var(--space-xs); font-size: var(--text-h3); }
.highlight__body p { margin-top: var(--space-s); color: var(--ink-soft); }

/* At a glance: facts and amenities */
.glance { display: grid; gap: var(--space-l); }
@media (min-width: 860px) { .glance { grid-template-columns: 1fr 1.1fr; gap: 5rem; } }
.facts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin: 0;
}
.fact {
  padding: 1.1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
}
.fact--wide { grid-column: 1 / -1; }
.fact dd { margin: 0.3rem 0 0; font-family: var(--font-display); font-size: 1.35rem; line-height: 1.25; }
.amenities { margin: var(--space-s) 0 0; padding: 0; list-style: none; }
@media (min-width: 560px) { .amenities { columns: 2; column-gap: 2.5rem; } }
.amenities li {
  position: relative;
  padding: 0.6rem 0 0.6rem 1.75rem;
  border-bottom: 1px solid var(--line);
  break-inside: avoid;
}
.amenities li::before {        /* a small sage tick */
  content: "";
  position: absolute;
  left: 0.2rem;
  top: 0.95rem;
  width: 0.45rem;
  height: 0.8rem;
  border: solid var(--sage-deep);
  border-width: 0 2px 2px 0;
  transform: rotate(40deg);
}

/* Gallery: a mosaic — the first photo large, the rest around it */
.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-auto-flow: dense;
  gap: 0.75rem;
}
@media (min-width: 860px) { .gallery { grid-template-columns: repeat(4, 1fr); gap: 1rem; } }
.gallery__item {
  position: relative;
  display: block;
  overflow: hidden;
  margin: 0;
  border-radius: var(--radius-m);
  background: var(--paper-deep);
}
.gallery__item--feature { grid-column: span 2; grid-row: span 2; }
.gallery__item figure { height: 100%; }
.gallery__item img {
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: opacity var(--slow) var(--ease), transform 0.9s var(--ease);
}
@media (hover: hover) { .gallery__item:hover img { transform: scale(1.04); } }
@media (max-width: 559px) {
  .gallery { gap: 0.5rem; }
  .gallery__item { border-radius: var(--radius-s); }
  .gallery__item figcaption { padding: 1.5rem 0.65rem 0.5rem; font-size: 0.8rem; }
}
.gallery__item figcaption {
  position: absolute;
  inset: auto 0 0;
  padding: 2rem 0.9rem 0.7rem;
  background: linear-gradient(transparent, rgb(40 34 26 / 0.55));
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
}

/* The full-screen photo viewer (opens from the gallery) */
.lightbox {
  width: 100vw;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgb(33 28 21 / 0.95);
  color: #fff;
}
.lightbox::backdrop { background: rgb(33 28 21 / 0.6); }
.lightbox[open] { display: grid; place-items: center; }
.lightbox figure { margin: 0; padding: 4rem 1rem 1.5rem; text-align: center; }
.lightbox img { max-width: min(100%, 72rem); max-height: 80dvh; margin-inline: auto; border-radius: var(--radius-s); }
.lightbox figcaption { margin-top: 0.85rem; color: rgb(255 255 255 / 0.8); font-size: 0.95rem; }
.lightbox button {
  position: absolute;
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border: 0;
  border-radius: 50%;
  background: rgb(255 255 255 / 0.1);
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  transition: background-color var(--fast);
}
.lightbox button:hover { background: rgb(255 255 255 / 0.22); }
.lightbox__close { top: 1rem; right: 1rem; }
.lightbox__prev { left: 1rem; top: 50%; translate: 0 -50%; }
.lightbox__next { right: 1rem; top: 50%; translate: 0 -50%; }
.lightbox__count { position: absolute; top: 1.6rem; left: 1.25rem; font-size: 0.875rem; color: rgb(255 255 255 / 0.7); }
/* Phones: the photo uses the whole width (swipe to move between photos) and
   the arrows sit below it, within reach of a thumb. */
@media (max-width: 719px) {
  .lightbox figure { padding: 3.5rem 0 5.5rem; }
  .lightbox img { max-height: 70dvh; border-radius: 0; }
  .lightbox figcaption { padding-inline: 1.25rem; }
  .lightbox__prev, .lightbox__next { top: auto; bottom: 1.25rem; translate: none; }
  .lightbox__prev { left: calc(50% - 3.5rem); }
  .lightbox__next { right: calc(50% - 3.5rem); }
}

/* Our story, in short */
.story { max-width: 44rem; margin-inline: auto; text-align: center; }
.story__opener {
  margin-top: var(--space-s);
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-style: italic;
  color: var(--brand-deep);
}
.story__text { margin-top: var(--space-m); color: var(--ink-soft); }
.story .btn { margin-top: var(--space-l); }

.quote {
  position: relative;
  max-width: 36rem;
  margin: var(--space-l) auto 0;
  padding-top: var(--space-l);
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 1.1rem + 0.8vw, 1.65rem);
  font-style: italic;
  line-height: 1.45;
  color: var(--ink);
}
.quote::before {              /* a large, faint opening quotation mark */
  content: "“";
  position: absolute;
  top: -0.6rem;
  left: 50%;
  translate: -50% 0;
  font-size: 4.5rem;
  line-height: 1;
  color: var(--brand-tint);
}

/* San Antonio */
.area { display: grid; gap: var(--space-l); }
@media (min-width: 900px) { .area { grid-template-columns: 0.9fr 1.1fr; gap: 5rem; } }
.area .section-head { margin-bottom: 0; }
.nearby { display: grid; margin: 0; padding: 0; list-style: none; }
@media (min-width: 640px) { .nearby { grid-template-columns: 1fr 1fr; column-gap: 2.5rem; } }
.nearby li { padding: 1.05rem 0; border-bottom: 1px solid var(--line); }
.nearby strong { display: block; font-family: var(--font-display); font-size: 1.15rem; font-weight: 500; }
.nearby span { font-size: 0.95rem; color: var(--ink-soft); }

/* Booking */
.cta {
  padding: clamp(2.75rem, 1.5rem + 4vw, 5rem) 1.5rem;
  background: linear-gradient(160deg, var(--paper-deep), var(--brand-tint));
  border-radius: var(--radius-l);
  text-align: center;
}
.cta p { max-width: 34rem; margin: var(--space-s) auto 0; color: var(--ink-soft); }
.cta .btn { margin-top: var(--space-l); }
.cta .cta__note { margin-top: var(--space-s); font-size: var(--text-small); color: var(--ink-faint); }

/* For guests already staying */
.guest-callout { background: var(--sky-tint); border-top: 1px solid rgb(126 154 178 / 0.25); }
.guest-callout__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-m) var(--space-xl);
  padding-block: var(--space-xl);
}
.guest-callout h2 { margin-top: var(--space-xs); font-size: 1.7rem; }
.guest-callout p { max-width: 34rem; margin-top: var(--space-xs); color: var(--ink-soft); }
@media (max-width: 559px) {
  .guest-callout__inner { padding-block: var(--space-l); }
  .guest-callout h2 { font-size: 1.5rem; }
  .guest-callout .btn, .cta .btn, .story .btn, .story-page__book .btn { width: 100%; }
  .cta { padding-inline: 1.25rem; }
}

/* Footer */
.site-footer {
  padding-block: var(--space-xl) var(--space-l);
  background: var(--paper-deep);
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 0.95rem;
}
.site-footer__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-l) var(--space-m); }
.site-footer__grid > :first-child { grid-column: 1 / -1; }
@media (min-width: 760px) {
  .site-footer__grid { grid-template-columns: 1.5fr 1fr 1fr; }
  .site-footer__grid > :first-child { grid-column: auto; }
}
.site-footer__tagline { margin-top: var(--space-s); }
.site-footer__links { margin: var(--space-xs) 0 0; padding: 0; list-style: none; }
.site-footer__links li + li { margin-top: 0.4rem; }
.site-footer__links a { display: inline-block; padding-block: 0.15rem; }
.site-footer__links a { color: var(--ink-soft); text-decoration: none; }
.site-footer__links a:hover { color: var(--brand-deep); text-decoration: underline; }
.site-footer__fine {
  margin-top: var(--space-xl);
  padding-top: var(--space-m);
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
  color: var(--ink-faint);
}

/* Our Story page */
.story-page { padding-block: var(--space-xl) var(--space-section); }
.story-page__head { max-width: 44rem; margin-inline: auto; text-align: center; }
.story-page__head h1 { margin-top: var(--space-s); font-size: clamp(2.3rem, 1.5rem + 3vw, 3.5rem); }
.story-page__photo { max-width: 60rem; margin: var(--space-xl) auto 0; }
.story-page__photo img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.prose { max-width: 38rem; margin: var(--space-xl) auto 0; color: var(--ink-soft); font-size: 1.1rem; line-height: 1.8; }
.prose .quote { margin-block: var(--space-xl); text-align: center; }
.signature { margin-top: var(--space-xl); text-align: center; }
.signature p:last-child {
  margin-top: 0.25rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-style: italic;
  color: var(--brand-deep);
}
.story-page__book { margin-top: var(--space-xl); text-align: center; }
@media (max-width: 559px) {
  .story-page { padding-top: var(--space-l); }
  .story-page__photo { margin-top: var(--space-l); }
  .prose { margin-top: var(--space-l); font-size: 1.075rem; line-height: 1.75; }
  .prose .quote { margin-block: var(--space-l); }
  .signature, .story-page__book { margin-top: var(--space-l); }
}

/* Guestbook page: a short welcome, the map of where guests came from, their notes */
.guestbook { padding-block: var(--space-xl) var(--space-section); }
.guestbook__head { max-width: 44rem; text-align: center; }
.guestbook__top { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: center; gap: 0.25rem 1rem; margin: 0; }
.guestbook__lang { padding-block: 0.4rem; color: var(--sky-deep); font-size: 0.875rem; font-weight: 600; text-decoration: none; }
.guestbook__lang:hover { text-decoration: underline; }
.guestbook__head h1 { margin-top: var(--space-xs); font-size: clamp(2.2rem, 1.5rem + 3vw, 3.4rem); }
.guestbook__subtitle { margin-top: var(--space-s); font-family: var(--font-display); font-size: clamp(1.15rem, 1rem + 0.6vw, 1.35rem); font-style: italic; color: var(--brand-deep); }
.guestbook__intro { max-width: 36rem; margin: var(--space-s) auto 0; color: var(--ink-soft); }

.guestbook__map { max-width: 64rem; margin-top: var(--space-l); }
.gmap-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1rem; margin-bottom: var(--space-xs); }
.gmap-head__count { margin: 0; color: var(--ink-faint); font-size: var(--text-small); }
.gmap-views { display: inline-flex; gap: 0.2rem; padding: 0.2rem; background: var(--paper-deep); border-radius: var(--radius-pill); }
.gmap-views button {
  min-height: 2.4rem;
  padding: 0 1rem;
  background: none;
  border: 0;
  border-radius: var(--radius-pill);
  color: var(--ink-soft);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
}
.gmap-views [aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-s); }
.gmap { padding: clamp(0.5rem, 0.2rem + 1.5vw, 1.5rem); background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius-l); }
.gmap__frame { position: relative; }
.gmap__frame img { display: block; width: 100%; height: 100%; }
.gmap__dots { position: absolute; inset: 0; }
.gmap__dot {           /* the button is a comfortable 2rem to tap; the dot inside is small */
  position: absolute;
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  margin: -1rem 0 0 -1rem;
  padding: 0;
  background: none;
  border: 0;
  cursor: pointer;
}
.gmap__dot::before {
  content: "";
  grid-area: 1 / 1;
  width: 0.8rem;
  height: 0.8rem;
  background: var(--brand-deep);
  border-radius: 50%;
  box-shadow: 0 0 0 2px var(--surface);
  transition: transform var(--fast) var(--ease), background-color var(--fast);
}
.gmap__dot--many::before { width: 1.6rem; height: 1.6rem; }
.gmap__dot span { grid-area: 1 / 1; position: relative; color: #fff; font-size: 0.72rem; font-weight: 700; line-height: 1; }
.gmap__dot:hover::before, .gmap__dot.is-active::before { background: var(--brand-darker); transform: scale(1.15); }
.gmap__dot:focus-visible { outline: none; }
.gmap__dot:focus-visible::before { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--sky-deep); }
.gmap-hint { margin: var(--space-xs) 0 0; color: var(--ink-faint); font-size: var(--text-small); text-align: center; }
.gmap-panel { position: relative; margin-top: var(--space-s); padding: var(--space-m) 1.35rem var(--space-xs); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); box-shadow: var(--shadow-s); }
.gmap-panel:focus { outline: none; }
.gmap-panel__close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  min-height: 2.25rem;
  padding: 0 0.85rem;
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  color: var(--ink-soft);
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
}
.gmap-panel__place { padding-right: 5rem; font-family: var(--font-body); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.16em; line-height: 1.5; text-transform: uppercase; color: var(--sky-deep); }
.gmap-panel__guests { margin: 0.5rem 0 var(--space-s); padding: 0; list-style: none; }
.gmap-panel__guests li { padding: 0.65rem 0; border-top: 1px solid var(--line-soft); }
.gmap-panel__guests li:first-child { padding-top: 0.15rem; border-top: 0; }
.gmap-panel__who { margin: 0; }
.gmap-panel__who span { color: var(--ink-faint); }
.gmap-panel__message { margin: 0.25rem 0 0; font-family: var(--font-display); font-size: 1.1rem; font-style: italic; line-height: 1.5; overflow-wrap: anywhere; }
.guestbook__empty { max-width: 32rem; margin: var(--space-m) auto 0; font-family: var(--font-display); font-size: 1.25rem; font-style: italic; line-height: 1.5; text-align: center; color: var(--brand-deep); }

.guestbook__notes { max-width: 44rem; margin-top: var(--space-xl); }
.guestbook__notes h2 { font-size: var(--text-h3); text-align: center; }
.notes { margin: var(--space-s) 0 0; padding: 0; list-style: none; }
.note { padding: var(--space-m) 0; border-top: 1px solid var(--line); text-align: center; }
.note:first-child { border-top: 0; }
.note__text { margin: 0; font-family: var(--font-display); font-size: clamp(1.15rem, 1rem + 0.5vw, 1.35rem); font-style: italic; line-height: 1.55; overflow-wrap: anywhere; }
.note__text::before { content: "“"; }
.note__text::after { content: "”"; }
.note__meta { margin: var(--space-xs) 0 0; color: var(--ink-faint); font-size: 0.875rem; }
.note__meta strong { color: var(--ink-soft); font-weight: 600; }
.notes.is-collapsed .note--more:not(.is-shown) { display: none; }
.notes__more { display: flex; margin: var(--space-xs) auto 0; }
.guestbook__foot { max-width: 44rem; margin-top: var(--space-xl); padding-top: var(--space-m); border-top: 1px solid var(--line); color: var(--ink-soft); text-align: center; }
.guestbook__foot a { font-weight: 600; }
.guestbook__credits { margin-top: var(--space-xs); color: var(--ink-faint); font-size: 0.8rem; }
.story__guestbook { margin-top: var(--space-s); font-size: var(--text-small); }
@media (max-width: 559px) {
  .guestbook { padding-top: var(--space-l); }
  .gmap { border-radius: var(--radius-m); }
  .gmap-head { justify-content: center; }
}

/* Page not found */
.not-found { padding-block: var(--space-section); text-align: center; }
.not-found p { max-width: 30rem; margin: var(--space-s) auto var(--space-l); color: var(--ink-soft); }


/* 7. Motion ----------------------------------------------------------------- */
/*
 * All of this is decoration. Without it — or for anyone whose device asks for
 * less motion — every element simply appears where it belongs.
 *
 *   data-enter="1…6"     arrives on page load, one after another (the hero)
 *   data-reveal          fades up as it scrolls into view
 *   data-reveal="photo"  a photo that opens out and settles into its frame
 *   data-reveal="zoom"   grows in slightly
 *   data-delay="1…4"     staggers items that arrive together
 *
 * Scroll reveals are switched on by the few lines of script at the bottom of
 * includes/site-footer.php.
 */

/* The header takes on a soft shadow once the page has scrolled. */
.site-header.is-scrolled {
  background: rgb(251 248 243 / 0.95);
  border-bottom-color: transparent;
  box-shadow: 0 12px 32px -24px rgb(68 60 47 / 0.5);
}

/* Header links underline from the left on hover. */
@media (min-width: 720px) {
  .site-nav a {
    padding-block: 0.15rem;
    background: linear-gradient(currentColor, currentColor) 0 100% / 0 1.5px no-repeat;
    transition: color var(--fast), background-size 0.4s var(--ease-out);
  }
  .site-nav a:hover { background-size: 100% 1.5px; }
}

/* Buttons with an arrow nudge it forward on hover. */
.btn--arrow::after { content: "→"; transition: transform 0.3s var(--ease-out); }
@media (hover: hover) { .btn--arrow:hover::after { transform: translateX(3px); } }

@media (prefers-reduced-motion: no-preference) {

  /* The hero arrives, line by line. */
  [data-enter] { animation: enter 1s var(--ease-out) both; }
  [data-enter="2"] { animation-delay: 0.08s; }
  [data-enter="3"] { animation-delay: 0.16s; }
  [data-enter="4"] { animation-delay: 0.26s; }
  [data-enter="5"] { animation-delay: 0.36s; }
  [data-enter="6"] { animation-delay: 0.48s; }

  /* Only opacity and transform move: phones hand those to the graphics chip,
     so scrolling stays smooth while things arrive. */
  @media (scripting: enabled) {
    [data-reveal] {
      opacity: 0;
      transform: translateY(var(--rise));
      transition: opacity 0.9s var(--ease-out), transform 1s var(--ease-out);
      /* Failsafe: if the script never runs, show everything after a moment. */
      animation: reveal-failsafe 0s 2.5s forwards;
    }
    .reveal-ready [data-reveal] { animation: none; }
    [data-reveal].is-visible { opacity: 1; transform: none; }

    [data-reveal="zoom"] { transform: scale(0.96); }

    /* Photos: the frame grows into place while the photo inside settles. */
    [data-reveal="photo"] { transform: translateY(var(--rise)) scale(0.95); transition-duration: 0.9s, 1.2s; }
    [data-reveal="photo"] img { transform: scale(1.12); transition: transform 1.6s var(--ease-out), opacity var(--slow) var(--ease); }
    [data-reveal="photo"].is-visible img { transform: none; }

    [data-delay="1"] { transition-delay: 0.09s; }
    [data-delay="2"] { transition-delay: 0.18s; }
    [data-delay="3"] { transition-delay: 0.27s; }
    [data-delay="4"] { transition-delay: 0.36s; }
  }

  /* Guest guide: the welcome, the essentials, then the sections, arrive in turn. */
  .guide-welcome > *, .unlock__card > * { animation: enter 0.8s var(--ease-out) both; }
  .guide-welcome > :nth-child(2), .unlock__card > :nth-child(2) { animation-delay: 0.06s; }
  .guide-welcome > :nth-child(3), .unlock__card > :nth-child(3) { animation-delay: 0.12s; }
  .unlock__card > :nth-child(4) { animation-delay: 0.18s; }
  .unlock__card > :nth-child(n+5) { animation-delay: 0.24s; }
  .wifi-card { animation: enter 0.8s 0.12s var(--ease-out) both; }
  .guide-actions { animation: enter 0.8s 0.18s var(--ease-out) both; }
  .guide-feature { animation: enter 0.8s 0.24s var(--ease-out) both; }
  .guide-tiles { animation: enter 0.8s 0.3s var(--ease-out) both; }

  /* The full-screen photo viewer fades in, and photos cross-fade as you move between them. */
  .lightbox[open] { animation: fade 0.3s var(--ease) both; }
  .lightbox[open] figure { animation: enter-zoom 0.5s var(--ease-out) both; }
  .lightbox img { transition: opacity 0.35s var(--ease); }
  .lightbox img.is-loading { opacity: 0; }
}

/* A slow drift on the big photo at the top of the homepage as you scroll past
   it — in browsers that can link animation to scrolling. */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .hero-photo img {
      animation: drift linear both;
      animation-timeline: view();
      animation-range: cover 0% cover 100%;
    }
  }
}

@keyframes enter { from { opacity: 0; transform: translateY(1.1rem); } }
@keyframes enter-soft { from { opacity: 0; transform: translateY(-0.3rem); } }
@keyframes enter-zoom { from { opacity: 0; transform: scale(0.96); } }
@keyframes fade { from { opacity: 0; } }
@keyframes reveal-failsafe { to { opacity: 1; transform: none; } }
@keyframes drift {
  from { transform: scale(1.12) translateY(-3.5%); }
  to { transform: scale(1.12) translateY(3.5%); }
}


/* 8. Guest guide ------------------------------------------------------------ */

/* The code screen */
.unlock {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 2.5rem 1.25rem;
  background: radial-gradient(circle at 50% 0%, var(--surface) 0%, var(--paper) 60%);
}
.unlock__card { width: 100%; max-width: 24rem; text-align: center; }
.unlock__logo { width: 9.5rem; margin: 0 auto var(--space-xs); }
.unlock h1 { font-size: 2rem; }
.unlock__card > p { margin-top: var(--space-xs); color: var(--ink-soft); }
.unlock form { margin-top: var(--space-l); text-align: left; }
.unlock .notice { margin: var(--space-m) 0 0; text-align: left; }
.code-input {
  padding: 0.85rem;
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: 0.35em;
  text-align: center;
}
.unlock form .btn { margin-top: 0.85rem; }
.unlock__help { margin-top: var(--space-m); font-size: var(--text-small); color: var(--ink-faint); }
.unlock__foot { margin-top: var(--space-xl); font-size: 0.85rem; }
.unlock__foot a { color: var(--ink-faint); }

/* The guide */
.admin-preview {
  padding: 0.5rem 1rem;
  background: var(--sky-tint);
  color: var(--sky-deep);
  font-size: var(--text-small);
  text-align: center;
}

.guide-bar { background: var(--paper); }
.guide-bar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 44rem;
  margin-inline: auto;
  padding: 0.85rem 1.25rem 0.35rem;
}
.guide-bar .wordmark__name { font-size: 1.35rem; }

/* The bar that stays at the top: search, and Emergency one tap away */
.guide-find {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 0.55rem 0 0.6rem;
  background: rgb(251 248 243 / 0.9);
  border-bottom: 1px solid transparent;
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  transition: border-color var(--fast), box-shadow var(--fast);
}
.guide-find__row, .guide-find__suggest, .guide-find__results { max-width: 44rem; margin-inline: auto; padding-inline: 1.25rem; }
.guide-find__row { display: flex; align-items: center; gap: 0.5rem; }
.guide-search { position: relative; flex: 1; min-width: 0; margin: 0; }
.guide-search > .icon { position: absolute; left: 0.95rem; top: 50%; translate: 0 -50%; width: 19px; height: 19px; color: var(--ink-faint); pointer-events: none; }
.guide-search input {
  min-height: 3rem;
  padding: 0.6rem 2.8rem 0.6rem 2.75rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-s);
  font-size: 1rem;
  -webkit-appearance: none;
  appearance: none;
}
.guide-search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.guide-search input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgb(128 112 80 / 0.18); }
.guide-search__clear {
  position: absolute;
  right: 0.35rem;
  top: 50%;
  translate: 0 -50%;
  display: grid;
  place-items: center;
  width: 2.3rem;
  height: 2.3rem;
  padding: 0;
  background: none;
  border: 0;
  border-radius: 50%;
  color: var(--ink-faint);
  cursor: pointer;
}
.guide-search__clear:hover { background: var(--surface-alt); color: var(--ink); }
.guide-sos {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 0.35rem;
  min-height: 3rem;
  padding: 0 0.95rem;
  background: var(--surface);
  border: 1px solid rgb(172 90 80 / 0.4);
  border-radius: var(--radius-pill);
  color: var(--alert-deep);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
}
.guide-sos .icon { width: 17px; height: 17px; }
.guide-sos:active { background: var(--alert-tint); }
.guide-find__suggest { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; margin-top: 0.55rem; }
.guide-find__suggest[hidden] { display: none; }
.guide-find__suggest span { color: var(--ink-faint); font-size: 0.85rem; }
.guide-find__suggest button {
  min-height: 2.2rem;
  padding: 0 0.85rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  color: var(--ink);
  font: inherit;
  font-size: 0.875rem;
  cursor: pointer;
}
.guide-find__suggest button:hover { border-color: var(--brand); }
.guide-find__results { margin: 0; color: var(--ink-faint); font-size: 0.85rem; }
.guide-find__results:not(:empty) { margin-top: 0.45rem; }

.guide { max-width: 44rem; margin-inline: auto; padding: 0 1rem 6rem; }   /* room at the bottom for "Top" */
.guide-welcome { padding: var(--space-m) 0 var(--space-s); text-align: center; }
.guide-welcome h1 { font-size: clamp(1.85rem, 1.6rem + 1.3vw, 2.4rem); }
.guide-welcome > p { margin-top: var(--space-2xs); color: var(--ink-soft); }
.stay-times { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; margin-top: var(--space-s); }
.stay-times span {
  padding: 0.35rem 0.95rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  font-size: var(--text-small);
}

/* The essentials: the Wi-Fi card and three quick links */
.wifi-card {
  margin-top: var(--space-s);
  padding: 1.1rem 1.25rem 0.5rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-s);
  scroll-margin-top: calc(var(--find-height, 4rem) + 0.75rem);
}
.wifi-card__title { display: flex; align-items: center; gap: 0.5rem; font-size: 1.3rem; }
.wifi-card__title .icon { width: 20px; height: 20px; color: var(--brand); }
.wifi-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-s);
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--line-soft);
}
.wifi-row:last-of-type { border-bottom: 0; }
.wifi-row .eyebrow { display: block; }
.wifi-value { font-family: var(--font-code); font-size: 1.25rem; font-weight: 700; word-break: break-all; }
.wifi-card__help { margin: 0 -0.25rem; border-top: 1px solid var(--line-soft); }
.wifi-card__help > summary { padding: 0.75rem 0.25rem; color: var(--sky-deep); font-size: 0.9rem; font-weight: 600; list-style: none; cursor: pointer; }
.wifi-card__help > summary::-webkit-details-marker { display: none; }
.wifi-card__help > summary::after { content: " +"; }
.wifi-card__help[open] > summary::after { content: " −"; }
.wifi-note { padding: 0 0.25rem 0.75rem; color: var(--ink-soft); font-size: 0.95rem; }

.guide-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(6.5rem, 1fr)); gap: 0.5rem; margin-top: 0.75rem; }
.guide-actions[hidden] { display: none; }
.guide-actions a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 4.25rem;
  padding: 0.6rem 0.5rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  transition: border-color var(--fast), transform var(--fast) var(--ease);
}
.guide-actions .icon { width: 20px; height: 20px; color: var(--brand); }
@media (hover: hover) { .guide-actions a:hover { border-color: var(--brand); } }
.guide-actions a:active { background: var(--surface-alt); transform: scale(0.97); }

/* Leave Your Mark: the guestbook, featured — with a little map of where guests came from */
.guide-feature {
  position: relative;
  margin-top: var(--space-m);
  overflow: hidden;
  background: var(--sky-tint);
  border: 1px solid rgb(126 154 178 / 0.35);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-s);
  scroll-margin-top: calc(var(--find-height, 4rem) + 0.75rem);
}
.guide-feature > summary {
  position: relative;
  display: block;
  min-height: 9.5rem;
  padding: 1.2rem 1.25rem 1.25rem;
  list-style: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.guide-feature > summary::-webkit-details-marker { display: none; }
.guide-feature > summary:focus-visible { outline: 3px solid var(--sky-deep); outline-offset: -3px; }
.guide-feature__map { position: absolute; right: -0.75rem; bottom: 0.4rem; width: 52%; max-width: 19rem; pointer-events: none; }
.guide-feature__map img { display: block; width: 100%; height: auto; opacity: 0.55; }
.guide-feature__map i { position: absolute; width: 0.45rem; height: 0.45rem; margin: -0.225rem 0 0 -0.225rem; background: var(--brand-deep); border-radius: 50%; box-shadow: 0 0 0 1.5px var(--sky-tint); }
.guide-feature__text { position: relative; display: grid; justify-items: start; gap: 0.3rem; max-width: 62%; }
@media (min-width: 560px) { .guide-feature__text { max-width: calc(100% - min(52%, 19rem)); } }
.guide-feature__text .eyebrow { color: var(--sky-deep); }
.guide-feature__text strong { font-family: var(--font-display); font-size: 1.55rem; font-weight: 500; line-height: 1.15; }
.guide-feature__text small { color: var(--ink-soft); font-size: 0.9rem; line-height: 1.45; }
.guide-feature__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.45rem;
  min-height: 2.6rem;
  padding: 0 1.05rem;
  background: var(--brand-deep);
  border-radius: var(--radius-pill);
  box-shadow: 0 8px 18px -12px rgb(92 79 55 / 0.9);
  color: #fff;
  font-size: 0.92rem;
  font-weight: 600;
  transition: background-color var(--fast), transform var(--fast) var(--ease);
}
.guide-feature__cta .icon { width: 16px; height: 16px; }
@media (hover: hover) { .guide-feature > summary:hover .guide-feature__cta { background: var(--brand-darker); } }
.guide-feature > summary:active .guide-feature__cta { transform: scale(0.97); }
.guide-feature > summary .guide-item__chevron { position: absolute; top: 1.2rem; right: 1.1rem; display: none; }
.guide-feature[open] > summary { min-height: 0; padding-bottom: 0.9rem; }
.guide-feature[open] .guide-feature__cta, .guide-feature[open] .guide-feature__map { display: none; }
.guide-feature[open] .guide-feature__text { max-width: none; padding-right: 2rem; }
.guide-feature[open] > summary .guide-item__chevron { display: block; transform: rotate(180deg); }
.guide-feature__body { padding: 1.1rem 1.25rem 1.4rem; background: var(--surface); border-top: 1px solid rgb(126 154 178 / 0.3); }
.guide-feature[open] .guide-feature__body { animation: guide-open 0.3s var(--ease-out); }
.guide-feature__body > p:first-of-type:not(.gb-form__lang-row) { margin-top: 0; }

/* The sections: tiles that open full-width, one at a time */
.guide-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-flow: row dense; gap: 0.6rem; margin-top: var(--space-m); }
@media (min-width: 640px) { .guide-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.guide.is-searching .guide-tiles { grid-template-columns: minmax(0, 1fr); margin-top: var(--space-s); }
.guide-item {
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  box-shadow: var(--shadow-s);
  scroll-margin-top: calc(var(--find-height, 4rem) + 0.75rem);
  transition: border-color var(--fast);
}
.guide-item[open] { grid-column: 1 / -1; }
.guide-item > summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "icon chevron" "name name";
  align-content: start;
  gap: 0.7rem 0.5rem;
  min-height: 7.6rem;
  padding: 0.95rem 0.95rem 1rem;
  border-radius: inherit;
  list-style: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background-color var(--fast), transform var(--fast) var(--ease);
}
.guide-item > summary::-webkit-details-marker { display: none; }
.guide-item:not([open]) > summary { height: 100%; }   /* closed tiles in a row are all the same height */
@media (hover: hover) { .guide-item:not([open]):hover { border-color: var(--brand); } }
.guide-item:not([open]) > summary:active { background: var(--surface-alt); transform: scale(0.97); }
.guide-item > summary:focus-visible { outline: 3px solid var(--sky-deep); outline-offset: -3px; }
.guide-item__icon { grid-area: icon; display: grid; place-items: center; width: 2.5rem; height: 2.5rem; background: var(--brand-tint); border-radius: 0.8rem; color: var(--brand-deep); }
.guide-item__icon .icon { width: 20px; height: 20px; }
.guide-item__name { grid-area: name; min-width: 0; }
.guide-item__name strong { display: block; font-family: var(--font-display); font-size: 1.12rem; font-weight: 500; line-height: 1.2; }
.guide-item__name small {
  display: -webkit-box;
  margin-top: 0.2rem;
  overflow: hidden;
  color: var(--ink-faint);
  font-size: 0.82rem;
  line-height: 1.4;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.guide-item__chevron { grid-area: chevron; color: var(--ink-faint); transition: transform 0.25s var(--ease); }
.guide-item:not([open]) .guide-item__chevron { opacity: 0.5; }
/* Opened (and in search results): a full-width card with the name beside the icon. */
.guide-item[open] > summary, .guide.is-searching .guide-item > summary {
  grid-template-columns: 2.5rem minmax(0, 1fr) 1.25rem;
  grid-template-areas: "icon name chevron";
  align-items: center;
  gap: 0.85rem;
  min-height: 0;
  padding: 0.85rem 1.1rem;
}
.guide-item[open] .guide-item__name small { display: none; }   /* the section itself is right below */
.guide-item[open] .guide-item__chevron { opacity: 1; transform: rotate(180deg); }
.guide-item__body { padding: 0.15rem 1.25rem 1.4rem; }
.guide-item[open] .guide-item__body { animation: guide-open 0.3s var(--ease-out); }
@keyframes guide-open { from { opacity: 0; transform: translateY(-0.35rem); } }
.guide-item__body > :first-child, .guide-feature__body > :first-child { margin-top: 0; }
.guide-item__body p + p, .guide-feature__body p + p { margin-top: var(--space-xs); }
.guide-item__body h3 {
  margin: var(--space-m) 0 var(--space-2xs);
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sky-deep);
}
.guide-item__body > h3:first-child { margin-top: 0.25rem; }
.guide-item__body ul:not(.checklist) { margin: var(--space-xs) 0 0; padding-left: 1.2rem; }
.guide-item__body ul:not(.checklist) li + li { margin-top: 0.5rem; }
.guide-item__body p + ul, .guide-item__body ul + p { margin-top: var(--space-s); }
.guide-item__body a[href^="tel:"] { white-space: nowrap; }
.guide-item--emergency { border-color: rgb(172 90 80 / 0.35); }
.guide-item--emergency .guide-item__icon { background: var(--alert-tint); color: var(--alert-deep); }
.guide-item--emergency .guide-item__name strong { color: var(--alert-deep); }
.guide-mark { padding: 0 0.1em; background: #f6e3b4; border-radius: 0.2em; color: inherit; }
.guide-none { margin-top: var(--space-s); padding: var(--space-m) 1.25rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); text-align: center; }
.guide-none p + p { margin-top: var(--space-2xs); color: var(--ink-soft); }
.guide-none__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; margin-top: var(--space-s) !important; }

/* "Top": a button floating in the corner, there when you've scrolled down. */
.to-top {
  position: fixed;
  right: max(1rem, env(safe-area-inset-right));
  bottom: max(1rem, env(safe-area-inset-bottom));
  z-index: 40;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 2.9rem;
  padding: 0 1.15rem 0 0.9rem;
  background: var(--brand-deep);
  border-radius: var(--radius-pill);
  box-shadow: 0 10px 28px -12px rgb(68 60 47 / 0.7);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.25s var(--ease), transform 0.4s var(--ease-out), visibility 0s;
}
.to-top .icon { width: 18px; height: 18px; }
.to-top:active { transform: scale(0.95); }
@media (scripting: enabled) {
  .to-top:not(.is-shown) {
    opacity: 0;
    visibility: hidden;
    transform: translateY(1rem) scale(0.9);
    transition: opacity 0.2s var(--ease), transform 0.3s var(--ease), visibility 0s 0.3s;
  }
}
.address-box {
  margin: var(--space-2xs) 0 var(--space-s);
  padding: 0.85rem 1rem;
  background: var(--surface-alt);
  border-radius: var(--radius-m);
  font-weight: 600;
}
.btn--911 { width: 100%; min-height: 3.5rem; margin-bottom: var(--space-s); background: var(--alert-deep); color: #fff; font-size: 1.15rem; }
.btn--911:hover { background: #7a372f; }
.contact-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr)); gap: 0.6rem; margin-top: var(--space-s); }

/* Phones: a little more width for the words, a little less padding around them. */
@media (max-width: 559px) {
  .guide-find { background: rgb(251 248 243 / 0.97); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .guide-bar__inner, .guide-find__row, .guide-find__suggest, .guide-find__results { padding-inline: 0.75rem; }
  .guide { padding-inline: 0.75rem; }
  .guide-sos { padding: 0 0.8rem; }
  .guide-welcome { padding: var(--space-s) 0.5rem; }
  .wifi-card { padding: 1rem 1.1rem 0.4rem; border-radius: var(--radius-m); }
  .wifi-value { font-size: 1.1rem; }
  .guide-none, .guide-feature { border-radius: var(--radius-m); }
  .guide-tiles { gap: 0.5rem; }
  .guide-item > summary { min-height: 7.3rem; padding: 0.85rem 0.85rem 0.9rem; }
  .guide-item[open] > summary, .guide.is-searching .guide-item > summary { gap: 0.75rem; padding: 0.8rem 0.95rem; }
  .guide-item__body { padding: 0.15rem 1rem 1.25rem; }
  .guide-feature > summary { padding: 1.1rem 1.1rem 1.15rem; }
  .guide-feature__text strong { font-size: 1.4rem; }
  .guide-feature__body { padding: 1rem 1.1rem 1.25rem; }
}
@media (max-width: 359px) { .guide-sos span { display: none; } .guide-sos .icon { width: 20px; height: 20px; } }
.guide-foot { margin-top: var(--space-l); font-size: var(--text-small); color: var(--ink-faint); text-align: center; }

/* Leave Your Mark: the guestbook form inside the guide */
.gb-form__lang-row { margin: 0 0 var(--space-2xs); text-align: right; }
.gb-form__lang { display: inline-block; padding-block: 0.3rem; color: var(--sky-deep); font-size: 0.875rem; font-weight: 600; }
#leave-your-mark .notice { margin: var(--space-s) 0 0; }
.gb-fields { margin-top: var(--space-m); }
.gb-fields fieldset { margin: 0; padding: 0; border: 0; }
.gb-fields legend { margin-bottom: var(--space-2xs); font-family: var(--font-display); font-size: 1.2rem; }
.gb-fields label { margin-top: 1rem; }
.gb-fields textarea { min-height: 6.5rem; resize: vertical; }
.gb-hint { margin: 0.3rem 0 0; color: var(--ink-faint); font-size: 0.85rem; }
.gb-pair { display: grid; gap: 0 0.75rem; }
@media (min-width: 520px) { .gb-pair { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.gb-city { position: relative; }
.guide-feature .gb-suggestions {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 10;
  margin: 0.25rem 0 0;
  padding: 0.3rem;
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  box-shadow: var(--shadow-m);
}
.guide-feature .gb-suggestions li { margin: 0; padding: 0.7rem 0.75rem; border-radius: 0.45rem; cursor: pointer; }
.gb-suggestions [aria-selected="true"], .gb-suggestions li:hover { background: var(--surface-alt); }
.gb-stay { margin: var(--space-m) 0 0; padding: 0.65rem 0.9rem; background: var(--surface-alt); border-radius: var(--radius-s); }
.gb-fields .gb-consent { display: flex; align-items: flex-start; gap: 0.65rem; margin-top: var(--space-m); font-size: 0.95rem; font-weight: 400; line-height: 1.5; cursor: pointer; }
.gb-consent input { flex: none; width: 1.25rem; height: 1.25rem; margin: 0.15rem 0 0; accent-color: var(--brand-deep); }
.gb-fields .btn { margin-top: var(--space-m); }
.gb-fields .btn:disabled { opacity: 0.5; cursor: not-allowed; }
.gb-trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.gb-thanks { padding-top: var(--space-xs); text-align: center; }
.guide-feature .gb-thanks h3 { margin: 0 0 var(--space-xs); font-family: var(--font-display); font-size: 1.6rem; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--brand-deep); }
.gb-thanks__note { margin-top: var(--space-xs); color: var(--ink-faint); font-size: 0.95rem; }
.gb-thanks__links { margin-top: var(--space-s); font-weight: 600; line-height: 1.9; }


/* 9. Admin ------------------------------------------------------------------ */
/* A calm, compact working surface: slightly smaller type and tighter spacing
   than the public site, so more fits on the screen without feeling crowded. */

.admin-body { background: #f6f1e9; font-size: 0.9375rem; line-height: 1.55; }
.admin-body .btn { min-height: 2.5rem; padding: 0 1.05rem; gap: 0.45rem; font-size: 0.925rem; }
.admin-body .btn:hover { transform: none; }
.admin-body .btn--small { min-height: 2.1rem; padding: 0 0.8rem; font-size: 0.875rem; }
.admin-body .btn .icon { width: 17px; height: 17px; }

.btn--ghost { background: transparent; color: var(--ink-soft); }
.btn--ghost:hover { background: rgb(68 60 47 / 0.06); color: var(--ink); }
.btn--dashed {
  width: 100%;
  margin-top: 0.6rem;
  background: transparent;
  border: 1px dashed #d8ccb6;
  color: var(--ink-soft);
}
.btn--dashed:hover { background: var(--surface); border-color: var(--brand); color: var(--ink); }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 2.1rem;
  height: 2.1rem;
  padding: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0.55rem;
  color: var(--ink-soft);
  cursor: pointer;
  transition: background-color var(--fast), color var(--fast), border-color var(--fast);
}
.icon-btn:hover { background: var(--surface-alt); border-color: #d8ccb6; color: var(--ink); }
.icon-btn--danger:hover { background: var(--alert-tint); border-color: rgb(172 90 80 / 0.35); color: var(--alert-deep); }
.icon-btn .icon { width: 16px; height: 16px; }

/* Layout: sidebar and main area */
.admin { min-height: 100vh; }
@media (min-width: 960px) { .admin { display: grid; grid-template-columns: 15rem minmax(0, 1fr); } }

/* The sidebar runs down the side on bigger screens. On phones the name and the
   small links sit across the top, and the menu becomes a tab bar along the
   bottom of the screen, within reach of a thumb. */
.admin-sidebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.5rem 0.6rem 0.5rem 1rem;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
@media (min-width: 960px) {
  .admin-sidebar {
    position: sticky;
    top: 0;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    height: 100vh;
    padding: 1.1rem 0.8rem;
    border-bottom: 0;
    border-right: 1px solid var(--line);
  }
}
.admin-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.25rem 0.4rem;
  color: var(--brand-deep);
  font-family: var(--font-display);
  font-size: 1.2rem;
  line-height: 1.1;
  text-decoration: none;
}
.admin-brand img { width: 2rem; height: 2rem; border-radius: 0.5rem; }
.admin-brand small {
  display: block;
  font-family: var(--font-body);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--sky-deep);
}
.admin-nav { display: flex; flex-direction: column; gap: 0.2rem; margin-top: 1.5rem; }
.admin-nav__link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  padding: 0.5rem 0.65rem;
  background: none;
  border: 0;
  border-radius: 0.6rem;
  color: var(--ink-soft);
  font: inherit;
  font-weight: 600;
  text-align: left;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color var(--fast), color var(--fast);
}
.admin-nav__link .icon { flex: none; color: var(--ink-faint); transition: color var(--fast); }
.admin-nav__link:hover { background: var(--surface-alt); color: var(--ink); }
.admin-nav__link.is-active { background: var(--brand-tint); color: var(--ink); }
.admin-nav__link.is-active .icon { color: var(--brand-deep); }
.admin-nav__badge {
  min-width: 1.35rem;
  margin-left: auto;
  padding: 0 0.4rem;
  background: var(--sage-tint);
  border-radius: var(--radius-pill);
  color: var(--sage-deep);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.35rem;
  text-align: center;
}
.admin-nav__short { display: none; }
.admin-sidebar__settings, .admin-sidebar__photos { display: none !important; }
@media (max-width: 959px) {
  .admin-sidebar__settings, .admin-sidebar__photos { display: flex !important; }
  .admin-nav .admin-nav__link--settings, .admin-nav .admin-nav__link--photos { display: none; }
}
.admin-nav__badge--waiting { background: #fbf0dc; color: #8a5a14; }

.admin-sidebar__foot { display: flex; align-items: center; gap: 0.1rem; }
.admin-sidebar__foot form { margin: 0; }

@media (max-width: 959px) {
  .admin-sidebar__foot .admin-nav__label { display: none; }
  .admin-sidebar__foot .admin-nav__link { padding: 0.6rem; }

  .admin-nav {
    position: fixed;
    inset: auto 0 0;
    z-index: 60;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0;
    margin: 0;
    padding: 0.3rem 0.25rem calc(0.3rem + env(safe-area-inset-bottom));
    background: rgb(255 253 249 / 0.97);
    border-top: 1px solid var(--line);
    box-shadow: 0 -12px 30px -24px rgb(68 60 47 / 0.5);
  }
  .admin-nav .admin-nav__link {
    position: relative;
    flex-direction: column;
    justify-content: center;
    gap: 0.15rem;
    min-height: 3.3rem;
    padding: 0.25rem 0;
    background: none;
    font-size: 0.7rem;
    text-align: center;
  }
  .admin-nav .admin-nav__label { display: none; }
  .admin-nav .admin-nav__short { display: block; }
  .admin-nav .icon {           /* the icon sits in a soft pill when its page is open */
    box-sizing: content-box;
    padding: 0.2rem 0.9rem;
    border-radius: var(--radius-pill);
    transition: background-color var(--fast), color var(--fast);
  }
  .admin-nav .is-active { color: var(--ink); }
  .admin-nav .is-active .icon { background: var(--brand-tint); }
  .admin-nav .admin-nav__badge {
    position: absolute;
    top: 0.1rem;
    left: calc(50% + 0.45rem);
    min-width: 1.15rem;
    margin: 0;
    padding: 0 0.3rem;
    font-size: 0.62rem;
    line-height: 1.15rem;
  }
  .admin-main { padding-bottom: calc(4rem + env(safe-area-inset-bottom)); }
}
@media (min-width: 960px) {
  .admin-sidebar__foot { flex-direction: column; align-items: stretch; margin-top: auto; padding-top: 0.75rem; border-top: 1px solid var(--line); }
}

/* The bar across the top: title on the left, the page's buttons on the right. It stays in view. */
.admin-main { min-width: 0; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding: 1rem 1.25rem;
  background: rgb(246 241 233 / 0.88);
  border-bottom: 1px solid var(--line-soft);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
@media (min-width: 960px) { .topbar { padding: 1.2rem 2.25rem; } }
.topbar h1 { font-size: 1.55rem; }
.topbar__intro { max-width: 44rem; margin-top: 0.15rem; font-size: 0.9rem; color: var(--ink-faint); }
.topbar__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; }
/* On phones the bar stays compact, so it doesn't take over the screen. */
@media (max-width: 719px) {
  .topbar {
    gap: 0.5rem 0.75rem;
    padding: 0.65rem 1rem;
    background: rgb(246 241 233 / 0.97);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;           /* cheaper to scroll on phones */
  }
  .topbar h1 { font-size: 1.3rem; }
  .topbar__intro { display: none; }
  .topbar__actions { gap: 0.3rem; }
  .topbar__actions:has(.save-state) { width: 100%; }   /* editors: "saved" on the left, buttons on the right */
  .topbar .save-state { margin-right: auto; }
  .topbar .btn--ghost { padding: 0 0.6rem; }
  .topbar .btn--ghost span { display: none; }
}

/* "All changes saved" / "Unsaved changes" next to the Save button */
.save-state { display: inline-flex; align-items: center; gap: 0.45rem; margin-right: 0.4rem; font-size: 0.85rem; color: var(--ink-faint); }
.save-state::before { content: ""; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--sage); transition: background-color var(--fast), box-shadow var(--fast); }
.is-dirty .save-state { color: var(--alert-deep); font-weight: 600; }
.is-dirty .save-state::before { background: var(--alert); box-shadow: 0 0 0 4px rgb(172 90 80 / 0.15); }
.is-dirty .btn--save { box-shadow: 0 0 0 4px rgb(111 96 68 / 0.22); }

.admin-content { max-width: 74rem; padding: 1.25rem 1.25rem 4rem; animation: fade 0.35s var(--ease) both; }
@media (max-width: 719px) { .admin-content { padding: 1rem 1rem 2.5rem; } }
@media (min-width: 960px) { .admin-content { padding: 1.75rem 2.25rem 5rem; } }

/* Fields, admin-sized. Text boxes grow with what's typed in them. */
.admin-body label { margin-bottom: 0.3rem; font-size: 0.85rem; }
.admin-body input, .admin-body select, .admin-body textarea { padding: 0.55rem 0.75rem; border-radius: 0.55rem; font-size: 0.95rem; }
.admin-body textarea { min-height: 4.5rem; max-height: 30rem; field-sizing: content; }
.admin-body .field { margin-bottom: 0.9rem; }
/* Phones: 16px text in boxes (smaller makes iPhones zoom in when you tap one),
   and bigger buttons for fingers. */
@media (max-width: 719px) {
  .admin-body input, .admin-body select, .admin-body textarea { padding: 0.65rem 0.8rem; font-size: 1rem; }
  .admin-body .field { margin-bottom: 1rem; }
}
@media (pointer: coarse) {
  .icon-btn, .item__tools .icon-btn { width: 2.5rem; height: 2.5rem; }
  .admin-body .btn--small { min-height: 2.5rem; }
}
.admin-body .hint { margin: 0.3rem 0 0; font-size: 0.8rem; }
.admin-body .hint--lead { margin: 0 0 1rem; font-size: 0.875rem; }

.grid { display: grid; gap: 0 1rem; }
@media (min-width: 720px) {
  .grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.grid--tight { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 0.75rem; }
.grid--cards { gap: 1rem; align-items: start; }

/* A photo on the left, its fields on the right */
.split-fields { display: grid; gap: 0 1.1rem; }
@media (min-width: 720px) { .split-fields { grid-template-columns: 13rem minmax(0, 1fr); } }

.group + .group { margin-top: 0.5rem; padding-top: 1rem; border-top: 1px dashed var(--line); }
.group__title { margin: 0 0 0.75rem; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--sky-deep); }
.group__title .muted { font-weight: 400; letter-spacing: 0; text-transform: none; }

/* Sections that open and close ("folds") */
.fold {
  margin-bottom: 0.6rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  transition: border-color var(--fast), box-shadow var(--fast);
}
.fold[open] { border-color: #dcd0bb; box-shadow: var(--shadow-s); }
.fold__head {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.8rem;
  padding: 0.9rem 1.1rem;
  border-radius: inherit;
  list-style: none;
  cursor: pointer;
  transition: background-color var(--fast);
}
.fold__head::-webkit-details-marker { display: none; }
.fold__head:hover { background: var(--paper); }
.fold[open] > .fold__head { border-bottom: 1px solid var(--line-soft); border-radius: var(--radius-m) var(--radius-m) 0 0; }
.fold__dot { width: 0.55rem; height: 0.55rem; border-radius: 50%; background: #d8cfbf; }
.fold__dot.is-filled { background: var(--sage); }
.fold__title { font-weight: 700; color: var(--ink); white-space: nowrap; }
.fold__summary { overflow: hidden; font-size: 0.875rem; color: var(--ink-faint); text-overflow: ellipsis; white-space: nowrap; }
.fold__chevron { color: var(--ink-faint); transition: transform 0.25s var(--ease); }
.fold[open] .fold__chevron { transform: rotate(180deg); }
.fold__body { padding: 1.1rem 1.1rem 0.3rem; animation: enter-soft 0.3s var(--ease-out) both; }
@media (max-width: 640px) {
  .fold { margin-bottom: 0.5rem; }
  .fold__head { grid-template-columns: auto minmax(0, 1fr) auto; gap: 0.15rem 0.7rem; padding: 0.85rem 0.95rem; }
  .fold__summary { grid-column: 2; grid-row: 2; font-size: 0.825rem; }
  .fold__chevron { grid-column: 3; grid-row: 1 / span 2; }
  .fold__body { padding: 1rem 0.9rem 0.2rem; }
}

/* Lists: highlights, gallery photos, places, questions */
.repeater { margin-bottom: 0.9rem; }
.repeater__items { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.6rem; }
.repeater--grid .repeater__items { grid-template-columns: repeat(auto-fill, minmax(13.5rem, 1fr)); }
.item { min-width: 0; background: var(--paper); border: 1px solid var(--line); border-radius: 0.75rem; animation: enter-soft 0.3s var(--ease-out) both; }
.item--blank { border-style: dashed; }
.item__bar { display: flex; align-items: center; gap: 0.6rem; padding: 0.4rem 0.45rem 0.4rem 0.7rem; border-bottom: 1px solid var(--line-soft); }
.item__number {
  display: grid;
  place-items: center;
  flex: none;
  width: 1.45rem;
  height: 1.45rem;
  background: var(--brand-tint);
  border-radius: 50%;
  color: var(--brand-deep);
  font-size: 0.72rem;
  font-weight: 700;
}
.item__number:empty { display: none; }
.item__title { flex: 1; min-width: 0; overflow: hidden; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.item__tools { display: flex; gap: 0.25rem; }
.item__tools .icon-btn { width: 1.85rem; height: 1.85rem; }
.item:first-child [data-move="up"], .item:last-child [data-move="down"] { opacity: 0.35; pointer-events: none; }
.item__body { padding: 0.85rem 0.85rem 0; }
@media (max-width: 640px) { .item__body { padding: 0.8rem 0.75rem 0; } }

/* Photo pickers: the chosen photo, beside or above its drop-down */
.picker { display: flex; align-items: center; gap: 0.6rem; }
.picker__preview { flex: none; width: 4.5rem; aspect-ratio: 4 / 3; object-fit: cover; background: var(--paper-deep); border: 1px solid var(--line); border-radius: 0.45rem; }
.picker select { min-width: 0; }
.picker--large { flex-direction: column; align-items: stretch; }
.picker--large .picker__preview { width: 100%; border-radius: 0.6rem; }

/* "42 / 60" beside a label, and how the homepage looks in Google (Public Website → Search engines) */
.count { float: right; font-weight: 400; color: var(--ink-faint); font-variant-numeric: tabular-nums; }
.count.is-over { color: var(--alert-deep); font-weight: 700; }
.serp {
  max-width: 38rem;
  margin-bottom: 1.1rem;
  padding: 0.9rem 1rem 1rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  font-family: Arial, Helvetica, sans-serif;
}
.serp__site { display: flex; align-items: center; gap: 0.65rem; }
.serp__site img { width: 1.75rem; height: 1.75rem; padding: 0.15rem; border: 1px solid #ecedef; border-radius: 50%; }
.serp__site strong { display: block; color: #202124; font-size: 0.875rem; font-weight: 400; line-height: 1.3; }
.serp__site small { display: block; color: #4d5156; font-size: 0.75rem; line-height: 1.3; }
.serp .serp__title { margin-top: 0.45rem; color: #1a0dab; font-size: 1.25rem; line-height: 1.3; }
.serp .serp__text { margin-top: 0.2rem; color: #4d5156; font-size: 0.875rem; line-height: 1.55; }

/* Formatting help (guest guide page) */
.help-row { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 0.6rem 1rem; margin-bottom: 1rem; }
.help { background: var(--sky-tint); border-radius: 0.75rem; color: var(--sky-deep); font-size: 0.875rem; }
.help summary { display: flex; align-items: center; gap: 0.45rem; padding: 0.55rem 0.85rem; font-weight: 600; list-style: none; cursor: pointer; }
.help summary::-webkit-details-marker { display: none; }
.help table { margin: 0 0.85rem 0.75rem; border-collapse: collapse; }
.help td { padding: 0.25rem 0.9rem 0.25rem 0; vertical-align: top; }
.help code { font-family: var(--font-code); font-weight: 700; }
.help-row__note { display: flex; align-items: center; gap: 0.45rem; padding: 0.55rem 0; font-size: 0.85rem; color: var(--ink-faint); }

/* Cards */
.box { margin-bottom: 1rem; padding: clamp(1rem, 0.8rem + 0.6vw, 1.25rem); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); }
.box__head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 0.85rem; }
.box__head .box__title { margin-bottom: 0; }
.box__title { display: flex; align-items: center; gap: 0.5rem; margin: 0 0 0.85rem; font-family: var(--font-body); font-size: 1rem; font-weight: 700; }
.box__title .icon { color: var(--brand); }
.box__link { font-size: 0.875rem; font-weight: 600; text-decoration: none; }

.empty { display: grid; justify-items: center; gap: 0.15rem; padding: 2rem 1rem; color: var(--ink-soft); text-align: center; }
.empty .icon { width: 1.8rem; height: 1.8rem; margin-bottom: 0.4rem; color: var(--brand); }

.pill { display: inline-block; padding: 0.2rem 0.6rem; border-radius: var(--radius-pill); font-size: 0.75rem; font-weight: 700; white-space: nowrap; }
.pill--now { background: var(--sage-tint); color: var(--sage-deep); }
.pill--soon { background: var(--sky-tint); color: var(--sky-deep); }
.pill--ok { background: var(--sage-tint); color: var(--sage-deep); }
.pill--review { background: #fbf0dc; color: #8a5a14; }

/* Tabs that filter a list — which one is picked decides what shows (see "Filtering" below). */
.segmented { position: relative; display: inline-flex; flex-wrap: wrap; gap: 0.2rem; padding: 0.25rem; background: #ece4d6; border-radius: var(--radius-pill); }
.segmented input { position: absolute; top: 0; left: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.segmented label {
  margin: 0;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-pill);
  color: var(--ink-soft);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color var(--fast), color var(--fast), box-shadow var(--fast);
}
.segmented label span { margin-left: 0.2rem; font-weight: 400; color: var(--ink-faint); }
.segmented input:checked + label { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-s); }
.segmented input:focus-visible + label { outline: 3px solid var(--sky-deep); outline-offset: 2px; }

/* Filtering: CSS alone, no reload */
.codes:has(#show-active:checked) .code-row:not(.code-row--active),
.codes:has(#show-disabled:checked) .code-row:not(.code-row--disabled),
.codes:has(#show-expired:checked) .code-row:not(.code-row--expired),
.photos:has(#show-used:checked) .photo-card:not(.is-used),
.photos:has(#show-unused:checked) .photo-card.is-used { display: none; }

/* Dashboard */
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; margin-bottom: 1rem; }
@media (min-width: 900px) { .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.stat { display: flex; align-items: center; gap: 0.85rem; padding: 1rem 1.1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); }
.stat__icon { display: grid; place-items: center; flex: none; width: 2.6rem; height: 2.6rem; background: var(--brand-tint); border-radius: 0.75rem; color: var(--brand-deep); }
.stat strong { display: block; font-family: var(--font-display); font-size: 1.6rem; font-weight: 500; line-height: 1.1; }
.stat div > span { font-size: 0.825rem; color: var(--ink-faint); }
@media (max-width: 559px) {
  .stats { gap: 0.5rem; }
  .stat { gap: 0.7rem; padding: 0.75rem 0.85rem; }
  .stat__icon { width: 2.2rem; height: 2.2rem; border-radius: 0.6rem; }
  .stat strong { font-size: 1.4rem; }
}

.dash { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 1rem; align-items: start; }
@media (min-width: 1100px) { .dash { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); } }

.stay-list { margin: 0; padding: 0; list-style: none; }
.stay-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.4rem 0.75rem;
  padding: 0.75rem 0;
  border-top: 1px solid var(--line-soft);
}
.stay-list li:first-child { padding-top: 0; border-top: 0; }
.stay-list strong { display: block; }
.stay-list .code-chip { justify-self: start; }
@media (min-width: 640px) { .stay-list li { grid-template-columns: minmax(0, 1fr) auto auto; } }

.todo { margin: 0; padding: 0; list-style: none; }
.todo a {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin: 0 -0.6rem;
  padding: 0.7rem 0.6rem;
  border-radius: 0.6rem;
  color: var(--ink);
  text-decoration: none;
  transition: background-color var(--fast);
}
.todo a:hover { background: var(--paper); }
.todo strong { display: block; font-weight: 600; }
.todo small { color: var(--ink-faint); }
.todo__check { flex: none; width: 1.1rem; height: 1.1rem; border: 2px solid #d8ccb6; border-radius: 50%; }
.todo__arrow { margin-left: auto; color: var(--ink-faint); transform: rotate(-90deg); }

.actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; }
.action {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0.85rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: border-color var(--fast), background-color var(--fast), transform var(--fast) var(--ease);
}
.action .icon { color: var(--brand); }
.action:hover { background: var(--surface); border-color: #d8ccb6; transform: translateY(-1px); }

.qr { display: flex; align-items: center; gap: 1rem; }
.qr img { flex: none; width: 6.5rem; border: 1px solid var(--line); border-radius: 0.5rem; }
.qr .box__title { margin-bottom: 0.2rem; }
.qr .code-chip { margin-top: 0.6rem; }
.qr > div { min-width: 0; }

/* Guest codes */
.code-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.3rem 0.6rem;
  background: var(--paper);
  border: 1px dashed #d8ccb6;
  border-radius: 0.55rem;
  color: var(--ink);
  font-family: var(--font-code);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: border-color var(--fast), background-color var(--fast);
}
.code-chip .icon { width: 15px; height: 15px; color: var(--ink-faint); }
.code-chip:hover { background: var(--surface); border-color: var(--brand); }
.code-chip.is-copied { background: var(--sage-tint); border-color: var(--sage); border-style: solid; }
.code-chip--large { margin: 0.35rem 0; padding: 0.35rem 0.8rem; font-size: 2rem; }
.code-chip--link { max-width: 100%; font-family: var(--font-body); font-size: 0.85rem; letter-spacing: 0; overflow-wrap: anywhere; text-align: left; }

.new-code {
  display: grid;
  gap: 1rem 1.5rem;
  margin-bottom: 1rem;
  padding: 1.25rem;
  background: var(--sage-tint);
  border: 1px solid rgb(166 181 152 / 0.8);
  border-radius: var(--radius-m);
  animation: enter 0.5s var(--ease-out) both;
}
@media (min-width: 800px) { .new-code { grid-template-columns: auto minmax(0, 1fr); } }
.new-code textarea { background: var(--surface); font-size: 0.9rem; }
.new-code .btn { margin-top: 0.5rem; }

.split { display: grid; gap: 1rem; align-items: start; }
@media (min-width: 1100px) {
  .split { grid-template-columns: 20rem minmax(0, 1fr); }
  .split__side { position: sticky; top: 6.5rem; }
}

.codes__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.6rem; margin-bottom: 0.75rem; }
.codes__list { display: grid; gap: 0.5rem; }
.code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.6rem 1rem;
  padding: 0.9rem 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  transition: box-shadow var(--fast);
}
.code-row:hover { box-shadow: var(--shadow-s); }
@media (min-width: 720px) { .code-row { grid-template-columns: minmax(0, 1fr) auto auto; } }
.code-row--disabled, .code-row--expired { background: var(--paper); }
.code-row--expired .code-chip { opacity: 0.6; }
.code-row h3 { font-family: var(--font-body); font-size: 1rem; font-weight: 700; }
.code-row__meta { display: flex; flex-wrap: wrap; gap: 0.2rem 1rem; margin-top: 0.3rem; font-size: 0.825rem; color: var(--ink-faint); }
.code-row__meta > span { display: inline-flex; align-items: center; gap: 0.35rem; }
.code-row__meta .icon { flex: none; width: 14px; height: 14px; }
.code-row__note { margin-top: 0.35rem; font-size: 0.85rem; font-style: italic; color: var(--ink-soft); }
.code-row__actions { display: flex; gap: 0.3rem; }
/* Phones: name and details across the top, then the code and its buttons. */
@media (max-width: 719px) {
  .code-row { grid-template-columns: auto minmax(0, 1fr); gap: 0.75rem; padding: 0.95rem 1rem; }
  .code-row__main { grid-column: 1 / -1; }
  .code-row__actions { justify-self: end; }
}
.code-row__actions form { margin: 0; }

/* Photos */
.upload { margin-bottom: 1.25rem; }
.dropzone {
  display: grid;
  place-items: center;
  min-height: 9rem;
  margin: 0;
  padding: 1.5rem 1rem;
  background: var(--surface);
  border: 2px dashed #d8ccb6;
  border-radius: var(--radius-m);
  text-align: center;
  cursor: pointer;
  transition: border-color var(--fast), background-color var(--fast);
}
.dropzone:hover, .dropzone.is-over, .dropzone:focus-within { background: var(--paper); border-color: var(--brand); }
.dropzone__idle, .dropzone__busy { display: grid; justify-items: center; gap: 0.25rem; font-weight: 400; }
.dropzone__icon { width: 1.9rem; height: 1.9rem; margin-bottom: 0.3rem; color: var(--brand); }
.dropzone small { color: var(--ink-faint); }
.dropzone__busy { display: none; }
.is-uploading .dropzone__idle { display: none; }
.is-uploading .dropzone__busy { display: grid; }
.spinner { width: 1.6rem; height: 1.6rem; border: 3px solid var(--brand-tint); border-top-color: var(--brand-deep); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(1turn); } }

.photos__head { margin-bottom: 0.75rem; }
.photos__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: 0.75rem; }
@media (max-width: 559px) { .photos__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem; } }
.photo-card { overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); transition: box-shadow var(--fast); }
.photo-card:hover { box-shadow: var(--shadow-s); }
.photo-card__image { position: relative; }
.photo-card__image img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.photo-card__image .pill { position: absolute; top: 0.5rem; left: 0.5rem; }
.photo-card__body { padding: 0.7rem 0.8rem 0.8rem; }
.photo-card__name { overflow: hidden; font-size: 0.9rem; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.photo-card__meta, .photo-card__use { font-size: 0.8rem; color: var(--ink-faint); }
.photo-card__body p { margin: 0; }
.photo-card__body .photo-card__use { min-height: 2.4em; margin-top: 0.3rem; }
.photo-card__actions { display: flex; align-items: center; justify-content: space-between; gap: 0.4rem; margin-top: 0.6rem; }
.photo-card__actions form { margin: 0; }
.photo-card__actions label.btn { margin: 0; cursor: pointer; }
.is-uploading label.btn { opacity: 0.6; pointer-events: none; }

/* Messages: slide in at the bottom right (clear of the Save button); "saved" messages fade away on their own */
.toasts { position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 100; display: grid; gap: 0.5rem; width: min(24rem, calc(100vw - 2rem)); }
@media (max-width: 959px) { .toasts { right: 1rem; bottom: calc(4.75rem + env(safe-area-inset-bottom)); } }   /* above the tab bar */
.toast {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.8rem 0.8rem 0.8rem 1rem;
  background: #3d3529;
  border-radius: 0.8rem;
  box-shadow: var(--shadow-m);
  color: #fff;
  font-weight: 600;
  animation: toast-in 0.45s var(--ease-out) both;
}
.toast--success, .toast--info { animation: toast-in 0.45s var(--ease-out) both, toast-out 0.5s var(--ease) 5s forwards; }
.toast--error { background: var(--alert-deep); }
.toast__icon { flex: none; margin-top: 0.1rem; color: var(--sage); }
.toast--error .toast__icon { color: #fff; }
.toast__close { flex: none; margin-left: auto; padding: 0; background: none; border: 0; color: inherit; opacity: 0.7; cursor: pointer; }
.toast__close:hover { opacity: 1; }
@keyframes toast-in { from { opacity: 0; transform: translateY(0.75rem) scale(0.98); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(0.5rem); visibility: hidden; } }

/* Printable sign */
.sign {
  max-width: 26rem;
  margin: 0 auto;
  padding: 2.5rem 2rem;
  background: var(--paper);          /* matches the logo's cream background */
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  text-align: center;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}
.sign__logo { width: 8rem; margin: 0 auto; }
.sign h2 { margin-top: var(--space-xs); font-size: 1.9rem; }
.sign__qr { width: 13rem; margin: var(--space-m) auto var(--space-xs); }
.sign__url { font-family: var(--font-display); font-size: 1.25rem; color: var(--brand-deep); }
.sign__help { margin-top: var(--space-s); font-size: 0.95rem; color: var(--ink-soft); }

/* Sign-in and setup */
.auth {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 2rem 1rem;
  background: radial-gradient(circle at 50% 0%, var(--surface) 0%, #f7f2ea 65%);
}
.auth__card { width: 100%; max-width: 25rem; }
.auth__card .admin-brand { margin-bottom: var(--space-m); text-align: center; }
.auth__card h1 { margin-bottom: 0.5rem; font-size: 1.5rem; }
.auth__card .btn { margin-top: 0.5rem; }


/* Guestbook */
.gb-tabs { margin-bottom: 1rem; }
.gb-tabs .toggle__link span { margin-left: 0.2rem; color: var(--ink-faint); font-weight: 400; }
.gb-tabs .toggle__link.is-active span { color: var(--ink-soft); }
.gb-entry, .gb-admin-note { max-width: 48rem; }
.gb-entry__head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.75rem; }
.gb-entry__place { font-family: var(--font-body); font-size: 1.05rem; font-weight: 700; }
.gb-entry__meta { margin: 0.3rem 0 0; color: var(--ink-soft); font-size: 0.9rem; }
.gb-entry__stay { margin: 0.15rem 0 0; }
.gb-entry__message { margin: 0.9rem 0 0; padding: 0.75rem 1rem; background: var(--paper); border-left: 3px solid var(--line); border-radius: 0 0.6rem 0.6rem 0; font-family: var(--font-display); font-size: 1.05rem; font-style: italic; line-height: 1.5; overflow-wrap: anywhere; }
.gb-entry__actions { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 0.5rem; margin-top: 1rem; }
.gb-entry__actions form { margin: 0; }
.gb-entry__edit[open] { flex-basis: 100%; }
.gb-entry__edit > summary { width: max-content; list-style: none; }
.gb-entry__edit > summary::-webkit-details-marker { display: none; }
.gb-entry__edit[open] > summary { margin-bottom: 0.75rem; }
.gb-entry__save { margin-bottom: 0.75rem; }
.dash-alert { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1rem; padding: 0.8rem 1rem; background: #fbf4e6; border: 1px solid #f0e2c4; border-radius: var(--radius-m); color: #6b4610; text-decoration: none; transition: border-color var(--fast); }
.dash-alert:hover { border-color: #e0c48f; }
.dash-alert strong, .dash-alert small { display: block; }
.dash-alert small { font-size: 0.82rem; opacity: 0.85; }
.dash-alert__arrow { margin-left: auto; }


/* 10. Finances --------------------------------------------------------------- */
/* Built from the admin's own pieces (boxes, pills, fields), so the money pages
   feel like the rest of Casa Maria rather than accounting software. Three
   tabs: Overview, Transactions, Taxes. */

.is-in { color: var(--sage-deep); }
.is-out { color: var(--ink); }
.is-neutral { color: var(--ink-faint); }
.is-negative { color: var(--alert-deep); }
.is-attention { color: #8a5a14; }
.text-alert { color: var(--alert-deep); }
.fin-note { margin: 0 0 1rem; font-size: 0.8rem; color: var(--ink-faint); }
.fin-notice { display: flex; align-items: flex-start; gap: 0.6rem; font-weight: 400; }
.fin-notice .icon { flex: none; margin-top: 0.15rem; }
.pill--quiet { background: var(--paper-deep); color: var(--ink-faint); }

/* The tabs under the top bar */
.tabs {
  display: flex;
  gap: 0.25rem;
  margin: -0.25rem 0 1.1rem;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tabs__link {
  flex: none;
  margin-bottom: -1px;
  padding: 0.6rem 1rem;
  border-bottom: 2px solid transparent;
  color: var(--ink-soft);
  font-weight: 600;
  text-decoration: none;
  transition: color var(--fast), border-color var(--fast);
}
.tabs__link:hover { color: var(--ink); }
.tabs__link.is-active { border-bottom-color: var(--brand-deep); color: var(--ink); }
@media (max-width: 559px) { .tabs__link { flex: 1; padding-inline: 0.5rem; text-align: center; } }

.back-link { margin: -0.25rem 0 0.9rem; font-size: 0.9rem; }
.back-link a { color: var(--ink-soft); text-decoration: none; }
.back-link a:hover { color: var(--ink); }

/* Pickers: the month on the Overview, the year on Taxes, All / Income / Expenses */
.month-nav { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 1rem; }
.month-nav h2 { min-width: 9.5rem; font-size: 1.35rem; text-align: center; }
.month-nav__today { margin-left: 0.4rem; font-size: 0.875rem; font-weight: 600; text-decoration: none; }
.icon--left { transform: rotate(-90deg); }
.icon--right { transform: rotate(90deg); }
.period-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.75rem; margin-bottom: 1rem; }
.period-bar form, .year-picker { margin: 0; }
.year-picker select, .period-bar select, .report-bar select { width: auto; padding-block: 0.45rem; font-weight: 600; }
.toggle { display: inline-flex; flex-wrap: wrap; gap: 0.2rem; padding: 0.25rem; background: #ece4d6; border-radius: var(--radius-pill); }
.toggle--wrap { border-radius: 1rem; }
.toggle__link {
  padding: 0.35rem 0.8rem;
  border-radius: var(--radius-pill);
  color: var(--ink-soft);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color var(--fast), color var(--fast), box-shadow var(--fast);
}
.toggle__link:hover { color: var(--ink); }
.toggle__link.is-active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-s); }
.toggle--small { padding: 0.2rem; }
.toggle--small .toggle__link { padding: 0.2rem 0.65rem; font-size: 0.8rem; }
.chips { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-bottom: 1rem; }
.chips__link { padding: 0.35rem 0.75rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-pill); color: var(--ink-soft); font-size: 0.85rem; font-weight: 600; text-decoration: none; }
.chips__link span { margin-left: 0.15rem; font-weight: 400; color: var(--ink-faint); }
.chips__link:hover { border-color: #d8ccb6; color: var(--ink); }
.chips__link.is-active { background: var(--brand-deep); border-color: var(--brand-deep); color: #fff; }
.chips__link.is-active span { color: rgb(255 255 255 / 0.75); }

/* Summary cards: a label, the figure, a short note. No icons — the figure is the point. */
.fin-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem; margin-bottom: 0.5rem; }
@media (min-width: 900px) { .fin-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.fin-cards--three { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 600px) { .fin-cards--three { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.fin-card {
  display: grid;
  align-content: start;
  gap: 0.15rem;
  padding: 0.85rem 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  color: var(--ink);
  text-decoration: none;
}
.fin-card__label { font-size: 0.8rem; font-weight: 600; color: var(--ink-soft); }
.fin-card__value { font-size: 1.55rem; font-weight: 600; line-height: 1.2; letter-spacing: -0.01em; }
.fin-card__note { font-size: 0.75rem; line-height: 1.35; color: var(--ink-faint); }
.fin-card--link { transition: border-color var(--fast), box-shadow var(--fast); }
.fin-card--link:hover { border-color: #d8ccb6; box-shadow: var(--shadow-s); }
@media (max-width: 559px) { .fin-card { padding: 0.75rem 0.85rem; } .fin-card__value { font-size: 1.25rem; } }

/* Charts — drawn by the page itself, no chart library. Colours are tokens
   (section 1), checked for colour-blind readers; each slice of the expense
   chart always has the same colour. */
.fin-charts { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 1rem; align-items: start; }
@media (min-width: 1000px) { .fin-charts { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); } }
.chart-box__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1rem; margin-bottom: 1rem; }
.chart-box__head .box__title { margin: 0; }
.chart-legend { display: flex; gap: 0.9rem; margin: 0; font-size: 0.8rem; color: var(--ink-soft); }
.chart-legend span::before { content: ""; display: inline-block; width: 0.65rem; height: 0.65rem; margin-right: 0.35rem; border-radius: 2px; vertical-align: -0.05rem; }
.chart-legend__in::before { background: var(--viz-income); }
.chart-legend__out::before { background: var(--viz-expense); }

.bar-chart { display: grid; grid-template-columns: 2.75rem minmax(0, 1fr); height: 11.5rem; margin-bottom: 1.6rem; }   /* the month names sit below */
.bar-chart__axis { position: relative; }
.bar-chart__axis span { position: absolute; right: 0.5rem; translate: 0 50%; font-size: 0.7rem; line-height: 1; color: var(--ink-faint); font-variant-numeric: tabular-nums; white-space: nowrap; }
.bar-chart__plot { position: relative; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); }
.bar-chart__line { position: absolute; left: 0; right: 0; height: 1px; background: var(--line-soft); pointer-events: none; }
.bar-chart__line:first-child { background: var(--line); }   /* the baseline */
.bar-chart__month { position: relative; display: block; border-radius: 0.4rem; color: inherit; text-decoration: none; }
.bar-chart__month:hover, .bar-chart__month:focus-visible { background: rgb(68 60 47 / 0.045); }
.bar-chart__bars { position: absolute; inset: 0; display: flex; align-items: flex-end; justify-content: center; gap: 2px; }
.bar-chart__bar { width: min(0.75rem, 36%); border-radius: 4px 4px 0 0; transition: filter var(--fast); }
.bar-chart__bar--in { background: var(--viz-income); }
.bar-chart__bar--out { background: var(--viz-expense); }
.bar-chart__month:hover .bar-chart__bar { filter: brightness(1.1); }
.bar-chart__label { position: absolute; top: 100%; left: 0; right: 0; padding-top: 0.45rem; font-size: 0.7rem; color: var(--ink-faint); text-align: center; }
.bar-chart__month.is-current .bar-chart__label { color: var(--ink); font-weight: 700; }
.chart-tip {
  position: absolute;
  top: 0;
  left: 50%;
  z-index: 3;
  display: none;
  min-width: 9.5rem;
  padding: 0.55rem 0.7rem;
  translate: -50% 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0.6rem;
  box-shadow: var(--shadow-m);
  font-size: 0.8rem;
  color: var(--ink-soft);
  white-space: nowrap;
  pointer-events: none;
}
.bar-chart__month:nth-of-type(-n+2) .chart-tip { left: 0; translate: 0 0; }
.bar-chart__month:nth-last-of-type(-n+2) .chart-tip { left: auto; right: 0; translate: 0 0; }
.bar-chart__month:hover .chart-tip, .bar-chart__month:focus-visible .chart-tip { display: block; }
.chart-tip__title { display: block; margin-bottom: 0.2rem; font-weight: 700; color: var(--ink); }
.chart-tip__row { display: flex; align-items: center; gap: 0.4rem; }
.chart-tip__row::before { content: ""; width: 0.75rem; height: 2px; border-radius: 1px; }
.chart-tip__row--in::before { background: var(--viz-income); }
.chart-tip__row--out::before { background: var(--viz-expense); }
.chart-tip strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.chart-table > summary { width: max-content; color: var(--sky-deep); font-size: 0.85rem; font-weight: 600; cursor: pointer; }
.chart-table[open] > summary { margin-bottom: 0.5rem; }

.chart-box { container-type: inline-size; }
.donut-chart { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem 1.25rem; align-items: center; }
@container (min-width: 24rem) { .donut-chart { grid-template-columns: 9rem minmax(0, 1fr); } }
.donut { justify-self: center; width: 9rem; height: 9rem; overflow: visible; }
.donut circle { fill: none; stroke-width: 13; }
.donut__track { stroke: var(--paper-deep); }
.donut__slice { transition: stroke-width var(--fast); }
.donut__slice:hover { stroke-width: 16; }
.donut__slice--1, .donut-legend__key--1 { stroke: var(--viz-1); background: var(--viz-1); }
.donut__slice--2, .donut-legend__key--2 { stroke: var(--viz-2); background: var(--viz-2); }
.donut__slice--3, .donut-legend__key--3 { stroke: var(--viz-3); background: var(--viz-3); }
.donut__slice--4, .donut-legend__key--4 { stroke: var(--viz-4); background: var(--viz-4); }
.donut__slice--5, .donut-legend__key--5 { stroke: var(--viz-5); background: var(--viz-5); }
.donut__slice--6, .donut-legend__key--6 { stroke: var(--viz-other); background: var(--viz-other); }
.donut__total { font: 600 14px var(--font-body); fill: var(--ink); }
.donut__caption { font: 600 8px var(--font-body); letter-spacing: 0.04em; fill: var(--ink-faint); }
.donut-legend { display: grid; gap: 0.55rem; margin: 0; padding: 0; list-style: none; font-size: 0.875rem; }
.donut-legend li { display: grid; grid-template-columns: 0.7rem minmax(0, 1fr) auto; align-items: start; gap: 0.6rem; }
.donut-legend__key { width: 0.7rem; height: 0.7rem; margin-top: 0.3rem; border-radius: 2px; }
.donut-legend__name small { display: block; color: var(--ink-faint); font-size: 0.75rem; }
.donut-legend__amount { font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.donut-legend__amount small { margin-left: 0.4rem; color: var(--ink-faint); font-weight: 400; }

/* Transactions: one table on bigger screens, a list on phones. The whole row opens the entry. */
.tx-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-bottom: 1rem; }
.tx-filters select { width: auto; padding-block: 0.45rem; font-weight: 600; }
.tx-filters__search { position: relative; flex: 1 1 13rem; }
.tx-filters__search .icon { position: absolute; left: 0.75rem; top: 50%; translate: 0 -50%; color: var(--ink-faint); pointer-events: none; }
.tx-filters__search input { padding-left: 2.3rem; }
@media (max-width: 559px) {
  .tx-filters .toggle { display: flex; width: 100%; }
  .tx-filters .toggle__link { flex: 1; text-align: center; }
  .tx-filters select { flex: 1 1 100%; }
}
.active-filters { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: -0.35rem 0 1rem; }
.tx-totals { display: flex; flex-wrap: wrap; gap: 0 0.8rem; margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.box__head:has(.tx-totals) { flex-wrap: wrap; }
.tx-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.tx-table th, .doc-table th { padding: 0.5rem 0.6rem; border-bottom: 1px solid var(--line); color: var(--ink-faint); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.tx-table td { padding: 0.65rem 0.6rem; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.tx-table tbody tr:last-child td, .doc-table tbody tr:last-child td { border-bottom: 0; }
.tx-table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tx-row { position: relative; }
.tx-row:hover { background: var(--paper); }
.tx-row.is-review { background: #fdfaf2; }
.tx-row__date { white-space: nowrap; color: var(--ink-soft); }
.tx-row__meta { display: none; }
.tx-row__what a { color: var(--ink); font-weight: 600; text-decoration: none; }
.tx-row__what a::after { content: ""; position: absolute; inset: 0; }
.tx-row__what a:hover { text-decoration: underline; }
.tx-row__flag { display: block; margin-top: 0.15rem; color: #8a5a14; font-size: 0.78rem; }
.tx-row__type, .tx-row__category { color: var(--ink-soft); }
.tx-row__amount { font-weight: 600; }
.tx-row__receipt { white-space: nowrap; }
.tx-row__receipt a { position: relative; z-index: 1; text-decoration: none; }   /* above the row's own link */
.receipt-mark { display: inline-flex; align-items: center; gap: 0.25rem; color: var(--ink-faint); font-size: 0.8rem; }
.receipt-mark .icon { width: 14px; height: 14px; }
.receipt-mark.is-attached { color: var(--sage-deep); font-weight: 600; }
.receipt-mark.is-missing { color: #8a5a14; font-weight: 700; }
@media (max-width: 759px) {
  .tx-table thead { display: none; }
  .tx-table, .tx-table tbody { display: block; }
  .tx-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "what amount" "date receipt"; gap: 0.15rem 0.75rem; padding: 0.7rem 0; border-bottom: 1px solid var(--line-soft); }
  .tx-table tbody .tx-row:last-child { border-bottom: 0; }
  .tx-row:hover { background: none; }
  .tx-table td { padding: 0; border: 0; }
  .tx-row__what { grid-area: what; min-width: 0; }
  .tx-row__amount { grid-area: amount; }
  .tx-row__date { grid-area: date; min-width: 0; font-size: 0.8rem; white-space: normal; }
  .tx-row__meta { display: inline; }
  .tx-row__receipt { grid-area: receipt; justify-self: end; }
  .receipt-mark--none { display: none; }
  .tx-row__type, .tx-row__category { display: none; }
}

/* Things to deal with (only shown when there's something) */
.attention-list { display: grid; gap: 0.5rem; margin: 0; padding: 0; list-style: none; }
.attention-list a { display: flex; align-items: center; gap: 0.75rem; padding: 0.7rem 0.9rem; background: #fbf4e6; border: 1px solid #f0e2c4; border-radius: 0.7rem; color: #6b4610; text-decoration: none; transition: border-color var(--fast); }
.attention-list a:hover { border-color: #e0c48f; }
.attention-list strong { display: block; font-weight: 600; }
.attention-list small { display: block; font-size: 0.82rem; opacity: 0.85; }
.attention-list__arrow { margin-left: auto; }
.empty--small { padding: 1.25rem 0.5rem; }

/* One income entry, broken down */
.mini-list { margin: 0; padding: 0; list-style: none; }
.mini-list a { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.6rem 0; border-top: 1px solid var(--line-soft); color: var(--ink); text-decoration: none; }
.mini-list li:first-child a { border-top: 0; }
.mini-list a:hover strong { text-decoration: underline; }
.mini-list strong { display: block; font-weight: 600; }
.mini-list small { display: block; color: var(--ink-faint); }
.mini-list__amount { flex: none; font-variant-numeric: tabular-nums; font-weight: 600; }
.receipt-view { max-width: 40rem; }
.receipt-view__head { margin-bottom: 1rem; }
.receipt-view__head h2 { margin: 0.5rem 0 0.2rem; font-size: 1.6rem; }
.receipt-view__head p { margin: 0.15rem 0; }
.receipt-view__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-top: 1rem; }
.receipt-view__actions form { margin: 0; }
.receipt-view .group__title { margin-top: 1rem; }
.badge-source { display: inline-block; padding: 0.15rem 0.55rem; border-radius: var(--radius-pill); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em; white-space: nowrap; }
.badge-source--airbnb { background: var(--sky-tint); color: var(--sky-deep); }
.badge-source--furnished_finder { background: var(--sage-tint); color: var(--sage-deep); }
.badge-source--manual { background: var(--brand-tint); color: var(--brand-darker); }
.breakdown { display: grid; gap: 0.3rem; margin: 0 0 0.5rem; }
.breakdown div { display: flex; justify-content: space-between; gap: 1rem; font-size: 0.95rem; }
.breakdown dt { color: var(--ink-soft); }
.breakdown dd { margin: 0; font-variant-numeric: tabular-nums; }
.breakdown .breakdown__sum { padding-top: 0.3rem; border-top: 1px solid var(--line); font-weight: 700; }
.breakdown__total { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin: 0.25rem 0 0.75rem; padding-top: 0.6rem; border-top: 2px solid var(--ink); }
.breakdown__total span { font-weight: 700; }
.breakdown__total strong { font-size: 1.5rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.match { margin: 0.25rem 0 0; font-weight: 700; }
.match.is-ok { color: var(--sage-deep); }
.match.is-off { color: #8a5a14; }

/* Adding or editing an entry */
.entry { max-width: 44rem; }
.entry__top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 0.75rem; }
.entry__source { margin-bottom: 0.9rem; }
.entry__source .receipt__label { display: block; margin-bottom: 0.35rem; }
p.entry__source { display: flex; align-items: center; gap: 0.5rem; font-weight: 600; }
.entry__kinds { margin: -0.25rem 0 1rem; }
.entry__hint { margin: 0.5rem 0 0; font-weight: 400; font-size: 0.85rem; }
.entry__review { max-width: 44rem; font-weight: 400; }
.field--amount label { font-size: 0.85rem; }
.money-input { position: relative; }
.money-input > span { position: absolute; left: 0.8rem; top: 50%; translate: 0 -50%; color: var(--ink-faint); font-weight: 600; pointer-events: none; }
.admin-body .money-input input { padding-left: 1.65rem; font-variant-numeric: tabular-nums; }
.admin-body .field--amount input { font-size: 1.35rem; font-weight: 700; }
.money-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); gap: 0 0.9rem; }
.percent-input { position: relative; }
.percent-input > span { position: absolute; right: 0.8rem; top: 50%; translate: 0 -50%; color: var(--ink-faint); pointer-events: none; }
.admin-body .percent-input input { padding-right: 2rem; }
.income-check { min-height: 1.4em; margin: 0 0 0.6rem; font-size: 0.9rem; font-weight: 600; color: var(--ink-soft); }
.income-check.is-ok { color: var(--sage-deep); }
.income-check.is-off { color: #8a5a14; }
.choice { margin: 0 0 1rem; padding: 0; border: 0; }
.choice legend { margin-bottom: 0.35rem; font-size: 0.85rem; font-weight: 600; }
.choice .check { margin-right: 1.25rem; }

.check { display: inline-flex; align-items: center; gap: 0.5rem; margin: 0; font-size: 0.9rem; font-weight: 400; cursor: pointer; }
.check input { width: 1.1rem; height: 1.1rem; margin: 0; accent-color: var(--brand-deep); }
.check--block { display: flex; align-items: flex-start; margin: 0.4rem 0 0.9rem; }
.check--block input { margin-top: 0.15rem; }
.check--block strong { display: block; font-weight: 600; }
.check--block small { display: block; color: var(--ink-faint); font-size: 0.82rem; }
.field--checks { display: flex; align-items: flex-end; padding-bottom: 0.6rem; }

.receipt { display: grid; gap: 0.5rem; justify-items: start; }
.receipt__label { font-size: 0.85rem; font-weight: 600; }
.receipt__status { margin-left: 0.35rem; padding: 0.1rem 0.5rem; border-radius: var(--radius-pill); background: var(--paper-deep); color: var(--ink-faint); font-size: 0.72rem; font-weight: 700; }
.receipt__status--attached { background: var(--sage-tint); color: var(--sage-deep); }
.receipt__status--missing { background: #fbf0dc; color: #8a5a14; }
.receipt__file { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 1rem; }
.receipt__file a { display: inline-flex; align-items: center; gap: 0.35rem; font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
.receipt__pick { position: relative; margin: 0; }
.receipt__pick input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }   /* the whole button opens the camera / files */
.receipt__pick:focus-within .btn { outline: 3px solid var(--sky-deep); outline-offset: 2px; }

.more > summary { display: flex; align-items: center; justify-content: space-between; font-weight: 700; list-style: none; cursor: pointer; }
.more > summary::-webkit-details-marker { display: none; }
.more > summary::after { content: "+"; color: var(--ink-faint); font-size: 1.2rem; font-weight: 400; }
.more[open] > summary { margin-bottom: 0.9rem; }
.more[open] > summary::after { content: "−"; }
.more-details { margin-top: 0.5rem; }
.more-details > summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.4rem; padding: 0.7rem 0; color: var(--sky-deep); font-weight: 700; list-style: none; cursor: pointer; }
.more-details > summary::-webkit-details-marker { display: none; }
.more-details > summary::before { content: "+"; width: 1rem; font-weight: 400; }
.more-details[open] > summary::before { content: "−"; }
.more-details > summary span { color: var(--ink-faint); font-size: 0.82rem; font-weight: 400; }
.more-details[open] > summary { margin-bottom: 0.5rem; }
.more-details--box { margin-top: 0; }
.more-details--box > summary { padding: 0.1rem 0; }

.nights { display: grid; gap: 0.4rem; margin-bottom: 0.4rem; }
.nights__row { display: grid; grid-template-columns: 7rem repeat(3, minmax(0, 1fr)); align-items: end; gap: 0.5rem; padding: 0.5rem 0.6rem; background: var(--paper); border-radius: 0.6rem; }
.nights__date { align-self: center; font-size: 0.85rem; font-weight: 700; }
.nights__row label { margin: 0; font-size: 0.7rem; font-weight: 600; color: var(--ink-faint); }
.nights__row label span { display: block; margin-bottom: 0.15rem; }
.admin-body .nights__row input { padding: 0.4rem 0.5rem; font-variant-numeric: tabular-nums; }
@media (max-width: 559px) {
  .nights__row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .nights__date { grid-column: 1 / -1; }
}
.discount-row { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 0.5rem; margin-bottom: 0.5rem; }
/* The live payout stays in view only while Airbnb's line-by-line details are open. */
.entry:has(.more-details--box[open]) .payout-box { position: sticky; bottom: 0.75rem; z-index: 5; box-shadow: var(--shadow-m); }
@media (max-width: 959px) { .entry:has(.more-details--box[open]) .payout-box { bottom: calc(4.6rem + env(safe-area-inset-bottom)); } }

.entry__actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.25rem; }
.entry__actions .btn--danger { margin-left: auto; }
@media (max-width: 559px) {
  .entry__actions { display: grid; }
  .entry__actions .btn { min-height: 3rem; }
  .entry__actions .btn--danger { margin: 0.5rem 0 0; }
}

/* Taxes */
.tax-section { margin-bottom: 2rem; }
.tax-section__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1rem; margin-bottom: 0.75rem; }
.tax-section__title { margin: 0 0 0.75rem; font-size: 1.35rem; }
.tax-section__head .tax-section__title { margin: 0; }
.records { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 2rem; align-items: start; }
@media (min-width: 900px) { .records { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.records__line { border-bottom: 1px solid var(--line-soft); }
.records__line, .records__line summary { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: 0.5rem 0; font-size: 0.9rem; }
.records__line:has(details) { display: block; padding: 0; }
.records__line summary { list-style: none; cursor: pointer; }
.records__line summary::-webkit-details-marker { display: none; }
.records__line summary span::after { content: " ›"; color: var(--ink-faint); }
.records__line details[open] summary span::after { content: " ⌄"; }
.records__line strong { font-variant-numeric: tabular-nums; }
.records__line ul { margin: 0 0 0.6rem; padding: 0.4rem 0.75rem; background: var(--paper); border-radius: 0.6rem; list-style: none; font-size: 0.85rem; color: var(--ink-soft); }
.records__line li { display: flex; justify-content: space-between; gap: 1rem; padding: 0.2rem 0; }
.records__line--total { border-top: 2px solid var(--ink); border-bottom: 0; font-weight: 700; }
.records__note { margin: 0.5rem 0 1rem; font-size: 0.85rem; color: var(--ink-faint); }

.hot-summary .box__title { margin-bottom: 0.3rem; }
.hot-figures { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.9rem 1rem; margin: 1rem 0 0.75rem; }
@media (min-width: 900px) { .hot-figures { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 479px) { .hot-figures { grid-template-columns: minmax(0, 1fr); } }
.hot-figures > div { padding: 0.1rem 0 0.1rem 0.8rem; border-left: 2px solid var(--line); }
.hot-figures > .is-attention { border-left-color: #e0c48f; }
.hot-figures dt { font-size: 0.8rem; font-weight: 600; color: var(--ink-soft); }
.hot-figures > .is-attention dt { color: #8a5a14; }
.hot-figures dd { margin: 0.1rem 0 0; font-size: 1.2rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.hot-figures dd small { font-size: 0.72rem; font-weight: 400; color: var(--ink-faint); }
.hot-figures .hot-figures__note { font-size: 0.75rem; font-weight: 400; line-height: 1.35; color: var(--ink-faint); }
.hot-details { margin-top: 0.5rem; border-top: 1px solid var(--line-soft); }
.hot-details > summary { padding: 0.85rem 0 0.1rem; color: var(--sky-deep); font-weight: 700; list-style: none; cursor: pointer; }
.hot-details > summary::-webkit-details-marker { display: none; }
.hot-details > summary::before { content: "+ "; }
.hot-details[open] > summary::before { content: "− "; }
.hot-details .group__title { margin-top: 1.5rem; }
.handling-table select { min-width: 13rem; padding: 0.4rem 0.5rem; font-size: 0.85rem; }
.handling-table select.is-unknown { border-color: #e0c48f; background: #fdf8ee; }
.rates-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0 0.75rem; }
.rates-form .field { width: 9.5rem; }
.rates-form .btn { margin-bottom: 1rem; }
.hot-table tr.is-current { background: var(--paper); }
.hot-table th a { color: var(--ink); text-decoration: none; }
.hot-table th a:hover { text-decoration: underline; }
.hot-month { margin-top: 1rem; padding-top: 0.25rem; border-top: 1px solid var(--line-soft); }
.hot-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 0 1.5rem; }
.hot-card { padding: 0.75rem 0; border-top: 1px solid var(--line-soft); }
.hot-card header { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.5rem; }
.hot-card h5 { margin: 0; font-family: var(--font-body); font-size: 0.95rem; font-weight: 700; }
.hot-card h5 .muted { font-weight: 400; }
.hot-card__total { margin: 0.35rem 0 0.5rem; font-size: 1.3rem; font-weight: 600; }
.hot-card__total small { font-size: 0.8rem; font-weight: 400; color: var(--ink-faint); }
.hot-card__split { display: grid; gap: 0.25rem; margin: 0 0 0.75rem; font-size: 0.85rem; }
.hot-card__split div { display: flex; justify-content: space-between; gap: 1rem; }
.hot-card__split dt { color: var(--ink-faint); }
.hot-card__split dd { margin: 0; font-variant-numeric: tabular-nums; font-weight: 600; }
.hot-card__split .is-attention dt, .hot-card__split .is-attention dd { color: #8a5a14; }
.hot-card__form { padding-top: 0.75rem; border-top: 1px dashed var(--line); }
.summary-form { margin-bottom: 0.5rem; }
.summary-form > summary { width: max-content; margin-bottom: 0.75rem; list-style: none; }
.summary-form > summary::-webkit-details-marker { display: none; }
.summary-card { max-width: 44rem; padding: 0.9rem 0; border-top: 1px solid var(--line-soft); }
.statement__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1rem; margin-bottom: 0.5rem; }
.statement__head h5 { margin: 0; font-family: var(--font-body); font-size: 1rem; font-weight: 700; }
.statement__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 1rem; margin-top: 0.5rem; font-size: 0.875rem; }
.statement__foot form { margin: 0 0 0 auto; }
.guest-tax-box { margin: 0.75rem 0 0; padding: 0.6rem 0.8rem; background: var(--sky-tint); border-radius: 0.6rem; color: var(--sky-deep); font-size: 0.875rem; }

.doc-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.doc-table td { padding: 0.6rem; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.doc-row__name a { font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
.doc-row__name small { display: block; margin-top: 0.1rem; color: var(--ink-faint); font-size: 0.78rem; }
.doc-row__name small a { font-weight: 400; }
.doc-row form { margin: 0; }
.admin-body .doc-row__category select { width: auto; min-width: 9rem; padding: 0.35rem 0.5rem; font-size: 0.85rem; }
.doc-row__date { white-space: nowrap; color: var(--ink-soft); }
.doc-row__actions { text-align: right; white-space: nowrap; }
.doc-row__actions form { display: inline; }
.btn--danger-text { color: var(--alert-deep); }
.btn--danger-text:hover { background: var(--alert-tint); color: var(--alert-deep); }
@media (max-width: 759px) {
  .doc-table thead { display: none; }
  .doc-table, .doc-table tbody { display: block; }
  .doc-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name name" "category date" "actions actions"; gap: 0.4rem 0.75rem; padding: 0.8rem 0; border-bottom: 1px solid var(--line-soft); }
  .doc-table tbody .doc-row:last-child { border-bottom: 0; }
  .doc-table td { padding: 0; border: 0; }
  .doc-row__name { grid-area: name; }
  .doc-row__category { grid-area: category; }
  .doc-row__date { grid-area: date; align-self: center; font-size: 0.8rem; }
  .doc-row__actions { grid-area: actions; text-align: left; margin-left: -0.6rem; }
}

.year-end { display: grid; gap: 1.25rem 2rem; }
@media (min-width: 900px) { .year-end { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); } }
.year-end__action > p:first-child { margin-top: 0; font-size: 1rem; }
.year-end__action .btn { margin: 0.4rem 0 0.75rem; }
.year-end__checklist .group__title { margin-top: 0; }
.year-checks { margin: 0; padding: 0; list-style: none; }
.year-checks li { display: grid; grid-template-columns: 1.3rem minmax(0, 1fr) auto; align-items: start; gap: 0.6rem; padding: 0.55rem 0; border-top: 1px solid var(--line-soft); }
.year-checks li:first-child { border-top: 0; padding-top: 0; }
.year-checks__mark { display: grid; place-items: center; width: 1.25rem; height: 1.25rem; margin-top: 0.1rem; border: 1.5px solid #d8ccb6; border-radius: 50%; color: #fff; }
.year-checks .is-done .year-checks__mark { background: var(--sage-deep); border-color: var(--sage-deep); }
.year-checks__mark .icon { width: 12px; height: 12px; }
.year-checks strong { display: block; font-size: 0.9rem; font-weight: 600; }
.year-checks small { display: block; color: var(--ink-faint); font-size: 0.8rem; }
.year-checks .is-done strong { color: var(--ink-soft); }
.year-checks__link { font-size: 0.85rem; font-weight: 600; text-decoration: none; white-space: nowrap; }

/* Tables shared by the charts' numbers, occupancy tax and the import review */
.table-scroll { overflow-x: auto; }
.report-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.report-table th, .report-table td { padding: 0.5rem 0.6rem; border-bottom: 1px solid var(--line-soft); text-align: left; vertical-align: top; }
.report-table thead th { border-bottom-color: var(--line); color: var(--ink-faint); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap; }
.report-table tbody th { font-weight: 600; }
.report-table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.report-table tfoot th, .report-table tfoot td { border-top: 2px solid var(--line); border-bottom: 0; font-weight: 700; }
.report-table tr.is-empty td { color: var(--ink-faint); }
.report-table tr.is-attention td, .report-table tr.is-attention th { color: #8a5a14; font-weight: 700; }
.report-table--compact th { white-space: nowrap; }
.report-table--compact th, .report-table--compact td { padding: 0.4rem 0.5rem; font-size: 0.85rem; }
.report-links { font-size: 0.9rem; }
.report-links .icon { width: 15px; height: 15px; vertical-align: -0.15rem; }
.report-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; margin-bottom: 1rem; }
.report-bar form { margin: 0; }
.report-bar__actions { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-left: auto; }

/* Settings → Finance records: backup, restore, import */
.settings-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.split--even { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1000px) { .split--even { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.asset__actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.restore-confirm { border-color: #e0c48f; background: #fdf8ee; }
.saved-copy { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1rem; padding: 0.6rem 0; border-top: 1px solid var(--line-soft); }
.saved-copy:first-child { border-top: 0; }
.saved-copy strong { display: block; font-weight: 600; }
.saved-copy small { display: block; color: var(--ink-faint); }
.saved-copy__actions { display: flex; gap: 0.4rem; }
.saved-copy__actions form { margin: 0; }
.import-table input, .import-table select { min-width: 6rem; padding: 0.35rem 0.5rem; font-size: 0.875rem; }
.import-table select { min-width: 11rem; }
.import-table td:first-child input { min-width: 0; width: 1.15rem; height: 1.15rem; accent-color: var(--brand-deep); }
.import-table tr.is-attention { background: #fdf8ee; }
.import-actions { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.6rem; margin-top: 1rem; }
.import-actions form { margin: 0; }

/* The financial snapshot on the dashboard */
.snapshot__figures { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem 1rem; margin: 0; }
.snapshot__figures dt { font-size: 0.78rem; color: var(--ink-faint); }
.snapshot__figures dd { margin: 0.1rem 0 0; font-size: 1.25rem; font-weight: 600; line-height: 1.2; }
.snapshot__alert { display: flex; align-items: center; gap: 0.45rem; margin-top: 0.9rem; padding: 0.55rem 0.75rem; background: #fbf0dc; border-radius: 0.6rem; color: #6b4610; font-size: 0.875rem; font-weight: 600; text-decoration: none; }
.snapshot__actions { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.9rem; }

/* The tax package */
.package-frame { max-width: 60rem; padding: clamp(1rem, 0.5rem + 2vw, 2.5rem); background: #fff; border: 1px solid var(--line); border-radius: var(--radius-m); box-shadow: var(--shadow-s); overflow-x: auto; }

/* package:start — also copied into the ZIP, so plain colours only */
.package { max-width: 56rem; margin: 0 auto; color: #2f2a22; font-size: 14px; line-height: 1.5; }
.package__head { margin-bottom: 1.5rem; padding-bottom: 1rem; border-bottom: 2px solid #2f2a22; }
.package__kicker { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: 0.18em; color: #6f6044; }
.package h1 { margin: 0.2rem 0 0.4rem; font-family: Georgia, "Playfair Display", serif; font-size: 26px; font-weight: 500; }
.package h2 { margin: 1.6rem 0 0.5rem; padding-bottom: 0.25rem; border-bottom: 1px solid #d9d0c0; font-family: inherit; font-size: 13px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: #4f6f88; }
.package p { margin: 0.4rem 0; }
.package table { width: 100%; border-collapse: collapse; font-size: 13px; }
.package th, .package td { padding: 0.35rem 0.5rem; border-bottom: 1px solid #ece5d8; text-align: left; vertical-align: top; }
.package thead th { color: #776d5f; font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.package tbody th { font-weight: 600; }
.package .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.package tfoot th, .package tfoot td { border-top: 2px solid #2f2a22; border-bottom: 0; font-weight: 700; }
.package tr.is-empty td, .package tr.is-empty th { color: #a39a8c; }
.package__facts th { width: 14rem; font-weight: 600; }
.package__detail { color: #6e6353; font-size: 12px; }
.package__note { color: #776d5f; font-size: 12px; }
.package__missing { color: #8f4238; font-weight: 600; }
.package__pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 0 2rem; }
.package ul { margin: 0.4rem 0; padding-left: 1.2rem; }
.package__foot { margin-top: 2rem; padding-top: 0.75rem; border-top: 1px solid #d9d0c0; color: #776d5f; font-size: 12px; }
@media print {
  .package section { break-inside: avoid; }
  .package h2 { break-after: avoid; }
}
/* package:end */

/* 11. Print ----------------------------------------------------------------- */

@media print {
  .admin-sidebar, .topbar, .toasts, .no-print { display: none !important; }
  .admin-body, .admin-content { background: #fff; padding: 0; animation: none; }
  .admin { display: block; }
  .sign { border: 0; }
  .package-frame { padding: 0; border: 0; box-shadow: none; }
  .report-table { font-size: 10pt; }
  .report-table a { color: inherit; text-decoration: none; }
  .table-scroll { overflow: visible; }
}
