/* Hoạt cảnh trang chủ: màn hình app dựng bằng HTML theo chuẩn "Thân quen".
   Mọi kích thước bên trong điện thoại tính bằng cqw (1cqw = 1% bề rộng máy) để
   co giãn đúng tỉ lệ ở mọi cỡ màn hình. HTML mặc định là khung cuối đứng yên;
   js/scenes.js mới đưa về khung đầu rồi chạy. */

/* ── Khung điện thoại ── */
.device-wrap { container-type: inline-size; width: 100%; }
.device { position: relative; width: 100cqw; aspect-ratio: 300 / 620; padding: 2.6cqw; border-radius: 15cqw;
  background: linear-gradient(145deg, #2A2F36, #0B0C0E 40%); box-shadow: 0 0 0 .5cqw #3A414B inset, 0 24px 48px rgba(11,27,46,.22), 0 6px 14px rgba(11,27,46,.12); }
.screen { position: relative; height: 100%; overflow: hidden; border-radius: 12.6cqw; background: #F2F4F7; color: #0B1B2E;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI", Roboto, sans-serif;
  font-size: 4.4cqw; line-height: 1.32; padding: 13.5cqw 4.4cqw 0; -webkit-font-smoothing: antialiased; }
.screen.plain { background: #fff; }
.screen::before { content: ""; position: absolute; inset: 0 0 auto; height: 70cqw; background: linear-gradient(180deg, #E3F0FB, rgba(242,244,247,0)); pointer-events: none; }
.screen > * { position: relative; }
.screen.plain::before { display: none; }
.island { position: absolute !important; top: 2.8cqw; left: 50%; width: 29cqw; height: 8.4cqw; margin-left: -14.5cqw; background: #000; border-radius: 99px; z-index: 5; }
.ui-status { position: absolute !important; top: 3.6cqw; left: 8cqw; right: 7cqw; display: flex; align-items: center; justify-content: space-between; font-size: 3.6cqw; font-weight: 600; z-index: 4; }
.sb-icons svg { width: 13cqw; height: auto; display: block; }

.ui-head { display: flex; align-items: center; justify-content: space-between; margin: 1.5cqw 0 3cqw; }
.ui-title { font-size: 9.4cqw; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
.ui-del { font-size: 3.5cqw; font-weight: 600; color: #B3261E; background: #FDE7E5; border-radius: 99px; padding: 1.2cqw 3cqw; }
.ui-plus { width: 9cqw; height: 9cqw; border-radius: 50%; background: #0873C4; color: #fff; display: grid; place-items: center; font-size: 6.4cqw; font-weight: 500; line-height: 1; }
.ui-watch { display: flex; align-items: center; gap: 2cqw; background: #E6F3FC; color: #06609F; border-radius: 3.6cqw; padding: 2.4cqw 3.4cqw; font-size: 3.9cqw; font-weight: 600; }
.ui-watch svg { width: 4.2cqw; height: 4.2cqw; flex-shrink: 0; }
.ui-watch .scan { margin-left: auto; width: 2cqw; height: 2cqw; border-radius: 50%; background: #13A57B; box-shadow: 0 0 0 0 rgba(19,165,123,.5); }

/* Tab bar dưới đáy */
.ui-tabs { position: absolute !important; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(5, 1fr);
  padding: 2.4cqw 1cqw 5cqw; background: #fff; border-top: 1px solid #E6EAEF; font-size: 2.9cqw; color: #64707D; z-index: 4; }
.ui-tabs span { display: flex; flex-direction: column; align-items: center; gap: .9cqw; }
.ui-tabs svg { width: 5.8cqw; height: 5.8cqw; }
.ui-tabs .on { color: #076DBB; font-weight: 600; }

/* ── Thẻ kèo ── */
.ui-list { margin-top: 3cqw; }
.kcard { background: #fff; border-radius: 6.4cqw; padding: 3.6cqw; box-shadow: 0 .3cqw 1cqw rgba(11,27,46,.04), 0 2cqw 5cqw rgba(11,27,46,.05); }
.kcard + .kcard { margin-top: 3cqw; }
.khead { display: flex; align-items: center; gap: 1.8cqw; min-width: 0; }
.av { flex-shrink: 0; width: 8cqw; height: 8cqw; border-radius: 50%; background: var(--av, #0873C4); color: #fff; font-size: 3.1cqw; font-weight: 700; display: grid; place-items: center; }
.kname { font-weight: 700; font-size: 4.1cqw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kwho { color: #64707D; font-size: 3.5cqw; white-space: nowrap; }
.ktimer { margin-left: auto; flex-shrink: 0; font-size: 3.7cqw; font-weight: 700; font-variant-numeric: tabular-nums; padding: .7cqw 2.4cqw; border-radius: 99px; background: #E6F3FC; color: #06609F; transition: background-color .3s, color .3s; }
.ktimer.hurry { background: #FFF4DB; color: #7A4A00; }
.ktimer.urgent { background: #FDE7E5; color: #B3261E; }
.ktimer.done { background: #E3F4EC; color: #0F7A55; }
.ktext { margin: 2.4cqw 0 2.8cqw; font-size: 4.3cqw; line-height: 1.38; }
.ktext b { font-weight: 700; }
mark.kw { background: #E6F3FC; color: #06609F; border-radius: 1cqw; padding: 0 .7cqw; }
.kbar { height: 1.2cqw; background: #E6EAEF; border-radius: 99px; overflow: hidden; }
.kbar i { display: block; height: 100%; background: #0873C4; border-radius: inherit; transform-origin: left center; transform: scaleX(var(--p, .7)); transition: background-color .3s; }
.kbar.hurry i { background: #E08A00; }
.kbar.urgent i { background: #D93025; }
.kbar.done i { background: #0F7A55; }
.kact { display: grid; grid-template-columns: 1fr 1fr; gap: 2.4cqw; margin-top: 3cqw; }
.kbtn { position: relative; overflow: hidden; height: 10.6cqw; border-radius: 3.6cqw; display: grid; place-items: center; font-weight: 700; font-size: 4.1cqw; transition: background-color .25s, opacity .25s; }
.kbtn.ghost { background: #F1F3F6; }
.kbtn.pri { background: #0873C4; color: #fff; }
.kbtn.pri.sent { background: #0F7A55; }
.kact.sent .ghost { opacity: .4; }

/* Dải "Đang đọc lịch…" trong thẻ */
.kvoice { display: flex; align-items: center; gap: 2cqw; margin-top: 2.4cqw; padding: 2.2cqw 3cqw; border-radius: 3cqw; background: #E6F3FC; color: #06609F; font-size: 3.7cqw; font-weight: 600; }
.kvoice svg { width: 4.4cqw; height: 4.4cqw; flex-shrink: 0; }
.kvoice .wave { margin-left: auto; height: 4cqw; gap: .6cqw; }
.kvoice .wave i { width: .8cqw; }
.kvoice.read { background: #F1F3F6; color: #64707D; }
.kvoice.read .wave { display: none; }

/* Chạm ngón tay + gợn sóng */
.touch { position: absolute; z-index: 6; width: 11cqw; height: 11cqw; margin: -5.5cqw 0 0 -5.5cqw; border-radius: 50%;
  background: rgba(11,27,46,.22); box-shadow: 0 0 0 .7cqw rgba(255,255,255,.85); pointer-events: none; }
.ripple { position: absolute; width: 10cqw; height: 10cqw; margin: -5cqw 0 0 -5cqw; border-radius: 50%; background: rgba(255,255,255,.5); pointer-events: none; }

/* ── Cảnh 1: dòng tin nhóm chạy phía sau ── */
.ui-feed { position: relative; height: 13.5cqw; margin-top: 2.4cqw; overflow: hidden;
  -webkit-mask-image: linear-gradient(transparent, #000 35%, #000 65%, transparent); mask-image: linear-gradient(transparent, #000 35%, #000 65%, transparent); }
.feed-track { animation: feed 7s linear infinite; }
.frow { display: flex; align-items: center; gap: 1.6cqw; height: 4.6cqw; font-size: 3.2cqw; color: #64707D; white-space: nowrap; }
.frow::before { content: ""; width: 1.6cqw; height: 1.6cqw; border-radius: 50%; background: #C9D1DA; flex-shrink: 0; }
@keyframes feed { to { transform: translateY(-50%); } }
.fmatch { position: absolute !important; left: 0; right: 0; top: 50%; margin-top: -3.4cqw; height: 6.8cqw; display: flex; align-items: center; gap: 1.6cqw;
  padding: 0 2.4cqw; border-radius: 99px; background: #E3F4EC; color: #0B1B2E; font-size: 3.4cqw; font-weight: 600; white-space: nowrap; overflow: hidden; opacity: 0; }
.fmatch::before { content: ""; width: 1.8cqw; height: 1.8cqw; border-radius: 50%; background: #0F7A55; flex-shrink: 0; }
.fmatch mark { background: #C9EBDB; color: #0B5A3F; border-radius: 1cqw; padding: 0 .6cqw; }

/* ── Cảnh 2: cổng lọc ── */
.funnel { position: relative; height: 230px; margin-bottom: clamp(1.5rem, 4vw, 2.5rem); border-radius: var(--radius-lg); overflow: hidden;
  background: linear-gradient(90deg, var(--funnel-a) 0%, var(--funnel-b) 48%, var(--funnel-c) 100%); box-shadow: inset 0 0 0 1px var(--line); }
.funnel-lane { position: absolute; inset: 0; }
.fchip { position: absolute; left: 0; top: 0; max-width: 42%; padding: .45rem .8rem; border-radius: 999px; background: var(--surface); color: var(--ink-muted);
  font-size: .82rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; box-shadow: 0 2px 8px rgba(11,27,46,.08); will-change: transform, opacity; }
.fchip mark { background: none; color: inherit; border-radius: 4px; padding: 0 2px; transition: background-color .25s, color .25s; }
.fchip.ok { color: var(--ink); box-shadow: 0 0 0 2px #13A57B, 0 4px 12px rgba(19,165,123,.25); }
.fchip.ok mark { background: #C9EBDB; color: #0B5A3F; }
.fchip.rej { color: #B3261E; text-decoration: line-through; text-decoration-thickness: 2px; box-shadow: 0 0 0 1.5px #F2B8B5; }
.gate-line { position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; margin-left: -1px;
  background: repeating-linear-gradient(180deg, var(--accent-fill) 0 8px, transparent 8px 14px); opacity: .55; }
.gate-card { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: .5rem; padding: .45rem .75rem;
  background: var(--surface); border-radius: 999px; box-shadow: var(--shadow-card); font-size: .8rem; font-weight: 700; color: var(--ink); white-space: nowrap; z-index: 2; }
.gate-card .icon-tile { width: 26px; height: 26px; border-radius: 8px; }
.gate-card .kws { display: flex; gap: .3rem; }
.gate-card .kws span { background: var(--accent-soft); color: var(--accent-soft-text); border-radius: 999px; padding: .1rem .5rem; font-weight: 600; }
.tray { position: absolute; right: 14px; bottom: 14px; display: flex; align-items: center; gap: .45rem; padding: .45rem .8rem; border-radius: 999px;
  background: var(--surface); box-shadow: var(--shadow-card); font-size: .82rem; font-weight: 700; color: var(--ink); z-index: 2; }
.tray b { min-width: 1.5rem; height: 1.5rem; padding: 0 .35rem; border-radius: 999px; background: var(--go); color: var(--on-go); display: grid; place-items: center; font-variant-numeric: tabular-nums; }
.junk-label { position: absolute; left: 14px; bottom: 14px; font-size: .78rem; font-weight: 600; color: var(--ink-muted); }
@media (max-width: 640px) {
  .funnel { height: 250px; }
  .gate-card .kws span:nth-child(n+3) { display: none; }
  .fchip { font-size: .74rem; padding: .4rem .65rem; }
}

/* ── Cảnh 3: Lọc ── */
.ui-label { font-size: 3.1cqw; font-weight: 700; letter-spacing: .06em; color: #64707D; margin: 1cqw 0 2cqw; }
.fcard { background: #fff; border-radius: 5.4cqw; padding: 3.6cqw; box-shadow: 0 .3cqw 1cqw rgba(11,27,46,.04), 0 2cqw 5cqw rgba(11,27,46,.05); }
.fcard + .fcard, .fcard + .tbox, .tbox + .fcard { margin-top: 3cqw; }
.frow-top { display: flex; align-items: center; gap: 2cqw; font-weight: 700; font-size: 4.2cqw; }
.badge { margin-left: auto; font-size: 3.1cqw; font-weight: 600; color: #06609F; background: #E6F3FC; border-radius: 99px; padding: .5cqw 2cqw; }
.tgl { width: 11cqw; height: 6.6cqw; border-radius: 99px; background: #E6EAEF; position: relative; flex-shrink: 0; }
.tgl::after { content: ""; position: absolute; top: .6cqw; left: .6cqw; width: 5.4cqw; height: 5.4cqw; border-radius: 50%; background: #fff; box-shadow: 0 .4cqw 1cqw rgba(0,0,0,.2); }
.tgl.on { background: var(--accent-fill); }
.tgl.on::after { left: auto; right: .6cqw; }
.fsub { font-size: 3.1cqw; color: #64707D; margin: 2.4cqw 0 1.4cqw; }
.chips { display: flex; flex-wrap: wrap; gap: 1.4cqw; }
.chips span { font-size: 3.4cqw; padding: .9cqw 2.4cqw; border-radius: 99px; background: #E6F3FC; color: #06609F; transition: transform .2s, box-shadow .2s; }
.chips.bad span { background: #FDE7E5; color: #B3261E; }
.chips span.flash { transform: scale(1.1); box-shadow: 0 0 0 .6cqw rgba(8,115,196,.25); }
.tbox { border: .6cqw solid #0873C4; border-radius: 5.4cqw; padding: 3cqw; background: #fff; }
.tbox-h { display: flex; align-items: center; gap: 1.6cqw; color: #06609F; font-weight: 700; font-size: 3.8cqw; }
.tbox-h svg { width: 4.4cqw; height: 4.4cqw; }
.tinput { margin-top: 2.2cqw; min-height: 15cqw; padding: 2.4cqw 3cqw; border-radius: 3cqw; background: #F1F3F6; font-size: 3.9cqw; line-height: 1.45; }
.tinput .k { border-radius: 1cqw; padding: 0 .5cqw; transition: background-color .25s, color .25s; }
.tinput .k.on { background: #CFE6F8; color: #06609F; }
.tinput .caret { display: inline-block; width: .5cqw; height: 4.4cqw; margin-left: .2cqw; vertical-align: -0.8cqw; background: #0873C4; animation: caret 1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.tresult { display: flex; align-items: center; gap: 1.6cqw; margin-top: 2.2cqw; padding: 2.2cqw 3cqw; border-radius: 3cqw; background: #E3F4EC; color: #0F7A55; font-size: 3.7cqw; font-weight: 700; }
.tresult svg { width: 4.6cqw; height: 4.6cqw; }
.muted-row { color: #64707D; font-weight: 500; font-size: 3.4cqw; margin-left: auto; }

/* ── Cảnh 4: Giọng nói ── */
.spk { position: relative; display: grid; place-items: center; width: 6.4cqw; height: 6.4cqw; border-radius: 50%; background: #0873C4; color: #fff; flex-shrink: 0; }
.spk svg { width: 3.8cqw; height: 3.8cqw; }
.spk::before, .spk::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: .5cqw solid #0873C4; opacity: 0; animation: ring 1.8s ease-out infinite; }
.spk::after { animation-delay: .9s; }
@keyframes ring { from { transform: scale(1); opacity: .55; } to { transform: scale(2.4); opacity: 0; } }
.karaoke .w { color: #64707D; transition: color .18s; }
.karaoke .w.on { color: #0B1B2E; }
.karaoke b.w.on { color: #0B1B2E; }
.kvn { display: flex; align-items: center; gap: 2.4cqw; margin-top: 2.4cqw; padding: 2cqw 3cqw; border-radius: 3cqw; background: #F1F3F6; color: #06609F; font-size: 3.7cqw; font-weight: 600; }
.play { width: 7cqw; height: 7cqw; border-radius: 50%; background: #0873C4; color: #fff; display: grid; place-items: center; flex-shrink: 0; }
.play svg { width: 3cqw; height: 3cqw; margin-left: .4cqw; }
.vbars { display: flex; align-items: center; gap: .6cqw; height: 5cqw; margin-left: auto; }
.vbars i { width: .8cqw; border-radius: 99px; background: #9FC4E8; }
.vbars i.on { background: #0873C4; }
.kvn time { color: #64707D; font-variant-numeric: tabular-nums; font-weight: 500; }
.kread { margin-top: 2cqw; font-size: 3.3cqw; color: #64707D; display: flex; align-items: center; gap: 1.4cqw; }

/* ── Cảnh 5: Nhận lịch (chat) ── */
.chat-head { display: flex; align-items: center; gap: 2.2cqw; padding: 1cqw 0 2.8cqw; border-bottom: 1px solid #E6EAEF; }
.chat-head .back { color: #076DBB; font-size: 7cqw; line-height: 1; margin-right: .6cqw; }
.chat-head b { display: block; font-size: 4.1cqw; }
.chat-head small { display: block; font-size: 3.1cqw; color: #64707D; }
.chat-body { margin: 0 -4.4cqw; padding: 3cqw 4.4cqw; background: #EEF1F4; height: 100%; }
.date-pill { width: max-content; margin: 0 auto 3cqw; font-size: 3cqw; color: #64707D; background: rgba(255,255,255,.8); border-radius: 99px; padding: .6cqw 2.6cqw; }
.msg-row { display: flex; align-items: flex-end; gap: 1.6cqw; margin-bottom: 2cqw; }
.msg-row .av { width: 6.6cqw; height: 6.6cqw; font-size: 2.6cqw; background: #64707D; }
.bub { max-width: 80%; padding: 2.4cqw 3.2cqw; border-radius: 5cqw; font-size: 3.9cqw; line-height: 1.36; }
.bub.in { background: #fff; border-bottom-left-radius: 1.6cqw; }
.bub.in small { display: block; color: #076DBB; font-weight: 700; font-size: 3.2cqw; margin-bottom: .4cqw; }
.bub.out { margin-left: auto; background: #0873C4; color: #fff; border-bottom-right-radius: 1.6cqw; transform-origin: right bottom; }
.out-wrap { display: flex; flex-direction: column; align-items: flex-end; }
.msg-meta { display: flex; align-items: center; gap: 2cqw; margin-top: 1.2cqw; font-size: 3cqw; color: #64707D; }
.undo { display: inline-flex; align-items: center; gap: 1cqw; padding: .6cqw 2.4cqw; border-radius: 99px; background: #FFF4DB; color: #B45309; border: 1px solid #F5C77E; font-weight: 600; }
.undo.pulse { animation: undo-pulse .8s ease-in-out 2; }
@keyframes undo-pulse { 50% { transform: scale(1.08); box-shadow: 0 0 0 1.4cqw rgba(224,138,0,.15); } }
.qr { position: absolute !important; left: 0; right: 0; bottom: 17cqw; padding: 2.6cqw 4.4cqw 2cqw; background: #fff; border-top: 1px solid #E6EAEF; z-index: 3; }
.qr-label { display: flex; align-items: center; gap: 1.2cqw; font-size: 3.2cqw; color: #64707D; margin-bottom: 2cqw; }
.qr-label svg { width: 3.6cqw; height: 3.6cqw; color: #C08A00; }
.qchips { display: flex; flex-wrap: wrap; gap: 1.6cqw; }
.qchip { position: relative; overflow: hidden; font-size: 3.5cqw; padding: 1.6cqw 3cqw; border-radius: 99px; background: #fff; border: 1px solid #D3D9E1; }
.qchip.sel { border: .5cqw solid #0873C4; background: #E6F3FC; color: #06609F; font-weight: 600; }
.composer { position: absolute !important; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: 2cqw; padding: 2.6cqw 4.4cqw 5cqw; background: #fff; z-index: 3; }
.composer span { flex: 1; height: 9.6cqw; border-radius: 99px; background: #F1F3F6; color: #64707D; font-size: 3.6cqw; display: flex; align-items: center; padding: 0 3.6cqw; }
.composer i { width: 9.6cqw; height: 9.6cqw; border-radius: 50%; background: #0873C4; display: grid; place-items: center; color: #fff; }
.composer svg { width: 4.6cqw; height: 4.6cqw; }

/* ── Cảnh 6: thanh tiến độ các bước ── */
.step-track { display: none; }
@media (min-width: 1000px) {
  .step-track { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; position: relative; height: 28px; margin-bottom: 1.25rem; --p: 0; }
  .step-track::before, .step-track::after { content: ""; position: absolute; top: 13px; height: 3px; border-radius: 3px; left: 12.5%; right: 12.5%; background: var(--line); }
  .step-track::after { background: var(--accent-fill); transform-origin: left center; transform: scaleX(var(--p)); }
  .step-track span { justify-self: center; position: relative; z-index: 1; width: 28px; height: 28px; border-radius: 50%; background: var(--surface); box-shadow: 0 0 0 3px var(--line) inset;
    transition: background-color var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out), transform var(--dur) var(--ease-out); }
  .step-track span.lit { background: var(--accent-fill); box-shadow: 0 0 0 5px var(--accent-soft); transform: scale(1.1); }
}
.step-num { transition: transform var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out); }
.js-steps .step-num { background: var(--surface-sunk); color: var(--ink-muted); box-shadow: 0 0 0 2px var(--control-border) inset; }
.js-steps .step-num.lit { color: #fff; }
.js-steps .step-num.lit { background: var(--accent-fill); transform: scale(1.12); box-shadow: 0 0 0 5px var(--accent-soft); }

/* ── Cảnh 8: nền ── */
.hero::before, .hero::after { content: ""; position: absolute; z-index: 0; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle at center, rgba(92,184,245,.32), rgba(92,184,245,0) 68%); }
.hero::before { width: 620px; height: 620px; top: -220px; right: -160px; }
.hero::after { width: 460px; height: 460px; bottom: -200px; left: -140px; background: radial-gradient(circle at center, rgba(8,115,196,.16), rgba(8,115,196,0) 70%); }
.hero > .container { position: relative; z-index: 1; }
.cta-band { position: relative; overflow: hidden; }
.cta-band .container { position: relative; z-index: 1; }
.cta-route { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.cta-route .road { fill: none; stroke: rgba(255,255,255,.22); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 2 14; animation: road 1.6s linear infinite; }
@keyframes road { to { stroke-dashoffset: -16; } }

/* Cảnh ra khỏi màn hình thì dừng hoạt cảnh lặp */
.hero.ambient:not(.is-live) .cloud, .hero.ambient:not(.is-live) .route-line,
.cta-band.ambient:not(.is-live) .road { animation-play-state: paused; }
.scene:not(.is-live) .feed-track, .scene:not(.is-live) .wave i, .scene:not(.is-live) .spk::before,
.scene:not(.is-live) .spk::after, .scene:not(.is-live) .caret { animation-play-state: paused; }

@media (prefers-reduced-motion: reduce) {
  .feed-track, .spk::before, .spk::after, .caret, .hero::before, .hero::after, .cta-route .road { animation: none !important; }
}

/* ── Nền hero: hàng nhà, mây, đường tuyến Đón → Đến ── */
.hero-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.skyline { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: clamp(150px, 24vw, 280px); color: var(--skyline); opacity: .75;
  -webkit-mask-image: linear-gradient(to top, #000 35%, transparent); mask-image: linear-gradient(to top, #000 35%, transparent); }
.cloud { position: absolute; fill: var(--cloud); filter: drop-shadow(0 6px 12px rgba(8,115,196,.06)); animation: cloud-drift 36s ease-in-out infinite alternate; }
.cloud.c1 { top: 7%; right: 4%; width: 190px; height: 76px; opacity: .9; }
.cloud.c2 { top: 22%; left: 46%; width: 120px; height: 48px; opacity: .65; animation-duration: 44s; animation-direction: alternate-reverse; }
.cloud.c3 { top: 4%; left: 20%; width: 150px; height: 60px; opacity: .55; animation-duration: 52s; }
@keyframes cloud-drift { to { transform: translateX(60px); } }
@media (max-width: 899px) { .cloud.c2, .cloud.c3 { display: none; } .cloud.c1 { top: auto; bottom: 52%; right: -36px; width: 130px; height: 52px; opacity: .8; } }

.hero-visual { position: relative; }
.hero-visual > .device-wrap { position: relative; z-index: 1; }
.hero-route { position: absolute; z-index: 0; left: -62%; top: -8%; width: 205%; height: auto; overflow: visible; pointer-events: none; }
.route-line { fill: none; stroke: #3D8FDB; stroke-width: 3.5; stroke-linecap: round; stroke-dasharray: 2 13; opacity: .7; animation: route-flow 1.5s linear infinite; }
@keyframes route-flow { to { stroke-dashoffset: -15; } }
.route-mask { stroke-dasharray: 1 1; stroke-dashoffset: 1; animation: route-draw 1.3s .35s var(--ease-out) forwards; }
@keyframes route-draw { to { stroke-dashoffset: 0; } }
.route-car { opacity: 0; animation: fade-in .3s 1.5s forwards; }
@keyframes fade-in { to { opacity: 1; } }
.pin use { fill: #0873C4; filter: drop-shadow(0 6px 8px rgba(8,115,196,.35)); transform-box: fill-box; transform-origin: 50% 100%; animation: pin-drop .7s cubic-bezier(.3,1.6,.5,1) both; }
.pin-from use { animation-delay: .25s; }
.pin-to use { animation-delay: 1.45s; }
@keyframes pin-drop { from { opacity: 0; transform: translateY(-28px) scale(.7); } 60% { opacity: 1; } to { opacity: 1; transform: none; } }
.pin-label { position: absolute; z-index: 2; display: inline-flex; gap: .3rem; padding: .35rem .75rem; border-radius: 999px; background: var(--surface);
  box-shadow: var(--shadow-card); font-size: .82rem; font-weight: 600; color: var(--ink); white-space: nowrap; animation: fade-up .3s var(--ease-out) both; }
.pin-label b { color: var(--accent); }
.pl-from { left: -38%; top: 92%; animation-delay: .6s; }
.pl-to { left: 112%; top: 10%; animation-delay: 1.8s; }
@media (max-width: 899px) { .pin-label { display: none; } }

/* Dải CTA: hàng nhà trắng mờ dưới đáy */
.cta-skyline { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 150px; color: #fff; opacity: .1; z-index: 0; pointer-events: none; }

@media (prefers-reduced-motion: reduce) {
  .cloud, .route-line, .pin use, .pin-label, .route-car { animation: none !important; }
  .route-mask { animation: none !important; stroke-dashoffset: 0; }
  .route-car { opacity: 1; }
}
