/* Section-specific layout. */

/* Welcome + Quick Setup */
.gate { min-height: calc(100dvh - var(--demo-h)); display: flex; align-items: center; justify-content: center; padding: var(--space-6) var(--space-5); }
.gate-card { width: 100%; max-width: 460px; padding: var(--space-7) var(--space-6); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.gate-brand { font-family: var(--font-serif); font-size: 26px; font-weight: 600; text-align: center; line-height: 1.15; }
.gate-rule { width: 36px; height: 1px; margin: var(--space-4) auto; background: var(--gold); }
.gate-lead { margin-bottom: var(--space-6); text-align: center; color: var(--muted); font-size: var(--fs-control); }
.choice { display: block; width: 100%; margin-top: var(--space-3); padding: var(--space-5); text-align: left; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); cursor: pointer; }
.choice strong { display: block; font-size: var(--fs-md); font-weight: 600; }
.choice span { display: block; margin-top: 2px; font-size: var(--fs-sm); color: var(--muted); }
@media (hover: hover) { .choice:hover { border-color: var(--accent-strong); } }
.steps { display: flex; gap: var(--space-1); margin-bottom: var(--space-2); }
.steps i { flex: 1; height: 2px; border-radius: 1px; background: var(--track); }
.steps i.on { background: var(--accent-strong); }
.step-count { font-size: var(--fs-xs); color: var(--muted); }
.step-title { margin: 2px 0 var(--space-1); font-family: var(--font-serif); font-size: var(--fs-title); font-weight: 600; line-height: 1.2; }
.step-lead { margin-bottom: var(--space-6); font-size: var(--fs-sm); color: var(--muted); }
.gate-actions { display: flex; justify-content: space-between; align-items: center; margin-top: var(--space-6); }

/* Overview */
.ov-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); margin-bottom: var(--gap); }
.stat { display: flex; flex-direction: column; min-height: 104px; }
.stat-label { font-size: var(--fs-sm); font-weight: 500; color: var(--muted); }
.stat-value { margin-top: var(--space-1); font-size: var(--fs-stat); font-weight: 600; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-value small { margin: 0 3px 0 1px; font-size: var(--fs-sm); font-weight: 500; color: var(--muted); }
.stat-value.danger { color: var(--danger); }
.stat-phrase { font-size: var(--fs-lg); }
.stat-sub { margin-top: 2px; font-size: var(--fs-xs); color: var(--muted); overflow-wrap: anywhere; }
.stat-sub.danger { color: var(--danger); font-weight: 500; display: flex; align-items: center; gap: var(--space-1); }
.stat-sub.danger .ico { width: 12px; height: 12px; }
.stat .bar { margin-top: auto; }
.stat-split { display: flex; flex-wrap: wrap; gap: 0 var(--space-3); margin-top: 2px; font-size: var(--fs-xs); color: var(--muted); }
.stat-split b { color: var(--text); font-weight: 600; }
/* Phone: one column in a set reading order. The wrappers only group cards on laptop. */
.ov-grid { display: flex; flex-direction: column; gap: var(--gap); }
.ov-wide, .ov-wide-row, .ov-col { display: contents; }
.ov-tasks { order: 1; }
.ov-payments { order: 2; }
.ov-vendors { order: 3; }
.ov-rsvp { order: 4; }
.ov-spending { order: 5; }
.ov-month { order: 6; }
.ov-stages { order: 7; }
.ov-details { order: 8; }
.ov-grid .empty-note { padding: var(--space-1) 0 0; }
.ov-mini li { display: flex; align-items: center; gap: var(--space-3); min-height: calc(var(--row-h) - var(--space-5)); font-size: var(--fs-sm); }
.ov-mini .pill { height: calc(var(--row-h) - var(--space-6)); }
.ov-stages-list li { display: grid; grid-template-columns: minmax(0, 1fr) 72px 38px; align-items: center; gap: var(--space-3); min-height: calc(var(--row-h) - var(--space-5)); font-size: var(--fs-sm); }
.ov-stage-count { font-size: var(--fs-xs); color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.ov-donut { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: var(--space-5); }
.donut { display: block; }
.donut-total { font-size: var(--fs-sm); font-weight: 600; fill: var(--text); }
.ov-legend li { display: grid; grid-template-columns: var(--space-3) minmax(0, 1fr) auto; align-items: center; gap: var(--space-2); min-height: calc(var(--row-h) - var(--space-6)); font-size: var(--fs-sm); }
.ov-legend i { width: var(--space-3); height: var(--space-3); border-radius: 2px; }
.ov-legend-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ov-legend-value { color: var(--muted); font-variant-numeric: tabular-nums; }
.bar.stacked > span + span { margin-left: 2px; }
.ov-key { display: flex; flex-wrap: wrap; gap: 2px var(--space-4); margin-top: var(--space-3); font-size: var(--fs-xs); color: var(--muted); }
.ov-key span { display: inline-flex; align-items: center; gap: var(--space-1); }
.ov-key i { width: var(--space-3); height: var(--space-3); border-radius: 2px; }
.ov-key i.confirmed { background: var(--accent); }
.ov-key i.declined { background: var(--gold); }
.ov-key i.waiting { background: var(--track); }
.ov-key b { color: var(--text); font-weight: 600; }
.ov-rsvp .gs-meals { margin-top: var(--space-3); }
.ov-cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.ov-cal-head { font-size: var(--fs-xs); color: var(--muted); text-align: center; }
.ov-date { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; height: var(--row-h); padding: 2px 0 0; border: 0; border-radius: var(--radius); background: none; font-size: var(--fs-xs); line-height: 1.3; cursor: pointer; font-variant-numeric: tabular-nums; }
.ov-date.today { background: var(--accent-soft); color: var(--accent-strong); font-weight: 600; }
.ov-date.wedding { background: var(--gold-soft); color: var(--gold-text); font-weight: 600; }
.ov-dots { position: absolute; left: 0; right: 0; bottom: 3px; display: flex; justify-content: center; gap: 2px; }
.ov-dots i, .key-dot { width: var(--space-1); height: var(--space-1); border-radius: 50%; }
.ov-dots .task, .key-dot.task { background: var(--accent); }
.ov-dots .pay, .key-dot.pay { background: var(--dot-pay); }
.ov-details a { color: var(--accent-strong); }
@media (hover: hover) { .ov-date:hover { background: var(--bg); } }
.kv { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 3px var(--space-3); font-size: var(--fs-sm); }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; text-align: right; overflow-wrap: anywhere; }
dl.kv { margin: 0; }
.more-count { padding-top: var(--space-2); font-size: var(--fs-sm); }
.more-count a { color: var(--accent-strong); }

/* More */
.link-list a { display: flex; align-items: center; gap: var(--space-4); min-height: var(--item-h); padding: var(--space-2) var(--space-1); border-top: 1px solid var(--border); }
.link-list li:first-child a { border-top: 0; }
.link-list .ico { color: var(--accent-strong); }
.link-list .ico.chev { color: var(--muted); }
.link-text { flex: 1; min-width: 0; }
.link-text strong { display: block; font-size: var(--fs-control); font-weight: 500; }
.link-text span { display: block; font-size: var(--fs-xs); color: var(--muted); }

/* Settings */
.settings { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--gap); max-width: 860px; }
.settings .card-title { margin-bottom: var(--space-4); }

