:root {
  color-scheme: light;
  font-family: "Yu Gothic UI", "Hiragino Sans", "Noto Sans JP", sans-serif;
  color: #405D47;
  background: #F7F5EF;
  --line: #E7E8DF;
  --paper: #FFFFFF;
  --sage: #DDE8D9;
  --beige: #EADCCB;
  --green: #405D47;
  --muted: #56675A;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; }
main { width: min(880px, 100%); margin: auto; padding: 55px 28px 32px; }
header, .heading, .toolbar, .task, .actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
header { margin-bottom: 26px; }
header p { margin: 7px 0 0; color: var(--muted); }
h1, h2, p { margin: 0; }
h1 { display: flex; align-items: center; gap: .28em; font-size: clamp(2rem, 6vw, 3.15rem); font-weight: 750; letter-spacing: -.055em; }
.title-icon {
  display: grid;
  place-items: center;
  flex: 0 0 .72em;
  height: .72em;
  border-radius: .18em;
  background: var(--sage);
}
.title-icon::before {
  content: "";
  width: .16em;
  height: .30em;
  border: solid var(--green);
  border-width: 0 .055em .055em 0;
  transform: translateY(-.04em) rotate(45deg);
}
h2 { font-size: 1.25rem; }
.panel, dialog { padding: 25px; background: var(--paper); border: 1px solid var(--line); border-radius: 22px; box-shadow: 0 12px 35px #2e52350a; }
#login { max-width: 420px; }
#login form { display: grid; gap: 14px; margin-top: 16px; }
.toolbar { flex-wrap: wrap; margin: 23px 0 10px; }
.tabs, .filters, .task-actions, footer { display: flex; flex-wrap: wrap; gap: 7px; }
.tabs { border-radius: 14px; padding: 4px; background: var(--line); }
.tabs button { border: 0; background: transparent; }
.tabs [aria-pressed=true] { color: var(--green); background: var(--paper); box-shadow: 0 2px 6px #405d471a; }
button, select, input, textarea { font: inherit; color: inherit; min-height: 44px; }
button, select, input:not([type=file]), textarea { border: 1px solid var(--line); border-radius: 11px; background: var(--paper); padding: 8px 12px; }
button { cursor: pointer; font-weight: 650; }
button:disabled { opacity: .65; cursor: wait; }
.quiet { background: transparent; }
.primary { color: var(--green); background: var(--sage); border-color: #bacbb7; }
.primary:hover { background: #d2e0ce; }
:focus-visible { outline: 3px solid #72977c; outline-offset: 2px; }
ul { padding: 0; margin: 0; list-style: none; }
.task { border-top: 1px solid var(--line); padding: 13px 0; }
.task-main { display: flex; align-items: center; gap: 12px; min-width: 0; }
.task-title { overflow-wrap: anywhere; font-weight: 700; }
.task-memo { margin-top: 6px; color: var(--muted); font-size: .86rem; }
.task-memo summary { width: fit-content; padding: 5px 0; cursor: pointer; font-weight: 650; }
.task-memo p { margin-top: 4px; padding: 8px 10px; border-radius: 8px; background: #f7f5ef; white-space: pre-wrap; overflow-wrap: anywhere; }
.task-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 10px; font-size: .83rem; color: var(--muted); margin-top: 5px; }
.tag { background: #eaf1e5; padding: 2px 8px; border-radius: 20px; }
.category-tag {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  max-width: 100%;
  overflow-wrap: anywhere;
  font-weight: 700;
  color: var(--category-ink);
  background: var(--category-fill);
}
.category-tag::before {
  content: "";
  flex: 0 0 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  align-self: center;
}
.category-tag[data-color="blue"] { --category-ink: #305571; --category-fill: #e2eef8; }
.category-tag[data-color="peach"] { --category-ink: #844831; --category-fill: #f8e7db; }
.category-tag[data-color="lavender"] { --category-ink: #604780; --category-fill: #eee6f6; }
.category-tag[data-color="teal"] { --category-ink: #285c55; --category-fill: #dcefea; }
.category-tag[data-color="gold"] { --category-ink: #6c531b; --category-fill: #f6edcf; }
.category-tag[data-color="rose"] { --category-ink: #793f58; --category-fill: #f7e5ec; }
.high { color: #923e29; }
.task[data-due="overdue"] { --due-ink: #84243a; --due-fill: #f9e1e7; --due-line: #a5334d; }
.task[data-due="day"] { --due-ink: #793b21; --due-fill: #fae6da; --due-line: #a95935; }
.task[data-due="three-days"] { --due-ink: #6b5016; --due-fill: #f8edce; --due-line: #a47a25; }
.task[data-due="week"] { --due-ink: #305873; --due-fill: #e4edf6; --due-line: #62839e; }
.task[data-due] .tick { border-color: var(--due-line); }
.due-badge {
  padding: 2px 7px;
  border-radius: 4px;
  border-inline-start: 3px solid var(--due-line);
  background: var(--due-fill);
  color: var(--due-ink);
  font-weight: 700;
}
.tick { flex: 0 0 auto; width: 44px; padding: 0; border-radius: 50%; color: var(--green); }
.empty { padding: 46px 12px; text-align: center; color: var(--muted); }
footer { margin-top: 16px; }
dialog { width: min(450px, calc(100% - 28px)); color: inherit; max-height: 90dvh; }
dialog::backdrop { background: #172a235c; }
dialog h2 { margin-bottom: 17px; }
label { display: grid; gap: 5px; font-size: .9rem; font-weight: 650; min-width: 0; }
label input, label select, label textarea { width: 100%; min-width: 0; }
.memo-field { margin-top: 13px; }
.memo-field textarea { resize: vertical; font-weight: 400; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 13px; }
.actions { justify-content: flex-end; margin-top: 17px; }
.category-row { display: flex; gap: 7px; margin-top: 8px; }
.category-row input { flex: 1; min-width: 0; }
.category-row button { flex-shrink: 0; }
#notice, .local { background: var(--sage); margin-bottom: 13px; padding: 10px 13px; border-radius: 11px; overflow-wrap: anywhere; }
.form-error { color: #923e29; margin-top: 8px; }
.weather { margin-top: 16px; border-top: 1px solid #d6dcd1; color: var(--muted); }
.weather > summary { padding: 10px 2px; cursor: pointer; font-size: .88rem; font-weight: 700; overflow-wrap: anywhere; }
.weather-brief { margin-inline-start: 6px; font-weight: 400; }
.weather-body { padding: 2px 0 12px; }
.weather-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.weather-actions button { font-size: .85rem; }
.weather-today { margin-top: 14px; }
.weather-today .weather-day {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  column-gap: 14px;
  row-gap: 5px;
  padding: 12px 15px;
  border-radius: 13px;
  background: var(--line);
}
.weather-day { min-width: 0; }
.weather-date, .weather-summary { font-weight: 700; }
.weather-icon { display: block; font-size: 1.35rem; line-height: 1.3; }
.weather-temp, .weather-rain { font-size: .8rem; }
.weather-status { margin-top: 10px; font-size: .86rem; }
.weather-error { padding: 9px 12px; border-radius: 8px; background: var(--beige); color: #714631; }
.weather-week { margin-top: 13px; }
.weather-week h2 { font-size: .9rem; }
.weather-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; margin: 6px 0 0; }
.weather-days .weather-day {
  display: grid;
  align-content: start;
  gap: 4px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fcfbf8;
  overflow-wrap: anywhere;
  font-size: .8rem;
}
.weather-foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-top: 10px; color: var(--muted); font-size: .75rem; }
.weather-foot a { color: inherit; }
.weather-results { display: grid; gap: 7px; margin-top: 10px; }
.weather-results button { width: 100%; text-align: left; }
@media (max-width: 760px) {
  .weather-days { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  main { padding: 26px 14px; }
  .panel, dialog { padding: 16px; }
  .task { align-items: flex-start; flex-wrap: wrap; }
  .task-actions { margin-left: 56px; }
  .filters { width: 100%; }
  .filters select { flex: 1; min-width: 0; }
  .category-row { flex-wrap: wrap; }
}
@media (max-width: 440px) {
  .weather-days { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
