:root {
    --sp-teal: #00aeef;
    --sp-purple: #472e8c;
    --sp-black: #000000;
    --sp-white: #ffffff;
    --sp-bg-soft: #f5fbfb;
    --sp-border: #d7e7e7;
    --sp-muted: #4d5960;
    --sp-danger: #b42318;
    --nav-height: 76px;
    --topbar-height: 92px;
}

* {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    background: var(--sp-white);
}

body {
    margin: 0;
    color: var(--sp-black);
    background: var(--sp-white);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.45;
    letter-spacing: 0;
    overflow-x: hidden;
}

body.chas-mode {
    --chas-pink: #ff3590;
    --chas-blue: #0f3347;
    --chas-light-pink: #ffc1d4;
    --chas-turquoise: #39e2d7;
    --sp-teal: var(--chas-blue);
    --sp-purple: var(--chas-pink);
    --sp-bg-soft: #fff5f9;
    --sp-border: rgba(27, 77, 103, .28);
    --sp-muted: var(--sp-black);
    position: relative;
    isolation: isolate;
    min-height: 100svh;
    background-color: var(--chas-light-pink);
}

body.chas-mode::before,
body.chas-mode::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
}

body.chas-mode::before {
    z-index: -2;
    background: url("../img/chas.jpg") center center / cover no-repeat;
}

body.chas-mode::after {
    z-index: -1;
    background: linear-gradient(rgba(255, 255, 255, .34), rgba(255, 193, 212, .42));
}

.toasty-popout {
    position: fixed;
    right: 0;
    bottom: calc(var(--nav-height) - 4px + env(safe-area-inset-bottom));
    z-index: 1200;
    transform: translateX(100%);
    pointer-events: none;
}

.toasty-popout.is-active {
    animation: toasty-slide 1.25s cubic-bezier(.2, .9, .18, 1) both;
}

.toasty-popout img {
    display: block;
    width: auto;
    max-width: min(100vw, 220px);
    height: auto;
    object-fit: contain;
}

button,
input,
select {
    font: inherit;
}

button {
    min-height: 44px;
}

a,
button {
    touch-action: manipulation;
}

@keyframes toasty-slide {
    0% { transform: translateX(100%); }
    18%,
    72% { transform: translateX(0); }
    100% { transform: translateX(100%); }
}

:focus-visible {
    outline: 3px solid var(--sp-purple);
    outline-offset: 3px;
}

.fa-regular.fa-house {
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
}

.fa-regular.fa-house::before {
    content: "\f015";
}

.skip-link {
    position: fixed;
    left: 1rem;
    top: 1rem;
    z-index: 1000;
    transform: translateY(-150%);
    padding: .7rem 1rem;
    border-radius: .5rem;
    color: var(--sp-white);
    background: var(--sp-purple);
}

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

.app-topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .7rem;
    padding: calc(.75rem + env(safe-area-inset-top)) 1rem .75rem;
    color: var(--sp-white);
    background: var(--sp-purple);
    border-bottom: 4px solid var(--sp-teal);
    overflow: hidden;
}

body.chas-mode .app-topbar {
    color: var(--sp-white);
    background: var(--chas-pink);
    border-bottom-color: var(--chas-blue);
}

body.chas-mode .app-topbar [data-action="open-search"] {
    color: var(--chas-blue);
    background: var(--chas-turquoise);
}

.app-topbar > div,
.day-strip > div,
.timeline-item > div,
.item-card-header > div {
    flex: 1 1 auto;
    min-width: 0;
}

.event-crest {
    width: 54px;
    height: 54px;
    flex: 0 0 auto;
    border-radius: 0;
    background: transparent;
}

.scouts-mark {
    width: 58px;
    height: auto;
    flex: 0 0 auto;
}

.app-topbar h1 {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 800;
}

.event-kicker,
.event-place,
.eyebrow {
    margin: 0;
    font-size: .78rem;
    font-weight: 750;
    text-transform: uppercase;
    letter-spacing: 0;
}

.event-place {
    display: none;
    text-transform: none;
    font-weight: 650;
    opacity: .95;
    overflow-wrap: anywhere;
}

.icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    min-width: 48px;
    height: 48px;
    padding: 0;
    border: 2px solid currentColor;
    border-radius: .8rem;
    color: inherit;
    background: transparent;
}

.app-topbar [data-action="open-search"] {
    border: 0;
    border-radius: 0;
    clip-path: polygon(50% 0, 93% 25%, 93% 75%, 50% 100%, 7% 75%, 7% 25%);
    color: var(--sp-purple);
    background: var(--sp-white);
}

.icon-button svg,
.icon-button i {
    width: 24px;
    height: 24px;
    font-size: 1.25rem;
    line-height: 1;
}

.icon-button svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.app-main {
    width: min(100%, 920px);
    min-height: calc(100svh - var(--nav-height));
    margin: 0 auto;
    padding: 1rem 1rem calc(var(--nav-height) + 1rem + env(safe-area-inset-bottom));
}

.running-times-form .item-list {
    gap: .75rem;
}

.running-time-card {
    overflow: visible;
}

.running-time-days {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: .75rem;
    margin-top: .75rem;
}

.running-time-day {
    padding: .75rem;
    border: 1px solid var(--sp-border);
    border-radius: .5rem;
    background: var(--sp-bg-soft);
}

.running-time-day h4 {
    margin: 0 0 .65rem;
    font-size: 1rem;
}

.running-time-session {
    display: grid;
    grid-template-columns: minmax(5.5rem, .8fr) repeat(2, minmax(0, 1fr));
    align-items: end;
    gap: .5rem;
    margin-top: .5rem;
}

.running-time-session strong,
.running-time-session label {
    min-width: 0;
}

.running-time-session label {
    display: grid;
    gap: .25rem;
    margin: 0;
    font-size: .84rem;
    font-weight: 700;
}

.running-time-session input {
    min-width: 0;
}

.running-times-save {
    position: sticky;
    bottom: calc(var(--nav-height) + .75rem);
    z-index: 5;
    margin-top: 1rem;
    padding: .75rem;
    border: 1px solid var(--sp-border);
    border-radius: .5rem;
    background: var(--sp-white);
}

@media (max-width: 520px) {
    .running-time-session {
        grid-template-columns: 1fr 1fr;
    }

    .running-time-session strong {
        grid-column: 1 / -1;
    }
}

.screen {
    display: none;
    pointer-events: none;
}

.screen.is-active {
    display: block;
    pointer-events: auto;
}