@media (min-width: 768px) {
  .ov-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .ov-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .ov-tasks { grid-column: 1 / -1; }
  .ov-date { height: calc(var(--row-h) - var(--space-4)); }
  .settings { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .settings .wide { grid-column: 1 / -1; }
}

/* Task rows (Timeline and Calendar) */
.tasks li { display: flex; align-items: center; gap: var(--space-2); min-height: var(--item-h); border-top: 1px solid var(--border); font-size: var(--fs-control); }
.tasks li:first-child { border-top: 0; }
.task-title { flex: 1; min-width: 0; padding: var(--space-2) 0; border: 0; background: none; text-align: left; font-size: var(--fs-control); cursor: pointer; overflow-wrap: anywhere; }
.task.done .task-title { color: var(--muted); text-decoration: line-through; }
.task.overdue .task-title { color: var(--danger); }
.owner-chip { flex: none; max-width: 72px; height: 22px; padding: 0 var(--space-2); border: 1px solid var(--border); border-radius: 11px; background: var(--surface); color: var(--muted); font-size: var(--fs-xs); cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Timeline */
.tl-summary { margin-bottom: var(--gap); }
.tl-overall { display: flex; align-items: baseline; gap: var(--space-3); margin-bottom: var(--space-2); }
.tl-pct { font-size: var(--fs-stat); font-weight: 600; line-height: 1.1; }
.tl-overall-text { flex: 1; font-size: var(--fs-sm); color: var(--muted); }
button.pill { border: 0; cursor: pointer; }
.tl-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-2); margin-top: var(--space-4); }
.tl-tile { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px var(--space-1); padding: var(--space-2) var(--space-3); border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); text-align: left; cursor: pointer; }
.tl-tile.on { border-color: var(--accent-strong); box-shadow: 0 0 0 1px var(--accent-strong); }
.tl-tile-name { font-size: var(--fs-xs); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-tile-count { font-size: var(--fs-xs); color: var(--muted); font-variant-numeric: tabular-nums; }
.tl-tile .bar { grid-column: 1 / -1; height: 3px; }
.tl-filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); margin-bottom: var(--space-3); }
.tl-search { grid-column: 1 / -1; }
.tl-count { font-size: var(--fs-sm); color: var(--muted); margin-bottom: var(--space-3); }
.tl-count:empty { display: none; }
.tl-list { display: grid; gap: var(--space-3); }
.tl-group { padding-top: 0; padding-bottom: 0; }
.tl-group-head { display: flex; align-items: center; gap: var(--space-3); width: 100%; min-height: var(--item-h); padding: 0; border: 0; background: none; cursor: pointer; text-align: left; }
.tl-group-head .chev { color: var(--muted); transition: transform .12s; }
.tl-group-head .chev.open { transform: rotate(90deg); }
.tl-group-name { flex: 1; min-width: 0; font-size: var(--fs-md); font-weight: 600; }
.tl-group-count { font-size: var(--fs-sm); color: var(--muted); font-variant-numeric: tabular-nums; }
.tl-group-head .bar { flex: none; width: 56px; }
.tl-group .tasks { border-top: 1px solid var(--border); }

