/* Calendar-first workspace. Insets come from the device, never an iPhone model. */
:root {
  --board: #071f17;
  --panel: #104332;
  --panel-deep: #092b20;
  --line: #557b65;
  --chalk: #fffced;
  --muted: #c0d1c5;
  --lime: #dfff76;
  --ink: #09271c;
  --paper: #fff3ce;
  --danger: #ff9d86;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --ease-out: cubic-bezier(.22, 1, .36, 1);
}
[hidden] { display: none !important; }
button, a, input, textarea, select { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--lime); outline-offset: 3px;
}
button { touch-action: manipulation; }
button:not(:disabled) { transition: background .18s, border-color .18s, transform .18s var(--ease-out); }
button:active:not(:disabled) { transform: scale(.97); }
button:disabled { cursor: wait; opacity: .55; }
.app-page { background-size: 22px 22px; }
.topbar { height: calc(64px + var(--safe-top)); padding: var(--safe-top) max(24px, calc((100vw - 1280px)/2), var(--safe-right)) 0 max(24px, calc((100vw - 1280px)/2), var(--safe-left)); }
.simple-shell { width: min(1280px, calc(100% - 48px)); padding: 28px 0; display: flex; flex-direction: column; gap: 18px; }
.todo-section { order: 1; margin: 0; }
.capture-section { order: 2; width: 100%; max-width: 100%; text-align: left; }
.capture-intro { display: none; }
.capture-box { margin: 0; padding: 12px; background: #143f33; box-shadow: 0 12px 32px #00180f20; }
.capture-box textarea { min-height: 64px; max-height: 140px; padding: 10px 12px; resize: none; font-size: 16px; line-height: 1.5; font-weight: 500; }
.capture-box textarea::placeholder { color: #a3b9aa; }
.composer-label { display: flex; justify-content: space-between; align-items: center; padding: 0 4px 8px; }
.composer-label label { font-size: 12px; color: var(--chalk); font-weight: 800; }
#keyboard-done { display: none; border: 0; padding: 4px 8px; color: #c2d1c4; background: none; font-size: 11px; }
.capture-status { min-height: 16px; margin: 7px 4px 0; color: #a9bdb0; font-size: 11px; line-height: 1.4; }
.capture-status.is-error { color: #ffd1bf; }
.capture-box[aria-busy=true] { border-color: var(--lime); }
.date-navigation { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 16px 0 12px; }
.date-navigation .eyebrow { margin-bottom: 4px; font-size: 9px; font-weight: 600; letter-spacing: .16em; }
.date-navigation strong { font-size: 22px; letter-spacing: -.7px; }
.date-navigation-actions { display: flex; align-items: center; gap: 5px; }
.date-navigation-actions button { min-width: 38px; height: 36px; border: 1px solid #486958; border-radius: 10px; color: var(--chalk); background: #163f32; font-size: 12px; cursor: pointer; }
.date-navigation-actions button[aria-label] { font-size: 23px; }
.week-strip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; margin: 0 0 12px; padding: 0; }
.week-strip button { min-width: 0; height: 78px; padding: 8px 0; border: 1px solid #365b4b; border-radius: 16px; color: #b9cbbc; background: #133d30; cursor: pointer; }
.week-strip button small, .week-strip button b { display: block; text-align: center; }
.week-strip button small { font-size: 11px; font-weight: 500; }
.week-strip button b { margin-top: 3px; font-size: 22px; font-variant-numeric: tabular-nums; }
.week-strip button.today { box-shadow: inset 0 0 0 1px #8eac68; }
.week-strip button.today b { color: var(--lime); }
.week-strip button.selected { color: var(--ink); border-color: var(--lime); background: var(--lime); box-shadow: 0 5px 18px #071d2426; }
.week-strip button.selected b { color: var(--ink); }
.day-event-count { display: grid; place-items: center; width: 18px; height: 18px; margin: 4px auto 0; border-radius: 999px; color: var(--ink); background: transparent; font-size: 10px; font-weight: 900; line-height: 1; font-variant-numeric: tabular-nums; }
.week-day .day-event-count:not(:empty) { background: var(--lime); }
.week-day.selected .day-event-count:not(:empty) { background: var(--ink); color: var(--lime); }
.week-day .day-event-count.all-done { color: #d5e2d8; background: #315f4d; }
.week-day.selected .day-event-count.all-done { color: var(--lime); background: var(--ink); }
.schedule-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.schedule-toolbar>span { font-size: 11px; color: #a9bdb0; }
.schedule-view-switch { margin: 0; }
.schedule-view-switch button { min-height: 30px; font-size: 12px; }
.member-filter-strip { flex-wrap: wrap; overflow: visible; }
.member-filter-strip button { min-height: 32px; font-size: 11px; }
.planning-grid { gap: 16px; }
.task-panel { top: calc(80px + var(--safe-top)); background: #143f33; }
.task-panel .todo-list { background: #10392e; }
.task-panel .todo-copy strong, .hour-event .todo-copy strong, .week-event .todo-copy strong { font-size: 13px; line-height: 1.45; overflow-wrap: anywhere; }
.task-panel .todo-copy small { font-size: 10px; line-height: 1.6; }
.task-panel .todo-time-badge { font-size: 11px; }
.task-panel .add-subtask { font-size: 10px; min-height: 28px; }
.task-panel .edit-todo { font-size: 10px; min-height: 30px; }
.day-schedule-heading { display: none; }
.task-panel .check-ui { width: 26px; height: 26px; }
.task-panel .todo-toggle { padding-block: 4px; }
.day-all-day { margin-top: 8px; }
.hour-row>time { padding-top: 17px; font-size: 11px; }
.hour-event { padding-block: 7px; }
.hour-event .todo-item { border-left: 2px solid #c3db86; }
.week-schedule-grid { display: grid; min-width: 0; width: 100%; grid-template-columns: minmax(0, 1fr); align-content: start; gap: 8px; padding: 2px; }
.week-day-column { min-width: 0; min-height: 0; overflow: hidden; border: 1px solid #426b5b; border-radius: 15px; background: #123b30; transition: border-color .2s, background .2s, transform .2s var(--ease-out); }
.week-day-column:hover { border-color: #789a87; transform: translateY(-1px); }
.week-day-column.is-selected { border-color: #8eac68; box-shadow: 0 6px 18px #00180f22; }
.week-day-column.is-today .week-day-heading>b { color: var(--lime); }
.week-day-column>header { position: static; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 13px; border: 0; border-bottom: 1px solid #426b5b; background: linear-gradient(100deg, #194a39, #143f33); }
.week-day-heading { display: flex; align-items: center; gap: 8px; min-width: 0; }
.week-day-column>header b { font-size: 14px; letter-spacing: -.15px; }
.week-today-tag { padding: 3px 7px; border-radius: 999px; color: var(--ink); background: var(--lime); font-size: 9px; font-weight: 900; }
.week-day-count { flex: 0 0 auto; color: #b8cabf; font-size: 10px; font-weight: 800; }
.week-day-column.has-events .week-day-count { padding: 4px 8px; border: 1px solid #527667; border-radius: 999px; color: var(--lime); background: #0c3027; }
.week-day-column.is-empty { min-height: 0; border-color: #315545; background: #10372c88; }
.week-day-column.is-empty>header { min-height: 40px; padding: 8px 12px; border-bottom: 0; background: transparent; }
.week-day-column.is-empty .week-day-heading b { color: #a9bdb0; font-size: 11px; }
.week-day-column.is-empty .week-day-count { color: #779384; font-size: 9px; }
.week-day-column .day-all-day { display: grid; gap: 6px; margin: 9px; padding: 9px; border: 1px solid #476a57; border-radius: 12px; background: #1a4636; }
.week-day-column .day-all-day>small { color: var(--lime); font-size: 9px; font-weight: 950; letter-spacing: .04em; }
.week-day-column .day-all-day>.todo-item { padding: 9px 7px; border: 1px solid #426b5b; border-radius: 10px; background: #123b30; }
.week-day-column .todo-item { gap: 9px; }
.week-day-column .todo-copy { min-width: 0; }
.week-day-column .todo-title-row { align-items: center; }
.week-day-column .todo-title-row strong { font-size: 14px; line-height: 1.4; }
.week-day-column .todo-time-badge { min-width: 49px; padding: 5px 7px; font-size: 10px; }
.week-day-column .todo-copy .schedule-meta { margin-top: 5px; color: #a9bdb0; font-size: 10px; }
.week-timed-events { display: grid; gap: 7px; padding: 9px; }
.week-event { padding: 8px; border: 1px solid #426b5b; border-left: 3px solid var(--lime); border-radius: 12px; background: linear-gradient(105deg, #1b4b3b, #163f33); transition: border-color .2s, background .2s, transform .2s var(--ease-out); }
.week-event:hover { border-color: #a7c76d; background: #205340; transform: translateX(2px); }
.week-event::before { display: none; }
.week-event .todo-item { padding: 2px 0 0; border: 0; background: transparent; }
.week-event .todo-time-badge { display: inline-flex; min-width: 47px; min-height: 24px; padding: 4px 7px; border-radius: 7px; color: var(--ink); background: var(--lime); font-size: 10px; }
.week-event .todo-copy strong { font-size: 14px; }
.week-event .todo-copy small { font-size: 10px; }
.week-day-column .task-source-link { color: var(--lime); font-size: 10px; text-underline-offset: 2px; }
.calendar-panel { background: linear-gradient(150deg, #1a4838, #10392e); }
.calendar-day { transition: background .18s, border-color .18s; }
.calendar-day.selected { background: #335d40; }
.calendar-task-preview span { font-size: 11px; line-height: 1.5; }
.family-dialog {
  max-height: calc(var(--app-viewport-height, 100dvh) - var(--safe-top) - var(--safe-bottom) - 32px);
  width: min(560px, calc(100% - var(--safe-left) - var(--safe-right) - 32px));
  overflow: auto; overscroll-behavior: contain; color: var(--chalk);
  border: 1px solid #5b7d66; border-radius: 24px; background: #143d31;
}
.family-dialog::backdrop { background: #001b14aa; backdrop-filter: blur(5px); }
.family-dialog[open] { animation: sheet-appear .3s var(--ease-out); }
.family-dialog .dialog-heading>button { min-width: 40px; min-height: 40px; }
.family-dialog input, .family-dialog select, .family-dialog textarea { font-size: 16px; }
.family-dialog textarea { width: 100%; padding: 12px; border: 1px solid #527667; border-radius: 10px; color: var(--chalk); background: #0b2e25; line-height: 1.5; resize: vertical; }
.family-dialog .full-button { min-height: 44px; }
.report-range { color: var(--lime); font-size: 12px; font-variant-numeric: tabular-nums; }
.report-status { color: #b9cbbc; font-size: 13px; line-height: 1.7; }
.weekly-report-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-block: 20px; }
.weekly-report-stats article { padding: 16px; border-radius: 14px; }
.weekly-report-stats b { color: var(--chalk); font-size: 15px; }
.weekly-report-stats span { font-size: 12px; }
.weekly-report-summary { padding: 18px; margin-bottom: 20px; border-radius: 14px; background: #0f3228; font-size: 14px; line-height: 1.9; }
.place-help { font-size: 12px; line-height: 1.7; color: #aec3b4; }
.place-preview { padding: 14px; border: 1px solid #819b66; border-radius: 16px; }
.place-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.place-fields input { min-width: 0; }
.places-list { display: grid; gap: 12px; margin-top: 24px; }
.place-card { padding: 16px; border: 1px solid #466852; border-radius: 16px; background: #0e3329; }
.place-card small { color: var(--lime); font-size: 11px; }
.place-card h3 { margin: 8px 0; font-size: 17px; }
.place-card p { color: #c0d0c4; font-size: 13px; line-height: 1.7; white-space: pre-line; overflow-wrap: anywhere; }
.place-card-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.place-card-actions a, .place-card-actions button { min-height: 36px; padding: 9px 12px; border: 0; border-radius: 10px; color: var(--chalk); background: #28594a; font-size: 12px; text-decoration: none; cursor: pointer; }
.place-card-actions .plan-place { color: var(--ink); background: var(--lime); }
.place-empty { padding: 24px 8px; text-align: center; color: #a9bdb0; font-size: 13px; line-height: 1.8; }
@keyframes sheet-appear { from { opacity: 0; transform: translateY(20px) scale(.99); } to { opacity: 1; transform: none; } }

@media (max-width: 900px) {
  html { height: 100%; overflow: hidden; }
  body.app-page { position: fixed; top: var(--app-viewport-top, 0px); left: 0; width: 100%; height: var(--app-viewport-height, 100dvh); min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
  .topbar { position: relative; top: auto; height: calc(52px + var(--safe-top)); min-height: calc(52px + var(--safe-top)); flex: 0 0 auto; padding: var(--safe-top) max(12px, var(--safe-right)) 0 max(12px, var(--safe-left)); }
  .logo { gap: 6px; } .logo strong { font-size: 16px; }
  .top-actions { gap: 4px; } .top-actions button { min-height: 34px; }
  #family-summary, #user-name, #invite-button { display: none !important; }
  .simple-shell { flex: 1 1 0; min-height: 0; width: 100%; height: auto; margin: 0; padding: 0; gap: 0; overflow: hidden; }
  .todo-section { flex: 1 1 0; min-height: 0; padding: 12px max(12px, var(--safe-right)) 8px max(12px, var(--safe-left)); }
  .section-heading { margin: 0 0 8px; min-height: 32px; }
  .section-heading h2 { font-size: 20px; font-weight: 750; }
  .section-actions { flex-wrap: nowrap; gap: 5px; }
  .section-actions .quiet-button { min-height: 32px; padding: 7px 8px; font-size: 10px; }
  #open-count { display: none; }
  .date-navigation { flex: 0 0 auto; margin: 0 0 8px; }
  .date-navigation .eyebrow { display: none; }
  .date-navigation strong { font-size: 18px; }
  .date-navigation-actions button { height: 32px; min-width: 32px; }
  .week-strip { flex: 0 0 auto; gap: 5px; margin: 0 0 9px; overflow: hidden; }
  .week-strip button { width: 100%; height: 65px; min-width: 0; border-radius: 13px; padding: 7px 0; }
  .week-strip button small { font-size: 10px; } .week-strip button b { font-size: 19px; }
  .schedule-toolbar { flex: 0 0 auto; margin-bottom: 7px; }
  .schedule-toolbar>span { font-size: 10px; }
  .schedule-view-switch { margin: 0; } .schedule-view-switch button { min-height: 26px; padding: 4px 12px; font-size: 11px; }
  .member-filter-strip { flex: 0 0 auto; gap: 5px; margin: 0 0 8px; max-height: 72px; overflow-y: auto; }
  .member-filter-strip button { padding: 6px 10px; min-height: 30px; font-size: 10px; }
  .planning-grid { flex: 1 1 0; min-height: 0; }
  .task-panel { border-radius: 18px; padding: 10px; overflow: hidden; }
  .task-panel-heading h3 { font-size: 15px; } .task-panel-heading small { font-size: 9px; }
  .task-panel-heading button { min-height: 32px; padding: 0 8px; font-size: 10px; }
  .task-panel .todo-list { overflow-x: hidden; overflow-y: auto; scrollbar-width: thin; }
  .task-panel .todo-item { padding: 10px 8px; gap: 7px; }
  .task-panel .todo-copy strong, .hour-event .todo-copy strong, .week-event .todo-copy strong { font-size: 13px; }
  .task-panel .todo-copy small { font-size: 10px; }
  .task-panel .edit-todo { display: none; }
  .task-panel .todo-copy>.todo-title-row { cursor: pointer; }
  .task-panel .icon-button { min-width: 26px; min-height: 32px; }
  .task-panel .add-subtask { width: auto; padding: 5px 8px; min-height: 27px; }
  .hour-row { grid-template-columns: 42px minmax(0, 1fr); }
  .hour-row>time { padding-right: 5px; font-size: 10px; }
  .day-schedule { padding: 0 5px 8px; }
  .capture-section, .capture-section.is-input-focused { flex: 0 0 auto; max-height: 55%; overflow: auto; padding: 8px max(10px, var(--safe-right)) calc(8px + var(--safe-bottom)) max(10px, var(--safe-left)); }
  .capture-box { padding: 8px; border-radius: 18px; }
  .composer-label { padding-bottom: 5px; }
  .capture-box textarea, .capture-section.is-input-focused .capture-box textarea { height: 64px; min-height: 64px; max-height: 152px; padding: 8px 10px; font-size: 16px; line-height: 1.5; }
  .capture-actions { padding-top: 5px; gap: 8px; }
  .capture-actions .quiet-button, .capture-actions .primary-button { min-height: 40px; font-size: 12px; padding: 8px 12px; }
  .capture-status { font-size: 10px; margin-top: 5px; }
  .is-input-focused #keyboard-done { display: block; }
  .calendar-panel { inset: calc(var(--safe-top) + 60px) max(10px, var(--safe-right)) calc(var(--safe-bottom) + 10px) max(10px, var(--safe-left)); }
  .calendar-day { min-height: 58px; }
  .family-dialog { margin: auto; padding: 20px; border-radius: 24px; }
  .family-dialog .setting-field>span { font-size: 13px; }
  .weekly-report-summary { font-size: 13px; }
  .toast { bottom: calc(var(--safe-bottom) + 190px); max-width: calc(100% - 32px); width: max-content; font-size: 12px; z-index: 100; }
  .keyboard-open .capture-section { padding-bottom: 8px; max-height: 62%; }
  .keyboard-open .capture-status, .keyboard-open .section-heading, .keyboard-open .date-navigation, .keyboard-open .schedule-toolbar, .keyboard-open .member-filter-strip, .keyboard-open .suggestion-panel { display: none; }
  .keyboard-open .todo-section { padding-top: 5px; }
  .keyboard-open .week-strip button { height: 45px; padding: 4px 0; }
  .keyboard-open .week-strip button b { font-size: 15px; margin-top: 1px; }
  .keyboard-open .day-event-count { display: none; }
}
@media (max-width: 359px) { .top-actions button { padding-inline: 7px !important; font-size: 9px !important; } .section-actions .quiet-button { padding-inline: 6px; font-size: 9px; } .schedule-toolbar>span { display: none; } }
@media (max-width: 900px) and (max-height: 550px) {
  .todo-section { padding-top: 5px; } .section-heading, .schedule-toolbar>span, .date-navigation .eyebrow { display: none; }
  .week-strip button { height: 46px; padding-block: 3px; } .week-strip button b { font-size: 15px; } .week-strip .day-event-count { width: 14px; height: 14px; margin-top: 1px; font-size: 8px; }
  .capture-status, .composer-label { display: none; } .capture-section { max-height: 50%; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

/* Sky-and-rainbow refresh: clear contrast, weekday accents, and compact mobile helpers. */
:root { --board:#e8f6ff; --panel:#ffffff; --panel-deep:#f4fbff; --line:#b7d3e4; --chalk:#142f43; --muted:#4e6a7d; --lime:#176c98; --ink:#ffffff; --paper:#dff3ff; --danger:#b42318; }
html, body { background:#e8f6ff; color:#142f43; }
.app-page { background-image:radial-gradient(ellipse at 12% 0%,#ffffff 0,transparent 34%),linear-gradient(160deg,#d7f0ff 0%,#f3faff 48%,#e4f3ff 100%); background-size:auto; }
.topbar { border-bottom:1px solid #b6d1e1; background:rgba(244,251,255,.92); box-shadow:0 3px 14px #34566b0c; }
.logo,.logo strong { color:#16374e; }.logo-mark { color:#fff; background:#176c98; box-shadow:none; }
.top-actions>span { color:#49677b; }.quiet-button,.top-actions .quiet-button { color:#164361; background:#e2f3fc; border:1px solid #b7d3e4; }
.install-button { color:#fff; background:#176c98; }.kakao-button { color:#33240a; background:#fee500; }
.simple-shell { color:#142f43; }
.capture-box,.task-panel,.calendar-panel { border-color:#b8d4e5; background:#fff; box-shadow:0 10px 28px #31566e14; }
.capture-box textarea,.family-dialog textarea,.family-dialog input,.family-dialog select { color:#142f43; border-color:#b7d3e4; background:#f4fbff; }
.capture-box textarea::placeholder { color:#6b879a; }
.composer-label label,.section-heading h2,.task-panel-heading h3,.calendar-heading h3,.todo-title-row strong,.task-panel .todo-copy strong,.hour-event .todo-copy strong,.week-event .todo-copy strong { color:#142f43; }
.eyebrow,.calendar-heading small,.task-panel-heading small { color:#176c98; }
.section-heading>span,#open-count { color:#17415b; background:#dff2fd; }
.capture-status,.schedule-toolbar>span,.task-panel .todo-copy small,.task-panel .schedule-meta,.week-day-column .todo-copy .schedule-meta { color:#506d81; }
.date-navigation strong { color:#17384f; }.date-navigation-actions button,.calendar-actions button,.task-panel-heading button { color:#164361; border-color:#b7d3e4; background:#fff; }
.schedule-view-switch { border-color:#b7d3e4; background:#f3f9fc; }.schedule-view-switch button { color:#456378; }.schedule-view-switch button.selected { color:#fff; background:#176c98; }
.member-filter-strip button { color:#33566d; border-color:#b7d3e4; background:#fff; }.member-filter-strip button.selected { color:#fff; border-color:#176c98; background:#176c98; }
.planning-grid .todo-list { background:#f7fbfe; border:1px solid #d0e1ec; }
.todo-group>h4 { color:#176c98; border-color:#d7e7f0; }.todo-group+.todo-group { border-color:#c8dce8; }
.todo-item { color:#142f43; border-color:#d9e7ef; background:#fff; }.todo-item.done>.todo-copy>.todo-title-row,.todo-item.done>.todo-copy>small { opacity:.48; }
.todo-time-badge { color:#fff; background:#176c98; }.todo-time-badge.all-day { color:#33566d; background:#e7f1f7; }
.subtask-item,.day-all-day,.day-all-day>.todo-item,.week-day-column,.week-day-column .day-all-day,.week-day-column .day-all-day>.todo-item { border-color:#d1e3ed; background:#f6fbfe; }
.subtask-copy,.subtask-copy b { color:#183a51; }.subtask-copy small,.subtask-item .subtask-copy small { color:#58758a!important; }.add-subtask { color:#17618a; border-color:#8db8d0; background:#edf8fe; }
.calendar-weekdays span { color:#3d657d; }.calendar-weekdays span:first-child { color:#b42336; }.calendar-weekdays span:last-child { color:#514ca3; }
.calendar-day { color:#193c53; border-color:#d0e1ec; background:#fff; }.calendar-day:hover { background:#edf8ff; }.calendar-day.today { box-shadow:inset 0 0 0 2px #176c98; }.calendar-day.today b { color:#176c98; }.calendar-day em { color:#fff; background:#176c98; }
.calendar-day.selected { color:#153a53; border-color:#176c98; background:#e5f5fd; }.calendar-task-preview span { color:#34576d; background:#e7f3f9; }
.week-strip { overflow-x:auto; scrollbar-width:none; }.week-strip::-webkit-scrollbar { display:none; }
.week-strip button { --day-accent:#c0393d; color:#294b61; border-color:#d0e1ec; border-bottom:3px solid var(--day-accent); background:#fff; }
.week-strip button:nth-child(1) { --day-accent:#c0393d; }.week-strip button:nth-child(2) { --day-accent:#c75c25; }.week-strip button:nth-child(3) { --day-accent:#a77808; }.week-strip button:nth-child(4) { --day-accent:#27834d; }.week-strip button:nth-child(5) { --day-accent:#1e70ae; }.week-strip button:nth-child(6) { --day-accent:#5352a9; }.week-strip button:nth-child(7) { --day-accent:#82469b; }
.week-strip button small { color:var(--day-accent); font-weight:850; }.week-strip button.today { box-shadow:inset 0 0 0 2px #173f57; }.week-strip button.today b { color:#173f57; }
.week-strip button.selected { border-color:var(--day-accent); color:#15364b; background:#f3faff; box-shadow:inset 0 0 0 2px var(--day-accent); }.week-strip button.selected b { color:#15364b; }
.week-strip button .day-event-count:not(:empty) { color:#fff; background:var(--day-accent); }.week-strip button.selected .day-event-count:not(:empty) { color:#fff; background:#173f57; }
.week-day-column { --day-accent:#c0393d; border-color:#d0e1ec; background:#fff; }.week-day-column:nth-child(1) { --day-accent:#c0393d; }.week-day-column:nth-child(2) { --day-accent:#c75c25; }.week-day-column:nth-child(3) { --day-accent:#a77808; }.week-day-column:nth-child(4) { --day-accent:#27834d; }.week-day-column:nth-child(5) { --day-accent:#1e70ae; }.week-day-column:nth-child(6) { --day-accent:#5352a9; }.week-day-column:nth-child(7) { --day-accent:#82469b; }
.week-day-column>header { color:#193b52; border-color:#d7e6ef; background:#f8fcff; }.week-day-column>header b { color:var(--day-accent); }.week-day-column.is-today { border-color:#176c98; }.week-day-column.is-today .week-day-heading>b { color:#176c98; }
.week-day-column.has-events .week-day-count { color:#194866; border-color:#c1d9e7; background:#eef8fd; }.week-day-column.is-empty { border-color:#d9e7ef; background:#f6fbfe; }.week-day-column.is-empty>header { background:transparent; }.week-day-column.is-empty .week-day-heading b,.week-day-column.is-empty .week-day-count { color:#58758a; }
.week-day-column .day-all-day>small { color:var(--day-accent); }.week-event { border-color:#d0e2ed; border-left-color:var(--day-accent); background:#f5fbff; }.week-event:hover { border-color:var(--day-accent); background:#eaf7ff; }
.week-event .todo-time-badge { color:#fff; background:var(--day-accent); }.week-today-tag { color:#fff; background:#176c98; }
.day-schedule-heading { background:#f6fbfe; }.day-schedule-heading span,.day-all-day>strong,.day-all-day>small { color:#176c98; }.day-all-day { border-color:#d5e6ef; background:#f6fbfe; }.day-all-day>.todo-item { background:#fff; }
.hourly-timeline,.hour-row { border-color:#d8e7ef; }.hour-row>time { color:#43657b; }.hour-row>div { border-color:#b5cedd; }.hour-event .todo-item { border-color:#d3e4ee; background:#f3faff; }.hour-event .todo-item { border-left-color:#176c98; }
.empty-hours { border-color:#d5e5ee; background:#f9fcfe; }.empty-hours summary,.no-timed-events,.slot-empty { color:#5a7588; }.empty-hour-list span { color:#34576d; background:#e8f4fa; }
.overdue-summary,.overdue-badge { color:#8b1f18; border-color:#e8aaa0; background:#fff0ed; }.overdue-backlog { color:#6d211d; border-color:#e5aaa0; background:#fff2ef; }.overdue-backlog>header,.overdue-backlog>header span { color:#8b1f18; }.overdue-backlog .todo-item { border-color:#f0d0cb; background:#fff8f6; }
.task-source-link { color:#fff!important; border-color:#176c98; background:#176c98; box-shadow:0 4px 12px #176c9822; }.task-source-link:hover { background:#0e5a83; }
.family-dialog { color:#142f43; border-color:#b2d1e2; background:#fafdff; box-shadow:0 18px 60px #173c5429; }.family-dialog::backdrop { background:#18364b70; }.family-dialog .dialog-heading h2,.family-dialog .setting-field>span { color:#193a50; }.family-dialog .dialog-heading>button { color:#294d64; border:1px solid #c5dae7; border-radius:10px; background:#edf7fc; }
.family-dialog .welcome-copy,.welcome-steps p,.report-status,.place-help { color:#456276; }.family-dialog .setting-field>span small,.setting-field>span small { color:#5e7889; }.family-dialog .primary-button,.save-button { color:#fff; background:#176c98; }.family-dialog .quiet-button { color:#164361; background:#e2f3fc; }
.weekly-report-summary,.weekly-report-stats article,.place-card,.recurring-rule-row,.member-row { color:#17374c; border-color:#d1e3ed; background:#f1f8fc; }.weekly-report-summary,.place-card p,.weekly-report-stats b,.weekly-report-stats span,.place-card h3,.recurring-rule-row strong { color:#17374c; }.place-card small,.recurring-rule-row b { color:#176c98; }.place-card-actions a,.place-card-actions button { color:#164361; background:#e2f3fc; }.place-card-actions .plan-place { color:#fff; background:#176c98; }.place-empty { color:#4f6b7f; }
.weather-assistant { min-height:60px; display:flex; align-items:center; gap:11px; margin:0 0 10px; padding:9px 12px; border:1px solid #b9d7e8; border-radius:16px; color:#16374e; background:linear-gradient(110deg,#fff 0%,#eef9ff 68%,#e1f4ff 100%); box-shadow:0 5px 16px #28618810; }
.weather-icon { width:34px; height:34px; flex:0 0 auto; display:grid; place-items:center; border-radius:12px; background:#d9f0fc; font-size:21px; }.weather-copy { min-width:0; display:grid; flex:1; gap:2px; }.weather-copy strong { color:#165879; font-size:11px; }.weather-copy span { overflow:hidden; color:#17384e; font-size:12px; font-weight:850; text-overflow:ellipsis; white-space:nowrap; }.weather-copy small { color:#557286; font-size:9px; line-height:1.3; }
.weather-assistant button { min-height:34px; flex:0 0 auto; padding:0 10px; border:1px solid #b7d3e4; border-radius:10px; color:#164361; background:#fff; font-size:10px; font-weight:900; cursor:pointer; }.weather-assistant button:last-child { color:#fff; border-color:#176c98; background:#176c98; }
.schedule-chat-dialog { display:none; flex-direction:column; width:min(560px,calc(100% - 24px)); height:min(740px,calc(var(--app-viewport-height,100dvh) - 24px)); max-height:calc(var(--app-viewport-height,100dvh) - var(--safe-top) - var(--safe-bottom) - 24px); }.schedule-chat-dialog[open] { display:flex; }.chat-privacy-note { margin:2px 0 12px; color:#587286; font-size:11px; line-height:1.5; }.schedule-chat-messages { min-height:180px; flex:1; display:flex; flex-direction:column; gap:10px; padding:10px; overflow-y:auto; border:1px solid #d7e7f0; border-radius:16px; background:#f0f8fd; overscroll-behavior:contain; }.chat-message { width:fit-content; max-width:92%; padding:10px 12px; border:1px solid #d2e4ef; border-radius:14px; color:#18394f; background:#fff; box-shadow:0 3px 8px #23485b0c; }.chat-message.from-user { align-self:flex-end; color:#fff; border-color:#176c98; background:#176c98; }.chat-message>small { display:block; margin-bottom:3px; color:#4e7187; font-size:9px; font-weight:900; }.chat-message.from-user>small { color:#def3ff; }.chat-message p { margin:0; font-size:13px; line-height:1.55; overflow-wrap:anywhere; }.chat-action-card { display:grid; gap:5px; margin-top:9px; padding:10px; border:1px solid #b8d8e8; border-radius:12px; color:#18394f; background:#eef9ff; }.chat-action-card strong { color:#17618a; font-size:11px; }.chat-action-card span { font-size:12px; font-weight:850; }.chat-action-card small { color:#557286; font-size:10px; }.chat-action-card button { min-height:36px; margin-top:4px; border:0; border-radius:9px; color:#fff; background:#176c98; font-weight:900; cursor:pointer; }.chat-action-card button:disabled { opacity:.7; }.schedule-chat-form { display:flex; align-items:end; gap:8px; margin-top:10px; }.schedule-chat-form textarea { min-width:0; min-height:50px; max-height:120px; flex:1; resize:vertical; }.schedule-chat-form button { min-height:46px; }.chat-privacy-note { flex:0 0 auto; }.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
body[data-weather="rain"] .weather-assistant { border-color:#8bbbd6; background:linear-gradient(110deg,#f8fcff,#e1f2fb); }
.capture-section.is-input-focused .capture-box,.todo-section .task-panel .todo-list { background-color:#fff; }
.capture-section { color:#16374e; border-color:#c4ddeb; background:#edf8fe; box-shadow:0 -8px 25px #31566e12; }
@media(max-width:900px) {
  .topbar { height:calc(54px + var(--safe-top)); min-height:calc(54px + var(--safe-top)); background:rgba(244,251,255,.96); }
  .simple-shell { height:calc(var(--app-viewport-height,100dvh) - 54px - var(--safe-top)); }
  .todo-section { padding-top:8px; }
  .section-heading { gap:6px; }.section-heading h2 { font-size:19px; }.section-actions { gap:4px; }.section-actions .quiet-button { min-height:32px; padding:6px 8px; color:#164361; border-color:#b7d3e4; background:#fff; font-size:9px; }
  .weather-assistant { min-height:51px; gap:7px; margin-bottom:7px; padding:6px 8px; border-radius:13px; }.weather-icon { width:29px; height:29px; font-size:18px; }.weather-copy { gap:1px; }.weather-copy strong { font-size:9px; }.weather-copy span { font-size:10px; }.weather-copy small { font-size:8px; }.weather-assistant button { min-height:31px; padding-inline:7px; font-size:9px; }
  .week-strip { flex-wrap:nowrap; overflow-x:auto; gap:4px; margin-bottom:6px; }.week-strip button { flex:1 0 39px; min-width:39px; height:48px; padding:4px 3px; border-radius:10px; }.week-strip button small { font-size:8px; }.week-strip button b { margin-top:2px; font-size:12px; }.week-strip button.today { box-shadow:inset 0 0 0 2px #173f57; }.week-strip button.selected { box-shadow:inset 0 0 0 2px var(--day-accent); }
  .date-navigation { margin-bottom:6px; }.schedule-toolbar { margin-bottom:5px; }.member-filter-strip { margin-bottom:6px; }.task-panel { border-radius:15px; }.task-panel .todo-item { border-bottom:1px solid #dce9f0; }.task-panel .todo-copy strong { font-size:13px; }.task-panel .todo-copy small { font-size:10px; }
  .schedule-chat-dialog { width:calc(100% - 18px); height:calc(var(--app-viewport-height,100dvh) - var(--safe-top) - var(--safe-bottom) - 18px); max-height:calc(var(--app-viewport-height,100dvh) - var(--safe-top) - var(--safe-bottom) - 18px); padding:15px; border-radius:20px; }.schedule-chat-messages { min-height:0; }.schedule-chat-form { padding-bottom:var(--safe-bottom); }.schedule-chat-form textarea { min-height:55px; font-size:16px; }.chat-message p { font-size:14px; }
  .family-dialog .setting-field>span { color:#193a50; }
}
@media(max-width:360px) { .weather-assistant { gap:5px; }.weather-assistant button { padding-inline:5px; font-size:8px; }.weather-copy small { display:none; }.section-actions .quiet-button { padding-inline:6px; font-size:8px; } }
@media(prefers-reduced-motion:reduce) { .weather-assistant,.chat-message { transition:none; } }

/* High-contrast chalkboard: the important actions and time horizons should read first. */
html, body { background-color: var(--board); color: var(--chalk); }
.app-page { background-image: radial-gradient(circle at 12% 8%, #dfff7610 0 1px, transparent 1.6px), linear-gradient(145deg, #0b3022 0%, var(--board) 52%, #09281d 100%); background-size: 22px 22px, auto; }
.topbar { border-bottom-color: #86a98a42; background: rgba(7, 31, 23, .96); }
.logo-mark { background: var(--lime); box-shadow: 0 0 0 3px #dfff7620; }
.quiet-button { color: #eff6e7; background: #1d5039; }
.primary-button, .save-button { color: var(--ink); background: var(--lime); box-shadow: 0 5px 18px #dfff7628; }
.capture-box { border-color: #8daf895c; background: linear-gradient(135deg, #124533, #0d3828); }
.capture-box textarea { background: #08271d; }
.capture-box textarea::placeholder { color: #b4c9b6; }
.capture-status, .schedule-toolbar>span { color: #c2d3c4; }
.section-heading { gap: 16px; align-items: center; padding: 9px 0 13px; border-bottom: 1px solid #8daf8933; }
.section-title-stack { min-width: 0; }
.section-title-stack>.eyebrow { margin-bottom: 5px; color: #dfff76; }
.section-title-row { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.section-heading h2 { color: var(--chalk); font-size: clamp(23px, 3vw, 32px); line-height: 1.15; letter-spacing: -1px; }
#open-count { display: inline-flex !important; align-items: center; min-height: 25px; padding: 4px 9px; border: 1px solid #dfff7666; border-radius: 999px; color: var(--lime); background: #dfff7612; font-size: 11px; font-weight: 900; white-space: nowrap; }
.overdue-summary { min-height: 25px; padding: 4px 9px; border: 1px solid #ff9d8670; border-radius: 999px; color: #ffe0d6; background: #6c2e27; font-size: 10px; font-weight: 950; cursor: pointer; }
.section-actions { gap: 7px; }
.section-actions .quiet-button { min-height: 38px; padding: 8px 12px; border: 1px solid #63836e; color: #f5f8ed; background: #174532; font-size: 11px; }
.section-actions #places-button { border-color: var(--lime); color: var(--ink); background: var(--lime); box-shadow: 0 4px 14px #dfff7626; }
.section-actions #recommend-button { border-color: #719078; color: #f5f8ed; background: #174532; }
.section-actions #weekly-report-button { border-color: #719078; color: #e7f0e6; background: #103827; }
.schedule-toolbar { margin: 13px 0 10px; }
.schedule-view-switch { width: min(440px, 100%); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3px; padding: 4px; border: 1px solid #60816a; border-radius: 14px; background: #08291e; }
.schedule-view-switch button { min-height: 40px; border-radius: 10px; color: #c6d6c7; font-size: 13px; font-weight: 850; }
.schedule-view-switch button.selected { color: var(--ink); background: var(--lime); box-shadow: 0 3px 12px #dfff7630; }
.schedule-view-switch button:not(.selected):hover { color: var(--chalk); background: #1d4c36; }
.date-navigation { margin-top: 8px; }
.date-navigation-actions button { border-color: #64836e; color: var(--chalk); background: #123c2b; }
.date-navigation-actions #week-today { border-color: var(--lime); color: var(--lime); }
.week-strip button { border-color: #496f59; color: #d0dfd1; background: #103827; }
.week-strip button.today { box-shadow: inset 0 0 0 2px #dfff76; }
.day-event-count { color: #f2f7ec; }
.week-day .day-event-count:not(:empty) { color: var(--ink); background: var(--lime); }
.week-day.selected .day-event-count:not(:empty) { color: var(--lime); background: var(--ink); }
.member-filter-strip button { border-color: #557966; color: #d2dfd3; background: #103827; }
.planning-grid { gap: 18px; }
.calendar-panel, .task-panel { border-color: #557966; background: linear-gradient(145deg, #12412f, #0c3325); box-shadow: 0 18px 50px #00170e66; }
.task-panel .todo-list { border-color: #547765; background: #082a1e; }
.task-panel .todo-item { border-bottom-color: #79948135; }
.task-panel .todo-copy small, .task-panel .schedule-meta { color: #c0d0c1; }
.task-panel .todo-time-badge { color: var(--ink); background: var(--lime); }
.task-panel .todo-time-badge.all-day { color: #f2f7ec; background: #315f47; }
.task-panel .avatar { color: var(--ink); background: var(--paper); }
.task-panel .edit-todo { border-color: #77937c; color: #f2f7ec; background: #1c4a34; }
.calendar-day { border-color: #527765; color: #eff5e9; background: #0d3425; }
.calendar-day em { color: var(--ink); background: var(--lime); }
.calendar-day.today { box-shadow: inset 0 0 0 2px var(--lime); }
.calendar-day.selected { color: var(--ink); background: #d2ec89; }
.task-source-link { display: inline-flex; align-items: center; justify-content: center; gap: 7px; width: fit-content; max-width: 100%; min-height: 36px; margin-top: 9px; padding: 8px 12px; border: 1px solid #e9ff9b; border-radius: 10px; color: var(--ink) !important; background: var(--lime); box-shadow: 0 4px 12px #dfff7620; font-size: 11px; font-weight: 950; line-height: 1.2; text-decoration: none !important; overflow-wrap: anywhere; }
.task-source-link::after { content: "↗"; flex: 0 0 auto; font-size: 13px; }
.task-source-link:hover { background: #edffab; transform: translateY(-1px); }
.todo-item.overdue { border-left: 3px solid #ff8f78; box-shadow: inset 3px 0 #ff8f78; }
.overdue-badge { border-color: #ff9d8680; color: #ffe0d6; background: #6c2e27; }
.overdue-backlog { display: grid; gap: 7px; margin: 0 0 10px; padding: 11px; border: 1px solid #ff9d865e; border-radius: 14px; background: linear-gradient(110deg, #522d26, #3a2a22); }
.overdue-backlog>header { display: flex; align-items: center; justify-content: space-between; padding: 0 2px 4px; color: #ffe2d6; }
.overdue-backlog>header strong { font-size: 12px; }
.overdue-backlog>header span { color: #ffc1ac; font-size: 10px; font-weight: 900; }
.overdue-backlog .todo-item { padding: 9px 6px; border-top: 1px solid #ffcfbd24; border-bottom: 0; background: #311f1b55; }
.upcoming-groups { display: grid; gap: 10px; padding: 10px; }
.upcoming-date-group { overflow: hidden; border: 1px solid #547765; border-radius: 13px; background: #0d3425; }
.upcoming-date-group>header { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border-bottom: 1px solid #76917e38; color: var(--chalk); background: #164531; }
.upcoming-date-group>header strong { font-size: 12px; }
.upcoming-date-group>header span { color: var(--lime); font-size: 10px; font-weight: 900; }
.upcoming-event .todo-item { padding: 12px; }
.upcoming-empty { padding: 38px 16px; }
.upcoming-empty b { color: var(--chalk); }
.upcoming-empty span { color: #c1d2c3; }

@media (max-width: 900px) {
  .section-heading { gap: 8px; padding: 5px 0 8px; }
  .section-title-stack>.eyebrow { display: none; }
  .section-heading h2 { font-size: 21px; }
  .section-title-row { gap: 5px; }
  #open-count { min-height: 22px; padding: 3px 7px; font-size: 9px; }
  .overdue-summary { min-height: 22px; padding: 3px 7px; font-size: 9px; }
  .section-actions { gap: 4px; }
  .section-actions .quiet-button { min-height: 34px; padding: 6px 8px; font-size: 9px; }
  .schedule-toolbar { margin: 8px 0; }
  .schedule-view-switch { width: 100%; }
  .schedule-view-switch button { min-height: 36px; font-size: 12px; }
  .schedule-toolbar>span { display: none; }
  .upcoming-groups { padding: 6px; }
  .upcoming-event .todo-item { padding: 10px 7px; }
  .task-source-link { min-height: 36px; padding: 8px 11px; font-size: 11px; }
  .overdue-backlog { margin-bottom: 8px; padding: 8px; }
}
@media (max-width: 380px) {
  .section-actions .quiet-button { padding-inline: 6px; font-size: 8px; }
  .section-heading h2 { font-size: 19px; }
  .section-title-row { gap: 4px; }
  #open-count, .overdue-summary { font-size: 8px; padding-inline: 6px; }
}
