/* The look follows DESIGN.md (the hosts' design reference, 2026-12-01).
   Cream paper, navy ink, one terracotta accent. Colors are overwritten at
   startup from config.js. */
:root {
  --paper: #F8F4EF;           /* page background */
  --card: #FCFAF6;            /* cards */
  --line: #E6DFD3;            /* card borders and hairlines */
  --pill: #EFE9DF;            /* idle filter pills */
  --navy: #14223A;            /* all main text */
  --muted: #6A6660;           /* secondary text, the lightest text allowed */
  --muted-strong: #5E5A54;    /* text on idle pills */
  --terracotta: #AA593C;      /* the one accent */
  --terracotta-text: #9A4E33; /* terracotta for small text */
  --white: #FFFFFF;           /* text on terracotta */
  --clay-wash: #F1DDD1;       /* soft tag background */
  --field-line: #8A8379;      /* form field borders (3.6:1 on cards) */
  /* illustration only */
  --rust: #C27A57;
  --navy-mid: #2F4B62;
  --navy-soft: #5F7A8C;
  --mist: #A9B7BE;
  --sand: #EDE5D6;
  --cream-sun: #F4E6D5;
  --ochre: #D99A45;
  --clay: #8E4E36;
  --peach: #E7B996;
  --sage: #8E9C76;
  --forest: #3E5444;

  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --tap: 44px;
  --sidebar-w: 216px;
  --tabbar-h: 4.25rem;
  --hero-shadow: 0 10px 30px rgba(20, 34, 58, 0.06);
}

html { font-size: 100%; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--navy);
  background: var(--paper);
  overflow-x: clip;
}

