:root {
  --paper: #f4f0e6;
  --paper-deep: #e9e2d2;
  --surface: rgba(255, 253, 247, .88);
  --ink: #263029;
  --muted: #72786f;
  --line: rgba(54, 67, 56, .14);
  --green: #405f4b;
  --green-soft: #dfe8dc;
  --moss: #7a8b68;
  --red: #a14836;
  --gold: #a78650;
  --shadow: 0 18px 50px rgba(51, 59, 48, .09);
  --radius: 24px;
}

* { box-sizing: border-box; }
html { color-scheme: light; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: "Songti SC", "STSong", "Noto Serif SC", Georgia, serif; min-height: 100vh; }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.eyebrow { margin: 0 0 8px; color: var(--gold); font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif; font-size: 11px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; }

body::before { content: ""; position: fixed; inset: 0; pointer-events: none; opacity: .25; background-image: radial-gradient(rgba(50, 60, 50, .16) .6px, transparent .7px); background-size: 7px 7px; mix-blend-mode: multiply; }

.auth-shell { min-height: 100vh; display: grid; grid-template-columns: 1.1fr .9fr; position: relative; }
.auth-story { display: flex; flex-direction: column; justify-content: center; padding: 8vw; background: linear-gradient(145deg, #e5e7d7 0%, #d7dfd1 55%, #cdd7c7 100%); position: relative; overflow: hidden; }
.auth-story::after { content: "觀\A身"; white-space: pre; position: absolute; right: -2vw; bottom: -9vw; font-size: 28vw; line-height: .75; color: rgba(255,255,255,.2); font-weight: 800; }
.brand-mark, .mini-mark { display: grid; place-items: center; border: 1px solid currentColor; color: var(--red); }
.brand-mark { width: 68px; height: 68px; font-size: 32px; margin-bottom: 40px; transform: rotate(-2deg); }
.auth-story h1 { font-size: clamp(52px, 7vw, 98px); font-weight: 500; letter-spacing: .08em; margin: 0 0 22px; }
.auth-lead { max-width: 600px; font-size: clamp(18px, 2vw, 27px); line-height: 1.8; margin: 0; }
.seal-row { display: flex; gap: 14px; margin-top: 48px; }
.seal-row span { border: 1px solid rgba(38,48,41,.45); padding: 8px 12px; writing-mode: vertical-rl; letter-spacing: .2em; }
.quiet-note { margin-top: 48px; color: rgba(38,48,41,.65); font-size: 13px; font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif; }
.auth-card { width: min(460px, calc(100% - 48px)); align-self: center; justify-self: center; padding: 42px; border-radius: 30px; background: rgba(255,255,255,.7); box-shadow: var(--shadow); backdrop-filter: blur(18px); }
.auth-tabs { display: flex; border-bottom: 1px solid var(--line); margin-bottom: 30px; }
.auth-tab { flex: 1; padding: 14px; border: 0; background: none; color: var(--muted); cursor: pointer; position: relative; }
.auth-tab.active { color: var(--ink); font-weight: 700; }
.auth-tab.active::after { content: ""; position: absolute; height: 2px; left: 25%; right: 25%; bottom: -1px; background: var(--red); }
.auth-form, .dialog-form { display: grid; gap: 18px; }
label { display: grid; gap: 8px; color: #596159; font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif; font-size: 13px; }
input, select, textarea { width: 100%; border: 1px solid var(--line); border-radius: 13px; background: rgba(255,255,255,.66); color: var(--ink); padding: 13px 14px; outline: none; transition: border .2s, box-shadow .2s; }
input:focus, select:focus, textarea:focus { border-color: rgba(64,95,75,.55); box-shadow: 0 0 0 4px rgba(64,95,75,.08); }
textarea { resize: vertical; line-height: 1.7; }

.primary, .outline-button, .round-button, .icon-button { border: 0; cursor: pointer; transition: transform .18s, background .18s; }
.primary { background: var(--green); color: #fff; border-radius: 14px; padding: 13px 20px; box-shadow: 0 9px 25px rgba(64,95,75,.18); }
.primary:hover, .round-button:hover { transform: translateY(-2px); }
.wide { width: 100%; }
.text-button, .link-button { border: 0; background: none; padding: 4px; color: var(--green); cursor: pointer; }
.outline-button { border: 1px solid var(--green); background: transparent; color: var(--green); padding: 11px 16px; border-radius: 12px; }
.round-button { width: 45px; height: 45px; border-radius: 50%; background: rgba(255,255,255,.82); font-size: 22px; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 250px 1fr; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 250px; background: rgba(235, 231, 218, .92); backdrop-filter: blur(16px); border-right: 1px solid var(--line); padding: 28px 18px 20px; display: flex; flex-direction: column; z-index: 20; }
.side-brand { display: flex; align-items: center; gap: 13px; padding: 0 10px 30px; }
.mini-mark { width: 42px; height: 42px; font-size: 20px; }
.side-brand strong { display: block; font-size: 19px; letter-spacing: .1em; }
.side-brand small, .user-chip small { display: block; color: var(--muted); margin-top: 3px; font-size: 11px; letter-spacing: .1em; }
nav { display: grid; gap: 5px; }
.nav-item { display: flex; align-items: center; gap: 13px; width: 100%; border: 0; background: transparent; border-radius: 14px; padding: 12px 14px; color: #656c65; cursor: pointer; text-align: left; }
.nav-item span { width: 22px; text-align: center; color: var(--gold); font-size: 17px; }
.nav-item:hover, .nav-item.active { background: rgba(255,255,255,.62); color: var(--ink); }
.nav-item.active { box-shadow: 0 6px 18px rgba(58,65,54,.05); }
.nav-item.active::after { content: ""; margin-left: auto; width: 5px; height: 5px; border-radius: 50%; background: var(--red); }
.nav-item em { margin-left: auto; font-size: 10px; color: var(--gold); font-style: normal; border: 1px solid rgba(167,134,80,.35); padding: 2px 6px; border-radius: 10px; }
.side-bottom { margin-top: auto; display: grid; gap: 8px; }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 15px; background: rgba(255,255,255,.42); cursor: pointer; text-align: left; }
.user-chip > span:first-child { width: 35px; height: 35px; border-radius: 50%; background: var(--green); color: white; display: grid; place-items: center; }
.main-content { grid-column: 2; min-width: 0; padding: 48px clamp(24px, 4vw, 70px) 80px; }
.mobile-header { display: none; }
.page { display: none; max-width: 1380px; margin: 0 auto; animation: rise .35s ease; }
.page.active { display: block; }
@keyframes rise { from { opacity: 0; transform: translateY(9px); } }
.page-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 34px; }
.page-heading h2 { margin: 0; font-weight: 500; font-size: clamp(30px, 4vw, 48px); letter-spacing: .03em; }
.page-heading.compact { margin-bottom: 26px; }
.date-input { width: auto; background: transparent; }
.card, .consult-shell { background: var(--surface); border: 1px solid rgba(255,255,255,.85); box-shadow: var(--shadow); border-radius: var(--radius); }
.hero-grid { display: grid; grid-template-columns: .8fr 1.5fr 1fr; gap: 18px; }
.day-card { min-height: 170px; padding: 25px; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 14px; }
.day-number { font: 500 72px/1 Georgia, serif; color: var(--green); }
.day-card > div:nth-child(2) span, .day-card > div:nth-child(2) strong { display: block; }
.day-card > div:nth-child(2) span { color: var(--muted); }
.day-card > div:nth-child(2) strong { margin-top: 5px; }
.streak { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 13px; display: flex; align-items: baseline; gap: 9px; }
.streak b { color: var(--red); font-size: 21px; }
.streak span { color: var(--muted); font-size: 12px; }
.summary-card { padding: 26px 30px; }
.card-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-weight: 700; }
.card-title small { color: var(--muted); font-weight: 400; }
.summary-card p { line-height: 1.8; color: #5f665f; min-height: 56px; }
.learn-card { padding: 26px; background: linear-gradient(145deg, #6e7e64, #3f5c49); color: white; display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; overflow: hidden; position: relative; }
.learn-card::after { content: attr(data-symbol); position: absolute; font-size: 160px; color: rgba(255,255,255,.06); right: -18px; top: -25px; }
.learn-content { position: relative; z-index: 1; min-width: 0; }
.learn-card small { color: rgba(255,255,255,.65); }
.learn-card h3 { font-size: 20px; line-height: 1.4; font-weight: 500; margin: 10px 0 7px; }
.learn-card p { display: -webkit-box; margin: 0; overflow: hidden; color: rgba(255,255,255,.86); font-size: 12px; line-height: 1.65; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.learn-card em { display: none; margin-top: 10px; color: rgba(255,255,255,.65); font-size: 10px; font-style: normal; line-height: 1.55; }
.learn-card .round-button { position: relative; z-index: 1; flex: none; }
.section-heading { display: flex; justify-content: space-between; align-items: flex-end; margin: 48px 0 20px; }
.section-heading h3 { margin: 0; font-size: 24px; font-weight: 500; }
.principle-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.principle-card { padding: 21px; border-radius: 20px; background: rgba(255,253,247,.75); border: 1px solid var(--line); }
.principle-card header { display: flex; justify-content: space-between; align-items: center; }
.principle-card header b { font-size: 18px; }
.principle-card header span { color: var(--red); font-size: 12px; }
.axis { margin-top: 18px; }
.axis-labels { display: flex; justify-content: space-between; color: var(--muted); font-size: 11px; margin-bottom: 7px; }
.axis-track { height: 7px; border-radius: 10px; background: linear-gradient(90deg, #778e78, #e5dfd0 50%, #a8614c); position: relative; }
.axis-dot { width: 14px; height: 14px; border: 3px solid white; box-shadow: 0 2px 6px rgba(0,0,0,.15); border-radius: 50%; background: var(--ink); position: absolute; top: 50%; transform: translate(-50%, -50%); }
.principle-card p { margin: 13px 0 0; color: var(--muted); font-size: 12px; }
.empty-state { display: grid; place-items: center; min-height: 130px; border: 1px dashed var(--line); border-radius: 20px; color: var(--muted); }
.two-column { display: grid; grid-template-columns: 1.35fr .65fr; gap: 18px; margin-top: 18px; }
.chart-card, .insight-card { padding: 25px; min-height: 310px; }
.trend-chart { min-height: 230px; display: grid; place-items: center; }
.trend-chart svg { width: 100%; height: 210px; overflow: visible; }
.chart-grid-line { stroke: rgba(50,60,50,.1); stroke-width: 1; }
.chart-line { stroke: var(--green); stroke-width: 3; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.chart-area { fill: url(#areaFill); }
.chart-dot { fill: var(--paper); stroke: var(--green); stroke-width: 2.5; }
.chart-label { font: 10px -apple-system, BlinkMacSystemFont, sans-serif; fill: var(--muted); }
.watch-list { margin-top: 20px; display: grid; gap: 10px; }
.watch-item { padding: 13px 15px; background: #f3efe4; border-radius: 13px; display: flex; gap: 10px; align-items: flex-start; line-height: 1.5; font-size: 13px; }
.watch-item::before { content: "·"; color: var(--red); font-size: 22px; line-height: .7; }

.field-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; }
.inline-check input { width: 17px; height: 17px; accent-color: var(--green); margin-top: 2px; }

.portrait-content { display: grid; gap: 20px; }
.portrait-filters { display: flex; align-items: end; gap: 12px; flex-wrap: wrap; padding: 16px; margin: -12px 0 22px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,255,.48); }
.portrait-filters label { min-width: 150px; }
.portrait-filters input, .portrait-filters select { min-height: 46px; }
.portrait-mode { display: flex; padding: 4px; border-radius: 13px; background: var(--paper-deep); }
.portrait-mode button { border: 0; border-radius: 10px; padding: 10px 14px; background: transparent; cursor: pointer; }
.portrait-mode button.active { color: white; background: var(--green); }
.portrait-hero { display: grid; grid-template-columns: 1fr 1.3fr; gap: 18px; }
.portrait-hero.timeline-only { grid-template-columns: 1fr; }
.portrait-compass { min-height: 380px; display: grid; place-items: center; align-content: center; gap: 18px; padding: 25px; }
.portrait-period { text-align: center; color: var(--green); }.portrait-period small { display: block; color: var(--muted); margin-top: 5px; }
.compass { width: min(330px, 85%); aspect-ratio: 1; border-radius: 50%; position: relative; border: 1px solid var(--line); background: radial-gradient(circle, #faf7ee 0 24%, transparent 25%), conic-gradient(from 45deg, #dfe8dc 0 25%, #eee5d8 0 50%, #e9d9d1 0 75%, #dfe5d6 0); }
.compass::before, .compass::after { content: ""; position: absolute; background: rgba(38,48,41,.16); left: 50%; top: 5%; bottom: 5%; width: 1px; }
.compass::after { transform: rotate(90deg); }
.compass-center { position: absolute; inset: 33%; border-radius: 50%; background: var(--green); color: white; display: grid; place-items: center; text-align: center; z-index: 2; }
.compass-label { position: absolute; font-weight: 700; z-index: 3; }
.compass-label.top { top: 8%; left: 50%; transform: translateX(-50%); }.compass-label.bottom { bottom: 8%; left: 50%; transform: translateX(-50%); }.compass-label.left { left: 8%; top: 50%; transform: translateY(-50%); }.compass-label.right { right: 8%; top: 50%; transform: translateY(-50%); }
.portrait-details { padding: 28px; }
.timeline { display: grid; gap: 0; margin-top: 20px; }
.timeline-item { display: grid; grid-template-columns: 90px 20px minmax(0, 1fr) auto; gap: 10px; min-height: 70px; }
.timeline-item time { color: var(--muted); font-size: 12px; padding-top: 2px; }
.timeline-pin { position: relative; }
.timeline-pin::before { content: ""; position: absolute; top: 6px; left: 7px; width: 7px; height: 7px; border-radius: 50%; background: var(--red); }
.timeline-pin::after { content: ""; position: absolute; top: 15px; bottom: 0; left: 10px; width: 1px; background: var(--line); }
.timeline-copy strong { display: -webkit-box; margin-bottom: 8px; overflow: hidden; font-size: 15px; line-height: 1.55; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.timeline-diagnosis { color: var(--ink); font-size: 17px !important; }
.timeline-focus { margin: 2px 0 0; color: var(--green); font-size: 12px; line-height: 1.6; }
.timeline-summary { display: -webkit-box; margin: 9px 0 0; overflow: hidden; color: var(--muted); font-size: 12px; line-height: 1.7; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.timeline-evidence { display: flex; flex-wrap: wrap; gap: 5px; }
.timeline-evidence span { padding: 3px 7px; border: 1px solid rgba(24,57,46,.18); color: var(--green); background: rgba(220,229,217,.42); font-size: 9px; line-height: 1.4; }
.timeline-evidence .standard-chip { color: var(--red); border-color: rgba(139,61,52,.18); background: rgba(225,207,197,.25); }
.timeline-expand { margin-top: 10px; border-top: 1px solid var(--line); }
.timeline-expand summary { padding: 9px 0 2px; color: var(--green); cursor: pointer; font-size: 11px; list-style-position: inside; }
.timeline-expand summary span { color: var(--muted); }
.timeline-full { display: grid; gap: 13px; margin-top: 10px; padding: 12px; background: rgba(239,237,229,.55); }
.timeline-full h5, .record-section h4 { margin: 0 0 9px; color: var(--red); font: 500 11px -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif; letter-spacing: .1em; }
.record-observations { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px 14px; }
.record-observation { display: grid; grid-template-columns: minmax(82px, .8fr) 1.2fr; gap: 8px; padding: 7px 0; border-bottom: 1px solid rgba(209,204,190,.65); font-size: 11px; line-height: 1.55; }
.record-observation small { color: var(--muted); }
.record-note p { margin: 0; padding: 7px 0; border-bottom: 1px solid rgba(209,204,190,.65); color: var(--ink); font-size: 12px; line-height: 1.75; white-space: pre-wrap; }
.timeline-actions { display: flex; gap: 6px; align-self: start; }
.timeline-actions button, .day-detail-actions button { border: 1px solid var(--line); border-radius: 9px; padding: 7px 10px; color: var(--green); background: rgba(255,255,255,.58); cursor: pointer; font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif; font-size: 11px; white-space: nowrap; }
.timeline-actions .danger, .day-detail-actions .danger { color: var(--red); }
.day-detail-actions { display: flex; align-items: center; gap: 7px; }
.principle-change-card, .day-detail { padding: 25px; }
.principle-history { display: grid; gap: 10px; margin-top: 20px; }
.principle-history-item { display: grid; grid-template-columns: 100px 1fr; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.principle-history-item time { color: var(--muted); font-size: 12px; }
.principle-history-item div { display: flex; flex-wrap: wrap; gap: 7px; }
.principle-history-item span { padding: 5px 9px; border-radius: 12px; background: var(--green-soft); color: var(--green); font-size: 11px; }
.record-focus { margin-top: 18px; padding: 20px; border-left: 3px solid var(--gold); background: rgba(239,237,229,.55); }
.record-focus > small { color: var(--red); letter-spacing: .12em; }.record-focus h3 { margin: 8px 0 12px; font-size: 21px; font-weight: 500; line-height: 1.55; }
.record-section { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }

.case-filter { display: flex; gap: 8px; margin-bottom: 20px; overflow-x: auto; }
.case-filter button { border: 1px solid var(--line); background: transparent; border-radius: 18px; padding: 8px 16px; cursor: pointer; white-space: nowrap; }
.case-filter button.active { background: var(--green); color: white; }
.case-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.case-card { background: var(--surface); border: 1px solid rgba(255,255,255,.8); border-radius: 20px; padding: 23px; min-height: 220px; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.case-card header { display: flex; justify-content: space-between; gap: 10px; }
.case-type { color: var(--red); font-size: 11px; letter-spacing: .12em; }.case-card h3 { margin: 16px 0 13px; font-size: 20px; font-weight: 500; line-height: 1.45; }.case-brief { display: grid; gap: 11px; }.case-brief section { min-width: 0; }.case-brief small { display: block; margin-bottom: 4px; color: var(--gold); font: 600 10px -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif; letter-spacing: .08em; }.case-brief p { display: -webkit-box; margin: 0; overflow: hidden; color: var(--muted); line-height: 1.65; font-size: 12px; white-space: normal; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }.case-brief .case-analysis p, .case-brief .case-outcome p { -webkit-line-clamp: 2; }.case-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; padding-top: 18px; }.case-meta span { background: #eee9dd; padding: 4px 8px; border-radius: 10px; font-size: 10px; }
.case-card-actions { display: flex; gap: 8px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.case-card-actions button, .timeline-actions button, .day-detail-actions button { border: 1px solid var(--line); background: transparent; color: var(--green); padding: 7px 10px; cursor: pointer; }
.case-card-actions button.danger, .timeline-actions button.danger, .day-detail-actions button.danger { color: var(--red); }
.shared-case-label { display: block; margin-top: 14px; color: var(--muted); }
.case-editor-dialog { width: min(900px, calc(100vw - 32px)); }
.case-editor-form { max-width: none; }
.case-editor-notice { margin: -4px 0 4px; padding: 13px 16px; border-left: 3px solid var(--gold); background: #efede5; color: var(--muted); line-height: 1.7; }
.case-editor-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.case-editor-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.danger-button { border: 1px solid rgba(139,61,52,.35); background: transparent; color: var(--red); padding: 12px 18px; cursor: pointer; }
.personal-case-source { border-left-color: var(--gold) !important; background: rgba(180,145,90,.08); }

.learning-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 13px; }
.domain-card { min-height: 165px; padding: 20px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); position: relative; overflow: hidden; }
.domain-card.active { background: var(--green); color: white; }.domain-card h3 { font-weight: 500; font-size: 20px; }.domain-card p { color: inherit; opacity: .7; font-size: 12px; line-height: 1.6; }.domain-status { font-size: 10px; color: var(--gold); }.domain-card.active .domain-status { color: #dce9d8; }
.lesson-card { margin-top: 20px; padding: 32px; display: grid; grid-template-columns: 100px 1fr auto; gap: 24px; align-items: center; }.lesson-index { writing-mode: vertical-rl; color: var(--red); letter-spacing: .2em; }.lesson-card h3 { font-size: 24px; font-weight: 500; }.lesson-card p { line-height: 1.8; color: var(--muted); }
.consult-shell { min-height: 620px; display: grid; grid-template-columns: 250px 1fr; padding: 0; overflow: hidden; }
.consult-history { min-height: 0; overflow-y: auto; padding: 20px 14px; border-right: 1px solid var(--line); background: rgba(232,229,219,.48); }
.consult-history-head { display: flex; justify-content: space-between; align-items: center; padding: 0 5px 14px; }.consult-history-head button { border: 0; background: none; color: var(--green); cursor: pointer; }
.conversation-search { margin-bottom: 12px; }.conversation-search span { font-size: 10px; color: var(--muted); }.conversation-search input { padding: 10px 11px; border-radius: 11px; font-size: 12px; background: rgba(255,255,255,.68); }
#conversation-list { display: grid; gap: 7px; }.conversation-item { display: grid; gap: 5px; width: 100%; padding: 12px; text-align: left; border: 0; border-radius: 13px; background: transparent; cursor: pointer; }.conversation-item.active { background: rgba(255,255,255,.72); }.conversation-item strong, .conversation-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.conversation-item small, .conversation-item span { color: var(--muted); font-size: 11px; }
.consult-main { min-width: 0; min-height: 0; overflow: hidden; display: grid; grid-template-rows: minmax(0, 1fr) auto auto; }.message-list { min-height: 0; max-height: 560px; overflow-y: auto; overscroll-behavior: contain; padding: 24px; display: flex; flex-direction: column; gap: 16px; }.consult-empty { max-width: 560px; margin: auto; text-align: center; }.consult-empty > span { width: 70px; height: 70px; border-radius: 50%; background: var(--green-soft); color: var(--green); display: grid; place-items: center; margin: 0 auto; font-size: 27px; }.consult-empty h3 { font-size: 25px; font-weight: 500; }.consult-empty p { color: var(--muted); line-height: 1.9; }
.message { max-width: 78%; padding: 14px 16px; border-radius: 18px; background: rgba(255,255,255,.72); }.message.user { align-self: flex-end; color: white; background: var(--green); }.message small { opacity: .65; }.message p { margin: 7px 0 0; line-height: 1.7; white-space: pre-wrap; }
.message-meta { min-height: 26px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.copy-answer { flex: none; display: inline-flex; align-items: center; gap: 5px; min-height: 30px; padding: 5px 9px; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); background: rgba(244,240,230,.72); font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif; font-size: 11px; cursor: pointer; transition: color .18s, border-color .18s, background .18s; }
.copy-answer b { font-weight: 500; }.copy-answer:hover, .copy-answer.copied { color: var(--green); border-color: rgba(64,95,75,.35); background: var(--green-soft); }
.message.user .message-meta small { color: rgba(255,255,255,.78); opacity: 1; }
.copy-answer.user-copy { color: white; border-color: rgba(255,255,255,.34); background: rgba(255,255,255,.1); }
.copy-answer.user-copy:hover, .copy-answer.user-copy.copied { color: var(--green); border-color: rgba(255,255,255,.7); background: rgba(255,255,255,.9); }
.message-copy-footer { display: flex; justify-content: flex-end; margin-top: 13px; padding-top: 10px; border-top: 1px solid var(--line); }
.message-copy-footer button { min-height: 32px; padding: 6px 11px; border: 1px solid rgba(24,57,46,.28); border-radius: 9px; color: var(--green); background: var(--green-soft); font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif; font-size: 11px; cursor: pointer; }
.message-copy-footer button.copied { color: white; background: var(--green); }
.message.user .message-copy-footer { border-top-color: rgba(255,255,255,.2); }
.message.user .message-copy-footer button { color: white; border-color: rgba(255,255,255,.34); background: rgba(255,255,255,.1); }
.message.user .message-copy-footer button:hover, .message.user .message-copy-footer button.copied { color: var(--green); border-color: rgba(255,255,255,.7); background: rgba(255,255,255,.9); }
.message-body { margin-top: 7px; line-height: 1.72; }.message-body h4 { margin: 16px 0 6px; font-size: 15px; color: var(--ink); }.message-body h4:first-child { margin-top: 0; }.message-body p { margin: 7px 0; white-space: normal; }.message-body ul, .message-body ol { margin: 7px 0 7px 20px; padding: 0; }.message-body li { margin: 5px 0; }.message-body hr { border: 0; border-top: 1px solid var(--line); margin: 14px 0; }.message-body strong { color: var(--ink); }
.message-table-scroll { max-width: 100%; margin: 12px 0; overflow-x: auto; overscroll-behavior-inline: contain; border: 1px solid var(--line); border-radius: 11px; background: rgba(250,249,245,.72); -webkit-overflow-scrolling: touch; }
.message-table-scroll table { width: 100%; min-width: 420px; border-collapse: collapse; font-size: 12px; line-height: 1.55; }
.message-table-scroll th, .message-table-scroll td { padding: 9px 11px; text-align: left; vertical-align: top; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.message-table-scroll th { color: var(--green); background: var(--green-soft); font-weight: 600; white-space: nowrap; }
.message-table-scroll th:last-child, .message-table-scroll td:last-child { border-right: 0; }
.message-table-scroll tbody tr:last-child td { border-bottom: 0; }
.message.user .message-body p { white-space: pre-wrap; }
.auto-draft-panel { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; align-items: center; margin: 0 18px 10px; padding: 12px 14px; border: 1px solid rgba(64,95,75,.25); border-radius: 14px; background: var(--green-soft); }
.auto-draft-panel.hidden { display: none; }
.auto-draft-panel p { display: flex; flex-wrap: wrap; gap: 6px 12px; margin: 0; font-size: 12px; }
.auto-draft-panel p span { color: var(--muted); font-size: 10px; }
.auto-draft-panel button { min-height: 36px; padding: 7px 11px; border: 1px solid var(--green); border-radius: 10px; color: var(--green); background: rgba(255,255,255,.72); cursor: pointer; white-space: nowrap; }
.auto-draft-panel button:disabled { opacity: .5; cursor: wait; }
.auto-draft-preview { max-height: 76px; margin-top: 7px; overflow: hidden; color: var(--muted); font-size: 11px; line-height: 1.55; white-space: pre-line; }
.consult-mode-note { grid-column: 1 / -1; margin: 0 0 2px; padding: 8px 10px; border-left: 3px solid var(--gold); color: var(--muted); background: rgba(180,145,90,.09); font-size: 11px; line-height: 1.55; }
.consult-mode-note.hidden { display: none; }
.daily-draft-dialog { width: min(720px, calc(100% - 30px)); }
.daily-draft-form textarea { line-height: 1.7; }
.daily-draft-image-note { margin: 0; padding: 12px 14px; color: var(--muted); background: var(--green-soft); border-left: 3px solid var(--green); font-size: 12px; line-height: 1.7; }
.consult-composer { display: grid; grid-template-columns: 1fr auto; gap: 10px; padding: 16px; border-top: 1px solid var(--line); background: rgba(250,249,245,.9); }.consult-compose-main { min-width: 0; }.consult-composer textarea { width: 100%; min-height: 76px; }.consult-composer > button { align-self: end; }
.consult-composer button:disabled { opacity: .62; cursor: wait; }
.consult-compose-tools { display: flex; align-items: center; gap: 9px; margin-top: 7px; }.consult-compose-tools small { color: var(--muted); font-size: 11px; }.consult-image-button { display: inline-flex; align-items: center; gap: 5px; min-height: 32px; padding: 5px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); background: rgba(255,255,255,.62); font-size: 12px; font-weight: 700; cursor: pointer; }.consult-image-button:hover { border-color: var(--accent); }.consult-image-button span { font-size: 17px; line-height: 1; }
.consult-image-preview, .message-images { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: thin; }.consult-image-preview { padding: 1px 1px 8px; }.consult-image-preview figure { position: relative; flex: 0 0 72px; height: 72px; margin: 0; }.consult-image-preview img, .message-images img { width: 100%; height: 100%; object-fit: cover; border-radius: 11px; border: 1px solid var(--line); background: var(--paper); }.consult-image-preview button { position: absolute; top: -5px; right: -5px; display: grid; place-items: center; width: 22px; height: 22px; padding: 0; border: 2px solid var(--paper); border-radius: 50%; color: #fff; background: #32483d; font-size: 16px; line-height: 1; }.message-images { margin-top: 8px; }.message-images a { flex: 0 0 112px; height: 112px; border-radius: 11px; overflow: hidden; }.message-images a:focus-visible { outline: 3px solid rgba(45,87,66,.25); outline-offset: 2px; }
.message.pending { color: var(--muted); }
.message-sources { margin-top: 13px; padding-top: 11px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.message-sources summary { color: var(--green); cursor: pointer; }
.message-sources > div { margin-top: 10px; padding: 10px; border-radius: 10px; background: rgba(238,233,221,.55); }
.message-sources strong, .message-sources small { display: block; }.message-sources small { margin-top: 3px; overflow-wrap: anywhere; }
.message-sources div p { margin-top: 7px; font-size: 11px; line-height: 1.65; }
.typing-dots { display: inline-flex; align-items: center; gap: 3px; }
.typing-dots i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; animation: consult-pulse 1s infinite ease-in-out; }
.typing-dots i:nth-child(2) { animation-delay: .15s; }.typing-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes consult-pulse { 0%, 70%, 100% { opacity: .25; transform: translateY(0); } 35% { opacity: 1; transform: translateY(-2px); } }
.ask-float-button { position: fixed; right: 26px; bottom: 26px; z-index: 36; width: 76px; height: 76px; display: grid; place-items: center; align-content: center; gap: 2px; border: 1px solid rgba(255,255,255,.26); border-radius: 50%; color: white; background: var(--green); box-shadow: 0 16px 38px rgba(24,57,46,.3); cursor: pointer; }.ask-float-button span { font-size: 24px; line-height: 1; }.ask-float-button small { font-size: 10px; }
.consult-backdrop { position: fixed; inset: 0; z-index: 39; background: rgba(20,29,24,.34); backdrop-filter: blur(3px); }
.consult-drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 40; width: min(780px, calc(100vw - 60px)); display: grid; grid-template-rows: auto 1fr; color: var(--ink); background: var(--paper); box-shadow: -24px 0 70px rgba(20,29,24,.2); transform: translateX(105%); transition: transform .28s ease; }.consult-drawer.open { transform: translateX(0); }
.consult-drawer-head { display: flex; justify-content: space-between; align-items: flex-start; padding: 22px 26px 18px; border-bottom: 1px solid var(--line); }.consult-drawer-head h2 { margin: 0 0 5px; font-size: 28px; font-weight: 500; }.consult-drawer-head small { color: var(--muted); }.consult-drawer-head > button { width: 42px; height: 42px; border: 0; border-radius: 50%; background: var(--paper-deep); font-size: 25px; cursor: pointer; }
.consult-drawer .consult-shell { min-height: 0; height: 100%; border: 0; border-radius: 0; }.consult-drawer .message-list { height: 100%; max-height: none; min-height: 0; }.consult-open { overflow: hidden; }
.reserved-page { min-height: 70vh; display: grid; place-items: center; align-content: center; text-align: center; }.reserved-page .constellation { font-size: 60px; color: var(--gold); }.reserved-page h2 { font-size: 60px; font-weight: 400; margin: 10px; }.reserved-page p:last-child { max-width: 520px; line-height: 1.8; color: var(--muted); }

dialog { border: 0; border-radius: 25px; padding: 0; width: min(680px, calc(100% - 30px)); max-height: 90vh; background: #f8f5ed; box-shadow: 0 30px 90px rgba(30,38,31,.24); }
dialog::backdrop { background: rgba(31,39,33,.38); backdrop-filter: blur(4px); }
.dialog-form { padding: 30px; overflow-y: auto; max-height: 90vh; }
.dialog-heading { display: flex; justify-content: space-between; align-items: flex-start; }.dialog-heading h3 { margin: 0; font-size: 25px; font-weight: 500; }.icon-button { background: transparent; font-size: 27px; }.inline-check { display: flex; grid-template-columns: auto 1fr; align-items: center; }
.toast { position: fixed; right: 24px; top: 24px; transform: translateY(-100px); opacity: 0; background: var(--ink); color: white; border-radius: 13px; padding: 13px 18px; z-index: 100; transition: .3s; box-shadow: var(--shadow); }.toast.show { transform: translateY(0); opacity: 1; }.toast.error { background: var(--red); }
.case-inbox-form { gap: 20px; }
.case-inbox-lead { margin: -4px 0 4px; padding: 16px 18px; color: var(--muted); background: #efede5; border-left: 3px solid var(--gold); font-size: 13px; line-height: 1.75; }
.case-paste-label textarea { min-height: 280px; padding: 18px; font-size: 15px; line-height: 1.85; }
.organize-preview { padding: 15px 17px; border: 1px dashed var(--line); background: rgba(255,255,255,.42); }
.organize-preview span { color: var(--red); font-size: 10px; letter-spacing: .14em; }
.organize-preview p { margin: 8px 0 0; color: var(--muted); font-size: 12px; line-height: 1.6; }

@media (max-width: 1100px) {
  .hero-grid { grid-template-columns: 1fr 1fr; }.learn-card { grid-column: 1 / -1; min-height: 150px; }.principle-grid { grid-template-columns: repeat(2, 1fr); }.learning-grid { grid-template-columns: repeat(3, 1fr); }.case-grid { grid-template-columns: repeat(2, 1fr); }
  .learn-card em { display: block; max-width: 720px; }
}

@media (max-width: 760px) {
  .auth-shell { grid-template-columns: 1fr; }.auth-story { min-height: 38vh; padding: 50px 28px; }.auth-story h1 { font-size: 52px; }.brand-mark, .seal-row, .quiet-note { display: none; }.auth-card { margin: -35px auto 40px; position: relative; padding: 28px; }
  .app-shell { display: block; }.sidebar { transform: translateX(-102%); transition: transform .25s; box-shadow: var(--shadow); }.sidebar.open { transform: translateX(0); }.main-content { padding: 78px 16px 60px; }.mobile-header { position: fixed; top: 0; left: 0; right: 0; height: 60px; display: flex; justify-content: space-between; align-items: center; padding: 0 16px; background: rgba(244,240,230,.9); backdrop-filter: blur(13px); z-index: 15; border-bottom: 1px solid var(--line); }.mobile-header button { border: 0; background: none; font-size: 20px; }.mobile-header span { font-size: 11px; color: var(--muted); }
  .page-heading { align-items: flex-start; }.page-heading h2 { font-size: 30px; }.hero-grid, .two-column, .portrait-hero { grid-template-columns: 1fr; }.day-card { min-height: 140px; }.principle-grid { grid-template-columns: 1fr 1fr; }.field-grid { grid-template-columns: 1fr; }.case-grid, .learning-grid { grid-template-columns: 1fr; }.lesson-card { grid-template-columns: 1fr; }.lesson-index { writing-mode: initial; }
  .portrait-filters { display: grid; grid-template-columns: 1fr 1fr; }.portrait-mode { grid-column: 1 / -1; }.portrait-filters label, .portrait-filters select, .portrait-filters .primary { min-width: 0; width: 100%; }.principle-history-item { grid-template-columns: 76px 1fr; }
  .timeline-item { grid-template-columns: 64px 14px minmax(0, 1fr); }
  .timeline-item time { grid-row: 1; }
  .timeline-pin { grid-row: 1 / 3; }
  .timeline-copy { grid-column: 3; grid-row: 2; }
  .timeline-actions { grid-column: 3; grid-row: 1; justify-content: flex-start; padding-bottom: 8px; }
  .timeline-actions button, .day-detail-actions button { min-height: 38px; padding: 8px 12px; }
  .record-observations { grid-template-columns: 1fr; }
  .timeline-full { padding: 10px; }
  .record-observation { grid-template-columns: 105px minmax(0, 1fr); }
  .day-detail .card-title { align-items: flex-start; gap: 12px; }
  .day-detail-actions { flex-wrap: wrap; justify-content: flex-end; }
  .consult-shell { grid-template-columns: 1fr; }.consult-history { border-right: 0; border-bottom: 1px solid var(--line); padding: 12px; }.consult-history-head { padding-bottom: 8px; }#conversation-list { display: flex; overflow-x: auto; }.conversation-item { min-width: 170px; max-width: 210px; }.consult-main { min-height: 0; padding-bottom: 0; }.message-list { min-height: 260px; padding: 16px; }.message { max-width: 90%; }.consult-composer { grid-template-columns: 1fr; padding-bottom: max(16px, env(safe-area-inset-bottom)); }.consult-composer > button { width: 100%; }
  .ask-float-button { right: 18px; bottom: 88px; width: 60px; height: 60px; }.ask-float-button span { font-size: 21px; }.ask-float-button small { font-size: 9px; }.consult-drawer { width: 100vw; }.consult-drawer-head { padding: 16px 18px 13px; }.consult-drawer-head h2 { font-size: 23px; }.consult-drawer .consult-shell { overflow-y: auto; }
}

@media (max-width: 420px) { .principle-grid { grid-template-columns: 1fr; } }

/* 2026 visual direction — a contemporary private journal, not a dashboard kit */
:root {
  --paper: #f2f0e9;
  --paper-deep: #dedbd0;
  --surface: #faf9f5;
  --ink: #18221d;
  --muted: #737873;
  --line: rgba(24, 34, 29, .12);
  --green: #18392e;
  --green-soft: #dfe5dd;
  --moss: #718272;
  --red: #b34b35;
  --gold: #9d8560;
  --shadow: 0 22px 70px rgba(24, 34, 29, .07);
  --radius: 8px;
}

body {
  background:
    linear-gradient(90deg, transparent 0 49.94%, rgba(24,34,29,.018) 50%, transparent 50.06%),
    var(--paper);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Noto Sans SC", sans-serif;
  letter-spacing: .01em;
}
body::before { opacity: .12; background-size: 9px 9px; }
h1, h2, h3, .side-brand strong, .card-title > span { font-family: "Songti SC", "STSong", "Noto Serif SC", serif; }
.eyebrow { color: var(--red); font-size: 10px; letter-spacing: .28em; }

/* Entrance */
.auth-shell { grid-template-columns: minmax(520px, 1.18fr) minmax(450px, .82fr); background: #eeece5; }
.auth-story {
  min-height: 100vh;
  justify-content: initial;
  padding: clamp(34px, 4vw, 62px) clamp(42px, 7vw, 112px);
  color: #eef0e8;
  background:
    radial-gradient(circle at 74% 36%, rgba(168,184,155,.16), transparent 30%),
    linear-gradient(145deg, #14271f 0%, #1a3026 48%, #0f2019 100%);
}
.auth-story::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .24;
  background-image: radial-gradient(rgba(234,239,228,.38) .55px, transparent .75px);
  background-size: 8px 8px;
  mask-image: linear-gradient(90deg, #000, transparent 90%);
}
.auth-story::after { display: none; }
.auth-brandline { position: relative; z-index: 2; display: flex; align-items: center; gap: 14px; font-size: 9px; line-height: 1.35; letter-spacing: .24em; color: rgba(238,240,232,.52); }
.brand-mark { width: 43px; height: 43px; margin: 0; border-color: rgba(218,126,103,.7); color: #d67660; font-size: 20px; transform: none; }
.auth-copy { position: relative; z-index: 2; margin: auto 0 9vh; }
.auth-copy .eyebrow { color: #cda190; margin-bottom: 24px; }
.auth-story h1 { margin: 0 0 32px; color: #f1f0e8; font-size: clamp(76px, 8.3vw, 132px); line-height: .88; letter-spacing: .12em; font-weight: 400; }
.auth-lead { color: rgba(238,240,232,.7); font-family: "Songti SC", "STSong", serif; font-size: clamp(18px, 1.55vw, 24px); line-height: 1.9; letter-spacing: .06em; }
.auth-orbit { position: absolute; z-index: 1; width: min(52vw, 660px); aspect-ratio: 1; right: -11%; top: 6%; border: 1px solid rgba(228,235,221,.11); border-radius: 50%; }
.auth-orbit::before, .auth-orbit::after, .auth-orbit i { content: ""; position: absolute; inset: 12%; border: 1px solid rgba(228,235,221,.09); border-radius: 50%; }
.auth-orbit::after { inset: 27%; }
.auth-orbit i:nth-child(1) { inset: 41%; background: rgba(219,226,211,.04); }
.auth-orbit i:nth-child(2) { width: 8px; height: 8px; inset: 11% auto auto 49%; background: #c46951; border: 0; box-shadow: 0 0 0 8px rgba(196,105,81,.1); }
.auth-orbit i:nth-child(3) { width: 4px; height: 4px; inset: 67% auto auto 7%; background: rgba(239,232,211,.7); border: 0; }
.auth-orbit b { position: absolute; inset: 0; display: grid; place-items: center; color: rgba(235,239,228,.04); font: 400 min(22vw, 290px)/1 "Songti SC", serif; }
.auth-foot { position: relative; z-index: 2; display: flex; gap: 30px; color: rgba(238,240,232,.4); font-size: 10px; letter-spacing: .18em; }
.auth-foot span + span::before { content: "/"; margin-right: 30px; opacity: .35; }

.auth-card {
  width: min(460px, calc(100% - 70px));
  padding: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}
.auth-card-head { display: grid; grid-template-columns: 46px 1fr; gap: 20px; padding-bottom: 40px; margin-bottom: 26px; border-bottom: 1px solid var(--line); }
.auth-card-head > span { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: var(--red); font: 11px Georgia, serif; }
.auth-card-head small { color: var(--muted); font-size: 11px; letter-spacing: .18em; }
.auth-card-head h2 { margin: 7px 0 0; font-size: 36px; font-weight: 400; letter-spacing: .07em; }
.auth-tabs { width: 210px; gap: 22px; border: 0; margin: 0 0 30px; }
.auth-tab { flex: none; padding: 5px 0 10px; font-size: 13px; }
.auth-tab.active::after { left: 0; right: 0; height: 1px; background: var(--ink); }
.auth-form { gap: 22px; }
.auth-form label { gap: 10px; font-size: 11px; letter-spacing: .08em; }
.auth-form input { height: 52px; padding: 0 2px; border-width: 0 0 1px; border-radius: 0; background: transparent; font-size: 15px; box-shadow: none !important; }
.auth-form input:focus { border-color: var(--green); }
.auth-form .primary { margin-top: 10px; height: 56px; display: flex; justify-content: space-between; align-items: center; padding: 0 23px; border-radius: 2px; background: var(--green); box-shadow: none; letter-spacing: .12em; }
.auth-form .primary span { font-size: 17px; font-weight: 300; }
.auth-disclaimer { margin: 34px 0 0; color: #9a9c97; font-size: 10px; letter-spacing: .07em; }
.auth-form-note { margin: -4px 0 0; color: var(--muted); font-size: 11px; line-height: 1.7; }
.auth-help-button, .auth-back-button { justify-self: start; margin-top: -10px; }
.account-security-section { display: grid; gap: 14px; padding: 20px 0 6px; border-top: 1px solid var(--line); }
.account-security-section h4 { margin: 0; font-size: 14px; }

/* App frame */
.app-shell { grid-template-columns: 224px 1fr; }
.sidebar { width: 224px; padding: 34px 20px 24px; color: #e8ece5; background: #14271f; border: 0; }
.side-brand { padding: 0 8px 48px; }
.mini-mark { width: 36px; height: 36px; color: #d07862; border-color: rgba(208,120,98,.65); font-size: 17px; }
.side-brand strong { color: #f3f2ea; font-size: 18px; font-weight: 400; }
.side-brand small, .user-chip small { color: rgba(235,239,229,.36); }
nav { gap: 2px; }
.nav-item { border-radius: 0; padding: 13px 8px; color: rgba(235,239,229,.5); border-bottom: 1px solid rgba(235,239,229,.06); font-size: 13px; letter-spacing: .08em; }
.nav-item span { width: 24px; color: rgba(235,239,229,.24); font: 9px Georgia, serif; letter-spacing: .05em; }
.nav-item:hover, .nav-item.active { color: #f1f1e9; background: transparent; box-shadow: none; }
.nav-item.active::after { width: 16px; height: 1px; border-radius: 0; background: #d07862; }
.nav-item em { color: #c8b38f; border-color: rgba(200,179,143,.24); }
.side-bottom > .text-button { color: rgba(235,239,229,.38); text-align: left; font-size: 11px; }
.user-chip { border: 0; border-top: 1px solid rgba(235,239,229,.1); border-radius: 0; background: transparent; padding: 18px 8px 8px; color: #f1f1e9; }
.user-chip > span:first-child { width: 32px; height: 32px; background: #d9ded4; color: #173127; font-size: 12px; }
.main-content { padding: 54px clamp(32px, 5vw, 78px) 90px; }
.page { max-width: 1440px; }
.page-heading { margin-bottom: 42px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.page-heading h2 { font-size: clamp(34px, 3.5vw, 54px); font-weight: 400; letter-spacing: .05em; }
.page-heading .primary { border-radius: 2px; box-shadow: none; }
.dashboard-heading { padding-bottom: 36px; }

/* Editorial content surfaces */
.card, .consult-shell { border: 1px solid var(--line); border-radius: var(--radius); box-shadow: none; background: rgba(250,249,245,.72); }
.hero-grid { grid-template-columns: .72fr 1.6fr .9fr; gap: 12px; }
.day-card, .summary-card, .learn-card { min-height: 210px; padding: 28px; }
.day-card { align-content: space-between; }
.day-number { color: var(--ink); font: 400 82px/.85 "Times New Roman", serif; letter-spacing: -.07em; }
.streak { border-color: var(--line); }
.learn-card { border: 0; border-radius: var(--radius); background: #76584c; }
.learn-card::after { font-family: "Songti SC", serif; font-weight: 400; }
.round-button { border-radius: 50%; box-shadow: none; }
.section-heading { margin-top: 58px; }
.section-heading h3 { font-size: 26px; }
.principle-grid { gap: 1px; padding: 1px; background: var(--line); border-radius: var(--radius); overflow: hidden; }
.principle-card { border: 0; border-radius: 0; background: #f8f7f2; padding: 25px; }
.two-column { gap: 12px; margin-top: 12px; }
.chart-card, .insight-card { padding: 28px; }
.watch-item { border-radius: 2px; background: #efede5; }
input, select, textarea { border-radius: 3px; background: rgba(255,255,255,.58); }
.case-card, .domain-card { border-radius: var(--radius); box-shadow: none; }
.mobile-bottom-nav { display: none; }
.install-button { border: 1px solid rgba(235,239,229,.16); background: rgba(255,255,255,.05); color: #eceee8; padding: 11px 12px; text-align: left; font-size: 11px; cursor: pointer; }
.domain-card.active { background: var(--green); }
.case-filter button { border-radius: 2px; }
.case-filter button.active { background: var(--green); }
.lesson-card { border-left: 3px solid var(--red); }
.observation-card { margin-top: 22px; padding: clamp(22px, 4vw, 46px); border: 1px solid var(--line); background: linear-gradient(145deg, rgba(250,249,245,.95), rgba(232,236,227,.8)); }
.observation-intro { display: grid; grid-template-columns: 62px minmax(0, 1fr); gap: 22px; align-items: start; }
.observation-mark { width: 62px; height: 62px; display: grid; place-items: center; border: 1px solid rgba(179,75,53,.48); color: var(--red); font: 400 23px "Songti SC", serif; }
.observation-intro h3 { margin: 0 0 9px; font-size: clamp(26px, 3vw, 38px); font-weight: 400; }
.observation-intro p:last-child { max-width: 760px; margin: 0; color: var(--muted); line-height: 1.75; }
.observation-prompts { display: flex; flex-wrap: wrap; gap: 8px; margin: 28px 0 12px; }
.observation-prompts span { padding: 8px 11px; border: 1px solid var(--line); color: var(--green); background: rgba(255,255,255,.54); font-size: 11px; }
.observation-skip-note { margin: 0 0 20px; color: var(--red); font-size: 12px; line-height: 1.65; }
.observation-form { display: grid; gap: 10px; }
.observation-form > label { color: var(--muted); font-size: 11px; letter-spacing: .12em; }
.observation-form textarea { min-height: 210px; padding: 20px; resize: vertical; font-size: 16px; line-height: 1.85; background: rgba(255,255,255,.78); }
.observation-actions { display: grid; grid-template-columns: auto minmax(160px, 1fr) auto; gap: 12px; align-items: center; }
.speech-button { min-height: 43px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 8px 14px; border: 1px solid rgba(24,57,46,.32); color: var(--green); background: rgba(255,255,255,.65); cursor: pointer; }
.speech-button b { font-size: 12px; font-weight: 600; }
.speech-button.listening { color: white; border-color: var(--red); background: var(--red); animation: speech-glow 1.4s infinite ease-in-out; }
.speech-button.unsupported { border-style: dashed; color: var(--muted); }
.speech-button.compact { min-height: 32px; padding: 5px 10px; border-radius: 999px; }
.speech-support-note, [data-speech-note] { color: var(--muted); font-size: 10px; line-height: 1.5; }
.observation-submit { min-height: 48px; white-space: nowrap; }
@keyframes speech-glow { 50% { box-shadow: 0 0 0 7px rgba(179,75,53,.12); } }
.admin-summary { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1px; margin-bottom: 12px; padding: 1px; background: var(--line); }
.admin-stat { min-height: 130px; display: grid; align-content: space-between; padding: 18px; background: #f8f7f2; }
.admin-stat small, .admin-stat span { color: var(--muted); font-size: 10px; }.admin-stat strong { font: 400 27px "Songti SC", serif; }.admin-stat span { line-height: 1.5; }
.admin-users-card { padding: 26px; }
.admin-users { display: grid; margin-top: 18px; border-top: 1px solid var(--line); }
.admin-user-row { display: grid; grid-template-columns: minmax(180px, 1.2fr) 1fr 130px 130px; gap: 18px; align-items: center; padding: 17px 4px; border-bottom: 1px solid var(--line); }
.admin-user-main { display: flex; align-items: center; gap: 11px; min-width: 0; }.admin-user-main > span { width: 34px; height: 34px; flex: 0 0 34px; display: grid; place-items: center; border-radius: 50%; color: white; background: var(--green); }.admin-user-main strong, .admin-user-main small { display: block; }.admin-user-main small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.admin-counts { display: flex; gap: 14px; }.admin-counts span { color: var(--muted); font-size: 10px; }.admin-counts b { display: block; color: var(--ink); font-size: 15px; }
.admin-activity small, .admin-activity time { display: block; }.admin-activity small { color: var(--muted); font-size: 9px; }.admin-activity time { margin-top: 4px; font-size: 11px; }
.admin-privacy { padding: 7px 9px; border: 1px solid var(--line); color: var(--muted); font-size: 10px; text-align: center; }.admin-privacy.granted { color: var(--green); border-color: rgba(24,57,46,.35); background: var(--green-soft); }
.admin-privacy button { border: 0; padding: 0; color: inherit; background: transparent; font: inherit; cursor: pointer; }
.privacy-grant { padding: 14px; border: 1px solid var(--line); background: rgba(255,255,255,.4); }.privacy-grant span { display: flex; align-items: center; gap: 8px; }.privacy-grant input { width: 17px; height: 17px; accent-color: var(--green); }.privacy-grant small { color: var(--muted); line-height: 1.6; }
.admin-detail-dialog { width: min(820px, calc(100% - 24px)); }
.admin-detail-content { display: grid; gap: 28px; }.admin-detail-content section > h4 { margin: 0 0 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line); font: 400 20px "Songti SC", serif; }
.admin-detail-content section > p { white-space: pre-wrap; line-height: 1.7; }
.admin-detail-content article { margin-top: 9px; padding: 14px; border: 1px solid var(--line); background: rgba(255,255,255,.45); }.admin-detail-content article header { display: flex; justify-content: space-between; gap: 12px; }.admin-detail-content article header small { color: var(--muted); font-size: 10px; }.admin-detail-content article > p { white-space: pre-wrap; line-height: 1.7; }
.admin-transcript { margin-top: 10px; }.admin-transcript p { display: grid; grid-template-columns: 70px 1fr; gap: 8px; margin: 0; padding: 9px 0; border-top: 1px solid var(--line); white-space: pre-wrap; line-height: 1.65; }.admin-transcript b { color: var(--muted); font-size: 10px; }

@media (max-width: 900px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-story { min-height: 46vh; padding: 34px 32px 46px; }
  .auth-copy { margin: 11vh 0 7vh; }
  .auth-story h1 { font-size: clamp(64px, 17vw, 96px); }
  .auth-orbit { width: 70vw; right: -12%; top: -3%; }
  .auth-card { margin: 0 auto; padding: 54px 0 60px; }
  .admin-summary { grid-template-columns: repeat(3, 1fr); }
  .admin-user-row { grid-template-columns: 1fr auto; }
  .admin-counts { grid-column: 1; }.admin-activity { grid-column: 2; grid-row: 1; }.admin-privacy { grid-column: 2; grid-row: 2; }
}

@media (max-width: 760px) {
  .auth-story { min-height: 43vh; }
  .auth-story h1 { line-height: .95; margin-bottom: 18px; }
  .auth-lead { font-size: 16px; }
  .auth-foot { gap: 12px; }
  .auth-foot span + span::before { margin-right: 12px; }
  .auth-card { width: calc(100% - 48px); margin: 0 auto; padding: 42px 0 52px; }
  .auth-card-head { padding-bottom: 26px; }
  .app-shell { display: block; }
  .mobile-header { height: calc(58px + env(safe-area-inset-top)); padding-top: env(safe-area-inset-top); background: rgba(242,240,233,.94); }
  .sidebar { width: min(290px, 86vw); height: 100dvh; max-height: 100dvh; padding-top: calc(24px + env(safe-area-inset-top)); padding-bottom: calc(18px + env(safe-area-inset-bottom)); overflow: hidden; z-index: 40; }
  .sidebar nav { min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
  .sidebar .side-brand, .sidebar .side-bottom { flex: 0 0 auto; }
  .sidebar .side-brand { padding-bottom: 22px; }
  .sidebar .side-bottom { position: relative; margin-top: auto; padding-top: 8px; background: #14271f; }
  .sidebar .user-chip { min-height: 58px; }
  .sidebar #logout-button { min-height: 44px; padding: 10px 8px; }
  .sidebar.open ~ .mobile-bottom-nav { opacity: 0; pointer-events: none; }
  .main-content { padding: calc(80px + env(safe-area-inset-top)) 16px calc(100px + env(safe-area-inset-bottom)); }
  .mobile-bottom-nav { position: fixed; z-index: 30; left: 10px; right: 10px; bottom: max(10px, env(safe-area-inset-bottom)); height: 68px; display: grid; grid-template-columns: repeat(4, 1fr); padding: 6px; border: 1px solid rgba(255,255,255,.1); border-radius: 18px; background: rgba(20,39,31,.96); box-shadow: 0 16px 45px rgba(15,31,24,.3); backdrop-filter: blur(20px); transition: opacity .18s; }
  .mobile-bottom-nav button { min-width: 0; display: grid; place-items: center; align-content: center; gap: 3px; border: 0; border-radius: 13px; background: transparent; color: rgba(239,241,234,.5); cursor: pointer; }
  .mobile-bottom-nav button span { font: 17px "Songti SC", serif; line-height: 1; }
  .mobile-bottom-nav button small { font-size: 9px; letter-spacing: .06em; }
  .mobile-bottom-nav button.active { color: #f7f5ec; background: rgba(255,255,255,.09); }
  .mobile-bottom-nav button.active span { color: #d8856f; }
  .mobile-bottom-nav .mobile-consult span { width: 34px; height: 34px; display: grid; place-items: center; margin-top: -15px; border: 3px solid #14271f; border-radius: 50%; color: #14271f; background: #d8c3a2; box-shadow: 0 6px 16px rgba(0,0,0,.2); }
  .mobile-bottom-nav .mobile-consult small { margin-top: -2px; }
  .mobile-bottom-nav .mobile-consult.active { color: #f7f5ec; background: transparent; }
  .hero-grid { grid-template-columns: 1fr; }
  .learn-card { min-height: 150px; }
  .learn-card { align-items: center; padding: 23px; }
  .learn-card p { -webkit-line-clamp: 4; }
  .page-heading { gap: 14px; margin-bottom: 24px; padding-bottom: 20px; }
  .page-heading h2 { font-size: clamp(28px, 9vw, 38px); line-height: 1.25; }
  .dashboard-heading { display: grid; }
  .dashboard-heading .primary { width: 100%; }
  .page-heading.compact { display: grid; grid-template-columns: 1fr; }
  .page-heading.compact .date-input { width: 100%; height: 48px; }
  .observation-card { padding: 22px 18px; margin: 18px -4px 0; }
  .observation-intro { grid-template-columns: 44px minmax(0, 1fr); gap: 13px; }
  .observation-mark { width: 44px; height: 44px; font-size: 17px; }
  .observation-intro h3 { font-size: 25px; }
  .observation-prompts { margin-top: 22px; gap: 6px; }
  .observation-prompts span { padding: 7px 9px; font-size: 10px; }
  .observation-form textarea { min-height: 230px; padding: 16px; font-size: 16px; }
  .observation-actions { grid-template-columns: 1fr; }
  .observation-actions .speech-button, .observation-submit { width: 100%; min-height: 48px; }
  .speech-support-note { text-align: center; }
  .day-card, .summary-card, .learn-card { min-height: auto; }
  .day-card { grid-template-columns: auto 1fr auto; }
  .day-card .streak { grid-column: 3; grid-row: 1; border: 0; display: grid; text-align: right; padding: 0; }
  .summary-card { padding: 23px; }
  .section-heading { margin-top: 38px; align-items: flex-start; }
  .section-heading h3 { font-size: 22px; line-height: 1.45; }
  .chart-card, .insight-card { min-height: auto; padding: 22px; }
  .portrait-compass { min-height: 310px; }
  .case-card { min-height: 170px; }
  .case-editor-columns { grid-template-columns: 1fr; gap: 0; }
  .case-editor-dialog { width: calc(100% - 12px); max-height: calc(100dvh - 12px); }
  .daily-draft-dialog { width: calc(100% - 12px); max-height: calc(100dvh - 12px); }
  .case-editor-dialog .dialog-form { max-height: calc(100dvh - 12px); }
  .case-editor-actions { position: sticky; bottom: calc(-22px - env(safe-area-inset-bottom)); margin: 8px -18px calc(-22px - env(safe-area-inset-bottom)); padding: 12px 18px calc(12px + env(safe-area-inset-bottom)); background: rgba(248,245,237,.96); border-top: 1px solid var(--line); }
  .case-editor-actions .primary { min-height: 44px; }
  dialog { width: calc(100% - 20px); max-height: calc(100vh - 20px); }
  .dialog-form { padding: 22px 18px calc(22px + env(safe-area-inset-bottom)); }
  .admin-summary { grid-template-columns: 1fr 1fr; }
  .admin-stat { min-height: 105px; padding: 14px; }
  .admin-users-card { padding: 18px 14px; }
  .admin-user-row { grid-template-columns: 1fr; gap: 10px; padding: 15px 2px; }
  .admin-counts, .admin-activity, .admin-privacy { grid-column: 1; grid-row: auto; }
  .admin-counts { justify-content: space-between; }
  .admin-privacy { text-align: left; width: fit-content; }
  .admin-detail-dialog { width: calc(100% - 12px); max-height: calc(100dvh - 12px); }
  .admin-detail-dialog .dialog-form { max-height: calc(100dvh - 12px); }
  .admin-transcript p { grid-template-columns: 1fr; gap: 3px; }

  /* 随时问：手机首屏优先留给对话内容 */
  .consult-drawer { height: 100dvh; }
  .consult-drawer-head { padding: 10px 14px 9px; align-items: center; }
  .consult-drawer-head .eyebrow { margin: 0 0 3px; }
  .consult-drawer-head h2 { margin: 0 0 2px; font-size: 20px; line-height: 1.2; }
  .consult-drawer-head small { font-size: 10px; }
  .consult-drawer-head > button { width: 34px; height: 34px; font-size: 21px; }
  .consult-drawer .consult-shell { grid-template-rows: auto minmax(0, 1fr); overflow: hidden; }
  .consult-history { padding: 8px 10px 9px; }
  .consult-history-head { padding: 0 2px 5px; font-size: 12px; }
  .conversation-search { margin-bottom: 6px; }
  .conversation-search span { display: none; }
  .conversation-search input { height: 34px; padding: 6px 9px; font-size: 11px; }
  #conversation-list { gap: 6px; }
  .conversation-item { min-width: 142px; max-width: 180px; gap: 2px; padding: 7px 9px; border-radius: 8px; }
  .conversation-item strong { font-size: 11px; }
  .conversation-item small, .conversation-item span { font-size: 9px; }
  .consult-main { grid-template-rows: minmax(0, 1fr) auto auto; overflow: hidden; }
  .consult-drawer .message-list { min-height: 0; padding: 12px 14px; gap: 10px; }
  .message { max-width: 96%; padding: 10px 12px; border-radius: 13px; font-size: 13px; }
  .message small { font-size: 9px; }
  .message-meta { min-height: 32px; }
  .copy-answer { min-width: 62px; min-height: 34px; justify-content: center; padding: 6px 9px; font-size: 11px; }
  .message p { margin-top: 4px; line-height: 1.55; }.message-body { margin-top: 4px; line-height: 1.6; }.message-body h4 { font-size: 14px; margin-top: 13px; }.message-body li { margin: 4px 0; }
  .consult-composer { grid-template-columns: minmax(0, 1fr) auto; gap: 7px; padding: 8px 10px max(8px, env(safe-area-inset-bottom)); }
  .consult-mode-note { margin-bottom: 0; padding: 7px 9px; font-size: 10px; }
  .auto-draft-panel { margin: 0 10px 6px; padding: 9px 10px; gap: 8px; }
  .auto-draft-panel p { font-size: 11px; }
  .auto-draft-panel button { min-height: 34px; padding: 6px 9px; font-size: 11px; }
  .auto-draft-preview { max-height: 48px; margin-top: 4px; font-size: 10px; }
  .consult-composer textarea { min-height: 48px; max-height: 88px; padding: 10px 11px; font-size: 12px; line-height: 1.45; }
  .consult-composer > button { width: auto; min-width: 66px; height: 48px; padding: 0 13px; }
  .consult-compose-tools { margin-top: 5px; gap: 7px; }.consult-compose-tools small { font-size: 9px; }.consult-image-button { min-height: 29px; padding: 4px 9px; font-size: 11px; }.consult-image-preview figure { flex-basis: 62px; height: 62px; }.message-images a { flex-basis: 92px; height: 92px; }
}
