.meryl-launcher { position: fixed; right: 24px; bottom: 24px; z-index: 10030; display: flex; align-items: center; gap: 10px; border: 1px solid #d3e5ff; border-radius: 100px; padding: 12px 17px 12px 12px; background: #10243c; color: #fff; box-shadow: 0 8px 30px #06172f35; cursor: pointer; font: 750 13px/1.2 system-ui,sans-serif; }
.meryl-mark { display: inline-grid; place-items: center; flex: 0 0 32px; width: 32px; height: 32px; border-radius: 11px; background: linear-gradient(145deg,#d9f0ff,#c6c0ff); color: #122844; font-size: 22px; font-weight: 800; }
.meryl-launcher small { display: block; margin-top: 4px; color: #d3e5fa; font-size: 10px; font-weight: 500; }
.meryl-launcher:focus-visible,.meryl-panel button:focus-visible,.meryl-panel a:focus-visible { outline: 3px solid #739fff; outline-offset: 3px; }
.meryl-launcher[hidden],.meryl-panel[hidden],.meryl-panel [hidden] { display: none !important; }
.meryl-panel { position: fixed; z-index: 10040; right: 24px; bottom: 24px; width: min(414px,calc(100vw - 32px)); height: min(700px,calc(100dvh - 48px)); display: flex; flex-direction: column; box-sizing: border-box; background: #f8fbff; color: #172940; border: 1px solid #bdcee3; border-radius: 22px; box-shadow: 0 24px 90px #06172f45; overflow: hidden; text-align: left; font: 13px/1.55 system-ui,-apple-system,sans-serif; }
.meryl-panel * { box-sizing: border-box; }
.meryl-header { display: flex; gap: 11px; align-items: center; padding: 18px 18px 15px; background: linear-gradient(120deg,#10243c,#263758); color: #fff; }
.meryl-heading { flex: 1; min-width: 0; }
.meryl-heading h2 { color: #fff !important; margin: 0 !important; font-size: 17px !important; line-height: 1.35 !important; font-weight: 800; }
.meryl-heading p { color: #d5e6f9 !important; font-size: 11px; margin: 3px 0 0 !important; }
.meryl-close { border: 1px solid #ffffff35 !important; border-radius: 8px; color: #fff !important; background: #ffffff12 !important; padding: 5px 10px !important; min-height: 32px; cursor: pointer; font-size: 18px; line-height: 1; }
.meryl-privacy { padding: 10px 16px; margin: 0; font-size: 10px; line-height: 1.5; color: #445d77; background: #edf3fc; border-bottom: 1px solid #dce6f4; }
.meryl-transcript { flex: 1; min-height: 90px; overflow-y: auto; padding: 18px 16px; overscroll-behavior: contain; }
.meryl-message { margin: 0 0 15px; max-width: 100%; }
.meryl-message-label { font-weight: 750; font-size: 10px; color: #5c6d82; display: block; margin: 0 0 4px; }
.meryl-message p { margin: 0; padding: 12px 14px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 12px; line-height: 1.7; border: 1px solid #dbe5f2; border-radius: 14px 14px 14px 3px; background: #fff; color: #22394f !important; }
.meryl-message[data-role="user"] { margin-left: 30px; }
.meryl-message[data-role="user"] p { background: #173c66; color: #fff !important; border-color: #173c66; border-radius: 14px 14px 3px 14px; }
.meryl-message[data-role="system"] p { background: #edf4fe; color: #27496b !important; font-size: 11px; }
.meryl-links,.meryl-message-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 8px; }
.meryl-links a,.meryl-message-actions button { display: inline-flex; padding: 8px 10px; border: 1px solid #b4cbe7; border-radius: 8px; background: #f4f8ff; color: #143f6c !important; text-decoration: none; font-size: 11px; font-weight: 750; cursor: pointer; }
.meryl-actionbar { padding: 9px 14px; display: flex; flex-wrap: wrap; gap: 7px; border-top: 1px solid #dfe8f4; }
.meryl-actionbar button { border: 1px solid #bfd1e6; border-radius: 8px; background: #fff; color: #24466b; font: 650 10px/1.4 system-ui,sans-serif; cursor: pointer; padding: 8px 10px; }
.meryl-actionbar button:disabled,.meryl-composer button:disabled { opacity: .55; cursor: wait; }
.meryl-setup { padding: 12px 14px; border-top: 1px solid #dbe5f2; background: #eef4fd; max-height: min(390px,55dvh); overflow-y: auto; }
.meryl-setup h3 { color: #17324f !important; font-size: 13px !important; margin: 0 0 6px !important; }
.meryl-setup p { color: #38516e !important; font-size: 10px; margin: 4px 0 10px; }
.meryl-setup-controls { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; }
.meryl-setup label { display: block; color: #24425f; font-size: 10px; font-weight: 650; }
.meryl-setup select { display: block; width: 100%; min-width: 0; margin-top: 4px; padding: 7px; background: #fff; border: 1px solid #b8cce4; color: #18344f; border-radius: 7px; font: 11px system-ui,sans-serif; }
.meryl-setup label:last-child { grid-column: 1/-1; }
.meryl-setup-buttons { display: flex; flex-wrap: wrap; gap: 7px; margin: 9px 0 0; }
.meryl-setup button { background: #173c66; color: #fff; border: 1px solid #173c66; border-radius: 7px; padding: 7px 9px; font: 700 10px system-ui,sans-serif; cursor: pointer; }
.meryl-setup button.secondary { background: #fff; color: #173c66; }
.meryl-setup button:disabled { opacity: .55; cursor: wait; }
.meryl-setup pre { max-width: 100%; max-height: 190px; overflow: auto; padding: 12px; margin: 10px 0 0; background: #0d2038; color: #e3f0ff; border-radius: 8px; font: 10px/1.65 ui-monospace,monospace; white-space: pre; }
.meryl-setup code { color: inherit; background: transparent; padding: 0; }
.meryl-setup-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 9px; }
.meryl-setup-links a { color: #124c86; text-decoration: underline; font-size: 11px; font-weight: 750; }
.meryl-status { min-height: 25px; padding: 2px 16px 6px; margin: 0; color: #4a617c !important; font-size: 10px; line-height: 1.4; }
.meryl-composer { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: end; gap: 8px; padding: 10px 14px 14px; border-top: 1px solid #dbe5f2; }
.meryl-composer textarea { resize: none; min-height: 56px; max-height: 140px; width: 100%; padding: 10px 12px; margin: 0; border: 1px solid #b6c9df; border-radius: 10px; background: #fff; color: #172e48; font: 12px/1.5 system-ui,sans-serif; }
.meryl-composer button { height: 42px; padding: 0 14px; border: 1px solid #173c66; border-radius: 10px; background: #173c66; color: #fff; font: 750 12px system-ui,sans-serif; cursor: pointer; }
.meryl-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media(max-width: 540px) {
  .meryl-launcher { bottom: 16px; right: 16px; padding: 10px 13px 10px 10px; }
  .meryl-panel { right: 8px; bottom: 8px; width: calc(100vw - 16px); height: min(740px,calc(100dvh - 16px)); border-radius: 18px; }
  .meryl-header { padding: 14px; }
  .meryl-transcript { padding: 14px; }
}
@media(prefers-reduced-motion: reduce) { .meryl-panel *, .meryl-launcher { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
