:root {
  --bg: #f2f0eb;
  --panel: #fff;
  --ink: #20201e;
  --muted: #74716b;
  --line: #dedbd4;
  --human-bg: #e6f1fb;
  --human-ink: #0c447c;
  --sun-bg: #faeeda;
  --sun-ink: #633806;
  --claude-bg: #e1f5ee;
  --claude-ink: #085041;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}
* { box-sizing: border-box; }
html, body { min-height: 100%; }
body { margin: 0; padding: 20px 12px 54px; color: var(--ink); background: var(--bg); }
button, textarea, select { font: inherit; }
button { cursor: pointer; }
.room { width: min(800px, 100%); min-height: calc(100dvh - 74px); margin: 0 auto; display: grid; grid-template-rows: auto auto auto auto auto minmax(320px, 1fr) auto; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: var(--panel); box-shadow: 0 14px 40px rgba(40,35,28,.08); }
.room-head { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 7px; color: #55514b; font-size: 12px; font-weight: 700; }
.brand-mark { display: grid; width: 27px; height: 27px; place-items: center; border-radius: 8px; color: #fff; background: #252421; font-size: 10px; }
.room-head h1 { margin: 0; font-size: 22px; line-height: 1.2; }
.room-head p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.about { padding: 7px 11px; border: 1px solid var(--line); border-radius: 9px; color: #615e58; background: #fff; }
.entry-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; padding: 9px 16px; border-bottom: 1px solid var(--line); background: #fff; }
.entry-tabs button { padding: 9px 8px; border: 1px solid var(--line); border-radius: 9px; color: #66625d; background: #f8f7f4; font-size: 12px; font-weight: 650; }
.entry-tabs button.active { color: #fff; border-color: #252421; background: #252421; }
.roles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: #faf9f6; }
.role-card { display: flex; min-width: 0; gap: 9px; align-items: center; padding: 9px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.role-card strong, .role-card span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.role-card strong { font-size: 13px; }
.role-card span { margin-top: 3px; color: var(--muted); font-size: 10px; }
.role-card em { padding: 2px 4px; border-radius: 4px; color: var(--claude-ink); background: var(--claude-bg); font-size: 9px; font-style: normal; }
.avatar { display: grid; flex: 0 0 auto; width: 34px; height: 34px; place-items: center; border-radius: 10px; font-size: 13px; font-weight: 750; }
.human-avatar { color: var(--human-ink); background: var(--human-bg); }
.sun-avatar { color: var(--sun-ink); background: var(--sun-bg); }
.claude-avatar { color: var(--claude-ink); background: var(--claude-bg); }
.boundary { padding: 9px 18px; border-bottom: 1px solid #eadfca; color: #765f3c; background: #fffaf0; font-size: 10px; line-height: 1.55; }
.audit-notice { padding: 9px 18px; border-bottom: 1px solid #d7e1e8; color: #36556a; background: #f3f8fb; font-size: 10px; line-height: 1.55; }
.audit-notice a, dialog a { color: #174d74; }
.messages { min-height: 0; padding: 22px 18px 30px; overflow-y: auto; overscroll-behavior: contain; background: #fdfcf9; }
.message { display: flex; gap: 9px; align-items: flex-start; margin-bottom: 16px; }
.message.continuation { margin-top: -9px; }
.message.continuation .message-avatar, .message.continuation .message-label { visibility: hidden; }
.message.user { flex-direction: row-reverse; }
.message.user .message-avatar { display: none; }
.message.user .message-body { align-items: flex-end; }
.message-body { display: flex; max-width: 78%; flex-direction: column; gap: 5px; }
.message-label { padding: 0 3px; color: var(--muted); font-size: 10px; font-weight: 650; }
.message-receipt { padding: 0 3px; color: #8a857d; font-size: 9px; letter-spacing: .02em; }
.bubble { padding: 11px 14px; border: 1px solid transparent; border-radius: 5px 15px 15px; font-size: 14px; line-height: 1.66; white-space: pre-wrap; word-break: break-word; }
.user .bubble { border-radius: 15px 5px 15px 15px; color: var(--human-ink); background: var(--human-bg); border-color: #c8e0f5; }
.sun .bubble { color: var(--sun-ink); background: var(--sun-bg); border-color: #efdcbb; }
.claude .bubble { color: var(--claude-ink); background: var(--claude-bg); border-color: #c8e9de; }
.typing .bubble::after { content: "•••"; letter-spacing: 4px; animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: .35; } }
.composer-area { padding: 12px 14px 14px; border-top: 1px solid var(--line); background: #fff; }
.status { min-height: 18px; color: #8a4b21; font-size: 11px; }
.composer { display: grid; grid-template-columns: auto 1fr; gap: 8px; align-items: end; }
.mic { width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
.mic.listening { color: #fff; background: #a94f25; }
textarea { width: 100%; max-height: 120px; min-height: 44px; padding: 10px 12px; resize: none; border: 1px solid var(--line); border-radius: 11px; outline: 0; color: var(--ink); background: #fff; line-height: 1.5; }
textarea:focus { border-color: #99938a; }
.actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 9px; }
.actions button, .rounds { min-height: 37px; padding: 8px 11px; border: 1px solid var(--line); border-radius: 9px; background: #fff; font-size: 12px; font-weight: 650; }
.sun-action { color: var(--sun-ink); background: var(--sun-bg) !important; }
.claude-action { color: var(--claude-ink); background: var(--claude-bg) !important; }
.both-action, .auto-action { color: #fff; background: #252421 !important; }
.opening-action { color: #713f0a; background: #fff3db !important; }
.rounds { display: flex; gap: 6px; align-items: center; margin-left: auto; color: #5c5954; font-weight: 500; }
.rounds select { border: 0; color: #262522; background: transparent; font-weight: 700; }
.actions button:disabled { opacity: .45; cursor: default; }
.input-note { display: flex; justify-content: space-between; gap: 10px; margin: 8px 2px 0 52px; color: #918c84; font-size: 10px; }
#quota-note { color: #526d7e; white-space: nowrap; }
.share-disclaimer { position: fixed; z-index: 10; right: 0; bottom: 0; left: 0; padding: 9px 12px max(9px, env(safe-area-inset-bottom)); border-top: 1px solid #dfdbd3; color: #6d6963; background: rgba(250,249,246,.96); text-align: center; font-size: 10px; }
dialog { width: min(480px, calc(100% - 30px)); padding: 24px; border: 0; border-radius: 16px; color: var(--ink); box-shadow: 0 24px 70px rgba(20,18,15,.25); }
dialog::backdrop { background: rgba(26,24,21,.56); }
dialog h2 { margin: 0 0 12px; }
dialog p { color: #67635d; font-size: 13px; line-height: 1.7; }
dialog button { width: 100%; padding: 10px; border: 0; border-radius: 9px; color: #fff; background: #252421; }
@media (max-width: 620px) { body { padding: 0 0 46px; } .room { min-height: calc(100dvh - 46px); border: 0; border-radius: 0; } .room-head { padding: max(14px, env(safe-area-inset-top)) 14px 13px; } .brand { display: none; } .room-head { grid-template-columns: 1fr auto; } .roles { grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 8px; gap: 5px; } .role-card { display: block; padding: 7px; } .role-card .avatar { margin-bottom: 5px; } .role-card span { display: none; } .role-card strong { font-size: 11px; } .message-body { max-width: 87%; } .rounds { order: 5; width: calc(100% - 62px); margin-left: 0; justify-content: space-between; } .auto-action { order: 6; width: 55px; } .input-note { margin-left: 2px; flex-wrap: wrap; } }
@media (prefers-reduced-motion: reduce) { * { animation-duration: .01ms !important; scroll-behavior: auto !important; } }