/* Calendar */
.cal-root { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--gap); }
.cal-bar { display: flex; align-items: center; gap: var(--space-2); margin-bottom: var(--space-3); }
.cal-title { flex: 1; font-family: var(--font-serif); font-size: 18px; font-weight: 600; text-align: center; }
.cal-step { width: var(--ctl-h); padding: 0; }
.cal-bar .btn:not(.cal-step) { padding: 0 var(--space-3); }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-left: 1px solid var(--border); border-top: 1px solid var(--border); }
.cal-head { padding: var(--space-1) 0; text-align: center; font-size: var(--fs-xs); color: var(--muted); border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.cal-cell { display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 0; height: 52px; padding: 4px 2px; border: 0; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--surface); cursor: pointer; overflow: hidden; }
.cal-cell.out { background: var(--bg); }
.cal-cell.out .cal-num { color: var(--muted); }
.cal-num { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; border-radius: 10px; font-size: var(--fs-sm); }
.cal-cell.today .cal-num { background: var(--accent-strong); color: var(--on-accent); font-weight: 600; }
.cal-cell.wedding { background: var(--gold-soft); }
.cal-cell.selected { box-shadow: inset 0 0 0 1.5px var(--accent-strong); }
.cal-chips { display: none; }
.cal-dots { display: flex; gap: 2px; }
.cal-dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.cal-dots i.overdue { background: var(--danger); }
.cal-dots i.done { background: var(--track); box-shadow: inset 0 0 0 1px var(--muted); }
.cal-dots i.wedding { background: var(--gold); }
.cal-chip { display: block; max-width: 100%; padding: 0 var(--space-1); border-radius: 3px; background: var(--accent-soft); color: var(--text); font-size: var(--fs-xs); line-height: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-chip.overdue { background: var(--danger-soft); color: var(--danger); }
.cal-chip.done { background: var(--track); color: var(--muted); text-decoration: line-through; }
.cal-chip.wedding { background: var(--gold); color: var(--text); font-weight: 600; }
.cal-more { display: block; font-size: var(--fs-xs); line-height: 14px; color: var(--muted); }
.cal-add { margin-top: var(--space-3); width: 100%; }
.cal-chip.payment { background: var(--gold-soft); }
.cal-dots i.payment { background: var(--gold-text); }
.cal-pay-label { cursor: default; }

/* Budget */
.head-actions { display: flex; gap: var(--space-2); }
.bd-grid { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-areas: "pay" "cats" "chart"; gap: var(--gap); }
.bd-pay { grid-area: pay; }
.bd-cats { grid-area: cats; }
.bd-chart { grid-area: chart; }
.bd-split { font-size: var(--fs-sm); }

.bd-table { width: 100%; border-collapse: collapse; font-size: var(--fs-control); }
.bd-table thead { display: none; }
.bd-table tr { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2px var(--space-3); padding: var(--space-3) 0; border-top: 1px solid var(--border); }
.bd-table tbody tr:first-child { border-top: 0; }
.bd-table tbody tr { cursor: pointer; }
.bd-table td { display: block; min-width: 0; padding: 0; }
.bd-table td.num::before, .bd-table td.bd-date:not(:empty)::before { content: attr(data-label); display: block; font-size: var(--fs-xs); font-weight: 400; color: var(--muted); }
.bd-table td.bd-name { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); font-weight: 500; }
.bd-table td.bd-date { grid-column: span 2; }
.bd-table td.bd-date:empty { display: none; }
.bd-table tfoot tr { border-top: 1px solid var(--accent); font-weight: 600; }
.bd-table tfoot td.bd-date { display: none; }
.bd-name-btn { padding: 0; border: 0; background: none; font-weight: 500; text-align: left; cursor: pointer; overflow-wrap: anywhere; }
.bd-over { color: var(--danger); font-weight: 600; }
.num { font-variant-numeric: tabular-nums; }
.pill .ico { width: 11px; height: 11px; margin-right: 3px; }
.pill.paid { background: var(--accent-soft); color: var(--accent-strong); }