a { color: var(--terracotta-text); }
a:hover { color: var(--navy); }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; color: var(--navy); margin: 0; }
h1 { font-size: clamp(1.75rem, 4vw, 2.125rem); letter-spacing: -0.03em; line-height: 1.02; }
h2 { font-size: 1.25rem; letter-spacing: -0.02em; line-height: 1.1; }
h3 { font-size: 1.0625rem; letter-spacing: -0.01em; line-height: 1.2; }
p { margin: 0 0 0.75rem; }
p:last-child { margin-bottom: 0; }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }
.pre { white-space: pre-wrap; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

:focus-visible { outline: 3px solid var(--navy); outline-offset: 3px; border-radius: 6px; }

.skip-link {
  position: absolute; left: 0.5rem; top: -100px;
  background: var(--card); color: var(--navy);
  padding: 0.75rem 1rem; border-radius: 10px; z-index: 100;
}
.skip-link:focus { top: 0.5rem; }

/* Small uppercase labels. Written in normal case, uppercased here. */
.eyebrow {
  font-family: var(--sans); font-size: 0.75rem; font-weight: 500;
  letter-spacing: 0.22em; text-transform: uppercase; line-height: 1.9; color: var(--navy); margin: 0;
}
.eyebrow-muted { color: var(--muted); font-size: 0.6875rem; letter-spacing: 0.24em; line-height: 2; }
.slash { color: var(--terracotta); }
.rule { display: block; width: 44px; height: 2px; background: var(--terracotta); }
.dot { color: var(--terracotta); }
.serif-note { font-family: var(--serif); font-size: 1.125rem; line-height: 1.4; letter-spacing: 0.01em; color: var(--muted); }

/* ---------- Buttons: pills ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: var(--tap); min-width: var(--tap);
  padding: 0 1.25rem;
  font: inherit; font-size: 0.9375rem; font-weight: 600;
  border-radius: 999px; border: 1.5px solid transparent;
  cursor: pointer; text-decoration: none; white-space: nowrap;
}
.btn .icon { width: 16px; height: 16px; }
.btn-primary { background: var(--terracotta); color: var(--white); }
.btn-primary:hover { background: #95492F; color: var(--white); }
.btn-secondary { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-secondary:hover { background: var(--card); color: var(--navy); }
.btn-quiet { background: transparent; color: var(--navy); border-color: var(--line); border-width: 1px; }
.btn-quiet:hover { background: var(--pill); color: var(--navy); }
.btn-danger { background: transparent; color: var(--terracotta-text); border-color: var(--terracotta-text); }
.btn-small { min-height: 36px; padding: 0 0.9rem; font-size: 0.875rem; position: relative; }
.btn-small::after { content: ""; position: absolute; inset: -4px 0; }
.btn-icon { padding: 0; width: var(--tap); font-size: 1.4rem; line-height: 1; font-weight: 400; }
.btn-block { width: 100%; }
.btn:disabled { background: var(--pill); color: var(--muted-strong); border-color: var(--line); cursor: not-allowed; }
.btn-stack { flex-direction: column; gap: 0; border-radius: 22px; padding: 0.5rem 1.25rem; white-space: normal; text-align: center; }
.btn-sub { font-size: 0.8125rem; font-weight: 400; }
@media (prefers-reduced-motion: no-preference) { .btn { transition: background-color 0.15s ease, color 0.15s ease; } }

.icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; flex: none; }
.chev { width: 18px; height: 18px; color: var(--muted); }
.btn .chev, .row-action .chev { color: inherit; width: 16px; height: 16px; }

/* Filter pills */
.pills { display: flex; gap: 6px; flex-wrap: wrap; }
.pill {
  position: relative; min-height: 34px; padding: 0 0.85rem; border: none; border-radius: 17px;
  background: var(--pill); color: var(--muted-strong);
  font: inherit; font-size: 0.8125rem; font-weight: 500; cursor: pointer;
}
.pill::after { content: ""; position: absolute; inset: -5px -2px; }
.pill[aria-pressed="true"] { background: var(--terracotta); color: var(--white); }

/* Soft word tag (never the only signal, never a status color) */
.tag {
  display: inline-block; flex: none; align-self: center;
  padding: 4px 10px; border-radius: 12px; background: var(--clay-wash);
  color: var(--navy); font-size: 0.8125rem; font-weight: 500; white-space: nowrap;
}

/* ---------- Paper-cut art ---------- */
.scene { position: relative; overflow: hidden; background: var(--sand); }
.scene svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.scene img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb {
  width: 42px; height: 42px; border-radius: 9px; flex: none;
  display: inline-flex; align-items: center; justify-content: center; overflow: hidden;
}
.thumb > span { width: 14px; height: 14px; border-radius: 50%; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.cover { border-radius: 14px; }

/* ---------- Sign-in ---------- */
.center-screen {
  min-height: 100vh; min-height: 100dvh;
  display: flex; align-items: center; justify-content: center;
  padding: 1.5rem 1rem;
}
.signin-screen { flex-direction: column; gap: 1.5rem; }
.signin-art { width: 100%; max-width: 27rem; height: 11rem; border-radius: 20px; }
.signin-card {
  width: 100%; max-width: 27rem;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 24px; padding: 2rem 1.75rem;
  display: flex; flex-direction: column; align-items: flex-start; gap: 1rem;
  box-shadow: var(--hero-shadow);
}
.signin-card h1 { font-size: 2.25rem; }
.signin-card p { margin: 0; }
.notice {
  text-align: left; background: var(--clay-wash); color: var(--navy);
  border: 1.5px solid var(--terracotta-text); border-radius: 14px; padding: 0.75rem 1rem;
  display: flex; flex-direction: column; gap: 0.75rem; width: 100%;
}
@media (min-width: 900px) {
  .signin-screen { display: grid; grid-template-columns: 1fr 1fr; gap: 0; padding: 0; align-items: center; justify-items: center; }
  .signin-art { max-width: none; height: 100vh; height: 100dvh; border-radius: 0; }
  .signin-card { margin: 2rem; }
}

/* ---------- App shell: side nav on computers, bottom bar on phones ---------- */
.sidebar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
  padding: 0.5rem 1rem;
  padding-top: max(0.5rem, env(safe-area-inset-top));
  background: var(--paper); border-bottom: 1px solid var(--line);
}
.brand { color: var(--navy); text-decoration: none; min-width: 0; }
.brand:hover { color: var(--navy); }
.brand .eyebrow { font-size: 0.75rem; line-height: 1.6; }
.side-user { display: flex; align-items: center; gap: 0.6rem; }
.side-name { display: none; font-size: 0.9375rem; font-weight: 500; }
.avatar {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--navy-mid); color: var(--paper);
  font-family: var(--sans); font-size: 0.875rem; font-weight: 600; line-height: 1; object-fit: cover;
}
.avatar-xs { width: 28px; height: 28px; font-size: 0.75rem; }
.avatar-sarah { background: var(--rust); color: var(--navy); }

