/* RAKAN — live Telegram demo phone (2026-10-24). A realistic iPhone running Telegram (dark): dynamic island, status bar, header,
   wallpaper, bubbles with time + ✓✓, inline keyboards you can tap, input bar with send button. Content = the bot's own output. */
.live-demo { position: relative; overflow: hidden; }
.live-demo::before { content: ""; position: absolute; inset: 10% -10% auto 40%; height: 80%; background: radial-gradient(closest-side, rgba(10, 132, 255, 0.18), transparent); pointer-events: none; }
.ld-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: clamp(28px, 6vw, 90px); align-items: center; }
.ld-copy { display: grid; gap: 16px; max-width: 520px; }
.ld-copy h2 { font-size: clamp(2.2rem, 4.8vw, 3.6rem); letter-spacing: -0.03em; }
.ld-copy > p:not(.eyebrow):not(.ld-note) { color: var(--mute); font-size: 1.05rem; }
.ld-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }
.ld-actions .btn svg { width: 20px; height: 20px; }
.ld-note { font: 500 .74rem/1.4 var(--mono); color: #6f84a0; letter-spacing: .04em; }
/* the phone */
.ld-phone { position: relative; width: min(372px, 86vw); aspect-ratio: 9 / 19.3; border-radius: 56px; padding: 11px;
  background: linear-gradient(145deg, #3a4556 0%, #161d28 30%, #0b1018 70%, #2a3343 100%);
  box-shadow: 0 0 0 1.5px #4b5668, inset 0 0 0 1.5px rgba(255, 255, 255, 0.06), 0 50px 120px -30px rgba(10, 132, 255, 0.55), 0 30px 60px -30px rgba(0, 0, 0, 0.9); }
.ld-btn { position: absolute; width: 4px; border-radius: 2px; background: linear-gradient(90deg, #2a3343, #46526a); }
.ld-btn.b1 { left: -3px; top: 17%; height: 6%; } .ld-btn.b2 { left: -3px; top: 26%; height: 10%; } .ld-btn.b3 { right: -3px; top: 22%; height: 14%; }
.ld-screen { position: relative; height: 100%; border-radius: 46px; overflow: hidden; background: #0e1621; display: flex; flex-direction: column; isolation: isolate; }
.ld-island { position: absolute; top: 11px; left: 50%; width: 34%; height: 30px; border-radius: 20px; background: #000; transform: translateX(-50%); z-index: 5; }
.ld-status { display: flex; justify-content: space-between; align-items: center; padding: 15px 26px 6px; background: #17212b; color: #fff; font: 600 .82rem/1 -apple-system, "SF Pro Text", var(--body); }
.ld-icons { display: inline-flex; gap: 6px; align-items: center; }
.ld-icons .sig { width: 17px; height: 11px; background: linear-gradient(90deg, #fff 0 3px, transparent 3px 4.5px, #fff 4.5px 7.5px, transparent 7.5px 9px, #fff 9px 12px, transparent 12px 13.5px, #fff 13.5px); clip-path: polygon(0 75%, 22% 75%, 22% 55%, 48% 55%, 48% 30%, 74% 30%, 74% 0, 100% 0, 100% 100%, 0 100%); }
.ld-icons .wifi { width: 15px; height: 11px; background: #fff; clip-path: polygon(50% 100%, 0 30%, 15% 15%, 50% 0, 85% 15%, 100% 30%); border-radius: 2px; }
.ld-icons .bat { width: 24px; height: 11px; border-radius: 3px; border: 1.5px solid rgba(255, 255, 255, 0.55); position: relative; }
.ld-icons .bat::after { content: ""; position: absolute; inset: 1.5px 5px 1.5px 1.5px; border-radius: 1.5px; background: #fff; }
.ld-head { display: flex; align-items: center; gap: 10px; padding: 8px 12px 10px; background: #17212b; border-bottom: 1px solid #0a1016; z-index: 2; }
.ld-head img { border-radius: 50%; flex: none; }
.ld-back, .ld-more { width: 22px; height: 22px; flex: none; fill: none; stroke: #6c7883; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.ld-more { fill: #6c7883; stroke: none; }
.ld-who { flex: 1; min-width: 0; display: grid; gap: 1px; }
.ld-who b { color: #fff; font: 600 .92rem/1.2 var(--body); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ld-who span { color: #6c7883; font-size: .76rem; } .ld-who span.typing { color: #5fb7ff; }
.ld-chat { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scroll-behavior: smooth; padding: 10px 8px 12px; display: flex; flex-direction: column; gap: 6px; scrollbar-width: none;
  background-color: #0e1621; background-image: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.025) 0 2px, transparent 3px), radial-gradient(circle at 70% 60%, rgba(255, 255, 255, 0.02) 0 3px, transparent 4px), radial-gradient(80% 50% at 50% 0%, rgba(43, 82, 120, 0.22), transparent);
  background-size: 46px 46px, 64px 64px, 100% 100%; background-attachment: local; }
.ld-chat::-webkit-scrollbar { display: none; }
.ld-day { align-self: center; padding: 3px 10px; border-radius: 10px; background: rgba(0, 0, 0, 0.32); color: #c9d6e6; font-size: .7rem; margin: 2px 0 4px; }
.ld-msg { position: relative; max-width: 88%; padding: 7px 10px 20px; border-radius: 15px; font: 400 .8rem/1.38 var(--body); color: #e9edf2; white-space: pre-wrap; word-wrap: break-word; animation: ldIn .32s cubic-bezier(.2, .9, .3, 1.2); }
@keyframes ldIn { from { opacity: 0; transform: translateY(10px) scale(.96); } }
.ld-msg.in { align-self: flex-start; background: #182533; border-bottom-left-radius: 5px; }
.ld-msg.out { align-self: flex-end; background: #2b5278; border-bottom-right-radius: 5px; }
.ld-msg b { font-weight: 700; color: #fff; } .ld-msg i { color: #9fb3c8; }
.ld-msg code { font: 500 .74rem/1.3 var(--mono); color: #7dd3fc; background: rgba(0, 0, 0, 0.2); padding: 1px 4px; border-radius: 4px; word-break: break-all; }
.ld-meta { position: absolute; right: 9px; bottom: 4px; display: inline-flex; gap: 3px; align-items: center; font: 400 .62rem/1 var(--body); color: rgba(233, 237, 242, 0.5); }
.ld-msg.out .ld-meta { color: #7db4e6; } .ld-meta svg { width: 15px; height: 9px; fill: none; stroke: #5fb7ff; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.ld-msg.photo { padding: 3px 3px 20px; max-width: 92%; }
.ld-msg.photo img { display: block; width: 100%; height: auto; border-radius: 12px 12px 4px 4px; cursor: zoom-in; }
.ld-msg.photo .cap { display: block; padding: 6px 7px 0; }
.ld-kb { align-self: flex-start; max-width: 92%; width: 92%; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-top: -2px; animation: ldIn .32s cubic-bezier(.2, .9, .3, 1.2); }
.ld-kb button { appearance: none; border: 0; cursor: pointer; padding: 8px 6px; border-radius: 9px; background: rgba(43, 82, 120, 0.55); color: #fff; font: 500 .72rem/1.15 var(--body); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: background .2s, transform .1s; }
.ld-kb button:hover { background: rgba(60, 110, 160, 0.75); } .ld-kb button:active { transform: scale(.97); }
.ld-kb button.full { grid-column: span 2; }
.ld-kb button.hint { animation: ldHint 1.6s ease-in-out 3; }
@keyframes ldHint { 50% { background: rgba(34, 195, 255, 0.55); box-shadow: 0 0 18px rgba(34, 195, 255, 0.7); } }
.ld-typing { align-self: flex-start; display: inline-flex; gap: 4px; padding: 11px 13px; border-radius: 15px; border-bottom-left-radius: 5px; background: #182533; }
.ld-typing i { width: 7px; height: 7px; border-radius: 50%; background: #6c7883; animation: ldDot 1s infinite; } .ld-typing i:nth-child(2) { animation-delay: .15s; } .ld-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes ldDot { 50% { transform: translateY(-4px); opacity: .5; } }
.ld-input { display: flex; align-items: center; gap: 10px; padding: 9px 12px 8px; background: #17212b; color: #6c7883; font: 400 .86rem/1 var(--body); }
.ld-field { flex: 1; min-width: 0; padding: 9px 12px; border-radius: 18px; background: #0e1621; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ld-field.has { color: #e9edf2; font-family: var(--mono); font-size: .74rem; }
.ld-ic { width: 22px; height: 22px; fill: none; stroke: #6c7883; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ld-send { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: transparent; transition: background .25s, transform .2s; flex: none; }
.ld-send svg { width: 18px; height: 18px; fill: #6c7883; transition: fill .25s; } .ld-send.on { background: #3a8ee6; transform: scale(1.06); } .ld-send.on svg { fill: #fff; }
.ld-home { height: 18px; background: #17212b; position: relative; } .ld-home::after { content: ""; position: absolute; left: 50%; top: 6px; width: 36%; height: 4px; border-radius: 3px; background: rgba(255, 255, 255, 0.55); transform: translateX(-50%); }
.ld-zoom { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 20px; background: rgba(1, 6, 14, 0.88); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.ld-zoom img { max-width: min(1200px, 100%); max-height: 88vh; border-radius: 16px; box-shadow: 0 40px 120px -20px rgba(10, 132, 255, 0.6); }
.ld-zoom button { position: absolute; top: max(16px, env(safe-area-inset-top)); right: 18px; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line-2); background: rgba(8, 20, 36, 0.9); color: #fff; font-size: 1.6rem; cursor: pointer; }
@media (max-width: 860px) { .ld-grid { grid-template-columns: 1fr; justify-items: center; text-align: center; } .ld-copy { justify-items: center; } .ld-actions { justify-content: center; } }
@media (max-width: 420px) { .ld-phone { width: 92vw; border-radius: 48px; padding: 9px; } .ld-screen { border-radius: 40px; } .ld-msg { font-size: .76rem; } }
@media (prefers-reduced-motion: reduce) { .ld-msg, .ld-kb, .ld-kb button.hint, .ld-typing i { animation: none; } .ld-chat { scroll-behavior: auto; } }
.ld-zoom[hidden] { display: none; }
.ld-phone { text-align: left; }

/* paste options (like Telegram suggestion chips) + a send button the customer presses himself */
.ld-chips { display: flex; gap: 6px; padding: 6px 8px; background: #0e1621; overflow-x: auto; scrollbar-width: none; }
.ld-chips::-webkit-scrollbar { display: none; }
.ld-chips button { flex: none; appearance: none; border: 1px solid rgba(95, 183, 255, 0.35); background: rgba(43, 82, 120, 0.45); color: #e9edf2; font: 500 .72rem/1 var(--body); padding: 8px 11px; border-radius: 16px; cursor: pointer; transition: background .2s, transform .1s; }
.ld-chips button:hover { background: rgba(60, 110, 160, 0.75); } .ld-chips button:active { transform: scale(.96); }
button.ld-send { appearance: none; border: 0; cursor: pointer; padding: 0; }
.ld-send.pulse { animation: ldPulse 1.2s ease-in-out infinite; }
@keyframes ldPulse { 50% { box-shadow: 0 0 0 7px rgba(58, 142, 230, 0.25), 0 0 18px rgba(58, 142, 230, 0.8); } }
@media (prefers-reduced-motion: reduce) { .ld-send.pulse { animation: none; } }
/* zoomed out (owner 2026-10-24): smaller type and tighter spacing inside the phone so more of the chat is visible, like a real screen */
.ld-head { padding: 6px 10px 7px; gap: 8px; } .ld-head img { width: 30px; height: 30px; }
.ld-who b { font-size: .8rem; } .ld-who span { font-size: .66rem; } .ld-back, .ld-more { width: 18px; height: 18px; }
.ld-status { padding: 13px 24px 4px; font-size: .74rem; }
.ld-chat { padding: 8px 6px 10px; gap: 5px; }
.ld-msg { font-size: .66rem; line-height: 1.34; padding: 6px 8px 16px; border-radius: 12px; }
.ld-msg code { font-size: .6rem; }
.ld-meta { font-size: .52rem; bottom: 3px; right: 7px; }
.ld-msg.photo { padding: 2px 2px 16px; } .ld-msg.photo .cap { padding: 5px 6px 0; }
.ld-kb { gap: 3px; } .ld-kb button { font-size: .6rem; padding: 6px 4px; border-radius: 7px; }
.ld-day { font-size: .6rem; }
.ld-chips { padding: 5px 6px; gap: 5px; } .ld-chips button { font-size: .62rem; padding: 6px 9px; }
.ld-input { padding: 7px 10px 6px; font-size: .74rem; } .ld-field { padding: 7px 10px; } .ld-field.has { font-size: .64rem; }
.ld-send { width: 30px; height: 30px; } .ld-ic { width: 19px; height: 19px; }
@media (max-width: 420px) { .ld-msg { font-size: .64rem; } }
/* the header always sits below the Dynamic Island (owner 2026-10-24: the name ran under the notch) */
.ld-status { min-height: 48px; padding: 15px 26px 8px; align-items: center; box-sizing: border-box; }
.ld-head { padding-top: 4px; }