.pays li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: var(--space-3); min-height: 46px; padding: var(--space-1) 0; border-top: 1px solid var(--border); }
.pays li:first-child { border-top: 0; }
.pay-main { min-width: 0; padding: 0; border: 0; background: none; text-align: left; cursor: pointer; }
.pay-label { display: block; font-size: var(--fs-control); overflow-wrap: anywhere; }
.pay-cat { display: block; font-size: var(--fs-xs); color: var(--muted); }
.pay-when { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.pay-amount { font-size: var(--fs-control); font-weight: 600; font-variant-numeric: tabular-nums; }
.pay-btn { height: 28px; padding: 0 var(--space-3); font-size: var(--fs-sm); white-space: nowrap; }
.pays li.done .pay-label { color: var(--muted); text-decoration: line-through; }
.bd-show-paid { margin-top: var(--space-3); font-size: var(--fs-sm); }
.check-line { display: flex; align-items: center; gap: var(--space-3); font-size: var(--fs-control); cursor: pointer; }

.chart-host { position: relative; }
.chart-svg { display: block; overflow: visible; }
.chart-label { font-size: 11px; fill: var(--text); }
.chart-value { font-size: 11px; fill: var(--muted); font-variant-numeric: tabular-nums; }
.chart-bar { fill: var(--accent); }
.chart-bar.over { fill: var(--danger); }
.chart-axis { stroke: var(--border); stroke-width: 1; }
.chart-tick { stroke: var(--text); stroke-width: 1.5; }
.chart-tick-ring { stroke: var(--surface); stroke-width: 4.5; }
.chart-row:focus { outline: none; }
.chart-row:focus-visible .chart-label { text-decoration: underline; }
.chart-tip { position: absolute; left: 0; right: 0; z-index: 5; padding: var(--space-1) var(--space-3); border-radius: var(--radius); background: var(--text); color: var(--surface); font-size: var(--fs-xs); pointer-events: none; }
.chart-key { display: flex; gap: var(--space-4); font-size: var(--fs-xs); color: var(--muted); }
.chart-key span { display: inline-flex; align-items: center; gap: var(--space-1); }
.key-bar { width: 12px; height: 8px; border-radius: 0 3px 3px 0; background: var(--accent); }
.key-tick { width: 1.5px; height: 12px; background: var(--text); }

@media (min-width: 768px) {
  .bd-grid { grid-template-columns: minmax(0, 1fr) 372px; grid-template-rows: auto 1fr; grid-template-areas: "cats chart" "cats pay"; align-items: start; }
  .bd-table thead { display: table-header-group; }
  .bd-table tr { display: table-row; padding: 0; border-top: 0; }
  .bd-table td, .bd-table th { display: table-cell; height: var(--row-h); padding: 0 var(--space-2); border-top: 1px solid var(--border); text-align: left; vertical-align: middle; white-space: nowrap; }
  .bd-table th { font-size: var(--fs-xs); font-weight: 500; color: var(--muted); border-top: 0; height: 26px; }
  .bd-table td:first-child, .bd-table th:first-child { padding-left: 0; }
  .bd-table td:last-child, .bd-table th:last-child { padding-right: 0; }
  .bd-table .num { text-align: right; }
  .bd-table td.num::before, .bd-table td.bd-date:not(:empty)::before { content: none; }
  .bd-table td.bd-name { display: table-cell; white-space: normal; }
  .bd-table td.bd-name .pill { margin-left: var(--space-2); }
  .bd-table td.bd-date:empty { display: table-cell; }
  .bd-table tfoot td.bd-date { display: table-cell; }
  .bd-table tfoot td { border-top: 1px solid var(--accent); }
  .bd-table tbody tr:first-child td { border-top: 1px solid var(--border); }
}
@media (hover: hover) and (min-width: 768px) {
  .bd-table tbody tr:hover td { background: var(--bg); }
}

/* Day-of Schedule */
.dy-print { display: none; }
.dy-date { margin-bottom: var(--space-3); font-size: var(--fs-sm); color: var(--muted); }
.dy-table { width: 100%; border-collapse: collapse; font-size: var(--fs-control); }
.dy-table thead { display: none; }
.dy-table tr { display: grid; grid-template-columns: 74px minmax(0, 1fr); column-gap: var(--space-3); padding: var(--space-3) 0; border-top: 1px solid var(--border); cursor: pointer; }
.dy-table tbody tr:first-child { border-top: 0; }
.dy-table td { display: block; grid-column: 2; min-width: 0; padding: 0; overflow-wrap: anywhere; }
.dy-table td.dy-time { grid-column: 1; grid-row: 1 / span 4; font-weight: 600; font-variant-numeric: tabular-nums; }
.dy-table td:empty { display: none; }
.dy-table td.dy-time:empty { display: block; }
.dy-what-btn { padding: 0; border: 0; background: none; font-weight: 500; text-align: left; cursor: pointer; overflow-wrap: anywhere; }
.dy-sub { font-size: var(--fs-sm); color: var(--muted); }

/* Packing */
.pk-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--gap); align-items: start; }
.pk-items { margin-top: var(--space-2); }
.pk-items li { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); min-height: var(--item-h); border-top: 1px solid var(--border); }
.pk-items li:first-child { border-top: 0; }
.pk-items .check-line { flex: 1; min-width: 0; padding: var(--space-1) 0; overflow-wrap: anywhere; }
.pk-items .check { flex: none; }
.pk-items li.done span { color: var(--muted); text-decoration: line-through; }
.pk-add { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-2); margin-top: var(--space-3); }

