.sr-only { position:absolute!important; width:1px!important; height:1px!important; padding:0!important; margin:-1px!important; overflow:hidden!important; clip:rect(0,0,0,0)!important; white-space:nowrap!important; border:0!important; }
.ivy-conversation { position:absolute; right:0; bottom:94px; width:clamp(320px,22vw,370px); max-width:calc(100vw - 32px); height:min(610px,calc(100vh - 130px)); display:none; grid-template-rows:auto minmax(0,1fr) auto; overflow:hidden; border:1px solid rgba(23,109,136,.35); border-radius:22px; background:#fffdf8; box-shadow:0 24px 65px rgba(10,25,30,.3); }
.ivy-voice-panel.is-open .ivy-conversation { display:grid; }
.ivy-voice-panel.is-open + .ivy-voice-status { display:none!important; }
.ivy-conversation-header { min-height:70px; display:grid; grid-template-columns:44px minmax(0,1fr) auto; align-items:center; gap:11px; padding:10px 11px; border-bottom:1px solid rgba(16,36,43,.12); background:linear-gradient(135deg,#10242b,#174653); color:white; }
.ivy-chat-avatar { width:44px; height:44px; overflow:hidden; border:2px solid white; border-radius:50%; box-shadow:0 0 0 2px #bb7047; }
.ivy-chat-avatar img { display:block; width:100%; height:100%; object-fit:cover; }
.ivy-conversation-title { min-width:0; display:grid; gap:3px; }
.ivy-conversation-title strong { color:#c4f275; font:800 18px/1 Georgia,serif; }
.ivy-conversation-title small { overflow:hidden; color:rgba(255,255,255,.76); font-size:11px; line-height:1.2; text-overflow:ellipsis; white-space:nowrap; }
.ivy-conversation-actions { display:flex; align-items:center; gap:5px; }
.ivy-conversation-actions button { min-height:34px; border:1px solid rgba(255,255,255,.22); border-radius:999px; background:rgba(255,255,255,.08); color:white; cursor:pointer; font:800 11px/1 ui-sans-serif,system-ui,sans-serif; }
.ivy-conversation-actions button:hover,.ivy-conversation-actions button:focus-visible { border-color:#c4f275; background:rgba(196,242,117,.13); outline:none; }
.ivy-sound-toggle { display:inline-flex; align-items:center; gap:5px; padding:6px 9px; }
.ivy-sound-toggle[aria-pressed=true] { border-color:#f1a15f; background:rgba(241,161,95,.16); }
.ivy-minimize,.ivy-end { width:34px; padding:0; font-size:18px!important; }
.ivy-end { color:#ffd7c2!important; }
.ivy-conversation-log { min-height:0; overflow-y:auto; display:flex; flex-direction:column; gap:12px; padding:18px 16px; overscroll-behavior:contain; scroll-behavior:smooth; background:linear-gradient(180deg,rgba(231,242,238,.72),rgba(255,253,248,.92) 32%); }
.ivy-chat-welcome { display:grid; gap:5px; margin-bottom:2px; padding:12px 14px; border:1px solid rgba(23,109,136,.18); border-radius:14px; background:white; color:#456068; font-size:12px; line-height:1.45; }
.ivy-chat-welcome strong { color:#10242b; font:800 15px/1.2 Georgia,serif; }
.ivy-chat-message { max-width:88%; display:grid; gap:5px; }
.ivy-chat-message[data-role=user] { align-self:flex-end; }
.ivy-chat-message[data-role=assistant] { align-self:flex-start; }
.ivy-chat-role { color:#718187; font-size:10px; font-weight:900; letter-spacing:.08em; text-transform:uppercase; }
.ivy-chat-message[data-role=user] .ivy-chat-role { text-align:right; }
.ivy-chat-text { padding:10px 13px; border-radius:15px 15px 15px 4px; background:white; color:#203a43; box-shadow:0 4px 14px rgba(16,36,43,.09); font-size:13px; line-height:1.48; white-space:pre-wrap; overflow-wrap:anywhere; }
.ivy-chat-message[data-role=user] .ivy-chat-text { border-radius:15px 15px 4px 15px; background:#176d88; color:white; }
.ivy-chat-message.is-pending .ivy-chat-text::after { content:" …"; animation:ivy-chat-pulse 1s ease-in-out infinite; }
.ivy-message-form { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:8px; padding:11px; border-top:1px solid rgba(16,36,43,.12); background:white; }
.ivy-message-form input { min-width:0; height:44px; padding:10px 13px; border:1px solid rgba(16,36,43,.2); border-radius:12px; background:#fffdf8; color:#10242b; font:500 14px/1.2 ui-sans-serif,system-ui,sans-serif; }
.ivy-message-form input:focus { border-color:#39b9d3; outline:3px solid rgba(57,185,211,.14); }
.ivy-message-form button { min-width:68px; border:0; border-radius:12px; background:#10242b; color:#c4f275; cursor:pointer; font-size:12px; font-weight:900; }
.ivy-message-form button:hover,.ivy-message-form button:focus-visible { background:#176d88; outline:none; }
.ivy-message-form button:disabled,.ivy-message-form input:disabled { cursor:not-allowed; opacity:.55; }
@keyframes ivy-chat-pulse { 50% { opacity:.25; } }
@media(min-width:1180px) {
  #guide-main { width:100%; margin-left:0; transition:width .3s cubic-bezier(.22,.61,.36,1); }
  body.is-ivy-open #guide-main { width:calc(100% - 410px); }
  body.is-ivy-open .guide-screen { padding-inline:clamp(28px,3vw,48px); }
  body.is-ivy-open .overview-screen,
  body.is-ivy-open .connection-screen { grid-template-columns:minmax(250px,.68fr) minmax(440px,1.32fr); gap:24px; }
  body.is-ivy-open .value-screen h1 { font-size:clamp(36px,3.35vw,54px); }
  body.is-ivy-open .intro-value-visual { padding:clamp(17px,1.7vw,26px); }
  body.is-ivy-open .intro-role-grid article { padding-inline:19px; }
  body.is-ivy-open .intro-role-grid h2 { font-size:clamp(23px,1.8vw,30px); }
  body.is-ivy-open .dashboard-tour { grid-template-columns:minmax(0,1fr) minmax(260px,.7fr); gap:24px; }
  body.is-ivy-open .dashboard-tour-figure { max-width:390px; }
}
@media(min-width:1051px) and (max-width:1179px) {
  #guide-main { width:100%; margin-left:0; transition:width .3s cubic-bezier(.22,.61,.36,1); }
  body.is-ivy-open #guide-main { width:calc(100% - 350px); }
  body.is-ivy-open .guide-screen { padding-inline:28px; }
  body.is-ivy-open .overview-screen,
  body.is-ivy-open .connection-screen,
  body.is-ivy-open .dashboard-tour { grid-template-columns:minmax(0,1fr); gap:28px; }
  body.is-ivy-open .dashboard-tour-figure { max-width:390px; }
}
@media(min-width:761px) and (max-width:1400px) {
  .ivy-control-label { display:none; }
  .ivy-sound-toggle { width:34px; justify-content:center; padding:0; }
}
@media(max-width:760px) {
  .ivy-conversation { position:fixed; right:10px; bottom:92px; width:calc(100vw - 20px); height:min(620px,calc(100dvh - 122px)); border-radius:18px; }
  .ivy-conversation-header { grid-template-columns:40px minmax(0,1fr) auto; gap:8px; padding:9px; }
  .ivy-chat-avatar { width:40px; height:40px; }
  .ivy-control-label { display:none; }
  .ivy-sound-toggle { width:34px; justify-content:center; padding:0; }
  .ivy-conversation-log { padding:14px 12px; }
  .ivy-chat-message { max-width:92%; }
}
@media(prefers-reduced-motion:reduce) {
  #guide-main { transition:none; }
}
@media(max-width:360px) {
  .ivy-conversation-title small { max-width:100px; }
  .ivy-conversation-actions { gap:3px; }
  .ivy-conversation-actions button { width:31px; min-height:31px; }
}
@media(prefers-reduced-motion:reduce) { .ivy-conversation-log { scroll-behavior:auto; } .ivy-chat-message.is-pending .ivy-chat-text::after { animation:none; } }
@media(max-width:1050px) {
  .ivy-voice-panel .ivy-conversation { position:fixed; top:260px; bottom:118px; height:auto; min-height:170px; }
}
@media(max-width:760px) {
  .ivy-voice-panel .ivy-conversation { top:350px; bottom:92px; min-height:130px; }
}
