/* The Guests page of round two: the row of views, the grouped table, the bulk edit bar and the
 * Columns chooser. Built by js/tabs/guests.js and its neighbours (guests-views.js, guests-bulk.js,
 * guests-columns.js) and js/ui/table.js. Tokens only, so every accent and both themes follow.
 */

.guests-page { display: block; }

/* ------------------------------------------------------------------ views ---- */

.views-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-8); }

/* A pressable pill with a count. Pressed is the accent fill AND aria-pressed, not colour alone: the
   count and the name read the same either way, and a screen reader hears "pressed". */
.view-chip {
  display: inline-flex; align-items: center; gap: var(--space-8); flex: none; white-space: nowrap;
  font: 600 13.5px var(--font-family); color: var(--text); background: transparent;
  border: 1.5px solid var(--control); border-radius: var(--radius-pill); min-height: 40px; padding: 0 var(--space-16);
  cursor: pointer;
}
.view-chip:hover { background: var(--surface); }
.view-chip[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-dark); font-weight: 700; }
.view-chip .ct { font-weight: 800; font-variant-numeric: tabular-nums; color: var(--muted); }
.view-chip[aria-pressed="true"] .ct { color: inherit; }
.view-chip .material-symbols-rounded { font-size: 18px; }
.view-save { border-style: dashed; }
.view-save[aria-disabled="true"] { color: var(--muted); }

/* A saved view is two buttons in one pill: the view, and its small menu (rename, delete). */
.view-chip-wrap { display: inline-flex; flex: none; }
.view-chip-wrap .view-chip { border-radius: var(--radius-pill) 0 0 var(--radius-pill); border-right-width: 0; padding-right: var(--space-16); }
.view-more {
  display: inline-grid; place-items: center; min-width: 36px; min-height: 40px; padding: 0;
  color: var(--muted); background: transparent; cursor: pointer;
  border: 1.5px solid var(--control); border-left-width: 0; border-radius: 0 var(--radius-pill) var(--radius-pill) 0;
}
.view-more:hover { background: var(--surface); color: var(--text); }
.view-more .material-symbols-rounded { font-size: 20px; vertical-align: 0; }

.view-name { display: inline-flex; align-items: center; gap: var(--space-8); flex-wrap: wrap; }
.view-name input {
  min-height: 40px; width: 220px; max-width: 100%; padding: 0 var(--space-16); font: inherit; font-size: 14px;
  color: var(--text); background: var(--card); border: 1.5px solid var(--control); border-radius: var(--radius-pill);
}

/* ---------------------------------------------------------------- toolbar ---- */

.guests-page .table-toolbar { margin-bottom: var(--space-16); }
.guests-page .table-toolbar .result-count { margin-left: auto; font-weight: 500; }
.phone-only { display: none; }
/* On a phone the single-filter buttons drop their names to save room; here there are four of them side
   by side and only the names tell them apart. */
.guests-page .table-toolbar .filter-menu-label { display: inline; }

/* -------------------------------------------------------------- bulk bar ---- */

/* The dark bar, in the toast's colours so it flips with the theme. */
.bulk-bar {
  display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-8) var(--space-16);
  margin: 0 0 var(--space-16); padding: var(--space-8) var(--space-16) var(--space-8) var(--space-24); border-radius: 20px;
  background: var(--text); color: var(--bg);
}
.bulk-bar :focus-visible { outline-color: currentColor; }
.bulk-who { flex: 1 1 260px; min-width: 0; display: flex; align-items: baseline; gap: var(--space-16); }
.bulk-who strong { flex: none; font-size: 14.5px; }
.bulk-names { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; color: color-mix(in srgb, var(--bg) 82%, var(--text)); }
.bulk-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-8); }
.bulk-btn {
  background: transparent; color: inherit; border: 1.5px solid color-mix(in srgb, var(--bg) 55%, var(--text));
}
.bulk-btn:hover { background: color-mix(in srgb, var(--bg) 16%, transparent); }
.bulk-btn .material-symbols-rounded { color: inherit; }
.bulk-clear { border-color: transparent; }