.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: var(--paper); border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.tab {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-height: var(--tabbar-h); padding: 0.4rem;
  color: var(--muted); text-decoration: none; font-weight: 500; font-size: 0.8125rem;
}
.tab svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.tab[aria-current="page"] { color: var(--terracotta-text); font-weight: 600; }

main {
  max-width: 1260px; margin: 0 auto; width: 100%;
  padding: 1.75rem 1rem;
  padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 2.5rem);
  display: block;
}
main:focus { outline: none; }
main.wide { max-width: none; }

@media (min-width: 900px) {
  .app-shell { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100vh; }
  .sidebar {
    flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 6px;
    height: 100vh; padding: 2rem 1.5rem 1.5rem;
    border-bottom: 0; border-right: 1px solid var(--line); background: var(--paper);
  }
  .brand { padding-bottom: 1.75rem; }
  .brand .eyebrow { font-size: 0.75rem; line-height: 1.8; }
  .tabs { position: static; display: flex; flex-direction: column; gap: 6px; border: 0; padding: 0; background: none; }
  .tab { flex-direction: row; justify-content: flex-start; gap: 0.75rem; min-height: var(--tap); padding: 0; font-size: 0.9375rem; }
  .tab:hover { color: var(--navy); }
  .tab svg { width: 19px; height: 19px; }
  .side-user { margin-top: auto; }
  .side-name { display: inline; flex: 1; }
  main { padding: 2rem 2.5rem 3rem; }
}

/* ---------- Page header (Board, Calendar, Add a guest) ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem 1.5rem; flex-wrap: wrap; margin-bottom: 1.75rem; }
.page-head .eyebrow { margin-bottom: 0.6rem; }
.page-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }

/* ---------- Cards and lists ---------- */
.widget {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 1.125rem; min-width: 0;
}
.widget > h2 { margin-bottom: 0.75rem; }
.widget-list { padding-bottom: 0.75rem; }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap; }
.panel-head h2 { margin: 0; }
.panel-count { font-size: 0.8125rem; color: var(--muted); }
.text-link { font-weight: 500; font-size: 0.875rem; display: inline-flex; align-items: center; min-height: var(--tap); text-underline-offset: 3px; }
.link-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.status-line { min-height: 1.5em; font-weight: 500; margin: 0.5rem 0; }
.status-line:empty { min-height: 0; margin: 0; }
.list-go::before { content: "\2713  "; color: var(--terracotta-text); }
.empty-row { margin: 0; padding: 11px 0; font-size: 0.9375rem; border-top: 1px solid var(--line); color: var(--muted); }

.rows { list-style: none; margin: 0; padding: 0; }
.row {
  display: flex; align-items: center; gap: 12px; padding: 10px 0;
  border-top: 1px solid var(--line); color: var(--navy); text-decoration: none; min-width: 0;
}
a.row:hover { color: var(--navy); }
a.row:hover .row-title { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.row-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.row-title { font-family: var(--serif); font-size: 1.0625rem; font-weight: 500; line-height: 1.25; overflow-wrap: anywhere; color: var(--navy); text-decoration: none; }
a.row-title:hover { color: var(--navy); text-decoration: underline; text-underline-offset: 4px; }
.row-sub { font-size: 0.8125rem; color: var(--muted); }
.row-action { min-height: var(--tap); display: inline-flex; align-items: center; gap: 4px; font-size: 0.875rem; font-weight: 600; text-decoration: none; flex: none; }
.row-action .icon { width: 16px; height: 16px; }

/* ---------- Home ---------- */
.home { display: flex; flex-direction: column; gap: 2rem; }
.hero { display: flex; flex-wrap: wrap; gap: 2rem 2.5rem; align-items: center; }
.hero-text { flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; }
.greeting { margin-top: 0.75rem; font-size: clamp(2rem, 5vw, 2.875rem); line-height: 0.98; letter-spacing: -0.03em; }
.hero-count { margin-top: 1.25rem; }
.hero-text .rule { margin-top: 0.75rem; }
.hero-text .serif-note { margin: 1rem 0 0; max-width: 22rem; }
.hero-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-top: 1.25rem; }

