:root {
    --gtchat-green: #87be40;
    --gtchat-green-site: #8cc63f;
    --gtchat-green-light: #a8ef5a;
    --gtchat-green-deep: #5e8e28;
    --gtchat-black: #050705;
    --gtchat-dark: #0a0d0a;
    --gtchat-dark-2: #101510;
    --gtchat-text: #f6f8f4;
    --gtchat-muted: #aab4a5;
    --gtchat-border: rgba(140, 198, 63, .22);
    --gtchat-glow: rgba(140, 198, 63, .28);
}

.gtchat,
.gtchat * {
    box-sizing: border-box;
}

.gtchat[hidden],
.gtchat [hidden] {
    display: none !important;
}

.gtchat {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 2147483000;
    font-family: inherit, Arial, sans-serif;
    color: var(--gtchat-text);
    line-height: 1.4;
    -webkit-font-smoothing: antialiased;
}

/* ===== GymTonik runner mascot — cropped directly from the supplied official logo ===== */
.gtchat-mascot {
    position: relative;
    display: block;
    flex: 0 0 auto;
}

.gtchat-mascot-halo {
    position: absolute;
    inset: -8%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(140,198,63,.22) 0%, rgba(140,198,63,.07) 44%, transparent 72%);
    filter: blur(7px);
    opacity: .85;
    pointer-events: none;
}

.gtchat-mascot-crop {
    position: absolute;
    inset: 0;
    overflow: hidden;
    border-radius: inherit;
}

.gtchat-mascot-crop img {
    position: absolute;
    inset: 0;
    width: 100% !important;
    max-width: none !important;
    height: 100% !important;
    object-fit: contain;
    object-position: center;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
}

/* ===== Launcher — support assistant logic inspired by telco widgets, GymTonik identity ===== */
.gtchat-launcher {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    min-height: 68px;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
    outline: none;
    filter: drop-shadow(0 12px 24px rgba(0,0,0,.30));
}

