.alma-assistant {
    --chat-ink: #162d4d;
    --chat-muted: #465c75;
    --chat-blue: #204a98;
    --chat-border: #d5dfec;
    box-sizing: border-box;
    position: fixed;
    right: max(12px, env(safe-area-inset-right));
    bottom: max(12px, env(safe-area-inset-bottom));
    z-index: 60;
    font: 15px/1.45 "Segoe UI", Arial, sans-serif;
    color: var(--chat-ink);
    color-scheme: light;
}
.alma-assistant *, .alma-assistant *::before, .alma-assistant *::after { box-sizing: inherit; }
.alma-assistant [hidden] { display: none !important; }
.alma-assistant button {
    border: 0; border-radius: 10px; background: var(--chat-blue); color: #fff;
    font: inherit; font-weight: 650; padding: 9px 13px; min-height: 44px; cursor: pointer;
}
.alma-assistant button:disabled { opacity: .65; cursor: wait; }
.alma-assistant :focus-visible { outline: 2px solid #1979b2; outline-offset: 2px; }
.alma-assistant .alma-chat-launch {
    display: flex; align-items: center; gap: 8px; border-radius: 24px;
    box-shadow: 0 5px 24px #122d5850; padding-inline: 16px;
}
#alma-chat {
    position: absolute; right: 0; bottom: 0;
    width: min(390px, calc(100vw - 28px));
    height: min(560px, 80vh); max-height: calc(100dvh - 30px);
    display: flex; flex-direction: column; background: #fff;
    border: 1px solid var(--chat-border); border-radius: 18px;
    box-shadow: 0 12px 42px #122d5845; overflow: hidden;
}
#alma-chat .alma-chat-header {
    flex: none; display: flex; align-items: center; justify-content: space-between;
    background: #142b49; color: #fff; padding: 7px 12px 7px 15px;
}
.alma-chat-brand { display: flex; align-items: center; gap: 9px; }
.alma-chat-brand > span { color: #a6e0f2; }
#alma-chat .alma-chat-close { background: transparent; padding: 0; width: 44px; font-size: 24px; }
#alma-chat .alma-chat-view { flex: 1; min-height: 0; display: flex; flex-direction: column; }
#alma-chat .alma-chat-history, #alma-chat .alma-chat-secondary {
    overflow: auto; overscroll-behavior: contain; padding: 14px;
}
#alma-chat .alma-chat-history { flex: 1; min-height: 0; background: #f5f8fc; }
#alma-chat p { margin: 0 0 10px; color: var(--chat-muted); font-size: 14px; }
#alma-chat h2 { color: var(--chat-ink); margin: 8px 0 12px; font: 700 19px/1.3 "Segoe UI", Arial, sans-serif; }
#alma-chat .alma-chat-welcome { background: #fff; border: 1px solid var(--chat-border); border-radius: 12px; padding: 13px; }
#alma-chat .alma-chat-starters { display: grid; gap: 8px; margin-top: 10px; }
#alma-chat .alma-chat-welcome strong { font-size: 17px; }
#alma-chat .alma-chat-suggestion { color: var(--chat-blue); background: #eaf2fd; text-align: left; }
#alma-chat .alma-chat-suggestion:hover { background: #deebfb; }
#alma-chat .alma-chat-log { display: grid; gap: 9px; }
#alma-chat .alma-chat-message {
    margin: 0; padding: 9px 11px; border-radius: 12px; white-space: pre-wrap;
    overflow-wrap: anywhere; color: var(--chat-ink); background: #fff;
    border: 1px solid var(--chat-border); max-width: 95%; justify-self: start;
}
#alma-chat .alma-chat-message[data-role="visitor"] { justify-self: end; background: #e3edfb; border-color: transparent; }
#alma-chat .alma-chat-message a { display: inline-block; margin-top: 6px; color: var(--chat-blue); text-decoration: underline; }
#alma-chat .alma-chat-choices {
    display: flex; flex-wrap: wrap; gap: 7px; margin-top: 9px;
}
#alma-chat .alma-chat-choices button {
    color: var(--chat-blue); background: #eef4fc; border: 1px solid #c4d4ea;
    padding: 7px 10px; text-align: left; white-space: normal;
}
#alma-chat .alma-chat-choices button:hover { background: #deebfb; }
#alma-chat .alma-chat-primary-choice button {
    background: var(--chat-blue); border-color: var(--chat-blue); color: #fff;
}
#alma-chat .alma-chat-primary-choice button:hover { background: #183d82; }
#alma-chat .alma-chat-footer { flex: none; padding: 10px 13px 5px; border-top: 1px solid var(--chat-border); background: #fff; }
#alma-chat form { margin: 0; }
#alma-chat .alma-chat-question { display: grid; grid-template-columns: minmax(0,1fr) 44px; align-items: end; gap: 7px; }
#alma-chat .alma-chat-question button { font-size: 22px; padding: 0; }
#alma-chat input, #alma-chat textarea {
    display: block; width: 100%; min-width: 0; padding: 9px; margin: 0;
    border: 1px solid #a9bfd7; border-radius: 9px; font: 400 16px/1.35 "Segoe UI", Arial, sans-serif;
    color: var(--chat-ink); background: #fff;
}
#alma-chat .alma-chat-question textarea { resize: none; max-height: 75px; }
#alma-chat-note { display: block; margin-top: 5px; color: var(--chat-muted); font-size: 12px; }
#alma-chat .alma-chat-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 8px; }
#alma-chat [data-go] { color: var(--chat-blue); background: transparent; padding: 5px 0; text-align: left; font-size: 13px; }
#alma-chat .alma-chat-email { display: grid; gap: 11px; margin-bottom: 8px; }
#alma-chat label { display: grid; gap: 4px; font-size: 14px; font-weight: 600; }
#alma-chat .alma-chat-mailto { color: var(--chat-blue); }
#alma-chat .alma-chat-status:empty { display: none; }

#alma-chat .alma-chat-enquiry {
    padding: 9px 11px; border: 1px solid var(--chat-border); border-radius: 9px;
    background: #f0f5fc; color: var(--chat-ink); font-weight: 650;
}
#alma-chat .alma-chat-success-back { align-self: start; margin-bottom: 8px; }
@media (max-width: 480px) {
    #alma-chat { height: min(670px, calc(100dvh - 26px)); }
}