.site-credit {
    margin: 1.25rem 0 0;
    color: var(--sp-muted);
    font-size: .68rem;
    font-weight: 600;
    text-align: center;
}

.screen.is-active.map-screen {
    display: flex;
    width: 100vw;
    min-height: calc(100svh - var(--nav-height) - 82px);
    flex-direction: column;
    margin: -1rem 0 0 calc(50% - 50vw);
    padding: .75rem .65rem calc(.75rem + env(safe-area-inset-bottom));
}

.map-open {
    overflow: hidden;
}

.map-open .app-main {
    width: 100%;
    min-height: 100svh;
    padding: 0;
}

body.chas-mode:not(.map-open) .app-main {
    background: transparent;
}

.map-open .screen.is-active.map-screen {
    position: fixed;
    inset: 0;
    z-index: 10;
    display: block;
    width: 100vw;
    height: 100svh;
    min-height: 100svh;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background: #eef5ef;
}

.day-strip,
.section-block,
.notice-band,
.emergency-band,
.settings-block,
.next-up,
.location-panel,
.item-card,
.timeline-item {
    border: 1px solid var(--sp-border);
    border-radius: .75rem;
    background: var(--sp-white);
}

body.chas-mode .day-strip,
body.chas-mode .section-block,
body.chas-mode .notice-band,
body.chas-mode .settings-block,
body.chas-mode .next-up,
body.chas-mode .location-panel,
body.chas-mode .item-card,
body.chas-mode .timeline-item,
body.chas-mode .subcamp-gate-card,
body.chas-mode .settings-reset-card,
body.chas-mode .install-prompt-card {
    border-color: rgba(57, 226, 215, .8);
    background: rgba(255, 255, 255, .72);
    box-shadow: 0 8px 24px rgba(27, 77, 103, .12);
}

.day-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: 1rem;
    background: linear-gradient(0deg, var(--sp-bg-soft), var(--sp-white));
}

body.chas-mode .day-strip {
    background: rgba(255, 255, 255, .72);
}

.day-strip h2,
.screen-title h1,
.screen-title h2,
.section-heading h2,
.section-block > h2,
.notice-band > h2,
.settings-block > h2 {
    margin: 0;
    color: var(--sp-purple);
    font-weight: 850;
    letter-spacing: 0;
}

.screen-title h1 {
    font-size: 1.55rem;
}

.day-strip h2 {
    font-size: 1.55rem;
}

.status-pill,
.badge-soft {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: .35rem .65rem;
    border: 1px solid var(--sp-teal);
    border-radius: 999px;
    color: var(--sp-teal);
    background: var(--sp-bg-soft);
    font-size: .82rem;
    font-weight: 800;
    white-space: nowrap;
}

body.chas-mode .status-pill,
body.chas-mode .badge-soft {
    color: var(--chas-blue);
    border-color: var(--chas-pink);
    background: var(--chas-light-pink);
}

.section-block,
.notice-band,
.emergency-band {
    margin-top: 1rem;
    padding: 1rem;
}

.emergency-band {
    margin-top: 0;
    border: 2px solid var(--sp-danger);
    color: var(--sp-white);
    background: var(--sp-danger);
}

.emergency-band .section-heading h2,
.emergency-band .timeline-meta,
.emergency-band .status-text {
    color: var(--sp-white);
}

.emergency-band .item-card {
    padding: 0;
    border: 0;
    color: var(--sp-white);
    background: transparent;
}

.emergency-band .item-card h3 {
    color: var(--sp-white);
}

.global-emergency-band {
    position: relative;
    z-index: 19;
    width: min(calc(100% - 2rem), 920px);
    margin: 1rem auto 0;
}

.home-layout {
    display: flex;
    flex-direction: column;
}

.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .75rem;
    margin-bottom: .75rem;
}

.section-heading h2,
.section-block > h2,
.notice-band > h2,
.settings-block > h2,
.screen-title h2 {
    font-size: 1.2rem;
}

.text-button {
    min-height: 44px;
    padding: .45rem .7rem;
    border: 0;
    border-radius: .5rem;
    color: var(--sp-teal);
    background: transparent;
    font-weight: 800;
}

body.chas-mode .text-button {
    color: var(--chas-pink);
}

.quick-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .65rem;
    margin-top: 1rem;
}

.shortcut-row {
    display: flex;
    gap: .5rem;
    margin: 0 0 .85rem;
    overflow-x: auto;
    scrollbar-width: none;
}

.shortcut-row::-webkit-scrollbar {
    display: none;
}

.shortcut-row button {
    flex: 0 0 auto;
    min-height: 44px;
    padding: .45rem .75rem;
    border: 1px solid var(--sp-teal);
    border-radius: .55rem;
    color: var(--sp-teal);
    background: var(--sp-white);
    font-weight: 850;
}

body.chas-mode .shortcut-row button {
    color: var(--chas-blue);
    border-color: rgba(57, 226, 215, .8);
    background: rgba(255, 255, 255, .74);
}

.map-screen .shortcut-row {
    margin: 0 .35rem .55rem;
}

.map-open .map-screen .shortcut-row {
    position: fixed;
    top: calc(var(--topbar-height) + .75rem + env(safe-area-inset-top));
    left: .75rem;
    right: 4.75rem;
    z-index: 24;
    margin: 0;
    padding-bottom: .2rem;
}

.quick-grid button {
    display: flex;
    min-height: 72px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .25rem;
    border: 1px solid var(--sp-border);
    border-radius: .75rem;
    color: var(--sp-black);
    background: var(--sp-white);
    font-weight: 800;
}

body.chas-mode .quick-grid button {
    color: var(--chas-blue);
    border-color: rgba(57, 226, 215, .8);
    background: rgba(255, 255, 255, .74);
}

.quick-icon {
    display: inline-grid;
    width: 34px;
    height: 34px;
    place-items: center;
    clip-path: polygon(50% 0, 93% 25%, 93% 75%, 50% 100%, 7% 75%, 7% 25%);
    color: var(--sp-white);
    background: var(--sp-purple);
}

body.chas-mode .quick-icon {
    color: var(--sp-white);
    background: var(--chas-pink);
}

.quick-icon svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.quick-icon i {
    font-size: 1.05rem;
    line-height: 1;
}

.quick-scout-icon {
    width: 24px;
    height: 18px;
    object-fit: contain;
}

.quick-icon-text {
    font-size: 1.2rem;
    font-weight: 950;
}