/* Inspiration */
.in-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--gap); align-items: start; }
.in-items li { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-3); padding: var(--space-3) 0; border-top: 1px solid var(--border); }
.in-items li:first-child { border-top: 0; }
.in-main { flex: 1; min-width: 0; }
.in-link { display: block; color: var(--accent-strong); font-size: var(--fs-control); font-weight: 500; overflow-wrap: anywhere; text-decoration: underline; text-underline-offset: 2px; }
.in-title { display: block; font-size: var(--fs-control); font-weight: 500; overflow-wrap: anywhere; }
.in-domain { display: block; font-size: var(--fs-xs); color: var(--muted); overflow-wrap: anywhere; }
.in-notes { margin-top: 2px; font-size: var(--fs-sm); color: var(--muted); white-space: pre-line; overflow-wrap: anywhere; }
.in-edit { flex: none; font-size: var(--fs-sm); }

/* Settings: data and install */
.data-row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); padding: var(--space-3) 0; border-top: 1px solid var(--border); }
.data-row:first-of-type { border-top: 0; }
.data-text { flex: 1; min-width: 0; }
.data-text strong { display: block; font-size: var(--fs-control); font-weight: 500; }
.data-text span { display: block; font-size: var(--fs-xs); color: var(--muted); }
.data-row .btn { flex: none; white-space: nowrap; padding: 0 var(--space-4); }
.data-danger { color: var(--danger); }
.install-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-4); font-size: var(--fs-control); }
.install-grid strong { font-weight: 600; }
.install-grid ol { margin: var(--space-1) 0 0; padding-left: 18px; font-size: var(--fs-sm); color: var(--muted); }
.settings > .card.wide > .field-hint { margin-top: var(--space-3); }
.gate-restore { display: block; margin: var(--space-5) auto 0; font-size: var(--fs-sm); }

@media (min-width: 768px) {
  .dy-table thead { display: table-header-group; }
  .dy-table tr { display: table-row; padding: 0; border-top: 0; }
  .dy-table td, .dy-table td.dy-time, .dy-table th, .dy-table td:empty { display: table-cell; height: var(--row-h); padding: var(--space-1) var(--space-3); border-top: 1px solid var(--border); text-align: left; vertical-align: middle; }
  .dy-table th { height: 26px; border-top: 0; font-size: var(--fs-xs); font-weight: 500; color: var(--muted); }
  .dy-table td:first-child, .dy-table th:first-child { padding-left: 0; white-space: nowrap; }
  .pk-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
  .pk-items li { min-height: var(--row-h); }
  .in-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
  .install-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (hover: hover) and (min-width: 768px) {
  .dy-table tbody tr:hover td { background: var(--bg); }
}

/* Vendors */
textarea.input { height: auto; min-height: 56px; padding: var(--space-2) var(--space-4); line-height: 1.4; resize: vertical; }
.bd-vendor { flex-basis: 100%; display: block; font-size: var(--fs-xs); font-weight: 400; color: var(--muted); }
.contact-links { display: flex; flex-wrap: wrap; gap: 2px var(--space-3); }
.contact-link { display: inline-flex; align-items: center; gap: var(--space-1); min-height: 24px; min-width: 0; color: var(--accent-strong); font-size: var(--fs-sm); overflow-wrap: anywhere; }
.contact-link .ico { width: 14px; height: 14px; }
.vd-list { display: grid; gap: var(--gap); }
.vd-add { font-size: var(--fs-sm); white-space: nowrap; }
.vd-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.vd-table { border-collapse: separate; border-spacing: 0; font-size: var(--fs-control); }
.vd-table th, .vd-table td { min-width: 190px; max-width: 260px; padding: var(--space-2) var(--space-3); border-top: 1px solid var(--border); text-align: left; vertical-align: top; font-weight: 400; }
.vd-table thead th { border-top: 0; vertical-align: bottom; }
.vd-table th:first-child { position: sticky; left: 0; z-index: 1; min-width: 62px; max-width: 62px; padding-left: 0; background: var(--surface); color: var(--muted); font-size: var(--fs-xs); }
.vd-name { display: block; margin-bottom: 2px; padding: 0; border: 0; background: none; font-size: var(--fs-control); font-weight: 600; text-align: left; cursor: pointer; overflow-wrap: anywhere; }
.vd-status.booked { background: var(--accent-soft); color: var(--accent-strong); }
.vd-status.contacted { background: var(--gold-soft); color: var(--gold-text); }
.vd-text { display: block; white-space: pre-line; overflow-wrap: anywhere; }
.vd-stars { display: inline-flex; gap: 1px; color: var(--gold); vertical-align: middle; }
.vd-stars .ico { width: 13px; height: 13px; color: var(--track); stroke: var(--gold); }
.vd-stars .ico.on { fill: var(--gold); }
.vd-actions { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-2) var(--space-3); }
.vd-btn { height: 28px; padding: 0 var(--space-4); font-size: var(--fs-sm); }
.vd-nudge { font-size: var(--fs-sm); white-space: nowrap; }
.vd-chips { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-2); }
.vd-chip { height: 28px; padding: 0 var(--space-3); font-size: var(--fs-sm); }

