:root {
  --bg: #f6f3ee;
  --paper: #ffffff;
  --ink: #2e2a27;
  --muted: #80766d;
  --line: #e6ddd1;
  --line-strong: #d6cbbd;
  --accent: #a0685a;
  --accent-dark: #85513f;
  --yes: #5f7d5a;
  --yes-soft: #e8efe5;
  --no: #b04a3c;
  --no-soft: #f8e7e3;
  --wait: #9a7b3c;
  --wait-soft: #f6efdf;
  --display: 'Cormorant Garamond', Georgia, serif;
  --body: 'Jost', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --radius: 12px;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 15px/1.5 var(--body);
  font-variant-numeric: lining-nums; /* the display serif defaults to old-style digits */
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.boot { padding: 40px; text-align: center; color: var(--muted); }

/* ---------- Buttons & inputs ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 16px;
  border: 1px solid transparent;
  border-radius: 9px;
  font: 500 0.9rem var(--body);
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.btn:disabled { opacity: 0.6; cursor: not-allowed; }
.btn[aria-busy="true"] { cursor: progress; }
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover:not(:disabled) { background: var(--accent-dark); }
.btn--ghost { background: var(--paper); color: var(--ink); border-color: var(--line); }
.btn--ghost:hover:not(:disabled) { border-color: var(--line-strong); background: #fcfaf7; }
.btn--danger { background: var(--no-soft); color: var(--no); }
.btn--danger:hover:not(:disabled) { background: var(--no); color: #fff; }
.btn--danger-ghost { background: transparent; color: var(--no); border-color: transparent; }
.btn--danger-ghost:hover:not(:disabled) { background: var(--no-soft); }
.btn--block { width: 100%; }

.input {
  width: 100%;
  min-width: 0;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--paper);
  font: 400 0.95rem var(--body);
  color: var(--ink);
}
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(160, 104, 90, 0.15); }
textarea.input { resize: vertical; }
select.input { padding-right: 28px; }

.field { display: block; margin-bottom: 16px; }
.field__label { display: block; margin-bottom: 5px; font-size: 0.78rem; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.field__hint { display: block; margin-top: 5px; font-size: 0.82rem; color: var(--muted); }

.icon-btn {
  flex: none;
  width: 36px; height: 36px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--paper);
  color: var(--muted);
  font-size: 1.2rem; line-height: 1;
  cursor: pointer;
}
.icon-btn:hover { color: var(--no); border-color: var(--no); }
.add-link { background: none; border: 0; padding: 6px 0; color: var(--accent); font: 500 0.92rem var(--body); cursor: pointer; }
.check { display: inline-flex; align-items: center; gap: 6px; font-size: 0.88rem; color: var(--muted); cursor: pointer; white-space: nowrap; }
.check--block { display: flex; margin-top: 6px; color: var(--ink); white-space: normal; }
.check input { accent-color: var(--accent); width: 16px; height: 16px; }

.error { margin: 12px 0 0; padding: 10px 12px; border-radius: 9px; background: var(--no-soft); color: var(--no); font-size: 0.9rem; }

/* ---------- Login ---------- */
.login { min-height: 100svh; display: grid; place-items: center; padding: 16px; }
.login__card { width: min(380px, 100%); text-align: center; padding: 36px 28px; }
.login__card h1 { margin: 6px 0 4px; font: 500 2rem var(--display); }
.login__card p { margin: 0 0 20px; }
.login__card .input { margin-bottom: 4px; text-align: center; }
.login__card .btn { margin-top: 16px; }
.login__mark { font-size: 1.6rem; color: var(--accent); }

/* ---------- Shell ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 16px clamp(16px, 4vw, 40px);
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.topbar__title { display: flex; align-items: center; gap: 12px; }
.topbar__title strong { display: block; font: 500 1.45rem/1.1 var(--display); }
.topbar__title .muted { font-size: 0.85rem; }
.topbar__mark { font-size: 1.3rem; color: var(--accent); }
.topbar__actions { display: flex; gap: 8px; flex-wrap: wrap; }

.tabs {
  display: flex; gap: 4px;
  padding: 0 clamp(16px, 4vw, 40px);
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
}
.tab {
  padding: 12px 14px;
  border: 0; border-bottom: 2px solid transparent;
  background: none;
  font: 500 0.92rem var(--body);
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
}
.tab:hover { color: var(--ink); }
.tab.is-active { color: var(--ink); border-bottom-color: var(--accent); }

.content { max-width: 1200px; margin: 0 auto; padding: 24px clamp(16px, 4vw, 40px) 64px; }
.content--wide { max-width: 1640px; } /* seating: the floor plan gets the extra room */

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 18px;
}
.card__title { margin: 0 0 12px; font: 600 1rem var(--body); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.grid-2 > .card { margin-bottom: 0; }
.content > .grid-2 { margin-bottom: 18px; }
.grid-3 { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 14px; }
@media (max-width: 760px) { .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr); } }
.empty { margin: 4px 0; color: var(--muted); }

