/* ==========================================================================
   Admin + check-in: mobile first (bottom tab bar), sidebar from 992px.
   Builds on Bootstrap 5.
   ========================================================================== */

:root {
    --brand: #2f4a3f;
    --brand-dark: #223830;
    --accent: #a9834a;
    --bg: #f5f3ef;
    --card: #ffffff;
    --line: #e7e2da;
    --text: #23211f;
    --muted: #6f6a64;
    --yes: #2f7d4f;
    --yes-bg: #e4f3e9;
    --no: #b3443a;
    --no-bg: #f9e5e2;
    --wait: #9a6b12;
    --wait-bg: #fbf0d9;
    --draft: #6b6f76;
    --draft-bg: #eceef1;
    --info: #2d5f8a;
    --info-bg: #e3eef8;
    --arrived: #5b3f99;
    --arrived-bg: #ece6f8;
    --wa: #25d366;
    --wa-dark: #128c4a;
    --side-1: #c2577a;
    --side-2: #3d6fb6;
    --side-both: #a9834a;
    --nav-height: 64px;
    --radius: 14px;
    --bs-primary: var(--brand);
    --bs-primary-rgb: 47, 74, 63;
    --bs-link-color: var(--brand);
    --bs-link-color-rgb: 47, 74, 63;
    --bs-body-font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Noto Naskh Arabic", sans-serif;
}

body.admin-body {
    background: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
}

.icon {
    width: 1.15em;
    height: 1.15em;
    flex-shrink: 0;
    vertical-align: -0.2em;
}

[dir="auto"] {
    unicode-bidi: plaintext;
}

/* ---------- Bootstrap tweaks ---------- */

.btn {
    border-radius: 10px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 42px;
}

.btn-sm {
    min-height: 36px;
    border-radius: 8px;
}

.btn-lg {
    min-height: 52px;
    font-size: 1.05rem;
}

.btn-primary {
    --bs-btn-bg: var(--brand);
    --bs-btn-border-color: var(--brand);
    --bs-btn-hover-bg: var(--brand-dark);
    --bs-btn-hover-border-color: var(--brand-dark);
    --bs-btn-active-bg: var(--brand-dark);
    --bs-btn-active-border-color: var(--brand-dark);
    --bs-btn-disabled-bg: var(--brand);
    --bs-btn-disabled-border-color: var(--brand);
}

.btn-outline-primary {
    --bs-btn-color: var(--brand);
    --bs-btn-border-color: var(--brand);
    --bs-btn-hover-bg: var(--brand);
    --bs-btn-hover-border-color: var(--brand);
    --bs-btn-active-bg: var(--brand);
}

.btn-whatsapp {
    --bs-btn-color: #fff;
    --bs-btn-bg: var(--wa-dark);
    --bs-btn-border-color: var(--wa-dark);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #0e7a40;
    --bs-btn-hover-border-color: #0e7a40;
    --bs-btn-active-bg: #0b6b38;
    --bs-btn-disabled-bg: #9cc9ad;
    --bs-btn-disabled-border-color: #9cc9ad;
    --bs-btn-disabled-color: #fff;
}

.form-control,
.form-select {
    min-height: 44px;
    border-radius: 10px;
    font-size: 16px; /* stops iPhones zooming into fields */
}

.form-control-sm,
.form-select-sm {
    min-height: 38px;
    font-size: 15px;
}

.form-control:focus,
.form-select:focus,
.form-check-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 0.2rem rgba(169, 131, 74, 0.2);
}

.form-check-input:checked {
    background-color: var(--brand);
    border-color: var(--brand);
}

.form-check-input {
    width: 1.25em;
    height: 1.25em;
}

.form-switch .form-check-input {
    width: 2.4em;
}

.form-label {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 4px;
    display: block;
}

.form-hint {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 400;
}

.form-error {
    color: var(--no);
    font-size: 0.85rem;
}

.form-warning {
    color: var(--wait);
    font-size: 0.85rem;
}

.muted {
    color: var(--muted);
}

.alert {
    border-radius: 12px;
}

/* ---------- App shell ---------- */

.admin-app {
    min-height: 100vh;
    min-height: 100dvh;
}

.admin-topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: calc(8px + env(safe-area-inset-top)) 12px 8px 16px;
    background: var(--brand);
    color: #fff;
}

.admin-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    text-decoration: none;
    min-width: 0;
}

.admin-brand-mark {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.14);
    font-family: Georgia, serif;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    flex-shrink: 0;
}

.admin-brand-text {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-topbar-actions {
    display: flex;
    align-items: center;
    gap: 2px;
}

.admin-topbar .icon-btn {
    color: #fff;
}

.admin-site-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 40px;
    padding: 0 14px;
    margin-inline-end: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.admin-site-link:hover,
.admin-site-link:focus-visible {
    background: rgba(255, 255, 255, 0.24);
    color: #fff;
}

.icon-btn {
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: var(--text);
    padding: 0;
    text-decoration: none;
}

.icon-btn:hover {
    background: rgba(0, 0, 0, 0.06);
}

.admin-topbar .icon-btn:hover {
    background: rgba(255, 255, 255, 0.12);
}

.icon-btn:disabled {
    opacity: 0.35;
}

.admin-nav {
    position: fixed;
    inset-inline: 0;
    bottom: 0;
    z-index: 30;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    background: #fff;
    border-top: 1px solid var(--line);
    padding-bottom: env(safe-area-inset-bottom);
    box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.05);
}

.admin-nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    height: var(--nav-height);
    color: var(--muted);
    text-decoration: none;
    font-size: 0.72rem;
    font-weight: 600;
}

.admin-nav-link .icon {
    width: 1.45em;
    height: 1.45em;
}

.admin-nav-link.active {
    color: var(--brand);
}

.admin-main {
    padding: 16px 14px calc(var(--nav-height) + 96px + env(safe-area-inset-bottom));
    max-width: 1100px;
    margin-inline: auto;
}

@media (min-width: 992px) {
    .admin-app {
        display: grid;
        grid-template-columns: 232px 1fr;
        grid-template-rows: auto 1fr;
    }

    .admin-topbar {
        grid-column: 1 / -1;
    }

    .admin-nav {
        position: sticky;
        top: 58px;
        align-self: start;
        display: flex;
        flex-direction: column;
        gap: 4px;
        height: calc(100vh - 58px);
        padding: 16px 12px;
        border-top: 0;
        border-inline-end: 1px solid var(--line);
        box-shadow: none;
        background: #fbfaf8;
    }

    .admin-nav-link {
        flex-direction: row;
        justify-content: flex-start;
        gap: 12px;
        height: 46px;
        padding: 0 14px;
        border-radius: 10px;
        font-size: 0.95rem;
    }

    .admin-nav-link.active {
        background: #e9efe9;
    }

    .admin-main {
        padding: 28px 32px 64px;
        width: 100%;
    }
}

#blazor-error-ui {
    display: none;
    position: fixed;
    inset-inline: 12px;
    bottom: calc(var(--nav-height) + 12px + env(safe-area-inset-bottom));
    z-index: 1000;
    padding: 12px 16px;
    border-radius: 12px;
    background: #fff4d6;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    inset-inline-end: 12px;
    top: 10px;
}

