/* WeddingCMS – "Everé" dark & gold theme (matches the landing portal mock-up), tuned for readability:
   16px body, high-contrast ivory text, sentence-case labels, generous rows.
   Shared utility classes (unchanged API):
   .card .grid .stats/.stat .table .badge(-success|-danger|-muted|-warning|-info)
   .btn(-primary|-danger|-small) .btn-link .form-grid .toolbar .inline .muted
   Charts: .viz-* (see src/charts.php). */


:root {
    color-scheme: dark;

    /* Surfaces */
    --bg:         #0E0C0A;
    --surface:    #171512;   /* cards, chart surface */
    --surface-2:  #1F1C18;   /* inputs, hover rows */
    --surface-3:  #29251F;   /* chart tracks, pressed */
    --line:       rgba(200, 169, 106, .26);
    --line-soft:  rgba(200, 169, 106, .13);

    /* Text (all ≥ 4.5:1 on --surface) */
    --text:       #F2EBDD;
    --text-2:     #C9BFAE;
    --muted:      #A0968A;

    /* Brand */
    --gold:       #C8A96A;
    --gold-light: #E6D3A3;
    --gold-deep:  #9C7F45;
    --rose:       #E58A9B;   /* text-safe rose for "danger" */
    --amber:      #E3B868;

    /* Data series – validated (dark surface #171512): CVD ΔE ≥ 8.6 adjacent, normal ΔE ≥ 15.8 */
    --series-1:   #B08A2C;   /* gold  – attending / paid / main series */
    --series-2:   #D45F7A;   /* rose  – declined / outstanding */
    --series-3:   #4F8FE6;   /* blue */
    --series-4:   #23A38C;   /* teal */
    --series-5:   #A979E6;   /* violet */
    --series-none:#5A5246;   /* neutral remainder – pending / unassigned */

    --serif: "Cormorant Garamond", Garamond, "Times New Roman", serif;
    --sans:  "Jost", "Avenir Next", "Helvetica Neue", Arial, sans-serif;
    --radius: 3px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font: 400 16px/1.55 var(--sans);
    color: var(--text);
    background: var(--bg);
    background-image: radial-gradient(1200px 600px at 80% -10%, rgba(200, 169, 106, .06), transparent 60%);
    background-attachment: fixed;
    font-variant-numeric: tabular-nums;
}
a { color: var(--gold-light); text-decoration-color: rgba(230, 211, 163, .4); text-underline-offset: 3px; }
a:hover { color: #fff; text-decoration-color: currentColor; }
strong, b { font-weight: 500; color: #fff; }
::selection { background: rgba(200, 169, 106, .35); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

h1, h2, h3 { font-weight: 400; color: var(--text); }
h1 { font-family: var(--serif); font-size: clamp(2rem, 4vw, 2.6rem); line-height: 1.1; margin: 0 0 1.25rem; letter-spacing: .005em; }
h2 { font-family: var(--serif); font-size: 1.6rem; line-height: 1.2; margin: 2rem 0 .9rem; }
h3 { font-size: .82rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); margin: 1.25rem 0 .75rem; }
.card > h3:first-child, .card > h2:first-child { margin-top: 0; }
p { margin: 0 0 1rem; }
hr { border: 0; border-top: 1px solid var(--line-soft); margin: 1.5rem 0; }

/* ---------- Top bar ---------- */
.topbar {
    position: sticky; top: 0; z-index: 50;
    display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.5rem;
    padding: .7rem clamp(1rem, 3vw, 2rem);
    background: rgba(14, 12, 10, .92); backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line);
}
.topbar a { color: var(--text-2); text-decoration: none; }
.topbar .brand { font-family: var(--serif); font-size: 1.45rem; line-height: 1; color: var(--gold-light); letter-spacing: .02em; }
.topbar .wedding-name { font-family: var(--serif); font-style: italic; font-size: 1.15rem; color: var(--text); padding-left: 1.1rem; border-left: 1px solid var(--line); }
.mainnav { display: flex; flex-wrap: wrap; gap: .15rem; flex: 1; }
.mainnav a { padding: .45rem .75rem; font-size: .95rem; border-bottom: 1px solid transparent; transition: color .15s, border-color .15s; }
.mainnav a:hover { color: var(--text); }
.mainnav a.active { color: var(--gold-light); border-bottom-color: var(--gold); }
.mainnav .admin-link { color: var(--muted); }
.usermenu { display: flex; gap: 1rem; align-items: center; font-size: .95rem; }
.usermenu .btn-link { color: var(--muted); text-decoration: none; }
.usermenu .btn-link:hover { color: var(--text); }

.container { max-width: 1320px; margin: 0 auto; padding: clamp(1.25rem, 3vw, 2.25rem) clamp(1rem, 3vw, 2rem) 4rem; }

/* Page header: eyebrow + serif title */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.page-head h1 { margin: 0; }
.eyebrow { display: block; font-size: .8rem; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); margin-top: .35rem; }