.quick-subcamp-badge {
    width: 28px;
    height: 28px;
}

.quick-icon.has-subcamp-badge {
    clip-path: none;
    background: transparent;
}

.quick-icon.has-subcamp-badge svg,
.quick-icon.has-subcamp-badge i,
.quick-icon.has-subcamp-badge .quick-scout-icon {
    display: none;
}

.screen-title {
    margin-bottom: 1rem;
}

.screen-title.compact {
    margin-bottom: .7rem;
}

.map-screen .screen-title {
    margin: 0 .35rem .55rem;
}

.map-open .map-screen .screen-title {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}

.day-selector,
.more-tabs {
    display: flex;
    gap: .45rem;
    margin-bottom: 1rem;
    overflow-x: auto;
    scrollbar-width: none;
}

.day-selector::-webkit-scrollbar,
.more-tabs::-webkit-scrollbar {
    display: none;
}

.day-selector button,
.more-tabs button,
.more-tabs a {
    flex: 0 0 auto;
    min-height: 44px;
    padding: .45rem .75rem;
    border: 1px solid var(--sp-border);
    border-radius: 999px;
    color: var(--sp-black);
    background: var(--sp-white);
    font-weight: 800;
    text-decoration: none;
}

body.chas-mode .day-selector button,
body.chas-mode .more-tabs button,
body.chas-mode .more-tabs a {
    color: var(--chas-blue);
    border-color: rgba(27, 77, 103, .32);
    background: rgba(255, 255, 255, .76);
}

.day-selector button.is-active,
.more-tabs button.is-active,
.more-tabs a.is-active {
    color: var(--sp-white);
    border-color: var(--sp-purple);
    background: var(--sp-purple);
}

body.chas-mode .day-selector button.is-active,
body.chas-mode .more-tabs button.is-active,
body.chas-mode .more-tabs a.is-active {
    color: var(--sp-white);
    border-color: var(--chas-pink);
    background: var(--chas-pink);
}

.timeline-list,
.item-list {
    display: grid;
    gap: .75rem;
}

.timeline-item {
    display: grid;
    grid-template-columns: 4.3rem minmax(0, 1fr);
    gap: .75rem;
    padding: .85rem;
}

.compact-list .timeline-item {
    grid-template-columns: 3.7rem minmax(0, 1fr);
}

.timeline-time {
    display: grid;
    align-content: start;
    gap: .1rem;
    color: var(--sp-teal);
    font-weight: 900;
}

.timeline-day {
    color: var(--sp-muted);
    font-size: .78rem;
    font-weight: 850;
}

.timeline-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 850;
    overflow-wrap: anywhere;
}

.timeline-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .6rem;
    margin-bottom: 0;
}

.timeline-title-row .timeline-title {
    flex: 1 1 auto;
    min-width: 0;
    margin-bottom: 0;
}

.programme-theme {
    margin: 0;
    color: var(--sp-teal);
    font-size: .95rem;
    font-weight: 950;
    overflow-wrap: anywhere;
}

.programme-theme.is-subcamp-theme {
    color: var(--programme-theme-colour, var(--sp-teal));
}

.timeline-item .timeline-title-row + .timeline-meta,
.timeline-item .programme-theme + .timeline-meta {
    margin-top: 0;
}

.programme-badge {
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
}

.programme-icon {
    display: inline-grid;
    width: 40px;
    height: 40px;
    place-items: center;
    flex: 0 0 auto;
    position: relative;
    border: 0;
    border-radius: 0;
    color: var(--sp-teal);
    background: currentColor;
    clip-path: polygon(50% 0, 93% 25%, 93% 75%, 50% 100%, 7% 75%, 7% 25%);
}

.programme-icon::before {
    content: "";
    position: absolute;
    inset: 2px;
    background: var(--sp-white);
    clip-path: inherit;
}

.programme-icon svg,
.programme-icon i {
    position: relative;
    z-index: 1;
}

.programme-icon svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.programme-icon i {
    font-size: 1.12rem;
    line-height: 1;
}

.programme-icon-bus {
    color: #6b7280;
    border-color: #6b7280;
}

.programme-icon-four-by-four {
    color: #166534;
    border-color: #166534;
}

.programme-icon-bed {
    color: #6b7280;
    border-color: #6b7280;
}

.programme-icon-computer {
    color: #ffbf0b;
    border-color: #ffbf0b;
}

.programme-icon-water {
    color: #0000ff;
    border-color: #0000ff;
}

.programme-icon-ship {
    color: #008c95;
    border-color: #008c95;
}

.programme-icon-food {
    color: #6b7280;
    border-color: #6b7280;
}

.programme-icon-shop {
    color: #6b7280;
    border-color: #6b7280;
}

.programme-icon-activity {
    color: var(--sp-purple);
    border-color: var(--sp-purple);
}

.programme-icon-party {
    color: #f26525;
    border-color: #f26525;
}

.programme-icon-film {
    color: #231e0b;
    border-color: #231e0b;
}

.programme-icon-magic {
    color: #22202d;
    border-color: #22202d;
}

.timeline-meta,
.muted {
    margin: .25rem 0 0;
    color: var(--sp-muted);
    font-size: .9rem;
    overflow-wrap: anywhere;
}

.activity-opening-times {
    display: grid;
    gap: .15rem;
}

.activity-opening-times strong {
    color: var(--sp-teal);
    font-weight: 950;
}

.activity-status-help {
    font-weight: 950;
}

.activity-status-help.status-busy {
    color: #d97706;
}

.activity-status-help.status-temporarily-closed {
    color: var(--sp-danger);
}

.activity-status-help.status-closed {
    color: #6b7280;
}

.offsite-session-list {
    display: grid;
    gap: .55rem;
    margin-top: .75rem;
}

.offsite-session-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: .65rem;
    border: 1px solid var(--sp-border);
    border-radius: .6rem;
    background: var(--sp-bg-soft);
}

.offsite-session-status {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: .18rem;
    text-align: right;
}

.offsite-session-note {
    color: var(--sp-muted);
    font-size: .88rem;
    font-weight: 750;
}

.empty-state {
    overflow-wrap: anywhere;
}

.item-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: .65rem;
}

.app-button,
.item-actions button,
.item-actions a {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    padding: .5rem .75rem;
    border: 1px solid var(--sp-teal);
    border-radius: .55rem;
    color: var(--sp-teal);
    background: var(--sp-white);
    font-weight: 850;
    text-decoration: none;
    text-align: center;
    white-space: normal;
}