/* Overview on a full laptop width: four columns, each card only as tall as its content. */
@media (min-width: 1100px) {
  .ov-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .ov-wide { grid-column: span 2; display: flex; flex-direction: column; gap: var(--gap); }
  .ov-wide-row { order: 9; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); align-items: start; }
  .ov-col { display: flex; flex-direction: column; gap: var(--gap); }
  .ov-tasks { grid-column: auto; }
}

.vd-hint { display: none; }

/* Phone only: narrower option columns, and a cue that the table can be swiped. */
@media (max-width: 767px) {
  .vd-table th, .vd-table td { min-width: 150px; }
  .vd-btn { height: auto; min-height: 28px; white-space: normal; }
  .vd-compare.overflows .vd-hint { display: block; margin-bottom: var(--space-1); font-size: var(--fs-xs); color: var(--muted); text-align: right; }
  .vd-fade { position: relative; }
  .vd-fade::after { content: ""; position: absolute; top: 0; right: 0; bottom: 0; z-index: 2; width: 32px; background: linear-gradient(to right, rgba(255, 255, 255, 0), var(--surface)); opacity: 0; pointer-events: none; transition: opacity .15s; }
  .vd-compare.overflows:not(.at-end) .vd-fade::after { opacity: 1; }
}

@media (min-width: 1100px) {
  .vd-list { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .vd-missing { grid-column: 1 / -1; }
}

/* Wedding Party */
.pt-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2); }
.pt-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--gap); align-items: start; }
.pt-card { display: grid; gap: var(--space-2); }
.pt-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }
.pt-name { min-width: 0; padding: 0; border: 0; background: none; font-size: var(--fs-md); font-weight: 600; text-align: left; cursor: pointer; overflow-wrap: anywhere; }
.pt-head .pill { height: auto; min-height: 20px; white-space: normal; }
.pt-outfit { display: grid; grid-template-columns: 52px minmax(0, 1fr); align-items: center; font-size: var(--fs-sm); color: var(--muted); }
.pt-tasks { display: grid; gap: 2px; }
.pt-tasks .check-line { align-items: flex-start; font-size: var(--fs-control); min-height: 24px; }
.pt-tasks .check { flex: none; margin-top: 1px; }
.pt-tasks li.done span { color: var(--muted); text-decoration: line-through; }
.pt-notes { font-size: var(--fs-sm); color: var(--muted); white-space: pre-line; overflow-wrap: anywhere; }

@media (min-width: 768px) {
  .pt-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .pt-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
}

/* Seating */
.st-summary { margin-bottom: var(--gap); }
.st-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2); }
.st-tiles .gs-tile:last-child { grid-column: 1 / -1; }
.st-tile-danger .gs-tile-value { color: var(--danger); }
.st-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: var(--space-3); border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.st-tabs button { height: var(--ctl-h); border: 0; background: none; color: var(--muted); font-size: var(--fs-control); cursor: pointer; }
.st-tabs button + button { border-left: 1px solid var(--border); }
.st-tabs button.on { background: var(--accent-soft); color: var(--accent-strong); font-weight: 600; }
.st-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--gap); align-items: start; }
.st-root[data-tab="unseated"] .st-tables, .st-root[data-tab="tables"] .st-unseated { display: none; }
.st-tables { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--gap); align-items: start; }
.st-showall { margin: var(--space-3) 0 var(--space-2); font-size: var(--fs-sm); }
.st-guests li, .st-seated li { display: flex; align-items: center; gap: var(--space-2); min-height: var(--item-h); border-top: 1px solid var(--border); }
.st-guests li:first-child, .st-seated li:first-child { border-top: 0; }
.st-guest { flex: 1; min-width: 0; padding: var(--space-1) 0; border: 0; background: none; text-align: left; cursor: pointer; }
.st-guest-name { display: block; font-size: var(--fs-control); overflow-wrap: anywhere; }
.st-guest-sub { display: block; font-size: var(--fs-xs); color: var(--muted); overflow-wrap: anywhere; }
.st-seated li.declined .st-guest-name { color: var(--muted); text-decoration: line-through; }
.st-remove { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 28px; height: 28px; padding: 0; border: 0; background: none; color: var(--muted); cursor: pointer; }
.st-remove .ico { width: 14px; height: 14px; }
.st-table.over { border-color: var(--danger); }
.st-table.drop-on, .st-unseated.drop-on { border-color: var(--accent-strong); box-shadow: 0 0 0 1px var(--accent-strong); }
li.dragging { opacity: .45; }
.st-table-head { display: flex; align-items: center; gap: var(--space-2); margin-bottom: var(--space-2); }
.st-table-name { flex: 1; min-width: 0; padding: 0; border: 0; background: none; font-size: var(--fs-md); font-weight: 600; text-align: left; cursor: pointer; overflow-wrap: anywhere; }
.st-count { flex: none; font-size: var(--fs-sm); color: var(--muted); font-variant-numeric: tabular-nums; }
.st-shape { flex: none; display: inline-block; border: 1.5px solid var(--gold); background: var(--gold-soft); }
.st-shape.round { width: 14px; height: 14px; border-radius: 50%; }
.st-shape.long { width: 20px; height: 10px; border-radius: 2px; }
.st-empty { padding: var(--space-3) 0 var(--space-1); font-size: var(--fs-sm); color: var(--muted); }
.st-pick-hint { margin: 0 0 var(--space-3); }
.st-pick { display: flex; align-items: center; gap: var(--space-3); width: 100%; min-height: var(--item-h); padding: var(--space-2) var(--space-1); border: 0; border-top: 1px solid var(--border); background: none; text-align: left; cursor: pointer; }
.st-pick:first-of-type { border-top: 0; }
.st-pick.current { background: var(--accent-soft); }
.st-pick-name { flex: 1; min-width: 0; font-size: var(--fs-control); overflow-wrap: anywhere; }
.st-unseat { color: var(--danger); font-size: var(--fs-control); }
.st-print { display: none; }

