/* Native device matching works before scripts load and when JavaScript is unavailable. */
:root{color-scheme:light;--theme-input:#fffef8;--theme-surface:#fdfcf6;--theme-soft:#edf0e6;--theme-footer:#e4e9dd;--theme-danger:#832e25;--theme-danger-bg:#f5e4dc;--theme-hover:#385547;--theme-hover-text:#fff;--theme-raised:#e8ece1}
:root[data-theme=dark]{color-scheme:dark;--cream:#151e1a;--paper:#19231e;--ink:#e9ece2;--ink-soft:#bbc6bb;--muted:#b1beb3;--line:#435347;--mint:#293e31;--pink:#42332f;--lilac:#383443;--lavender:#383443;--sky:#2c3e49;--lemon:#443f29;--peach:#483a2d;--terracotta:#efa68c;--theme-input:#202d25;--theme-surface:#202d25;--theme-soft:#26382c;--theme-footer:#1d2d23;--theme-danger:#ffc1ad;--theme-danger-bg:#442c28;--theme-hover:#ceddcd;--theme-hover-text:#17221c;--theme-raised:#304134}
@media(prefers-color-scheme:dark){:root:not([data-theme=light]){color-scheme:dark;--cream:#151e1a;--paper:#19231e;--ink:#e9ece2;--ink-soft:#bbc6bb;--muted:#b1beb3;--line:#435347;--mint:#293e31;--pink:#42332f;--lilac:#383443;--lavender:#383443;--sky:#2c3e49;--lemon:#443f29;--peach:#483a2d;--terracotta:#efa68c;--theme-input:#202d25;--theme-surface:#202d25;--theme-soft:#26382c;--theme-footer:#1d2d23;--theme-danger:#ffc1ad;--theme-danger-bg:#442c28;--theme-hover:#ceddcd;--theme-hover-text:#17221c;--theme-raised:#304134}}
html{background:var(--paper);scrollbar-color:var(--muted) var(--paper)}body,.admin-page{background:var(--paper);color:var(--ink)}::selection{background:var(--pink);color:var(--ink)}input,textarea{caret-color:var(--terracotta)}
.site-header{border-bottom-color:var(--line)}.site-footer{background:var(--theme-footer);color:var(--ink-soft)}.primary-nav .nav-account,.round-link,.forum-reserved,.open-day,.sample-transport{border-color:var(--line)}
.field input,.field select,.field textarea,input,select,textarea,.date-time-controls input,.date-time-controls select,.message-compose-form select,.message-compose-form textarea,.message-reply textarea,.food-search-primary input,.food-search-primary select,.food-evidence-body select{background:var(--theme-input);color:var(--ink);border-color:var(--line)}input::placeholder,textarea::placeholder{color:var(--muted);opacity:1}select option{background:var(--theme-input);color:var(--ink)}
button:hover,.button:hover{background:var(--theme-hover);color:var(--theme-hover-text)}.button.light:hover{background:var(--theme-surface);color:var(--ink)}.oc-view-links a[aria-current]{color:var(--paper)}.button-quiet,.button.secondary{background:transparent;color:var(--ink);border-color:var(--line)}
.preview-bar{background:var(--theme-raised);color:var(--ink)}.preview-bar button{color:var(--ink)}.preview-bar button[aria-pressed=true]{background:var(--ink);color:var(--paper)}.preview-bar i{background:var(--terracotta)}
.concordia-ribbon,.empty-state,.contact-form-wrap,.booking-summary,.sample-transport-options form,.destination-filters,.food-search-panel,.heritage-visit-invitation,.heritage-places .heritage-map,.account-profile,.event-content-grid .week-join,.transfer-route-card,.operations-overview .admin-counts>div{background:var(--theme-soft)}
.mini-programme>a,.mini-programme>div,.open-day,.food-results-list .text-place-row,.food-results-list .empty-state,.event-people li,.event-conversation .comment-list>li,.transfer-registration .soft-panel,.operations-overview .admin-product{background:var(--theme-surface)}.mini-programme>.forum-block{background:transparent;border-color:var(--line)}
.person-card,.heritage-visit-grid>li{background:var(--mint)}.person-card:nth-child(3n+2),.heritage-visit-grid>li:nth-child(3n+2){background:var(--pink)}.person-card:nth-child(3n+3),.heritage-visit-grid>li:nth-child(3n){background:var(--lavender)}.account-sharing{background:var(--lavender)}
.admin-sidebar,.admin-content th{background:var(--theme-raised)}.admin-sidebar nav a[aria-current],.admin-sidebar nav a:hover{background:var(--mint)}.admin-content .form,.admin-content .admin-product,.enquiry-card,.account-side .form-feedback,.transfer-registration .arabella-existing,.operations-overview .admin-exceptions a{background:var(--theme-surface)}.operations-overview .admin-exceptions{background:var(--peach)}
.form-error,.field-error,.message-error,.photo-upload-status[data-error=true]{color:var(--theme-danger);background:var(--theme-danger-bg);border-color:var(--line)}.text-button{color:var(--terracotta)}.date-time-controls label span{color:var(--muted)}.photo-sharing-form,.message-preview,.message-notice{border-color:var(--line)}.profile-photo-preview{background:var(--mint);color:var(--ink)}.profile-photo-edit input[type=file]::file-selector-button{background:var(--theme-raised);color:var(--ink);border-color:var(--line)}
.favourite-button{border-color:var(--line)}.favourite-button[aria-pressed=true],.favourite-button:hover{background:var(--pink);color:var(--terracotta)}.detail-opening-photo img{background:var(--mint)}.area-photo-caption,.hotel-area-label,.food-illustration-label{background:var(--paper);color:var(--ink)}
.messages-shell{color:var(--ink)}.messages-heading h1 em{color:var(--terracotta)}.message-preview-copy>p,.message-preview-name time,.message-footnote,.message-help,.message-person-heading p,.message-bubble footer{color:var(--muted)}.message-preview.is-unread .message-preview-copy>p{color:var(--ink)}.message-status{color:var(--terracotta)}.message-count,.message-avatar,.message-empty-mark{background:var(--mint);color:var(--ink)}.message-preview:nth-child(3n+2) .message-avatar{background:var(--lavender);color:var(--ink)}.message-preview:hover,.message-preview.is-unread,.message-notice,.message-empty,.message-settings-panel,.message-bubble{background:var(--theme-soft)}.message-bubble.is-mine{background:var(--mint)}.message-compose-form,.message-options>div{background:var(--theme-surface);border-color:var(--line)}.message-options[open] summary{background:var(--mint)}.message-options button{color:var(--ink)!important}.message-options button:hover{background:var(--mint)!important}.message-tabs>a[aria-current]{border-color:var(--terracotta)}
.settings-page{max-width:64rem;padding-top:3rem;padding-bottom:5rem}.settings-page>.text-link{margin-bottom:2rem}.settings-page>h1{font-size:clamp(2.6rem,6vw,5rem);line-height:1.08;margin:1rem 0}.settings-page>.large-copy{max-width:40ch}.settings-panel{border-top:1px solid var(--line);margin-top:2.5rem;padding-top:2rem}.settings-panel>h2{font-size:2rem}.settings-panel>p{max-width:65ch}.theme-options{border:0;padding:0;margin:1.75rem 0;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1rem}.theme-options>legend{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}.theme-options .theme-option{padding:1rem;border:1px solid var(--line);border-radius:12px;cursor:pointer;display:block;background:var(--theme-surface)}.theme-option:has(input:checked){border:2px solid var(--terracotta);padding:calc(1rem - 1px)}.theme-swatch{height:95px;border-radius:6px;display:grid;grid-template-columns:1.5fr 1fr;gap:8px;padding:12px;margin-bottom:1rem;border:1px solid #798475}.theme-swatch i{display:block;border-radius:4px}.theme-swatch i:first-child{grid-row:span 2}.theme-swatch-light{background:#f7f5ee}.theme-swatch-light i{background:#cadac5}.theme-swatch-light i:nth-child(2){background:#e5cfcb}.theme-swatch-light i:nth-child(3){background:#d3cedf}.theme-swatch-dark{background:#19231e}.theme-swatch-dark i{background:#36503e}.theme-swatch-dark i:nth-child(2){background:#6b4940}.theme-swatch-dark i:nth-child(3){background:#57506a}.theme-swatch-system{background:linear-gradient(90deg,#f7f5ee 50%,#19231e 50%)}.theme-swatch-system i{background:#c1d1bb}.theme-swatch-system i:nth-child(2){background:#6b4940}.theme-swatch-system i:nth-child(3){background:#57506a}.theme-option-caption{display:flex;gap:.55rem;align-items:center;font-size:.9rem}.theme-option input[type=radio]{appearance:auto;width:1.1rem;height:1.1rem;flex:none;min-height:0;accent-color:var(--terracotta);margin:0}.theme-option small{font-size:.75rem;color:var(--muted);display:block;line-height:1.6;margin-top:.5rem}.settings-panel form>.small{margin-top:.75rem}.settings-feedback{padding:1rem;background:var(--mint);border-left:3px solid var(--terracotta)}.settings-links{display:grid;max-width:45rem}.settings-links a{display:flex;justify-content:space-between;gap:1rem;min-height:55px;padding:.8rem 0;border-bottom:1px solid var(--line);text-decoration:none}.settings-page :focus-visible{outline:3px solid var(--terracotta);outline-offset:4px}
@media(max-width:560px){.settings-page{padding-top:2rem}.theme-options{grid-template-columns:1fr;gap:.75rem}.theme-options .theme-option{display:grid;grid-template-columns:85px 1fr;column-gap:1rem;align-items:center}.theme-swatch{grid-row:span 2;height:70px;margin:0;padding:8px;gap:5px}.theme-option small{margin:0}.theme-option-caption{align-self:end;padding-bottom:.25rem}.theme-option small{align-self:start}.settings-page>h1{font-size:2.8rem}}
@media(prefers-reduced-motion:reduce){.theme-option,.settings-page button{transition:none!important;transform:none!important}}

/* Theme-safe form and suggestion surfaces, moved from refinements.css on 18 September 2026. */
.place-suggestions{background:var(--theme-input);color:var(--ink);border-color:var(--line);max-height:min(280px,40svh)}.place-suggestions [role=option]{color:var(--ink)}.place-suggestions [role=option]:hover,.place-suggestions [aria-selected=true]{background:var(--theme-soft);color:var(--ink)}
.setup-form input:not([type=checkbox]):not([type=hidden]),.setup-form textarea,.setup-form select,.setup-form select option,.photo-crop-dialog,.signin-save-dialog{background:var(--theme-input);color:var(--ink);border-color:var(--line)}.setup-save{background:var(--paper);border-color:var(--line)}.maps-attribution{color:var(--muted)}
