:root {
  font: 15px/1.45 Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  color: #f5f1e8;
  background: #111;
  --black: #090909;
  --charcoal: #151515;
  --surface: #202020;
  --gold: #e0ad42;
  --gold-light: #ffd978;
  --red: #d8232a;
}
* { box-sizing: border-box; }
html { background-color: #090909; color-scheme: dark; }
html, body { width: 100%; height: 100%; overflow: hidden; overscroll-behavior: none; }
body {
  margin: 0; height: 100vh; height: 100dvh; height: var(--chat-height, 100dvh);
  position: absolute; top: var(--chat-top, 0px); left: 0; right: 0;
  display: flex; flex-direction: column; overflow: hidden; -webkit-tap-highlight-color: transparent;
  background: radial-gradient(circle at 12% 18%, #e0ad4214 0, transparent 27%), radial-gradient(circle at 88% 82%, #d8232a12 0, transparent 25%), linear-gradient(145deg, #191919 0%, #0d0d0d 55%, #15100d 100%);
}
body::before { content: ""; position: fixed; inset: 0; pointer-events: none; opacity: .24; background-image: radial-gradient(#e0ad4245 .65px, transparent .65px); background-size: 16px 16px; }
header {
  min-height: 82px; background: linear-gradient(135deg, #080808 0%, #17120d 62%, #26090b 100%); color: #fff;
  display: flex; align-items: center; gap: 12px;
  padding: max(10px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) 10px max(12px, env(safe-area-inset-left));
  border-bottom: 1px solid #e0ad4266; box-shadow: 0 8px 30px #0009, inset 0 -1px #d8232a42; z-index: 2;
}
.avatar { width: 54px; height: 54px; flex: 0 0 54px; border-radius: 50%; object-fit: cover; background: #050505; border: 1px solid var(--gold); box-shadow: 0 0 0 3px #e0ad421b, 0 5px 16px #000b; }
.brand { min-width: 0; flex: 1; }
header strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--gold-light); font-size: 17px; letter-spacing: .015em; }
header small { display: block; font-size: 10px; }
.brand-claim { color: #f2e2bd; margin-top: 1px; font-weight: 700; letter-spacing: .015em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.presence { color: #c9c1b4; margin-top: 3px; }
.online { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #54d889; box-shadow: 0 0 0 2px #54d88922; }
button, textarea { font: inherit; }
button { cursor: pointer; border: 0; }
.header-actions { display: flex; align-items: center; gap: 3px; }
#install-chat, #help-chat, #close { min-width: 40px; height: 44px; padding: 0; border-radius: 12px; background: #ffffff08; color: #e8d8b5; line-height: 1; }
#install-chat { width: 52px; display: grid; place-content: center; gap: 2px; color: var(--gold-light); }
#install-chat[hidden] { display: none; }
#install-chat > span { font-size: 18px; font-weight: 900; }
#install-chat small { font-size: 9px; font-weight: 800; }
#help-chat { font-size: 21px; font-weight: 850; }
#close { width: 44px; font-size: 30px; }
html.fullscreen #close { display: none; }
#install-chat:hover, #help-chat:hover, #close:hover { background: #e0ad4219; color: var(--gold-light); }
main {
  position: relative; z-index: 1; flex: 1; overflow: auto;
  padding: 18px max(12px, env(safe-area-inset-right)) 16px max(12px, env(safe-area-inset-left)); min-height: 0;
  display: flex; flex-direction: column; gap: 8px; scroll-behavior: smooth; -webkit-overflow-scrolling: touch;
}
.bubble {
  position: relative; max-width: 86%; padding: 9px 11px 7px; background: linear-gradient(145deg, #2a2a2a, #202020); color: #f7f3ea;
  border: 1px solid #ffffff10; border-radius: 13px 13px 13px 3px; white-space: pre-wrap; overflow-wrap: anywhere; box-shadow: 0 5px 16px #0006;
}
.bubble.outgoing { align-self: flex-start; }
.bubble.incoming { align-self: flex-end; color: #fff9ec; background: linear-gradient(145deg, #6f171b, #431013); border-color: #ef4b503c; border-radius: 13px 13px 3px 13px; }
.bubble time { display: block; text-align: right; color: #aaa397; font-size: 10px; margin: 3px 0 0 18px; }
.bubble.incoming time { color: #e8c5be; }
.bubble a { display: block; color: var(--gold-light); font-weight: 750; margin-top: 6px; }
.bubble .attachment-preview { width: min(260px, 72vw); overflow: hidden; border-radius: 9px; background: #171717; border: 1px solid #e0ad423d; text-decoration: none; }
.attachment-preview img { display: block; width: 100%; max-height: 320px; object-fit: cover; background: #111; }
.attachment-preview img[hidden] { display: none; }
.attachment-preview span { display: block; padding: 7px 8px; color: var(--gold-light); font-size: 11px; text-align: center; }
.attachment-audio { min-width: min(260px, 72vw); margin-top: 5px; padding: 5px; border: 1px solid #e0ad424a; border-radius: 999px; background: #161616; }
.attachment-audio audio { display: block; width: 100%; height: 36px; accent-color: var(--gold); }
.message-label { color: var(--gold-light); font-weight: 850; }
.message-heading { display: block; margin: 0 0 5px; color: var(--gold-light); font-weight: 900; letter-spacing: .02em; }
.message-card { display: block; margin: 9px 0; padding: 10px 11px; border-radius: 10px; white-space: pre-wrap; box-shadow: inset 0 1px #ffffff12, 0 4px 12px #0004; }
.continuity-card { border: 1px solid #4ea4dc66; background: linear-gradient(145deg,#182530,#111a21); color: #e8f5ff; }
.continuity-actions { display: grid; gap: 7px; margin-top: 11px; }
.continuity-action { min-height: 50px; display: grid; grid-template-columns: 34px 1fr; grid-template-rows: auto auto; column-gap: 8px; align-items: center; padding: 7px 11px; border: 1px solid #e0ad427d; border-radius: 12px; background: linear-gradient(145deg,#332818,#1d1912); color: #ffe7a8; text-align: left; box-shadow: 0 5px 14px #0005; }
.continuity-action > span { grid-row: 1 / 3; font-size: 23px; text-align: center; }.continuity-action b { font-size: 13px; }.continuity-action small { color: #cfc5b1; font-size: 10px; }
.continuity-action.whatsapp { border-color: #32c87588; background: linear-gradient(145deg,#163322,#10261a); color: #9df0bd; }
.continuity-arrow { color: #9db4c4; font-size: 11px; font-weight: 800; text-align: center; text-transform: uppercase; }
.continuity-note { display: block; color: #aebdca; font-size: 10px; line-height: 1.35; text-align: center; }
.minimum-card { border: 1px solid #e0ad4285; border-left: 4px solid var(--gold); background: linear-gradient(135deg, #3a2b11, #211a10); color: #fff4d9; }
.payment-card { border: 1px solid #d8232a70; border-left: 4px solid var(--red); background: linear-gradient(135deg, #30171a, #211315); color: #f7e8e5; }
#status { position: relative; z-index: 1; min-height: 18px; font-size: 11px; padding: 0 max(14px, env(safe-area-inset-right)); margin: 2px 0 6px; color: #b7ae9e; }
form {
  position: relative; z-index: 2; padding: 9px max(8px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
  background: linear-gradient(180deg, #1d1d1df5, #101010fa); border-top: 1px solid #e0ad424d; box-shadow: 0 -10px 30px #0005;
}
.guide-action { width: 100%; margin: 0 0 7px; padding: 5px 10px; border-radius: 10px; background: #e0ad4210; border: 1px solid #e0ad423a; color: #f0d79d; font-size: 11px; font-weight: 800; }
.upload-actions { display: flex; gap: 8px; margin-bottom: 8px; }
.upload-action {
  position: relative; min-height: 44px; display: flex; align-items: center; justify-content: center; gap: 7px;
  border: 1px solid #e0ad425c; border-radius: 12px; background: linear-gradient(145deg, #292929, #1b1b1b); color: #f4dfb2;
  font-size: 12px; font-weight: 800; cursor: pointer; overflow: hidden; box-shadow: inset 0 1px #ffffff0b;
}
.upload-action.camera { width: 48px; flex: 0 0 48px; border-color: #d8232a70; }
.upload-action.camera > span:last-of-type { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.upload-action.proof { flex: 1; }
.upload-icon { font-size: 18px; line-height: 1; color: var(--gold-light); }
.upload-action input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.upload-action:focus-within { outline: 3px solid #f0bd4d; outline-offset: 2px; }
.compose-row { display: flex; align-items: flex-end; gap: 7px; }
.compose-row textarea {
  min-width: 0; flex: 1; max-height: 110px; resize: none; border: 1px solid #5b4a2c; border-radius: 22px; padding: 10px 14px;
  background: #292929; color: #fff; outline: none; font-size: 16px; caret-color: var(--gold-light); box-shadow: inset 0 1px 5px #0006;
}
.compose-row textarea::placeholder { color: #aaa294; }
.compose-row textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px #e0ad4217; }
#submit {
  width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; gap: 7px; flex: 0 0 auto; border-radius: 50%;
  background: linear-gradient(145deg, #ef3940, #aa1117); color: #fff4d8; font-size: 19px; padding: 0; border: 1px solid #ff6a6e5e;
  box-shadow: 0 5px 14px #0008, inset 0 1px #ffffff30;
}
#submit-label { display: none; font-size: 13px; font-weight: 800; }
.has-file #submit { width: auto; padding: 0 16px; border-radius: 22px; }
.has-file #submit-label { display: inline; }
.send-icon { transform: translateX(1px); }
button:disabled { opacity: .5; cursor: wait; }
:focus-visible { outline: 3px solid #f0bd4d; outline-offset: 2px; }
#file-selected { margin: 0 0 8px; padding: 8px; border-radius: 12px; background: #272727; display: flex; align-items: center; gap: 9px; color: #d5cec1; font-size: 12px; border: 1px solid #e0ad424b; }
#file-selected[hidden] { display: none; }
#file-preview { width: 44px; height: 44px; object-fit: cover; border-radius: 8px; background: #111; }
#file-selected > span { display: flex; flex: 1; min-width: 0; flex-direction: column; }
#file-selected strong { color: var(--gold-light); }
#file-name { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #aaa294; }
#remove-file { width: 40px; height: 40px; background: transparent; color: #d8caaa; font-size: 23px; padding: 0; }
#older { position: relative; z-index: 2; align-self: center; margin: 7px auto 0; border: 1px solid #e0ad424d; border-radius: 15px; background: #252525; color: var(--gold-light); box-shadow: 0 3px 10px #0006; font-size: 11px; padding: 5px 11px; }
.sheet { position: fixed; inset: 0; z-index: 20; display: grid; align-items: end; padding: 14px; background: #000b; backdrop-filter: blur(5px); }
.sheet[hidden] { display: none; }
.sheet-card { position: relative; width: min(100%, 430px); max-height: min(86dvh, 680px); overflow: auto; margin: 0 auto; padding: 22px 18px max(18px, env(safe-area-inset-bottom)); border: 1px solid #e0ad4266; border-radius: 22px; background: linear-gradient(155deg,#24201a,#111 56%,#1c0c0e); box-shadow: 0 24px 80px #000; text-align: left; }
.sheet-close { position: absolute; top: 9px; right: 9px; width: 40px; height: 40px; border-radius: 50%; background: #ffffff0c; color: #e8d8b5; font-size: 25px; }
.sheet-logo { display: block; width: 72px; height: 72px; margin: 0 auto 8px; border-radius: 50%; border: 1px solid var(--gold); }
.install-demo { position: relative; width: 180px; height: 74px; margin: 8px auto; overflow: hidden; border: 1px solid #e0ad424c; border-radius: 14px; background: #181818; }
.install-menu { position: absolute; top: 5px; right: 9px; color: #eee; font-size: 24px; animation: install-flow 4s infinite; }
.install-card { position: absolute; left: 12px; top: 27px; padding: 7px 10px; border-radius: 8px; background: #333; color: #fff; font-size: 11px; animation: install-flow 4s .8s infinite both; }
.install-demo img { position: absolute; right: 60px; top: 16px; width: 42px; height: 42px; border-radius: 50%; opacity: 0; animation: install-icon 4s 1.8s infinite; }
.sheet h2 { margin: 3px 30px 10px 0; color: var(--gold-light); font-size: 20px; line-height: 1.2; }
.sheet p, .sheet li { color: #ded6c8; font-size: 14px; line-height: 1.45; }
.sheet ol { padding-left: 22px; }
.sheet li { margin: 8px 0; }
.sheet-note { padding: 9px 11px; border-left: 3px solid var(--gold); border-radius: 8px; background: #e0ad4210; }
.sheet-primary { width: 100%; min-height: 46px; margin-top: 6px; border-radius: 14px; background: linear-gradient(145deg,#ef3940,#a80f15); color: white; font-weight: 850; }
.phone-demo { position: relative; width: 118px; height: 210px; margin: 12px auto; overflow: hidden; border: 5px solid #4a4030; border-radius: 24px; background: #090909; box-shadow: 0 10px 30px #000a; }
.phone-speaker { position: absolute; z-index: 3; top: 7px; left: 39px; width: 32px; height: 4px; border-radius: 4px; background: #6f6453; }
.demo-screen { position: absolute; inset: 17px 5px 12px; display: grid; place-content: center; gap: 8px; padding: 10px; border-radius: 15px; text-align: center; font-size: 11px; }
.demo-screen span { font-size: 34px; }
.demo-chat { background: linear-gradient(155deg,#291f10,#151515); color: #f8df9b; animation: app-switch 4.8s infinite; }
.demo-bank { background: linear-gradient(155deg,#172c3d,#0c1821); color: #d7edff; animation: app-switch 4.8s 2.4s infinite both; }
.demo-home { position: absolute; z-index: 4; left: 42px; bottom: 6px; width: 25px; height: 3px; border-radius: 3px; background: #d9cdaF; }
.screenshot-help { margin: 10px 0; border: 1px solid #e0ad424b; border-radius: 12px; background: #171717; }
.screenshot-help summary { padding: 11px 13px; color: var(--gold-light); font-size: 13px; font-weight: 800; cursor: pointer; }
.screenshot-help > p { margin: 0; padding: 0 13px 13px; font-size: 13px; }
.screenshot-demo { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 6px 13px 10px; color: #ddd2bd; font-size: 11px; }
.screenshot-phone { position: relative; width: 48px; height: 82px; flex: 0 0 auto; border: 3px solid #655a47; border-radius: 12px; background: #242424; }
.shot-power,.shot-volume { position: absolute; width: 4px; height: 17px; border-radius: 3px; background: #ef3940; animation: screenshot-buttons 2.4s infinite; }
.shot-power { right: -6px; top: 27px; }.shot-volume { left: -6px; top: 27px; }
.shot-screen { position: absolute; inset: 5px; display: grid; place-items: center; border-radius: 7px; background: #e0ad4217; color: var(--gold-light); font-size: 20px; animation: screenshot-flash 2.4s infinite; }
@keyframes app-switch { 0%,42% { opacity: 1; transform: translateX(0) scale(1); } 48%,92% { opacity: 0; transform: translateX(-25px) scale(.92); } 100% { opacity: 1; transform: translateX(0) scale(1); } }
@keyframes screenshot-buttons { 0%,28%,72%,100% { transform: scale(1); filter: brightness(1); } 38%,58% { transform: scale(.72); filter: brightness(1.8); } }
@keyframes screenshot-flash { 0%,35%,65%,100% { background: #e0ad4217; box-shadow: none; } 45%,55% { background: #fff; box-shadow: 0 0 18px #fff; } }
@keyframes install-flow { 0%,22% { opacity: 1; transform: scale(1); } 30%,75% { opacity: .22; transform: scale(.94); } 86%,100% { opacity: 1; transform: scale(1); } }
@keyframes install-icon { 0%,30% { opacity: 0; transform: translateY(16px) scale(.5); } 45%,78% { opacity: 1; transform: translateY(0) scale(1); } 100% { opacity: 0; transform: translateY(-8px) scale(.9); } }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
@media (max-width: 480px) {
  header { min-height: 76px; }
  .avatar { width: 49px; height: 49px; flex-basis: 49px; }
  .bubble { max-width: 90%; }
  main { padding-top: 13px; padding-bottom: 12px; }
  .upload-actions { margin-bottom: 7px; }
}
@media (max-height: 560px) {
  header { min-height: 62px; padding-top: 6px; padding-bottom: 6px; }
  .avatar { width: 42px; height: 42px; flex-basis: 42px; }
  .upload-actions { margin-bottom: 5px; }
  #status { margin-bottom: 3px; }
}
@media (prefers-reduced-motion: reduce) { main { scroll-behavior: auto; } .demo-screen, .install-demo img, .install-demo span, .shot-power, .shot-volume, .shot-screen { animation: none; } .demo-bank { display: none; } .install-demo img { display: none; } }