/* ------------------------------------------------------------------ table ---- */

/* Many columns scroll sideways inside the table's own box, with the select tick and the name held at
   the left edge. Each column gets room to breathe, so a table of nineteen is wide rather than crushed. */
@media (min-width: 641px) {
  .table-wrap { overflow-x: auto; }
  table.data { min-width: calc(var(--cols, 1) * 96px + 60px); }
  table.data td .cell-clamp { white-space: normal; min-width: 180px; }
  table.data td .cell-address { min-width: 180px; }
  table.data th.select-col, table.data td[data-key="__select"] {
    width: 48px; min-width: 48px; max-width: 48px; padding-right: 0; position: sticky; left: 0; z-index: 2; background: var(--bg);
  }
  table.data th.cell-primary, table.data td.cell-primary { position: sticky; left: 0; z-index: 2; background: var(--bg); min-width: 160px; }
  .guests-page table.data td { padding-right: var(--space-16); }
  table.data.has-select th.cell-primary, table.data.has-select td.cell-primary { left: 48px; }
  table.data th.select-col, table.data th.cell-primary { z-index: 3; }
  table.data tbody tr:hover td.cell-primary, table.data tbody tr:hover td[data-key="__select"] { background: var(--surface); }
  table.data tbody tr.is-selected td.cell-primary, table.data tbody tr.is-selected td[data-key="__select"] { background: var(--info-soft); }
}

/* The party heading between runs of rows. */
table.data tr.group-row td { padding: var(--space-24) 0 var(--space-8); border-bottom: 1px solid var(--border-strong); vertical-align: bottom; }
table.data tr.group-row:hover { background: transparent; }
.group-head { display: inline-flex; align-items: baseline; flex-wrap: wrap; gap: var(--space-4) var(--space-8); position: sticky; left: 0; }
.group-name, .group-name-plain { font: 500 20px var(--font-display); letter-spacing: -.01em; color: var(--text); }
.group-name { border: 0; background: none; padding: 0; text-align: left; cursor: pointer; border-radius: 6px; }
.group-name:hover { text-decoration: underline; }
.group-meta { font-size: 13px; color: var(--muted); }

.guest-cell { display: inline-flex; align-items: center; gap: var(--space-16); max-width: 100%; min-width: 0; }
/* A name with no spaces (a 90-letter surname, an address copied in by mistake) wraps inside the row instead of
   pushing the whole page sideways. */
.guest-cell > span:not(.g-avatar) { min-width: 0; overflow-wrap: anywhere; }
.guest-cell .cell-strong { overflow-wrap: anywhere; }

/* How a pasted list was read (Add, Paste a list). */
.paste-read { margin: var(--space-8) 0 0; padding-left: var(--space-16); font-size: 13px; color: var(--muted); }
.paste-note { margin-top: var(--space-4); font-size: 13px; font-weight: 700; color: var(--warning); }
.g-avatar {
  flex: none; width: 36px; height: 36px; border-radius: 50%; display: inline-grid; place-items: center;
  font-size: 12.5px; font-weight: 800; letter-spacing: .02em; background: var(--accent-soft); color: var(--accent-dark);
}
.chip-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-4); }
.cell-quiet { font-size: 13px; color: var(--muted); }
.table-name { font-weight: 700; }
.dietary-note { font-size: 17px; color: var(--warning); vertical-align: -3px; }
.party-chip { background: var(--info-soft); color: var(--info); cursor: pointer; border: 0; font-family: inherit; }
.party-chip-n { opacity: .8; }
.party-chip { max-width: 190px; }
.party-chip > span:nth-child(2) { overflow: hidden; text-overflow: ellipsis; }

/* Contact details that are the party's, not the guest's own: quieter and slanted, and read out as
   "(from their party)" for a screen reader, so it is never taken for the guest's own number. */