body.chas-mode .app-button,
body.chas-mode .item-actions button,
body.chas-mode .item-actions a {
    color: var(--chas-blue);
    border-color: var(--chas-blue);
    background: rgba(255, 255, 255, .78);
}

.app-button.primary {
    color: var(--sp-white);
    border-color: var(--sp-teal);
    background: var(--sp-teal);
}

body.chas-mode .app-button.primary,
body.chas-mode .item-actions .primary {
    color: var(--sp-white);
    border-color: var(--chas-pink);
    background: var(--chas-pink);
}

.app-button.danger {
    color: var(--sp-white);
    border-color: var(--sp-danger);
    background: var(--sp-danger);
}

.toolbar-row,
.map-controls {
    display: grid;
    grid-template-columns: 1fr;
    gap: .65rem;
    margin-bottom: .85rem;
}

.form-control,
.form-select {
    min-height: 48px;
    border-color: var(--sp-border);
    border-radius: .65rem;
}

.song-request-panel {
    border-left: 5px solid var(--sp-teal);
}

.song-request-panel .section-heading i {
    color: var(--sp-teal);
    font-size: 1.35rem;
}

.song-request-form {
    display: grid;
    gap: .65rem;
}

.song-request-form .app-button {
    width: 100%;
}

#songRequestSubmit:disabled,
#songRequestSubmit.is-cooling-down {
    border-color: #6c757d;
    color: var(--sp-white);
    background: #6c757d;
    opacity: .78;
    cursor: not-allowed;
}

#songRequestInput:disabled {
    border-color: #adb5bd;
    color: #6c757d;
    background: #e9ecef;
    opacity: 1;
    cursor: not-allowed;
}

.map-shell {
    position: relative;
    min-height: 0;
}

.map-results {
    display: grid;
    gap: .5rem;
    margin-bottom: .85rem;
}

.map-result-button {
    display: flex;
    width: 100%;
    min-height: 48px;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: .6rem .75rem;
    border: 1px solid var(--sp-border);
    border-radius: .65rem;
    color: var(--sp-black);
    background: var(--sp-white);
    font-weight: 800;
    text-align: left;
}

.map-result-button span:last-child {
    color: var(--sp-muted);
    font-size: .85rem;
}

.map-viewport {
    width: 100%;
    height: min(70svh, 680px);
    min-height: 430px;
    overflow: hidden;
    border: 2px solid var(--sp-border);
    border-radius: .75rem;
    background: #eef5ef;
    touch-action: none;
}

.map-screen .map-shell {
    flex: 1 1 auto;
}

.map-open .map-screen .map-shell {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.map-screen .map-viewport {
    height: calc(100svh - var(--nav-height) - 176px - env(safe-area-inset-bottom));
    min-height: 420px;
    border-right: 0;
    border-left: 0;
    border-radius: .35rem;
}

.map-open .map-screen .map-viewport {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100svh;
    min-height: 0;
    border: 0;
    border-radius: 0;
}

.map-canvas {
    position: relative;
    width: 1094px;
    height: 2048px;
    transform-origin: 0 0;
    will-change: transform;
}

.map-canvas img {
    display: block;
    width: 100%;
    height: 100%;
    user-select: none;
    -webkit-user-drag: none;
}

.map-route-overlay {
    position: absolute;
    inset: 0;
    z-index: 90;
    width: 100%;
    height: 100%;
    overflow: visible;
    pointer-events: none;
}

.map-route-line {
    fill: none;
    stroke: var(--sp-purple);
    stroke-width: 11;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .28));
}

.map-route-dotted-line {
    fill: none;
    stroke: var(--sp-purple);
    stroke-width: 11;
    stroke-linecap: round;
    stroke-dasharray: 2 24;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .28));
}

.map-marker {
    position: absolute;
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    transform: translate(-50%, -50%) scale(var(--marker-scale, 1));
    transform-origin: center;
    border: 0;
    border-radius: 50%;
    color: var(--sp-white);
    background: transparent;
    font-size: .72rem;
    font-weight: 900;
    --marker-bg: var(--sp-teal);
}

.map-marker::before {
    content: "";
    position: absolute;
    inset: 7px;
    z-index: -1;
    border: 2px solid var(--sp-white);
    border-radius: 50%;
    background: var(--marker-bg);
    box-shadow: 0 2px 5px rgba(0, 0, 0, .28);
}

.map-marker[data-marker-kind="activity"] {
    --marker-bg: var(--sp-purple);
}

.map-marker[data-marker-kind="subcamp"] {
    --marker-bg: transparent;
}

.map-marker[data-marker-kind="subcamp"]::before {
    display: none;
}

.map-marker[data-marker-kind="important"] {
    --marker-bg: var(--sp-danger);
}

.map-marker[data-marker-kind="transport"] {
    --marker-bg: #6b7280;
}

.map-marker[data-marker-kind="green"] {
    --marker-bg: #1f8a4c;
}

.map-marker[data-marker-kind="blue"] {
    --marker-bg: var(--sp-teal);
}

.map-marker[data-marker-kind="other"] {
    --marker-bg: #f5a623;
}

.map-marker-badge {
    display: block;
    width: 52px;
    height: 52px;
    object-fit: contain;
}

.map-marker i {
    font-size: 1rem;
    line-height: 1;
}

.map-marker.is-selected {
    outline: 4px solid var(--sp-purple);
    z-index: 110 !important;
}

.you-are-here {
    position: absolute;
    z-index: 120;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.location-dot {
    position: relative;
    z-index: 2;
    display: block;
    width: 18px;
    height: 18px;
    border: 3px solid var(--sp-white);
    border-radius: 50%;
    background: #1769ff;
    box-shadow: 0 0 0 4px rgba(23, 105, 255, .18);
}

.accuracy-circle {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 0;
    height: 0;
    transform: translate(-50%, -50%);
    border: 2px solid rgba(23, 105, 255, .35);
    border-radius: 50%;
    background: rgba(23, 105, 255, .12);
}

.accuracy-circle[hidden] {
    display: none;
}

.map-action-bar {
    position: absolute;
    right: .7rem;
    top: .7rem;
    display: grid;
    gap: .45rem;
}

.map-open .map-action-bar {
    position: fixed;
    top: calc(var(--topbar-height) + .75rem + env(safe-area-inset-top));
    right: .75rem;
    z-index: 24;
}

.map-button {
    color: var(--sp-purple);
    background: var(--sp-white);
}

.map-button:disabled {
    color: #9ca3af;
    background: #f3f4f6;
    cursor: not-allowed;
    opacity: .92;
}

.map-key-toggle {
    position: absolute;
    left: .7rem;
    bottom: .7rem;
    z-index: 5;
    min-height: 42px;
    padding: .45rem .8rem;
    border: 2px solid var(--sp-purple);
    border-radius: .6rem;
    color: var(--sp-purple);
    background: var(--sp-white);
    font-weight: 900;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .16);
}

