:root {
  --ink: #251716;
  --muted: #766966;
  --paper: #f8f6f5;
  --white: #ffffff;
  --green: #b3222a;
  --green-dark: #80151a;
  --mint: #f7dfdc;
  --line: #ead9d6;
  --warm: #c68a2d;
  --danger: #a33b2c;
  --shadow: 0 18px 42px -20px rgba(128, 21, 26, .16);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
.hidden { display: none !important; }
.sr-only { width: 1px; height: 1px; padding: 0; margin: -1px; position: absolute; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.topbar { height: 72px; padding: 0 max(22px, 4vw); display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 20; border-bottom: 1px solid rgba(128,21,26,.09); background: #fff; }
.brand { display: flex; align-items: center; gap: 11px; color: var(--ink); text-decoration: none; }
.brand-mark { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; color: white; background: var(--green); font: 700 21px Georgia, serif; }
.brand strong, .brand small { display: block; line-height: 1.15; }
.brand strong { font: 700 19px Georgia, serif; }
.brand small { margin-top: 4px; color: var(--muted); font-size: 10px; letter-spacing: .1em; }
.top-actions { display: flex; align-items: center; gap: 16px; }
.top-actions a { color: var(--green-dark); text-decoration: none; font-size: 13px; font-weight: 700; }
.language-switch { padding: 4px; display: inline-flex; align-items: center; gap: 2px; border: 1px solid var(--line); border-radius: 99px; background: rgba(255,255,255,.72); }
.language-switch span { color: #a4afa9; font-size: 10px; }
.language-switch button { min-width: 36px; padding: 5px 7px; border: 0; border-radius: 99px; color: var(--muted); background: transparent; font-size: 11px; font-weight: 700; cursor: pointer; }
.language-switch button.active { color: white; background: var(--green); }

main { min-height: calc(100vh - 72px); }
.login-view { min-height: calc(100vh - 72px); padding: 7vw max(7vw, 28px); display: grid; grid-template-columns: 1.25fr minmax(330px, 420px); align-items: center; gap: 9vw; background: radial-gradient(circle at 10% 10%, #f9dedb, transparent 39%), linear-gradient(135deg, #fffaf9, #f4e9e7); }
.login-copy h1 { margin: 18px 0 22px; font: 500 clamp(46px, 6vw, 82px)/1.05 Georgia, "Songti SC", serif; letter-spacing: -.04em; }
.login-copy p { max-width: 620px; color: var(--muted); font-size: 17px; line-height: 1.8; }
.login-card { padding: 38px; display: grid; gap: 17px; border: 1px solid white; border-radius: 24px; background: rgba(255,255,255,.88); box-shadow: var(--shadow); }
.login-card h2 { margin: 0; font-size: 29px; }
.login-card label { font-size: 13px; font-weight: 700; }
.login-card input { width: 100%; height: 54px; padding: 0 15px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); background: white; outline: none; }
.login-card input:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(179,34,42,.1); }
.error { min-height: 20px; margin: 0; color: var(--danger); font-size: 13px; }

.daily-view { width: min(1120px, calc(100% - 44px)); margin: 0 auto; padding: 58px 0 80px; }
.hero { padding: clamp(28px, 5vw, 58px); display: grid; grid-template-columns: 1fr 260px; align-items: end; gap: 56px; overflow: hidden; position: relative; border: 1px solid #ead2cf; border-radius: 30px; background: linear-gradient(135deg, rgba(255,255,255,.98), rgba(250,230,227,.94)); box-shadow: var(--shadow); }
.hero::after { content: ""; width: 320px; height: 320px; position: absolute; right: -120px; top: -150px; border: 62px solid rgba(179,34,42,.06); border-radius: 50%; }
.hero-copy, .today-card { position: relative; z-index: 1; }
.eyebrow { color: var(--green); font-size: 11px; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }
.hero h1 { margin: 15px 0 18px; font: 500 clamp(38px, 4.5vw, 58px)/1.18 Georgia, "Songti SC", serif; letter-spacing: -.035em; text-wrap: balance; }
.hero-copy > p { max-width: 620px; margin: 0; color: var(--muted); line-height: 1.8; }
.audio-actions { margin-top: 28px; display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.audio-status { min-height: 22px; margin-top: 12px !important; color: var(--green) !important; font-size: 12px; }
.primary-button, .secondary-button, .text-button { min-height: 43px; padding: 0 18px; border-radius: 11px; cursor: pointer; transition: .18s; }
.primary-button { border: 0; color: white; background: var(--green); font-weight: 800; }
.primary-button:hover { background: var(--green-dark); transform: none; }
.secondary-button { border: 1px solid var(--line); color: var(--green-dark); background: rgba(255,255,255,.78); font-weight: 700; }
.secondary-button:hover { border-color: #d9aaa6; background: white; }
.text-button { border: 0; color: var(--muted); background: transparent; }
.today-card { padding: 23px; border: 1px solid rgba(179,34,42,.17); border-radius: 20px; background: rgba(255,255,255,.82); }
.today-card span, .today-card small { display: block; color: var(--muted); font-size: 12px; }
.today-card strong { display: block; margin: 8px 0 4px; color: var(--green); font: 500 48px/1 Georgia, serif; }
.today-rule { height: 1px; margin: 20px 0 15px; background: var(--line); }
.today-card p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.65; }

.brief-panel { margin-top: 22px; padding: 26px 28px; display: grid; grid-template-columns: minmax(260px, .9fr) 1.35fr; gap: 24px 38px; border: 1px solid #e5cfcc; border-radius: 22px; background: rgba(255,255,255,.78); }
.brief-copy h2 { margin: 7px 0 10px; font: 600 25px/1.35 Georgia, "Songti SC", serif; }
.brief-copy > p { margin: 0; color: #574744; font-size: 13px; line-height: 1.75; }
.brief-copy .brief-method { margin-top: 10px; color: var(--muted); font-size: 11px; }
.brief-highlights { margin: 0; padding: 0; display: grid; gap: 10px; list-style: none; counter-reset: brief-item; }
.brief-highlights li { padding: 11px 13px 11px 42px; position: relative; border: 1px solid var(--line); border-radius: 13px; background: white; counter-increment: brief-item; }
.brief-highlights li::before { content: counter(brief-item, decimal-leading-zero); width: 24px; height: 24px; display: grid; place-items: center; position: absolute; left: 10px; top: 10px; border-radius: 8px; color: var(--green); background: var(--mint); font: 700 10px Georgia, serif; }
.brief-highlights strong { display: block; font-size: 13px; line-height: 1.55; }
.brief-highlights span { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }
.brief-metrics { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, 1fr); overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: #fff9f8; }
.brief-metrics div { padding: 12px 16px; display: flex; align-items: baseline; gap: 7px; border-right: 1px solid var(--line); }
.brief-metrics div:last-child { border-right: 0; }
.brief-metrics strong { color: var(--green); font: 600 21px Georgia, serif; }
.brief-metrics span { color: var(--muted); font-size: 11px; }

.feed-toolbar { margin: 50px 0 16px; display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.feed-toolbar h2 { margin: 7px 0 0; font: 500 31px/1.2 Georgia, "Songti SC", serif; }
.filters { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 9px; scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.filters button { flex: 0 0 auto; padding: 8px 14px; border: 1px solid var(--line); border-radius: 99px; color: var(--muted); background: rgba(255,255,255,.64); cursor: pointer; }
.filters button.active { border-color: var(--green); color: white; background: var(--green); font-weight: 700; }
.daily-search { margin: 3px 0 12px; display: grid; grid-template-columns: 1fr auto auto; gap: 8px; }
.daily-search input { min-width: 0; height: 43px; padding: 0 14px; border: 1px solid var(--line); border-radius: 11px; color: var(--ink); background: rgba(255,255,255,.82); outline: none; }
.daily-search input:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(179,34,42,.08); }
.feed-notice { margin: 8px 0 14px; color: var(--muted); font-size: 12px; }
.news-list { display: grid; gap: 12px; }
.news-card { padding: 23px 24px; display: grid; grid-template-columns: 42px 1fr; gap: 18px; border: 1px solid var(--line); border-radius: 18px; background: white; transition: border-color .18s, box-shadow .18s; }
.news-card:hover { border-color: #ddb9b5; box-shadow: 0 13px 34px rgba(128,21,26,.07); transform: none; }
.news-number { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 13px; color: var(--green); background: var(--mint); font: 700 15px Georgia, serif; }
.news-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; color: #78867f; font-size: 11px; }
.category { padding: 4px 8px; border-radius: 99px; color: var(--green); background: var(--mint); font-weight: 800; }
.news-card h3 { margin: 9px 0 8px; font: 600 clamp(18px, 2.2vw, 23px)/1.45 Georgia, "Songti SC", serif; }
.original-title { display: block; margin-top: 5px; color: var(--muted); font: 500 13px/1.55 Inter, system-ui, sans-serif; }
.excerpt-label { display: block; width: fit-content; margin: 2px 0 6px; color: var(--green); font-size: 10px; font-weight: 800; letter-spacing: .08em; }
.news-hint { max-width: 900px; margin: 0; color: #574744; font-size: 14px; line-height: 1.85; }
.selection-reason { margin: 9px 0 0; color: #887a77; font-size: 11px; line-height: 1.6; }
.original-preview { max-width: 900px; margin-top: 10px; color: var(--muted); font-size: 12px; }
.original-preview summary { width: fit-content; cursor: pointer; color: var(--green); font-weight: 700; }
.original-preview p { margin: 8px 0 0; line-height: 1.75; }
.news-actions { margin-top: 15px; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.news-actions button, .read-link { padding: 7px 11px; border: 1px solid var(--line); border-radius: 9px; color: var(--green-dark); background: #fffaf9; text-decoration: none; font-size: 12px; cursor: pointer; }
.explain-button { border-color: #ddb9b5 !important; background: #fff0ee !important; font-weight: 700; }
.explanation { margin-top: 16px; padding: 16px 18px; border-left: 3px solid var(--green); border-radius: 0 12px 12px 0; color: #4a3431; background: #fff0ee; font-size: 14px; line-height: 1.8; white-space: pre-wrap; }
.explanation.loading { color: var(--muted); }
.explanation.error-state { border-left-color: var(--danger); color: var(--danger); background: #fff1ed; }
.preference-actions { margin-top: 16px; display: flex; align-items: center; gap: 6px; color: #918481; font-size: 11px; }
.preference-actions button { padding: 4px 8px; border: 0; border-radius: 99px; color: var(--muted); background: #f3e9e7; cursor: pointer; }
.preference-actions button:hover { color: var(--green-dark); background: var(--mint); }
.feed-error { padding: 60px 25px; text-align: center; border: 1px dashed #d5b8af; border-radius: 18px; color: var(--danger); background: rgba(255,255,255,.6); }
.feed-error p { color: var(--muted); }
.page-footer { margin-top: 45px; padding-top: 24px; display: flex; justify-content: space-between; gap: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.page-footer p { margin: 0; }
.page-footer a { color: var(--green); font-weight: 700; text-decoration: none; }

@media (max-width: 760px) {
  .topbar { height: auto; min-height: 64px; padding: 12px 16px; gap: 10px; flex-wrap: wrap; }
  .brand { flex-shrink: 0; }
  .top-actions { margin-left: auto; gap: 12px; flex-wrap: wrap; }
  .top-actions a, .top-actions button, .language-switch { flex-shrink: 0; white-space: nowrap; }
  .brand small { display: none; }
  .top-actions { gap: 10px; }
  .language-switch button { min-width: 30px; padding: 5px; }
  main { min-height: calc(100vh - 64px); }
  .login-view { min-height: calc(100vh - 64px); padding: 36px 20px; grid-template-columns: 1fr; gap: 28px; }
  .login-copy h1 { font-size: 45px; }
  .login-card { padding: 28px 23px; }
  .daily-view { width: min(100% - 28px, 1120px); padding: 22px 0 60px; }
  .hero { padding: 32px 25px; grid-template-columns: 1fr; gap: 28px; border-radius: 22px; }
  .hero h1 { font-size: 38px; }
  .hero h1 br { display: none; }
  .today-card { display: grid; grid-template-columns: auto auto 1fr; align-items: baseline; gap: 7px; }
  .today-card strong { font-size: 34px; }
  .today-rule, .today-card p { display: none; }
  .brief-panel { padding: 22px 19px; grid-template-columns: 1fr; gap: 18px; }
  .brief-metrics { grid-column: 1; grid-template-columns: 1fr; }
  .brief-metrics div { border-right: 0; border-bottom: 1px solid var(--line); }
  .brief-metrics div:last-child { border-bottom: 0; }
  .feed-toolbar { margin-top: 38px; }
  .daily-search { grid-template-columns: 1fr auto; }
  .daily-search .text-button { grid-column: 1 / -1; justify-self: start; min-height: 30px; padding: 0 4px; }
  .news-card { padding: 19px 17px; grid-template-columns: 34px 1fr; gap: 12px; }
  .news-number { width: 34px; height: 34px; border-radius: 10px; }
  .news-card h3 { font-size: 18px; }
  .news-actions button, .read-link { flex: 1 1 auto; text-align: center; }
  .page-footer { display: block; line-height: 1.7; }
  .page-footer a { display: inline-block; margin-top: 10px; }
}