/* ---------- Page header ---------- */

.page-header {
    margin-bottom: 16px;
}

.page-back {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    color: var(--muted);
    text-decoration: none;
    font-size: 0.9rem;
    margin-bottom: 4px;
    min-height: 32px;
}

.page-header-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    word-break: break-word;
}

.page-subtitle {
    color: var(--muted);
    margin: 2px 0 0;
}

.page-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* ---------- Cards & blocks ---------- */

.card-block {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 14px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.block-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 10px;
}

details > summary.block-title {
    cursor: pointer;
    margin-bottom: 0;
}

details[open] > summary.block-title {
    margin-bottom: 12px;
}

.section-heading {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 22px 0 10px;
}

.form-stack {
    display: block;
}

.form-field {
    display: block;
    margin-bottom: 14px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0 14px;
}

@media (min-width: 600px) {
    .form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.sticky-actions {
    position: sticky;
    bottom: calc(var(--nav-height) + env(safe-area-inset-bottom) + 8px);
    z-index: 20;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px;
    margin: 16px 0;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(6px);
}

@media (min-width: 992px) {
    .sticky-actions {
        bottom: 12px;
    }
}

.danger-zone {
    border-color: #f0d3cf;
}

.empty-state {
    text-align: center;
    padding: 36px 16px;
    background: var(--card);
    border: 1px dashed var(--line);
    border-radius: var(--radius);
    color: var(--muted);
}

.empty-state > .icon {
    width: 2.6rem;
    height: 2.6rem;
    color: var(--accent);
    margin-bottom: 8px;
}

.empty-state p {
    max-width: 480px;
    margin: 0 auto 16px;
}

.loading {
    display: flex;
    gap: 10px;
    align-items: center;
    color: var(--muted);
    padding: 24px 4px;
}

.link-box {
    font-family: ui-monospace, Consolas, monospace;
    font-size: 0.85rem;
    word-break: break-all;
    background: #f6f4f0;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 8px 10px;
}

/* ---------- Dashboard ---------- */

.setup-card {
    border-color: #ecdcc0;
    background: #fffaf1;
}

.checklist {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 2px;
}

.checklist li {
    display: flex;
    gap: 10px;
    align-items: center;
    min-height: 36px;
}

.checklist li.is-done a {
    color: var(--muted);
    text-decoration: line-through;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 8px;
}

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

.stat-tile {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 14px;
    color: inherit;
    text-decoration: none;
}

.stat-value {
    display: block;
    font-size: 1.7rem;
    font-weight: 700;
    line-height: 1.1;
}

.stat-value small {
    font-size: 0.95rem;
    color: var(--muted);
    font-weight: 500;
}

.stat-label {
    color: var(--muted);
    font-size: 0.85rem;
}

.event-stats {
    display: grid;
    gap: 12px;
}

@media (min-width: 768px) {
    .event-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.event-stat {
    display: block;
    color: inherit;
    text-decoration: none;
    margin-bottom: 0;
}

.event-stat-head {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
}

.event-stat-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0;
}

.stack-bar {
    display: flex;
    height: 10px;
    border-radius: 999px;
    overflow: hidden;
    background: var(--draft-bg);
    margin-bottom: 10px;
}

.stack-yes {
    background: var(--yes);
}

.stack-no {
    background: var(--no);
}

.stack-wait {
    background: #e2b347;
}

.stack-draft {
    background: #c9ccd1;
}

.event-stat-numbers {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    margin: 0 0 8px;
}

.event-stat-numbers dt {
    font-size: 0.72rem;
    color: var(--muted);
    font-weight: 600;
}

.event-stat-numbers dd {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
}

.event-stat-numbers .is-yes dd {
    color: var(--yes);
}

.event-stat-numbers .is-no dd {
    color: var(--no);
}

.event-stat-numbers .is-wait dd {
    color: var(--wait);
}

.event-stat-sides {
    font-size: 0.85rem;
    margin-bottom: 4px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.two-col {
    display: grid;
    gap: 14px;
    margin-top: 14px;
}

@media (min-width: 992px) {
    .two-col {
        grid-template-columns: 1.2fr 1fr;
    }
}

.reply-list,
.message-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.reply-list li {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
}

.reply-list li:last-child,
.message-list li:last-child {
    border-bottom: 0;
}

.reply-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-top: 7px;
    flex-shrink: 0;
}

.reply-dot--yes {
    background: var(--yes);
}

.reply-dot--no {
    background: var(--no);
}

.reply-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.reply-text a {
    color: var(--text);
    text-decoration: none;
}

.reply-note {
    font-size: 0.85rem;
}

.message-list li {
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
}

.message-text {
    margin: 0 0 4px;
    padding-inline-start: 10px;
    border-inline-start: 3px solid var(--accent);
}

/* ---------- Lists, chips, filters ---------- */

.item-list,
.guest-list,
.contact-list,
.venue-list,
.import-list,
.pick-list,
.invite-toggles {
    list-style: none;
    padding: 0;
    margin: 0;
}

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.chip {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    background: var(--draft-bg);
    color: var(--draft);
    white-space: nowrap;
}

.chip--yes {
    background: var(--yes-bg);
    color: var(--yes);
}

.chip--no {
    background: var(--no-bg);
    color: var(--no);
}

.chip--wait {
    background: var(--wait-bg);
    color: var(--wait);
}

.chip--draft {
    background: var(--draft-bg);
    color: var(--draft);
}

.chip--muted {
    background: #f1efeb;
    color: var(--muted);
    font-weight: 500;
}

.filter-chips {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 6px;
    margin-bottom: 10px;
    scrollbar-width: none;
}

.filter-chips::-webkit-scrollbar {
    display: none;
}

.filter-chip {
    flex-shrink: 0;
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 999px;
    padding: 6px 14px;
    min-height: 38px;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
}

.filter-chip b {
    margin-inline-start: 4px;
    color: var(--muted);
}

.filter-chip.is-active {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}

.filter-chip.is-active b {
    color: rgba(255, 255, 255, 0.8);
}

.action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.action-row .btn {
    flex: 1 1 auto;
}

@media (min-width: 768px) {
    .action-row .btn {
        flex: 0 0 auto;
    }
}

.search-box {
    position: relative;
    margin-bottom: 10px;
}

.search-box > .icon {
    position: absolute;
    inset-inline-start: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    pointer-events: none;
}

.search-box .form-control {
    padding-inline-start: 38px;
}

.filter-selects {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 12px;
}

@media (min-width: 768px) {
    .filter-selects {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.toggle-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin-bottom: 12px;
}

.toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    min-height: 36px;
}

.list-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.select-all {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--muted);
    min-height: 40px;
}

.bulk-bar {
    position: sticky;
    top: 62px;
    z-index: 15;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    margin-bottom: 10px;
    background: #fff8e8;
    border: 1px solid #ecdcc0;
    border-radius: 12px;
}

/* ---------- Guest / contact rows ---------- */

.guest-row,
.contact-row {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 4px 10px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 12px;
    margin-bottom: 8px;
}

.guest-row.is-selected,
.contact-row.is-selected {
    border-color: var(--accent);
    background: #fffaf1;
}

.guest-check {
    padding-top: 2px;
    min-width: 28px;
    display: flex;
    justify-content: center;
}

