/* =========================================================
   Secret Santa — handcrafted styles
   Palette: pine, cream, paper, berry, brass.
   ========================================================= */

:root {
    --ink: #13251f;
    --ink-soft: #364a41;
    --muted: #718077;
    --muted-light: #9eaaa2;
    --pine: #103c30;
    --pine-deep: #0a2a22;
    --pine-soft: #1d5142;
    --sage: #a9bcb0;
    --cream: #f4eddf;
    --cream-deep: #ece2cf;
    --paper: #fffaf1;
    --paper-strong: #fffdf8;
    --red: #b43632;
    --red-deep: #8f2926;
    --gold: #d5a856;
    --gold-soft: #ead6ad;
    --line: rgba(19, 37, 31, 0.13);
    --line-strong: rgba(19, 37, 31, 0.22);
    --shadow-sm: 0 1px 2px rgba(21, 35, 29, 0.06), 0 10px 24px rgba(21, 35, 29, 0.05);
    --shadow-md: 0 2px 4px rgba(21, 35, 29, 0.05), 0 22px 54px rgba(21, 35, 29, 0.1);
    --shadow-lg: 0 30px 90px rgba(8, 31, 24, 0.24);
    --radius-sm: 12px;
    --radius-md: 18px;
    --radius-lg: 26px;
    --radius-xl: 34px;
    --font-sans: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
    --font-display: Georgia, "Times New Roman", "Palatino Linotype", serif;
    --container: 1180px;
    --header-height: 78px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--cream);
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    background:
        radial-gradient(circle at 15% 0%, rgba(213, 168, 86, 0.1), transparent 32rem),
        radial-gradient(circle at 100% 35%, rgba(180, 54, 50, 0.035), transparent 30rem);
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
textarea,
select {
    font: inherit;
    color: inherit;
}

button {
    cursor: pointer;
}

button:disabled {
    cursor: not-allowed;
}

h1, h2, h3, h4, p, dl, dd, figure {
    margin: 0;
}

h1, h2, h3 {
    font-weight: 400;
}

::selection {
    color: var(--paper);
    background: var(--red);
}

:focus-visible {
    outline: 3px solid rgba(180, 54, 50, 0.45);
    outline-offset: 3px;
}

/* ---------- utilities ---------- */

.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.is-hidden {
    display: none !important;
}

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

.skip-link {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 200;
    padding: 10px 16px;
    border-radius: 8px;
    background: var(--paper);
    color: var(--pine);
    transform: translateY(-160%);
    transition: transform 0.18s ease;
}

.skip-link:focus {
    transform: translateY(0);
}

/* ---------- typography ---------- */

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 18px;
    color: var(--red);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.eyebrow--light {
    color: var(--gold-soft);
}

.eyebrow__dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 0 4px rgba(213, 168, 86, 0.12);
}

.page-lead {
    max-width: 680px;
    color: var(--muted);
    font-size: 17px;
    line-height: 1.7;
}

.ticket-label {
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.17em;
    text-transform: uppercase;
}

.text-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 2px;
    border-bottom: 1px solid rgba(19, 37, 31, 0.3);
    color: var(--ink);
    font-size: 13px;
    font-weight: 600;
    transition: color 0.18s ease, border-color 0.18s ease;
}

.text-link:hover {
    color: var(--red);
    border-color: var(--red);
}

.text-link--light {
    color: var(--cream);
    border-color: rgba(244, 237, 223, 0.4);
}

.text-link--light:hover {
    color: var(--gold);
    border-color: var(--gold);
}

/* ---------- buttons ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 46px;
    padding: 0 22px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 650;
    line-height: 1;
    letter-spacing: 0.01em;
    white-space: nowrap;
    transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.btn svg {
    width: 17px;
    height: 17px;
    flex: 0 0 auto;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
}

.btn--primary {
    color: var(--paper);
    background: var(--pine);
    box-shadow: 0 8px 22px rgba(16, 60, 48, 0.2);
}

.btn--primary:hover {
    background: var(--pine-soft);
}

.btn--secondary {
    color: var(--pine);
    background: var(--cream-deep);
    border-color: rgba(19, 37, 31, 0.12);
}

.btn--secondary:hover {
    background: var(--gold-soft);
}

.btn--ghost {
    color: var(--ink);
    background: transparent;
    border-color: var(--line-strong);
}

.btn--ghost:hover {
    border-color: var(--ink);
    background: rgba(255, 250, 241, 0.5);
}

.btn--ghost-light {
    color: var(--cream);
    background: rgba(244, 237, 223, 0.06);
    border-color: rgba(244, 237, 223, 0.3);
}

.btn--ghost-light:hover {
    background: rgba(244, 237, 223, 0.12);
    border-color: rgba(244, 237, 223, 0.6);
}

.btn--danger {
    color: #fff;
    background: var(--red);
}

.btn--danger:hover {
    background: var(--red-deep);
}

.btn--small {
    min-height: 36px;
    padding: 0 15px;
    font-size: 12px;
}

.btn--large {
    min-height: 52px;
    padding: 0 28px;
    font-size: 15px;
}

.btn--wide {
    width: 100%;
    margin-top: 14px;
}

.btn:disabled {
    opacity: 0.42;
    transform: none;
    box-shadow: none;
}

.icon-btn {
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: transparent;
    color: var(--ink);
    transition: border-color 0.18s ease, color 0.18s ease, background 0.18s ease;
}

.icon-btn svg {
    width: 18px;
    height: 18px;
}

.icon-btn:hover {
    border-color: var(--ink);
    background: var(--paper);
}

.icon-btn--danger {
    color: var(--muted);
}

.icon-btn--danger:hover {
    color: var(--red);
    border-color: rgba(180, 54, 50, 0.4);
    background: rgba(180, 54, 50, 0.05);
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    height: var(--header-height);
    border-bottom: 1px solid transparent;
}

.site-header--app {
    background: rgba(244, 237, 223, 0.93);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border-color: var(--line);
}

.site-header--public {
    color: var(--cream);
    background: var(--pine-deep);
    border-color: rgba(244, 237, 223, 0.08);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 34px;
    height: 100%;
    max-width: 1320px;
    padding: 0 30px;
    margin: 0 auto;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    flex: 0 0 auto;
    color: var(--ink);
}

.site-header--public .brand {
    color: var(--cream);
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 39px;
    height: 39px;
    color: var(--red);
}

.site-header--public .brand-mark {
    color: var(--gold);
}

.brand-mark svg {
    width: 100%;
    height: 100%;
}

.brand-copy {
    display: flex;
    flex-direction: column;
    gap: 0;
    line-height: 1.05;
}

.brand-name {
    font-family: var(--font-display);
    font-size: 20px;
    letter-spacing: -0.01em;
}

.brand-sub {
    margin-top: 3px;
    color: var(--muted);
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

.site-header--public .brand-sub {
    color: rgba(244, 237, 223, 0.5);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
}

.nav-link {
    position: relative;
    padding: 10px 13px;
    border-radius: 999px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    transition: color 0.18s ease, background 0.18s ease;
}

.nav-link:hover {
    color: var(--ink);
    background: rgba(19, 37, 31, 0.05);
}

.nav-link.is-active {
    color: var(--pine);
    background: rgba(16, 60, 48, 0.08);
}

.nav-link.is-active::after {
    content: "";
    position: absolute;
    left: 13px;
    right: 13px;
    bottom: 4px;
    height: 1px;
    background: var(--red);
}

.header-account {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

.user-chip {
    display: flex;
    align-items: center;
    gap: 9px;
    max-width: 190px;
    padding: 4px 10px 4px 4px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 250, 241, 0.65);
}

.user-chip__copy {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.2;
}

.user-chip__name {
    overflow: hidden;
    font-size: 12px;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-chip__role {
    color: var(--muted);
    font-size: 9px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.logout-form {
    display: flex;
}

.icon-btn--header {
    width: 36px;
    height: 36px;
    border-color: transparent;
    color: var(--muted);
}

.icon-btn--header:hover {
    color: var(--red);
    background: rgba(180, 54, 50, 0.06);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-left: auto;
}

.header-note {
    color: rgba(244, 237, 223, 0.55);
    font-size: 11px;
    letter-spacing: 0.04em;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    width: 38px;
    height: 38px;
    padding: 0 9px;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: transparent;
}

.nav-toggle span {
    display: block;
    width: 100%;
    height: 1.5px;
    background: var(--ink);
    transition: transform 0.2s ease, opacity 0.2s ease;
}

/* ---------- footer ---------- */

.site-footer {
    border-top: 1px solid var(--line);
    background: rgba(255, 250, 241, 0.35);
}

.footer-inner {
    display: flex;
    align-items: center;
    gap: 18px;
    max-width: var(--container);
    min-height: 74px;
    padding: 0 30px;
    margin: 0 auto;
    color: var(--muted);
    font-size: 11px;
}

.footer-brand {
    color: var(--ink);
    font-family: var(--font-display);
    font-size: 15px;
}

.footer-note {
    letter-spacing: 0.03em;
}

.footer-year {
    margin-left: auto;
    font-variant-numeric: tabular-nums;
}

.page-landing .site-footer {
    color: rgba(244, 237, 223, 0.46);
    background: var(--pine-deep);
    border-color: rgba(244, 237, 223, 0.08);
}

.page-landing .footer-brand {
    color: var(--cream);
}

/* ---------- page shells ---------- */

.site-main {
    min-height: calc(100vh - var(--header-height) - 74px);
}

.page-shell {
    width: 100%;
    max-width: var(--container);
    padding: clamp(36px, 5vw, 68px) 30px clamp(56px, 7vw, 96px);
    margin: 0 auto;
}

.page-shell--wide {
    max-width: 1280px;
}

.page-shell--narrow {
    max-width: 790px;
}

.page-heading {
    max-width: 760px;
    margin-bottom: clamp(30px, 4vw, 48px);
    animation: fade-up 0.5s ease both;
}

.page-heading--compact {
    margin-bottom: 28px;
}

.page-heading h1 {
    margin-bottom: 18px;
    font-family: var(--font-display);
    font-size: clamp(42px, 5.2vw, 64px);
    line-height: 1.01;
    letter-spacing: -0.028em;
}

.page-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 26px;
}

.page-actions--between {
    justify-content: space-between;
}

/* ---------- generic panels / badges ---------- */

.panel {
    padding: 30px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: rgba(255, 250, 241, 0.74);
    box-shadow: var(--shadow-sm);
}

.panel--flush {
    padding: 0;
    overflow: hidden;
}

.panel__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}

.panel__head h2 {
    margin-bottom: 7px;
    font-family: var(--font-display);
    font-size: clamp(26px, 2.8vw, 34px);
    line-height: 1.08;
    letter-spacing: -0.015em;
}

.panel__head p:not(.eyebrow) {
    max-width: 610px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.55;
}

.panel__head .eyebrow {
    margin-bottom: 10px;
}