/* ---------- Overview ---------- */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
@media (max-width: 760px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.stat {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 22px 16px 18px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 3px solid var(--stat-color);
  border-radius: var(--radius);
  text-align: center;
  --stat-color: var(--ink);
}
.stat__value {
  font: 500 clamp(2.6rem, 5vw, 3.4rem)/1 var(--display);
  font-variant-numeric: lining-nums tabular-nums;
  color: var(--stat-color);
}
.stat__label { margin-top: 8px; font-size: 0.78rem; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink); }
.stat__note { margin-top: 2px; font-size: 0.8rem; color: var(--muted); }
.stat--total { --stat-color: #8a7a6c; }
.stat--yes { --stat-color: var(--yes); }
.stat--no { --stat-color: var(--no); }
.stat--pending { --stat-color: var(--wait); }

.progress__label { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.progress { height: 10px; border-radius: 999px; background: #efe8de; overflow: hidden; }
.progress__bar { height: 100%; background: linear-gradient(90deg, #c49a8c, var(--accent)); border-radius: inherit; transition: width 0.4s; }

.list-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%;
  padding: 10px 4px;
  border: 0; border-top: 1px solid var(--line);
  background: none;
  font: inherit; color: inherit; text-align: left;
  cursor: pointer;
}
.list-row:first-of-type { border-top: 0; }
.list-row:hover { background: #fbf8f4; }
.list-row__main { display: flex; flex-direction: column; min-width: 0; }
.list-row__main .muted { font-size: 0.85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-row__chev { color: var(--muted); font-size: 1.2rem; }

.plain-list { list-style: none; margin: 0; padding: 0; }
.plain-list li { padding: 8px 0; border-top: 1px solid var(--line); }
.plain-list li:first-child { border-top: 0; }

.notes { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.note { margin: 0; padding: 16px 18px; background: #fbf7f1; border: 1px solid var(--line); border-radius: 10px; }
.note blockquote { margin: 0 0 10px; font: italic 500 1.15rem/1.4 var(--display); white-space: pre-wrap; }
.note figcaption { font-size: 0.82rem; color: var(--muted); }

/* ---------- Tables ---------- */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 8px; }
.toolbar > .input { width: auto; }
.toolbar__search { flex: 1 1 160px; }
.toolbar .btn--primary { margin-left: auto; }

/* Group by / Sort bar under the filters, like a spreadsheet's view toolbar */
.viewbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin: 4px 0 12px; font-size: 0.88rem; }
.viewbar__item { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); }
.viewbar__meta { margin-left: auto; }
.input--compact { width: auto; padding: 6px 28px 6px 10px; font-size: 0.88rem; }
.btn--compact { padding: 6px 10px; font-size: 0.82rem; }

.th-sort {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 0; border: 0; background: none;
  font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit;
  cursor: pointer;
}
.th-sort:hover { color: var(--ink); }
.th-sort__arrow { font-size: 0.6rem; opacity: 0; }
.th-sort:hover .th-sort__arrow { opacity: 0.4; }
.th-sort.is-active { color: var(--ink); }
.th-sort.is-active .th-sort__arrow { opacity: 1; color: var(--accent); }

.table .group-row td { padding: 0; background: #faf7f2; border-top: 1px solid var(--line-strong); }
.table tbody tr.group-row:first-child td { border-top: 0; }
.group-toggle {
  display: flex; align-items: center; gap: 10px;
  width: 100%;
  padding: 10px 14px;
  border: 0; background: none;
  font: inherit; color: inherit; text-align: left;
  cursor: pointer;
}
.group-toggle:hover { background: #f6f1ea; }
.group-chevron { width: 14px; color: var(--muted); transition: transform 0.15s; }
.group-chevron.is-collapsed { transform: rotate(-90deg); }
.group-field { font-size: 0.68rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.group-value { font-weight: 600; }
.group-count { margin-left: auto; padding: 1px 9px; border-radius: 999px; background: #efe8de; font-size: 0.8rem; color: var(--muted); }

.segmented { display: inline-flex; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; background: var(--paper); }
.segmented button { padding: 8px 14px; border: 0; background: none; font: 500 0.88rem var(--body); color: var(--muted); cursor: pointer; }
.segmented button.is-active { background: var(--ink); color: #fff; }

.table-wrap { overflow-x: auto; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.card .table-wrap { border: 0; border-radius: 0; }
.table { width: 100%; border-collapse: collapse; }
.table th {
  padding: 10px 14px;
  text-align: left;
  font-size: 0.75rem; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.table td { padding: 12px 14px; border-top: 1px solid var(--line); vertical-align: top; }
.table tbody tr:first-child td { border-top: 0; }
.table--compact td, .table--compact th { padding: 7px 8px; }
.row-link { cursor: pointer; }
.row-link:hover, .row-link:focus-visible { background: #fbf8f4; outline: none; }
.cell-title { font-weight: 500; }
.cell-sub { font-size: 0.82rem; color: var(--muted); margin-top: 2px; }
.cell-action { color: var(--muted); white-space: nowrap; text-align: right; }

.people { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.person { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.person__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); }
.person--yes .person__dot { background: var(--yes); }
.person--no .person__dot { background: var(--no); }
.person--no { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(176, 74, 60, 0.4); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 2px 9px;
  border: 1px solid; border-radius: 999px;
  font-size: 0.8rem; white-space: nowrap;
}
.chip__dot { width: 7px; height: 7px; border-radius: 50%; }
.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 0.8rem; font-weight: 500; white-space: nowrap; }
.pill--yes { background: var(--yes-soft); color: var(--yes); }
.pill--no { background: var(--no-soft); color: var(--no); }
.pill--pending { background: var(--wait-soft); color: var(--wait); }
.badge { margin-left: 8px; padding: 1px 7px; white-space: nowrap; border-radius: 999px; background: #f1ebe3; color: var(--muted); font-size: 0.72rem; }

/* ---------- Household editor ---------- */
.dialog {
  width: min(820px, calc(100vw - 24px));
  max-height: calc(100svh - 24px);
  padding: 0;
  border: 0;
  border-radius: 14px;
  box-shadow: 0 24px 80px rgba(30, 22, 18, 0.25);
  color: var(--ink);
}
.dialog::backdrop { background: rgba(35, 28, 24, 0.45); }
.editor { display: flex; flex-direction: column; max-height: calc(100svh - 24px); }
.editor__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.editor__head h2 { margin: 0; font: 500 1.6rem var(--display); }
.editor__body { padding: 18px 20px 8px; overflow-y: auto; }
.editor__foot { display: flex; gap: 8px; align-items: center; padding: 14px 20px; border-top: 1px solid var(--line); background: #fcfaf7; }
.spacer { flex: 1; }

.chips--picker { gap: 8px; }
.chip-toggle {
  padding: 5px 12px;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--paper);
  font: 400 0.86rem var(--body); color: var(--ink);
  cursor: pointer;
}
.chip-toggle::before { content: ''; display: inline-block; width: 8px; height: 8px; margin-right: 7px; border-radius: 50%; background: var(--tag); vertical-align: 1px; }
.chip-toggle.is-on { background: color-mix(in srgb, var(--tag) 30%, white); border-color: color-mix(in srgb, var(--tag) 80%, var(--ink)); font-weight: 500; }

.members { margin: 6px 0 18px; padding: 14px; background: #fbf8f4; border: 1px solid var(--line); border-radius: 10px; }
.members__head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.members__head h3 { margin: 0; font-size: 0.95rem; font-weight: 600; }
.members__head .muted { font-size: 0.82rem; }
.member { display: grid; grid-template-columns: 2fr 1.1fr 1.6fr auto auto; gap: 8px; align-items: center; margin-bottom: 8px; }
@media (max-width: 640px) {
  .member { grid-template-columns: 1fr 1fr; padding-bottom: 10px; border-bottom: 1px dashed var(--line); }
  .member > :first-child { grid-column: 1 / -1; }
}

/* ---------- Tags ---------- */
.tag-list { margin-top: 8px; }
.tag-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.tag-row--new { grid-template-columns: auto minmax(0, 1fr) auto; border-top: 0; margin-top: 12px; }
.tag-row__count { font-size: 0.85rem; white-space: nowrap; }
@media (max-width: 640px) {
  .tag-row { grid-template-columns: auto minmax(0, 1fr); }
  .tag-row__count { grid-column: 2; }
}

/* Round color swatch + pastel quick picker */
.color-picker { position: relative; }
.color-swatch {
  display: block;
  width: 34px; height: 34px;
  border: 3px solid var(--paper);
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--line-strong);
  cursor: pointer;
}
.color-swatch:hover, .color-swatch[aria-expanded='true'] { box-shadow: 0 0 0 2px var(--accent); }
.color-menu {
  position: absolute; top: calc(100% + 8px); left: 0; z-index: 20;
  width: 212px;
  padding: 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(46, 42, 39, 0.16);
}
.color-menu__title { margin-bottom: 8px; font-size: 0.72rem; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.color-menu__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.color-dot {
  aspect-ratio: 1;
  border: 2px solid var(--paper);
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(46, 42, 39, 0.12);
  cursor: pointer;
  transition: transform 0.12s;
}
.color-dot:hover { transform: scale(1.1); }
.color-dot.is-on { box-shadow: 0 0 0 2px var(--ink); }
.color-menu__custom {
  display: flex; align-items: center; gap: 10px;
  margin-top: 12px; padding-top: 10px;
  border-top: 1px solid var(--line);
  font-size: 0.88rem;
  cursor: pointer;
}
.color-menu__native {
  width: 26px; height: 26px; padding: 0;
  border: 2px solid transparent; border-radius: 50%;
  background: conic-gradient(#f4a6a6, #fde68a, #a7f3d0, #93c5fd, #c4b5fd, #f9a8d4, #f4a6a6) border-box;
  cursor: pointer;
}
.color-menu__native::-webkit-color-swatch-wrapper { padding: 2px; }
.color-menu__native::-webkit-color-swatch { border: none; border-radius: 50%; }
.color-menu__native::-moz-color-swatch { border: none; border-radius: 50%; }
.chip__dot { box-shadow: inset 0 0 0 1px rgba(46, 42, 39, 0.15); }

/* ---------- Settings ---------- */
.settings__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; margin-top: 14px; }
.field--wide { grid-column: 1 / -1; }
@media (max-width: 760px) { .settings__grid { grid-template-columns: minmax(0, 1fr); } }
.hero-preview { display: block; margin-top: 10px; max-width: 360px; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); background: #efe8de; }
.actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; }

.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; }
.switch__track { position: relative; width: 42px; height: 24px; border-radius: 999px; background: var(--line-strong); transition: background 0.2s; flex: none; }
.switch__track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2); transition: transform 0.2s; }
.switch input:checked + .switch__track { background: var(--yes); }
.switch input:checked + .switch__track::after { transform: translateX(18px); }
.switch input:focus-visible + .switch__track { box-shadow: 0 0 0 3px rgba(160, 104, 90, 0.25); }

/* ---------- Toast ---------- */
.toast {
  position: fixed; inset: auto auto 24px 50%; margin: 0; border: 0; overflow: visible;
  max-width: calc(100vw - 32px);
  padding: 11px 18px;
  border-radius: 10px;
  background: var(--ink); color: #fff;
  font-size: 0.92rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  opacity: 0; pointer-events: none;
  transform: translate(-50%, 12px);
  transition: opacity 0.2s, transform 0.2s;
  z-index: 10;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.toast--error { background: var(--no); }

/* ---------- Seating chart ---------- */
.seat-toolbar { justify-content: space-between; margin-bottom: 14px; }
.seat-summary { flex: 1 1 260px; max-width: 480px; display: grid; gap: 6px; }
.progress--thin { height: 6px; }

.seating__plan { margin-bottom: 18px; }
.seating__hint { margin: 12px 0 0; font-size: 0.85rem; color: var(--muted); }
.seating__swipe { display: none; }
@media (max-width: 560px) { .seating__swipe { display: inline; } }

.pick-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin-bottom: 12px; padding: 8px 8px 8px 14px;
  border-radius: 10px; background: var(--wait-soft); color: #6f5a2c;
}

/* The floor scales with its card; everything inside is sized in cqw (% of its width). */
.floor-wrap { overflow-x: auto; }
.floor {
  position: relative;
  container-type: inline-size;
  min-width: 480px; /* on phones the plan scrolls inside its card instead of shrinking */
  aspect-ratio: 16 / 10;
  border: 1px solid var(--line);
  border-radius: 12px;
  background-color: #fbf8f3;
  background-image: radial-gradient(circle, #e2d7c8 1px, transparent 1.3px);
  background-size: 2.4cqw 2.4cqw;
  overflow: hidden;
  --seat-size: 1.75cqw; /* chair dot */
  --seat-off: 1.35cqw;  /* gap between a table's edge and its chairs' centers */
}
/* Views with written names need more room, so phones scroll a wider plan. */
.floor--list { min-width: 760px; }
.floor--initials { --seat-size: 2.9cqw; --seat-off: 2cqw; }
.floor__empty { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 4px; color: var(--muted); }
.floor__empty p { margin: 0; }

.ftable {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 0 0.6cqw;
  border: 1.5px solid #cdbfae;
  background: var(--paper);
  color: var(--ink);
  font: 500 clamp(11px, 1.7cqw, 18px)/1.2 var(--body);
  box-shadow: 0 2px 8px rgba(46, 42, 39, 0.08);
  cursor: grab;
  touch-action: none;
  user-select: none;
  transition: box-shadow 0.15s, border-color 0.15s, transform 0.15s;
}
.ftable > * { pointer-events: none; }
.ftable > .seat { pointer-events: auto; } /* chairs take drops, and hovering a taken one shows who sits there */
.ftable:hover { z-index: 1; box-shadow: 0 6px 18px rgba(46, 42, 39, 0.14); }
.ftable:focus-visible { outline: 3px solid rgba(160, 104, 90, 0.35); outline-offset: 2cqw; }
.ftable--round { width: calc(8.8cqw + var(--seats) * 0.45cqw); aspect-ratio: 1; border-radius: 50%; }
.ftable--square { width: calc(8.2cqw + var(--seats) * 0.45cqw); aspect-ratio: 1; border-radius: 0.8cqw; }
.ftable--rectangle { width: calc(6.2cqw + var(--seats) * 1.85cqw); height: 8cqw; border-radius: 0.8cqw; }
.ftable__name {
  max-width: 100%; overflow: hidden; text-align: center; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; /* "Martinez & Nguyen Table" wraps */
}
.ftable__count { font-size: 0.82em; font-weight: 400; color: var(--muted); }
.ftable.is-full { border-color: var(--yes); }
.ftable.is-over { border-color: var(--no); }
.ftable.is-over .ftable__count { color: var(--no); font-weight: 600; }
.ftable.is-drop, .floor.is-picking .ftable:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 0.6cqw rgba(160, 104, 90, 0.2);
  transform: translate(-50%, -50%) scale(1.06);
}
.floor.is-picking .ftable { cursor: copy; }
.ftable.is-dragging { z-index: 2; cursor: grabbing; transition: none; box-shadow: 0 12px 28px rgba(46, 42, 39, 0.22); }

.seat {
  position: absolute;
  display: grid; place-items: center;
  width: var(--seat-size); height: var(--seat-size);
  border: 1px solid #cdbfae;
  border-radius: 50%;
  background: var(--paper);
  transform: translate(-50%, -50%);
  color: #fff;
  font: 600 clamp(7px, 1.05cqw, 12px)/1 var(--body);
  letter-spacing: 0.02em;
}
.seat.is-taken { background: var(--hh, var(--accent)); border-color: var(--hh, var(--accent)); cursor: help; }
/* Seated and coming: solid green in the Dots view (family colors in the other views). */
.floor--dots .seat.is-taken { background: var(--yes); border-color: var(--yes); }

/* Name list: names written on the tabletop; tables grow to fit them. */
.floor--list .ftable { justify-content: flex-start; padding: 1.2cqw 0.8cqw; font-size: clamp(9px, 1.25cqw, 14px); }
.floor--list .ftable--round { width: calc(10cqw + var(--seats) * 0.75cqw); padding-top: 2.2cqw; }
.floor--list .ftable--square { width: calc(9cqw + var(--seats) * 0.8cqw); }
.floor--list .ftable--rectangle { height: auto; min-height: 8cqw; }
.ftable__list {
  display: flex; flex-direction: column; align-items: center; gap: 0.15cqw;
  width: 100%; margin-top: 0.5cqw; padding-top: 0.5cqw;
  border-top: 1px solid var(--line);
  font-weight: 400; font-size: 0.82em; line-height: 1.2;
}
.ftable--rectangle .ftable__list { display: grid; grid-template-columns: 1fr 1fr; justify-items: start; column-gap: 0.8cqw; }
.ftable__guest { display: flex; align-items: center; gap: 0.35cqw; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ftable__guest::before { content: ''; flex: none; width: 0.55cqw; height: 0.55cqw; border-radius: 50%; background: var(--hh); }
.ftable__more { color: var(--muted); font-style: italic; }

/* Who's in this chair */
.seat-tip {
  position: absolute; z-index: 5;
  display: grid; gap: 1px;
  max-width: 240px;
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--ink); color: #fff;
  font-size: 0.8rem; line-height: 1.3;
  transform: translateX(-50%);
  pointer-events: none;
  box-shadow: 0 6px 18px rgba(46, 42, 39, 0.2);
}
.seat-tip[hidden] { display: none; }
.seat-tip span { color: #d9d0c6; }
.seat-tip span:empty { display: none; }

.seat-viewbar { margin: 0 0 12px; justify-content: space-between; }
.segmented--sm button { padding: 6px 12px; font-size: 0.84rem; }

.seating__side { display: grid; gap: 10px; }
.seating__side .card__title { margin: 0; }
.seat-count { margin-left: 4px; padding: 1px 8px; border-radius: 999px; background: #f1ebe3; color: var(--muted); font-size: 0.8rem; }
.seat-list { max-height: 460px; overflow-y: auto; margin: 0 -6px; padding: 0 6px; }
.seat-group { padding: 6px 0; border-top: 1px solid var(--line); }
.seat-group:first-child { border-top: 0; }
.seat-group__head {
  display: flex; justify-content: space-between; gap: 8px;
  padding: 4px 8px;
  border-radius: 7px;
  font-size: 0.75rem; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--muted);
  cursor: grab;
}
.seat-group__all { text-transform: none; letter-spacing: 0; color: var(--accent); }
.seat-guest { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 8px; cursor: grab; }
.seat-group__head:hover, .seat-guest:hover { background: #fbf8f4; }
.seat-group__head:focus-visible, .seat-guest:focus-visible { outline: 2px solid rgba(160, 104, 90, 0.4); outline-offset: -2px; }
.seat-group__head.is-picked, .seat-guest.is-picked { background: #f8efec; box-shadow: inset 0 0 0 1.5px var(--accent); }
.seat-guest__grip { color: var(--line-strong); }
.seat-guest__name { flex: 1; min-width: 0; }

.seat-group--table .seat-group__head { cursor: default; }
.seat-group--table.is-drop { background: #f8efec; box-shadow: inset 0 0 0 1.5px var(--accent); border-radius: 8px; }
.seat-guest--seated { cursor: default; }
.seat-guest--seated .icon-btn--sm { margin-left: auto; }

/* Table dialog */
.dialog--narrow { width: min(600px, calc(100vw - 24px)); }
.shape-picker { display: flex; gap: 8px; flex-wrap: wrap; }
.shape-option {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 8px 14px;
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--paper);
  font: 500 0.9rem var(--body); color: var(--ink);
  cursor: pointer;
}
.shape-option:hover { border-color: var(--line-strong); }
.shape-option.is-on { border-color: var(--accent); background: #f8efec; color: var(--accent-dark); }
.shape-icon { display: inline-block; border: 1.5px solid currentColor; }
.shape-icon--round { width: 16px; height: 16px; border-radius: 50%; }
.shape-icon--square { width: 15px; height: 15px; border-radius: 3px; }
.shape-icon--rectangle { width: 24px; height: 12px; border-radius: 3px; }

.seated { margin: 4px 0 18px; }
.seated__head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.seated__head h3, .add-guests h3 { margin: 0; font-size: 0.95rem; font-weight: 600; }
.seated__list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 10px; }
.seated__list li { display: flex; align-items: center; gap: 8px; padding: 7px 8px 7px 12px; border-top: 1px solid var(--line); }
.seated__list li:first-child { border-top: 0; }
.seated__name { flex: 1; min-width: 0; }
.icon-btn--sm { width: 30px; height: 30px; font-size: 1rem; }
.add-guests h3 { margin-bottom: 8px; }
.add-list { display: grid; gap: 12px; margin-top: 12px; }
.add-group__head {
  display: flex; justify-content: space-between; align-items: baseline; gap: 8px;
  margin-bottom: 5px;
  font-size: 0.75rem; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--muted);
}
.add-group__head .add-link { padding: 0; font-size: 0.85rem; letter-spacing: 0; text-transform: none; }
.add-guest {
  display: flex; align-items: center; gap: 8px;
  width: 100%;
  margin-bottom: 5px; padding: 8px 12px;
  border: 1px solid var(--line); border-radius: 9px;
  background: var(--paper);
  font: inherit; color: inherit; text-align: left;
  cursor: pointer;
}
.add-guest:hover { border-color: var(--accent); }
.add-guest__where { font-size: 0.82rem; }
.add-guest__action { margin-left: auto; color: var(--accent); font-size: 0.85rem; font-weight: 500; white-space: nowrap; }

/* ---------- Photos (Site settings) ---------- */
.icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

.photo-manager { position: relative; }
.photo-manager__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.photo-manager__head .card__title { margin-bottom: 2px; }
.photo-summary { margin: 0; font-size: 0.88rem; }
.photo-manager__overlay {
  position: absolute; inset: 0; z-index: 5;
  display: none; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  border: 2px dashed var(--accent); border-radius: var(--radius);
  background: rgba(248, 239, 236, 0.92);
  color: var(--accent-dark); font-weight: 500;
  pointer-events: none;
}
.photo-manager__overlay .icon { width: 30px; height: 30px; }
.photo-manager.is-dropping .photo-manager__overlay { display: flex; }

.dropzone {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  border: 1.5px dashed var(--line-strong); border-radius: 12px;
  background: #fcfaf7;
  color: var(--muted);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.dropzone:hover, .dropzone:focus-visible { border-color: var(--accent); background: #fbf4f1; outline: none; }
.dropzone .icon { width: 22px; height: 22px; color: var(--accent); }
.dropzone__title { font-weight: 500; color: var(--ink); }
.dropzone__hint { font-size: 0.82rem; }
.dropzone.is-empty { flex-direction: column; justify-content: center; gap: 6px; min-height: 200px; text-align: center; }
.dropzone.is-empty .icon { width: 34px; height: 34px; margin-bottom: 4px; }

.upload-queue { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; }
.upload-item { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); }
.upload-item img { width: 44px; height: 44px; border-radius: 7px; object-fit: cover; background: #efe8de; flex: none; }
.upload-item__body { flex: 1; min-width: 0; display: grid; gap: 3px; }
.upload-item__name { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload-item__status { font-size: 0.82rem; color: var(--muted); }
.upload-item.is-error { border-color: #e6c3bb; background: #fdf6f4; }
.upload-item.is-error .upload-item__status { color: var(--no); }
.upload-item.is-done .upload-item__status { color: var(--yes); }
.upload-item__bar { height: 4px; border-radius: 999px; background: #efe8de; overflow: hidden; }
.upload-item__bar > span { display: block; height: 100%; background: var(--accent); transition: width 0.2s; }
.upload-item.is-saving .upload-item__bar > span, .upload-item.is-preparing .upload-item__bar > span { width: 40% !important; animation: indeterminate 1.1s ease-in-out infinite; }
.upload-item.is-done .upload-item__bar > span { background: var(--yes); }
@keyframes indeterminate { from { transform: translateX(-100%); } to { transform: translateX(250%); } }
.upload-item__actions { display: flex; gap: 4px; }

.photo-grid { list-style: none; margin: 16px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 16px; }
.photo-tile { display: flex; flex-direction: column; gap: 8px; }
.photo-tile__media {
  position: relative;
  aspect-ratio: 1;
  border-radius: 12px; overflow: hidden;
  background: #efe8de;
  cursor: grab;
  touch-action: auto;
}
.photo-tile__media img { width: 100%; height: 100%; object-fit: cover; display: block; user-select: none; -webkit-user-drag: none; }
.photo-tile__pending { position: absolute; inset: 0; display: grid; place-items: center; padding: 12px; text-align: center; font-size: 0.82rem; color: var(--muted); }
.photo-tile__num {
  position: absolute; top: 8px; left: 8px;
  min-width: 26px; height: 26px; padding: 0 7px;
  display: grid; place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  font-size: 0.8rem; font-weight: 600;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}
.photo-tile:first-child .photo-tile__num { background: var(--accent); color: #fff; }
.photo-tile__badge {
  position: absolute; top: 8px; right: 8px;
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px 3px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  font-size: 0.75rem; font-weight: 600; color: #9a7b3c;
}
.photo-tile__badge .icon { width: 13px; height: 13px; fill: #e0b04f; stroke: #c9962f; }
.photo-tile__hidden {
  position: absolute; inset: auto 0 0 0;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px;
  background: rgba(46, 42, 39, 0.72); color: #fff; font-size: 0.8rem;
}
.photo-tile__hidden .icon { width: 15px; height: 15px; }
.photo-tile.is-hidden .photo-tile__media img { filter: grayscale(0.7) opacity(0.6); }
.photo-tile__grip {
  position: absolute; right: 8px; bottom: 8px;
  display: grid; place-items: center;
  width: 32px; height: 32px;
  border: 0; border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
  cursor: grab;
  touch-action: none; /* dragging this handle mustn't scroll the page */
  opacity: 0; transition: opacity 0.15s;
}
.photo-tile.is-hidden .photo-tile__grip { bottom: 42px; }
.photo-tile:hover .photo-tile__grip, .photo-tile__grip:focus-visible { opacity: 1; }
@media (hover: none) { .photo-tile__grip { opacity: 1; } }
.photo-tile.is-dragging { opacity: 0.35; }
.photo-tile.is-dragging .photo-tile__media { outline: 2px dashed var(--accent); outline-offset: 2px; }
.photo-tile__caption { padding: 7px 10px; font-size: 0.88rem; }
.photo-tile__actions { display: flex; align-items: center; gap: 2px; }
.tile-btn {
  display: grid; place-items: center;
  width: 32px; height: 32px;
  border: 0; border-radius: 8px;
  background: none;
  color: var(--muted);
  cursor: pointer;
}
.tile-btn:hover:not(:disabled) { background: #f3ede5; color: var(--ink); }
.tile-btn:disabled { opacity: 0.3; cursor: default; }
.tile-btn[aria-pressed='true'] { color: var(--ink); }
.tile-btn[aria-pressed='true'] .icon--star { fill: #e0b04f; stroke: #c9962f; }
.tile-btn--danger:hover:not(:disabled) { background: var(--no-soft); color: var(--no); }
.photo-ghost {
  position: fixed; top: 0; left: 0; z-index: 30;
  width: 88px; height: 88px;
  border-radius: 12px; overflow: hidden;
  box-shadow: 0 14px 30px rgba(46, 42, 39, 0.3);
  pointer-events: none;
}
.photo-ghost img { width: 100%; height: 100%; object-fit: cover; }

/* How photos appear: switch + layout picker + live preview */
.photo-display__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; margin-bottom: 16px; }
.photo-display__head .card__title { margin-bottom: 2px; }
.photo-display__head p { margin: 0; font-size: 0.88rem; }
.photo-display__body { display: grid; grid-template-columns: minmax(250px, 330px) minmax(0, 1fr); gap: 22px; align-items: start; }
@media (max-width: 900px) { .photo-display__body { grid-template-columns: minmax(0, 1fr); } }
.layout-options { display: grid; gap: 8px; }
.layout-option {
  display: flex; align-items: center; gap: 12px;
  width: 100%; padding: 9px 12px 9px 9px;
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--paper);
  font: inherit; color: inherit; text-align: left;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.layout-option:hover { border-color: var(--line-strong); }
.layout-option.is-on { border-color: var(--accent); background: #fbf4f1; box-shadow: inset 0 0 0 1px var(--accent); }
.layout-option__text { display: grid; gap: 1px; min-width: 0; }
.layout-option__text span { font-size: 0.8rem; color: var(--muted); }

/* Layout sketches */
.sk { position: relative; flex: none; display: flex; align-items: center; justify-content: center; gap: 3px; width: 64px; height: 46px; padding: 5px; border-radius: 8px; background: #f3ede5; overflow: hidden; }
.sk__b { display: block; border-radius: 2px; background: #d4c2b4; }
.layout-option.is-on .sk { background: #f3e2dc; }
.layout-option.is-on .sk__b { background: #c99a8b; }
.sk--gallery { display: grid; grid-template-columns: repeat(4, 1fr); grid-template-rows: repeat(2, 1fr); }
.sk--gallery .big { grid-column: span 2; grid-row: span 2; }
.sk--carousel .side { width: 10px; height: 24px; opacity: 0.6; } .sk--carousel .main { width: 28px; height: 32px; }
.sk--slideshow { flex-direction: column; } .sk--slideshow .wide { width: 52px; height: 28px; }
.sk__dots { display: flex; gap: 3px; } .sk__dots .sk__b { width: 4px; height: 4px; border-radius: 50%; }
.sk--polaroid .pol { width: 16px; height: 19px; background: #fff; border: 2px solid #fff; border-bottom-width: 5px; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.18), inset 0 0 0 10px #d4c2b4; }
.layout-option.is-on .sk--polaroid .pol { box-shadow: 0 1px 2px rgba(0, 0, 0, 0.18), inset 0 0 0 10px #c99a8b; background: #fff; }
.sk--polaroid .t1 { transform: rotate(-8deg); } .sk--polaroid .t2 { transform: rotate(5deg) translateY(-2px); } .sk--polaroid .t3 { transform: rotate(-3deg); }
.sk--arches .arch { width: 13px; height: 24px; border-radius: 7px 7px 2px 2px; } .sk--arches .up { transform: translateY(-4px); }
.sk--filmstrip { background: #3a322d; gap: 2px; }
.sk--filmstrip::before, .sk--filmstrip::after { content: ''; position: absolute; left: 0; right: 0; height: 3px; background: repeating-linear-gradient(90deg, transparent 0 3px, #d9cbbd 3px 6px); }
.sk--filmstrip::before { top: 4px; } .sk--filmstrip::after { bottom: 4px; }
.sk--filmstrip .frame { width: 16px; height: 18px; background: #b89d8c; }
.layout-option.is-on .sk--filmstrip { background: #3a322d; }
.sk--story { display: block; }
.sk__line { position: absolute; left: 50%; top: 4px; bottom: 4px; width: 1px; background: #bba898; }
.sk--story .st { position: absolute; width: 20px; height: 10px; } .sk--story .l { left: 7px; top: 6px; } .sk--story .r { right: 7px; top: 18px; } .sk--story .l2 { left: 7px; top: 30px; }

/* Live preview in a little browser frame */
.pv-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; font-size: 0.82rem; }
.pv-label { font-size: 0.75rem; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.pv-frame { position: relative; border: 1px solid var(--line-strong); border-radius: 12px; overflow: hidden; background: #fbf8f3; box-shadow: 0 10px 30px rgba(46, 42, 39, 0.08); }
.pv-bar { display: flex; align-items: center; gap: 6px; padding: 8px 12px; border-bottom: 1px solid var(--line); background: #f4efe8; font-size: 0.75rem; color: var(--muted); }
.pv-bar i { width: 9px; height: 9px; border-radius: 50%; background: #dccfc2; }
.pv-bar span { margin-left: 8px; }
.pv-viewport { position: relative; overflow: hidden; }
.pv-viewport::after { content: ''; position: absolute; inset: auto 0 0 0; height: 40px; background: linear-gradient(transparent, #fbf8f3); pointer-events: none; }
.pv-stage { padding: 56px 40px 64px; transform-origin: top left; font-family: var(--body); }
.pv.is-off .pv-viewport { filter: grayscale(0.8); opacity: 0.35; }
.pv-off { position: absolute; inset: 36px 0 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 20px; text-align: center; font-size: 0.9rem; color: var(--muted); }
.pv-off strong { color: var(--ink); font-size: 1rem; }


/* ---------- Add with AI (dialog from the Guest list tab) ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.dialog--wide { width: min(1000px, calc(100vw - 24px)); }
.btn--sm { padding: 7px 12px; font-size: 0.86rem; }
.btn--ai { border-color: var(--accent); color: var(--accent-dark); background: #fbf3ef; }
.btn--ai:hover:not(:disabled) { background: #f6e7e1; border-color: var(--accent-dark); }
.btn--ai svg { flex: none; }

.ai-intro { margin: 0 0 12px; }
.ai-input { font-size: 0.95rem; }
.ai-input:disabled { background: #faf8f4; color: var(--muted); }

/* Loading */
@keyframes ai-spin { to { transform: rotate(360deg); } }
@keyframes ai-pulse { 0%, 100% { opacity: 0.3; } 50% { opacity: 1; } }
@keyframes ai-shimmer { from { background-position: -400px 0; } to { background-position: 400px 0; } }
@keyframes ai-fill { from { width: 6%; } to { width: 92%; } }
@keyframes ai-fill-short { from { width: 2%; } to { width: 18%; } }
.ai-spinner { flex: none; display: inline-block; width: 20px; height: 20px; border-radius: 50%; border: 3px solid #efe8de; border-top-color: var(--accent); animation: ai-spin 0.8s linear infinite; }
.ai-spinner--light { width: 14px; height: 14px; border-width: 2px; border-color: rgba(255, 255, 255, 0.35); border-top-color: #fff; }
.ai-progress { margin-top: 14px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: #fcfaf7; }
.ai-progress__top { display: flex; align-items: center; gap: 10px; }
.ai-progress__top strong { font-weight: 500; }
.ai-progress__time { margin-left: auto; font-size: 0.85rem; }
.ai-progress__bar { height: 6px; margin: 12px 0; border-radius: 3px; background: #efe8de; overflow: hidden; }
.ai-progress__bar span { display: block; height: 100%; border-radius: 3px; background: var(--accent); animation: ai-fill 30s cubic-bezier(0.1, 0.6, 0.3, 1) forwards; }
.ai-progress__bar span.is-short { animation: ai-fill-short 3s ease-out forwards; }
.ai-steps { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; font-size: 0.92rem; }
.ai-step { display: flex; align-items: center; gap: 10px; }
.ai-step__icon { flex: none; width: 18px; display: inline-flex; justify-content: center; font-weight: 700; }
.ai-step--done { color: var(--yes); }
.ai-step--active { font-weight: 500; }
.ai-step--waiting { color: var(--muted); }
.ai-step--waiting .ai-step__icon::before { content: ''; width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid #c9bdae; }
.ai-dots { display: inline-flex; gap: 3px; }
.ai-dots i { width: 4px; height: 4px; border-radius: 50%; background: var(--accent); animation: ai-pulse 1.2s ease-in-out infinite; }
.ai-dots i:nth-child(2) { animation-delay: 0.2s; }
.ai-dots i:nth-child(3) { animation-delay: 0.4s; }
.ai-skeleton { display: grid; gap: 10px; margin-top: 14px; }
.ai-skeleton__block { display: grid; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; }
.ai-skeleton__block + .ai-skeleton__block { opacity: 0.6; }
.ai-skeleton__row { display: grid; grid-template-columns: 180px 1fr; gap: 12px; }
.ai-shimmer { display: block; height: 34px; border-radius: 8px; background: linear-gradient(90deg, #efe8de 0, #f8f4ee 120px, #efe8de 240px); background-size: 800px 100%; animation: ai-shimmer 1.4s linear infinite; }
.ai-shimmer--head { width: 220px; height: 16px; }
@media (prefers-reduced-motion: reduce) {
  .ai-spinner, .ai-dots i, .ai-shimmer, .ai-progress__bar span { animation-duration: 0s; animation-iteration-count: 1; }
  .ai-progress__bar span { width: 60%; }
}

/* Review */
.ai-review { padding-top: 14px; }
.ai-summary { margin: 0 0 12px; color: var(--muted); }
.ai-cols, .ai-row { display: grid; grid-template-columns: minmax(120px, 200px) minmax(0, 1fr) 140px 36px; column-gap: 12px; }
.ai-cols { padding: 0 12px 6px 16px; font-size: 0.74rem; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); }
.ai-block { margin-bottom: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); overflow: hidden; }
.ai-block__head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 9px 12px 9px 16px; background: #faf7f2; border-bottom: 1px solid #ece4d9; }
.ai-block__head .input--compact { padding: 6px 10px; }
.ai-block__head select.input--compact { padding-right: 28px; }
.ai-block__name { display: flex; align-items: center; gap: 8px; flex: 1 1 260px; min-width: 0; }
.ai-block__name .input { flex: 1 1 auto; width: auto; min-width: 0; font-weight: 500; }
.ai-block__plus { display: flex; align-items: center; gap: 8px; }
.ai-block__plus .input { width: 64px; }
.ai-block__label { font-size: 0.82rem; color: var(--muted); white-space: nowrap; }
.ai-block__joins { flex: 1 1 auto; color: var(--muted); }
.ai-block__joins strong { color: var(--ink); font-weight: 500; }
.ai-block__actions { display: flex; gap: 8px; margin-left: auto; }
.ai-row { align-items: start; padding: 8px 12px 8px 16px; border-top: 1px solid #f3eee7; }
.ai-block__head + .ai-row { border-top: 0; }
.ai-row__found { padding-top: 8px; font-weight: 600; overflow-wrap: anywhere; }
.ai-row__name { display: grid; gap: 4px; min-width: 0; }
.ai-row__name label { display: flex; }
.ai-row__problem { font-size: 0.84rem; color: #7d6230; }
.ai-row__problem .add-link { padding: 0; font-size: 0.84rem; }
.input--attention { border: 1.5px solid #c99a3c; background: #fffaf0; }
.ai-row__move select { width: 100%; padding: 8px 26px 8px 10px; font-size: 0.86rem; color: var(--muted); }
.ai-row__remove { width: 36px; height: 38px; border: 0; border-radius: 8px; background: none; color: var(--no); cursor: pointer; }
.ai-row__remove:hover { background: var(--no-soft); }
.ai-notice { margin: 16px 0 8px; padding: 12px 16px; border: 1.5px solid #e2c98f; border-radius: 12px; background: #fff8e8; }
.ai-notice__title { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font: 600 1rem var(--body); color: #5e4718; }
.ai-notice__icon { flex: none; width: 20px; height: 20px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: #b08a3a; color: #fff; font-size: 0.78rem; font-weight: 700; }
.ai-notice__groups { margin: 0; display: grid; }
.ai-notice__group { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 12px; padding: 6px 0; border-top: 1px solid #ecdcb4; }
.ai-notice__group dt { display: flex; align-items: baseline; gap: 6px; font-weight: 600; color: #5e4718; font-size: 0.92rem; }
.ai-notice__count { padding: 0 7px; border-radius: 999px; background: #f1e2bd; font-size: 0.78rem; }
.ai-notice__group dd { margin: 0; }
.ai-notice__group ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 2px; font-size: 0.92rem; line-height: 1.45; }
.ai-notice__group strong { font-weight: 600; }
.ai-notice__detail { color: #6e5524; }
@media (max-width: 640px) { .ai-notice__group { grid-template-columns: minmax(0, 1fr); gap: 2px; } }
@media (max-width: 640px) {
  .ai-cols { display: none; }
  .ai-row { grid-template-columns: minmax(0, 1fr) 36px; row-gap: 6px; }
  .ai-row__found { grid-column: 1 / -1; padding-top: 0; }
  .ai-row__name { grid-column: 1; }
  .ai-row__move { grid-column: 1; }
  .ai-row__remove { grid-column: 2; grid-row: 2; }
    .ai-block__actions { width: 100%; }
  .ai-block__actions .btn { flex: 1; }
  .ai-skeleton__row { grid-template-columns: 1fr; }
}
.ai-problem { margin: 0 0 12px; padding: 10px 14px; border-radius: 9px; background: var(--no-soft); color: #8f3a2f; }

/* ---------- Guest list: list with Quick views on the right ---------- */
.guests-layout { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 48px; align-items: start; margin-top: 8px; }
.guests-layout__main { min-width: 0; }
.list-heading { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; margin: 0 0 10px; font-size: 0.92rem; color: var(--muted); }
.list-heading strong { color: var(--ink); font-weight: 500; }
.list-heading .add-link { padding: 0; font-size: 0.92rem; }
.quick { position: sticky; top: 16px; margin: 0; padding: 16px; display: grid; gap: 10px; }
.quick__title { margin: 6px 0 0; font-size: 0.74rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.quick__title:first-child { margin-top: 0; }
.quick__views { display: grid; gap: 2px; }
.quick__view { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 8px; background: none; font: 400 0.92rem var(--body); color: var(--ink); text-align: left; cursor: pointer; }
.quick__view:hover { background: #f6f1ea; }
.quick__view.is-active { background: #f6e7e1; color: var(--accent-dark); font-weight: 500; }
.quick__count { flex: none; font-size: 0.82rem; color: var(--muted); }
.quick__tags { display: flex; flex-wrap: wrap; gap: 6px; }
.quick__tag { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); font: 400 0.84rem var(--body); color: var(--ink); cursor: pointer; }
.quick__tag:hover { border-color: var(--line-strong); }
.quick__tag.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }
.quick__tag.is-active .chip__dot { box-shadow: 0 0 0 1.5px #fff; }
@media (max-width: 900px) {
  .guests-layout { grid-template-columns: minmax(0, 1fr); }
  .quick { position: static; order: -1; }
  .quick__views { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
}

/* ---------- Seating: floor plan with "To seat" on the right ---------- */
.seating__layout { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 18px; align-items: start; margin-bottom: 18px; }
.seating__layout .seating__plan { margin-bottom: 0; }
.seating__to-seat { position: sticky; top: 16px; margin: 0; max-height: calc(100svh - 32px); grid-template-rows: auto auto auto minmax(0, 1fr) auto; }
.seating__to-seat .seat-list { max-height: none; min-height: 120px; }
@media (max-width: 960px) {
  .seating__layout { grid-template-columns: minmax(0, 1fr); }
  .seating__to-seat { position: static; max-height: none; }
  .seating__to-seat .seat-list { max-height: 420px; }
}
.seat-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.seat-note { margin: 0; font-size: 0.84rem; color: var(--muted); }
/* Coming = solid green; waiting to reply = light green with a green ring. */
.seat-guest__dot { flex: none; width: 11px; height: 11px; border-radius: 50%; box-sizing: border-box; background: var(--yes); border: 2px solid var(--yes); }
.seat-guest__dot.is-waiting { background: #cfe0c9; }
.seat-guest__status { flex: none; font-size: 0.78rem; color: #3f5c3b; }
.seat-guest__status.is-waiting { color: var(--muted); }
.floor .ftable .seat.is-taken.is-waiting { background: #cfe0c9; border: 2px solid var(--yes); color: #3f5c3b; }
.seat-legend { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-size: 0.78rem; color: var(--muted); }
.seat-legend span { display: inline-flex; align-items: center; gap: 5px; }
.seat-legend__dot { flex: none; width: 10px; height: 10px; border-radius: 50%; box-sizing: border-box; background: var(--yes); border: 2px solid var(--yes); }
.seat-legend__dot--waiting { background: #cfe0c9; }
.seat-legend__dot--empty { background: var(--paper); border: 1px solid #cdbfae; }
.seat-legend__dot--family { background: conic-gradient(#a0685a 0 33%, #6f63a0 0 66%, #3f7a8c 0); border: 0; }
.progress--split { display: flex; }
.progress--split .progress__bar { border-radius: 0; background: var(--yes); }
.progress--split .progress__bar--waiting { background: #b9d3b1; }

/* ---------- Motion ----------
   Short and quiet: things that arrive fade and slide in, things just saved
   glow once, things removed shrink away. Switched off for reduced motion. */
@keyframes m-enter { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes m-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes m-pop { 0% { transform: translate(-50%, -50%) scale(0.3); } 70% { transform: translate(-50%, -50%) scale(1.25); } 100% { transform: translate(-50%, -50%) scale(1); } }
@keyframes m-glow { from { background-color: #f6e7e1; } to { background-color: transparent; } }
@keyframes m-ring { 0% { box-shadow: 0 0 0 0 rgba(160, 104, 90, 0.45); } 100% { box-shadow: 0 0 0 14px rgba(160, 104, 90, 0); } }
@keyframes m-leave { to { opacity: 0; transform: translateX(10px) scale(0.98); } }
@keyframes m-dialog { from { opacity: 0; transform: translateY(10px) scale(0.98); } to { opacity: 1; transform: none; } }

.content.is-entering, .guests-layout__main.is-entering { animation: m-enter 0.22s ease-out; }
.dialog[open] { animation: m-dialog 0.2s ease-out; }
.dialog[open]::backdrop { animation: m-fade 0.2s ease-out; }
.btn, .quick__view, .quick__tag, .tab, .seat-guest, .icon-btn { transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.1s, box-shadow 0.15s; }
.btn:active:not(:disabled), .quick__tag:active, .icon-btn:active { transform: scale(0.97); }
.tab { transition: color 0.15s, border-color 0.2s; }

/* Just added or saved */
.row-link.is-fresh > td { animation: m-glow 1.2s ease-out; }
.tag-row.is-fresh, .seated__list li.is-fresh { animation: m-enter 0.25s ease-out; }
.seat-guest.is-fresh { animation: m-enter 0.25s ease-out, m-glow 1.2s ease-out; }
.floor .seat.is-taken.is-fresh { animation: m-pop 0.35s ease-out; }
.ftable.is-fresh { animation: m-ring 0.7s ease-out; }

/* Being removed */
.is-leaving { animation: m-leave 0.18s ease-in forwards; pointer-events: none; }
tr.is-leaving > td { animation: m-leave 0.18s ease-in forwards; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after, .dialog[open], .dialog[open]::backdrop { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}
