:root {
  color-scheme: light;
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
  font-synthesis: none;
  --canvas: #f6f5fa;
  --paper: #ffffff;
  --ink: #30233f;
  --muted: #62576f;
  --line: #ded9e7;
  --purple: #7350ad;
  --purple-dark: #583586;
  --purple-pale: #eee7f7;
  --peach: #ffd7ba;
  --peach-pale: #fff2e9;
  --focus: #235fc0;
  --danger: #a13942;
}
* { box-sizing: border-box; }
html, body { width: 100%; min-width: 320px; height: 100%; margin: 0; }
body { background: var(--canvas); color: var(--ink); }
button, textarea { font: inherit; }
button { cursor: pointer; }
button:focus-visible, textarea:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
textarea { resize: vertical; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.app-shell { display: grid; grid-template-columns: 214px minmax(0, 1fr); height: 100vh; height: 100dvh; overflow: hidden; }
.sidebar { display: flex; flex-direction: column; padding: 25px 15px 18px; background: #f0edf6; border-right: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 11px; padding: 0 10px 28px; }
.brand-symbol { display: grid; place-items: center; flex: none; width: 35px; height: 35px; border-radius: 11px; background: var(--ink); color: #fff; font-size: 23px; line-height: 1; }
.brand strong { display: block; font-size: 15px; line-height: 1.4; }
.brand small { display: block; color: var(--muted); font-size: 11px; line-height: 1.5; white-space: nowrap; }
.main-nav { display: grid; gap: 6px; }
.nav-button { display: flex; align-items: center; gap: 11px; min-height: 46px; width: 100%; border: 1px solid transparent; border-radius: 11px; padding: 0 13px; background: transparent; color: var(--ink); text-align: left; font-size: 14px; font-weight: 600; }
.nav-button:hover { background: #e8e1f1; }
.nav-button.is-active { border-color: #d6cbe3; background: var(--paper); box-shadow: 0 2px 8px rgba(48,35,63,.04); }
.nav-button span { width: 20px; text-align: center; font-size: 20px; line-height: 1; font-weight: 400; }
.sidebar-end { margin: auto 10px 0; padding-top: 16px; border-top: 1px solid #d7d0df; color: var(--muted); font-size: 12px; line-height: 1.65; }
.main-panel { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--canvas); }
.preview-notice { display: flex; align-items: center; gap: 9px; min-height: 44px; flex: none; padding: 8px clamp(24px, 3.2vw, 50px); border-bottom: 1px solid #e8e4ee; color: #594e67; background: #fbfaff; font-size: 12px; line-height: 1.5; }
.preview-notice strong { color: var(--purple-dark); white-space: nowrap; }
.notice-pip { width: 7px; height: 7px; flex: none; border-radius: 50%; background: var(--purple); }
.status { position: fixed; z-index: 5; top: 58px; right: 23px; max-width: min(380px, calc(100vw - 36px)); padding: 11px 15px; border: 1px solid #c4b2df; border-radius: 10px; background: var(--ink); color: #fff; box-shadow: 0 9px 25px rgba(48,35,63,.18); font-size: 13px; line-height: 1.5; }
.view { min-height: 0; flex: 1; overflow: auto; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; border-radius: 11px; padding: 10px 16px; font-size: 14px; font-weight: 700; text-decoration: none; }
.button.primary { border: 1px solid var(--ink); background: var(--ink); color: white; }
.button.primary:hover { background: #493354; }
.button.outlined { border: 1px solid #c7b8d9; background: white; color: var(--ink); }
.button.outlined:hover { background: #f7f2fd; }
.button.text-button { border: 0; background: transparent; color: var(--purple-dark); padding-inline: 5px; }
.button.text-button:hover, .inline-action:hover, .back-button:hover { text-decoration: underline; }
.button.wide { width: 100%; }

.home-view { padding: 34px clamp(26px, 3.8vw, 58px) 55px; }
.home-grid { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(375px, .88fr); gap: clamp(25px, 3.5vw, 52px); align-items: stretch; max-width: 1280px; margin: 0 auto; }
.hero-area { display: flex; flex-direction: column; min-width: 0; padding-top: 20px; }
.hero-copy h1 { margin: 0; font-size: clamp(36px, 3.45vw, 52px); line-height: 1.22; letter-spacing: -.025em; font-weight: 750; }
.hero-copy h1 em { color: var(--purple); font-style: normal; }
.hero-copy p { max-width: 555px; margin: 23px 0 28px; color: #554a61; font-size: 17px; line-height: 1.75; }
.hero-input-block { margin-top: auto; border: 1px solid #d4cadd; border-radius: 17px; padding: 17px 18px 14px; background: var(--paper); box-shadow: 0 6px 24px rgba(58,35,84,.045); }
.hero-input-block label { display: block; font-size: 13px; font-weight: 700; }
.hero-input-block textarea { display: block; width: 100%; min-height: 88px; margin: 8px 0 0; padding: 4px 0; border: 0; outline: none; background: transparent; color: var(--ink); font-size: 16px; line-height: 1.7; }
.hero-input-block textarea:focus-visible { outline: none; }
.hero-input-block:focus-within { border-color: var(--purple); box-shadow: 0 0 0 3px rgba(115,80,173,.12); }
textarea::placeholder { color: #766d80; opacity: 1; }
.hero-form-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid #eeeaf2; padding-top: 11px; }
.hero-form-foot span { color: var(--muted); font-size: 12px; line-height: 1.5; }
.hero-form-foot .button { white-space: nowrap; }
.reply-lab { display: flex; flex-direction: column; min-width: 0; border: 1px solid #dbd3e5; border-radius: 20px; padding: 24px 25px 22px; background: #fff; box-shadow: 0 12px 36px rgba(53,31,81,.07); }
.lab-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.lab-tag { color: var(--purple-dark); font-size: 12px; font-weight: 800; letter-spacing: .04em; }
.lab-synthetic { color: var(--muted); font-size: 11px; }
.reply-lab h2 { margin: 17px 0 5px; font-size: 25px; letter-spacing: -.015em; }
.lab-lead { margin: 0 0 17px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.quoted-message { border-left: 3px solid #f0b98e; border-radius: 0 10px 10px 0; padding: 10px 14px; background: var(--peach-pale); }
.quoted-message span { display: block; color: #714e3b; font-size: 11px; font-weight: 700; }
.quoted-message p { margin: 4px 0 0; font-size: 14px; line-height: 1.6; }
.lab-choices { display: grid; gap: 9px; margin-top: 14px; }
.lab-choice { display: flex; align-items: flex-start; gap: 10px; min-height: 57px; width: 100%; border: 1px solid #e1dce8; border-radius: 12px; padding: 10px 11px; background: white; color: var(--ink); text-align: left; font-size: 13px; line-height: 1.6; }
.lab-choice:hover { border-color: #9e88bb; }
.lab-choice.is-selected { border-color: var(--purple); background: #f8f4fd; box-shadow: inset 0 0 0 1px var(--purple); }
.choice-letter { display: grid; place-items: center; width: 22px; height: 22px; flex: none; border-radius: 7px; background: #ece5f5; color: var(--purple-dark); font-size: 11px; font-weight: 800; }
.lab-condition { min-height: 33px; margin: 11px 0 6px; color: #554967; font-size: 12px; line-height: 1.5; }
.lab-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; }
.lab-actions .button { font-size: 12px; padding: 9px 11px; }
.task-section { max-width: 1280px; margin: 38px auto 0; }
.section-heading { display: flex; align-items: baseline; gap: 14px; margin-bottom: 14px; }
.section-heading h2 { margin: 0; font-size: 20px; }
.section-heading p { margin: 0; color: var(--muted); font-size: 13px; }
.task-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.task-entry { position: relative; display: flex; flex-direction: column; align-items: flex-start; min-height: 154px; width: 100%; border: 1px solid #dad0e8; border-radius: 16px; padding: 17px 20px; background: #eee8f7; color: var(--ink); text-align: left; }
.task-entry:hover { border-color: var(--purple); transform: translateY(-2px); }
.task-entry.peach { border-color: #efcfb7; background: #fff0e5; }
.task-entry.peach:hover { border-color: #bd8157; }
.task-entry .task-number { color: #694d8f; font-size: 11px; font-weight: 800; }
.task-entry.peach .task-number { color: #8a563b; }
.task-entry strong { margin-top: 12px; font-size: 18px; }
.task-entry > span:not(.task-number) { margin-top: 5px; color: #5a5064; font-size: 13px; line-height: 1.5; }
.task-entry b { position: absolute; right: 19px; top: 13px; font-size: 20px; font-weight: 500; }
.vent-entry { min-height: 44px; margin-top: 11px; border: 0; padding: 5px 1px; background: transparent; color: var(--purple-dark); font-size: 13px; font-weight: 700; text-align: left; }
.vent-entry:hover { text-decoration: underline; }

.flow-view { padding: 26px clamp(26px, 4vw, 58px) 60px; }
.back-button { min-height: 38px; border: 0; padding: 4px 0; background: transparent; color: var(--purple-dark); font-size: 13px; font-weight: 700; }
.flow-header { max-width: 790px; margin: 20px 0 27px; }
.flow-index { color: var(--purple-dark); font-size: 12px; font-weight: 800; }
.flow-header h1 { margin: 9px 0 8px; font-size: clamp(30px, 3vw, 40px); letter-spacing: -.02em; }
.flow-header p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.7; }
.flow-layout { display: grid; grid-template-columns: minmax(300px, .88fr) minmax(0, 1.12fr); gap: 22px; max-width: 1240px; align-items: start; }
.flow-form-card, .flow-result, .flow-placeholder { min-width: 0; border: 1px solid #ddd5e7; border-radius: 17px; background: white; padding: 23px; }
.field-title { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.field-title label, .intent-group legend { font-size: 14px; font-weight: 750; }
.inline-action { min-height: 35px; border: 0; background: transparent; color: var(--purple-dark); font-size: 12px; font-weight: 700; }
.flow-form-card textarea { width: 100%; border: 1px solid #d3ccdc; border-radius: 11px; padding: 13px; color: var(--ink); background: #fdfcff; font-size: 15px; line-height: 1.7; }
.flow-form-card textarea:focus { border-color: var(--purple); }
.intent-group { margin: 17px 0 20px; border: 0; padding: 0; }
.intent-group legend { margin-bottom: 10px; }
.intent { min-height: 44px; margin: 0 6px 7px 0; border: 1px solid #d8d1e1; border-radius: 10px; padding: 8px 11px; background: white; color: var(--ink); font-size: 12px; font-weight: 650; }
.intent.is-active { border-color: var(--purple); background: var(--purple-pale); color: var(--purple-dark); }
.inline-error { margin: 11px 0 0; border-left: 3px solid var(--danger); padding: 8px 10px; background: #fff5f5; color: #762e36; font-size: 13px; line-height: 1.6; }
.flow-placeholder { display: grid; place-content: center; min-height: 350px; color: var(--muted); text-align: center; }
.flow-placeholder span { margin-bottom: 10px; color: #b09ac9; font-size: 32px; }
.flow-placeholder p { max-width: 275px; margin: 0; font-size: 15px; line-height: 1.7; }
.result-head { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; margin-bottom: 17px; }
.result-head h2 { margin: 0; font-size: 20px; }
.result-head span { color: var(--muted); font-size: 11px; white-space: nowrap; }
.reply-options { display: grid; gap: 10px; }
.reply-option { border: 1px solid #ded8e6; border-radius: 12px; padding: 14px; }
.reply-option.is-selected { border-color: var(--purple); background: #faf7fe; box-shadow: inset 0 0 0 1px var(--purple); }
.option-head { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 9px; }
.option-head strong { color: var(--purple-dark); font-size: 12px; }
.option-head span { color: var(--muted); font-size: 11px; text-align: right; }
.reply-edit { width: 100%; min-height: 75px; border: 1px solid #d8d0e1; border-radius: 9px; padding: 9px; background: white; color: var(--ink); font-size: 14px; line-height: 1.6; }
.pick-button { min-height: 36px; margin-top: 8px; border: 0; padding: 5px 0; background: transparent; color: var(--purple-dark); font-size: 12px; font-weight: 750; }
.result-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 15px; }
.result-note { margin: 10px 0 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.analysis-list { display: grid; gap: 10px; margin-bottom: 17px; }
.analysis-list article { border-left: 3px solid #b6a1d0; padding: 4px 12px; }
.analysis-list article.takeaway { border-color: #e4a975; background: #fff9f4; padding-block: 9px; border-radius: 0 7px 7px 0; }
.analysis-list span { color: var(--purple-dark); font-size: 12px; font-weight: 800; }
.analysis-list p { margin: 5px 0 0; font-size: 14px; line-height: 1.72; }
.rehearsal-intents { margin-top: 0; }
.rehearsal-turn { margin-bottom: 12px; border-radius: 11px; padding: 13px 15px; background: #f3eef9; }
.rehearsal-turn.other { background: var(--peach-pale); }
.rehearsal-turn span { color: var(--purple-dark); font-size: 12px; font-weight: 800; }
.rehearsal-turn.other span { color: #825334; }
.rehearsal-turn p { margin: 5px 0 0; font-size: 14px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
.rehearsal-warning { margin: 14px 0 17px; color: #654c39; font-size: 12px; line-height: 1.7; }

.chat-view { display: flex; flex-direction: column; overflow: hidden; background: white; }
.chat-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex: none; min-height: 76px; padding: 13px clamp(22px, 4vw, 56px); border-bottom: 1px solid #eeeaf3; }
.chat-eyebrow { color: var(--purple-dark); font-size: 11px; font-weight: 700; }
.chat-top h1 { margin: 3px 0 0; font-size: 19px; }
.tone-bar { display: flex; align-items: center; justify-content: space-between; flex: none; gap: 13px; padding: 11px clamp(22px, 4vw, 56px); border-bottom: 1px solid #f0edf3; background: #fcfaff; }
.tone-bar > span { color: var(--muted); font-size: 12px; font-weight: 650; }
.tone-bar > div { display: flex; gap: 5px; }
.home-tone { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:9px 2px 1px; }
.home-tone > span { color:var(--muted); font-size:12px; font-weight:650; }
.home-tone > div { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:5px; }
.tone { min-height: 44px; border: 1px solid transparent; border-radius: 8px; padding: 6px 10px; background: transparent; color: var(--muted); font-size: 12px; font-weight: 700; }
.tone.is-active { border-color: #c6b0df; background: var(--purple-pale); color: var(--purple-dark); }
.chat-scroll { min-height: 0; flex: 1; overflow: auto; overscroll-behavior: contain; }
.chat-messages { max-width: 840px; margin: 0 auto; padding: 30px 35px 38px; }
.chat-intro { margin: 0 0 27px; color: var(--muted); font-size: 12px; }
.chat-message { margin-bottom: 25px; }
.chat-message.user { display: flex; justify-content: flex-end; }
.chat-message.user p { max-width: min(72%, 540px); margin: 0; border-radius: 15px 15px 4px 15px; padding: 11px 15px; background: var(--purple-pale); font-size: 15px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-message.assistant { max-width: 710px; }
.assistant-label { margin-bottom: 8px; color: var(--purple-dark); font-size: 12px; font-weight: 800; }
.assistant-label span { display: inline-grid; place-items: center; width: 21px; height: 21px; margin-right: 7px; border-radius: 7px; background: var(--purple); color: white; }
.chat-message.assistant p { margin: 0 0 9px 28px; font-size: 15px; line-height: 1.8; overflow-wrap: anywhere; }
.chat-message.assistant p:last-child { margin-bottom: 0; }
.chat-demo-note { margin: 14px 0 0; border-left: 3px solid #c0a9d8; padding: 9px 12px; background: #f7f3fb; color: #584d65; font-size: 12px; line-height: 1.65; }
.chat-composer { display: grid; grid-template-columns: minmax(0,1fr) 44px; gap: 8px; flex: none; width: min(100%, 840px); margin: 0 auto; padding: 14px 35px max(17px, env(safe-area-inset-bottom)); }
.chat-composer textarea { min-height: 51px; max-height: 150px; border: 1px solid #cfc4dc; border-radius: 12px; padding: 12px 13px; background: white; color: var(--ink); font-size: 15px; line-height: 1.6; }
.chat-composer button { align-self: start; width: 44px; height: 44px; border: 0; border-radius: 11px; background: var(--ink); color: white; font-size: 21px; }
.chat-composer button:disabled { background: #e4dfeb; color: #6e607b; cursor: not-allowed; }
.chat-composer p { grid-column: 1 / -1; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.5; text-align: center; }

@media (max-width: 1000px) {
  .app-shell { grid-template-columns: 175px minmax(0,1fr); }
  .home-grid { grid-template-columns: minmax(0,1fr); }
  .hero-area { padding-top: 0; }
  .hero-copy p { margin-bottom: 22px; }
  .reply-lab { max-width: 650px; }
  .flow-layout { grid-template-columns: minmax(0,1fr); }
  .flow-placeholder { min-height: 170px; }
}
@media (max-width: 700px) {
  .app-shell { display: flex; flex-direction: column; }
  .sidebar { flex: none; flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 14px; border-right: 0; border-bottom: 1px solid var(--line); }
  .brand { padding: 0; }
  .brand-symbol { width: 30px; height: 30px; border-radius: 9px; font-size: 19px; }
  .brand strong { font-size: 12px; }
  .brand small, .sidebar-end { display: none; }
  .main-nav { display: flex; gap: 4px; }
  .nav-button { width: auto; min-height: 44px; padding: 0 10px; font-size: 12px; }
  .nav-button span { width: 14px; font-size: 16px; }
  .main-panel { flex: 1; }
  .preview-notice { min-height: 0; padding: 8px 15px; font-size: 11px; }
  .home-view { padding: 25px 18px 40px; }
  .hero-copy h1 { font-size: clamp(31px, 8vw, 39px); }
  .hero-copy p { font-size: 15px; margin: 16px 0 22px; }
  .hero-input-block textarea { min-height: 74px; }
  .hero-form-foot { flex-wrap: wrap; }
  .reply-lab { padding: 19px; }
  .reply-lab h2 { font-size: 22px; }
  .task-section { margin-top: 31px; }
  .section-heading { display: block; }
  .section-heading p { margin-top: 3px; }
  .task-grid { grid-template-columns: 1fr; }
  .task-entry { min-height: 131px; }
  .flow-view { padding: 17px 18px 40px; }
  .flow-header { margin: 12px 0 20px; }
  .flow-header p { font-size: 14px; }
  .flow-form-card, .flow-result, .flow-placeholder { padding: 18px; }
  .chat-top { min-height: 67px; padding: 9px 15px; }
  .chat-top h1 { font-size: 16px; }
  .chat-top .button { font-size: 11px; }
  .tone-bar { flex-wrap: wrap; padding: 8px 14px; gap: 4px; }
  .tone-bar > span { font-size: 11px; }
  .home-tone { align-items:flex-start; flex-direction:column; }
  .tone { min-height: 44px; padding: 5px 7px; font-size: 11px; }
  .chat-messages { padding: 20px 17px 25px; }
  .chat-message.user p { max-width: 88%; }
  .chat-message.assistant p { font-size: 14px; }
  .chat-composer { padding: 10px 13px max(13px, env(safe-area-inset-bottom)); }
  .chat-composer p { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* v5 · 朋友的留言桌 */
:root {
  --canvas: #F8F9FC;
  --paper: #FFFFFF;
  --ink: #26334B;
  --muted: #5D687A;
  --line: #DDE2EA;
  --purple: #7163A7;
  --purple-dark: #5C4D91;
  --purple-pale: #E9E5F2;
  --peach: #F3D8CB;
  --peach-pale: #F8E9E1;
}
body { background: var(--canvas); }
.app-shell { grid-template-columns: 188px minmax(0, 1fr); }
.sidebar { padding: 29px 16px 20px; background: #F4F5F9; border-color: #E8EBF1; }
.brand { padding: 0 6px 34px; gap: 10px; }
.brand-symbol { width: 31px; height: 31px; border-radius: 9px; font-size: 19px; background: var(--ink); }
.brand strong { font-size: 14px; }
.brand small { color: #6C7482; }
.main-nav { gap: 5px; }
.nav-button { min-height: 44px; border-radius: 8px; padding-inline: 10px; color: #667186; font-weight: 600; }
.nav-button:hover { background: #EAECF2; }
.nav-button.is-active { border-color: transparent; background: var(--purple-pale); color: var(--ink); box-shadow: none; }
.nav-button span { font-size: 17px; }
.sidebar-end { border-color: #E0E3E9; color: #7A8190; }
.preview-notice { min-height: 0; justify-content: flex-end; gap: 7px; padding: 13px clamp(26px, 4vw, 60px) 0; border: 0; background: transparent; color: #657084; font-size: 11px; }
.preview-notice strong { color: var(--purple-dark); }
.notice-pip { width: 5px; height: 5px; }
.status { border: 0; background: var(--ink); box-shadow: 0 8px 22px rgba(38,51,75,.14); }
.button { border-radius: 11px; font-size: 14px; }
.button.primary { border-color: var(--ink); background: var(--ink); }
.button.primary:hover { background: #354764; }
.button.outlined { border-color: #C9CDDA; background: transparent; color: var(--ink); }
.button.outlined:hover { background: #EEEFF5; }
.button.text-button { color: var(--purple-dark); }

.home-view { padding: 43px clamp(28px, 4.2vw, 62px) 55px; }
.home-content { max-width: 1120px; margin-inline: auto; }
.home-grid { max-width: none; grid-template-columns: minmax(0, 1.42fr) minmax(360px, 1fr); gap: clamp(40px, 5vw, 78px); align-items: start; }
.hero-area { display: block; padding-top: 31px; }
.hero-copy h1 { max-width: 650px; color: var(--ink); font-family: "Songti SC", "Noto Serif CJK SC", "Source Han Serif SC", serif; font-weight: 600; font-size: clamp(44px, 3.65vw, 54px); line-height: 1.33; letter-spacing: -.025em; }
.hero-copy p { margin: 17px 0 26px; color: #566175; font-size: 18px; line-height: 1.6; }
.hero-input-block { margin: 0; border: 1px solid #E4E7ED; border-radius: 18px; padding: 17px 18px 16px; background: var(--paper); box-shadow: none; }
.hero-input-block:focus-within { border-color: var(--purple); box-shadow: 0 0 0 3px rgba(113,99,167,.16); }
.hero-input-block textarea { min-height: 114px; max-height: 340px; margin: 0; padding: 2px; color: var(--ink); font-size: 16px; line-height: 1.7; overflow-y: auto; }
.hero-input-block textarea::placeholder { color: #7B8493; }
.hero-form-foot { justify-content: flex-end; padding-top: 13px; border: 0; }
.hero-form-foot .button { min-width: 138px; }

.message-desk { min-width: 0; padding-top: 3px; }
.desk-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 17px; }
.desk-heading h2, .desk-editor h2 { margin: 0; color: var(--ink); font-size: 21px; font-weight: 700; letter-spacing: -.01em; }
.desk-heading span { flex: none; color: #757B8C; font-size: 11px; }
.message-stage { position: relative; display: flex; flex-direction: column; min-height: 237px; isolation: isolate; }
.message-curve { position: absolute; z-index: -1; top: 4px; right: 0; width: 44px; height: 230px; color: #9B90BD; pointer-events: none; }
.paper-message { position: relative; z-index: 1; padding: 16px 19px; border-radius: 15px; }
.paper-message span { display: block; margin-bottom: 7px; color: #585568; font-size: 11px; font-weight: 700; }
.paper-message p { margin: 0; color: var(--ink); font-size: 15px; line-height: 1.65; overflow-wrap: anywhere; }
.paper-message.incoming { width: calc(100% - 60px); background: var(--peach); border-radius: 15px 15px 15px 5px; }
.paper-message.outgoing { width: calc(100% - 70px); min-height: 112px; margin: 17px 50px 0 20px; background: #fff; border-radius: 15px 15px 5px 15px; box-shadow: 0 4px 16px rgba(38,51,75,.06); }
.paper-message.outgoing p { min-height: 54px; }
.paper-message textarea { display: block; width: 100%; min-height: 72px; border: 1px solid #CBD1DC; border-radius: 8px; padding: 8px 10px; color: var(--ink); font-size: 14px; line-height: 1.6; }
.lab-switch { display: flex; gap: 20px; margin-top: 7px; border-bottom: 1px solid #E0E3EA; }
.lab-choice { display: inline-flex; align-items: center; width: auto; min-height: 42px; border: 0; border-bottom: 2px solid transparent; border-radius: 0; padding: 0 1px; background: transparent; color: #667185; font-size: 13px; font-weight: 650; white-space: nowrap; }
.lab-choice:hover { border-color: #B6A9D2; color: var(--ink); }
.lab-choice.is-selected { border-color: var(--purple); background: transparent; box-shadow: none; color: var(--ink); }
.lab-choice.is-selected::before { content: "•"; margin-right: 6px; color: var(--purple); }
.lab-condition { min-height: 19px; margin: 11px 0 11px; color: #677185; font-size: 12px; line-height: 1.5; }
.lab-actions, .lab-actions > div { display: flex; align-items: center; gap: 8px; }
.lab-actions { justify-content: space-between; margin-top: 0; }
.lab-actions .button { min-height: 40px; padding: 7px 10px; font-size: 13px; }
.lab-actions #labTry { padding-inline: 15px; }

.desk-editor { padding-top: 0; }
.desk-editor { scroll-margin-top: 16px; }
.desk-editor .back-button { margin-bottom: 13px; }
.desk-editor h2 { margin-bottom: 17px; }
.desk-editor > label { display: flex; align-items: baseline; gap: 7px; margin: 15px 0 7px; font-size: 13px; font-weight: 700; }
.desk-editor > label span { color: #737D8E; font-size: 11px; font-weight: 400; }
.desk-editor > textarea, .desk-editor-result textarea { display: block; width: 100%; min-height: 72px; border: 1px solid #D5DAE4; border-radius: 12px; padding: 11px 12px; background: white; color: var(--ink); font-size: 14px; line-height: 1.65; }
.desk-editor textarea::placeholder { color: #818A99; }
.desk-limit { margin: 14px 0 8px; color: #5E697C; font-size: 12px; line-height: 1.6; }
.desk-editor-actions { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px; }
.desk-editor-actions .button { font-size: 12px; min-height: 40px; }
.desk-editor-result { margin-top: 19px; border-top: 1px solid #DDE1E9; padding-top: 13px; }
.desk-editor-result p { margin: 0 0 9px; color: #657084; font-size: 12px; font-weight: 700; }
.desk-editor-result > div { display: flex; gap: 12px; margin-top: 6px; }
.desk-editor-result small { color: #677185; font-size: 11px; }

.task-section { max-width: none; margin-top: 54px; }
.task-grid { grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 72px); }
.task-entry, .task-entry.peach { display: flex; flex-direction: column; min-height: 0; border: 0; border-top: 1px solid #C9D0DB; border-radius: 0; padding: 16px 0 7px; background: transparent; color: var(--ink); }
.task-entry:hover, .task-entry.peach:hover { border-color: var(--purple); transform: none; }
.task-entry strong { margin: 0 0 5px; font-size: 20px; line-height: 1.35; }
.task-entry > span:not(.task-number) { margin: 0; color: #616D80; font-size: 13px; line-height: 1.6; }
.task-entry .task-preview { margin-top: 14px !important; color: #3D4A60 !important; font-size: 13px !important; line-height: 1.7 !important; }
.vent-entry { margin-top: 17px; color: var(--purple-dark); }

.flow-index { display: none; }
.flow-header h1 { font-family: "Songti SC", "Noto Serif CJK SC", "Source Han Serif SC", serif; font-weight: 600; color: var(--ink); }
.flow-form-card, .flow-result, .flow-placeholder { border-color: #E1E5EC; box-shadow: none; }
.flow-form-card textarea { background: white; border-color: #D8DDE6; }
.intent.is-active, .tone.is-active { border-color: #A79BC6; background: var(--purple-pale); color: var(--ink); }
.flow-placeholder { background: transparent; border-color: #E5E8EF; }
.reply-option.is-selected { border-color: var(--purple); background: #F8F6FB; }
.chat-top, .tone-bar { border-color: #E9ECF1; }
.tone-bar { background: #FAFBFD; }
.chat-message.user p { background: var(--purple-pale); }
.chat-demo-note { background: #F3F1F7; color: var(--ink); }
.chat-composer button:disabled { background: #E0E4EB; color: #667185; }

@media (max-width: 1080px) {
  .app-shell { grid-template-columns: 168px minmax(0,1fr); }
  .home-grid { grid-template-columns: minmax(0,1fr); gap: 38px; }
  .hero-area { padding-top: 0; }
  .message-desk { max-width: 560px; }
  .task-section { margin-top: 45px; }
}
@media (max-width: 700px) {
  .app-shell { display: flex; }
  .sidebar { padding: 8px 14px; background: #F4F5F9; }
  .brand { padding: 0; }
  .main-nav { display: flex; }
  .nav-button { min-height: 44px; }
  .preview-notice { justify-content: flex-start; padding: 8px 17px 0; font-size: 10px; }
  .home-view { padding: 30px 18px 44px; }
  .hero-copy h1 { font-size: clamp(36px, 9.2vw, 43px); line-height: 1.34; }
  .hero-copy p { margin: 14px 0 22px; font-size: 16px; }
  .hero-input-block { padding: 14px; }
  .hero-input-block textarea { min-height: 100px; }
  .hero-form-foot { flex-wrap: nowrap; }
  .home-grid { gap: 40px; }
  .message-desk { max-width: none; }
  .desk-heading h2 { font-size: 20px; }
  .paper-message { padding: 14px 16px; }
  .task-section { margin-top: 43px; }
  .task-grid { grid-template-columns: 1fr; gap: 26px; }
  .task-entry strong { font-size: 19px; }
  .task-entry .task-preview { margin-top: 10px !important; }
}
