:root {
  --bg: #f5f3ee; --surface: #fff; --surface-soft: #faf9f6; --text: #26312f; --muted: #687370;
  --line: #dddeda; --primary: #2f6f68; --primary-dark: #245851; --primary-soft: #e3efec;
  --danger: #ad4f4f; --shadow: 0 10px 30px rgba(42,56,52,.07); --radius: 16px;
  --normal: #497d8b; --weekday: #6e70a7; --autumn: #ad7647; --winter: #6485a4;
  --summer: #4f9071; --christmas: #9a5f67; --father: #6b739f; --mother: #a9657b;
  --manual: #80734e; --child-moment: #76918b; --request: #9a6a43; --cancelled: #8e9290; --changed: #b06f42;
}
.history-entry:not(.history-status) .history-value-new { color: var(--muted); font-weight: 400; }
.history-entry.history-status-initial{padding-block:7px;border-left-width:2px;background:#fafaf8;opacity:.76}.history-entry.history-status-initial strong{font-size:.7rem;font-weight:620}
.report-controls{padding:18px;margin-bottom:14px}.report-control-grid{display:grid;grid-template-columns:repeat(3,minmax(170px,1fr));gap:12px}.report-control-grid label{color:var(--muted);font-size:.75rem;font-weight:700}.report-control-grid input,.report-control-grid select{margin-top:5px}.report-filter-fieldset{margin:16px 0 0;padding:14px 16px;border:1px solid var(--line);border-radius:12px}.report-filter-fieldset legend{padding:0 6px;font-size:.8rem;font-weight:750}.report-filter-actions{display:flex;gap:8px;margin:-5px 0 8px}.report-filter-actions .text-button{padding:5px 7px;font-size:.74rem}.report-filter-groups{display:grid;grid-template-columns:1.4fr .8fr 1fr;gap:20px}.report-filter-groups>div{display:grid;align-content:start;gap:6px}.report-filter-groups strong{margin-bottom:3px;font-size:.78rem}.report-filter-groups label{display:flex;align-items:center;gap:7px;color:var(--muted);font-size:.74rem}.report-filter-groups input[type=checkbox]{width:auto;margin:0;accent-color:var(--primary)}.report-control-actions{display:flex;gap:10px;margin-top:16px}.report-control-actions button:disabled{cursor:not-allowed;opacity:.5}.report-preview{padding:clamp(20px,4vw,42px);background:#fff}.report-document-header{padding-bottom:18px;border-bottom:2px solid var(--text)}.report-document-header h2{margin:0;font-size:1.55rem}.report-document-meta{display:flex;flex-wrap:wrap;gap:8px 22px;margin-top:12px;color:var(--muted);font-size:.78rem}.report-document-body{display:grid;gap:12px;margin-top:20px}.report-entry{padding:15px 17px;border:1px solid var(--line);border-left:4px solid #aab8b4;border-radius:10px;background:#fff;break-inside:avoid}.report-entry.report-request{border-left-color:#a99078}.report-entry h3{margin:2px 0 5px;font-size:1rem}.report-entry p{margin:4px 0;color:var(--muted)}.report-entry-date{color:var(--text);font-size:.76rem;font-weight:730}.report-relation{padding-top:5px;border-top:1px dashed var(--line);font-size:.73rem}.report-details{display:grid;grid-template-columns:minmax(130px,.35fr) 1fr;gap:5px 14px;margin:12px 0 0}.report-details dt{color:var(--muted);font-size:.72rem;font-weight:720}.report-details dd{margin:0;white-space:pre-wrap}.report-details dd small{display:block;margin-top:2px;color:var(--muted);font-size:.67rem}.report-history{margin-top:14px;padding-top:11px;border-top:1px solid var(--line)}.report-history h4{margin:0 0 7px;font-size:.8rem}.report-history-row{display:grid;grid-template-columns:130px 110px 1fr;gap:8px;padding:6px 0;border-bottom:1px solid #eee;font-size:.7rem}.report-history-row time{color:var(--muted)}.report-history-row span{white-space:pre-wrap}.report-empty{padding:36px 15px;text-align:center;color:var(--muted)}
@media (max-width:900px){.report-control-grid{grid-template-columns:repeat(2,minmax(160px,1fr))}.report-filter-groups{grid-template-columns:1fr 1fr}}
@media (max-width:620px){.report-control-grid,.report-filter-groups{grid-template-columns:1fr}.report-control-actions{align-items:stretch;flex-direction:column}.report-details,.report-history-row{grid-template-columns:1fr}.report-history-row{gap:2px}}
@page{size:A4;margin:15mm}
@media print{body{background:#fff!important;color:#000!important;font:9.5pt/1.32 Arial,sans-serif!important}.app-header,.main-nav,#reportControls,.report-screen-heading,.toast{display:none!important}main{width:auto!important;margin:0!important;padding:0!important}main>.app-section{display:none!important}main>#reportSection{display:block!important}#reportPreview{display:block!important;margin:0!important;padding:0!important;border:0!important;border-radius:0!important;box-shadow:none!important;color:#000!important}.report-document-header{padding-bottom:6mm;border-color:#000!important}.report-document-header h2{font-size:19pt!important;letter-spacing:-.02em}.report-document-header .eyebrow{color:#444!important}.report-document-meta{gap:3mm 9mm!important;margin-top:4mm!important}.report-document-meta,.report-entry p,.report-details dt,.report-details dd small,.report-history-row time{color:#444!important}.report-document-body{gap:3mm!important;margin-top:6mm!important}.report-entry{break-inside:avoid-page!important;padding:3mm 3.5mm!important;border:1px solid #aaa!important;border-left:2px solid #777!important;border-radius:2mm!important;box-shadow:none!important}.report-entry h3{margin-bottom:1mm!important}.report-entry p{margin:1mm 0!important}.report-details{gap:1mm 4mm!important;margin-top:2mm!important}.report-history{margin-top:2.5mm!important;padding-top:2mm!important}.report-history-row{padding:1.2mm 0!important}.report-entry.report-request{border-left-color:#555!important}.report-history,.report-history-row{break-inside:avoid!important}.report-control-actions,button{display:none!important}}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.app-header { min-height: 92px; padding: 18px clamp(20px,4vw,64px); display:flex; align-items:center; justify-content:space-between; gap:20px; background:var(--surface); border-bottom:1px solid var(--line); }
.brand { display:flex; align-items:center; gap:14px; }
.brand-mark { display:grid; place-items:center; width:46px; height:46px; border-radius:14px; background:var(--primary); color:white; font-weight:750; letter-spacing:.04em; }
h1,h2,h3,p { margin-top:0; }
.brand h1 { margin:0; font-size:1.25rem; letter-spacing:-.02em; }.brand p { margin:2px 0 0; font-size:.84rem; color:var(--muted); }
.main-nav { padding:0 clamp(20px,4vw,64px); display:flex; gap:4px; background:var(--surface); border-bottom:1px solid var(--line); overflow:auto; }
.nav-item { position:relative; padding:16px 18px 14px; border:0; background:none; color:var(--muted); white-space:nowrap; font-weight:650; }
.nav-item.active { color:var(--primary); }.nav-item.active::after { content:""; position:absolute; height:3px; border-radius:2px 2px 0 0; background:var(--primary); left:16px; right:16px; bottom:0; }
.badge { display:inline-grid; place-items:center; min-width:21px; height:21px; margin-left:5px; padding:0 6px; border-radius:999px; background:#eee9e0; font-size:.72rem; }.nav-item.active .badge { background:var(--primary-soft); }
main { width:min(1500px,100%); margin:auto; padding:28px clamp(16px,4vw,58px) 56px; }
.app-section { display:none; }.app-section.active { display:block; }
.card { background:var(--surface); border:1px solid var(--line); border-radius:var(--radius); box-shadow:var(--shadow); }
.primary,.secondary,.today-button,.icon-button { min-height:42px; border-radius:10px; padding:9px 15px; font-weight:680; border:1px solid transparent; }
.primary { background:var(--primary); color:#fff; }.primary:hover { background:var(--primary-dark); }
.secondary,.today-button,.icon-button { background:var(--surface); border-color:var(--line); color:var(--text); }.secondary:hover,.today-button:hover,.icon-button:hover { border-color:#9eaaa7; }
.toolbar { padding:16px; display:flex; align-items:center; gap:18px; flex-wrap:wrap; }
.holiday-reminders{margin-top:14px;padding:16px 18px}.holiday-reminder-heading{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:12px}.holiday-reminder-heading h3{margin:0;font-size:1rem}.holiday-reminder-heading .eyebrow{margin-bottom:2px}.holiday-reminder-heading>span{padding:5px 10px;border-radius:99px;background:var(--primary-soft);color:var(--primary-dark);font-size:.75rem;font-weight:750}.holiday-reminder-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:9px}.holiday-reminder-item{padding:11px 12px;border-radius:10px;background:var(--surface-soft);border:1px solid #ebeae5}.holiday-reminder-item.next{background:#f8f7f3;border-style:dashed}.holiday-reminder-item h4{margin:0 0 3px;font-size:.82rem}.holiday-reminder-owner{display:block;color:var(--text);font-size:.75rem;font-weight:680}.holiday-reminder-status{display:block;margin-top:5px;color:#8a6337;font-size:.72rem}.holiday-reminder-item.ready .holiday-reminder-status{color:#397054}.holiday-reminder-detail,.holiday-reminder-dates,.holiday-reminder-week,.holiday-reminder-label{display:block;margin-top:2px;color:var(--muted);font-size:.68rem}.holiday-reminder-label{margin-top:7px;color:var(--muted);font-weight:720}.holiday-reminder-dates{color:var(--text);font-weight:650}.holiday-reminder-dates.muted{font-weight:500}.holiday-action{margin-top:9px;padding:5px 0;border:0;background:none;color:var(--primary);font-size:.7rem;font-weight:720;text-align:left}.settings-section-title{margin:0 0 10px;font-size:1rem;color:var(--text)}
.view-switch { display:flex; padding:4px; background:#efeee9; border-radius:11px; }.view-switch button { padding:8px 12px; border:0; border-radius:8px; background:none; color:var(--muted); }.view-switch button.active { background:var(--surface); color:var(--text); box-shadow:0 2px 8px rgba(0,0,0,.06); font-weight:650; }
.date-navigation { display:flex; align-items:center; gap:8px; }.month-picker-wrap{position:relative;margin-left:7px}.period-title-button{min-width:190px;padding:6px 8px;border:1px solid transparent;border-radius:8px;background:transparent;color:var(--text);font-size:1.15rem;font-weight:700;text-align:left}.period-title-button.selectable{cursor:pointer}.period-title-button.selectable::after{content:"▾";margin-left:7px;color:var(--muted);font-size:.75rem}.period-title-button.selectable:hover,.period-title-button[aria-expanded=true]{border-color:var(--line);background:var(--surface-soft)}.period-title-button:disabled{cursor:default;opacity:1}.month-picker-popover{position:absolute;z-index:8;top:calc(100% + 6px);left:0;width:min(390px,calc(100vw - 32px));padding:14px;border:1px solid var(--line);border-radius:12px;background:var(--surface);box-shadow:0 16px 45px rgba(35,48,45,.18)}.month-picker-popover>label{display:flex;align-items:center;gap:9px;margin-bottom:11px;color:var(--muted);font-size:.72rem;font-weight:700}.month-picker-popover input{width:100px;padding:7px 8px;text-align:center;font-weight:720}.month-picker-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:6px}.month-picker-grid button{display:flex;align-items:center;justify-content:center;gap:5px;min-height:34px;padding:6px;border:1px solid var(--line);border-radius:8px;background:var(--surface-soft);color:var(--text);font-size:.72rem}.month-picker-grid button:hover{border-color:#9eaaa7}.month-picker-grid button.active{border-color:var(--primary);background:var(--primary-soft);color:var(--primary-dark);font-weight:750}.month-picker-grid button.current-month:not(.active){border-color:#b8c7c3;background:#f7faf9}.month-picker-now{padding:1px 4px;border-radius:99px;background:#e7eeec;color:var(--primary-dark);font-size:.55rem;font-weight:750;line-height:1.35}.month-picker-grid button.active .month-picker-now{background:var(--primary);color:#fff}.icon-button { width:42px; padding:0; font-size:1.7rem; font-weight:400; }.year-picker,.week-jump,.week-jump label{display:flex;align-items:center;gap:7px;color:var(--muted);font-size:.72rem;font-weight:700}.year-picker input{width:92px;padding:8px 9px;color:var(--text);font-size:1rem;font-weight:750;text-align:center}.week-jump{margin-left:3px}.week-jump input{width:58px;padding:8px;text-align:center}.week-jump .secondary{min-height:38px;padding:7px 10px;font-size:.76rem}
.range-fields { margin-left:auto; display:flex; align-items:end; gap:10px; }.range-fields label,.filters label,.summary-range label { color:var(--muted); font-size:.76rem; font-weight:650; }
.filters { display:flex; align-items:end; gap:12px; margin-top:14px; padding:13px 16px; flex-wrap:wrap; }.filters label:not(.search-field) { min-width:170px; }.filters select,.filters input,.range-fields input,.summary-range input { margin-top:4px; }.filters.has-active-filter{border-color:#9ebcb6;box-shadow:0 0 0 2px var(--primary-soft),var(--shadow)}.active-filter-notice{flex-basis:100%;padding:8px 11px;border-radius:8px;background:var(--primary-soft);color:var(--primary-dark);font-size:.78rem;font-weight:680}
input,select,textarea { width:100%; padding:10px 11px; color:var(--text); background:#fff; border:1px solid #cfd3d0; border-radius:9px; outline:none; } input:focus,select:focus,textarea:focus { border-color:var(--primary); box-shadow:0 0 0 3px var(--primary-soft); }
.search-field { position:relative; flex:1; min-width:240px; }.search-field span { position:absolute; left:11px; top:13px; color:var(--muted); font-size:1.2rem; }.search-field input { padding-left:35px; }
.text-button { border:0; background:none; color:var(--primary); font-weight:670; padding:10px; }.danger { color:var(--danger); }
.type-child_moment{color:var(--child-moment)!important;background:color-mix(in srgb,var(--child-moment) 9%,white)!important}.event-pill.type-child_moment{border-left-width:2px;font-weight:500}.legend-item.type-child_moment{color:var(--child-moment)!important}.mini-day.type-child_moment{color:var(--child-moment)!important;background:color-mix(in srgb,var(--child-moment) 10%,white)!important}
.calendar-card { margin-top:14px; overflow:hidden; }.week-53-notice{display:flex;align-items:baseline;gap:7px;padding:10px 16px;border-bottom:1px solid #e5dac4;background:#fffdf7;color:#625d50;font-size:.76rem;line-height:1.45}.week-53-notice strong{flex:0 0 auto;color:#715c36;font-weight:750}.calendar-month-title{margin:0;padding:13px 16px 11px;border-bottom:1px solid var(--line);font-size:1.05rem;letter-spacing:-.01em;text-align:center}.calendar-head,.calendar-grid { display:grid; grid-template-columns:50px repeat(7,1fr); }.calendar-head div { padding:10px; text-align:center; text-transform:uppercase; letter-spacing:.08em; color:var(--muted); font-size:.7rem; font-weight:750; border-bottom:1px solid var(--line); }.calendar-head .week-header{background:#f3f2ed;font-size:.6rem}
.week-number-cell{display:grid;place-content:start center;gap:0;min-height:128px;padding:9px 3px;border-right:1px solid var(--line);border-bottom:1px solid var(--line);background:#f3f2ed;color:var(--muted);text-align:center}.week-number-cell span{font-size:.55rem;text-transform:uppercase}.week-number-cell strong{font-size:.72rem}.day-cell { position:relative; min-height:128px; padding:7px; border-right:1px solid var(--line); border-bottom:1px solid var(--line); overflow:hidden; }.day-cell.week-end{border-right:0}.day-cell.outside{background:#f7f6f2;color:#a2a8a5}.day-cell.today{background:#f3faf8}.day-number{display:flex; align-items:center; gap:5px; margin-bottom:4px; font-size:.78rem; font-weight:700}.today .day-number span:first-child{display:grid;place-items:center;width:24px;height:24px;border-radius:50%;background:var(--primary);color:#fff}.week-number-cell.week-highlight{background:#dcece8;color:var(--primary-dark);box-shadow:inset 0 0 0 2px #8fb7ae}.day-cell.week-highlight{background-color:#f6fbf9;box-shadow:inset 0 2px 0 #b7d4cd,inset 0 -2px 0 #b7d4cd}
.day-cell.event-range-highlight{background:#edf8f5;box-shadow:inset 0 0 0 2px #75aa9f}.event-pill.event-focus-highlight{position:relative;z-index:2;outline:3px solid #d59a45;outline-offset:1px;box-shadow:0 0 0 5px rgba(213,154,69,.18)}
.event-pill { width:100%; display:block; margin:3px 0; padding:4px 6px; border:0; border-left:3px solid currentColor; border-radius:5px; background:#eef3f3; color:var(--normal); text-align:left; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; font-size:.68rem; line-height:1.3; }.event-pill:hover{filter:brightness(.97)}.event-pill.cancelled{background:#eceeed;color:var(--cancelled);text-decoration:line-through;opacity:.68}.event-pill.rescheduled-active{border-left:3px solid currentColor;box-shadow:inset 0 0 0 1px currentColor;font-weight:680}.event-pill.historical{border-left:3px solid #9aa19f;box-shadow:none;background:#eceeed;color:#747b79;font-style:italic;opacity:.82;text-decoration:line-through;text-decoration-thickness:1px}
.type-normal_weekend{color:var(--normal);background:color-mix(in srgb,var(--normal) 14%,white)}.type-weekday_visit{color:var(--weekday);background:color-mix(in srgb,var(--weekday) 14%,white)}.type-autumn_holiday{color:var(--autumn);background:color-mix(in srgb,var(--autumn) 14%,white)}.type-winter_holiday{color:var(--winter);background:color-mix(in srgb,var(--winter) 14%,white)}.type-summer_holiday{color:var(--summer);background:color-mix(in srgb,var(--summer) 14%,white)}.type-christmas{color:var(--christmas);background:color-mix(in srgb,var(--christmas) 14%,white)}.type-fathers_day{color:var(--father);background:color-mix(in srgb,var(--father) 14%,white)}.type-mothers_day{color:var(--mother);background:color-mix(in srgb,var(--mother) 14%,white)}.type-manual_visit{color:var(--manual);background:color-mix(in srgb,var(--manual) 14%,white)}.type-extra_request{color:var(--request);background:color-mix(in srgb,var(--request) 14%,white)}
.legend { margin-top:14px; padding:13px 16px; display:flex; align-items:center; flex-wrap:wrap; gap:8px 18px; }.legend-title{color:var(--muted);font-size:.78rem;font-weight:750}.legend-item{display:flex;align-items:center;gap:7px;background:transparent;font-size:.8rem}.legend-item.type-normal_weekend{color:var(--normal)}.legend-item.type-weekday_visit{color:var(--weekday)}.legend-item.type-autumn_holiday{color:var(--autumn)}.legend-item.type-winter_holiday{color:var(--winter)}.legend-item.type-summer_holiday{color:var(--summer)}.legend-item.type-christmas{color:var(--christmas)}.legend-item.type-fathers_day{color:var(--father)}.legend-item.type-mothers_day{color:var(--mother)}.legend-item.type-manual_visit{color:var(--manual)}.legend-item.type-extra_request{color:var(--request)}.legend-dot{width:9px;height:9px;border-radius:3px;background:currentColor}
.section-heading { display:flex; justify-content:space-between; align-items:end; gap:20px; margin-bottom:20px; }.section-heading h2{margin-bottom:5px;font-size:1.8rem;letter-spacing:-.03em}.section-heading p:last-child{margin:0;color:var(--muted)}.eyebrow{text-transform:uppercase;letter-spacing:.12em;font-size:.68rem;font-weight:800;color:var(--primary);margin-bottom:5px}
.request-list { display:grid; gap:12px; margin-top:14px; }.request-card { padding:18px; display:grid; grid-template-columns:1fr auto; gap:12px; }.request-card h3{margin:0 0 5px;font-size:1rem}.request-card p{margin:4px 0;color:var(--muted)}.request-card button{align-self:start}.request-actions{display:flex;flex-direction:column;gap:8px;align-items:stretch}.request-event-created{padding:7px 9px;border-radius:8px;background:var(--primary-soft);color:var(--primary-dark);font-size:.72rem;font-weight:700;text-align:center}.status-chip{display:inline-block;padding:4px 9px;border-radius:99px;background:#eee;font-size:.7rem;font-weight:750}.status-chip.approved{background:#e3f1e8;color:#33704b}.status-chip.rejected{background:#f5e6e6;color:#9a4747}.status-chip.waiting{background:#f4eee1;color:#886a30}
.empty-state { padding:50px 20px; text-align:center; color:var(--muted); }.empty-state strong{display:block;color:var(--text);font-size:1.05rem;margin-bottom:5px}
.summary-range { padding:16px; display:flex; align-items:end; gap:12px; flex-wrap:wrap; }.summary-range label{min-width:190px}.stat-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-top:14px}.stat-card{padding:18px}.stat-card span{display:block;color:var(--muted);font-size:.76rem;min-height:38px}.stat-card strong{font-size:2rem;letter-spacing:-.05em}.report-grid,.settings-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-top:14px}.report-card,.form-card,.annual-list-card,.rules-card{padding:22px}.report-card h3,.form-card h3,.annual-list-card h3,.rules-card h3{margin-bottom:16px}.breakdown-row{display:grid;grid-template-columns:1fr auto;gap:12px;padding:9px 0;border-bottom:1px solid #eee}.reason-item{padding:12px;background:var(--surface-soft);border-radius:10px;margin-bottom:8px}.reason-item p{margin:4px 0 0;color:var(--muted)}
.quick-ranges{display:flex;flex-wrap:wrap;gap:6px;flex-basis:100%}.quick-ranges button{min-height:32px;padding:5px 9px;border:1px solid var(--line);border-radius:8px;background:var(--surface-soft);color:var(--muted);font-size:.7rem;font-weight:650}.quick-ranges button:hover{border-color:#9eaaa7;color:var(--text)}.print-hint{margin:9px 0 0;color:var(--muted);font-size:.7rem}.past-event-reminder{margin-top:14px;padding:16px 18px;border-color:#d7c8a7;background:#fffdf7}.past-event-reminder-heading h3{margin:0;font-size:1rem}.past-event-reminder-list{display:grid;gap:8px;margin-top:12px}.past-event-reminder-row{display:flex;align-items:center;justify-content:space-between;gap:15px;padding:10px 12px;border-radius:10px;background:#fff;border:1px solid #eee7d8}.past-event-reminder-row small{display:block;color:var(--muted)}.past-event-reminder-row>div:last-child{display:flex;flex-wrap:wrap;gap:6px}.past-event-reminder-row button{min-height:34px;padding:6px 10px;font-size:.72rem}.settings-utility-grid{margin-top:14px}.utility-card{padding:22px}.utility-card h3{margin-bottom:12px}.utility-card>label{display:block;margin-top:12px;color:var(--muted);font-size:.78rem;font-weight:650}.setting-toggle{display:flex!important;align-items:center;gap:8px}.setting-toggle input{width:auto}.backup-actions{display:flex;flex-wrap:wrap;gap:8px}.destructive-button{min-height:42px;padding:9px 15px;border:0;border-radius:10px;background:var(--danger);color:#fff;font-weight:720}.confirm-modal{width:min(520px,calc(100% - 24px))}.confirm-message{white-space:pre-wrap;color:var(--muted)}.confirm-message strong{display:block;margin-bottom:8px;color:var(--text);font-size:1rem}
.past-event-week{color:#735f36;font-weight:780;white-space:nowrap}
.report-entry.report-child-moment{border-left-width:2px;border-left-color:var(--child-moment);background:#fbfdfc}
.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}.form-grid label{font-size:.75rem;font-weight:700;color:var(--muted)}.form-grid input,.form-grid select,.form-grid textarea{margin-top:5px}.full{grid-column:1/-1}.info-box{padding:11px 13px;margin:15px 0;border-radius:10px;background:var(--primary-soft);color:#3f625d;font-size:.8rem}.annual-form-actions,.annual-row-actions{display:flex;align-items:center;gap:8px}.annual-row{display:grid;grid-template-columns:1fr auto;gap:8px;padding:12px 0;border-bottom:1px solid #eee}.annual-row p{margin:2px 0;color:var(--muted);font-size:.8rem}.annual-row-actions .text-button{padding:7px 5px}.school-holiday-card{margin-top:14px;padding:22px}.school-holiday-heading h3{margin:0 0 4px}.school-holiday-heading p{margin:0 0 16px;color:var(--muted);font-size:.82rem}.school-holiday-list{margin-top:12px}.rules-card{margin-top:14px}.rules-card li{margin:8px 0;color:var(--muted)}.color-settings-card{margin-top:14px;padding:22px}.color-settings-heading{display:flex;align-items:start;justify-content:space-between;gap:18px;margin-bottom:16px}.color-settings-heading h3{margin-bottom:4px}.color-settings-heading p{margin:0;color:var(--muted);font-size:.82rem}.color-settings-grid{display:grid;grid-template-columns:repeat(2,minmax(220px,1fr));gap:8px 24px}.color-setting{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:9px 0;border-bottom:1px solid #eee;color:var(--text);font-size:.82rem;font-weight:620}.color-setting input[type=color]{width:42px;height:32px;padding:2px;border-radius:7px;cursor:pointer}
.agreement-start-setting{display:block;max-width:420px;margin-bottom:16px;padding:13px 14px;border-radius:10px;background:var(--surface-soft);color:var(--text);font-size:.78rem;font-weight:720}.agreement-start-setting input{margin-top:6px}.agreement-start-setting small{display:block;margin-top:6px;color:var(--muted);font-weight:500}
.modal { width:min(680px,calc(100% - 24px)); max-height:90vh; padding:0; border:0; border-radius:18px; color:var(--text); box-shadow:0 20px 70px rgba(0,0,0,.25); }.modal::backdrop{background:rgba(24,34,32,.5);backdrop-filter:blur(2px)}.modal form{padding:24px}.modal-header{display:flex;justify-content:space-between;gap:15px;margin-bottom:18px}.modal-header h2{margin:0}.close-button{border:0;background:#f0f0ed;width:38px;height:38px;border-radius:50%;font-size:1.4rem;color:var(--muted)}.optional{font-weight:400}.field-hint,.field-meta{display:block;margin-top:5px;color:var(--muted);font-size:.68rem;font-weight:500}#eventNotes{min-height:96px;overflow-y:hidden;line-height:1.5}.inline-choice{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:12px;padding:11px 13px;border:1px solid #d9d6ca;border-radius:10px;background:#faf8f1;color:var(--text);font-size:.78rem}.inline-choice>div{display:flex;gap:7px;flex:none}.inline-choice .secondary{min-height:34px;padding:6px 10px;font-size:.74rem}.history-panel{margin-top:14px;padding:10px 12px;border:1px solid var(--line);border-radius:10px;background:var(--surface-soft)}.history-panel summary{cursor:pointer;color:var(--primary);font-size:.78rem;font-weight:720}.history-list{display:grid;gap:8px;margin-top:10px}.history-entry{padding:9px 10px;border-left:3px solid #bdc9c6;border-radius:6px;background:#fff;font-size:.74rem}.history-entry.history-status{border-left-color:#78938d;background:#f7faf9}.history-entry.history-description{border-left-color:#9a8f7c;background:#fbfaf7}.history-entry.history-response{border-left-color:#8494a5;background:#f8fafc}.history-entry.history-reason{border-left-color:#a28d87;background:#fbf8f7}.history-entry.history-notes{border-left-color:#879b94;background:#f8faf9}.history-entry time{display:block;margin-bottom:3px;color:var(--muted);font-size:.68rem}.history-entry strong{display:block}.history-values{display:grid;gap:3px;margin-top:3px;white-space:pre-wrap}.history-value-new{color:var(--text);font-weight:620}.history-value-old{color:var(--muted);font-weight:400}.history-text-change{display:grid;gap:7px;margin-top:6px}.history-text-section{display:grid;gap:3px}.history-change-label{color:var(--muted);font-size:.68rem;font-weight:680;letter-spacing:.01em}.history-change-block{padding:8px 9px;border:1px solid #e2e5e2;border-radius:7px;background:#fff;color:var(--text);font-weight:400;line-height:1.5;overflow-wrap:anywhere;white-space:pre-wrap}.history-text-added .history-change-label{color:#4e735f}.history-text-added .history-change-block{border-color:#d6e4dc;background:#f7fbf8}.history-text-removed .history-change-label{color:#8a625d}.history-text-removed .history-change-block{border-color:#eadbd8;background:#fcf8f7;color:#6f5e5a}.history-text-before .history-change-block{background:#fafafa;color:var(--muted)}.history-text-after .history-change-block{border-color:#d6dfdc;background:#f8fbfa}.history-status-value{display:inline-block;padding:1px 6px;border-radius:99px;font-style:normal;font-weight:680}.history-status-value.status-approved,.history-status-value.status-agreed,.history-status-value.status-completed{background:#e5efe9;color:#426b53}.history-status-value.status-rejected,.history-status-value.status-cancelled{background:#f3e7e7;color:#8a5555}.history-status-value.status-waiting,.history-status-value.status-planned{background:#eeeae1;color:#756b58}.history-status-value.status-changed{background:#f2eadf;color:#806344}.history-status-value.status-neutral{background:#eceeed;color:#687370}.modal-actions{display:flex;gap:10px;align-items:center;margin-top:20px}.event-view-mode .form-grid input:disabled,.event-view-mode .form-grid select:disabled,.event-view-mode .form-grid textarea:disabled{color:var(--text);background:var(--surface-soft);border-color:transparent;opacity:1;cursor:default;resize:none}.event-view-mode .optional{display:none}.spacer{flex:1}.toast{position:fixed;right:24px;bottom:24px;padding:12px 17px;border-radius:10px;background:#26312f;color:#fff;box-shadow:var(--shadow);transform:translateY(90px);opacity:0;transition:.25s;z-index:10}.toast.show{transform:none;opacity:1}.hidden{display:none!important}
.history-text-changed .history-text-before{order:2}.history-text-changed .history-text-after{order:1}
.agenda-list{padding:8px 18px}.agenda-group{display:grid;grid-template-columns:130px 1fr;gap:18px;padding:14px 0;border-bottom:1px solid #eee}.agenda-date{font-weight:700}.agenda-date small{display:block;color:var(--muted);font-weight:400}.agenda-event{display:flex;align-items:center;gap:10px;width:100%;border:0;background:none;padding:7px;text-align:left;border-radius:8px}.agenda-event:hover{background:var(--surface-soft)}.agenda-event .legend-dot{flex:none}.agenda-event.cancelled{color:var(--cancelled);text-decoration:line-through;opacity:.65}.agenda-event.cancelled .legend-dot{background:var(--cancelled);color:var(--cancelled)}.agenda-event.historical{color:#747b79;font-style:italic;text-decoration:line-through;opacity:.78}.agenda-event.historical .legend-dot{background:#9aa19f;color:#9aa19f}.agenda-event.rescheduled-active{box-shadow:inset 3px 0 0 var(--normal)}.meta{font-size:.75rem;color:var(--muted)}
.year-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:1px;background:var(--line)}.mini-month{background:var(--surface);padding:15px}.mini-month.current-month{position:relative;background:#f6fbf9;box-shadow:inset 0 0 0 2px #a9c8c1}.mini-month.current-month h3{color:var(--primary-dark)}.mini-month h3{text-align:center;font-size:.9rem;margin-bottom:9px}.mini-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:2px}.mini-grid>span{text-align:center;padding:4px 1px;font-size:.64rem;border-radius:4px}.mini-grid .label{color:var(--muted);font-weight:700}.mini-day{position:relative;min-width:0;min-height:23px;padding:4px 1px;border:1px solid transparent;border-radius:4px;background:transparent;color:var(--text);font:inherit;font-size:.64rem;text-align:center}.mini-day.has-event{color:currentColor;font-weight:760}.mini-day.type-normal_weekend{color:var(--normal);background:color-mix(in srgb,var(--normal) 18%,white)}.mini-day.type-weekday_visit{color:var(--weekday);background:color-mix(in srgb,var(--weekday) 18%,white)}.mini-day.type-autumn_holiday{color:var(--autumn);background:color-mix(in srgb,var(--autumn) 18%,white)}.mini-day.type-winter_holiday{color:var(--winter);background:color-mix(in srgb,var(--winter) 18%,white)}.mini-day.type-summer_holiday{color:var(--summer);background:color-mix(in srgb,var(--summer) 18%,white)}.mini-day.type-christmas{color:var(--christmas);background:color-mix(in srgb,var(--christmas) 18%,white)}.mini-day.type-fathers_day{color:var(--father);background:color-mix(in srgb,var(--father) 18%,white)}.mini-day.type-mothers_day{color:var(--mother);background:color-mix(in srgb,var(--mother) 18%,white)}.mini-day.type-manual_visit{color:var(--manual);background:color-mix(in srgb,var(--manual) 18%,white)}.mini-day.type-extra_request{color:var(--request);background:color-mix(in srgb,var(--request) 18%,white)}.mini-day.historical{background:#eceeed;color:#747b79;border-color:#b8bdbb;text-decoration:line-through;opacity:.78}.mini-day.rescheduled-active{border-color:currentColor;box-shadow:inset 0 0 0 1px currentColor}.mini-day.cancelled{background:#eceeed;color:var(--cancelled);border-color:#c1c5c3;text-decoration:line-through;opacity:.65}.mini-day.today{outline:1px solid var(--primary);outline-offset:1px}.mini-event-markers{position:absolute;display:flex;gap:1px;left:2px;right:2px;bottom:1px}.mini-event-markers i{display:block;flex:1;height:2px;border-radius:2px;background:currentColor}.mini-event-markers i.historical{background:#929997;color:#929997}.no-results-banner{padding:11px 16px;background:#f4eee1;color:#715c36;text-align:center;font-size:.82rem;font-weight:700;border-bottom:1px solid #e5dac4}
.event-pill.changed:not(.historical):not(.rescheduled-active){border-left-style:dashed;box-shadow:inset 0 0 0 1px currentColor;font-weight:680}.agenda-event.changed:not(.historical){box-shadow:inset 3px 0 0 currentColor}.mini-day.changed:not(.historical):not(.request-rejected){border-color:currentColor;border-style:dashed}.event-pill.request-rejected{background:#f1e9e9;color:#806868;border-left-color:#9e8585;box-shadow:none;font-style:italic;opacity:.78;text-decoration:line-through}.agenda-event.request-rejected{color:#806868;box-shadow:none;font-style:italic;text-decoration:line-through;opacity:.78}.agenda-event.request-rejected .legend-dot,.legend-dot.request-rejected{background:#9e8585;color:#9e8585}.mini-day.request-rejected{background:#f1e9e9;color:#806868;border-color:#b8a2a2;border-style:solid;font-style:italic;text-decoration:line-through;opacity:.78}
@media (max-width:900px){.stat-grid{grid-template-columns:repeat(2,1fr)}.report-grid,.settings-grid{grid-template-columns:1fr}.year-grid{grid-template-columns:repeat(2,1fr)}.holiday-reminder-grid{grid-template-columns:repeat(2,1fr)}.day-cell,.week-number-cell{min-height:105px}.event-pill{font-size:0;color:var(--normal);height:8px;padding:0;border:0;border-radius:4px}.event-pill.type-weekday_visit{color:var(--weekday)}.event-pill.type-mothers_day{color:var(--mother)}.event-pill.type-fathers_day{color:var(--father)}}
@media (max-width:620px){.app-header{align-items:flex-start}.app-header .primary{font-size:0;width:44px;padding:0}.app-header .primary::first-letter{font-size:1.2rem}.brand p{display:none}.main-nav{padding:0 8px}.nav-item{padding-inline:12px}main{padding-top:18px}.toolbar{align-items:stretch}.view-switch{overflow:auto}.date-navigation{width:100%;flex-wrap:wrap}.month-picker-wrap{order:-1;width:100%;margin:0}.period-title-button{width:100%;padding-left:0}.month-picker-popover{left:0}.holiday-reminder-grid{grid-template-columns:1fr}.past-event-reminder-row{align-items:flex-start;flex-direction:column}.filters{align-items:stretch}.filters label:not(.search-field){flex:1;min-width:130px}.range-fields{margin:0;flex-wrap:wrap}.week-53-notice{align-items:flex-start;flex-direction:column;gap:2px}.calendar-head,.calendar-grid{grid-template-columns:34px repeat(7,1fr)}.calendar-head div{padding:8px 2px}.calendar-head .week-header{font-size:.5rem}.day-cell,.week-number-cell{min-height:72px}.day-cell{padding:4px}.week-number-cell{padding:7px 1px}.week-number-cell span{font-size:.48rem}.week-number-cell strong{font-size:.65rem}.legend{display:none}.section-heading{align-items:flex-start;flex-direction:column}.stat-grid{gap:8px}.stat-card{padding:14px}.form-grid{grid-template-columns:1fr}.form-grid .full{grid-column:auto}.year-grid{grid-template-columns:1fr}.request-card{grid-template-columns:1fr}.agenda-group{grid-template-columns:1fr;gap:4px}.modal form{padding:18px}.color-settings-heading{flex-direction:column}.color-settings-grid{grid-template-columns:1fr}}
/* Tallennustila erottuu kalenterista myös pienellä näytöllä. */
/* Hidden also wins over layout and print rules: no calendar before sign-in. */
[hidden] { display: none !important; }
.auth-page { min-height: 100vh; min-height: 100svh; display: grid; place-items: center; width: 100%; max-width: none; margin: 0; padding: 40px 20px; background: radial-gradient(ellipse at top, #e9f0ec 0, var(--bg) 65%); }
.auth-card { width: min(100%, 440px); padding: 38px; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); box-shadow: var(--shadow); }
.auth-mark { margin-bottom: 26px; }
.auth-card h1 { font-size: clamp(1.65rem, 6vw, 2rem); line-height: 1.2; margin: 8px 0 12px; letter-spacing: -.035em; }
.auth-intro { color: var(--muted); margin: 0 0 28px; }
.auth-form { display: grid; gap: 9px; }
.auth-form label { font-weight: 650; }
.auth-form input { min-width: 0; width: 100%; min-height: 48px; font-size: 16px; }
.auth-form label:not(:first-child) { margin-top: 9px; }
.auth-form .primary { min-height: 48px; width: 100%; margin-top: 13px; }
.auth-message { margin: 3px 0 0; color: #8b332b; font-size: .9rem; overflow-wrap: anywhere; }
.auth-message:empty { display: none; }
.auth-footnote { margin: 24px 0 0; color: var(--muted); font-size: .8rem; }
.auth-form :focus-visible { outline: 3px solid #497d8b; outline-offset: 3px; }
@media (max-width: 480px) { .auth-page { padding: 24px 16px; } .auth-card { padding: 28px 24px; } }
.connection-panel { max-width: 1440px; margin: 0 auto; padding: 12px 24px; border-bottom: 1px solid #dcd8cf; }
.connection-toolbar, .cloud-login-form { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; }
.connection-toolbar { align-items: center; }
.connection-toolbar strong { margin-right: auto; }
.connection-panel details { margin-top: 8px; }
.connection-panel summary { cursor: pointer; }
.cloud-login-form { margin-top: 12px; }
.cloud-login-form label { display: grid; gap: 5px; flex: 1 1 220px; }
.connection-panel [hidden] { display: none !important; }
#connectionMessage { color: #8b332b; margin: 10px 0 0; }
.save-error { color: #8b332b; background: #fff1eb; border: 1px solid #d9a598; padding: 12px; border-radius: 8px; }
@media print { .connection-panel { display: none !important; } }
