/* Wedding HQ — earthy glass theme */
:root {
  --bg: #f5f0e7;
  --ink: #2a231c;
  --muted: rgba(42, 35, 28, .66);
  --faint: rgba(42, 35, 28, .42);
  --glass: rgba(255, 253, 248, .62);
  --glass-2: rgba(255, 253, 248, .9);
  --glass-strong: rgba(255, 252, 246, .96);
  --field: rgba(255, 255, 255, .72);
  --line: rgba(42, 35, 28, .11);
  --line-2: rgba(42, 35, 28, .2);
  --ochre: #33402a;
  --ochre-ink: #fbf7f0;
  --terra: #b5663f;
  --terra-soft: rgba(181, 102, 63, .12);
  --sage: #5d7a3c;
  --sage-soft: rgba(93, 122, 60, .12);
  --clay: #9a5a3c;
  --warn: #b0432b;
  --radius: 14px;
  --radius-sm: 10px;
  --serif: "Instrument Serif", "Times New Roman", serif;
  --sans: "Newsreader", Georgia, serif;
  --blur: none; /* no frosted blur: it caused redraw lines when hovering */
  --grain: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='g'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .3  0 0 0 0 .24  0 0 0 0 .18  0 0 0 .07 0'/></filter><rect width='100%' height='100%' filter='url(%23g)'/></svg>");
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; color: var(--ink); font: 16.5px/1.5 var(--sans); overflow-x: hidden;
  background:
    radial-gradient(1000px 700px at 88% 0%, rgba(214, 140, 92, .16), transparent 62%),
    radial-gradient(900px 720px at 0% 100%, rgba(120, 150, 90, .16), transparent 60%),
    radial-gradient(700px 520px at 40% 30%, rgba(255, 255, 255, .55), transparent 65%),
    radial-gradient(640px 520px at 100% 80%, rgba(150, 170, 110, .10), transparent 65%),
    var(--bg);
  background-attachment: fixed;
}
/* Film grain */
body::before {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: .42; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .4  0 0 0 0 .33  0 0 0 0 .25  0 0 0 .28 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
h1, h2, h3 { margin: 0; font-family: var(--serif); font-weight: 400; letter-spacing: 0; }
h1 { font-size: clamp(2.3rem, 4.6vw, 3.4rem); line-height: 1.02; }
h2 { font-size: 1.8rem; }
h3 { font-size: 1.4rem; }
h1 em, h2 em, h3 em { font-family: var(--serif); font-weight: 400; font-style: italic; letter-spacing: 0; }
h1 em { font-size: 1em; color: var(--clay); }
a { color: var(--clay); }
.muted { color: var(--muted); }
.warn-text { color: var(--warn); }
:focus-visible { outline: 2px solid var(--ochre); outline-offset: 2px; }
::selection { background: rgba(93, 122, 60, 0.28); }

.glass, .card, .panel, .table-wrap, .tcard, .rail, dialog {
  background: var(--glass); border: 1px solid var(--line);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
}

/* Layout */
.shell { position: relative; z-index: 1; display: flex; gap: 22px; max-width: 1320px; margin: 0 auto; padding: 22px 22px 0; }
.content { position: relative; z-index: 1; flex: 1; min-width: 0; }
.rail {
  position: sticky; top: 22px; z-index: 40; align-self: flex-start; flex: none; width: 64px;
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 0; border-radius: 16px;
}
.rail-item {
  position: relative; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px;
  color: var(--muted); text-decoration: none; transition: background .15s, color .15s;
}
.rail-item svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.rail-item:hover { color: var(--ink); background: var(--glass-2); }
.rail-item[aria-current="page"] { color: var(--ochre-ink); background: var(--clay); }
.rail-item .lockdot { position: absolute; top: 7px; right: 7px; width: 7px; height: 7px; border-radius: 50%; background: var(--terra); box-shadow: 0 0 0 2px #fffaf2; }
.rail-label { display: none; }
.rail-sep { width: 26px; height: 1px; background: var(--line); margin: 6px 0; }
.rail-item .tip {
  position: absolute; left: 54px; top: 50%; transform: translate(-4px, -50%); white-space: nowrap; pointer-events: none;
  background: rgba(255, 252, 246, 0.95); border: 1px solid var(--line-2); color: var(--ink); font-size: .8rem; padding: 6px 11px; border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.35);
  opacity: 0; transition: .15s; -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); z-index: 5;
}
.rail-item:hover .tip, .rail-item:focus-visible .tip { opacity: 1; transform: translate(0, -50%); }

