/* Layers: tokens, base elements, components, then small feature blocks. New screens use the first three before adding any
   CSS of their own (docs/architecture.md, "UI building blocks"). Light only; one palette and one text font, Livvic, self-hosted (D-147). */

/* Livvic, Latin only: Regular for text, Medium for labels and buttons, SemiBold for headings and bold (600-900 so a 700 rule uses it). */
@font-face { font-family: "Livvic"; font-style: normal; font-weight: 400; font-display: swap; src: url(/livvic-400.woff2) format("woff2"); }
@font-face { font-family: "Livvic"; font-style: normal; font-weight: 500; font-display: swap; src: url(/livvic-500.woff2) format("woff2"); }
@font-face { font-family: "Livvic"; font-style: normal; font-weight: 600 900; font-display: swap; src: url(/livvic-600.woff2) format("woff2"); }

/* 1. Tokens */
:root {
  /* The six Color Story colours (D-147); every role below is built from them. */
  --silk: #EEE4DA;
  --chocolate: #30150E;
  --rose: #F3A0AA;
  --wine: #4D0011;
  --blue: #8EB9FF;
  --red: #902124;
  --paper: var(--silk);
  --sheet: color-mix(in srgb, var(--silk) 25%, #fff);
  --ink: var(--chocolate);
  --ink-soft: color-mix(in srgb, var(--chocolate) 72%, var(--silk));
  --line: color-mix(in srgb, var(--chocolate) 18%, var(--silk));
  --edge: color-mix(in srgb, var(--chocolate) 55%, var(--silk));
  /* The soft outline, 3:1 on paper and sheet. */
  --outline: color-mix(in srgb, var(--chocolate) 50%, var(--silk));
  --accent: var(--wine);
  --accent-soft: color-mix(in srgb, var(--red) 10%, var(--paper));
  --error: var(--red);
  --error-soft: color-mix(in srgb, var(--red) 10%, var(--sheet));
  /* Green and amber stay as D-062 set them. */
  --good: #2f6b3f;
  --good-soft: color-mix(in srgb, var(--good) 10%, var(--sheet));
  --warn: #8a5a12;
  --warn-soft: color-mix(in srgb, #d99a2b 16%, var(--sheet));
  /* For the Areas tab map's lakes and rivers only (D-139); nothing else uses them. */
  --water: color-mix(in srgb, var(--blue) 34%, var(--silk));
  --water-line: color-mix(in srgb, var(--blue) 60%, var(--chocolate));
  --font: "Livvic", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}
[hidden] { display: none !important; }

/* 2. Base elements */
body { font: 16px/1.5 var(--font); max-width: 40rem; margin: 0 auto; padding: 0 16px 2rem; background: var(--paper); color: var(--ink); }
body.wide { max-width: 64rem; }
h1, h2, h3, h4 { font-family: var(--font); font-weight: 700; letter-spacing: -0.01em; line-height: 1.2; margin: 1.25rem 0 0.5rem; }
h1 { font-size: 1.75rem; letter-spacing: -0.02em; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 0.75rem; }
a { color: var(--accent); }
main { margin-top: 2rem; }
button, .btn { font: inherit; font-weight: 600; padding: 10px 18px; border: 1.5px solid var(--ink); border-radius: 12px; background: transparent; color: var(--ink); cursor: pointer; }
button:disabled { opacity: 0.55; cursor: default; }
input[type="text"], input[type="email"], input[type="tel"], input[type="date"], input[type="number"], input[type="search"], select, textarea { font: inherit; color: var(--ink); background: var(--sheet); border: 1.5px solid var(--ink); border-radius: 12px; padding: 11px 12px; box-sizing: border-box; max-width: 100%; }
select:not([multiple]):not([size]) { appearance: none; padding-right: 36px; background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; }
textarea { width: 100%; }
fieldset { border: 0; padding: 0; margin: 0; }
legend { font-weight: 500; font-size: 14px; padding: 0; margin-bottom: 4px; }
label { font-weight: 500; font-size: 14px; }
table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.urgent { font-weight: bold; }

/* 3. Components */
.btn { display: inline-block; text-decoration: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--paper); }
.btn.link { border-color: transparent; background: none; color: var(--accent); text-decoration: underline; }
/* Hover: the outline button fills softly, the primary one deepens to the brand red. Pointer devices only, never on a disabled button. */
@media (hover: hover) {
  .btn:not(.link, .primary):hover:not(:disabled) { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
  .btn.primary:hover:not(:disabled) { background: var(--red); border-color: var(--red); }
  .btn.link:hover:not(:disabled) { color: var(--red); }
}
.card { background: var(--sheet); border: 1.5px solid var(--ink); border-radius: 16px; box-shadow: 0 6px 20px color-mix(in srgb, var(--ink) 8%, transparent); padding: 16px; display: grid; gap: 10px; align-content: start; min-width: 0; }
.field { display: grid; gap: 4px; }
.field input, .field select, .field textarea { width: 100%; }
.hint { font-size: 12.5px; color: var(--ink-soft); }
.note { color: var(--ink-soft); font-size: 13.5px; }
/* Staff page back link: the ‹ is drawn here and hidden from screen readers. */
.back { display: inline-block; font-size: 13.5px; color: var(--ink-soft); text-decoration: none; }
a.back::before { content: "\2039 " / ""; }
@media (hover: hover) { a.back:hover { color: var(--accent); } }
.notice, #status, #notice { margin: 0 0 8px; padding: 8px 12px; border-radius: 10px; background: var(--accent-soft); }
.degraded { color: var(--error); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; }
/* The test-run notice (D-017) stands apart from the texts fine print: a tinted, bordered box. */
.header, .nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 14px 0; }
.header { border-bottom: 1px solid var(--line); margin-bottom: 1rem; }
.logo { font-family: var(--font); font-weight: 700; font-size: 1.1rem; letter-spacing: -0.01em; }
.links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
/* Staff top bar (D-193): a white bar across the whole window holding the logo, the section links and the account line. */
body:is(.staff, .copy-editor) .header { position: relative; gap: 4px 16px; background: var(--sheet); border-bottom: 0; box-shadow: 0 0 0 100vmax var(--sheet); clip-path: inset(0 -100vmax); }
html:has(:is(body.staff, body.copy-editor)) { overflow-x: clip; }
body.staff:has(#sign-out:not([hidden])) #account-message { display: none; }
body:is(.staff, .copy-editor) .header::after { content: ""; position: absolute; bottom: 0; left: 50%; width: 100vw; transform: translateX(-50%); height: 1px; background: var(--line); }
body:is(.staff, .copy-editor) .logo span { font-weight: 500; color: var(--ink-soft); }
body:is(.staff, .copy-editor) .header .tabs { flex: 1 1 auto; gap: 2px; margin: 0; border-bottom: 0; }
body:is(.staff, .copy-editor) .header .tabs a { padding: 6px 10px; margin: 0; border: 0; border-radius: 8px; font-size: 14px; white-space: nowrap; }
body:is(.staff, .copy-editor) .header .tabs a[aria-current="page"] { background: var(--paper); color: var(--ink); }

/* Containers that lay their children out in a grid own the spacing, so their text has no margins of its own. */
.profile :is(h1, h2, h3, h4, p), .card :is(h1, h2, h3, h4, p), .progress p,
.countdown p, #account :is(h1, h2, p), .survey section :is(h2, h3, p) { margin: 0; }
#account, .survey section { display: grid; gap: 14px; }
#account { gap: 16px; justify-items: start; }
#account .card { justify-self: stretch; }
#account-message { color: var(--ink-soft); }

/* 4. Feature blocks. The landing page (#79, D-026) has its own stylesheet, landing.css, scoped to #landing (#508). */
/* Staff pages stay a quiet work tool: quiet cards, denser buttons and fields (D-189). */
body.staff .card { border-width: 1px; border-color: var(--outline); box-shadow: none; }
/* :where() keeps this rule at one class of specificity, so the later component rules (.tabs button, .chip) win over it. */
:where(body.staff) :is(button, .btn) { padding: 6px 14px; border-radius: 10px; }
body.staff :is(input[type="text"], input[type="email"], input[type="tel"], input[type="date"], input[type="search"], select, textarea) { padding: 7px 10px; border-radius: 10px; }
body.staff select:not([multiple]):not([size]) { padding-right: 36px; }

/* Sign-up forms: About you (#32), the survey pages (D-028) and the partner invite screens (D-029) share one form look. */
.profile { max-width: 32rem; margin: 2rem auto; display: grid; gap: 14px; }
.profile .check { display: flex; gap: 8px; align-items: flex-start; font-size: 13.5px; font-weight: 400; }
.profile .check input { margin-top: 3px; }
.profile .sms-box { display: grid; gap: 6px; font-size: 13.5px; }
.profile .sms-box > div { display: grid; gap: 6px; }
.profile .sms-box p { color: var(--ink-soft); font-size: 13px; }
.profile input[type="text"], .profile input[type="tel"], .profile input[type="email"], .survey select, .survey textarea { width: 100%; }
.settings-note { color: var(--ink-soft); font-size: 13.5px; }
.survey .flow { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.survey .flow ol { margin: 0; padding-left: 1.2rem; font-size: 13.5px; color: var(--ink-soft); }
.survey #invite-form { display: grid; gap: 8px; }
.survey #partner-survey-shared { color: var(--ink-soft); font-size: 13.5px; margin: 0; padding-left: 1.2rem; }
@media (max-width: 40rem) {
  .survey .flow { grid-template-columns: 1fr; }
}

/* Survey polish (D-032): clickable cards, the progress bar, yes/no questions. */
.progress { max-width: 32rem; margin: 2rem auto 0; display: grid; gap: 6px; }
.progress-bar { display: flex; gap: 6px; }
.progress-bar span { flex: 1; height: 6px; border-radius: 3px; background: var(--line); }
.progress-bar span.on { background: var(--accent); }
.survey .choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.survey .choices.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.survey .choice { position: relative; border: 1.5px solid var(--outline); border-radius: 10px; padding: 14px; display: grid; gap: 8px; align-content: start; cursor: pointer; background: var(--sheet); font-weight: 400; font-size: 1rem; }
.survey .choice input[type="radio"] { position: absolute; opacity: 0; pointer-events: none; }
.survey .choice:hover { border-color: var(--ink); }
.survey .choice:has(input:checked) { border-color: var(--accent); background: var(--sheet); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent); }
.survey .choice:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.survey .choice .title { font-weight: 600; font-size: 1.05rem; }
.survey .choice .desc { color: var(--ink-soft); font-size: 13.5px; }
.survey .choice .icon { color: var(--accent); }
/* Stacked choice cards with a radio dot, the day buttons and the two-up times (D-191). */
.survey .choices.stack { grid-template-columns: 1fr; }
.survey .choices.stack .choice { grid-template-columns: auto minmax(0, 1fr); column-gap: 12px; }
.survey .choices.stack .choice::before { content: ""; grid-row: 1 / span 2; box-sizing: border-box; width: 18px; height: 18px; margin-top: 3px; border: 1.5px solid var(--outline); border-radius: 50%; background: var(--sheet); }
.survey .choices.stack .choice:has(input:checked)::before { border-color: var(--accent); background: radial-gradient(circle, var(--accent) 0 4px, var(--sheet) 5px); }
.survey .days { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.survey .day { position: relative; display: grid; place-items: center; padding: 10px 0; border: 1.5px solid var(--outline); border-radius: 10px; background: var(--sheet); font-weight: 500; cursor: pointer; }
.survey .day input { position: absolute; opacity: 0; pointer-events: none; }
.survey .day:hover { border-color: var(--ink); }
.survey .day:has(input:checked) { border-color: var(--accent); background: var(--accent); color: var(--silk); }
.survey .day:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.survey .first-dates { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.survey .first-dates .day { font: inherit; color: inherit; }
.survey .first-dates .day[aria-pressed="true"] { border-color: var(--accent); background: var(--accent); color: var(--silk); }
.survey .times { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
/* Label, select and hint share rows across the two fields, so the two selects line up whatever the labels' lengths. */
.survey .times .field { grid-row: span 3; grid-template-rows: subgrid; row-gap: 4px; }
/* A number typed as plain text, with its unit on the right. */
.survey .with-unit { display: flex; align-items: center; gap: 8px; }
.survey .with-unit input[type="text"] { width: 4.5rem; }
.survey .with-unit .unit { color: var(--ink-soft); }
.survey .ticks { display: grid; gap: 6px; }
.survey .check { display: flex; gap: 8px; align-items: flex-start; font-size: 13.5px; font-weight: 400; }
/* Survey cards (D-238): the frequency fans, the person cards with No/Yes pills, and the Surprise pictures. Tokens only. */
.survey .fan { position: relative; justify-self: center; width: 5rem; height: 3.6rem; }
.survey .fan i { position: absolute; bottom: 0; left: 50%; width: 2.1rem; height: 3rem; margin-left: -1.05rem; border-radius: 5px; transform-origin: 50% 100%;
  background: var(--accent) repeating-conic-gradient(from 0deg at 50% 50%, color-mix(in srgb, var(--paper) 9%, transparent) 0deg 5deg, transparent 5deg 10deg);
  box-shadow: inset 0 0 0 2px var(--accent), inset 0 0 0 3px color-mix(in srgb, var(--paper) 55%, transparent), 0 1px 3px color-mix(in srgb, var(--ink) 30%, transparent); }
.survey .fan i:nth-child(1) { transform: rotate(-24deg); }
.survey .fan i:nth-child(2) { transform: rotate(-8deg); }
.survey .fan i:nth-child(3) { transform: rotate(8deg); }
.survey .fan i:nth-child(4) { transform: rotate(24deg); }
.survey .fan i:only-child { transform: none; }
.survey .fan i:first-child:nth-last-child(2) { transform: rotate(-10deg); }
.survey .fan i:last-child:nth-child(2) { transform: rotate(10deg); }
.survey .choices.three .choice { justify-items: center; text-align: center; }
.survey .person-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: start; margin-bottom: 1rem; }
.survey .person-cards > [hidden] { display: none; }
.survey .person-cards:has(> [hidden]) { grid-template-columns: minmax(0, 1fr); }
.survey .person-card { border: 1.5px solid var(--outline); border-radius: 10px; padding: 14px; background: var(--sheet); display: grid; gap: 10px; margin-bottom: 12px; }
.survey .person-cards .person-card { margin-bottom: 0; }
.survey .person-card h3 { margin: 0; font-size: 1.05rem; }
.survey .person-card .hint { margin: 0; }
.survey .need { border: 0; margin: 0; padding: 0; min-width: 0; overflow: hidden; }
.survey .need legend { float: left; padding: 6px 12px 6px 0; font-weight: 400; font-size: 1rem; }
.survey .need .pills { float: right; }
.survey .pills { display: flex; gap: 6px; }
.survey .pill { position: relative; display: grid; place-items: center; min-width: 3.25rem; padding: 6px 12px; border: 1.5px solid var(--outline); border-radius: 999px; background: var(--sheet); font-weight: 500; cursor: pointer; }
.survey .pill input { position: absolute; opacity: 0; pointer-events: none; }
.survey .pill:hover { border-color: var(--ink); }
.survey .pill:has(input:checked) { border-color: var(--accent); background: var(--accent); color: var(--silk); }
.survey .pill:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.survey #ps-needs-part:has(+ #ps-alcohol-part:not([hidden])) { margin-bottom: 0; border-bottom: 0; border-bottom-left-radius: 0; border-bottom-right-radius: 0; padding-bottom: 0; }
.survey #ps-needs-part + #ps-alcohol-part:not([hidden]) { border-top: 0; border-top-left-radius: 0; border-top-right-radius: 0; padding-top: 10px; margin-top: -14px; }
.survey .reveal { grid-template-rows: auto auto 1fr; justify-items: center; text-align: center; }
.survey .reveal-pic { display: grid; place-items: center; width: 100%; height: 7rem; }
.survey .reveal-back { width: 4.5rem; border-radius: 8px; background: var(--accent) repeating-conic-gradient(from 0deg at 50% 50%, color-mix(in srgb, var(--paper) 9%, transparent) 0deg 5deg, transparent 5deg 10deg);
  box-shadow: inset 0 0 0 4px var(--accent), inset 0 0 0 5px color-mix(in srgb, var(--paper) 55%, transparent), 0 2px 6px color-mix(in srgb, var(--ink) 30%, transparent); }
.survey .reveal-back .deck-mark { display: grid; place-items: center; width: 2.1rem; height: 2.8rem; border-radius: 50%; background: var(--accent); border: 1.5px solid color-mix(in srgb, var(--paper) 70%, transparent);
  color: var(--paper); font-style: normal; font-size: 1.2rem; }
.survey .plan-sheet { display: grid; gap: 4px; width: 5.5rem; padding: 8px; border: 1.5px solid var(--outline); border-radius: 6px; background: var(--paper); transform: rotate(-4deg); text-align: left; font-size: 11px; line-height: 1.3; }
.survey .plan-sheet b { color: var(--accent); }
.survey .plan-sheet i { font-style: normal; color: var(--ink-soft); }
.survey .reveal-tick { position: absolute; top: 8px; right: 8px; width: 22px; height: 22px; box-sizing: border-box; border: 1.5px solid var(--outline); border-radius: 50%; background: var(--sheet); }
.survey .reveal:has(input:checked) .reveal-tick { border-color: var(--accent); background: var(--accent); }
.survey .reveal:has(input:checked) .reveal-tick::after { content: ""; position: absolute; left: 6px; top: 3px; width: 6px; height: 10px; border: solid var(--silk); border-width: 0 2px 2px 0; transform: rotate(45deg); }
@media (max-width: 40rem) {
  .survey .person-cards { grid-template-columns: 1fr; }
  #survey-schedule .choices.three { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  #survey-schedule .choices.three .choice { padding: 10px 6px; }
  #survey-schedule .choices.three .title { font-size: 0.95rem; }
}
@media (max-width: 40rem) {
  .survey .choices, .survey .choices.three { grid-template-columns: 1fr; }
  .survey #survey-choice-cards .choices { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* The account view (#76): the countdown sits above every signed-in page; "Your next date" is a card. */
.countdown { margin: 0 0 0.75rem; }
.next-date { display: grid; gap: 14px; }
#account .next-date { justify-self: stretch; }
.next-date #next-date-card { display: grid; gap: 0.5rem; justify-items: start; }
.next-date h2 { font-size: 0.95rem; font-weight: 600; color: var(--ink-soft); text-align: center; }
.next-date #next-date-card { display: block; justify-self: stretch; }
.next-date #date-plans { display: grid; gap: 0.5rem; justify-items: start; max-width: 20rem; padding: 10px 14px; border-radius: 6px; background: var(--paper); font-size: 13.5px; }
.next-date #date-plans :is(h3, p), .next-date #date-plans > div { margin: 0; }
.next-date #date-plans .btn { font-size: inherit; }

/* The facedown deck on the next-date card (#377): three card backs fanned and still, drawn from the tokens. */
:is(.next-date, #night, #welcome, #invite-received) .deck { justify-self: center; display: grid; justify-items: center; gap: 0.75rem; }
:is(.next-date, #night, #welcome, #invite-received) .deck-cards { position: relative; width: 11rem; height: 7.5rem; }
:is(.next-date, #night, #welcome, #invite-received) .deck-card { position: absolute; bottom: 0; left: 50%; width: 4.5rem; height: 6.5rem; margin-left: -2.25rem; border-radius: 6px; }
:is(.next-date, #welcome, #invite-received) .deck-card, #night .back { display: grid; place-items: center; border-radius: 6px;
  background: var(--accent) repeating-conic-gradient(from 0deg at 50% 50%, color-mix(in srgb, var(--paper) 9%, transparent) 0deg 5deg, transparent 5deg 10deg);
  box-shadow: inset 0 0 0 4px var(--accent), inset 0 0 0 5px color-mix(in srgb, var(--paper) 55%, transparent), 0 2px 6px color-mix(in srgb, var(--ink) 30%, transparent); }
:is(.next-date, #welcome, #invite-received) .deck-left { transform: translateX(-2.6rem) rotate(-12deg); }
:is(.next-date, #welcome, #invite-received) .deck-right { transform: translateX(2.6rem) rotate(12deg); }
:is(.next-date, #night, #welcome, #invite-received) .deck-mark { display: grid; place-items: center; width: 2.1rem; height: 2.8rem; border-radius: 50%; background: var(--accent); border: 1.5px solid color-mix(in srgb, var(--paper) 70%, transparent);
  color: var(--paper); font-family: var(--font); font-style: normal; font-size: 1.2rem; }
:is(.next-date, #welcome, #invite-received) :is(.deck-left, .deck-right) .deck-mark { display: none; }
.next-date .deck-caption { margin: 0; text-align: center; color: var(--ink-soft); }

/* The next-date ticket (D-190): chip and big countdown, the deck, the date lines, a dashed tear line with a notch each side, then the actions. */
.ticket-top { display: grid; gap: 0.6rem; justify-items: center; text-align: center; }
.ticket-count { display: grid; justify-items: center; gap: 0.25rem; line-height: 1; }
.ticket-big { display: flex; flex-wrap: wrap; justify-content: center; column-gap: 0.3em; }
.ticket-number { font-size: clamp(3rem, 15vw, 4.5rem); font-weight: 700; color: var(--accent); line-height: 1; }
.ticket-unit { color: var(--ink-soft); }
.ticket-top .day-before { justify-items: center; }
.ticket-lines { display: grid; gap: 0.5rem; justify-items: start; }
.ticket-line { display: flex; align-items: center; gap: 0.6rem; }
.ticket-icon { flex: none; width: 1.25rem; height: 1.25rem; fill: none; stroke: var(--accent); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ticket-tear { position: relative; height: 0; margin: 1.1rem -16px; border-top: 2px dashed var(--outline); }
.ticket-tear::before, .ticket-tear::after { content: ""; position: absolute; top: -11px; width: 20px; height: 20px; border-radius: 50%; background: var(--paper); box-shadow: inset 0 0 0 1.5px var(--ink); }
.ticket-tear::before { left: -11.5px; clip-path: inset(0 0 0 50%); }
.ticket-tear::after { right: -11.5px; clip-path: inset(0 50% 0 0); }
.ticket-actions { display: grid; gap: 10px; justify-items: stretch; text-align: center; }
.ticket-actions :is(h3, p) { margin: 0; }
.ticket-actions .btn { width: 100%; }
.next-date .ticket-actions #date-plans { max-width: none; justify-items: center; text-align: center; }
/* The skip-or-move section keeps the page's own colour inside the ticket, with a white button. */
.next-date #date-plans .btn { background: var(--sheet); }
@media (hover: hover) { .next-date #date-plans .btn:hover:not(:disabled) { background: var(--accent-soft); } }
/* The review pointer (#751): the "Need to skip or move" box's values, with the button as a link inside the sentence. */
.ticket-actions .review-pointer { margin: 0; padding: 10px 14px; border-radius: 6px; background: var(--paper); font-size: 13.5px; text-align: left; }
.ticket-actions .review-pointer .btn { display: inline; width: auto; padding: 0; border: 0; font-size: inherit; }

/* The interests overlap (#84): seat colours, so both partners see the same picture (Seat 1 wine, Seat 2 amber, overlap green). */
:is(#interests-overlap, #customer-interests, #survey-choice-venn) { --me: var(--accent); --them: var(--warn); --both: var(--good); justify-items: start; }
#interests-overlap.seat-two { --me: var(--warn); --them: var(--accent); }
:is(#interests-overlap, #customer-interests, #survey-choice-venn) svg { width: 100%; max-width: 22rem; height: auto; }
#interests-overlap .overlap-region { cursor: pointer; }
:is(#interests-overlap, #customer-interests, #survey-choice-venn) .overlap-region.me { fill: color-mix(in srgb, var(--me) 14%, var(--sheet)); }
:is(#interests-overlap, #customer-interests, #survey-choice-venn) .overlap-region.both { fill: color-mix(in srgb, var(--both) 22%, var(--sheet)); }
:is(#interests-overlap, #customer-interests, #survey-choice-venn) .overlap-region.them { fill: color-mix(in srgb, var(--them) 14%, var(--sheet)); }
#interests-overlap .overlap-region.dim { opacity: 0.25; }
#interests-overlap .overlap-region:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
:is(#interests-overlap, #customer-interests, #survey-choice-venn) .overlap-ring { fill: none; stroke: var(--edge); stroke-width: 1.5; pointer-events: none; }
:is(#interests-overlap, #customer-interests, #survey-choice-venn) :is(.overlap-count, .overlap-label) { pointer-events: none; fill: var(--ink); }
:is(#interests-overlap, #customer-interests, #survey-choice-venn) .overlap-count { font: 600 22px var(--font); }
:is(#interests-overlap, #customer-interests, #survey-choice-venn) .overlap-label { font: 600 10px var(--font); letter-spacing: 0.06em; }
#interests-overlap :is(.overlap-count, .overlap-label).dim { opacity: 0.3; }
:is(#interests-overlap, #customer-interests, #survey-choice-venn) .overlap-count.me, :is(#interests-overlap, #customer-interests, #survey-choice-venn) .overlap-label.me { fill: var(--me); }
:is(#interests-overlap, #customer-interests, #survey-choice-venn) .overlap-count.both, :is(#interests-overlap, #customer-interests, #survey-choice-venn) .overlap-label.both { fill: var(--both); }
:is(#interests-overlap, #customer-interests, #survey-choice-venn) .overlap-count.them, :is(#interests-overlap, #customer-interests, #survey-choice-venn) .overlap-label.them { fill: var(--them); }
#interests-overlap .overlap-list { margin: 0; padding-left: 1.2rem; }
#interests-overlap .overlap-list { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
#interests-overlap .overlap-list li { padding: 4px 11px; border: 1.5px solid var(--accent); border-radius: 999px; background: var(--sheet); font-size: 13.5px; font-weight: 500; }

/* The staff couple page (#655, D-198): a header with no card, then two columns (Dates and Notes on the right, 20rem). The right column
   comes first in the markup, so on a narrow screen it is header, Dates, Notes, Interests, Answers. */
.page-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 16px; align-items: start; margin-bottom: 16px; }
.page-head > a:first-child { grid-column: 1 / -1; }
.page-head-main { display: grid; gap: 2px; min-width: 0; }
.page-head-main h2 { margin: 0; }
.page-head-main :is(p, .person) { margin: 0; }
.page-head-next { align-self: center; font-weight: 600; white-space: nowrap; }
.page-head-sub { grid-column: 1 / -1; display: grid; gap: 4px; }
.page-head-sub :is(p, div) { margin: 0; }
.couple-cols { display: grid; gap: 16px; align-items: start; }
.couple-side, .couple-main { display: grid; gap: 16px; min-width: 0; }
@media (min-width: 60rem) {
  .couple-cols { grid-template-columns: minmax(0, 1fr) 20rem; }
  .couple-side { grid-column: 2; grid-row: 1; }
  .couple-main { grid-column: 1; grid-row: 1; }
}
.date-rows { display: grid; }
.date-row { display: flex; gap: 12px; align-items: baseline; padding: 8px 0; border-top: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.date-row:first-child { border-top: 0; }
.date-row > :first-child { flex: 1 1 auto; }
.date-state { color: var(--ink-soft); font-size: 13.5px; }
.date-row.current .date-state { color: var(--accent); font-weight: 600; }
.date-go { color: var(--outline); }
a.date-row:hover .date-go { color: var(--accent); }
.couple-interests { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: flex-start; }
#customer-venn { flex: 0 1 15rem; min-width: 11rem; }
.couple-groups { flex: 1 1 14rem; display: grid; gap: 10px; min-width: 0; }
.couple-group h4 { margin: 0 0 4px; font-size: 13px; color: var(--ink-soft); }
.couple-group .pills { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.couple-group .pills li { padding: 4px 11px; border: 1.5px solid var(--accent); border-radius: 999px; background: var(--sheet); font-size: 13.5px; font-weight: 500; }
.couple-group .pills.no li { border: 1.5px dashed var(--outline); background: transparent; color: var(--ink-soft); }

/* The signed-in pages (D-194): one nav, a two-column My dates, the first-date banner and steps, the invite card. */
#app-header { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "logo account" "nav nav"; align-items: center; gap: 0 12px; padding-bottom: 0; }
#app-header .logo { grid-area: logo; }
#app-header .header-account { grid-area: account; display: flex; align-items: center; gap: 12px; font-size: 13.5px; color: var(--ink-soft); }
#app-header .header-account .btn.link { padding: 0; font-size: inherit; font-weight: 500; color: var(--ink-soft); }
#app-header .links { grid-area: nav; flex-wrap: nowrap; gap: 18px; overflow-x: auto; overflow-y: hidden; }
#app-header .links button { padding: 8px 0 9px; margin-bottom: -1px; border: 0; border-bottom: 2.5px solid transparent; border-radius: 0; background: none; color: var(--ink-soft); font-size: 14.5px; font-weight: 500; white-space: nowrap; }
#app-header .links button[aria-current="page"] { color: var(--ink); font-weight: 600; border-bottom-color: var(--accent); }
@media (min-width: 48rem) {
  #app-header { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "logo nav account"; align-items: end; }
  #app-header :is(.logo, .header-account) { padding-bottom: 12px; }
  #app-header .links { justify-content: center; gap: 28px; }
}
.account-cols, .account-main, .account-side { display: grid; gap: 16px; align-content: start; min-width: 0; }
#account .account-cols { justify-self: stretch; }
@media (min-width: 60rem) { .account-cols { grid-template-columns: minmax(0, 26rem) minmax(0, 1fr); gap: 24px; } }
.done-banner { grid-template-columns: auto minmax(0, 1fr); gap: 2px 12px; align-items: center; }
.done-banner .done-tick { grid-row: span 2; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--good-soft); color: var(--good); font-weight: 700; font-size: 1.1rem; }
.ticket-card .next-steps { margin: 14px 0; }
.next-steps .timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.timeline li { position: relative; display: grid; gap: 1px; padding: 0 0 14px 24px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before { content: ""; position: absolute; left: 0; top: 5px; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--accent); background: var(--sheet); }
.timeline li.on::before { background: var(--accent); }
.timeline li:not(:last-child)::after { content: ""; position: absolute; left: 6px; top: 19px; bottom: 2px; border-left: 2px dotted var(--outline); }
.timeline .note { font-size: 13px; }
/* The invite card is a dashed, flat banner (mockup 1A): the icon beside the lines, a small button under them. */
.invite-card { grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 4px 12px; border-style: dashed; border-color: var(--outline); box-shadow: none; }
.invite-icon, .sc-icon { grid-row: 1 / span 2; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--accent-soft); }
.invite-icon svg, .sc-icon svg { width: 19px; height: 19px; fill: none; stroke: var(--accent); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.invite-card > :is(b, .note) { grid-column: 2; }
.invite-card .invite-icon { width: 38px; height: 38px; grid-row: span 2; }
.invite-card .invite-icon svg { width: 20px; height: 20px; }
.invite-card #invite-open { grid-column: 2; justify-self: start; padding: 6px 12px; font-size: 13.5px; }

/* Sign-up and the invite screens (D-195): the Welcome step card, the Beta card, the seats, and the "Admit two" ticket. */
.page-lede { color: var(--ink-soft); font-size: 14.5px; }
.welcome-hero { display: grid; justify-items: center; text-align: center; gap: 10px; padding-top: 8px; }
.welcome-hero .page-lede { max-width: 18rem; }
.welcome-hero .deck { transform: scale(0.8); margin: -10px 0 -14px; }
.step-card { gap: 0; padding: 6px 16px; }
.step-row { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.step-row:first-child { border-top: 0; }
.step-icon { grid-row: span 2; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--accent-soft); }
.step-icon svg { width: 18px; height: 18px; fill: none; stroke: var(--accent); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.step-row .note { font-size: 13px; }
#welcome-start { width: 100%; }
.step-head { display: grid; gap: 4px; }
.beta-card { gap: 4px; justify-items: start; border-color: var(--outline); box-shadow: none; }
.beta-tag { padding: 1px 9px; border-radius: 999px; background: var(--accent); color: var(--paper); font-size: 11.5px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; margin-bottom: 4px; }
.finish-actions { display: grid; grid-template-columns: auto 1fr; gap: 10px; }
.seats { display: flex; justify-content: center; padding-top: 6px; }
.seat { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50%; font-size: 1.4rem; font-weight: 600; font-style: italic; color: var(--paper); border: 3px solid var(--paper);
  background: var(--accent) repeating-conic-gradient(from 0deg at 50% 50%, color-mix(in srgb, var(--paper) 10%, transparent) 0deg 8deg, transparent 8deg 16deg); }
.seat + .seat { margin-left: -14px; }
.seat svg { display: none; width: 24px; height: 24px; fill: none; stroke: var(--accent); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.seat-open { background: var(--paper); color: var(--outline); border: 2px dashed var(--outline); }
.seat-sent { background: var(--accent-soft); border: 2px dashed var(--accent); }
.seat-sent svg { display: block; }
.seat-sent .seat-mark { display: none; }
.seat-head { display: grid; gap: 6px; text-align: center; justify-items: center; }
.seat-head .page-lede { max-width: 19rem; }
.seat-card { gap: 8px; }
.seat-card label { font-size: 14px; font-weight: 500; }
.seat-card .hint { font-size: 12.5px; }
.seat-card #invite-fields { display: grid; gap: 8px; }
.seat-card #invite-status:empty { display: none; }
.seat-card .btn.primary { margin-top: 4px; }
.seat-back { justify-self: center; }
.seat-ticket { gap: 0; }
.ticket-who { display: grid; gap: 4px; justify-items: center; text-align: center; }
.ticket-who b { font-size: 1.15rem; }
.ticket-who .deck { transform: scale(0.7); margin: -14px 0 -20px; }
.ticket-accept { display: grid; gap: 8px; }
.ticket-accept #invite-received-message:empty { display: none; }
.ticket-accept .btn.primary { margin-top: 4px; }

/* Past dates (D-194): the newest date as a ticket, the rest as Earlier rows. */
#past-ticket:focus-visible { outline: none; }
#past .latest { gap: 12px; }
#past .latest-top { display: flex; align-items: center; gap: 12px; }
#past .stub-date { display: grid; justify-items: center; line-height: 1.1; padding-right: 12px; border-right: 2px dashed var(--outline); }
#past .stub-date span:first-child { font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); }
#past .stub-date span:nth-child(2) { font-size: 2rem; font-weight: 600; font-style: italic; color: var(--accent); }
#past .stub-date span:last-child { font-size: 12px; color: var(--ink-soft); }
.label-sm { font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); }
#past .faces { display: grid; grid-template-columns: repeat(auto-fit, minmax(5.5rem, 1fr)); gap: 8px; }
#past .face { display: grid; justify-items: center; align-content: center; gap: 4px; padding: 14px 4px 12px; border: 1.5px solid var(--ink); border-radius: 8px; background: color-mix(in srgb, var(--paper) 47%, var(--sheet)); text-align: center; min-width: 0; overflow-wrap: anywhere; }
#past .face-badge { display: grid; place-items: center; width: 42px; height: 42px; margin-bottom: 2px; border-radius: 50%; color: var(--paper);
  background: var(--accent) repeating-conic-gradient(from 0deg at 50% 50%, color-mix(in srgb, var(--paper) 12%, transparent) 0deg 8deg, transparent 8deg 16deg); }
#past .face-badge svg { width: 1.3rem; height: 1.3rem; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
#past .face-badge.emoji { font-size: 20px; line-height: 1; }
#past .face-main { font-weight: 600; font-size: 13px; line-height: 1.15; }
#past .face-venue { font-size: 11.5px; color: var(--ink-soft); line-height: 1.2; }
#past .tear { position: relative; height: 0; margin: 0.5rem -16px; border-top: 2px dashed var(--outline); }
#past .tear::before, #past .tear::after { content: ""; position: absolute; top: -11px; width: 20px; height: 20px; border-radius: 50%; background: var(--paper); box-shadow: inset 0 0 0 1.5px var(--ink); }
#past .tear::before { left: -11.5px; clip-path: inset(0 0 0 50%); }
#past .tear::after { right: -11.5px; clip-path: inset(0 50% 0 0); }
#past .review > .btn { width: 100%; }
#past .group-h { font-size: 12px; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; color: var(--ink-soft); padding: 0 4px; }
#past .list { display: grid; gap: 0; background: var(--sheet); border: 1.5px solid var(--ink); border-radius: 16px; overflow: hidden; }
#past .list:empty { display: none; }
#past .past-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 2px 12px; padding: 11px 16px; border: 0; border-top: 1px solid var(--line); border-radius: 0; background: none; font-weight: 400; text-align: left; }
#past .past-row:first-child { border-top: 0; }
#past .past-row::after { content: "\203A"; grid-column: 4; grid-row: 1 / span 2; font-size: 1.5rem; line-height: 1; color: var(--outline); }
#past .past-row .stack { grid-column: 1; grid-row: 1 / span 2; display: flex; gap: 0; }
#past .past-row > span:nth-child(2) { grid-column: 2; font-weight: 500; }
#past .past-row > span:nth-child(3) { grid-column: 2; color: var(--ink-soft); font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#past .past-row > :is(.stars-ro, .chip) { grid-column: 3; grid-row: 1 / span 2; }
#past .disc { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; font-size: 13px; border: 2px solid var(--sheet);
  background: var(--accent) repeating-conic-gradient(from 0deg at 50% 50%, color-mix(in srgb, var(--paper) 12%, transparent) 0deg 8deg, transparent 8deg 16deg); }
#past .disc + .disc { margin-left: -10px; }

/* Calendar (D-194): centred, the stub above the grid, the rules sentence under it. */
.cal { margin-inline: auto; }
.cal-dows { margin: 0.75rem 0 0; text-align: center; font-size: 11.5px; font-weight: 600; color: var(--ink-soft); }
.cal-dows + .cal-grid { margin-top: 4px; }
.mini-stub { grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 14px; padding: 12px 16px; margin-bottom: 1rem; border-left-style: dashed; }
.mini-num { font-size: 2.4rem; font-weight: 700; color: var(--accent); line-height: 1; }
.mini-num:empty { display: none; }
.mini-stub-text { display: grid; }
.cal-rules { text-align: center; }

/* Settings cards (D-194): an icon, the lines, and a › arrow in place of the Edit text; the whole card opens its section. */
.card.sc { grid-template-columns: auto minmax(0, 1fr) auto; gap: 2px 12px; align-items: start; padding: 14px 16px; cursor: pointer; }
.sc h3 { align-self: center; margin: 0; }
.sc .sc-edit { grid-column: 3; grid-row: 1 / span 2; align-self: center; padding: 0 4px; border: 0; background: none; font-size: 0; }
.sc .sc-edit::after { content: "\203A"; font-size: 1.6rem; line-height: 1; color: var(--outline); display: inline-block; transition: transform 0.15s, color 0.15s; }
/* Hover: the card tints and takes the wine border, and the arrow turns wine and nudges right, so it reads as clickable. */
.card.sc { transition: background-color 0.15s, border-color 0.15s; }
@media (hover: hover) {
  .card.sc:hover { background: var(--accent-soft); border-color: var(--accent); }
  .card.sc:hover .sc-edit::after { color: var(--accent); transform: translateX(3px); }
}
.sc .settings-lines { grid-column: 2; color: var(--ink-soft); font-size: 13.5px; }
.sc #settings-partner-chip { margin-left: 6px; vertical-align: 1px; }

/* The interests sort (D-191): one card at a time with a second card peeking out below it; sorted ideas collect as pills. */
.survey .sort-current { display: grid; gap: 14px; margin: 12px 0; }
.survey .sort-now { display: grid; justify-items: center; align-content: center; gap: 8px; min-height: 190px; margin-bottom: 10px; padding: 16px; border: 1.5px solid var(--ink); border-radius: 18px; background: var(--sheet); text-align: center;
  box-shadow: 0 9px 0 -4px var(--paper), 0 10.5px 0 -3px var(--outline), 0 14px 22px -10px color-mix(in srgb, var(--ink) 25%, transparent); }
.survey .sort-now:has(.sort-had:not([hidden])) { border-color: var(--accent); }
.survey .sort-graphic { font-size: 3.5rem; line-height: 1; }
.survey .sort-name { font-size: 1.35rem; font-weight: 700; }
.survey .sort-had { min-height: 1.2em; color: var(--accent); font-size: 13.5px; font-weight: 600; }
.survey .sort-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.survey .sort-actions button { min-height: 52px; border-radius: 14px; }
.survey .sort-all { justify-content: center; }
.survey .sort-done { display: flex; align-items: center; gap: 10px; padding: 18px; border: 1.5px solid var(--ink); border-radius: 18px; background: var(--sheet); color: var(--ink); font-size: 1rem; font-weight: 600; }
.survey .sort-done::before { content: "\2713"; color: var(--good); font-size: 1.4rem; line-height: 1; }
.survey .pill-group { display: grid; gap: 8px; margin-top: 12px; }
.survey .pill-group h3 { font-size: 0.95rem; }
.survey #interests-not-fun-group h3 { color: var(--ink-soft); }
/* Once everything is sorted the Back and Save & Continue row moves up under the all-sorted line, and Save takes the row's width. */
.survey #survey-interests > .pill-group { order: 1; }
.survey #survey-interests:not(:has(#interests-done:not([hidden]))) > #survey-interests-actions { order: 2; }
.survey #survey-interests:has(#interests-done:not([hidden])) #survey-interests-next { flex: 1 1 0; }
.survey .sort-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.survey .sort-pill { min-height: 36px; padding: 0 12px; border: 1.5px solid var(--accent); border-radius: 999px; background: var(--sheet); font-size: 14px; font-weight: 500; }
.survey #interests-not-fun-pills .sort-pill { border: 1.5px dashed var(--outline); background: transparent; color: var(--ink-soft); }
/* "Still to sort" (D-215): the ideas after the card as quiet text chips, not buttons. */
.survey .to-sort { display: grid; gap: 8px; margin-top: 12px; }
.survey .to-sort h3 { font-size: 0.95rem; color: var(--ink-soft); }
.survey .sort-chip { padding: 5px 11px; border: 1.5px dashed var(--outline); border-radius: 999px; font-size: 13.5px; color: var(--ink-soft); }
/* The intro box on the choice page and step 6 (D-215): a tinted box read before the cards. */
.survey .intro-box { display: grid; gap: 8px; margin: 12px 0 16px; padding: 14px 16px; border-radius: 12px; background: var(--accent-soft); }
.survey .intro-box > * { margin: 0; }
.survey .intro-lead { font-weight: 700; color: var(--ink); }
.survey .intro-soft { color: var(--ink-soft); font-size: 14px; }
.survey .intro-recommend { font-weight: 600; color: var(--ink); }
.survey .intro-rule { width: 100%; border: 0; border-top: 1px solid var(--outline); margin: 2px 0; }
.survey .intro-fact { display: flex; gap: 10px; align-items: center; }
.survey .intro-fact .step-icon { flex: none; grid-row: auto; background: var(--sheet); }
.survey #survey-choice-venn { display: grid; gap: 8px; justify-items: center; margin-top: 4px; }
.survey .intro-venn .venn-pills { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.survey .intro-venn .venn-pills li { padding: 3px 10px; border: 1.5px solid var(--good); border-radius: 999px; background: var(--sheet); font-size: 13px; font-weight: 500; }
.survey .intro-venn .note { font-size: 12.5px; text-align: center; }
.survey .survey-part { display: grid; gap: 14px; }

/* Settings (D-048): a list of cards, one per category, and one sticky bar (Back to Settings, the count, Save updates) over a panel. */
.settings-bar { position: sticky; top: 0; z-index: 1; align-items: center; max-width: 32rem; margin: 0 auto; background: var(--paper); border-bottom: 1px solid var(--line); padding: 8px 0; }
.settings-bar .note { margin: 0; }
.settings-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }

/* Staff page (D-045): tabs, KPI tiles, chips, the table's scroll wrapper, the date-view grid, label/value grids, the compact
   table and the stop-card header. Tokens and the shared buttons only: no new colour or button style. */
.tabs { display: flex; flex-wrap: wrap; gap: 24px; border-bottom: 1px solid var(--line); margin-bottom: 1rem; }
.tabs a { padding: 10px 0; margin-bottom: -1px; border-bottom: 2.5px solid transparent; color: var(--ink-soft); font-weight: 500; text-decoration: none; }
.tabs a[aria-current="page"] { color: var(--ink); font-weight: 600; border-bottom-color: var(--accent); }
.tabs button { padding: 10px 0; margin-bottom: -1px; border: 0; border-bottom: 2.5px solid transparent; border-radius: 0; background: none; color: var(--ink-soft); }
.tabs button[aria-pressed="true"] { color: var(--ink); font-weight: 600; border-bottom-color: var(--accent); }
/* The area pop-up (D-137) lays out its own ticks. Tokens only (D-043). */
#area-edit-dialog { width: min(40rem, calc(100vw - 32px)); max-height: 90vh; overflow: auto; }
#area-edit-dialog .ticks { display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: 4px 12px; max-height: 12rem; overflow: auto; }
#area-edit-dialog .tick { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
#area-edit-dialog .tick.taken { color: var(--ink-soft); }
/* Curated Dates and the Date Builder (D-066): two columns on a computer, lock buttons, drop gaps, the 15-minute time bar. */
#curated-view tbody tr { cursor: pointer; }
#curated-view tbody tr:hover { background: var(--accent-soft); }
#curated-date-view del { color: var(--ink-soft); }
#curated-date-view .tick { display: flex; gap: 8px; align-items: center; }
/* The Date Builder (D-073, amends D-043 and D-066): its own layout, ported from the wireframe. Colours only through the tokens above, never a
   literal; category colours are Drinks --accent, Dining --warn, Experience --good. */
body.wide.staff { max-width: 80rem; }
#builder-narrow { display: none; }
/* The header (D-226) is the .page-head pattern; the area line under the stepper is plain text with two quiet buttons. */
#builder-view .builder-area-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; }
#builder-view #builder-id:empty, #builder-view #builder-title-lead:empty, #builder-view #builder-status:empty { display: none; }
#builder-view .page-head-main h2 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 8px; }
/* The Limits line (D-229): a label, then the night and start toggles and the three selects as quiet text pickers with a small caret,
   faint dots between the ones showing; a lock row opens in place under it. */
#builder-view .limits-line { gap: 8px; padding: 8px 14px; }
#builder-view .limits-row { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 0; }
#builder-view .limits-label { margin-right: 10px; color: var(--ink-soft); font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; }
#builder-view .limits-row .limit-item:not([hidden]) ~ .limit-item:not([hidden])::before { content: "\00b7" / ""; padding: 0 4px; color: var(--outline); }
#builder-view .limits-row .field { display: inline-flex; align-items: center; flex: 0 1 auto; }
#builder-view .limits-row .field select { width: auto; border: 0; background-color: transparent; color: var(--ink); font-size: 14px; padding: 4px 22px 4px 6px; background-position: calc(100% - 10px) 50%, calc(100% - 5px) 50%; background-size: 5px 5px; }
#builder-view .limit-toggle { border: 0; border-radius: 0; padding: 4px 6px; color: var(--ink); font-size: 14px; text-decoration: none; }
#builder-view .limit-toggle::after { content: " \25be" / ""; color: var(--ink-soft); }
#builder-view .limit-toggle[aria-expanded="true"] { color: var(--accent); }
/* A couple's fixed lines (D-100) take the same quiet text style. */
#builder-view #builder-couple { gap: 0; }
#builder-view #builder-couple .chip { border: 0; background: none; padding: 4px 6px; color: var(--ink); font-size: 14px; }
#builder-view #builder-couple .chip + .chip::before { content: "\00b7" / ""; padding-right: 10px; color: var(--outline); }
#builder-view .lock-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding-top: 6px; border-top: 1px dashed var(--line); }
#builder-view .lock-notes { display: grid; gap: 2px; }
/* The date strip (D-226, D-229): four equal facts with thin lines between them, then one row with the start pills, the plain bar and its hour
   labels, and the spare time. */
#builder-view .strip { gap: 0; padding: 0; overflow: hidden; }
#builder-view .strip-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; }
#builder-view .fact { display: grid; gap: 6px; align-content: start; min-width: 0; padding: 12px 16px; border-left: 1px solid var(--line); }
#builder-view .fact:first-child { border-left: 0; }
#builder-view .fact p, #builder-view .fact h3 { margin: 0; overflow-wrap: anywhere; }
#builder-view .fact-label { font-size: 11.5px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-soft); }
#builder-view .fact-value, #builder-view .works { font-family: var(--font); font-size: 1.05rem; font-weight: 600; }
#builder-view .fact .note, #builder-view .soft-line { font-size: 13px; }
#builder-view .soft-line { color: var(--ink-soft); }
#builder-view .soft-line span + span::before { content: " \00b7 "; }
#builder-view .bar-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 16px; align-items: start; padding: 12px 16px; border-top: 1px solid var(--line); }
#builder-view .bar-wrap { display: grid; gap: 3px; min-width: 0; }
#builder-view .start-buttons { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-soft); }
#builder-view .left-line { margin: 0; padding-top: 3px; white-space: nowrap; font-size: 13px; color: var(--ink-soft); }
/* Lock buttons: green, pressed ink, ruled out struck through. */
#builder-nights .btn, #builder-starts .btn { border: 1.5px solid var(--good); border-radius: 6px; background: var(--good-soft); color: var(--good); padding: 1px 10px; font-size: 13.5px; text-decoration: none; }
#builder-nights .btn[aria-pressed="true"], #builder-starts .btn[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--sheet); }
#builder-nights .btn:disabled, #builder-starts .btn:disabled { border-color: var(--line); background: var(--paper); color: var(--ink-soft); opacity: 1; text-decoration: line-through; }
/* The plain bar and the price meter (D-226, D-229): the same 5-minute and price cells drawn edge to edge with no cell borders. The bar is a 22px
   track with a thin border; a stop is a run of cells whose first and last carry run-first and run-last so the ends are rounded, and walks and empty
   time show as the track. The hour labels are a second row of the same cells, centred on their hour. The blocks are CSS-class cells because
   `.style` stays banned (D-009). */
#builder-bar, #builder-meter, #builder-ticks { gap: 0; flex-wrap: nowrap; }
#builder-bar, #builder-meter { border-radius: 6px; overflow: hidden; }
#builder-bar .cell, #builder-meter .cell { flex: 1 1 0; width: auto; min-width: 0; border-radius: 0; border-width: 0; }
#builder-bar { box-sizing: border-box; height: 22px; padding: 3px; border: 1px solid var(--line); background: var(--paper); align-items: stretch; }
#builder-bar .cell { height: auto; }
#builder-meter { flex: 1 1 12rem; }
#builder-meter .cell { height: 10px; }
#builder-bar .cell:not([class*="fill-"]), #builder-bar .cell.walk { background: transparent; }
#builder-meter .cell:not(.fill) { background: var(--paper); }
#builder-bar .cell.run-first { border-top-left-radius: 4px; border-bottom-left-radius: 4px; }
#builder-bar .cell.run-last { border-top-right-radius: 4px; border-bottom-right-radius: 4px; }
#builder-bar .cell.run-last + .cell.run-first { margin-left: 2px; }
#builder-meter .cell.mark { border-right: 2px dashed var(--ink-soft); }
#builder-ticks { margin-top: 0; padding: 0 4px; }
#builder-ticks .tick { display: flex; justify-content: center; flex: 1 1 0; min-width: 0; height: 14px; font-size: 11.5px; color: var(--ink-soft); white-space: nowrap; overflow: visible; }
/* Two columns: the stops, about 24rem wide and sticky (it scrolls on its own when taller than the window), and the tray. */
#builder-view .builder-cols { display: grid; grid-template-columns: minmax(0, 24rem) minmax(0, 1fr); gap: 18px; align-items: start; }
#builder-view .builder-date { position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow-y: auto; }
#builder-view .submit-box { display: grid; gap: 4px; justify-items: start; border-top: 1px solid var(--line); padding-top: 10px; }
/* Write the night (D-226, D-243): the timeline of the night's texts beside a sticky pane (Preview and Activity tabs), and a foot bar that
   sticks to the bottom of the window. The night line's filled part is the `on` class, never a style. A template token is bold and underlined. */
:is(#builder-view, #notes-view) .write-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(23rem, min(31rem, 42%)); gap: 18px; align-items: start; }
@media (max-width: 61.875rem) {
  :is(#builder-view, #notes-view) .write-cols { grid-template-columns: minmax(0, 1fr); }
  :is(#builder-view, #notes-view) .write-pane { position: static; max-height: none; overflow-y: visible; }
}
:is(#builder-view, #notes-view) .write-pane { position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow-y: auto; }
:is(#builder-view, #notes-view) .tl-item { display: grid; gap: 8px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--sheet); }
:is(#builder-view, #notes-view) .tl-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; cursor: pointer; }
:is(#builder-view, #notes-view) .tl-head .chip { margin-left: auto; }
:is(#builder-view, #notes-view) .tl-gap { margin: 0 0 0 18px; padding-left: 12px; border-left: 2px dashed var(--line); }
:is(#builder-view, #notes-view) .tl-gap .tl-item { border-style: dashed; }
:is(#builder-view, #notes-view) .tl-box { display: grid; gap: 8px; }
:is(#builder-view, #notes-view) .tl-box textarea { width: 100%; }
/* The date's dress code (D-284): a small block for the notes screen's own layout, tokens only (D-043). */
#notes-view .dress-bubble { box-sizing: border-box; display: grid; gap: 8px; width: fit-content; max-width: 100%; min-width: 0; padding: 6px 14px; border-left: 3px solid var(--accent); border-radius: 8px; background: var(--sheet); }
#notes-view .dress-bubble.open { width: 100%; padding: 10px 14px 12px; }
#notes-view .dress-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; cursor: pointer; }
#notes-view .dress-head .btn.link { margin-left: 6px; padding: 0; }
#notes-view .dress-table { min-width: 0; }
#notes-view .dress-table table { font-size: 14.5px; }
#notes-view .dress-table th, #notes-view .dress-table td { padding: 5px 12px 5px 0; }
#notes-view .dress-table th { font-size: 12.5px; color: var(--ink-soft); font-weight: 600; }
#notes-view .dress-table td:last-child { font-weight: 600; }
#notes-view .dress-table a.btn.link { padding: 0; }
#notes-view .dress-choose { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
#notes-view .dress-choose select { width: 14rem; max-width: 100%; }
#notes-view .dress-bubble .hint { margin: 0; }
:is(#builder-view, #notes-view) .tl-add { padding-left: 14px; }
:is(#builder-view, #notes-view) .tl-actions { display: flex; flex-wrap: wrap; gap: 4px 14px; }
/* The night line: a card with the arrows and caption, and a track through the dots. Each node draws its own two halves of the track
   (before and after its dot); `on` colours the half before it, and an `on` node that is not `now` also the half after it. */
:is(#builder-view, #notes-view) .nl { display: grid; gap: 6px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--sheet); }
:is(#builder-view, #notes-view) .nl .note { margin: 0; text-align: center; }
:is(#builder-view, #notes-view) .nl-bar { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; align-items: center; }
:is(#builder-view, #notes-view) .nightline { display: flex; align-items: flex-start; }
:is(#builder-view, #notes-view) .nl-node { position: relative; flex: 1 1 0; min-width: 0; display: grid; justify-items: center; align-content: start; gap: 3px; padding: 0 0 4px; border: 0; background: none; color: var(--ink-soft); font: inherit; font-size: 12px; cursor: pointer; }
:is(#builder-view, #notes-view) .nl-node::before, :is(#builder-view, #notes-view) .nl-node::after { content: ""; position: absolute; top: 0.8rem; height: 3px; width: 50%; background: var(--line); }
:is(#builder-view, #notes-view) .nl-node::before { left: 0; }
:is(#builder-view, #notes-view) .nl-node::after { right: 0; }
:is(#builder-view, #notes-view) .nl-node:first-child::before, :is(#builder-view, #notes-view) .nl-node:last-child::after { display: none; }
:is(#builder-view, #notes-view) .nl-node.on::before { background: var(--accent); }
:is(#builder-view, #notes-view) .nl-node.on:not(.now)::after { background: var(--accent); }
:is(#builder-view, #notes-view) .nl-dot { position: relative; z-index: 1; display: grid; place-items: center; box-sizing: border-box; width: 1.6rem; height: 1.6rem; border: 2px solid var(--line); border-radius: 50%; background: var(--sheet); font-size: 12px; font-weight: 600; }
:is(#builder-view, #notes-view) .nl-node.on .nl-dot { border-color: var(--accent); color: var(--ink); }
:is(#builder-view, #notes-view) .nl-node.now .nl-dot { background: var(--accent); color: var(--sheet); box-shadow: 0 0 0 3px var(--accent-soft); }
:is(#builder-view, #notes-view) .nl-node.now { color: var(--ink); font-weight: 600; }
:is(#builder-view, #notes-view) .nl-small { flex: 0 0 1.4rem; }
:is(#builder-view, #notes-view) .nl-small .nl-dot { width: 0.6rem; height: 0.6rem; margin-top: 0.5rem; border-width: 2px; }
:is(#builder-view, #notes-view) .nl-time { font-size: 11px; }
:is(#builder-view, #notes-view) .nl-label { white-space: nowrap; }
:is(#builder-view, #notes-view) .phone { display: grid; justify-items: center; }
:is(#builder-view, #notes-view) .phone #night { width: 100%; max-width: 22rem; }
#builder-view .notes-pair { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
/* Tailor and confirm (D-246): a line's labels sit together at the right of its header row. */
#notes-view .tl-head .chips { margin-left: auto; display: flex; flex-wrap: wrap; gap: 6px; }
#notes-view .tl-head .chips .chip { margin-left: 0; }
#builder-view .foot-bar { position: sticky; bottom: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--sheet); }
#builder-view .foot-bar p { margin: 0; }
#builder-view .foot-bar .actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
#builder-view .foot-bar #builder-submit-message { flex: 1 1 100%; }
.description-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.template-token { font-weight: 700; text-decoration: underline; }
/* The timeline: a time column and a card per stop, a dotted walk between stops, drop gaps, the room box. */
#builder-view .timeline { display: grid; }
#builder-view .stop { display: grid; grid-template-columns: 5.2rem minmax(0, 1fr); gap: 10px; }
#builder-view .stop > * { min-width: 0; }
#builder-view .when { font-family: var(--font); text-align: right; padding-top: 12px; font-size: 0.92rem; line-height: 1.2; }
#builder-view .when span { display: block; }
#builder-view .when .sub { font-family: var(--font); font-size: 12px; color: var(--ink-soft); }
#builder-view .stop-card { border: 1px solid var(--line); border-left: 5px solid var(--accent); border-radius: 8px; background: var(--sheet); padding: 8px 10px; display: grid; gap: 3px; }
#builder-view .stop-card.dining { border-left-color: var(--warn); }
#builder-view .stop-card.experience { border-left-color: var(--good); }
#builder-view .card-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
#builder-view .leg { margin-left: calc(5.2rem + 10px); padding: 3px 0 3px 14px; border-left: 2px dotted var(--edge); font-size: 12.5px; color: var(--ink-soft); }
#builder-view .gap { height: 10px; margin-left: calc(5.2rem + 10px); border-radius: 6px; }
#builder-view .gap.drop-empty { height: auto; margin-left: 0; padding: 22px; border: 2px dashed var(--line); border-radius: 8px; text-align: center; color: var(--ink-soft); }
#builder-view .gap.fits, #builder-view .gap.limit, #builder-view .gap.refused { height: auto; min-height: 40px; padding: 4px 8px; border: 2px dashed var(--good); background: var(--good-soft); color: var(--ink); display: grid; place-items: center; font-size: 12.5px; text-align: center; }
#builder-view .gap.limit { border-color: var(--warn); background: var(--warn-soft); }
#builder-view .gap.refused { border-color: var(--error); background: var(--sheet); color: var(--error); }
#builder-view .room { margin: 6px 0 0 calc(5.2rem + 10px); padding: 8px 10px; border: 2px dashed var(--line); border-radius: 8px; display: grid; gap: 2px; }
/* The stop controls: borderless icons, faint at rest (B11), full on hover or keyboard focus, and always full on touch. */
#builder-view .mini { display: flex; margin-left: auto; opacity: 0.4; transition: opacity 0.1s; }
#builder-view .stop-card:hover .mini, #builder-view .stop-card:focus-within .mini { opacity: 1; }
@media (hover: none) { #builder-view .mini { opacity: 1; } }
#builder-view .mini button { border: 0; border-radius: 4px; background: none; padding: 0 5px; color: var(--ink-soft); font-size: 15px; line-height: 1.2; }
#builder-view .mini button:hover:not(:disabled) { background: var(--accent-soft); color: var(--accent); }
/* Name buttons on cards and stops: plain bold text, accent and underlined on hover. */
:is(#builder-view, #notes-view) .btn.name { border: 0; background: none; padding: 0; font-weight: 600; text-align: left; text-decoration: none; color: var(--ink); }
:is(#builder-view, #notes-view) .btn.name:hover { color: var(--accent); text-decoration: underline; }
#builder-view h4 .btn.name { font-family: var(--font); font-size: 1.05rem; }
/* The tray head: Area and Category pills (pressed: ink fill), the filters, the hint line. */
#builder-view .tray-head { gap: 16px; padding: 18px 20px; }
#builder-view .tray-top { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
#builder-view .tray-top h3 { margin: 0; flex: 0 0 auto; }
#builder-view .tray-top input[type="search"] { flex: 1 1 14rem; width: auto; }
#builder-view .tray-top select.quiet { width: auto; border-color: transparent; background-color: transparent; color: var(--ink-soft); margin-left: auto; }
#builder-view .tray-tabs { margin-bottom: 0; align-items: center; gap: 8px 24px; }
#builder-view .tray-tabs .tab-group { display: flex; flex-wrap: wrap; gap: 8px 24px; }
#builder-view .tray-tabs #builder-more { margin-left: auto; padding: 10px 0; }
#builder-view .tray-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
#builder-view .tray-row .field { flex: 0 1 11rem; }
#builder-view #builder-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
#builder-view #builder-chips button.chip { cursor: pointer; color: var(--ink); }
#builder-view #builder-chips button.chip:hover { border-color: var(--accent); color: var(--accent); }
#builder-view .tray-group { margin: 4px 0 0; font-size: 14px; color: var(--ink-soft); }
#builder-view .pills, #curated-date-view .pills, #activity-view .pills { display: flex; flex-wrap: wrap; gap: 6px; }
#builder-view .pills .btn, #builder-view #builder-start-buttons .btn, #curated-date-view .pills .btn, #activity-view .pills .btn { border: 1.5px solid var(--edge); border-radius: 999px; background: var(--sheet); color: var(--ink); padding: 2px 12px; font-size: 14px; font-weight: 500; text-decoration: none; }
#builder-view .pills .btn[aria-pressed="true"], #builder-view #builder-start-buttons .btn[aria-pressed="true"], #curated-date-view .pills .btn[aria-pressed="true"], #activity-view .pills .btn[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--sheet); }
/* The start pills are the small ones (D-229). */
#builder-view #builder-start-buttons .btn { padding: 1px 10px; font-size: 13px; }
/* Tray cards (D-227): a coloured left edge, then name and category, venue and walk, tags, facts, what adding it does, and the foot. */
#builder-view .tray-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); }
#builder-view .tray-card { padding: 10px 12px; gap: 4px; border-left: 4px solid var(--edge); }
#builder-view .tray-card.drinks { border-left-color: var(--accent); }
#builder-view .tray-card.dining { border-left-color: var(--warn); }
#builder-view .tray-card.experience { border-left-color: var(--good); }
#builder-view .tray-card[draggable="true"] { cursor: grab; }
#builder-view .tray-card.dimmed { opacity: 0.6; }
#builder-view .tray-card .card-head { justify-content: space-between; align-items: baseline; }
#builder-view .tray-card .cat { font-size: 12.5px; font-weight: 600; color: var(--ink-soft); }
#builder-view .tray-card.drinks .cat { color: var(--accent); }
#builder-view .tray-card.dining .cat { color: var(--warn); }
#builder-view .tray-card.experience .cat { color: var(--good); }
#builder-view .tray-card p { margin: 0; }
#builder-view .tray-card .tags, #builder-view .tray-card .facts, #builder-view .tray-card .couple-labels { display: flex; flex-wrap: wrap; gap: 0 6px; font-size: 13px; color: var(--ink-soft); }
#builder-view .tray-card .tags > span + span::before, #builder-view .tray-card .facts > span + span::before { content: "\00b7"; margin-right: 6px; }
#builder-view .tray-card .tags .warn, #builder-view .tray-card .facts .warn { color: var(--warn); }
#builder-view .tray-card .consequence { font-size: 12.5px; font-weight: 500; }
#builder-view .tray-card .consequence.good { color: var(--good); }
#builder-view .tray-card .consequence.warn { color: var(--warn); }
#builder-view .card-foot { margin-top: auto; padding-top: 6px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
#builder-view .card-foot .usage { font-size: 12.5px; color: var(--ink-soft); }
#builder-view .card-foot .usage.good { color: var(--good); }
#builder-view .card-foot .usage.warn { color: var(--warn); }
#builder-view .card-foot .btn { margin-left: auto; }
#builder-view .imp { display: grid; gap: 2px; font-size: 12.5px; }
#builder-view .imp-row { display: flex; flex-wrap: wrap; gap: 2px 8px; padding: 2px 8px; border-radius: 6px; background: var(--warn-soft); color: var(--warn); }
#builder-view .imp-key { min-width: 3.4rem; font-weight: 600; }
.timebar { display: flex; flex-wrap: wrap; gap: 2px; }
.timebar .cell { width: 14px; height: 14px; border-radius: 3px; background: var(--sheet); border: 1px solid var(--line); box-sizing: border-box; }
.timebar .fill-drinks { background: var(--accent); border-color: var(--accent); }
.timebar .fill-dining { background: var(--warn); border-color: var(--warn); }
.timebar .fill-experience { background: var(--good); border-color: var(--good); }
/* The price meter (D-067): the same cells, filled good and warn from 90%, a dashed mark after the 90% cell; a dimmed card has little left. */
.meter .cell.fill { background: var(--good); border-color: var(--good); }
.meter .cell.fill.warn { background: var(--warn); border-color: var(--warn); }
.meter .cell.mark { border-right: 2px dashed var(--ink-soft); }
#activity-detail { width: min(44rem, 92vw); max-height: 90vh; overflow: auto; padding: 0; }
#activity-detail > .stack { padding: 18px; }
@media (max-width: 61.875rem) {
  #builder-narrow { display: grid; }
  #builder-wide { display: none; }
}
#app [role="status"]:empty { display: none; }
.stack { display: grid; gap: 14px; min-width: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 4px 8px; }
.chip { display: inline-block; padding: 2px 10px; border-radius: 999px; background: var(--paper); border: 1px solid var(--line); font-weight: 600; font-size: 12.5px; }
.chip.flag.attention { background: var(--error-soft); color: var(--error); border-color: transparent; }
.chip.flag.texts { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.chip.good { background: var(--good-soft); color: var(--good); }
.chip.warn { background: var(--warn-soft); color: var(--warn); }
.table-wrap { overflow-x: auto; max-width: 100%; background: var(--sheet); border: 1px solid var(--line); border-radius: 14px; }
#board td { padding: 8px; vertical-align: middle; }
#board tr:hover td { background: var(--paper); }
#board tbody tr[tabindex] { cursor: pointer; }
#board .last { display: block; font-size: 12.5px; font-weight: 400; color: var(--ink-soft); }
.chip.attention::before, .chip.texts::before { color: currentColor; font-weight: 700; margin-right: 4px; }
.chip.attention::before { content: "!"; }
.chip.texts::before { content: "\2709"; }
.chip a { color: inherit; }
.table-wrap td { vertical-align: top; }
.compact th, .compact td { padding: 4px 8px; font-size: 14px; }
.compact .status { display: block; font-size: 12.5px; font-weight: 400; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--line); }
#invites-list .notice { margin: 4px 0 0; }
#date-view .msg .notice, #stage-texts .notice { margin: 4px 0 0; }
#date-view .msg { margin: 8px 0 0; }
#date-view .msg-text { margin: 4px 0; padding: 8px 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--sheet); white-space: pre-wrap; }
#date-view .msg textarea, #stage-texts textarea { display: block; width: 100%; margin: 4px 0; }
#texts .msg-sent { margin: 8px 0 0; }
/* The stage card's text panels and the read-only Texts tab (D-304): panels side by side where there is room, a quiet row per text. */
#stage-texts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); gap: 12px; align-items: start; }
#stage-texts .text-panel, #stage-texts [data-field="waiting"] { display: grid; gap: 8px; padding: 14px; border-radius: 12px; background: var(--paper); min-width: 0; justify-items: start; }
#stage-texts .text-panel > *, #stage-texts [data-field="waiting"] > * { margin: 0; max-width: 100%; }
#stage-texts .msg { justify-self: stretch; }
.sent-toggle { display: inline-flex; gap: 6px; align-items: center; margin-left: 8px; }
#texts .text-row { display: flex; flex-wrap: wrap; gap: 4px 12px; padding: 6px 0; border-bottom: 1px solid var(--line); }
#texts .text-row .msg-sent { flex-basis: 100%; }
#texts summary { cursor: pointer; font-weight: 600; padding: 6px 0; }
.person { display: flex; flex-wrap: wrap; gap: 4px 12px; }
#date-view > .card { margin-top: 16px; }
.form-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.kv { display: grid; grid-template-columns: minmax(6rem, max-content) minmax(0, 1fr); gap: 4px 14px; margin: 0; font-size: 14px; }
.kv dt { color: var(--ink-soft); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.card.stop { background: var(--paper); }
.stop .venue { font-weight: 600; }
.stop .actions { justify-content: flex-start; }
#stop-form fieldset { display: grid; gap: 8px; }
/* Date steps, board steps, "What to do now", badges, legend, the move pop-up (D-054). Tokens and the shared buttons only. */
/* Board heading row (D-184): the search and the count line on the right of the heading, wrapping under it on a narrow screen. */
.board-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 8px 16px; margin-bottom: 12px; }
.board-head h2 { margin: 0; }
.board-find { display: flex; flex-wrap: wrap; align-items: end; gap: 6px 12px; min-width: 0; }
.board-find .note { margin: 0; }
@media (min-width: 48rem) { body.staff { padding-inline: 32px; } }
#board-steps.tabs { flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; gap: 24px; }
#board-steps .tab { display: inline-flex; flex: none; align-items: center; gap: 6px; padding: 10px 0; border-radius: 0; font: inherit; font-size: 14.5px; white-space: nowrap; cursor: pointer; }
#board-steps .tab[aria-pressed="true"] { font-weight: 600; }
#board-steps .cnt { color: var(--ink-soft); font-size: 12.5px; font-weight: 400; }
#board-steps .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--error); }
#board { table-layout: fixed; width: 100%; min-width: 40rem; }
#board td { padding: 15px 16px; }
#board td.who { display: table-cell; width: 36%; font-weight: 600; }
#board .when { width: 24%; }
#board:has(.state) td.who { width: 30%; }
#board .state { width: 14%; color: var(--ink-soft); font-size: 13.5px; }
#board .when a { color: var(--ink); font-weight: 600; text-decoration: none; }
#board td.flag { position: relative; padding-right: 40px; }
#board td.flag::after { content: "\203A"; position: absolute; right: 16px; top: 50%; transform: translateY(-50%); color: var(--ink-soft); }
:is(#board, #date-view) .chip.flag { padding: 0; border-radius: 0; background: none; font-size: 14px; }
:is(#board, #date-view) .chip.flag::before { content: none; }
:is(#board, #date-view) .chip.flag.attention { color: var(--error); }
:is(#board, #date-view) .chip.flag.texts { color: var(--warn); }
/* The flag's hover card (D-193): the full wording of every flag on the row, drawn from data-tip. It opens under the label, so on a wide
   window the table's scroll box lets it show past the card; the corners keep their round hover fill. */
:is(#board, #date-view) .chip.flag[data-tip] { position: relative; cursor: default; }
:is(#board, #date-view) .chip.flag[data-tip]::after { content: attr(data-tip); display: none; position: absolute; z-index: 5; top: calc(100% + 8px); left: 0; width: max-content; max-width: 20rem; padding: 8px 12px; border-radius: 8px; background: var(--ink); color: var(--paper); font-size: 13px; font-weight: 400; line-height: 1.45; white-space: pre-line; box-shadow: 0 6px 20px color-mix(in srgb, var(--ink) 25%, transparent); pointer-events: none; }
:is(#board, #date-view) .chip.flag[data-tip]:is(:hover, :focus-visible, :focus-within)::after { display: block; }
@media (min-width: 48rem) {
  .table-wrap:has(#board) { overflow: visible; }
  #board tr:first-child td:first-child { border-top-left-radius: 13px; }
  #board tr:first-child td:last-child { border-top-right-radius: 13px; }
  #board tr:last-child td:first-child { border-bottom-left-radius: 13px; }
  #board tr:last-child td:last-child { border-bottom-right-radius: 13px; }
}
#board .soft { color: var(--ink-soft); font-size: 13.5px; }
.badge { display: inline-grid; place-items: center; min-width: 1.15rem; height: 1.15rem; padding: 0 3px; box-sizing: border-box; border: 1px solid var(--accent); border-radius: 10px; color: var(--accent); font-size: 11.5px; font-weight: 700; line-height: 1; }
#date-view .tabs button .badge { margin-left: 6px; }
.countdown { font-family: var(--font); font-size: 0.95rem; font-weight: 600; color: var(--accent); }
.countdown:empty { display: none; }
/* Date view (D-201): the header's date line, the stepper, the job beside the one wine button, the foot, and the stops table with its open
   rows. Tokens and the shared buttons only (D-043). */
#date-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
#date-line:empty { display: none; }
:is(#date-view, #curated-date-view) .date-now-row { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px 24px; }
:is(#date-view, #curated-date-view) .guide { display: grid; flex: 1 1 24rem; gap: 10px; min-width: 0; }
:is(#date-view, #curated-date-view) .guide-job { display: grid; gap: 6px; align-content: start; }
:is(#date-view, #curated-date-view) .guide .eyebrow { margin: 0; font-size: 11.5px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--accent); font-weight: 600; }
:is(#date-view, #curated-date-view) .guide .job { font-family: var(--font); font-size: 1.2rem; line-height: 1.3; }
:is(#date-view, #curated-date-view) .guide-points { display: grid; gap: 8px; font-size: 14.5px; align-content: start; }
:is(#date-view, #curated-date-view) .guide-points .point { display: grid; grid-template-columns: 1.3rem minmax(0, 1fr); gap: 6px; }
:is(#date-view, #curated-date-view) .guide-points .mark { color: var(--accent); font-weight: 600; text-align: center; }
#date-view .job-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
:is(#date-view, #curated-date-view) .date-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
:is(#date-view, #builder-view) .stepper { display: flex; flex-wrap: wrap; gap: 6px 0; margin: 0 0 16px; padding: 0; list-style: none; }
:is(#date-view, #builder-view) .stepper li { display: flex; align-items: center; font-size: 13px; color: var(--ink-soft); }
:is(#date-view, #builder-view) .stepper li + li::before { content: ""; width: 20px; height: 1px; margin: 0 8px; background: var(--edge); }
:is(#date-view, #builder-view) .stepper li span::before { content: ""; display: inline-block; width: 9px; height: 9px; margin-right: 7px; border: 1.5px solid var(--edge); border-radius: 50%; box-sizing: border-box; vertical-align: -1px; }
:is(#date-view, #builder-view) .stepper li.done span::before { border-color: var(--accent); background: var(--accent); }
:is(#date-view, #builder-view) .stepper li.current { color: var(--ink); font-weight: 600; }
:is(#date-view, #builder-view) .stepper li.current span::before { border-color: var(--accent); background: var(--sheet); box-shadow: 0 0 0 3px var(--accent-soft); }
/* The bolder stepper of the stage-card mockup (D-303): the current step is a filled pill. */
#date-view .stepper { gap: 8px 0; margin: 0 0 14px; }
#date-view .stepper li { font-size: 14.5px; }
#date-view .stepper li + li::before { width: 28px; background: var(--outline); }
#date-view .stepper li.done { color: var(--ink); }
#date-view .stepper li.current { color: var(--paper); font-weight: 600; }
#date-view .stepper li.current span { background: var(--accent); padding: 4px 14px 4px 10px; border-radius: 999px; }
#date-view .stepper li.current span::before { background: var(--paper); border-color: var(--paper); box-shadow: none; }
/* The stage card (D-303): the step list stays one height; the work for the current step sits beside it in a panel. Tokens and the shared
   buttons only (D-043). */
#date-view .stage-card { gap: 14px; }
#date-view .guide .job { font-size: 1.35rem; font-weight: 600; }
#date-view .stage-body { display: grid; grid-template-columns: minmax(14rem, 20rem) minmax(0, 1fr); gap: 16px 24px; align-items: start; margin-top: 14px; }
#date-view .stage-steps { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
#date-view .stage-steps .step { display: grid; grid-template-columns: 1.4rem minmax(0, 1fr); gap: 2px 8px; padding: 6px 8px; border-radius: 10px; align-items: center; min-width: 0; color: var(--ink-soft); }
#date-view .stage-steps .mk { display: inline-grid; place-items: center; width: 1.3rem; height: 1.3rem; border: 1.5px solid var(--edge); border-radius: 50%; font-size: 12px; font-weight: 600; color: var(--ink-soft); }
#date-view .stage-steps .done .mk { background: var(--accent); border-color: var(--accent); color: var(--paper); }
#date-view .stage-steps .current { background: var(--paper); color: var(--ink); font-weight: 600; }
#date-view .stage-steps .current .mk { border-color: var(--accent); color: var(--accent); }
#date-view .stage-steps .notice { grid-column: 2; margin: 0; padding: 0; background: none; border: 0; color: var(--warn); font-size: 13.5px; font-weight: 400; }
#date-view .stage-panel { display: grid; gap: 10px; padding: 14px; border-radius: 12px; background: var(--paper); min-width: 0; justify-items: start; }
#date-view .stage-panel > *, #stage-work > * { margin: 0; max-width: 100%; }
#date-view .stage-panel #stage-work { display: grid; gap: 10px; justify-items: start; }
#date-view .stage-panel .actions { margin: 0; }
#date-view .stage-panel #stage-stops { justify-self: stretch; }
#date-view .stage-panel .lbl { font-size: 1.1rem; font-weight: 600; }
#stage-calm { margin: 0; font-size: 15px; }
#stage-now, #stage-rebook { margin-top: 12px; }
#stage-now { padding: 14px; border-radius: 12px; background: var(--paper); }
#stage-now p { margin: 0; }
#stage-now { display: grid; gap: 4px; }
#stage-now .stage-stop { display: grid; gap: 4px; }
#stage-rebook > .card { padding: 12px; border: 0; border-radius: 12px; background: var(--error-soft); box-shadow: none; }
#stage-rebook > .card .actions { justify-content: flex-start; }
#date-view #stage-foot { display: contents; }
#date-view #stage-stops:empty { display: none; }
/* The stops block as the mockup's list of lines: the same table, rows laid out as a tick, the stop, its venue phone and the toggle. */
#date-view #stage-stops .table-wrap { overflow: hidden; background: var(--sheet); border: 1px solid var(--line); border-radius: 12px; }
#date-view #stage-stops .stops-table { display: block; border: 0; }
#date-view #stage-stops .stops-table thead { display: none; }
#date-view #stage-stops .stop-group { display: block; border-bottom: 1px solid var(--line); }
#date-view #stage-stops .stop-group:last-child { border-bottom: 0; }
#date-view #stage-stops .stop-row { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; grid-template-areas: "tick venue stop go"; gap: 2px 0; align-items: center; padding: 10px 12px; }
#date-view #stage-stops .stop-row > td { display: block; padding: 0 12px 0 0; border: 0; }
#date-view #stage-stops .stop-row > td:empty { display: none; }
#date-view #stage-stops .stop-row > td:nth-child(1) { display: none; }
#date-view #stage-stops .stop-row > td:nth-child(2) { grid-area: stop; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "nm phone" "sub phone"; gap: 2px 12px; align-items: center; }
#date-view #stage-stops .stop-row > td:nth-child(3) { grid-area: tick; width: 10.5rem; }
#date-view #stage-stops .stop-row > td:nth-child(4) { grid-area: venue; width: 9rem; }
/* Confirming venues: only the venue tick shows; the booking tick can still be undone from the open row (D-269). */
#date-view #stage-stops[data-step="venues"] .stop-row > td:nth-child(3) { display: none; }
#date-view #stage-stops .stop-row > td:nth-child(5) { grid-area: go; padding-right: 0; }
/* An open row is one block: its group takes the tint, not the cells one by one. The curated date's welcome card stays in the Stops tab. */
#date-view #stage-stops .stop-row:has(+ .stop-open:not([hidden])) > td, #date-view #stage-stops .stop-open > td { background: none; }
#date-view #stage-stops .stop-group:has(.stop-open:not([hidden])) { background: var(--paper); }
#date-view #stage-stops #date-pick { display: none; }
/* An unticked venue box says what it confirms, as the booking cell does. */
#date-view #stage-stops .stop-row > td:nth-child(4):not(:has(.good))::after { content: "Confirmed"; margin-left: 6px; font-weight: 600; }
/* Hover lights the whole row, not its cells one by one (the cells keep their own padding, so the cell highlight left odd patches). */
#date-view #stage-stops .stop-row:hover { background: var(--paper); }
#date-view #stage-stops .stop-row:hover > td { background: none; }
@media (hover: hover) { #date-view #stage-stops #stops-list .row-tick:hover { background: none; } }
#date-view #stage-stops .stop-row .nm { grid-area: nm; font-weight: 600; }
#date-view #stage-stops .stop-row .sub { grid-area: sub; color: var(--ink-soft); font-size: 13px; }
#date-view #stage-stops .stop-row .sub .cat { margin-right: 0; color: inherit; font-weight: 400; font-size: inherit; }
#date-view #stage-stops .stop-row .phone { grid-area: phone; font-variant-numeric: tabular-nums; }
#date-view #stage-stops .stop-row > td:nth-child(3) .soft { font-size: inherit; font-weight: 600; color: var(--ink-soft); margin-left: 1.5rem; }
#date-view #stage-stops .stop-open > td { display: block; padding: 0 12px 12px; border: 0; }
.quiet-table.stops-table .stop-row .when { display: none; }
#date-view #stage-stops .stop-row .when { display: inline; }
#date-view #stage-stops .stop-row .when::before { content: " · "; }
@media (max-width: 760px) { #date-view .stage-body { grid-template-columns: minmax(0, 1fr); } }
/* Details (D-302, D-303): a quiet row of tabs under the card, closed until one is picked; no box around it. */
#date-view .ref { margin-top: 16px; display: grid; gap: 8px; }
#date-view .ref-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 20px; border-bottom: 1px solid var(--line); }
#date-view .ref-title { font-size: 12px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-soft); }
#date-view .ref-bar .tabs { margin: 0; border: 0; gap: 20px; }
#date-view .ref-bar .tabs button { padding: 8px 0; font-size: 14.5px; }
/* The date header (D-302, D-303), as the reviewed mockup: the title with its back link and the actions on one line, the date line, then the
   partners side by side, each a name, a number and three equal small buttons. Tokens and `.btn` only (D-043). */
#date-view .dhd { display: grid; gap: 4px; margin-bottom: 12px; }
#date-view .dhd-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 16px; }
#date-view .dhd-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; min-width: 0; }
#date-view .dhd-title h2 { margin: 0; }
#date-view .dhd-title .back { font-size: 14px; }
#date-view .dhd-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; }
#date-view .dhd-actions p { margin: 0; }
#date-view .dhd-actions .page-head-next { font-size: 14.5px; font-weight: 500; }
#date-view .dhd-actions select { width: auto; padding: 4px 30px 4px 8px; font-size: 14.5px; }
#date-view #incident-log-open { padding: 5px 14px; font-size: 14.5px; }
#date-view #date-line { margin: 0; }
#date-people { display: grid; grid-template-columns: repeat(auto-fit, minmax(22rem, 1fr)); gap: 6px 24px; margin-top: 4px; }
#date-people .person-row { display: grid; grid-template-columns: 7.5rem max-content max-content max-content max-content; gap: 6px; align-items: center; }
#date-people .who { font-weight: 600; }
#date-people .phone { margin-right: 6px; font-variant-numeric: tabular-nums; color: var(--ink-soft); }
#date-people .btn { display: inline-block; min-width: 4rem; padding: 3px 0; border-radius: 10px; font-size: 14px; line-height: 1.5; text-align: center; }
@media (max-width: 760px) { #date-people { grid-template-columns: minmax(0, 1fr); } #date-people .person-row { grid-template-columns: 1fr max-content; } #date-people .person-row .btn { grid-row: 2; } }
#date-people-message:empty { display: none; }
#date-off.quiet-select { width: auto; border-color: transparent; background-color: transparent; color: var(--ink-soft); }
/* Dev-only tools sit in an amber dashed panel (D-270). The shared [hidden] rule wins over this display. */
#date-jump-block { display: grid; justify-items: start; gap: 8px; margin-top: 14px; padding: 12px 14px; border: 2px dashed var(--warn); border-radius: 10px; background: var(--warn-soft); }
#date-jump-block .dev-label { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--warn); }
#date-jump-block .note, #date-jump-block .notice { margin: 0; }
.quiet-table.stops-table .stop-row { cursor: pointer; }
.quiet-table.stops-table tbody tr:last-child td { border-bottom: 1px solid var(--line); }
.quiet-table.stops-table tbody:last-child tr:last-child td { border-bottom: 0; }
.quiet-table.stops-table .line { display: block; }
.quiet-table.stops-table .cat { margin-right: 8px; font-size: 12.5px; font-weight: 600; }
.quiet-table.stops-table .cat.drinks { color: var(--accent); }
.quiet-table.stops-table .cat.dining { color: var(--warn); }
.quiet-table.stops-table .cat.experience { color: var(--good); }
.quiet-table.stops-table .activity { margin-right: 6px; font-weight: 600; }
.quiet-table.stops-table .good { color: var(--good); font-weight: 600; }
.quiet-table.stops-table .warn { color: var(--warn); font-weight: 600; }
.bulk-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 8px; }
.interest-add-pair { display: grid; grid-template-columns: minmax(0, 1fr) 7rem; gap: 10px; }
.quiet-table .tick-cell { width: 2rem; }
.quiet-table.stops-table .row-toggle { padding: 2px 8px; border: 0; background: none; color: var(--ink-soft); font-size: 18px; line-height: 1; }
.quiet-table.stops-table .stop-row:has(+ .stop-open:not([hidden])) > td, .quiet-table.stops-table .stop-open > td { background: var(--paper); }
.quiet-table.stops-table .stop-open > td { padding: 4px 16px 18px; border-top: 0; }
.quiet-table.stops-table .stop-detail { display: grid; gap: 14px 24px; }
.quiet-table.stops-table .stop-side { display: grid; gap: 8px; align-content: start; justify-items: start; }
.quiet-table.stops-table .stop-side p { margin: 0; }
.quiet-table.stops-table .stop-open .swaps { margin-top: 12px; }
@media (min-width: 48rem) { .quiet-table.stops-table .stop-detail { grid-template-columns: minmax(0, 1fr) auto; } }
/* The date view's row ticks (D-269): set columns so a tick moves nothing, and the whole cell is the target. */
#stops-list { table-layout: fixed; min-width: 44rem; }
#stops-list th:nth-child(1) { width: 8.5rem; }
#stops-list th:nth-child(3), #stops-list th:nth-child(4) { width: 11rem; }
#stops-list th:nth-child(5) { width: 3rem; }
#stops-list .row-tick { cursor: pointer; }
#stops-list .row-tick input { margin: 0 6px 0 0; accent-color: var(--accent); vertical-align: -1px; }
@media (hover: hover) { #stops-list .row-tick:hover { background: var(--accent-soft); } }
/* Curated Date view (D-225): the header's edit link, the Now card's forms and foot, the stops table's tags, walk and struck rows, and
   the said scroll box. The two columns are .couple-cols. Buttons keep the size of their labels. Tokens and the shared buttons only (D-043). */
#cd-head { display: contents; }
#curated-date-view .stack > :is(.btn, button), #curated-date-view .now-form > .actions { justify-self: start; }
#curated-date-view .now-form { display: grid; gap: 12px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
#curated-date-view .now-form .actions { justify-content: flex-start; }
#curated-date-view .date-foot .retire { margin-left: auto; }
#curated-date-view .job.warn, #curated-date-view .guide-points .point.warn { color: var(--warn); }
.stops-table .tag { margin-left: 8px; font-size: 12.5px; font-weight: 600; color: var(--warn); }
.stops-table .walk { padding-top: 2px; padding-bottom: 2px; font-size: 13px; color: var(--ink-soft); }
.stops-table .walk.warn { color: var(--warn); }
.stops-table .stop-removed td { color: var(--ink-soft); text-decoration: line-through; }
#curated-date-view .said-scroll { max-height: 18rem; overflow-y: auto; }
.who { display: grid; gap: 6px; }
.who label, .check { display: inline-flex; gap: 8px; align-items: center; font-weight: 400; }
dialog { border: 1px solid var(--line); border-radius: 16px; background: var(--sheet); color: var(--ink); padding: 18px; width: min(32rem, calc(100vw - 32px)); box-sizing: border-box; }
dialog::backdrop { background: color-mix(in srgb, var(--ink) 35%, transparent); }
/* Activities (D-051): the day and filter tick rows and the photo placeholder. Tokens only. */
.days { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 8px 0; }
.days label { display: inline-flex; gap: 6px; align-items: center; }
/* Hours blocks on the activity form (D-142): a night another block holds is dimmed like a disabled button but stays clickable, so the click can say why. */
.hours-block + .hours-block { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
/* Tick-box chips (D-235): nights and seasons. The border and box turn wine when on; a night another block holds is dashed. */
#activity-view .tick-chip { display: inline-flex; align-items: center; gap: 8px; border: 1.5px solid var(--edge); border-radius: 999px; background: var(--sheet); color: var(--ink); padding: 2px 12px 2px 8px; font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; }
#activity-view .tick-box { position: relative; order: -1; flex: none; width: 16px; height: 16px; border: 1.5px solid var(--edge); border-radius: 4px; background: var(--sheet); }
#activity-view .tick-chip[aria-pressed="true"] { border-color: var(--accent); }
#activity-view .tick-chip[aria-pressed="true"] .tick-box { background: var(--accent); border-color: var(--accent); }
#activity-view .tick-chip[aria-pressed="true"] .tick-box::after { content: ""; position: absolute; left: 4px; top: 1px; width: 4px; height: 8px; border: solid var(--sheet); border-width: 0 2px 2px 0; transform: rotate(45deg); }
#activity-view .tick-chip[aria-disabled="true"] { border-style: dashed; opacity: 0.55; cursor: default; }
#activity-view .hours-block { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px 12px; }
#activity-view .hours-block .notice { flex-basis: 100%; margin: 0; }
/* The nights are a row of their own, the three times share the card's width (three across where they fit), and the remove button ends the row (D-231). */
#activity-view .hours-block > .pills { flex: 1 0 100%; margin: 0; }
#activity-view .hours-block > .form-grid { flex: 1 1 18rem; min-width: 0; grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr)); }
#activity-view .hours-block > .actions { margin-left: auto; align-self: flex-end; }
.photo-ph { aspect-ratio: 16 / 9; max-width: 16rem; margin-top: 10px; border: 1px dashed var(--edge); border-radius: 6px; background: var(--paper); }
/* The activity page (#658, D-211): one 48rem column of summary cards; the open one has the accent border and its own foot, a later step of a new
   activity is a dashed outline. Tokens and component classes only. */
#activity-view { max-width: 48rem; }
#activity-view .act-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 4px 16px; }
#activity-view .act-head h2 { margin: 0.5rem 0 0.25rem; }
#activity-view .act-head-main { flex: 1 1 14rem; }
#activity-view #act-photo { flex: 0 0 auto; }
#activity-view .act-status { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
#activity-view .sec-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
#activity-view .sec-head h3 { margin: 0; font-size: 0.8125rem; font-weight: 600; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.04em; }
#activity-view .sec-actions { margin-left: auto; display: flex; gap: 4px 12px; }
#activity-view .sec-actions .btn.link { padding: 0 4px; }
#activity-view .sec-sum { display: grid; gap: 2px; min-width: 0; }
#activity-view .sum-line { overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
#activity-view .sum-label { color: var(--ink-soft); }
#activity-view .sec[data-state="open"] { border-color: var(--accent); border-width: 2px; }
#activity-view .sec[data-state="later"] { border-style: dashed; border-color: var(--outline); background: transparent; }
#activity-view .sec-foot { border-top: 1px solid var(--line); padding-top: 10px; display: grid; gap: 6px; }
#activity-view .optional-group { border-top: 1px solid var(--line); padding-top: 10px; }
#activity-view .optional-label { margin: 0; font-size: 12.5px; color: var(--ink-soft); }
#activity-view .hit { display: block; text-align: left; width: 100%; }
/* The form's insides (#659, D-213, D-231): short choices three to a row, the "+ New" link under its dropdown, its one-line row in place, the fixed $ in a money box.
   A field packs to the top of its grid cell, so inputs in a row start level whatever sits under them. */
#activity-view .row3 { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
#activity-view .row3 > * { min-width: 0; }
@media (min-width: 40rem) { #activity-view .row3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
#activity-view .field { align-content: start; }
#activity-view :is(#v-add-area, #a-interest-open, #a-dress-open) { justify-self: start; padding: 0; font-size: 12.5px; }
#activity-view .add-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
#activity-view .add-line input { flex: 1 1 10rem; min-width: 0; }
#activity-view .money { position: relative; display: inline-block; }
#activity-view .money > span { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--ink-soft); pointer-events: none; }
#activity-view .money input { padding-left: 1.6rem; width: 8rem; }

/* Tailor and confirm (D-197): the save bar, one card of texts, the box with its preview beside it. */
.notes-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: 12px 0; }
.notes-bar .actions { margin-left: auto; }
.notes-inserts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.notes-pair { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.notes-pair > * { min-width: 0; }
.insert-chip { font: inherit; font-size: 13px; padding: 1px 10px; border: 1px dashed var(--edge); border-radius: 999px; background: var(--sheet); color: var(--ink); cursor: pointer; }
.insert-chip:disabled { cursor: default; opacity: 0.6; }
/* A stored activity photo fills the same box as the placeholder (#604). */
img.photo { display: block; width: 100%; aspect-ratio: 16 / 9; max-width: 16rem; margin-top: 10px; border-radius: 6px; object-fit: cover; background: var(--paper); }
@media (min-width: 48rem) {
  .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .notes-pair { grid-template-columns: minmax(0, 1fr) 18rem; }
}
/* The reveal instructions on the activity page: the preview sits beside the box from 40rem (#659). */
@media (min-width: 40rem) { #activity-view .notes-pair { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
/* A wrong field on the activity form (#670, D-217): the control's border turns red, or a radio or pill group gets a red outline. The message is the
   `.notice` under it. */
#activity-view :is(input, select, textarea)[aria-invalid="true"] { border-color: var(--error); }
#activity-view :is(fieldset, .pills)[aria-invalid="true"] { outline: 1.5px solid var(--error); outline-offset: 4px; border-radius: 10px; }

/* Calendar (#197, D-059): a Sunday-first month grid of day cells. Layout only; colours are the existing tokens. */
.cal { max-width: 40rem; }
.cal-bar { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.cal-bar h2 { margin: 0; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; margin: 0.75rem 0; }
/* Every day is the same size, like a real calendar: a fixed height, so a row with a heart and a tag is no taller than an empty one. Days already gone are dimmed (D-194). */
.cal-day, .cal-blank { box-sizing: border-box; height: 4.4rem; line-height: 1.2; }
.cal-day.past { opacity: 0.55; }
.cal-tag { white-space: nowrap; }
.cal-day { display: flex; flex-direction: column; align-items: center; padding: 4px 2px; border: 1px solid var(--line); border-radius: 6px; background: var(--sheet); font: inherit; font-size: 13px; }
div.cal-day { color: var(--ink-soft); }
.cal-num { font-weight: 500; }
.cal-tag { font-size: 11px; color: var(--ink-soft); }
.cal-day.today .cal-num { text-decoration: underline; }
.cal-day.night { border-color: var(--edge); }
.cal-heart, .cal-heart-gap { width: 14px; height: 14px; margin: 1px 0; flex: none; }
.cal-heart { stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; fill: none; }
.cal-heart.full { fill: var(--accent); }
.cal-day.selected { background: var(--accent-soft); border-color: var(--accent); border-width: 2px; }
.cal-day.was-here { border-style: dashed; }
/* The selected night's pop-up (#735): the shared dialog, docked to the bottom as a sheet on phones and centred from 48rem. The
   body fills the dialog so only a tap on the backdrop lands on the dialog itself. */
dialog.cal-sheet { padding: 0; }
.cal-sheet-body { display: grid; gap: 10px; padding: 18px; }
.cal-sheet-body h2, .cal-sheet-body p { margin: 0; }
.cal-sheet .actions { justify-content: flex-start; }
.cal-sheet #cal-close { margin-left: auto; }
.cal-sheet #cal-skip-confirm, .cal-sheet #cal-move-part { display: grid; gap: 10px; }
.cal-move-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.cal-move-fields select { width: 100%; }
@media (max-width: 47.99rem) {
  dialog.cal-sheet { width: 100%; max-width: 100%; margin: auto 0 0; border-bottom: 0; border-radius: 16px 16px 0 0; }
  .cal-sheet-body { padding-bottom: calc(18px + env(safe-area-inset-bottom, 0px)); }
}

/* Loading panel: shown instead of the landing while the page is signing in (boot.js sets the marker, app.js clears it). */
#signing-in-panel { display: none; }
.signing-in #signing-in-panel { display: grid; justify-items: center; gap: 16px; margin-top: 20vh; }
.signing-in #landing { display: none; }
.spinner { width: 28px; height: 28px; border: 3px solid var(--line); border-top-color: var(--accent); border-radius: 50%; opacity: 0; animation: spinner-fade 0.2s 0.3s forwards, spinner-turn 0.9s linear infinite; }
@keyframes spinner-fade { to { opacity: 1; } }
@keyframes spinner-turn { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .spinner { animation: spinner-fade 0.2s 0.3s forwards; }
}
/* The Customers notes keep the line breaks staff typed (D-071). */
#notes-list p { margin: 0 0 2px; white-space: pre-wrap; overflow-wrap: anywhere; }

/* The night and Past dates (D-091): layout only, on the shared tokens and components. */
#night-body { display: grid; gap: 8px; }
#night-body .night-row { padding: 8px 12px; border-radius: 6px; border: 1px dashed var(--edge); color: var(--ink-soft); }
#night-body .night-row.past { border: 0; padding: 2px 0; }
#night-body .night-row.planned { border: 1px solid var(--line); color: var(--ink); }
#night-body .night-row.planned .note { margin: 2px 0 0; }
/* The fan and the Headline card (D-164, D-305). Every card has a fixed place for its position, all pivoting from one bottom point; the stop
   they are at is on top, later stops over earlier ones. The turn and the rise run only under .turning and .rising. */
#night { position: relative; }
#night .deck-cards { width: 15rem; height: 9rem; }
#night .hand { position: absolute; inset: 0; }
#night .deck-card { width: 5.6rem; height: 8.2rem; margin-left: -2.8rem; transform-origin: 50% 100%; perspective: 700px; user-select: none; -webkit-user-select: none; }
#night .deck-hint { text-align: center; max-width: 18rem; }
#night button.deck-card { appearance: none; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: inherit; cursor: pointer; transition: translate 0.2s ease; }
#night button.deck-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
#night button.deck-card:hover, #night button.deck-card:focus-visible { translate: 0 -8px; }
#night .fan-1-1 { transform: rotate(0deg); z-index: 1; }
#night .fan-2-1 { transform: rotate(-7deg); z-index: 1; }
#night .fan-2-2 { transform: rotate(7deg); z-index: 2; }
#night .fan-3-1 { transform: rotate(-14deg); z-index: 1; }
#night .fan-3-2 { transform: rotate(0deg); z-index: 2; }
#night .fan-3-3 { transform: rotate(14deg); z-index: 3; }
#night .fan-4-1 { transform: rotate(-19.5deg); z-index: 1; }
#night .fan-4-2 { transform: rotate(-6.5deg); z-index: 2; }
#night .fan-4-3 { transform: rotate(6.5deg); z-index: 3; }
#night .fan-4-4 { transform: rotate(19.5deg); z-index: 4; }
#night .fan-5-1 { transform: rotate(-24deg); z-index: 1; }
#night .fan-5-2 { transform: rotate(-12deg); z-index: 2; }
#night .fan-5-3 { transform: rotate(0deg); z-index: 3; }
#night .fan-5-4 { transform: rotate(12deg); z-index: 4; }
#night .fan-5-5 { transform: rotate(24deg); z-index: 5; }
#night .fan-6-1 { transform: rotate(-27.5deg); z-index: 1; }
#night .fan-6-2 { transform: rotate(-16.5deg); z-index: 2; }
#night .fan-6-3 { transform: rotate(-5.5deg); z-index: 3; }
#night .fan-6-4 { transform: rotate(5.5deg); z-index: 4; }
#night .fan-6-5 { transform: rotate(16.5deg); z-index: 5; }
#night .fan-6-6 { transform: rotate(27.5deg); z-index: 6; }
#night .deck-card.top { z-index: 10; }
#night .deck-inner { position: absolute; inset: 0; transform-style: preserve-3d; }
#night .deck-inner.up { transform: rotateY(180deg); }
#night .deck-inner > .back, #night .deck-inner > .face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
#night .deck-inner > .face { transform: rotateY(180deg); }
#night .face { display: grid; align-content: start; justify-items: center; gap: 4px; padding: 8px 6px; border-radius: 6px; text-align: center; box-sizing: border-box; background: var(--sheet); color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line), 0 2px 6px color-mix(in srgb, var(--ink) 30%, transparent); font-size: 11px; line-height: 1.2; overflow-wrap: anywhere; overflow: hidden; }
#night .face-num { font-size: 9.5px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); }
#night .face-badge { display: grid; place-items: center; width: 2.6rem; height: 2.6rem; margin-top: 0.5rem; border-radius: 50%; color: var(--paper);
  background: var(--accent) repeating-conic-gradient(from 0deg at 50% 50%, color-mix(in srgb, var(--paper) 9%, transparent) 0deg 5deg, transparent 5deg 10deg);
  box-shadow: inset 0 0 0 3px var(--accent), inset 0 0 0 4px color-mix(in srgb, var(--paper) 55%, transparent); }
#night .face-badge svg { width: 1.3rem; height: 1.3rem; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
#night .face-badge.emoji { font-size: 1.35rem; line-height: 1; }
#night .face-main { font-weight: 600; font-size: 11.5px; }
#night .face-time { color: var(--ink-soft); font-size: 10px; }
#night .tappable .deck-card.top { cursor: pointer; }
@media (hover: hover) {
  #night .tappable .deck-card.top .deck-inner > .back { box-shadow: inset 0 0 0 4px var(--accent), inset 0 0 0 5px var(--rose), 0 0 0 2px var(--rose), 0 6px 12px color-mix(in srgb, var(--ink) 30%, transparent); }
}
#night .lifted .deck-card.top { translate: 0 -14px; scale: 1.06; transition: translate 0.25s ease, scale 0.25s ease; }
#night .turning .deck-card.top .deck-inner { transition: transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1); }
#night .rising .deck-card.top { animation: night-rise 0.5s cubic-bezier(0.2, 0.7, 0.2, 1); }
@keyframes night-rise { from { translate: 0 0; } 40% { translate: 0 -16px; } to { translate: 0 0; } }
/* The wide-screen size is a box and a scale, not zoom, so the deck and its button stay centred (D-305). */
@media (min-width: 48rem) {
  #night .deck-cards { width: 20.25rem; height: 12.15rem; }
  #night .hand { inset: auto; bottom: 0; left: 2.625rem; width: 15rem; height: 9rem; transform: scale(1.35); transform-origin: 50% 100%; }
}
@media (prefers-reduced-motion: reduce) {
  #night .deck-inner, #night .deck-card { transition: none !important; animation: none !important; }
}
/* The top block (D-305): label, headline, time chip and the address row, centred above the ticket's tear. */
#night-top { display: grid; gap: 6px; justify-items: center; text-align: center; }
#night-top p, #night-top h2 { margin: 0; }
#night-top .night-label { color: var(--ink-soft); font-size: 13.5px; }
#night-top .night-headline { font-size: 1.5rem; line-height: 1.2; }
#night-top .night-where { flex-wrap: wrap; justify-content: center; gap: 0.4rem 0.6rem; }
#night-top .notice { justify-self: stretch; text-align: left; }
#night-tear { margin: 0.4rem -16px; }
#night .deck { margin-bottom: 0.4rem; }
/* The reread pop-up: a rounded box inset in the night card over a scrim. */
.night-pop { position: absolute; inset: 0; z-index: 20; display: grid; place-items: center; padding: 12px; border-radius: inherit; }
.night-pop[hidden] { display: none; }
.night-pop-scrim { position: absolute; inset: 0; border-radius: inherit; background: color-mix(in srgb, var(--ink) 45%, transparent); }
.night-pop-box { position: relative; display: grid; gap: 8px; justify-items: start; max-width: 100%; max-height: 100%; overflow: auto; padding: 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--sheet); }
.night-pop-box :is(h3, p) { margin: 0; }
.night-pop-box .description-text { white-space: pre-wrap; }
#night-body .night-stop { display: grid; gap: 6px; padding: 12px 14px; border-radius: 6px; border: 1px solid var(--line); min-width: 0; justify-items: start; }
#night-body .stop-title { margin: 0; font-size: 1.2rem; font-weight: 600; line-height: 1.25; }
#night-body .stop-reveal { margin: 0; border-top: 1px solid var(--line); padding-top: 8px; align-self: stretch; }
#night-body .night-welcome { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: center; font-style: italic; color: var(--accent); }
#night-body .night-welcome p { margin: 0; }
#night-body .night-welcome .deck-mark { width: 1.7rem; height: 2.2rem; font-size: 1rem; }
/* The day-before text (D-163): a small box on the next-date card and the night card, on the shared tokens. */
.day-before { display: grid; gap: 4px; }
#next-date .day-before-text, #night-body .day-before-text, #night-body .night-walk { margin: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--paper); font-size: 14px; }
/* The call bar (D-305): the night card's width, alignment, radius and border, not sticky; under the card on My dates, at the end of Past dates. */
.night-call { justify-self: stretch; padding: 10px 16px; border: 1.5px solid var(--ink); border-radius: 16px; background: var(--accent-soft); text-align: left; }
.night-call[hidden] { display: none; }
.night-call p { margin: 0; }
#past { display: grid; gap: 14px; justify-items: stretch; }
#past :is(h1, h2, p) { margin: 0; }
#past .past-stop { color: var(--ink); }
/* The review form and summary (D-157): layout only, on the shared tokens and buttons. Stars and hearts are 44 px tap targets. */
#past .review, #past .review-form, #past .review-summary { display: grid; gap: 10px; }
#past .review-form h4, #past .review-summary h4 { margin: 0; }
#past .review-form p, #past .review-summary p { margin: 0; }
#past .star-row { display: flex; }
#past .star { position: relative; display: grid; place-items: center; width: 44px; height: 44px; cursor: pointer; }
#past .stars.big .star { width: 52px; height: 52px; }
#past .star input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
#past .star:focus-within { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: 6px; }
#past .icon { width: 26px; height: 26px; fill: none; stroke: var(--edge); stroke-width: 1.6; stroke-linejoin: round; }
#past .stars.big .icon { width: 32px; height: 32px; }
#past .icon.on { fill: var(--accent); stroke: var(--accent); }
#past .stars-ro { display: inline-flex; }
#past .stars-ro .icon { width: 20px; height: 20px; }
#past .heart-ro { display: inline-flex; margin-left: 8px; }
#past .heart-ro .icon { width: 20px; height: 20px; }
#past .review-stop { display: grid; gap: 6px; }
#past .review-stop-top { display: flex; align-items: center; gap: 10px; }
#past .review-stop-top .photo-ph { flex: 0 0 72px; width: 72px; aspect-ratio: 4 / 3; margin: 0; }
#past .review-stop-top .past-stop { flex: 1 1 auto; }
#past .heart { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border-color: transparent; background: none; }
#past .heart[aria-pressed="true"] { background: var(--accent-soft); }
#past .heart-pointer { position: relative; margin: 6px 0 0; padding: 8px 12px; border-radius: 6px; background: var(--ink); color: var(--paper); font-size: 13.5px; }
#past .heart-pointer::before { content: ""; position: absolute; top: -5px; right: 18px; width: 10px; height: 10px; background: var(--ink); transform: rotate(45deg); }
#past .review textarea { resize: none; }
#past .review-actions { display: flex; gap: 10px; flex-wrap: wrap; }
#past .review-given { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
#past .review-given p:last-child:not(.note) { flex-basis: 100%; }

/* The incident screens (D-116, amends D-109): layout for the staff date view's contact strip, situation and outcome choice cards, Do now
   checklist and Incidents tab. Tokens and the shared buttons only: no new colour or button style (D-043). Phone width first: dialogs scroll
   inside themselves and every button is a large tap target. */
#date-view .inc-box { color: var(--ink); font-size: 13px; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
#date-view .incident-dialog { max-height: 90vh; overflow: auto; }
#date-view .contacts { display: grid; gap: 6px; }
#date-view .who-row { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
#date-view .who-row .phone { font-size: 1.2rem; font-weight: 600; font-variant-numeric: tabular-nums; min-width: 9rem; }
#date-view .dhead { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
#date-view .dhead h3 { margin: 0; }
#date-view .sit { display: grid; gap: 2px; border: 1px solid var(--edge); border-radius: 8px; padding: 10px 12px; background: var(--sheet); font-weight: 400; cursor: pointer; }
#date-view .sit:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
#date-view .sit .nm { font-weight: 600; display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
#date-view .sit .hint { display: block; }
#date-view .radios { display: flex; flex-wrap: wrap; gap: 4px 16px; }
#date-view details.more { border-top: 1px solid var(--line); padding-top: 8px; }
#date-view details.more summary { cursor: pointer; font-weight: 500; color: var(--accent); }
#date-view details.more > div { display: grid; gap: 10px; margin-top: 8px; }
#date-view .dogroup { display: grid; gap: 2px; }
#date-view .dogroup .lbl { font-size: 11.5px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--accent); font-weight: 600; }
#date-view .dolist { margin: 2px 0 0; padding-left: 1.1rem; display: grid; gap: 3px; font-size: 14px; }
#date-view .noterow { display: flex; gap: 8px; }
#date-view .noterow input { flex: 1 1 auto; min-width: 0; }
#date-view .inc-head { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
#date-view .log { margin: 0; padding-left: 1.1rem; font-size: 12.5px; color: var(--ink-soft); }
#date-view .incident-playbook { margin: 8px 0 0; padding-left: 1.2rem; display: grid; gap: 6px; font-size: 14.5px; }
#date-view .rowbtn { cursor: pointer; }
#date-view .rowbtn:hover td { background: var(--accent-soft); }
#date-view .detail-cell { background: var(--paper); }
#date-view .detail-cell .actions { justify-content: flex-start; }
#date-view .incident-dialog .btn, #date-view .incident-dialog button, #date-view #incident-cards .btn, #date-view #incident-cards button, #date-view .contacts .btn, #date-view #incident-log-open, #date-view .detail-cell button { min-height: 44px; }
#date-view .incident-dialog :is(.btn, button), #date-view #incident-cards :is(.btn, button), #date-view .contacts .btn, #date-view .detail-cell button { display: inline-flex; align-items: center; justify-content: center; text-align: center; }
#date-view .who-row .phone { min-width: 0; }
#date-view .backup-group, #date-view .backup-row { display: grid; gap: 8px; }
#date-view .backup-row .inc-head { justify-content: space-between; }
/* Areas tab map (D-139): the card's own layout and the drawing's states. Tokens only; the water pair is for the map alone. */
#areas-map-card { margin-bottom: 16px; }
#areas-map-card .tabs { margin-bottom: 0; }
#areas-map-card .map-top { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 8px 14px; }
#areas-map-card .legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: var(--ink-soft); }
#areas-map-card .legend span { display: inline-flex; align-items: center; gap: 6px; }
#areas-map-card .sw { width: 14px; height: 14px; border-radius: 3px; border: 1px solid var(--line); background: var(--sheet); }
#areas-map-card .sw.held { background: var(--good-soft); border-color: var(--good); }
#areas-map-card .sw.chosen { background: var(--good); border-color: var(--good); }
#areas-map-card .credit { font-size: 12px; color: var(--ink-soft); margin: 0; }
#areas-map-info { display: grid; gap: 6px; min-height: 1.5em; }
#areas-map-info .name { font-weight: 600; }
#areas-map { width: 100%; height: auto; max-height: 72vh; display: block; background: var(--paper); border: 1px solid var(--line); border-radius: 8px; }
#areas-map path { fill: var(--sheet); stroke: var(--line); stroke-width: 1; cursor: pointer; }
#areas-map path[data-state="held"] { fill: var(--good-soft); stroke: var(--good); stroke-opacity: 0.45; }
#areas-map path[data-state="chosen"] { fill: var(--good); stroke: var(--good); stroke-width: 2; }
#areas-map path[data-state="picked"] { stroke: var(--ink); stroke-width: 2.5; }
#areas-map path[data-state]:hover { stroke: var(--ink); stroke-opacity: 1; }
#areas-map path[data-state="context"] { fill: var(--paper); stroke: var(--line); cursor: default; pointer-events: none; }
#areas-map .lakes { fill: var(--water); stroke: none; pointer-events: none; }
#areas-map .rivers { fill: none; stroke: var(--water-line); stroke-width: 1.6; pointer-events: none; }
#areas-map .road { fill: none; stroke: var(--edge); stroke-width: 1.2; stroke-opacity: 0.7; pointer-events: none; }
#areas-map .road.interstate { stroke-width: 2.2; stroke-opacity: 0.8; }
#areas-map .outline { fill: none; stroke: var(--ink-soft); stroke-width: 1.5; pointer-events: none; }
#areas-map circle { fill: var(--ink); stroke: var(--paper); }
#areas-map text { fill: var(--ink-soft); text-anchor: middle; dominant-baseline: middle; pointer-events: none; paint-order: stroke; stroke: var(--paper); stroke-opacity: 0.85; stroke-linejoin: round; }
#areas-map text.mine { fill: var(--ink); font-weight: 600; }
#areas-map text.road-label { fill: var(--ink); font-weight: 700; }
#areas-map text.water-label { fill: var(--water-line); font-style: italic; }
#areas-map text.landmark { fill: var(--ink); text-anchor: start; }
#areas-map text.city { fill: var(--ink); font-family: var(--font); font-weight: 600; }
#areas-map .street { fill: none; stroke: var(--ink-soft); stroke-width: 1.4; stroke-opacity: 0.6; pointer-events: none; }
#areas-map text.street-label { fill: var(--ink); font-weight: 600; }
#areas-map circle[data-state] { stroke-width: 2; vector-effect: non-scaling-stroke; cursor: pointer; }
#areas-map circle[data-state="in-area"] { fill: var(--ink); stroke: var(--paper); }
#areas-map circle[data-state="other"] { fill: var(--sheet); stroke: var(--ink); }
#areas-map-card #areas-map-zoom[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
#areas-venue-panel:empty { display: none; }

/* Track records and what couples said (#493, D-160): layout and staff-size icons only, on the shared tokens and chips. */
#activity-view .track-head, #curated-date-view .track-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
#activity-view .track-figure, #curated-date-view .track-figure { font-size: 32px; font-weight: 700; color: var(--accent); line-height: 1; }
#activity-view .icon, #curated-date-view .icon { width: 18px; height: 18px; fill: none; stroke: var(--edge); stroke-width: 1.6; stroke-linejoin: round; }
#activity-view .icon.on, #curated-date-view .icon.on { fill: var(--accent); stroke: var(--accent); }
#activity-view .stars-ro, #curated-date-view .stars-ro, #activity-view .heart-ro, #curated-date-view .heart-ro { display: inline-flex; }
#activity-view .said-filters button.chip, #curated-date-view .said-filters button.chip { font: inherit; font-size: 13px; border: 1px solid transparent; cursor: pointer; color: var(--ink); }
#activity-view .said-filters button.chip[aria-pressed="true"], #curated-date-view .said-filters button.chip[aria-pressed="true"] { border-color: var(--accent); font-weight: 700; }
#activity-view .said-entry, #curated-date-view .said-entry { display: grid; gap: 6px 16px; padding: 10px 0; border-top: 1px solid var(--line); }
#activity-view .said-who, #curated-date-view .said-who { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
/* The venue name's business suggestions: a panel under the name box that floats over the fields below it. Tokens only (D-043). */
#activity-view .name-box { position: relative; }
#activity-view .sugg { position: absolute; z-index: 5; top: 100%; left: 0; right: 0; min-width: min(24rem, 86vw); margin-top: 4px; padding: 6px; display: grid; gap: 4px; background: var(--sheet); border: 1px solid var(--outline); border-radius: 10px; box-shadow: 0 8px 24px color-mix(in srgb, var(--ink) 14%, transparent); }
#activity-view .sugg .hit { padding: 6px 10px; border-color: transparent; font-weight: 400; text-align: left; }
#activity-view .sugg .hit strong { font-weight: 600; }
#activity-view .sugg .hit[aria-selected="true"] { border-color: var(--accent); background: var(--accent-soft); }
#activity-view .filled { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
@media (min-width: 40rem) { #activity-view .said-entry, #curated-date-view .said-entry { grid-template-columns: minmax(12rem, 1fr) 2fr; } }

/* Staff quiet table (D-199, D-200): one white panel, small grey heads, a soft second line in a cell, a grey > at the end; the whole
   row opens its item. Shared by the stops table and the staff lists. Tokens only. */
.quiet-table { width: 100%; }
.quiet-table th { font-size: 11.5px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-soft); }
.quiet-table td { vertical-align: top; }
.quiet-table tbody tr[tabindex] { cursor: pointer; }
.quiet-table tbody tr:hover td { background: var(--paper); }
.quiet-table tbody tr:last-child td { border-bottom: 0; }
.quiet-table .who, .quiet-table .main { font-weight: 600; }
.quiet-table td.who { display: table-cell; }
#waitlist-rows .btn + .btn { margin-left: 10px; }
.quiet-table .soft, .quiet-table .sub { color: var(--ink-soft); font-size: 13px; font-weight: 400; }
.quiet-table .warn { color: var(--warn); }
.quiet-table .go { width: 1.5rem; color: var(--ink-soft); text-align: right; }
.quiet-table .main .chip { margin-left: 6px; }
/* Staff lists (D-200): a filter list of quiet buttons on the left (about 12rem), the quiet table on the right. */
.list-layout { display: grid; grid-template-columns: 12rem minmax(0, 1fr); gap: 16px; align-items: start; }
.filter-list { display: grid; gap: 14px; }
.filter-group { display: grid; gap: 2px; }
.filter-label { margin: 0 0 2px; font-size: 11.5px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-soft); }
.filter-btn { display: flex; justify-content: space-between; gap: 8px; width: 100%; padding: 6px 10px; border: 0; border-radius: 8px; background: transparent; color: var(--ink); font: inherit; font-size: 14px; text-align: left; text-decoration: none; cursor: pointer; }
.filter-btn:hover { background: var(--paper); }
.filter-btn[aria-pressed="true"] { background: var(--sheet); font-weight: 700; }
.filter-btn .count { color: var(--ink-soft); font-weight: 400; }
.filter-btn .count.warn { color: var(--warn); font-weight: 600; }
.list-usage { margin: 0 0 8px; }
.list-usage .warn { color: var(--warn); }
.list-usage span + span::before, .quiet-table .part + .part::before { content: " \00b7 "; color: var(--ink-soft); }
.inline-form { display: flex; flex-wrap: wrap; align-items: end; gap: 8px 12px; padding: 12px; margin-bottom: 12px; background: var(--sheet); border: 1px solid var(--line); border-radius: 14px; }
.inline-form .field { flex: 1 1 12rem; margin: 0; }
@media (max-width: 47.99rem) {
  .list-layout { grid-template-columns: minmax(0, 1fr); }
  .filter-list { display: flex; flex-wrap: wrap; gap: 6px 14px; }
  .filter-group { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
  .filter-label { width: 100%; }
  .filter-btn { width: auto; border: 1px solid var(--line); border-radius: 999px; }
}

/* The landing copy editor (staff-copy.html; D-250): tokens only, no new colours or button styles (D-043). */
/* The landing runs edge to edge here too (landing.css does that only when #landing is a direct child of body). */
body.copy-editor { max-width: none; padding: 0 0 6rem; }
body.copy-editor .header { margin-bottom: 0; padding-inline: 16px; }
body.copy-editor [data-copy] { cursor: text; border-radius: 4px; outline: 1.5px dashed transparent; outline-offset: 3px; transition: outline-color 0.15s; }
body.copy-editor [data-copy]:hover { outline-color: color-mix(in srgb, var(--accent) 55%, transparent); }
body.copy-editor [data-copy].is-edited { outline: 2px solid var(--warn); background: var(--warn-soft); color: var(--ink); }
body.copy-editor [data-copy].is-unsaved { outline: 2.5px solid var(--accent); background: var(--accent-soft); color: var(--ink); }
body.copy-editor [data-copy].is-flagged { outline: 3px solid var(--error); }
body.copy-editor [data-copy].is-here { animation: copy-here 1.2s ease-out; }
@keyframes copy-here { 0%, 40% { outline-offset: 10px; outline-width: 4px; } 100% { outline-offset: 3px; } }
body.copy-editor [data-copy][contenteditable] { outline: 2px solid var(--accent); background: color-mix(in srgb, var(--sheet) 85%, transparent); color: var(--ink); anchor-name: --copy-editing; }
/* An empty spare FAQ slot (D-263) shows a faint cue from CSS, never text in the page. The cue also gives the empty element its height. */
body.copy-editor [data-copy^="landing.faq.q-"]:empty::before { content: "Add a question"; opacity: 0.45; }
body.copy-editor [data-copy^="landing.faq.a-"]:empty::before { content: "Add the answer"; opacity: 0.45; }
.copy-editor .copy-off { padding: 24px 16px; }
.copy-editor #copy-off-list { display: grid; gap: 12px; justify-items: start; }
.copy-pop { position: absolute; z-index: 55; position-anchor: --copy-editing; top: calc(anchor(bottom) + 10px); left: anchor(left); width: max-content; max-width: min(26rem, 90vw); margin: 0; padding: 10px 12px; display: grid; gap: 6px; background: var(--sheet); color: var(--ink); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 6px 20px color-mix(in srgb, var(--ink) 14%, transparent); font-size: 14px; text-align: left; font-family: inherit; letter-spacing: normal; text-transform: none; line-height: 1.4; }
.copy-pop p { margin: 0; font-size: 14px; }
.copy-pop .btn { justify-self: start; padding: 0; }
/* Browsers without anchor positioning: the pop-up sits above the bottom bar. */
@supports not (anchor-name: --a) {
  .copy-pop { position: fixed; top: auto; left: 50%; bottom: 5rem; transform: translateX(-50%); }
}
.copy-bar { position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 50; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 14px; width: max-content; max-width: min(46rem, 94vw); padding: 8px 10px 8px 16px; background: var(--sheet); color: var(--ink); border: 1px solid var(--line); border-radius: 22px; box-shadow: 0 6px 20px color-mix(in srgb, var(--ink) 14%, transparent); font-size: 15px; }
.copy-bar p { margin: 0; }
.copy-bar #copy-message:not(:empty) { flex-basis: 100%; text-align: center; }
.copy-bar .arrow { min-width: 2.2rem; padding: 4px 8px; }
