.hild-launch{position:fixed;right:22px;bottom:20px;z-index:1030;display:flex;align-items:center;gap:10px;background:#1e3c72;color:white;border:2px solid #ff823f;border-radius:40px;padding:6px 20px 6px 6px;box-shadow:0 6px 24px #142c5240;font-weight:700}
.hild-launch img{object-fit:cover;border-radius:50%;background:#fff}
body.hild-modal-open{overflow:hidden}
.hild-launch[aria-expanded="true"]{visibility:hidden}
.hild-overlay{position:fixed;inset:0;z-index:1080;display:flex;align-items:center;justify-content:center;padding:24px;background:#142b50a6;backdrop-filter:blur(4px);-webkit-backdrop-filter:blur(4px);overscroll-behavior:contain}
.hild-overlay[hidden],.hild-panel[hidden]{display:none}
.hild-panel{position:relative;width:min(800px,100%);height:min(620px,calc(100vh - 48px));height:min(620px,calc(100dvh - 48px));background:#fff;border:1px solid #ffffff80;border-radius:24px;box-shadow:0 24px 90px #081f4b55;display:flex;flex-direction:column;overflow:hidden;color:#203c71}
.hild-header{display:flex;flex-shrink:0;justify-content:space-between;align-items:center;padding:14px 20px;background:#1e3c72;color:#fff}.hild-header h2{font-size:23px;margin:0}.hild-header p{font-size:12px;margin:3px 0 0;color:#dce8ff}.hild-close{background:transparent;border:0;color:white;font-size:30px;min-width:44px;min-height:44px}
.hild-stage{background:#eaf3ff;display:flex;align-items:center;justify-content:center;gap:12px;flex-shrink:0;padding:12px 18px 0;min-height:174px;position:relative;isolation:isolate;overflow:hidden}.hild-stage::after{content:"";position:absolute;z-index:2;left:0;right:0;bottom:0;height:11px;background:linear-gradient(to bottom,#d9b58b 0 4px,#ba8b62 4px 11px);pointer-events:none}.hild-stage #hildAvatar{width:136px;height:156px;object-fit:contain;object-position:bottom;align-self:end;flex-shrink:0}.hild-stage-library{flex:1;min-width:0;max-width:190px;align-self:stretch;display:flex;flex-direction:column;justify-content:space-between;padding:14px 0 24px}.hild-stage .hild-stage-books{display:flex;height:44px;gap:4px;padding:0 7px;margin:0 0 10px;border-bottom-width:5px;box-shadow:0 3px 0 #6d4d2410}.hild-stage-books i{width:16px!important;height:30px;border-left-width:2px;border-radius:2px 2px 0 0}.hild-stage-books i::after{inset:5px 3px;border-width:1px}.hild-stage-books i:nth-child(2){height:39px}.hild-stage-books i:nth-child(3){height:35px}.hild-stage-books i:nth-child(4){height:28px;margin-left:3px}.hild-stage-books i:nth-child(5){height:37px;margin-left:2px}.hild-stage-books i:nth-child(6){height:31px}.hild-stage-books i:nth-child(7){height:34px}.hild-stage p{font-size:12px;line-height:1.45;text-align:center;margin:0;padding:8px 10px;font-weight:600;background:#fff;border:1px solid #d4e3f7;border-radius:14px 14px 14px 3px}
.hild-messages{flex:1;min-height:100px;overflow-y:auto;padding:15px;overscroll-behavior:contain}.hild-message{padding:11px 13px;margin-bottom:10px;border-radius:14px;line-height:1.55;font-size:14px;white-space:pre-wrap;overflow-wrap:anywhere;background:#eff4fc;margin-right:14px}.hild-message.user{background:#fff0e1;margin:0 0 10px 30px;color:#613814}.hild-book{display:block;background:white;color:#1e3c72;border:1px solid #abc4e5;border-radius:10px;padding:10px;text-align:left;width:100%;margin-top:10px;font-weight:600}
.hild-prompts{display:flex;gap:6px;flex-wrap:wrap;padding:0 14px 8px}.hild-prompts button{border:1px solid #dce5f3;background:white;border-radius:15px;font-size:11px;padding:6px 9px;color:#1e3c72}.hild-form{display:flex;gap:8px;padding:0 14px 10px}.hild-form input{min-width:0;font-size:14px}.hild-form .btn{padding:9px 13px}.hild-footer{padding:0 14px 10px;color:#63738b;font-size:11px}.hild-footer button{display:block;border:0;background:none;color:#245499;padding:4px 0;text-decoration:underline}#hildWidget button:focus-visible{outline:3px solid #ff823f;outline-offset:2px}
@media(max-width:600px){.hild-launch{right:12px;bottom:12px}.hild-overlay{padding:12px}.hild-panel{height:min(760px,calc(100vh - 24px));height:min(760px,calc(100dvh - 24px));border-radius:18px}.hild-stage #hildAvatar{height:138px;width:108px}.hild-stage{min-height:158px;padding:10px 12px 0;gap:8px}}
@media(max-height:650px){.hild-stage .hild-stage-books{display:none}.hild-stage-library{justify-content:center;padding:0 0 14px}.hild-stage{min-height:94px;padding-top:6px}.hild-stage #hildAvatar{height:88px;width:88px}}

/* Refined launcher: one clean outline, a framed avatar, and a clearer call to action. */
.hild-launch {
  right: 26px;
  bottom: 24px;
  min-height: 64px;
  gap: 12px;
  padding: 7px 22px 7px 8px;
  border: 2px solid #ff7a3d;
  border-radius: 999px;
  background: linear-gradient(135deg, #284f8b 0%, #1e3c72 100%);
  box-shadow: 0 10px 28px #102c5c52;
  font-size: 16px;
  letter-spacing: -.25px;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.hild-launch:hover {
  background: linear-gradient(135deg, #315e9f 0%, #24477f 100%);
  box-shadow: 0 13px 32px #102c5c66;
  transform: translateY(-2px);
}
.hild-launch:focus:not(:focus-visible) { outline: none; }
.hild-launch img {
  width: 50px;
  height: 50px;
  flex: 0 0 50px;
  padding: 2px;
  border: 1px solid #dceaff;
  border-radius: 50%;
  background: #fff;
  object-fit: contain;
  box-shadow: 0 3px 10px #102c5c33;
}
.hild-launch span { line-height: 1.15; white-space: nowrap; }
#hildWidget button:focus-visible { outline: 2px solid #ffd08a; outline-offset: 4px; }
@media(max-width:600px){
  .hild-launch{right:14px;bottom:14px;min-height:58px;padding:6px 16px 6px 7px;font-size:14px}
  .hild-launch img{width:44px;height:44px;flex-basis:44px;padding:2px}
}

/* Keep the assistant focused on free-form questions. */
#hildWidget .hild-prompts { display: none !important; }
.hild-messages { min-height: 0; }
.hild-form, .hild-footer { flex-shrink: 0; }
@media(max-height:500px){.hild-stage{display:none}}

/* The updated portraits share a square canvas, including the thinking poses. */
.hild-portrait{position:relative;align-self:flex-end;flex:0 0 176px;width:176px;height:176px}
.hild-stage .hild-portrait #hildAvatar,.hild-avatar-canvas{display:block;width:100%;height:100%;object-fit:contain}
.hild-portrait #hildAvatar.is-animated{visibility:hidden}
.hild-avatar-canvas{position:absolute;inset:0}
@media(max-width:600px){.hild-portrait{flex-basis:144px;width:144px;height:144px}}
@media(max-height:650px){.hild-portrait{flex-basis:88px;width:88px;height:88px}}