.guest-main,
.contact-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.contact-main {
    color: inherit;
    text-decoration: none;
}

.guest-name {
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.guest-meta {
    color: var(--muted);
    font-size: 0.86rem;
}

.guest-meta .side-dot {
    margin-inline-end: 5px;
    vertical-align: 1px;
}

.guest-status {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 2px;
}

.guest-note {
    margin: 2px 0 0;
    font-size: 0.88rem;
    color: var(--text);
}

.guest-note--message {
    padding-inline-start: 8px;
    border-inline-start: 3px solid var(--accent);
}

.guest-row {
    grid-template-columns: auto 1fr auto;
}

.guest-actions {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: flex-end;
}

@media (min-width: 768px) {
    .guest-row {
        align-items: center;
    }

    .guest-actions {
        flex-direction: row;
        align-items: center;
        gap: 6px;
    }
}

.lang-tag {
    display: inline-grid;
    place-items: center;
    min-width: 22px;
    height: 22px;
    padding: 0 5px;
    border-radius: 6px;
    background: #efe7da;
    color: var(--accent);
    font-size: 0.8rem;
    font-weight: 700;
}

.side-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.side-dot--partner1 {
    background: var(--side-1);
}

.side-dot--partner2 {
    background: var(--side-2);
}

.side-dot--both {
    background: var(--side-both);
}

.side-chip {
    display: inline-flex;
    padding: 1px 9px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.8rem;
    color: #fff;
}

.side-chip--partner1 {
    background: var(--side-1);
}

.side-chip--partner2 {
    background: var(--side-2);
}

.side-chip--both {
    background: var(--side-both);
}

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
}

.status-badge--yes {
    background: var(--yes-bg);
    color: var(--yes);
}

.status-badge--no {
    background: var(--no-bg);
    color: var(--no);
}

.status-badge--draft {
    background: var(--draft-bg);
    color: var(--draft);
}

.status-badge--sent {
    background: var(--wait-bg);
    color: var(--wait);
}

.status-badge--opened {
    background: var(--info-bg);
    color: var(--info);
}

.status-badge--arrived {
    background: var(--arrived-bg);
    color: var(--arrived);
}

/* ---------- Events list ---------- */

.event-row {
    display: grid;
    gap: 10px;
}

.event-row-main {
    display: flex;
    gap: 12px;
    color: inherit;
    text-decoration: none;
    min-width: 0;
}

.event-row-thumb {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    background: #f1ede6;
    display: grid;
    place-items: center;
    color: var(--accent);
    overflow: hidden;
    flex-shrink: 0;
}

.event-row-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.event-row-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.event-row-title {
    font-weight: 700;
    font-size: 1.05rem;
}

.event-row-actions {
    display: flex;
    justify-content: flex-end;
    gap: 4px;
    align-items: center;
}

@media (min-width: 768px) {
    .event-row {
        grid-template-columns: 1fr auto;
        align-items: center;
    }
}

/* ---------- Sheets (Modal) ---------- */

body:has(.sheet) {
    overflow: hidden;
}

.sheet-backdrop {
    position: fixed;
    inset: 0;
    z-index: 900;
    background: rgba(20, 24, 22, 0.45);
    animation: fade 0.15s ease;
}

.sheet {
    position: fixed;
    inset-inline: 0;
    bottom: 0;
    z-index: 901;
    display: flex;
    flex-direction: column;
    max-height: 92vh;
    max-height: 92dvh;
    background: #fff;
    border-radius: 18px 18px 0 0;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.2);
    animation: slide-up 0.2s ease;
    padding-bottom: env(safe-area-inset-bottom);
}

.sheet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding: 10px 10px 6px 16px;
    border-bottom: 1px solid var(--line);
}

.sheet-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sheet-body {
    padding: 16px;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.sheet-footer {
    padding: 10px 16px 14px;
    border-top: 1px solid var(--line);
}

.sheet-actions {
    display: grid;
    gap: 8px;
}

@media (min-width: 768px) {
    .sheet {
        inset: 0;
        margin: auto;
        width: min(560px, calc(100vw - 48px));
        height: fit-content;
        max-height: 86vh;
        border-radius: 18px;
        animation: pop 0.18s ease;
    }

    .sheet--wide {
        width: min(760px, calc(100vw - 48px));
    }
}

@keyframes slide-up {
    from {
        transform: translateY(40px);
        opacity: 0;
    }

    to {
        transform: none;
        opacity: 1;
    }
}

@keyframes pop {
    from {
        transform: scale(0.97);
        opacity: 0;
    }

    to {
        transform: none;
        opacity: 1;
    }
}

@keyframes fade {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.pick-list li label {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 10px 4px;
    border-bottom: 1px solid var(--line);
    min-height: 52px;
}

.pick-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* ---------- Toast ---------- */

.toast-bar {
    position: fixed;
    inset-inline: 16px;
    bottom: calc(var(--nav-height) + 16px + env(safe-area-inset-bottom));
    z-index: 950;
    margin-inline: auto;
    max-width: 460px;
    padding: 12px 16px;
    border-radius: 12px;
    background: #1f2a24;
    color: #fff;
    font-weight: 500;
    text-align: center;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
    animation: slide-up 0.2s ease;
}

.toast-bar--error {
    background: var(--no);
}

@media (min-width: 992px) {
    .toast-bar {
        bottom: 24px;
    }
}

/* ---------- Inputs: bilingual, segmented, chips, stepper ---------- */

.loc-field {
    margin-bottom: 14px;
}

.loc-field-label {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 2px 8px;
    margin-bottom: 4px;
}

.loc-field-inputs {
    display: grid;
    gap: 8px;
}

@media (min-width: 768px) {
    .loc-field-inputs {
        grid-template-columns: 1fr 1fr;
    }
}

.loc-input {
    position: relative;
    display: block;
}

.loc-tag {
    position: absolute;
    top: 8px;
    inset-inline-end: 8px;
    z-index: 2;
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--muted);
    background: #f1efeb;
    border-radius: 6px;
    padding: 0 6px;
    pointer-events: none;
}

.loc-input .form-control {
    padding-inline-end: 40px;
}

.loc-input .form-control[dir="rtl"] {
    padding-inline-end: 0.75rem;
    padding-inline-start: 40px;
}

.loc-input:has([dir="rtl"]) .loc-tag {
    inset-inline-end: auto;
    inset-inline-start: 8px;
}

.segmented {
    display: inline-flex;
    flex-wrap: wrap;
    background: #efece6;
    border-radius: 12px;
    padding: 3px;
    gap: 3px;
    max-width: 100%;
}

.segmented-btn {
    border: 0;
    background: transparent;
    border-radius: 9px;
    padding: 8px 14px;
    min-height: 40px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--muted);
}

.segmented-btn.is-active {
    background: #fff;
    color: var(--text);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.segmented--sm .segmented-btn {
    padding: 4px 10px;
    min-height: 32px;
    font-size: 0.82rem;
}

.chip-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.pick-chip {
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 999px;
    padding: 6px 12px;
    min-height: 38px;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text);
}

.pick-chip.is-active {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}

.relationship-preview {
    font-size: 0.9rem;
    color: var(--muted);
    margin: 0;
}

