:root {
  color-scheme: light;
  --paper: #f8f6f0;
  --surface: #fffdf8;
  --ink: #282a23;
  --muted: #645f57;
  --line: #d9d6c9;
  --clay: #aa4935;
  --dark-clay: #873924;
  --blush: #f1dfd1;
  --sage: #dcdfc8;
  --sans: "PingFang SC","Microsoft YaHei","Noto Sans CJK SC",sans-serif;
  --display: "PingFang SC","Microsoft YaHei","Noto Sans CJK SC",sans-serif;
  --measure: min(1312px,calc(100% - clamp(48px,9vw,168px)));
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.65 var(--sans);
}
* { box-sizing:border-box; }
body { margin:0; }
button,input,textarea { font:inherit; color:inherit; }
button,a { -webkit-tap-highlight-color:transparent; }
button { cursor:pointer; border:0; background:transparent; }
a { color:inherit; text-decoration:none; }
button:disabled { cursor:default; opacity:.55; }
h1,h2,h3,p,figure { margin:0; }
button:not(:disabled),a,input,textarea { transition:color .18s,background .18s,border-color .18s,box-shadow .18s; }
:focus-visible { outline:3px solid var(--clay); outline-offset:3px; }
h1:focus,#app:focus { outline:none; }
.skip-link { position:fixed; z-index:10; left:12px; top:-70px; background:var(--surface); padding:12px; }
.skip-link:focus { top:8px; }
.masthead-inner,.app-scroll,.colophon { width:var(--measure); margin-inline:auto; }
.masthead-inner { min-height:86px; display:flex; align-items:center; justify-content:space-between; gap:25px; border-bottom:1px solid var(--line); }
.brand { display:inline-flex; align-items:center; gap:11px; font-size:21px; font-weight:750; letter-spacing:-.045em; }
.brand-mark { width:34px; height:34px; position:relative; border-radius:50% 50% 40% 40%; background:var(--clay); transform:rotate(-9deg); }
.brand-mark i { position:absolute; left:10px; top:17px; width:16px; height:10px; border-radius:50% 50% 35% 35%; background:#fff0dc; }
.brand-mark i::before,.brand-mark i::after { content:""; position:absolute; top:-7px; width:4px; height:5px; border-radius:50%; background:#fff0dc; }
.brand-mark i::before { left:1px; transform:rotate(-15deg); }
.brand-mark i::after { right:1px; transform:rotate(15deg); }
.masthead nav { display:flex; align-items:center; gap:clamp(18px,4vw,48px); font-size:14px; }
.masthead nav a { padding:8px 0; }
.masthead nav a[aria-current=page]:not(.den-link) { text-decoration:underline; text-underline-offset:7px; text-decoration-color:var(--clay); }
.masthead nav .den-link { border:1px solid #c2bdad; padding:8px 18px; border-radius:40px; }
.masthead nav .den-link span { margin-left:6px; }
.masthead nav a:hover,.walk-link:hover { color:var(--clay); }
.colophon { display:flex; align-items:center; gap:14px; border-top:1px solid var(--line); color:var(--muted); font-size:12px; padding:22px 0 32px; }
.colophon>a { margin-left:auto; } .footer-domain { margin-left:9px; letter-spacing:.03em; }
.landing-hero { display:grid; grid-template-columns: minmax(0,.95fr) minmax(0,1fr); align-items:center; gap:clamp(32px,5vw,100px); padding:clamp(42px,5vw,84px) 0 clamp(50px,5vw,88px); }
body[data-page=landing] { background:radial-gradient(ellipse 49% 570px at 84% 29%,#eadfc748,transparent 86%),var(--paper); }
.landing-copy h1 { font:550 clamp(54px,6.3vw,96px)/1.15 var(--display); letter-spacing:-.07em; }
.landing-copy h1 em { font-style:normal; color:var(--clay); }
.hero-intro { margin-top:27px; font-size:clamp(15px,1.21vw,19px); color:var(--muted); line-height:1.85; }
.hero-actions { display:flex; flex-wrap:wrap; align-items:center; gap:22px; margin-top:31px; }
.walk-link { font-size:14px; text-underline-offset:5px; text-decoration:underline; }
.walk-link span { display:inline-block; padding-left:5px; }
.habitat { position:relative; min-width:0; isolation:isolate; padding:4px clamp(18px,3vw,56px) 14px; }
.habitat-frame { position:relative; padding:11px 12px 0; border-radius:50% 50% 0 0; background:linear-gradient(110deg,#bfb79b,#fffbeb 38%,#d7c5a6 75%,#c0b298); box-shadow:-1px -1px 0 #faf3db,2px 1px 0 #c3b798,16px 17px 30px -18px #7c6e514c; }
.habitat-frame::after { content:""; display:block; margin:0 -18px -7px; position:relative; height:9px; background:linear-gradient(#fff4db 12%,#cdbfaa 36%,#d9c9b1); box-shadow:0 5px 9px -5px #74644c; }
.sun-window { --sky:#c5cbb6; --sky-low:#f0ddc2; position:relative; isolation:isolate; overflow:hidden; width:100%; aspect-ratio:1.3; background:linear-gradient(165deg,var(--sky) 0%,var(--sky-low) 69%,#ebdac5); }
.scenery-cat { --sky:#d9c9c9; --sky-low:#f3e3ce; }
.scenery-panda { --sky:#b1c5be; --sky-low:#e1dfc8; }
.scenery-squirrel { --sky:#e2be9b; --sky-low:#ecd7af; }
.scenery-turtle { --sky:#acbeb0; --sky-low:#dfdfbe; }
.hero-window { aspect-ratio:1.13; border-radius:50% 50% 0 0; }
.window-disc { position:absolute; top:10%; left:18%; width:33%; aspect-ratio:1; border-radius:50%; background:radial-gradient(circle at 38% 38%,#fff5d5,#fcdfb4); box-shadow:0 0 52px 12px #fce5ad54; }
.terrain { position:absolute; width:140%; height:66%; border-radius:50%; }
.terrain-far { top:57%; left:15%; background:linear-gradient(175deg,#a6ad9275,#acb29b 42%); transform:rotate(-10deg); }
.terrain-near { top:71%; left:-64%; background:linear-gradient(170deg,#d4bc9a,#bca68b); transform:rotate(12deg); }
.sunlit-floor { position:absolute; height:13%; bottom:0; width:100%; background:linear-gradient(#dbcbac,#e8d8bd 40%,#cebd9f); box-shadow:0 -1px 1px #ffedc0; }
.stage-animal { position:absolute; z-index:1; display:block; object-fit:contain; left:10%; bottom:6%; width:80%; height:80%; }
.stage-animal.cutout { height:auto; max-height:85%; filter:drop-shadow(0 7px 4px #6c513025); }
.sun-window:has(.cutout)::after { content:""; position:absolute; z-index:0; bottom:5%; left:13%; width:70%; height:5%; background:#64554253; border-radius:50%; filter:blur(5px); }
.sun-window:has(.photo) { background:#f6edde; }
.sun-window:has(.photo) .terrain,.sun-window:has(.photo) .sunlit-floor,.sun-window:has(.photo) .window-disc { display:none; }
.sun-window:has(.photo)::after { content:""; position:absolute; inset:0; z-index:2; pointer-events:none; background:radial-gradient(ellipse at 52% 70%,transparent 30%,color-mix(in srgb,var(--sky) 45%,transparent) 100%); }
.photo { height:90%; width:86%; bottom:2%; left:7%; }
.scenery-cat .photo { mask-image:radial-gradient(ellipse 32% 15% at 10% 100%,transparent 72%,#000 98%); }
.habitat-index { display:flex; align-items:baseline; justify-content:center; gap:8px; margin:24px 0 6px; }
.habitat-index strong { font-size:18px; } .habitat-index span { color:#5c574a; font-size:13px; }
.species-dock { display:flex; align-items:center; justify-content:center; gap:7px; }
.species-dock button { border:1px solid transparent; padding:3px; border-radius:50%; display:grid; width:49px; height:49px; place-items:center; }
.species-dock img { display:block; width:100%; height:100%; object-fit:cover; border-radius:50%; }
.species-dock button[aria-pressed=true] { border-color:var(--clay); background:#fff6e9; }
.species-dock button:hover { background:#fff4dc; }
.walkthrough { scroll-margin-top:20px; display:grid; grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr); align-items:center; gap:46px; background:#e8eadb; border-radius:18px; padding:clamp(26px,4vw,58px); margin-bottom:48px; }
.example-menu h2 { font-size:clamp(22px,2.1vw,31px); line-height:1.45; }
.example-controls { display:inline-flex; flex-wrap:wrap; gap:3px; border:1px solid #c7cbb8; border-radius:24px; padding:3px; margin-top:16px; }
.example-controls button { color:#55594a; padding:7px 13px; font-size:13px; border-radius:20px; }
.example-controls button[aria-pressed=true] { background:#424a38; color:#fff; }
.example-body { min-width:0; border-left:1px solid #b9c0a6; padding-left:clamp(20px,4vw,63px); }
.example-label { font-size:12px; color:#566047; }
.example-body h3 { font-size:clamp(20px,2vw,29px); letter-spacing:-.035em; margin:6px 0; }
.example-body p { color:#52584b; font-size:14px; }
.screen { max-width:1192px; margin:auto; padding:clamp(28px,4vw,60px) 0 clamp(42px,6vw,92px); min-height:65vh; }
.page-head { margin-bottom:26px; }
h1 { font:680 clamp(34px,4.5vw,67px)/1.16 var(--display); letter-spacing:-.07em; }
.page-head p { margin-top:10px; font-size:15px; color:var(--muted); }
.spread { display:grid; grid-template-columns:minmax(0,.94fr) minmax(0,1fr); gap:clamp(35px,6vw,92px); align-items:start; }
.folio,.workspace { min-width:0; }
.portrait { border-radius:20px; overflow:hidden; background:#eae7d7; }
.portrait-stage { position:relative; margin:clamp(18px,3vw,40px) clamp(20px,4.2vw,65px) 0; }
.portrait-stage .sun-window { border-radius:48% 48% 0 0; aspect-ratio:1.13; box-shadow:0 0 0 5px #f1ecde,0 0 0 6px #b8b39e; }
.portrait figcaption { padding:22px clamp(18px,3vw,42px) 26px; }
.portrait-name { display:flex; flex-wrap:wrap; align-items:baseline; gap:6px 14px; }
.portrait-name strong { font-size:clamp(25px,2.5vw,39px); font-weight:650; letter-spacing:-.04em; line-height:1.25; overflow-wrap:anywhere; }
.portrait-name span { font-size:13px; color:#625a4e; }
.portrait-name .quiet { margin-left:auto; }
.portrait figcaption p { margin-top:7px; color:#57564c; font-size:14px; }
.form-block + .form-block { margin-top:22px; }
h2,.field-title { display:block; font:650 22px/1.4 var(--display); letter-spacing:-.045em; }
h3 { font:650 16px/1.5 var(--sans); }
.species-row,.personalities { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:7px; margin-top:11px; }
.species-option { position:relative; display:flex; align-items:center; flex-direction:column; gap:3px; padding:6px 2px; border:1px solid var(--line); border-radius:10px; font-size:13px; background:#f1eee5; }
.species-option img { width:47px; height:38px; object-fit:cover; mix-blend-mode:multiply; border-radius:5px; }
.personality-option,.mode-option { min-width:0; min-height:40px; padding:6px 2px; border:1px solid var(--line); border-radius:24px; font-size:13px; background:var(--surface); }
.species-option.selected,.personality-option.selected,.mode-option.selected { border-color:var(--clay); color:var(--dark-clay); background:var(--blush); font-weight:600; }
.species-option:hover,.personality-option:hover,.mode-option:hover { border-color:var(--clay); }
.voice-card { display:flex; align-items:start; gap:8px; margin-top:14px; padding:13px 16px; background:#eeeee2; border-radius:4px 16px 16px 16px; }
.quote-mark { font:600 28px/1 Georgia,serif; color:#787f66; }
.voice-card p { font-size:14px; }
.quiet { min-height:35px; padding:5px 0; color:var(--dark-clay); font-size:13px; text-underline-offset:4px; }
.quiet:not(:disabled):hover { text-decoration:underline; }
input:not([type]),input[type=text],textarea { display:block; width:100%; border:1px solid #bab7a9; border-radius:9px; background:#fffefa; padding:11px 13px; font-size:16px; }
input:not([type]),input[type=text] { height:44px; margin-top:8px; }
textarea { line-height:1.65; resize:vertical; min-height:94px; max-height:45vh; }
textarea:focus,input:not([type]):focus { border-color:var(--clay); }
textarea::placeholder,input::placeholder { color:#756e62; }
.hint,.field-meta,.home-settings>span { font-size:12px; color:var(--muted); }
.hint { margin-top:4px; }
.settings-row { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:5px 12px; margin:12px 0; }
.age-check,.motion-setting,.consent-choice { display:flex; align-items:center; gap:7px; min-height:35px; cursor:pointer; font-size:13px; }
input[type=checkbox] { width:16px; height:16px; margin:0; accent-color:var(--clay); flex:none; }
input.switch { appearance:none; position:relative; width:29px; height:17px; border:1px solid #a99e8c; background:#d1cabb; border-radius:20px; }
input.switch::before { content:""; position:absolute; left:2px; top:2px; width:11px; height:11px; background:white; border-radius:50%; }
input.switch:checked { background:var(--clay); border-color:var(--clay); }
input.switch:checked::before { left:14px; }
.primary,.secondary { display:flex; gap:10px; align-items:center; justify-content:center; min-height:45px; border:1px solid transparent; border-radius:26px; padding:9px 19px; font-size:15px; font-weight:600; }
.primary { width:100%; color:#fffaf4; background:var(--clay); }
.hero-actions .primary { width:auto; min-height:49px; padding-inline:24px; }
.hero-actions .primary span { font-size:19px; font-weight:400; }
.primary:not(:disabled):hover { background:var(--dark-clay); }
.primary:disabled { background:#e1dbcd; color:#6e675b; opacity:1; }
.secondary { color:var(--dark-clay); border-color:#c5b4a2; background:#fffaf4; }
.secondary:not(:disabled):hover { background:var(--blush); }
.restore-link { display:block; margin:6px auto 0; }
.error,.interview-notice { background:var(--blush); color:#733421; border-radius:8px; padding:10px 14px; margin:14px 0; font-size:14px; }
.section-note { font-size:14px; color:var(--muted); line-height:1.75; }
.small-title { color:var(--dark-clay); font-size:13px; margin-bottom:9px; font-weight:600; }
.goal-workspace,.interview-card { background:var(--surface); border:1px solid var(--line); border-radius:18px; padding:clamp(20px,2.7vw,40px); }
.goal-empty h2,.goal-empty .field-title,.interview-card h2 { font-size:clamp(23px,2.2vw,32px); }
.goal-empty .section-note { margin:9px 0 18px; }
.field-meta,.actions { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.field-meta { margin:5px 0 18px; }
.home-settings { margin:20px 0 0; padding-top:12px; border-top:1px solid var(--line); }
.rename-card,.interview-log { border-top:1px solid var(--line); padding-top:14px; margin-top:20px; }
.rename-card .actions { justify-content:flex-end; padding:8px 0; }
.interview-wrap { display:grid; grid-template-columns:minmax(195px,.66fr) minmax(0,1.35fr); gap:clamp(26px,5vw,70px); align-items:start; }
.interview-cover { padding:clamp(18px,2.5vw,32px); background:#e7e9dc; border-radius:16px; }
.interview-cover h2 { font-size:24px; overflow-wrap:anywhere; }
.interview-cover .quiet { margin-top:12px; }
.interview-card h2,.interview-card h3 { margin-bottom:10px; }
.interview-card textarea { margin:7px 0 13px; }
.interview-card .primary,.interview-card .secondary,.consent-choice { margin-top:12px; }
.interview-card .secondary { min-width:140px; }
.mode-options { display:flex; flex-wrap:wrap; gap:8px; margin:9px 0; }
.mode-option { padding:7px 14px; }
.interview-status:empty { display:none; }
.conflict-note { background:#ede7d8; margin:12px 0; padding:12px 16px; }
.conflict-text { white-space:pre-wrap; overflow-wrap:anywhere; user-select:text; }
.interview-notice { color:#4c583c; background:#e7eadb; }
.transcript,.summary-editor { margin-top:18px; }
.interview-actions { display:flex; flex-wrap:wrap; gap:5px 18px; align-items:center; }
.interview-log ol,.plan-content ol { padding-left:24px; margin:9px 0; }
.interview-log li,.plan-content li { padding:8px 0 8px 3px; border-bottom:1px solid var(--line); }
.interview-log li::marker,.plan-content li::marker { color:var(--clay); }
.interview-log p,.plan-content p { overflow-wrap:anywhere; white-space:pre-line; }
.interview-log .section-note { margin-bottom:3px; }
.draft-footer { margin-top:18px; }
@media(min-width:761px) and (max-width:1040px) {
  .landing-copy h1 { font-size:clamp(42px,5.5vw,59px); }
  .habitat { padding:25px 18px 15px; }
}
@media(max-width:760px) {
  :root { --measure:calc(100% - 36px); }
  .masthead-inner { min-height:56px; gap:10px; }
  .brand { font-size:17px; gap:7px; } .brand-mark { width:29px; height:29px; }
  .brand-mark i { left:7px; top:14px; }
  .masthead nav { gap:16px; font-size:13px; } .masthead nav .den-link { padding:5px 11px; }
  .landing-hero { grid-template-columns:1fr; gap:24px; padding:30px 0; }
  .landing-copy h1 { font-size:clamp(42px,8.6vw,65px); line-height:1.1; }
  .desktop-br { display:none; }
  .hero-intro { margin-top:14px; font-size:14px; }
  .hero-actions { margin-top:15px; gap:16px; }
  .hero-actions .primary { min-height:43px; font-size:14px; }
  .habitat { padding:6px clamp(18px,8vw,70px) 0; }
  .hero-window { aspect-ratio:1.5; } .habitat-index { margin:18px 0 3px; }
  .habitat-index strong { font-size:16px; } .species-dock button { width:37px; height:37px; }
  .walkthrough { grid-template-columns:1fr; gap:15px; padding:21px; margin-bottom:26px; }
  .example-menu h2 { font-size:21px; } .example-controls { margin-top:9px; }
  .example-body { border:0; padding:16px 0 0; border-top:1px solid #bbc1ac; }
  .screen { padding:23px 0 32px; }
  .page-head { margin-bottom:16px; } h1 { font-size:32px; }
  .page-head p { margin-top:5px; font-size:13px; }
  .spread,.interview-wrap { grid-template-columns:1fr; gap:18px; }
  .portrait { display:grid; grid-template-columns:minmax(100px,.85fr) minmax(0,1fr); gap:12px; align-items:center; padding:10px 12px; border-radius:14px; }
  .portrait-stage { margin:0; } .portrait-stage .sun-window { aspect-ratio:1.52; box-shadow:none; }
  .portrait figcaption { padding:0; }
  .portrait-name { gap:4px 8px; } .portrait-name strong { font-size:23px; }
  .portrait-name span,.portrait figcaption p { font-size:12px; } .portrait figcaption p { margin-top:3px; }
  h2,.field-title { font-size:19px; }
  .form-block + .form-block { margin-top:15px; }
  .species-row,.personalities { margin-top:8px; }
  .species-option { min-height:50px; padding:4px 1px; } .species-option img { width:36px; height:29px; }
  .personality-option,.quiet { min-height:39px; }
  .goal-workspace,.interview-card { padding:18px; border-radius:14px; }
  .interview-cover { padding:14px 18px; } .interview-cover h2 { font-size:20px; } .interview-cover .quiet { margin:0; }
  .interview-wrap { gap:12px; }
  .colophon { padding:15px 0 22px; gap:9px; flex-wrap:wrap; }
}
@media(max-width:405px) {
  :root { --measure:calc(100% - 28px); }
  .screen { padding-top:16px; } .page-head { margin-bottom:10px; }
  .masthead nav { gap:9px; } .masthead nav .den-link { padding:5px 9px; }
  .landing-copy h1 { font-size:clamp(38px,10.6vw,43px); }
  .spread { gap:14px; }
  .personalities { grid-template-columns:repeat(6,minmax(0,1fr)); gap:5px; }
  .personality-option { grid-column:span 2; } .personality-option:nth-child(n+4) { grid-column:span 3; }
  .species-row { gap:4px; } .footer-domain { margin-left:4px; }
}
@media(prefers-reduced-motion:reduce) { *,*::before,*::after { transition:none!important; animation:none!important; } }
.reduced *, .paused * { animation:none!important; transition:none!important; }