.next-rec {
  flex: 1 1 400px; min-width: 0;
  background: var(--card); border: 1px solid var(--line); border-radius: 18px;  padding: 1.125rem; display: flex; flex-direction: column; gap: 0.75rem;
  box-shadow: var(--hero-shadow);
}
.next-rec-top { display: flex; justify-content: space-between; align-items: baseline; gap: 0.75rem; flex-wrap: wrap; }
.next-rec-top .eyebrow { font-size: 0.6875rem; }
.next-rec-when { font-size: 0.8125rem; color: var(--muted); }
.next-rec-art { height: 180px; border-radius: 14px; }
.ep-tag {
  position: absolute; left: 12px; bottom: 12px; z-index: 1;
  padding: 6px 11px; border-radius: 8px; background: var(--navy); color: var(--paper);
  font-size: 0.6875rem; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase;
}
.next-rec-name { display: flex; justify-content: space-between; align-items: baseline; gap: 0.75rem; flex-wrap: wrap; }
.next-rec-name h2 { font-size: 1.5rem; }
.next-rec-name h2 a { color: var(--navy); text-decoration: none; }
.next-rec-name h2 a:hover { text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; }
.next-rec-role { font-size: 0.875rem; color: var(--muted); }
.hairline { height: 1px; background: var(--line); }
.next-rec-facts { display: flex; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap; font-size: 0.8125rem; margin: 0; color: var(--muted); }
.next-rec .btn-primary { min-height: 46px; width: 100%; }

.home-row { display: flex; flex-wrap: wrap; gap: 1.25rem; align-items: flex-start; }
.home-row > .widget { flex: 1 1 270px; display: flex; flex-direction: column; padding-bottom: 0.5rem; }
.home-row .pills { padding: 0.5rem 0 0.75rem; }
.home-row .panel-head { padding-bottom: 0.75rem; }
.home-row .panel-head.has-pills { padding-bottom: 0; }