/* ---------- Flash ---------- */
.flash { padding: .8rem 1rem; margin-bottom: 1.25rem; border: 1px solid; border-left-width: 3px; background: var(--surface); border-radius: var(--radius); }
.flash-success { border-color: rgba(200, 169, 106, .4); border-left-color: var(--gold); color: var(--gold-light); }
.flash-error   { border-color: rgba(229, 138, 155, .4); border-left-color: var(--rose); color: #F4C3CC; }
.flash-info    { border-color: rgba(79, 143, 230, .4); border-left-color: var(--series-3); color: #C6DBFA; }

/* ---------- Cards / grid / stats ---------- */
.card {
    position: relative;
    background: linear-gradient(180deg, rgba(255, 255, 255, .012), transparent 40%), var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: clamp(1rem, 2vw, 1.5rem);
    margin-bottom: 1.25rem;
}
.grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); margin-bottom: 1.25rem; }
.grid > .card { margin-bottom: 0; }
.stats { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); margin-bottom: 1.25rem; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.15rem; }
.stat .value { font-family: var(--serif); font-size: 2.3rem; font-weight: 400; line-height: 1.05; color: var(--gold-light); font-variant-numeric: lining-nums tabular-nums; }
.stat .label { color: var(--text-2); font-size: .92rem; margin-top: .3rem; }
.stat .label a { color: var(--text-2); }

/* ---------- Tables ---------- */
.table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.table th, .table td { text-align: left; padding: .7rem .8rem; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.table th { font-size: .78rem; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); white-space: nowrap; border-bottom-color: var(--line); }
.table th a { color: var(--muted); text-decoration: none; }
.table th a:hover { color: var(--text); }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td, .table tr:hover td { background: rgba(200, 169, 106, .04); }
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 1.25rem; }
.card .table-wrap { border: 0; background: none; margin: 0 -.8rem; }