.gtchat-launcher-copy {
    position: relative;
    display: grid;
    gap: 1px;
    min-width: 208px;
    padding: 10px 18px 10px 17px;
    border: 1px solid rgba(140,198,63,.18);
    border-radius: 18px 7px 7px 18px;
    background:
        radial-gradient(circle at 100% 50%, rgba(140,198,63,.12), transparent 50%),
        rgba(7,10,7,.96);
    box-shadow:
        0 11px 28px rgba(0,0,0,.28),
        0 0 20px rgba(140,198,63,.08),
        inset 0 1px 0 rgba(255,255,255,.04);
    text-align: left;
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.gtchat-launcher-copy::after {
    content: "";
    position: absolute;
    right: -8px;
    top: 50%;
    width: 16px;
    height: 16px;
    margin-top: -8px;
    border-top: 1px solid rgba(140,198,63,.18);
    border-right: 1px solid rgba(140,198,63,.18);
    background: #090c09;
    transform: rotate(45deg);
}

.gtchat-launcher-copy strong {
    position: relative;
    z-index: 1;
    color: var(--gtchat-green-light);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .055em;
}

.gtchat-launcher-copy span {
    position: relative;
    z-index: 1;
    color: #f3f6f0;
    font-size: 12.5px;
    font-weight: 700;
    white-space: nowrap;
}

.gtchat-mascot-launcher {
    width: 68px;
    height: 68px;
    border: 1px solid rgba(168,239,90,.44);
    border-radius: 50%;
    background:
        radial-gradient(circle at 38% 28%, rgba(168,239,90,.20), transparent 28%),
        linear-gradient(145deg, #111711, #050705 72%);
    box-shadow:
        0 0 0 5px rgba(140,198,63,.05),
        0 0 24px rgba(140,198,63,.23),
        0 14px 34px rgba(0,0,0,.36),
        inset 0 1px 0 rgba(255,255,255,.07);
    overflow: hidden;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.gtchat-mascot-launcher .gtchat-mascot-crop {
    inset: 6px 4px 4px 4px;
    border-radius: 50%;
}

.gtchat-launcher-status {
    position: absolute;
    right: 3px;
    bottom: 5px;
    width: 14px;
    height: 14px;
    border: 3px solid #070a07;
    border-radius: 50%;
    background: var(--gtchat-green-light);
    box-shadow: 0 0 12px rgba(168,239,90,.75);
}

.gtchat-launcher:hover .gtchat-mascot-launcher,
.gtchat-launcher:focus-visible .gtchat-mascot-launcher {
    transform: translateY(-2px) scale(1.025);
    border-color: rgba(168,239,90,.72);
    box-shadow:
        0 0 0 6px rgba(140,198,63,.07),
        0 0 32px rgba(140,198,63,.34),
        0 16px 36px rgba(0,0,0,.38),
        inset 0 1px 0 rgba(255,255,255,.09);
}

.gtchat-launcher:hover .gtchat-launcher-copy,
.gtchat-launcher:focus-visible .gtchat-launcher-copy {
    transform: translateX(-2px);
    border-color: rgba(140,198,63,.34);
    box-shadow: 0 13px 30px rgba(0,0,0,.32), 0 0 24px rgba(140,198,63,.12), inset 0 1px 0 rgba(255,255,255,.05);
}

.gtchat-launcher:focus-visible {
    outline: 2px solid rgba(168,239,90,.72);
    outline-offset: 5px;
    border-radius: 999px;
}

/* Open state: the launcher gets out of the way once the full assistant panel is visible. */
.gtchat[data-state="open"] .gtchat-launcher {
    display: none;
}

/* ===== Panel ===== */
.gtchat-panel {
    position: absolute;
    right: 0;
    bottom: 82px;
    width: min(404px, calc(100vw - 32px));
    height: min(650px, calc(100vh - 122px));
    min-height: 470px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(140,198,63,.25);
    border-radius: 27px;
    background:
        radial-gradient(circle at 88% -5%, rgba(140,198,63,.13), transparent 30%),
        radial-gradient(circle at 8% 100%, rgba(94,142,40,.07), transparent 38%),
        linear-gradient(155deg, #0d120d 0%, #050705 56%, #080b08 100%);
    box-shadow:
        0 30px 85px rgba(0,0,0,.48),
        0 0 0 1px rgba(255,255,255,.025),
        0 0 42px rgba(140,198,63,.13),
        inset 0 1px 0 rgba(255,255,255,.045);
    transform-origin: right bottom;
    animation: gtchat-open .22s cubic-bezier(.2,.82,.26,1) both;
}

.gtchat[data-state="open"] .gtchat-panel {
    bottom: 0;
}

.gtchat-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(120deg, transparent 0 35%, rgba(168,239,90,.028) 46%, transparent 57% 100%);
    background-size: 240% 100%;
    animation: gtchat-panel-sheen 14s ease-in-out infinite;
    z-index: 0;
}

.gtchat-header,
.gtchat-sessionbar,
.gtchat-body,
.gtchat-composer,
.gtchat-accent-line {
    position: relative;
    z-index: 1;
}

.gtchat-header {
    min-height: 76px;
    display: grid;
    grid-template-columns: 48px 1fr 38px;
    gap: 11px;
    align-items: center;
    padding: 12px 13px 11px 15px;
    background: rgba(4,7,4,.72);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.gtchat-mascot-header {
    width: 48px;
    height: 48px;
    border: 1px solid rgba(140,198,63,.32);
    border-radius: 16px;
    background: linear-gradient(145deg, rgba(140,198,63,.13), rgba(255,255,255,.018));
    box-shadow: 0 0 20px rgba(140,198,63,.13), inset 0 1px 0 rgba(255,255,255,.05);
    overflow: hidden;
}

.gtchat-mascot-header .gtchat-mascot-crop {
    inset: 1px 0 0;
    border-radius: 13px;
}

.gtchat-mascot-header .gtchat-mascot-crop img {
    transform: scale(1.10);
    filter: brightness(1.16) contrast(1.08) drop-shadow(0 0 5px rgba(168,239,90,.20));
}

.gtchat-headings {
    min-width: 0;
    line-height: 1.05;
}

.gtchat-headings strong {
    display: block;
    color: #fff;
    font-size: 16px;
    font-weight: 900;
    letter-spacing: -.015em;
}

.gtchat-headings span {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 5px;
    color: var(--gtchat-green-light);
    font-size: 9.5px;
    font-weight: 850;
    letter-spacing: .125em;
}

.gtchat-headings i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--gtchat-green-light);
    box-shadow: 0 0 8px var(--gtchat-green);
    animation: gtchat-status 2.6s ease-in-out infinite;
}

.gtchat-close {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 1px solid rgba(255,255,255,.07);
    border-radius: 12px;
    color: #cbd3c8;
    background: rgba(255,255,255,.035);
    cursor: pointer;
    transition: .18s ease;
}

.gtchat-close:hover,
.gtchat-close:focus-visible {
    color: var(--gtchat-green-light);
    border-color: rgba(140,198,63,.27);
    background: rgba(140,198,63,.075);
    outline: none;
}

.gtchat-close svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.gtchat-accent-line {
    height: 2px;
    background: rgba(255,255,255,.025);
    overflow: hidden;
}

.gtchat-accent-line span {
    display: block;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(140,198,63,.30), rgba(168,239,90,.95), rgba(140,198,63,.30), transparent);
    box-shadow: 0 0 16px rgba(140,198,63,.42);
    animation: gtchat-line 4.8s ease-in-out infinite;
}

/* ===== Welcome ===== */
.gtchat-body {
    flex: 1;
    min-height: 0;
}

.gtchat-welcome {
    height: 100%;
    overflow-y: auto;
    padding: 28px 28px 23px;
    text-align: center;
    scrollbar-width: thin;
    scrollbar-color: rgba(140,198,63,.28) transparent;
}

.gtchat-hero-mark {
    position: relative;
    width: 126px;
    height: 126px;
    margin: 0 auto 20px;
    display: grid;
    place-items: center;
}

.gtchat-hero-mark::before,
.gtchat-hero-mark::after {
    content: "";
    position: absolute;
    border-radius: 34px;
    pointer-events: none;
}

.gtchat-hero-mark::before {
    inset: 4px;
    border: 1px solid rgba(168,239,90,.23);
    background:
        radial-gradient(circle at 35% 25%, rgba(168,239,90,.16), transparent 34%),
        linear-gradient(145deg, rgba(140,198,63,.10), rgba(255,255,255,.01));
    box-shadow: 0 0 0 9px rgba(140,198,63,.024), 0 18px 42px rgba(0,0,0,.30), 0 0 34px rgba(140,198,63,.13), inset 0 1px 0 rgba(255,255,255,.05);
    transform: rotate(7deg);
}

.gtchat-hero-mark::after {
    inset: -7px;
    background: radial-gradient(circle, rgba(140,198,63,.14), transparent 67%);
    filter: blur(8px);
    animation: gtchat-breathe 4.2s ease-in-out infinite;
}

.gtchat-mascot-hero {
    width: 108px;
    height: 108px;
    border-radius: 29px;
    z-index: 2;
    overflow: hidden;
}

.gtchat-mascot-hero .gtchat-mascot-crop {
    inset: 3px 0 0;
    border-radius: 28px;
}

.gtchat-kicker {
    margin-bottom: 8px;
    color: var(--gtchat-green);
    font-size: 9.5px;
    font-weight: 900;
    letter-spacing: .17em;
}

.gtchat-welcome h2 {
    margin: 0 0 11px;
    color: #fff;
    font-size: 28px;
    line-height: 1.04;
    font-weight: 900;
    letter-spacing: -.035em;
}

.gtchat-welcome > p:not(.gtchat-privacy) {
    margin: 0 auto 21px;
    max-width: 320px;
    color: #bcc5b8;
    font-size: 13.5px;
    line-height: 1.55;
}

.gtchat-start {
    width: 100%;
    min-height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 13px 18px;
    border: 1px solid rgba(255,255,255,.17);
    border-radius: 999px;
    color: #071006;
    background: linear-gradient(135deg, var(--gtchat-green-light), var(--gtchat-green-site));
    box-shadow: 0 10px 30px rgba(140,198,63,.22), inset 0 1px 0 rgba(255,255,255,.28);
    cursor: pointer;
    font-size: 12.5px;
    font-weight: 950;
    letter-spacing: .035em;
    transition: .18s ease;
}

.gtchat-start:hover,
.gtchat-start:focus-visible {
    transform: translateY(-1px);
    filter: brightness(1.07);
    box-shadow: 0 14px 34px rgba(140,198,63,.32);
    outline: none;
}

.gtchat-start:disabled {
    opacity: .65;
    cursor: wait;
    transform: none;
}

.gtchat-start svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.gtchat-privacy {
    margin: 16px auto 0 !important;
    max-width: 326px;
    color: #a5afa1 !important;
    font-size: 10.5px !important;
    line-height: 1.52 !important;
}

.gtchat-gate {
    margin: 0 0 18px;
    padding: 13px;
    border: 1px solid rgba(140,198,63,.14);
    border-radius: 16px;
    background: rgba(0,0,0,.18);
}

.gtchat-gate-label {
    margin-bottom: 8px;
    color: #aeb8aa;
    font-size: 10.5px;
    font-weight: 700;
}

#gtchat-turnstile {
    display: flex;
    justify-content: center;
    min-height: 65px;
}