.stepper {
    display: flex;
    gap: 6px;
    align-items: stretch;
    max-width: 220px;
}

.stepper .btn {
    min-width: 48px;
    font-size: 1.3rem;
}

.stepper--lg {
    max-width: 260px;
    margin: 6px auto 16px;
}

.stepper--lg .btn {
    min-width: 64px;
    min-height: 64px;
    font-size: 1.8rem;
}

.stepper-value {
    flex: 1;
    display: grid;
    place-items: center;
    font-size: 2.2rem;
    font-weight: 700;
}

.tri {
    display: inline-flex;
    border: 1px solid var(--line);
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
}

.tri-btn {
    border: 0;
    background: #fff;
    min-width: 46px;
    min-height: 38px;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--muted);
}

.tri-btn + .tri-btn {
    border-inline-start: 1px solid var(--line);
}

.tri-btn.is-yes {
    background: var(--yes);
    color: #fff;
}

.tri-btn.is-no {
    background: var(--no);
    color: #fff;
}

.tri-btn.is-unknown {
    background: #eceae6;
    color: var(--text);
}

.stars {
    display: inline-flex;
    gap: 2px;
}

.star {
    border: 0;
    background: none;
    font-size: 1.9rem;
    line-height: 1;
    color: #d8d2c7;
    padding: 2px;
    min-width: 40px;
    min-height: 40px;
}

.star.on {
    color: #e0a526;
}

.stars--readonly .star {
    font-size: 1rem;
    min-width: auto;
    min-height: auto;
}

.message-preview {
    white-space: pre-wrap;
    word-break: break-word;
    background: #e9fbdc;
    border: 1px solid #cdeebb;
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 0.93rem;
    line-height: 1.5;
    max-height: 340px;
    overflow-y: auto;
    margin-bottom: 12px;
}

.preview-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin: 4px 0 8px;
}

.placeholder-list {
    columns: 2;
    column-gap: 16px;
    padding-inline-start: 1.1rem;
    font-size: 0.85rem;
}

.tabs {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 6px;
    margin-bottom: 12px;
    scrollbar-width: none;
}

.tabs::-webkit-scrollbar {
    display: none;
}

.tab {
    flex-shrink: 0;
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 999px;
    padding: 7px 14px;
    min-height: 40px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text);
}

.tab.is-active {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}

.faq-editor {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 12px;
    background: #fcfbf9;
}

.faq-editor-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

/* ---------- Image upload ---------- */

.image-upload {
    display: grid;
    gap: 8px;
    margin-bottom: 8px;
}

.image-upload-preview {
    width: 100%;
    max-width: 360px;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid var(--line);
}

.image-upload-empty {
    max-width: 360px;
    aspect-ratio: 16 / 10;
    border-radius: 12px;
    border: 1px dashed var(--line);
    background: #faf8f5;
    display: grid;
    place-content: center;
    justify-items: center;
    gap: 6px;
    color: var(--muted);
    font-size: 0.85rem;
    padding: 12px;
    text-align: center;
}

.image-upload-empty .icon {
    width: 2rem;
    height: 2rem;
    color: var(--accent);
}

.image-upload-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.upload-drop {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 140px;
    border: 2px dashed #d8cfc2;
    border-radius: 14px;
    background: #fcfaf6;
    color: var(--brand);
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    padding: 16px;
}

.upload-drop .icon {
    width: 2rem;
    height: 2rem;
}

.upload-drop.is-busy {
    opacity: 0.6;
}

/* ---------- Import ---------- */

.import-row {
    display: flex;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
}

.import-row.is-skipped {
    opacity: 0.65;
}

.import-num {
    min-width: 28px;
    color: var(--muted);
    font-size: 0.8rem;
    padding-top: 2px;
}

.import-main {
    min-width: 0;
}

.done-mark {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    margin: 4px auto 12px;
    background: var(--yes-bg);
    color: var(--yes);
}

.done-mark .icon {
    width: 2rem;
    height: 2rem;
}

/* ---------- Contact invitations ---------- */

.invite-toggle {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
}

.invite-toggle-status {
    display: flex;
    align-items: center;
    gap: 8px;
}

.combined-send {
    margin-top: 14px;
}

/* ---------- Side summary ---------- */

.side-details {
    padding: 12px 16px;
}

.side-totals {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 12px;
}

.side-total {
    border-radius: 12px;
    padding: 10px;
    background: #faf8f5;
    border-top: 4px solid var(--side-both);
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.side-total--partner1 {
    border-top-color: var(--side-1);
}

.side-total--partner2 {
    border-top-color: var(--side-2);
}

.side-total-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.side-total-value {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
}

.side-total-value small {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--muted);
}

.side-total-sub {
    font-size: 0.78rem;
    color: var(--muted);
}

.table-scroll {
    overflow-x: auto;
    margin-bottom: 6px;
}

.side-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.side-table th,
.side-table td {
    padding: 7px 8px;
    border-bottom: 1px solid var(--line);
    text-align: center;
    white-space: nowrap;
}

.side-table th[scope="row"] {
    text-align: start;
    font-weight: 600;
}

.side-table thead th {
    color: var(--muted);
    font-size: 0.78rem;
}

.side-table tfoot th,
.side-table tfoot td,
.side-table-total {
    font-weight: 700;
}

/* ---------- Venues ---------- */

.targets-card {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.targets {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
}

.target {
    display: flex;
    flex-direction: column;
}

.target-label {
    font-size: 0.75rem;
    color: var(--muted);
    font-weight: 600;
}

.target-value {
    font-weight: 700;
}

.venue-list {
    display: grid;
    gap: 10px;
}

@media (min-width: 900px) {
    .venue-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.venue-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.venue-card.is-rejected {
    opacity: 0.6;
}

.venue-card-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}

.venue-name {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--text);
    text-decoration: none;
}

.venue-where {
    margin: 0;
    color: var(--muted);
    font-size: 0.86rem;
}

.score {
    display: inline-grid;
    place-items: center;
    min-width: 42px;
    height: 42px;
    border-radius: 50%;
    font-weight: 800;
    font-size: 0.95rem;
    flex-shrink: 0;
    cursor: help;
}

.score--high {
    background: var(--yes-bg);
    color: var(--yes);
}

.score--mid {
    background: var(--wait-bg);
    color: var(--wait);
}

.score--low {
    background: var(--draft-bg);
    color: var(--draft);
}

.score--lg {
    min-width: 64px;
    height: 64px;
    font-size: 1.4rem;
}

.score small {
    font-size: 0.6em;
    font-weight: 600;
}

.kpis {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 0;
}

.kpis > div {
    background: #faf8f5;
    border-radius: 10px;
    padding: 8px 10px;
}

.kpis dt {
    font-size: 0.72rem;
    color: var(--muted);
    font-weight: 600;
}

