:root {
    color-scheme: light;
    --page: #f8f3ec;
    --surface: #fffcf7;
    --text: #3b302b;
    --muted: #75665e;
    --border: #e2d7ca;
    --brown: #47362e;
    --terracotta: #a64b3c;
    --olive: #687348;
}

body[data-theme="dark"] {
    color-scheme: dark;
    --page: #201c19;
    --surface: #2c2622;
    --text: #f7efe6;
    --muted: #c9b9ab;
    --border: #51443c;
    --brown: #171310;
    --terracotta: #a64b3c;
    --olive: #a7b17a;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--page);
    color: var(--text);
    font: 16px/1.5 Arial, san-serif;
}

.site-header {
    min-height: 190px;
    padding: 26px max(24px, calc((100% - 1100px) / 2));
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    color: #fff;
    background: var(--brown);
}

h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: clamp(28px, 4vw, 42px); }
h2 { margin-bottom: 12px; }
.eyebrow { color: var(--olive); font-size: 12px; font-weight: 700; letter-spacing: 1.2px; }
.site-header .eyebrow { color: #e7a08a; }
.header-controls { display: grid; justify-items: end; gap: 8px; }
.tabs, .form-actions, .search-form { display: flex; flex-wrap: wrap; gap: 8px; }
.auth-status { margin: 0; color: #fff; font-size: 13px; }

.container { width: min(1000px, calc(100% - 32px)); margin: 28px auto; }
.tab-panel { padding: 24px; }
[hidden] { display: none !important; }

.button, .tab-button, input, select {
    min-height: 42px; 
    padding: 9px 14px;
    border: 1px solid var(--border); 
    border-radius: 8px;
    font: inherit;
}

.button, .tab-button { cursor: pointer; }
.tab-button, .secondary, inout, select { background: var(--surface); color: var(--text); }
.tab-button.active, .primary { background: var(--terracotta); border-color: var(--terracotta); color: #fff; font-weight: 700; }
button:disabled { opacity: .55; cursor: not-allowed; }

.search-form { padding: 14px; background: var(--surface); border:1px solid var(--border); border-radius: 12px; }
.search-form input { flex: 1 1 50px; }
.account-form { max-width: 520px; }
.account-form label, #settings label { display: block; margin: 14px 0 5px; font-weight: 700; }
.account-form input, #settings select { width: 100%; }
.form-actions { margin-top: 14px; }
.satus-message { color: var(--muted); }

.card { margin: 18px 0; padding: 18px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
#mapFrame { width: 100%; height: 420px; border: 0; border-radius: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }

@media (max-width: 650px) {
    .site-header { align-items: flex-start; flex-direction: column; }
    .header-controls { justify-items: start; }
    .tab-panel { padding: 16px 4px; }
    #mapFrame { height: 300px; }
}