@media (min-width: 768px) {
  .st-tiles { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .st-tiles .gs-tile:last-child { grid-column: auto; }
  .st-grid { grid-template-columns: 260px minmax(0, 1fr); }
  .st-root[data-tab] .st-tables { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
  .st-root[data-tab] .st-unseated { display: block; position: sticky; top: calc(var(--demo-h) + 12px); }
  .st-unseated-list { max-height: calc(100vh - var(--demo-h) - 280px); overflow-y: auto; }
  .st-guests li[draggable], .st-seated li[draggable] { cursor: grab; }
  .st-guests li, .st-seated li { min-height: var(--row-h); }
}

@media print {
  @page { margin: 12mm; }
  html, body { background: #fff; color: #000; }
  .sidebar, .bottom-nav, .demo-bar, .toast, .page-head, .st-summary, .st-tabs, .st-grid, .dy-date, .dy-list { display: none !important; }
  .dy-print { display: block; font-family: var(--font-sans); }
  .dy-print h1 { font-family: var(--font-serif); font-size: 26px; font-weight: 600; text-align: center; }
  .dy-print h2 { margin: 14px 0 12px; font-family: var(--font-serif); font-size: 18px; font-weight: 600; text-align: center; }
  .dy-print table { width: 100%; border-collapse: collapse; font-size: 12px; }
  .dy-print th, .dy-print td { padding: 5px 8px; border-bottom: 1px solid #999; text-align: left; vertical-align: top; }
  .dy-print th { border-bottom: 1px solid #000; font-size: 11px; }
  .dy-print tr { break-inside: avoid; }
  .dy-print td:first-child { white-space: nowrap; font-weight: 600; }
  .app { display: block; min-height: 0; }
  .view { max-width: none; padding: 0; }
  .st-print { display: block; font-family: var(--font-sans); }
  .st-print h1 { font-family: var(--font-serif); font-size: 26px; font-weight: 600; text-align: center; }
  .st-print-place { margin-top: 2px; font-size: 12px; text-align: center; }
  .st-print h2 { margin: 14px 0 14px; font-family: var(--font-serif); font-size: 18px; font-weight: 600; text-align: center; }
  .st-print-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px 20px; }
  .st-print-table { break-inside: avoid; }
  .st-print-shape { display: flex; align-items: center; justify-content: center; margin: 0 auto 6px; border: 1px solid #000; font-size: 11px; font-weight: 600; text-align: center; overflow: hidden; }
  .st-print-shape.round { width: 74px; height: 74px; border-radius: 50%; }
  .st-print-shape.long { width: 130px; height: 44px; border-radius: 3px; }
  .st-print-shape span { padding: 0 6px; }
  .st-print ol { margin: 0; padding: 0; list-style: none; font-size: 12px; line-height: 1.5; text-align: center; }
}

/* Guests */
.gs-summary { margin-bottom: var(--gap); }
.gs-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-2); }
.gs-tile { display: flex; flex-direction: column; justify-content: flex-start; min-width: 0; padding: var(--space-2) var(--space-3); border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); text-align: left; }
button.gs-tile { cursor: pointer; }
.gs-tile.on { border-color: var(--accent-strong); box-shadow: 0 0 0 1px var(--accent-strong); }
.gs-tile-wide { grid-column: span 2; }
.gs-tile-value { font-size: var(--fs-lg); font-weight: 600; line-height: 1.25; font-variant-numeric: tabular-nums; }
.gs-tile-label { font-size: var(--fs-xs); color: var(--muted); line-height: 1.25; }
.gs-meals { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1) var(--space-3); margin-top: var(--space-3); font-size: var(--fs-sm); color: var(--muted); }
.gs-meals-label { font-weight: 500; }
.gs-meal b { color: var(--text); font-weight: 600; }
.gs-filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); margin-bottom: var(--space-3); }
.gs-search { grid-column: 1 / -1; }
.gs-list { padding-top: var(--space-1); padding-bottom: var(--space-1); }