.gtchat-gate-error {
    margin: 12px 0 0;
    padding: 10px 12px;
    border: 1px solid rgba(255,110,110,.20);
    border-radius: 12px;
    background: rgba(120,20,20,.12);
    color: #f2b4b4;
    font-size: 11px;
    line-height: 1.45;
}

/* ===== Session / history toolbar ===== */
.gtchat-sessionbar {
    position: relative;
    z-index: 2;
    flex: 0 0 auto;
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding: 6px 12px;
    border-bottom: 1px solid rgba(140,198,63,.08);
    background: rgba(4,7,4,.56);
}

.gtchat-history-slot {
    flex: 1 1 auto;
    min-width: 0;
}

.gtchat-history-select {
    width: 100%;
    min-height: 30px;
    padding: 5px 28px 5px 10px;
    border: 1px solid rgba(140,198,63,.16);
    border-radius: 10px;
    color: #cbd3c8;
    background: rgba(255,255,255,.035);
    font: inherit;
    font-size: 10.5px;
}

.gtchat-new-chat {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 30px;
    padding: 5px 10px;
    border: 1px solid rgba(140,198,63,.20);
    border-radius: 999px;
    color: var(--gtchat-green-light);
    background: rgba(140,198,63,.055);
    cursor: pointer;
    font: inherit;
    font-size: 10.5px;
    font-weight: 800;
    white-space: nowrap;
    transition: .18s ease;
}

