:root { color-scheme: light; font: 16px/1.55 system-ui, sans-serif; color: #142329; }
* { box-sizing: border-box; }
body { margin: 0; background: #f8f9f8; }
:focus-visible { outline: 3px solid #17765b; outline-offset: 4px; }
.language-page { width: min(100%, 42rem); margin-inline: auto; padding: 1rem clamp(1rem, 6vw, 2.5rem) 1.75rem; }
.welcome, footer { text-align: center; }
.welcome h1 { margin: 1rem 0 .3rem; font-size: clamp(1.45rem, 5.5vw, 2rem); }
.welcome h2 { margin: 1.35rem 0 .3rem; font-size: clamp(1.1rem, 4.5vw, 1.5rem); }
.welcome p { margin: 0; color: #44545a; }
.illustration { width: 10.75rem; height: 9.25rem; display: grid; place-items: center; margin: 0 auto; position: relative; }
.illustration::before { content: ''; position: absolute; inset: .75rem 0 .3rem; background: #e4f2ed; border-radius: 50%; }
.phone { height: 8.85rem; width: 5.75rem; border: .32rem solid #193c43; border-radius: .95rem; background: #f7fcf9; display: grid; place-items: center; position: relative; }
.phone::before { content: ''; width: 2rem; height: .43rem; background: #193c43; border-radius: 0 0 .35rem .35rem; position: absolute; inset: 0 0 auto; margin: auto; }
.bubble { background: #389776; border-radius: .55rem; padding: .75rem .55rem; display: flex; gap: .25rem; position: relative; }
.bubble::after { content: ''; position: absolute; border: .35rem solid transparent; border-left-color: #389776; left: .5rem; bottom: -.28rem; }
.bubble i { width: .28rem; height: .28rem; border-radius: 50%; background: white; }
.illustration-accent { position: absolute; bottom: .55rem; right: .25rem; background: #176e62; color: white; border: .2rem solid #f8f9f8; border-radius: 50%; width: 3.15rem; aspect-ratio: 1; display: grid; place-items: center; font-size: 1.25rem; }
.language-page nav { display: grid; gap: .65rem; margin-block: 2rem 1.25rem; }
.language-page nav h2 { margin: 0 0 .35rem; font-size: 1.05rem; color: #35454a; }
.language-page nav h2 span { margin-inline-start: .4rem; font-weight: 500; }
.language-option { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .9rem; min-height: 4.75rem; padding: .65rem 1rem; color: inherit; text-decoration: none; border: 1px solid #cbd4d5; border-radius: .8rem; background: #fbfcfc; }
.language-option:first-of-type, .language-option:hover { border-color: #438e76; background: #eef5f2; }
.language-option::after { content: ''; width: .45rem; height: .45rem; border: solid #586a70; border-width: 0 2px 2px 0; transform: rotate(-45deg); }
.flag { display: grid; place-items: center; font: 2.1rem/1 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', sans-serif; width: 2.85rem; height: 2.85rem; border-radius: 50%; background: #e7efed; }
.language-option strong, .language-option small { display: block; }
.language-option small, footer { color: #526367; }
footer { font-size: .8rem; }
.chat-page { max-width: 42rem; margin-inline: auto; height: 100vh; height: 100dvh; display: grid; grid-template-rows: auto minmax(0, 1fr); overflow-wrap: anywhere; background: #fff; }
.chat-top { padding: .75rem 1rem 1rem; text-align: center; }
.chat-top h1 { margin: .4rem 0 .2rem; font-size: clamp(1.25rem, 5vw, 1.65rem); }
.chat-top p { margin: 0; color: #526367; }
.chat-thread { display: grid; grid-template-rows: minmax(0, 1fr) auto; background-color: #f5f0e7;
  background-image: linear-gradient(#f5f0e7da, #f5f0e7da), var(--chat-wallpaper, none);
  background-size: 100% 100%, 366px 549px; }
.chat-history { overflow-y: auto; overscroll-behavior: contain; padding: 1rem; }
.chat-history ol { display: grid; gap: .6rem; margin: .6rem 0 0; padding: 0; list-style: none; }
.chat-greeting, .chat-history li { max-width: min(85%, 32rem); width: fit-content; padding: .55rem .8rem; border-radius: .25rem .9rem .9rem; background: #fff; white-space: pre-wrap; }
.chat-greeting { margin: 0; }
.chat-history li.mine { justify-self: end; border-radius: .9rem .25rem .9rem .9rem; background: #d6eee2; }
.chat-composer { display: grid; gap: .35rem; padding: .5rem .8rem max(1rem, env(safe-area-inset-bottom)) .25rem; }
.chat-input-row { display: flex; align-items: center; min-width: 0; }
.chat-tools { position: relative; flex: none; }
.chat-tools summary { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: .7rem; list-style: none; color: #526367; font: 400 1.65rem/1 system-ui, sans-serif; cursor: pointer; }
.chat-tools summary::-webkit-details-marker { display: none; }
.chat-quick-message { position: absolute; bottom: calc(100% + .35rem); left: 0; z-index: 1; width: max-content; max-width: min(16rem, 75vw); padding: .65rem .85rem; border: 1px solid #dce3df; border-radius: .75rem; color: #213033; background: #fff; font: inherit; cursor: pointer; }
.chat-composer input { flex: 1; min-width: 0; min-height: 3.15rem; margin-inline: 0 .5rem; padding: .5rem .875rem; border: 0; border-radius: 1.25rem; background: #fff; color: inherit; font: inherit; font-size: 1.1875rem; }
.chat-composer input:focus-visible { outline: 1px solid #4f826d; outline-offset: -1px; }
.chat-composer button[type="submit"] { display: grid; place-items: center; flex: none; width: 2.5rem; height: 2.5rem; padding: 0; border: 0; border-radius: 50%; background: #329e5d; color: #fff; cursor: pointer; }
.chat-composer button[type="submit"] svg { width: 1.4rem; height: 1.4rem; }
.chat-composer button[type="submit"]:disabled { opacity: .65; cursor: wait; }
.chat-composer [role="status"] { margin: 0; padding: .25rem .65rem; border-radius: .6rem; background: #fff; color: #8c391e; font-size: .875rem; }
.chat-composer [role="status"]:empty { display: none; }
.onboarding-bar-inner { max-width: 42rem; margin-inline: auto; padding: .35rem .75rem; min-height: 3.5rem; display: grid; grid-template-columns: 2.75rem minmax(0, 1fr) 2.75rem; align-items: center; }
.onboarding-brand { grid-column: 2; justify-self: center; display: flex; align-items: center; gap: .55rem; color: #176e62; font-weight: 750; line-height: 1.2; }
.onboarding-mark { display: grid; place-items: center; flex: none; width: 1.9rem; height: 1.9rem; border-radius: .55rem; background: #176e62; }
.onboarding-mark span { width: 1.05rem; height: .72rem; background: #fff; border-radius: .25rem; position: relative; }
.onboarding-mark span::before { content: ''; position: absolute; left: .15rem; bottom: -.19rem; border: .15rem solid transparent; border-left-color: #fff; }
.onboarding-mark span::after { content: ''; position: absolute; inset: .23rem .2rem auto; height: .1rem; border-radius: 1rem; background: #176e62; box-shadow: 0 .17rem #176e62; }
.onboarding-back { grid-column: 3; display: grid; place-items: center; min-height: 2.75rem; color: #526367; font-size: 1.65rem; line-height: 1; text-decoration: none; }
body[data-visitor-stage="DEVICE"] { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.device-page { flex: 1 0 auto; display: flex; flex-direction: column; padding-bottom: max(1.75rem, env(safe-area-inset-bottom)); }
.device-page footer { margin-top: auto; }
.device-page .welcome p { max-width: 29rem; margin-inline: auto; }
.device-page .device-option { border-color: #cbd4d5; background: #fbfcfc; }
.device-page .device-option:hover { border-color: #438e76; background: #eef5f2; }
.device-icon { display: grid; place-items: center; width: 2.85rem; height: 2.85rem; border-radius: 50%; }
.device-icon svg { display: block; width: 1.85rem; height: 1.85rem; }
.device-android { color: #267a4b; background: #e5f3e9; }
.device-iphone { color: #20272c; background: #e9eef0; }
.device-page footer a { color: #165981; text-underline-offset: .2em; }

.chat-history li img { display: block; max-width: min(100%, 24rem); max-height: 20rem; object-fit: contain; margin-block: .35rem; }
.chat-history li a, .chat-history li button { display: block; max-width: 100%; margin-top: .4rem; color: #075c6b; overflow-wrap: anywhere; }
.chat-history li button { background: #eef7f7; border: 1px solid #bed8d8; border-radius: .4rem; padding: .4rem .7rem; cursor: pointer; font: inherit; }