.gs-table { width: 100%; border-collapse: collapse; font-size: var(--fs-control); }
.gs-table thead, .gs-col { display: none; }
.gs-table tr { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: center; gap: 2px var(--space-2); padding: var(--space-3) 0; border-top: 1px solid var(--border); }
.gs-table tbody tr:first-child { border-top: 0; }
.gs-table td { display: block; min-width: 0; padding: 0; }
.gs-table td.gs-col { display: none; }
.gs-name { grid-column: span 2; }
.gs-name-btn { display: block; padding: 0; border: 0; background: none; font-weight: 500; text-align: left; cursor: pointer; overflow-wrap: anywhere; }
.gs-house { display: block; font-size: var(--fs-xs); color: var(--muted); overflow-wrap: anywhere; }
.gs-rsvp { grid-column: span 2; justify-self: end; }
.gs-phone-meta { grid-column: 1 / -1; font-size: var(--fs-xs); color: var(--muted); overflow-wrap: anywhere; }
.gs-table td.gs-flag { display: flex; align-items: center; gap: 2px; font-size: var(--fs-xs); color: var(--muted); }
.gs-table td.gs-flag::after { content: attr(data-label); white-space: nowrap; }
.gs-flag .check-wrap { width: 22px; min-height: 28px; }

.rsvp-seg { display: inline-flex; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.rsvp-seg button { height: 28px; padding: 0 var(--space-3); border: 0; background: none; color: var(--muted); font-size: var(--fs-sm); cursor: pointer; }
.rsvp-seg button + button { border-left: 1px solid var(--border); }
.rsvp-seg .confirmed.on { background: var(--accent-soft); color: var(--accent-strong); font-weight: 600; }
.rsvp-seg .declined.on { background: var(--track); color: var(--text); font-weight: 600; }
.rsvp-seg .waiting.on { background: var(--gold-soft); color: var(--gold-text); font-weight: 600; }

.check-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); }
.file-input { padding: 5px var(--space-3); height: auto; font-size: var(--fs-control); }
.csv-preview { display: grid; gap: 2px; padding: var(--space-3) var(--space-4); border-radius: var(--radius); background: var(--accent-soft); font-size: var(--fs-sm); }
.csv-preview strong { font-size: var(--fs-control); font-weight: 600; }

@media (min-width: 768px) {
  .gs-tiles { grid-template-columns: repeat(7, minmax(0, 1fr)); }
  .gs-tile-wide { grid-column: auto; }
  .gs-filters { grid-template-columns: minmax(0, 1fr) 130px 130px 130px 190px; }
  .gs-search { grid-column: auto; }
  .gs-table thead { display: table-header-group; }
  .gs-table tr { display: table-row; padding: 0; border-top: 0; }
  .gs-table td, .gs-table td.gs-col, .gs-table th { display: table-cell; height: var(--row-h); padding: 2px var(--space-2); border-top: 1px solid var(--border); text-align: left; vertical-align: middle; }
  .gs-table th { height: 26px; border-top: 0; font-size: var(--fs-xs); font-weight: 500; color: var(--muted); white-space: nowrap; }
  .gs-table td:first-child, .gs-table th:first-child { padding-left: 0; }
  .gs-table td:last-child, .gs-table th:last-child { padding-right: 0; }
  .gs-table td.gs-col { font-size: var(--fs-sm); }
  .gs-table td.gs-contact { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .gs-table td.gs-plus { max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .gs-table td.gs-phone-meta { display: none; }
  .gs-table td.gs-flag { display: table-cell; text-align: center; }
  .gs-table td.gs-flag::after { content: none; }
  .gs-flag .check-wrap { width: auto; min-height: 0; }
  .gs-flag-head { text-align: center !important; }
  .rsvp-seg button { height: 24px; padding: 0 var(--space-2); }
  .check-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (hover: hover) and (min-width: 768px) {
  .gs-table tbody tr:hover td { background: var(--bg); }
}

@media (min-width: 768px) {
  .tl-tiles { grid-template-columns: repeat(8, minmax(0, 1fr)); }
  .tl-tile { grid-template-columns: minmax(0, 1fr) auto; gap: 3px var(--space-1); }
  .tl-filters { grid-template-columns: minmax(0, 1fr) 160px 140px; }
  .tl-search { grid-column: auto; }
  .tasks li { min-height: var(--row-h); }
  .tl-group-head .bar { width: 120px; }
  .owner-chip { max-width: 96px; }
  .cal-root { grid-template-columns: minmax(0, 1fr) 280px; align-items: start; }
  .cal-cell { align-items: stretch; height: 86px; padding: 3px; }
  .cal-num { align-self: flex-start; }
  .cal-chips { display: flex; flex-direction: column; gap: 1px; min-width: 0; text-align: left; }
  .cal-dots { display: none; }
}