.panel__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 28px;
}

.panel__actions--split {
    justify-content: space-between;
    padding-top: 22px;
    border-top: 1px solid var(--line);
}

.count-badge {
    display: inline-grid;
    place-items: center;
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: 50%;
    color: var(--muted);
    background: var(--cream);
    font-size: 12px;
    font-weight: 650;
    font-variant-numeric: tabular-nums;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 22px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    white-space: nowrap;
}

.badge--green {
    color: #1e5b45;
    background: rgba(54, 125, 92, 0.12);
}

.badge--red {
    color: var(--red-deep);
    background: rgba(180, 54, 50, 0.1);
}

.badge--muted {
    color: var(--muted);
    background: rgba(19, 37, 31, 0.07);
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 11px;
    border: 1px solid rgba(16, 60, 48, 0.15);
    border-radius: 999px;
    color: var(--pine);
    background: rgba(16, 60, 48, 0.06);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.status-pill > span:first-child {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #3c8c66;
    box-shadow: 0 0 0 3px rgba(60, 140, 102, 0.13);
}

.status-pill--success {
    color: #1e5b45;
    border-color: rgba(54, 125, 92, 0.2);
    background: rgba(54, 125, 92, 0.1);
}

.status-pill--muted {
    color: var(--muted);
    border-color: var(--line);
    background: rgba(19, 37, 31, 0.04);
}

.status-pill--muted > span:first-child {
    background: var(--muted-light);
    box-shadow: none;
}

.meta-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 32px;
    padding: 0 11px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    background: rgba(255, 250, 241, 0.55);
    font-size: 11px;
    font-weight: 600;
}

.meta-chip svg {
    width: 15px;
    height: 15px;
}

.meta-chip--light {
    color: rgba(244, 237, 223, 0.76);
    border-color: rgba(244, 237, 223, 0.16);
    background: rgba(244, 237, 223, 0.06);
}

/* ---------- avatars ---------- */

.avatar {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    overflow: hidden;
    border-radius: 50%;
    isolation: isolate;
    font-family: var(--font-display);
    font-weight: 400;
    line-height: 1;
    color: var(--paper);
    background: var(--pine-soft);
}