.coming { display: flex; flex-direction: column; gap: 1rem; }
.coming-grid { display: flex; flex-wrap: wrap; gap: 1.25rem; align-items: flex-start; }
.guest-tile { flex: 1 1 140px; max-width: 210px; min-width: 0; display: flex; flex-direction: column; gap: 0.5rem; color: var(--navy); text-decoration: none; }
.guest-tile:hover { color: var(--navy); }
.guest-tile:hover .tile-name { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.guest-tile .scene { height: 170px; }
.tile-name { font-family: var(--serif); font-size: 1.125rem; font-weight: 500; line-height: 1.2; overflow-wrap: anywhere; }
.tile-sub { font-size: 0.8125rem; color: var(--muted); }
.waiting { flex: 1.4 1 240px; display: flex; flex-direction: column; align-items: flex-start; gap: 0.6rem; }
.waiting .eyebrow { font-size: 0.6875rem; }
.waiting-quote { font-family: var(--serif); font-style: italic; font-size: 1.2rem; line-height: 1.3; margin: 0; }
.install-box .btn { margin-top: 0.75rem; }

/* ---------- Board ---------- */
.board { display: grid; gap: 2rem; }
.col { min-width: 0; }
.col-title { display: flex; align-items: baseline; gap: 0.5rem; padding-bottom: 0.5rem; margin-bottom: 0.25rem; border-bottom: 2px solid var(--navy); font-size: 1.2rem; }
.col-num { font-family: var(--sans); font-size: 0.6875rem; font-weight: 500; letter-spacing: 0.2em; color: var(--terracotta-text); }
.col-name { flex: 1; }
.col-count { font-family: var(--sans); font-size: 0.8125rem; color: var(--muted); }
.col-list { display: flex; flex-direction: column; }
.col-empty { margin: 0; padding: 14px 0; color: var(--muted); font-size: 0.875rem; }
.tile { display: flex; align-items: flex-start; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line); color: var(--navy); text-decoration: none; min-width: 0; }
.tile:hover { color: var(--navy); }
.tile:hover .tile-title { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.tile .thumb { width: 36px; height: 36px; }
.tile-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tile-title { font-family: var(--serif); font-size: 1rem; font-weight: 500; line-height: 1.25; overflow-wrap: anywhere; }
.tile-line { color: var(--muted); font-size: 0.8125rem; overflow-wrap: anywhere; }
.tile-stage { color: var(--muted-strong); font-size: 0.8125rem; }
.tile-badges { display: flex; flex-wrap: wrap; gap: 4px 6px; margin-top: 4px; }
.tile-badges:empty { display: none; }
.tile-check { color: var(--muted); font-size: 0.8125rem; }
@media (min-width: 900px) {
  .board { grid-auto-flow: column; grid-auto-columns: minmax(10rem, 1fr); overflow-x: auto; padding-bottom: 0.5rem; align-items: start; gap: 1.25rem; }
}

/* ---------- Dialogs ---------- */
.dialog {
  width: min(30rem, calc(100vw - 2rem)); border: 1px solid var(--line); border-radius: 20px;
  padding: 1.5rem; background: var(--card); color: var(--navy); box-shadow: 0 20px 60px rgba(20, 34, 58, 0.18);
}
.dialog::backdrop { background: rgba(20, 34, 58, 0.3); }
.dialog-title { font-size: 1.5rem; margin-bottom: 1rem; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 0.75rem; margin-top: 1rem; flex-wrap: wrap; }
.who { border: 0; padding: 0; margin: 0 0 1rem; display: flex; gap: 1.25rem; flex-wrap: wrap; }
.who legend { width: 100%; margin-bottom: 0.25rem; }
.radio { display: inline-flex; align-items: center; gap: 0.5rem; min-height: var(--tap); cursor: pointer; }
.radio input { width: 20px; height: 20px; accent-color: var(--terracotta); }

/* ---------- Forms ---------- */
.field { margin-bottom: 0.9rem; min-width: 0; }
.field-label { display: block; font-weight: 600; font-size: 0.875rem; margin-bottom: 0.35rem; }
.field-hint { margin: -0.15rem 0 0.35rem; }
.input {
  display: block; width: 100%; min-height: var(--tap);
  padding: 0.5rem 0.8rem;
  font: inherit; color: var(--navy); background: var(--card);
  border: 1.5px solid var(--field-line); border-radius: 12px;
}
textarea.input { min-height: 6rem; resize: vertical; }
.input:focus-visible { outline: 3px solid var(--navy); outline-offset: 1px; }
.input::placeholder { color: var(--muted); }
.form-2 { display: grid; gap: 0 1.25rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .form-2 { grid-template-columns: 1fr 1fr; } }
.form-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.two-buttons { display: grid; gap: 0.75rem; grid-template-columns: 1fr; margin-top: 0.5rem; }
@media (min-width: 640px) { .two-buttons { grid-template-columns: 1fr 1fr; } }
.input-inline { display: inline-block; width: auto; max-width: 100%; min-height: var(--tap); padding: 0.3rem 0.6rem; font-size: 0.875rem; }

/* ---------- Add a guest ---------- */
.guest-grid { display: grid; gap: 1.25rem; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 1000px) { .guest-grid { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); } }
.steps-box { display: flex; flex-direction: column; gap: 1rem; }
.steps { margin: 0; padding: 0; list-style: none; counter-reset: step; }
.steps li { counter-increment: step; display: flex; gap: 0.75rem; align-items: baseline; padding: 11px 0; font-size: 0.9375rem; border-top: 1px solid var(--line); }
.steps li::before { content: counter(step); flex: none; font-family: var(--serif); font-size: 1.25rem; line-height: 1; color: var(--terracotta-text); min-width: 1.1rem; }

