:root {
  --blue-950: #061a36;
  --blue-900: #092b5b;
  --blue-800: #0b3d7e;
  --blue-700: #1157b4;
  --blue-600: #176de0;
  --blue-500: #2b8bff;
  --blue-400: #60b6ff;
  --cyan: #72ddff;
  --ice: #eaf6ff;
  --paper: #f7fbff;
  --surface: #ffffff;
  --surface-soft: #f0f7ff;
  --ink: #0a2447;
  --ink-soft: #29496e;
  --muted: #68809d;
  --line: rgba(21, 87, 153, .12);
  --line-strong: rgba(21, 87, 153, .2);
  --shadow-sm: 0 8px 30px rgba(13, 54, 105, .06);
  --shadow-md: 0 18px 60px rgba(13, 54, 105, .11);
  --shadow-lg: 0 30px 90px rgba(4, 30, 67, .18);
  --life: #119c8b;
  --life-soft: #e8f8f4;
  --money: #d89525;
  --money-soft: #fff6e7;
  --time: #6575df;
  --time-soft: #eef0ff;
  --free: #805bd2;
  --free-soft: #f3edff;
  --emergency: #e45664;
  --emergency-soft: #fff0f1;
  --radius-sm: 14px;
  --radius-md: 22px;
  --radius-lg: 32px;
  --font-scale: 1;
  --header-h: 76px;
}