.cell-party-value { color: var(--muted); font-style: italic; }
.cell-address { white-space: pre-line; }
.cell-clamp {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  max-width: 260px; font-size: 13px; color: var(--muted);
}

/* -------------------------------------------------------- columns chooser ---- */

.cols-pop { left: auto; right: 0; width: 380px; padding: 0; gap: 0; grid-template-rows: auto minmax(0, 1fr) auto; max-height: min(600px, 74vh); }
.cols-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-16); padding: var(--space-16) var(--space-24) var(--space-8); }
.cols-count { font-size: 13px; color: var(--muted); }
.cols-body { overflow-y: auto; overscroll-behavior: contain; padding: var(--space-4) var(--space-24) var(--space-16); display: grid; gap: var(--space-16); align-content: start; }
.cols-group-name { font-size: 12.5px; font-weight: 800; color: var(--muted); margin: var(--space-8) 0 var(--space-4); }
.cols-row { margin: 0; padding: var(--space-4) 0; cursor: pointer; }
.cols-note { margin-left: auto; font-size: 12.5px; color: var(--muted); }
.cols-pop .filter-pop-foot { padding: var(--space-16) var(--space-24); gap: var(--space-8); flex-wrap: wrap; justify-content: flex-start; }
.cols-done { display: none; margin-left: auto; }

/* The summary ("30 guests on 9 parties. 23 coming…") sits on its own line under the title row rather
   beside the title, so the title row holds only the title and the actions (owner's choice, 16 Nov 2026).
   A laptop only: on a phone the title is hidden and the summary already leads the page. */
@media (min-width: 641px) {
  .guests-head .section-byline { order: 10; flex-basis: 100%; margin-top: calc(var(--space-8) * -1); }
}
/* Filters and Columns in the title row, beside Add guest (owner's request, 17 Nov). Their panels open from
   the right-hand edge, so they stay on the screen. */
.guests-head-tools { display: flex; align-items: center; gap: var(--space-8); flex-wrap: wrap; }
.guests-head-tools:empty { display: none; }
.guests-head .filter-pop { left: auto; right: 0; }
.guests-head .filter-pop-wrap, .guests-head .cols-wrap { position: relative; }

/* ------------------------------------------------------------------ phone ---- */

@media (max-width: 640px), (pointer: coarse) {
  .view-chip, .view-more, .view-name input, .bulk-btn { min-height: 44px; }
  .view-more { min-width: 44px; }
  .group-name { min-height: 44px; }
  .cols-row { min-height: 44px; }
  .cols-row .cols-note { flex: none; }
}

@media (max-width: 640px) {
  .phone-only { display: inline-flex; }

  .view-name { flex-wrap: nowrap; }

  .group-head { position: static; }
  table.data tr.group-row { display: block; margin: 0; padding: var(--space-16) 0 var(--space-4); border: 0; }
  table.data tr.group-row td { display: block !important; padding: 0 !important; border-bottom: 0; }
  table.data tr.group-row td::before { content: none !important; }

  /* The bar rides above the bottom navigation so it is in reach however far down you ticked. */
  .bulk-bar {
    position: fixed; left: 8px; right: 8px; bottom: calc(80px + env(safe-area-inset-bottom)); z-index: 27;
    margin: 0; padding: var(--space-16); border-radius: 20px; gap: var(--space-8); box-shadow: var(--shadow-lg);
  }
  .bulk-who { flex: 1 1 100%; }
  .bulk-actions { width: 100%; }
  .bulk-btn { flex: 1 1 auto; justify-content: center; padding-inline: var(--space-8); }
  .guests-page.has-bulk { padding-bottom: 224px; }

  /* The chooser is a sheet from the bottom of the screen, over a dimmed page. */
  .cols-wrap.open::before {
    content: ""; position: fixed; inset: 0; z-index: 38; background: color-mix(in srgb, var(--text) 45%, transparent);
  }
  .cols-pop {
    position: fixed; left: 0; right: 0; bottom: 0; top: auto; width: auto; max-width: none; z-index: 40;
    max-height: 82vh; border-radius: 22px 22px 0 0; padding-bottom: env(safe-area-inset-bottom);
  }
  .cols-done { display: inline-flex; }
}

