:root {
  color-scheme: light;
  --page: #e9edf1;
  --app: #f6f7f8;
  --surface: #fff;
  --soft: #f0f3f5;
  --ink: #182129;
  --muted: #68747d;
  --line: #dce2e6;
  --navy: #172a3a;
  --accent: #147a66;
  --accent-soft: #dff2ed;
  --rss: #b75c31;
  --github: #5e62a9;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--ink);
  background: var(--page);
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: var(--page); }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
.boot-message { padding: 40px 20px; text-align: center; color: var(--muted); }
.app-shell { position: relative; width: min(100%, 520px); min-height: 100dvh; margin: 0 auto; padding: max(18px, env(safe-area-inset-top)) 16px calc(102px + env(safe-area-inset-bottom)); background: var(--app); }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 25px; }
.brand { display: flex; align-items: center; gap: 11px; }
.brand-mark { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 13px; color: #fff; background: var(--accent); font-weight: 600; }
.brand strong { display: block; font-size: 17px; font-weight: 600; }
.brand small { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; }
.icon-button, .back-button { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 13px; color: var(--ink); background: var(--surface); cursor: pointer; }
.welcome, .page-heading { margin: 0 4px 18px; }
.welcome { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.eyebrow { margin: 0 0 5px; color: var(--accent); font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
h1, h2, h3, p { overflow-wrap: anywhere; }
h1, .page-heading h1 { margin: 0; font-size: 28px; line-height: 1.15; letter-spacing: -.035em; }
.page-heading p { margin: 7px 0 0; color: var(--muted); font-size: 12px; }
.today-date { color: var(--muted); font-size: 12px; line-height: 1.5; text-align: right; }
.briefing { padding: 19px; border-radius: 21px; color: #edf6f4; background: var(--navy); box-shadow: 0 14px 28px rgba(15,29,40,.14); }
.briefing-header { display: flex; justify-content: space-between; gap: 12px; color: #a6b6c0; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.briefing .updated { color: #9ce0cd; letter-spacing: 0; text-transform: none; }
.briefing h2 { margin: 16px 0 9px; color: #fff; font-size: 19px; line-height: 1.4; }
.briefing p { margin: 0; color: #bdc9d1; font-size: 13px; line-height: 1.65; }
.briefing-meta { display: flex; gap: 18px; margin-top: 16px; color: #9fb0bc; font-size: 11px; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin: 23px 4px 11px; }
.section-head h2 { margin: 0; font-size: 15px; }
.section-head span { color: var(--muted); font-size: 11px; }
.report-list { display: grid; gap: 10px; }
.report-card { width: 100%; display: grid; grid-template-columns: 45px minmax(0,1fr) auto; align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 17px; color: var(--ink); background: var(--surface); text-align: left; cursor: pointer; }
.report-icon { display: grid; place-items: center; width: 45px; height: 45px; border-radius: 14px; background: var(--soft); color: var(--rss); font-size: 11px; font-weight: 700; }
.report-icon.github { color: var(--github); }
.report-copy { min-width: 0; }
.report-copy strong { display: block; overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.report-copy small { display: block; margin-top: 5px; color: var(--muted); font-size: 11px; }
.chevron { color: var(--muted); font-size: 20px; }
.history-group { margin-top: 20px; }
.history-group h2 { margin: 0 4px 10px; font-size: 14px; }
.history-card, .settings-card { border: 1px solid var(--line); border-radius: 18px; background: var(--surface); overflow: hidden; }
.history-row { width: 100%; display: grid; grid-template-columns: 54px minmax(0,1fr) auto; align-items: center; gap: 12px; padding: 14px; border: 0; border-bottom: 1px solid var(--line); color: var(--ink); background: transparent; text-align: left; cursor: pointer; }
.history-row:last-child { border-bottom: 0; }
.history-day { color: var(--muted); font-size: 11px; text-align: center; }
.history-day strong { display: block; color: var(--ink); font-size: 20px; }
.history-copy strong { display: block; font-size: 13px; }
.history-copy small { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; }
.reader-header { display: flex; align-items: center; gap: 11px; margin-bottom: 16px; color: var(--muted); font-size: 12px; }
.article { padding: 20px 18px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); }
.article-kind { color: var(--rss); font-size: 11px; font-weight: 700; letter-spacing: .09em; }
.article-kind.github { color: var(--github); }
.article h1 { margin: 11px 0; font-size: 23px; line-height: 1.35; }
.article-meta { color: var(--muted); font-size: 11px; }
.article-summary { margin: 20px 0 0; font-size: 14px; line-height: 1.85; white-space: pre-wrap; }
.news-list { display: grid; gap: 12px; margin-top: 22px; }
.news-item { padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--soft); }
.news-item h2 { margin: 0; font-size: 15px; line-height: 1.5; }
.news-item small { display: block; margin-top: 7px; color: var(--muted); font-size: 11px; }
.news-item p { margin: 11px 0 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
.source-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 13px; color: var(--accent); font-size: 12px; font-weight: 600; text-decoration: none; }
.source-link::after { content: "↗"; }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 16px; border-bottom: 1px solid var(--line); }
.setting-row:last-child { border-bottom: 0; }
.setting-copy strong { display: block; font-size: 13px; }
.setting-copy small { display: block; margin-top: 5px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.status-value { color: var(--accent); font-size: 12px; }
.text-button, .primary-button { border-radius: 13px; cursor: pointer; }
.text-button { padding: 9px 12px; border: 1px solid var(--line); color: var(--ink); background: var(--surface); }
.primary-button { width: 100%; padding: 13px 16px; border: 0; color: #fff; background: var(--accent); font-weight: 600; }
.login-shell { display: grid; min-height: calc(100dvh - 120px); place-items: center; }
.login-card { width: 100%; padding: 24px; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); }
.login-card h1 { margin: 18px 0 8px; }
.login-card p { margin: 0 0 20px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.login-card label { display: block; margin-bottom: 8px; font-size: 12px; font-weight: 600; }
.login-card input { width: 100%; padding: 13px 14px; border: 1px solid var(--line); border-radius: 13px; color: var(--ink); background: var(--app); }
.login-card .primary-button { margin-top: 12px; }
.demo-divider { display: flex; align-items: center; gap: 10px; margin: 18px 0 12px; color: var(--muted); font-size: 11px; }
.demo-divider::before, .demo-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.demo-button { width: 100%; padding: 12px 16px; border: 1px solid var(--line); border-radius: 13px; color: var(--accent); background: var(--surface); font-weight: 600; cursor: pointer; }
.demo-help { display: block; margin-top: 9px; color: var(--muted); font-size: 10px; line-height: 1.45; text-align: center; }
.form-error, .notice { margin: 12px 0 0; padding: 12px 14px; border-radius: 13px; color: #8c3b2e; background: #f8e9e5; font-size: 12px; line-height: 1.5; }
.notice { margin: 0 0 16px; color: #76520f; background: #f7eed8; }
.empty { padding: 30px 18px; border: 1px dashed var(--line); border-radius: 18px; color: var(--muted); text-align: center; font-size: 13px; }
.bottom-nav { position: fixed; left: 50%; bottom: max(12px, env(safe-area-inset-bottom)); z-index: 10; width: min(calc(100% - 24px), 496px); display: grid; grid-template-columns: repeat(3,1fr); gap: 4px; padding: 7px; border: 1px solid var(--line); border-radius: 20px; background: rgba(255,255,255,.94); box-shadow: 0 12px 30px rgba(25,38,48,.15); transform: translateX(-50%); backdrop-filter: blur(14px); }
.nav-button { display: grid; justify-items: center; gap: 4px; padding: 8px 4px; border: 0; border-radius: 14px; color: var(--muted); background: transparent; font-size: 10px; cursor: pointer; }
.nav-button .nav-icon { font-size: 17px; }
.nav-button.active { color: var(--accent); background: var(--accent-soft); }
@media (min-width: 521px) { .app-shell { margin-top: 18px; margin-bottom: 18px; min-height: calc(100dvh - 36px); border-radius: 30px; box-shadow: 0 22px 60px rgba(25,38,48,.15); } }
@media (prefers-color-scheme: dark) {
  :root { color-scheme: dark; --page:#10151b; --app:#171d24; --surface:#202731; --soft:#28313c; --ink:#edf2f5; --muted:#9eabb5; --line:#35404b; --accent:#49c8a7; --accent-soft:#173d36; --rss:#ee9b70; --github:#a9acf1; }
  .bottom-nav { background: rgba(32,39,49,.94); }
  .form-error { color:#ffc2b6; background:#4c2926; }
  .notice { color:#f1cc81; background:#493b22; }
}
