:root {
    color-scheme: light;
    --ink: #252c29;
    --muted: #616a64;
    --green: #245a40;
    --red: #a13a48;
    --line: #dce2dd;
    --paper: #ffffff;
    --wash: #f4f7f5;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 20px; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: "Trebuchet MS", sans-serif; font-size: 15px; line-height: 1.5; }
button, input { font: inherit; }
button, a, input { -webkit-tap-highlight-color: transparent; }
.site-header { border-top: 6px solid var(--red); border-bottom: 1px solid var(--line); background: repeating-linear-gradient(135deg, #f7f9f7 0, #f7f9f7 12px, #f2f5f2 12px, #f2f5f2 13px); }
.header-inner, main { max-width: 1280px; padding: 0 32px; margin: 0 auto; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-top: 28px; padding-bottom: 28px; }
.header-inner > div { min-width: 0; }
.eyebrow { margin: 0 0 2px; font-size: 12px; text-transform: uppercase; font-weight: bold; letter-spacing: 0; color: var(--green); }
h1 { font-family: Georgia, serif; font-weight: normal; font-size: 42px; line-height: 1.15; margin: 0 0 10px; }
.event-date { margin: 0; font-weight: bold; }
.event-date span { margin-left: 16px; color: var(--muted); font-weight: normal; }
.event-image { object-fit: cover; border-radius: 4px; flex-shrink: 0; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 0; border-bottom: 1px solid var(--line); }
nav { display: flex; gap: 20px; flex-wrap: wrap; }
nav [role="tab"] { color: var(--muted); border: 0; border-bottom: 3px solid transparent; border-radius: 0; background: none; padding: 8px 0; font-weight: bold; white-space: nowrap; }
nav [role="tab"][aria-selected="true"] { color: var(--green); border-bottom-color: var(--green); }
nav [role="tab"]:active { transform: none; }
#save-status { margin: 0; color: var(--muted); font-size: 13px; text-align: right; }
#save-status[data-state="error"], #baking-error { color: var(--red); }
#save-status[data-state="pending"] { color: #825b00; }
.section-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 28px 0 12px; }
h2 { font-size: 23px; font-family: Georgia, serif; font-weight: normal; margin: 0; }
.section-heading p, .section-heading > span { margin: 0; color: var(--muted); font-size: 13px; }
.overview { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 13px; }
.overview strong { color: var(--ink); }
.legend { display: flex; gap: 7px; align-items: center; }
.legend i { width: 7px; height: 7px; background: var(--red); border-radius: 50%; }
.day { margin-top: 22px; }
.day-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 2px solid var(--green); }
h3 { margin: 0; font-size: 18px; }
h3 span { font-weight: normal; color: var(--muted); font-size: 15px; margin-left: 8px; }
.day-count { font-size: 13px; color: var(--green); }
.column-headings, .shift { display: grid; grid-template-columns: 76px minmax(0, 3fr) minmax(0, 5fr) 126px; column-gap: 16px; }
.column-headings { padding: 12px 0 8px; font-size: 13px; color: var(--muted); }
small { font-size: 11px; }
.column-headings small { display: block; font-weight: normal; }
.shift { padding: 14px 0; border-bottom: 1px solid var(--line); align-items: start; }
.shift-time { font-weight: bold; font-size: 18px; padding-top: 7px; line-height: 1.2; }
.shift-time span { display: block; color: var(--muted); font-size: 11px; font-weight: normal; margin-top: 3px; }
.people { display: grid; gap: 6px; min-width: 0; }
.adult { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.youth { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.mobile-label { display: none; }
.entry { min-width: 0; }
input { width: 100%; min-width: 0; border: 1px solid var(--line); border-radius: 4px; background: var(--wash); color: var(--ink); height: 42px; padding: 8px; font-size: 14px; }
input::placeholder { color: #757c77; opacity: 1; }
input:not(:placeholder-shown) { background: var(--paper); border-color: #b9c8bd; }
input:focus-visible, button:focus-visible, a:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }
input[data-state="error"] { border-color: var(--red); }
input[data-state="pending"] { border-color: #a47b23; }
.shift-status { padding-top: 2px; }
.badge { display: inline-block; padding: 3px 8px; font-size: 12px; border-radius: 4px; font-weight: bold; }
.badge.missing { color: #8c2d3a; background: #fbedef; }
.badge.covered { color: var(--green); background: #e9f3ec; }
.shift-status small { display: block; color: var(--muted); margin-top: 5px; }
.field-feedback { font-size: 12px; color: var(--red); overflow-wrap: anywhere; margin-top: 6px; }
.field-feedback button { display: block; font-size: 11px; padding: 5px; margin-top: 4px; width: 100%; }
.baking-section { padding-bottom: 32px; }
#baking-empty { margin: 22px 0; color: var(--muted); }
.baking-headings, .baking-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 3fr); gap: 12px; }
.baking-headings { color: var(--muted); font-size: 13px; padding: 4px 0 10px; }
.baking-headings small { margin-left: 8px; }
.baking-row { margin-bottom: 8px; }
.baking-row input { background: var(--paper); }
button { border: 1px solid #b6c6bb; border-radius: 4px; padding: 9px 16px; background: var(--wash); color: var(--green); cursor: pointer; font-weight: bold; min-height: 40px; }
button:active { transform: scale(.98); }
button:disabled { cursor: wait; opacity: .6; }
#add-baking { margin-top: 8px; }
.notice { border-left: 3px solid var(--red); padding: 12px; background: #fbedef; }
footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: 12px; padding: 20px 0 28px; border-top: 1px solid var(--line); }
[hidden] { display: none !important; }
@media (hover: hover) { button:hover { background: #e8efea; } nav [role="tab"]:hover { color: var(--green); background: none; } }
@media (max-width: 1050px) {
    .column-headings, .shift { grid-template-columns: 65px minmax(0, 3fr) minmax(0, 5fr); gap: 12px; }
    .column-headings > :last-child { display: none; }
    .shift-status { grid-column: 2 / 4; display: flex; align-items: center; gap: 10px; padding-top: 0; }
    .shift-status small { margin: 0; }
}
@media (max-width: 700px) {
    .header-inner, main { padding-left: 18px; padding-right: 18px; }
    .header-inner { padding-top: 22px; padding-bottom: 22px; gap: 14px; }
    .eyebrow { text-transform: none; overflow-wrap: anywhere; }
    h1 { font-size: 34px; }
    .event-image { width: 76px; height: 92px; }
    .event-date { font-size: 13px; }
    .event-date span { display: block; margin: 3px 0 0; }
    .toolbar { align-items: start; flex-direction: column; gap: 12px; }
    nav { gap: 16px; font-size: 13px; }
    nav [role="tab"] { font-size: 13px; }
    #save-status { text-align: left; }
    .section-heading { flex-direction: column; gap: 6px; }
    h2 { font-size: 22px; }
    h3 span { font-size: 13px; margin-left: 4px; }
    .column-headings { display: none; }
    .shift { grid-template-columns: minmax(0, 1fr); row-gap: 12px; padding: 18px 0; }
    .shift-time { padding: 0; grid-column: 1; }
    .shift-time span { display: none; }
    .shift-status { grid-column: 1; grid-row: 1; justify-self: end; align-items: end; flex-direction: column; gap: 2px; }
    .people { gap: 7px; }
    .mobile-label { display: block; grid-column: 1 / -1; font-size: 12px; color: var(--muted); }
    .youth { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    input { font-size: 16px; min-height: 44px; }
    .baking-headings { display: none; }
    .baking-row { grid-template-columns: minmax(0, 1fr); gap: 6px; padding: 12px 0; margin: 0; border-bottom: 1px solid var(--line); }
    .baking-row > .entry:first-child { max-width: 230px; }
    #add-baking { margin-top: 16px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } button:active { transform: none; } }
@media print {
    .toolbar, .event-image, button, footer, .field-feedback { display: none; }
    .header-inner, main { max-width: none; padding: 0; }
    .site-header { border-top: none; background: white; }
    .header-inner { padding: 12px 0; }
    .day { break-inside: avoid; }
    .shift, .column-headings { grid-template-columns: 55px minmax(0, 3fr) minmax(0, 5fr) 110px; gap: 8px; }
    .shift-status { grid-column: auto; display: block; }
    .column-headings > :last-child { display: block; }
    input { padding: 4px; font-size: 11px; }
    .baking-row:has(input:placeholder-shown):not(:has(input:not(:placeholder-shown))) { display: none; }
}