.t4s-chat { font: 16px/1.5 Inter, Arial, sans-serif; color: #011627; padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px)); }
.t4s-chat [hidden][hidden] { display: none; }
.t4s-launch { position: fixed; z-index: 90; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); display: grid; place-items: center; width: 56px; height: 56px; padding: 0; border: 1px solid #011627; border-radius: 50%; background: #fff; box-shadow: 0 0 0 3px #fff, 0 4px 18px #01162726; cursor: pointer; }
.t4s-launch img { display: block; width: 48px; height: 48px; filter: brightness(0); }
.t4s-launch:hover { border-color: #0D11E7; box-shadow: 0 0 0 3px #90FCF9, 0 4px 18px #01162726; }
.t4s-dialog { position: fixed; inset: auto 16px calc(max(16px, env(safe-area-inset-bottom)) + var(--t4s-keyboard-bottom, 0px)) auto; margin: 0; padding: 0; width: min(390px, calc(100vw - 32px)); max-width: none; height: min(640px, calc(var(--t4s-view-height, 100dvh) - 32px)); max-height: calc(var(--t4s-view-height, 100dvh) - 32px); border: 1px solid #727272; border-radius: 16px; background: #fff; color: #171717; box-shadow: 0 8px 32px #0003; }
.t4s-dialog[open] { display: flex; flex-direction: column; }
.t4s-dialog::backdrop { background: #0003; }
.t4s-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px; border-bottom: 1px solid #d6e1e7; background: #011627; color: #fff; }
.t4s-heading h2 { margin: 0; font-size: 21px; line-height: 1.3; max-width: 18ch; }
.t4s-heading p { margin: 3px 0 0; color: #90FCF9; font-size: 13px; }
.t4s-heading > div { min-width: 0; overflow-wrap: anywhere; }
.t4s-welcome { margin: 4px 0 12px; max-width: 20ch; font: 700 26px/1.25 Manrope, Inter, sans-serif; letter-spacing: -.025em; }
.t4s-privacy { color: #555; font-size: 13px; }
.t4s-dialog [data-start] { background: #0D11E7; border-color: #0D11E7; color: #fff; width: 100%; margin: 4px 0 16px; }
.t4s-scroll { flex: 1; min-height: 128px; box-sizing: border-box; overflow-y: auto; padding: 16px; overflow-wrap: anywhere; }
.t4s-chat button, .t4s-chat summary, .t4s-tools a { min-height: 44px; }
.t4s-dialog button { font: inherit; line-height: 1.3; padding: 10px 14px; border: 1px solid #727272; border-radius: 8px; background: #fff; color: #171717; cursor: pointer; }
.t4s-dialog button:disabled { cursor: wait; opacity: .65; }
.t4s-chat :focus-visible { outline: 3px solid #0D11E7; outline-offset: 3px; }
.t4s-heading :focus-visible { outline-color: #90FCF9; }
.t4s-chat a { display: inline-flex; align-items: center; min-height: 44px; color: #0000a8; text-decoration: underline; }
.t4s-chat summary { display: list-item; padding: 10px 0; cursor: pointer; }
.t4s-tools { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; padding-block: 8px; }
.t4s-tools a { display: flex; align-items: center; padding: 8px; border: 1px solid #ddd; border-radius: 8px; }
.t4s-log > p, .t4s-reply { margin: 12px 0; padding: 12px; background: #f3f3f0; border-radius: 8px; }
.t4s-log > p { white-space: pre-wrap; }
.t4s-reply p { margin: 0 0 12px; }
.t4s-reply :is(h3, h4, h5, h6) { margin: 0 0 8px; font-size: 16px; line-height: 1.5; font-weight: 700; }
.t4s-reply ul { margin: 0 0 12px; padding-left: 20px; }
.t4s-reply li + li { margin-top: 6px; }
.t4s-reply > :last-child { margin-bottom: 0; }
.t4s-reply a { display: inline; min-height: 0; }
.t4s-log .t4s-user { background: #D6F6DD; }
.t4s-guide button { display: block; width: 100%; margin-block: 8px; text-align: left; }
.t4s-guide h3 { margin-block: 12px 6px; font-size: 18px; max-width: 28ch; }
.t4s-status { color: #555; font-size: 14px; }
.t4s-compose { padding: 12px 16px; border-top: 1px solid #ddd; }
.t4s-compose label { display: block; font-size: 14px; }
.t4s-compose textarea { display: block; width: 100%; box-sizing: border-box; min-height: 64px; max-height: 120px; resize: vertical; margin: 6px 0; padding: 8px; font: inherit; border: 1px solid #727272; border-radius: 6px; background: #fff; color: #171717; }
.t4s-compose button { background: #171717; color: #fff; }
.t4s-lead label, .t4s-lead dt { display: block; font-weight: 600; margin-block: 8px; }
.t4s-lead input, .t4s-lead textarea { width: 100%; box-sizing: border-box; min-height: 44px; padding: 8px; font: inherit; color: #171717; background: #fff; border: 1px solid #727272; border-radius: 6px; }
.t4s-lead textarea { max-height: 180px; resize: vertical; }
.t4s-lead dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.t4s-lead button { margin: 8px 4px 0 0; }
.t4s-compose p { margin: 8px 0 0; font-size: 12px; color: #555; }
@media (max-height: 500px) { .t4s-heading { padding: 8px 16px; } .t4s-compose textarea { min-height: 44px; } .t4s-compose p { display: none; } }
@media print { .t4s-chat { display: none; } }
