/* Beachy, blue sky. The colours are tokens so the packs can share them. */
:root {
  --sky: #6ec6f1;
  --sky-deep: #1f7fbf;
  --sea: #0e5a8a;
  --sand: #f6e7c8;
  --foam: #ffffff;
  --ink: #12324a;
  --muted: #5b7487;
  --sun: #ffc845;
  --coral: #e2614b;
  --card: #ffffff;
  --radius: 16px;
}
@media (prefers-color-scheme: dark) {
  :root { --card: #10283a; --ink: #e8f4fb; --muted: #9db6c7; --foam: #0b1f2d; --sand: #1a3446; }
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, var(--sky) 0, #bfe6f8 260px, var(--sand) 260px) no-repeat, var(--sand);
  min-height: 100vh;
}
/* The top bar: deep sea into sky, a wave along its foot, the menu as pills.
   On a phone the menu folds behind a Menu button. */
.bar { position: sticky; top: 0; z-index: 10; color: #fff; background: linear-gradient(90deg, var(--sea), var(--sky-deep) 55%, #3aa6e0); box-shadow: 0 2px 10px rgba(14,90,138,.25); }
.bar-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; max-width: 1100px; margin: 0 auto; padding: 10px 20px; flex-wrap: wrap; }
.bar-wave { position: absolute; left: 0; right: 0; top: 100%; width: 100%; height: 12px; fill: #3aa6e0; opacity: .55; pointer-events: none; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.45rem; color: #fff; text-decoration: none; letter-spacing: .02em; text-shadow: 0 1px 2px rgba(0,0,0,.2); }
.brand-sun { width: 30px; height: 30px; fill: var(--sun); stroke: var(--sun); flex: none; }
.brand-group { display: inline-flex; align-items: center; gap: 10px; }
.brand-version { color: rgba(255,255,255,.8); font-size: .8rem; font-weight: 600; text-decoration: none; padding-top: .2em; }
.brand-version:hover { color: #fff; text-decoration: underline; }
.menu { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.menu a, .menu .logout { display: inline-block; padding: 8px 14px; border-radius: 999px; color: #fff; font-weight: 600; text-decoration: none; background: none; line-height: 1.2; }
.menu a:hover, .menu .logout:hover { background: rgba(255,255,255,.18); }
.menu a[aria-current="page"] { background: #fff; color: var(--sea); }
.menu .logout { border: 2px solid rgba(255,255,255,.6); padding: 6px 14px; margin-left: 6px; }
.menu-button { display: none; align-items: center; gap: 8px; padding: 8px 14px; background: rgba(255,255,255,.18); color: #fff; }
.menu-button:hover { background: rgba(255,255,255,.28); }
.menu-icon, .menu-icon::before, .menu-icon::after { display: block; width: 18px; height: 2px; border-radius: 2px; background: #fff; position: relative; }
.menu-icon::before, .menu-icon::after { content: ""; position: absolute; left: 0; }
.menu-icon::before { top: -6px; }
.menu-icon::after { top: 6px; }
.bar.open .menu-icon { background: transparent; }
.bar.open .menu-icon::before { top: 0; transform: rotate(45deg); }
.bar.open .menu-icon::after { top: 0; transform: rotate(-45deg); }
@media (max-width: 720px) {
  .bar-inner { padding: 8px 16px; }
  .brand-group { gap: 6px; }
  .brand-version { font-size: .7rem; }
  .js .menu-button { display: inline-flex; }
  .js .menu { display: none; }
  .menu { flex-basis: 100%; flex-direction: column; align-items: stretch; gap: 4px; padding: 4px 0 8px; }
  .js .bar.open .menu { display: flex; }
  .menu a, .menu .logout { padding: 12px 16px; font-size: 1.05rem; }
  .menu form { display: block; }
  .menu .logout { width: 100%; text-align: left; margin: 6px 0 0; }
}
/* The narrowest phones: the Menu button keeps its word for screen readers only, so the version stays on the Beachtime line. */
@media (max-width: 380px) {
  .menu-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .menu-button { padding: 10px 12px; }
}
main { max-width: 900px; margin: 0 auto; padding: 12px 16px 48px; }
.hero { color: var(--foam); padding: 24px 4px 12px; text-shadow: 0 1px 2px rgba(0,0,0,.2); }
.hero h1 { margin: 0 0 4px; font-size: 2rem; }
.card { display: block; background: var(--card); color: var(--ink); border-radius: var(--radius); padding: 20px 22px; margin: 16px 0; box-shadow: 0 6px 20px rgba(14,90,138,.12); text-decoration: none; }
.card.narrow { max-width: 440px; margin: 40px auto; }
.booking-card:hover { box-shadow: 0 8px 26px rgba(14,90,138,.22); }
h1, h2 { color: var(--sea); }
@media (prefers-color-scheme: dark) { h1, h2 { color: var(--sky); } }
.hero h1 { color: var(--foam); }
label { display: block; font-weight: 600; margin: 12px 0; }
label.tick { font-weight: 400; display: flex; gap: 8px; align-items: center; }
input:not([type=checkbox]), select, textarea { display: block; width: 100%; margin-top: 6px; padding: 10px 12px; font: inherit; border: 1px solid #b9d3e3; border-radius: 10px; background: var(--foam); color: var(--ink); }
/* Safari draws a native select shorter than the inputs beside it. */
select { -webkit-appearance: none; appearance: none; padding-right: 36px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%235b7487' stroke-width='2'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; }
button { font: inherit; font-weight: 700; padding: 10px 18px; border: 0; border-radius: 999px; background: var(--sky-deep); color: #fff; cursor: pointer; }
button:hover { background: var(--sea); }
a.button { display: inline-block; font-weight: 700; padding: 10px 18px; border-radius: 999px; background: var(--sky-deep); color: #fff; text-decoration: none; }
a.button:hover { background: var(--sea); }
.nowrap { white-space: nowrap; }
button.link { background: none; padding: 0; color: var(--sky-deep); font-weight: 600; }
form.inline { display: inline; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 16px; align-items: end; }
.grid button { justify-self: start; margin: 12px 0; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid rgba(91,116,135,.2); }
.details { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; }
.details dt { font-weight: 600; color: var(--muted); }
.details dd { margin: 0; }
.packs { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 0 16px; }
.muted { color: var(--muted); }
h3 { color: var(--sea); margin: 20px 0 0; }
th.num, td.num { text-align: right; white-space: nowrap; }
tr.total td { font-weight: 800; border-top: 2px solid var(--sky-deep); }
/* A peak season or long weekend: Kind and Name on one row, then the four
   numbers on the next; two columns on a phone. */
.period { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 16px; align-items: end; border-bottom: 1px dashed rgba(91,116,135,.3); padding-bottom: 4px; }
.period .name { grid-column: 2 / -1; }
.period input, .period select { height: 44px; }
.period .actions, .period .span { grid-column: 1 / -1; }
.period .actions { display: flex; gap: 14px; align-items: center; margin: 4px 0 12px; }
.period .span { margin: 0 0 8px; }
@media (max-width: 640px) {
  .period { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .period .kind, .period .name { grid-column: 1 / -1; }
}
.error { color: var(--coral); font-weight: 600; }
.done { color: var(--sea); font-weight: 600; }
textarea { resize: vertical; font-family: inherit; }
.spaced { margin-top: 12px; }
tr.cancelled td { color: var(--muted); text-decoration: line-through; }
tr.cancelled td:last-child { text-decoration: none; }
tr.family td { color: var(--muted); font-style: italic; }
table.blocks td { padding: 6px 10px 6px 0; vertical-align: middle; }
table.blocks tr.block-buffer td, table.blocks tr.block-booking td { color: var(--muted); }
.dev { background: var(--sun); color: #12324a; padding: 8px 12px; border-radius: 10px; }
.foot { text-align: center; color: var(--muted); padding: 24px; font-size: .9rem; }
@media print { body { background: #fff; } .bar, .foot { display: none; } .card { box-shadow: none; } }

/* ---- Packs: the fun bit. ---- */
.brand, .pack h1, .pack h2, .pack-link h2, .pack .kicker { font-family: "Fredoka", system-ui, sans-serif; }
.pack-hero {
  position: relative; overflow: hidden; margin: 8px 0 18px; padding: 34px 26px 64px; border-radius: 24px; color: #fff;
  background: linear-gradient(180deg, #2f9be0 0%, #6ec6f1 55%, #bfe9fb 100%);
  box-shadow: 0 10px 30px rgba(14,90,138,.25);
}
.pack-departure .pack-hero { background: linear-gradient(180deg, #f39a6b 0%, #ffc27a 45%, #8fd3f4 100%); }
.pack-hero .sun { position: absolute; top: -36px; right: -26px; width: 130px; height: 130px; border-radius: 50%; background: radial-gradient(circle, #fff6c4 0 52%, var(--sun) 72%); box-shadow: 0 0 0 14px rgba(255,214,102,.35), 0 0 60px 30px rgba(255,214,102,.4); }
.pack-hero .kicker { margin: 0; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; font-size: .85rem; opacity: .95; }
.pack-hero h1 { color: #fff; font-size: clamp(1.8rem, 5vw, 2.8rem); margin: 6px 0 18px; text-shadow: 0 2px 6px rgba(0,0,0,.18); max-width: 80%; }
.pack-hero .stay { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; position: relative; z-index: 1; }
.pack-hero .stay div { background: rgba(255,255,255,.88); color: #12324a; border-radius: 14px; padding: 10px 14px; }
.pack-hero .stay span { display: block; font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: #1f7fbf; font-weight: 700; }
.pack-hero .stay strong { display: block; }
/* The heading always wraps and sits in front of the sun. */
.pack-hero .kicker, .pack-hero h1 { position: relative; z-index: 1; }
.pack-hero h1 { overflow-wrap: break-word; text-shadow: 0 2px 8px rgba(0,0,0,.28); }
@media (max-width: 560px) {
  /* On a phone the sun tucks into the corner above the heading. */
  .pack-hero .sun { top: -52px; right: -36px; width: 104px; height: 104px; box-shadow: 0 0 0 10px rgba(255,214,102,.3), 0 0 36px 14px rgba(255,214,102,.35); }
  .pack-hero .kicker { max-width: calc(100% - 64px); }
  .pack-hero h1 { font-size: clamp(1.6rem, 8vw, 2.2rem); }
}
.pack-hero .waves { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: 44px; fill: var(--sand); }
.pack-tools { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; position: sticky; top: 0; z-index: 5; padding: 10px 0; background: var(--sand); }
.pack-tools .search { flex: 1 1 260px; display: flex; align-items: center; gap: 8px; margin: 0; background: var(--card); border-radius: 999px; padding: 4px 6px 4px 16px; box-shadow: 0 3px 12px rgba(14,90,138,.12); }
.pack-tools .search input { margin: 0; border: 0; background: transparent; padding: 10px 8px; }
.pack-tools .search input:focus { outline: none; }
.pack-tools .search:focus-within { box-shadow: 0 0 0 3px var(--sky); }
.pack-count { margin: 0 4px; min-height: 1.2em; font-weight: 600; color: var(--muted); }
.pack-toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 4px; }
.pack-toc a, .pack-chips a { background: var(--card); color: var(--sea); text-decoration: none; font-weight: 600; font-size: .92rem; padding: 6px 12px; border-radius: 999px; border: 2px solid rgba(110,198,241,.5); transition: transform .1s; }
.pack-toc a:hover, .pack-chips a:hover { transform: translateY(-2px); border-color: var(--sky-deep); }
.pack-toc a.dim { opacity: .35; }
.pack-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.pack-section { scroll-margin-top: 80px; border-top: 6px solid var(--sky); }
.pack-section:nth-of-type(4n+2) { border-top-color: var(--sun); }
.pack-section:nth-of-type(4n+3) { border-top-color: var(--coral); }
.pack-section:nth-of-type(4n) { border-top-color: #4fc3a1; }
.pack-section[hidden], .no-results[hidden] { display: none; }
.pack-section h2 { display: flex; align-items: center; gap: 12px; margin: 0 0 8px; font-size: 1.5rem; }
.bubble { display: inline-grid; place-items: center; width: 46px; height: 46px; flex: none; border-radius: 50%; font-size: 1.5rem; background: #e2f4fd; box-shadow: inset 0 -3px 0 rgba(14,90,138,.12); }
.pack-section:nth-of-type(4n+2) .bubble { background: #fff3cf; }
.pack-section:nth-of-type(4n+3) .bubble { background: #fde3dd; }
.pack-section:nth-of-type(4n) .bubble { background: #dcf5ec; }
.pack-body { line-height: 1.6; }
.pack-body a { color: var(--sky-deep); overflow-wrap: anywhere; }
.pack-body ul.bullets { padding-left: 1.3em; }
.pack-body ul.bullets li::marker { content: "🐚  "; font-size: .85em; }
.pack-body ul.ticks { list-style: none; padding: 0; }
.pack-body ul.ticks li { margin: 8px 0; }
.pack-body ul.ticks label { display: flex; gap: 12px; align-items: flex-start; font-weight: 400; margin: 0; cursor: pointer; }
.pack-body ul.ticks input { flex: none; width: 22px; height: 22px; margin-top: 2px; accent-color: #2fae86; }
.pack-body ul.ticks input:checked + span { text-decoration: line-through; color: var(--muted); }
.pack-images { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 14px; }
.pack-images figure { margin: 0; flex: 1 1 100%; }
.pack-images figure.size-small { flex: 0 1 calc(50% - 7px); min-width: 220px; }
.pack-images img { display: block; width: 100%; height: auto; border-radius: 12px; border: 1px solid rgba(91,116,135,.2); background: #fff; }
.pack-images figcaption { font-size: .9rem; color: var(--muted); margin-top: 6px; text-align: center; }
.pack mark { background: var(--sun); color: #12324a; border-radius: 3px; padding: 0 2px; }
.unset { color: var(--coral); font-style: italic; }
.locked { display: inline-block; background: #e2f4fd; color: #12324a; padding: 0 8px; border-radius: 999px; font-size: .92em; font-weight: 600; }
.preview-note { background: #fff3cf; color: #12324a; }
.no-results { text-align: center; font-size: 1.1rem; }
.pack-links { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-weight: 600; }
.pack-links a { color: var(--sky-deep); }
.pack-link { position: relative; transition: transform .12s; }
.pack-link:hover { transform: translateY(-3px); }
.pack-link h2 { margin: 10px 0 4px; }
.pack-link p { margin: 0; color: var(--muted); }
.pack-link.welcome { border-top: 6px solid var(--sky); }
.pack-link.departure { border-top: 6px solid var(--sun); }
.booking-card h2 a { color: inherit; text-decoration: none; }

/* The Packs editor. */
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.tabs a { padding: 8px 16px; border-radius: 999px; background: var(--card); color: var(--sea); font-weight: 700; text-decoration: none; }
.tabs a.on { background: var(--sky-deep); color: #fff; }
.tabs a.preview { margin-left: auto; background: var(--sun); color: #12324a; }
.warn { border-left: 6px solid var(--sun); }
.help code, .details code { background: rgba(110,198,241,.18); padding: 1px 5px; border-radius: 6px; }
.head-row { display: grid; grid-template-columns: 110px 1fr; gap: 0 14px; }
textarea { display: block; width: 100%; margin-top: 6px; padding: 10px 12px; font: inherit; font-weight: 400; line-height: 1.5; border: 1px solid #b9d3e3; border-radius: 10px; background: var(--foam); color: var(--ink); resize: vertical; }
.pack-edit .actions, .image-edit .actions { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin: 10px 0; }
button.danger { color: var(--coral); }
.image-edit { display: grid; grid-template-columns: 140px 1fr; gap: 16px; padding: 14px 0; border-top: 1px dashed rgba(91,116,135,.3); }
.image-edit img { width: 100%; border-radius: 10px; border: 1px solid rgba(91,116,135,.2); }
.image-edit.stale { background: #fff6e0; margin: 0 -22px; padding: 14px 22px; }
.add-image summary { cursor: pointer; font-weight: 700; color: var(--sky-deep); margin-top: 10px; }
label.span { grid-column: 1 / -1; }
@media (max-width: 560px) { .image-edit { grid-template-columns: 1fr; } .pack-hero h1 { max-width: 100%; } }
@media (prefers-color-scheme: dark) {
  .bubble, .locked { background: #18405c; color: var(--ink); }
  .pack-section:nth-of-type(n) .bubble { background: #18405c; }
  .image-edit.stale { background: #3a3215; }
}

/* Printing, or saving as PDF from the print dialog: every section, no tools,
   colours kept. */
@media print {
  @page { margin: 12mm; }
  .no-print, .bar, .foot, .pack-links, .settings-side, .settings-head { display: none !important; }
  .settings { display: block; padding: 0; }
  main { max-width: none; padding: 0; }
  .pack-hero { box-shadow: none; padding-bottom: 50px; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .pack-hero .waves { fill: #fff; }
  .pack-section, .pack-section[hidden] { display: block !important; box-shadow: none; border: 1px solid #cfe6f3; border-top-width: 6px; break-inside: auto; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .pack-section h2 { break-after: avoid; }
  .pack-images figure { break-inside: avoid; }
  .pack-images figure.size-full img { max-height: 235mm; width: auto; max-width: 100%; margin: 0 auto; }
  .pack mark { background: none; padding: 0; }
  .pack-body a { color: #12324a; }
  /* One section on its own: bigger type to read on a wall, the house's name at the foot. */
}
.print-foot { display: none; align-items: center; justify-content: center; gap: 8px; margin-top: 10mm; color: #5b7487; font: 600 11pt Fredoka, sans-serif; }
.print-foot img { width: 22px; height: 22px; }
.section-print { margin: 14px 0 0; text-align: right; font-size: .9rem; }

.dropzone { position: relative; border: 2px dashed #b9d3e3; border-radius: var(--radius); padding: 4px 18px 8px; transition: background .15s, border-color .15s; }
.dropzone:focus-within { border-color: var(--sky-deep); }
.dropzone-input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
html:not(.js) .dropzone-input { position: static; opacity: 1; }
.dropzone.over { border-color: var(--sky-deep); background: rgba(110,198,241,.15); }
details summary { cursor: pointer; font-weight: 600; color: var(--sky-deep); }

/* Version info: the release notes, a day a card. */
.changelog h3 { margin: 18px 0 4px; }
.changelog h4 { margin: 10px 0 4px; }
.changelog ul { margin: 0; padding: 0; list-style: none; }
.changelog li { display: flex; gap: 8px; align-items: baseline; margin-bottom: 6px; }
/* Quotes: two buttons side by side, a step's status as a pill, and the
   steps so far as a row of dated stops. */
.actions { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin: 12px 0; }
button.secondary, a.button.secondary { background: var(--card); color: var(--sky-deep); box-shadow: inset 0 0 0 2px var(--sky-deep); }
button.secondary:hover, a.button.secondary:hover { background: var(--sky-deep); color: #fff; }
.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .85em; font-weight: 700; background: #dde7ee; color: #12324a; white-space: nowrap; }
.pill.quoted { background: #fff3c4; }
.pill.accepted, .pill.deposit_paid { background: #cfeaff; }
.pill.fully_paid, .pill.deposit_refunded { background: #c9f0dc; }
.pill.closed { background: #e6eaed; color: #5b7487; }
.pill.overdue { background: #ffd9cf; color: #a83a26; }
.steps { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-wrap: wrap; gap: 6px 0; }
.steps li { display: flex; flex-direction: column; align-items: center; min-width: 96px; padding: 0 6px; text-align: center; font-size: .9em; color: var(--muted); position: relative; }
.steps li::before { content: ''; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--sky-deep); background: var(--card); margin-bottom: 4px; }
.steps li.done::before { background: var(--sky-deep); }
.steps li.done, .steps li.current { color: inherit; }
.steps li.current { font-weight: 700; }
.steps li .on { font-size: .85em; color: var(--muted); font-weight: 400; }
.step-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0 16px; align-items: end; }
.step-form .check { display: flex; gap: 8px; align-items: center; font-weight: 400; margin: 12px 0; }
.step-form .check input { width: auto; }

/* Sortable headings: the whole heading is the button, an arrow marks the sort. */
th a.sort { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
th a.sort:hover { color: var(--sky-deep); }
th a.sort .arrow { font-size: .75em; color: var(--sky-deep); min-width: 1em; }

/* Pricing: the year's peaks and holidays, each with its one-year change. */
.rules td { vertical-align: top; }
.rules tr:has(+ tr details) td { border-bottom: 0; }
.rules details { margin: -4px 0 4px; }
.rules details form { margin-top: 8px; }
.rules label.span { display: flex; gap: 8px; align-items: center; margin: 8px 0; }
.rules label.span input { width: auto; height: auto; }
@media (max-width: 640px) { .rules th:nth-child(5), .rules td:nth-child(5):not([colspan]) { display: none; } }
.period .wide { grid-column: 1 / -1; }

/* View as guest: the admin's way back, on every page while it's on. */
.view-as { display: flex; align-items: center; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; margin: 12px 0 0; padding: 10px 16px; border-radius: var(--radius); background: var(--sun); color: #12324a; box-shadow: 0 4px 14px rgba(14,90,138,.18); }
.view-as p { margin: 0; }
.view-as button { background: var(--sea); }
.view-as-start { display: flex; align-items: center; gap: 8px 14px; flex-wrap: wrap; margin-top: 8px; }
@media print { .view-as { display: none; } }

/* What a dropped or pasted Airbnb email did. */
.result { border-radius: 12px; padding: 4px 16px; margin: 12px 0 16px; border-left: 6px solid; }
.result p { margin: 8px 0; }
.result-head { font-weight: 700; font-size: 1.1rem; }
.result.ok { border-color: #2e9d6a; background: rgba(46,157,106,.10); }
.result.ok .result-head { color: #2e9d6a; }
.result.bad { border-color: var(--coral); background: rgba(226,97,75,.10); }
.result.bad .result-head { color: var(--coral); }

/* Activity: the log, a row a thing that happened; what went wrong stands out. */
.table-wrap { overflow-x: auto; }
.activity td { vertical-align: top; }
.activity .nowrap { white-space: nowrap; }
.activity .detail { word-break: break-word; }
.activity tr.problem td { background: #fff1ec; }
.activity tr.problem td:first-child { box-shadow: inset 3px 0 0 #e8735a; }
.dismiss { float: right; margin: -2px -6px 0 8px; background: none; border: 0; padding: 2px 8px; font-size: 1.3em; line-height: 1; color: inherit; cursor: pointer; }
.file-results { list-style: none; margin: 4px 0 0; padding: 0; }
.file-results li { padding: 4px 0; }
.file-results li + li { border-top: 1px solid rgba(0,0,0,.06); }
.file-results .tag { display: inline-block; min-width: 92px; margin-right: 6px; font-weight: 700; color: #2e9d6a; }
.file-results .failed .tag { color: var(--coral); }

/* The Bookings filter: Still to come, Complete, All, as pills with counts. */
.filter { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.filter a { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 999px; border: 1px solid #b9d3e3; color: var(--sea); font-weight: 600; text-decoration: none; }
.filter a:hover { background: rgba(110,198,241,.15); }
.filter a[aria-current] { background: var(--sky-deep); border-color: var(--sky-deep); color: #fff; }
.filter .count { font-size: .8em; font-weight: 700; opacity: .75; }

/* The booking page's guest mobile, and the list's reminder to add one. */
.hint { display: block; margin-top: 4px; font-size: .88rem; font-weight: 400; color: var(--muted); }
.hint.error { color: var(--coral); font-weight: 600; }
.grid .wide { grid-column: 1 / -1; margin: 6px 0 0; }
.grid [hidden] { display: none; }
.needs { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: var(--sun); color: #12324a; font-size: .78rem; font-weight: 700; white-space: nowrap; }
button.small { padding: 5px 12px; font-size: .85rem; white-space: nowrap; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* The Bookings calendar: a month, Monday first, each stay a bar across its
   nights, coloured by where it came from. */
.bookings-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.bookings-head .view-toggle { margin: 0; }
.cal-nav { display: flex; align-items: center; gap: 10px; margin: 6px 0 12px; }
.cal-nav h2 { margin: 0; min-width: 9em; text-align: center; font-size: 1.3rem; }
.cal-step { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 999px; border: 1px solid #b9d3e3; color: var(--sea); font-size: 1.4rem; text-decoration: none; }
.cal-step:hover, .cal-today:hover { background: rgba(110,198,241,.15); }
.cal-today { white-space: nowrap; margin-left: auto; padding: 6px 14px; border-radius: 999px; border: 1px solid #b9d3e3; color: var(--sea); font-weight: 600; text-decoration: none; }
.calendar { border: 1px solid rgba(0,0,0,.08); border-radius: 12px; overflow: hidden; }
.cal-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-week { display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); }
.cal-days span { padding: 6px 8px; font-size: .8rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.cal-week { grid-template-rows: 28px repeat(var(--lanes), 26px) 8px; row-gap: 3px; border-top: 1px solid rgba(0,0,0,.08); }
.cal-day { grid-row: 1 / -1; border-left: 1px solid rgba(0,0,0,.06); padding: 4px 8px; min-height: 76px; }
.cal-day:first-child { border-left: 0; }
.cal-day.out { background: rgba(0,0,0,.025); }
.cal-day.out .num { opacity: .45; }
.cal-day .num { font-size: .85rem; font-weight: 600; }
.cal-day.today .num { display: inline-block; min-width: 1.7em; padding: 1px 6px; border-radius: 999px; background: var(--sky-deep); color: #fff; text-align: center; }
.cal-bar { z-index: 1; margin: 0 2px; padding: 3px 8px; border-radius: 6px; font-size: .82rem; font-weight: 600; line-height: 20px; color: #fff; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-bar:hover { filter: brightness(1.08); text-decoration: underline; }
.cal-bar.before { margin-left: 0; border-top-left-radius: 0; border-bottom-left-radius: 0; }
.cal-bar.after { margin-right: 0; border-top-right-radius: 0; border-bottom-right-radius: 0; }
.src-airbnb { background: var(--coral); }
.src-stayz { background: #6b5bd2; }
.src-direct { background: #1f9a8a; }
.src-family { background: #9aa8b2; }
.cal-bar.src-family { color: #1f3242; cursor: default; }
.cal-bar.src-family:hover { filter: none; text-decoration: none; }
.cal-bar:not(.src-airbnb):not(.src-stayz):not(.src-direct):not(.src-family), .cal-swatch:not(.src-airbnb):not(.src-stayz):not(.src-direct):not(.src-family) { background: var(--sea); }
/* Airbnb's blocked dates for a stay it didn't take: a thin strip just under
   the stay's bar. A stay with nights Airbnb hasn't blocked gets a red edge. */
.cal-airbnb-block { align-self: end; height: 4px; margin: 0 2px -4px; border-radius: 2px; background: repeating-linear-gradient(90deg, #5d6b75 0 6px, #9aa8b2 6px 9px); }
.cal-airbnb-block.before { margin-left: 0; }
.cal-airbnb-block.after { margin-right: 0; }
.cal-bar.open-on-airbnb { box-shadow: inset 0 0 0 2px #d33c2c; }
.cal-airbnb-key { display: inline-block; width: 14px; height: 4px; margin: 0 5px 3px 10px; border-radius: 2px; background: repeating-linear-gradient(90deg, #5d6b75 0 6px, #9aa8b2 6px 9px); }
.cal-key { margin: 10px 0 0; font-size: .88rem; }
.cal-swatch { display: inline-block; width: 12px; height: 12px; margin: 0 5px -1px 10px; border-radius: 3px; }
.cal-swatch:first-child { margin-left: 0; }
@media (max-width: 600px) {
  .cal-nav { gap: 6px; }
  .cal-nav h2 { min-width: 0; font-size: 1.1rem; }
  .cal-today { padding: 5px 10px; font-size: .85rem; }
  .cal-day { padding: 3px 4px; min-height: 60px; }
  .cal-days span { padding: 4px; font-size: .7rem; }
  .cal-bar { margin: 0 1px; padding: 2px 4px; font-size: .72rem; }
}

/* Bookings totals per financial year: the year's line, then each source. */
.totals { width: 100%; max-width: 640px; }
.totals tbody + tbody tr.fy > * { padding-top: 18px; }
.totals tr.fy > * { font-weight: 700; border-bottom: 1px solid rgba(0,0,0,.12); }
.totals tr.fy th { text-align: left; color: var(--sea); font-size: 1.05rem; }
.totals tr.src td { color: var(--muted); border-bottom: 0; }
.totals tr.src td:first-child { padding-left: 18px; }
.totals .hint { font-weight: 400; }
.holiday-check { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; } .holiday-check p { margin: 0; flex: 1 1 320px; }

/* The property switcher beside the version, once there are two or more. */
.property-switch { margin: 0; }
.property-switch select { padding: 5px 30px 5px 12px; border-radius: 999px; border: 2px solid rgba(255,255,255,.6); background-color: rgba(255,255,255,.18); color: #fff; font-weight: 600; width: auto; }
.property-switch select option { color: #1b2a3a; }
.choose-property { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---- On a phone: an app. The top bar is a slim title bar under the
   phone's own status bar, the menu is a tab bar along the foot (the rest
   behind More, as a sheet that rises above it), cards run edge to edge, list
   tables become a card a row, and everything is a thumb's size. ---- */
.tabbar { display: none; }
@media (max-width: 720px) {
  html { -webkit-tap-highlight-color: transparent; }
  body { background: linear-gradient(180deg, var(--sky) 0, #bfe6f8 200px, var(--sand) 200px) no-repeat, var(--sand); }
  .bar { padding-top: env(safe-area-inset-top); }
  .bar-inner { padding: 8px max(16px, env(safe-area-inset-left)); flex-wrap: nowrap; }
  .brand { font-size: 1.3rem; }
  .brand-sun { width: 26px; height: 26px; }
  .js .menu-button { display: none; }

  .js .tabbar {
    display: flex; position: fixed; z-index: 20; left: 0; right: 0; bottom: 0;
    padding: 6px max(6px, env(safe-area-inset-right)) calc(6px + env(safe-area-inset-bottom)) max(6px, env(safe-area-inset-left));
    background: rgba(255,255,255,.92); -webkit-backdrop-filter: saturate(180%) blur(16px); backdrop-filter: saturate(180%) blur(16px);
    border-top: 1px solid rgba(14,90,138,.15);
  }
  .tabbar a, .tabbar button { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 2px; border-radius: 12px; background: none; color: var(--muted); font-size: .72rem; font-weight: 600; text-decoration: none; }
  .tabbar svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .tabbar .tab-more svg { fill: currentColor; stroke: none; }
  .tabbar span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .tabbar [aria-current="page"], .tabbar .tab-more.on, .tabbar .tab-more[aria-expanded="true"] { color: var(--sky-deep); }
  .tabbar button:hover { background: none; }
  .js main { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }

  /* More: the pages that aren't tabs, and Log out, as a sheet. */
  .js .menu { position: fixed; z-index: 19; left: 8px; right: 8px; bottom: calc(70px + env(safe-area-inset-bottom)); max-height: 70vh; overflow-y: auto; padding: 8px; gap: 0; border-radius: 18px; background: var(--card); box-shadow: 0 0 0 100vmax rgba(18,50,74,.35), 0 10px 30px rgba(0,0,0,.25); }
  .js .menu a.in-tabs { display: none; }
  .js .menu a, .js .menu .logout { color: var(--ink); border-radius: 12px; padding: 14px 16px; }
  .js .menu a + a { border-top: 1px solid rgba(91,116,135,.15); }
  .js .menu a:hover { background: rgba(110,198,241,.15); }
  .js .menu a[aria-current="page"] { background: rgba(110,198,241,.2); color: var(--sea); }
  .js .menu .logout { border: 0; margin-top: 4px; color: var(--coral); background: rgba(226,97,75,.08); }

  main { padding: 4px 10px 48px; }
  .card { padding: 16px; margin: 12px 0; border-radius: 18px; }
  .card.narrow { margin: 24px auto; }
  .hero h1 { font-size: 1.7rem; }
  h1 { font-size: 1.6rem; margin: .2em 0 .4em; }

  /* A thumb's size: 44px to tap, and 16px text so the phone doesn't zoom. */
  input:not([type=checkbox]):not([type=radio]), select, textarea { font-size: 16px; min-height: 46px; }
  button, a.button { min-height: 44px; }
  button.small, button.link, .dismiss { min-height: 0; }
  .grid > button, .actions > button, .actions > a.button, form:not(.inline) > button[type=submit]:only-of-type { width: 100%; }
  .filter { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-left: -4px; margin-right: -4px; padding: 0 4px 4px; }
  .filter::-webkit-scrollbar { display: none; }
  .filter a { flex: none; padding: 9px 14px; }
  .details { grid-template-columns: 1fr; gap: 0; }
  .details dt { margin-top: 10px; font-size: .85rem; }

  /* A list table: a card a row, the first cell its title, each other cell a
     labelled line. */
  table.stack, table.stack tbody, table.stack tr, table.stack td { display: block; }
  table.stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  table.stack tr { position: relative; padding: 12px 14px; margin: 0 0 10px; border-radius: 14px; background: var(--foam); border: 1px solid rgba(91,116,135,.18); }
  table.stack tr[hidden] { display: none; }
  table.stack td { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; border: 0; text-align: right; }
  table.stack td.num { text-align: right; }
  table.stack td::before { content: attr(data-label); flex: none; color: var(--muted); font-weight: 600; font-size: .88rem; text-align: left; }
  table.stack td:not([data-label])::before, table.stack td[data-label=""]::before { content: none; }
  table.stack td:not([data-label]) { justify-content: flex-start; text-align: left; }
  table.stack td:first-child { display: block; text-align: left; font-weight: 700; font-size: 1.05rem; padding-bottom: 6px; }
  table.stack td:first-child::before { content: none; }
  table.stack td:empty { display: none; }
  table.stack td a { overflow-wrap: anywhere; }
  table.stack tr.cancelled td { text-decoration: none; }
  table.stack tr.cancelled td:first-child { text-decoration: line-through; }
  table.stack tr.cancelled { opacity: .7; }
  .activity.stack tr.problem td { background: none; box-shadow: none; }
  .activity.stack tr.problem { background: #fff1ec; border-left: 4px solid #e8735a; }
  .activity.stack .nowrap { white-space: normal; }
  table.stack td details { width: 100%; }
  .table-wrap { overflow: visible; }
  .totals, .rules, ._quote table { font-size: .95rem; }

  .pack-hero { margin: 4px -2px 14px; padding: 26px 18px 56px; border-radius: 20px; }
  .pack-tools { top: calc(50px + env(safe-area-inset-top)); margin: 0 -10px; padding: 8px 10px; }
  .pack-toc { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
  .pack-toc::-webkit-scrollbar { display: none; }
  .pack-toc a { flex: none; }
  .pack-section h2 { font-size: 1.3rem; }
  .bubble { width: 40px; height: 40px; font-size: 1.3rem; }
  .pack-body ul.ticks input { width: 26px; height: 26px; }
  .tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .tabs a { flex: none; }
  .view-as { position: sticky; top: calc(50px + env(safe-area-inset-top)); z-index: 8; }
}
@media (max-width: 720px) and (prefers-color-scheme: dark) {
  .js .tabbar { background: rgba(16,40,58,.92); border-top-color: rgba(255,255,255,.08); }
  .activity.stack tr.problem { background: #3a2520; }
}
/* Opened from the home screen: no browser bar, so the page owns its edges. */
@media (display-mode: standalone) { body { overscroll-behavior-y: none; } }
@media print { .tabbar { display: none !important; } main { padding-bottom: 0 !important; } }

/* ---- Settings: the admin pages look like System Settings. A sidebar of
   them, each with a coloured tile, the open one highlighted; the page opens
   with its big tile and title, then grouped rounded panels whose fields are
   rows: the label on the left, the box on the right. On a phone the sidebar
   is the More sheet, in the same tiles, like iPhone Settings. ---- */
.tile { display: inline-grid; place-items: center; flex: none; width: 26px; height: 26px; border-radius: 7px; background: var(--tile, var(--sky-deep)); box-shadow: inset 0 -1px 0 rgba(0,0,0,.12); }
.tile svg { width: 17px; height: 17px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tile.big { width: 72px; height: 72px; border-radius: 18px; box-shadow: 0 4px 12px rgba(14,90,138,.25), inset 0 -2px 0 rgba(0,0,0,.12); }
.tile.big svg { width: 42px; height: 42px; stroke-width: 1.8; }
.menu .tile { display: none; }
main:has(> .settings) { max-width: 1160px; }
.settings { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 24px; align-items: start; padding-top: 16px; }
.settings-side { position: sticky; top: 84px; padding: 12px; border-radius: 18px; background: rgba(255,255,255,.72); -webkit-backdrop-filter: saturate(180%) blur(18px); backdrop-filter: saturate(180%) blur(18px); box-shadow: 0 6px 20px rgba(14,90,138,.12); }
.side-account { display: flex; align-items: center; gap: 12px; padding: 6px 8px 14px; margin-bottom: 8px; border-bottom: 1px solid rgba(91,116,135,.18); }
.side-account .avatar { display: grid; place-items: center; flex: none; width: 46px; height: 46px; border-radius: 50%; background: linear-gradient(135deg, var(--sea), var(--sky)); color: #fff; font-weight: 700; }
.side-account strong { display: block; overflow-wrap: anywhere; }
.side-account small { color: var(--muted); }
.side-list { display: flex; flex-direction: column; gap: 2px; }
.side-list a { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 10px; color: var(--ink); text-decoration: none; font-weight: 500; }
.side-list a:hover { background: rgba(110,198,241,.18); }
.side-list a[aria-current="page"] { background: var(--sky-deep); color: #fff; font-weight: 600; }
.settings-main > :first-child { margin-top: 0; }
.settings-head { display: grid; justify-items: center; gap: 8px; padding: 28px 24px 4px; border-radius: 18px 18px 0 0; background: var(--card); }
.settings-title { margin: 0; font-size: 1.9rem; font-weight: 800; color: var(--ink); }
.settings-head + .hero { margin: 0 0 16px; padding: 4px 24px 24px; border-radius: 0 0 18px 18px; background: var(--card); color: var(--muted); text-align: center; text-shadow: none; }
.settings-head + .hero h1 { display: none; }
.settings-head + .hero p { margin: 0 auto; max-width: 560px; }
.settings-head:not(:has(+ .hero)) { padding-bottom: 20px; margin-bottom: 16px; border-radius: 18px; }
.settings-head + .card > h1:first-child { display: none; }
.settings-main .card { margin: 0 0 16px; border-radius: 16px; padding: 16px 20px; box-shadow: 0 1px 3px rgba(14,90,138,.10); border: 1px solid rgba(91,116,135,.12); }
.settings-main .card.narrow { max-width: none; margin: 0 0 16px; }
.settings-main .card h2 { font-size: 1.15rem; margin: 4px 0 8px; }
.settings-main .card > .muted:first-of-type, .settings-main .card > h2 + p { margin-top: 0; }
/* Fields as rows: the label on the left, its box on the right, a hairline between. */
.settings-main .grid:not(.image-edit .grid) { display: block; }
.settings-main :is(.grid, form:not(.period):not(.image-edit):not(.inline):not(.holiday-check):not(.pick):not(.dropzone)) > label:not(.tick):not(.span):not(.wide):not(:has(textarea, input[type=file], input[type=checkbox])) {
  display: flex; align-items: center; justify-content: space-between; gap: 8px 16px; margin: 0; padding: 10px 0; border-bottom: 1px solid rgba(91,116,135,.15); font-weight: 500;
}
.settings-main :is(.grid, form:not(.period):not(.image-edit):not(.inline):not(.holiday-check):not(.pick):not(.dropzone)) > label:not(.tick):not(.span):not(.wide):not(:has(textarea, input[type=file], input[type=checkbox])) > :is(input, select) {
  flex: 0 1 55%; width: auto; min-width: 0; margin: 0;
}
.settings-main .grid > button { margin-top: 14px; }
.settings-main .grid > h3 { margin-top: 16px; }
@media (prefers-color-scheme: dark) {
  .settings-side { background: rgba(16,40,58,.78); }
}
@media (max-width: 900px) {
  .settings { grid-template-columns: minmax(0, 1fr); padding-top: 4px; }
  .settings-side { display: none; }
}
@media (max-width: 720px) {
  .js .menu .tile { display: inline-grid; margin-right: 12px; vertical-align: middle; }
  .js .menu a { display: flex; align-items: center; }
  .settings-head { padding: 20px 16px 2px; }
  .tile.big { width: 60px; height: 60px; border-radius: 15px; }
  .tile.big svg { width: 34px; height: 34px; }
  .settings-title { font-size: 1.5rem; }
  .settings-head + .hero { padding: 2px 16px 18px; }
  .settings-main .card { padding: 14px 16px; }
  .settings-main :is(.grid, form:not(.period):not(.image-edit):not(.inline):not(.holiday-check):not(.pick):not(.dropzone)) > label:not(.tick):not(.span):not(.wide):not(:has(textarea, input[type=file], input[type=checkbox])) > :is(input, select) { flex-basis: 48%; }
}
h1 .for-house { color: inherit; opacity: .7; font-weight: 500; }
@media (max-width: 720px) { .property-switch select { max-width: 42vw; text-overflow: ellipsis; } }

/* The stay link: who's next above the Bookings list, and the preview before sending. */
.next-guests { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 10px; }
.next-guests li { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; background: var(--foam); border-radius: 14px; padding: 10px 14px; }
.next-guests .who { flex: 1 1 220px; }
.next-guests .who strong a { color: inherit; }
.stay-preview { width: 100%; height: 760px; border: 0; border-radius: 14px; background: #f6e7c8; box-shadow: inset 0 0 0 1px rgba(14,90,138,.15); }
.sms-preview { max-width: 340px; background: #e9e9eb; color: #000; border-radius: 18px 18px 18px 4px; padding: 10px 14px; line-height: 1.4; white-space: pre-wrap; overflow-wrap: anywhere; }
.sent-to { margin: 0 0 10px; }

/* Settings home: the settings pages as rows, each a tile, a name, what it's
   for and a chevron; then Log out. The sidebar's Log out sits under the name. */
.settings-list { padding: 6px 0; }
.settings-list a { display: flex; align-items: center; gap: 14px; padding: 12px 20px; color: var(--ink); text-decoration: none; }
.settings-list a + a { border-top: 1px solid rgba(91,116,135,.14); }
.settings-list a:hover { background: rgba(110,198,241,.12); }
.settings-list a > span:last-child { flex: 1; min-width: 0; }
.settings-list a::after { content: "›"; color: var(--muted); font-size: 1.5rem; line-height: 1; }
.settings-list strong { display: block; }
.settings-list small { display: block; color: var(--muted); }
.settings-list .tile { width: 32px; height: 32px; border-radius: 8px; }
.settings-list .tile svg { width: 20px; height: 20px; }
.settings-list form { margin: 0; }
button.logout-row { display: block; width: 100%; text-align: left; padding: 12px 20px; border-radius: 0; background: none; color: var(--coral); }
button.logout-row:hover { background: rgba(226,97,75,.08); }
button.logout-row small { color: var(--muted); font-weight: 400; margin-left: 6px; }
.side-logout { margin: -6px 8px 10px; }
.settings-main .settings-list a, .settings-main .settings-list .logout-row { padding-left: 20px; padding-right: 20px; }
.settings-main .card.settings-list { padding: 6px 0; }
/* A cleaning day on the Bookings calendar: a small teal chip by the date. */
.cal-clean { display: inline-flex; align-items: center; gap: 3px; margin-left: 4px; padding: 0 6px 0 4px; border-radius: 999px; background: #d6f2ec; color: #136e62; font-size: .72rem; font-weight: 700; line-height: 18px; vertical-align: 1px; cursor: default; }
.cal-clean svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
.cal-key .cal-clean { margin-left: 10px; }
@media (prefers-color-scheme: dark) { .cal-clean { background: #144a44; color: #bff0e6; } }
@media (max-width: 600px) { .cal-day { white-space: nowrap; overflow: hidden; } .cal-clean { margin-left: 1px; padding: 0 2px; } .cal-day .cal-clean .label { display: none; } }
.auto-next, .auto-sent { margin: 0 0 12px; padding-left: 20px; }
.auto-sent { color: var(--muted); font-size: .92rem; }
#stay-link h3 { margin: 18px 0 4px; color: var(--sea); }

/* A cleaning day in the Bookings list: a light teal row with the Clean chip. */
tr.clean td { background: #effaf7; color: #136e62; font-weight: 600; }
tr.clean td:first-child { box-shadow: inset 3px 0 0 #1f9a8a; }
tr.clean .cal-clean { margin: 0; font-size: .8rem; }
tr.clean td { white-space: nowrap; }
tr.clean .clean-text { display: block; max-width: 22em; overflow: hidden; text-overflow: ellipsis; }
tr.clean td:nth-child(2) { white-space: nowrap; }
@media (prefers-color-scheme: dark) { tr.clean td { background: #10332f; color: #bff0e6; } }
@media (max-width: 720px) {
  table.stack tr.clean { background: #effaf7; border-color: #a9e0d4; }
  table.stack tr.clean td { background: none; box-shadow: none; }
  table.stack tr.clean td:empty { display: none; }
}

/* Phone numbers and addresses: tap to message, call or map (public/contact.js). */
a.phone, a.map { color: inherit; text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 3px; }
a.map::after { content: " 📍"; text-decoration: none; display: inline-block; }
.hero .contact a { color: var(--foam); }
.contact-menu { position: fixed; z-index: 50; min-width: 200px; background: var(--card); color: var(--ink); border-radius: 14px; padding: 6px; box-shadow: 0 10px 30px rgba(14,90,138,.3); }
.contact-menu p { margin: 6px 10px 8px; font-weight: 700; color: var(--muted); font-size: .9rem; }
.contact-menu a, .contact-menu button { display: block; width: 100%; text-align: left; padding: 10px 12px; border-radius: 10px; background: none; color: var(--ink); font: inherit; font-weight: 600; text-decoration: none; }
.contact-menu a:hover, .contact-menu button:hover, .contact-menu a:focus, .contact-menu button:focus { background: #e3f3fc; color: var(--sea); outline: none; }
.contact-menu .cancel { color: var(--muted); }
@media (prefers-color-scheme: dark) { .contact-menu a:hover, .contact-menu button:hover, .contact-menu a:focus, .contact-menu button:focus { background: #1a3446; color: var(--sky); } }
@media (max-width: 640px) {
  .contact-menu { left: 8px !important; right: 8px; top: auto !important; bottom: calc(8px + env(safe-area-inset-bottom)); padding: 8px; }
  .contact-menu a, .contact-menu button { text-align: center; padding: 14px; font-size: 1.05rem; }
}
@media print { a.map::after { content: ""; } a.phone, a.map { text-decoration: none; } }

/* The Bookings list: Arrive and Depart the same width, each date on one line,
   and each row's actions behind a three-dot button. */
#bookings th:nth-child(2), #bookings th:nth-child(3), #bookings td:nth-child(2), #bookings td:nth-child(3) { width: 7.5em; white-space: nowrap; }
#bookings td.row-actions { width: 1%; text-align: right; }
.row-menu { position: relative; display: inline-block; }
.row-menu summary { list-style: none; display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 999px; border: 1px solid #b9d3e3; color: var(--sea); font-size: 1.3rem; line-height: 1; cursor: pointer; user-select: none; }
.row-menu summary::-webkit-details-marker { display: none; }
.row-menu summary:hover, .row-menu[open] summary { background: rgba(110,198,241,.18); }
.row-menu summary:focus-visible { outline: 2px solid var(--sky-deep); outline-offset: 2px; }
.menu-list { position: absolute; right: 0; top: calc(100% + 4px); z-index: 20; min-width: 180px; padding: 6px; border-radius: 12px; background: var(--card); border: 1px solid rgba(91,116,135,.25); box-shadow: 0 10px 28px rgba(18,50,74,.18); text-align: left; }
.menu-list form { margin: 0; }
.menu-list a, .menu-list button { display: block; width: 100%; padding: 8px 12px; border: 0; border-radius: 8px; background: none; color: var(--ink); font: inherit; font-weight: 600; text-align: left; text-decoration: none; white-space: nowrap; cursor: pointer; }
.menu-list a:hover, .menu-list button:hover, .menu-list a:focus-visible, .menu-list button:focus-visible { background: rgba(110,198,241,.18); color: var(--sea); outline: none; }
@media (max-width: 720px) {
  table.stack td.row-actions { position: absolute; top: 8px; right: 8px; width: auto; padding: 0; }
  table.stack td.row-actions::before { content: none; }
  table.stack tr:has(td.row-actions) td:first-child { padding-right: 44px; }
}

/* A card's main action, top right: the Quotes page's New quote button. */
.card-action { display: flex; justify-content: flex-end; margin: 0 0 12px; }
/* With the script running, the Quote page works itself out as you type. */
html.js .no-js-only { display: none; }

/* Links readable in dark mode too (Safari's defaults are dark blue and purple). */
main a:not([class]) { color: var(--sky-deep); }
@media (prefers-color-scheme: dark) { main a:not([class]) { color: var(--sky); } }

/* The code page's Send a new code, greyed out while it counts down. */
.resend { margin: 16px 0 4px; }
button:disabled, button:disabled:hover { opacity: .55; cursor: default; background: var(--card); color: var(--muted); box-shadow: inset 0 0 0 2px rgba(91,116,135,.4); }

/* Messages (Settings): each automatic message with its on/off switch. */
.auto-message-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.auto-message-head h2 { margin: 0; }
.auto-message-head form { margin: 0; }
.auto-message.is-off h2, .auto-message.is-off .auto-facts { opacity: .55; }
.switch { position: relative; width: 52px; min-width: 52px; height: 32px; min-height: 0; padding: 0; border: 0; border-radius: 999px; background: #c5d0d8; cursor: pointer; transition: background .2s; }
.switch span { position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s; }
.switch[aria-checked="true"] { background: #34c759; }
.switch[aria-checked="true"] span { transform: translateX(20px); }
.auto-facts { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 12px 0; }
.auto-facts dt { font-weight: 700; color: var(--muted); }
.auto-facts dd { margin: 0; }
.email-preview { width: 100%; height: 520px; border: 1px solid #dde7ee; border-radius: 12px; background: #f6e7c8; }
.text-bubble { max-width: 420px; padding: 10px 14px; border-radius: 18px 18px 18px 4px; background: #e9e9eb; color: #12324a; white-space: pre-wrap; }
.text-bubble.plain-email { max-width: 560px; border-radius: 12px; background: #f3f6f8; }

/* The Bookings list colour-coded like its Clean rows: guests a light beach
   blue, family blocks a light grey, each with a coloured left edge. */
tr.guest td { background: #eef7fd; }
tr.guest td:first-child { box-shadow: inset 3px 0 0 var(--sky-deep); }
tr.family td { background: #f1f3f5; }
tr.family td:first-child { box-shadow: inset 3px 0 0 #9aa8b2; }
@media (prefers-color-scheme: dark) {
  tr.guest td { background: #12324a; }
  tr.family td { background: #1f2c36; }
}
@media (max-width: 720px) {
  table.stack tr.guest { background: #eef7fd; border-color: #b9dcf2; box-shadow: inset 4px 0 0 var(--sky-deep); }
  table.stack tr.family { background: #f1f3f5; border-color: #d3dae0; box-shadow: inset 4px 0 0 #9aa8b2; }
  table.stack tr.clean { box-shadow: inset 4px 0 0 #1f9a8a; }
  table.stack tr.guest td, table.stack tr.family td { background: none; box-shadow: none; }
}

/* Back, at the top of every page but the top bar's own. */
a.back { display: inline-flex; align-items: center; gap: 2px; margin: 12px 0 0; padding: 6px 14px 6px 8px; border-radius: 999px; background: rgba(255,255,255,.75); color: var(--sea); font-weight: 600; text-decoration: none; box-shadow: 0 1px 4px rgba(14,90,138,.15); }
a.back:hover { background: #fff; }
a.back svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
main:has(> a.back) > .settings { padding-top: 12px; }
.pack-links a:last-child { margin-left: auto; }
@media (prefers-color-scheme: dark) {
  a.back { background: rgba(16,40,58,.8); color: var(--sky); }
  a.back:hover { background: rgba(16,40,58,1); }
}
@media (max-width: 720px) { a.back { margin-top: 8px; } }

/* Printing: last in the file so it wins over the settings layout, whose
   two-column grid Safari keeps when printing (it judges the screen-width
   rules by the window, not the paper), squeezing a pack into a narrow
   column. One section printed on its own fills the page in bigger type,
   with the house's name at the foot. */
@media print {
  .settings { display: block !important; padding: 0 !important; }
  a.back { display: none !important; }
  .settings-main, main, main:has(> .settings) { max-width: none !important; width: auto !important; margin: 0 !important; padding: 0 !important; }
  html.print-one .pack-hero, html.print-one .pack-section:not(.print-this) { display: none !important; }
  html.print-one .print-this { border: 0 !important; box-shadow: none !important; border-radius: 0 !important; padding: 0 !important; margin: 0 !important; font-size: 11pt; line-height: 1.35; }
  html.print-one .print-this h2 { font-size: 20pt; margin: 0 0 6pt; }
  html.print-one .print-this .pack-body p, html.print-one .print-this .pack-body ul { margin: 0 0 5pt; }
  html.print-one .print-this .pack-body li { margin: 0 0 2pt; }
  html.print-one .print-this .pack-images { flex-wrap: nowrap; gap: 10mm; justify-content: center; margin-top: 4pt; }
  html.print-one .print-this .pack-images figure.size-small { flex: 0 1 auto; min-width: 0; }
  html.print-one .print-this .pack-images img { height: 40mm; width: auto; max-width: 100%; margin: 0 auto; }
  html.print-one .print-this .pack-images figcaption { font-size: 10pt; }
  html.print-one .print-foot { display: flex; margin-top: 2mm; }
  html.print-one .print-this .pack-images figure { break-inside: avoid; }
}
