:root {
  color-scheme: light;
  font-family: Inter, 'Segoe UI', system-ui, sans-serif;
  color: #243028;
  background: #f4f3ec;
  --paper: #fffcf5;
  --muted: #5c685e;
  --border: #dedfd3;
  --accent: #def49d;
  --danger: #903c32;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
h1, h2, h3, p { margin: 0; }
[hidden] { display: none !important; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
button:disabled { cursor: default; opacity: .55; }
:focus-visible { outline: 2px solid #547e42; outline-offset: 3px; }
.wrap { width: min(100% - 48px, 1120px); margin-inline: auto; }
.header { border-bottom: 1px solid #dedfd3; padding-top: env(safe-area-inset-top); }
.header-content { min-height: 69px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.brand, .header-actions, .people, .capture-actions { display: flex; align-items: center; gap: 10px; }
.brand strong { font-size: 17px; letter-spacing: -.035em; }
.brand-mark { flex: 0 0 36px; width: 36px; height: 36px; position: relative; border-radius: 12px; background: #33473a; }
.brand-mark::before { content: ''; position: absolute; inset: 8px; background: var(--accent); clip-path: polygon(50% 0, 100% 40%, 100% 100%, 0 100%, 0 40%); }
.brand-mark::after { content: ''; position: absolute; top: 17px; left: 15px; width: 6px; height: 11px; border-radius: 2px 2px 0 0; background: #33473a; }
.button { min-height: 41px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 8px 13px; border: 1px solid #d9ded2; border-radius: 10px; color: #2c4936; background: #eff1e6; font-size: 13px; font-weight: 660; }
.button:hover:not(:disabled) { background: #e8edda; }
.primary { background: var(--accent); color: #293b2d; border-color: var(--accent); }
.primary:hover:not(:disabled) { background: #e8f9b8; }
.link-button { justify-self: start; min-height: 36px; padding: 3px 0; border: 0; color: #30573f; background: transparent; text-align: left; font-size: 13px; font-weight: 650; }
.link-button:hover { text-decoration: underline; }
.avatar { min-width: 37px; height: 37px; display: grid; place-items: center; border-radius: 50%; border: 1px solid #b6c8aa; background: #dbe7cf; color: #2c523a; font-size: 13px; font-weight: 720; }
.bell { position: relative; display: inline-block; width: 12px; height: 13px; border: 1.5px solid currentColor; border-radius: 7px 7px 3px 3px; }
.bell::after { content: ''; position: absolute; top: 12px; left: 3px; width: 4px; height: 2px; border-radius: 3px; background: currentColor; }
.badge { min-width: 18px; height: 18px; display: grid; place-items: center; border-radius: 20px; background: #376246; color: white; font-size: 10px; }
main { padding: 37px 0 max(28px, env(safe-area-inset-bottom)); }
.page-status { color: var(--danger); font-size: 13px; margin: 0 0 12px; }
.page-status:empty { display: none; }

.welcome { margin: clamp(12px, 6vh, 70px) auto 0; display: grid; grid-template-columns: 1.25fr minmax(290px, 1fr); max-width: 850px; border: 1px solid var(--border); border-radius: 25px; overflow: clip; background: var(--paper); }
.welcome-intro { display: flex; flex-direction: column; justify-content: center; gap: 16px; padding: clamp(25px, 5vw, 55px); color: #edf3e8; background: radial-gradient(ellipse at 14% 4%, #4c624c, transparent 70%), #2b3a30; }
.welcome-intro h1, .workspace-heading h1 { font-size: clamp(32px, 5vw, 61px); font-weight: 720; letter-spacing: -.061em; line-height: 1.04; }
.welcome-intro p { max-width: 330px; color: #d3e0d4; font-size: 14px; line-height: 1.55; }
.home-art { position: relative; display: flex; align-items: flex-end; justify-content: center; gap: 3px; width: 76px; height: 76px; margin-bottom: 6px; padding-bottom: 20px; border-radius: 21px; border: 1px solid #91a889; background: #5d7856; transform: rotate(-8deg); }
.home-art::before { content: ''; position: absolute; height: 27px; width: 27px; top: 18px; left: 23px; transform: rotate(45deg); border-top: 2px solid #e4f6b3; border-left: 2px solid #e4f6b3; border-radius: 2px; }
.home-art span { width: 4px; height: 9px; border-radius: 5px; background: #e4f6b3; }
.home-art span:nth-child(2) { height: 15px; }
.welcome-form { display: grid; align-content: center; gap: 13px; padding: clamp(24px, 5vw, 49px); }
.welcome-form h2, .dialog-heading h2 { font-size: 24px; letter-spacing: -.045em; }
.welcome-form .primary { margin-top: 4px; }

.workspace-heading { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 13px; margin-bottom: 21px; }
.family-name { color: var(--muted); margin-bottom: 5px; font-size: 13px; font-weight: 650; overflow-wrap: anywhere; }
.avatar-stack { display: flex; padding-left: 5px; }
.avatar-stack .avatar { margin-left: -5px; min-width: 30px; height: 30px; border: 2px solid #f4f3ec; }
.avatar-stack .avatar:nth-child(even), .member-avatar:nth-child(even) { background: #e7e4cc; color: #5e522d; }
.invite-button { background: transparent; }
.capture { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 17px; padding: 21px 24px; margin-bottom: 20px; border-radius: 20px; color: #f2f7ed; background: radial-gradient(ellipse at 15% 0%, #4a624b, transparent 78%), #29382f; box-shadow: 0 8px 18px #29382f20; }
.capture-text { display: flex; align-items: center; gap: 13px; }
.capture h2 { font-size: 22px; letter-spacing: -.04em; }
.capture p { margin-top: 4px; font-size: 12px; line-height: 1.4; color: #d9e6d7; }
.capture-secondary { background: #3a4c3f; border-color: #718271; color: #eff4eb; }
.capture-secondary:hover:not(:disabled) { background: #4c604d; }
.voice-mark { display: flex; align-items: center; justify-content: center; gap: 3px; width: 50px; height: 50px; flex: 0 0 50px; border: 1px solid #829b7c; border-radius: 15px; background: #547052; transform: rotate(-6deg); }
.voice-mark span { width: 3px; height: 9px; border-radius: 5px; background: var(--accent); transform: rotate(6deg); }
.voice-mark span:nth-child(2), .voice-mark span:nth-child(4) { height: 16px; }
.voice-mark span:nth-child(3) { height: 22px; }
.mic { position: relative; display: inline-block; width: 14px; height: 13px; border: 1.5px solid currentColor; border-top: 0; border-radius: 0 0 7px 7px; }
.mic::before { content: ''; position: absolute; left: 3px; top: -4px; width: 4px; height: 12px; border: 1px solid currentColor; border-radius: 5px; }
.mic::after { content: ''; position: absolute; left: 5px; top: 11px; width: 2px; height: 4px; background: currentColor; }

.calendar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 15px; margin-bottom: 14px; border: 1px solid var(--border); border-radius: 15px; background: var(--paper); }
.calendar-heading h2 { font-size: 15px; letter-spacing: -.025em; }
.calendar-heading p { margin-top: 3px; color: var(--muted); font-size: 12px; }
.calendar-controls, .calendar-quick, .calendar-day { display: flex; align-items: center; gap: 6px; }
.calendar-controls { flex-wrap: wrap; }
.calendar .button { min-height: 38px; padding: 5px 9px; background: transparent; }
.calendar .button[aria-pressed="true"] { background: #e6efd8; border-color: #c8d7ba; }
.calendar .calendar-step { width: 32px; padding: 0; font-size: 20px; }
.calendar :is(input, select) { min-width: 0; min-height: 38px; padding: 5px 8px; border: 1px solid #d9ded2; border-radius: 9px; color: #2c4936; background: #fffef9; font-size: 13px; }
.calendar select { max-width: 200px; }
.board { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; align-items: start; }
.column { min-width: 0; min-height: 285px; padding: 16px; background: var(--paper); border: 1px solid var(--border); border-radius: 19px; }
.done-column { background: #eef0e6; }
.column-header { display: flex; align-items: center; gap: 9px; margin-bottom: 13px; }
.column-header h2 { font-size: 18px; letter-spacing: -.035em; }
.column-icon { width: 27px; height: 27px; flex: 0 0 27px; display: grid; place-items: center; border-radius: 8px; color: #3d5e42; background: #e8eddc; font-size: 16px; }
.count { margin-left: auto; padding: 3px 7px; border-radius: 14px; color: #577052; background: #e7eddf; font-size: 12px; font-weight: 670; }
.task-list { display: grid; gap: 8px; }
.empty { text-align: center; padding: 56px 12px 45px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.task { display: flex; align-items: flex-start; gap: 10px; padding: 10px; border: 1px solid #e2e3d7; border-radius: 12px; background: #fffdf8; }
.done-column .task { background: #f9faf2; }
.task-toggle { min-width: 29px; height: 29px; border: 1px solid #a3b29c; border-radius: 8px; color: #315d3e; background: #f1f4ea; font-weight: 740; }
.task-toggle:hover { background: #e4eece; }
.task-toggle[aria-pressed="true"] { background: #dae9c8; }
.task-main { width: 100%; min-width: 0; padding: 2px 0 0; border: 0; color: inherit; background: transparent; text-align: left; }
.task-title { display: block; font-size: 14px; font-weight: 690; line-height: 1.4; overflow-wrap: anywhere; }
.task-main:hover .task-title { text-decoration: underline; }
.task-meta { display: flex; flex-wrap: wrap; gap: 3px 8px; margin-top: 4px; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.task-meta .overdue { color: var(--danger); }

dialog { width: min(460px, calc(100% - 26px)); max-height: calc(100dvh - 24px); overflow: auto; padding: 19px; border: 1px solid var(--border); border-radius: 20px; background: var(--paper); color: inherit; }
dialog::backdrop { background: #1c2b207d; }
.dialog-form { display: grid; gap: 13px; }
.dialog-heading, .dialog-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.dialog-actions { justify-content: flex-end; }
.task-actions { flex-wrap: wrap; }
.task-actions:has(#complete-task:not([hidden])) { justify-content: space-between; }
.close { width: 36px; height: 36px; flex: 0 0 36px; border: 0; border-radius: 9px; background: #e9ede2; color: #4c594d; font-size: 21px; }
label { display: grid; gap: 5px; min-width: 0; color: #455745; font-size: 13px; font-weight: 640; }
label :is(input, textarea, select) { width: 100%; min-width: 0; min-height: 39px; padding: 8px; border: 1px solid #d2d9ca; border-radius: 8px; color: #263529; background: #fffef9; font-weight: 400; }
label textarea { resize: vertical; }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.quick-deadline { min-height: 32px; margin-top: -7px; }
.note, .voice-status, #transcript { color: var(--muted); font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.voice-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.voice-controls .recording { color: #6d3126; background: #f8ddcd; border-color: #efba9f; }
.form-status { color: var(--danger); font-size: 12px; }
.form-status:empty, .voice-status:empty { display: none; }
summary { cursor: pointer; color: #31543a; font-size: 12px; }
#transcript { margin-top: 4px; white-space: pre-wrap; }
.setting { display: grid; gap: 5px; justify-items: start; padding: 12px 0; border-top: 1px solid var(--border); }
.setting h3 { font-size: 14px; }
.member-list { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.member { display: flex; align-items: center; gap: 4px; padding: 3px 8px 3px 4px; border-radius: 20px; background: #eef1e6; color: #435845; font-size: 12px; }
.member .avatar { min-width: 23px; height: 23px; font-size: 11px; }
.notices-list { display: grid; gap: 6px; max-height: min(48vh, 390px); overflow: auto; }
.notice { width: 100%; padding: 9px; border: 1px solid var(--border); border-radius: 8px; background: #fbfaf1; color: inherit; text-align: left; }
.notice.unread { background: #edf3e1; }
.notice strong, .notice small { display: block; overflow-wrap: anywhere; }
.notice strong { margin-top: 2px; font-size: 13px; }
.notice small { color: var(--muted); font-size: 11px; }
.notice-actions { justify-content: space-between; flex-wrap: wrap; }

@media (max-width: 670px) {
  .wrap { width: calc(100% - 28px); }
  .header-content { min-height: 58px; }
  main { padding-top: 23px; }
  .welcome { margin-top: 0; grid-template-columns: minmax(0, 1fr); }
  .welcome-intro { padding: 23px; gap: 11px; }
  .home-art { width: 58px; height: 58px; border-radius: 15px; padding-bottom: 12px; }
  .home-art::before { width: 22px; height: 22px; top: 12px; left: 17px; }
  .welcome-form { padding: 21px; }
  .capture { padding: 14px; gap: 12px; }
  .capture-actions { width: 100%; }
  .capture-actions .button { flex: 1; min-height: 44px; }
  .calendar { align-items: stretch; padding: 10px; gap: 8px; }
  .calendar-controls { width: 100%; justify-content: space-between; }
  .calendar select { width: 100%; max-width: none; }
  .calendar :is(input, select) { font-size: 16px; }
  .board { grid-template-columns: minmax(0, 1fr); gap: 11px; }
  .column { min-height: 144px; padding: 12px; }
  .empty { padding: 22px 9px; }
  label :is(input, textarea, select) { font-size: 16px; }
}

@media (max-width: 370px) {
  .notice-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .header-actions { gap: 6px; }
  .capture h2 { font-size: 20px; }
  .calendar-controls > * { max-width: 100%; }
}