.gtchat-new-chat:hover,
.gtchat-new-chat:focus-visible {
    color: #071006;
    background: var(--gtchat-green-site);
    border-color: rgba(168,239,90,.55);
    outline: none;
}

.gtchat-new-chat svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
}

/* ===== Conversation ===== */
.gtchat-conversation {
    height: 100%;
}

.gtchat-messages {
    height: 100%;
    overflow-y: auto;
    padding: 18px 16px 28px;
    scrollbar-width: thin;
    scrollbar-color: rgba(140,198,63,.28) transparent;
}

.gtchat-msg {
    display: flex;
    margin: 0 0 12px;
    animation: gtchat-msg-in .18s ease-out both;
}

.gtchat-msg-user {
    justify-content: flex-end;
}

.gtchat-bubble {
    max-width: 84%;
    padding: 11px 13px;
    border-radius: 16px;
    font-size: 13.5px;
    line-height: 1.48;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.gtchat-msg-bot .gtchat-bubble {
    color: #eef2eb;
    background: linear-gradient(155deg, rgba(255,255,255,.064), rgba(255,255,255,.025));
    border: 1px solid rgba(140,198,63,.14);
    border-top-left-radius: 6px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.025);
}

.gtchat-msg-user .gtchat-bubble {
    color: #071006;
    background: linear-gradient(135deg, var(--gtchat-green-light), var(--gtchat-green-site));
    border: 1px solid rgba(255,255,255,.18);
    border-bottom-right-radius: 6px;
    font-weight: 650;
}

.gtchat-action-row {
    margin-top: -4px;
}

.gtchat-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 13px;
    border: 1px solid rgba(140,198,63,.30);
    border-radius: 999px;
    color: var(--gtchat-green-light) !important;
    background: rgba(140,198,63,.075);
    box-shadow: 0 0 18px rgba(140,198,63,.08);
    text-decoration: none !important;
    font-size: 12px;
    font-weight: 850;
    transition: .18s ease;
}

.gtchat-action::after {
    content: "→";
    font-size: 15px;
}

.gtchat-action:hover,
.gtchat-action:focus-visible {
    transform: translateY(-1px);
    color: #071006 !important;
    background: var(--gtchat-green-site);
    box-shadow: 0 8px 22px rgba(140,198,63,.22);
    outline: none;
}

