/* 妈缓一下 · 温和、安静、以事务为中心的界面。无外部字体或图片。 */
:root {
  color-scheme: light;
  --page: #f7f7f2;
  --white: #ffffff;
  --surface: #eef3ec;
  --ink: #203b33;
  --muted: #617068;
  --green: #245a49;
  --green-hover: #194737;
  --line: #dde3da;
  --focus: #3a7864;
  --warning-bg: #f7edda;
  --warning-ink: #8a5a16;
  --error-bg: #fbeeea;
  --error-ink: #9d3a32;
  --radius: 14px;
  --shadow: 0 8px 30px rgb(32 59 51 / 4%);
}
* { box-sizing: border-box; }
html { scroll-padding-bottom: 100px; }
body { margin: 0; min-width: 320px; background: var(--page); color: var(--ink); font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif; font-size: 16px; line-height: 1.7; -webkit-font-smoothing: antialiased; }
::selection { background: #d7e6d8; color: var(--ink); }
button, input, textarea, select { font: inherit; }
input, textarea { caret-color: var(--green); }
button, a, summary, [role="button"] { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, summary:focus-visible, [role="button"]:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; }
h1, h2, h3, p { overflow-wrap: anywhere; }
h1 { max-width: 24em; margin: 0 0 12px; font-size: 28px; font-weight: 650; line-height: 1.38; letter-spacing: -.035em; text-wrap: balance; }
h2 { margin: 40px 0 16px; font-size: 19px; font-weight: 620; line-height: 1.5; letter-spacing: -.015em; }
h3 { margin: 0 0 6px; font-size: 16px; font-weight: 600; line-height: 1.55; }
p { max-width: 72ch; }
.demo-banner { min-height: 36px; padding: 8px 20px; border-bottom: 1px solid var(--line); background: #eef1e9; color: #526454; text-align: center; font-size: 14px; line-height: 1.6; }
.app-shell { display: grid; grid-template-columns: 224px minmax(0, 1fr); max-width: 1360px; min-height: calc(100vh - 36px); margin: 0 auto; }
aside { position: sticky; top: 0; align-self: start; display: flex; flex-direction: column; min-width: 0; height: 100vh; height: 100dvh; max-height: 1080px; border-right: 1px solid var(--line); padding: 42px 24px 32px; }
.wordmark { font-size: 30px; font-weight: 750; line-height: 1.2; letter-spacing: -.04em; }
.wordmark span { display: block; margin-top: 12px; font-size: 12px; font-weight: 450; line-height: 1.5; letter-spacing: .07em; color: var(--muted); }
nav { display: grid; gap: 8px; margin-top: 48px; }
nav button { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 12px 14px; border-color: transparent; border-radius: 12px; background: transparent; text-align: left; color: var(--muted); font-size: 14px; }
nav button::before { content: ""; width: 20px; height: 20px; flex: 0 0 20px; background: currentColor; -webkit-mask: var(--nav-icon) center / contain no-repeat; mask: var(--nav-icon) center / contain no-repeat; }
nav button:nth-child(1) { --nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m3 10 9-7 9 7v10a1 1 0 0 1-1 1h-5v-7H9v7H4a1 1 0 0 1-1-1z'/%3E%3C/svg%3E"); }
nav button:nth-child(2) { --nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 11.5a8.5 8.5 0 0 1-8.5 8.5H4l-2 2v-9.5A8.5 8.5 0 0 1 10.5 4H13a8 8 0 0 1 8 7.5Z'/%3E%3Cpath d='M7 10h10M7 14h6'/%3E%3C/svg%3E"); }
nav button:nth-child(3) { --nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21v-2a6 6 0 0 1 6-6h4a6 6 0 0 1 6 6v2'/%3E%3C/svg%3E"); }
nav button.active { border-color: #dce6d9; color: var(--green); background: #e8eee3; font-weight: 600; }
.aside-note { margin: auto 0 0; padding-top: 64px; font-size: 14px; line-height: 1.9; color: var(--muted); }
aside small { margin-top: 24px; font-size: 12px; line-height: 1.8; color: var(--muted); }
main { width: 100%; min-width: 0; max-width: 1020px; padding: 44px 56px 88px; }
main > .subtle:first-of-type { margin-top: 0; margin-bottom: 28px; max-width: 58ch; }
.subtle, .meta { font-size: 14px; color: var(--muted); }
.meta { display: block; margin-top: 6px; line-height: 1.65; overflow-wrap: anywhere; }
.section-top { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-top: 36px; }
.section-top h2 { margin: 0 0 12px; }
.section-top h1 { margin-bottom: 0; }
.section-top .meta { margin: 0 0 12px; text-align: right; }
.hero, .paper, .growth-form { margin: 24px 0; padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
.hero { box-shadow: var(--shadow); }
.hero p { margin: 10px 0 20px; max-width: 64ch; font-size: 14px; }
.paper p, .quote { white-space: pre-wrap; }
.paper > :first-child, .growth-form > :first-child { margin-top: 0; }
.paper > :last-child, .growth-form > :last-child { margin-bottom: 0; }
.quote { margin: 16px 0; padding: 14px 16px; border: 0; border-radius: 10px; background: var(--surface); font-size: 14px; line-height: 1.85; overflow-wrap: anywhere; }
.list-row { display: flex; align-items: center; gap: 16px; padding: 21px 0; border-bottom: 1px solid var(--line); }
.grow { flex: 1; min-width: 0; }
.list-link { cursor: pointer; border-radius: 10px; padding-inline: 12px; margin-inline: -12px; }
.list-link:hover { background: #edf1e8; }
.list-link:active { background: #e4ebdf; }
.list-row .pill { flex-shrink: 0; }
.circle { width: 12px; height: 12px; border: 1.5px solid var(--green); border-radius: 50%; flex-shrink: 0; }
.empty { padding: 24px 0; margin: 0; font-size: 14px; color: var(--muted); }
.pill { display: inline-flex; align-items: center; min-height: 26px; padding: 3px 10px; border: 1px solid #dbe4d6; border-radius: 6px; background: #edf2e8; color: #4a634d; font-size: 14px; line-height: 1.5; white-space: nowrap; }
button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 16px; border: 1px solid #cbd7c9; border-radius: 10px; background: var(--white); color: var(--green); font-size: 14px; font-weight: 500; line-height: 1.5; cursor: pointer; text-align: center; transition: background-color 160ms ease-out, border-color 160ms ease-out, box-shadow 160ms ease-out; }
button:hover { background: #edf3e9; border-color: #b0c5ae; }
button:active { background: #e1ebdc; }
button.primary { border-color: var(--green); background: var(--green); color: var(--white); }
button.primary:hover { border-color: var(--green-hover); background: var(--green-hover); box-shadow: 0 4px 12px rgb(32 59 51 / 12%); }
button[disabled], button[disabled]:hover { border-color: var(--line); background: #edf0ea; color: #6b796c; box-shadow: none; cursor: not-allowed; }
.danger { color: var(--error-ink); border-color: #e5cbc6; }
.danger:hover { color: #7c2e26; background: var(--error-bg); border-color: #d9aca3; }
.back { margin-bottom: 20px; border-color: transparent; background: transparent; padding-inline: 0; color: var(--muted); }
.back + .section-top { margin-top: 0; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 18px 0; }
.actions > button { max-width: 100%; }
.field { display: block; margin: 22px 0 8px; font-size: 14px; font-weight: 550; color: var(--ink); }
input, select, textarea { width: 100%; min-width: 0; border: 1px solid #d4ddd1; border-radius: 10px; padding: 12px 14px; background: #fcfdfb; color: var(--ink); font-size: 16px; line-height: 1.65; }
input, select { min-height: 44px; }
input::placeholder, textarea::placeholder { color: #6b786d; opacity: 1; }
input:focus, textarea:focus, select:focus { background: var(--white); border-color: var(--green); }
input:disabled, textarea:disabled, select:disabled { background: #f0f2ec; color: var(--muted); }
textarea { display: block; resize: vertical; min-height: 132px; line-height: 1.85; }
textarea.long { min-height: 245px; }
.two-fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; }
label.inline { display: flex; align-items: center; gap: 10px; }
label.inline input, .action-option input { width: 19px; height: 19px; min-height: 19px; accent-color: var(--green); }
.action-option { display: flex; align-items: flex-start; gap: 14px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.action-option input { margin: 4px 0 0; flex-shrink: 0; }
.notice, .error { margin: 20px 0; padding: 16px 18px; border: 1px solid #e8d9bc; border-radius: 12px; background: var(--warning-bg); color: var(--warning-ink); font-size: 14px; line-height: 1.8; overflow-wrap: anywhere; }
.error { border-color: #ecd0c8; background: var(--error-bg); color: var(--error-ink); }
.error p { margin: 0 0 10px; }
.memory { font-size: 14px; }
.footer-note, .privacy-note, .input-note { max-width: 72ch; margin: 14px 0 0; font-size: 14px; line-height: 1.8; color: var(--muted); }
.composer { padding: 28px; }
.composer h2 { margin-top: 0; margin-bottom: 10px; font-size: 20px; }
.composer .field { margin-top: 20px; }
.composer textarea { min-height: 128px; background: #fdfefa; padding: 16px; font-size: 16px; border-color: #cfd9c9; }
.composer:focus-within { border-color: #b6cbb1; }
.composer .primary { min-height: 48px; margin-top: 18px; padding-inline: 22px; }
.composer .primary::after { content: ""; width: 18px; height: 18px; margin-left: 6px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14m-5-5 5 5-5 5'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14m-5-5 5 5-5 5'/%3E%3C/svg%3E") center / contain no-repeat; }
.composer .input-note { margin-top: 10px; }
.specialist-options { font-size: 14px; margin-top: 18px; }
summary { min-height: 44px; padding: 11px 0; cursor: pointer; color: var(--green); font-size: 14px; overflow-wrap: anywhere; }
details[open] > summary { margin-bottom: 14px; }
.entry-examples { margin: 28px 0 34px; }
.entry-examples h2 { margin: 0 0 8px; font-size: 14px; color: var(--muted); font-weight: 500; }
.example-line { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.example-line:last-of-type { border-bottom: 0; }
.example-button { min-height: 44px; padding: 9px 0; background: transparent; border: 0; border-radius: 4px; text-align: left; justify-content: flex-start; font-size: 14px; font-weight: 500; text-decoration: none; text-underline-offset: 5px; }
.example-button:hover { background: transparent; text-decoration: underline; }
.example-line .meta { margin: 0; font-size: 14px; text-align: right; }
.entry-examples .footer-note { margin-top: 12px; }
.growth-entry { display: flex; gap: 10px; flex-wrap: wrap; margin: 20px 0 36px; }
.growth-entry button { background: transparent; font-size: 14px; color: var(--muted); padding: 10px 14px; }
.growth-entry button:hover { background: var(--surface); color: var(--green); }
.growth-form { padding: 28px; }
.growth-form textarea { min-height: 120px; }
.growth-record { padding: 26px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.growth-record h2 { margin: 0 0 18px; }
.growth-record h3 { margin-top: 24px; }
.growth-record h3:first-child { margin-top: 0; }
.growth-record .quote { margin: 12px 0; padding: 0; background: transparent; border-radius: 0; }
.growth-record .footer-note { margin-top: 16px; }
.growth-examples { display: flex; gap: 10px; flex-wrap: wrap; margin: 20px 0; }
.growth-history { margin: 32px 0; }
.growth-form input[type="date"] { font-variant-numeric: tabular-nums; }
.growth-form button { margin-top: 18px; }
.intake-question, .intake-correction { margin: 20px 0; padding: 20px 0; border-top: 1px solid var(--line); }
.knowledge-reference { margin: 24px 0; }
.member-editor { margin: 22px 0 36px; }
.member-list .list-row { padding-block: 16px; }
.knowledge-row { padding: 24px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.knowledge-row p { white-space: pre-wrap; }
.knowledge-row button { margin: 12px 10px 0 0; }
.knowledge-row details { font-size: 14px; }
.knowledge-form, .knowledge-review { margin-top: 32px; padding: 26px 0; border-top: 1px solid var(--line); }
.knowledge-form textarea { min-height: 110px; }
.knowledge-form > button, .knowledge-review > button { margin-top: 20px; }
.knowledge-review { padding: 24px; border: 1px solid #d3dfcc; border-radius: 14px; background: #edf3e7; }
.knowledge-reference p { overflow-wrap: anywhere; }
.voice-input { margin: 18px 0 8px; }
.voice-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.voice-actions button { min-height: 44px; background: #f1f5ed; border-color: #d7e1d1; }
.voice-actions button:hover { background: #e6eee0; }
.voice-start::before { content: ""; display: inline-block; width: 17px; height: 20px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='8' y='2' width='8' height='13' rx='4'/%3E%3Cpath d='M5 10v2a7 7 0 0 0 14 0v-2M12 19v3m-4 0h8'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='8' y='2' width='8' height='13' rx='4'/%3E%3Cpath d='M5 10v2a7 7 0 0 0 14 0v-2M12 19v3m-4 0h8'/%3E%3C/svg%3E") center / contain no-repeat; }
.voice-stop::before { content: ""; width: 10px; height: 10px; border-radius: 2px; background: var(--error-ink); }
.voice-clock { font-variant-numeric: tabular-nums; color: var(--green); min-width: 3em; }
.voice-message { margin: 10px 0; font-size: 14px; color: var(--muted); white-space: pre-wrap; overflow-wrap: anywhere; }
.voice-error { color: var(--error-ink); }
.voice-transcript { padding: 16px 0; border-block: 1px solid var(--line); max-height: 240px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; }
.voice-input > button { margin: 0 10px 8px 0; }
@media (max-width: 980px) {
  .app-shell { grid-template-columns: 192px minmax(0, 1fr); }
  aside { padding: 36px 20px 28px; }
  main { padding: 38px 32px 80px; }
  h1 { font-size: 29px; }
}
@media (max-width: 680px) {
  html { scroll-padding-bottom: 116px; }
  body { font-size: 16px; }
  .demo-banner { padding: 7px 16px; font-size: 14px; line-height: 1.55; }
  .app-shell { display: block; }
  aside { position: static; height: auto; max-height: none; padding: 24px 22px 0; border: 0; }
  .wordmark { font-size: 27px; }
  .wordmark span { display: inline-block; margin: 0 0 0 12px; font-size: 12px; letter-spacing: .02em; vertical-align: 3px; }
  aside p, aside small { display: none; }
  nav { position: fixed; bottom: 0; inset-inline: 0; z-index: 10; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; margin: 0; padding: 8px 14px calc(8px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--white); }
  nav button { flex-direction: column; justify-content: center; gap: 4px; min-height: 56px; padding: 6px 4px; border-radius: 10px; font-size: 12px; line-height: 1.4; }
  nav button::before { width: 21px; height: 21px; flex-basis: 21px; }
  nav button.active { border-color: transparent; background: #eff4ea; }
  main { max-width: 100%; padding: 30px 22px 120px; }
  h1 { margin-bottom: 12px; font-size: 27px; line-height: 1.42; letter-spacing: -.03em; }
  main > .subtle:first-of-type { margin-bottom: 24px; line-height: 1.85; }
  h2 { font-size: 18px; margin-top: 34px; }
  .hero, .paper, .composer, .growth-form { padding: 22px; border-radius: 16px; }
  .hero.composer { margin-top: 24px; }
  .hero p { font-size: 14px; line-height: 1.8; }
  .composer h2 { font-size: 18px; }
  .composer textarea { min-height: 120px; padding: 14px; }
  .composer .field { margin-top: 20px; }
  .composer .primary { width: 100%; margin-top: 14px; }
  input, select, textarea { font-size: 16px; }
  .two-fields { grid-template-columns: minmax(0, 1fr); }
  .section-top { align-items: flex-start; flex-wrap: wrap; gap: 4px 12px; }
  .section-top .meta { font-size: 14px; }
  .list-row { gap: 12px; padding-block: 19px; flex-wrap: nowrap; }
  .list-row .grow { flex-basis: 0; }
  .list-row h3 { font-size: 16px; }
  .list-row .meta { font-size: 14px; }
  .list-row > button { min-height: 44px; flex: 0 0 auto; padding-inline: 12px; }
  .list-row .pill { font-size: 12px; padding-inline: 8px; }
  .example-line { flex-direction: column; align-items: flex-start; gap: 0; padding: 9px 0; }
  .example-line .meta { text-align: left; padding-bottom: 8px; }
  .example-button { min-height: 44px; }
  .growth-entry { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; margin-bottom: 32px; }
  .growth-entry button { justify-content: flex-start; }
  .actions button { flex-grow: 1; }
  .intake-question .actions button { flex-basis: 100%; }
  .knowledge-review { padding: 20px; }
  .voice-actions { gap: 8px; }
}
@media (max-width: 360px) {
  aside { padding-inline: 16px; }
  main { padding-inline: 16px; }
  .wordmark span { margin-left: 8px; font-size: 12px; }
  .hero, .paper, .composer, .growth-form { padding: 18px; }
  .section-top .meta { text-align: left; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
/* 44 private context: one relevant home result, quiet profile settings. */
.context-primary-card{margin:24px 0 32px;padding:24px;background:#fff;border:1px solid #DDE3DA;border-radius:14px;overflow-wrap:anywhere}.context-primary-card h2{margin:6px 0 14px;font-size:20px}.context-point{padding:14px 0;border-top:1px solid #DDE3DA}.context-point p{margin:5px 0}.context-hint{font-size:13px;line-height:1.7;color:#617068;white-space:pre-wrap;overflow-wrap:anywhere}.context-sources{margin:10px 0}.context-sources summary,.context-settings>summary,.context-clear>summary{min-height:44px;display:flex;align-items:center;cursor:pointer;color:#245A49;text-decoration:underline;text-underline-offset:4px}.context-sources p{max-width:70ch}.context-settings{margin:28px 0;padding:20px 0;border-top:1px solid #DDE3DA;border-bottom:1px solid #DDE3DA}.context-settings>summary{font-size:18px;font-weight:600}.context-settings>button{margin:14px 12px 0 0}.context-settings h3{margin-top:28px}.context-editor{margin:28px 0;padding:24px;background:#fff;border:1px solid #DDE3DA;border-radius:12px}.context-editor h2{margin:0 0 18px}.context-editor textarea{min-height:90px}.context-editor input,.context-settings input,.context-editor select,.context-settings select{min-height:44px}.context-event-row,.context-notice-row,.context-target-row{padding:22px 0;border-bottom:1px solid #DDE3DA;overflow-wrap:anywhere}.context-event-row h3,.context-notice-row h3{margin:0 0 8px}.context-target-row button{margin:12px 12px 0 0}.context-weather{margin:24px 0;padding:22px 0;border-bottom:1px solid #DDE3DA;overflow-wrap:anywhere}.context-weather h3{margin-bottom:12px}.context-weather a{color:#245A49;min-height:44px;display:inline-flex;align-items:center;text-underline-offset:4px}.context-clear{margin-top:36px}.context-clear .danger{margin-top:12px}.text-action{min-height:44px;background:transparent;border:0;text-decoration:underline;text-underline-offset:4px;text-align:left;padding:8px 0}.context-primary-card .text-action{display:block}.context-editor .inline,.context-settings .inline{margin:20px 0}.context-editor .inline input,.context-settings .inline input{width:20px;height:20px;min-height:20px;flex:0 0 20px}.context-editor .field,.context-settings .field{line-height:1.7}#main input,#main select,#main textarea{max-width:100%}@media(max-width:620px){.context-primary-card,.context-editor{padding:20px}.context-primary-card h2{font-size:19px}.context-settings>.primary{width:100%}.context-event-row .actions,.context-target-row{display:block}.context-event-row .actions button{margin:6px 0;width:100%}.context-target-row button{display:block;width:100%;margin:10px 0}.context-settings .two-fields{grid-template-columns:1fr}}

/* 47: one calm main card; secondary rows open only on request. */
.context-kicker{font-size:12px;letter-spacing:.04em;color:var(--muted,#617068);margin:0 0 8px}
.context-card-reason{color:var(--brand,#245A49);font-size:14px;line-height:1.7;margin:10px 0 4px}
.context-other-row{padding:20px 0;border-bottom:1px solid var(--line,#DDE3DA);overflow-wrap:anywhere}
.context-other-row h3{font-size:18px;margin:0 0 8px}.context-other-row .context-point{padding:8px 0}
.context-attention-row{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin:12px 0}.context-attention-row .context-hint{margin:0}.context-attention-row .selected{background:#EEF3EC;border-color:#245A49;color:#245A49}.context-more{margin:8px 0}

/* 48 conversation behavior retained; 50 adds a small assistant identity. */
.dialogue-thread{margin-bottom:20px}.dialogue-provider{font-size:12px;line-height:1.7;color:#617068;margin:0 0 12px}.dialogue-message{padding:16px 0;max-width:70ch}.dialogue-message+.dialogue-message{border-top:1px solid #DDE3DA}.dialogue-role{display:block;font-size:12px;font-weight:600;color:#617068;margin-bottom:6px}.dialogue-text{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.8;margin:0 0 10px}.dialogue-user .dialogue-text{color:#617068}.dialogue-prepared{padding:16px;margin:16px 0;background:#EEF3EC;border-radius:12px}.dialogue-prepared h3{font-size:17px;margin:0 0 10px}.dialogue-options,.dialogue-basis{font-size:13px;color:#617068;margin:12px 0}.dialogue-options summary,.dialogue-basis summary{cursor:pointer;min-height:44px;display:flex;align-items:center}.dialogue-thread .text-action{min-height:44px;white-space:normal;text-align:left}

/* 13c: separate the three composer entries without changing their behavior. */
.composer > button.primary,
.composer > button.primary + button.text-action,
.composer > button.primary + button.text-action + button.text-action { margin-inline-end: 12px; }
.composer > button.primary + button.text-action,
.composer > button.primary + button.text-action + button.text-action { min-height: 44px; max-width: calc(100% - 12px); white-space: normal; overflow-wrap: anywhere; }
@media (max-width: 680px) {
  .composer > button.primary { width: 100%; margin-inline-end: 0; }
  .composer > button.primary + button.text-action,
  .composer > button.primary + button.text-action + button.text-action { margin-top: 8px; }
}

/* 50 · brand and character form one usable, lively work surface. */
:root { --control: #738277; --focus: #3a7864; --radius: 14px; }
html { scrollbar-color: #738277 #f7f7f2; }
body { font-size:16px; line-height:1.65; }
::-webkit-scrollbar { width:10px; height:10px; }
::-webkit-scrollbar-track { background:var(--page); }
::-webkit-scrollbar-thumb { background:#738277; border:2px solid var(--page); border-radius:8px; }
h1 { font-size:28px; line-height:1.35; font-weight:600; letter-spacing:-.02em; }
h2 { font-size:22px; line-height:1.4; }
h3 { font-size:18px; }
.demo-banner { font-size:12px; color:var(--muted); }
.wordmark { font-size:26px; font-weight:600; letter-spacing:.06em; white-space:nowrap; }
.wordmark span { white-space:normal; font-size:14px; letter-spacing:0; line-height:1.65; margin-top:12px; }
aside { padding:40px 24px 28px; }
aside .aside-note { font-size:14px; line-height:1.8; }
aside small { font-size:12px; line-height:1.7; }
main { max-width:816px; margin-inline:auto; padding:40px 48px 88px; }
nav button { font-size:14px; }
nav button.active { background:#e7eee3; border-color:transparent; }
.subtle,.meta,.context-hint,.privacy-note,.input-note,.footer-note,.voice-message { font-size:14px; line-height:1.65; }
.field { font-size:16px; font-weight:500; margin-top:24px; }
input,textarea,select { border-color:var(--control); background:var(--white); font-size:16px; border-radius:10px; }
button { border-color:var(--control); font-size:14px; transition:background-color 140ms ease-out,border-color 140ms ease-out; }
button:hover { border-color:var(--green); }
button:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible,summary:focus-visible,[role="button"]:focus-visible { outline:2px solid var(--focus); outline-offset:2px; }
button.primary { min-height:48px; font-size:16px; box-shadow:none; }
button.primary:hover { box-shadow:none; }
button.danger { border-color:var(--error-ink); }
button:disabled { cursor:not-allowed; }
.hero,.paper,.growth-form { border-radius:14px; box-shadow:none; padding:24px; }
.hero.composer,.paper.composer { margin-top:0; background:#fff; border-color:#d7e0d3; }
.composer textarea { background:#fff; border-color:var(--control); min-height:120px; }
.composer .primary::after { margin-left:2px; }
.composer .privacy-note { margin-top:10px; }
.composer .field { margin-top:20px; }
.composer .primary { margin-top:20px; }
.composer > button.text-action { display:inline-flex; align-items:center; padding:10px 0; }
.composer > .text-action[aria-pressed="true"] { color:var(--ink); text-decoration-thickness:2px; }
.voice-actions button { background:#eef3ec; border-color:var(--control); }
.voice-message { margin-top:10px; }
.voice-error { color:var(--error-ink); }
.section-top { margin-top:40px; }
.section-top .meta { font-size:14px; }
.list-row h3 { font-size:16px; line-height:1.6; }
.list-row .meta { font-size:14px; }
.list-row .pill { font-size:12px; }
.list-row > button { padding-inline:12px; }
.list-row .grow { flex-basis:0; }
.list-link { border-radius:8px; }
.empty { font-size:14px; }
.pill { color:var(--green); background:var(--surface); }
.notice { color:var(--warning-ink); }
.error { color:var(--error-ink); }
label.inline { min-height:44px; cursor:pointer; line-height:1.65; }
label.inline input { flex:0 0 22px; width:22px; height:22px; min-height:22px; }
.action-option { min-height:44px; }
.action-option input { margin-top:6px; }
.context-primary-card { padding:24px; background:#eef3ec; border-color:#d7e0d3; }
.context-primary-card h2 { font-size:22px; }
.context-kicker { font-size:14px; letter-spacing:0; }
.context-card-reason { color:var(--ink); }
.context-primary-card .context-point { border-color:#cbd7c9; }
.context-settings,.context-weather,.context-event-row,.context-notice-row { border-color:var(--line); }
.context-hint { font-size:14px; }
.context-editor { border-radius:14px; }
.context-other-row h3 { font-size:18px; }
.knowledge-review { background:var(--surface); }
.growth-entry button { font-size:14px; border:0; padding:10px 0; text-decoration:underline; text-underline-offset:4px; }
.growth-entry { gap:4px 24px; border-top:1px solid var(--line); padding-top:12px; }
.dialogue-thread { margin-bottom:18px; }
.dialogue-provider { font-size:14px; line-height:1.6; margin:0 0 8px; }
.dialogue-message { max-width:70ch; padding:20px 0; }
.dialogue-message + .dialogue-message { border-top:0; }
.dialogue-user { padding:16px; background:var(--surface); border-radius:10px; margin:16px 0 4px; }
.dialogue-user .dialogue-text { color:var(--ink); }
.dialogue-text { font-size:16px; line-height:1.8; }
.dialogue-role { display:flex; align-items:center; gap:8px; font-size:14px; color:var(--ink); min-height:24px; margin-bottom:8px; }
.dialogue-role .kumi-frame { order:-1; }
.dialogue-options,.dialogue-basis { font-size:14px; }
.dialogue-prepared { padding:20px; }
.dialogue-prepared h3 { font-size:18px; }
.page-heading { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:12px; }
.page-heading h1 { flex:1; min-width:0; margin:0; }
.kumi-frame { --kumi-size:44px; position:relative; display:inline-block; flex:0 0 auto; width:var(--kumi-size); height:var(--kumi-size); overflow:hidden; vertical-align:middle; }
.kumi-sheet { display:block; position:absolute; width:200%; height:200%; max-width:none; left:0; top:0; pointer-events:none; user-select:none; }
.kumi-pose-listen .kumi-sheet { left:-100%; }
.kumi-pose-notes .kumi-sheet { top:-100%; }
.kumi-pose-rest .kumi-sheet { left:-100%; top:-100%; }
.kumi-frame [hidden] { display:none!important; }
.kumi-size-hero { --kumi-size:120px; }
.kumi-size-page { --kumi-size:64px; }
.kumi-size-identity { --kumi-size:36px; }
.kumi-size-empty { --kumi-size:56px; }
.kumi-fallback { display:flex; width:100%; height:100%; align-items:center; justify-content:center; color:var(--forest,var(--ink)); font-size:14px; font-weight:600; }
.kumi-welcome { display:grid; grid-template-columns:minmax(0,1fr) 120px; gap:4px 20px; align-items:center; margin:0 0 24px; }
.welcome-copy h1 { font-size:28px; margin:0 0 12px; }
.welcome-copy p { font-size:16px; margin:0; color:var(--muted); }
.kumi-welcome.is-compact { grid-template-columns:minmax(0,1fr) 64px; }
.kumi-welcome.is-compact .welcome-copy h1 { font-size:24px; }
.kumi-empty { display:flex; align-items:center; gap:16px; padding:8px 0; }
.kumi-empty .empty { padding:8px 0; margin:0; }
.kumi-waiting { display:flex; align-items:center; gap:12px; margin:12px 0; }
.kumi-waiting p { margin:0; }
.kumi-motion-setting { margin:36px 0; padding:24px 0; border-block:1px solid var(--line); }
.kumi-motion-setting h2 { margin:0 0 12px; }
.kumi-motion-setting p { margin-bottom:0; }
.kumi-reduced-motion .kumi-frame { animation:none!important; transform:none!important; }
@media(max-width:980px) { main { padding:32px 28px 96px; } aside { padding-inline:20px; } .wordmark { font-size:24px; } }
@media(max-width:680px) {
 body { font-size:16px; }
 aside { padding:24px 20px 0; }
 .wordmark { font-size:24px; letter-spacing:.06em; }
 .wordmark span { display:block; margin:8px 0 0; font-size:14px; letter-spacing:0; }
 main { padding:28px 20px 120px; max-width:100%; }
 h1 { font-size:24px; line-height:1.4; }
 h2 { font-size:22px; }
 nav button { font-size:12px; }
 .hero,.paper,.composer,.growth-form,.context-editor { padding:20px; border-radius:14px; }
 .hero.composer { margin-top:0; }
 .composer .primary { margin-top:20px; }
 .composer > button.text-action { margin-top:8px; margin-inline-end:12px; }
 .composer > .input-note { margin-top:8px; }
 .list-row { gap:10px; }
 .list-row .grow { flex-basis:0; }
 .list-row .meta,.section-top .meta { font-size:14px; }
 .list-row .pill { font-size:12px; }
 .list-row > button { padding:8px; }
 .context-primary-card { padding:20px; }
 .context-primary-card h2 { font-size:22px; }
 .page-heading { gap:12px; }
 .kumi-welcome { grid-template-columns:minmax(0,1fr) 100px; gap:4px 12px; margin-bottom:20px; }
 .kumi-size-hero { --kumi-size:100px; }
 .welcome-copy h1 { font-size:24px; }
 .welcome-copy p { font-size:14px; }
 .growth-entry { margin-top:16px; }
}
@media(max-width:360px) {
 .kumi-welcome { grid-template-columns:minmax(0,1fr) 80px; gap:4px 8px; }
 .kumi-size-hero { --kumi-size:80px; }
 .kumi-welcome.is-compact { grid-template-columns:minmax(0,1fr) 56px; }
 .kumi-size-page { --kumi-size:56px; }
 .welcome-copy h1,.kumi-welcome.is-compact .welcome-copy h1 { font-size:22px; }
 .hero,.paper,.composer,.growth-form { padding:16px; }
 .wordmark span { margin-left:0; font-size:14px; }
 .list-row { flex-wrap:wrap; }
 .list-row .grow { flex-basis:calc(100% - 100px); }
}
@media(prefers-reduced-motion:reduce) { .kumi-frame { animation:none!important; transform:none!important; } }

/* 50 final F1: one compact reminder, with its full evidence still available. */
.context-card-actions {display:flex;align-items:flex-start;flex-wrap:wrap;gap:0 16px;margin-top:8px;}
.context-card-actions>.text-action {display:inline-flex;align-items:center;margin:0;min-height:44px;}
.context-card-actions>.context-sources {margin:0;}
.context-card-actions>.context-sources>summary {margin:0;min-height:44px;}
.context-card-actions>.context-sources[open] {flex-basis:100%;}
.context-at-time {padding:20px;margin-block:16px;}
.context-at-time .context-kicker {margin:0 0 4px;}
.context-at-time h2 {margin:0 0 8px;}
.context-at-time .context-card-reason {margin:4px 0;}
.context-at-time>.context-hint {margin:4px 0;}
.dialogue-thread.is-empty {display:flex;align-items:center;flex-wrap:wrap;gap:0 8px;margin-bottom:4px;}
.dialogue-thread.is-empty>.dialogue-provider {flex:1;min-width:0;margin:0;}
.dialogue-thread.is-empty>.dialogue-options {flex:none;margin:0;}
.dialogue-thread.is-empty>.dialogue-options>summary {margin:0;}
.dialogue-thread.is-empty>.dialogue-options[open] {flex-basis:100%;}
@media(max-width:680px) {
 aside {padding-top:16px;}
 .wordmark {display:flex;align-items:baseline;flex-wrap:wrap;gap:4px 12px;}
 .wordmark span {margin:0;line-height:1.55;}
 main {padding-top:16px;}
 .kumi-welcome {grid-template-rows:auto auto;gap:0 12px;margin-bottom:12px;}
 .kumi-welcome .welcome-copy {grid-column:1;grid-row:1;align-self:end;}
 .welcome-copy h1 {font-size:24px;margin-bottom:0;}
 .kumi-welcome>.kumi-frame {grid-column:2;grid-row:1/3;}
 .kumi-welcome.is-compact {grid-template-rows:auto;}
 .kumi-welcome.is-compact>.kumi-frame {grid-row:1;}
 .context-primary-card {margin:12px 0 16px;padding:16px;}
 .context-card-actions {gap:0 12px;margin-top:4px;}
 .composer .field {margin-top:12px;}
 .composer .dialogue-thread.is-empty {margin-bottom:0;}
 .hero.composer,.paper.composer {padding-top:16px;}
}

/* 51: lower-frequency guidance, separated from the task surface. */
.lean-help {margin:20px 0; padding:0; border:0;}
.lean-help>summary {min-height:44px; display:flex; align-items:center; width:fit-content; cursor:pointer; color:var(--green); text-decoration:underline; text-underline-offset:4px; font-size:14px;}
.lean-help>p {margin:8px 0 16px;}
main>.lean-help {margin-top:40px;}
.lean-help>summary:focus-visible {outline:2px solid var(--focus); outline-offset:2px;}

/* 52: a quiet notice workspace using the existing controls and palette. */
.notice-page .notice-editor {margin:24px 0 32px;}
.notice-page .notice-editor>button {margin-top:16px;margin-right:12px;}
.notice-page .notice-editor>h2 {margin-top:24px;}
.notice-page .notice-source {margin:12px 0 24px;}
.notice-page .notice-history-entry {padding:20px 0;border-bottom:1px solid var(--line);}
.notice-page .notice-check {padding:16px 0;}
.notice-page .notice-check>span {min-width:0;overflow-wrap:anywhere;}
.notice-page .notice-editor textarea {min-height:132px;}
.notice-page>.primary {margin:12px 12px 12px 0;}
.notice-page>.text-action {margin-right:16px;}
.notice-page>.danger {margin-top:12px;}

/* Local simulation uses the existing page rhythm and touch targets. */
.commerce-balance{display:flex;flex-wrap:wrap;gap:1.25rem;padding:1rem 0 1.5rem;border-bottom:1px solid var(--line);margin-bottom:1.5rem;font-variant-numeric:tabular-nums}

@media(max-width:360px){.welcome-copy h1 {font-size:22px;}.context-card-actions{gap:0 10px;}}

/* 56: compact single-language quote on home only. */
.kumi-welcome {grid-template-columns:minmax(0,1fr) 48px;grid-template-rows:auto auto;gap:4px 12px;margin-bottom:20px;}
.kumi-welcome .welcome-copy {grid-column:1;grid-row:1;align-self:center;}
.kumi-welcome .welcome-copy h1 {margin:0;}
.kumi-welcome>.kumi-frame {grid-column:2;grid-row:1;}
.kumi-welcome .kumi-size-hero {--kumi-size:48px;}
.poetry-welcome {grid-column:1/-1;min-width:0;}
.poetry-line {margin:0;font-size:16px;font-weight:400;line-height:1.55;color:var(--ink);overflow-wrap:normal;white-space:pre-line;}
.poetry-credit {display:block;margin-top:4px;font-size:14px;font-style:normal;line-height:1.5;color:var(--muted);}

.album-photo{display:block;max-width:100%;max-height:60vh;object-fit:contain;margin:20px 0;}

/* SU-01: a local field editor, within the existing notice draft. */
.notice-date { margin: 24px 0; min-width: 0; }
.notice-date-summary { margin: 0 0 8px; overflow-wrap: anywhere; }
.notice-date-panel { padding-top: 12px; border-top: 1px solid var(--line); }
.notice-date-fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.notice-date-fields > *, .notice-date input, .notice-date select { min-width: 0; max-width: 100%; }
.notice-date-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 12px 0; }
.notice-date-actions button { min-height: 44px; }
@media (max-width: 390px) { .notice-date-fields { grid-template-columns: minmax(0, 1fr); } }

/* Private school ledger follows the existing field and reading rhythm. */
.school-rule-editor { margin-top: 24px; min-width: 0; }
.school-rule-fields { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 16px; margin: 16px 0; }
.school-rule-fields > * { min-width: 0; }
.school-rule-fields textarea { min-height: 112px; }
.school-rule-results { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px 20px; margin: 20px 0; font-variant-numeric: tabular-nums; }
.school-rule-results dd { margin: 0; text-align: right; }
.school-rule-history { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); }
@media(max-width:600px){ .school-rule-fields { grid-template-columns: minmax(0,1fr); } }

/* Private school event card inside the existing notice page. */
.school-event-card{margin-top:2rem;padding-top:1.5rem;border-top:1px solid var(--line)}
.school-event-choice,.school-event-date-row{display:flex;gap:1rem;align-items:baseline;justify-content:space-between;flex-wrap:wrap;margin-block:1rem}
.school-event-choice>span,.school-event-date-row>span{min-width:0;overflow-wrap:anywhere}
.school-event-date{margin-block:1.5rem;padding-block:1rem;border-block:1px solid var(--line)}
.school-event-card textarea{width:100%;box-sizing:border-box;min-height:5rem}

.school-event-card button{margin-right:12px;margin-bottom:8px}

.l1-feedback{min-width:0;margin-block:12px 16px;overflow-wrap:anywhere}
.l1-feedback p{margin-block:8px}

/* SU02 · one local field at a time */
.draft-local-form{margin-block:20px}.draft-local-row{display:flex;align-items:center;gap:12px;padding-block:10px;border-bottom:1px solid var(--line);min-width:0}.draft-local-row .grow{min-width:0}.draft-local-value{display:block;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}.draft-local-row button{flex:none;min-height:44px}.draft-local-editor{padding-block:16px;max-width:32rem}.draft-local-editor .button-row{margin-top:12px}.draft-local-editor input{min-height:44px;max-width:100%;box-sizing:border-box}.draft-local-recovery{padding-block:14px}.draft-local-error{color:var(--error-ink);overflow-wrap:anywhere}

/* 28: optional introduction, scoped to its own panel. */
.kumi-profile { margin-top: 12px; }
.kumi-profile .kumi-profile-trigger { color: #42594c; }
.kumi-profile .kumi-profile-close { margin-left: 12px; }
.kumi-profile .kumi-profile-panel { margin-top: 8px; padding: 16px; border: 1px solid #dce3d9; border-radius: 14px; background: #fafbf7; }
.kumi-profile .kumi-profile-content { max-width: 44rem; }
.kumi-profile .kumi-profile-definition { display: block; margin: 0 0 8px; font-size: 16px; font-weight: 600; line-height: 1.6; }
.kumi-profile .kumi-profile-title { display: block; margin: 14px 0 8px; font-size: 14px; font-weight: 600; }
.kumi-profile .kumi-profile-axis { margin: 8px 0; font-size: 14px; line-height: 1.7; }
.kumi-profile .kumi-profile-item { margin: 10px 0; }
.kumi-profile .kumi-profile-row { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; justify-content: space-between; margin: 0 0 3px; font-size: 14px; }
.kumi-profile .kumi-profile-status { color: #526451; font-size: 12px; }
.kumi-profile .kumi-profile-note { display: block; margin: 6px 0; color: #536052; font-size: 13px; line-height: 1.7; overflow-wrap: anywhere; }
.kumi-profile .kumi-profile-close[hidden], .kumi-profile .kumi-profile-panel[hidden] { display: none; }

/* Core v1: one static identity, inline controls, no sprite cropping. */
.kumi-frame {width:44px;height:44px;--kumi-size:44px;}
.kumi-size-identity {width:36px;height:36px;--kumi-size:36px;}
.kumi-frame .kumi-sheet {position:static;left:0;top:0;width:100%;height:100%;max-width:100%;object-fit:contain;}
.kumi-welcome,.kumi-welcome.is-compact {grid-template-columns:minmax(0,1fr) 44px;}
.kumi-core {margin:16px 0 28px;}
.core-entry-actions {display:flex;flex-wrap:wrap;gap:4px 12px;}
.kumi-core-panel {padding:16px 0;border-top:1px solid #DDE3DA;max-width:65ch;}
.kumi-core-panel h2 {font-size:22px;margin:16px 0 12px;}
.kumi-core-panel h3 {font-size:16px;margin:24px 0 8px;}
.core-memory,.core-preference {padding:16px 0;border-bottom:1px solid #DDE3DA;overflow-wrap:anywhere;}
.kumi-core-panel .text-action {min-height:44px;}
.kumi-core-panel input,.kumi-core-panel select {max-width:100%;box-sizing:border-box;}
.kumi-scene {margin:12px auto;max-width:65%;flex:none;}
.kumi-scene img,.kumi-scene image,.kumi-scene-image {display:block;width:100%;height:100%;object-fit:contain;}
.kumi-scene[hidden] {display:none;}
.kumi-core-panel button:focus-visible,.kumi-core-panel input:focus-visible,.kumi-core-panel select:focus-visible {outline:2px solid #245A49;outline-offset:3px;}
.core-feedback {margin-top:8px;}
@media(prefers-reduced-motion:reduce){.kumi-scene,.kumi-sheet {animation:none!important;transition:none!important;}}

/* Invitation beta keeps the existing core work surface; auth/admin rules are in invite.css. */
body.invitation-beta .app-shell { min-height: calc(100dvh - 36px); }

/* UI15: a bounded workspace, with messages and secondary tools scrolling locally. */
html {height:100%;}
body {position:fixed;top:var(--app-viewport-top,0px);left:0;width:100%;height:var(--app-viewport-height,100vh);overflow:hidden;}
.app-shell,body.invitation-beta .app-shell {height:calc(var(--app-viewport-height,100vh) - var(--app-banner-height,36px));min-height:0;}
.app-shell>aside {height:100%;min-height:0;}
main {height:100%;min-height:0;overflow-y:auto;overscroll-behavior-y:contain;padding-block:24px;scrollbar-gutter:stable;}
nav:empty {display:none;}
main.chat-view {display:flex;flex-direction:column;overflow:hidden;padding-block:16px;}
.recovery-attention {flex:none;margin:0 0 8px;padding:8px 12px;background:var(--warning-bg);color:var(--warning-ink);border-radius:10px;max-height:25%;overflow-y:auto;}
.recovery-attention[hidden] {display:none;}
.recovery-attention p {margin:0;}
.chat-shell {flex:1;display:grid;grid-template-rows:auto minmax(0,1fr) auto auto;min-height:0;margin:0;padding:0;border:0;background:transparent;}
.chat-toolbar {display:flex;align-items:center;justify-content:space-between;gap:12px;padding:0 0 12px;}
.chat-toolbar h1 {margin:0;font-size:22px;line-height:1.4;}
.chat-toolbar .meta {margin:4px 0 0;}
.chat-scroll {position:relative;min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior-y:contain;overflow-anchor:none;padding:8px 4px 16px;scrollbar-gutter:stable;}
.chat-scroll .dialogue-thread {display:flex;flex-direction:column;margin:0;min-width:0;}
.chat-scroll .dialogue-message {flex:none;max-width:88%;padding:12px 16px;margin:0 0 16px;border:1px solid var(--line);background:var(--white);border-radius:14px;overflow-wrap:anywhere;}
.chat-scroll .dialogue-message+.dialogue-message {border-top:1px solid var(--line);}
.chat-scroll .dialogue-user {align-self:flex-end;background:var(--surface);border-color:var(--surface);border-bottom-right-radius:4px;}
.chat-scroll .dialogue-assistant {align-self:flex-start;border-bottom-left-radius:4px;}
.chat-scroll .dialogue-user .dialogue-text {color:var(--ink);}
.chat-scroll .dialogue-role {font-size:14px;}
.chat-scroll .dialogue-text {margin:0;font-size:16px;line-height:1.7;}
.chat-scroll .dialogue-message .meta {font-size:14px;margin:8px 0 0;}
.chat-scroll .dialogue-message .text-action {margin-top:6px;}
.chat-scroll .kumi-scene {margin:8px auto;}
.chat-empty {display:flex;align-items:center;flex-direction:column;text-align:center;gap:12px;padding:24px 12px;}
.chat-greeting {margin:0;font-size:22px;color:var(--ink);}
.chat-empty .poetry-welcome {max-width:38ch;margin:8px 0 0;}
.chat-empty .poetry-line {font-size:16px;line-height:1.8;}
.chat-current-status {min-height:0;max-height:25vh;overflow-y:auto;display:flex;gap:12px;flex-wrap:wrap;align-items:center;}
.chat-new-reply {margin:4px auto;background:var(--surface);}
.chat-new-reply[hidden] {display:none;}
.chat-dock {min-height:0;max-height:45vh;overflow-y:auto;padding:12px 0 0;border-top:1px solid var(--line);display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px 12px;align-items:end;}
.chat-dock>textarea {grid-column:1 / -1;min-height:52px;max-height:120px;overflow-y:auto;resize:none;padding:12px 14px;line-height:1.5;}
.chat-dock .voice-input {min-width:0;margin:0;}
.chat-dock .voice-actions {display:flex;align-items:center;gap:8px;flex-wrap:wrap;}
.chat-dock .voice-actions button {margin:0;min-height:44px;}
.chat-dock .voice-message {margin:6px 0 0;max-height:80px;overflow-y:auto;}
.chat-dock .voice-transcript {max-height:120px;overflow-y:auto;white-space:pre-wrap;}
.chat-send-actions {display:flex;justify-content:flex-end;align-self:start;}
.chat-shell .chat-send-actions .primary {min-height:48px;margin:0;min-width:88px;width:auto;}
.chat-shell .chat-send-actions .primary::after {display:none;}
.workspace-panel {position:fixed;inset:0;width:min(760px,calc(100% - 32px));height:min(760px,calc(var(--app-viewport-height,100dvh) - 32px));max-height:calc(var(--app-viewport-height,100dvh) - 32px);margin:auto;padding:0;border:1px solid var(--line);border-radius:14px;background:var(--page);color:var(--ink);overflow-y:auto;}
.workspace-panel:not([open]) {display:none;}
.workspace-panel[open] {display:flex;flex-direction:column;}
.workspace-panel::backdrop {background:rgb(32 59 51 / 24%);}
.workspace-panel-header {flex:none;display:flex;align-items:center;gap:16px;padding:12px 20px;border-bottom:1px solid var(--line);background:var(--white);}
.workspace-panel-header h2 {margin:0;font-size:19px;line-height:1.4;}
.workspace-panel-body {flex:1;min-height:0;overflow-y:auto;overscroll-behavior-y:contain;padding:20px;}
.workspace-panel-body>button {display:flex;min-height:48px;margin:0 0 12px;max-width:100%;}
.workspace-panel-body .invite-account {margin:0;padding:0;border:0;}
.workspace-panel-body .dialogue-prepared {margin:0 0 20px;}
.workspace-panel-body .kumi-core {margin:0;}
.workspace-panel-body .core-entry-actions {margin-top:0;}
.workspace-panel-body [data-grade-action="confirm"] {width:100%;}
.grade-columns {display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px;margin:20px 0;}
.grade-wheel {height:220px;min-height:0;overflow-y:auto;overscroll-behavior-y:contain;scroll-snap-type:y proximity;border:1px solid var(--line);border-radius:10px;background:var(--white);padding:4px;}
.grade-option {display:flex;width:100%;min-height:44px;margin:0 0 4px;border:0;background:transparent;scroll-snap-align:center;white-space:normal;}
.grade-option[aria-selected="true"] {background:var(--surface);color:var(--ink);font-weight:600;}
@media(max-width:680px){
 .app-shell {display:flex;flex-direction:column;}
 .app-shell>aside {flex:none;position:static;height:auto;padding:12px 16px 0;}
 .wordmark {font-size:24px;}
 .wordmark span {display:none;}
 nav {position:absolute;bottom:0;}
 main {flex:1;min-height:0;height:auto;padding:16px 16px calc(var(--app-nav-height,76px) + 12px);}
 main.chat-view {padding:12px 16px calc(var(--app-nav-height,76px) + 8px);}
 .chat-toolbar {padding-bottom:8px;}
 .chat-toolbar h1 {font-size:19px;}
 .chat-toolbar .meta {font-size:14px;}
 .chat-scroll .dialogue-message {max-width:94%;}
 .chat-empty {padding:16px 4px;}
 .chat-shell .chat-dock {max-height:45dvh;}
 .workspace-panel {top:var(--app-viewport-top,0px);bottom:auto;width:100%;height:var(--app-viewport-height,100dvh);max-height:var(--app-viewport-height,100dvh);margin:0;border-radius:0;}
 .workspace-panel-header {padding:10px 16px;}
 .workspace-panel-body {padding:16px 16px max(16px,env(safe-area-inset-bottom));}
 html[data-keyboard="true"] .app-shell>aside {display:none;}
 html[data-keyboard="true"] main,html[data-keyboard="true"] main.chat-view {padding-bottom:max(8px,env(safe-area-inset-bottom));}
}


/* Unsupported native-dialog fallback still removes the background from layout. */
.app-shell[hidden] {display:none;}
.workspace-panel[aria-modal="true"] {z-index:100;}

/* Report tools stay inside the existing bounded workspace, never elongate chat. */
.homework-card{padding:16px 0;border-bottom:1px solid var(--line,#d9dfd6)}
.workspace-panel-body input,.workspace-panel-body select,.workspace-panel-body textarea{max-width:100%;box-sizing:border-box}
.workspace-panel-body textarea{max-height:160px;overflow-y:auto}
.workspace-panel-body .dialogue-text{overflow-wrap:anywhere;white-space:pre-wrap}

.chat-scroll .dialogue-message > button.text-action { margin-inline-end:12px; max-width:calc(100% - 12px); box-sizing:border-box; }


/* 115: the chat workspace keeps the log and composer in the same column. */
.chat-workspace {flex:1 1 0;display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr);min-height:0;min-width:0}
.chat-workspace .chat-shell {min-width:0}
.chat-history-desktop {display:none}
.chat-toolbar-actions {display:flex;align-items:center;gap:12px}
.chat-toolbar-actions button {min-height:44px;margin:0}
.chat-history-list {display:flex;flex-direction:column;gap:3px;min-width:0;overflow:auto}
.chat-history-row {min-height:44px;text-align:left;justify-content:flex-start;overflow-wrap:anywhere}
.chat-history-row[aria-current="true"] {background:var(--surface);color:var(--ink);text-decoration:none}
.chat-history-status {margin:6px 0;color:var(--ink);font-size:14px}
.chat-history-controls {display:flex;flex-wrap:wrap;gap:4px 10px}
.chat-history-controls button {min-height:44px}
.chat-history-mobile {display:inline-flex}
.chat-dock {padding-bottom:env(safe-area-inset-bottom,0px)}
@media (min-width:1000px) {
 main.chat-view {max-width:1130px;width:100%}
 .chat-workspace {grid-template-columns:minmax(172px,208px) minmax(0,1fr);gap:28px}
 .chat-history-desktop {position:static;top:auto;align-self:stretch;height:auto;max-height:none;display:flex;flex-direction:column;align-items:stretch;min-height:0;padding:8px 14px 12px 0;border-right:1px solid var(--line);overflow:auto}
 .chat-history-desktop h2 {margin:4px 0 12px;font-size:16px}
 .chat-history-desktop .chat-new-conversation {justify-content:flex-start;margin-bottom:10px}
 .chat-history-mobile {display:none}
}

/* G: scoped composer only; no changes to notice forms, poetry, or ASR service gates. */
.kumi-composer {box-sizing:border-box;min-width:0;width:100%;border:1px solid var(--line,#d7e0d3);border-radius:24px;background:#fff;padding:12px;margin:12px 0;}
.chat-dock>.kumi-composer {grid-column:1 / -1;}
.kumi-composer:focus-within {border-color:var(--green,#355b45);}
.kumi-composer textarea.kumi-composer-text {display:block;box-sizing:border-box;width:100%;min-width:0;min-height:88px;max-height:180px;height:auto;overflow-y:auto;resize:none;border:0;border-radius:12px;box-shadow:none;padding:8px 8px 12px;margin:0;background:transparent;font:inherit;line-height:1.6;}
.kumi-composer textarea.kumi-composer-text:focus-visible {outline:2px solid var(--focus,#577c4f);outline-offset:0;}
.kumi-composer .kumi-composer-tools {display:flex;flex-wrap:nowrap;align-items:center;justify-content:space-between;gap:8px;margin:4px 0 0;}
.kumi-composer .kumi-composer-toolgroup {display:flex;flex-wrap:nowrap;align-items:center;gap:4px;min-width:0;}
.kumi-composer button.kumi-composer-tool {display:inline-flex;flex:none;align-items:center;justify-content:center;box-sizing:border-box;min-width:44px;width:44px;min-height:44px;height:44px;margin:0;padding:10px;border:0;border-radius:50%;background:transparent;color:var(--ink,#223a2c);line-height:1;}
.kumi-composer button.kumi-composer-tool::after {content:none;display:none;}
.kumi-composer button.kumi-composer-tool svg {display:block;width:24px;height:24px;flex:none;pointer-events:none;}
.kumi-composer button.kumi-composer-tool:hover:not(:disabled),.kumi-composer button.kumi-composer-tool[aria-expanded="true"] {background:#edf2ea;}
.kumi-composer button.kumi-composer-send {background:var(--green,#355b45);color:#fff;}
.kumi-composer button.kumi-composer-send:hover:not(:disabled) {background:#244531;}
.kumi-composer button.kumi-composer-tool:disabled {opacity:.4;cursor:not-allowed;}
.kumi-composer button:focus-visible {outline:2px solid var(--focus,#577c4f);outline-offset:2px;}
.kumi-composer .kumi-composer-emojis {display:flex;flex-wrap:wrap;gap:4px;padding:8px 0;border-top:1px solid var(--line,#d7e0d3);}
.kumi-composer .kumi-composer-emojis[hidden],.kumi-composer .kumi-composer-preview[hidden],.kumi-composer .kumi-composer-message[hidden] {display:none;}
.kumi-composer button.kumi-composer-emoji {min-width:44px;min-height:44px;padding:8px;margin:0;background:#f7f8f5;border:0;border-radius:12px;font-size:20px;}
.kumi-composer .kumi-composer-preview {display:flex;align-items:center;flex-wrap:wrap;gap:8px;padding:8px;border:1px solid var(--line,#d7e0d3);border-radius:12px;min-width:0;}
.kumi-composer .kumi-composer-preview img {width:72px;height:72px;object-fit:contain;border-radius:8px;flex:none;}
.kumi-composer .kumi-composer-filename {font-size:13px;overflow-wrap:anywhere;min-width:0;flex:1 1 80px;}
.kumi-composer .kumi-composer-message {font-size:13px;line-height:1.6;margin:8px 4px 0;overflow-wrap:anywhere;}
.kumi-composer .voice-input {margin:8px 4px 0;min-width:0;}
.kumi-composer .voice-actions {display:flex;gap:8px;flex-wrap:wrap;}
@media(max-width:390px){.kumi-composer{padding:8px;border-radius:22px;}.kumi-composer .kumi-composer-toolgroup{gap:0;}.kumi-composer .kumi-composer-tools{gap:4px;}}
.kumi-composer input[type="file"][hidden] {display:none;}
/* K expression cards remain display metadata, separate from photo uploads. */
.kumi-composer .kumi-composer-emojis {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));}
.kumi-composer .kumi-composer-emojis>p,.kumi-composer .kumi-composer-emojis>.text-action {grid-column:1 / -1;}
.kumi-composer .kumi-composer-expression {min-width:44px;min-height:44px;margin:0;padding:6px;border-radius:12px;display:flex;align-items:center;flex-direction:column;gap:4px;background:transparent;}
.kumi-composer-expression img {width:52px;height:52px;object-fit:contain;}
.kumi-expression-preview {display:flex;align-items:center;flex-wrap:wrap;gap:8px;border:1px solid var(--line);border-radius:12px;padding:8px;}
.kumi-expression-preview[hidden] {display:none;}
.kumi-expression-preview img,.kumi-expression-message img {width:64px;height:64px;object-fit:contain;}
.kumi-expression-message {display:flex;align-items:center;gap:8px;flex-wrap:wrap;}
.kumi-expression-art {position:relative;display:inline-block;flex:none;overflow:hidden;vertical-align:middle;}
.kumi-composer .kumi-expression-art img,.kumi-expression-art img {position:absolute;left:50%;top:50%;width:100%;height:100%;max-width:none;object-fit:contain;transform-origin:center;}

/* NO: keep each notice option readable as one vertical card at narrow widths. */
button[data-dialogue-notice-id] {
 display:flex;
 flex-direction:column;
 align-items:stretch;
 justify-content:flex-start;
 width:100%;
 max-width:100%;
 min-width:0;
 box-sizing:border-box;
 gap:6px;
 margin:0 0 12px;
 padding:10px 12px;
 text-decoration:none;
}

/* CR: only the chat workspace; keep reading space and let extended tools scroll. */
main.chat-view {overflow:hidden;}
.chat-mode-options {display:flex;flex:none;flex-wrap:wrap;align-items:center;gap:0 20px;margin:0 0 8px;}
.chat-mode-options>.actions {display:flex;flex-wrap:wrap;align-items:center;gap:4px 12px;margin:0;}
.chat-mode-options button {margin:0;min-height:44px;}
.chat-view .chat-workspace {flex:1 1 0;min-height:0;grid-template-rows:minmax(0,1fr);}
.chat-view .chat-shell {min-height:0;max-height:100%;overflow:hidden;grid-template-rows:auto minmax(0,1fr) auto minmax(0,auto);}
.chat-view .chat-scroll {min-height:0;}
.chat-view .chat-dock {display:flex;flex-direction:column;align-items:stretch;gap:4px;min-height:0;max-height:100%;overflow-y:auto;overflow-x:hidden;padding-top:4px;}
.chat-view .chat-dock>.text-action {align-self:flex-start;margin:0;min-height:44px;}
.chat-view .chat-dock>.kumi-composer {margin:0;}
.chat-view .kumi-composer textarea.kumi-composer-text {min-height:52px;max-height:120px;}
.chat-view .chat-send-actions {margin:0;}
.chat-view .chat-send-actions button {margin:0;min-height:44px;}
.chat-notice-selection {display:flex;align-items:center;flex-wrap:wrap;gap:4px 12px;min-width:0;}
.chat-notice-labels {display:flex;flex:1 1 200px;min-width:0;flex-direction:column;overflow-wrap:anywhere;}
.chat-notice-selection button {flex:none;margin:0;min-height:44px;}
main.chat-view>.cloud-status-compact {flex:none;margin:0 0 6px;padding:0;border:0;}
main.chat-view>.cloud-status-compact h2 {margin:0;font-size:14px;line-height:1.5;}
main.chat-view>.cloud-status-compact p {margin:0;font-size:14px;line-height:1.5;}
.chat-aux-row {display:flex;align-items:center;flex-wrap:wrap;gap:4px 12px;min-width:0;}
.chat-aux-row>button {margin:0;min-height:44px;}
.chat-aux-row>.chat-notice-selection {flex:1 1 240px;}

/* G2: bounded chat only; retain the shared media handlers and 44px controls. */
.chat-view .kumi-composer--chat {display:flex;flex-direction:column;min-height:0;max-height:100%;overflow:hidden;}
.chat-view .kumi-composer--chat .kumi-composer-text {flex:0 1 auto;}
.chat-view .kumi-composer-aux {display:flex;flex:0 1 auto;flex-direction:column;gap:6px;min-height:0;max-height:min(28dvh,12rem);overflow-y:auto;overflow-x:hidden;overscroll-behavior-y:contain;}
.chat-view .kumi-composer-aux.has-content {min-height:44px;}
.chat-view .kumi-composer-aux .voice-input {margin:0;}
.chat-view .kumi-composer-tools {flex:0 0 auto;align-items:flex-end;}
.chat-view .kumi-composer-toolgroup {align-items:flex-end;}
.chat-view .kumi-composer-listen {display:inline-flex;flex:none;align-items:center;gap:4px;min-height:44px;width:auto;margin:0;padding:0;white-space:nowrap;font-size:14px;line-height:1.4;cursor:pointer;}
.chat-view .kumi-composer-listen input {flex:none;width:18px;height:18px;min-height:0;margin:0;padding:0;accent-color:var(--green);}
.message-role-hidden {position:absolute!important;width:1px!important;height:1px!important;min-height:0!important;margin:0!important;padding:0!important;overflow:hidden;clip-path:inset(50%);white-space:nowrap;}
.chat-scroll .message-actions {width:fit-content;max-width:100%;margin:0 0 0 auto;}
.chat-scroll .message-actions>.message-actions-toggle {display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:44px;min-width:44px;height:44px;min-height:44px;margin:0;padding:0;list-style:none;text-decoration:none;border-radius:8px;}
.message-actions-toggle::-webkit-details-marker {display:none;}
.message-actions-toggle::marker {content:'';}
.message-actions-icon {font-size:20px;line-height:1;}
.chat-scroll .message-actions[open]>.message-actions-toggle {margin-bottom:4px;}
.chat-scroll .message-actions .text-action {max-width:100%;}
@media(hover:hover) and (pointer:fine) and (min-width:681px){
 .chat-scroll .message-actions>.message-actions-toggle {opacity:0;}
 .chat-scroll .dialogue-message:hover .message-actions-toggle,.chat-scroll .dialogue-message:focus-within .message-actions-toggle,.chat-scroll .message-actions[open]>.message-actions-toggle {opacity:1;}
}
@media(max-width:680px),(max-height:650px){.chat-view .kumi-composer-aux {max-height:min(24dvh,10rem);}}