/* ---------- Guest card ---------- */
.back-link { display: inline-flex; align-items: center; min-height: var(--tap); font-weight: 500; text-decoration: none; margin-bottom: 1rem; }
.back-link:hover { text-decoration: underline; }
.card-head { display: flex; gap: 1.5rem; flex-wrap: wrap; align-items: flex-end; margin-bottom: 1.5rem; }
.card-cover { width: 120px; height: 156px; flex: none; }
.card-head-text { flex: 1 1 18rem; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 0.5rem; }
.card-head-text h1 { font-size: clamp(1.75rem, 4vw, 2.25rem); line-height: 1.05; overflow-wrap: anywhere; margin-top: 0.25rem; }
.card-role { font-family: var(--serif); font-size: 1.1rem; color: var(--muted); margin: 0; }
.card-meta { margin: 0; color: var(--muted); font-size: 0.875rem; }
.card-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-top: 0.75rem; }
.action-help { margin: 0; max-width: 32rem; }
.card-grid { display: grid; gap: 1rem; grid-template-columns: 1fr; align-items: stretch; }
.card-grid > * { min-width: 0; }
@media (min-width: 900px) {
  .card-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .card-grid > .span-all { grid-column: 1 / -1; }
}
.qa { margin: 0; }
.qa dt, .qa-label { font-size: 0.75rem; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); margin: 1rem 0 0.25rem; }
.qa dt:first-child { margin-top: 0; }
.qa dd { margin: 0; font-family: var(--serif); font-size: 1.0625rem; line-height: 1.45; }
.link-list { margin: 0; padding: 0; list-style: none; }
.link-list a { font-weight: 500; display: inline-flex; align-items: center; min-height: var(--tap); text-underline-offset: 3px; }
.notes { list-style: none; margin: 0 0 1rem; padding: 0; display: flex; flex-direction: column; }
.note { display: flex; gap: 0.6rem; align-items: flex-start; padding: 11px 0; border-top: 1px solid var(--line); }
.note > div { flex: 1; min-width: 0; }
.note-meta { margin: 0; color: var(--muted); font-size: 0.8125rem; }
.note-meta strong { color: var(--navy); font-weight: 600; }
.note-body { margin: 0.15rem 0 0; white-space: pre-wrap; overflow-wrap: anywhere; font-family: var(--serif); font-size: 1rem; line-height: 1.45; }
.note-form { display: flex; flex-direction: column; align-items: flex-start; gap: 0.5rem; }
.note-form .input { width: 100%; }
.more-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }

/* Checklists */
.checklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.check-row { display: flex; align-items: flex-start; gap: 0.75rem; min-height: var(--tap); padding: 0.6rem 0; border-top: 1px solid var(--line); cursor: pointer; }
.check-row input { flex: none; width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--terracotta); cursor: pointer; }
.list-summary { font-weight: 500; color: var(--muted); font-size: 0.9375rem; }