.gtchat-typing {
    position: absolute;
    left: 16px;
    bottom: 9px;
    display: flex;
    align-items: center;
    gap: 4px;
    max-width: calc(100% - 32px);
    padding: 9px 11px;
    border: 1px solid rgba(140,198,63,.12);
    border-radius: 14px;
    background: rgba(6,9,6,.94);
    box-shadow: 0 8px 22px rgba(0,0,0,.20);
}

.gtchat-typing span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--gtchat-green-site);
    animation: gtchat-dot 1.15s infinite ease-in-out;
}

.gtchat-typing span:nth-child(2) { animation-delay: .12s; }
.gtchat-typing span:nth-child(3) { animation-delay: .24s; }

.gtchat-typing em {
    margin-left: 5px;
    color: #8f998c;
    font-size: 10.5px;
    font-style: normal;
}

/* ===== Composer ===== */
.gtchat-composer {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 44px;
    gap: 8px;
    align-items: end;
    padding: 11px 12px 13px;
    border-top: 1px solid rgba(140,198,63,.11);
    background: rgba(3,5,3,.84);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.gtchat-composer textarea {
    width: 100%;
    min-height: 44px;
    max-height: 112px;
    resize: none;
    overflow-y: auto;
    padding: 12px 50px 12px 14px;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 16px;
    outline: none;
    color: #f4f7f2;
    background: rgba(255,255,255,.045);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.02);
    font: inherit;
    font-size: 13.5px;
    line-height: 1.42;
    transition: .18s ease;
}

.gtchat-composer textarea::placeholder {
    color: #747f71;
}

.gtchat-composer textarea:focus {
    border-color: rgba(140,198,63,.38);
    box-shadow: 0 0 0 3px rgba(140,198,63,.055), inset 0 1px 0 rgba(255,255,255,.025);
}

.gtchat-composer textarea:disabled {
    opacity: .58;
}

.gtchat-send {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 14px;
    color: #071006;
    background: linear-gradient(135deg, var(--gtchat-green-light), var(--gtchat-green-site));
    cursor: pointer;
    box-shadow: 0 8px 22px rgba(140,198,63,.18);
    transition: .18s ease;
}

.gtchat-send:hover,
.gtchat-send:focus-visible {
    transform: translateY(-1px);
    filter: brightness(1.08);
    box-shadow: 0 10px 26px rgba(140,198,63,.28);
    outline: none;
}

.gtchat-send:disabled {
    opacity: .42;
    cursor: not-allowed;
    transform: none;
}

.gtchat-send svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.gtchat-count {
    position: absolute;
    right: 68px;
    bottom: 18px;
    color: #677164;
    font-size: 9px;
    pointer-events: none;
}

@keyframes gtchat-open {
    from { opacity: 0; transform: translateY(12px) scale(.97); }
    to { opacity: 1; transform: none; }
}

@keyframes gtchat-msg-in {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: none; }
}

@keyframes gtchat-breathe {
    0%,100% { opacity: .32; transform: scale(.97); }
    50% { opacity: .62; transform: scale(1.045); }
}

@keyframes gtchat-status {
    0%,100% { opacity: .55; box-shadow: 0 0 5px var(--gtchat-green-site); }
    50% { opacity: 1; box-shadow: 0 0 11px var(--gtchat-green-light); }
}

@keyframes gtchat-line {
    0%,100% { transform: translateX(-16%); opacity: .38; }
    50% { transform: translateX(16%); opacity: .92; }
}

@keyframes gtchat-dot {
    0%,60%,100% { transform: translateY(0); opacity: .35; }
    30% { transform: translateY(-4px); opacity: 1; }
}

@keyframes gtchat-panel-sheen {
    0%,20% { background-position: 125% 0; opacity: .30; }
    48% { background-position: 50% 0; opacity: .72; }
    78%,100% { background-position: -25% 0; opacity: .24; }
}

