:root {
  color-scheme: light;
  --ink: #20342e;
  --ink-soft: #66766e;
  --green: #28624f;
  --green-deep: #173c32;
  --green-pale: #e4eee6;
  --coral: #d7785c;
  --sun: #ddbb68;
  --paper: #f4f4ef;
  --white: #fffefa;
  --line: #dce2da;
  --serif: "Noto Serif SC", "Songti SC", "STSong", serif;
  --sans: "DM Sans", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--paper); }
body { margin: 0; color: var(--ink); font-family: var(--sans); font-size: 15px; -webkit-font-smoothing: antialiased; }
button, input, textarea { font: inherit; }
button { color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid #d7785c88; outline-offset: 3px; }
button:disabled { cursor: not-allowed; opacity: .46; }
.app-shell { min-height: 100svh; overflow: hidden; background: var(--paper); }
.topbar { height: 76px; padding: 0 clamp(22px, 6vw, 88px); display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #d9e0d866; }
.brand { display: inline-flex; gap: 12px; align-items: center; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 17px; }
.brand small { display: block; margin-top: 3px; font-size: 8px; line-height: 1; letter-spacing: 1.5px; font-weight: 600; color: var(--ink-soft); }
.brand-mark { width: 31px; height: 31px; display: grid; place-items: center; border: 1.5px solid var(--green); border-radius: 50%; }
.brand-mark::before, .brand-mark span { content: ""; width: 12px; height: 12px; grid-area: 1 / 1; border: 1.4px solid var(--green); border-radius: 55% 45% 60% 40%; transform: rotate(45deg); }
.brand-mark span { width: 5px; height: 5px; border: 0; background: var(--coral); transform: translate(2px, -2px); }
.top-actions { display: flex; gap: 22px; align-items: center; }
.quiet-button, .profile-button { min-height: 40px; padding: 0; display: inline-flex; gap: 8px; align-items: center; border: 0; background: transparent; color: var(--ink-soft); cursor: pointer; font-size: 13px; }
.quiet-button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.quiet-button:hover, .profile-button:hover { color: var(--green); }
.profile-button { min-height: 36px; padding: 0 12px; border: 1px solid var(--line); border-radius: 99px; color: var(--ink); }
.profile-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--coral); }
.main-layout { width: min(1120px, calc(100% - 48px)); min-height: calc(100svh - 126px); margin: 0 auto; padding: clamp(42px, 7vh, 76px) 0 54px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(250px, 330px); gap: clamp(42px, 8vw, 112px); align-items: start; }
.conversation-column { width: 100%; max-width: 610px; animation: appear .7s ease both; }
.intro-block { margin-bottom: 34px; }
.eyebrow { margin: 0 0 16px; display: flex; align-items: center; gap: 10px; color: var(--green); font-size: 11px; font-weight: 600; letter-spacing: 1px; }
.eyebrow-line { width: 22px; height: 1px; background: var(--coral); }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 18px; font-family: var(--serif); font-size: clamp(38px, 5vw, 56px); font-weight: 500; line-height: 1.38; letter-spacing: 0; }
h1 em { color: var(--green); font-style: normal; }
.intro-copy { max-width: 430px; margin-bottom: 0; color: var(--ink-soft); font-size: 14px; line-height: 1.9; }
.recorder { position: relative; min-height: 290px; padding: 22px 26px 18px; overflow: hidden; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: linear-gradient(110deg, #fffefa 0%, #f8f8f2 100%); }
.recorder::after { content: ""; position: absolute; right: -54px; bottom: -96px; width: 190px; height: 190px; border: 1px solid #dce7dc; border-radius: 50%; pointer-events: none; }
.recorder-topline { position: relative; z-index: 1; display: flex; justify-content: space-between; align-items: center; color: var(--ink-soft); font-size: 12px; }
.recorder-label { display: inline-flex; gap: 8px; align-items: center; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: #aab4aa; }
.duration { color: var(--ink); font-variant-numeric: tabular-nums; font-size: 13px; }
.duration span { color: #9aa49b; font-size: 11px; }
.recorder-center { position: relative; width: 160px; height: 160px; margin: 12px auto 0; display: grid; place-items: center; }
.sound-orbit { position: absolute; inset: 14px; border: 1px solid #dce7dd; border-radius: 50%; }
.orbit-two { inset: 0; border-color: #e6ebe3; }
.record-button { z-index: 1; width: 92px; height: 92px; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--green); color: white; cursor: pointer; box-shadow: 0 9px 24px #204a3b2a; transition: transform .2s ease, background .2s ease, box-shadow .2s ease; }
.record-button:hover { transform: scale(1.04); background: var(--green-deep); box-shadow: 0 12px 30px #204a3b3d; }
.record-button:active { transform: scale(.98); }
.mic-icon { width: 31px; height: 31px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.record-stop-icon { display: none; width: 22px; height: 22px; border-radius: 5px; background: white; }
.is-recording .record-button { background: var(--coral); animation: pulse 1.5s ease infinite; }
.is-recording .mic-icon { display: none; }
.is-recording .record-stop-icon { display: block; }
.is-recording .live-dot { background: var(--coral); animation: blink 1.2s ease infinite; }
.is-recording .orbit-one { animation: orbit 3s linear infinite; border-color: #d7785c55; }
.record-hint { position: relative; z-index: 1; margin: -1px 0 14px; text-align: center; color: var(--ink-soft); font-size: 12px; }
.privacy-line { position: relative; z-index: 1; display: flex; gap: 6px; justify-content: center; align-items: center; color: #849087; font-size: 10px; }
.privacy-line svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.privacy-line button { padding: 0; border: 0; border-bottom: 1px solid #aeb8af; background: transparent; color: var(--green); cursor: pointer; font-size: inherit; }
.compose-section, .reply-section { margin-top: 34px; animation: appear .4s ease both; }
.section-heading { display: flex; justify-content: space-between; align-items: end; margin-bottom: 12px; }
.small-eyebrow { margin-bottom: 7px; font-size: 9px; letter-spacing: 1.35px; }
h2 { margin-bottom: 0; font-family: var(--serif); font-size: 23px; font-weight: 500; }
.demo-tag { padding: 5px 8px; border-radius: 3px; background: #e8eee8; color: var(--green); font-size: 10px; }
.demo-explanation { margin: 0 0 14px; color: var(--ink-soft); font-size: 12px; line-height: 1.8; }
textarea { width: 100%; min-height: 92px; resize: vertical; padding: 14px 15px; border: 1px solid var(--line); border-radius: 4px; background: var(--white); color: var(--ink); font-size: 14px; line-height: 1.75; }
textarea::placeholder { color: #a2aaa1; }
.compose-footer { margin-top: 12px; display: flex; gap: 13px; align-items: center; }
.char-count { margin-right: auto; color: #97a198; font-size: 10px; font-variant-numeric: tabular-nums; }
.reply-options { display: flex; padding: 3px; border: 1px solid var(--line); border-radius: 5px; background: #eeefe9; }
.reply-option { min-width: 44px; padding: 6px 9px; border: 0; border-radius: 3px; background: transparent; color: var(--ink-soft); cursor: pointer; font-size: 11px; }
.reply-option.is-selected { background: var(--white); color: var(--green); box-shadow: 0 1px 3px #1f38211a; }
.send-button { display: inline-flex; gap: 8px; align-items: center; padding: 9px 14px; border: 0; border-radius: 4px; background: var(--green); color: white; cursor: pointer; font-size: 12px; }
.send-button:hover:not(:disabled) { background: var(--green-deep); }
.send-button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.reply-section { padding-top: 23px; border-top: 1px solid var(--line); }
.reply-heading { display: flex; align-items: center; gap: 10px; }
.reply-avatar { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: var(--green-pale); color: var(--green); font-family: var(--serif); font-size: 14px; }
.reply-name, .reply-caption { display: block; }
.reply-name { color: var(--ink); font-size: 12px; font-weight: 600; }
.reply-caption { margin-top: 2px; color: #939d94; font-size: 10px; }
.listen-button { margin-left: auto; display: inline-flex; gap: 8px; align-items: center; padding: 8px 11px; border: 1px solid var(--line); border-radius: 99px; background: transparent; color: var(--green); cursor: pointer; font-size: 11px; }
.play-triangle { width: 0; height: 0; border-top: 5px solid transparent; border-bottom: 5px solid transparent; border-left: 7px solid currentColor; }
.reply-text { margin: 18px 0 0 44px; color: #42584f; font-family: var(--serif); font-size: 15px; line-height: 2; white-space: pre-wrap; }
.continue-button { margin: 16px 0 0 44px; padding: 0; border: 0; background: transparent; color: var(--green); cursor: pointer; font-size: 12px; }
.continue-button span { margin-left: 5px; }
.safety-panel { margin: 18px 0 0 44px; padding: 14px; border-left: 3px solid var(--coral); background: #f8ece6; color: #59413a; }
.safety-panel p { margin: 0 0 12px; font-size: 12px; line-height: 1.8; }
.safety-panel a { display: flex; justify-content: space-between; align-items: center; color: #7c4331; text-decoration: none; font-size: 12px; }
.safety-panel a strong { font-size: 18px; }
.safety-panel a small { font-size: 10px; font-weight: 400; }
.safety-note { display: block; margin-top: 8px; color: #8d6e63; font-size: 10px; line-height: 1.6; }
.bottom-note { margin: 36px 0 0; color: #89958b; font-size: 10px; }
.bottom-note span { padding: 0 6px; color: var(--coral); }
.memory-column { padding-top: 13px; animation: appear .8s .12s ease both; }
.forest-image { position: relative; min-height: 386px; overflow: hidden; background-color: #30483b; background-image: url("https://images.unsplash.com/photo-1448375240586-882707db888b?auto=format&fit=crop&w=1000&q=85"); background-position: center; background-size: cover; }
.forest-overlay { position: absolute; inset: 0; background: linear-gradient(180deg, #10271a15 5%, #122a20aa 100%); }
.forest-copy { position: absolute; bottom: 45px; left: 28px; color: #fffdf6; }
.image-kicker { font-size: 8px; letter-spacing: 1.5px; color: #f2e7c1; }
.forest-copy p { margin: 15px 0; font-family: var(--serif); font-size: 29px; line-height: 1.65; }
.image-caption { font-size: 11px; color: #e4eadf; }
.image-credit { position: absolute; right: 12px; bottom: 12px; color: #ffffffa6; font-size: 8px; letter-spacing: 1px; }
.memory-note { position: relative; margin-top: 23px; padding: 4px 0 18px 18px; border-bottom: 1px solid var(--line); }
.note-mark { position: absolute; left: 0; top: -4px; color: var(--coral); font-family: var(--serif); font-size: 29px; line-height: 1; }
.memory-note p { max-width: 220px; margin-bottom: 12px; color: #506159; font-family: var(--serif); font-size: 13px; line-height: 1.9; }
.text-link { padding: 0; border: 0; background: transparent; color: var(--green); cursor: pointer; font-size: 11px; }
.text-link span { padding-left: 5px; }
.demo-notice { margin-top: 17px; display: flex; gap: 9px; align-items: flex-start; color: #879189; }
.notice-icon { width: 15px; height: 15px; flex: 0 0 15px; display: grid; place-items: center; border: 1px solid #a6b0a7; border-radius: 50%; font-family: serif; font-size: 9px; }
.demo-notice p { margin: 0; font-size: 10px; line-height: 1.75; }
.site-footer { min-height: 50px; padding: 0 clamp(22px, 6vw, 88px); display: flex; justify-content: space-between; align-items: center; border-top: 1px solid #d9e0d866; color: #8a958c; font-size: 10px; }
.site-footer button { padding: 5px 0; border: 0; background: transparent; color: var(--green); cursor: pointer; font-size: inherit; }
.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; }

.modal { width: min(460px, calc(100% - 32px)); max-height: min(88svh, 720px); padding: 34px; overflow-y: auto; border: 1px solid #dce2da; border-radius: 6px; background: var(--white); color: var(--ink); box-shadow: 0 24px 80px #18352e2b; }
.modal::backdrop { background: #15241fa8; backdrop-filter: blur(3px); }
.modal-close-form { position: absolute; top: 14px; right: 14px; }
.icon-close { width: 32px; height: 32px; display: grid; place-items: center; border: 0; border-radius: 50%; background: transparent; color: var(--ink-soft); cursor: pointer; font-size: 23px; line-height: 1; }
.icon-close:hover { background: #edf0e9; }
.modal h2 { margin: 0 0 14px; font-size: 24px; }
.modal > p:not(.eyebrow), .login-modal > p:not(.eyebrow) { color: var(--ink-soft); font-size: 12px; line-height: 1.9; }
.consent-demo-note { padding: 11px 12px; border-left: 2px solid var(--sun); background: #f5f2e6; color: #6d6242 !important; }
.consent-check { margin: 18px 0 22px; display: flex; gap: 10px; align-items: flex-start; color: var(--ink); font-size: 12px; line-height: 1.7; cursor: pointer; }
.consent-check input { width: 16px; height: 16px; flex: 0 0 16px; margin: 1px 0 0; accent-color: var(--green); }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; }
.primary-button, .secondary-button { min-height: 40px; padding: 0 16px; border: 1px solid transparent; border-radius: 4px; cursor: pointer; font-size: 12px; }
.primary-button { background: var(--green); color: white; }
.primary-button:hover:not(:disabled) { background: var(--green-deep); }
.secondary-button { border-color: var(--line); background: transparent; color: var(--ink-soft); }
.login-modal form:not(.modal-close-form) { margin-top: 22px; }
.login-modal form label { display: block; margin-bottom: 7px; color: var(--ink); font-size: 11px; }
.login-modal input { width: 100%; height: 43px; padding: 0 12px; border: 1px solid var(--line); border-radius: 4px; background: #fff; font-size: 13px; }
.login-modal input::placeholder { color: #a2aaa1; }
.code-row { margin-top: 14px; display: flex; gap: 10px; align-items: center; }
.code-row input { flex: 1; min-width: 0; }
.code-row span { flex: 0 0 auto; color: var(--green); font-size: 10px; }
.form-error { min-height: 17px; margin: 7px 0; color: #b94d39; font-size: 11px; }
.full-button { width: 100%; }
.modal-footnote { margin: 14px 0 0; color: #99a198 !important; font-size: 10px !important; }
.history-modal { width: min(540px, calc(100% - 24px)); padding: 28px; }
.history-header { display: flex; justify-content: space-between; align-items: flex-start; }
.history-header h2 { font-size: 25px; }
.history-close { margin: -6px -9px 0 0; }
.history-toolbar { margin-top: 23px; padding-bottom: 11px; display: flex; justify-content: space-between; border-bottom: 1px solid var(--line); color: #89958b; font-size: 10px; }
.danger-link { color: #b65b48; }
.history-list { max-height: 47svh; overflow-y: auto; }
.history-item { padding: 15px 0; display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; border-bottom: 1px solid #e8ebe5; }
.history-item.session-item { grid-template-columns: minmax(0, 1fr) auto auto; }
.history-item-main { min-width: 0; padding: 0; border: 0; background: transparent; text-align: left; cursor: pointer; }
.history-date { display: block; margin-bottom: 6px; color: #8c988e; font-size: 10px; }
.history-preview { display: -webkit-box; overflow: hidden; color: #42564c; font-family: var(--serif); font-size: 13px; line-height: 1.7; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.history-delete { align-self: center; padding: 6px 0 6px 10px; border: 0; background: transparent; color: #a66c5c; cursor: pointer; font-size: 10px; }
.history-detail { grid-column: 1 / -1; padding: 12px; background: #f4f5ef; }
.history-detail p { margin: 0 0 8px; color: #5a6c61; font-size: 11px; line-height: 1.8; white-space: pre-wrap; }
.history-detail p:last-child { margin-bottom: 0; }
.history-detail strong { color: var(--green-deep); }
.history-audio { width: 100%; height: 32px; margin-top: 8px; }
.history-empty { padding: 35px 0; text-align: center; color: #929d94; font-family: var(--serif); font-size: 13px; }
.history-local-note { margin: 15px 0 0; color: #9aa39a; font-size: 10px; line-height: 1.7; }
.toast { position: fixed; left: 50%; bottom: 28px; z-index: 5; max-width: calc(100% - 32px); padding: 11px 16px; transform: translate(-50%, 16px); border-radius: 4px; background: #203a31; color: #fff; opacity: 0; pointer-events: none; font-size: 12px; line-height: 1.5; transition: opacity .2s ease, transform .2s ease; }
.toast.is-visible { transform: translate(-50%, 0); opacity: 1; }
[hidden] { display: none !important; }

@keyframes appear { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulse { 0%, 100% { box-shadow: 0 9px 24px #d7785c30, 0 0 0 0 #d7785c40; } 50% { box-shadow: 0 9px 24px #d7785c30, 0 0 0 10px #d7785c00; } }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes orbit { to { transform: rotate(360deg); } }

@media (max-width: 1000px) {
  .topbar { height: 64px; padding: 0 18px; }
  .top-actions { gap: 14px; }
  .quiet-button { gap: 5px; }
  .main-layout { width: min(100% - 36px, 520px); min-height: auto; padding: 38px 0 42px; display: block; }
  .intro-block { margin-bottom: 26px; }
  h1 { font-size: clamp(36px, 10vw, 48px); }
  .intro-copy { font-size: 13px; }
  .recorder { min-height: 278px; padding: 19px 15px 16px; }
  .recorder-center { width: 150px; height: 150px; }
  .record-button { width: 86px; height: 86px; }
  .privacy-line { flex-wrap: wrap; font-size: 9px; }
  .compose-footer { flex-wrap: wrap; gap: 10px; }
  .char-count { flex-basis: calc(100% - 20px); order: 0; }
  .reply-options { order: 1; }
  .send-button { order: 2; margin-left: auto; }
  .memory-column { margin-top: 48px; padding-top: 0; }
  .forest-image { min-height: 270px; background-position: center 54%; }
  .forest-copy { bottom: 30px; left: 22px; }
  .forest-copy p { font-size: 25px; }
  .memory-note { margin-top: 19px; }
  .bottom-note { max-width: 310px; line-height: 1.8; }
  .site-footer { min-height: 48px; padding: 0 18px; font-size: 9px; }
  .modal { padding: 30px 22px 22px; }
  .history-modal { padding: 23px 20px 20px; }
}

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

.conversation-panel { margin-top: 30px; border-top: 1px solid var(--line); }
.conversation-toolbar { padding: 18px 0 14px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.conversation-toolbar h2 { font-size: 19px; }
.listening-mode-panel { margin: 0 0 13px; padding: 12px 14px; border: 1px solid #e0e5dd; border-radius: 5px; background: #f2f5ef; }
.listening-mode-panel label { display: block; margin-bottom: 7px; color: var(--green); font-size: 11px; font-weight: 600; }
.listening-mode-panel select { width: 100%; min-height: 35px; padding: 6px 9px; border: 1px solid #ccd8cc; border-radius: 4px; background: var(--white); color: var(--ink); font: inherit; font-size: 12px; cursor: pointer; }
.listening-mode-panel select:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.listening-mode-panel p { margin: 7px 0 0; color: #6b7b70; font-size: 10px; line-height: 1.6; }
.conversation-updated { display: block; margin-top: 5px; color: #8d9990; font-size: 10px; }
.new-conversation-button { min-height: 36px; padding: 0 11px; display: inline-flex; gap: 6px; align-items: center; border: 1px solid var(--line); border-radius: 4px; background: transparent; color: var(--green); cursor: pointer; font-size: 11px; white-space: nowrap; }
.new-conversation-button:hover { border-color: var(--green); background: #eaf0e9; }
.new-conversation-button span { font-size: 17px; line-height: 1; }
.thread-view { min-height: 208px; max-height: min(52svh, 510px); overflow: auto; padding: 18px 15px; border: 1px solid #e0e5dd; border-radius: 4px 4px 0 0; background: #f9f9f4; scroll-behavior: smooth; }
.empty-conversation { min-height: 168px; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; }
.empty-mark { width: 35px; height: 35px; margin-bottom: 12px; display: grid; place-items: center; border: 1px solid #cbd9ce; border-radius: 50%; color: var(--green); font-family: var(--serif); font-size: 14px; }
.empty-conversation p { margin: 0 0 5px; color: #52635a; font-family: var(--serif); font-size: 14px; }
.empty-conversation small { max-width: 260px; color: #99a29a; font-size: 10px; line-height: 1.7; }
.message-list { display: flex; flex-direction: column; gap: 17px; }
.message-row { width: 100%; display: flex; gap: 8px; align-items: flex-start; animation: appear .24s ease both; }
.message-row.user { justify-content: flex-end; }
.message-avatar { width: 27px; height: 27px; flex: 0 0 27px; display: grid; place-items: center; border-radius: 50%; background: var(--green-pale); color: var(--green); font-family: var(--serif); font-size: 11px; }
.message-content { max-width: min(84%, 430px); min-width: 0; }
.message-row.user .message-content { display: flex; flex-direction: column; align-items: flex-end; }
.message-role { margin: 0 0 5px 2px; color: #929d94; font-size: 9px; }
.message-bubble { padding: 10px 12px; border-radius: 2px 9px 9px 9px; background: #edf2eb; color: #42584f; font-family: var(--serif); font-size: 13px; line-height: 1.85; white-space: pre-wrap; overflow-wrap: anywhere; }
.message-row.user .message-bubble { border-radius: 9px 2px 9px 9px; background: var(--green); color: white; text-align: left; }
.message-time { margin-top: 5px; color: #a4aca4; font-family: var(--sans); font-size: 9px; }
.message-voice-hint { display: inline-block; margin-top: 6px; padding: 2px 8px; border-radius: 99px; background: #f1f4ef; color: #7b847c; font-family: var(--sans); font-size: 9px; letter-spacing: .02em; }
.message-audio { width: min(230px, 100%); height: 30px; margin-top: 7px; }
.message-listen { margin-top: 7px; padding: 5px 8px; display: inline-flex; gap: 6px; align-items: center; border: 1px solid #d5e0d5; border-radius: 99px; background: transparent; color: var(--green); cursor: pointer; font-family: var(--sans); font-size: 10px; }
.message-safety { margin-top: 10px; padding: 11px; border-left: 2px solid var(--coral); background: #f8ece6; color: #59413a; }
.message-safety p { margin: 0 0 8px; font-family: var(--sans); font-size: 11px; line-height: 1.75; }
.message-safety a { display: flex; justify-content: space-between; align-items: center; color: #7c4331; text-decoration: none; font-family: var(--sans); font-size: 10px; }
.message-safety a strong { font-size: 15px; }
.message-safety a small { font-size: 9px; font-weight: 400; }
.message-safety-note { display: block; margin-top: 7px; color: #8d6e63; font-family: var(--sans); font-size: 9px; line-height: 1.6; }
.transcription-status { margin: 10px 0 0; padding: 9px 11px; border-left: 2px solid var(--sun); background: #f5f2e6; color: #6d6242; font-size: 10px; line-height: 1.7; }
.message-composer { padding: 11px; border: 1px solid #e0e5dd; border-top: 0; border-radius: 0 0 4px 4px; background: var(--white); }
.message-composer textarea { display: block; min-height: 62px; padding: 8px 4px; border: 0; outline: 0; background: transparent; resize: vertical; font-size: 13px; }
.message-composer textarea:focus-visible { outline: 0; }
.composer-tools, .composer-left, .composer-right { display: flex; gap: 9px; align-items: center; }
.composer-tools { justify-content: space-between; }
.composer-left { min-width: 0; }
.record-button { width: auto; height: 34px; min-height: 34px; padding: 0 9px; display: inline-flex; gap: 6px; align-items: center; flex-shrink: 0; white-space: nowrap; border: 1px solid var(--line); border-radius: 4px; background: transparent; color: var(--green); box-shadow: none; font-size: 10px; }
.record-button:hover { transform: none; border-color: var(--green); background: #eff3ed; color: var(--green-deep); box-shadow: none; }
.record-button .mic-icon { width: 17px; height: 17px; }
.record-stop-icon { width: 11px; height: 11px; border-radius: 2px; }
.is-recording .record-button { background: var(--coral); color: white; }
.is-recording .record-button:hover { background: #c56449; color: white; }
.duration { color: #52635a; font-size: 10px; white-space: nowrap; }
.duration span { font-size: 9px; }
.char-count { margin: 0; font-size: 9px; white-space: nowrap; }
.composer-right { gap: 7px; }
.reply-options { padding: 2px; }
.reply-option { min-width: 34px; padding: 5px 7px; font-size: 10px; }
.send-button { padding: 8px 11px; font-size: 11px; }
.composer-note { margin: 8px 2px 0; display: flex; gap: 6px; align-items: center; color: #929c93; font-size: 9px; line-height: 1.6; }
.composer-note .live-dot { width: 5px; height: 5px; flex: 0 0 5px; }
.composer-note button { margin-left: auto; padding: 0; flex: 0 0 auto; border: 0; border-bottom: 1px solid #aeb8af; background: transparent; color: var(--green); cursor: pointer; font-size: inherit; }
.history-session-button { min-width: 0; text-align: left; }
.history-session-button .history-preview { -webkit-line-clamp: 1; }
.history-session-meta { display: block; margin-top: 5px; color: #9aa39a; font-size: 9px; }
.history-continue { align-self: center; padding: 6px 0 6px 8px; border: 0; background: transparent; color: var(--green); cursor: pointer; font-size: 10px; white-space: nowrap; }

.message-support { display: block; margin-top: 10px; padding: 10px 12px; border: 1px solid #cbd9ce; border-radius: 5px; background: #f2f6ee; color: var(--green-deep); font: inherit; font-size: 11px; line-height: 1.7; text-align: left; cursor: pointer; }
.message-support:hover { background: #e5eddf; border-color: var(--green); }
.support-modal { width: min(540px, calc(100% - 28px)); border-radius: 14px; }
.support-modal h2 { padding-right: 8px; font-family: var(--serif); font-size: 25px; line-height: 1.5; }
.support-cards { display: grid; gap: 12px; margin: 20px 0 16px; }
.support-card { padding: 18px; border: 1px solid #dbe4d6; border-radius: 9px; background: #f4f7f0; }
.support-card small, .relax-tag { color: #697d68; font-size: 11px; letter-spacing: .4px; }
.support-card h3 { margin: 8px 0; color: var(--green-deep); font-family: var(--serif); font-size: 18px; line-height: 1.5; }
.support-card p { margin: 0 0 14px; color: #5a6c61; font-size: 12px; line-height: 1.9; }
.resource-link { display: inline-flex; align-items: center; min-height: 40px; padding: 9px 14px; border-radius: 5px; background: var(--green); color: white; font-size: 12px; line-height: 1.7; text-decoration: none; }
.resource-link:hover { background: var(--green-deep); }
.support-modal .support-note { margin: 12px 0; font-size: 10px !important; }
.support-preference { display: flex; gap: 9px; align-items: center; margin: 15px 0 20px; color: #53675b; font-size: 11px; line-height: 1.7; cursor: pointer; }
.support-preference input { accent-color: var(--green); }
.message-support:focus-visible, .resource-link:focus-visible, .relax-nav a:focus-visible, .relax-back:focus-visible { outline: 2px solid var(--green); outline-offset: 4px; }
.relax-page { display: block; min-height: 100svh; background: #f4f4ef; }
.relax-shell { width: min(660px, calc(100% - 36px)); margin: 0 auto; padding: 36px 0; }
.relax-back { display: inline-block; margin-bottom: 42px; color: var(--green); font-size: 13px; text-decoration: none; }
.relax-shell h1 { margin: 12px 0 18px; font-family: var(--serif); font-size: clamp(29px, 6vw, 40px); line-height: 1.5; }
.relax-intro { color: #5a6c61; font-size: 13px; line-height: 1.9; }
.relax-nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 25px 0 20px; }
.relax-nav a { padding: 10px 13px; border: 1px solid #d2ddce; border-radius: 30px; color: var(--green); font-size: 12px; text-decoration: none; }
.relax-nav a[aria-current="page"] { background: var(--green); color: white; border-color: var(--green); }
.relax-card { padding: clamp(20px, 5vw, 36px); border: 1px solid #dbe4d6; border-radius: 14px; background: #fffef8; box-shadow: 0 12px 35px #203a3106; }
.relax-card h2 { margin: 12px 0 16px; color: var(--green-deep); font-family: var(--serif); font-size: clamp(22px, 5vw, 28px); line-height: 1.6; }
.relax-card p { color: #5a6c61; font-size: 13px; line-height: 1.9; }
.relax-card button { min-height: 44px; margin-top: 14px; }
.sound-art { display: grid; place-items: center; width: 145px; height: 145px; margin: 28px auto; border: 1px solid #cddcc7; border-radius: 50%; background: radial-gradient(circle, #e2ebd9, #f2f5ed); color: var(--green); font-size: 48px; }
.volume-label { display: flex; align-items: center; gap: 16px; color: var(--green); font-size: 12px; }
.volume-label input { flex: 1; min-width: 0; accent-color: var(--green); }
.relax-external { margin-top: 24px; padding-top: 18px; border-top: 1px solid #e0e5dd; }
.relax-external a { display: inline-block; padding: 7px 0; color: var(--green); font-size: 13px; line-height: 1.8; }
.relax-external small { display: block; margin-top: 8px; color: #6c7b70; font-size: 11px; line-height: 1.8; }
.breath-orbit { display: grid; place-items: center; width: 180px; height: 180px; margin: 42px auto; border: 1px solid #bed1b7; border-radius: 50%; background: #e8f0e0; color: var(--green-deep); font-size: 14px; text-align: center; }
.breath-orbit.is-breathing { animation: breathing-cycle 10s linear infinite; }
.practice-list { display: grid; gap: 18px; padding-left: 22px; margin: 26px 0; color: var(--green); }
.practice-list li { padding-left: 6px; }
.practice-list strong, .practice-list span { display: block; font-size: 13px; line-height: 1.9; }
.practice-list span { margin-top: 5px; color: #5a6c61; }
.practice-finish { padding: 14px; border-left: 2px solid #b6c9a8; background: #f3f6ed; }
.sleep-checklist { display: grid; gap: 18px; margin: 24px 0; }
.sleep-checklist label { display: flex; align-items: flex-start; gap: 10px; color: #42584f; font-size: 13px; line-height: 1.9; cursor: pointer; }
.sleep-checklist input { flex: 0 0 auto; margin-top: 6px; accent-color: var(--green); }
.relax-footnote { margin: 23px 5px; color: #6c7b70; font-size: 11px; line-height: 1.9; }
@keyframes breathing-cycle { 0%, 100% { transform: scale(.86); background: #edf2e7; } 40% { transform: scale(1.08); background: #d6e6cb; } }

@media (max-width: 760px) {
  .conversation-panel { margin-top: 24px; }
  .thread-view { min-height: 190px; max-height: 48svh; padding: 14px 10px; }
  .message-content { max-width: 88%; }
  .message-composer { padding: 9px; }
  .composer-tools { align-items: flex-end; }
  .composer-left { gap: 6px; flex-wrap: wrap; }
  .composer-right { gap: 5px; }
  .record-button { padding: 0 7px; }
  .composer-note { align-items: flex-start; font-size: 8px; }
  .composer-note button { margin-left: 0; }
}

/* A quiet, local sealing ritual. */
.seal-modal { width: min(480px, calc(100% - 28px)); border-radius: 20px; text-align: center; background: #faf9f2; }
.seal-modal h2 { font-family: var(--serif); font-size: clamp(20px, 5vw, 26px); line-height: 1.6; }
.seal-modal .seal-note { color: #899184; font-size: 11px; line-height: 1.8; }
.seal-modal .modal-actions { justify-content: center; }
.seal-modal [hidden], .history-continue[hidden] { display: none; }
.seal-scene { position: relative; height: 240px; display: grid; place-items: center; overflow: hidden; }
.seal-halo { position: absolute; width: 210px; height: 210px; border-radius: 50%; background: radial-gradient(circle, #dce7d2 0%, #edf0e3 60%, transparent 72%); }
.seal-envelope { position: relative; width: 190px; height: 120px; margin-top: 50px; background: #c8d4ba; border-radius: 5px; box-shadow: 0 14px 30px #344c3320; perspective: 700px; }
.seal-paper { position: absolute; left: 15px; bottom: 30px; width: 160px; height: 135px; padding: 28px 22px; border-radius: 4px; background: #fffdf4; box-shadow: 0 0 5px #344c3310; }
.seal-paper span { display: block; height: 1px; margin: 13px 0; background: #cbd3bf; }
.seal-paper span:last-child { width: 60%; }
.seal-pocket { position: absolute; inset: 0; z-index: 2; background: #d8e0ca; clip-path: polygon(0 0, 50% 48%, 100% 0, 100% 100%, 0 100%); border-radius: 4px; }
.seal-flap { position: absolute; inset: 0; z-index: 3; background: #bacbad; clip-path: polygon(0 0, 100% 0, 50% 60%); transform-origin: top; transform: rotateX(180deg); backface-visibility: hidden; }
.seal-stamp { position: absolute; z-index: 4; left: 77px; top: 49px; width: 36px; height: 36px; display: grid; place-items: center; background: #647d5b; border: 3px double #b6c6a2; border-radius: 50%; color: #faf8e9; font-family: var(--serif); opacity: 0; transform: scale(1.7); }
.is-sealing .seal-paper { animation: seal-letter 1s ease-in-out forwards; }
.is-sealing .seal-flap { animation: seal-close .8s 1s ease-in-out forwards; }
.is-sealing .seal-stamp { animation: seal-mark .6s 1.8s ease-out forwards; }
.is-sealing .seal-envelope { animation: seal-rest .6s 2.2s ease-in-out forwards; }
@keyframes seal-letter { to { transform: translateY(65px) scale(.86); opacity: 0; } }
@keyframes seal-close { to { transform: rotateX(0); } }
@keyframes seal-mark { to { opacity: 1; transform: scale(1); } }
@keyframes seal-rest { to { transform: translateY(8px) rotate(-3deg); } }
#seal-open { white-space: nowrap; }
.history-item-main:disabled { opacity: .8; cursor: default; }
@media (max-width: 480px) { .conversation-toolbar { flex-wrap: wrap; gap: 10px; } .conversation-toolbar > div { flex-basis: 100%; } }
@media (prefers-reduced-motion: reduce) {
  .is-sealing .seal-paper, .is-sealing .seal-flap, .is-sealing .seal-stamp, .is-sealing .seal-envelope { animation-duration: .001s; animation-delay: 0s; }
}