/* ---------- Calendar ---------- */
.month-nav { display: flex; align-items: center; gap: 0.5rem; }
.month-title { margin: 0; min-width: 9rem; text-align: center; font-family: var(--serif); font-size: 1.25rem; }
.cal-filters { margin-bottom: 1.25rem; }
.cal-grid { display: grid; gap: 1.25rem; grid-template-columns: 1fr; align-items: start; }
.cal-side { display: flex; flex-direction: column; gap: 1.25rem; min-width: 0; }
@media (min-width: 1100px) { .cal-grid { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); } }
.month-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.month-dow { font-size: 0.75rem; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); padding: 0 4px 6px; }
.month-cell { min-height: 5.25rem; background: var(--paper); border-radius: 10px; padding: 5px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.month-blank { background: transparent; }
.month-num { font-family: var(--serif); font-size: 0.9375rem; color: var(--muted); padding: 0 3px; }
.month-today { background: var(--card); box-shadow: inset 0 0 0 2px var(--terracotta); }
.month-today .month-num { color: var(--terracotta-text); font-weight: 600; }

/* Event chips on the month grid: words, with a small swatch from the art colors */
.chip {
  display: flex; align-items: flex-start; gap: 5px; min-width: 0;
  font-size: 0.75rem; line-height: 1.3; padding: 3px 6px; border-radius: 6px;
  background: var(--card); color: var(--navy); text-decoration: none; border: 1px solid var(--line);
}
.chip::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; margin-top: 4px; }
.chip-rec::before { background: var(--navy-mid); }
.chip-rel::before { background: var(--rust); }
.chip-block::before { background: var(--mist); }
.chip-body { display: flex; flex-direction: column; min-width: 0; }
.chip-main { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: inherit; text-decoration: none; }
a.chip:hover .chip-main, a.chip-main:hover { text-decoration: underline; color: var(--navy); }
a.chip:hover { color: var(--navy); }
.chip-time { color: var(--muted); }
@media (max-width: 640px) {
  .month-cell { min-height: 3.75rem; padding: 3px; }
  .month-cell .chip { position: relative; padding: 0; height: 7px; border-radius: 4px; overflow: hidden; border: 0; }
  .month-cell .chip::before { display: none; }
  .month-cell .chip > * { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .month-cell .chip-rec { background: var(--navy-mid); }
  .month-cell .chip-rel { background: var(--rust); }
  .month-cell .chip-block { background: var(--mist); }
}
.link-picker { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; margin-top: 4px; }
.signout-link {
  position: relative; background: none; border: 1px solid var(--line); border-radius: 999px;
  padding: 0 0.75rem; min-height: 30px; cursor: pointer; white-space: nowrap;
  font: inherit; font-size: 0.8125rem; font-weight: 500; color: var(--muted-strong);
}
.signout-link::after { content: ""; position: absolute; inset: -7px -2px; } /* 44px tap area */
.signout-link:hover { color: var(--navy); border-color: var(--field-line); }

/* ---------- Public guest form (guest.html) ---------- */
.guest-page { background: var(--paper); }
.gf { max-width: 40rem; margin: 0 auto; padding: 2.5rem 1rem 4rem; }
.gf-head { margin-bottom: 1.5rem; }
.gf-head .rule { margin: 0.6rem 0 1rem; }
.gf-head h1 { margin-bottom: 0.5rem; }
.gf-note h2 { margin-bottom: 0.5rem; }
.gf-photo { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.gf-photo-preview { width: 88px; height: 112px; border-radius: 14px; background: var(--sand); overflow: hidden; flex: none; }
.gf-photo-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gf-file { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.gf-file:focus-visible + label { outline: 3px solid var(--terracotta); outline-offset: 2px; }
#gf-send { width: 100%; margin-top: 0.5rem; }
@media (min-width: 640px) { #gf-send { width: auto; } }
.guest-editor { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
/* Guest prep */
.prep-h { font-size: 1rem; margin: 1.1rem 0 0.35rem; }
.prep-sec { break-inside: avoid; }
.prep-sec:first-of-type .prep-h { margin-top: 0.25rem; }
.prep-list { margin: 0; padding-left: 1.25rem; }
.prep-list li { margin: 0.3rem 0; }
.cite { font-size: 0.8125rem; font-weight: 500; text-decoration: none; white-space: nowrap; }
.cite:hover, .cite:focus-visible { text-decoration: underline; }
@media (min-width: 900px) { .prep-ready { columns: 2; column-gap: 2rem; } .prep-ready > h2 { column-span: all; } .prep-ready > * { break-inside: avoid; } }

/* ---------- Clips ---------- */
.clip-filters { margin-bottom: 1rem; }
.clip-grid { display: grid; gap: 1rem; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 900px) { .clip-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.clip { display: flex; flex-direction: column; gap: 0.5rem; }
.clip-title { font-size: 1.25rem; margin: 0; }
.clip-meta { display: flex; gap: 0.75rem; align-items: center; flex-wrap: wrap; margin: 0; }
.clip-meta .text-link { min-height: 0; }
.clip-label { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin: 0.5rem 0 0; }
.clip-caption, .clip-tags { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; }
.clip-tags { color: var(--terracotta-text); }
.clip-video:empty { display: none; }
.clip-video video { width: 100%; max-height: 28rem; border-radius: 12px; background: var(--pill); }
.clip-more { border-top: 1px solid var(--line); padding-top: 0.5rem; margin-top: 0.25rem; }
.clip-posted .clip-title { color: var(--muted-strong); }
.clip-empty { padding: 1rem 0; }
.tag-done { background: var(--pill); color: var(--muted-strong); }
.btn-danger-text { color: var(--terracotta-text); }
.dialog-wide { width: min(36rem, calc(100vw - 2rem)); max-height: calc(100dvh - 2rem); overflow-y: auto; }
#clip-link { margin-top: 0.5rem; }
.clip-rule { background: var(--clay-wash); border-radius: 12px; padding: 0.75rem 1rem; margin-bottom: 1rem; max-width: 46rem; }
.clip-rule p { margin: 0; font-size: 0.9375rem; }
.clip-drop-note { background: var(--clay-wash); border-radius: 10px; padding: 0.5rem 0.75rem; margin: 0.5rem 0 0; }

/* Busy times from the hosts' Google Calendars */
.chip-busy { background: transparent; border-style: dashed; color: var(--muted-strong); }
.chip-busy-melissa::before { background: var(--sage); }
.chip-busy-sarah::before { background: var(--ochre); }
@media (max-width: 640px) {
  .month-cell .chip-busy-melissa { background: var(--sage); }
  .month-cell .chip-busy-sarah { background: var(--ochre); }
}

/* Add to my calendar */
.next-rec-cal { align-self: center; margin-top: 0.25rem; }
.link-button { background: none; border: 0; padding: 0; margin-top: 2px; color: var(--terracotta-text); font: inherit; font-weight: 500; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; align-self: flex-start; min-height: 24px; }
.link-button:hover { color: var(--navy); }

/* Hosts' chat on Home */
.chat-list:focus-visible { outline: 3px solid var(--terracotta); outline-offset: 2px; border-radius: 8px; }
.chat-day { align-self: center; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin: 0.5rem 0 0; }
.chat-msg { max-width: min(36rem, 85%); align-self: flex-start; display: flex; flex-direction: column; gap: 2px; }
.chat-mine { align-self: flex-end; align-items: flex-end; }
.chat-meta { margin: 0; font-size: 0.75rem; color: var(--muted); display: flex; align-items: center; gap: 0.25rem; }
.chat-who { font-weight: 600; color: var(--muted-strong); }
.chat-bubble { margin: 0; padding: 0.5rem 0.75rem; border-radius: 14px 14px 14px 4px; background: var(--pill); white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-mine .chat-bubble { background: var(--clay-wash); border-radius: 14px 14px 4px 14px; }
.chat-bubble a { color: var(--terracotta-text); }
.chat-del { background: none; border: 0; padding: 0 0 0 0.375rem; font: inherit; color: var(--muted); text-decoration: underline; cursor: pointer; position: relative; }
.chat-del::after { content: ""; position: absolute; inset: -10px -6px; }
.chat-del:hover { color: var(--terracotta-text); }
.chat-form .input { flex: 1; resize: none; min-height: 44px; }
.chat-empty { padding: 1rem 0; }
.shared-link { font-size: 0.875rem; overflow-wrap: anywhere; background: var(--pill); border-radius: 8px; padding: 0.5rem 0.75rem; margin: 0.5rem 0; }

/* Chat bubble in the corner, and the small chat window it opens */
.chat-fab {
  position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 40;
  width: 56px; height: 56px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--terracotta); color: var(--white);
  display: grid; place-items: center; box-shadow: 0 8px 24px rgba(20, 34, 58, 0.22);
}
.chat-fab svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.chat-fab:focus-visible { outline: 3px solid var(--navy); outline-offset: 3px; }
.chat-fab.is-open { background: var(--navy); }
.chat-badge {
  position: absolute; top: -4px; right: -4px; min-width: 22px; height: 22px; padding: 0 6px;
  border-radius: 11px; background: var(--navy); color: var(--white); border: 2px solid var(--paper);
  font-size: 0.75rem; font-weight: 600; line-height: 18px; text-align: center;
}
.chat-fab.is-open .chat-badge { background: var(--terracotta); }
.chat-panel {
  position: fixed; right: 1.25rem; bottom: calc(1.25rem + 68px); z-index: 40;
  width: min(23rem, calc(100vw - 2rem)); height: min(32rem, calc(100dvh - 8rem));
  display: flex; flex-direction: column; gap: 0.5rem;
  background: var(--card); border: 1px solid var(--line); border-radius: 18px;
  padding: 0.75rem 1rem 0.5rem; box-shadow: 0 20px 60px rgba(20, 34, 58, 0.2);
}
.chat-panel[hidden] { display: none; }
.chat-head { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); padding-bottom: 0.5rem; }
.chat-head h2 { font-size: 1.125rem; margin: 0; }
.chat-list { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 0.5rem; padding: 0.25rem 0.125rem; overscroll-behavior: contain; }
.chat-msg { max-width: 85%; }
.chat-form { display: flex; gap: 0.5rem; align-items: flex-end; border-top: 1px solid var(--line); padding-top: 0.5rem; }
@media (max-width: 899px) {
  /* Phones: sit above the bottom tabs */
  .chat-fab { bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 0.75rem); right: 1rem; width: 52px; height: 52px; }
  .chat-panel { right: 0.5rem; left: 0.5rem; width: auto; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 0.5rem); height: min(34rem, calc(100dvh - var(--tabbar-h) - 5rem)); }
  .chat-panel:not([hidden]) ~ .chat-fab, .chat-fab.is-open { display: none; }
}