.map-open .map-key-toggle {
    position: fixed;
    bottom: calc(var(--nav-height) + .75rem + env(safe-area-inset-bottom));
    left: .75rem;
    z-index: 24;
}

.map-key-panel {
    position: absolute;
    left: .7rem;
    right: .7rem;
    bottom: 3.75rem;
    z-index: 4;
    max-width: 560px;
    padding: .8rem;
    border: 1px solid var(--sp-border);
    border-radius: .75rem;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 10px 28px rgba(0, 0, 0, .18);
}

.map-open .map-key-panel {
    position: fixed;
    bottom: calc(var(--nav-height) + 4rem + env(safe-area-inset-bottom));
    z-index: 24;
}

.map-key-panel[hidden] {
    display: none;
}

.map-key-panel h3 {
    margin: 0 0 .55rem;
    color: var(--sp-purple);
    font-size: 1rem;
    font-weight: 900;
}

.map-key-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .5rem .75rem;
}

.map-key-list span {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    min-width: 0;
    color: var(--sp-black);
    font-size: .86rem;
    font-weight: 800;
}

.key-dot {
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
    border: 2px solid var(--sp-white);
    border-radius: 50%;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .28);
}

.key-activity {
    background: var(--sp-purple);
}

.key-subcamp {
    background: var(--sp-white);
    border-color: var(--sp-purple);
}

.key-important {
    background: var(--sp-danger);
}

.key-transport {
    background: #6b7280;
}

.key-green {
    background: #1f8a4c;
}

.key-blue {
    background: var(--sp-teal);
}

.key-other {
    background: #f5a623;
}

.key-you {
    background: #1769ff;
}

.location-panel {
    margin-top: .85rem;
    padding: .9rem;
}

.map-popup-panel {
    position: absolute;
    left: .7rem;
    right: .7rem;
    bottom: 3.75rem;
    z-index: 6;
    max-height: min(45svh, 330px);
    overflow: auto;
    box-shadow: 0 12px 32px rgba(0, 0, 0, .22);
}

.map-open .map-popup-panel {
    position: fixed;
    bottom: calc(var(--nav-height) + 4rem + env(safe-area-inset-bottom));
    z-index: 25;
}

.map-popup-panel[hidden] {
    display: none;
}

.map-popup-close {
    float: right;
    min-height: 34px;
    margin-left: .6rem;
    padding: .25rem .55rem;
    border: 1px solid var(--sp-border);
    border-radius: .45rem;
    color: var(--sp-purple);
    background: var(--sp-white);
    font-size: .8rem;
    font-weight: 850;
}

.map-screen .near-me-panel {
    margin: .55rem .35rem 0;
}

.map-open .map-screen .near-me-panel {
    display: none;
}

.map-open .map-results {
    position: fixed;
    top: calc(var(--topbar-height) + 4rem + env(safe-area-inset-top));
    left: .75rem;
    right: .75rem;
    z-index: 24;
    max-height: calc(100svh - var(--topbar-height) - var(--nav-height) - 8rem);
    overflow: auto;
    margin: 0;
}

.location-panel h3,
.item-card h3,
.settings-block h3 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 850;
}

.item-card {
    padding: .9rem;
}

.information-content {
    display: grid;
    gap: .85rem;
}

.information-article a {
    color: var(--sp-teal);
    font-weight: 850;
}

.information-article {
    display: grid;
    gap: .75rem;
}

.information-article h1,
.information-article h2,
.information-article h3,
.information-article h4,
.information-article h5,
.information-article h6 {
    margin: .3rem 0 0;
    color: var(--sp-purple);
    font-size: 1.05rem;
    font-weight: 850;
    overflow-wrap: anywhere;
}

.information-article h1:first-child,
.information-article h2:first-child,
.information-article h3:first-child {
    margin-top: 0;
}

.information-article p,
.information-article ul,
.information-article ol,
.information-article table {
    margin: 0;
    color: var(--sp-muted);
    font-size: .95rem;
    overflow-wrap: anywhere;
}

.information-article ul,
.information-article ol {
    padding-left: 1.25rem;
}

.information-article details {
    padding: .75rem 0;
    border-bottom: 1px solid var(--sp-border);
}

.information-article summary {
    color: var(--sp-black);
    font-weight: 850;
    cursor: pointer;
    overflow-wrap: anywhere;
}

.information-article details > * + * {
    margin-top: .6rem;
}

.information-article table {
    width: 100%;
    border-collapse: collapse;
}

.information-article th,
.information-article td {
    padding: .45rem;
    border: 1px solid var(--sp-border);
    text-align: left;
    vertical-align: top;
}

.activity-completed {
    border-color: var(--sp-teal);
    background: var(--sp-bg-soft);
}

body.chas-mode .activity-completed {
    border-color: var(--chas-turquoise);
    background: rgba(255, 193, 212, .42);
}

.item-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .75rem;
}

.number-token {
    display: inline-grid;
    min-width: 32px;
    height: 32px;
    place-items: center;
    border-radius: 50%;
    color: var(--sp-white);
    background: var(--sp-purple);
    font-weight: 900;
}

body.chas-mode .number-token,
body.chas-mode .number-token.activity-token-icon {
    color: var(--sp-white);
    background: var(--chas-pink);
}

.number-token.activity-token-icon {
    color: var(--activity-token-text, var(--sp-white));
    background: var(--activity-token-bg, var(--sp-purple));
}

.number-token.activity-token-icon i {
    font-size: .98rem;
    line-height: 1;
}

.number-token.activity-token-water {
    --activity-token-bg: #0000ff;
}

.number-token.activity-token-ship {
    --activity-token-bg: #008c95;
}

.number-token.activity-token-computer {
    --activity-token-bg: #ffbf0b;
    --activity-token-text: #111111;
}

.number-token.activity-token-four-by-four {
    --activity-token-bg: #166534;
}

.number-token.activity-token-activity {
    --activity-token-bg: var(--sp-purple);
}

