:root { --bg: #f7f6f2; --fg: #1d1d1b; --muted: #6b6a66; --line: #e2e0d9; --accent: #1f4e5f; --card: #fff; --read: #9a9893; }
@media (prefers-color-scheme: dark) {
  :root { --bg: #151614; --fg: #e9e7e1; --muted: #9a988f; --line: #2c2d2a; --accent: #7fb8c9; --card: #1c1d1b; --read: #6e6d68; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 17px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif; }
a { color: var(--accent); }
#bar { position: sticky; top: 0; z-index: 2; background: var(--bg); border-bottom: 1px solid var(--line);
  padding: env(safe-area-inset-top) 12px 0; display: flex; align-items: center; gap: 8px; }
#tabs { display: flex; gap: 2px; flex: 1; }
#tabs a { padding: 12px 10px; text-decoration: none; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; }
#tabs a.on { color: var(--fg); border-color: var(--accent); }
#status { font-size: 13px; color: var(--muted); max-width: 45%; text-align: right; }
main { max-width: 720px; margin: 0 auto; padding: 8px 14px calc(90px + env(safe-area-inset-bottom)); }
main.plain { padding-top: 40px; }
.muted { color: var(--muted); }
.empty { text-align: center; padding: 40px 0; }
.section { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 22px 0 6px; }
.card { display: block; text-decoration: none; color: inherit; background: var(--card); border: 1px solid var(--line);
  border-radius: 10px; padding: 12px 14px; margin: 8px 0; }
.card h2 { font-size: 18px; line-height: 1.3; margin: 2px 0 4px; }
.card.read h2, .card.read .snippet { color: var(--read); }
.meta { font-size: 13px; color: var(--muted); }
.meta a { color: inherit; }
.star { color: #c08a1e; }
.snippet { margin: 0; font-size: 15px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.why { margin: 6px 0 0; font-size: 13px; color: var(--accent); }
.foot { display: flex; gap: 10px; justify-content: center; margin: 22px 0; flex-wrap: wrap; }
button, .button { font: inherit; font-size: 15px; padding: 9px 14px; border-radius: 8px; border: 1px solid var(--accent);
  background: var(--accent); color: var(--bg); cursor: pointer; text-decoration: none; display: inline-block; }
button.ghost, .act.ghost { background: transparent; color: var(--accent); }
button:disabled { opacity: .4; }
article { padding-top: 10px; }
article h1 { font-size: 26px; line-height: 1.25; margin: 6px 0 10px; }
article h1 a { color: inherit; text-decoration: none; }
.content { font-size: 18px; line-height: 1.6; overflow-wrap: anywhere; }
.content img, .content video { max-width: 100%; height: auto; border-radius: 6px; }
.content pre { overflow-x: auto; background: var(--card); padding: 10px; border-radius: 6px; font-size: 14px; }
.content blockquote { margin: 0; padding-left: 14px; border-left: 3px solid var(--line); color: var(--muted); }
.content table { display: block; overflow-x: auto; border-collapse: collapse; }
.content td, .content th { border: 1px solid var(--line); padding: 4px 8px; }
.actions { position: fixed; left: 0; right: 0; bottom: 0; background: var(--bg); border-top: 1px solid var(--line);
  display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); }
.act { font: inherit; font-size: 15px; padding: 8px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--card);
  color: var(--fg); text-decoration: none; cursor: pointer; }
.act.on { border-color: var(--accent); color: var(--accent); font-weight: 600; }
.add { display: flex; gap: 8px; margin: 12px 0; }
.add input { flex: 1; font: inherit; font-size: 16px; padding: 9px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); color: var(--fg); }
.hint { font-size: 14px; }
.src { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.src > a { flex: 1; text-decoration: none; color: inherit; min-width: 0; }
.src .name { font-weight: 600; }
.src .muted { font-size: 13px; }
.tools { display: flex; gap: 4px; }
.tog { padding: 5px 9px; font-size: 14px; background: transparent; color: var(--muted); border-color: var(--line); }
.tog.on { color: var(--accent); border-color: var(--accent); }
.srchead { font-size: 22px; margin: 14px 0 4px; }
.requests p { font-size: 14px; margin: 2px 0; }
