/* ==========================================================================
   Kalėdiniai burtai — stilius (be build įrankių)
   Spalvos: tamsiai žalia / raudona / kreminė / auksas. Mobilus pirmiausia.
   ========================================================================== */

:root {
    --green-950: #071f17;
    --green-900: #0b2e23;
    --green: #0f3d2e;
    --green-700: #17533f;
    --green-500: #2f7a5c;
    --green-100: #e3efe8;
    --red: #b3262e;
    --red-700: #8e1c23;
    --red-100: #f8e3e1;
    --cream: #fbf6ee;
    --cream-2: #f4ead8;
    --cream-3: #eadcc3;
    --gold: #c9a34a;
    --gold-light: #e8cf86;
    --gold-dark: #9a7a2c;
    --ink: #1d2a23;
    --muted: #66716a;
    --line: #e4d8c4;
    --white: #fffdf9;

    --radius: 14px;
    --radius-sm: 9px;
    --radius-lg: 22px;
    --shadow-sm: 0 1px 2px rgba(15, 61, 46, .08), 0 1px 1px rgba(15, 61, 46, .04);
    --shadow: 0 6px 20px -8px rgba(15, 61, 46, .25), 0 2px 6px rgba(15, 61, 46, .06);
    --shadow-lg: 0 24px 48px -18px rgba(7, 31, 23, .45);

    --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    --font-serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;

    color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
[x-cloak] { display: none !important; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
    margin: 0;
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.55;
    color: var(--ink);
    background: var(--cream);
    min-height: 100vh;
    min-height: 100dvh;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: var(--font-serif); line-height: 1.2; margin: 0 0 .5em; color: var(--green); font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: clamp(1.7rem, 5vw, 2.4rem); }
h2 { font-size: clamp(1.3rem, 3.6vw, 1.65rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
a { color: var(--red); text-underline-offset: 3px; }
a:hover { color: var(--red-700); }
img, svg { max-width: 100%; }
small, .small { font-size: .875rem; }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.center { text-align: center; }
.stack > * + * { margin-top: 1rem; }
.stack-sm > * + * { margin-top: .5rem; }
.row { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
.row-between { display: flex; gap: .75rem; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.grow { flex: 1 1 auto; }
hr { border: 0; border-top: 1px solid var(--line); margin: 1.5rem 0; }

:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 6px; }

/* ----------------------------------------------------------------- layout */
.container { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 1rem; }
.container-narrow { max-width: 720px; }
@media (min-width: 640px) { .container { padding: 0 1.5rem; } }

.site-header {
    background: linear-gradient(180deg, var(--green-900), var(--green));
    color: var(--cream);
    position: sticky; top: 0; z-index: 30;
    box-shadow: 0 2px 12px rgba(7, 31, 23, .25);
}
.site-header::after { /* auksinė girlianda */
    content: ""; display: block; height: 3px;
    background: repeating-linear-gradient(90deg, var(--gold) 0 18px, var(--red) 18px 36px, var(--gold-light) 36px 54px, var(--green-500) 54px 72px);
    opacity: .9;
}
.site-header__inner { display: flex; align-items: center; gap: 1rem; min-height: 60px; }
.brand { display: inline-flex; align-items: center; gap: .55rem; color: var(--cream); text-decoration: none; font-family: var(--font-serif); font-weight: 700; font-size: 1.15rem; letter-spacing: .01em; }
.brand:hover { color: var(--gold-light); }
.brand svg { width: 30px; height: 30px; flex: none; }
.nav { margin-left: auto; display: flex; align-items: center; gap: .25rem; }
.nav a, .nav button {
    color: var(--cream); text-decoration: none; padding: .5rem .7rem; border-radius: 8px; font-size: .95rem;
    background: none; border: 0; font: inherit; cursor: pointer;
}
.nav a:hover, .nav button:hover, .nav a.is-active { background: rgba(255, 255, 255, .1); color: var(--gold-light); }
.nav__user { display: none; color: rgba(251, 246, 238, .7); font-size: .9rem; padding: 0 .4rem; }
@media (min-width: 720px) { .nav__user { display: inline; } }
.nav-toggle { display: none; }

.main { padding: 1.5rem 0 3rem; }
@media (min-width: 720px) { .main { padding: 2.25rem 0 4rem; } }

.site-footer { padding: 2rem 0 2.5rem; color: var(--muted); font-size: .875rem; text-align: center; }
.site-footer a { color: inherit; }

.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .75rem 1rem; justify-content: space-between; margin-bottom: 1.25rem; }
.page-head h1 { margin: 0; }
.page-head__sub { color: var(--muted); margin: .25rem 0 0; }
.breadcrumb { font-size: .9rem; margin-bottom: .5rem; }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--red); }

/* ----------------------------------------------------------------- cards */
.card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 1.15rem;
}
@media (min-width: 640px) { .card { padding: 1.5rem; } }
.card + .card, .section + .section { margin-top: 1.25rem; }
.card__head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; margin-bottom: 1rem; }
.card__head h2, .card__head h3 { margin: 0; }
.card--accent { border-top: 4px solid var(--red); }
.card--gold { border-top: 4px solid var(--gold); }
.card--green { background: linear-gradient(160deg, var(--green), var(--green-900)); color: var(--cream); border-color: var(--green-900); }
.card--green h2, .card--green h3 { color: var(--gold-light); }
.card--danger { border-color: #e9c3c0; background: #fffaf9; }

.grid { display: grid; gap: 1rem; }
@media (min-width: 640px) { .grid-2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }
.layout-main { display: grid; gap: 1.25rem; }
@media (min-width: 960px) { .layout-main { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; } }

/* ----------------------------------------------------------------- buttons */
.btn {
    --btn-bg: var(--red); --btn-fg: #fff; --btn-border: var(--red);
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    padding: .7rem 1.15rem; min-height: 44px;
    border-radius: 999px; border: 1.5px solid var(--btn-border);
    background: var(--btn-bg); color: var(--btn-fg);
    font: 600 .975rem/1.2 var(--font); text-decoration: none; cursor: pointer;
    transition: transform .12s ease, box-shadow .15s ease, background .15s ease, color .15s ease;
    box-shadow: 0 2px 0 rgba(0, 0, 0, .08);
    -webkit-tap-highlight-color: transparent;
    white-space: nowrap;
}
.btn:hover { --btn-bg: var(--red-700); --btn-border: var(--red-700); color: var(--btn-fg); }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn.is-disabled { opacity: .5; cursor: not-allowed; pointer-events: none; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-green { --btn-bg: var(--green); --btn-border: var(--green); }
.btn-green:hover { --btn-bg: var(--green-700); --btn-border: var(--green-700); }
.btn-gold { --btn-bg: linear-gradient(180deg, var(--gold-light), var(--gold)); --btn-fg: var(--green-950); --btn-border: var(--gold-dark); background: linear-gradient(180deg, var(--gold-light), var(--gold)); }
.btn-gold:hover { --btn-fg: var(--green-950); background: linear-gradient(180deg, #f0dc9f, var(--gold-light)); }
.btn-outline { --btn-bg: transparent; --btn-fg: var(--green); --btn-border: var(--cream-3); box-shadow: none; }
.btn-outline:hover { --btn-bg: var(--cream-2); --btn-fg: var(--green); --btn-border: var(--cream-3); }
.btn-ghost { --btn-bg: transparent; --btn-fg: var(--green); --btn-border: transparent; box-shadow: none; }
.btn-ghost:hover { --btn-bg: var(--cream-2); --btn-fg: var(--green); --btn-border: transparent; }
.btn-danger-outline { --btn-bg: transparent; --btn-fg: var(--red); --btn-border: #e5b9b5; box-shadow: none; }
.btn-danger-outline:hover { --btn-bg: var(--red-100); --btn-fg: var(--red-700); --btn-border: var(--red); }
.btn-sm { padding: .4rem .8rem; min-height: 36px; font-size: .875rem; }
.btn-xs { padding: .25rem .6rem; min-height: 30px; font-size: .8rem; }
.btn-lg { padding: .95rem 1.6rem; min-height: 54px; font-size: 1.075rem; }
.btn-block { width: 100%; }
.btn-icon { padding: 0; width: 40px; min-height: 40px; height: 40px; border-radius: 50%; }
.btn-icon.btn-sm { width: 34px; height: 34px; min-height: 34px; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--red); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.btn-group { display: flex; flex-wrap: wrap; gap: .5rem; }

/* ----------------------------------------------------------------- forms */
.field { margin-bottom: 1rem; }
.field:last-child { margin-bottom: 0; }
label, .label { display: block; font-weight: 600; font-size: .925rem; margin-bottom: .35rem; color: var(--green); }
.label-optional { font-weight: 400; color: var(--muted); font-size: .85rem; }
.input, input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=url], input[type=search], select, textarea {
    width: 100%; display: block;
    padding: .7rem .85rem; min-height: 46px;
    font: 400 1rem/1.4 var(--font); color: var(--ink);
    background: #fff; border: 1.5px solid var(--cream-3); border-radius: var(--radius-sm);
    transition: border-color .15s, box-shadow .15s;
    -webkit-appearance: none; appearance: none;
}
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%230f3d2e' d='M6 8 0 0h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right .9rem center; padding-right: 2.2rem;
}
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--green-500); box-shadow: 0 0 0 4px rgba(47, 122, 92, .15); }
.is-invalid, input.is-invalid, textarea.is-invalid, select.is-invalid { border-color: var(--red); }
.field-error { color: var(--red); font-size: .875rem; margin-top: .3rem; }
.field-help { color: var(--muted); font-size: .85rem; margin-top: .3rem; }
.check { display: flex; gap: .6rem; align-items: flex-start; font-weight: 400; color: var(--ink); cursor: pointer; }
.check input { width: 20px; height: 20px; margin: .15rem 0 0; accent-color: var(--red); flex: none; }
.form-grid { display: grid; gap: 0 1rem; }
@media (min-width: 640px) { .form-grid-2 { grid-template-columns: repeat(2, 1fr); } .form-grid-3 { grid-template-columns: repeat(3, 1fr); } }
.form-actions { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; margin-top: 1.25rem; }
.inline-form { display: inline; }
.input-group { display: flex; gap: .5rem; }
.input-group > input { flex: 1; min-width: 0; }

/* ----------------------------------------------------------------- flash */
.flash { display: flex; gap: .7rem; align-items: flex-start; padding: .85rem 1rem; border-radius: var(--radius-sm); margin-bottom: 1rem; border: 1px solid; font-size: .95rem; }
.flash svg { width: 20px; height: 20px; flex: none; margin-top: 1px; }
.flash--success { background: var(--green-100); border-color: #bcd8c8; color: var(--green); }
.flash--error { background: var(--red-100); border-color: #ecc0bc; color: var(--red-700); }
.flash--info { background: #fdf6e3; border-color: #ecdcae; color: #6b5419; }
.flash__close { margin-left: auto; background: none; border: 0; cursor: pointer; color: inherit; opacity: .6; font-size: 1.2rem; line-height: 1; padding: 0 .2rem; }
.flash__close:hover { opacity: 1; }
.flash ul { margin: 0; padding-left: 1.1rem; }

/* ----------------------------------------------------------------- badges & chips */
.badge { display: inline-flex; align-items: center; gap: .3rem; padding: .2rem .6rem; border-radius: 999px; font-size: .78rem; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; white-space: nowrap; }
.badge--draft { background: var(--cream-2); color: #7a6331; border: 1px solid var(--cream-3); }
.badge--drawn { background: var(--green); color: var(--gold-light); }
.badge--red { background: var(--red-100); color: var(--red-700); }
.badge--muted { background: #eee9df; color: var(--muted); }
.badge--gold { background: #f6ecd0; color: #7b5f1c; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip { display: inline-flex; align-items: center; gap: .4rem; padding: .35rem .75rem; border-radius: 999px; background: var(--cream-2); color: var(--green); font-size: .875rem; border: 1px solid var(--cream-3); }
.chip svg { width: 15px; height: 15px; color: var(--gold-dark); }
.card--green .chip { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .15); color: var(--cream); }
.card--green .chip svg { color: var(--gold-light); }

/* ----------------------------------------------------------------- stats */
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem; }
.stats--3 > .stat:last-child { grid-column: 1 / -1; }
@media (min-width: 720px) { .stats { grid-template-columns: repeat(4, 1fr); } .stats--3 { grid-template-columns: repeat(3, 1fr); } .stats--3 > .stat:last-child { grid-column: auto; } }
.stat { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem 1rem; }
.stat__value { font-family: var(--font-serif); font-size: 1.65rem; font-weight: 700; color: var(--green); line-height: 1.1; }
.stat__value small { font-size: .95rem; color: var(--muted); font-weight: 400; }
.stat__label { font-size: .825rem; color: var(--muted); margin-top: .15rem; }
.meter { height: 6px; background: var(--cream-2); border-radius: 99px; overflow: hidden; margin-top: .55rem; }
.meter > span { display: block; height: 100%; background: linear-gradient(90deg, var(--green-500), var(--green)); border-radius: inherit; transition: width .6s ease; }
.meter--gold > span { background: linear-gradient(90deg, var(--gold-light), var(--gold)); }
.meter--red > span { background: linear-gradient(90deg, #d65a5f, var(--red)); }

/* ----------------------------------------------------------------- group cards (index) */
.group-cards { display: grid; gap: 1rem; }
@media (min-width: 640px) { .group-cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .group-cards { grid-template-columns: repeat(3, 1fr); } }
.group-card {
    position: relative; display: flex; flex-direction: column; gap: .75rem;
    background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg);
    padding: 1.25rem; text-decoration: none; color: inherit; overflow: hidden;
    box-shadow: var(--shadow-sm); transition: transform .15s ease, box-shadow .2s ease, border-color .2s;
}
.group-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 5px; background: linear-gradient(90deg, var(--red), var(--gold), var(--green-500)); }
.group-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--cream-3); color: inherit; }
.group-card h3 { margin: 0; font-size: 1.25rem; }
.group-card__meta { display: flex; flex-wrap: wrap; gap: .4rem 1rem; font-size: .875rem; color: var(--muted); }
.group-card__meta span { display: inline-flex; align-items: center; gap: .35rem; }
.group-card__meta svg { width: 15px; height: 15px; color: var(--gold-dark); }
.group-card__foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: .5rem; font-size: .875rem; }
.group-card--new { align-items: center; justify-content: center; text-align: center; border: 2px dashed var(--cream-3); background: transparent; box-shadow: none; min-height: 190px; color: var(--green); font-weight: 600; }
.group-card--new::before { display: none; }
.group-card--new svg { width: 36px; height: 36px; color: var(--red); }

.empty { text-align: center; padding: 2.5rem 1rem; }
.empty svg { width: 96px; height: 96px; margin-bottom: 1rem; }
.empty h2 { margin-bottom: .35rem; }

/* ----------------------------------------------------------------- group header */
.group-hero { position: relative; overflow: hidden; border-radius: var(--radius-lg); padding: 1.35rem; margin-bottom: 1.25rem; }
@media (min-width: 640px) { .group-hero { padding: 1.75rem 2rem; } }
.group-hero h1 { color: var(--cream); margin: .35rem 0 .5rem; }
.group-hero p { color: rgba(251, 246, 238, .82); margin-bottom: .9rem; max-width: 60ch; }
.group-hero__deco { position: absolute; right: -20px; top: -20px; width: 180px; height: 180px; opacity: .14; pointer-events: none; }
.group-hero .btn-outline { --btn-fg: var(--cream); --btn-border: rgba(255, 255, 255, .3); }
.group-hero .btn-outline:hover { --btn-bg: rgba(255, 255, 255, .1); --btn-fg: var(--gold-light); --btn-border: rgba(255, 255, 255, .45); }

/* ----------------------------------------------------------------- participant list (organizer) */
.plist { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.pitem { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; padding: .85rem .95rem; display: grid; gap: .6rem; grid-template-columns: 1fr; }
@media (min-width: 720px) { .pitem { grid-template-columns: minmax(0, 1fr) auto; align-items: center; } }
.pitem__name { font-weight: 700; color: var(--green); display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.pitem__sub { font-size: .85rem; color: var(--muted); overflow-wrap: anywhere; }
.pitem__status { display: flex; flex-wrap: wrap; gap: .35rem .9rem; font-size: .82rem; margin-top: .35rem; }
.status-dot { display: inline-flex; align-items: center; gap: .3rem; color: var(--muted); }
.status-dot::before { content: "—"; font-weight: 700; color: #b9b2a5; }
.status-dot.is-on { color: var(--green-700); }
.status-dot.is-on::before { content: "✔"; color: var(--green-500); }
.pitem__actions { display: flex; gap: .35rem; flex-wrap: wrap; align-items: center; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: inline-grid; place-items: center; font-weight: 700; font-size: .9rem; color: #fff; background: var(--green-700); flex: none; font-family: var(--font-serif); }
.avatar--1 { background: var(--red); } .avatar--2 { background: var(--gold-dark); } .avatar--3 { background: var(--green-500); } .avatar--4 { background: #6b4b8a; } .avatar--5 { background: #2f5f8a; }

.dropdown { position: relative; }
.dropdown__menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; min-width: 210px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow); padding: .35rem; }
.dropdown__menu a, .dropdown__menu button { display: flex; width: 100%; align-items: center; gap: .55rem; padding: .55rem .7rem; border-radius: 7px; color: var(--ink); text-decoration: none; background: none; border: 0; font: inherit; font-size: .925rem; cursor: pointer; text-align: left; }
.dropdown__menu a:hover, .dropdown__menu button:hover { background: var(--cream-2); color: var(--green); }
.dropdown__menu svg { width: 17px; height: 17px; color: var(--muted); }
.dropdown__menu .is-danger { color: var(--red); }

details.disclosure { border: 1px dashed var(--cream-3); border-radius: var(--radius); padding: .1rem .95rem; background: rgba(255, 255, 255, .5); }
details.disclosure[open] { padding-bottom: .95rem; background: #fff; border-style: solid; }
details.disclosure > summary { cursor: pointer; padding: .75rem 0; font-weight: 600; color: var(--green); list-style: none; display: flex; align-items: center; gap: .5rem; }
details.disclosure > summary::-webkit-details-marker { display: none; }
details.disclosure > summary::before { content: "+"; display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--red); color: #fff; font-weight: 700; line-height: 1; }
details.disclosure[open] > summary::before { content: "–"; }

/* family chips */
.family-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.family-item { display: flex; align-items: center; gap: .6rem; padding: .6rem .8rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; flex-wrap: wrap; }
.family-item__name { font-weight: 600; color: var(--green); }
.family-item__members { font-size: .85rem; color: var(--muted); flex: 1 1 100%; }
@media (min-width: 640px) { .family-item__members { flex: 1 1 auto; } }

.exclusion-item { display: flex; align-items: center; gap: .6rem; padding: .55rem .8rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; }
.exclusion-item__arrow { color: var(--red); font-weight: 700; }

/* copy link */
.copy-field { display: flex; align-items: stretch; border: 1.5px solid var(--cream-3); border-radius: var(--radius-sm); overflow: hidden; background: #fff; }
.copy-field input { border: 0; min-height: 40px; font-size: .85rem; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--muted); background: transparent; border-radius: 0; }
.copy-field input:focus { box-shadow: none; }
.copy-field button { border: 0; border-left: 1.5px solid var(--cream-3); background: var(--cream-2); color: var(--green); font-weight: 600; padding: 0 .9rem; cursor: pointer; font-size: .875rem; white-space: nowrap; }
.copy-field button:hover { background: var(--cream-3); }

/* tables */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
table.table { width: 100%; border-collapse: collapse; font-size: .925rem; }
.table th, .table td { padding: .65rem .85rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { background: var(--cream-2); color: var(--green); font-weight: 700; font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; white-space: nowrap; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #fdfaf4; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table code { font-size: .8rem; }

/* pairs */
.pairs { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.pair { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: .75rem; padding: .7rem 1rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.pair__arrow { color: var(--gold-dark); }
.pair__to { text-align: right; font-weight: 600; color: var(--red-700); }

/* mail progress */
.mail-box { border-radius: var(--radius); padding: 1rem; background: #fdf8ec; border: 1px solid #efe0b6; }
.mail-box__msg { font-size: .925rem; margin: .5rem 0 0; }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; display: inline-block; animation: spin 1s linear infinite; vertical-align: -3px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* pagination */
.pagination { display: flex; gap: .35rem; flex-wrap: wrap; justify-content: center; margin-top: 1.25rem; list-style: none; padding: 0; }
.pagination a, .pagination span { display: inline-flex; min-width: 38px; height: 38px; align-items: center; justify-content: center; padding: 0 .7rem; border-radius: 9px; border: 1px solid var(--line); background: #fff; text-decoration: none; color: var(--green); font-size: .9rem; }
.pagination .is-active span { background: var(--green); color: #fff; border-color: var(--green); }
.pagination .is-disabled span { opacity: .45; }

/* tabs (admin) */
.tabs { display: flex; gap: .35rem; overflow-x: auto; margin-bottom: 1.25rem; padding-bottom: .25rem; }
.tabs a { padding: .55rem 1rem; border-radius: 999px; text-decoration: none; color: var(--green); background: var(--cream-2); font-weight: 600; font-size: .9rem; white-space: nowrap; border: 1px solid var(--cream-3); }
.tabs a.is-active, .tabs a:hover { background: var(--green); color: var(--gold-light); border-color: var(--green); }

/* ----------------------------------------------------------------- modal */
.modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: flex-end; justify-content: center; padding: 0; }
@media (min-width: 640px) { .modal { align-items: center; padding: 1.5rem; } }
.modal__backdrop { position: absolute; inset: 0; background: rgba(7, 31, 23, .6); backdrop-filter: blur(2px); }
.modal__panel {
    position: relative; width: 100%; max-width: 480px; background: var(--white);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0; padding: 1.5rem 1.25rem calc(1.25rem + env(safe-area-inset-bottom));
    box-shadow: var(--shadow-lg); max-height: 92vh; overflow-y: auto; border-top: 5px solid var(--red);
}
@media (min-width: 640px) { .modal__panel { border-radius: var(--radius-lg); padding: 1.75rem; } }
.modal__panel h2 { font-size: 1.35rem; padding-right: 2rem; }
.modal__close { position: absolute; top: .75rem; right: .75rem; }
.modal__icon { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; background: var(--red-100); color: var(--red); margin-bottom: .85rem; }
.modal__icon svg { width: 28px; height: 28px; }
.modal__icon--gold { background: #f6ecd0; color: var(--gold-dark); }
.modal__icon--green { background: var(--green-100); color: var(--green); }
.modal-enter { transition: opacity .2s ease, transform .2s ease; }
.modal-enter-start { opacity: 0; transform: translateY(16px); }
.modal-enter-end { opacity: 1; transform: none; }

/* ----------------------------------------------------------------- guest / auth */
.guest-body {
    background:
        radial-gradient(1200px 600px at 10% -10%, rgba(201, 163, 74, .25), transparent 60%),
        radial-gradient(900px 500px at 110% 10%, rgba(179, 38, 46, .25), transparent 55%),
        linear-gradient(180deg, var(--green-900), var(--green-950));
    color: var(--cream);
}
.guest-wrap { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 2rem 1rem; position: relative; z-index: 1; }
.guest-brand { display: inline-flex; align-items: center; gap: .6rem; color: var(--cream); text-decoration: none; font-family: var(--font-serif); font-size: 1.4rem; font-weight: 700; margin-bottom: 1.5rem; }
.guest-brand svg { width: 40px; height: 40px; }
.auth-card { width: 100%; max-width: 420px; background: var(--white); color: var(--ink); border-radius: var(--radius-lg); padding: 1.75rem 1.4rem; box-shadow: var(--shadow-lg); border-top: 5px solid var(--gold); }
@media (min-width: 480px) { .auth-card { padding: 2.1rem 2rem; } }
.auth-card h1 { font-size: 1.6rem; margin-bottom: .35rem; }
.auth-card__sub { color: var(--muted); margin-bottom: 1.35rem; }
.auth-links { margin-top: 1.25rem; text-align: center; font-size: .925rem; color: var(--muted); }
.guest-foot { margin-top: 1.5rem; color: rgba(251, 246, 238, .6); font-size: .85rem; text-align: center; }
.guest-foot a { color: var(--gold-light); }

/* home hero */
.hero { text-align: center; max-width: 640px; }
.hero__gift { width: 140px; height: 140px; margin: 0 auto 1.25rem; filter: drop-shadow(0 18px 30px rgba(0, 0, 0, .35)); animation: float 5s ease-in-out infinite; }
.hero h1 { color: var(--cream); font-size: clamp(2.2rem, 8vw, 3.4rem); margin-bottom: .6rem; }
.hero h1 em { font-style: normal; color: var(--gold-light); }
.hero p { color: rgba(251, 246, 238, .85); font-size: 1.1rem; margin: 0 auto 1.75rem; max-width: 34em; }
.hero .btn-group { justify-content: center; }
.hero .btn-outline { --btn-fg: var(--cream); --btn-border: rgba(255, 255, 255, .35); }
.hero .btn-outline:hover { --btn-bg: rgba(255, 255, 255, .1); --btn-fg: var(--gold-light); }
.features { display: grid; gap: 1rem; margin-top: 2.75rem; text-align: left; }
@media (min-width: 640px) { .features { grid-template-columns: repeat(3, 1fr); } }
.feature { background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12); border-radius: var(--radius); padding: 1rem 1.1rem; }
.feature h3 { color: var(--gold-light); font-size: 1.05rem; margin-bottom: .3rem; }
.feature p { font-size: .925rem; margin: 0; color: rgba(251, 246, 238, .78); }
@keyframes float { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-10px) rotate(2deg); } }

/* ----------------------------------------------------------------- snow */
.snow { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
.snow i {
    position: absolute; top: -12px; left: var(--x); width: var(--s); height: var(--s);
    background: #fff; border-radius: 50%; opacity: var(--o, .8);
    filter: blur(var(--b, 0px));
    animation: snowfall var(--d) linear var(--delay) infinite;
    will-change: transform;
}
@keyframes snowfall {
    0% { transform: translate3d(0, -5vh, 0); }
    50% { transform: translate3d(var(--drift), 50vh, 0); }
    100% { transform: translate3d(0, 105vh, 0); }
}

/* ==========================================================================
   Dalyvio puslapis
   ========================================================================== */
.p-body {
    color: var(--cream);
    background:
        radial-gradient(800px 420px at 50% -120px, rgba(232, 207, 134, .28), transparent 70%),
        radial-gradient(600px 400px at -10% 30%, rgba(179, 38, 46, .18), transparent 60%),
        radial-gradient(600px 400px at 110% 60%, rgba(47, 122, 92, .25), transparent 60%),
        linear-gradient(180deg, #0d3628 0%, var(--green-900) 45%, var(--green-950) 100%);
    background-attachment: fixed;
}
.p-body { overflow-x: hidden; background-color: var(--green-950); }
.p-wrap { position: relative; z-index: 1; max-width: 640px; margin: 0 auto; padding: 1rem 1rem 3rem; }
.p-top { display: flex; align-items: center; justify-content: center; gap: .5rem; padding: .5rem 0 1rem; color: rgba(251, 246, 238, .7); font-family: var(--font-serif); font-size: .95rem; letter-spacing: .04em; }
.p-top svg { width: 22px; height: 22px; }
.p-hello { text-align: center; padding: .5rem 0 1.25rem; }
.p-hello__eyebrow { display: inline-block; font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-light); margin-bottom: .5rem; }
.p-hello h1 { color: var(--cream); font-size: clamp(2rem, 9vw, 2.9rem); margin: 0 0 .4rem; text-shadow: 0 2px 18px rgba(0, 0, 0, .3); }
.p-hello p { color: rgba(251, 246, 238, .85); margin: 0 auto; max-width: 30em; font-size: 1.05rem; }
.p-hello strong { color: var(--gold-light); font-weight: 600; }

.paper {
    position: relative; background: var(--cream); color: var(--ink);
    border-radius: var(--radius-lg); padding: 1.35rem 1.15rem; margin-top: 1rem;
    box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .6), 0 2px 0 rgba(255, 255, 255, .4) inset;
}
@media (min-width: 480px) { .paper { padding: 1.6rem 1.6rem; } }
.paper::before { /* juostelė viršuje */
    content: ""; position: absolute; left: 1.25rem; right: 1.25rem; top: 0; height: 4px; border-radius: 0 0 4px 4px;
    background: repeating-linear-gradient(90deg, var(--red) 0 14px, var(--cream) 14px 20px, var(--green-500) 20px 34px, var(--cream) 34px 40px);
    opacity: .85;
}
.paper h2 { font-size: 1.4rem; display: flex; align-items: center; gap: .5rem; }
.paper h2 svg { width: 24px; height: 24px; color: var(--red); flex: none; }

/* waiting state */
.waiting { text-align: center; padding: 1.25rem .5rem .5rem; }
.waiting__icon { width: 92px; height: 92px; margin: 0 auto .75rem; }
.waiting h2 { justify-content: center; }

/* info list */
.facts { display: grid; gap: .6rem; margin: 0; }
@media (min-width: 480px) { .facts { grid-template-columns: repeat(2, 1fr); } }
.fact { display: flex; gap: .75rem; align-items: flex-start; padding: .75rem .85rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.fact__icon { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--red-100); color: var(--red); flex: none; }
.fact__icon svg { width: 19px; height: 19px; }
.fact__icon--green { background: var(--green-100); color: var(--green); }
.fact__icon--gold { background: #f6ecd0; color: var(--gold-dark); }
.fact dt { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0; }
.fact dd { margin: .1rem 0 0; font-weight: 600; color: var(--green); }
.fact dd small { display: block; font-weight: 400; color: var(--muted); }

.countdown { display: flex; align-items: center; justify-content: center; gap: .5rem; margin: 1rem auto 0; padding: .55rem 1rem; border-radius: 999px; background: rgba(232, 207, 134, .14); border: 1px solid rgba(232, 207, 134, .35); color: var(--gold-light); font-weight: 600; width: fit-content; font-size: .95rem; }
.countdown svg { width: 18px; height: 18px; }

/* ----- the gift ----- */
.gift-section { text-align: center; padding: .5rem 0 0; }
.gift-stage { position: relative; height: 270px; display: grid; place-items: end center; margin: 0 auto; max-width: 320px; }
.gift {
    position: relative; width: 190px; height: 210px; border: 0; padding: 0; background: none; cursor: pointer;
    -webkit-tap-highlight-color: transparent; animation: wiggle 2.8s ease-in-out infinite; transform-origin: 50% 100%;
}
.gift:focus-visible { outline: 3px solid var(--gold-light); outline-offset: 10px; border-radius: 12px; }
.gift__shadow { position: absolute; left: 50%; bottom: -10px; width: 210px; height: 26px; transform: translateX(-50%); background: radial-gradient(closest-side, rgba(0, 0, 0, .45), transparent); }
.gift__box {
    position: absolute; left: 10px; right: 10px; bottom: 0; height: 140px; border-radius: 6px 6px 10px 10px;
    background:
        linear-gradient(90deg, transparent calc(50% - 15px), var(--gold) calc(50% - 15px), var(--gold-light) 50%, var(--gold) calc(50% + 15px), transparent calc(50% + 15px)),
        linear-gradient(160deg, #d43a43, var(--red) 45%, var(--red-700));
    box-shadow: inset 0 -12px 20px rgba(0, 0, 0, .2), inset 0 8px 14px rgba(255, 255, 255, .12);
}
.gift__box::after { /* taškeliai ant popieriaus */
    content: ""; position: absolute; inset: 0; border-radius: inherit; opacity: .18;
    background-image: radial-gradient(#fff 1.4px, transparent 1.6px); background-size: 18px 18px; background-position: 4px 6px;
    -webkit-mask: linear-gradient(90deg, #000 calc(50% - 15px), transparent calc(50% - 15px), transparent calc(50% + 15px), #000 calc(50% + 15px));
            mask: linear-gradient(90deg, #000 calc(50% - 15px), transparent calc(50% - 15px), transparent calc(50% + 15px), #000 calc(50% + 15px));
}
.gift__lid {
    position: absolute; left: 0; right: 0; bottom: 132px; height: 42px; border-radius: 8px; z-index: 2;
    background:
        linear-gradient(90deg, transparent calc(50% - 16px), var(--gold) calc(50% - 16px), var(--gold-light) 50%, var(--gold) calc(50% + 16px), transparent calc(50% + 16px)),
        linear-gradient(170deg, #e04a52, #c42c35 50%, var(--red-700));
    box-shadow: 0 6px 10px -4px rgba(0, 0, 0, .35), inset 0 6px 10px rgba(255, 255, 255, .15);
    transition: transform .7s cubic-bezier(.2, .9, .3, 1.3), opacity .6s ease .25s;
    transform-origin: 20% 100%;
}
.gift__bow { position: absolute; left: 50%; top: -34px; width: 0; height: 0; }
.gift__bow::before, .gift__bow::after {
    content: ""; position: absolute; top: 0; width: 46px; height: 36px; border: 9px solid var(--gold); border-radius: 50% 50% 8px 50%;
    background: transparent; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .25);
}
.gift__bow::before { right: 2px; transform: rotate(-18deg); }
.gift__bow::after { left: 2px; transform: scaleX(-1) rotate(-18deg); }
.gift__knot { position: absolute; left: 50%; top: -12px; width: 22px; height: 18px; transform: translateX(-50%); background: var(--gold-light); border-radius: 6px; z-index: 1; box-shadow: inset 0 -3px 0 var(--gold-dark); }
.gift__glow { position: absolute; left: 50%; bottom: 80px; width: 10px; height: 10px; transform: translate(-50%, 0) scale(0); border-radius: 50%; background: radial-gradient(circle, rgba(255, 240, 190, 1), rgba(255, 220, 120, .6) 40%, transparent 70%); opacity: 0; transition: transform .8s ease .15s, opacity .8s ease .15s; }
.gift-hint { margin-top: 1.4rem; color: var(--gold-light); font-weight: 600; letter-spacing: .02em; display: inline-flex; align-items: center; gap: .45rem; animation: pulse 2s ease-in-out infinite; }
.gift-hint svg { width: 18px; height: 18px; }

.gift-stage.is-open .gift { animation: shake .45s ease-in-out 1; cursor: default; }
.gift-stage.is-open .gift__lid { transform: translate(60px, -150px) rotate(38deg); opacity: 0; }
.gift-stage.is-open .gift__glow { transform: translate(-50%, 0) scale(34); opacity: .55; }
.gift-stage.is-done { height: 0; overflow: hidden; transition: height .5s ease; }

.confetti { position: absolute; left: 50%; bottom: 120px; width: 0; height: 0; pointer-events: none; }
.confetti i {
    position: absolute; left: 0; top: 0; width: 9px; height: 14px; border-radius: 2px; opacity: 0;
    background: var(--c, var(--gold-light));
}
.gift-stage.is-open .confetti i { animation: burst 1.3s cubic-bezier(.15, .7, .3, 1) forwards; animation-delay: var(--dl, 0s); }
@keyframes burst {
    0% { opacity: 1; transform: translate(0, 0) rotate(0) scale(.6); }
    70% { opacity: 1; }
    100% { opacity: 0; transform: translate(var(--tx), var(--ty)) rotate(var(--r)) scale(1); }
}
@keyframes wiggle { 0%, 82%, 100% { transform: rotate(0); } 86% { transform: rotate(-4deg); } 90% { transform: rotate(4deg); } 94% { transform: rotate(-2deg); } 97% { transform: rotate(1deg); } }
@keyframes shake { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-6deg) scale(1.04); } 50% { transform: rotate(5deg) scale(1.06); } 75% { transform: rotate(-3deg); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }

.reveal { animation: revealIn .8s cubic-bezier(.2, .9, .3, 1.15) both; }
@keyframes revealIn { from { opacity: 0; transform: translateY(24px) scale(.94); } to { opacity: 1; transform: none; } }
.reveal-card {
    position: relative; text-align: center; padding: 1.75rem 1.25rem 1.5rem; border-radius: var(--radius-lg);
    background: linear-gradient(180deg, #fffdf8, var(--cream)); color: var(--ink);
    box-shadow: 0 30px 70px -30px rgba(0, 0, 0, .7), 0 0 0 1px rgba(201, 163, 74, .5), 0 0 0 7px rgba(232, 207, 134, .12);
}
.reveal-card__label { font-size: .85rem; text-transform: uppercase; letter-spacing: .18em; color: var(--red); font-weight: 700; margin: 0 0 .35rem; }
.reveal-card__name { font-family: var(--font-serif); font-size: clamp(2.1rem, 10vw, 3.1rem); color: var(--green); margin: 0; line-height: 1.1; word-break: break-word; }
.reveal-card__flourish { display: block; width: 140px; height: 18px; margin: .7rem auto .2rem; color: var(--gold); }
.reveal-card__note { color: var(--muted); font-size: .95rem; margin: .25rem 0 0; }
.reveal-card__again { margin-top: .9rem; }
.reveal-card .star { position: absolute; width: 22px; height: 22px; color: var(--gold); }
.reveal-card .star--1 { top: 14px; left: 16px; transform: rotate(-12deg); }
.reveal-card .star--2 { top: 22px; right: 20px; width: 15px; height: 15px; transform: rotate(14deg); }
.reveal-card .star--3 { bottom: 16px; left: 26px; width: 13px; height: 13px; }

/* wish list (view) */
.wishes { list-style: none; margin: 0; padding: 0; display: grid; gap: .65rem; counter-reset: wish; }
.wish { position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem 1rem .9rem 3.1rem; counter-increment: wish; }
.wish::before { content: counter(wish); position: absolute; left: .9rem; top: .9rem; width: 26px; height: 26px; border-radius: 50%; background: var(--green); color: var(--gold-light); font-weight: 700; font-size: .85rem; display: grid; place-items: center; font-family: var(--font-serif); }
.wish__title { font-weight: 700; color: var(--green); margin: 0; word-break: break-word; }
.wish__note { margin: .3rem 0 0; color: #4d5852; font-size: .95rem; white-space: pre-line; word-break: break-word; }
.wish__meta { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-top: .55rem; }
.wish__link { display: inline-flex; align-items: center; gap: .35rem; font-size: .875rem; font-weight: 600; padding: .35rem .75rem; border-radius: 999px; background: var(--red-100); color: var(--red-700); text-decoration: none; max-width: 100%; }
.wish__link:hover { background: #f3cfcb; color: var(--red-700); }
.wish__link svg { width: 15px; height: 15px; flex: none; }
.wish__link span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wish__price { font-size: .85rem; font-weight: 700; color: var(--gold-dark); background: #f8efd6; padding: .3rem .65rem; border-radius: 999px; }
.legacy-wishes { background: #fff; border: 1px dashed var(--cream-3); border-radius: var(--radius); padding: .9rem 1rem; word-break: break-word; }
.legacy-wishes__label { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: .35rem; }
.empty-wishes { text-align: center; padding: 1.25rem .5rem; color: var(--muted); }
.empty-wishes svg { width: 54px; height: 54px; color: var(--cream-3); margin-bottom: .4rem; }

/* wish editor */
.wish-edit-actions { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .65rem; align-items: center; }
.wish-edit-actions form { display: inline; }
.wish-editor details { margin-top: .5rem; }
.wish-editor summary { cursor: pointer; list-style: none; }
.wish-editor summary::-webkit-details-marker { display: none; }
.wish-form { display: grid; gap: .75rem; margin-top: .75rem; }
.wish-form .field { margin: 0; }
@media (min-width: 480px) { .wish-form__row { display: grid; grid-template-columns: 1fr 120px; gap: .75rem; } }
.deadline-note { display: flex; gap: .6rem; align-items: flex-start; padding: .75rem .9rem; border-radius: var(--radius-sm); background: #fdf6e3; border: 1px solid #ecdcae; color: #6b5419; font-size: .925rem; margin-bottom: 1rem; }
.deadline-note svg { width: 20px; height: 20px; flex: none; margin-top: 1px; }

.p-foot { text-align: center; color: rgba(251, 246, 238, .55); font-size: .85rem; margin-top: 2rem; }
.p-foot svg { width: 16px; height: 16px; vertical-align: -3px; }
.p-body .flash { box-shadow: var(--shadow); }

/* ----------------------------------------------------------------- error pages */
.error-page { text-align: center; max-width: 460px; }
.error-page__code { font-family: var(--font-serif); font-size: 4.5rem; line-height: 1; color: var(--gold-light); margin: 0 0 .5rem; }
.error-page h1 { color: var(--cream); font-size: 1.7rem; }
.error-page p { color: rgba(251, 246, 238, .82); }

/* ----------------------------------------------------------------- reduced motion */
@media (prefers-reduced-motion: reduce) {
    .snow { display: none; }
    .gift, .gift-hint, .hero__gift { animation: none !important; }
    .gift__lid, .gift__glow, .meter > span { transition-duration: .01ms !important; transition-delay: 0s !important; }
    .gift-stage.is-open .gift { animation: none; }
    .gift-stage.is-open .confetti i { animation: none; }
    .reveal { animation: fadeIn .2s ease both; }
    @keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
    .spinner { animation-duration: 3s; }
}

@media print {
    .site-header, .snow, .site-footer, .btn, form { display: none !important; }
    body, .p-body { background: #fff; color: #000; }
}

/* Ilgi šeimų / grupių pavadinimai neturi išeiti už kortelės ribų (mobiliame). */
.badge, .chip { max-width: 100%; min-width: 0; overflow-wrap: anywhere; }
.badge svg, .chip svg { flex: none; }
.badge--muted { white-space: normal; line-height: 1.35; text-align: left; }