@media (prefers-reduced-motion: no-preference) {
  .bulk-bar { animation: toast-in .18s ease; }
  .bulk-bar.steady { animation: none; }
}

/* The one-time hint on the Name heading (owner's request, 17 Nov). It glows gently, and holds still for anyone
   who has asked for less motion. */
th.has-hint { position: relative; overflow: visible; }
.sort-hint {
  position: absolute; left: 8px; top: calc(100% + 6px); z-index: 20; display: inline-flex; align-items: center; gap: var(--space-4);
  padding: var(--space-8) var(--space-4) var(--space-8) var(--space-16); border-radius: var(--radius-pill); white-space: nowrap;
  background: var(--accent); color: var(--accent-ink); font-size: 13px; font-weight: 700; text-transform: none; letter-spacing: 0;
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 45%, transparent);
  animation: sort-hint-glow 2.4s ease-in-out infinite;
}
.sort-hint::before {
  content: ''; position: absolute; left: 18px; top: -5px; width: 10px; height: 10px; background: inherit; transform: rotate(45deg);
}
.sort-hint-close {
  display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border: 0; border-radius: 50%;
  background: transparent; color: inherit; cursor: pointer;
}
.sort-hint-close:hover { background: color-mix(in srgb, currentColor 18%, transparent); }
.sort-hint-close .material-symbols-rounded { font-size: 18px; }
@keyframes sort-hint-glow {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 45%, transparent); }
  50% { box-shadow: 0 0 0 8px color-mix(in srgb, var(--accent) 0%, transparent); }
}
@media (prefers-reduced-motion: reduce) { .sort-hint { animation: none; box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 30%, transparent); } }

/* A saved view that is showing lights up as one pill, its ⋯ side included (owner's request, 17 Nov). */
.view-chip-wrap:has(.view-chip[aria-pressed="true"]) .view-more {
  background: var(--accent-soft); border-color: var(--accent); color: var(--accent-dark);
}
.view-chip-wrap:has(.view-chip[aria-pressed="true"]) .view-more:hover { background: var(--accent-soft); color: var(--accent-dark); }

/* One row on a laptop (owner's request, 17 Nov): the title, People | Parties, the search box, then Filters as an
   icon (its words stay as its name, its count on it), Columns and Add. */
.guests-head { align-items: center; row-gap: var(--space-16); }
.guests-head .search-bar { flex: 1 1 200px; min-width: 160px; max-width: 380px; }
.guests-head .filter-pop-wrap:not(.cols-wrap) > .filter-menu-btn { position: relative; width: 46px; min-width: 46px; height: 46px; padding: 0; justify-content: center; border-radius: 50%; }
.guests-head .filter-pop-wrap:not(.cols-wrap) > .filter-menu-btn .material-symbols-rounded { font-size: 21px; }
.guests-head .filter-pop-wrap:not(.cols-wrap) .filter-menu-label {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: 0;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.guests-head .filter-pop-wrap:not(.cols-wrap) > .filter-menu-btn .filter-count { position: absolute; top: -4px; right: -4px; }

/* The Menu column on Guests: one dish a line, after a small badge with its course's letter (owner's feedback, 18 Nov). */
.menu-lines { display: grid; gap: var(--space-4); }
.menu-line { display: flex; align-items: center; gap: var(--space-8); min-width: 0; }
.course-badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 var(--space-4); box-sizing: border-box; flex: none; border-radius: var(--radius-pill); background: var(--surface); color: var(--muted); font-size: 12px; font-weight: 800; line-height: 1; }
/* Menu choice's dishes, in a fold-out per course. */
.filter-pop-section { border-top: 1px solid var(--border); }
.filter-pop-section > summary { display: flex; align-items: center; gap: var(--space-8); min-height: 40px; cursor: pointer; font-size: 14px; font-weight: 700; }
.filter-pop-section-count { font-size: 12px; font-weight: 700; color: var(--muted); }
.filter-pop-section > .filter-pop-options { padding: var(--space-4) 0 var(--space-8); }
@media (pointer: coarse) { .filter-pop-section > summary { min-height: 44px; } }

