* { box-sizing: border-box; }

:root {
    --ink: #3a2618;
    --muted: #6e5b4c;
    --paper: #f3eee6;
    --parchment: #f7f1e4;
    --card: #fffdf8;
    --line: #e4d5c3;
    --terracotta: #b5522a;
    --terracotta-bright: #c4622d;
    --terracotta-dark: #8d3f1e;
    --olive: #2c4a38;
    --olive-deep: #1e3428;
    --yellow: #e4b423;
    --font-display: "Newsreader", Georgia, "Times New Roman", serif;
    --font-ui: "Public Sans", "Segoe UI", sans-serif;
    font-family: var(--font-ui);
    color: var(--ink);
    background: var(--paper);
}

html { background: var(--paper); }
body { margin: 0; background: transparent; position: relative; z-index: 0; color: var(--ink); font-family: inherit; }

.ground {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
    background: var(--paper);
}

.ground .contours {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.ground .grain {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: .34;
    mix-blend-mode: multiply;
}
::selection { background: #f0d3a4; }
:focus-visible { outline: 2px solid var(--terracotta); outline-offset: 2px; }

.wrap { width: min(1100px, calc(100% - 36px)); margin: 0 auto; }
h2 { font: 600 1.35rem var(--font-display); margin: 0 0 12px; }
h3 { font-size: 1.05rem; font-weight: 650; margin: 0 0 7px; }
p { margin: 0 0 10px; }
.screen-title { font-family: var(--font-display); font-weight: 700; letter-spacing: .05em; text-transform: uppercase; font-size: clamp(1.6rem, 7vw, 2rem); line-height: 1; margin: 4px 0 16px; overflow-wrap: anywhere; }
.screen-title::after { content: ""; display: block; width: 46px; height: 3px; margin-top: 8px; background: var(--terracotta-bright); border-radius: 2px; }

.eyebrow { font-size: .73rem; font-weight: 650; text-transform: uppercase; letter-spacing: .08em; }
.day-list, .actions { display: flex; flex-wrap: wrap; gap: 8px; }
.day-list { margin: 17px 0 23px; }
.day-list button { text-align: left; min-width: 100px; }
.day-list small { display: block; margin-bottom: 3px; }
.day-list .selected { background: var(--olive); color: #f7f1e4; border-color: var(--olive); }
.actions { margin: 10px 0; }
button, .chip { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 8px 13px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--ink); font: inherit; font-size: .92rem; font-weight: 600; text-decoration: none; cursor: pointer; }
button:hover, .chip:hover { background: #f3e7d8; color: var(--ink); }
button:disabled { opacity: .55; cursor: wait; }
button.primary { color: #fffaf4; background: var(--terracotta); border-color: var(--terracotta); }
button.primary:hover { background: var(--terracotta-dark); color: #fffaf4; }
.section-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin: 16px 0 10px; }
.section-heading h2, .section-heading h3 { margin: 0; }
.panel { padding: clamp(14px, 3vw, 22px); background: var(--card); border: 1px solid var(--line); border-radius: 18px; overflow-wrap: anywhere; min-width: 0; max-width: 100%; }
.panel + .panel { margin-top: 12px; }
.stop { border-left: 3px solid var(--olive); padding: 2px 0 3px 13px; margin: 17px 0; }
.stop .eyebrow, .muted, small { color: var(--muted); }
.forecast, .quiz, .notice { background: #f6ecdf; padding: 12px; border-radius: 12px; }
.notice { margin-bottom: 12px; }
.fields { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 16px; }
label { display: grid; gap: 6px; font-size: .92rem; font-weight: 600; }
input, textarea, select { color: inherit; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font: inherit; font-size: 1rem; width: 100%; min-width: 0; max-width: 100%; }
input::placeholder, textarea::placeholder { text-overflow: ellipsis; }
textarea { min-height: 96px; resize: vertical; }
.photo-picker { margin: 10px 0; }
fieldset { border: 1px solid var(--line); border-radius: 14px; padding: 12px; margin-bottom: 9px; min-width: 0; }
.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(145px, 100%), 1fr)); gap: 12px; }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; }
.gallery figcaption { margin: 5px 0; }
#blazor-error-ui { display: none; position: fixed; inset: auto 0 0; padding: 12px; background: #fbe7ac; z-index: 1000; }
@media (max-width: 680px) { .fields { grid-template-columns: 1fr; } }
