:root {
    --ink: #07264a;
    --ink-soft: #173d60;
    --muted: #617589;
    --navy: #062b52;
    --navy-2: #083862;
    --navy-deep: #031f3d;
    --panel: #ffffff;
    --panel-soft: #f3f8fb;
    --line: #d9e6ee;
    --aqua: #18a8c8;
    --aqua-2: #0a96bb;
    --aqua-soft: #e6f7fb;
    --orange: #f15a16;
    --orange-dark: #d94707;
    --foam: #ffffff;
    --lime: #43a66b;
    --danger: #c9444f;
    --warning: #b87b15;
    --radius: 18px;
    --shadow: 0 18px 46px rgba(7, 38, 74, 0.11);
    --shadow-soft: 0 10px 30px rgba(7, 38, 74, 0.075);
    --max: 1180px;
}

* { box-sizing: border-box; }
html { background: #ffffff; color: var(--ink); scroll-behavior: smooth; }
body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at 88% 7%, rgba(24, 168, 200, 0.075), transparent 25rem),
        linear-gradient(180deg, #ffffff 0, #f7fbfd 24rem, #f4f9fb 100%);
    color: var(--ink);
}

body::before {
    content: "";
    position: fixed;
    inset: auto 0 0;
    height: 150px;
    pointer-events: none;
    opacity: .4;
    background:
        radial-gradient(120% 80px at 10% 100%, transparent 48%, rgba(24,168,200,.055) 49% 51%, transparent 52%),
        radial-gradient(120% 80px at 56% 112%, transparent 48%, rgba(24,168,200,.045) 49% 51%, transparent 52%);
    z-index: -1;
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { color: inherit; }

.site-header {
    width: min(calc(100% - 40px), 1400px);
    margin: 0 auto;
    min-height: 154px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 34px;
    position: relative;
    z-index: 30;
    background: #ffffff;
}
.brand {
    display: inline-flex;
    align-items: center;
    flex: 0 1 390px;
    min-width: 260px;
}
.brand-logo {
    display: block;
    width: min(100%, 360px);
    height: auto;
}
.nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: clamp(18px, 2.4vw, 36px);
    color: var(--navy);
    font-size: 14px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -.01em;
}
.nav a:not(.button), .nav-link {
    position: relative;
    transition: color .16s ease;
}
.nav a:not(.button)::after, .nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    right: 100%;
    bottom: -9px;
    height: 3px;
    border-radius: 99px;
    background: var(--aqua);
    transition: right .16s ease;
}
.nav a:not(.button):hover, .nav-link:hover { color: var(--aqua-2); }
.nav a:not(.button):hover::after, .nav-link:hover::after { right: 0; }
.nav-form { margin: 0; }
.nav-link {
    border: 0;
    background: transparent;
    cursor: pointer;
    padding: 0;
    color: var(--navy);
    font-weight: 900;
    text-transform: uppercase;
}

.shell { width: min(calc(100% - 36px), var(--max)); margin-inline: auto; }
.narrow { max-width: 670px; }
main { min-height: calc(100vh - 250px); }