.kpis dd {
    margin: 0;
    font-weight: 700;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

@media (min-width: 600px) {
    .kpis--wide {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.kpi-flag {
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 999px;
    padding: 0 7px;
}

.kpi-flag--yes {
    background: var(--yes-bg);
    color: var(--yes);
}

.kpi-flag--no {
    background: var(--no-bg);
    color: var(--no);
}

.kpi-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.venue-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.a11y {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 9px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    background: var(--draft-bg);
    color: var(--draft);
}

.a11y--accessible {
    background: var(--yes-bg);
    color: var(--yes);
}

.a11y--partial {
    background: var(--info-bg);
    color: var(--info);
}

.a11y--notaccessible {
    background: var(--no-bg);
    color: var(--no);
}

.avail,
.status-pill {
    display: inline-flex;
    padding: 2px 9px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    background: #f1efeb;
    color: var(--muted);
}

.avail--available {
    background: var(--yes-bg);
    color: var(--yes);
}

.avail--onhold {
    background: var(--wait-bg);
    color: var(--wait);
}

.avail--unavailable {
    background: var(--no-bg);
    color: var(--no);
}

.status-pill--shortlisted,
.status-pill--contacted,
.status-pill--visited {
    background: #efe7da;
    color: #7a5a26;
}

.status-pill--booked {
    background: var(--brand);
    color: #fff;
}

.status-pill--rejected {
    background: var(--no-bg);
    color: var(--no);
}

.rating-mini {
    color: #b9860f;
    font-weight: 700;
    font-size: 0.85rem;
}

.venue-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    margin-top: auto;
    padding-top: 4px;
}

.compare-toggle {
    gap: 6px;
}

.compare-bar {
    position: fixed;
    inset-inline: 12px;
    bottom: calc(var(--nav-height) + 12px + env(safe-area-inset-bottom));
    z-index: 25;
    margin-inline: auto;
    max-width: 520px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 8px 8px 16px;
    border-radius: 14px;
    background: var(--brand);
    color: #fff;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}

@media (min-width: 992px) {
    .compare-bar {
        bottom: 20px;
    }
}

.facility-group-title {
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
    margin: 14px 0 4px;
}

.facility-group-title.is-accessibility {
    color: var(--info);
}

.facility-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
    border-bottom: 1px dashed var(--line);
}

.quick-links {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.source-list {
    padding-inline-start: 1.1rem;
    word-break: break-all;
}

.compare-scroll {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--card);
    -webkit-overflow-scrolling: touch;
}

.compare-table {
    border-collapse: separate;
    border-spacing: 0;
    min-width: 100%;
    font-size: 0.88rem;
}

.compare-table th,
.compare-table td {
    padding: 8px 10px;
    border-bottom: 1px solid var(--line);
    min-width: 150px;
    max-width: 220px;
    vertical-align: top;
    white-space: pre-line;
}

.compare-table thead th {
    position: sticky;
    top: 0;
    background: #faf8f5;
    z-index: 2;
}

.compare-table th[scope="row"],
.compare-corner {
    position: sticky;
    inset-inline-start: 0;
    background: #fff;
    z-index: 3;
    min-width: 128px;
    max-width: 150px;
    font-weight: 600;
    box-shadow: 1px 0 0 var(--line);
}

.compare-corner {
    background: #faf8f5;
}

.compare-name {
    display: block;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
}

.compare-where {
    display: block;
    color: var(--muted);
    font-weight: 400;
    font-size: 0.8rem;
}

.compare-group th {
    background: #f3efe8 !important;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
    position: sticky;
    inset-inline-start: 0;
}

.compare-table td.is-best {
    background: var(--yes-bg);
    color: var(--yes);
    font-weight: 700;
}

.compare-strong td,
.compare-strong th {
    font-weight: 700;
}

/* ---------- Send queue ---------- */

.queue-progress {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--muted);
    margin-bottom: 6px;
}

.queue-bar {
    height: 6px;
    margin-bottom: 14px;
}

.queue-bar .progress-bar {
    background: var(--wa-dark);
}

.queue-guest {
    margin-bottom: 10px;
}

.queue-name {
    font-size: 1.2rem;
    font-weight: 700;
}

.queue-meta {
    color: var(--muted);
    font-size: 0.88rem;
}

.queue-actions {
    display: flex;
    gap: 8px;
}

.queue-done {
    text-align: center;
    padding: 20px 0;
}

.queue-done .icon {
    width: 3rem;
    height: 3rem;
    color: var(--yes);
}

/* ---------- Sign in ---------- */

.auth-page {
    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    place-items: center;
    padding: 24px 16px;
    background:
        radial-gradient(circle at 20% 10%, rgba(233, 220, 198, 0.7), transparent 50%),
        radial-gradient(circle at 80% 90%, rgba(47, 74, 63, 0.12), transparent 50%),
        var(--bg);
}

.auth-card {
    width: 100%;
    max-width: 400px;
    background: #fff;
    border-radius: 20px;
    padding: 28px 22px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.08);
    text-align: center;
}

.auth-mark {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    margin: 0 auto 10px;
    background: #f3ece1;
    color: var(--accent);
    font-size: 1.6rem;
}

.auth-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.auth-sub {
    color: var(--muted);
}

.auth-form {
    text-align: start;
    margin-top: 12px;
}

.auth-back {
    display: inline-block;
    margin-top: 18px;
    color: var(--muted);
    font-size: 0.9rem;
}

/* ---------- Door check-in ---------- */

.checkin-page {
    min-height: 100vh;
    min-height: 100dvh;
    background: var(--bg);
}

.checkin {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 12px calc(24px + env(safe-area-inset-bottom));
}

.checkin-header {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin: 0 -12px 10px;
    padding: calc(12px + env(safe-area-inset-top)) 16px 12px;
    background: var(--brand);
    color: #fff;
}

.checkin-eyebrow {
    margin: 0;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.8;
}

.checkin-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0;
}

.checkin-date {
    margin: 0;
    font-size: 0.82rem;
    opacity: 0.85;
}

.checkin-counter {
    text-align: center;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    padding: 6px 12px;
    flex-shrink: 0;
}

.checkin-counter-value {
    display: block;
    font-size: 1.7rem;
    font-weight: 800;
    line-height: 1.1;
}

.checkin-counter-value small {
    font-size: 0.9rem;
    font-weight: 600;
    opacity: 0.8;
}

.checkin-counter-label {
    font-size: 0.72rem;
    opacity: 0.85;
}

.checkin-sides {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.checkin-tools {
    position: sticky;
    top: 84px;
    z-index: 9;
    background: var(--bg);
    padding-top: 4px;
}

.checkin-status {
    min-height: 1.2em;
    font-size: 0.85rem;
    color: var(--muted);
    margin: 0 0 6px;
}

.checkin-status.is-offline {
    color: var(--no);
    font-weight: 600;
}

.checkin-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 8px;
}

.checkin-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 68px;
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
    text-align: start;
    color: var(--text);
}

.checkin-item.is-arrived {
    background: var(--yes-bg);
    border-color: #bfe0cb;
}

.checkin-item.is-declined {
    opacity: 0.6;
}

.checkin-item-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.checkin-item-name {
    font-weight: 700;
    font-size: 1.05rem;
}

.checkin-item-meta {
    color: var(--muted);
    font-size: 0.84rem;
}

.checkin-item-mark {
    display: grid;
    place-items: center;
    min-width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 2px solid var(--line);
    font-weight: 800;
    color: var(--muted);
    flex-shrink: 0;
}

.checkin-item.is-arrived .checkin-item-mark {
    background: var(--yes);
    border-color: var(--yes);
    color: #fff;
}

