/* The floating chat button and its panel. */
.tutor-launch { position: fixed; right: 20px; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); z-index: 30; font-family: system-ui, -apple-system, 'Segoe UI', sans-serif; }
.tutor-launch__button { display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 0 22px 0 18px; border-radius: 28px; background: var(--pop); color: var(--ink); box-shadow: 0 8px 24px rgb(23 20 46 / .28); font-size: 16px; font-weight: 750; text-decoration: none; transition: transform .15s ease, box-shadow .15s ease; }
.tutor-launch__button:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgb(23 20 46 / .34); color: var(--ink); }
.tutor-launch__button:focus-visible { outline: 3px solid var(--indigo); outline-offset: 3px; }
.tutor-launch__button svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.tutor-launch__panel { position: absolute; right: 0; bottom: 72px; width: 400px; height: min(640px, calc(100dvh - 120px)); overflow: hidden; border: 1px solid var(--rule); border-radius: 14px; background: var(--paper); box-shadow: 0 20px 60px rgb(23 20 46 / .35); animation: tutor-rise .18s ease; }
.tutor-launch__panel[hidden] { display: none; }
.tutor-launch__panel iframe { display: block; width: 100%; height: 100%; border: 0; }
/* The chat inside draws its own close button; this one covers the moment before it loads. */
.tutor-launch__close { position: absolute; top: 8px; right: 8px; z-index: -1; width: 40px; height: 40px; border: 0; background: none; font-size: 28px; cursor: pointer; }
@keyframes tutor-rise { from { opacity: 0; transform: translateY(10px); } }
@media (max-width: 560px) {
    .tutor-launch { right: 14px; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); }
    .tutor-launch__button { width: 56px; justify-content: center; padding: 0; }
    .tutor-launch__button span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
    .tutor-launch__panel { position: fixed; inset: 0; width: auto; height: 100dvh; border: 0; border-radius: 0; }
    body.tutor-open { overflow: hidden; }
}
@media (prefers-reduced-motion: reduce) { .tutor-launch__panel { animation: none; } .tutor-launch__button { transition: none; } }
@media print { .tutor-launch { display: none; } }
