:root {
  color-scheme: light;
  --paper: #efeee7;
  --surface: #faf9f4;
  --ink: #202b23;
  --muted: #556257;
  --line: #d6dad0;
  --tint: #dbe6d0;
  --primary: #284332;
  --lime: #d9ef98;
  --danger: #7c3e37;
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
button { border: 0; font: inherit; color: inherit; cursor: pointer; }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 2px solid #487453; outline-offset: 4px; }
button:disabled { opacity: 0.56; cursor: wait; }
a { color: var(--primary); text-underline-offset: 3px; }
.workspace { max-width: 720px; margin: 0 auto; padding: env(safe-area-inset-top) 22px calc(42px + env(safe-area-inset-bottom)); }
.top { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; min-height: 70px; border-bottom: 1px solid var(--line); }
.brand { display: flex; gap: 11px; align-items: center; font-weight: 650; font-size: 14px; }
.mark { padding: 6px; width: 34px; height: 34px; color: var(--lime); background: var(--primary); border-radius: 10px; }
.icon-button { display: grid; place-items: center; height: 44px; width: 44px; background: transparent; color: var(--primary); border-radius: 12px; }
.icon-button:hover { background: var(--tint); }
h1 { font: 500 clamp(42px, 12vw, 66px)/1 Georgia, serif; letter-spacing: -0.065em; margin: 32px 0 23px; }
.filters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 17px; }
.filters button { display: inline-flex; align-items: center; justify-content: space-between; gap: 7px; min-height: 43px; padding: 7px 12px; border: 1px solid var(--line); border-radius: 11px; font-weight: 650; font-size: 13px; background: transparent; }
.filters button[aria-pressed="true"] { color: var(--lime); background: var(--primary); border-color: var(--primary); }
.filters span { font-variant-numeric: tabular-nums; opacity: 0.8; }
.task-list { display: grid; gap: 8px; }
.task { display: grid; width: 100%; grid-template-columns: minmax(0, 1fr) 21px; gap: 3px 14px; text-align: left; background: var(--surface); border: 1px solid var(--line); padding: 15px 15px 16px; border-radius: 14px; overflow-wrap: anywhere; }
.task:hover { border-color: #9bad95; }
.task strong { grid-column: 1; font-size: 17px; line-height: 1.27; }
.task .meta { grid-column: 1; }
.task .arrow { grid-row: 1 / span 3; grid-column: 2; align-self: center; color: var(--muted); }
.task .excerpt { color: var(--muted); grid-column: 1; margin: 3px 0 0; line-height: 1.38; font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.meta { color: var(--muted); font-size: 12px; font-weight: 650; font-variant-numeric: tabular-nums; }
.notice, .empty { padding: 14px; border: 1px solid var(--line); border-radius: 12px; color: var(--muted); background: var(--surface); line-height: 1.45; }
.notice[data-error] { color: var(--danger); border-color: #d0a69f; }
.back { display: inline-flex; align-items: center; gap: 8px; background: transparent; color: var(--primary); padding: 8px 0; margin: 15px 0 8px; min-height: 44px; font-weight: 650; }
.detail-title { font-size: clamp(32px, 8vw, 48px); letter-spacing: -0.045em; line-height: 1.1; overflow-wrap: anywhere; margin: 11px 0 15px; }
.summary { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 16px; line-height: 1.45; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 17px 0 26px; }
.action, .attachment { border-radius: 9px; min-height: 44px; padding: 7px 12px; background: var(--primary); color: var(--lime); font-weight: 650; font-size: 14px; text-align: left; }
.attachment { background: var(--tint); color: var(--primary); }
h2 { font-size: 20px; margin: 22px 0 13px; letter-spacing: -0.025em; }
.timeline { margin: 0; padding: 0 0 0 16px; list-style: none; border-left: 1px solid #a7b49f; }
.timeline li { position: relative; margin: 0 0 9px; padding: 12px 12px 13px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.timeline li::before { position: absolute; content: ""; top: 18px; left: -21px; width: 7px; height: 7px; border-radius: 50%; background: var(--primary); }
.timeline .source-text { white-space: pre-wrap; overflow-wrap: anywhere; margin: 7px 0; font-size: 14px; line-height: 1.46; }
.timeline a { display: inline-block; margin-top: 8px; font-size: 13px; }
.timeline .media { display: grid; gap: 5px; margin-top: 8px; }
.media img, .media audio { width: 100%; max-width: 420px; border-radius: 8px; }
.unavailable { font-size: 13px; color: var(--muted); }
details { margin: 20px 0; padding: 12px 0; border-top: 1px solid var(--line); }
summary { min-height: 37px; display: flex; align-items: center; gap: 8px; cursor: pointer; color: var(--primary); font-weight: 650; list-style: none; }
summary::-webkit-details-marker { display: none; }
details[open] summary svg { transform: rotate(90deg); }
details p { line-height: 1.44; white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 360px) { .workspace { padding-inline: 13px; } .filters button { padding-inline: 9px; } }
@media (prefers-reduced-motion: no-preference) { .task, .icon-button { transition: background-color 130ms, border-color 130ms; } }