:root[data-theme="dark"] {
  --blue-950: #030e20;
  --blue-900: #071c37;
  --blue-800: #0a2b55;
  --blue-700: #12477f;
  --blue-600: #1e73d6;
  --ice: #0b2547;
  --paper: #06162d;
  --surface: #0c2343;
  --surface-soft: #102b50;
  --ink: #edf7ff;
  --ink-soft: #c4d9ef;
  --muted: #8ca8c4;
  --line: rgba(145, 201, 255, .12);
  --line-strong: rgba(145, 201, 255, .22);
  --life: #52d3bc;
  --life-soft: rgba(17, 156, 139, .14);
  --money: #f3ba58;
  --money-soft: rgba(216, 149, 37, .14);
  --time: #9da8ff;
  --time-soft: rgba(101, 117, 223, .16);
  --free: #bd9aff;
  --free-soft: rgba(128, 91, 210, .17);
  --emergency: #ff8993;
  --emergency-soft: rgba(228, 86, 100, .15);
  --shadow-sm: 0 8px 30px rgba(0, 0, 0, .16);
  --shadow-md: 0 18px 60px rgba(0, 0, 0, .25);
  --shadow-lg: 0 30px 90px rgba(0, 0, 0, .36);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(circle at 8% 2%, rgba(90, 180, 255, .14), transparent 30%),
    radial-gradient(circle at 92% 18%, rgba(114, 221, 255, .09), transparent 26%),
    linear-gradient(180deg, #fbfdff 0%, var(--paper) 48%, #edf6ff 100%);
}
:root[data-theme="dark"] body::before {
  background:
    radial-gradient(circle at 8% 2%, rgba(31, 110, 202, .2), transparent 30%),
    radial-gradient(circle at 92% 18%, rgba(44, 142, 190, .1), transparent 26%),
    linear-gradient(180deg, #071a34 0%, var(--paper) 48%, #081f3d 100%);
}
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
button { border: 0; background: none; cursor: pointer; }
img, svg { display: block; }
::selection { color: #fff; background: var(--blue-600); }
:focus-visible { outline: 3px solid rgba(43, 139, 255, .36); outline-offset: 3px; }
[hidden] { display: none !important; }
.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ambient { position: fixed; z-index: -1; border-radius: 50%; filter: blur(2px); pointer-events: none; }
.ambient-one { width: 420px; height: 420px; right: -210px; top: 30%; border: 1px solid rgba(43, 139, 255, .08); box-shadow: 0 0 0 70px rgba(43, 139, 255, .025), 0 0 0 140px rgba(43, 139, 255, .018); }
.ambient-two { width: 240px; height: 240px; left: -130px; bottom: 8%; border: 1px solid rgba(43, 139, 255, .07); box-shadow: 0 0 0 60px rgba(43, 139, 255, .02); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  border-bottom: 1px solid transparent;
  background: rgba(250, 253, 255, .78);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  transition: border-color .2s, box-shadow .2s;
}
.site-header.scrolled { border-color: var(--line); box-shadow: 0 8px 30px rgba(13, 54, 105, .05); }
:root[data-theme="dark"] .site-header { background: rgba(6, 22, 45, .8); }
.header-inner { max-width: 1180px; height: 100%; margin: 0 auto; padding: 0 28px; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 12px; min-width: 0; }
.brand-mark { width: 42px; height: 42px; display: grid; place-items: center; flex: none; color: #fff; border-radius: 13px; background: linear-gradient(145deg, var(--blue-500), var(--blue-800)); box-shadow: 0 8px 20px rgba(23, 109, 224, .24); }
.brand-mark svg { width: 31px; height: 31px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.brand-mark.small { width: 34px; height: 34px; border-radius: 10px; }
.brand-mark.small svg { width: 25px; height: 25px; }
.brand-copy { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.brand-copy strong { font-size: 15px; letter-spacing: .02em; white-space: nowrap; }
.brand-copy small { color: var(--muted); font-size: 9px; letter-spacing: .18em; white-space: nowrap; }
.desktop-nav { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.desktop-nav a { position: relative; padding: 10px 16px; color: var(--muted); font-size: 14px; font-weight: 600; border-radius: 10px; transition: color .2s, background .2s; }
.desktop-nav a:hover { color: var(--blue-600); background: var(--surface-soft); }
.desktop-nav a.active { color: var(--blue-600); }
.desktop-nav a.active::after { content: ""; position: absolute; left: 50%; bottom: 3px; width: 4px; height: 4px; border-radius: 50%; background: currentColor; transform: translateX(-50%); }
.desktop-nav a.sos-link { color: var(--emergency); }
.header-actions { display: flex; align-items: center; gap: 8px; }
.icon-button { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink-soft); transition: transform .2s, color .2s, border-color .2s; }
.icon-button:hover { color: var(--blue-600); border-color: rgba(43, 139, 255, .35); transform: translateY(-1px); }
.icon-button:active { transform: scale(.95); }
.theme-toggle .icon { width: 18px; height: 18px; }
.header-progress { height: 38px; padding: 0 12px; display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--blue-600); font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.progress-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--blue-500); box-shadow: 0 0 0 4px rgba(43, 139, 255, .12); }

#app { min-height: calc(100vh - var(--header-h)); }
.view { width: min(1180px, calc(100% - 56px)); margin: 0 auto; padding: 34px 0 100px; animation: view-in .42s cubic-bezier(.16, 1, .3, 1) both; }
@keyframes view-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.section { margin-top: 76px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 26px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; color: var(--blue-600); font-size: 11px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.eyebrow::before { content: ""; width: 18px; height: 2px; border-radius: 2px; background: currentColor; }
.section-title { margin: 10px 0 0; font-size: clamp(26px, 3vw, 38px); line-height: 1.22; letter-spacing: -.035em; }
.section-desc { max-width: 520px; margin: 10px 0 0; color: var(--muted); font-size: 14px; line-height: 1.8; }
.text-link { display: inline-flex; align-items: center; gap: 8px; padding: 9px 0; color: var(--blue-600); font-size: 13px; font-weight: 700; white-space: nowrap; }
.text-link .icon { width: 16px; height: 16px; transition: transform .2s; }
.text-link:hover .icon { transform: translateX(4px); }
.pill { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 0 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: var(--surface); font-size: 11px; font-weight: 700; white-space: nowrap; }
.pill .icon { width: 13px; height: 13px; }
.pill.blue { color: var(--blue-600); border-color: rgba(43, 139, 255, .2); background: rgba(43, 139, 255, .07); }
.pill.life { color: var(--life); border-color: color-mix(in srgb, var(--life) 24%, transparent); background: var(--life-soft); }
.pill.money { color: var(--money); border-color: color-mix(in srgb, var(--money) 24%, transparent); background: var(--money-soft); }
.pill.time { color: var(--time); border-color: color-mix(in srgb, var(--time) 24%, transparent); background: var(--time-soft); }
.pill.free { color: var(--free); border-color: color-mix(in srgb, var(--free) 24%, transparent); background: var(--free-soft); }
.pill.emergency { color: var(--emergency); border-color: color-mix(in srgb, var(--emergency) 24%, transparent); background: var(--emergency-soft); }
.btn { min-height: 48px; padding: 0 20px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; border-radius: 14px; font-size: 14px; font-weight: 750; transition: transform .2s, box-shadow .2s, background .2s; }
.btn .icon { width: 18px; height: 18px; }
.btn-primary { color: #fff; background: linear-gradient(135deg, var(--blue-500), var(--blue-700)); box-shadow: 0 12px 26px rgba(23, 109, 224, .22); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 34px rgba(23, 109, 224, .3); }
.btn-primary:active { transform: scale(.98); }
.btn-secondary { color: var(--ink); border: 1px solid var(--line-strong); background: var(--surface); }
.btn-secondary:hover { transform: translateY(-2px); border-color: rgba(43, 139, 255, .4); }
.btn-ghost { min-height: 42px; padding: 0 14px; color: var(--ink-soft); border: 1px solid var(--line); background: transparent; }
.btn-small { min-height: 38px; padding: 0 14px; font-size: 12px; border-radius: 11px; }

.hero { position: relative; min-height: 610px; padding: 58px 64px; display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: 28px; overflow: hidden; isolation: isolate; color: #fff; border-radius: var(--radius-lg); background: linear-gradient(135deg, #062452 0%, #0a438f 50%, #1475d7 100%); box-shadow: var(--shadow-lg); }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -2; opacity: .28; background-image: linear-gradient(rgba(255,255,255,.08) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.08) 1px, transparent 1px); background-size: 46px 46px; mask-image: linear-gradient(90deg, transparent, #000 45%, #000); }
.hero::after { content: ""; position: absolute; z-index: -1; width: 720px; height: 720px; right: -280px; top: -260px; border: 1px solid rgba(255,255,255,.13); border-radius: 50%; box-shadow: 0 0 0 90px rgba(255,255,255,.025), 0 0 0 180px rgba(255,255,255,.018), 0 0 0 270px rgba(255,255,255,.012); }
.hero-copy { position: relative; z-index: 3; max-width: 570px; }
.hero-kicker { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; color: #c9ecff; border: 1px solid rgba(255,255,255,.18); border-radius: 999px; background: rgba(255,255,255,.07); font-size: 11px; font-weight: 700; letter-spacing: .08em; backdrop-filter: blur(10px); }
.hero-kicker .icon { width: 14px; height: 14px; color: var(--cyan); }
.hero h1 { margin: 24px 0 20px; font-size: clamp(48px, 5.5vw, 74px); line-height: 1.06; letter-spacing: -.065em; font-weight: 850; }
.hero h1 span { display: block; }
.hero h1 .gradient-text { color: #a8e6ff; background: linear-gradient(90deg, #fff 0%, #a8e6ff 58%, #72ddff 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero-lead { max-width: 500px; margin: 0; color: rgba(233, 247, 255, .8); font-size: 16px; line-height: 1.9; }
.hero-lead strong { color: #fff; font-weight: 700; }
.hero-actions { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 12px; }
.hero .btn-secondary { color: #eaf7ff; border-color: rgba(255,255,255,.2); background: rgba(255,255,255,.08); backdrop-filter: blur(10px); }
.hero .btn-secondary:hover { border-color: rgba(255,255,255,.42); background: rgba(255,255,255,.12); }
.hero-stats { margin-top: 38px; display: flex; align-items: stretch; gap: 0; }
.hero-stat { min-width: 110px; padding: 0 24px; border-left: 1px solid rgba(255,255,255,.16); }
.hero-stat:first-child { padding-left: 0; border-left: 0; }
.hero-stat b { display: block; color: #fff; font-size: 27px; line-height: 1; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.hero-stat span { display: block; margin-top: 8px; color: rgba(221, 242, 255, .65); font-size: 11px; letter-spacing: .04em; }
.hero-art { position: relative; min-height: 450px; display: grid; place-items: center; }
.orbit { position: absolute; width: 390px; height: 390px; border: 1px solid rgba(255,255,255,.2); border-radius: 50%; animation: orbit-spin 34s linear infinite; }
.orbit::before, .orbit::after { content: ""; position: absolute; border-radius: 50%; }
.orbit::before { inset: 42px; border: 1px dashed rgba(255,255,255,.18); }
.orbit::after { inset: 92px; border: 1px solid rgba(255,255,255,.12); }
.orbit-dot { position: absolute; width: 10px; height: 10px; border: 2px solid rgba(255,255,255,.8); border-radius: 50%; background: var(--blue-500); box-shadow: 0 0 0 7px rgba(96,182,255,.14); }
.orbit-dot.one { top: 30px; left: 82px; }
.orbit-dot.two { right: 18px; bottom: 102px; width: 7px; height: 7px; background: var(--cyan); }
.orbit-dot.three { left: 34px; bottom: 76px; width: 6px; height: 6px; background: #fff; }
@keyframes orbit-spin { to { transform: rotate(360deg); } }
.hero-compass { position: relative; z-index: 2; width: 230px; height: 230px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.24); border-radius: 50%; background: radial-gradient(circle at 35% 25%, rgba(255,255,255,.2), rgba(255,255,255,.04) 52%, rgba(4,40,91,.24)); box-shadow: inset 0 1px 0 rgba(255,255,255,.24), 0 28px 70px rgba(2, 28, 70, .28); backdrop-filter: blur(12px); }
.hero-compass::before { content: ""; position: absolute; inset: 15px; border: 1px solid rgba(255,255,255,.12); border-radius: 50%; }
.hero-compass svg { width: 150px; height: 150px; fill: none; stroke: #dff5ff; stroke-width: 1.1; }
.hero-compass .boat { animation: boat-float 5s ease-in-out infinite; transform-origin: center; }
@keyframes boat-float { 0%,100% { transform: translateY(2px) rotate(-1deg); } 50% { transform: translateY(-5px) rotate(1deg); } }
.floating-note { position: absolute; z-index: 4; display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid rgba(255,255,255,.18); border-radius: 14px; background: rgba(9, 55, 112, .48); box-shadow: 0 14px 40px rgba(1, 29, 71, .18); backdrop-filter: blur(16px); animation: note-float 6s ease-in-out infinite; }
.floating-note .note-icon { width: 32px; height: 32px; display: grid; place-items: center; color: #dff5ff; border-radius: 10px; background: rgba(255,255,255,.1); }
.floating-note .note-icon .icon { width: 17px; height: 17px; }
.floating-note b { display: block; color: #fff; font-size: 12px; }
.floating-note small { display: block; margin-top: 3px; color: rgba(222,242,255,.6); font-size: 10px; }
.floating-note.n1 { left: 0; top: 74px; }
.floating-note.n2 { right: -6px; top: 172px; animation-delay: -2s; }
.floating-note.n3 { left: 22px; bottom: 62px; animation-delay: -4s; }
@keyframes note-float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.hero-corner { position: absolute; right: 28px; bottom: 24px; color: rgba(223,245,255,.45); font-size: 9px; letter-spacing: .18em; writing-mode: vertical-rl; }

.situation-strip { margin-top: 22px; padding: 20px 22px; display: flex; align-items: center; gap: 18px; border: 1px solid var(--line); border-radius: var(--radius-md); background: rgba(255,255,255,.72); box-shadow: var(--shadow-sm); backdrop-filter: blur(14px); }
:root[data-theme="dark"] .situation-strip { background: rgba(12,35,67,.78); }
.situation-label { flex: none; display: flex; align-items: center; gap: 10px; color: var(--ink); font-size: 13px; font-weight: 750; }
.situation-label .icon { color: var(--blue-600); }
.situation-list { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.situation-list::-webkit-scrollbar { display: none; }
.situation-chip { flex: none; min-height: 36px; padding: 0 13px; display: inline-flex; align-items: center; gap: 7px; color: var(--ink-soft); border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: 12px; font-weight: 650; transition: color .2s, border-color .2s, transform .2s; }
.situation-chip:hover { color: var(--blue-600); border-color: rgba(43,139,255,.35); transform: translateY(-2px); }
.situation-chip .icon { width: 14px; height: 14px; color: var(--blue-500); }

.chapter-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.chapter-card { position: relative; min-height: 246px; padding: 24px; display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow-sm); transition: transform .25s, box-shadow .25s, border-color .25s; }
.chapter-card::after { content: ""; position: absolute; width: 150px; height: 150px; right: -62px; top: -68px; border: 1px solid var(--line); border-radius: 50%; box-shadow: 0 0 0 24px color-mix(in srgb, var(--cat) 3%, transparent); opacity: .7; }
.chapter-card:hover { transform: translateY(-5px); border-color: color-mix(in srgb, var(--cat) 35%, var(--line)); box-shadow: var(--shadow-md); }
.chapter-card-top { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.chapter-icon { width: 44px; height: 44px; display: grid; place-items: center; color: var(--cat); border-radius: 14px; background: var(--cat-soft); }
.chapter-icon .icon { width: 22px; height: 22px; }
.chapter-number { color: var(--cat); font-family: Georgia, serif; font-size: 30px; line-height: 1; letter-spacing: -.05em; opacity: .8; }
.chapter-card h3 { position: relative; z-index: 1; margin: 22px 0 10px; font-size: 19px; line-height: 1.42; letter-spacing: -.025em; }
.chapter-card p { position: relative; z-index: 1; margin: 0; display: -webkit-box; overflow: hidden; color: var(--muted); font-size: 12px; line-height: 1.75; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.chapter-card-foot { position: relative; z-index: 1; margin-top: auto; padding-top: 20px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.chapter-meta { color: var(--muted); font-size: 11px; }
.chapter-go { width: 32px; height: 32px; display: grid; place-items: center; color: var(--cat); border: 1px solid var(--line); border-radius: 50%; transition: transform .2s, background .2s; }
.chapter-go .icon { width: 15px; height: 15px; }
.chapter-card:hover .chapter-go { transform: translateX(3px); background: var(--cat-soft); }
.chapter-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: color-mix(in srgb, var(--cat) 8%, transparent); }
.chapter-progress i { display: block; height: 100%; background: var(--cat); border-radius: 0 3px 3px 0; }
.t-life { --cat: var(--life); --cat-soft: var(--life-soft); }
.t-money { --cat: var(--money); --cat-soft: var(--money-soft); }
.t-time { --cat: var(--time); --cat-soft: var(--time-soft); }
.t-free { --cat: var(--free); --cat-soft: var(--free-soft); }
.t-emergency { --cat: var(--emergency); --cat-soft: var(--emergency-soft); }

.daily-card { position: relative; padding: 34px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 26px; overflow: hidden; color: #fff; border-radius: var(--radius-md); background: linear-gradient(120deg, #0a3c7c, #146ed0); box-shadow: var(--shadow-md); }
.daily-card::after { content: "“"; position: absolute; right: 150px; top: -90px; color: rgba(255,255,255,.07); font-family: Georgia, serif; font-size: 260px; line-height: 1; }
.daily-icon { width: 64px; height: 64px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.18); border-radius: 20px; background: rgba(255,255,255,.09); }
.daily-icon .icon { width: 30px; height: 30px; color: var(--cyan); }
.daily-copy { position: relative; z-index: 1; min-width: 0; }
.daily-copy .eyebrow { color: #a8e6ff; }
.daily-copy h3 { margin: 10px 0 9px; font-size: clamp(20px, 2.4vw, 29px); line-height: 1.4; letter-spacing: -.025em; }
.daily-copy p { max-width: 760px; margin: 0; color: rgba(232,247,255,.76); font-size: 14px; line-height: 1.8; }
.daily-actions { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: stretch; gap: 10px; }
.daily-actions .btn-secondary { color: #fff; border-color: rgba(255,255,255,.2); background: rgba(255,255,255,.08); }
.daily-actions .btn-primary { color: var(--blue-800); background: #fff; box-shadow: none; }
.daily-actions .btn-primary:hover { background: #eaf7ff; }

.reading-guide { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.guide-card { padding: 26px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); }
.guide-card .guide-no { color: var(--blue-500); font-family: Georgia, serif; font-size: 14px; font-style: italic; }
.guide-card h3 { margin: 18px 0 10px; font-size: 18px; }
.guide-card p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.8; }

.page-head { margin: 10px 0 34px; display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; }
.page-head h1 { margin: 10px 0 0; font-size: clamp(32px, 4vw, 48px); line-height: 1.16; letter-spacing: -.045em; }
.page-head p { max-width: 580px; margin: 12px 0 0; color: var(--muted); font-size: 14px; line-height: 1.8; }
.page-head-aside { flex: none; text-align: right; }
.page-head-aside b { display: block; color: var(--blue-600); font-size: 30px; letter-spacing: -.04em; }
.page-head-aside span { color: var(--muted); font-size: 11px; }
.search-field { position: relative; display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 0 18px; border: 1px solid var(--line-strong); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow-sm); }
.search-field > .icon { color: var(--blue-500); }
.search-field input { flex: 1; min-width: 0; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 15px; }
.search-field input::placeholder { color: var(--muted); }
.search-field kbd { padding: 4px 7px; color: var(--muted); border: 1px solid var(--line); border-radius: 6px; background: var(--surface-soft); font-family: inherit; font-size: 10px; }
.filter-bar { margin: 22px 0 26px; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.filter-bar::-webkit-scrollbar { display: none; }
.filter-btn { flex: none; min-height: 40px; padding: 0 16px; display: inline-flex; align-items: center; gap: 7px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: 12px; font-weight: 700; transition: all .2s; }
.filter-btn .icon { width: 15px; height: 15px; }
.filter-btn:hover { color: var(--blue-600); border-color: rgba(43,139,255,.3); }
.filter-btn.active { color: #fff; border-color: var(--blue-600); background: var(--blue-600); box-shadow: 0 8px 20px rgba(23,109,224,.18); }
.library-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.library-grid .chapter-card { min-height: 230px; }
.empty-state { padding: 70px 20px; text-align: center; color: var(--muted); border: 1px dashed var(--line-strong); border-radius: var(--radius-md); background: var(--surface); }
.empty-state .empty-icon { width: 64px; height: 64px; margin: 0 auto 18px; display: grid; place-items: center; color: var(--blue-500); border-radius: 20px; background: var(--surface-soft); }
.empty-state .empty-icon .icon { width: 30px; height: 30px; }
.empty-state h3 { margin: 0 0 8px; color: var(--ink); font-size: 19px; }
.empty-state p { margin: 0; font-size: 13px; line-height: 1.7; }
.docs-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.doc-card { padding: 20px; display: flex; align-items: center; gap: 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); transition: transform .2s, border-color .2s; }
.doc-card:hover { transform: translateY(-3px); border-color: rgba(43,139,255,.3); }
.doc-card .doc-icon { width: 40px; height: 40px; display: grid; place-items: center; flex: none; color: var(--blue-600); border-radius: 12px; background: var(--surface-soft); }
.doc-card .doc-icon .icon { width: 19px; height: 19px; }
.doc-card b { display: block; font-size: 14px; line-height: 1.5; }
.doc-card small { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; }
.doc-card > .icon { margin-left: auto; width: 15px; color: var(--muted); }

.search-page .search-field { min-height: 68px; margin-top: 8px; }
.search-page .search-field input { font-size: 17px; }
.search-suggestions { margin: 18px 0 34px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.search-suggestions button { padding: 7px 11px; color: var(--ink-soft); border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: 12px; }
.search-suggestions button:hover { color: var(--blue-600); border-color: rgba(43,139,255,.3); }
.results-summary { margin-bottom: 16px; color: var(--muted); font-size: 12px; }
.results-summary b { color: var(--blue-600); }
.search-results { display: flex; flex-direction: column; gap: 12px; }
.result-card { width: 100%; padding: 22px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 18px; text-align: left; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); transition: transform .2s, border-color .2s, box-shadow .2s; }
.result-card:hover { transform: translateY(-2px); border-color: rgba(43,139,255,.3); box-shadow: var(--shadow-sm); }
.result-number { width: 46px; height: 46px; display: grid; place-items: center; color: var(--cat); border-radius: 14px; background: var(--cat-soft); font-family: Georgia, serif; font-size: 20px; }
.result-copy { min-width: 0; }
.result-copy small { color: var(--cat); font-size: 10px; font-weight: 800; letter-spacing: .08em; }
.result-copy h3 { margin: 6px 0 7px; font-size: 17px; line-height: 1.5; }
.result-copy p { margin: 0; overflow: hidden; color: var(--muted); font-size: 12px; line-height: 1.7; text-overflow: ellipsis; white-space: nowrap; }
.result-card > .icon { width: 17px; color: var(--muted); }
mark { padding: 0 2px; color: inherit; border-radius: 3px; background: rgba(96,182,255,.24); }
.load-more { margin: 24px auto 0; display: flex; }

.reader-view { width: min(900px, calc(100% - 56px)); padding-top: 24px; }
.reader-topbar { position: sticky; top: calc(var(--header-h) + 10px); z-index: 30; min-height: 60px; padding: 8px 10px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,255,.9); box-shadow: var(--shadow-sm); backdrop-filter: blur(16px); }
:root[data-theme="dark"] .reader-topbar { background: rgba(12,35,67,.9); }
.reader-back { min-height: 42px; padding: 0 12px; display: inline-flex; align-items: center; gap: 7px; color: var(--muted); border-radius: 12px; font-size: 12px; font-weight: 700; }
.reader-back:hover { color: var(--blue-600); background: var(--surface-soft); }
.reader-back .icon { width: 16px; height: 16px; }
.reader-title-wrap { min-width: 0; }
.reader-title-wrap b { display: block; overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.reader-title-wrap small { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; }
.reader-progress-line { height: 3px; margin-top: 7px; overflow: hidden; border-radius: 999px; background: var(--line); }
.reader-progress-line i { display: block; height: 100%; border-radius: inherit; background: var(--cat); transition: width .35s; }
.reader-tools { display: flex; gap: 6px; }
.reader-tools .icon-button { width: 40px; height: 40px; }
.reader-hero { position: relative; margin-top: 24px; padding: 42px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-md); background: linear-gradient(135deg, var(--surface), var(--cat-soft)); }
.reader-hero::after { content: ""; position: absolute; right: -90px; bottom: -120px; width: 300px; height: 300px; border: 1px solid color-mix(in srgb, var(--cat) 15%, transparent); border-radius: 50%; box-shadow: 0 0 0 45px color-mix(in srgb, var(--cat) 4%, transparent), 0 0 0 90px color-mix(in srgb, var(--cat) 2%, transparent); }
.reader-hero-top { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.reader-hero h1 { position: relative; z-index: 1; max-width: 700px; margin: 24px 0 14px; font-size: clamp(30px, 4vw, 44px); line-height: 1.28; letter-spacing: -.04em; }
.reader-intro { position: relative; z-index: 1; max-width: 690px; margin: 0; color: var(--ink-soft); font-size: calc(14px * var(--font-scale)); line-height: 1.9; }
.reader-stats { position: relative; z-index: 1; margin-top: 28px; display: flex; flex-wrap: wrap; gap: 10px; }
.reader-stats .pill { background: var(--surface); }
.reader-filterbar { margin: 28px 0 18px; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.reader-filterbar .filter-bar { margin: 0; }
.reader-count { flex: none; color: var(--muted); font-size: 11px; }
.entry-list { display: flex; flex-direction: column; gap: 16px; }
.entry-card { position: relative; padding: 26px; scroll-margin-top: 160px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); box-shadow: 0 4px 18px rgba(13,54,105,.035); transition: border-color .2s, box-shadow .2s; }
.entry-card.highlight { border-color: var(--blue-500); box-shadow: 0 0 0 4px rgba(43,139,255,.1), var(--shadow-sm); }
.entry-card.is-done { border-color: color-mix(in srgb, var(--life) 28%, var(--line)); }
.entry-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.entry-ident { display: flex; align-items: center; gap: 13px; }
.entry-num { color: var(--cat); font-family: Georgia, serif; font-size: 36px; line-height: 1; letter-spacing: -.05em; }
.entry-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.entry-tags .pill { min-height: 24px; padding: 0 8px; font-size: 10px; }
.entry-actions { display: flex; gap: 6px; }
.entry-action { width: 34px; height: 34px; display: grid; place-items: center; color: var(--muted); border: 1px solid var(--line); border-radius: 10px; background: var(--surface); transition: all .2s; }
.entry-action .icon { width: 16px; height: 16px; }
.entry-action:hover { color: var(--blue-600); border-color: rgba(43,139,255,.3); }
.entry-action.active.star { color: var(--money); border-color: color-mix(in srgb, var(--money) 28%, var(--line)); background: var(--money-soft); }
.entry-action.active.star .icon { fill: currentColor; }
.entry-action.active.done { color: var(--life); border-color: color-mix(in srgb, var(--life) 28%, var(--line)); background: var(--life-soft); }
.entry-card h2 { margin: 20px 0 12px; font-size: calc(20px * var(--font-scale)); line-height: 1.5; letter-spacing: -.02em; }
.entry-plain { margin: 0; color: var(--ink-soft); font-size: calc(15px * var(--font-scale)); line-height: 1.9; }
.entry-cost { margin-top: 18px; padding: 12px 14px; display: flex; align-items: flex-start; gap: 10px; color: var(--muted); border-radius: 12px; background: var(--surface-soft); font-size: 12px; line-height: 1.7; }
.entry-cost b { flex: none; color: var(--blue-600); font-size: 11px; }
.entry-details { margin-top: 16px; border-top: 1px solid var(--line); }
.entry-details summary { min-height: 46px; display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--blue-600); font-size: 12px; font-weight: 750; cursor: pointer; list-style: none; }
.entry-details summary::-webkit-details-marker { display: none; }
.entry-details summary .icon { width: 15px; height: 15px; transition: transform .2s; }
.entry-details[open] summary .icon { transform: rotate(180deg); }
.entry-detail-body { padding: 4px 0 8px; color: var(--ink-soft); font-size: calc(13px * var(--font-scale)); line-height: 1.85; }
.entry-detail-body h4 { margin: 16px 0 6px; color: var(--muted); font-size: 11px; letter-spacing: .05em; }
.entry-detail-body p { margin: 0; }
.entry-detail-body .note { margin-top: 14px; padding: 12px 14px; border-left: 3px solid var(--money); border-radius: 0 10px 10px 0; background: var(--money-soft); }
.source-links { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 7px; }
.source-links a { padding: 6px 9px; display: inline-flex; align-items: center; gap: 5px; color: var(--blue-600); border: 1px solid var(--line); border-radius: 8px; background: var(--surface-soft); font-size: 10px; }
.source-links a .icon { width: 11px; height: 11px; }
.reader-end { margin-top: 28px; padding: 32px; text-align: center; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); }
.reader-end .end-mark { width: 46px; height: 46px; margin: 0 auto 14px; display: grid; place-items: center; color: var(--cat); border-radius: 50%; background: var(--cat-soft); }
.reader-end h3 { margin: 0 0 8px; font-size: 20px; }
.reader-end p { margin: 0 0 20px; color: var(--muted); font-size: 13px; line-height: 1.7; }
.reader-end-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; }
.reader-dock { position: fixed; z-index: 45; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); width: min(560px, calc(100% - 32px)); min-height: 66px; padding: 6px; display: none; grid-template-columns: 1fr 1fr 1.4fr; gap: 5px; border: 1px solid var(--line-strong); border-radius: 19px; background: rgba(255,255,255,.94); box-shadow: var(--shadow-md); backdrop-filter: blur(18px); transform: translateX(-50%); }
:root[data-theme="dark"] .reader-dock { background: rgba(12,35,67,.94); }
body.reader-mode .reader-dock { display: grid; }
body.reader-mode .mobile-tabbar { display: none; }
.dock-action { display: flex; align-items: center; justify-content: center; gap: 7px; color: var(--muted); border-radius: 13px; font-size: 12px; font-weight: 750; }
.dock-action .icon { width: 17px; height: 17px; }
.dock-action.active { color: var(--money); background: var(--money-soft); }
.dock-action.done.active { color: var(--life); background: var(--life-soft); }
.dock-next { color: #fff; background: var(--blue-600); }
.dock-next .icon { color: #fff; }

.sos-banner { position: relative; padding: 30px 34px; display: flex; align-items: center; justify-content: space-between; gap: 24px; overflow: hidden; color: #fff; border-radius: var(--radius-md); background: linear-gradient(120deg, #b93246, #e45a67); box-shadow: 0 20px 50px rgba(193, 52, 72, .18); }
.sos-banner::after { content: ""; position: absolute; right: -40px; top: -110px; width: 280px; height: 280px; border: 1px solid rgba(255,255,255,.18); border-radius: 50%; box-shadow: 0 0 0 45px rgba(255,255,255,.04), 0 0 0 90px rgba(255,255,255,.025); }
.sos-banner-copy { position: relative; z-index: 1; display: flex; align-items: center; gap: 18px; }
.sos-banner-icon { width: 58px; height: 58px; display: grid; place-items: center; flex: none; border: 1px solid rgba(255,255,255,.2); border-radius: 18px; background: rgba(255,255,255,.1); }
.sos-banner-icon .icon { width: 28px; height: 28px; }
.sos-banner h2 { margin: 0 0 7px; font-size: 22px; }
.sos-banner p { margin: 0; color: rgba(255,255,255,.78); font-size: 13px; }
.sos-banner .btn { position: relative; z-index: 1; color: #b93246; background: #fff; }
.sos-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.sos-card { padding: 24px; text-align: left; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); transition: transform .2s, border-color .2s, box-shadow .2s; }
.sos-card:hover { transform: translateY(-4px); border-color: rgba(228,86,100,.3); box-shadow: var(--shadow-sm); }
.sos-card-icon { width: 46px; height: 46px; display: grid; place-items: center; color: var(--emergency); border-radius: 14px; background: var(--emergency-soft); }
.sos-card-icon .icon { width: 23px; height: 23px; }
.sos-card h3 { margin: 20px 0 9px; font-size: 18px; }
.sos-card p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.75; }
.sos-card-foot { margin-top: 18px; display: flex; align-items: center; justify-content: space-between; color: var(--emergency); font-size: 11px; font-weight: 750; }
.sos-card-foot .icon { width: 15px; height: 15px; }
.cpr-card { margin-top: 18px; padding: 34px; display: grid; grid-template-columns: 1fr 1.1fr; align-items: center; gap: 34px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); }
.metro-wrap { position: relative; width: 190px; height: 190px; margin: 0 auto; display: grid; place-items: center; }
.metro-ring { position: absolute; inset: 0; border: 2px solid rgba(228,86,100,.28); border-radius: 50%; opacity: 0; }
.metro-ball { width: 158px; height: 158px; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #fff; border-radius: 50%; background: linear-gradient(145deg, #ee6875, #c93b50); box-shadow: 0 20px 44px rgba(201,59,80,.25); }
.metro-ball b { font-size: 38px; line-height: 1; letter-spacing: -.04em; }
.metro-ball small { margin-top: 7px; color: rgba(255,255,255,.75); font-size: 11px; }
.metro-wrap.running .metro-ring { animation: metro-pulse .6s ease-out infinite; }
.metro-wrap.running .metro-ball { animation: metro-beat .6s ease-in-out infinite; }
@keyframes metro-pulse { from { transform: scale(.88); opacity: .7; } to { transform: scale(1.22); opacity: 0; } }
@keyframes metro-beat { 0%,100% { transform: scale(1); } 18% { transform: scale(.95); } 42% { transform: scale(1.03); } }
.cpr-copy h2 { margin: 0 0 10px; font-size: 27px; letter-spacing: -.03em; }
.cpr-copy > p { margin: 0 0 22px; color: var(--muted); font-size: 13px; line-height: 1.8; }
.cpr-steps { display: grid; gap: 10px; }
.cpr-step { display: flex; align-items: flex-start; gap: 12px; color: var(--ink-soft); font-size: 13px; line-height: 1.65; }
.cpr-step b { width: 24px; height: 24px; display: grid; place-items: center; flex: none; color: var(--emergency); border-radius: 8px; background: var(--emergency-soft); font-size: 11px; }
.cpr-controls { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 10px; }
.safety-note { margin-top: 18px; padding: 18px 20px; display: flex; align-items: flex-start; gap: 12px; color: var(--ink-soft); border: 1px solid var(--line); border-radius: 16px; background: var(--surface); font-size: 12px; line-height: 1.8; }
.safety-note .icon { margin-top: 2px; color: var(--emergency); }

.profile-overview { display: grid; grid-template-columns: 1.2fr .8fr; gap: 18px; }
.profile-card { padding: 30px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow-sm); }
.profile-card h2 { margin: 0 0 8px; font-size: 22px; }
.profile-card > p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.progress-ring-card { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 26px; }
.progress-ring { position: relative; width: 136px; height: 136px; display: grid; place-items: center; flex: none; }
.progress-ring svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.progress-ring circle { fill: none; stroke-width: 9; }
.progress-ring .ring-bg { stroke: var(--surface-soft); }
.progress-ring .ring-value { stroke: var(--blue-600); stroke-linecap: round; transition: stroke-dashoffset .5s; }
.progress-ring-copy { text-align: center; }
.progress-ring-copy b { display: block; font-size: 30px; letter-spacing: -.05em; }
.progress-ring-copy span { color: var(--muted); font-size: 10px; }
.profile-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 22px; }
.profile-metric { padding: 14px 10px; text-align: center; border-radius: 14px; background: var(--surface-soft); }
.profile-metric b { display: block; color: var(--blue-600); font-size: 22px; }
.profile-metric span { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; }
.profile-message { position: relative; overflow: hidden; color: #fff; border: 0; background: linear-gradient(135deg, #0a3c7c, #146ed0); }
.profile-message::after { content: ""; position: absolute; right: -90px; bottom: -100px; width: 240px; height: 240px; border: 1px solid rgba(255,255,255,.15); border-radius: 50%; box-shadow: 0 0 0 40px rgba(255,255,255,.04); }
.profile-message h2, .profile-message p { position: relative; z-index: 1; }
.profile-message h2 { margin-top: 30px; font-size: 30px; line-height: 1.3; letter-spacing: -.04em; }
.profile-message p { color: rgba(232,247,255,.74); }
.profile-message .btn { position: relative; z-index: 1; margin-top: 26px; color: var(--blue-800); background: #fff; }
.profile-columns { margin-top: 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.profile-list-card { padding: 26px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); }
.profile-list-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.profile-list-head h2 { margin: 0; font-size: 18px; }
.profile-list-head span { color: var(--muted); font-size: 11px; }
.profile-list { display: flex; flex-direction: column; gap: 8px; }
.profile-item { padding: 13px 14px; display: flex; align-items: center; gap: 12px; border-radius: 13px; background: var(--surface-soft); transition: background .2s; }
.profile-item:hover { background: var(--ice); }
:root[data-theme="dark"] .profile-item:hover { background: var(--blue-800); }
.profile-item .item-icon { width: 34px; height: 34px; display: grid; place-items: center; flex: none; color: var(--cat); border-radius: 10px; background: var(--surface); }
.profile-item .item-icon .icon { width: 17px; height: 17px; }
.profile-item .item-copy { min-width: 0; flex: 1; }
.profile-item b { display: block; overflow: hidden; font-size: 12px; line-height: 1.5; text-overflow: ellipsis; white-space: nowrap; }
.profile-item small { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }
.profile-item > .icon { width: 14px; color: var(--muted); }
.profile-empty { padding: 28px 14px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: 14px; font-size: 12px; line-height: 1.7; }
.settings-card { margin-top: 18px; padding: 26px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); }
.settings-card h2 { margin: 0 0 20px; font-size: 18px; }
.setting-row { min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-top: 1px solid var(--line); }
.setting-row:first-of-type { border-top: 0; }
.setting-copy b { display: block; font-size: 13px; }
.setting-copy small { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; }
.segmented { padding: 3px; display: flex; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-soft); }
.segmented button { min-width: 44px; height: 30px; padding: 0 10px; color: var(--muted); border-radius: 8px; font-size: 11px; font-weight: 700; }
.segmented button.active { color: #fff; background: var(--blue-600); }
.switch { position: relative; width: 44px; height: 26px; border-radius: 999px; background: var(--line-strong); transition: background .2s; }
.switch::after { content: ""; position: absolute; width: 20px; height: 20px; left: 3px; top: 3px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.16); transition: transform .2s; }
.switch.on { background: var(--blue-600); }
.switch.on::after { transform: translateX(18px); }
.danger-text { color: var(--emergency) !important; }

.doc-view { width: min(860px, calc(100% - 56px)); }
.doc-article { padding: 44px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow-sm); }
.doc-article h1 { margin: 18px 0 14px; font-size: clamp(28px, 4vw, 42px); line-height: 1.3; letter-spacing: -.035em; }
.doc-article h2 { margin: 34px 0 12px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 22px; line-height: 1.45; }
.doc-article h3 { margin: 24px 0 10px; font-size: 17px; }
.doc-article p, .doc-article li { color: var(--ink-soft); font-size: calc(14px * var(--font-scale)); line-height: 1.95; }
.doc-article p { margin: 10px 0; }
.doc-article ul, .doc-article ol { padding-left: 22px; }
.doc-table-wrap { margin: 18px 0; overflow-x: auto; }
.doc-article table { width: 100%; border-collapse: collapse; font-size: 12px; }
.doc-article th, .doc-article td { padding: 10px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.doc-article th { background: var(--surface-soft); }
.doc-article a { color: var(--blue-600); text-decoration: underline; text-underline-offset: 3px; }
.doc-article blockquote { margin: 18px 0; padding: 14px 18px; border-left: 3px solid var(--blue-500); background: var(--surface-soft); }

.site-footer { padding: 0 28px 110px; }
.footer-inner { max-width: 1180px; margin: 0 auto; padding-top: 28px; border-top: 1px solid var(--line); }
.footer-brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-size: 13px; font-weight: 700; }
.footer-inner > p { margin: 12px 0 0; color: var(--muted); font-size: 11px; line-height: 1.7; }
.footer-inner > p.disclaimer { max-width: 760px; color: var(--muted); opacity: .8; }
.mobile-tabbar { display: none; }
.toast { position: fixed; z-index: 100; left: 50%; bottom: 30px; max-width: calc(100% - 32px); padding: 11px 17px; color: #fff; border-radius: 12px; background: rgba(6,26,54,.92); box-shadow: var(--shadow-md); font-size: 12px; font-weight: 650; opacity: 0; pointer-events: none; transform: translate(-50%, 14px); transition: opacity .22s, transform .22s; backdrop-filter: blur(14px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
body.reader-mode .toast { bottom: 100px; }
.modal-mask { position: fixed; inset: 0; z-index: 80; padding: 24px; display: grid; place-items: center; background: rgba(3,18,39,.48); backdrop-filter: blur(8px); animation: fade-in .2s ease both; }
.modal { width: min(440px, 100%); padding: 26px; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); box-shadow: var(--shadow-lg); animation: modal-in .25s cubic-bezier(.16,1,.3,1) both; }
.modal-icon { width: 48px; height: 48px; margin-bottom: 18px; display: grid; place-items: center; color: var(--blue-600); border-radius: 15px; background: var(--surface-soft); }
.modal-icon.danger { color: var(--emergency); background: var(--emergency-soft); }
.modal h3 { margin: 0 0 9px; font-size: 21px; }
.modal p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.8; }
.modal-actions { margin-top: 24px; display: flex; justify-content: flex-end; gap: 9px; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes modal-in { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }

@media (max-width: 1020px) {
  .hero { padding: 48px 42px; grid-template-columns: 1fr .85fr; }
  .hero h1 { font-size: 58px; }
  .orbit { width: 330px; height: 330px; }
  .hero-compass { width: 200px; height: 200px; }
  .floating-note.n1 { left: -10px; }
  .floating-note.n2 { right: -14px; }
  .chapter-grid, .library-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .docs-grid { grid-template-columns: repeat(2, 1fr); }
  .daily-card { grid-template-columns: auto 1fr; }
  .daily-actions { grid-column: 1 / -1; flex-direction: row; justify-content: flex-end; }
  .sos-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  :root { --header-h: 66px; }
  .header-inner { padding: 0 18px; gap: 12px; }
  .brand { gap: 9px; }
  .brand-mark { width: 36px; height: 36px; border-radius: 11px; }
  .brand-mark svg { width: 27px; height: 27px; }
  .brand-copy strong { font-size: 13px; }
  .brand-copy small { font-size: 7px; letter-spacing: .14em; }
  .desktop-nav { display: none; }
  .header-actions { margin-left: auto; gap: 6px; }
  .header-actions .icon-button { width: 34px; height: 34px; border-radius: 10px; }
  .header-progress { display: none; }
  .view { width: calc(100% - 32px); padding: 18px 0 94px; }
  .hero { min-height: auto; padding: 30px 24px 22px; grid-template-columns: 1fr; gap: 4px; border-radius: 24px; }
  .hero::after { width: 500px; height: 500px; right: -260px; top: 110px; }
  .hero-kicker { padding: 7px 10px; font-size: 9px; }
  .hero h1 { margin: 20px 0 15px; font-size: clamp(42px, 12vw, 58px); line-height: 1.08; }
  .hero-lead { font-size: 13px; line-height: 1.85; }
  .hero-actions { margin-top: 22px; gap: 9px; }
  .hero-actions .btn { min-height: 44px; padding: 0 15px; font-size: 12px; }
  .hero-stats { margin-top: 26px; }
  .hero-stat { min-width: 0; flex: 1; padding: 0 15px; }
  .hero-stat b { font-size: 22px; }
  .hero-stat span { margin-top: 6px; font-size: 9px; }
  .hero-art { min-height: 280px; margin-top: 4px; }
  .orbit { width: 250px; height: 250px; }
  .orbit::before { inset: 30px; }
  .orbit::after { inset: 65px; }
  .hero-compass { width: 154px; height: 154px; }
  .hero-compass svg { width: 110px; height: 110px; }
  .floating-note { padding: 9px 10px; gap: 7px; border-radius: 11px; }
  .floating-note .note-icon { width: 26px; height: 26px; border-radius: 8px; }
  .floating-note .note-icon .icon { width: 14px; height: 14px; }
  .floating-note b { font-size: 10px; }
  .floating-note small { font-size: 8px; }
  .floating-note.n1 { left: 0; top: 24px; }
  .floating-note.n2 { right: 0; top: 112px; }
  .floating-note.n3 { left: 8px; bottom: 24px; }
  .hero-corner { display: none; }
  .situation-strip { margin-top: 12px; padding: 15px; display: block; border-radius: 17px; }
  .situation-label { margin-bottom: 12px; font-size: 12px; }
  .situation-list { margin: 0 -15px; padding: 0 15px 2px; }
  .situation-chip { min-height: 34px; font-size: 11px; }
  .section { margin-top: 52px; }
  .section-head { margin-bottom: 20px; align-items: flex-start; }
  .section-title { font-size: 26px; }
  .section-desc { font-size: 12px; }
  .section-head .text-link { margin-top: 24px; font-size: 11px; }
  .chapter-grid, .library-grid { grid-template-columns: 1fr; gap: 12px; }
  .chapter-card { min-height: 218px; padding: 20px; border-radius: 18px; }
  .chapter-card h3 { margin-top: 18px; font-size: 18px; }
  .chapter-card p { -webkit-line-clamp: 2; }
  .chapter-card-foot { padding-top: 16px; }
  .chapter-icon { width: 40px; height: 40px; border-radius: 12px; }
  .chapter-number { font-size: 27px; }
  .daily-card { padding: 24px; grid-template-columns: 1fr; gap: 18px; border-radius: 20px; }
  .daily-icon { width: 48px; height: 48px; border-radius: 15px; }
  .daily-icon .icon { width: 23px; height: 23px; }
  .daily-copy h3 { font-size: 21px; }
  .daily-copy p { font-size: 12px; }
  .daily-actions { grid-column: auto; flex-direction: row; justify-content: stretch; }
  .daily-actions .btn { flex: 1; min-height: 42px; padding: 0 12px; font-size: 11px; }
  .reading-guide { grid-template-columns: 1fr; gap: 12px; }
  .guide-card { padding: 22px; }
  .page-head { margin-top: 6px; display: block; }
  .page-head h1 { font-size: 32px; }
  .page-head p { font-size: 12px; }
  .page-head-aside { margin-top: 18px; display: flex; align-items: baseline; gap: 8px; text-align: left; }
  .page-head-aside b { font-size: 23px; }
  .search-field { min-height: 52px; padding: 0 14px; border-radius: 15px; }
  .search-field kbd { display: none; }
  .filter-bar { margin: 16px 0 20px; }
  .filter-btn { min-height: 36px; padding: 0 13px; font-size: 11px; }
  .docs-grid { grid-template-columns: 1fr; }
  .result-card { padding: 17px; grid-template-columns: auto 1fr auto; gap: 12px; border-radius: 15px; }
  .result-number { width: 38px; height: 38px; border-radius: 11px; font-size: 17px; }
  .result-copy h3 { font-size: 14px; }
  .result-copy p { font-size: 11px; }
  .reader-view, .doc-view { width: calc(100% - 32px); padding-top: 12px; }
  .reader-topbar { top: calc(var(--header-h) + 6px); min-height: 56px; padding: 6px; gap: 7px; border-radius: 15px; }
  .reader-back { width: 38px; min-height: 38px; padding: 0; justify-content: center; }
  .reader-back span { display: none; }
  .reader-tools .icon-button { width: 36px; height: 36px; }
  .reader-tools .share-tool { display: none; }
  .reader-hero { margin-top: 16px; padding: 26px 22px; border-radius: 20px; }
  .reader-hero h1 { margin-top: 20px; font-size: 29px; }
  .reader-intro { font-size: calc(13px * var(--font-scale)); }
  .reader-stats { margin-top: 22px; }
  .reader-filterbar { margin: 22px 0 14px; align-items: flex-start; flex-direction: column; }
  .reader-count { align-self: flex-end; margin-top: -4px; }
  .entry-card { padding: 20px; border-radius: 17px; }
  .entry-head { gap: 10px; }
  .entry-ident { align-items: flex-start; gap: 10px; }
  .entry-num { font-size: 30px; }
  .entry-tags .pill { min-height: 22px; font-size: 9px; }
  .entry-actions { gap: 4px; }
  .entry-action { width: 31px; height: 31px; border-radius: 9px; }
  .entry-card h2 { margin-top: 17px; font-size: calc(18px * var(--font-scale)); }
  .entry-plain { font-size: calc(14px * var(--font-scale)); line-height: 1.85; }
  .reader-end { padding: 26px 18px; }
  .reader-end-actions .btn { flex: 1; padding: 0 12px; font-size: 11px; }
  .reader-dock { bottom: calc(10px + env(safe-area-inset-bottom)); }
  .sos-banner { padding: 24px; display: block; border-radius: 20px; }
  .sos-banner-copy { align-items: flex-start; gap: 14px; }
  .sos-banner-icon { width: 46px; height: 46px; border-radius: 14px; }
  .sos-banner h2 { font-size: 18px; }
  .sos-banner p { font-size: 11px; line-height: 1.7; }
  .sos-banner .btn { margin-top: 18px; min-height: 40px; font-size: 11px; }
  .sos-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .sos-card { padding: 18px; border-radius: 16px; }
  .sos-card h3 { margin-top: 16px; font-size: 15px; }
  .sos-card p { font-size: 11px; }
  .sos-card-icon { width: 40px; height: 40px; border-radius: 12px; }
  .cpr-card { padding: 24px; grid-template-columns: 1fr; gap: 24px; }
  .metro-wrap { width: 160px; height: 160px; }
  .metro-ball { width: 136px; height: 136px; }
  .cpr-copy h2 { font-size: 23px; }
  .cpr-controls .btn { flex: 1; padding: 0 12px; font-size: 11px; }
  .profile-overview { grid-template-columns: 1fr; }
  .profile-card { padding: 24px; }
  .progress-ring-card { gap: 20px; }
  .progress-ring { width: 116px; height: 116px; }
  .profile-message h2 { margin-top: 22px; font-size: 25px; }
  .profile-columns { grid-template-columns: 1fr; }
  .profile-list-card { padding: 22px; }
  .setting-row { align-items: flex-start; flex-direction: column; gap: 12px; padding: 15px 0; }
  .setting-row .segmented, .setting-row .switch { align-self: flex-end; margin-top: -38px; }
  .doc-article { padding: 26px 22px; }
  .site-footer { padding: 0 18px 100px; }
  .footer-inner { padding-top: 24px; }
  .mobile-tabbar { position: fixed; z-index: 48; left: 50%; bottom: calc(9px + env(safe-area-inset-bottom)); width: min(420px, calc(100% - 20px)); height: 64px; padding: 5px; display: grid; grid-template-columns: repeat(5, 1fr); gap: 2px; border: 1px solid var(--line-strong); border-radius: 20px; background: rgba(255,255,255,.94); box-shadow: var(--shadow-md); backdrop-filter: blur(18px); transform: translateX(-50%); }
  :root[data-theme="dark"] .mobile-tabbar { background: rgba(12,35,67,.94); }
  .mobile-tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--muted); border-radius: 14px; font-size: 9px; font-weight: 700; }
  .mobile-tabbar a .icon { width: 19px; height: 19px; }
  .mobile-tabbar a.active { color: var(--blue-600); background: rgba(43,139,255,.09); }
  .mobile-tabbar a.tab-search .icon { width: 21px; height: 21px; }
  .mobile-tabbar a.tab-sos { color: var(--emergency); }
  .mobile-tabbar a.tab-sos.active { background: var(--emergency-soft); }
  .toast { bottom: 86px; font-size: 11px; }
  body.reader-mode .toast { bottom: 92px; }
  .modal-mask { padding: 18px; align-items: end; }
  .modal { padding: 24px; border-radius: 22px 22px 18px 18px; }
}

@media (max-width: 380px) {
  .brand-copy small { display: none; }
  .header-actions .theme-toggle { display: none; }
  .hero { padding: 26px 20px 20px; }
  .hero h1 { font-size: 42px; }
  .hero-stat { padding: 0 12px; }
  .hero-art { min-height: 260px; }
  .orbit { width: 228px; height: 228px; }
  .hero-compass { width: 142px; height: 142px; }
  .floating-note.n2 { top: 104px; }
  .section-head { display: block; }
  .section-head .text-link { margin-top: 10px; }
  .entry-tags .pill:nth-child(n+3) { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