/* One-time tips (js/ui/tips.js; owner's request, 18 Nov): a small glowing note under the button it is about, like the
   sort hint, and still for anyone who asked for less motion. */
.has-tip { position: relative; }
.tip-bubble {
  position: absolute; right: 0; top: calc(100% + 10px); z-index: 34; display: flex; align-items: flex-start; gap: var(--space-8);
  width: max-content; max-width: min(300px, calc(100vw - 32px)); padding: var(--space-8) var(--space-8) var(--space-8) var(--space-16); box-sizing: border-box;
  border-radius: 16px; background: var(--accent); color: var(--accent-ink); font-size: 13.5px; font-weight: 600; line-height: 1.45;
  text-align: left; animation: sort-hint-glow 2.4s ease-in-out infinite;
}
.tip-bubble::before { content: ''; position: absolute; right: 18px; top: -5px; width: 10px; height: 10px; background: inherit; transform: rotate(45deg); }
/* Pointing tips on other tabs (anchorTip): lined up on the left, or above the thing when it is low on the screen. */
span.tip-anchor { display: inline-flex; }
.tip-bubble.tip-left { right: auto; left: 0; }
.tip-bubble.tip-left::before { right: auto; left: 18px; }
.tip-bubble.tip-above { top: auto; bottom: calc(100% + 10px); }
.tip-bubble.tip-above::before { top: auto; bottom: -5px; }
.tip-bubble > span { flex: 1; }
.tip-link { color: inherit; font-weight: 800; text-decoration: underline; white-space: nowrap; }
.tip-close { display: inline-grid; place-items: center; width: 28px; height: 28px; flex: none; border: 0; border-radius: 50%; background: transparent; color: inherit; cursor: pointer; }
.tip-close:hover { background: color-mix(in srgb, currentColor 18%, transparent); }
.tip-close .material-symbols-rounded { font-size: 18px; }
@media (pointer: coarse) { .tip-close { width: 44px; height: 44px; margin: calc(var(--space-8) * -1) calc(var(--space-4) * -1) calc(var(--space-8) * -1) 0; } }
@media (prefers-reduced-motion: reduce) { .tip-bubble { animation: none; } }
/* Inside the Columns panel the tip sits in the flow, above the buttons. */
.cols-tip { padding: 0 var(--space-24) var(--space-16); }
.cols-tip .tip-bubble { position: static; width: auto; max-width: none; flex-wrap: wrap; animation: none; }
.cols-tip .tip-bubble::before { display: none; }
.cols-tip .tip-bubble > span { flex: 1 1 calc(100% - 40px); }
.cols-tip .tip-bubble > .tip-close { order: 2; }
.cols-tip .tip-bubble > .tip-link { order: 3; flex-basis: 100%; }
/* Search as an icon in the title row (18 Nov): it opens leftwards into a box beside Filters. */
.guests-head .tab-search.open > .search-bar { width: min(340px, 34vw); }