@media (max-width: 680px) {
    html.gtchat-mobile-open,
    body.gtchat-mobile-open {
        overflow: hidden !important;
        overscroll-behavior: none !important;
    }

    .gtchat {
        right: 10px;
        /* Keep the closed assistant above common mobile sticky controls/coupon bars. */
        bottom: max(84px, calc(env(safe-area-inset-bottom) + 72px));
    }

    .gtchat-launcher-copy {
        display: none;
    }

    .gtchat-mascot-launcher {
        width: 62px;
        height: 62px;
    }

    .gtchat-launcher-status {
        right: 2px;
        bottom: 3px;
    }

    /*
     * True mobile chat viewport.
     * JS updates --gtchat-vv-height / --gtchat-vv-top from VisualViewport,
     * so the composer stays above the software keyboard on Android/iOS.
     */
    .gtchat-panel,
    .gtchat[data-state="open"] .gtchat-panel {
        position: fixed;
        top: calc(var(--gtchat-vv-top, 0px) + 4px);
        left: 4px;
        right: 4px;
        bottom: auto !important;
        width: auto;
        height: calc(var(--gtchat-vv-height, 100dvh) - 8px);
        max-height: calc(var(--gtchat-vv-height, 100dvh) - 8px);
        min-height: 0;
        border-radius: 20px;
        transform-origin: center bottom;
    }

    .gtchat-header {
        flex: 0 0 auto;
        min-height: 68px;
        grid-template-columns: 43px 1fr 40px;
        gap: 9px;
        padding: 10px 11px;
    }

    .gtchat-close {
        width: 40px;
        height: 40px;
    }

    .gtchat-mascot-header {
        width: 43px;
        height: 43px;
        border-radius: 14px;
    }

    .gtchat-headings strong {
        font-size: 15px;
    }

    .gtchat-headings span {
        font-size: 8.8px;
    }

    .gtchat-sessionbar {
        min-height: 39px;
        padding: 5px 10px;
    }

    .gtchat-new-chat {
        min-height: 30px;
        padding: 5px 9px;
        font-size: 10px;
    }

    .gtchat-body {
        flex: 1 1 auto;
        min-height: 0;
        overflow: hidden;
    }

    .gtchat-welcome {
        height: 100%;
        padding: 20px 18px max(18px, env(safe-area-inset-bottom));
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
    }

    .gtchat-hero-mark {
        width: 106px;
        height: 106px;
        margin-bottom: 14px;
    }

    .gtchat-mascot-hero {
        width: 92px;
        height: 92px;
    }

    .gtchat-welcome h2 {
        font-size: 24px;
    }

    .gtchat-conversation {
        height: 100%;
        min-height: 0;
        overflow: hidden;
    }

    .gtchat-messages {
        height: 100%;
        min-height: 0;
        overflow-y: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
        padding: 16px 14px 22px;
        scroll-padding-bottom: 22px;
    }

    .gtchat-bubble {
        max-width: 88%;
        font-size: 14px;
    }

    .gtchat-composer {
        flex: 0 0 auto;
        grid-template-columns: minmax(0, 1fr) 48px;
        gap: 8px;
        padding: 9px 10px max(9px, env(safe-area-inset-bottom));
    }

    .gtchat-composer textarea {
        min-height: 48px;
        max-height: 104px;
        /* Prevent Safari/iOS input zoom and improve touch readability. */
        font-size: 16px;
        padding: 12px 48px 12px 13px;
    }

    .gtchat-send {
        width: 48px;
        height: 48px;
        border-radius: 15px;
    }

    .gtchat-count {
        right: 70px;
        bottom: max(16px, calc(env(safe-area-inset-bottom) + 7px));
    }

    .gtchat[data-state="open"] .gtchat-launcher {
        display: none;
    }
}

@media (max-height: 620px) and (min-width: 681px) {
    .gtchat-panel {
        height: calc(100vh - 105px);
        min-height: 430px;
    }

    .gtchat-welcome {
        padding-top: 18px;
    }

    .gtchat-hero-mark {
        width: 96px;
        height: 96px;
        margin-bottom: 12px;
    }

    .gtchat-mascot-hero {
        width: 82px;
        height: 82px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .gtchat *,
    .gtchat *::before,
    .gtchat *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}

/* Safe basic Markdown inside AI replies. DOM is built with text nodes only; no raw HTML is injected. */
.gtchat-msg-bot .gtchat-bubble .gtchat-md-line + .gtchat-md-line {
    margin-top: 5px;
}

.gtchat-msg-bot .gtchat-bubble strong {
    color: #ffffff;
    font-weight: 800;
}

.gtchat-msg-bot .gtchat-bubble em {
    color: rgba(255, 255, 255, 0.88);
    font-style: italic;
}

.gtchat-msg-bot .gtchat-bubble .gtchat-md-list {
    margin: 7px 0 3px 1.15em;
    padding: 0;
}

.gtchat-msg-bot .gtchat-bubble .gtchat-md-list li {
    margin: 3px 0;
    padding-left: 2px;
}
