.test-chat{max-width:900px;margin:0 auto}
.test-chat>.page-heading{margin-bottom:24px}
.chat-connection{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:20px;min-height:44px}
.chat-identity{display:flex;flex-direction:column;min-width:0;gap:5px}
.chat-status{display:flex;align-items:center;gap:8px;font-size:13px;font-weight:600;line-height:1.5}
.chat-status i{height:7px;width:7px;border-radius:50%;background:#b0b4a7;flex-shrink:0}
.chat-status.online i{background:#6f8d53}
.chat-email{font-size:12px;color:var(--muted);overflow-wrap:anywhere;padding-left:15px}
.chat-connection-actions{display:flex;align-items:center;justify-content:flex-end;gap:20px;flex-shrink:0}
.chat-connection-actions .text-button{font-size:12px;text-decoration:none}
.chatgpt-connect{background:#fff;border-color:#cfd2ca;color:#20251f;font-size:13px;min-height:44px}
.chatgpt-connect:hover{background:#f0f2ed;border-color:#a9b09f}
.chat-signin-link{font-size:12px;margin:-4px 0 18px;color:#536847}
.chat-panel{overflow:hidden;border:1px solid var(--line);border-radius:16px;background:var(--paper);box-shadow:0 5px 25px #354b2c04}
.chat-toolbar{display:flex;justify-content:space-between;align-items:center;gap:18px;padding:17px 23px;border-bottom:1px solid var(--line);background:#fcfdf9}
.chat-model{display:flex;align-items:center;gap:12px;font-size:12px;color:var(--muted);min-width:0}
.chat-model select{width:auto;max-width:330px;min-height:38px;padding:8px 34px 8px 12px;font-size:12px;color:var(--ink);background-color:#fff}
.chat-toolbar>.text-button{flex-shrink:0;min-height:38px;font-size:12px}
.chat-toolbar-actions{display:flex;align-items:center;gap:20px;flex-shrink:0}
.chat-end-call{background:#a34839;color:#fff;font-size:12px;min-height:38px;padding:9px 13px}
.chat-end-call:hover{background:#893b30}
.chat-ended{display:flex;align-items:center;justify-content:space-between;gap:15px;margin-bottom:16px;font-size:13px;color:var(--green)}
.chat-log{display:flex;flex-direction:column;gap:23px;min-height:340px;height:48dvh;max-height:620px;overflow-y:auto;overscroll-behavior:contain;padding:28px 25px;scrollbar-color:#ccd4c3 transparent;scrollbar-width:thin}
.chat-empty{flex:1;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:10px;padding:40px 10px;text-align:center;color:var(--muted)}
.chat-empty>svg{height:31px;width:31px;color:#9aaa8b;margin-bottom:6px;stroke-width:1.3}
.chat-empty h2{font-size:19px;letter-spacing:-.4px;font-weight:600;color:#69765e}
.chat-empty p{font-size:13px}
.chat-message{display:flex;align-items:flex-start;flex-direction:column;max-width:88%;align-self:flex-start;min-width:0}
.chat-speaker{font-size:11px;font-weight:600;color:#7d8b70;margin-bottom:7px}
.chat-message p{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.8;font-size:14px;padding:15px 18px;border-radius:3px 13px 13px;background:#f2f5ec;color:#43503a;max-width:100%}
.chat-message.from-user{align-self:flex-end;align-items:flex-end}
.chat-message.from-user p{background:#f5f4ee;border-radius:13px 3px 13px 13px;color:#5b6053}
.chat-message.from-user .chat-speaker{color:#8c8d7f}
.chat-thinking{color:var(--muted);font-size:12px;padding:5px 0}
.chat-bottom{border-top:1px solid var(--line);padding:18px 23px 21px}
.chat-bottom>.form-error{font-size:12px;margin:0 0 8px;line-height:1.65;overflow-wrap:anywhere}
.chat-bottom>.chat-retry{font-size:12px;padding:0 0 14px}
.chat-composer{display:flex;align-items:flex-end;gap:12px}
.chat-composer textarea{min-height:74px;max-height:180px;font-size:14px;line-height:1.65;resize:vertical;background:#fcfdf9}
.chat-composer .button{min-height:44px;margin-bottom:1px;font-size:13px;padding:11px 18px}
@media(max-width:600px){
  .test-chat>.page-heading{margin-bottom:20px}
  .chat-connection{align-items:flex-start;gap:14px;flex-wrap:wrap;margin-bottom:17px}
  .chat-connection-actions{gap:17px;flex-wrap:wrap;justify-content:flex-start;max-width:100%}
  .chat-connection-actions .text-button{font-size:11px}
  .chatgpt-connect{font-size:12px;min-height:41px;padding:10px 14px}
  .chat-status{font-size:12px}.chat-email{font-size:11px}
  .chat-toolbar{padding:12px 15px;gap:12px;align-items:flex-end}
  .chat-model{align-items:flex-start;flex-direction:column;gap:6px;font-size:11px;flex:1}
  .chat-model select{width:100%;max-width:100%;font-size:12px;min-height:38px}
  .chat-toolbar>.text-button{font-size:11px;gap:4px;min-height:38px}
  .chat-toolbar{flex-wrap:wrap;align-items:center}.chat-model{flex-basis:100%}.chat-toolbar-actions{width:100%;justify-content:space-between;gap:10px}.chat-ended{font-size:12px}
  .chat-log{min-height:330px;height:46dvh;max-height:560px;padding:23px 16px;gap:20px}
  .chat-message{max-width:94%}
  .chat-message p{font-size:13px;padding:13px 14px;line-height:1.75}
  .chat-empty{padding:30px 4px}.chat-empty h2{font-size:17px}.chat-empty p{font-size:12px}
  .chat-bottom{padding:15px 14px 17px}
  .chat-composer{gap:8px}.chat-composer textarea{font-size:16px;min-height:83px;padding:11px}
  .chat-composer .button{font-size:12px;padding:11px 12px}.chat-composer .button svg{display:none}
}

.chat-prompt{margin-bottom:20px;padding:18px 22px;border:1px solid var(--line);border-radius:16px;background:var(--paper)}
.chat-prompt-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px;gap:16px;font-size:14px;font-weight:600}
.chat-prompt-heading .text-button{font-size:12px}
.chat-prompt textarea{width:100%;min-height:120px;max-height:360px;resize:vertical;font-size:13px;line-height:1.65;background:#fcfdf9}
.chat-connect-action{margin-bottom:20px}
.chat-call{margin-top:20px;border:1px solid var(--line);border-radius:16px;background:var(--paper);overflow:hidden}
.chat-call>summary{padding:17px 22px;font-size:14px;font-weight:600;cursor:pointer;overflow-wrap:anywhere}
.chat-call-body{padding:0 22px 22px;font-size:13px;line-height:1.7;overflow-wrap:anywhere}
.chat-call-body h2{font-size:18px;margin-bottom:10px}.chat-call-body h3{font-size:13px;margin:18px 0 5px}
.chat-call-body dl{margin-top:18px}.chat-call-body dl>div{display:grid;grid-template-columns:115px 1fr;gap:14px;margin:7px 0}
.chat-call-body dt{color:var(--muted)}.chat-call-body dd{white-space:pre-wrap}.chat-call-body ul{padding-left:20px}
.chat-call-status{margin-top:18px;color:#536847}.chat-call-notice{margin-top:18px;font-size:13px;color:var(--muted)}
.chat-activity{margin-top:22px;padding:20px 22px;border:1px solid var(--line);border-radius:16px;background:var(--paper)}
.chat-activity>h2{font-size:16px;font-weight:600;margin-bottom:14px}.chat-action-log{display:flex;flex-direction:column;gap:11px}
.chat-action{display:flex;align-items:flex-start;gap:10px;font-size:13px;line-height:1.5}.chat-action>span:nth-child(2){flex:1;min-width:0}
.chat-action small{display:block;color:var(--muted);font-size:12px;margin-top:3px;overflow-wrap:anywhere}.chat-action time{color:var(--muted);font-size:11px;white-space:nowrap;padding-top:2px}
.chat-action-dot{width:7px;height:7px;flex-shrink:0;margin-top:6px;border-radius:50%;background:#789463}.action-failed .chat-action-dot{background:#b9674f}.action-running{animation:action-pulse 1s ease-in-out infinite}
.chat-action-empty{font-size:13px;color:var(--muted)}
.chat-fake-email{margin-top:17px;border:1px solid #dce2d2;border-radius:12px;background:#fcfdf9;animation:email-appear .2s ease-out}
.chat-fake-email>summary{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 17px;font-size:13px;font-weight:600;cursor:pointer}
.fake-email-badge{font-size:10px;font-weight:500;padding:3px 7px;border-radius:5px;background:#edf0e6;color:#68775a;white-space:nowrap}
.chat-fake-email-body{padding:0 17px 17px;font-size:13px;line-height:1.7;overflow-wrap:anywhere}.chat-fake-email-body dl>div{display:grid;grid-template-columns:60px 1fr;gap:10px;margin-bottom:6px}.chat-fake-email-body dt{color:var(--muted)}
.chat-fake-email-body>p{white-space:pre-wrap;margin-top:16px;padding-top:16px;border-top:1px solid var(--line)}
@keyframes action-pulse{50%{opacity:.35}}@keyframes email-appear{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}
@media(prefers-reduced-motion:reduce){.action-running,.chat-fake-email{animation:none}}
@media(max-width:600px){.chat-call>summary{padding:15px}.chat-call-body{padding:0 15px 15px}.chat-call-body dl>div{grid-template-columns:85px 1fr;gap:10px}}
@media(max-width:600px){.chat-activity{padding:16px 15px}.chat-fake-email>summary{padding:12px}.chat-fake-email-body{padding:0 12px 12px}}
@media(max-width:600px){.chat-prompt{padding:15px}.chat-prompt textarea{font-size:16px}}
.chat-replies,.chat-received-photos{margin-top:22px}
.chat-replies>h3,.chat-received-photos>h3{font-size:16px;font-weight:600;margin-bottom:14px}
.chat-received-photos .photo-tile{display:block}