.number-token.activity-token-bus,
.number-token.activity-token-food,
.number-token.activity-token-shop {
    --activity-token-bg: #6b7280;
}

.status-text {
    display: inline-block;
    margin-top: .4rem;
    color: var(--sp-muted);
    font-size: .88rem;
    font-weight: 750;
}

.announcement-target.is-subcamp-target {
    color: var(--announcement-target-colour, var(--sp-purple));
    font-weight: 950;
}

.timeline-meta .announcement-target {
    margin-top: 0;
    font-size: inherit;
    vertical-align: baseline;
}

.notice-priority {
    display: inline-block;
    margin-bottom: .35rem;
    font-size: .78rem;
    font-weight: 950;
}

.notice-important {
    border-left: 5px solid var(--sp-purple);
    padding-left: .75rem;
    background: rgba(71, 46, 140, .08);
}

.notice-important h3,
.notice-important .timeline-meta {
    color: var(--sp-purple);
    font-weight: 900;
}

.notice-important .notice-priority {
    color: var(--sp-purple);
}

.notice-normal .notice-priority {
    color: var(--sp-muted);
}

.notice-emergency {
    border: 2px solid var(--sp-danger);
    border-left-width: 6px;
    color: var(--sp-black);
    background: #fff5f5;
}

.notice-emergency h3 {
    color: var(--sp-danger);
}

.notice-emergency .notice-priority {
    color: var(--sp-danger);
}

body.chas-mode .notice-important {
    border-left-color: #472e8c;
    background: rgba(71, 46, 140, .08);
}

body.chas-mode .notice-important h3,
body.chas-mode .notice-important .timeline-meta,
body.chas-mode .notice-important .notice-priority {
    color: #472e8c;
}

body.chas-mode .notice-normal {
    border-color: var(--sp-border);
    background: var(--sp-white);
}

body.chas-mode .notice-normal h3 {
    color: var(--sp-black);
}

body.chas-mode .notice-normal .timeline-meta {
    color: #4d5960;
}

body.chas-mode .notice-normal .notice-priority {
    color: #4d5960;
}

body.chas-mode .notice-emergency {
    border-color: var(--sp-danger);
    border-left-color: var(--sp-danger);
    color: var(--sp-black);
    background: #fff5f5;
}

body.chas-mode .notice-emergency h3,
body.chas-mode .notice-emergency .notice-priority {
    color: var(--sp-danger);
}

body.chas-mode .notice-emergency .timeline-meta {
    color: #4d5960;
}

.admin-alert-panel {
    margin: 0 0 1rem;
    padding: 1rem;
    border: 2px solid var(--sp-danger);
    border-radius: .75rem;
    background: #fff5f5;
}

.admin-alert-panel h2,
.status-temporarily-closed,
.status-closed {
    color: var(--sp-danger);
}

.status-busy {
    color: var(--sp-purple);
}

.status-badge {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    padding: .42rem .72rem;
    border-radius: .6rem;
    color: var(--sp-white);
    font-size: 1rem;
    font-weight: 900;
}

.status-badge.status-open {
    background: #1f8a4c;
}

body.chas-mode .status-badge.status-open {
    color: var(--chas-blue);
    background: var(--chas-turquoise);
}

.status-badge.status-busy {
    background: #d97706;
}

.status-badge.status-closed {
    background: #6b7280;
}

.status-badge.status-temporarily-closed {
    background: var(--sp-danger);
}

.completion-helper {
    font-weight: 850;
}

.achievement-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .75rem;
    margin: 0 0 .85rem;
    padding: 1rem;
    border: 1px solid var(--sp-border);
    border-radius: .75rem;
    background: var(--sp-bg-soft);
}

body.chas-mode .achievement-panel {
    border-color: rgba(57, 226, 215, .8);
    background: rgba(255, 255, 255, .72);
}

.achievement-panel h3 {
    margin: 0;
    color: var(--sp-purple);
    font-size: 1.2rem;
    font-weight: 850;
}

.achievement-panel > div {
    flex: 1 1 auto;
    min-width: 0;
}

.achievement-panel.is-complete {
    border-color: var(--sp-teal);
    background: #effcff;
}

body.chas-mode .achievement-panel.is-complete {
    border-color: var(--chas-pink);
    background: rgba(255, 193, 212, .48);
}

.medal-badge {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    padding: .45rem .75rem;
    border: 2px solid var(--sp-purple);
    border-radius: 999px;
    color: var(--sp-purple);
    background: var(--sp-white);
    font-size: .86rem;
    font-weight: 900;
    text-align: center;
}

body.chas-mode .medal-badge {
    color: var(--chas-blue);
    border-color: var(--chas-pink);
    background: var(--chas-light-pink);
}

.other-achievements {
    margin-top: 1.2rem;
}

.other-achievements .section-heading {
    margin-bottom: .75rem;
}

.other-achievement-list {
    display: grid;
    gap: .65rem;
}

.other-achievement {
    padding: .85rem;
    border: 1px solid var(--sp-border);
    border-radius: .5rem;
    background: var(--sp-white);
}

.other-achievement.is-locked {
    color: #6b7280;
    background: var(--sp-bg-soft);
    opacity: .78;
}

.other-achievement.is-unlocked {
    border-color: var(--sp-teal);
    background: #effcff;
}

.other-achievement h3 {
    margin: 0 0 .25rem;
    color: var(--sp-purple);
    font-size: 1rem;
    font-weight: 850;
}

.other-achievement.is-locked h3 {
    color: #4b5563;
}

.other-achievement p {
    margin: 0;
}

.achievement-note {
    margin-top: .85rem;
    padding-top: .85rem;
    border-top: 1px solid var(--sp-border);
}

.weather-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: .75rem;
    align-items: center;
}

.weather-card h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 850;
}

.weather-temp {
    margin: .15rem 0 0;
    color: var(--sp-teal);
    font-size: 2rem;
    font-weight: 900;
    line-height: 1;
}

.weather-advice {
    margin: .75rem 0 0;
    padding: .7rem .75rem;
    border-left: 4px solid var(--sp-teal);
    border-radius: .55rem;
    color: var(--sp-black);
    background: var(--sp-bg-soft);
    font-size: .94rem;
    font-weight: 750;
    overflow-wrap: anywhere;
}

.network-banner {
    position: fixed;
    left: .75rem;
    right: .75rem;
    bottom: calc(var(--nav-height) + .75rem + env(safe-area-inset-bottom));
    z-index: 40;
    padding: .65rem .8rem;
    border-radius: .65rem;
    color: var(--sp-white);
    background: var(--sp-purple);
    font-weight: 850;
    text-align: center;
}