.hero {
    width: min(calc(100% - 36px), 1340px);
    min-height: 650px;
    margin: 0 auto 58px;
    border: 1px solid rgba(24, 168, 200, .18);
    border-radius: 0 0 26px 26px;
    overflow: hidden;
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(300px, .8fr);
    align-items: center;
    padding: clamp(38px, 7vw, 92px);
    background:
        linear-gradient(125deg, rgba(11, 36, 48, 0.94), rgba(5, 20, 29, 0.88)),
        repeating-linear-gradient(0deg, transparent 0 34px, rgba(80, 229, 255, .035) 35px 36px);
    box-shadow: 0 22px 52px rgba(7, 38, 74, .16);
}
.hero::before {
    content: "";
    position: absolute;
    left: clamp(38px, 7vw, 92px);
    top: 0;
    width: 112px;
    height: 6px;
    background: var(--orange);
    z-index: 5;
}
.hero::after {
    content: "";
    position: absolute;
    inset: auto -15% -44% 24%;
    height: 58%;
    border-radius: 50%;
    border-top: 2px solid rgba(80, 229, 255, .3);
    box-shadow: 0 -28px 90px rgba(80, 229, 255, .08);
}
.hero-content { position: relative; z-index: 4; max-width: 760px; }
.eyebrow {
    margin: 0 0 15px;
    color: var(--aqua-2);
    font-size: 12px;
    font-weight: 950;
    letter-spacing: .18em;
    text-transform: uppercase;
}
.hero .eyebrow { color: #4edbf4; }
.hero h1, .page-heading h1, .auth-shell h1 {
    margin: 0;
    line-height: .88;
    letter-spacing: -.065em;
    font-weight: 950;
}
.hero h1 { font-size: clamp(50px, 8.5vw, 112px); color: #f7fcff; }
.hero h1 span { color: #42d5ee; }
.hero-copy { max-width: 680px; margin: 30px 0 0; color: #c4d6df; font-size: clamp(17px, 2vw, 21px); line-height: 1.58; }
.hero-actions, .button-row, .admin-links { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 30px; }

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 21px;
    border: 1px solid var(--orange);
    border-radius: 7px;
    background: var(--orange);
    color: #ffffff;
    font-weight: 950;
    letter-spacing: .01em;
    cursor: pointer;
    box-shadow: 0 7px 18px rgba(241, 90, 22, .18);
    transition: transform .16s ease, background .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.button:hover {
    transform: translateY(-2px);
    background: var(--orange-dark);
    border-color: var(--orange-dark);
    box-shadow: 0 10px 22px rgba(241, 90, 22, .24);
}
.button:disabled { opacity: .55; cursor: wait; transform: none; }
.button-ghost {
    background: transparent;
    color: var(--navy);
    border-color: rgba(6, 43, 82, .22);
    box-shadow: none;
}
.button-ghost:hover { background: var(--aqua-soft); color: var(--navy); border-color: var(--aqua); box-shadow: none; }
.hero .button-ghost { color: #ffffff; border-color: rgba(255,255,255,.32); }
.hero .button-ghost:hover { background: rgba(255,255,255,.10); color: #ffffff; border-color: rgba(255,255,255,.55); }
.button-small { min-height: 45px; padding-inline: 22px; font-size: 13px; }
.button-full { width: 100%; }

.water-ball {
    justify-self: end;
    width: clamp(230px, 30vw, 390px);
    aspect-ratio: 1;
    border-radius: 50%;
    display: grid;
    place-items: center;
    position: relative;
    z-index: 3;
    background:
        radial-gradient(circle at 32% 27%, rgba(255,255,255,.9) 0 2%, transparent 3%),
        conic-gradient(from 12deg, #51e6ff 0 13%, #0a2a38 13% 29%, #51e6ff 29% 45%, #0a2a38 45% 61%, #51e6ff 61% 77%, #0a2a38 77% 92%, #51e6ff 92%);
    box-shadow: 0 35px 80px rgba(0,0,0,.36), inset -26px -28px 56px rgba(0,0,0,.3), inset 16px 15px 36px rgba(255,255,255,.13);
    transform: rotate(9deg);
}
.water-ball::after { content: ""; position: absolute; inset: 13%; border: 2px solid rgba(255,255,255,.25); border-radius: 50%; }
.water-ball span { font-weight: 950; letter-spacing: .16em; font-size: clamp(26px, 4vw, 48px); color: white; text-shadow: 0 2px 12px rgba(0,0,0,.4); }
.hero-orbit { position: absolute; border: 1px solid rgba(80,229,255,.13); border-radius: 50%; }
.hero-orbit-one { width: 560px; height: 560px; right: -80px; top: 25px; }
.hero-orbit-two { width: 720px; height: 300px; right: -170px; top: 160px; transform: rotate(-20deg); }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 82px; }
.steps article, .detail-card, .empty-card, .form-card, .table-card, .stat-card, .activity-card {
    border: 1px solid var(--line);
    background: var(--panel);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
}
.steps article {
    position: relative;
    padding: 30px 30px 28px;
    min-height: 224px;
    overflow: hidden;
}
.steps article::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 5px;
    background: linear-gradient(180deg, var(--aqua), #48cde2);
}
.steps article:last-child::before { background: var(--orange); }
.step-number { display: inline-block; color: var(--aqua-2); font-size: 15px; font-weight: 950; letter-spacing: .12em; margin-bottom: 56px; }
.steps h2 { margin: 0 0 12px; color: var(--navy); font-size: 21px; letter-spacing: -.025em; }
.steps p, .signal p, .muted { color: var(--muted); line-height: 1.65; }
.signal {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, .75fr) minmax(0, 1.25fr);
    gap: 48px;
    align-items: end;
    padding: 64px 54px 70px;
    margin-bottom: 78px;
    border: 0;
    border-radius: 24px;
    overflow: hidden;
    color: #ffffff;
    background:
        radial-gradient(ellipse at 20% 130%, rgba(24,168,200,.16), transparent 45%),
        linear-gradient(120deg, var(--navy-deep), var(--navy));
    box-shadow: var(--shadow);
}
.signal::after {
    content: "";
    position: absolute;
    left: -5%;
    right: -5%;
    bottom: -55px;
    height: 100px;
    border: 2px solid rgba(24,168,200,.20);
    border-radius: 50%;
}
.signal h2 { position: relative; z-index: 1; margin: 0; color: #ffffff; font-size: clamp(40px, 5vw, 74px); line-height: .96; letter-spacing: -.06em; }
.signal > p { position: relative; z-index: 1; font-size: clamp(16px, 1.35vw, 20px); margin: 0 0 6px; max-width: none; color: #bcd4e4; }
.signal-line { display: block; white-space: nowrap; }

.page-heading { padding: 62px 0 34px; position: relative; }
.page-heading::before, .auth-shell::before {
    content: "";
    display: block;
    width: 78px;
    height: 5px;
    margin-bottom: 22px;
    border-radius: 99px;
    background: var(--orange);
}
.page-heading h1, .auth-shell h1 { font-size: clamp(48px, 7vw, 84px); color: var(--navy); }
.page-heading .muted { max-width: 750px; margin-top: 22px; }
.auth-shell { padding: 68px 0 100px; }
.auth-shell .muted { margin: 20px 0 26px; }

.form-card { padding: clamp(22px, 4vw, 34px); display: grid; gap: 20px; box-shadow: var(--shadow); }
.form-card.compact { box-shadow: var(--shadow-soft); margin-top: 28px; }
.form-card h2 { margin: 0 0 3px; color: var(--navy); font-size: 24px; }
.form-card label { display: grid; gap: 8px; color: var(--ink-soft); font-size: 13px; font-weight: 850; letter-spacing: .02em; }
.form-card input, .form-card select, .form-card textarea, .search-row input {
    width: 100%;
    border: 1px solid #cbdbe5;
    border-radius: 10px;
    background: #ffffff;
    color: var(--ink);
    padding: 13px 14px;
    outline: none;
    transition: border .15s ease, box-shadow .15s ease, background .15s ease;
}
.form-card input:hover, .form-card select:hover, .form-card textarea:hover, .search-row input:hover { border-color: #abc5d4; }
.form-card input:focus, .form-card select:focus, .form-card textarea:focus, .search-row input:focus {
    border-color: var(--aqua);
    box-shadow: 0 0 0 3px rgba(24,168,200,.13);
    background: #fbfeff;
}
.form-card small { color: var(--muted); font-weight: 500; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-errors {
    border: 1px solid rgba(201,68,79,.28);
    background: #fff2f3;
    border-radius: 12px;
    padding: 12px 18px;
    margin-bottom: 20px;
    color: #982e39;
}
.form-errors p { margin: 5px 0; }
.text-link { color: var(--aqua-2); font-weight: 850; }
.text-link:hover { color: var(--orange-dark); text-decoration: underline; }

.flash {
    width: min(calc(100% - 36px), var(--max));
    margin: 16px auto 0;
    padding: 14px 18px;
    border: 1px solid var(--line);
    border-left: 5px solid var(--aqua);
    border-radius: 10px;
    background: #ffffff;
    color: var(--ink);
    box-shadow: var(--shadow-soft);
}
.flash-success { border-left-color: var(--lime); }
.flash-warning { border-left-color: #e3a12f; }
.flash-error { border-left-color: var(--danger); }

.availability-calendar-shell { padding-bottom: 90px; }
.availability-calendar-scroll {
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: thin;
    scrollbar-color: var(--aqua) #eaf5f8;
}
.availability-calendar {
    min-width: 1040px;
    border: 1px solid var(--line);
    border-radius: 18px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}
.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    background: var(--navy);
    color: #ffffff;
}
.calendar-weekday {
    padding: 12px 8px;
    text-align: center;
    color: #66d9eb;
    font-size: 11px;
    font-weight: 950;
    letter-spacing: .17em;
    border-right: 1px solid rgba(255,255,255,.14);
}
.calendar-weekday:last-child { border-right: 0; }
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    background: var(--line);
    gap: 1px;
}
.calendar-day {
    min-width: 0;
    min-height: 330px;
    padding: 12px;
    background: #ffffff;
}
.calendar-day.is-outside-range {
    background: #f2f7f9;
}
.calendar-day.is-today {
    box-shadow: inset 0 4px 0 var(--orange);
    background: linear-gradient(180deg, #fff9f4 0, #ffffff 62px);
}
.calendar-date {
    display: flex;
    align-items: baseline;
    gap: 6px;
    min-height: 38px;
    padding-bottom: 9px;
    margin-bottom: 9px;
    border-bottom: 1px solid var(--line);
}
.calendar-date span {
    display: none;
    color: var(--aqua-2);
    font-size: 9px;
    font-weight: 950;
    letter-spacing: .13em;
}
.calendar-date strong {
    color: var(--navy);
    font-size: 27px;
    line-height: 1;
    font-weight: 950;
}
.calendar-date small {
    color: var(--muted);
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .1em;
}
.calendar-time-slots {
    display: grid;
    gap: 7px;
}
.slot-button {
    text-align: left;
    border: 1px solid var(--line);
    background: #ffffff;
    color: var(--ink);
    border-radius: 10px;
    padding: 10px;
    cursor: pointer;
    display: grid;
    align-content: center;
    gap: 4px;
    min-width: 0;
    min-height: 57px;
    box-shadow: 0 4px 12px rgba(7,38,74,.055);
    transition: transform .15s ease, border .15s ease, background .15s ease, box-shadow .15s ease;
}
.slot-button span {
    font-weight: 900;
    font-size: 11px;
    line-height: 1.2;
}
.slot-button small {
    color: var(--muted);
    font-size: 9px;
    line-height: 1.25;
}
.slot-button:hover { transform: translateY(-2px); border-color: rgba(24,168,200,.65); box-shadow: 0 10px 22px rgba(7,38,74,.10); }
.slot-button.is-selected {
    background: var(--aqua-soft);
    border-color: var(--aqua);
    box-shadow: inset 0 0 0 1px rgba(24,168,200,.10), 0 4px 12px rgba(7,38,74,.06);
}
.slot-button.is-selected .slot-label::before { content: "✓ "; color: var(--aqua-2); }
.slot-button.is-working { opacity: .55; }
.slot-button:disabled { opacity: .42; cursor: not-allowed; transform: none; border-color: var(--line); box-shadow: none; }
.slot-button:disabled:hover { transform: none; border-color: var(--line); }
.toast {
    position: fixed;
    z-index: 100;
    left: 50%;
    bottom: 28px;
    transform: translate(-50%, 30px);
    opacity: 0;
    pointer-events: none;
    background: var(--navy);
    color: #ffffff;
    font-weight: 850;
    padding: 12px 18px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    transition: .2s ease;
}
.toast.is-visible { transform: translate(-50%, 0); opacity: 1; }
.toast.is-error { background: #9f2f3a; }

.game-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; padding-bottom: 64px; }
.game-card {
    position: relative;
    border: 1px solid var(--line);
    border-top: 5px solid var(--aqua);
    border-radius: var(--radius);
    padding: 28px;
    min-height: 260px;
    display: grid;
    align-content: start;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
    transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.game-card:hover { transform: translateY(-3px); border-color: rgba(24,168,200,.55); box-shadow: var(--shadow); }
.game-card.status-confirmed { background: linear-gradient(145deg, #effaf4, #ffffff); border-top-color: var(--lime); }
.game-status { color: var(--aqua-2); font-size: 11px; font-weight: 950; letter-spacing: .18em; margin-bottom: 42px; }
.status-confirmed .game-status { color: #33875a; }
.game-card h2 { margin: 0; color: var(--navy); font-size: 30px; letter-spacing: -.04em; }
.game-card p { margin: 7px 0 20px; color: var(--muted); }
.game-card strong { font-size: 15px; }
.game-meter { margin-top: auto; padding-top: 24px; display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 12px; border-top: 1px solid var(--line); }
.empty-card { grid-column: 1 / -1; padding: 38px; }
.big-number { display: block; color: var(--aqua-2); font-size: 70px; font-weight: 950; line-height: 1; }
.empty-card h2 { margin: 12px 0 8px; color: var(--navy); font-size: 30px; }
.empty-card p { color: var(--muted); max-width: 660px; }
.activity-section { padding: 60px 0 100px; border-top: 1px solid var(--line); }
.activity-section h2 { color: var(--navy); font-size: 34px; margin: 0 0 26px; letter-spacing: -.04em; }
.activity-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.activity-card { padding: 18px; display: grid; gap: 6px; }
.activity-card strong { color: var(--navy); font-size: 23px; }
.activity-card span { color: var(--muted); }
.activity-card em { color: var(--aqua-2); font-style: normal; font-size: 12px; font-weight: 850; }

.game-detail { padding: 70px 0 100px; }
.game-detail-top { display: flex; align-items: end; justify-content: space-between; gap: 30px; padding-bottom: 38px; }
.game-detail h1 { color: var(--navy); font-size: clamp(48px, 8vw, 92px); letter-spacing: -.07em; line-height: .92; margin: 0; }
.game-time { color: var(--muted); font-size: 21px; }
.score-ring {
    flex: 0 0 auto;
    width: 145px;
    aspect-ratio: 1;
    border-radius: 50%;
    border: 3px solid var(--aqua);
    display: grid;
    place-items: center;
    align-content: center;
    background: var(--aqua-soft);
    box-shadow: var(--shadow-soft);
}
.score-ring strong { color: var(--navy); font-size: 48px; line-height: 1; }
.score-ring span { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .12em; }
.detail-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 14px; }
.detail-card { padding: 28px; }
.detail-card > span, .rsvp-card span { color: var(--aqua-2); font-size: 10px; font-weight: 950; letter-spacing: .18em; }
.detail-card h2 { color: var(--navy); font-size: 29px; margin: 16px 0 10px; }
.detail-card p, .detail-card small { color: var(--muted); line-height: 1.6; }
.rsvp-card {
    margin-top: 14px;
    border: 1px solid rgba(24,168,200,.35);
    border-radius: var(--radius);
    padding: 24px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    background: linear-gradient(120deg, var(--aqua-soft), #ffffff);
    box-shadow: var(--shadow-soft);
}
.rsvp-card > div { display: grid; gap: 7px; }
.rsvp-card strong { color: var(--navy); font-size: 25px; }
.rsvp-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.settings-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 14px; padding-bottom: 100px; align-items: start; }
.stat-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.stat-card { padding: 20px; min-height: 120px; display: grid; align-content: end; border-top: 4px solid var(--aqua); }
.stat-card:nth-child(3n) { border-top-color: var(--orange); }
.stat-card strong { color: var(--navy); font-size: 38px; letter-spacing: -.05em; }
.stat-card span { color: var(--muted); font-size: 12px; }
.stat-card.alert { border-top-color: var(--danger); border-color: rgba(201,68,79,.38); }
.admin-links { margin-top: 22px; margin-bottom: 32px; }
.table-card { padding: 24px; margin-bottom: 80px; }
.table-card h2 { margin: 0 0 18px; color: var(--navy); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 720px; }
th, td { padding: 14px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--navy); background: var(--panel-soft); font-size: 10px; text-transform: uppercase; letter-spacing: .14em; }
td { font-size: 13px; }
td small { color: var(--muted); }
.actions, .inline-actions { display: flex; align-items: center; gap: 10px; }
.text-button { border: 0; padding: 0; background: transparent; color: var(--aqua-2); font-weight: 850; cursor: pointer; }
.text-button:hover { color: var(--orange-dark); text-decoration: underline; }
.search-row { display: flex; gap: 10px; margin-bottom: 20px; }
.search-row input { max-width: 420px; }

.site-footer {
    position: relative;
    width: 100%;
    margin: 0;
    padding: 48px max(18px, calc((100% - var(--max)) / 2)) 52px;
    border-top: 5px solid var(--aqua);
    display: flex;
    justify-content: space-between;
    gap: 24px;
    overflow: hidden;
    background: var(--navy-deep);
    color: #c5d8e5;
    font-size: 12px;
}
.site-footer::before {
    content: "";
    position: absolute;
    left: -10%;
    right: -10%;
    bottom: -64px;
    height: 110px;
    border: 2px solid rgba(24,168,200,.22);
    border-radius: 50%;
    box-shadow: 0 -22px 0 -20px rgba(24,168,200,.16), 0 -44px 0 -42px rgba(24,168,200,.12);
}
.site-footer > * { position: relative; z-index: 1; }
.site-footer .text-link { color: #54d2e6; }

.privacy-copy { max-width: 800px; padding-bottom: 100px; color: var(--muted); line-height: 1.75; }
.privacy-copy h2 { color: var(--navy); margin-top: 34px; }

@media (max-width: 1050px) {
    .site-header { min-height: 132px; }
    .brand { flex-basis: 300px; min-width: 225px; }
    .brand-logo { width: min(100%, 300px); }
    .nav { gap: 18px; font-size: 12px; }
}

@media (max-width: 960px) {
    .site-header { width: min(calc(100% - 30px), var(--max)); }
    .hero { grid-template-columns: 1fr; min-height: auto; }
    .water-ball { position: absolute; right: -80px; bottom: -80px; opacity: .32; }
    .stat-grid { grid-template-columns: repeat(2, 1fr); }
    .activity-grid { grid-template-columns: repeat(2, 1fr); }
    .settings-grid, .detail-grid { grid-template-columns: 1fr; }
    .signal { padding-inline: 36px; }
}

@media (max-width: 760px) {
    .site-header {
        min-height: 0;
        padding: 14px 0 15px;
        align-items: center;
        flex-wrap: wrap;
        gap: 12px;
    }
    .brand { flex-basis: 245px; min-width: 200px; }
    .brand-logo { width: min(100%, 245px); }
    .nav { width: 100%; gap: 14px; flex-wrap: wrap; justify-content: flex-start; font-size: 11px; padding-top: 9px; border-top: 1px solid var(--line); }
    .nav a:not(.button)::after, .nav-link::after { bottom: -5px; }
    .nav .button { margin-left: auto; }
    .hero { padding: 42px 24px 90px; border-radius: 0 0 20px 20px; }
    .hero h1 { font-size: clamp(52px, 17vw, 80px); }
    .steps, .signal, .game-grid, .stat-grid { grid-template-columns: 1fr; }
    .steps { gap: 12px; }
    .steps article { min-height: 185px; }
    .step-number { margin-bottom: 32px; }
    .signal { gap: 30px; padding: 46px 28px 52px; }
    .signal-line { display: inline; white-space: normal; }
    .signal-line + .signal-line::before { content: " "; }
    .availability-calendar { min-width: 980px; }
    .calendar-day { min-height: 310px; padding: 10px; }
    .slot-button { padding: 9px; }
    .activity-grid { grid-template-columns: 1fr 1fr; }
    .field-grid { grid-template-columns: 1fr; }
    .rsvp-card, .game-detail-top { align-items: flex-start; flex-direction: column; }
    .score-ring { width: 112px; }
    .site-footer { flex-direction: column; gap: 7px; }
}

@media (max-width: 450px) {
    .brand { flex-basis: 215px; min-width: 0; }
    .brand-logo { width: 215px; }
    .nav .button { margin-left: 0; }
    .activity-grid { grid-template-columns: 1fr; }
    .hero-actions .button { width: 100%; }
    .page-heading, .auth-shell { padding-top: 46px; }
}

/* Homepage composition locked to the approved DFW Water Polo branding reference. */
.home-page {
    background: #ffffff;
}
.home-page::before { display: none; }
.home-page .site-header {
    width: min(calc(100% - 72px), 1420px);
    min-height: 202px;
    padding: 18px 0 14px;
}
.home-page .brand {
    flex: 0 1 455px;
    min-width: 350px;
}
.home-page .brand-logo {
    width: min(100%, 445px);
}
.home-page .nav {
    gap: clamp(24px, 2.8vw, 44px);
    font-size: 15px;
}
.home-page .nav .button {
    min-height: 54px;
    padding-inline: 28px;
    border-radius: 7px;
}

.home-reference-hero {
    width: 100%;
    height: clamp(390px, 29.45vw, 452px);
    min-height: 390px;
    margin: 0;
    padding: 0 clamp(42px, 5.9vw, 92px);
    border: 0;
    border-radius: 0;
    box-shadow: none;
    display: flex;
    align-items: center;
    background:
        linear-gradient(90deg, rgba(255,255,255,.08) 0%, rgba(255,255,255,.03) 43%, rgba(255,255,255,0) 62%),
        url('../images/home-hero.jpg') center / cover no-repeat;
}
.home-reference-hero::before,
.home-reference-hero::after,
.home-reference-hero .hero-orbit,
.home-reference-hero .water-ball { display: none; }
.home-reference-hero .hero-content {
    width: min(700px, 50vw);
    max-width: 700px;
    padding-top: 4px;
}
.home-reference-hero .eyebrow {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.home-reference-hero h1 {
    color: var(--navy);
    font-size: clamp(58px, 5.15vw, 82px);
    line-height: .93;
    letter-spacing: -.045em;
    text-shadow: 0 1px 0 rgba(255,255,255,.18);
}
.home-reference-hero h1 span { color: var(--aqua-2); }
.home-reference-hero h1::after {
    content: "";
    display: block;
    width: 246px;
    height: 4px;
    margin-top: 20px;
    background: var(--orange);
}
.home-supporting-copy {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    margin: -1px !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip: rect(0,0,0,0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}
.home-reference-hero .hero-actions { margin-top: 26px; }
.home-reference-hero .button {
    min-height: 64px;
    padding: 0 30px;
    border-radius: 6px;
    text-transform: uppercase;
    font-size: 15px;
    letter-spacing: .025em;
}
.home-reference-hero .button::after {
    content: "›";
    margin-left: 16px;
    font-size: 31px;
    line-height: 1;
    font-weight: 400;
}
.home-reference-hero .button-ghost {
    color: var(--navy);
    background: rgba(255,255,255,.86);
    border-color: rgba(6,43,82,.16);
}
.home-reference-hero .button-ghost:hover {
    color: var(--navy);
    background: #ffffff;
    border-color: var(--aqua);
}

.home-feature-strip {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 20px clamp(42px, 6.7vw, 104px);
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    background: linear-gradient(180deg, #f7fbfd 0%, #f1f8fb 100%);
    border-top: 1px solid rgba(6,43,82,.06);
    border-bottom: 1px solid rgba(6,43,82,.08);
}
.home-feature-strip article {
    min-height: 153px;
    padding: 0 clamp(26px, 3vw, 50px);
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
    display: grid;
    grid-template-columns: 126px minmax(0, 1fr);
    align-items: center;
    gap: 22px;
    overflow: visible;
}
.home-feature-strip article::before { display: none; }
.home-feature-strip article + article { border-left: 1px solid #d8e3e9; }
.feature-icon {
    width: 112px;
    aspect-ratio: 1;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(24,168,200,.09);
    color: var(--aqua-2);
}
.feature-icon svg {
    width: 67px;
    height: 67px;
    fill: none;
    stroke: currentColor;
    stroke-width: 4.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.home-feature-strip .step-number {
    margin: 0 0 4px;
    color: var(--aqua-2);
    font-size: 20px;
    letter-spacing: .02em;
}
.home-feature-strip h2 {
    margin: 0 0 8px;
    color: var(--navy);
    font-size: clamp(18px, 1.55vw, 25px);
    line-height: 1.02;
    letter-spacing: -.02em;
}
.home-feature-strip p {
    margin: 0;
    max-width: 260px;
    color: #23384c;
    font-size: 15px;
    line-height: 1.45;
}

.home-signal-band {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 22px clamp(20px, 2vw, 36px) 30px;
    border-radius: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    align-items: stretch;
    background:
        radial-gradient(120% 90px at 15% 118%, transparent 48%, rgba(24,168,200,.10) 49% 51%, transparent 52%),
        radial-gradient(120% 90px at 63% 123%, transparent 48%, rgba(24,168,200,.08) 49% 51%, transparent 52%),
        linear-gradient(115deg, #031f3d, #062b52);
    box-shadow: none;
}
.home-signal-band::after { display: none; }
.home-signal-band article {
    min-height: 122px;
    padding: 8px clamp(18px, 1.7vw, 28px);
    display: grid;
    grid-template-columns: 66px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
}
.home-signal-band article:first-child { padding-left: 8px; }
.home-signal-band article:last-child { padding-right: 8px; }
.home-signal-band article + article { border-left: 1px solid rgba(255,255,255,.15); }
.band-icon {
    width: 60px;
    height: 60px;
    color: #11a8d0;
}
.band-icon.band-ball { color: var(--orange); }
.band-icon svg {
    width: 100%;
    height: 100%;
    fill: none;
    stroke: currentColor;
    stroke-width: 4;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.home-signal-band h2,
.home-signal-band strong {
    display: block;
    margin: 0 0 5px;
    color: #ffffff;
    font-size: clamp(15px, 1.18vw, 18px);
    line-height: 1.06;
    letter-spacing: -.02em;
    font-weight: 950;
    text-transform: uppercase;
}
.home-signal-band p {
    margin: 0;
    color: #ffffff;
    font-size: 13px;
    line-height: 1.38;
}
.home-page .site-footer {
    margin-top: 0;
}

@media (max-width: 1120px) {
    .home-page .site-header { min-height: 165px; width: min(calc(100% - 42px), 1200px); }
    .home-page .brand { flex-basis: 360px; min-width: 290px; }
    .home-page .brand-logo { width: 355px; }
    .home-page .nav { gap: 18px; font-size: 12px; }
    .home-feature-strip article { grid-template-columns: 92px 1fr; padding-inline: 22px; }
    .feature-icon { width: 82px; }
    .feature-icon svg { width: 50px; height: 50px; }
    .home-signal-band article { grid-template-columns: 60px 1fr; padding-inline: 18px; }
    .band-icon { width: 54px; height: 54px; }
}

@media (max-width: 860px) {
    .home-page .site-header { min-height: 0; }
    .home-page .brand { flex-basis: 280px; min-width: 230px; }
    .home-page .brand-logo { width: 275px; }
    .home-reference-hero {
        height: 430px;
        min-height: 430px;
        padding-inline: 28px;
        background-position: 58% center;
    }
    .home-reference-hero .hero-content { width: min(620px, 86vw); }
    .home-reference-hero h1 { font-size: clamp(48px, 9.5vw, 72px); }
    .home-feature-strip {
        grid-template-columns: 1fr;
        padding: 16px 24px;
    }
    .home-feature-strip article {
        min-height: 130px;
        padding: 20px 10px;
        grid-template-columns: 92px 1fr;
    }
    .home-feature-strip article + article { border-left: 0; border-top: 1px solid #d8e3e9; }
    .home-signal-band {
        grid-template-columns: 1fr 1fr;
        padding: 24px;
    }
    .home-signal-band article + article { border-left: 0; }
    .home-signal-band article:nth-child(even) { border-left: 1px solid rgba(255,255,255,.15); }
    .home-signal-band article:nth-child(n+3) { border-top: 1px solid rgba(255,255,255,.15); }
}

@media (max-width: 560px) {
    .home-reference-hero {
        height: 460px;
        min-height: 460px;
        padding: 34px 22px;
        align-items: flex-end;
        background-position: 63% center;
    }
    .home-reference-hero::after {
        content: "";
        display: block;
        position: absolute;
        inset: 0;
        background: linear-gradient(90deg, rgba(255,255,255,.72) 0 60%, rgba(255,255,255,.08) 100%);
        z-index: 0;
    }
    .home-reference-hero .hero-content { z-index: 1; width: 100%; }
    .home-reference-hero h1 { font-size: clamp(45px, 14.5vw, 66px); }
    .home-reference-hero h1::after { width: 170px; }
    .home-reference-hero .hero-actions { gap: 8px; }
    .home-reference-hero .button { min-height: 54px; padding-inline: 18px; font-size: 12px; }
    .home-signal-band { grid-template-columns: 1fr; }
    .home-signal-band article,
    .home-signal-band article:nth-child(even) { border-left: 0; }
    .home-signal-band article + article { border-top: 1px solid rgba(255,255,255,.15); }
}

/* Asset revision: 20260816-2338. Lower homepage band spacing refinement. */


/* Asset revision: 20260816-2347. Lower band redline refinement. */
@media (min-width: 861px) {
    .home-signal-band {
        grid-template-columns: 1.08fr .94fr 1.02fr 1.24fr;
        padding-inline: clamp(16px, 1.5vw, 26px);
    }
    .home-signal-band article {
        grid-template-columns: 54px minmax(0, 1fr);
        gap: 11px;
        padding-inline: clamp(14px, 1.25vw, 22px);
    }
    .home-signal-band article:first-child { padding-left: 4px; }
    .home-signal-band article:last-child { padding-right: 4px; }
    .band-icon {
        width: 52px;
        height: 52px;
    }
    .home-signal-band h2,
    .home-signal-band strong {
        font-size: clamp(14px, 1.02vw, 16px);
        line-height: 1.08;
        font-weight: 950;
    }
    .home-signal-band p {
        font-size: clamp(12px, .92vw, 14px);
        line-height: 1.32;
        font-weight: 850;
    }
    .home-signal-band article:first-child h2 {
        white-space: nowrap;
    }
    .home-signal-band article:last-child p {
        max-width: 100%;
    }
}

/* All lower-band copy is intentionally bold at every breakpoint. */
.home-signal-band p { font-weight: 850; }

@media (max-width: 760px) {
    .availability-calendar-shell { width: min(calc(100% - 20px), var(--max)); }
    .availability-calendar-scroll { margin-right: -10px; padding-right: 10px; }
}

/* Availability calendar width refinement: keep all seven weekdays visible. */
.availability-calendar-scroll {
    overflow-x: hidden;
}
.availability-calendar {
    width: 100%;
    min-width: 0;
}
.calendar-day {
    padding: 9px;
    min-height: 316px;
}
.calendar-date {
    gap: 5px;
    min-height: 34px;
    padding-bottom: 7px;
    margin-bottom: 7px;
}
.calendar-date strong {
    font-size: 25px;
}
.calendar-date small {
    font-size: 8px;
}
.calendar-time-slots {
    gap: 6px;
}
.slot-button {
    padding: 8px;
    min-height: 55px;
}
.slot-button span {
    font-size: 10px;
    line-height: 1.15;
}
.slot-button small {
    font-size: 8px;
    line-height: 1.2;
}

@media (max-width: 1100px) {
    .calendar-weekday {
        padding-inline: 5px;
        font-size: 10px;
    }
    .calendar-day {
        padding: 7px;
        min-height: 300px;
    }
    .calendar-date strong {
        font-size: 23px;
    }
    .slot-button {
        padding: 7px;
        min-height: 52px;
        border-radius: 9px;
    }
    .slot-button span {
        font-size: 9px;
    }
    .slot-button small {
        font-size: 7.5px;
    }
}

@media (max-width: 760px) {
    .availability-calendar-scroll {
        margin-right: 0;
        padding-right: 0;
        overflow-x: hidden;
    }
    .availability-calendar {
        min-width: 0;
    }
    .calendar-weekday {
        padding: 8px 2px;
        font-size: 8px;
        letter-spacing: .08em;
    }
    .calendar-day {
        padding: 4px;
        min-height: 260px;
    }
    .calendar-date {
        gap: 3px;
        min-height: 30px;
        padding-bottom: 5px;
        margin-bottom: 5px;
    }
    .calendar-date strong {
        font-size: 19px;
    }
    .calendar-date small {
        font-size: 6.5px;
        letter-spacing: .04em;
    }
    .calendar-time-slots {
        gap: 4px;
    }
    .slot-button {
        padding: 5px 4px;
        min-height: 47px;
        border-radius: 7px;
    }
    .slot-button span {
        font-size: 7.5px;
        line-height: 1.08;
    }
    .slot-button small {
        font-size: 6.5px;
        line-height: 1.08;
    }
}


/* Availability calendar text refinement: stacked time labels and larger counts. */
.slot-button {
    gap: 2px;
    min-height: 66px;
}
.slot-button .slot-label,
.slot-button .slot-time {
    display: block;
    font-weight: 900;
    line-height: 1.08;
}
.slot-button .slot-label {
    font-size: 13px;
}
.slot-button .slot-time {
    font-size: 12px;
}
.slot-button small[data-interest] {
    margin-top: 3px;
    font-size: 10px;
    line-height: 1.15;
    font-weight: 700;
}

@media (max-width: 1100px) {
    .slot-button {
        min-height: 62px;
    }
    .slot-button .slot-label {
        font-size: 12px;
    }
    .slot-button .slot-time {
        font-size: 11px;
    }
    .slot-button small[data-interest] {
        font-size: 9px;
    }
}

@media (max-width: 760px) {
    .slot-button {
        min-height: 56px;
        padding: 5px 3px;
    }
    .slot-button .slot-label {
        font-size: 9px;
    }
    .slot-button .slot-time {
        font-size: 8px;
    }
    .slot-button small[data-interest] {
        margin-top: 2px;
        font-size: 7px;
    }
}

/* Availability calendar alignment + sticky weekday header. */
.availability-calendar-scroll {
    overflow: visible;
}

.availability-calendar {
    overflow: visible;
}

.calendar-weekdays {
    position: sticky;
    top: 0;
    z-index: 40;
    border-radius: 17px 17px 0 0;
    box-shadow: 0 5px 14px rgba(7, 38, 74, 0.16);
}

.calendar-grid {
    border-radius: 0 0 17px 17px;
    overflow: hidden;
}

.slot-button {
    text-align: center;
    justify-items: center;
}

.slot-button .slot-label,
.slot-button .slot-time,
.slot-button small[data-interest] {
    width: 100%;
    text-align: center;
}

@media (max-width: 760px) {
    .availability-calendar-scroll {
        overflow: visible;
    }
}
/* Locations, scheduled water time, and pool suggestion UI. */
.locations-heading { padding-bottom: 26px; }
.locations-layout {
    display: grid;
    grid-template-columns: minmax(250px, 310px) minmax(0, 1fr);
    gap: 20px;
    align-items: start;
    margin-bottom: 76px;
}
.locations-sidebar { display: grid; gap: 14px; position: sticky; top: 18px; }
.location-radius-card,
.location-pool-list,
.location-detail-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow-soft);
}
.location-radius-card { padding: 20px; }
.location-card-kicker {
    display: block;
    color: var(--aqua-2);
    font-size: 11px;
    line-height: 1.1;
    font-weight: 900;
    letter-spacing: .13em;
    text-transform: uppercase;
}
.location-radius-card > strong { display: block; margin-top: 8px; color: var(--navy); font-size: 31px; line-height: 1; }
.location-radius-card p { margin: 10px 0 3px; font-weight: 800; }
.location-radius-card small { display: block; color: var(--muted); line-height: 1.45; margin-bottom: 12px; }
.location-list-heading { display: flex; justify-content: space-between; align-items: center; padding: 17px 18px 10px; }
.location-list-heading > strong { color: var(--navy); font-size: 22px; }
.location-list-item {
    width: 100%;
    display: grid;
    grid-template-columns: 31px minmax(0,1fr);
    align-items: center;
    gap: 11px;
    padding: 14px 17px;
    border: 0;
    border-top: 1px solid var(--line);
    background: transparent;
    text-align: left;
    cursor: pointer;
    transition: background .15s ease;
}
.location-list-item:hover,
.location-list-item.is-active { background: var(--aqua-soft); }
.location-marker-number {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--aqua);
    color: white;
    font-weight: 900;
    font-size: 12px;
}
.location-list-item strong { display: block; color: var(--navy); font-size: 13px; }
.location-list-item small { display: block; color: var(--muted); margin-top: 3px; }
.location-list-empty { padding: 0 18px 18px; color: var(--muted); }
.location-suggest-button { margin-top: 2px; }
.locations-map-panel { min-width: 0; }
.radius-map {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: #edf7f9;
    box-shadow: var(--shadow);
}
.radius-map svg { display: block; width: 100%; height: auto; min-height: 430px; }
.map-field { fill: #edf7f9; }
.map-grid-line { fill: none; stroke: #d7e9ed; stroke-width: 1; }
.map-water-line { fill: none; stroke: rgba(24,168,200,.16); stroke-width: 22; stroke-linecap: round; }
.map-water-line-two { stroke-width: 15; opacity: .75; }
.map-radius-ring { fill: none; stroke: rgba(24,168,200,.22); stroke-width: 1.5; stroke-dasharray: 5 7; }
.map-radius-circle { fill: rgba(24,168,200,.09); stroke: var(--aqua); stroke-width: 3; }
.map-radius-label,
.map-caption,
.map-direction { fill: var(--navy); font-weight: 900; letter-spacing: .09em; font-size: 13px; }
.map-caption { fill: #668095; font-size: 10px; }
.map-user-center circle:first-child { fill: var(--navy); }
.map-user-center circle:nth-child(2) { fill: white; }
.map-user-center text { fill: var(--navy); font-size: 12px; font-weight: 900; }
.location-map-marker { cursor: pointer; outline: none; }
.location-map-marker circle { fill: var(--orange); stroke: #fff; stroke-width: 5; filter: drop-shadow(0 6px 8px rgba(7,38,74,.18)); transition: transform .15s ease, fill .15s ease; }
.location-map-marker text { fill: white; font-size: 19px; font-weight: 900; pointer-events: none; }
.location-map-marker:hover circle,
.location-map-marker:focus circle,
.location-map-marker.is-active circle { fill: var(--aqua-2); transform: scale(1.12); }
.location-detail-stack { margin-top: 14px; }
.location-detail-card { display: none; padding: 22px; }
.location-detail-card.is-active { display: block; }
.location-detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.location-detail-head h2 { color: var(--navy); margin: 5px 0 0; font-size: 25px; }
.location-detail-head > strong { color: var(--orange); font-size: 22px; white-space: nowrap; }
.location-address { color: var(--ink-soft); line-height: 1.45; }
.location-session-list { margin: 20px 0; border-top: 1px solid var(--line); padding-top: 17px; }
.location-session-row { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.location-session-row span strong,
.location-session-row span small { display: block; }
.location-session-row span strong { color: var(--navy); }
.location-session-row span small { color: var(--muted); margin-top: 3px; }
.location-session-row em { color: var(--aqua-2); font-style: normal; font-weight: 900; white-space: nowrap; }

.status-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 5px 9px;
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .05em;
    background: #eef3f6;
    color: var(--ink-soft);
}
.status-pending, .status-closed { background: #fff4dd; color: #8b6215; }
.status-approved, .status-open { background: #e5f6eb; color: #237546; }
.status-rejected, .status-cancelled { background: #fde8ea; color: #9c3340; }
.suggestion-review-list { display: grid; gap: 15px; margin-bottom: 78px; }
.suggestion-review-card {
    display: grid;
    grid-template-columns: minmax(0,1fr) minmax(320px,.9fr);
    gap: 28px;
    padding: 22px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow-soft);
}
.suggestion-review-card h2 { color: var(--navy); margin: 8px 0; }
.suggestion-review-form { display: grid; gap: 12px; }
.suggestion-review-result { align-self: center; color: var(--muted); }
.schedule-admin-grid { grid-template-columns: minmax(300px,.65fr) minmax(0,1.35fr); align-items: start; }
.pool-suggestion-layout { align-items: start; }

@media (max-width: 980px) {
    .locations-layout { grid-template-columns: 1fr; }
    .locations-sidebar { position: static; grid-template-columns: 1fr 1fr; }
    .location-pool-list { grid-column: 1 / -1; }
    .location-suggest-button { grid-column: 1 / -1; }
    .suggestion-review-card { grid-template-columns: 1fr; }
    .schedule-admin-grid { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
    .locations-sidebar { grid-template-columns: 1fr; }
    .radius-map svg { min-height: 340px; }
    .location-detail-head { display: block; }
    .location-detail-head > strong { display: block; margin-top: 8px; }
    .location-session-row { align-items: flex-start; }
}

/* Admin dashboard grows to eight metrics with the scheduling tools. */
.stat-grid { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 980px) { .stat-grid { grid-template-columns: repeat(2, 1fr); } }

/* Street-map background under the self-contained radius/marker overlay. */
.radius-map-basemap {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    z-index: 0;
    pointer-events: none;
    filter: saturate(.72) contrast(.92) brightness(1.06);
}
.radius-map svg { position: relative; z-index: 1; }
.map-field { fill: rgba(237,247,249,.22); }
.map-attribution {
    position: absolute;
    right: 8px;
    bottom: 6px;
    z-index: 2;
    padding: 3px 6px;
    border-radius: 5px;
    background: rgba(255,255,255,.88);
    color: #526a7c;
    font-size: 8px;
    font-weight: 700;
}

/* Locations page cleanup: compact heading and horizontal pool details. */
.locations-heading {
    padding-bottom: 20px;
}
.locations-heading .eyebrow {
    margin-bottom: 12px;
}
.locations-heading .muted {
    margin: 0;
    max-width: 760px;
}
.location-detail-card.is-active {
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(360px, 1.1fr);
    gap: 34px;
    align-items: start;
}
.location-detail-primary h2 {
    color: var(--navy);
    margin: 0 0 18px;
    font-size: 25px;
}
.location-detail-primary .location-address {
    margin: 0;
}
.location-detail-side {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 18px;
    align-items: start;
}
.location-distance {
    grid-column: 2;
    grid-row: 1;
    color: var(--orange);
    font-size: 22px;
    line-height: 1;
    white-space: nowrap;
    justify-self: end;
}
.location-detail-side .location-session-list {
    grid-column: 1 / -1;
    grid-row: 2;
    margin: 12px 0 14px;
    border-top: 0;
    padding-top: 0;
}
.location-detail-side > .button {
    grid-column: 1 / -1;
    justify-self: start;
}

@media (max-width: 820px) {
    .location-detail-card.is-active {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .location-detail-side {
        grid-template-columns: minmax(0, 1fr) auto;
        border-top: 1px solid var(--line);
        padding-top: 18px;
    }
}

/* 004 two-layer availability architecture: broad player demand first, exact pool sessions second. */
.admin-demand-section {
    margin-bottom: 26px;
}
.admin-demand-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 12px;
}
.admin-demand-heading h2 {
    margin: 4px 0 0;
    color: var(--navy);
    font-size: clamp(24px, 3vw, 34px);
}
.admin-demand-heading .muted {
    max-width: 640px;
    margin: 0;
}
.admin-demand-table-card {
    padding-top: 8px;
}
.admin-demand-table th,
.admin-demand-table td {
    vertical-align: middle;
}
.admin-demand-table th small {
    color: var(--muted);
    font-size: 9px;
    font-weight: 800;
}
.admin-demand-table td strong {
    color: var(--navy);
}

/* Broad availability is intentionally independent of scheduled pool water. */
.calendar-time-slots {
    align-content: start;
}
.calendar-slot {
    min-height: 66px;
}
.calendar-slot .slot-label,
.calendar-slot .slot-time,
.calendar-slot small[data-interest] {
    width: 100%;
    text-align: center;
}

@media (max-width: 820px) {
    .admin-demand-heading {
        display: block;
    }
    .admin-demand-heading .muted {
        margin-top: 8px;
    }
}

/* 006 controlled Chatroom and moderation. */
.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;
}
.chat-heading { padding-bottom: 24px; }
.chat-gate-card {
    margin-bottom: 92px;
    padding: clamp(26px, 5vw, 42px);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}
.chat-gate-card h2 { margin: 5px 0 15px; color: var(--navy); font-size: clamp(28px, 4vw, 40px); }
.chat-gate-card > p:not(.eyebrow) { color: var(--muted); line-height: 1.65; }
.chat-gate-locked { border-top: 5px solid var(--orange); }
.chat-policy-copy {
    margin: 22px 0;
    padding: 18px;
    border-radius: 12px;
    background: var(--panel-soft);
    color: var(--ink-soft);
    line-height: 1.7;
    font-size: 14px;
}
.chat-policy-form { display: grid; gap: 16px; margin-top: 22px; }
.check-row {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    color: var(--ink-soft);
    font-size: 14px;
    line-height: 1.55;
}
.check-row input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--aqua-2); }
.chat-points-line { display: flex; align-items: baseline; gap: 10px; margin-top: 22px; }
.chat-points-line strong { color: var(--orange); font-size: 34px; }
.chat-points-line span { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .12em; }

.chat-layout {
    display: grid;
    grid-template-columns: minmax(220px, .34fr) minmax(0, 1fr);
    gap: 14px;
    align-items: stretch;
    padding-bottom: 92px;
}
.chat-room-panel,
.chat-window {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: var(--shadow-soft);
    overflow: hidden;
}
.chat-room-panel { min-height: 620px; }
.chat-room-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    border-bottom: 1px solid var(--line);
    color: var(--navy);
}
.chat-room-panel-head > span {
    min-width: 28px;
    height: 28px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    background: var(--aqua-soft);
    color: var(--aqua-2);
    font-size: 11px;
    font-weight: 900;
}
.chat-room-list { display: grid; max-height: 690px; overflow-y: auto; }
.chat-room-link {
    display: grid;
    gap: 5px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--line);
    color: var(--ink-soft);
    text-decoration: none;
}
.chat-room-link:hover { background: var(--panel-soft); }
.chat-room-link.is-active { background: var(--aqua-soft); box-shadow: inset 4px 0 0 var(--aqua); }
.chat-room-link strong { color: var(--navy); font-size: 13px; line-height: 1.35; }
.chat-room-link small { color: var(--muted); font-size: 10px; }
.chat-window { min-height: 620px; display: grid; grid-template-rows: auto 1fr auto; }
.chat-window-head {
    min-height: 82px;
    padding: 16px 22px;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}
.chat-window-head .eyebrow { margin-bottom: 3px; }
.chat-window-head h2 { margin: 0; color: var(--navy); font-size: 22px; }
.chat-message-list {
    height: 500px;
    overflow-y: auto;
    padding: 18px 22px;
    background: linear-gradient(180deg, #fafdfe, #ffffff);
}
.chat-message { padding: 12px 0; border-bottom: 1px solid rgba(205,222,231,.62); }
.chat-message:last-child { border-bottom: 0; }
.chat-message-meta { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.chat-message-meta strong { color: var(--navy); font-size: 13px; }
.chat-message-meta span {
    color: #ffffff;
    background: var(--orange);
    border-radius: 999px;
    padding: 2px 6px;
    font-size: 8px;
    font-weight: 950;
    letter-spacing: .08em;
}
.chat-message-meta time { color: var(--muted); font-size: 10px; }
.chat-message p { margin: 5px 0 0; color: var(--ink-soft); line-height: 1.55; overflow-wrap: anywhere; }
.chat-empty-message, .chat-empty { color: var(--muted); text-align: center; }
.chat-empty-message { margin: 120px auto 0; }
.chat-empty { align-self: center; padding: 50px; }
.chat-empty h2 { color: var(--navy); }
.chat-compose {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: end;
    padding: 14px;
    border-top: 1px solid var(--line);
    background: #ffffff;
}
.chat-compose textarea {
    width: 100%;
    min-height: 54px;
    max-height: 140px;
    resize: vertical;
    border: 1px solid #cbdbe5;
    border-radius: 12px;
    padding: 13px 14px;
    color: var(--ink);
    font: inherit;
    outline: none;
}
.chat-compose textarea:focus { border-color: var(--aqua); box-shadow: 0 0 0 3px rgba(24,168,200,.13); }
.chat-compose .button { min-height: 54px; }

.chat-warning-modal[hidden] { display: none; }
.chat-warning-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(4,28,43,.42);
    backdrop-filter: blur(2px);
}
.chat-warning-card {
    position: relative;
    width: min(390px, 100%);
    padding: 28px 52px 28px 28px;
    border: 1px solid rgba(24,168,200,.35);
    border-top: 5px solid var(--orange);
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 24px 70px rgba(4,28,43,.24);
}
.chat-warning-card .eyebrow { margin-bottom: 8px; }
.chat-warning-card > p:last-child { margin: 0; color: var(--ink-soft); line-height: 1.5; }
.chat-warning-close {
    position: absolute;
    right: 14px;
    top: 12px;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 999px;
    background: var(--panel-soft);
    color: var(--navy);
    font-size: 23px;
    line-height: 1;
    cursor: pointer;
}
.chat-warning-close:hover { background: var(--aqua-soft); color: var(--aqua-2); }

.button-danger { background: var(--danger); border-color: var(--danger); color: #ffffff; box-shadow: none; }
.button-danger:hover { background: #a62f3a; border-color: #a62f3a; color: #ffffff; box-shadow: none; }
.compact-row { margin-top: 0; }
.chat-admin-stats { margin-bottom: 42px; }
.chat-admin-section { margin-bottom: 48px; }
.chat-review-grid { display: grid; gap: 14px; }
.chat-review-card {
    display: grid;
    grid-template-columns: minmax(220px,.55fr) minmax(0,1.45fr);
    gap: 24px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}
.chat-review-summary h3 { margin: 12px 0 4px; color: var(--navy); font-size: 24px; }
.chat-review-summary p { margin: 0; color: var(--muted); }
.chat-review-numbers { display: grid; gap: 3px; margin-top: 18px; }
.chat-review-numbers strong { color: var(--orange); font-size: 23px; }
.chat-review-numbers span { color: var(--muted); font-size: 11px; }
.chat-review-form, .chat-admin-form { display: grid; gap: 12px; }
.chat-review-form label, .chat-admin-form label { display: grid; gap: 7px; color: var(--ink-soft); font-size: 12px; font-weight: 850; }
.chat-review-form textarea,
.chat-admin-form input,
.chat-admin-form select,
.chat-admin-message-actions select {
    width: 100%;
    border: 1px solid #cbdbe5;
    border-radius: 9px;
    background: #ffffff;
    padding: 10px 11px;
    color: var(--ink);
    font: inherit;
}
.chat-admin-grid { display: grid; grid-template-columns: minmax(320px,.55fr) minmax(0,1.45fr); gap: 14px; align-items: start; margin-bottom: 28px; }
.chat-term-card { margin-top: 0; }
.chat-term-card .field-grid { gap: 10px; }
.chat-term-list-card, .chat-room-admin-card { margin-bottom: 28px; }
.chat-admin-message-actions { display: grid; gap: 10px; min-width: 220px; }
.chat-admin-message-actions .inline-actions { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.admin-message-public { max-width: 560px; line-height: 1.5; }
.chat-message-admin-table details { margin-top: 8px; color: var(--muted); }
.chat-message-admin-table details p { max-width: 560px; white-space: normal; overflow-wrap: anywhere; }
.status-admin_review, .status-locked { background: #fff0e6; color: #9a4f13; }
.status-ack_required { background: #e7f7fb; color: #14768d; }
.status-banned { background: #fde8ea; color: #9c3340; }

@media (max-width: 900px) {
    .chat-layout, .chat-review-card, .chat-admin-grid { grid-template-columns: 1fr; }
    .chat-room-panel { min-height: 0; }
    .chat-room-list { max-height: 260px; }
}
@media (max-width: 620px) {
    .chat-compose { grid-template-columns: 1fr; }
    .chat-compose .button { width: 100%; }
    .chat-message-list { height: 450px; padding-inline: 15px; }
    .chat-window-head { padding-inline: 15px; }
}
.chat-review-popup-card { border-top-color: var(--navy); }
.chat-review-popup-card .eyebrow { color: var(--navy); }