.avatar::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: inherit;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar--pine {
    background: linear-gradient(145deg, #2f6b53, #103c30);
}

.avatar--berry {
    background: linear-gradient(145deg, #c05a50, #7e2725);
}

.avatar--gold {
    color: #3c2d18;
    background: linear-gradient(145deg, #e7c88e, #bd8d3e);
}

.avatar--frost {
    color: var(--pine);
    background: linear-gradient(145deg, #dfe9df, #aac0b4);
}

.avatar--moss {
    background: linear-gradient(145deg, #728b67, #3b533d);
}

.avatar--sm {
    width: 38px;
    height: 38px;
    font-size: 15px;
}

.avatar--md {
    width: 52px;
    height: 52px;
    font-size: 20px;
}

.avatar--xl {
    width: 116px;
    height: 116px;
    font-size: 40px;
}

.avatar--portrait {
    width: 100%;
    height: 100%;
    border-radius: 0;
    font-size: clamp(58px, 8vw, 92px);
}

.avatar--ring {
    box-shadow: 0 0 0 5px var(--paper), 0 0 0 6px rgba(19, 37, 31, 0.12);
}

.avatar__initial {
    transform: translateY(1px);
}

.avatar__initial[hidden],
.profile-preview__portrait [data-avatar-fallback][hidden] {
    display: none !important;
}

/* ---------- forms ---------- */

.form-card {
    padding: clamp(24px, 3.2vw, 42px);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--paper);
    box-shadow: var(--shadow-sm);
}

.form-section + .form-section {
    padding-top: 30px;
    margin-top: 30px;
    border-top: 1px solid var(--line);
}

.form-section__head {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.form-section__head h2 {
    margin-bottom: 5px;
    font-family: var(--font-display);
    font-size: 26px;
    line-height: 1.1;
}

.form-section__head p {
    color: var(--muted);
    font-size: 12.5px;
}

.form-section__num {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    flex: 0 0 auto;
    border: 1px solid var(--line);
    border-radius: 50%;
    color: var(--red);
    font-size: 10px;
    font-weight: 700;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.field__label {
    color: var(--ink-soft);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.field input,
.field textarea,
.field select,
.rule-field select {
    width: 100%;
    padding: 13px 15px;
    border: 1px solid var(--line-strong);
    border-radius: 13px;
    background: var(--paper-strong);
    color: var(--ink);
    font-size: 14px;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.field textarea {
    min-height: 132px;
    line-height: 1.6;
    resize: vertical;
}

.field input::placeholder,
.field textarea::placeholder {
    color: #a4aea7;
}

.field input:focus,
.field textarea:focus,
.field select:focus,
.rule-field select:focus {
    outline: none;
    border-color: var(--pine);
    box-shadow: 0 0 0 4px rgba(16, 60, 48, 0.08);
    background: #fff;
}

.field__footer {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.field__hint {
    color: var(--muted-light);
    font-size: 11px;
}

.char-counter {
    flex: 0 0 auto;
    color: var(--muted);
    font-size: 10px;
    font-variant-numeric: tabular-nums;
}

.field__error {
    color: var(--red-deep);
    font-size: 11px;
    line-height: 1.4;
}

.field__error:empty {
    display: none;
}

.field__error--standalone {
    display: block;
    margin-top: 7px;
}

.field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.field-row + .field-row {
    margin-top: 16px;
}

.field-row + .field {
    margin-top: 18px;
}

.form-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding-top: 30px;
    margin-top: 32px;
    border-top: 1px solid var(--line);
}

.form-actions__note {
    margin-left: auto;
    color: var(--muted-light);
    font-size: 11px;
}

.form-alert {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 13px 16px;
    margin-bottom: 24px;
    border: 1px solid rgba(180, 54, 50, 0.22);
    border-radius: 12px;
    color: var(--red-deep);
    background: rgba(180, 54, 50, 0.05);
    font-size: 12px;
}

.form-alert strong {
    font-size: 13px;
}

.form-save-note {
    max-width: 420px;
    color: var(--muted-light);
    font-size: 11px;
    line-height: 1.45;
}

.form-save-note.is-dirty {
    color: var(--red-deep);
    font-weight: 600;
}

body.modal-open {
    overflow: hidden;
}

.notice {
    display: flex;
    align-items: flex-start;
    gap: 13px;
    padding: 16px 18px;
    border: 1px solid var(--line);
    border-radius: 15px;
    background: var(--cream);
}

.notice--warning {
    border-color: rgba(180, 54, 50, 0.19);
    background: rgba(180, 54, 50, 0.045);
}

.notice--muted {
    background: rgba(19, 37, 31, 0.035);
}

.notice__icon {
    display: grid;
    place-items: center;
    width: 23px;
    height: 23px;
    flex: 0 0 auto;
    border-radius: 50%;
    color: var(--red);
    background: rgba(180, 54, 50, 0.1);
    font-size: 12px;
    font-weight: 800;
}

.notice--muted .notice__icon {
    color: var(--muted);
    background: rgba(19, 37, 31, 0.06);
}

.notice strong {
    display: block;
    margin-bottom: 2px;
    font-size: 12px;
}

.notice p {
    color: var(--muted);
    font-size: 11.5px;
    line-height: 1.5;
}

/* ---------- landing hero ---------- */

.page-landing {
    background: var(--cream);
}

.hero {
    position: relative;
    overflow: hidden;
    padding: clamp(48px, 6vw, 86px) 30px clamp(70px, 8vw, 108px);
    color: var(--cream);
    background:
        radial-gradient(circle at 78% 22%, rgba(180, 54, 50, 0.24), transparent 30rem),
        radial-gradient(circle at 7% 2%, rgba(213, 168, 86, 0.11), transparent 26rem),
        linear-gradient(138deg, #0a2a22 0%, #103c30 55%, #153f31 100%);
}

.hero::after {
    content: "";
    position: absolute;
    right: -120px;
    bottom: -300px;
    width: 620px;
    height: 620px;
    border: 1px solid rgba(244, 237, 223, 0.07);
    border-radius: 50%;
    box-shadow:
        0 0 0 60px rgba(244, 237, 223, 0.025),
        0 0 0 120px rgba(244, 237, 223, 0.018);
    pointer-events: none;
}

.hero__inner {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(350px, 0.85fr);
    align-items: center;
    gap: clamp(40px, 6vw, 90px);
    max-width: 1240px;
    margin: 0 auto;
}

.hero__copy {
    padding: 14px 0;
}

.hero__title {
    max-width: 810px;
    margin-bottom: 25px;
    font-family: var(--font-display);
    font-size: clamp(52px, 6.8vw, 92px);
    font-weight: 400;
    line-height: 0.95;
    letter-spacing: -0.035em;
}

.hero__title em {
    color: var(--gold);
    font-style: italic;
}

.hero__lead {
    max-width: 580px;
    color: rgba(244, 237, 223, 0.66);
    font-size: 15px;
    line-height: 1.72;
}

.hero__facts {
    display: flex;
    align-items: stretch;
    gap: 0;
    max-width: 640px;
    margin-top: 32px;
    padding: 18px 0;
    border-top: 1px solid rgba(244, 237, 223, 0.12);
    border-bottom: 1px solid rgba(244, 237, 223, 0.12);
}

.hero-fact {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
    padding: 0 26px;
    border-left: 1px solid rgba(244, 237, 223, 0.12);
}

.hero-fact:first-child {
    padding-left: 0;
    border-left: 0;
}

.hero-fact__value {
    overflow: hidden;
    color: var(--cream);
    font-family: var(--font-display);
    font-size: 22px;
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hero-fact__label {
    color: rgba(244, 237, 223, 0.45);
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.hero__steps {
    display: flex;
    gap: 30px;
    max-width: 700px;
    margin-top: 31px;
}

.hero-step {
    display: flex;
    gap: 10px;
    min-width: 0;
}

.hero-step__num {
    padding-top: 2px;
    color: var(--gold);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.hero-step p {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.hero-step strong {
    font-size: 11px;
    font-weight: 650;
}

.hero-step span:not(.hero-step__num) {
    color: rgba(244, 237, 223, 0.42);
    font-size: 10px;
    line-height: 1.45;
}

.hero__glow {
    position: absolute;
    z-index: 1;
    border-radius: 50%;
    filter: blur(2px);
    pointer-events: none;
}

.hero__glow--one {
    top: 12%;
    right: 10%;
    width: 480px;
    height: 480px;
    background: radial-gradient(circle, rgba(180, 54, 50, 0.16), transparent 68%);
}

.hero__glow--two {
    bottom: 1%;
    left: 2%;
    width: 380px;
    height: 380px;
    background: radial-gradient(circle, rgba(213, 168, 86, 0.08), transparent 70%);
}

.hero__snow span {
    position: absolute;
    z-index: 1;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: rgba(244, 237, 223, 0.45);
    animation: snow-pulse 5s ease-in-out infinite;
}

.hero__snow span:nth-child(1) { top: 16%; left: 44%; animation-delay: -0.5s; }
.hero__snow span:nth-child(2) { top: 28%; left: 55%; animation-delay: -1.6s; }
.hero__snow span:nth-child(3) { top: 13%; left: 70%; animation-delay: -2.4s; }
.hero__snow span:nth-child(4) { top: 56%; left: 8%; animation-delay: -3.1s; }
.hero__snow span:nth-child(5) { top: 76%; left: 49%; animation-delay: -1.1s; }
.hero__snow span:nth-child(6) { top: 38%; left: 92%; animation-delay: -2.8s; }
.hero__snow span:nth-child(7) { top: 68%; left: 76%; animation-delay: -0.2s; }
.hero__snow span:nth-child(8) { top: 84%; left: 23%; animation-delay: -3.7s; }

/* ---------- login ticket ---------- */

.login-card {
    position: relative;
    width: 100%;
    max-width: 430px;
    justify-self: end;
    color: var(--ink);
    background: var(--paper);
    border-radius: 26px;
    box-shadow: var(--shadow-lg);
    transform: rotate(1.1deg);
    animation: ticket-in 0.7s cubic-bezier(0.22, 0.8, 0.25, 1) both;
}

.login-card__notch {
    position: absolute;
    top: 83px;
    z-index: 2;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #0d3027;
}

.login-card__notch--left {
    left: -12px;
}

.login-card__notch--right {
    right: -12px;
}

.login-card__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 28px 16px;
}

.ticket-number {
    color: var(--muted-light);
    font-family: var(--font-display);
    font-size: 12px;
    font-style: italic;
}

.login-card__body {
    padding: 9px 28px 26px;
    border-top: 1px dashed var(--line-strong);
    border-bottom: 1px dashed var(--line-strong);
}

.login-card__body h2 {
    margin: 12px 0 12px;
    font-family: var(--font-display);
    font-size: clamp(31px, 3vw, 38px);
    line-height: 1.04;
    letter-spacing: -0.025em;
}

.login-card__body > p {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.62;
}

.telegram-login {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    margin: 20px 0 12px;
}

.telegram-login iframe {
    border-radius: 12px !important;
}

.login-card__secure {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 8px 0 0 !important;
    color: var(--muted-light) !important;
    font-size: 10px !important;
}

.login-card__secure svg {
    width: 13px;
    height: 13px;
}

.telegram-bot-button {
    margin-top: 9px !important;
    color: var(--pine) !important;
}

.login-card__fallback {
    margin: 7px 0 0 !important;
    color: var(--muted-light) !important;
    font-size: 9.5px !important;
    line-height: 1.45 !important;
    text-align: center;
}

.btn--telegram {
    color: #fff;
    background: #229ed9;
    box-shadow: 0 8px 22px rgba(34, 158, 217, 0.22);
}

.btn--telegram:hover {
    background: #1789bd;
}

/* ---------- bot login ---------- */

.bot-login-card {
    padding: clamp(26px, 4vw, 46px);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--paper);
    box-shadow: var(--shadow-md);
}

.bot-login-card h1 {
    margin-bottom: 17px;
    font-family: var(--font-display);
    font-size: clamp(42px, 5.4vw, 60px);
    line-height: 0.99;
    letter-spacing: -0.03em;
}

.bot-login-card h1 em {
    color: var(--red);
    font-style: italic;
}

.bot-steps {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0;
    margin: 28px 0 24px;
    list-style: none;
    border-top: 1px solid var(--line);
}

.bot-steps li {
    display: flex;
    align-items: flex-start;
    gap: 13px;
    padding: 15px 0;
    border-bottom: 1px solid var(--line);
}

.bot-steps__num {
    display: grid;
    place-items: center;
    width: 27px;
    height: 27px;
    flex: 0 0 auto;
    border: 1px solid var(--line-strong);
    border-radius: 50%;
    color: var(--red);
    font-size: 8px;
    font-weight: 700;
}

.bot-steps strong {
    display: block;
    margin-bottom: 2px;
    font-size: 12px;
}

.bot-steps p {
    color: var(--muted);
    font-size: 10.5px;
    line-height: 1.55;
}

.bot-steps b {
    color: var(--ink-soft);
    font-weight: 650;
}

.bot-wait {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    margin-top: 16px;
    border: 1px solid rgba(34, 158, 217, 0.18);
    border-radius: 14px;
    background: rgba(34, 158, 217, 0.045);
}

.bot-wait__spinner {
    width: 22px;
    height: 22px;
    flex: 0 0 auto;
    border: 2px solid rgba(34, 158, 217, 0.2);
    border-top-color: #229ed9;
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
}

.bot-wait strong {
    display: block;
    margin-bottom: 1px;
    font-size: 11px;
}

.bot-wait span:not(.bot-wait__spinner) {
    display: block;
    color: var(--muted);
    font-size: 9.5px;
    line-height: 1.45;
}

.bot-login-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-top: 22px;
    color: var(--muted-light);
    font-size: 9px;
}

.bot-login-footer .text-link {
    font-size: 10px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.login-disabled {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
    padding: 16px;
    margin: 20px 0 7px;
    border: 1px dashed var(--line-strong);
    border-radius: 14px;
    background: var(--cream);
}

.login-disabled__icon {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    margin-bottom: 4px;
    border-radius: 50%;
    color: var(--pine);
    background: rgba(16, 60, 48, 0.08);
}

.login-disabled__icon svg {
    width: 18px;
    height: 18px;
}

.login-disabled strong {
    font-size: 12px;
}

.login-disabled span {
    color: var(--muted);
    font-size: 10.5px;
    line-height: 1.5;
}

.login-card__stub {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 28px 19px;
    color: var(--muted);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.login-card__stub svg {
    width: 28px;
    height: 28px;
    color: var(--gold);
    opacity: 0.75;
}

.login-card .status-pill {
    margin-bottom: 4px;
}

/* ---------- landing sections ---------- */

.landing-section {
    max-width: var(--container);
    padding: clamp(64px, 8vw, 108px) 30px;
    margin: 0 auto;
}

.section-heading {
    max-width: 660px;
    margin-bottom: 44px;
}

.section-heading--center {
    margin-right: auto;
    margin-left: auto;
    text-align: center;
}

.section-heading h2 {
    margin-bottom: 15px;
    font-family: var(--font-display);
    font-size: clamp(36px, 4.4vw, 53px);
    line-height: 1.05;
    letter-spacing: -0.025em;
}

.section-heading p:not(.eyebrow) {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.65;
}

.section-heading--row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 30px;
    max-width: none;
}

.section-heading--row .eyebrow {
    margin-bottom: 10px;
}

.section-heading--row h2 {
    margin-bottom: 0;
}

.section-heading__side {
    padding-bottom: 8px;
    color: var(--muted);
    font-size: 11px;
    white-space: nowrap;
}

.how-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.how-card {
    position: relative;
    min-height: 250px;
    padding: 27px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: rgba(255, 250, 241, 0.5);
    transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.how-card:hover {
    transform: translateY(-4px);
    background: var(--paper);
    box-shadow: var(--shadow-md);
}

.how-card__num {
    display: block;
    margin-bottom: 39px;
    color: var(--red);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.14em;
}

.how-card__icon {
    position: absolute;
    top: 24px;
    right: 25px;
    width: 38px;
    height: 38px;
    color: var(--muted-light);
}

.how-card__icon svg {
    width: 100%;
    height: 100%;
}

.how-card h3 {
    margin-bottom: 10px;
    font-family: var(--font-display);
    font-size: 24px;
    letter-spacing: -0.01em;
}

.how-card p {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.65;
}

.admin-feature {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(370px, 0.9fr);
    align-items: center;
    gap: clamp(40px, 7vw, 100px);
    max-width: 1240px;
    padding: clamp(46px, 6vw, 78px);
    margin: 0 auto;
    overflow: hidden;
    border-radius: var(--radius-xl);
    color: var(--cream);
    background:
        radial-gradient(circle at 84% 30%, rgba(180, 54, 50, 0.22), transparent 24rem),
        linear-gradient(130deg, #0b2b22, #143d30);
}

.admin-feature h2 {
    margin-bottom: 20px;
    font-family: var(--font-display);
    font-size: clamp(40px, 4.8vw, 59px);
    line-height: 1.02;
    letter-spacing: -0.03em;
}

.admin-feature__copy > p:not(.eyebrow) {
    max-width: 510px;
    color: rgba(244, 237, 223, 0.58);
    font-size: 13px;
    line-height: 1.7;
}

.check-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 0;
    margin: 25px 0 30px;
    list-style: none;
}

.check-list li {
    display: flex;
    gap: 10px;
    color: rgba(244, 237, 223, 0.82);
    font-size: 12px;
}

.check-list li span {
    color: var(--gold);
}

.admin-feature__visual {
    position: relative;
    padding: 20px;
}

.mini-sheet {
    position: relative;
    z-index: 1;
    padding: 22px;
    color: var(--ink);
    background: var(--paper);
    border-radius: 18px;
    box-shadow: var(--shadow-lg);
    transform: rotate(-2.2deg);
}

.mini-sheet__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 14px;
    margin-bottom: 6px;
    border-bottom: 1px solid var(--line);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.mini-sheet__seal {
    display: inline-grid;
    place-items: center;
    width: 41px;
    height: 41px;
    border: 1px solid rgba(180, 54, 50, 0.38);
    border-radius: 50%;
    color: var(--red);
    font-family: var(--font-display);
    font-size: 9px;
    font-style: italic;
    letter-spacing: 0;
    text-transform: none;
    transform: rotate(8deg);
}

.mini-row {
    display: grid;
    grid-template-columns: 27px 1fr 18px 27px 1fr 35px;
    align-items: center;
    gap: 7px;
    padding: 11px 0;
    border-bottom: 1px solid rgba(19, 37, 31, 0.075);
}

.mini-avatar {
    display: grid;
    place-items: center;
    width: 27px;
    height: 27px;
    border-radius: 50%;
    color: var(--paper);
    font-family: var(--font-display);
    font-size: 11px;
}

.mini-avatar--one { background: #356550; }
.mini-avatar--two { background: #a74a40; }
.mini-avatar--three { background: #9c7b3b; }
.mini-avatar--four { background: #546b4b; }
.mini-avatar--five { background: #6f4b4a; }

.mini-name {
    overflow: hidden;
    font-size: 10px;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mini-arrow {
    color: var(--muted-light);
    font-size: 11px;
}

.mini-status {
    justify-self: end;
    color: var(--muted);
    font-size: 8px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.mini-sheet__foot {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    padding-top: 14px;
    margin-top: 4px;
    color: var(--muted-light);
    font-size: 8px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.mini-seal {
    position: absolute;
    right: -12px;
    bottom: -20px;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 98px;
    height: 98px;
    border: 1px solid rgba(180, 54, 50, 0.48);
    border-radius: 50%;
    color: var(--red);
    background: rgba(255, 250, 241, 0.94);
    font-family: var(--font-display);
    font-size: 10px;
    font-style: italic;
    line-height: 1.2;
    text-align: center;
    transform: rotate(11deg);
    box-shadow: 0 0 0 5px rgba(255, 250, 241, 0.16);
}

.landing-cta {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 40px;
    max-width: var(--container);
    padding: clamp(50px, 7vw, 88px) 30px clamp(70px, 8vw, 100px);
    margin: 0 auto;
    border-top: 1px solid var(--line);
}

.landing-cta h2 {
    font-family: var(--font-display);
    font-size: clamp(38px, 5vw, 61px);
    line-height: 1.02;
    letter-spacing: -0.03em;
}

.landing-cta__action {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 17px;
    max-width: 360px;
    padding-bottom: 4px;
}

.landing-cta__action p {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
}

/* ---------- profile ---------- */

.profile-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(290px, 350px);
    gap: 28px;
    align-items: start;
}

.profile-preview {
    position: sticky;
    top: calc(var(--header-height) + 26px);
}

.profile-preview > .ticket-label {
    display: block;
    margin: 0 0 10px 5px;
}

.profile-preview__card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--paper);
    box-shadow: var(--shadow-sm);
}

.profile-preview__portrait {
    position: relative;
    display: grid;
    place-items: center;
    aspect-ratio: 1.1 / 1;
    overflow: hidden;
    color: var(--paper);
    background:
        radial-gradient(circle at 70% 20%, rgba(213, 168, 86, 0.4), transparent 45%),
        linear-gradient(145deg, #d0a154, #9c6d30);
    font-family: var(--font-display);
    font-size: 72px;
}

.profile-preview__portrait img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-preview__portrait::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 65%, rgba(19, 37, 31, 0.28));
    pointer-events: none;
}

.profile-preview__body {
    padding: 22px;
}

.profile-preview__tag {
    color: var(--red);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.profile-preview__body h2 {
    margin: 8px 0 17px;
    font-family: var(--font-display);
    font-size: 30px;
    line-height: 1.08;
    word-break: break-word;
}

.profile-preview__wishes {
    padding-top: 15px;
    border-top: 1px solid var(--line);
}

.profile-preview__wishes span {
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.profile-preview__wishes p {
    display: -webkit-box;
    overflow: hidden;
    color: var(--ink-soft);
    font-size: 12px;
    line-height: 1.55;
    overflow-wrap: anywhere;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 7;
}

.privacy-note {
    display: flex;
    gap: 11px;
    padding: 15px;
    margin-top: 12px;
    border: 1px solid rgba(16, 60, 48, 0.12);
    border-radius: 15px;
    background: rgba(16, 60, 48, 0.045);
}

.privacy-note__icon {
    display: grid;
    place-items: center;
    width: 25px;
    height: 25px;
    flex: 0 0 auto;
    color: var(--pine);
}

.privacy-note__icon svg {
    width: 18px;
    height: 18px;
}

.privacy-note p {
    color: var(--muted);
    font-size: 10.5px;
    line-height: 1.5;
}

.privacy-note strong {
    color: var(--ink);
}

.telegram-photo-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    margin-bottom: 8px;
    border: 1px solid rgba(34, 158, 217, 0.18);
    border-radius: 17px;
    background: rgba(34, 158, 217, 0.045);
}

.telegram-photo-card strong {
    display: block;
    margin-bottom: 3px;
    font-size: 12px;
}

.telegram-photo-card p {
    color: var(--muted);
    font-size: 10.5px;
    line-height: 1.5;
}

.telegram-photo-card .avatar {
    width: 58px;
    height: 58px;
    font-size: 22px;
}

.upload-zone {
    display: grid;
    grid-template-columns: 108px minmax(0, 1fr);
    align-items: center;
    gap: 18px;
    padding: 14px;
    border: 1.5px dashed rgba(19, 37, 31, 0.22);
    border-radius: 17px;
    background: var(--cream);
    cursor: pointer;
    transition: border-color 0.18s ease, background 0.18s ease;
}

.upload-zone:hover,
.upload-zone.is-dragover {
    border-color: var(--pine);
    background: rgba(16, 60, 48, 0.045);
}

.upload-zone__preview {
    display: grid;
    place-items: center;
    width: 108px;
    height: 108px;
    overflow: hidden;
    border-radius: 12px;
    background: var(--pine);
}

.upload-zone__preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.upload-zone__preview.is-empty {
    color: rgba(244, 237, 223, 0.7);
    background:
        radial-gradient(circle at 70% 25%, rgba(213, 168, 86, 0.32), transparent 55%),
        var(--pine);
}

.upload-zone__placeholder svg {
    width: 38px;
    height: 38px;
}

.upload-zone__body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.upload-zone__title {
    font-family: var(--font-display);
    font-size: 19px;
    line-height: 1.2;
}

.upload-zone__hint {
    overflow: hidden;
    color: var(--muted);
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.upload-zone__meta {
    margin-top: 3px;
    color: var(--muted-light);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* ---------- participants ---------- */

.event-banner {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 285px;
    align-items: center;
    gap: 30px;
    padding: clamp(30px, 4vw, 52px);
    overflow: hidden;
    border-radius: var(--radius-xl);
    color: var(--cream);
    background:
        radial-gradient(circle at 92% 10%, rgba(213, 168, 86, 0.2), transparent 25rem),
        radial-gradient(circle at 5% 90%, rgba(180, 54, 50, 0.2), transparent 25rem),
        linear-gradient(130deg, #0a2a22, #143f31);
    animation: fade-up 0.5s ease both;
}

.event-banner::after {
    content: "";
    position: absolute;
    right: -100px;
    bottom: -160px;
    width: 360px;
    height: 360px;
    border: 1px solid rgba(244, 237, 223, 0.08);
    border-radius: 50%;
    box-shadow: 0 0 0 45px rgba(244, 237, 223, 0.025), 0 0 0 90px rgba(244, 237, 223, 0.018);
}

.event-banner__copy {
    position: relative;
    z-index: 1;
}

.event-banner h1 {
    margin-bottom: 12px;
    font-family: var(--font-display);
    font-size: clamp(42px, 5.5vw, 68px);
    line-height: 0.98;
    letter-spacing: -0.03em;
}

.event-banner__tagline {
    max-width: 560px;
    color: rgba(244, 237, 223, 0.61);
    font-size: 13px;
    line-height: 1.6;
}

.event-banner__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 24px;
}

.self-ticket {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 16px;
    border: 1px solid rgba(244, 237, 223, 0.18);
    border-radius: 17px;
    background: rgba(244, 237, 223, 0.075);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}

.self-ticket .status-pill {
    min-height: 19px;
    padding: 3px 7px;
    color: var(--gold-soft);
    border-color: rgba(213, 168, 86, 0.2);
    background: rgba(213, 168, 86, 0.08);
    font-size: 8px;
}

.self-ticket .status-pill > span:first-child {
    background: var(--gold);
    box-shadow: none;
}

.self-ticket__copy {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.self-ticket__copy strong {
    overflow: hidden;
    color: var(--cream);
    font-family: var(--font-display);
    font-size: 19px;
    font-weight: 400;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.self-ticket__copy a {
    color: rgba(244, 237, 223, 0.55);
    font-size: 10px;
    transition: color 0.18s ease;
}

.self-ticket__copy a:hover {
    color: var(--gold);
}

.participants-section {
    padding-top: clamp(38px, 5vw, 62px);
}

.participant-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.participant-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--paper);
    box-shadow: var(--shadow-sm);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.participant-card:hover {
    transform: translateY(-4px);
    border-color: rgba(19, 37, 31, 0.2);
    box-shadow: var(--shadow-md);
}

.participant-card.is-current {
    border-color: rgba(180, 54, 50, 0.38);
    box-shadow: 0 0 0 1px rgba(180, 54, 50, 0.1), var(--shadow-sm);
}

.participant-card__photo {
    position: relative;
    aspect-ratio: 1.38 / 1;
    overflow: hidden;
    background: var(--pine);
}

.participant-card__photo .avatar {
    transition: transform 0.5s cubic-bezier(0.22, 0.8, 0.25, 1);
}

.participant-card:hover .participant-card__photo .avatar {
    transform: scale(1.025);
}

.participant-card__you {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 5px 9px;
    border-radius: 999px;
    color: var(--paper);
    background: var(--red);
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    box-shadow: 0 4px 12px rgba(99, 23, 21, 0.25);
}

.participant-card__body {
    padding: 20px 21px 22px;
}

.participant-card__title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.participant-card__title h3 {
    overflow: hidden;
    font-family: var(--font-display);
    font-size: 27px;
    line-height: 1.1;
    letter-spacing: -0.015em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.participant-card__status {
    display: grid;
    place-items: center;
    width: 21px;
    height: 21px;
    flex: 0 0 auto;
    border-radius: 50%;
    color: #2d6b51;
    background: rgba(45, 107, 81, 0.09);
}

.participant-card__status svg {
    width: 13px;
    height: 13px;
}

.participant-card__wishes {
    padding-top: 14px;
    margin-top: 13px;
    border-top: 1px solid var(--line);
}

.participant-card__wishes span {
    display: block;
    margin-bottom: 5px;
    color: var(--muted-light);
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.participant-card__wishes p {
    display: -webkit-box;
    overflow: hidden;
    color: var(--ink-soft);
    font-size: 11.5px;
    line-height: 1.55;
    overflow-wrap: anywhere;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
}

.waiting-note {
    display: flex;
    align-items: center;
    gap: 19px;
    padding: 22px 26px;
    margin-top: 30px;
    border: 1px dashed rgba(19, 37, 31, 0.24);
    border-radius: var(--radius-md);
    background: rgba(255, 250, 241, 0.35);
}

.waiting-note__icon {
    display: grid;
    place-items: center;
    width: 45px;
    height: 45px;
    flex: 0 0 auto;
    border-radius: 50%;
    color: var(--pine);
    background: rgba(16, 60, 48, 0.06);
}

.waiting-note__icon svg {
    width: 25px;
    height: 25px;
}

.waiting-note h3 {
    margin-bottom: 4px;
    font-family: var(--font-display);
    font-size: 20px;
}

.waiting-note p {
    max-width: 730px;
    color: var(--muted);
    font-size: 11.5px;
    line-height: 1.6;
}

.waiting-note__tag {
    flex: 0 0 auto;
    padding: 5px 10px;
    margin-left: auto;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* ---------- secret gift page ---------- */

.secret-hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    padding: clamp(32px, 4.5vw, 56px);
    overflow: hidden;
    border-radius: var(--radius-xl);
    color: var(--cream);
    background:
        radial-gradient(circle at 92% 0%, rgba(180, 54, 50, 0.33), transparent 26rem),
        radial-gradient(circle at 8% 100%, rgba(213, 168, 86, 0.13), transparent 25rem),
        linear-gradient(130deg, #08251d, #123b2e 58%, #3e211e);
    animation: fade-up 0.55s ease both;
}

.secret-hero::after {
    content: "";
    position: absolute;
    top: -170px;
    right: 180px;
    width: 470px;
    height: 470px;
    border: 1px solid rgba(244, 237, 223, 0.06);
    border-radius: 50%;
    box-shadow: 0 0 0 55px rgba(244, 237, 223, 0.02), 0 0 0 110px rgba(244, 237, 223, 0.014);
}

.secret-hero__copy {
    position: relative;
    z-index: 1;
}

.secret-hero h1 {
    margin-bottom: 17px;
    font-family: var(--font-display);
    font-size: clamp(44px, 6vw, 74px);
    line-height: 0.94;
    letter-spacing: -0.035em;
}

.secret-hero h1 em {
    color: var(--gold);
    font-style: italic;
}

.secret-hero p:not(.eyebrow) {
    max-width: 610px;
    color: rgba(244, 237, 223, 0.61);
    font-size: 13px;
    line-height: 1.65;
}

.secret-stamp {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 148px;
    height: 148px;
    flex: 0 0 auto;
    border: 1px solid rgba(244, 237, 223, 0.36);
    border-radius: 50%;
    color: var(--gold-soft);
    text-align: center;
    transform: rotate(8deg);
    box-shadow: inset 0 0 0 6px rgba(244, 237, 223, 0.05);
}

.secret-stamp__ring {
    position: absolute;
    inset: 8px;
    border: 1px dashed rgba(244, 237, 223, 0.3);
    border-radius: 50%;
}

.secret-stamp > span:not(.secret-stamp__ring) {
    font-family: var(--font-display);
    font-size: 17px;
    letter-spacing: 0.02em;
}

.secret-stamp small {
    margin-top: 3px;
    color: rgba(244, 237, 223, 0.5);
    font-size: 8px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.gift-layout {
    display: grid;
    grid-template-columns: minmax(330px, 0.8fr) minmax(0, 1.55fr);
    gap: 22px;
    align-items: start;
    padding-top: 24px;
}

.ward-column {
    position: sticky;
    top: calc(var(--header-height) + 20px);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ward-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--paper);
    box-shadow: var(--shadow-sm);
}

.ward-card__top {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 30px 24px 24px;
    text-align: center;
    background:
        radial-gradient(circle at 50% 0%, rgba(213, 168, 86, 0.2), transparent 80%),
        var(--pine);
}

.ward-card__label {
    position: absolute;
    top: 16px;
    left: 18px;
    color: rgba(244, 237, 223, 0.5);
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.ward-card__name h2 {
    margin-top: 16px;
    color: var(--cream);
    font-family: var(--font-display);
    font-size: 32px;
    line-height: 1.05;
    letter-spacing: -0.02em;
}

.ward-card__role {
    display: block;
    margin-top: 4px;
    color: rgba(244, 237, 223, 0.48);
    font-size: 9px;
    letter-spacing: 0.04em;
}

.ward-card__body {
    padding: 22px;
}

.wish-block {
    padding: 17px;
    border: 1px solid rgba(19, 37, 31, 0.09);
    border-radius: 15px;
    background: var(--cream);
}

.wish-block__label {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    color: var(--red);
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.wish-block__label svg {
    width: 14px;
    height: 14px;
}

.wish-block p {
    color: var(--ink-soft);
    font-size: 12px;
    line-height: 1.62;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.ward-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    padding-top: 18px;
    margin-top: 18px;
    border-top: 1px solid var(--line);
}

.ward-meta div {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ward-meta span {
    color: var(--muted-light);
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.ward-meta strong {
    font-size: 11.5px;
    font-weight: 650;
}

.ward-card__foot {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 13px 22px 16px;
    border-top: 1px dashed var(--line);
    color: var(--muted);
    font-size: 9.5px;
}

.ward-card__foot strong {
    color: var(--ink-soft);
    font-weight: 650;
}

.incognito-card {
    display: flex;
    gap: 12px;
    padding: 16px;
    border: 1px solid rgba(180, 54, 50, 0.15);
    border-radius: 17px;
    background: rgba(180, 54, 50, 0.045);
}

.incognito-card__icon {
    display: grid;
    place-items: center;
    width: 35px;
    height: 35px;
    flex: 0 0 auto;
    border-radius: 50%;
    color: var(--red);
    background: rgba(180, 54, 50, 0.08);
}

.incognito-card__icon svg {
    width: 22px;
    height: 22px;
}

.incognito-card h3 {
    margin-bottom: 3px;
    font-family: var(--font-display);
    font-size: 17px;
}

.incognito-card p {
    color: var(--muted);
    font-size: 10px;
    line-height: 1.5;
}

.chats-column {
    min-width: 0;
}

.chats-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 14px;
}

.chats-heading .eyebrow {
    margin-bottom: 7px;
}

.chats-heading h2 {
    font-family: var(--font-display);
    font-size: clamp(29px, 3vw, 37px);
    line-height: 1.05;
    letter-spacing: -0.02em;
}

.live-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 9px;
    border: 1px solid rgba(45, 107, 81, 0.15);
    border-radius: 999px;
    color: #346a53;
    background: rgba(45, 107, 81, 0.055);
    font-size: 8px;
    font-weight: 650;
    letter-spacing: 0.03em;
}

.live-badge > span {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #3c8c66;
    animation: live-pulse 2s ease-in-out infinite;
}

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

.chat-panel {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: var(--paper);
    box-shadow: var(--shadow-sm);
}

.chat-panel__head {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 16px 16px 13px;
    border-bottom: 1px solid var(--line);
}

.chat-panel__icon {
    display: grid;
    place-items: center;
    width: 33px;
    height: 33px;
    flex: 0 0 auto;
    border-radius: 50%;
    color: var(--pine);
    background: rgba(16, 60, 48, 0.07);
}

.chat-panel--ward .chat-panel__icon {
    color: var(--red);
    background: rgba(180, 54, 50, 0.07);
}

.chat-panel__icon svg {
    width: 21px;
    height: 21px;
}

.chat-panel__title {
    min-width: 0;
}

.chat-panel__title h3 {
    margin-bottom: 3px;
    overflow: hidden;
    font-family: var(--font-display);
    font-size: 18px;
    line-height: 1.12;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-panel__title p {
    display: -webkit-box;
    overflow: hidden;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.4;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.chat-panel__count {
    display: grid;
    place-items: center;
    min-width: 21px;
    height: 21px;
    padding: 0 5px;
    margin-left: auto;
    border-radius: 999px;
    color: var(--muted);
    background: rgba(19, 37, 31, 0.055);
    font-size: 8px;
    font-variant-numeric: tabular-nums;
}

.chat-messages {
    display: flex;
    flex-direction: column;
    gap: 8px;
    height: 385px;
    padding: 14px;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: rgba(19, 37, 31, 0.18) transparent;
}

.chat-messages::-webkit-scrollbar {
    width: 5px;
}

.chat-messages::-webkit-scrollbar-thumb {
    border-radius: 4px;
    background: rgba(19, 37, 31, 0.15);
}

.chat-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 100%;
    padding: 18px;
    color: var(--muted);
    text-align: center;
}

.chat-empty__icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border: 1px dashed var(--line-strong);
    border-radius: 50%;
    color: var(--muted-light);
}

.chat-empty__icon svg {
    width: 26px;
    height: 26px;
}

.chat-empty p {
    max-width: 230px;
    font-size: 10px;
    line-height: 1.55;
}

.chat-bubble {
    max-width: 88%;
    padding: 8px 11px 9px;
    border-radius: 13px;
    animation: bubble-in 0.22s ease both;
}

.chat-bubble--other {
    align-self: flex-start;
    border: 1px solid var(--line);
    border-bottom-left-radius: 4px;
    background: var(--cream);
}

.chat-bubble--mine {
    align-self: flex-end;
    border-bottom-right-radius: 4px;
    color: var(--paper);
    background: var(--pine);
}

.chat-bubble__meta {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 3px;
    font-size: 8px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    opacity: 0.68;
}

.chat-bubble--mine .chat-bubble__meta {
    justify-content: flex-end;
}

.chat-bubble__meta span {
    font-weight: 700;
}

.chat-bubble p {
    font-size: 12.5px;
    line-height: 1.5;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.chat-form {
    display: flex;
    align-items: flex-end;
    gap: 7px;
    padding: 10px 11px 7px;
    border-top: 1px solid var(--line);
    background: var(--paper-strong);
}

.chat-form textarea {
    width: 100%;
    min-height: 36px;
    max-height: 100px;
    padding: 9px 11px;
    overflow-y: auto;
    border: 1px solid var(--line-strong);
    border-radius: 12px;
    background: var(--paper);
    font-size: 12px;
    line-height: 1.4;
    resize: none;
}

.chat-form textarea:focus {
    outline: none;
    border-color: var(--pine);
    box-shadow: 0 0 0 3px rgba(16, 60, 48, 0.07);
}

.chat-send {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    flex: 0 0 auto;
    padding: 0;
    border: 0;
    border-radius: 50%;
    color: var(--paper);
    background: var(--pine);
    transition: background 0.18s ease, transform 0.18s ease;
}

.chat-send:hover {
    background: var(--red);
    transform: translateY(-1px);
}

.chat-send svg {
    width: 18px;
    height: 18px;
}

.chat-panel--ward .chat-send {
    background: var(--red);
}

.chat-panel--ward .chat-send:hover {
    background: var(--red-deep);
}

.chat-panel__hint {
    padding: 0 12px 9px;
    color: var(--muted-light);
    font-size: 7.5px;
    text-align: right;
}

/* ---------- admin shared ---------- */

.page-admin {
    background: var(--cream);
}

.admin-page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 32px;
    margin-bottom: clamp(28px, 4vw, 44px);
    animation: fade-up 0.5s ease both;
}

.admin-page-head--compact {
    align-items: center;
}

.admin-page-head h1 {
    margin-bottom: 10px;
    font-family: var(--font-display);
    font-size: clamp(43px, 5.2vw, 65px);
    line-height: 0.98;
    letter-spacing: -0.03em;
}

.admin-page-head .page-lead {
    font-size: 14px;
}

.admin-page-head .eyebrow {
    margin-bottom: 12px;
}

.admin-page-head__actions {
    display: flex;
    align-items: center;
    gap: 9px;
    flex: 0 0 auto;
    flex-wrap: wrap;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.stat-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 154px;
    padding: 20px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--paper);
    box-shadow: var(--shadow-sm);
}

.stat-card__label {
    position: relative;
    z-index: 1;
    color: var(--muted);
    font-size: 8.5px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.stat-card__value {
    position: relative;
    z-index: 1;
    margin-top: auto;
    font-family: var(--font-display);
    font-size: clamp(30px, 3.2vw, 40px);
    font-weight: 400;
    line-height: 1;
    letter-spacing: -0.03em;
}

.stat-card__note {
    position: relative;
    z-index: 1;
    margin-top: 4px;
    color: var(--muted-light);
    font-size: 9.5px;
}

.stat-card__ornament {
    position: absolute;
    right: 12px;
    bottom: -12px;
    color: rgba(19, 37, 31, 0.04);
    font-family: var(--font-display);
    font-size: 82px;
    line-height: 1;
}

.admin-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.72fr);
    gap: 18px;
    margin-bottom: 18px;
}

.readiness-panel {
    padding-bottom: 26px;
}

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

.checklist__item {
    display: flex;
    align-items: flex-start;
    gap: 13px;
    padding: 15px 0;
    border-top: 1px solid var(--line);
}

.checklist__item:first-child {
    border-top: 0;
    padding-top: 0;
}

.checklist__mark {
    display: grid;
    place-items: center;
    width: 25px;
    height: 25px;
    flex: 0 0 auto;
    border: 1px solid var(--line-strong);
    border-radius: 50%;
    color: var(--muted);
    font-size: 9px;
    font-weight: 700;
}

.checklist__item.is-done .checklist__mark {
    color: var(--paper);
    border-color: var(--pine);
    background: var(--pine);
}

.checklist__item strong {
    display: block;
    margin-bottom: 2px;
    font-size: 12px;
}

.checklist__item p {
    color: var(--muted);
    font-size: 10.5px;
    line-height: 1.5;
}

.draw-complete-banner {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 19px;
    border: 1px solid rgba(45, 107, 81, 0.16);
    border-radius: 15px;
    background: rgba(45, 107, 81, 0.06);
}

.draw-complete-banner__icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
    border-radius: 50%;
    color: #2d6b51;
    background: rgba(45, 107, 81, 0.1);
}

.draw-complete-banner__icon svg {
    width: 24px;
    height: 24px;
}

.draw-complete-banner strong {
    display: block;
    margin-bottom: 2px;
    font-size: 12px;
}

.draw-complete-banner p {
    color: var(--muted);
    font-size: 10px;
    line-height: 1.5;
}

.draw-complete-banner .text-link {
    flex: 0 0 auto;
    margin-left: auto;
    font-size: 10px;
}

.summary-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin: 0 0 20px;
}

.summary-list div {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    padding: 11px 0;
    border-top: 1px solid var(--line);
}

.summary-list div:first-child {
    border-top: 0;
    padding-top: 0;
}

.summary-links {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}

.admin-participation-note {
    margin-bottom: 16px;
}

.admin-participation-note .text-link {
    margin-top: 4px;
}

.summary-list dt {
    color: var(--muted);
    font-size: 10px;
}

.summary-list dd {
    max-width: 60%;
    font-size: 11px;
    font-weight: 650;
    text-align: right;
}

.event-summary .text-link {
    font-size: 10px;
}

.participant-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.participant-strip__item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px 5px 5px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--cream);
}

.participant-strip__item span {
    font-size: 10.5px;
    font-weight: 600;
}

.mini-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 24px;
    padding: 14px 18px;
    margin-bottom: 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255, 250, 241, 0.45);
    color: var(--muted);
    font-size: 10.5px;
}

.mini-stats strong {
    color: var(--ink);
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 400;
}

.mini-note {
    max-width: 760px;
    margin: 0 0 18px 4px;
    color: var(--muted-light);
    font-size: 9.5px;
    line-height: 1.5;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    text-align: center;
}

.empty-state--small {
    padding: 20px 5px;
}

.empty-state__icon {
    display: grid;
    place-items: center;
    width: 55px;
    height: 55px;
    margin-bottom: 14px;
    border: 1px dashed var(--line-strong);
    border-radius: 50%;
    color: var(--muted);
}

.empty-state__icon svg {
    width: 29px;
    height: 29px;
}

.empty-state h3 {
    margin-bottom: 5px;
    font-family: var(--font-display);
    font-size: 22px;
}

.empty-state p {
    max-width: 410px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.55;
}

/* ---------- admin tables ---------- */

.table-wrap {
    width: 100%;
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
    text-align: left;
}

.admin-table th {
    padding: 12px 16px;
    border-bottom: 1px solid var(--line);
    color: var(--muted);
    background: rgba(19, 37, 31, 0.025);
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 0.11em;
    text-transform: uppercase;
    white-space: nowrap;
}

.admin-table td {
    padding: 13px 16px;
    border-bottom: 1px solid rgba(19, 37, 31, 0.075);
    vertical-align: middle;
}

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

.admin-table tbody tr {
    transition: background 0.15s ease;
}

.admin-table tbody tr:hover {
    background: rgba(213, 168, 86, 0.035);
}

.table-person {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 140px;
}

.table-person strong {
    font-size: 11.5px;
    font-weight: 650;
}

.table-person .badge {
    margin-left: 5px;
}

.table-wishes {
    display: -webkit-box;
    max-width: 360px;
    overflow: hidden;
    color: var(--muted);
    font-size: 10.5px;
    line-height: 1.5;
    overflow-wrap: anywhere;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.telegram-link {
    color: var(--pine);
    font-size: 10.5px;
    text-decoration: underline;
    text-decoration-color: rgba(16, 60, 48, 0.24);
    text-underline-offset: 3px;
}

.telegram-link:hover {
    color: var(--red);
}

.table-date {
    color: var(--muted);
    font-size: 10px;
    white-space: nowrap;
}

/* ---------- draw ---------- */

.draw-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 18px;
    align-items: start;
}

.draw-main {
    display: flex;
    flex-direction: column;
    gap: 18px;
    min-width: 0;
}

.draw-aside {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.rules-panel .panel__head p {
    max-width: 660px;
}

.rule-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 28px minmax(0, 1fr) 38px;
    gap: 10px;
    padding: 0 2px 7px;
    color: var(--muted-light);
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.rule-head span:nth-child(2),
.rule-head span:nth-child(4) {
    visibility: hidden;
}

.rule-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rule-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 28px minmax(0, 1fr) 38px;
    align-items: end;
    gap: 10px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: var(--cream);
}

.rule-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.rule-field__label {
    display: none;
}

.rule-field select {
    padding: 9px 29px 9px 10px;
    border-color: rgba(19, 37, 31, 0.16);
    border-radius: 9px;
    background-color: var(--paper);
    font-size: 11px;
    cursor: pointer;
}

.rule-arrow {
    align-self: center;
    padding-top: 7px;
    color: var(--muted-light);
    font-size: 15px;
    text-align: center;
}

.rule-row .icon-btn {
    width: 34px;
    height: 34px;
    margin-bottom: 1px;
}

.rule-row .icon-btn svg {
    width: 16px;
    height: 16px;
}

.rule-empty {
    padding: 13px 14px;
    margin-top: 8px;
    border: 1px dashed var(--line);
    border-radius: 11px;
    color: var(--muted);
    background: rgba(19, 37, 31, 0.02);
    font-size: 10.5px;
}

.add-rule {
    margin-top: 10px;
}

.switch-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    margin-top: 20px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: rgba(19, 37, 31, 0.023);
    cursor: pointer;
}

.switch-row input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}

.switch {
    position: relative;
    width: 37px;
    height: 21px;
    flex: 0 0 auto;
    margin-top: 2px;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    background: var(--cream-deep);
    transition: background 0.18s ease, border-color 0.18s ease;
}

.switch span {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: var(--muted);
    transition: transform 0.18s ease, background 0.18s ease;
}

.switch-row input:checked + .switch {
    border-color: var(--pine);
    background: var(--pine);
}

.switch-row input:checked + .switch span {
    background: var(--paper);
    transform: translateX(16px);
}

.switch-row input:focus-visible + .switch {
    outline: 3px solid rgba(180, 54, 50, 0.35);
    outline-offset: 3px;
}

.switch-row__copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.switch-row__copy strong {
    font-size: 11.5px;
}

.switch-row__copy small {
    color: var(--muted);
    font-size: 10px;
    line-height: 1.5;
}

.draw-launch {
    position: relative;
    overflow: hidden;
}

.draw-launch__icon {
    width: 44px;
    height: 44px;
    color: var(--red);
    opacity: 0.8;
}

.draw-launch__icon svg {
    width: 100%;
    height: 100%;
}

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

.draw-facts div {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: var(--cream);
}

.draw-facts span {
    color: var(--muted);
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.draw-facts strong {
    overflow: hidden;
    font-size: 11px;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.draw-launch__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
}

.draw-launch__hint {
    max-width: 600px;
    margin-top: 11px;
    color: var(--muted-light);
    font-size: 9.5px;
    line-height: 1.5;
}

.draw-people {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0;
    margin: 0;
    list-style: none;
}

.draw-people li {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 8px 0;
    border-top: 1px solid var(--line);
}

.draw-people li:first-child {
    border-top: 0;
}

.draw-people span:not(.avatar):not(.draw-people__check) {
    overflow: hidden;
    font-size: 10.5px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.draw-people__check {
    margin-left: auto;
    color: #3c8c66;
    font-size: 10px;
}

.aside-note {
    padding: 19px;
    border: 1px solid rgba(180, 54, 50, 0.14);
    border-radius: 17px;
    background: rgba(180, 54, 50, 0.04);
}

.aside-note--neutral {
    border-color: var(--line);
    background: rgba(19, 37, 31, 0.025);
}

.aside-note__mark {
    display: inline-grid;
    place-items: center;
    width: 22px;
    height: 22px;
    margin-bottom: 10px;
    border-radius: 50%;
    color: var(--red);
    background: rgba(180, 54, 50, 0.1);
    font-size: 10px;
    font-weight: 800;
}

.aside-note--neutral .aside-note__mark {
    color: var(--muted);
    background: rgba(19, 37, 31, 0.06);
}

.aside-note h3 {
    margin-bottom: 7px;
    font-family: var(--font-display);
    font-size: 18px;
}

.aside-note p {
    color: var(--muted);
    font-size: 10px;
    line-height: 1.55;
}

.aside-note ul {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 0;
    margin: 10px 0 0;
    list-style: none;
    color: var(--muted);
    font-size: 9.5px;
    line-height: 1.5;
}

.aside-note li {
    position: relative;
    padding-left: 12px;
}

.aside-note li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--red);
}

/* ---------- modal ---------- */

.modal {
    width: min(455px, calc(100vw - 32px));
    padding: 0;
    border: 0;
    border-radius: 24px;
    color: var(--ink);
    background: transparent;
    overflow: visible;
}

.modal::backdrop {
    background: rgba(7, 25, 20, 0.62);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
}

.modal__content {
    position: relative;
    padding: 33px;
    border: 1px solid rgba(255, 250, 241, 0.4);
    border-radius: 24px;
    background: var(--paper);
    box-shadow: var(--shadow-lg);
    animation: modal-in 0.22s ease both;
}

.modal__close {
    position: absolute;
    top: 14px;
    right: 16px;
    width: 29px;
    height: 29px;
    border: 1px solid var(--line);
    border-radius: 50%;
    color: var(--muted);
    background: transparent;
    font-size: 19px;
    line-height: 1;
}

.modal__seal {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    margin-bottom: 18px;
    border: 1px solid rgba(180, 54, 50, 0.2);
    border-radius: 50%;
    color: var(--red);
    background: rgba(180, 54, 50, 0.06);
    font-family: var(--font-display);
    font-size: 20px;
}

.modal__seal--danger {
    font-weight: 700;
}

.modal__content h2 {
    margin-bottom: 12px;
    font-family: var(--font-display);
    font-size: 32px;
    line-height: 1.05;
    letter-spacing: -0.02em;
}

.modal__content > p:not(.eyebrow) {
    color: var(--muted);
    font-size: 11.5px;
    line-height: 1.6;
}

.modal__facts {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 15px;
}

.modal__facts span {
    padding: 5px 9px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    font-size: 9px;
}

.modal__actions {
    display: flex;
    justify-content: flex-end;
    gap: 9px;
    padding-top: 21px;
    margin-top: 22px;
    border-top: 1px solid var(--line);
}

/* ---------- results ---------- */

.result-summary {
    display: flex;
    align-items: stretch;
    gap: 0;
    margin-bottom: 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255, 250, 241, 0.55);
}

.result-summary__item {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1px;
    min-width: 150px;
    padding: 15px 20px;
    border-left: 1px solid var(--line);
    color: var(--muted);
    font-size: 9px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.result-summary__item:first-child {
    border-left: 0;
}

.result-summary__value {
    color: var(--ink);
    font-family: var(--font-display);
    font-size: 31px;
    line-height: 1;
    letter-spacing: -0.03em;
}

.result-summary__item--note {
    flex: 1;
    flex-direction: row;
    align-items: center;
    gap: 9px;
    margin-left: auto;
    border-left: 0;
    font-size: 9.5px;
    line-height: 1.45;
    letter-spacing: 0;
    text-transform: none;
}

.result-summary__icon {
    display: grid;
    place-items: center;
    width: 27px;
    height: 27px;
    flex: 0 0 auto;
    border-radius: 50%;
    color: var(--pine);
    background: rgba(16, 60, 48, 0.06);
}

.result-summary__icon svg {
    width: 16px;
    height: 16px;
}

.results-panel {
    border-radius: 18px;
}

.results-table th,
.results-table td {
    padding-right: 18px;
    padding-left: 18px;
}

.results-table .cell-number {
    width: 44px;
    color: var(--muted-light);
    font-family: var(--font-display);
    font-size: 15px;
    font-variant-numeric: tabular-nums;
}

.results-table .cell-arrow {
    width: 25px;
    color: var(--red);
    font-size: 15px;
    text-align: center;
}

.results-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;
    padding: 21px 3px 0;
}

.results-footer h3 {
    margin-bottom: 3px;
    font-family: var(--font-display);
    font-size: 20px;
}

.results-footer p {
    max-width: 660px;
    color: var(--muted);
    font-size: 10.5px;
    line-height: 1.55;
}

/* ---------- settings ---------- */

.settings-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 350px);
    gap: 24px;
    align-items: start;
}

.settings-aside {
    position: sticky;
    top: calc(var(--header-height) + 22px);
    display: flex;
    flex-direction: column;
    gap: 13px;
}

.mini-preview {
    padding: 21px;
    border-radius: 15px;
    color: var(--cream);
    background:
        radial-gradient(circle at 95% 5%, rgba(180, 54, 50, 0.28), transparent 13rem),
        var(--pine);
}

.mini-preview__eyebrow {
    display: block;
    margin-bottom: 13px;
    color: var(--gold);
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.mini-preview h3 {
    margin-bottom: 7px;
    font-family: var(--font-display);
    font-size: 29px;
    line-height: 1.02;
    letter-spacing: -0.02em;
}

.mini-preview p {
    display: -webkit-box;
    overflow: hidden;
    color: rgba(244, 237, 223, 0.56);
    font-size: 10px;
    line-height: 1.55;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.mini-preview__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 15px;
}

.mini-preview__meta span {
    padding: 4px 7px;
    border: 1px solid rgba(244, 237, 223, 0.15);
    border-radius: 999px;
    color: rgba(244, 237, 223, 0.65);
    font-size: 8px;
}

/* ---------- dev page ---------- */

.dev-panel {
    margin-top: 15px;
}

.dev-accounts {
    display: flex;
    flex-direction: column;
    border-top: 1px solid var(--line);
}

.dev-account {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 2px;
    border-bottom: 1px solid var(--line);
    transition: padding 0.18s ease, background 0.18s ease;
}

.dev-account:hover {
    padding-right: 8px;
    padding-left: 8px;
    background: rgba(213, 168, 86, 0.045);
}

.dev-account__copy {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.dev-account__copy strong {
    overflow: hidden;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dev-account__copy > span {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.dev-account__action {
    margin-left: auto;
    color: var(--muted);
    font-size: 10px;
    font-weight: 650;
    white-space: nowrap;
}

.dev-account:hover .dev-account__action {
    color: var(--red);
}

.inline-form {
    display: flex;
    align-items: flex-end;
    gap: 10px;
}

.field--inline {
    max-width: 330px;
}

.empty-note {
    padding: 20px 0;
    color: var(--muted);
    font-size: 11px;
}

/* ---------- states ---------- */

.error-state,
.closed-state {
    position: relative;
    padding: clamp(30px, 5vw, 55px) 0;
    text-align: center;
}

.error-state__ornament {
    display: grid;
    place-items: center;
    width: 112px;
    height: 112px;
    margin: 0 auto 25px;
    border: 1px dashed rgba(180, 54, 50, 0.4);
    border-radius: 50%;
    color: var(--red);
    font-family: var(--font-display);
    font-size: 35px;
    transform: rotate(-5deg);
}

.error-state h1,
.closed-state h1 {
    margin-bottom: 16px;
    font-family: var(--font-display);
    font-size: clamp(43px, 6vw, 68px);
    line-height: 1;
    letter-spacing: -0.035em;
}

.error-state .page-lead,
.closed-state .page-lead {
    margin: 0 auto;
}

.error-state__actions,
.closed-state__actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 27px;
}

.error-state__id {
    margin-top: 30px;
    color: var(--muted-light);
    font-size: 9px;
    word-break: break-all;
}

.error-state__id code {
    font-size: 8px;
}

.closed-state__seal {
    display: grid;
    place-items: center;
    width: 135px;
    height: 135px;
    margin: 0 auto 26px;
    border: 1px solid rgba(180, 54, 50, 0.4);
    border-radius: 50%;
    color: var(--red);
    font-family: var(--font-display);
    font-size: 18px;
    font-style: italic;
    transform: rotate(-7deg);
    box-shadow: inset 0 0 0 6px rgba(180, 54, 50, 0.04);
}

.closed-state__meta {
    display: inline-block;
    padding: 7px 13px;
    margin-top: 23px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    font-size: 9px;
}

/* ---------- toast ---------- */

.toast-stack {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 120;
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: min(390px, calc(100vw - 32px));
}

.toast {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 13px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--paper);
    box-shadow: var(--shadow-md);
    animation: toast-in 0.3s ease both;
}

.toast--success {
    border-color: rgba(45, 107, 81, 0.22);
}

.toast--error {
    border-color: rgba(180, 54, 50, 0.24);
}

.toast__icon {
    display: grid;
    place-items: center;
    width: 23px;
    height: 23px;
    flex: 0 0 auto;
    border-radius: 50%;
    color: #2d6b51;
    background: rgba(45, 107, 81, 0.1);
}

.toast--error .toast__icon {
    color: var(--red);
    background: rgba(180, 54, 50, 0.1);
}

.toast__icon svg {
    width: 14px;
    height: 14px;
}

.toast p {
    padding-top: 2px;
    color: var(--ink-soft);
    font-size: 11px;
    line-height: 1.45;
}

.toast__close {
    margin-left: auto;
    padding: 0 2px;
    border: 0;
    color: var(--muted-light);
    background: transparent;
    font-size: 16px;
    line-height: 1;
}

.toast.is-leaving {
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

/* ---------- animations ---------- */

@keyframes fade-up {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes ticket-in {
    from { opacity: 0; transform: translateY(20px) rotate(3deg); }
    to { opacity: 1; transform: translateY(0) rotate(1.1deg); }
}

@keyframes snow-pulse {
    0%, 100% { opacity: 0.2; transform: scale(0.8); }
    50% { opacity: 0.8; transform: scale(1.2); }
}

@keyframes live-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(60, 140, 102, 0.25); }
    50% { box-shadow: 0 0 0 4px rgba(60, 140, 102, 0.05); }
}

@keyframes bubble-in {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes modal-in {
    from { opacity: 0; transform: scale(0.97) translateY(8px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes toast-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ---------- responsive ---------- */

@media (max-width: 1180px) {
    .header-inner {
        gap: 20px;
        padding: 0 22px;
    }

    .nav-link {
        padding: 9px 10px;
        font-size: 12px;
    }

    .user-chip {
        max-width: 160px;
    }

    .gift-layout {
        grid-template-columns: minmax(300px, 0.75fr) minmax(0, 1.5fr);
    }

    .chats-grid {
        grid-template-columns: 1fr;
    }

    .chat-messages {
        height: 260px;
    }

    .chat-panel--santa .chat-messages {
        height: 300px;
    }

    .ward-column {
        top: calc(var(--header-height) + 16px);
    }
}

@media (max-width: 1020px) {
    .hero__inner {
        grid-template-columns: 1fr;
        gap: 42px;
    }

    .hero__copy {
        max-width: 760px;
    }

    .login-card {
        justify-self: start;
        max-width: 470px;
    }

    .admin-feature {
        grid-template-columns: 1fr;
        gap: 50px;
    }

    .admin-feature__visual {
        max-width: 480px;
    }

    .participant-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .admin-grid {
        grid-template-columns: 1fr;
    }

    .gift-layout {
        grid-template-columns: 1fr;
    }

    .ward-column {
        position: static;
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 0.7fr);
        align-items: start;
    }

    .gift-layout .ward-card {
        grid-row: span 2;
    }

    .chats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .chat-messages {
        height: 320px;
    }

    .draw-layout {
        grid-template-columns: 1fr;
    }

    .draw-aside {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        align-items: start;
    }

    .profile-layout,
    .settings-layout {
        grid-template-columns: 1fr;
    }

    .profile-preview,
    .settings-aside {
        position: static;
    }

    .profile-preview {
        order: -1;
    }

    .profile-preview__card {
        display: grid;
        grid-template-columns: 130px minmax(0, 1fr);
    }

    .profile-preview__portrait {
        aspect-ratio: auto;
        min-height: 170px;
    }

    .profile-preview__body {
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .profile-preview > .ticket-label {
        display: none;
    }

    .privacy-note {
        margin-top: 10px;
    }
}

@media (max-width: 900px) {
    :root {
        --header-height: 70px;
    }

    .header-inner {
        padding: 0 18px;
    }

    .nav-toggle {
        display: flex;
    }

    .main-nav {
        position: absolute;
        top: calc(100% + 1px);
        left: 14px;
        right: 14px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
        padding: 10px;
        border: 1px solid var(--line);
        border-radius: 16px;
        background: var(--paper);
        box-shadow: var(--shadow-md);
    }

    .site-header.is-menu-open .main-nav {
        display: flex;
    }

    .nav-link {
        padding: 11px 12px;
        color: var(--ink-soft);
        font-size: 13px;
    }

    .nav-link.is-active {
        background: rgba(16, 60, 48, 0.06);
    }

    .nav-link.is-active::after {
        display: none;
    }

    .user-chip__copy {
        display: none;
    }

    .user-chip {
        padding: 3px;
        border: 0;
        background: transparent;
    }

    .header-account {
        margin-left: auto;
    }

    .header-note {
        display: none;
    }

    .brand-sub {
        display: none;
    }

    .hero {
        padding-right: 22px;
        padding-left: 22px;
    }

    .hero__title {
        font-size: clamp(48px, 9.5vw, 78px);
    }

    .hero__steps {
        gap: 20px;
    }

    .landing-section {
        padding-right: 22px;
        padding-left: 22px;
    }

    .how-grid {
        grid-template-columns: 1fr;
    }

    .how-card {
        min-height: 0;
        padding: 23px;
    }

    .how-card__num {
        margin-bottom: 25px;
    }

    .admin-feature {
        margin-right: 22px;
        margin-left: 22px;
        padding: 36px 28px;
    }

    .landing-cta {
        align-items: flex-start;
        flex-direction: column;
        padding-right: 22px;
        padding-left: 22px;
    }

    .page-shell {
        padding-right: 20px;
        padding-left: 20px;
    }

    .event-banner {
        grid-template-columns: 1fr;
        gap: 22px;
    }

    .self-ticket {
        max-width: 330px;
    }

    .waiting-note {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .waiting-note__tag {
        margin-left: 64px;
    }

    .secret-hero {
        padding: 32px 27px;
    }

    .secret-stamp {
        width: 118px;
        height: 118px;
    }

    .secret-stamp > span:not(.secret-stamp__ring) {
        font-size: 14px;
    }

    .chats-grid {
        grid-template-columns: 1fr;
    }

    .chat-messages,
    .chat-panel--santa .chat-messages {
        height: 290px;
    }

    .ward-column {
        grid-template-columns: 1fr;
    }

    .gift-layout .ward-card {
        grid-row: auto;
    }

    .incognito-card {
        margin-top: 0;
    }

    .admin-page-head {
        align-items: flex-start;
        flex-direction: column;
        gap: 20px;
    }

    .admin-page-head__actions {
        width: 100%;
    }

    .result-summary {
        flex-wrap: wrap;
    }

    .result-summary__item {
        flex: 1;
        min-width: 130px;
    }

    .result-summary__item--note {
        flex-basis: 100%;
        margin-left: 0;
        border-top: 1px solid var(--line);
    }

    .results-footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .page-actions--between {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 640px) {
    .page-heading h1 {
        font-size: clamp(38px, 11vw, 52px);
    }

    .page-lead {
        font-size: 15px;
    }

    .hero {
        padding-top: 46px;
        padding-bottom: 62px;
    }

    .hero__title {
        font-size: clamp(44px, 13vw, 64px);
    }

    .hero__lead {
        font-size: 14px;
    }

    .hero__facts {
        flex-wrap: wrap;
        gap: 14px 0;
    }

    .hero-fact {
        min-width: 50%;
        padding: 0 16px;
    }

    .hero-fact:nth-child(3) {
        padding-left: 0;
        border-left: 0;
    }

    .hero__steps {
        flex-direction: column;
        gap: 13px;
        margin-top: 25px;
    }

    .login-card {
        transform: none;
        border-radius: 20px;
    }

    .login-card__head,
    .login-card__body,
    .login-card__stub {
        padding-right: 21px;
        padding-left: 21px;
    }

    .login-card__notch {
        top: 78px;
        width: 19px;
        height: 19px;
    }

    .login-card__notch--left { left: -10px; }
    .login-card__notch--right { right: -10px; }

    .section-heading--row {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }

    .section-heading__side {
        padding-bottom: 0;
    }

    .admin-feature {
        margin-right: 14px;
        margin-left: 14px;
        padding: 32px 23px;
        border-radius: 25px;
    }

    .admin-feature h2 {
        font-size: 40px;
    }

    .admin-feature__visual {
        padding: 10px 4px 20px;
    }

    .mini-sheet {
        padding: 16px;
    }

    .mini-row {
        grid-template-columns: 25px 1fr 14px 25px 1fr;
    }

    .mini-status {
        display: none;
    }

    .mini-seal {
        right: 1px;
        bottom: -16px;
        width: 78px;
        height: 78px;
        font-size: 8px;
    }

    .landing-cta {
        padding-top: 46px;
        padding-bottom: 60px;
    }

    .footer-inner {
        flex-wrap: wrap;
        gap: 4px 14px;
        padding: 18px 20px;
    }

    .footer-year {
        margin-left: 0;
    }

    .footer-note {
        width: 100%;
        order: 3;
    }

    .profile-preview__card {
        grid-template-columns: 95px minmax(0, 1fr);
    }

    .profile-preview__portrait {
        min-height: 140px;
        font-size: 48px;
    }

    .profile-preview__body {
        padding: 17px;
    }

    .profile-preview__body h2 {
        margin: 5px 0 11px;
        font-size: 24px;
    }

    .profile-preview__wishes p {
        -webkit-line-clamp: 3;
    }

    .privacy-note {
        display: none;
    }

    .form-section__head h2 {
        font-size: 23px;
    }

    .upload-zone {
        grid-template-columns: 82px minmax(0, 1fr);
        gap: 13px;
    }

    .upload-zone__preview {
        width: 82px;
        height: 82px;
    }

    .upload-zone__title {
        font-size: 17px;
    }

    .upload-zone__hint {
        white-space: normal;
    }

    .form-actions {
        align-items: flex-start;
        flex-direction: column;
    }

    .form-actions__note {
        margin-left: 0;
    }

    .form-actions .btn--large {
        width: 100%;
    }

    .event-banner {
        padding: 27px 23px;
        border-radius: 25px;
    }

    .event-banner h1 {
        font-size: 44px;
    }

    .participant-grid {
        grid-template-columns: 1fr;
    }

    .participant-card__photo {
        aspect-ratio: 1.55 / 1;
    }

    .participant-card__body {
        padding: 17px 18px 19px;
    }

    .waiting-note {
        gap: 13px;
        padding: 17px;
    }

    .waiting-note__tag {
        margin-left: 58px;
    }

    .secret-hero {
        display: block;
        padding: 28px 23px;
        border-radius: 25px;
    }

    .secret-hero h1 {
        font-size: clamp(32px, 9.6vw, 40px);
    }

    .secret-stamp {
        position: absolute;
        right: 15px;
        bottom: 17px;
        width: 83px;
        height: 83px;
        opacity: 0.8;
    }

    .secret-stamp > span:not(.secret-stamp__ring) {
        font-size: 11px;
    }

    .secret-stamp small {
        display: none;
    }

    .secret-hero p:not(.eyebrow) {
        max-width: 75%;
    }

    .ward-card__top {
        padding-top: 28px;
    }

    .chats-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .chat-messages,
    .chat-panel--santa .chat-messages {
        height: 300px;
    }

    .chat-panel__title h3 {
        font-size: 17px;
    }

    .chat-panel__hint {
        display: none;
    }

    .stat-grid {
        grid-template-columns: 1fr 1fr;
        gap: 9px;
    }

    .stat-card {
        min-height: 130px;
        padding: 16px;
    }

    .stat-card__value {
        font-size: 30px;
    }

    .panel {
        padding: 21px;
        border-radius: 19px;
    }

    .panel__head {
        gap: 13px;
        flex-wrap: wrap;
    }

    .panel__head h2 {
        font-size: 27px;
    }

    .draw-aside {
        grid-template-columns: 1fr;
    }

    .rule-head {
        display: none;
    }

    .rule-row {
        grid-template-columns: 1fr 34px;
        gap: 7px;
    }

    .rule-field {
        grid-column: 1;
    }

    .rule-arrow {
        display: none;
    }

    .rule-row .icon-btn {
        grid-column: 2;
        grid-row: 1 / span 2;
        align-self: center;
    }

    .rule-field__label {
        display: block;
        color: var(--muted-light);
        font-size: 7.5px;
        font-weight: 700;
        letter-spacing: 0.08em;
        text-transform: uppercase;
    }

    .draw-facts {
        grid-template-columns: 1fr;
    }

    .draw-facts div {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .switch-row {
        padding: 13px;
    }

    .panel__actions--split {
        align-items: flex-start;
        flex-direction: column;
    }

    .admin-table {
        min-width: 660px;
    }

    .result-summary__item {
        padding: 12px 15px;
    }

    .result-summary__value {
        font-size: 26px;
    }

    .modal__content {
        padding: 26px 21px;
    }

    .modal__content h2 {
        font-size: 28px;
    }

    .modal__actions {
        flex-direction: column-reverse;
    }

    .modal__actions .btn {
        width: 100%;
    }

    .toast-stack {
        right: 12px;
        bottom: 12px;
        width: calc(100vw - 24px);
    }

    .dev-account__action {
        display: none;
    }

    .inline-form {
        align-items: stretch;
        flex-direction: column;
    }

    .field--inline {
        max-width: none;
    }

    .closed-state__actions {
        flex-direction: column;
        align-items: stretch;
    }

    .closed-state__actions form,
    .closed-state__actions .btn {
        width: 100%;
    }

    .profile-preview__portrait::after {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

@media print {
    .site-header,
    .site-footer,
    .admin-page-head__actions,
    .results-footer,
    .toast-stack {
        display: none !important;
    }

    body {
        background: #fff;
    }

    .page-shell {
        max-width: none;
        padding: 0;
    }

    .panel,
    .results-panel {
        border: 0;
        box-shadow: none;
        background: #fff;
    }

    .admin-table {
        font-size: 10px;
    }

    .admin-table th,
    .admin-table td {
        padding: 7px 8px;
        border-bottom: 1px solid #ddd;
    }

    .table-wishes {
        max-width: none;
        -webkit-line-clamp: unset;
    }
}