.subcamp-gate {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    place-items: center;
    padding: 1rem;
    background: rgba(71, 46, 140, .92);
}

.subcamp-gate[hidden] {
    display: none;
}

.subcamp-gate [hidden] {
    display: none;
}

.subcamp-gate-card {
    display: grid;
    width: min(100%, 420px);
    gap: .75rem;
    padding: 1.1rem;
    border-radius: .75rem;
    background: var(--sp-white);
    box-shadow: 0 18px 55px rgba(0, 0, 0, .3);
}

.subcamp-gate-card .event-crest {
    width: 64px;
    height: 64px;
}

.subcamp-gate-card h2 {
    margin: 0;
    color: var(--sp-purple);
    font-size: 1.35rem;
    font-weight: 900;
}

.subcamp-gate-card label {
    display: grid;
    gap: .35rem;
    font-weight: 850;
}

.subcamp-gate-open {
    overflow: hidden;
}

.install-prompt {
    position: fixed;
    inset: 0;
    z-index: 95;
    display: grid;
    place-items: end center;
    padding: 1rem;
    background: rgba(0, 0, 0, .36);
}

.install-prompt[hidden],
.install-prompt [hidden] {
    display: none;
}

.install-prompt-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    width: min(100%, 460px);
    gap: .85rem;
    padding: 1rem;
    border: 1px solid var(--sp-border);
    border-radius: .75rem;
    background: var(--sp-white);
    box-shadow: 0 18px 55px rgba(0, 0, 0, .28);
}

.install-prompt-icon,
.install-settings-icon {
    width: 58px;
    height: 58px;
    flex: 0 0 auto;
    object-fit: contain;
}

.install-prompt-card h2 {
    margin: 0;
    color: var(--sp-purple);
    font-size: 1.25rem;
    font-weight: 900;
}

.install-steps {
    grid-column: 1 / -1;
    margin: .15rem 0 0;
    padding-left: 1.25rem;
    color: var(--sp-black);
    font-size: .92rem;
    font-weight: 750;
}

.install-steps li + li {
    margin-top: .25rem;
}

.install-prompt-actions {
    grid-column: 1 / -1;
}

.install-prompt-open {
    overflow: hidden;
}

.bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 30;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    min-height: calc(var(--nav-height) + env(safe-area-inset-bottom));
    padding: .45rem .35rem calc(.45rem + env(safe-area-inset-bottom));
    border-top: 1px solid var(--sp-border);
    background: rgba(255, 255, 255, .98);
}

body.chas-mode .bottom-nav {
    border-top-color: var(--chas-blue);
    background: var(--chas-turquoise);
}

.bottom-nav button {
    display: grid;
    place-items: center;
    gap: .1rem;
    min-width: 0;
    min-height: 58px;
    border: 0;
    border-radius: .75rem;
    color: var(--sp-muted);
    background: transparent;
    font-size: .72rem;
    font-weight: 850;
    padding: .25rem .1rem;
}

body.chas-mode .bottom-nav button {
    color: var(--chas-blue);
}

.bottom-nav svg,
.bottom-nav i {
    width: 23px;
    height: 23px;
    font-size: 1.25rem;
    line-height: 1;
}

.bottom-nav svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.subcamp-badge {
    display: block;
    width: 46px;
    height: 46px;
    object-fit: contain;
}

.subcamp-badge[hidden] {
    display: none;
}

.bottom-subcamp-badge {
    width: 28px;
    height: 28px;
}

.quick-icon .quick-subcamp-badge {
    width: 34px;
    height: 34px;
}

.bottom-nav button.has-subcamp-badge svg,
.bottom-nav button.has-subcamp-badge i {
    display: none;
}

.bottom-nav button.is-active {
    color: var(--sp-white);
    background: var(--sp-teal);
}

body.chas-mode .bottom-nav button.is-active {
    color: var(--sp-white);
    background: var(--chas-pink);
}

.bottom-nav .map-tab {
    color: var(--sp-purple);
}

body.chas-mode .bottom-nav .map-tab {
    color: var(--chas-blue);
}

.bottom-nav .map-tab.is-active {
    background: var(--sp-purple);
}

body.chas-mode .bottom-nav .map-tab.is-active {
    color: var(--sp-white);
    background: var(--chas-blue);
}

.bottom-nav span {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.more-panel {
    display: none;
}

.more-panel.is-active {
    display: block;
}

.admin-grid {
    display: grid;
    gap: .8rem;
    margin-top: .85rem;
}

.admin-grid label {
    display: grid;
    gap: .3rem;
    font-weight: 800;
}

.admin-activity-card {
    display: grid;
    gap: .85rem;
}

.admin-status-edit {
    display: grid;
    gap: .65rem;
}

.admin-status-edit label {
    display: grid;
    gap: .3rem;
    font-weight: 800;
}

.admin-check {
    display: flex !important;
    min-height: 44px;
    align-items: center;
    grid-template-columns: none !important;
    gap: .55rem !important;
}

.admin-check input {
    width: 22px;
    height: 22px;
}

.settings-block,
.next-up {
    padding: 1rem;
    margin-bottom: .85rem;
}

.toggle-setting {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .85rem;
}

.toggle-setting > div {
    flex: 1 1 auto;
    min-width: 0;
}

.toggle-setting h3 {
    margin: 0;
    color: var(--sp-purple);
    font-size: 1.05rem;
    font-weight: 900;
}

.switch-control {
    position: relative;
    display: inline-flex;
    width: 64px;
    height: 36px;
    flex: 0 0 auto;
    align-items: center;
}

.switch-control input {
    position: absolute;
    inset: 0;
    opacity: 0;
}

.switch-slider {
    position: relative;
    width: 100%;
    height: 100%;
    border: 2px solid var(--sp-border);
    border-radius: 999px;
    background: #d8e1e4;
    transition: background-color .18s ease, border-color .18s ease;
}

.switch-slider::before {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--sp-white);
    box-shadow: 0 2px 7px rgba(0, 0, 0, .28);
    transition: transform .18s ease;
}

.switch-control input:checked + .switch-slider {
    border-color: var(--sp-teal);
    background: var(--sp-teal);
}

.switch-control input:checked + .switch-slider::before {
    transform: translateX(28px);
}

.switch-control input:focus-visible + .switch-slider {
    outline: 3px solid var(--sp-purple);
    outline-offset: 3px;
}