/* ---------- Badges ---------- */
.badge {
    display: inline-flex; align-items: center; gap: .4em;
    padding: .18rem .6rem; border: 1px solid var(--line); border-radius: 2px;
    font-size: .8rem; font-weight: 500; letter-spacing: .03em; line-height: 1.35;
    color: var(--text-2); background: transparent; white-space: nowrap; text-decoration: none;
}
a.badge:hover { color: var(--text); border-color: var(--gold); }
.badge::before { content: ""; width: .5em; height: .5em; border-radius: 50%; background: currentColor; opacity: .9; flex: none; }
.badge-success { color: var(--gold-light); border-color: rgba(200, 169, 106, .55); background: rgba(176, 138, 44, .14); }
.badge-danger  { color: #F2B3BF; border-color: rgba(212, 95, 122, .55); background: rgba(212, 95, 122, .1); }
.badge-warning { color: var(--text-2); border-color: rgba(201, 191, 174, .35); border-style: dashed; }
.badge-warning::before { background: transparent; border: 1.5px solid currentColor; }
.badge-muted   { color: var(--muted); border-color: rgba(160, 150, 138, .3); }
.badge-muted::before { display: none; }
.badge-info    { color: #BFD6FA; border-color: rgba(79, 143, 230, .5); background: rgba(79, 143, 230, .1); }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
    min-height: 2.5rem; padding: .5rem 1.05rem;
    border: 1px solid var(--line); border-radius: var(--radius);
    background: transparent; color: var(--text);
    font: 500 .9rem/1.2 var(--sans); letter-spacing: .06em;
    cursor: pointer; text-decoration: none; transition: border-color .15s, background .15s, color .15s;
}
.btn:hover { border-color: var(--gold); color: var(--gold-light); background: rgba(200, 169, 106, .06); }
.btn-primary { background: var(--gold); border-color: var(--gold); color: #17130B; }
.btn-primary:hover { background: var(--gold-light); border-color: var(--gold-light); color: #17130B; }
.btn-danger { border-color: rgba(212, 95, 122, .55); color: #F2B3BF; }
.btn-danger:hover { border-color: var(--rose); background: rgba(212, 95, 122, .1); color: #fff; }
.btn-small { min-height: 2rem; padding: .3rem .7rem; font-size: .84rem; }
.btn-link { background: none; border: 0; padding: 0; color: var(--gold-light); cursor: pointer; font: inherit; text-decoration: underline; text-decoration-color: rgba(230, 211, 163, .4); text-underline-offset: 3px; }
.btn-link:hover { color: #fff; }
button:disabled, .btn[disabled] { opacity: .45; cursor: not-allowed; }
form.inline { display: inline; }

.toolbar { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin-bottom: 1.25rem; }
.toolbar .spacer { flex: 1; }

/* ---------- Forms ---------- */
label { display: block; margin-bottom: 1rem; font-size: .92rem; font-weight: 500; color: var(--text-2); }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=time],
input[type=datetime-local], input[type=url], input[type=tel], input[type=search], input:not([type]), select, textarea {
    display: block; width: 100%; margin-top: .35rem; padding: .6rem .75rem;
    border: 1px solid rgba(200, 169, 106, .3); border-radius: var(--radius);
    font: 400 1rem/1.4 var(--sans); color: var(--text); background: var(--surface-2);
    transition: border-color .15s, box-shadow .15s;
}
input::placeholder, textarea::placeholder { color: #7D7466; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(200, 169, 106, .18); }
select { appearance: none; padding-right: 2.2rem; background-image: linear-gradient(45deg, transparent 50%, var(--gold) 50%), linear-gradient(135deg, var(--gold) 50%, transparent 50%); background-position: calc(100% - 1.1rem) 55%, calc(100% - .8rem) 55%; background-size: 5px 5px; background-repeat: no-repeat; }
select[multiple] { background-image: none; padding-right: .75rem; }
input[type=file] { color: var(--text-2); font: inherit; margin-top: .35rem; }
input[type=checkbox], input[type=radio] { accent-color: var(--gold); width: 1.05rem; height: 1.05rem; }
.toolbar input, .toolbar select { display: inline-block; width: auto; margin: 0; min-height: 2.5rem; }
.toolbar input[type=search] { min-width: min(100%, 260px); }
textarea { min-height: 100px; resize: vertical; }
label.checkbox { display: flex; gap: .55rem; align-items: center; font-weight: 400; color: var(--text); }
label.checkbox input { width: auto; margin: 0; }
fieldset { border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 1rem 1.15rem .25rem; margin: 0 0 1rem; }
legend { padding: 0 .4rem; color: var(--gold); font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; }
.form-grid { display: grid; gap: 0 1.25rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.form-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: .75rem; }
.help { color: var(--muted); font-size: .88rem; font-weight: 400; }
.muted { color: var(--muted); }
.text-right { text-align: right; }
.nowrap { white-space: nowrap; }
code, pre { background: var(--surface-2); border: 1px solid var(--line-soft); color: var(--gold-light); border-radius: 2px; padding: .1rem .35rem; font-size: .86rem; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
pre { padding: .9rem 1rem; overflow-x: auto; color: var(--text-2); }
ul, ol { padding-left: 1.2rem; }
li { margin-bottom: .3rem; }
dialog { color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
dialog::backdrop { background: rgba(0, 0, 0, .6); }

/* ---------- Login ---------- */
.login-page { display: flex; min-height: 100vh; align-items: center; justify-content: center; padding: 1rem; }
.login-box { width: min(100%, 380px); background: var(--surface); padding: 2rem; border: 1px solid var(--line); border-radius: var(--radius); }
.login-box h1 { text-align: center; color: var(--gold-light); margin-bottom: .25rem; }
.login-box .eyebrow { text-align: center; margin-bottom: 1.75rem; }
.login-box button { width: 100%; margin-top: .5rem; }

/* ---------- Dashboard ---------- */
.dash-grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(12, minmax(0, 1fr)); margin-bottom: 1.25rem; }
.dash-grid > .card { margin: 0; grid-column: span 12; }
@media (min-width: 760px) {
    .span-4 { grid-column: span 6 !important; }
    .span-6 { grid-column: span 6 !important; }
    .span-8 { grid-column: span 12 !important; }
}
@media (min-width: 1100px) {
    .span-3 { grid-column: span 3 !important; }
    .span-4 { grid-column: span 4 !important; }
    .span-5 { grid-column: span 5 !important; }
    .span-7 { grid-column: span 7 !important; }
    .span-8 { grid-column: span 8 !important; }
}
.card-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .5rem 1rem; margin-bottom: 1rem; }
.card-head h3 { margin: 0; }
.card-head a { font-size: .9rem; }
.card-foot { margin: 1rem 0 0; font-size: .92rem; color: var(--muted); }

.countdown { display: flex; flex-direction: column; justify-content: space-between; min-height: 100%; }
.countdown .big { font-family: var(--serif); font-weight: 300; font-size: clamp(4rem, 8vw, 5.5rem); line-height: .9; color: var(--gold-light); font-variant-numeric: lining-nums; }
.countdown .unit { font-family: var(--serif); font-style: italic; font-size: 1.5rem; color: var(--text-2); margin-left: .25rem; }
.countdown .meta { color: var(--text-2); margin: 1rem 0 0; }

.kpi-row { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); }
.kpi { padding: .2rem 0; }
.kpi .v { font-family: var(--serif); font-size: 2rem; line-height: 1; color: var(--text); font-variant-numeric: lining-nums tabular-nums; }
.kpi .l { color: var(--muted); font-size: .9rem; margin-top: .3rem; }

.list-clean { list-style: none; margin: 0; padding: 0; }
.list-clean li { display: flex; align-items: center; gap: .75rem; justify-content: space-between; padding: .7rem 0; margin: 0; border-top: 1px solid var(--line-soft); }
.list-clean li:first-child { border-top: 0; padding-top: 0; }
.list-clean .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.list-clean .sub { color: var(--muted); font-size: .88rem; white-space: nowrap; }

/* ---------- Charts (server-rendered; see src/charts.php) ---------- */
.viz { position: relative; }
.viz-legend { display: flex; flex-wrap: wrap; gap: .4rem 1.1rem; list-style: none; margin: .9rem 0 0; padding: 0; font-size: .9rem; color: var(--text-2); }
.viz-legend li { display: inline-flex; align-items: center; gap: .45rem; margin: 0; }
.viz-legend b { color: var(--text); font-weight: 500; }
.viz-swatch { width: .75rem; height: .75rem; border-radius: 2px; flex: none; }
.viz-swatch.hatch { background-image: repeating-linear-gradient(45deg, rgba(255,255,255,.25) 0 2px, transparent 2px 5px) !important; }

/* Donut */
.viz-donut-wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem 1.75rem; }
.viz-donut { position: relative; flex: none; }
.viz-donut svg { display: block; }
.viz-donut .seg { transition: opacity .15s; cursor: default; }
.viz-donut:hover .seg { opacity: .55; }
.viz-donut .seg:hover { opacity: 1; }
.viz-donut-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; pointer-events: none; }
.viz-donut-center .big { font-family: var(--serif); font-size: 2.2rem; line-height: 1; color: var(--text); font-variant-numeric: lining-nums; }
.viz-donut-center .big small { font-size: .55em; color: var(--muted); }
.viz-donut-center .small { font-size: .8rem; color: var(--muted); margin-top: .25rem; letter-spacing: .04em; }
.viz-donut-legend { list-style: none; margin: 0; padding: 0; flex: 1; min-width: 190px; display: grid; gap: .55rem; }
.viz-donut-legend li { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: .65rem; margin: 0; font-size: .98rem; color: var(--text-2); }
.viz-donut-legend .n { color: var(--text); font-weight: 500; text-align: right; }
.viz-donut-legend .p { color: var(--muted); font-size: .85rem; text-align: right; min-width: 2.8em; }

/* Horizontal bars */
.viz-bars { display: grid; gap: .85rem; }
.viz-bar-row { display: grid; grid-template-columns: minmax(7rem, 38%) 1fr; align-items: center; gap: .9rem; }
.viz-bar-label { font-size: .95rem; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.viz-bar-label.missing { font-style: italic; color: var(--muted); }
.viz-bar-track { display: flex; align-items: center; gap: .6rem; min-width: 0; }
.viz-bar { height: 12px; border-radius: 0 4px 4px 0; background: var(--series-1); min-width: 2px; flex: none; }
.viz-bar.alt { background: var(--series-none); }
.viz-bar-val { font-size: .92rem; color: var(--text); white-space: nowrap; }
.viz-bar-val small { color: var(--muted); }
@media (max-width: 520px) { .viz-bar-row { grid-template-columns: 1fr; gap: .3rem; } }

/* 100% stacked bars (2px surface gaps) */
.viz-stack-row { margin-bottom: 1rem; }
.viz-stack-row:last-child { margin-bottom: 0; }
.viz-stack-head { display: flex; justify-content: space-between; gap: 1rem; font-size: .95rem; color: var(--text-2); margin-bottom: .4rem; }
.viz-stack-head b { color: var(--text); font-weight: 500; }
.viz-stack { display: flex; gap: 2px; height: 14px; }
.viz-stack > span { display: block; min-width: 3px; height: 100%; }
.viz-stack > span:first-child { border-radius: 0; }
.viz-stack > span:last-child { border-radius: 0 4px 4px 0; }

/* Column chart (weekly RSVPs) */
.viz-cols { display: grid; grid-template-columns: auto 1fr; gap: 0 .6rem; }
.viz-cols-axis { display: flex; flex-direction: column; justify-content: space-between; height: 180px; font-size: .8rem; color: var(--muted); text-align: right; transform: translateY(-.45em); }
.viz-cols-plot { position: relative; height: 180px; display: flex; align-items: flex-end; gap: 6px; border-bottom: 1px solid var(--line); }
.viz-cols-plot::before { content: ""; position: absolute; inset: 0; background: linear-gradient(var(--line-soft) 1px, transparent 1px) 0 0 / 100% 50%; pointer-events: none; }
.viz-col { position: relative; flex: 1; display: flex; flex-direction: column-reverse; gap: 2px; height: 100%; justify-content: flex-start; max-width: 48px; margin: 0 auto; }
.viz-col > span { display: block; width: 100%; max-width: 24px; margin: 0 auto; }
.viz-col > span:last-of-type { border-radius: 4px 4px 0 0; }
.viz-col-hit { position: absolute; inset: 0 -3px; z-index: 1; }
.viz-col:hover > span { filter: brightness(1.2); }
.viz-cols-x { grid-column: 2; display: flex; gap: 6px; font-size: .78rem; color: var(--muted); margin-top: .4rem; }
.viz-cols-x span { flex: 1; text-align: center; max-width: 48px; margin: 0 auto; white-space: nowrap; }
.viz-cols-marker { position: absolute; top: 0; bottom: 0; width: 0; border-left: 1px dashed var(--gold); }
.viz-cols-marker span { position: absolute; top: -1.4rem; left: 4px; font-size: .75rem; color: var(--gold-light); white-space: nowrap; }

/* Progress meter */
.viz-meter { height: 10px; background: var(--surface-3); border-radius: 0 4px 4px 0; overflow: hidden; display: flex; gap: 2px; }
.viz-meter > span { display: block; height: 100%; background: linear-gradient(90deg, var(--gold-deep), var(--gold)); }
.viz-meter > span + span { background: var(--series-2); }

/* Seating table dots (like the mock-up) */
.viz-tables { display: flex; flex-wrap: wrap; gap: .7rem; }
.viz-table { position: relative; width: 46px; height: 46px; }
.viz-table svg { display: block; }
.viz-table .lbl { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: .74rem; color: var(--text-2); pointer-events: none; }

/* Tooltip (cms.js) */
.viz-tip {
    position: fixed; z-index: 1000; pointer-events: none; max-width: 260px;
    padding: .5rem .7rem; background: #0B0A09; color: var(--text); border: 1px solid var(--gold-deep);
    border-radius: var(--radius); font-size: .88rem; line-height: 1.4; box-shadow: 0 8px 24px rgba(0, 0, 0, .5);
    opacity: 0; transform: translateY(4px); transition: opacity .12s, transform .12s;
}
.viz-tip.on { opacity: 1; transform: none; }
.viz-tip b { color: var(--gold-light); }
[data-tip] { cursor: default; }

details.viz-table-view { margin-top: .9rem; font-size: .9rem; }
details.viz-table-view summary { cursor: pointer; color: var(--muted); }
details.viz-table-view .table { margin-top: .5rem; font-size: .9rem; }

/* ---------- Print: plain, light ---------- */
@media print {
    :root { color-scheme: light; --text: #111; --text-2: #333; --muted: #555; --surface: #fff; --line: #bbb; --line-soft: #ddd; --gold: #6E5527; --gold-light: #222; }
    body { background: #fff; color: #111; font-size: 12px; }
    .topbar, .toolbar, .no-print, .flash { display: none !important; }
    .card, .table-wrap { border: 0; background: #fff; padding: 0; }
    .badge { border: 1px solid #999; color: #111; background: none; }
    h1, h2, h3, strong, b { color: #111; }
}

/* ---------- Small screens: one scrollable nav row ---------- */
@media (max-width: 900px) {
    .topbar { gap: .4rem 1rem; padding-bottom: 0; }
    .topbar .usermenu { margin-left: auto; }
    .mainnav { order: 3; flex: 0 0 calc(100% + 2rem); margin: 0 -1rem; padding: 0 1rem; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
    .mainnav::-webkit-scrollbar { display: none; }
    .mainnav a { white-space: nowrap; padding: .6rem .7rem; }
}
@media (max-width: 520px) {
    .topbar .wedding-name { display: none; }
    .table th, .table td { padding: .6rem .55rem; }
}
