:root {
  color-scheme: light;
  --ink: #17231f;
  --subtle: #64716b;
  --paper: #f4f2eb;
  --card: rgba(255, 255, 255, .86);
  --pine: #164b3d;
  --mint: #bcd8c9;
  --amber: #d69a43;
  --danger: #a4433c;
  --line: rgba(23, 35, 31, .1);
  font-family: "PingFang SC", "SF Pro Display", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--paper); color: var(--ink); }
body {
  background:
    radial-gradient(circle at 90% -5%, rgba(188, 216, 201, .75), transparent 34%),
    linear-gradient(180deg, #f8f7f2 0%, #f0eee7 100%);
}
button, input { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
.shell { max-width: 820px; min-height: 100vh; margin: 0 auto; padding-bottom: 112px; }
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: calc(18px + env(safe-area-inset-top)) 20px 16px;
}
.eyebrow, .section-kicker { margin: 0 0 5px; color: var(--pine); font-size: 10px; font-weight: 800; letter-spacing: .17em; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 0; font-family: "Songti SC", serif; font-size: 24px; letter-spacing: .02em; }
h2 { margin-bottom: 0; font-family: "Songti SC", serif; font-size: 22px; line-height: 1.28; }
.status-pill { border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.65); padding: 9px 12px; color: var(--subtle); font-size: 12px; font-weight: 700; }
.status-pill span { display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: #8a918d; }
.status-pill.online span { background: #2f9a6a; box-shadow: 0 0 0 4px rgba(47,154,106,.12); }
main { padding: 0 16px; }
.hero { position: relative; overflow: hidden; min-height: 170px; display: flex; flex-direction: column; justify-content: space-between; padding: 25px; border-radius: 28px; color: white; background: linear-gradient(135deg, #10231f, #1f5b49 67%, #c3914a 160%); box-shadow: 0 18px 44px rgba(22, 75, 61, .18); }
.hero::after { content: "柔"; position: absolute; right: -8px; bottom: -46px; font-family: serif; font-size: 170px; color: rgba(255,255,255,.055); }
.hero .section-kicker { color: #bfe3d1; }
.hero h2 { max-width: 500px; font-size: clamp(25px, 7vw, 36px); }
.evidence { z-index: 1; margin: 26px 0 0; color: rgba(255,255,255,.66); font-size: 11px; }
.metric-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 12px 0; }
.metric-grid article { min-height: 118px; padding: 17px; border: 1px solid rgba(255,255,255,.9); border-radius: 20px; background: var(--card); box-shadow: 0 8px 24px rgba(31,51,44,.045); }
.metric-grid span, .metric-grid small { display: block; color: var(--subtle); font-size: 11px; }
.metric-grid strong { display: block; margin: 8px 0 5px; color: var(--pine); font-family: "Songti SC", serif; font-size: 27px; }
.panel { margin-top: 12px; padding: 20px; border: 1px solid rgba(255,255,255,.9); border-radius: 24px; background: var(--card); box-shadow: 0 8px 28px rgba(31,51,44,.05); }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.panel h2 { font-size: 20px; }
.lock-note { padding: 6px 9px; border-radius: 999px; color: var(--pine); background: #e4efe9; font-size: 10px; font-weight: 700; }
.action-list { display: grid; gap: 8px; }
.action-row { display: grid; grid-template-columns: 38px 1fr auto; align-items: center; gap: 11px; width: 100%; padding: 13px 12px; border: 1px solid var(--line); border-radius: 16px; color: var(--ink); text-align: left; background: rgba(255,255,255,.65); }
.action-row:active { transform: scale(.985); }
.action-row:disabled { opacity: .5; }
.action-row .action-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; color: white; background: var(--pine); font-weight: 900; }
.action-row.danger .action-icon { background: var(--danger); }
.action-row b, .action-row small { display: block; }
.action-row b { margin-bottom: 3px; font-size: 14px; }
.action-row small { color: var(--subtle); font-size: 10px; line-height: 1.4; }
.action-row i { color: #88918d; font-size: 22px; font-style: normal; }
.muted-panel { background: rgba(236,235,228,.68); }
.capability-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.capability-grid button { min-height: 76px; padding: 12px; border: 1px dashed rgba(23,35,31,.2); border-radius: 15px; text-align: left; color: #66706b; background: rgba(255,255,255,.38); }
.capability-grid b, .capability-grid small { display: block; }
.capability-grid small { margin-top: 6px; font-size: 9px; line-height: 1.35; }
.gap-code { margin: 13px 0 0; color: #7a817d; font-family: ui-monospace, monospace; font-size: 9px; }
.audit-panel ol { margin: 0; padding: 0; list-style: none; }
.audit-panel li { display: flex; gap: 11px; padding: 10px 0; border-top: 1px solid var(--line); }
.feed-dot { width: 8px; height: 8px; margin-top: 5px; border-radius: 50%; background: #8b928f; }
.feed-dot.good { background: #2f9a6a; } .feed-dot.bad { background: var(--danger); } .feed-dot.wait { background: var(--amber); }
.audit-panel b, .audit-panel small { display: block; }
.audit-panel b { font-size: 13px; } .audit-panel small { margin-top: 3px; color: var(--subtle); font-size: 10px; }
.bottom-nav { position: fixed; z-index: 10; left: 50%; bottom: 0; transform: translateX(-50%); display: grid; grid-template-columns: repeat(6, 1fr); width: min(820px, 100%); padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: rgba(248,247,242,.92); backdrop-filter: blur(18px); }
.bottom-nav button { padding: 5px 0; border: 0; color: #7a837e; background: transparent; font-size: 9px; }
.bottom-nav span { display: block; margin-bottom: 3px; font-size: 16px; }
.bottom-nav .active { color: var(--pine); font-weight: 800; }
dialog { width: min(92%, 430px); padding: 0; border: 0; border-radius: 26px; background: #fbfaf6; box-shadow: 0 26px 80px rgba(10,25,20,.28); }
dialog::backdrop { background: rgba(10,20,17,.55); backdrop-filter: blur(5px); }
.auth-card { padding: 28px; }
.auth-card h2 { margin-bottom: 12px; font-size: 27px; }
.auth-card > p:not(.eyebrow):not(.auth-message) { color: var(--subtle); font-size: 13px; line-height: 1.65; }
.auth-card label { display: block; margin: 18px 0 7px; font-size: 11px; font-weight: 700; }
.auth-card input { width: 100%; padding: 15px; border: 1px solid var(--line); border-radius: 14px; text-transform: uppercase; letter-spacing: .12em; background: white; }
.auth-card button { width: 100%; margin-top: 10px; padding: 14px; border-radius: 14px; font-weight: 800; }
.primary { border: 0; color: white; background: var(--pine); }
.secondary { border: 1px solid var(--line); color: var(--pine); background: transparent; }
.auth-message { min-height: 18px; margin: 12px 0 0; color: var(--danger); font-size: 11px; }
.toast { position: fixed; z-index: 30; left: 50%; bottom: calc(84px + env(safe-area-inset-bottom)); transform: translate(-50%, 18px); width: max-content; max-width: 88%; padding: 11px 15px; border-radius: 13px; color: white; background: #18231f; opacity: 0; pointer-events: none; transition: .2s ease; font-size: 12px; box-shadow: 0 12px 36px rgba(0,0,0,.2); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (min-width: 700px) { main { padding: 0 24px; } .topbar { padding-left: 28px; padding-right: 28px; } .metric-grid { grid-template-columns: repeat(4, 1fr); } .metric-grid article { min-height: 128px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; } }
