:root {
    color-scheme: light;
    --green-950: #052b1a;
    --green-900: #073b23;
    --green-800: #075d32;
    --green-700: #07843e;
    --green-600: #0aa84f;
    --green-100: #dff3e5;
    --green-50: #eff9f2;
    --ice: #e9f4f6;
    --ink: #071f14;
    --muted: #5f7168;
    --line: rgba(7, 93, 50, .16);
    --glass: rgba(255, 255, 255, .76);
    --shadow: 0 20px 55px rgba(5, 43, 26, .13);
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--green-50); color: var(--ink); }
button, input { font: inherit; letter-spacing: 0; }
a { color: inherit; }
.campaign-shell { width: min(1420px, calc(100% - 48px)); margin-inline: auto; }
.glass-panel {
    background: var(--glass);
    border: 1px solid rgba(255, 255, 255, .86);
    box-shadow: var(--shadow);
    backdrop-filter: blur(22px) saturate(125%);
    -webkit-backdrop-filter: blur(22px) saturate(125%);
    border-radius: 8px;
}

.campaign-hero {
    position: relative;
    min-height: min(76vh, 820px);
    display: flex;
    align-items: end;
    background-color: var(--green-900);
    background-position: center;
    background-size: cover;
    color: white;
    overflow: hidden;
}
.campaign-hero__shade { position: absolute; inset: 0; background: rgba(3, 36, 21, .62); }
.campaign-hero__content { position: relative; z-index: 1; padding-block: 34px 72px; }
.campaign-brand { display: inline-flex; align-items: center; gap: 14px; text-decoration: none; margin-bottom: clamp(70px, 16vh, 190px); }
.campaign-brand img { width: 74px; height: 88px; object-fit: contain; filter: drop-shadow(0 8px 16px rgba(0,0,0,.18)); }
.campaign-brand span { display: grid; }
.campaign-brand strong { font-size: 1.25rem; }
.campaign-brand small { font-size: 1rem; opacity: .78; }
.campaign-kicker, .section-kicker { margin: 0 0 10px; color: #7ce9a2; font-weight: 800; text-transform: uppercase; font-size: .82rem; }
.campaign-hero h1 { max-width: 1000px; margin: 0; font-size: clamp(3rem, 7vw, 7rem); line-height: 1.05; letter-spacing: 0; hyphens: auto; overflow-wrap: anywhere; }
.campaign-subtitle { max-width: 780px; margin: 22px 0 0; font-size: clamp(1.18rem, 2vw, 1.7rem); line-height: 1.45; }
.campaign-primary-button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: 52px;
    margin-top: 30px;
    padding: 0 24px;
    border: 0;
    border-radius: 8px;
    background: var(--green-600);
    color: white;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 14px 30px rgba(10, 168, 79, .25);
}

.campaign-intro { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(320px, .8fr); align-items: start; gap: 24px; padding-block: 68px; }
.campaign-copy, .campaign-progress { padding: clamp(28px, 4vw, 54px); }
.campaign-intro h2, .section-heading h2, .supporter-section h2 { margin: 0; font-size: clamp(2rem, 4vw, 3.6rem); line-height: 1.05; letter-spacing: 0; }
.campaign-copy .section-kicker, .campaign-progress .section-kicker, .section-heading .section-kicker, .supporter-section .section-kicker { color: var(--green-700); }
.rich-copy { margin-top: 28px; color: var(--muted); font-size: 1.08rem; line-height: 1.75; }
.rich-copy p:last-child { margin-bottom: 0; }
.campaign-progress__value { font-size: clamp(2.8rem, 5vw, 5rem); font-weight: 900; color: var(--green-800); }
.campaign-progress > p { color: var(--muted); margin: 5px 0 22px; }
.progress-track { height: 16px; background: rgba(7, 93, 50, .1); border-radius: 999px; overflow: hidden; }
.progress-track span { display: block; height: 100%; background: var(--green-600); border-radius: inherit; }
.progress-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 18px; }
.progress-facts span { display: grid; color: var(--muted); font-size: .82rem; }
.progress-facts strong { color: var(--ink); font-size: 1.45rem; }
.funding-facts { margin: 26px 0 0; border-top: 1px solid var(--line); }
.funding-facts div { display: flex; justify-content: space-between; gap: 16px; padding-top: 14px; }
.funding-facts dt { color: var(--muted); }
.funding-facts dd { margin: 0; font-weight: 800; text-align: right; }

