:root {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: #283b34;
  background: #f5f4ef;
  font-synthesis: none;
  --ink: #283b34;
  --muted: #69756c;
  --line: #dce1d9;
  --green: #28604b;
  --paper: #fffefa;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .55; }
button, input, textarea { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible { outline: 3px solid #91b8a5; outline-offset: 4px; }
[hidden] { display: none !important; }
.site-header { height: 82px; padding: 0 4.5vw; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); }
.wordmark { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; font-size: 15px; font-weight: 600; letter-spacing: -.2px; white-space: nowrap; }
.brand-mark { display: grid; place-items: center; width: 29px; height: 29px; background: var(--green); color: white; border-radius: 8px; font-size: 22px; font-weight: 400; }
.wordmark-divider { color: #adb6ad; font-weight: 400; margin: 0 3px; }
.session-label { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: #86a68f; }
.workspace { max-width: 1536px; margin: auto; display: grid; grid-template-columns: minmax(280px, 330px) minmax(0, 1fr); gap: 48px; padding: 36px 4.5vw; }
.settings { padding: 8px 0 4px; }
.eyebrow { color: var(--green); font-size: 10px; letter-spacing: 2px; font-weight: 650; margin: 0 0 14px; }
h1 { font-size: 27px; line-height: 1.4; font-weight: 580; letter-spacing: -.8px; margin: 0; }
.intro { color: var(--muted); font-size: 13px; line-height: 1.8; margin: 9px 0 32px; }
.field { margin-bottom: 25px; }
label { font-size: 13px; font-weight: 600; }
.optional { margin-left: 6px; color: #7e877e; font-weight: 400; font-size: 11px; }
input[type="text"], .system-field textarea { display: block; width: 100%; color: var(--ink); background: #fafaf5; border: 1px solid #d7ddd4; border-radius: 7px; padding: 12px; margin-top: 10px; transition: border-color .15s, box-shadow .15s; }
input[type="text"] { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
textarea { line-height: 1.8; resize: vertical; }
.system-field textarea { min-height: 200px; font-size: 13px; }
input:focus, textarea:focus { outline: none; border-color: #86a68f; box-shadow: 0 0 0 3px #dfe9df; }
input::placeholder, textarea::placeholder { color: #92988f; }
.field-hint { font-size: 11px; line-height: 1.8; color: var(--muted); margin: 8px 0 0; overflow-wrap: anywhere; }
.field-hint:empty { display: none; }
.label-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.text-button { border: 0; padding: 4px 0 4px 8px; background: none; color: var(--green); font-size: 12px; }
.text-button:hover { color: #143927; text-decoration: underline; text-underline-offset: 4px; }
.text-button span { margin-left: 3px; }
.context-note { font-size: 11px; line-height: 1.9; color: var(--muted); padding: 0 0 23px; border-bottom: 1px solid var(--line); margin: 4px 0 18px; }
.limits { margin: 0; font-size: 11px; color: var(--muted); }
.limits div { display: flex; gap: 14px; justify-content: space-between; padding: 5px 0; }
.limits dd { margin: 0; color: #495b50; font-variant-numeric: tabular-nums; text-align: right; }
.conversation { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; min-height: 690px; height: calc(100dvh - 154px); display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 3px 18px #23352304; }
.conversation-header { display: flex; justify-content: space-between; gap: 12px; align-items: center; border-bottom: 1px solid #e9ece4; padding: 20px 26px; }
.conversation-title { display: flex; align-items: baseline; flex-wrap: wrap; gap: 12px; }
h2 { margin: 0; font-size: 15px; font-weight: 600; }
.conversation-title > span { color: #879086; font-size: 11px; }
.secondary-button { border: 1px solid #e0e5db; border-radius: 6px; padding: 7px 10px; background: transparent; color: var(--muted); font-size: 11px; white-space: nowrap; }
.secondary-button:hover { background: #f3f6ee; color: var(--ink); }
.secondary-button span { margin-left: 7px; }
.settings-notice { font-size: 11px; line-height: 1.8; margin: 0; padding: 10px 26px; background: #f0f4e9; color: #586749; }
.transcript { flex: 1; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; padding: 30px 30px 12px; scrollbar-color: #cdd5c8 transparent; scrollbar-width: thin; }
.empty-state { height: 100%; min-height: 230px; display: flex; align-items: center; flex-direction: column; justify-content: center; text-align: center; padding-bottom: 28px; }
.empty-glyph { height: 78px; font-family: Georgia, serif; color: #c2cfbe; font-size: 105px; line-height: 1; }
.empty-state h3 { margin: 15px 0 8px; color: #53664f; font-size: 19px; font-weight: 500; }
.empty-state p { font-size: 12px; color: #8a9585; line-height: 1.9; }
.message { margin: 0 0 28px; }
.message-heading { font-size: 11px; color: var(--muted); font-weight: 500; display: flex; gap: 9px; align-items: center; margin: 0 0 10px; }
.message-heading::before { content: ""; width: 6px; height: 6px; border-radius: 2px; background: #92a587; }
.message-user .message-heading::before { background: #c0b6a2; }
.message-text { margin: 0; font-family: inherit; color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; line-height: 1.95; }
.message-user .message-text { padding: 13px 17px; background: #f2f3ec; border-radius: 0 9px 9px 9px; }
.message-assistant .message-text { padding: 0 2px; }
.message-pending { opacity: .65; }
.message-meta { margin: 13px 0 0; color: #889181; font-size: 10px; line-height: 1.8; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.compose-area { padding: 0 24px 15px; background: var(--paper); }
.request-status { min-height: 18px; margin: 0 2px 8px; font-size: 11px; line-height: 1.6; color: var(--muted); }
.request-error { padding: 10px 12px; border: 1px solid #eed2c6; border-radius: 6px; background: #fff6f0; font-size: 12px; line-height: 1.75; color: #9b4b32; margin: 0 0 10px; white-space: pre-wrap; overflow-wrap: anywhere; }
.composer { border: 1px solid #d7e0d1; background: #fffefa; border-radius: 9px; padding: 10px 12px 10px 14px; transition: box-shadow .15s; }
.composer:focus-within { border-color: #8daa85; box-shadow: 0 0 0 3px #e4ebde; }
.composer textarea { display: block; width: 100%; border: none; background: transparent; min-height: 80px; max-height: 250px; padding: 3px 0; box-shadow: none; font-size: 14px; color: var(--ink); }
.composer-bottom { display: flex; gap: 14px; justify-content: space-between; align-items: center; margin-top: 8px; }
.composer-bottom > span { color: #939a8d; font-size: 10px; line-height: 1.7; }
kbd { font: inherit; }
.primary-button { display: flex; gap: 21px; align-items: center; border: none; border-radius: 6px; background: var(--green); color: white; padding: 10px 14px; font-size: 12px; white-space: nowrap; }
.primary-button:hover { background: #1d4b39; }
.primary-button > span:last-child { font-size: 17px; line-height: 1; }
.conversation-footnote { color: #939b8d; text-align: center; font-size: 10px; margin: 11px 0 0; line-height: 1.7; }
.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; }
@media (min-width: 1500px) { .workspace { gap: 64px; } }
@media (max-width: 1050px) { .workspace { gap: 28px; grid-template-columns: 260px minmax(0, 1fr); } .site-header { padding: 0 28px; } .workspace { padding: 28px; } .transcript { padding: 25px 22px 8px; } }
@media (max-width: 760px) {
  .site-header { padding: 0 20px; height: 68px; }
  .wordmark { font-size: 13px; gap: 8px; }
  .session-label { font-size: 0; gap: 0; }
  .status-dot { width: 7px; height: 7px; }
  .workspace { display: flex; flex-direction: column; padding: 25px 16px 16px; gap: 24px; }
  .settings { padding: 0 5px; }
  .eyebrow { margin-bottom: 8px; }
  h1 { font-size: 25px; }
  .intro { margin: 6px 0 22px; }
  .field { margin-bottom: 19px; }
  .system-field textarea { min-height: 140px; height: 160px; }
  input[type="text"], .system-field textarea { font-size: 16px; }
  .context-note { padding-bottom: 16px; margin-bottom: 12px; }
  .limits { display: flex; flex-wrap: wrap; gap: 6px 18px; }
  .limits div { gap: 6px; }
  .conversation { height: 80dvh; min-height: 570px; border-radius: 10px; }
  .conversation-header { padding: 17px 18px; }
  .settings-notice { padding: 10px 18px; }
  .transcript { padding: 23px 18px 5px; }
  .message-text { font-size: 14px; }
  .compose-area { padding: 0 13px 12px; }
  .composer { padding-left: 12px; }
  .composer textarea { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; } }