/* Reserves (js/ui/reserves.js): the card when places are free, and the "In reserve" group after the list. */
.reserve-prompts { display: grid; gap: var(--space-8); margin-bottom: var(--space-16); }
.reserve-prompt { display: flex; align-items: center; gap: var(--space-16); flex-wrap: wrap; padding: var(--space-16) var(--space-16); border-radius: var(--radius); background: var(--accent-soft); color: var(--text); }
.reserve-prompt > .material-symbols-rounded { color: var(--accent-dark); font-size: 22px; }
.reserve-prompt-text { flex: 1 1 260px; margin: 0; font-size: 15px; line-height: 1.45; }
.reserve-prompt-actions { display: flex; gap: var(--space-8); flex-wrap: wrap; }
.reserves-block { margin-top: var(--space-32); }
.reserves-head { display: flex; align-items: baseline; gap: var(--space-8); padding-bottom: var(--space-8); border-bottom: 1px solid var(--border-strong); }
.reserves-title { margin: 0; font-family: var(--font-display); font-size: 22px; font-weight: 500; }
.reserves-meta { font-size: 13.5px; color: var(--muted); }
.reserves-tip { display: flex; gap: var(--space-8); align-items: flex-start; margin: 0 0 var(--space-8); font-size: 13.5px; color: var(--muted); }
.reserves-tip .material-symbols-rounded { font-size: 18px; color: var(--accent-dark); }
.reserve-line { padding: var(--space-16) 0 var(--space-4); }
.reserve-line-title { margin: 0 0 var(--space-8); font-size: 13px; font-weight: 700; color: var(--muted); }
.reserve-row { display: flex; align-items: center; gap: var(--space-16); min-height: 56px; border-bottom: 1px solid var(--border); }
.reserve-place { flex: none; min-width: 40px; font-size: 13px; font-weight: 800; color: var(--accent-dark); }
.reserve-name { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-4); min-height: 44px; justify-content: center; padding: 0; border: 0; background: none; text-align: left; cursor: pointer; font: inherit; color: var(--text); }
.reserve-name-text { font-weight: 700; font-size: 14.5px; }
.reserve-name-sub { font-size: 12.5px; color: var(--muted); }
.reserve-name-sub:empty { display: none; }
.reserve-acts { flex: none; display: flex; align-items: center; gap: var(--space-4); }
.reserve-acts .icon-btn[disabled] { opacity: .35; cursor: default; }
@media (max-width: 640px) {
  .reserve-row { flex-wrap: wrap; padding: var(--space-8) 0; }
  .reserve-acts { width: 100%; justify-content: flex-end; }
  .reserve-acts .icon-btn { width: 44px; height: 44px; }
}
/* Details sent through the details link for a guest already on the list (js/tabs/guests.js). */
.suggest-card { margin-top: var(--space-16); padding: var(--space-16) var(--space-16); }
.suggest-title { margin: 0 0 var(--space-4); font-weight: 700; }
.suggest-list { display: grid; grid-template-columns: auto 1fr; gap: var(--space-4) var(--space-16); margin: var(--space-8) 0 var(--space-16); }
.suggest-list dt { color: var(--muted); font-size: 13px; font-weight: 600; }
.suggest-list dd { margin: 0; overflow-wrap: anywhere; white-space: pre-line; }
.suggest-actions { display: flex; gap: var(--space-8); flex-wrap: wrap; }
.g-suggest { margin-left: var(--space-8); }

/* The Parties view's cards (owner's request, 20 Nov 2026): information plain, then a line, then the buttons.
   The name opens the party; each person is a row that opens them. */
