:root {
  color-scheme: light dark;
  --bg: #fafafa; --card: #ffffff; --text: #18181b; --soft: #52525b; --line: #e4e4e7;
  --accent: #2563eb; --on-accent: #ffffff; --danger: #b91c1c; --notice: #fef3c7; --on-notice: #78350f;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #09090b; --card: #18181b; --text: #fafafa; --soft: #a1a1aa; --line: #3f3f46;
    --accent: #60a5fa; --on-accent: #09090b; --danger: #f87171; --notice: #422006; --on-notice: #fde68a;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.5 -apple-system, system-ui, "Helvetica Neue", Arial, sans-serif; overflow-wrap: anywhere; }
main, body > footer, .banner { max-width: 640px; margin: 0 auto; padding: 16px; }
h1 { font-size: 1.6rem; line-height: 1.25; margin: 8px 0 12px; }
h2 { font-size: 1rem; margin: 24px 0 4px; color: var(--soft); }
a { color: var(--accent); }
[hidden] { display: none !important; }
.banner { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.banner p { margin: 0; }
.bar { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.bar h1 { margin: 0; flex: 1 1 auto; font-size: 1.25rem; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 12px 0; }
.row input[type="text"], .row input[type="email"] { flex: 1 1 200px; }
input[type="text"], input[type="email"], textarea, select { font: inherit; color: inherit; background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; min-height: 44px; max-width: 100%; }
textarea { width: 100%; }
input[type="checkbox"] { width: 22px; height: 22px; margin: 0; flex: 0 0 auto; accent-color: var(--accent); }
.button, .store-button { display: inline-block; font: inherit; font-weight: 600; text-decoration: none; text-align: center; cursor: pointer; border: 1px solid var(--accent); border-radius: 8px; padding: 10px 16px; min-height: 44px; background: var(--accent); color: var(--on-accent); }
.button.secondary { background: transparent; color: var(--accent); }
.button.danger { background: var(--danger); border-color: var(--danger); color: var(--on-accent); }
.button:disabled { opacity: 0.5; cursor: default; }
.link { font: inherit; color: var(--accent); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-align: left; }
.items { list-style: none; margin: 0; padding: 0; }
.item { border-bottom: 1px solid var(--line); padding: 10px 0; }
.item label, .task { display: flex; gap: 12px; align-items: flex-start; min-height: 44px; }
.item-text { display: flex; flex-direction: column; min-width: 0; }
.item-title { color: inherit; }
.item-title.link { text-decoration: none; }
.item.done .item-title { text-decoration: line-through; color: var(--soft); }
.item-notes { color: var(--soft); font-size: 0.9rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.item-by, .note { color: var(--soft); font-size: 0.85rem; }
.flag { color: var(--danger); margin-right: 4px; }
.notice { background: var(--notice); color: var(--on-notice); border-radius: 8px; padding: 10px 12px; }
.confirm { border: 1px solid var(--danger); border-radius: 8px; padding: 4px 16px 8px; margin: 16px 0; }
.editor { display: flex; flex-direction: column; gap: 8px; width: 100%; }
#message:empty { display: none; }
#message { color: var(--soft); }