.checkin-dialog {
    width: min(420px, calc(100vw - 24px));
    border: 0;
    border-radius: 18px;
    padding: 0;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.checkin-dialog::backdrop {
    background: rgba(20, 24, 22, 0.5);
}

.checkin-dialog-body {
    padding: 20px;
    text-align: center;
}

.checkin-dialog-name {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 2px;
}

.checkin-dialog-actions {
    display: grid;
    gap: 8px;
}

/* ---------- Venue photos (shown from the venue's own site; placeholder behind each) ---------- */

.venue-card {
    overflow: hidden;
}

.venue-photo,
.photo-tile,
.compare-photo,
.photo-manage-thumb {
    position: relative;
    display: block;
    overflow: hidden;
    background: linear-gradient(135deg, #efe8dc, #f8f4ee);
}

.venue-photo-placeholder {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 2rem;
    height: 2rem;
    color: #cdbb98;
}

.venue-photo img,
.photo-tile img,
.compare-photo img,
.photo-manage-thumb img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.venue-photo {
    margin: -14px -14px 2px;
    aspect-ratio: 16 / 9;
}

.venue-photo-count {
    position: absolute;
    inset-inline-end: 8px;
    bottom: 8px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 9px;
    border-radius: 999px;
    background: rgba(20, 20, 20, 0.6);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
}

.photo-strip {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    margin: 0 -14px 6px;
    padding: 0 14px 6px;
    scrollbar-width: thin;
}

.photo-tile {
    flex: 0 0 82%;
    aspect-ratio: 4 / 3;
    border-radius: 14px;
    scroll-snap-align: start;
}

.photo-credit {
    margin-bottom: 14px;
}

.photo-manage {
    list-style: none;
    padding: 0;
    margin: 0 0 12px;
    display: grid;
    gap: 8px;
}

.photo-manage li {
    display: flex;
    align-items: center;
    gap: 10px;
}

.photo-manage-thumb {
    width: 76px;
    height: 56px;
    border-radius: 8px;
    flex-shrink: 0;
}

.photo-manage-thumb .venue-photo-placeholder {
    width: 1.2rem;
    height: 1.2rem;
}

.photo-manage-source {
    flex: 1;
    min-width: 0;
    color: var(--muted);
    font-size: 0.85rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.compare-photo {
    aspect-ratio: 16 / 10;
    border-radius: 8px;
    margin-bottom: 6px;
}

@media (min-width: 768px) {
    .photo-strip {
        margin-inline: 0;
        padding-inline: 0;
    }

    .photo-tile {
        flex-basis: 340px;
    }
}

/* ---------- Sample data notice (dashboard) ---------- */

.sample-card {
    border-style: dashed;
    border-color: #cbbfa6;
    background: #fbf9f5;
}

.sample-card .block-title .icon {
    color: var(--accent);
}

/* ---------- Getting started: steps are ticked by hand ---------- */

.setup-card-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 4px;
}

.checklist-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin: -2px 0 -2px -8px;
    flex-shrink: 0;
    cursor: pointer;
}

.checklist-check .form-check-input {
    width: 1.35rem;
    height: 1.35rem;
    margin: 0;
    border-radius: 50%;
    border-color: #c9b48d;
    cursor: pointer;
}

.checklist-check .form-check-input:checked {
    background-color: var(--yes);
    border-color: var(--yes);
}

.setup-card--done {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-block: 10px;
    color: var(--muted);
}

.setup-card--done .icon {
    color: var(--yes);
}

/* ---------- Match score explanation (venue cards): hover on a computer, tap on a phone ---------- */

.score-wrap {
    position: relative;
    flex-shrink: 0;
}

.score-wrap .score {
    border: 0;
    padding: 0;
    cursor: help;
}

.score-tip {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 30;
    width: min(290px, calc(100vw - 48px));
    padding: 12px 14px;
    border-radius: 12px;
    background: #1f2b25;
    color: #f4f1ea;
    font-size: 0.8rem;
    line-height: 1.35;
    text-align: left;
    box-shadow: 0 10px 28px rgba(20, 30, 25, 0.28);
}

.score-tip::before {
    content: "";
    position: absolute;
    top: -6px;
    right: 15px;
    width: 12px;
    height: 12px;
    background: inherit;
    transform: rotate(45deg);
}

.score-wrap:hover .score-tip,
.score-wrap:focus-within .score-tip {
    display: grid;
    gap: 4px;
}

.score-tip-title {
    font-size: 0.9rem;
}

.score-tip-sub {
    color: #c9d3cc;
    margin-bottom: 4px;
}

.score-tip-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding-top: 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.score-tip-row.is-unknown {
    color: #c9d3cc;
}

.score-tip-points {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.score-tip-hint {
    margin-top: 6px;
    color: #e3c98f;
}

/* ---------- No-photo card: the venue's initials on a soft colour, so it looks intended, not broken ---------- */

.venue-photo-empty {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background:
        radial-gradient(circle at 18% 22%, rgba(255, 255, 255, 0.6), transparent 42%),
        radial-gradient(circle at 85% 90%, rgba(255, 255, 255, 0.35), transparent 40%),
        linear-gradient(135deg, var(--ph-a, #f7f0e2), var(--ph-b, #e9ddc3));
    color: var(--ph-ink, #8d7243);
}

.venue-photo-empty::after {
    content: "";
    position: absolute;
    inset: 10px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 10px;
    pointer-events: none;
}

.venue-photo-initials {
    font-family: Georgia, "Times New Roman", serif;
    font-style: italic;
    font-size: 3rem;
    line-height: 1;
    letter-spacing: 0.04em;
}

.venue-photo-note {
    position: absolute;
    left: 18px;
    bottom: 18px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.75);
    color: #6f6658;
    font-size: 0.72rem;
    font-weight: 600;
}

.venue-photo-note .icon {
    width: 13px;
    height: 13px;
}

.venue-photo--tone-0 { --ph-a: #edf2ea; --ph-b: #d6e2d3; --ph-ink: #5e7c63; }
.venue-photo--tone-1 { --ph-a: #f8ece7; --ph-b: #ecd6ce; --ph-ink: #9b6b5d; }
.venue-photo--tone-2 { --ph-a: #f7f0e2; --ph-b: #e9ddc3; --ph-ink: #8d7243; }
.venue-photo--tone-3 { --ph-a: #eaf0f4; --ph-b: #d5e1ea; --ph-ink: #587188; }

.compare-photo .venue-photo-initials {
    font-size: 1.5rem;
}

.compare-photo .venue-photo-empty::after {
    inset: 5px;
    border-radius: 6px;
}

/* ---------- Event albums (guests' photos and wishes) ---------- */

.album-admin-name {
    max-width: 260px;
}

.album-admin-grid {
    list-style: none;
    padding: 0;
    margin: 0 0 14px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.album-admin-tile {
    display: flex;
    flex-direction: column;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
}

.album-admin-tile.is-hidden .album-admin-thumb img,
.album-admin-wishes .is-hidden .message-text {
    opacity: 0.45;
}

.album-admin-thumb {
    position: relative;
    display: block;
    aspect-ratio: 1;
    background: linear-gradient(135deg, #efe8dc, #f8f4ee);
}

.album-admin-thumb img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.album-admin-thumb .album-status {
    position: absolute;
    top: 8px;
    inset-inline-start: 8px;
}

.album-admin-meta {
    display: flex;
    flex-direction: column;
    padding: 8px 10px 0;
    min-width: 0;
}

.album-admin-who {
    font-weight: 600;
    font-size: 0.9rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.album-admin-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    padding: 8px 10px 10px;
    margin-top: auto;
}

.album-admin-delete {
    margin-inline-start: auto;
}

.album-admin-wishes {
    list-style: none;
    padding: 0;
    margin: 0;
}

.album-admin-wishes .message-text {
    white-space: pre-line;
    margin-bottom: 8px;
}

@media (min-width: 640px) {
    .album-admin-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 1100px) {
    .album-admin-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.table-card {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: flex-start;
}

.table-card-qr {
    flex: 0 0 132px;
    padding: 6px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
}

.table-card-qr img {
    display: block;
    width: 100%;
    height: auto;
}

.table-card-text {
    flex: 1 1 260px;
    min-width: 0;
}

/* ---------- Site usage (/admin/usage) ----------
   Chart colours checked with the dataviz palette validator (light surface): visits green and people violet
   pass colour-blind separation; the heat map is one green, light to dark. */

.u-page {
    --u-visits: #1f8a5f;
    --u-people: #7a5bc4;
    --u-other: #c9c4bb;
    --u-empty: #f1eee9;
    --u-grid: #ece8e1;
    --u-axis: #8a847c;
    transition: opacity 0.15s;
}

.u-page.is-loading {
    opacity: 0.55;
}

.u-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
    margin-bottom: 14px;
}

.u-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--text);
    cursor: pointer;
    min-height: 36px;
}

.u-check .form-check-input {
    margin: 0;
}

.u-kpis {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

@media (min-width: 600px) {
    .u-kpis {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 1200px) {
    .u-kpis {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }
}

.u-kpi {
    display: flex;
    flex-direction: column;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 12px 14px;
    min-width: 0;
}

.u-kpi-label {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 600;
}

.u-kpi-value {
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.2;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.u-kpi-value small {
    margin-inline-start: 4px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--muted);
}

.u-kpi-sub {
    font-size: 0.76rem;
    color: var(--muted);
    margin-top: 2px;
}

.u-kpi-sub.is-up {
    color: var(--yes);
}

.u-kpi-sub.is-down {
    color: var(--no);
}

.u-kpi--live {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}

.u-kpi--live .u-kpi-label,
.u-kpi--live .u-kpi-sub {
    color: rgba(255, 255, 255, 0.78);
}

.u-live-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #2fbf6b;
    box-shadow: 0 0 0 3px rgba(47, 191, 107, 0.25);
    flex-shrink: 0;
}

.u-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0 14px;
}

@media (min-width: 768px) {
    .u-grid {
        grid-template-columns: repeat(12, minmax(0, 1fr));
    }

    .u-card {
        grid-column: span 12;
    }

    .u-card--half,
    .u-card--third {
        grid-column: span 6;
    }
}

@media (min-width: 1200px) {
    .u-card--third {
        grid-column: span 4;
    }
}

.u-card {
    min-width: 0;
}

.u-card .block-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 2px;
}

.u-card .block-title .icon {
    color: var(--accent);
}

.u-card-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 2px;
}

.u-hint {
    color: var(--muted);
    font-size: 0.84rem;
    margin: 0 0 12px;
}

.u-none {
    color: var(--muted);
    font-size: 0.9rem;
    margin: 0;
    padding: 6px 0;
}

.u-dim {
    color: var(--muted);
}

/* Rankings: a name over a bar, then the figures. */
.u-rank {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    font-variant-numeric: tabular-nums;
}

.u-rank th {
    font-size: 0.74rem;
    font-weight: 600;
    color: var(--muted);
    text-align: end;
    padding: 0 0 6px 10px;
    white-space: nowrap;
}

.u-rank td {
    padding: 5px 0 5px 10px;
    font-size: 0.88rem;
    text-align: end;
    vertical-align: middle;
    white-space: nowrap;
}

.u-rank th:first-child,
.u-rank td:first-child {
    text-align: start;
    padding-inline-start: 0;
}

.u-rank-name {
    white-space: normal;
}

.u-rank-label {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.u-rank-bar {
    display: block;
    height: 6px;
    margin-top: 4px;
    border-radius: 0 4px 4px 0;
    background: var(--u-visits);
    min-width: 2px;
}

.u-rank tr.is-other .u-rank-bar {
    background: var(--u-other);
}

.u-rank tr.is-other .u-rank-label {
    color: var(--muted);
}

.u-col-num {
    width: 62px;
}

.u-col-wide {
    width: 74px;
}

/* Charts: axis text and the hover readout are HTML over a stretched plot. */
.u-legend {
    display: flex;
    justify-content: flex-end;
    gap: 14px;
    font-size: 0.8rem;
    color: var(--muted);
    margin: -4px 0 8px;
}

.u-legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.u-key {
    display: inline-block;
    width: 14px;
    height: 2px;
    border-radius: 2px;
    vertical-align: middle;
}

.u-key--visits {
    background: var(--u-visits);
}

.u-key--people {
    background: var(--u-people);
}

.u-frame {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    grid-template-rows: 200px 22px;
}

@media (min-width: 768px) {
    .u-frame {
        grid-template-rows: 240px 22px;
    }
}

.u-yaxis {
    position: relative;
    font-size: 0.72rem;
    color: var(--u-axis);
    font-variant-numeric: tabular-nums;
}

.u-yaxis span {
    position: absolute;
    inset-inline-end: 8px;
    transform: translateY(50%);
    line-height: 1;
}

.u-plot {
    position: relative;
    min-width: 0;
}

.u-plot svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
}

.u-gridline {
    stroke: var(--u-grid);
    stroke-width: 1;
}

.u-baseline {
    stroke: #d6d0c6;
    stroke-width: 1;
}

.u-series {
    fill: none;
    stroke-width: 2;
    stroke-linejoin: round;
    stroke-linecap: round;
}

.u-series--visits {
    stroke: var(--u-visits);
}

.u-series--people {
    stroke: var(--u-people);
}

.u-xaxis {
    grid-column: 2;
    position: relative;
    font-size: 0.72rem;
    color: var(--u-axis);
}

.u-xaxis span {
    position: absolute;
    top: 6px;
    transform: translateX(-50%);
    white-space: nowrap;
}

/* A full-height hover column per day: a hairline, the dots and the readout. */
.u-hit {
    position: absolute;
    top: 0;
    bottom: 0;
}

.u-hit::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    border-left: 1px solid #b9b2a6;
    opacity: 0;
}

.u-dot {
    position: absolute;
    left: 50%;
    width: 9px;
    height: 9px;
    margin: 0 0 -4.5px -4.5px;
    border-radius: 50%;
    box-shadow: 0 0 0 2px var(--card);
    opacity: 0;
}

.u-line.is-few .u-dot:not(.is-zero) {
    opacity: 1;
}

.u-dot--visits {
    background: var(--u-visits);
}

.u-dot--people {
    background: var(--u-people);
}

.u-hit:hover::before,
.u-hit:hover .u-dot {
    opacity: 1;
}

.u-tip {
    display: none;
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateY(-100%);
    z-index: 5;
    min-width: 120px;
    padding: 7px 10px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 10px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
    font-size: 0.8rem;
    white-space: nowrap;
    pointer-events: none;
}

.is-right > .u-tip {
    left: auto;
    right: 50%;
}

.u-hit:hover > .u-tip,
.u-column:hover > .u-tip {
    display: block;
}

.u-tip-title {
    display: block;
    color: var(--muted);
    font-size: 0.74rem;
    margin-bottom: 2px;
}

.u-tip-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* By hour: 24 columns. */
.u-plot > .u-hline {
    position: absolute;
    inset-inline: 0;
    border-top: 1px solid var(--u-grid);
}

.u-columns {
    position: absolute;
    inset: 0;
    display: flex;
    border-bottom: 1px solid #d6d0c6;
}

.u-column {
    position: relative;
    flex: 1 1 0;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 0 1px;
}

.u-column-bar {
    display: block;
    width: 100%;
    max-width: 24px;
    min-height: 2px;
    background: var(--u-visits);
    border-radius: 4px 4px 0 0;
}

.u-column:hover .u-column-bar {
    background: #187550;
}

.u-column > .u-tip {
    top: auto;
    bottom: 100%;
    transform: none;
    margin-bottom: 4px;
}

/* By day and hour. */
.u-heat {
    display: grid;
    gap: 2px;
}

.u-heat-row {
    display: grid;
    grid-template-columns: 30px repeat(24, minmax(0, 1fr));
    gap: 2px;
    align-items: center;
}

.u-heat-day,
.u-heat-hour {
    font-size: 0.7rem;
    color: var(--u-axis);
    white-space: nowrap;
}

.u-heat-cell {
    aspect-ratio: 1 / 1;
    min-height: 9px;
    border-radius: 3px;
    background: var(--u-empty);
}

.u-heat-cell:hover {
    outline: 2px solid var(--text);
    outline-offset: -1px;
}

.u-heat-key {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 3px;
    margin-top: 10px;
    font-size: 0.74rem;
    color: var(--muted);
}

.u-heat-swatch {
    display: inline-block;
    width: 13px;
    height: 13px;
    border-radius: 3px;
}

.u-heat-key span:last-child {
    margin-inline-start: 6px;
}

/* "Show the numbers" under a chart. */
.u-numbers {
    margin-top: 8px;
    font-size: 0.84rem;
}

.u-numbers summary {
    width: fit-content;
    color: var(--brand);
    font-weight: 600;
    cursor: pointer;
}

.u-numbers-box {
    max-height: 260px;
    overflow: auto;
    margin-top: 8px;
    border: 1px solid var(--line);
    border-radius: 10px;
}

.u-numbers table {
    width: 100%;
    border-collapse: collapse;
    font-variant-numeric: tabular-nums;
}

.u-numbers th,
.u-numbers td {
    padding: 5px 10px;
    text-align: end;
    border-bottom: 1px solid #f1eee9;
}

.u-numbers th {
    position: sticky;
    top: 0;
    background: #faf9f6;
    color: var(--muted);
    font-weight: 600;
}

.u-numbers th:first-child,
.u-numbers td:first-child {
    text-align: start;
}

/* On the site now. */
.u-live {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 10px;
}

.u-person {
    display: flex;
    gap: 11px;
    align-items: flex-start;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 10px 12px;
    min-width: 0;
}

.u-person-icon {
    position: relative;
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #e9efe9;
    color: var(--brand);
    display: flex;
    align-items: center;
    justify-content: center;
}

.u-person-icon .u-live-dot {
    position: absolute;
    inset-inline-end: -1px;
    bottom: -1px;
    box-shadow: 0 0 0 2px #fff;
}

.u-person-body {
    min-width: 0;
    flex: 1;
}

.u-person-name {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 8px;
    font-weight: 700;
    font-size: 0.92rem;
}

.u-person-name a {
    color: inherit;
}

.u-person-name em {
    font-style: normal;
    font-weight: 500;
    font-size: 0.76rem;
    color: var(--muted);
}

.u-person-line {
    font-size: 0.82rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-top: 1px;
}

/* Invited guests: a table on wider screens, a list on phones. */
.u-sort {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.84rem;
    color: var(--muted);
}

.u-sort .form-select {
    width: auto;
}

.u-table-wrap {
    display: none;
    overflow-x: auto;
}

.u-table {
    width: 100%;
    border-collapse: collapse;
    font-variant-numeric: tabular-nums;
    font-size: 0.88rem;
}

.u-table th {
    font-size: 0.76rem;
    font-weight: 600;
    color: var(--muted);
    text-align: end;
    padding: 6px 8px;
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
}

.u-table td {
    padding: 8px;
    text-align: end;
    border-bottom: 1px solid #f1eee9;
    white-space: nowrap;
}

.u-table tr:last-child td {
    border-bottom: 0;
}

.u-table .is-text {
    text-align: start;
}

.u-table td.is-text {
    white-space: normal;
    min-width: 90px;
}

.u-table th:first-child,
.u-table td:first-child {
    padding-inline-start: 0;
}

.u-table td:first-child {
    white-space: normal;
    min-width: 180px;
}

.u-th-btn {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    border: 0;
    background: none;
    padding: 0;
    font: inherit;
    color: inherit;
    white-space: nowrap;
}

.u-th-btn.is-sorted {
    color: var(--text);
}

.u-guest-name {
    font-weight: 600;
    color: var(--text);
    margin-inline-end: 6px;
}

.u-guest-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.u-guest-list li {
    padding: 10px 0;
    border-bottom: 1px solid #f1eee9;
}

.u-guest-list li:last-child {
    border-bottom: 0;
}

.u-guest-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
}

.u-guest-line {
    font-size: 0.84rem;
    margin-top: 2px;
}

@media (min-width: 768px) {
    .u-table-wrap {
        display: block;
    }

    .u-guest-list {
        display: none;
    }
}

.u-about ul {
    margin: 10px 0 0;
    padding-inline-start: 18px;
    font-size: 0.88rem;
    line-height: 1.55;
    color: #4a4540;
}

.u-about li + li {
    margin-top: 4px;
}

/* ---------- Settings → Backup ---------- */

.backup-compare {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.backup-compare th,
.backup-compare td {
    padding: 7px 8px;
    border-bottom: 1px solid var(--line);
    text-align: right;
}

/* On phones the names and dates wrap, so both columns fit without scrolling sideways. */
.backup-compare td {
    width: 34%;
    overflow-wrap: anywhere;
}

.backup-compare th[scope="row"] {
    text-align: left;
    font-weight: 600;
    white-space: nowrap;
}

.backup-compare thead th {
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 600;
}

/* Values the restore would change. */
.backup-compare tr.is-different td:last-child {
    font-weight: 700;
    background: #fbf3e4;
}

.backup-saved {
    list-style: none;
    margin: 0;
    padding: 0;
}

.backup-saved li {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 0;
    border-top: 1px solid var(--line);
}

.backup-saved-when {
    display: flex;
    flex-direction: column;
    font-weight: 600;
}

.backup-saved-actions {
    display: flex;
    gap: 6px;
}
