:root {
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic UI", "Meiryo", system-ui, sans-serif;
  color: #1a352a;
  background: #f4f6ef;
  color-scheme: light;
  --green: #184b36;
  --deep: #12382b;
  --muted: #506758;
  --line: #dde5d9;
  --paper: #fff;
  --base: #f4f6ef;
  --nav: 65px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; color: inherit; }
button, input, textarea, select { -webkit-tap-highlight-color: transparent; }
button:focus-visible, summary:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, .file:focus-within { outline: 3px solid #3c8862; outline-offset: 2px; }
button { touch-action: manipulation; }
.frame { width: min(100% - 32px, 620px); margin-inline: auto; }
.mast { background: var(--deep); color: #fff; padding-top: env(safe-area-inset-top); }
.mast-inner { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.brand { font-size: 17px; font-weight: 750; display: flex; align-items: center; gap: 9px; }
.brand img { display: block; border-radius: 12px; }
#today-label { color: #d4e5d6; font-size: 13px; white-space: nowrap; }
main { padding: 26px 0 calc(var(--nav) + 92px + env(safe-area-inset-bottom)); }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(26px, 6vw, 34px); letter-spacing: .04em; line-height: 1.3; }
h1:focus { outline: none; }
h2 { font-size: 17px; }
h3 { font-size: 15px; }
p { line-height: 1.6; }
.page-title { margin-bottom: 19px; }
.page-title p { margin-top: 4px; color: var(--muted); font-size: 14px; }
.progress-card { color: white; background: linear-gradient(115deg, #163d2e, #21513b); border-radius: 22px; padding: 17px 19px; box-shadow: 0 5px 14px #163c291a; }
.progress-top { display: flex; align-items: end; justify-content: space-between; gap: 12px; }
.progress-label { font-size: 13px; font-weight: 700; color: #e0f0e4; }
.percent { font-size: 46px; line-height: 1.12; font-weight: 760; font-variant-numeric: tabular-nums; letter-spacing: -.04em; }
.percent span { font-size: 20px; margin-left: 3px; }
.count { margin-bottom: 5px; font-size: 14px; white-space: nowrap; color: #d7ebdc; }
.count strong { color: white; font-size: 22px; }
progress { display: block; margin: 12px 0 8px; border: 0; appearance: none; width: 100%; height: 8px; border-radius: 10px; overflow: hidden; background: #ffffff34; }
progress::-webkit-progress-bar { background: #ffffff00; }
progress::-webkit-progress-value { background: #b5e69e; border-radius: 10px; transition: width .2s; }
progress::-moz-progress-bar { background: #b5e69e; }
.remaining { font-size: 13px; color: #e1efe4; }
.remaining span, .dot { margin-inline: 7px; color: #758b7b; }
.remaining span { color: #c1d9c9; }
.section-head { display: flex; justify-content: space-between; align-items: center; min-height: 36px; gap: 8px; margin: 16px 0 6px; }
.section-head > span { color: var(--muted); font-size: 13px; }
.filters, .actions { display: flex; flex-wrap: wrap; gap: 7px; }
.filters { margin-bottom: 12px; }
.pill, .quiet, .primary, .danger, .more, .file, .pill-like { min-height: 44px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); padding: 5px 10px; font-size: 13px; font-weight: 700; }
.pill { border-radius: 30px; min-width: 64px; }
.pill[aria-pressed="true"], .week button[aria-pressed="true"] { color: var(--deep); background: #dcebdd; border-color: #b1cdb5; }
.primary { background: var(--green); color: white; border-color: var(--green); padding-inline: 14px; }
.danger { color: #963f33; }
.task-list { display: grid; gap: 9px; }
.task { display: flex; align-items: center; gap: 9px; min-height: 82px; padding: 9px 10px; border-radius: 15px; border: 1px solid var(--line); background: var(--paper); }
.check { flex: 0 0 44px; width: 44px; height: 44px; border: 2px solid #bfd1c1; border-radius: 50%; color: var(--green); background: #eff6ee; font-size: 23px; font-weight: 700; }
.check:hover, .check:active { color: white; border-color: var(--green); background: var(--green); }
.task-copy { flex: 1; min-width: 0; text-align: left; display: grid; gap: 4px; align-self: stretch; align-content: center; border: 0; background: transparent; padding: 2px 0; }
.task-title, .stock-row strong, .history-row strong, .shopping-row strong { font-size: 15px; font-weight: 730; overflow-wrap: anywhere; }
.task-meta, .muted, .stock-row p, .shopping-row p, .history-row p { font-size: 13px; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 4px; }
.chip { display: inline-block; width: max-content; border-radius: 6px; background: #ecf2eb; color: #375849; padding: 3px 6px; font-size: 11px; font-weight: 690; line-height: 1.2; white-space: nowrap; }
.chip.high { background: #f8e9df; color: #83442b; }
.chip.warm { background: #f7efdc; color: #694b1e; }
.more { flex: 0 0 44px; font-size: 23px; border-color: transparent; color: var(--muted); }
.empty { padding: 17px 14px; color: var(--muted); border: 1px dashed #c7d5c8; border-radius: 14px; background: #ffffff80; font-size: 14px; }
.acted { margin-top: 13px; }
.nav { position: fixed; inset: auto 0 0; z-index: 2; background: #fff; border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.nav-inner { display: grid; grid-template-columns: repeat(4, 1fr); height: var(--nav); }
.nav button { display: grid; align-content: center; justify-items: center; gap: 3px; border: 0; background: transparent; font-size: 11px; color: var(--muted); font-weight: 700; padding: 4px 0; }
.nav button span { display: grid; place-items: center; height: 27px; width: 43px; border-radius: 20px; font-size: 20px; line-height: 1; }
.nav button[aria-current] { color: var(--deep); }
.nav button[aria-current] span { background: #e0eee1; }
.fab { position: fixed; right: max(16px, calc((100% - 620px)/2)); bottom: calc(var(--nav) + 13px + env(safe-area-inset-bottom)); z-index: 1; min-height: 49px; border: 0; padding: 0 15px; border-radius: 30px; background: var(--green); color: #fff; box-shadow: 0 5px 15px #122e2452; font-weight: 700; font-size: 14px; }
.fab span { font-size: 17px; vertical-align: -1px; }
.panel { border: 1px solid var(--line); border-radius: 16px; background: var(--paper); padding: 14px; margin-bottom: 11px; }
.panel > .section-head { margin-top: 0; }
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.week button { display: grid; gap: 3px; justify-items: center; border: 1px solid transparent; border-radius: 10px; background: var(--base); padding: 7px 1px; min-height: 48px; font-size: 12px; }
.week strong { font-size: 16px; }
.date-pick, .filter-label { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 13px; color: var(--muted); }
.filter-label { margin: 0 0 12px; }
input, select, textarea { border-radius: 9px; border: 1px solid #cad8cb; min-height: 44px; padding: 6px 8px; background: #fff; color: #1a352a; min-width: 0; font-size: 16px; }
input[type="checkbox"] { accent-color: var(--green); width: 18px; height: 18px; min-height: 0; margin: 0; flex: 0 0 auto; }
.stock-row, .shopping-row, .history-row, .reminder-row { display: flex; align-items: center; justify-content: space-between; gap: 9px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.stock-row:last-child, .shopping-row:last-child, .history-row:last-child { border-bottom: 0; padding-bottom: 0; }
.stock-row > div, .shopping-row > div, .history-row > div { flex: 1; min-width: 0; }
.stock-row .quiet, .shopping-row .quiet { flex-shrink: 0; }
.stock-group h3 { margin-bottom: 5px; }
.settings h2, summary { margin-bottom: 7px; }
.settings .actions, .settings .primary { margin-top: 9px; }
summary { cursor: pointer; font-weight: 730; min-height: 28px; }
.reminder-row label { display: flex; align-items: center; gap: 7px; min-height: 44px; font-size: 13px; }
.file { display: inline-flex; align-items: center; cursor: pointer; position: relative; }
.file input { opacity: 0; position: absolute; inset: 0; width: 100%; padding: 0; cursor: pointer; }
dialog { color: inherit; background: var(--base); border: 1px solid var(--line); padding: 0; border-radius: 20px; width: min(100% - 24px, 530px); max-height: min(88dvh, 720px); }
dialog::backdrop { background: #10251dc0; }
#editor { padding: 15px 17px max(16px, env(safe-area-inset-bottom)); display: grid; gap: 11px; }
.dialog-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.dialog-head h2 { font-size: 20px; overflow-wrap: anywhere; }
#editor label { display: grid; gap: 4px; min-width: 0; font-weight: 670; font-size: 13px; }
#editor .columns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
#editor .columns input { width: 100%; }
#editor fieldset { border: 1px solid var(--line); border-radius: 10px; margin: 0; padding: 5px; font-size: 13px; }
#editor .checkdays label { justify-items: center; align-content: center; min-height: 44px; }
#editor .note { white-space: pre-wrap; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 9px; overflow-wrap: anywhere; }
dl { display: grid; grid-template-columns: 90px 1fr; gap: 5px; margin: 0; font-size: 14px; }
dd { margin: 0; }
dt { color: var(--muted); }
.error { color: #80372e; background: #f9e9e3; padding: 8px; border-radius: 8px; font-size: 13px; }
.toast { position: fixed; bottom: calc(var(--nav) + 72px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); z-index: 3; width: max-content; max-width: calc(100% - 34px); padding: 8px 12px; border-radius: 11px; background: var(--deep); color: white; box-shadow: 0 5px 18px #10291d45; font-size: 14px; }
.toast button { background: transparent; border: 1px solid #adcbb4; border-radius: 8px; min-height: 42px; margin-left: 4px; color: #fff; }
@media (max-width: 350px) { .pill { min-width: 58px; padding-inline: 6px; } .frame { width: calc(100% - 22px); } .chip { white-space: normal; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }
