:root {
    --ink: #3f2430;
    --ink-soft: #715460;
    --wine: #6e2943;
    --wine-dark: #4d1d31;
    --rose: #c37a91;
    --rose-soft: #efd5de;
    --rose-pale: #fbf2f5;
    --blush: #f6e5eb;
    --cream: #fffaf7;
    --paper: #fffdfc;
    --gold: #b8845f;
    --gold-pale: #ecd7c4;
    --green: #3f745e;
    --red: #a33e4e;
    --blue: #315f7c;
    --line: rgba(83, 37, 54, 0.14);
    --shadow: 0 24px 70px rgba(82, 33, 51, 0.12);
    --shadow-soft: 0 12px 35px rgba(82, 33, 51, 0.08);
    --radius-xl: 34px;
    --radius-lg: 24px;
    --radius-md: 16px;
    --serif: Georgia, 'Times New Roman', serif;
    --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background:
        radial-gradient(circle at 8% 2%, rgba(239, 196, 208, 0.36), transparent 28rem),
        linear-gradient(180deg, var(--rose-pale), var(--cream) 38rem, #fff);
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.6;
    min-height: 100vh;
}

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

a {
    color: inherit;
    text-decoration-color: rgba(110, 41, 67, 0.35);
    text-underline-offset: 0.2em;
}

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

button,
a {
    -webkit-tap-highlight-color: transparent;
}

[hidden] {
    display: none !important;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1,
h2,
h3 {
    font-family: var(--serif);
    font-weight: 500;
    line-height: 1.08;
    letter-spacing: -0.025em;
}

h1 {
    font-size: clamp(2.7rem, 7vw, 5.9rem);
}

h2 {
    font-size: clamp(2.2rem, 4.7vw, 4.3rem);
}

h3 {
    font-size: clamp(1.8rem, 3vw, 2.8rem);
}

code {
    overflow-wrap: anywhere;
    color: var(--wine-dark);
    background: rgba(195, 122, 145, 0.1);
    border-radius: 6px;
    padding: 0.1em 0.35em;
    font-size: 0.9em;
}

.eyebrow {
    margin-bottom: 0.75rem;
    color: var(--wine);
    font-size: 0.73rem;
    font-weight: 800;
    letter-spacing: 0.19em;
    line-height: 1.4;
    text-transform: uppercase;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    min-height: 50px;
    padding: 0.78rem 1.35rem;
    border: 1px solid var(--wine);
    border-radius: 999px;
    color: #fff;
    background: var(--wine);
    box-shadow: 0 10px 24px rgba(110, 41, 67, 0.18);
    font-weight: 750;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.button:hover {
    transform: translateY(-2px);
    background: var(--wine-dark);
    box-shadow: 0 14px 28px rgba(110, 41, 67, 0.24);
}

.button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
button:focus-visible,
a:focus-visible {
    outline: 3px solid rgba(195, 122, 145, 0.38);
    outline-offset: 3px;
}

.button:disabled {
    opacity: 0.48;
    pointer-events: none;
}

.button-secondary {
    color: var(--wine);
    background: transparent;
    box-shadow: none;
}

.button-secondary:hover {
    color: #fff;
    background: var(--wine);
}

.button-danger {
    color: var(--red);
    border-color: rgba(163, 62, 78, 0.45);
    background: transparent;
    box-shadow: none;
}

.button-danger:hover {
    color: #fff;
    border-color: var(--red);
    background: var(--red);
    box-shadow: 0 10px 22px rgba(163, 62, 78, 0.18);
}

.button-small {
    min-height: 40px;
    padding: 0.55rem 1rem;
    font-size: 0.9rem;
}

.button-tiny {
    min-height: 34px;
    padding: 0.45rem 0.8rem;
    font-size: 0.82rem;
}

.button-wide {
    width: 100%;
}

.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.site-header,
.admin-header {
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: min(1220px, calc(100% - 3rem));
    margin: 0 auto;
    padding: 1.4rem 0;
}

.brand,
.admin-brand {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    text-decoration: none;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(110, 41, 67, 0.22);
    border-radius: 50%;
    color: var(--wine);
    background: rgba(255, 255, 255, 0.68);
}

.brand strong {
    display: block;
    font-family: var(--serif);
    font-size: 1.05rem;
    letter-spacing: 0.02em;
}

.brand small {
    display: block;
    color: var(--ink-soft);
    font-size: 0.72rem;
}

.site-header nav,
.admin-header nav {
    display: flex;
    align-items: center;
    gap: 1.15rem;
}

.site-header nav > a:not(.button),
.admin-header nav > a,
.link-button {
    border: 0;
    color: var(--ink-soft);
    background: transparent;
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.site-header nav > a:not(.button):hover,
.admin-header nav > a:hover,
.admin-header nav > a.active,
.link-button:hover {
    color: var(--wine);
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(330px, 0.72fr);
    grid-template-rows: auto auto;
    align-items: stretch;
    column-gap: clamp(2.2rem, 5vw, 5rem);
    row-gap: 1.5rem;
    width: min(1220px, calc(100% - 3rem));
    min-height: calc(100vh - 100px);
    margin: 0 auto;
    padding: 3.5rem 0 6rem;
}

.hero-copy {
    grid-column: 1;
    grid-row: 1;
    align-self: end;
    padding-top: 1.5rem;
}

.hero-copy h1 {
    max-width: 820px;
    margin-bottom: 1.6rem;
    font-size: clamp(2.9rem, 5.4vw, 5.25rem);
}

.hero-copy h1 em {
    color: var(--wine);
    font-weight: 500;
}

.hero-lead {
    max-width: 670px;
    margin-bottom: 2rem;
    color: var(--ink-soft);
    font-size: clamp(1.05rem, 2vw, 1.3rem);
}

.hero-portrait {
    position: relative;
    grid-column: 2;
    grid-row: 1 / 3;
    min-height: 690px;
    margin: 0;
    overflow: hidden;
    border: 1px solid rgba(110, 41, 67, 0.13);
    border-radius: var(--radius-xl);
    background: #eadfd8;
    box-shadow: var(--shadow);
}

.hero-portrait::after {
    content: '';
    position: absolute;
    inset: 12px;
    border: 1px solid rgba(255, 255, 255, 0.42);
    border-radius: calc(var(--radius-xl) - 8px);
    pointer-events: none;
}

.hero-portrait img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.progress-card {
    position: relative;
    grid-column: 1;
    grid-row: 2;
    overflow: hidden;
    padding: clamp(1.7rem, 3vw, 2.5rem);
    border: 1px solid rgba(110, 41, 67, 0.11);
    border-radius: var(--radius-xl);
    background:
        linear-gradient(155deg, rgba(255, 255, 255, 0.94), rgba(249, 229, 235, 0.72)),
        var(--paper);
    box-shadow: var(--shadow);
}

.progress-card::after {
    content: '♡';
    position: absolute;
    top: -2.2rem;
    right: -0.8rem;
    color: rgba(195, 122, 145, 0.09);
    font-family: var(--serif);
    font-size: 11rem;
    line-height: 1;
    transform: rotate(-10deg);
}

.progress-card > * {
    position: relative;
    z-index: 1;
}

.total-amount {
    margin: 0;
    color: var(--wine-dark);
    font-family: var(--serif);
    font-size: clamp(3.4rem, 8vw, 5.5rem);
    line-height: 0.95;
    letter-spacing: -0.06em;
}

.total-label {
    margin: 0.7rem 0 1.8rem;
    color: var(--ink-soft);
    font-size: 0.92rem;
}

progress {
    display: block;
    width: 100%;
    height: 14px;
    overflow: hidden;
    border: 0;
    border-radius: 999px;
    color: var(--wine);
    background: var(--rose-soft);
    appearance: none;
}

progress::-webkit-progress-bar {
    border-radius: 999px;
    background: var(--rose-soft);
}

progress::-webkit-progress-value {
    border-radius: 999px;
    background: linear-gradient(90deg, var(--rose), var(--wine));
}

progress::-moz-progress-bar {
    border-radius: 999px;
    background: linear-gradient(90deg, var(--rose), var(--wine));
}

.progress-meta {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 0.7rem;
    color: var(--ink-soft);
    font-size: 0.74rem;
}

.next-amount {
    margin: 2rem 0 0;
    padding-top: 1.25rem;
    border-top: 1px solid var(--line);
    color: var(--ink-soft);
}

.next-amount strong {
    color: var(--wine);
}

.gift-journey {
    padding: clamp(5rem, 10vw, 9rem) 0;
    background: #fff;
}

.section-heading {
    width: min(820px, calc(100% - 3rem));
    margin: 0 auto clamp(3rem, 7vw, 6rem);
    text-align: center;
}

.section-heading h2 {
    margin-bottom: 1.4rem;
}

.section-heading > p:last-child {
    max-width: 680px;
    margin: 0 auto;
    color: var(--ink-soft);
}

.gift-list {
    display: grid;
    gap: clamp(2rem, 5vw, 4rem);
    width: min(1100px, calc(100% - 3rem));
    margin: 0 auto;
}

.gift-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
    overflow: hidden;
    min-height: 530px;
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    background: var(--paper);
    box-shadow: var(--shadow-soft);
}

.gift-card:nth-child(even) .gift-image-wrap {
    order: 2;
}

.gift-image-wrap {
    position: relative;
    min-height: 440px;
    background: var(--blush);
}

.gift-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-note {
    position: absolute;
    right: 1rem;
    bottom: 1rem;
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    color: rgba(63, 36, 48, 0.72);
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(10px);
    font-size: 0.67rem;
    font-weight: 700;
}

.gift-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(2.2rem, 5vw, 5rem);
}

.gift-state {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 3rem;
}

.gift-number {
    color: rgba(110, 41, 67, 0.32);
    font-family: var(--serif);
    font-size: 1.25rem;
}

.status-pill,
.method-badge,
.config-pill {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 0.38rem 0.7rem;
    border-radius: 999px;
    font-size: 0.69rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    line-height: 1.2;
    text-transform: uppercase;
}

.status-reached,
.config-pill.configured {
    color: var(--green);
    background: rgba(63, 116, 94, 0.11);
}

.status-next {
    color: var(--wine);
    background: var(--rose-soft);
}

.status-locked,
.config-pill {
    color: var(--ink-soft);
    background: rgba(113, 84, 96, 0.09);
}

.gift-kicker {
    margin-bottom: 0.55rem;
    color: var(--gold);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.gift-copy h3 {
    margin-bottom: 1.1rem;
}

.gift-price {
    margin-bottom: 1.6rem;
    color: var(--wine);
    font-family: var(--serif);
    font-size: 2.15rem;
}

.gift-detail {
    margin: 0;
    color: var(--ink-soft);
}

.gift-locked {
    background: #fbf9f8;
}

.gift-locked .gift-image-wrap img {
    filter: saturate(0.74) contrast(0.94);
}

.closing-cta {
    width: min(920px, calc(100% - 3rem));
    margin: clamp(5rem, 10vw, 9rem) auto;
    padding: clamp(3rem, 8vw, 6.5rem);
    border: 1px solid rgba(110, 41, 67, 0.12);
    border-radius: var(--radius-xl);
    background:
        radial-gradient(circle at 85% 10%, rgba(255,255,255,0.85), transparent 15rem),
        linear-gradient(145deg, var(--rose-soft), #f9edf0);
    text-align: center;
    box-shadow: var(--shadow-soft);
}

.closing-cta h2 {
    margin-bottom: 1rem;
}

.closing-cta > p:not(.eyebrow) {
    max-width: 610px;
    margin-right: auto;
    margin-bottom: 1.8rem;
    margin-left: auto;
    color: var(--ink-soft);
}

.site-footer {
    display: grid;
    justify-items: center;
    gap: 0.35rem;
    padding: 3rem 1.5rem;
    border-top: 1px solid var(--line);
    color: var(--ink-soft);
    background: var(--paper);
    text-align: center;
}

.site-footer p {
    margin: 0;
}

.fine-print {
    font-size: 0.72rem;
}

.flash-stack {
    position: relative;
    z-index: 20;
    display: grid;
    gap: 0.5rem;
    width: min(960px, calc(100% - 3rem));
    margin: 0.8rem auto;
}

.flash {
    padding: 0.85rem 1rem;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    box-shadow: var(--shadow-soft);
}

.flash-success {
    color: var(--green);
    border-color: rgba(63, 116, 94, 0.22);
    background: #f4fbf7;
}

.flash-error {
    color: var(--red);
    border-color: rgba(163, 62, 78, 0.22);
    background: #fff6f7;
}

.donation-shell {
    display: grid;
    grid-template-columns: minmax(0, 0.82fr) minmax(450px, 1fr);
    gap: clamp(2rem, 7vw, 7rem);
    width: min(1080px, calc(100% - 3rem));
    margin: 0 auto;
    padding: clamp(4rem, 8vw, 8rem) 0;
}

.donation-intro {
    align-self: start;
    position: sticky;
    top: 2rem;
}

.donation-intro h1 {
    margin-bottom: 1.5rem;
    font-size: clamp(3rem, 6vw, 5rem);
}

.donation-intro > p:not(.eyebrow) {
    color: var(--ink-soft);
}

.mini-total {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1.5rem;
    margin-top: 2.2rem;
    padding: 1.2rem 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    color: var(--ink-soft);
}

.mini-total strong {
    color: var(--wine);
    font-family: var(--serif);
    font-size: 1.7rem;
}

.donation-form-card,
.login-card,
.installer-card,
.result-card {
    padding: clamp(2rem, 5vw, 3.8rem);
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    background: rgba(255, 253, 252, 0.94);
    box-shadow: var(--shadow);
}

.stack-form {
    display: grid;
    gap: 1.5rem;
}

.stack-form fieldset,
.settings-form fieldset {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.stack-form fieldset > legend {
    width: 100%;
    margin-bottom: 1.2rem;
    padding: 0 0 0.8rem;
    border-bottom: 1px solid var(--line);
    font-family: var(--serif);
    font-size: 1.4rem;
}

.field {
    display: grid;
    gap: 0.45rem;
}

.field label,
.payment-fieldset legend,
.filter-form label > span {
    color: var(--ink);
    font-size: 0.79rem;
    font-weight: 800;
    letter-spacing: 0.03em;
}

.field input,
.field select,
.field textarea,
.filter-form select,
.status-form input,
.status-form select {
    width: 100%;
    min-height: 48px;
    padding: 0.75rem 0.9rem;
    border: 1px solid rgba(83, 37, 54, 0.18);
    border-radius: 12px;
    color: var(--ink);
    background: #fff;
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.delete-donation-form {
    display: flex;
    justify-content: flex-end;
    margin-top: 0.65rem;
}

.field textarea {
    min-height: 96px;
    resize: vertical;
}

.field input:hover,
.field select:hover,
.field textarea:hover {
    border-color: rgba(110, 41, 67, 0.38);
}

.field small,
.field-help {
    color: var(--ink-soft);
    font-size: 0.76rem;
}

.money-input {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    overflow: hidden;
    border: 1px solid rgba(83, 37, 54, 0.18);
    border-radius: 12px;
    background: #fff;
}

.money-input > span {
    padding-left: 1rem;
    color: var(--wine);
    font-family: var(--serif);
    font-size: 1.5rem;
}

.money-input input {
    border: 0;
    box-shadow: none;
}

.payment-fieldset legend {
    margin-bottom: 0.75rem;
}

.payment-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem;
}

.payment-option {
    display: grid;
    grid-template-columns: auto auto 1fr;
    align-items: center;
    gap: 0.65rem;
    min-height: 88px;
    padding: 0.9rem;
    border: 1px solid rgba(83, 37, 54, 0.16);
    border-radius: var(--radius-md);
    background: #fff;
    cursor: pointer;
    transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.payment-option:hover {
    transform: translateY(-1px);
    border-color: var(--rose);
}

.payment-option:has(input:checked) {
    border-color: var(--wine);
    background: var(--rose-pale);
    box-shadow: inset 0 0 0 1px var(--wine);
}

.payment-option input {
    accent-color: var(--wine);
}

.payment-option strong,
.payment-option small {
    display: block;
}

.payment-option strong {
    font-size: 0.9rem;
}

.payment-option small {
    margin-top: 0.12rem;
    color: var(--ink-soft);
    font-size: 0.67rem;
    line-height: 1.3;
}

.payment-icon {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    color: #fff;
    background: var(--wine);
    font-family: var(--serif);
    font-weight: 700;
}

.option-disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.bank-preview,
.bank-details-list {
    padding: 1.3rem;
    border: 1px solid var(--gold-pale);
    border-radius: var(--radius-md);
    background: #fffaf3;
}

.bank-preview dl,
.bank-details-list {
    display: grid;
    gap: 0;
    margin: 0;
}

.bank-preview dl > div,
.bank-details-list > div {
    display: grid;
    grid-template-columns: minmax(100px, 0.38fr) 1fr;
    gap: 1rem;
    padding: 0.72rem 0;
    border-bottom: 1px solid rgba(184, 132, 95, 0.18);
}

.bank-preview dl > div:last-child,
.bank-details-list > div:last-child {
    border-bottom: 0;
}

.bank-preview dt,
.bank-details-list dt {
    color: var(--ink-soft);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
}

.bank-preview dd,
.bank-details-list dd {
    margin: 0;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.iban {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    letter-spacing: 0.055em;
}

.secure-note {
    margin: -0.4rem 0 0;
    color: var(--ink-soft);
    font-size: 0.72rem;
    text-align: center;
}

.notice {
    padding: 1rem 1.15rem;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: #fff;
}

.notice > :last-child {
    margin-bottom: 0;
}

.notice ul {
    margin-bottom: 0;
    padding-left: 1.2rem;
}

.error-notice {
    color: #7f2e3d;
    border-color: rgba(163, 62, 78, 0.22);
    background: #fff4f6;
}

.success-notice {
    color: #315f4f;
    border-color: rgba(63, 116, 94, 0.2);
    background: #f3faf6;
}

.info-notice {
    color: var(--blue);
    border-color: rgba(49, 95, 124, 0.18);
    background: #f3f8fb;
}

.compact-notice {
    margin-top: 1.5rem;
    font-size: 0.82rem;
}

.result-card {
    width: min(680px, calc(100% - 3rem));
    margin: clamp(4rem, 10vw, 8rem) auto;
    text-align: center;
}

.result-card h1 {
    margin-bottom: 1.3rem;
    font-size: clamp(2.7rem, 6vw, 4.7rem);
}

.result-icon {
    display: grid;
    place-items: center;
    width: 70px;
    height: 70px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    color: var(--wine);
    background: var(--rose-soft);
    font-family: var(--serif);
    font-size: 2rem;
}

.success-icon {
    color: var(--green);
    background: rgba(63, 116, 94, 0.12);
}

.error-icon {
    color: var(--red);
    background: rgba(163, 62, 78, 0.11);
}

.result-amount {
    margin: 1.5rem 0 0.7rem;
    color: var(--wine);
    font-family: var(--serif);
    font-size: 3rem;
}

.result-card .button-row {
    justify-content: center;
    margin-top: 1.8rem;
}

.result-bank {
    width: min(760px, calc(100% - 3rem));
}

.bank-details-list {
    margin: 2rem 0;
    text-align: left;
}

.bank-details-list > div:has(.copy-button) {
    grid-template-columns: minmax(100px, 0.38fr) 1fr auto;
}

.copy-button {
    align-self: center;
    padding: 0.4rem 0.7rem;
    border: 1px solid rgba(110, 41, 67, 0.25);
    border-radius: 999px;
    color: var(--wine);
    background: #fff;
    font-size: 0.72rem;
    font-weight: 800;
    cursor: pointer;
}

.copy-button.copied {
    color: var(--green);
    border-color: rgba(63, 116, 94, 0.3);
    background: #f2faf5;
}

.copy-helper {
    position: fixed;
    left: -9999px;
    opacity: 0;
}

.installer-body,
.admin-body {
    background: #f7f2f3;
}

.installer-shell,
.login-shell {
    display: grid;
    place-items: center;
    min-height: 100vh;
    padding: 3rem 1.5rem;
}

.installer-card {
    width: min(860px, 100%);
}

.installer-card h1,
.login-card h1 {
    margin-bottom: 1rem;
    font-size: clamp(2.6rem, 6vw, 4.4rem);
}

.installer-card .lead,
.login-card > p:not(.eyebrow) {
    color: var(--ink-soft);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.1rem;
}

.span-2 {
    grid-column: span 2;
}

.span-3 {
    grid-column: 1 / -1;
}

.code-area {
    width: 100%;
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: 12px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.78rem;
}

.login-card {
    width: min(460px, 100%);
}

.back-link {
    margin: 1.6rem 0 0;
    color: var(--ink-soft);
    font-size: 0.83rem;
    text-align: center;
}

.admin-body {
    color: #392731;
}

.admin-header {
    width: 100%;
    padding: 1rem max(1.5rem, calc((100% - 1320px) / 2));
    border-bottom: 1px solid var(--line);
    background: rgba(255, 253, 252, 0.9);
    backdrop-filter: blur(18px);
}

.admin-brand {
    color: var(--wine);
    font-family: var(--serif);
    font-size: 1.05rem;
    font-weight: 700;
}

.admin-header nav form {
    display: inline;
    margin: 0;
}

.admin-main {
    width: min(1320px, calc(100% - 3rem));
    margin: 0 auto;
    padding: 3.5rem 0 6rem;
}

.admin-title-row,
.panel-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 2rem;
}

.admin-title-row {
    margin-bottom: 2.2rem;
}

.admin-title-row h1 {
    margin-bottom: 0.6rem;
    font-size: clamp(2.8rem, 5vw, 4.8rem);
}

.admin-title-row p:last-child {
    margin: 0;
    color: var(--ink-soft);
}

.configuration-pills {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.5rem;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card,
.admin-panel {
    border: 1px solid var(--line);
    background: var(--paper);
    box-shadow: 0 8px 30px rgba(82, 33, 51, 0.05);
}

.stat-card {
    display: grid;
    gap: 0.25rem;
    min-height: 160px;
    padding: 1.4rem;
    border-radius: var(--radius-md);
}

.stat-card span {
    color: var(--ink-soft);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.stat-card strong {
    align-self: end;
    color: var(--wine);
    font-family: var(--serif);
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1;
}

.stat-card small {
    color: var(--ink-soft);
}

.stat-primary {
    color: #fff;
    border-color: var(--wine);
    background: linear-gradient(145deg, var(--wine), var(--wine-dark));
}

.stat-primary span,
.stat-primary small,
.stat-primary strong {
    color: #fff;
}

.admin-panel {
    overflow: hidden;
    border-radius: var(--radius-lg);
}

.panel-heading {
    padding: 1.5rem;
    border-bottom: 1px solid var(--line);
}

.panel-heading h2 {
    margin: 0;
    font-family: var(--sans);
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: -0.01em;
}

.panel-heading p {
    margin: 0.25rem 0 0;
    color: var(--ink-soft);
    font-size: 0.8rem;
}

.filter-form {
    display: flex;
    align-items: flex-end;
    gap: 0.65rem;
}

.filter-form label {
    display: grid;
    gap: 0.25rem;
}

.filter-form select {
    min-width: 140px;
    min-height: 40px;
    padding: 0.45rem 0.7rem;
}

.table-wrap {
    overflow-x: auto;
}

.payments-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.payments-table th,
.payments-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
}

.payments-table th {
    color: var(--ink-soft);
    background: #fbf8f8;
    font-size: 0.7rem;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.payments-table td {
    font-size: 0.84rem;
}

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

.payments-table td strong,
.payments-table td small {
    display: block;
}

.payments-table td small {
    margin-top: 0.22rem;
    color: var(--ink-soft);
    font-size: 0.69rem;
    overflow-wrap: anywhere;
}

.amount-cell {
    color: var(--wine);
    font-weight: 850;
    white-space: nowrap;
}

.method-bank {
    color: var(--gold);
    background: rgba(184, 132, 95, 0.12);
}

.method-paypal {
    color: var(--blue);
    background: rgba(49, 95, 124, 0.1);
}

.action-cell {
    min-width: 300px;
}

.status-form {
    display: grid;
    grid-template-columns: 0.75fr 1fr auto;
    gap: 0.5rem;
}

.status-form input,
.status-form select {
    min-height: 34px;
    padding: 0.4rem 0.55rem;
    font-size: 0.76rem;
}

.empty-state {
    padding: 5rem 2rem;
    color: var(--ink-soft);
    text-align: center;
}

.empty-state > span {
    color: var(--rose);
    font-family: var(--serif);
    font-size: 3rem;
}

.empty-state h3 {
    margin: 0.5rem 0;
    color: var(--ink);
    font-family: var(--sans);
    font-size: 1.1rem;
    font-weight: 800;
}

.settings-form {
    display: grid;
    gap: 1.2rem;
}

.settings-section {
    overflow: visible;
}

.settings-section > .form-grid,
.settings-section > .gift-settings-list {
    padding: 1.5rem;
}

.section-number {
    margin: 0 0 0.25rem !important;
    color: var(--rose) !important;
    font-size: 0.7rem !important;
    font-weight: 900;
    letter-spacing: 0.12em;
}

.gift-settings-list {
    display: grid;
    gap: 1rem;
}

.gift-setting-card {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 1.2rem;
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: #fff;
}

.gift-setting-card img {
    width: 180px;
    height: 100%;
    min-height: 220px;
    border-radius: 12px;
    object-fit: cover;
}

.gift-setting-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-content: center;
    gap: 0.85rem;
}

.gift-setting-fields .eyebrow {
    grid-column: 1 / -1;
    margin: 0;
}

.gift-setting-fields .field:first-of-type {
    grid-column: 1 / -1;
}

.check-field {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.9rem;
    border: 1px solid rgba(163, 62, 78, 0.18);
    border-radius: 12px;
    color: var(--red);
    background: #fff7f8;
    font-size: 0.82rem;
    font-weight: 700;
}

.check-field input {
    accent-color: var(--red);
}

.copy-field {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    padding: 0.65rem;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #f9f6f7;
}

.copy-field code {
    background: transparent;
}

.sticky-save {
    position: sticky;
    z-index: 5;
    bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.9rem 1rem 0.9rem 1.3rem;
    border: 1px solid rgba(110, 41, 67, 0.17);
    border-radius: 999px;
    background: rgba(255, 253, 252, 0.94);
    box-shadow: 0 18px 45px rgba(82, 33, 51, 0.16);
    backdrop-filter: blur(16px);
}

.sticky-save p {
    margin: 0;
    color: var(--ink-soft);
    font-size: 0.82rem;
}

.password-form {
    align-items: end;
    padding: 1.5rem;
}

.action-field {
    align-self: end;
}

@media (max-width: 900px) {
    .hero,
    .donation-shell {
        grid-template-columns: 1fr;
    }

    .hero {
        grid-template-rows: auto;
        min-height: auto;
        padding-top: 4rem;
    }

    .hero-copy,
    .hero-portrait,
    .progress-card {
        grid-column: 1;
        grid-row: auto;
    }

    .hero-copy {
        padding-top: 0;
    }

    .hero-portrait {
        width: min(560px, 100%);
        min-height: 0;
        aspect-ratio: 2 / 3;
        justify-self: center;
    }

    .progress-card {
        max-width: 620px;
    }

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

    .gift-card:nth-child(even) .gift-image-wrap {
        order: 0;
    }

    .gift-image-wrap {
        min-height: 360px;
        aspect-ratio: 1.3 / 1;
    }

    .donation-intro {
        position: static;
    }

    .admin-header {
        align-items: flex-start;
    }

    .admin-header nav {
        flex-wrap: wrap;
        justify-content: flex-end;
    }

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

    .stat-primary {
        grid-column: 1 / -1;
    }

    .filter-heading,
    .admin-title-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .configuration-pills {
        justify-content: flex-start;
    }

    .status-form {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    body {
        font-size: 15px;
    }

    .site-header,
    .admin-header {
        width: 100%;
        padding: 1rem;
    }

    .site-header nav > a:not(.button),
    .brand small {
        display: none;
    }

    .brand strong {
        font-size: 0.9rem;
    }

    .hero,
    .gift-list,
    .donation-shell,
    .section-heading,
    .closing-cta,
    .result-card,
    .admin-main {
        width: min(100% - 2rem, 100%);
    }

    .hero {
        padding: 3rem 0 5rem;
    }

    .hero-portrait {
        border-radius: var(--radius-lg);
    }

    .progress-card,
    .donation-form-card,
    .result-card,
    .installer-card,
    .login-card {
        border-radius: var(--radius-lg);
    }

    .progress-meta,
    .mini-total {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.25rem;
    }

    .gift-card {
        min-height: 0;
        border-radius: var(--radius-lg);
    }

    .gift-image-wrap {
        min-height: 280px;
        aspect-ratio: 1 / 1;
    }

    .gift-copy {
        padding: 2rem;
    }

    .gift-state {
        margin-bottom: 2rem;
    }

    .payment-options,
    .stat-grid,
    .form-grid,
    .gift-setting-fields {
        grid-template-columns: 1fr;
    }

    .span-2,
    .span-3,
    .gift-setting-fields .eyebrow,
    .gift-setting-fields .field:first-of-type {
        grid-column: auto;
    }

    .bank-preview dl > div,
    .bank-details-list > div,
    .bank-details-list > div:has(.copy-button) {
        grid-template-columns: 1fr;
        gap: 0.25rem;
    }

    .copy-button {
        justify-self: start;
    }

    .admin-header {
        gap: 1rem;
    }

    .admin-brand {
        max-width: 120px;
    }

    .admin-header nav {
        gap: 0.6rem 0.9rem;
    }

    .admin-header nav > a,
    .link-button {
        font-size: 0.76rem;
    }

    .stat-primary {
        grid-column: auto;
    }

    .filter-form {
        display: grid;
        grid-template-columns: 1fr 1fr;
        width: 100%;
    }

    .filter-form .button {
        grid-column: 1 / -1;
    }

    .filter-form select {
        min-width: 0;
        width: 100%;
    }

    .panel-heading {
        align-items: flex-start;
        flex-direction: column;
    }

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

    .gift-setting-card img {
        width: 100%;
        height: auto;
        aspect-ratio: 1.6 / 1;
    }

    .copy-field,
    .sticky-save {
        align-items: stretch;
        flex-direction: column;
        border-radius: var(--radius-md);
    }

    .sticky-save {
        bottom: 0.5rem;
    }

    .sticky-save .button {
        width: 100%;
    }
}

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