.field-section { padding-block: 70px 120px; background: var(--ice); }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 40px; margin-bottom: 32px; }
.section-heading > div:first-child { max-width: 820px; }
.section-heading p:last-child { margin-bottom: 0; color: var(--muted); font-size: 1.05rem; line-height: 1.6; }
.field-legend { display: flex; flex-wrap: wrap; gap: 14px; justify-content: flex-end; color: var(--muted); font-size: .9rem; }
.field-legend span { display: flex; align-items: center; gap: 7px; }
.field-legend i { width: 18px; height: 18px; border-radius: 4px; border: 1px solid rgba(0,0,0,.08); }
.field-legend .available { background: #79cc8f; }
.field-legend .special { background: #63bdc1; }
.field-legend .premium { background: #d5e95e; }
.field-legend .reserved { background: #efb956; }
.field-legend .sold { background: #39724d; }
.soccer-field-wrap { padding: clamp(10px, 2vw, 24px); overflow-x: auto; }
.soccer-field-coordinates {
    display: grid;
    grid-template-columns: 1.7rem minmax(0, 1fr) 1.7rem;
    grid-template-rows: 1.35rem auto 1.35rem;
    grid-template-areas:
        ". columns-top ."
        "rows-left field rows-right"
        ". columns-bottom .";
    gap: 4px;
    width: 100%;
    min-width: 820px;
}
.field-axis { color: var(--green-900); font-size: .68rem; font-weight: 800; line-height: 1; user-select: none; }
.field-axis span { display: grid; place-items: center; min-width: 0; min-height: 0; }
.field-axis--columns { display: grid; grid-template-columns: repeat(40, minmax(0, 1fr)); padding: 0 10px;}
.field-axis--rows { display: grid; grid-template-rows: repeat(20, minmax(0, 1fr)); padding: 10px 0; }
.field-axis--top { grid-area: columns-top; }
.field-axis--bottom { grid-area: columns-bottom; }
.field-axis--left { grid-area: rows-left; }
.field-axis--right { grid-area: rows-right; }
.soccer-field {
    grid-area: field;
    position: relative;
    display: grid;
    grid-template-columns: repeat(40, 1fr);
    gap: 1px;
    width: 100%;
    aspect-ratio: 2 / 1;
    padding: 9px;
    /* border: 4px solid rgba(255,255,255,.9); */
    background: #137b38;
    overflow: hidden;
}
.field-cell { position: relative; z-index: 2; min-width: 0; min-height: 0; padding: 0; border: 0; border-radius: 2px; background: #79cc8f; cursor: pointer; transition: transform .12s ease, background .12s ease, box-shadow .12s ease; }
.field-cell:hover { transform: scale(1.22); z-index: 4; box-shadow: 0 3px 12px rgba(0,0,0,.28); }
.field-cell.kind-special { background: #63bdc1; }
.field-cell.kind-premium { background: #d5e95e; }
.field-cell.status-reserved { background: #efb956; cursor: not-allowed; }
.field-cell.status-sold { background: #39724d; cursor: not-allowed; }
.field-cell.status-blocked { background: #2a5238; opacity: .45; cursor: not-allowed; }
.field-cell.is-package-unavailable { opacity: .55; cursor: not-allowed; }
.field-cell.is-selected { background: white; box-shadow: inset 0 0 0 3px var(--green-950), 0 3px 12px rgba(0,0,0,.3); transform: scale(1.12); z-index: 5; }
.field-cell[data-supporter] { cursor: help; }
.field-cell[data-supporter]:hover { transform: none; }
.field-cell.is-supporter-highlighted { background: #185b36; box-shadow: inset 0 0 0 2px #fff; z-index: 4; }
.field-cell[data-supporter]:focus-visible { outline: 3px solid #ffe071; outline-offset: -3px; z-index: 5; }
.field-supporter-popover {
    position: fixed;
    z-index: 60;
    width: min(360px, calc(100% - 24px));
    max-height: calc(100dvh - 24px);
    overflow-y: auto;
    padding: 24px;
    border: 1px solid #b4cbbd;
    border-top: 5px solid var(--green-700);
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    box-shadow: 0 12px 44px rgba(5, 43, 26, .3), 0 2px 8px rgba(5, 43, 26, .15);
    overflow-wrap: anywhere;
}
.field-supporter-popover[hidden], .field-supporter-popover [hidden] { display: none; }
.field-supporter-close { position: absolute; top: 8px; right: 8px; display: grid; place-items: center; width: 44px; height: 44px; padding: 10px; border: 0; border-radius: 6px; background: #eff5f1; color: var(--green-950); cursor: pointer; }
.field-supporter-close svg { width: 24px; height: 24px; }
.field-supporter-label { margin: 0 38px 18px 0; color: var(--green-800); font-size: .8rem; font-weight: 800; text-transform: uppercase; }
.field-supporter-logo { display: block; width: 100%; height: 108px; object-fit: contain; object-position: left center; margin-bottom: 18px; }
.field-supporter-popover h2 { margin: 0; font-size: 1.65rem; font-weight: 800; line-height: 1.2; letter-spacing: 0; }
.field-supporter-code { margin: 12px 0 0; color: #4b6054; font-size: .95rem; line-height: 1.4; }
.field-supporter-thanks { margin: 18px 0 0; padding-top: 16px; border-top: 1px solid var(--line); font-size: .9rem; color: var(--green-800); }
.field-supporter-close:focus-visible { outline: 3px solid var(--green-700); outline-offset: 3px; }
@media (max-width: 520px), (hover: none) {
    .field-supporter-popover { left: 12px !important; top: auto !important; right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); width: auto; max-height: 65dvh; }
}
.pitch-lines { position: absolute; inset: 9px; z-index: 3; pointer-events: none; border: 2px solid rgba(255,255,255,.72); box-sizing: border-box; }
.center-line { position: absolute; top: 0; bottom: 0; left: 50%; border-left: 2px solid rgba(255,255,255,.76); }
.penalty-box { position: absolute; top: 12.5%; width: 20%; height: 75%; border: 2px solid rgba(255,255,255,.76); box-sizing: border-box; }
.penalty-box.left { left: 0; border-left: 0; }
.penalty-box.right { right: 0; border-right: 0; }
.pitch-mark { position: absolute; width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,.9); transform: translate(-50%, -50%); }
.center-mark { left: 50%; top: 50%; }
.left-penalty-mark { left: 22.5%; top: 50%; }
.right-penalty-mark { left: 77.5%; top: 50%; }
.soccer-field[data-sector]:not([data-sector="all"]) { grid-template-columns: repeat(20, 1fr); aspect-ratio: 1; max-width: 760px; margin-inline: auto; }
.soccer-field[data-sector]:not([data-sector="all"]) .pitch-lines { display: none; }
.field-help { color: var(--muted); text-align: center; margin: 18px 0 0; }
.fundraising-contact {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: .92rem;
    line-height: 1.5;
    text-align: center;
}
.fundraising-contact a {
    color: var(--green-800);
    font-weight: 800;
    text-underline-offset: 3px;
}
.fundraising-contact--payment {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
    text-align: left;
}
.campaign-is-completed .campaign-primary-button { background: rgba(255, 255, 255, .92); color: var(--green-900); }
.campaign-is-completed .field-cell.status-available { background: rgba(121, 204, 143, .28); }
.campaign-is-completed .field-cell.status-sold { cursor: help; }
.campaign-is-completed .soccer-field-wrap { box-shadow: 0 24px 70px rgba(5, 43, 26, .2); }

.supporter-section { padding-block: 70px; display: grid; gap: 48px; }
.supporter-section > div { display: grid; gap: 20px; }
.supporter-cloud, .sponsor-row { display: flex; flex-wrap: wrap; gap: 10px; }
.supporter-card { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 7px 14px 7px 8px; border: 1px solid var(--line); border-radius: 8px; background: white; }
.supporter-card img { width: 38px; height: 38px; border-radius: 6px; object-fit: contain; background: white; }
.supporter-card span { font-weight: 700; }
.supporter-logo-document { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 6px; background: var(--green-100); color: var(--green-800); font-size: .7rem; font-weight: 850; text-decoration: none; }
.sponsor-row a { display: grid; place-items: center; width: 170px; height: 90px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: white; text-decoration: none; font-weight: 800; }
.sponsor-row img { max-width: 100%; max-height: 100%; object-fit: contain; }
.campaign-footer { background: white; font-size: 1rem; line-height: 1.6; overflow-wrap: anywhere; }
.campaign-footer__main { padding-block: 52px; background: #384452; color: #dce2e8; }
.campaign-footer__columns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 48px; }
.campaign-footer h2 { margin: 0 0 18px; padding-bottom: 14px; border-bottom: 1px solid rgba(255, 255, 255, .24); color: white; font-size: 1.25rem; line-height: 1.3; letter-spacing: 0; }
.campaign-footer p { margin: 0; }
.campaign-footer address { margin-bottom: 12px; font-style: normal; }
.campaign-footer ul { margin: 0; padding: 0; list-style: none; }
.campaign-footer a { display: inline-block; padding-block: 5px; text-decoration: none; text-underline-offset: 4px; }
.campaign-footer h2 a { padding: 0; }
.campaign-footer a:hover { text-decoration: underline; }
.campaign-footer a:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }
.campaign-footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 32px; padding-block: 20px calc(20px + env(safe-area-inset-bottom)); color: var(--green-900); font-size: .9rem; }
.campaign-footer__bottom ul { display: flex; flex-wrap: wrap; gap: 8px 24px; }
@media (min-width: 851px) {
    .fundraising-page:has(.selection-bar:not([hidden])) .campaign-footer { padding-bottom: 110px; }
    .campaign-footer a { scroll-margin-bottom: 130px; }
}

.selection-bar { position: fixed; z-index: 30; left: 50%; bottom: 18px; width: min(720px, calc(100% - 30px)); transform: translateX(-50%); display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 12px 12px 12px 20px; border: 1px solid rgba(255,255,255,.7); border-radius: 8px; background: rgba(5,43,26,.92); color: white; box-shadow: 0 18px 50px rgba(0,0,0,.28); backdrop-filter: blur(18px); }
.selection-bar[hidden] { display: none; }
.selection-bar > div { display: grid; }
.selection-bar span { color: #a9d9b8; }
.selection-bar button { min-height: 48px; padding: 0 18px; border: 0; border-radius: 8px; background: white; color: var(--green-900); font-weight: 850; cursor: pointer; }
.reservation-dialog { width: min(760px, calc(100% - 28px)); max-height: calc(100dvh - 36px); border: 0; border-radius: 8px; padding: 0; color: var(--ink); box-shadow: 0 30px 90px rgba(0,0,0,.3); }
.reservation-dialog::backdrop { background: rgba(1, 22, 12, .65); backdrop-filter: blur(8px); }
.reservation-dialog form { position: relative; padding: clamp(24px, 5vw, 48px); }
.reservation-dialog h2 { margin: 0; font-size: clamp(2rem, 4vw, 3rem); letter-spacing: 0; }
.reservation-dialog h2 + p { color: var(--muted); line-height: 1.55; }
.dialog-close { position: absolute; top: 18px; right: 18px; width: 42px; height: 42px; border: 0; border-radius: 50%; background: var(--green-50); color: var(--ink); font-size: 1.7rem; cursor: pointer; }
.form-grid, .receipt-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 28px; }
.form-grid label, .receipt-fields label { display: grid; gap: 8px; font-weight: 750; }
.form-grid label span { color: var(--muted); font-weight: 500; }
.form-grid .full { grid-column: 1 / -1; }
.form-grid input, .receipt-fields input { width: 100%; min-height: 50px; border: 1px solid var(--line); border-radius: 8px; padding: 0 14px; color: var(--ink); background: white; }
.form-grid input[type="file"] { padding: 9px 12px; }
.supporter-logo-field small { color: var(--muted); font-size: .86rem; font-weight: 500; line-height: 1.45; }
.check-row { display: flex; gap: 11px; align-items: start; margin-top: 18px; color: var(--muted); line-height: 1.45; }
.check-row input { width: 21px; height: 21px; flex: 0 0 auto; accent-color: var(--green-700); }
.receipt-fields[hidden] { display: none; }
.form-submit { width: 100%; }
.form-note { color: var(--muted); text-align: center; font-size: .9rem; }
.form-errors { margin: 20px 0; padding: 16px; border: 1px solid #e4a4a4; border-radius: 8px; background: #fff0f0; color: #8a2020; }
.form-errors ul { margin-bottom: 0; }

.payment-page { min-height: 100dvh; display: flex; flex-direction: column; background: var(--ice); }
.payment-shell { flex: 1; width: min(1050px, calc(100% - 32px)); margin-inline: auto; padding-block: clamp(24px, 5vw, 70px); }
.campaign-brand--dark { color: var(--green-900); margin-bottom: 28px; }
.payment-card { padding: clamp(26px, 5vw, 58px); }
.payment-card h1 { margin: 0; max-width: 850px; font-size: clamp(2.5rem, 6vw, 5.2rem); line-height: .98; letter-spacing: 0; }
.payment-card > p { color: var(--muted); font-size: 1.1rem; line-height: 1.65; }
.payment-grid { display: grid; grid-template-columns: minmax(250px, .7fr) 1.3fr; gap: 28px; margin: 34px 0; }
.giro-code { display: grid; text-align: center; gap: 8px; padding: 22px; border-radius: 8px; background: white; }
.giro-code svg { width: 100%; height: auto; }
.giro-code span { color: var(--muted); font-size: .9rem; }
.bank-details { margin: 0; border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,.65); overflow: hidden; }
.bank-details div { padding: 16px 20px; border-bottom: 1px solid var(--line); }
.bank-details div:last-child { border-bottom: 0; }
.bank-details dt { color: var(--muted); font-size: .8rem; text-transform: uppercase; font-weight: 750; }
.bank-details dd { margin: 5px 0 0; font-size: 1.1rem; font-weight: 800; overflow-wrap: anywhere; }
.selected-cells { display: grid; gap: 7px; padding-top: 24px; border-top: 1px solid var(--line); }
.selected-cells span { color: var(--muted); line-height: 1.6; }

@media (max-width: 850px) {
    .campaign-shell { width: min(100% - 28px, 680px); }
    .campaign-hero { min-height: 78vh; }
    .campaign-hero__content { padding-bottom: 44px; }
    .campaign-hero h1 { font-size: 3.5rem; }
    .campaign-brand { margin-bottom: 90px; }
    .campaign-brand img { width: 58px; height: 70px; }
    .campaign-intro { grid-template-columns: 1fr; padding-block: 34px; }
    .section-heading { display: grid; }
    .field-legend { justify-content: flex-start; }
    .field-section { padding-block: 48px 36px; }
    .supporter-section { padding-block: 44px 64px; }
    .soccer-field-wrap { padding: 8px; scrollbar-color: rgba(7, 93, 50, .4) transparent; }
    .soccer-field-coordinates { min-width: 800px; }
    .soccer-field[data-sector="all"] { padding: 4px; border-width: 2px; }
    .soccer-field[data-sector="all"] .pitch-lines { inset: 4px; }
    .campaign-footer__main { padding-block: 36px; }
    .campaign-footer__columns { grid-template-columns: 1fr; gap: 32px; }
    .campaign-footer__bottom { align-items: start; flex-direction: column; }
    .selection-bar {
        position: static;
        z-index: auto;
        width: 100%;
        margin-top: 24px;
        transform: none;
    }
    .form-grid, .receipt-fields, .payment-grid { grid-template-columns: 1fr; }
}

@media (max-width: 850px), (pointer: coarse) {
    .soccer-field-wrap {
        overscroll-behavior-inline: contain;
        scrollbar-gutter: stable;
        -webkit-overflow-scrolling: touch;
    }
    .soccer-field-coordinates {
        --fundraising-touch-cell-size: 20px;
        grid-template-columns: 1.7rem max-content 1.7rem;
        grid-template-rows: 1.35rem max-content 1.35rem;
        width: max-content;
        min-width: 0;
    }
    .field-axis--columns {
        grid-template-columns: repeat(40, var(--fundraising-touch-cell-size));
        gap: 1px;
        padding-inline: 4px;
    }
    .field-axis--rows {
        grid-template-rows: repeat(20, var(--fundraising-touch-cell-size));
        gap: 1px;
        padding-block: 4px;
    }
    .soccer-field[data-sector="all"] {
        grid-template-columns: repeat(40, var(--fundraising-touch-cell-size));
        grid-template-rows: repeat(20, var(--fundraising-touch-cell-size));
        width: max-content;
        aspect-ratio: auto;
        padding: 4px;
    }
    .soccer-field[data-sector="all"] .pitch-lines {
        inset: 4px;
    }
    .field-axis--left {
        position: sticky;
        left: 0;
        z-index: 8;
        border-radius: 4px;
        background: rgba(255, 255, 255, .94);
        box-shadow: 5px 0 10px rgba(5, 43, 26, .08);
    }
    .field-cell {
        min-width: 0;
        min-height: 0;
        border-radius: 3px;
        box-shadow: inset 0 0 0 1px rgba(5, 43, 26, .12);
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }
    .field-cell:hover,
    .field-cell[data-supporter]:hover {
        transform: none;
    }
    .field-cell.is-selected {
        transform: none;
        box-shadow: inset 0 0 0 3px var(--green-950), 0 3px 12px rgba(0, 0, 0, .3);
    }
}

@media (max-width: 520px) {
    .campaign-hero h1 { font-size: 2.5rem; }
    .campaign-copy, .campaign-progress { padding: 24px; }
    .progress-facts { grid-template-columns: 1fr 1fr 1fr; }
    .selection-bar { align-items: stretch; }
    .selection-bar button { max-width: 180px; }
    .reservation-dialog { width: 100%; max-height: 92dvh; margin: auto 0 0; border-radius: 8px 8px 0 0; }
    .payment-card { padding: 24px; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .field-cell { transition: none; }
}