.party-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: var(--space-16); }
.party-card { display: grid; gap: var(--space-8); align-content: start; padding: var(--space-16) var(--space-16); background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-card); min-width: 0; }
/* The name has the whole width, and the pills sit under it, so a long name never runs under them. */
.party-card-head { display: grid; gap: var(--space-8); }
.party-card-name {
  min-width: 0; min-height: 32px; padding: 0; margin: 0; text-align: left; cursor: pointer; overflow-wrap: anywhere;
  background: none; border: 0; color: var(--text); font: inherit; font-family: var(--font-display); font-size: 19px; font-weight: 500; line-height: 1.25;
}
.party-card-name:hover span { text-decoration: underline; text-underline-offset: 3px; }
.party-card-pills { display: flex; flex-wrap: wrap; gap: var(--space-4); }
.party-card-meta { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.45; overflow-wrap: anywhere; }
.party-card-people { list-style: none; margin: var(--space-4) 0 0; padding: 0; display: grid; }
.party-person {
  display: flex; align-items: center; gap: var(--space-8); width: 100%; min-height: 40px; padding: var(--space-8) var(--space-4); cursor: pointer; text-align: left;
  background: none; border: 0; border-top: 1px solid var(--border); color: var(--text); font: inherit; font-size: 14px;
}
.party-card-people li:first-child .party-person { border-top: 0; }
.party-person:hover { background: var(--surface); }
.party-person .dot { flex: none; width: 8px; height: 8px; border-radius: 50%; }
.party-person-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.party-person-reply { flex: none; font-size: 13px; color: var(--muted); }
/* Copy message (and Share) across the top, then the two "mark everyone" buttons side by side. */
.party-card-actions { display: flex; flex-wrap: wrap; gap: var(--space-8); padding-top: var(--space-16); margin-top: var(--space-4); border-top: 1px solid var(--border-strong); }
.party-card-actions .btn { min-height: 40px; min-width: 0; white-space: nowrap; padding-inline: var(--space-16); }
/* Show and sort above the cards (1 Dec 2026). */
.party-filters { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-8) var(--space-16); }
.party-filters .seg { flex-wrap: wrap; }
.party-sort { display: inline-flex; align-items: center; gap: var(--space-8); font-size: 14px; font-weight: 600; color: var(--muted); }
.party-sort select { min-height: 40px; padding: 0 var(--space-16); border: 1.5px solid var(--control); border-radius: var(--radius-pill); background: var(--card); color: var(--text); font: inherit; font-size: 16px; }
@media (max-width: 640px) {
  .party-cards { grid-template-columns: minmax(0, 1fr); }
  .party-person, .party-card-actions .btn, .party-card-name { min-height: 44px; }
}

/* Adding guests from contacts (js/ui/contacts-import.js): one row a contact, the tick box and name a 44px target. */
.ct-review-wrap { display: grid; gap: var(--space-16); }
.ct-review { display: grid; max-height: min(52vh, 460px); overflow-y: auto; border: 1px solid var(--border); border-radius: var(--radius); }
.ct-review-row { display: flex; align-items: center; gap: var(--space-16); min-height: 48px; padding: var(--space-8) var(--space-16); border-top: 1px solid var(--border); cursor: pointer; }
.ct-review-row:first-child { border-top: 0; }
.ct-review-row input { width: 20px; height: 20px; accent-color: var(--accent); flex: none; }
.ct-review-main { display: grid; flex: 1; min-width: 0; font-size: 14px; }
.ct-review-main span { font-size: 13px; overflow-wrap: anywhere; }
.ct-parties { display: grid; gap: var(--space-4); }
.ct-parties .check-row { min-height: 44px; margin: 0; }

/* A reply for each person, in the open party (1 Dec 2026). */
.party-reply { flex: none; }
.party-reply button { min-height: 36px; padding: 0 var(--space-16); }
@media (max-width: 640px) { .party-reply button { min-height: 44px; } }
.party-reply button[aria-pressed="true"]:first-child { background: var(--good-soft); color: var(--text); }
.party-reply button[aria-pressed="true"]:last-child { background: var(--error-soft); color: var(--text); }

/* The guest form's RSVP, tinted by the answer (1 Dec 2026): soft green for coming, soft red for can't come. */
.field[data-field="rsvp"][data-value="yes"] .picker-btn { background: var(--good-soft); border-color: var(--good); }
.field[data-field="rsvp"][data-value="no"] .picker-btn { background: var(--error-soft); border-color: var(--error); }
.field[data-field="rsvp"][data-value="maybe"] .picker-btn { background: var(--warning-soft); }