body.chas-mode .chas-mode-settings {
    border-color: var(--chas-pink);
    background: rgba(255, 193, 212, .66);
}

.notification-settings .fa-bell {
    color: var(--sp-purple);
    font-size: 1.35rem;
}

.notification-settings.is-on {
    border-color: var(--sp-teal);
}

.notification-settings.is-blocked {
    border-color: var(--sp-danger);
}

body.chas-mode .switch-control input:checked + .switch-slider {
    border-color: var(--chas-blue);
    background: var(--chas-pink);
}

.subcamp-settings {
    transition: border-color .2s ease, background-color .2s ease, color .2s ease;
}

.subcamp-settings.has-subcamp {
    border-color: var(--subcamp-colour);
    color: var(--subcamp-text-colour);
    background: var(--subcamp-colour);
}

.subcamp-settings.has-subcamp label,
.subcamp-settings.has-subcamp .muted {
    color: var(--subcamp-text-colour);
}

.subcamp-settings-description {
    font-size: 1.08rem;
    font-weight: 950;
}

.subcamp-settings.has-subcamp .form-select {
    border-color: rgba(255, 255, 255, .65);
}

.subcamp-settings-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
}

.subcamp-settings-head > div {
    flex: 1 1 auto;
    min-width: 0;
}

.settings-subcamp-badge {
    width: 68px;
    height: 68px;
    flex: 0 0 auto;
}

.install-settings-head {
    display: flex;
    align-items: center;
    gap: .75rem;
}

.install-settings-head > div {
    flex: 1 1 auto;
    min-width: 0;
}

.install-settings .app-button {
    gap: .45rem;
}

.settings-reset-actions {
    display: flex;
    justify-content: stretch;
    margin-top: .35rem;
}

.settings-reset-actions .settings-reset-button {
    width: 100%;
}

.settings-reset-prompt {
    position: fixed;
    inset: 0;
    z-index: 105;
    display: grid;
    place-items: center;
    padding: 1rem;
    background: rgba(0, 0, 0, .42);
}

.settings-reset-prompt[hidden] {
    display: none;
}

.settings-reset-card {
    display: grid;
    width: min(100%, 390px);
    gap: .75rem;
    padding: 1rem;
    border: 1px solid var(--sp-border);
    border-radius: .75rem;
    background: var(--sp-white);
    box-shadow: 0 18px 55px rgba(0, 0, 0, .28);
}

.settings-reset-card h2 {
    margin: 0;
    color: var(--sp-danger);
    font-size: 1.25rem;
    font-weight: 900;
}

.event-staff-settings {
    display: grid;
    gap: .85rem;
}

.event-staff-settings[hidden],
.event-staff-settings [hidden] {
    display: none;
}

.event-staff-settings .section-heading {
    margin-bottom: 0;
}

.staff-grid {
    display: grid;
    gap: .55rem;
}

.staff-grid label {
    font-weight: 850;
}

.staff-access-grid {
    display: grid;
    gap: .85rem;
}

.staff-access-panel {
    display: grid;
    gap: .65rem;
    padding: .9rem;
    border: 1px solid var(--sp-border);
    border-radius: .75rem;
    background: var(--sp-bg-soft);
}

.staff-access-panel h3 {
    margin: 0;
    color: var(--sp-purple);
    font-size: 1.05rem;
    font-weight: 900;
}

.staff-status-button {
    color: var(--sp-white);
    border-color: var(--staff-status-colour);
    background: var(--staff-status-colour);
}

.staff-status-busy {
    --staff-status-colour: #d97706;
}

.staff-status-temporarily-closed {
    --staff-status-colour: var(--sp-danger);
}

.staff-announcement-list {
    margin-top: .2rem;
}

.progress-subcamp-badge {
    width: 58px;
    height: 58px;
    flex: 0 0 auto;
}

.empty-state {
    padding: .9rem;
    border: 1px dashed var(--sp-border);
    border-radius: .75rem;
    color: var(--sp-muted);
    background: var(--sp-bg-soft);
}

@media (min-width: 620px) {
    :root {
        --topbar-height: 104px;
    }

    .event-place {
        display: block;
    }

    .toolbar-row,
    .map-controls {
        grid-template-columns: 1fr 190px;
    }

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

    .home-main .quick-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .admin-status-edit {
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: end;
    }
}

@media (min-width: 760px) {
    .home-layout {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
        gap: 1rem;
        align-items: start;
    }

    .home-aside {
        grid-column: 2;
        grid-row: 1;
    }

    .home-main {
        grid-column: 1;
        grid-row: 1;
    }

    .home-aside .notice-band:first-child,
    .home-main .section-block:first-child {
        margin-top: 1rem;
    }
}

@media (max-width: 360px) {
    :root {
        --topbar-height: 78px;
    }

    .app-main {
        padding-left: .75rem;
        padding-right: .75rem;
    }

    .app-topbar {
        gap: .6rem;
        padding-left: .75rem;
        padding-right: .75rem;
    }

    .app-topbar h1 {
        font-size: 1.08rem;
    }

    .event-crest {
        width: 42px;
        height: 42px;
    }

    .app-topbar [data-action="open-search"] {
        width: 40px;
        min-width: 40px;
        height: 40px;
        border-radius: .65rem;
    }

    .scouts-mark {
        width: 48px;
    }

    .event-place {
        display: none;
    }

    .section-heading .text-button {
        display: none;
    }

    .day-strip {
        align-items: flex-start;
        flex-direction: column;
    }

    .timeline-item {
        grid-template-columns: 3.45rem minmax(0, 1fr);
        padding: .75rem;
    }

    .item-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .bottom-nav button {
        font-size: .66rem;
    }

    .map-key-list {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 900px) {
    :root {
        --nav-height: 84px;
        --topbar-height: 104px;
    }

    .app-main {
        padding-top: 1.25rem;
    }

    .screen.is-active.map-screen {
        display: flex;
        min-height: calc(100svh - var(--nav-height) - 94px);
        gap: 0;
    }

    .map-screen .map-viewport {
        height: calc(100svh - var(--nav-height) - 190px - env(safe-area-inset-bottom));
        min-height: 520px;
    }

    .map-screen .near-me-panel {
        width: min(920px, calc(100% - .7rem));
        margin: .7rem auto 0;
    }

    .map-popup-panel {
        right: auto;
        width: min(440px, calc(100% - 1.4rem));
    }
}

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