.top { display: flex; align-items: center; gap: 16px; padding: 4px 0 18px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-family: var(--serif); font-size: 1.5rem; font-weight: 400; }
.mark { display: none; }
.mark svg { width: 20px; height: 20px; fill: none; stroke: var(--ochre-ink); stroke-width: 2; }
.who { flex: 1; color: var(--muted); font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-actions { display: flex; align-items: center; gap: 8px; }

main { min-height: 60vh; padding-bottom: 28px; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px; margin: 12px 0 26px; }
.page-head p { margin: 8px 0 0; color: var(--muted); }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 18px; border-radius: 3px;
  border: 1px solid var(--line-2); background: var(--glass-2); color: var(--ink); font: 500 .9rem var(--sans);
  cursor: pointer; text-decoration: none; white-space: nowrap; transition: background .15s, border-color .15s, transform .1s;
}
.btn:hover { background: rgba(255, 253, 248, 0.95); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--ochre); border-color: transparent; color: var(--ochre-ink); }
.btn.primary:hover { background: #46553a; }
.btn.rose { background: var(--terra); border-color: transparent; color: #fbf7f0; }
.btn.rose:hover { background: #a3552f; }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--warn); }
.btn.sm { padding: 7px 14px; font-size: .82rem; }
.btn.block { display: flex; width: 100%; margin-top: 10px; }
.icon-btn { border: 0; background: none; color: var(--faint); cursor: pointer; font-size: 1.15rem; padding: 4px 9px; border-radius: 10px; line-height: 1; }
.icon-btn:hover { color: var(--warn); background: var(--terra-soft); }
.linkish { border: 0; background: none; padding: 0; color: var(--clay); font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-bottom: 16px; }
.card { border-radius: var(--radius); padding: 20px 22px; }
.card .label { font-size: .74rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.card .big { font-family: var(--serif); font-size: 2.8rem; font-weight: 400; letter-spacing: 0; line-height: 1.1; margin-top: 6px; font-variant-numeric: tabular-nums; }
.card .sub { color: var(--muted); font-size: .88rem; margin-top: 4px; }
.card.hero {
  background: var(--grain), linear-gradient(150deg, rgba(214, 140, 92, .16), rgba(255, 250, 242, .7) 55%, rgba(120, 150, 90, .12));
  border-color: rgba(181, 102, 63, 0.132);
}
.card.hero .big { font-size: 3.4rem; }
.panel { border-radius: var(--radius); padding: 22px; margin-bottom: 16px; }
.panel > h3 { margin-bottom: 14px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.bar { height: 7px; border-radius: 99px; background: rgba(255, 253, 248, 0.7); overflow: hidden; margin-top: 14px; }
.bar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--ochre), var(--clay)); border-radius: 99px; }
.bar.over > i { background: var(--warn); }

.cat-bars { display: grid; gap: 12px; }
.cat-row { display: grid; grid-template-columns: 130px 1fr auto; gap: 12px; align-items: center; font-size: .88rem; }
.cat-row .bar { margin: 0; }
.cat-row .bar > i.paid { background: var(--sage); }
.cat-row .amt { color: var(--muted); font-variant-numeric: tabular-nums; }

/* Overview */
.dash { display: grid; grid-template-columns: repeat(12, 1fr); gap: 16px; margin-bottom: 16px; }
.dash > .card, .dash > .panel { margin: 0; }
.span-3 { grid-column: span 3; } .span-4 { grid-column: span 4; } .span-5 { grid-column: span 5; } .span-6 { grid-column: span 6; }
.span-7 { grid-column: span 7; } .span-8 { grid-column: span 8; } .span-12 { grid-column: span 12; }
.countdown-card { display: flex; flex-direction: column; justify-content: space-between; min-height: 210px; }
.countdown-card .huge { font-family: var(--serif); font-size: clamp(4rem, 8vw, 6rem); font-weight: 400; letter-spacing: 0; line-height: .95; }
.countdown-card .huge em { font-family: var(--serif); font-weight: 400; font-style: italic; letter-spacing: 0; }
.faces { display: flex; align-items: center; margin: 4px 0 14px; }
.face {
  width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font-size: .82rem; font-weight: 600;
  color: #fbf7f0; border: 2px solid #fffaf2; margin-left: -10px;
}
.face:first-child { margin-left: 0; }
.face.more { background: var(--glass-2); color: var(--ink); }
.center { text-align: center; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.center .faces { justify-content: center; }

.upcoming { list-style: none; padding: 0; margin: 0; }
.upcoming li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); }
.upcoming li:first-child { border-top: 0; padding-top: 2px; }
.upcoming .what { min-width: 0; }
.upcoming .what small { display: block; color: var(--muted); font-size: .78rem; }
.when { flex: none; padding: 5px 12px; border-radius: 10px; background: rgba(42, 35, 28, 0.92); color: #fbf7f0; font-size: .8rem; font-weight: 500; white-space: nowrap; }
.when.late { background: var(--terra); color: #fbf7f0; }
.stat-list { display: grid; gap: 14px; }
.stat-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.stat-row b { font-size: 1.3rem; letter-spacing: -.02em; }

/* Forms */
.field { display: grid; gap: 6px; font-size: .8rem; color: var(--muted); margin-bottom: 14px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 0 16px; }
input, select, textarea {
  font: inherit; color: var(--ink); background: var(--field); border: 1px solid var(--line); border-radius: 12px;
  padding: 10px 12px; width: 100%; min-width: 0; transition: border-color .15s, background .15s;
}
input::placeholder, textarea::placeholder { color: var(--faint); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ochre); background: rgba(255, 255, 255, 0.75); }
select option { background: #fffaf2; color: var(--ink); }
input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--ochre); padding: 0; }
textarea { resize: vertical; min-height: 90px; }
.add-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.add-row input, .add-row select { flex: 1 1 170px; width: auto; }

/* Tables */
.table-wrap { overflow-x: auto; border-radius: var(--radius); }
table.grid { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.grid th { text-align: left; font-weight: 500; font-size: .7rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); padding: 14px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.grid td { padding: 4px 6px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.grid tr:last-child td { border-bottom: 0; }
table.grid tbody tr:hover td { background: rgba(255, 253, 248, 0.21); }
table.grid td input, table.grid td select { border-color: transparent; background: transparent; padding: 8px; border-radius: 10px; }
table.grid td input:hover, table.grid td select:hover { border-color: var(--line); }
table.grid td input:focus, table.grid td select:focus { background: var(--field); border-color: var(--ochre); }
table.grid .num { text-align: right; font-variant-numeric: tabular-nums; }
table.grid td.num input { text-align: right; }
table.grid .narrow { width: 46px; text-align: center; }
table.grid tfoot td { font-weight: 600; padding: 14px 12px; border-top: 1px solid var(--line-2); }
tr.done td input[data-f="title"] { text-decoration: line-through; color: var(--faint); }
tr.late input[data-f="due"] { color: var(--warn); }
.empty { padding: 34px; text-align: center; color: var(--muted); }
.pill { display: inline-block; padding: 3px 11px; border-radius: 99px; font-size: .78rem; background: var(--glass-2); color: var(--muted); }

.filters { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.chip-btn { border: 1px solid var(--line); background: var(--glass); color: var(--muted); padding: 6px 14px; border-radius: 99px; font: 500 .82rem var(--sans); cursor: pointer; }
.chip-btn:hover { color: var(--ink); }
.chip-btn[aria-pressed="true"] { background: var(--clay); color: #fbf7f0; border-color: transparent; }

/* Seating */
.seating { display: grid; grid-template-columns: 270px 1fr; gap: 16px; align-items: start; }
.pool { position: sticky; top: 22px; max-height: calc(100vh - 44px); overflow: auto; }
.tables { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.tcard { border-radius: 12px; padding: 14px; min-height: 150px; transition: border-color .15s, background .15s; }
.tcard.over { border-color: rgba(176, 67, 43, 0.6); }
.drop.hover, .drop.target { border-color: rgba(93, 122, 60, 0.56); background: rgba(93, 122, 60, 0.08); }
.tcard-head { display: flex; gap: 6px; align-items: center; margin-bottom: 8px; }
.tcard-head input[data-f="name"] { font-family: var(--serif); font-style: italic; font-size: 1.35rem; border-color: transparent; background: transparent; padding: 2px 6px; }
.tcard-head input[data-f="seats"] { width: 60px; padding: 6px; text-align: center; }
.cap { font-size: .76rem; color: var(--muted); margin: 0 6px 8px; }
.tcard.over .cap { color: var(--warn); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; min-height: 30px; }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 6px 12px; border-radius: 99px; background: var(--glass-2); border: 1px solid var(--line); font-size: .84rem; cursor: grab; user-select: none; -webkit-user-select: none; }
.chip.pending { border-style: dashed; border-color: var(--line-2); }
.chip.selected { background: var(--ochre); color: var(--ochre-ink); border-color: transparent; }
.chip .diet { font-size: .7rem; color: var(--sage); }
.chip.selected .diet { color: inherit; }
.chip button { border: 0; background: none; color: inherit; opacity: .6; cursor: pointer; padding: 0 0 0 2px; font-size: 1rem; line-height: 1; }
.hint { font-size: .8rem; color: var(--muted); margin: 0 0 12px; }

/* Locked + welcome */
.locked { text-align: center; padding: 56px 22px; }
.locked h2 { margin-bottom: 10px; }
.locked p { max-width: 470px; margin: 0 auto 22px; color: var(--muted); }
.welcome { background: var(--grain), linear-gradient(135deg, rgba(93, 122, 60, 0.22), rgba(255, 253, 248, 0.35)); border-color: rgba(93, 122, 60, 0.3); }
.welcome h2 { margin-bottom: 6px; }

/* Dialogs */
dialog { border-radius: 14px; padding: 0; color: var(--ink); width: min(450px, calc(100vw - 32px)); background: rgba(255, 252, 246, 0.95); box-shadow: 0 30px 80px rgba(60, 40, 20, 0.2); }
dialog::backdrop { background: rgba(42, 35, 28, 0.25);  }
.dlg { padding: 26px; position: relative; }
.dlg h2 { margin-bottom: 6px; padding-right: 30px; }
.dlg .x { position: absolute; top: 16px; right: 16px; border: 0; background: var(--glass-2); width: 32px; height: 32px; border-radius: 50%; font-size: 1.2rem; color: var(--muted); cursor: pointer; }
.ticks { padding: 0; list-style: none; margin: 16px 0 18px; }
.ticks li { padding: 5px 0 5px 28px; position: relative; }
.ticks li::before { content: "✓"; position: absolute; left: 4px; color: var(--ochre); font-weight: 600; }
.divider { display: flex; align-items: center; gap: 10px; margin: 20px 0 12px; color: var(--muted); font-size: .78rem; }
.divider::before, .divider::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.dlg-msg { min-height: 1.4em; margin: 10px 0 0; font-size: .88rem; color: var(--warn); }
.dlg-msg.ok { color: var(--sage); }

.badge { font-size: .78rem; color: var(--sage); background: var(--sage-soft); padding: 6px 12px; border-radius: 99px; white-space: nowrap; border: 1px solid rgba(93, 122, 60, 0.25); }
.sync { font-size: .78rem; color: var(--muted); white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.sync::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--sage); box-shadow: 0 0 10px var(--sage); }
.sync[data-s="saving"]::before { background: var(--clay); box-shadow: none; }
.sync[data-s="offline"]::before, .sync[data-s="error"]::before { background: var(--warn); box-shadow: 0 0 10px var(--warn); }
.people { list-style: none; padding: 0; margin: 0; font-size: .9rem; }
.people li { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 9px 0; border-top: 1px solid var(--line); }
.people li:first-child { border-top: 0; }
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 30; transform: translate(-50%, 20px); background: var(--ink); color: #fbf7f0; padding: 11px 20px; border-radius: 99px; font-size: .9rem; font-weight: 500; opacity: 0; pointer-events: none; transition: .2s; max-width: calc(100vw - 32px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.foot { color: var(--faint); font-size: .8rem; padding: 8px 0 34px; text-align: center; }

/* ---------- Hubs: sub-tabs ---------- */
.subtabs { display: flex; gap: 4px; padding: 5px; margin: 4px 0 22px; width: max-content; max-width: 100%; overflow-x: auto; scrollbar-width: none; border-radius: 10px; background: var(--glass); border: 1px solid var(--line); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); }
.subtabs::-webkit-scrollbar { display: none; }
.subtab { position: relative; flex: none; display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 7px; color: var(--muted); text-decoration: none; font-size: .98rem; font-weight: 400; transition: background .15s, color .15s; }
.subtab svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.subtab:hover { color: var(--ink); background: var(--glass-2); }
.subtab[aria-current="page"] { background: var(--clay); color: #fbf7f0; }
.subtab .lockdot { width: 6px; height: 6px; border-radius: 50%; background: var(--terra); }
.rail-settings { margin-top: 2px; }

/* ---------- Home: planner tiles (chic boxes) ---------- */
.planner-map .tile-group { margin-top: 26px; }
.tile-group-label { display: flex; align-items: center; gap: 14px; font-size: .72rem; text-transform: uppercase; letter-spacing: .24em; color: var(--muted); margin-bottom: 12px; }
.tile-group-label::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.tile {
  position: relative; display: flex; flex-direction: column; justify-content: flex-end; min-height: 118px; padding: 18px 20px 16px;
  border-radius: 4px; text-decoration: none; color: var(--ink); border: 1px solid var(--line);
  background: var(--grain), linear-gradient(180deg, rgba(255, 253, 248, 0.315), rgba(255, 253, 248, 0.084));
  transition: border-color .25s, background-color .25s, transform .25s;
}
.tile::before { content: ""; position: absolute; left: 20px; right: 20px; top: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(181, 102, 63, 0.21), transparent); opacity: 0; transition: opacity .25s; }
.tile::after { content: "→"; position: absolute; right: 18px; bottom: 15px; font-size: 1rem; color: var(--clay); opacity: 0; transform: translateX(-6px); transition: opacity .25s, transform .25s; }
.tile:hover { border-color: rgba(181, 102, 63, 0.192); background-color: rgba(255, 253, 248, 0.245); transform: translateY(-2px); }
.tile:hover::before { opacity: 1; }
.tile:hover::after { opacity: 1; transform: none; }
.tile-icon { position: absolute; top: 16px; right: 16px; display: block; width: 18px; height: 18px; background: none; color: var(--faint); }
.tile-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }
.tile-text { min-width: 0; display: grid; gap: 3px; padding-right: 22px; }
.tile-text b { font: 400 1.6rem/1.05 var(--serif); letter-spacing: 0; }
.tile-text small { color: var(--muted); font-style: italic; font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile .lockdot { position: absolute; top: 20px; left: 20px; width: 6px; height: 6px; border-radius: 50%; background: var(--terra); }

/* ---------- Lists ---------- */
.small { font-size: .82rem; }
.ok-text { color: var(--sage); }
.count { display: inline-grid; place-items: center; min-width: 24px; height: 22px; padding: 0 7px; margin-left: 6px; border-radius: 99px; background: var(--glass-2); color: var(--muted); font-size: .74rem; font-weight: 500; vertical-align: 2px; letter-spacing: 0; }
.list-group { padding: 18px 18px 14px; }
.group-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.group-head h3 { margin: 0; }
.table-wrap.flat { background: none !important; border: 0; border-radius: 0; -webkit-backdrop-filter: none; backdrop-filter: none; margin: 0 -6px; }
.table-wrap.flat table.grid th { padding-top: 8px; }
.empty-line { margin: 6px 0 4px; }
.add-inline { margin-top: 8px; color: var(--clay); border-color: transparent; padding-left: 8px; }
.add-inline:hover { background: var(--glass-2); }
.new-group { max-width: 520px; }
.totals { display: flex; gap: 22px; flex-wrap: wrap; justify-content: flex-end; padding: 12px 8px 2px; border-top: 1px solid var(--line-2); margin-top: 4px; color: var(--muted); font-size: .88rem; }
.totals b { color: var(--ink); margin-left: 6px; }
.filter-bar { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px 16px; }
tr.chosen td { background: rgba(93, 122, 60, 0.056); }
tr.done-row input:not([type=checkbox]) { color: var(--faint); text-decoration: line-through; }
.name-cell { padding: 10px 12px !important; white-space: nowrap; font-weight: 500; }
select.stars { color: var(--ochre); letter-spacing: 1px; min-width: 118px; }
.imgcell { display: flex; align-items: center; gap: 8px; min-width: 170px; }
.imgcell img, .noimg { flex: none; width: 38px; height: 38px; border-radius: 10px; object-fit: cover; background: var(--glass-2); border: 1px solid var(--line); }
.diet-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.diet-list .pill b { color: var(--ink); margin-left: 4px; }
.empty-state { text-align: center; padding: 44px 22px; }
.empty-state p { max-width: 460px; margin: 8px auto 18px; }
.locked-icon { display: grid; place-items: center; width: 54px; height: 54px; margin: 0 auto 14px; border-radius: 18px; background: rgba(93, 122, 60, 0.128); color: var(--ochre); }
.locked-icon svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.upcoming a.what { color: var(--ink); text-decoration: none; }
.upcoming a.what:hover { color: var(--clay); }
.when.pay { background: var(--sage); color: #fbf7f0; }
.when.event, .when.wedding { background: var(--ochre); color: var(--ochre-ink); }
.when.task { background: rgba(42, 35, 28, 0.92); }

/* ---------- Calendar ---------- */
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.cal-head h2 { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 2rem; letter-spacing: 0; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 14px; font-size: .78rem; color: var(--muted); }
.legend span::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.legend .k-task::before, .cal-item.k-task { background: rgba(42, 35, 28, 0.85); }
.legend .k-late::before, .cal-item.k-late { background: var(--terra); }
.legend .k-pay::before, .cal-item.k-pay { background: var(--sage); }
.legend .k-event::before, .cal-item.k-event { background: var(--clay); }
.legend .k-wedding::before, .cal-item.k-wedding { background: var(--ochre); }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal-dow { font-size: .7rem; text-transform: uppercase; letter-spacing: .12em; color: var(--faint); padding: 0 6px 4px; }
.cal-day { min-height: 104px; padding: 7px; border-radius: 14px; background: rgba(255, 253, 248, 0.28); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cal-day.blank { background: none; border-color: transparent; }
.cal-day .d { font-size: .8rem; color: var(--muted); margin-bottom: 2px; }
.cal-day.today { border-color: var(--ochre); }
.cal-day.today .d { color: var(--ochre); font-weight: 600; }
.cal-day.wedding { background: rgba(93, 122, 60, 0.112); border-color: rgba(93, 122, 60, 0.44); }
.cal-item { display: block; font-size: .72rem; line-height: 1.3; padding: 3px 7px; border-radius: 7px; color: #fbf7f0; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-more { font-size: .7rem; color: var(--muted); padding-left: 4px; }
.agenda { display: none; margin-top: 8px !important; }

/* ---------- Events ---------- */
.event-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; margin-bottom: 16px; }
.event-card { display: flex; flex-direction: column; gap: 12px; }
.event-name { font-family: var(--serif); font-style: italic; font-size: 1.7rem; background: transparent; border-color: transparent; padding: 2px 6px; margin-left: -6px; }
.form-grid.tight { grid-template-columns: 1fr 1fr; gap: 0 12px; }
.form-grid.tight .field { margin-bottom: 8px; }
.field.wide { grid-column: 1 / -1; }
.event-stats { display: flex; gap: 18px; font-size: .86rem; color: var(--muted); }
.event-stats b { color: var(--ink); font-size: 1.05rem; }

/* ---------- Venues ---------- */
.compare { overflow-x: auto; }
.compare-table { min-width: max-content; }
.compare-table .field-col { position: sticky; left: 0; z-index: 1; min-width: 170px; text-align: left; font-weight: 500; font-size: .84rem; color: var(--muted); padding: 8px 14px; background: rgba(255, 252, 246, 0.95); text-transform: none; letter-spacing: 0; }
.compare-table td { min-width: 200px; }
.venue-col { min-width: 220px; vertical-align: top; text-transform: none !important; letter-spacing: 0 !important; padding: 14px 10px !important; }
.venue-col.chosen { background: rgba(93, 122, 60, 0.112); box-shadow: inset 0 3px 0 var(--ochre); }
.venue-name { font-family: var(--serif); font-style: italic; font-size: 1.4rem; color: var(--ink); background: transparent; border-color: transparent; padding: 2px 6px; }
.venue-actions { display: flex; align-items: center; gap: 6px; margin-top: 8px; }
.section-row td { padding: 16px 14px 6px !important; font-size: .7rem; text-transform: uppercase; letter-spacing: .14em; color: var(--ochre); background: none !important; position: sticky; left: 0; }

/* ---------- Menu ---------- */
.menu-card { text-align: center; padding: 34px 24px; background: var(--grain), linear-gradient(160deg, rgba(181, 102, 63, 0.084), rgba(255, 253, 248, 0.28)); }
.menu-title { font-family: var(--serif); font-size: 2.4rem; margin-bottom: 18px; }
.menu-title em { font-style: italic; }
.menu-course { margin: 18px 0; }
.menu-course .label { font-size: .7rem; text-transform: uppercase; letter-spacing: .18em; color: var(--ochre); margin-bottom: 6px; }
.menu-dish { font-family: var(--serif); font-size: 1.35rem; margin: 6px 0; }
.menu-dish small { display: block; font-family: var(--sans); font-size: .82rem; color: var(--muted); }
.menu-dish .pill { font-family: var(--sans); font-size: .7rem; margin-left: 6px; vertical-align: 3px; }

/* ---------- Mood board ---------- */
.palette { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.swatch { display: grid; gap: 6px; font-size: .76rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; cursor: pointer; }
.swatch input[type=color] { width: 100%; height: 64px; padding: 0; border: 1px solid var(--line-2); border-radius: 16px; background: none; cursor: pointer; }
.swatch input[type=color]::-webkit-color-swatch-wrapper { padding: 0; }
.swatch input[type=color]::-webkit-color-swatch { border: 0; border-radius: 15px; }
.mood-grid { columns: 4 200px; column-gap: 12px; }
.mood-tile { position: relative; margin: 0 0 12px; break-inside: avoid; border-radius: 18px; overflow: hidden; border: 1px solid var(--line); background: var(--glass-2); }
.mood-tile img { display: block; width: 100%; min-height: 80px; object-fit: cover; }
.mood-tile figcaption { padding: 8px 12px; font-size: .82rem; color: var(--muted); }
.mood-tile .icon-btn { position: absolute; top: 8px; right: 8px; background: rgba(255, 252, 246, 0.9); color: var(--ink); opacity: 0; transition: opacity .15s; }
.mood-tile:hover .icon-btn, .mood-tile .icon-btn:focus-visible { opacity: 1; }

/* ---------- Vendors by type ---------- */
.type-grid { display: grid; gap: 2px; }
.type-row { display: grid; grid-template-columns: 180px 110px 1fr; gap: 12px; padding: 10px 2px; border-top: 1px solid var(--line); font-size: .9rem; }
.type-row:first-child { border-top: 0; }

/* ---------- Settings ---------- */
.settings-lists { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 26px; }
.opt-block h3 { margin-bottom: 4px; }
.opt-block p { margin: 0 0 10px; }
.optlist { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 10px; }
.opt { display: inline-flex; align-items: center; gap: 4px; padding: 5px 6px 5px 12px; border-radius: 99px; background: var(--glass-2); border: 1px solid var(--line); font-size: .84rem; }
.opt button { border: 0; background: none; color: var(--faint); cursor: pointer; font-size: 1rem; padding: 0 4px; border-radius: 50%; }
.opt button:hover { color: var(--warn); }
.opt-add { display: inline-flex; gap: 6px; }
.opt-add input { width: 120px; padding: 6px 12px; border-radius: 99px; font-size: .84rem; }

/* ---------- Seating floor plans ---------- */
.tables { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.tcard-head select { width: auto; flex: none; padding: 6px 8px; font-size: .88rem; }
.plan { display: block; width: 100%; height: auto; margin: 4px auto 6px; overflow: visible; }
.plan .tbl { fill: rgba(93, 122, 60, .08); stroke: rgba(42, 35, 28, .3); stroke-width: 1.2; }
.plan .tbl-label { fill: var(--faint); font: italic 400 15px var(--serif); text-anchor: middle; pointer-events: none; }
.chair { cursor: pointer; outline: none; }
.chair circle { fill: transparent; stroke: var(--line-2); stroke-width: 1.3; stroke-dasharray: 3 3; transition: fill .15s, stroke .15s; }
.chair text { fill: var(--faint); font: 500 10.5px var(--sans); text-anchor: middle; pointer-events: none; }
.chair.taken circle { fill: var(--clay); stroke: var(--clay); stroke-dasharray: none; }
.chair.taken text { fill: #fbf7f0; font-weight: 600; }
.chair.taken.pending circle { fill: rgba(181, 102, 63, 0.33); }
.chair.diet circle { stroke: var(--sage); stroke-width: 3; }
.chair.sel circle { fill: var(--sage); stroke: var(--sage); }
.chair:hover circle, .chair:focus-visible circle, .chair.over circle { stroke: var(--ochre); stroke-dasharray: none; stroke-width: 2; }
.tcard.target .chair:not(.taken) circle { stroke: var(--sage); stroke-dasharray: none; animation: chairpulse 1.6s ease-in-out infinite; }
@keyframes chairpulse { 50% { fill: rgba(93, 122, 60, 0.22); } }
.steps { display: flex; flex-wrap: wrap; gap: 6px 14px; justify-content: center; padding-top: 8px; border-top: 1px solid var(--line); }
.step { display: inline-flex; align-items: center; gap: 6px; font-size: .86rem; color: var(--muted); }
.step button { width: 24px; height: 24px; border-radius: 3px; border: 1px solid var(--line-2); background: var(--glass-2); color: var(--ink); cursor: pointer; font: 500 .95rem/1 var(--sans); }
.step button:hover { background: var(--clay); color: #fbf7f0; }
.step b { min-width: 16px; text-align: center; color: var(--ink); }
.waiting { margin-top: 10px; padding: 8px 10px; border-radius: 8px; background: var(--terra-soft); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.seat-list { margin-top: 10px; }
.seat-list summary { cursor: pointer; font-size: .86rem; color: var(--muted); margin-bottom: 8px; }
.seat-hint { margin: -8px 0 14px; padding: 10px 14px; border-radius: 8px; background: var(--sage-soft); border: 1px solid rgba(93, 122, 60, 0.3); }
@media print {
  .plan .tbl { fill: #f3f0ea; stroke: #888; }
  .chair circle { fill: #fff !important; stroke: #555 !important; }
  .chair text, .plan .tbl-label { fill: #111 !important; }
  .steps, .seat-list summary, .seat-hint { display: none; }
  .seat-list .chips { display: block; }
}

/* ---------- Import ---------- */
.import-invite {
  display: flex; align-items: center; gap: 18px; margin-bottom: 16px; padding: 20px 24px; border-radius: var(--radius);
  text-decoration: none; color: var(--ink); border: 1px solid rgba(181, 102, 63, .28);
  background: var(--grain), linear-gradient(120deg, rgba(214, 140, 92, .14), rgba(255, 250, 242, .75) 55%, rgba(120, 150, 90, .12));
  transition: border-color .2s, transform .2s;
}
.import-invite:hover { border-color: var(--clay); transform: translateY(-1px); }
.ii-icon { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(181, 102, 63, .35); color: var(--clay); }
.ii-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.ii-text { flex: 1; display: grid; gap: 2px; }
.ii-text b { font: 400 1.45rem/1.15 var(--serif); }
.ii-text span { color: var(--muted); font-size: .98rem; }
.ii-cta { flex: none; font-style: italic; color: var(--clay); border-bottom: 1px solid currentColor; }
.imp-drop { display: grid; place-items: center; gap: 6px; text-align: center; padding: 46px 20px; border: 1.5px dashed var(--line-2); border-radius: var(--radius); cursor: pointer; transition: border-color .2s, background .2s; }
.imp-drop:hover, .imp-drop.hover { border-color: var(--clay); background: rgba(181, 102, 63, .05); }
.imp-title { font: 400 1.6rem var(--serif); }
.imp-title u { text-decoration-color: var(--clay); text-underline-offset: 4px; }
.imp-help { margin-top: 14px; }
.imp-help summary { cursor: pointer; color: var(--muted); font-size: .92rem; }
.imp-sheet.skipped { opacity: .62; }
.imp-sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 10px; }
.imp-dest { display: inline-flex; align-items: center; gap: 8px; font-size: .95rem; color: var(--muted); }
.imp-dest select { width: auto; }
.imp-map th { vertical-align: top; text-transform: none; letter-spacing: 0; font-size: .82rem; min-width: 150px; }
.imp-col { display: block; margin-bottom: 6px; color: var(--ink); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 200px; }
.imp-map th select { font-size: .85rem; padding: 6px 8px; }
.imp-map td { padding: 8px 10px !important; color: var(--ink); font-size: .9rem; white-space: nowrap; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.imp-map td.faded { color: var(--faint); }
.imp-actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 6px 0 18px; }
.imp-review { margin-bottom: 18px; }
.imp-review-head { margin: 6px 0 16px; }
.imp-review-head h2 { font-size: 2rem; }
.imp-review-head h2 em { color: var(--clay); }
.imp-review-head p { margin: 6px 0 0; }
.imp-find { display: flex; gap: 16px; padding: 20px 22px; margin-bottom: 10px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--grain), var(--glass); transition: opacity .2s, border-color .2s; }
.imp-find:hover { border-color: var(--line-2); }
.imp-find.off { opacity: .5; }
.imp-check { padding-top: 6px; }
.imp-check input { width: 20px; height: 20px; }
.imp-find-body { flex: 1; min-width: 0; }
.imp-find-title { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.imp-find-title h3 { font-size: 1.6rem; }
.imp-from { font-size: .85rem; font-style: italic; color: var(--faint); }
.imp-line { margin: 4px 0 8px; font-size: 1.05rem; }
.imp-samples { list-style: none; margin: 0 0 10px; padding: 0; border-left: 2px solid rgba(181, 102, 63, .35); }
.imp-samples li { padding: 3px 0 3px 14px; color: var(--muted); font-style: italic; font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.imp-adjust { margin-top: 12px; padding: 14px 16px; border-radius: 10px; background: rgba(255, 255, 255, .55); border: 1px solid var(--line); display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px 18px; }
.imp-adjust-row { display: grid; grid-template-columns: 130px 1fr; align-items: center; gap: 10px; font-size: .9rem; color: var(--muted); }
.imp-adjust-row select { padding: 6px 8px; font-size: .9rem; }
.imp-skipped { margin: 6px 0 14px; }
.imp-paste summary { cursor: pointer; list-style: none; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.imp-paste summary::-webkit-details-marker { display: none; }
.imp-paste[open] summary { margin-bottom: 12px; }
.import-done { border-color: rgba(93, 122, 60, .35); background: var(--grain), rgba(93, 122, 60, .06); }
@media (max-width: 760px) { .import-invite { flex-wrap: wrap; padding: 18px; } .ii-cta { margin-left: 62px; } }

/* ---------- Online RSVPs ---------- */
.notice { border-color: rgba(93, 122, 60, 0.36); background: var(--grain), rgba(93, 122, 60, 0.08); }
.notice h3 { margin-bottom: 6px; }
.rsvp-table .send-cell { white-space: nowrap; }
.rsvp-table .send-cell .btn { margin: 2px 2px 2px 0; }
.status-cell small { font-size: .78rem; }
.diet-note { display: block; font-weight: 400; font-size: .76rem; }
.pill.yes { background: var(--sage-soft); color: var(--sage); }
.pill.no { background: var(--terra-soft); color: var(--terra); }
.notes { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.guest-note { margin: 0; padding: 16px 18px; border-radius: 18px; background: rgba(255, 253, 248, 0.35); border: 1px solid var(--line); }
.guest-note p { margin: 0 0 8px; font-family: var(--serif); font-style: italic; font-size: 1.15rem; line-height: 1.4; }
.guest-note cite { font-style: normal; font-size: .8rem; color: var(--muted); }

/* Grain on every surface */
.card, .panel, .table-wrap:not(.flat), .tcard, .rail, dialog, .subtabs, .tile, .btn, .chip-btn, .chip, .badge, .mood-tile { background-image: var(--grain); }
.btn.primary, .btn.rose, .btn.primary:hover, .btn.rose:hover, .chip-btn[aria-pressed="true"], .subtab[aria-current="page"], .rail-item[aria-current="page"] { background-image: var(--grain); }
.card.hero, .welcome, .menu-card { background-blend-mode: normal; }

/* Tablet & phone */
@media (max-width: 960px) {
  .span-3, .span-4, .span-5, .span-6, .span-7, .span-8 { grid-column: span 12; }
  .seating { grid-template-columns: 1fr; }
  .pool { position: static; max-height: 280px; }
  .type-row { grid-template-columns: 1fr auto; }
  .type-row span:last-child { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .shell { display: block; padding: 14px 16px 0; }
  .rail {
    position: fixed; z-index: 20; top: auto; left: 12px; right: 12px; bottom: 12px; width: auto;
    flex-direction: row; justify-content: space-around; padding: 6px; border-radius: 22px; background: rgba(255, 252, 246, 0.95);
  }
  .rail-sep, .rail-item .tip { display: none; }
  .rail-item { width: auto; flex: 1; height: 50px; border-radius: 16px; gap: 2px; align-content: center; }
  .rail-item svg { width: 19px; height: 19px; }
  .rail-label { display: block; font-size: .6rem; letter-spacing: .01em; }
  .rail-item .lockdot { top: 6px; right: calc(50% - 16px); }
  .content { padding-bottom: 88px; }
  .who { display: none; }
  .top { justify-content: space-between; padding-bottom: 8px; }
  .card { padding: 18px; }
  .cat-row { grid-template-columns: 90px 1fr auto; }
  .sync { font-size: 0; gap: 0; }
  .toast { bottom: 92px; }
  .rail-item { min-width: 0; }
  .rail-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  .cal-grid, .cal-head + .legend { display: none; }
  .agenda { display: block; }
  .form-grid.tight { grid-template-columns: 1fr; }
  .palette { grid-template-columns: repeat(3, 1fr); }
  .settings-lists { grid-template-columns: 1fr; }
  .subtab { padding: 8px 12px; }
  .subtab svg { display: none; }
}

/* Print: clean and light */
@media print {
  :root { --ink: #111; --muted: #555; --faint: #777; --line: #ccc; --glass: #fff; --glass-2: #fff; --field: #fff; color-scheme: light; }
  body { background: #fff; font-size: 11pt; }
  body::before, .rail, .top, .foot, .page-actions, .add-row, .filters, .icon-btn, .hint, .pool, .toast, .welcome { display: none !important; }
  .shell { display: block; padding: 0; }
  .card, .panel, .table-wrap, .tcard { backdrop-filter: none; -webkit-backdrop-filter: none; border-color: #ccc; break-inside: avoid; }
  .card.hero { background: #fff; }
  .tables { grid-template-columns: repeat(3, 1fr); }
  tr { break-inside: avoid; }
  .table-wrap { overflow: visible; }
  input, select, textarea { border: 0 !important; background: none !important; padding: 2px !important; appearance: none; -webkit-appearance: none; color: #111; }
  .chip { border: 0; background: none; padding: 1px 0; display: block; }
  .chip button { display: none; }
}
