:root{--bg:#040b1e;--panel:rgba(7,22,51,.72);--panel2:rgba(10,28,64,.58);--line:rgba(95,172,255,.35);--line2:rgba(184,92,255,.38);--text:#eef6ff;--muted:#a8bad8;--cyan:#35d7ff;--violet:#8f43ff;--pink:#d850ff;--gold:#f8d76a;--shadow:0 24px 80px rgba(0,0,0,.42)}*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;min-height:100vh;font-family:Inter,Arial,Tahoma,sans-serif;color:var(--text);background:radial-gradient(circle at 20% -5%,#0d2862 0,transparent 35%),radial-gradient(circle at 84% 10%,#2a165b 0,transparent 32%),linear-gradient(180deg,#030815,#061632 55%,#020713);overflow-x:hidden;position:relative}.app{position:relative;z-index:2;max-width:1220px;margin:auto;padding:16px 14px 92px}.hero-section{height:360px;min-height:60vh;position:relative;border-radius:0 0 34px 34px;overflow:hidden;background:linear-gradient(180deg,rgba(7,17,42,.62),rgba(6,13,32,.85)),radial-gradient(circle at 50% 30%,rgba(72,162,255,.22),transparent 33%);box-shadow:inset 0 -1px 0 var(--line)}.hero-section:before{content:"";position:absolute;inset:0;background:radial-gradient(circle at 28% 28%,rgba(51,196,255,.28),transparent 15%),radial-gradient(circle at 77% 36%,rgba(157,86,255,.28),transparent 18%),linear-gradient(90deg,rgba(5,12,31,.2),transparent 25%,transparent 70%,rgba(5,12,31,.35));filter:saturate(1.15)}.topbar{position:relative;z-index:5;display:flex;justify-content:space-between;align-items:center;padding:16px}.top-actions{display:flex;gap:12px;align-items:center}.icon-btn,.profile-pill{border:1px solid rgba(163,204,255,.24);background:rgba(2,10,27,.55);color:white;border-radius:16px;min-width:44px;height:44px;backdrop-filter:blur(12px);box-shadow:0 0 20px rgba(56,158,255,.14)}.menu-btn{font-size:24px}.profile-pill{display:flex;align-items:center;gap:8px;padding:0 12px}.profile-pill b,.feature-card em{font-size:12px;background:linear-gradient(135deg,var(--cyan),var(--violet));padding:3px 7px;border-radius:999px;font-style:normal}.avatar{width:24px;height:24px;border-radius:50%;display:grid;place-items:center;background:#182e54}.hero-person{position:absolute;z-index:2;bottom:0;max-height:92%;object-fit:cover;filter:drop-shadow(0 0 34px rgba(0,161,255,.28))}.hero-left{left:-16px;width:30%;height:88%;object-position:center}.hero-right{right:-8px;width:29%;height:82%;object-position:center;opacity:.92;mask-image:linear-gradient(90deg,transparent 0%,#000 22%,#000 82%,transparent 100%);-webkit-mask-image:linear-gradient(90deg,transparent 0%,#000 22%,#000 82%,transparent 100%)}.hero-center{position:relative;z-index:4;text-align:center;max-width:700px;margin:0 auto;padding:8px 12px}.hero-center h1{font-family:Georgia,serif;font-size:clamp(42px,6vw,64px);font-style:italic;letter-spacing:1px;margin:8px 0 8px;text-shadow:0 0 22px #9bc8ff;color:#e6edff}.hero-center p{letter-spacing:2px;color:#cddcff;font-weight:700}.search-shell{margin:18px auto 14px;max-width:650px;height:68px;padding:7px 8px 7px 22px;border-radius:999px;background:rgba(12,29,67,.78);border:1px solid rgba(111,188,255,.55);display:flex;align-items:center;gap:12px;box-shadow:0 0 30px rgba(66,178,255,.22), inset 0 0 18px rgba(70,150,255,.14);backdrop-filter:blur(16px)}.search-shell input{flex:1;background:transparent;border:0;outline:0;color:white;min-width:0}.search-shell input::placeholder{color:#b9c8e3}.search-shell button,.primary{border:0;color:white;border-radius:999px;padding:15px 25px;font-weight:800;background:linear-gradient(135deg,#18c8ff,#7f35ff 70%,#b646ff);box-shadow:0 0 26px rgba(81,117,255,.5)}.quick-row{display:flex;gap:14px;justify-content:center;flex-wrap:wrap}.quick-row button,.feature-card button,.mini-card button,.glass-panel button,.chat-input button{border:1px solid rgba(144,105,255,.58);background:rgba(5,13,35,.55);color:#fff;border-radius:999px;padding:12px 18px;font-weight:800;box-shadow:inset 0 0 14px rgba(83,177,255,.1)}.feature-tabs-wrap{margin:18px 8px 16px;padding:18px 14px;border:1px solid rgba(128,84,255,.45);border-radius:28px;background:rgba(4,12,31,.72);display:flex;align-items:center;gap:10px;box-shadow:var(--shadow)}.slide-btn{width:30px;height:30px;border:0;border-radius:50%;background:rgba(65,91,143,.45);color:#bcd7ff}.feature-tabs{display:grid;grid-template-columns:repeat(8,1fr);gap:14px;width:100%}.tab-card{min-height:96px;border:1px solid rgba(95,172,255,.28);background:linear-gradient(180deg,rgba(16,40,87,.76),rgba(7,18,45,.88));border-radius:18px;color:white;font-weight:800;display:grid;place-items:center;gap:8px;padding:12px;transition:.2s;transform:scale(.9)}.tab-card .ico{font-size:30px;filter:drop-shadow(0 0 12px #58d3ff)}.tab-card.active,.tab-card:hover{border-color:rgba(168,86,255,.9);box-shadow:0 0 24px rgba(91,154,255,.25), inset 0 0 18px rgba(142,67,255,.18);transform:translateY(-3px) scale(.92)}.page{display:none;animation:pageIn .28s ease}.page.active{display:block}@keyframes pageIn{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}.dashboard-grid{display:grid;grid-template-columns:repeat(6,1fr);gap:14px}.feature-card,.mini-card,.glass-panel,.result-panel,.chat-page{position:relative;overflow:hidden;border:1px solid var(--line);border-radius:20px;background:linear-gradient(145deg,rgba(8,28,64,.82),rgba(4,13,34,.78));box-shadow:var(--shadow), inset 0 0 35px rgba(58,154,255,.08);backdrop-filter:blur(16px)}.feature-card:before,.mini-card:before,.glass-panel:before,.result-panel:before,.chat-page:before{content:"";position:absolute;inset:0;background:radial-gradient(circle at 78% 20%,rgba(43,198,255,.14),transparent 26%),radial-gradient(circle at 16% 80%,rgba(154,70,255,.12),transparent 23%);pointer-events:none}.feature-card>* ,.mini-card>* ,.glass-panel>* ,.result-panel>* ,.chat-page>*{position:relative}.feature-card{grid-column:span 3;min-height:250px;padding:28px;display:flex;justify-content:space-between;gap:20px}.feature-card h2,.mini-card h3,.glass-panel h2,.result-panel h2,.chat-page h2{margin:0 0 14px;color:#fff}.feature-card p,.mini-card p,.result-panel p{color:#c8d5eb;line-height:1.65}.card-art{min-width:210px;display:grid;place-items:center;font-size:58px;color:var(--cyan);text-shadow:0 0 22px var(--cyan)}.ai-head{font-size:56px;border-radius:50%;background:radial-gradient(circle,rgba(50,211,255,.18),transparent 70%)}.hand-art,.face-art,.bot-art{font-size:86px}.mini-card{grid-column:span 2;min-height:250px;padding:24px}.stats-card{display:grid;grid-template-columns:150px 1fr;gap:15px}.ring{width:140px;height:140px;border-radius:50%;display:grid;place-items:center;text-align:center;font-size:34px;font-weight:900;background:conic-gradient(var(--cyan) 0 75%,var(--violet) 75% 90%,rgba(255,255,255,.12) 0);box-shadow:0 0 28px rgba(55,204,255,.18)}.ring span{display:block;font-size:12px;font-weight:500}.stats-card ul{padding:0;margin:10px 0;list-style:none;color:#c8d5eb}.stats-card li{margin:18px 0}.stats-card b{float:right;color:var(--gold)}.wave{height:76px;display:flex;align-items:center;gap:8px}.wave i{display:block;width:5px;border-radius:99px;background:linear-gradient(var(--cyan),var(--violet));animation:wave 1.2s infinite ease-in-out;height:24px}.wave i:nth-child(2n){animation-delay:.15s;height:56px}.wave i:nth-child(3n){animation-delay:.3s;height:38px}@keyframes wave{50%{transform:scaleY(1.55);filter:drop-shadow(0 0 10px var(--violet))}}.route-layout{display:grid;grid-template-columns:360px 1fr;gap:16px}.glass-panel,.result-panel,.chat-page{padding:24px}.glass-panel label{display:block;color:#dbe7ff;font-weight:700;margin:14px 0}.glass-panel input,.glass-panel select,.glass-panel textarea,.chat-input input{width:100%;margin-top:8px;padding:13px 14px;border-radius:14px;border:1px solid rgba(112,179,255,.35);background:rgba(3,12,30,.58);color:white;outline:0}.glass-panel textarea{min-height:115px;resize:vertical}.glass-panel button{margin:8px 8px 0 0}.preview{width:100%;max-height:250px;object-fit:cover;border-radius:16px;margin-top:14px;border:1px solid var(--line);display:none}.result-panel{min-height:520px;line-height:1.75;color:#dce8ff}.result-panel h3{color:#8ee9ff}.result-panel ul{padding-left:22px}.result-panel.loading:after{content:"Đang gọi AI...";position:absolute;right:20px;top:20px;background:linear-gradient(135deg,var(--cyan),var(--violet));border-radius:999px;padding:8px 14px;font-weight:800}.chat-page{min-height:620px}.chat-log{height:470px;overflow:auto;display:flex;flex-direction:column;gap:12px;padding:10px}.msg{max-width:82%;padding:13px 15px;border-radius:18px;background:rgba(49,93,160,.32);line-height:1.55}.msg.me{align-self:flex-end;background:linear-gradient(135deg,rgba(45,198,255,.42),rgba(141,67,255,.35))}.chat-input{display:flex;gap:10px;margin-top:12px}.chat-input input{margin:0}.bottom-nav{position:fixed;z-index:20;left:50%;bottom:10px;transform:translateX(-50%);width:min(1160px,calc(100% - 22px));height:72px;border:1px solid rgba(107,173,255,.35);border-radius:24px;background:rgba(8,20,49,.82);backdrop-filter:blur(20px);display:grid;grid-template-columns:1fr 1fr 90px 1fr 1fr;align-items:center;box-shadow:0 -10px 40px rgba(0,0,0,.32)}.bottom-nav button{border:0;background:transparent;color:white;font-weight:800;display:grid;place-items:center;gap:3px}.bottom-nav .magic{width:78px;height:78px;margin:auto;border-radius:50%;background:radial-gradient(circle,#35d7ff,#743cff 70%);box-shadow:0 0 36px #674dff;font-size:32px;transform:translateY(-18px)}.side-menu{position:fixed;z-index:40;left:-320px;top:0;width:310px;height:100vh;padding:24px;background:rgba(4,13,34,.95);border-right:1px solid var(--line);backdrop-filter:blur(16px);transition:.25s}.side-menu.open{left:0}.menu-shade{position:fixed;inset:0;background:rgba(0,0,0,.45);z-index:35;display:none}.menu-shade.open{display:block}.close-menu{float:right;background:transparent;border:0;color:white;font-size:32px}.side-menu button.link{display:block;width:100%;margin:9px 0;padding:13px;border-radius:14px;border:1px solid rgba(94,170,255,.24);background:rgba(12,33,76,.72);color:white;text-align:left}.toast{position:fixed;z-index:60;right:18px;bottom:98px;background:rgba(8,20,49,.92);color:white;border:1px solid var(--line);border-radius:16px;padding:13px 16px;box-shadow:var(--shadow);opacity:0;transform:translateY(20px);transition:.25s}.toast.show{opacity:1;transform:none}.history-item{display:flex;gap:10px;align-items:center;justify-content:space-between;border-bottom:1px solid rgba(122,178,255,.18);padding:12px 0;color:#dbe7ff}.history-item small{color:#9fb4d7}.history-mini-item{display:flex;justify-content:space-between;gap:8px;padding:8px 0;color:#dce8ff;border-bottom:1px solid rgba(255,255,255,.08)}@media(max-width:920px){.app{padding-left:8px;padding-right:8px}.hero-section{height:auto;min-height:440px;border-radius:0 0 28px 28px}.hero-person{opacity:.58}.hero-left{width:42%;left:-70px}.hero-right{width:42%;right:-68px}.hero-center{padding-top:24px}.search-shell{height:auto;border-radius:26px;align-items:stretch;flex-wrap:wrap;padding:13px}.search-shell input{flex-basis:calc(100% - 32px)}.search-shell button{width:100%}.feature-tabs{display:flex;overflow:auto;scroll-snap-type:x mandatory}.tab-card{min-width:104px}.dashboard-grid{grid-template-columns:1fr}.feature-card,.mini-card{grid-column:span 1}.feature-card{min-height:auto}.card-art{min-width:95px;font-size:44px}.route-layout{grid-template-columns:1fr}.stats-card{grid-template-columns:1fr}.bottom-nav span{font-size:12px}.bottom-nav{grid-template-columns:1fr 1fr 78px 1fr 1fr}.bottom-nav .magic{width:66px;height:66px}.quick-row button{font-size:13px;padding:10px 12px}}@media(max-width:560px){.hero-center h1{font-size:38px}.hero-center p{font-size:12px}.hero-left{width:52%;left:-95px}.hero-right{width:48%;right:-96px}.feature-card{padding:20px;display:block}.card-art{margin-top:16px}.mini-card,.glass-panel,.result-panel,.chat-page{padding:18px}.bottom-nav{height:66px}.bottom-nav span{display:none}}

/* NAM6: hệ icon/logo tab neon đồng bộ giống ảnh mẫu */
.tab-card{position:relative;isolation:isolate}.tab-card .ico{display:none}.holo-icon{--c1:#36dcff;--c2:#8d49ff;position:relative;width:46px;height:46px;border-radius:16px;display:grid;place-items:center;background:radial-gradient(circle at 42% 34%,rgba(255,255,255,.34),transparent 15%),radial-gradient(circle at 50% 50%,color-mix(in srgb,var(--c1) 40%,transparent),transparent 48%),linear-gradient(145deg,rgba(12,39,89,.7),rgba(8,15,43,.95));border:1px solid color-mix(in srgb,var(--c1) 55%,transparent);box-shadow:0 0 18px color-mix(in srgb,var(--c1) 38%,transparent),inset 0 0 18px rgba(255,255,255,.07);filter:drop-shadow(0 0 10px color-mix(in srgb,var(--c1) 55%,transparent));overflow:hidden}.holo-icon:before,.holo-icon:after,.holo-icon i:before,.holo-icon i:after{content:"";position:absolute;display:block}.holo-icon:after{inset:7px;border-radius:13px;border:1px solid rgba(255,255,255,.14)}.holo-icon i{position:absolute;inset:0}.tab-card:hover .holo-icon,.tab-card.active .holo-icon{animation:iconFloat 1.6s ease-in-out infinite alternate;filter:drop-shadow(0 0 18px color-mix(in srgb,var(--c1) 78%,transparent))}.icon-palm{--c1:#6af4ff;--c2:#40a6ff}.icon-face,.icon-tarot{--c1:#c07cff;--c2:#ff66ef}.icon-astro,.icon-feng{--c1:#8d6cff;--c2:#31e6ff}.icon-chat{--c1:#59e1ff;--c2:#5e79ff}.icon-history{--c1:#60d6ff;--c2:#7fffd4}.icon-love{--c1:#ff69d2;--c2:#8a4dff}.icon-deep{--c1:#38e7ff;--c2:#a94cff}.icon-account{--c1:#dbe8ff;--c2:#8d49ff}
.icon-tuvi:before{width:25px;height:25px;border-radius:50%;border:2px solid var(--c1);box-shadow:inset 0 0 12px var(--c1),0 0 12px var(--c1)}.icon-tuvi i:before{width:35px;height:35px;left:5px;top:5px;border-radius:50%;border:1px dashed rgba(132,231,255,.75);animation:spin 8s linear infinite}.icon-tuvi i:after{width:7px;height:7px;border-radius:50%;background:var(--c2);left:20px;top:20px;box-shadow:0 -14px 0 #86f6ff,12px 7px 0 #a56cff,-12px 7px 0 #39e6ff}
.icon-palm:before{width:18px;height:24px;left:15px;top:16px;border-radius:8px 8px 10px 10px;background:linear-gradient(180deg,var(--c1),var(--c2));box-shadow:0 0 14px var(--c1)}.icon-palm i:before{width:5px;height:22px;left:11px;top:8px;border-radius:9px;background:var(--c1);box-shadow:7px -4px 0 var(--c1),14px -2px 0 var(--c1),21px 3px 0 var(--c1)}.icon-palm i:after{width:20px;height:2px;left:14px;top:27px;background:rgba(255,255,255,.65);box-shadow:0 6px 0 rgba(255,255,255,.35);transform:rotate(-10deg)}
.icon-face:before{width:25px;height:31px;left:10px;top:8px;border-radius:50% 50% 45% 45%;border:2px solid var(--c1);box-shadow:0 0 14px var(--c1),inset 0 0 10px rgba(192,124,255,.22)}.icon-face i:before{width:5px;height:5px;border-radius:50%;background:var(--c1);left:18px;top:21px;box-shadow:12px 0 0 var(--c1)}.icon-face i:after{width:13px;height:6px;border-bottom:2px solid var(--c1);left:17px;top:28px;border-radius:50%}
.icon-astro:before{width:25px;height:25px;border-radius:50%;border:2px solid var(--c2);left:10px;top:10px;box-shadow:0 0 14px var(--c2)}.icon-astro i:before{width:42px;height:14px;border:2px solid var(--c1);border-radius:50%;left:2px;top:16px;transform:rotate(-25deg)}.icon-astro i:after{width:7px;height:7px;border-radius:50%;background:var(--c1);right:8px;top:9px;box-shadow:0 0 12px var(--c1)}
.icon-chat:before{width:26px;height:22px;left:10px;top:15px;border-radius:9px;background:linear-gradient(180deg,var(--c1),#2369ff);box-shadow:0 0 16px var(--c1)}.icon-chat:after{width:14px;height:4px;left:16px;top:10px;border-radius:5px;background:var(--c1)}.icon-chat i:before{width:5px;height:5px;border-radius:50%;background:#07142f;left:17px;top:24px;box-shadow:10px 0 0 #07142f}.icon-chat i:after{width:2px;height:8px;left:22px;top:5px;background:var(--c1);box-shadow:0 0 8px var(--c1)}
.icon-feng:before{width:28px;height:28px;left:9px;top:9px;border-radius:50%;background:conic-gradient(var(--c1) 0 50%,var(--c2) 0 100%);box-shadow:0 0 16px var(--c1)}.icon-feng i:before{width:14px;height:14px;left:16px;top:9px;border-radius:50%;background:var(--c2);box-shadow:0 14px 0 var(--c1)}.icon-feng i:after{width:5px;height:5px;left:20.5px;top:13px;border-radius:50%;background:#07142f;box-shadow:0 14px 0 #07142f}
.icon-tarot:before{width:20px;height:28px;left:13px;top:9px;border-radius:4px;border:2px solid var(--c1);box-shadow:8px 4px 0 -1px rgba(192,124,255,.38),0 0 12px var(--c1);transform:rotate(-7deg)}.icon-tarot i:before{width:8px;height:8px;left:19px;top:18px;background:var(--c1);transform:rotate(45deg);box-shadow:0 0 10px var(--c1)}
.icon-history:before{width:28px;height:28px;left:9px;top:9px;border-radius:50%;border:3px solid var(--c1);border-left-color:transparent;box-shadow:0 0 14px var(--c1)}.icon-history i:before{width:8px;height:8px;border-left:3px solid var(--c1);border-top:3px solid var(--c1);left:8px;top:9px;transform:rotate(-35deg)}.icon-history i:after{width:2px;height:11px;background:var(--c1);left:23px;top:16px;transform-origin:bottom;transform:rotate(0deg);box-shadow:5px 7px 0 -1px var(--c1)}
.icon-love:before{width:22px;height:20px;left:12px;top:14px;background:linear-gradient(135deg,var(--c1),var(--c2));transform:rotate(-45deg);border-radius:5px;box-shadow:0 0 14px var(--c1)}.icon-love:after{width:22px;height:20px;left:12px;top:14px;background:linear-gradient(135deg,var(--c1),var(--c2));border-radius:50%;box-shadow:11px 0 0 color-mix(in srgb,var(--c2) 90%,#fff 10%)}
.icon-deep:before{width:29px;height:29px;left:8px;top:8px;border-radius:50%;background:radial-gradient(circle,var(--c1),transparent 35%),repeating-conic-gradient(from 0deg,rgba(53,220,255,.95) 0 12deg,transparent 12deg 34deg);box-shadow:0 0 18px var(--c1)}.icon-account:before{width:12px;height:12px;left:17px;top:10px;border-radius:50%;background:var(--c1);box-shadow:0 0 12px var(--c1)}.icon-account i:before{width:26px;height:15px;left:10px;top:25px;border-radius:16px 16px 8px 8px;background:linear-gradient(180deg,var(--c1),var(--c2));box-shadow:0 0 12px var(--c1)}
@keyframes spin{to{transform:rotate(360deg)}}@keyframes iconFloat{from{transform:translateY(0) scale(1)}to{transform:translateY(-3px) scale(1.04)}}
.side-menu button.link{display:flex;align-items:center;gap:10px}.side-menu .holo-icon{width:34px;height:34px;border-radius:12px;flex:0 0 auto}.side-menu .holo-icon:after{inset:5px}.side-menu .holo-icon:before,.side-menu .holo-icon i:before,.side-menu .holo-icon i:after{transform:scale(.74);transform-origin:center}.nav-ico{width:23px;height:23px;position:relative;display:block;filter:drop-shadow(0 0 8px #76dfff)}.nav-ico:before,.nav-ico:after{content:"";position:absolute;display:block}.nav-ico.home:before{inset:5px 4px 2px;border:2px solid #d6c1ff;border-top:0;border-radius:2px}.nav-ico.home:after{width:16px;height:16px;left:3px;top:1px;border-left:2px solid #d6c1ff;border-top:2px solid #d6c1ff;transform:rotate(45deg)}.nav-ico.history:before{inset:3px;border:2px solid #dbe8ff;border-radius:5px}.nav-ico.history:after{width:6px;height:6px;border-radius:50%;background:#80f2ff;left:8px;top:8px;box-shadow:0 0 9px #80f2ff}.nav-ico.chat:before{inset:4px;border:2px solid #dbe8ff;border-radius:7px}.nav-ico.chat:after{width:4px;height:4px;border-radius:50%;background:#80f2ff;left:7px;top:10px;box-shadow:7px 0 0 #80f2ff,14px 0 0 #80f2ff}.nav-ico.account:before{width:8px;height:8px;left:7px;top:2px;border-radius:50%;border:2px solid #dbe8ff}.nav-ico.account:after{width:18px;height:10px;left:2px;bottom:2px;border:2px solid #dbe8ff;border-radius:12px 12px 4px 4px}.mega-holo{position:relative;width:190px;height:170px;display:grid;place-items:center;color:#42e9ff;text-shadow:0 0 26px #36dcff;filter:drop-shadow(0 0 24px rgba(54,220,255,.6))}.mega-ai{border-radius:50%;font-size:54px;font-weight:900;background:radial-gradient(circle,rgba(54,220,255,.2),transparent 62%)}.mega-ai:before{content:"";position:absolute;inset:12px;border-radius:50%;border:2px dashed rgba(54,220,255,.45);animation:spin 16s linear infinite}.mega-hand:before{content:"";position:absolute;width:58px;height:76px;left:66px;top:58px;border-radius:25px 25px 30px 30px;background:linear-gradient(180deg,rgba(107,244,255,.85),rgba(89,111,255,.55));box-shadow:0 0 35px #36dcff}.mega-hand:after{content:"";position:absolute;width:16px;height:82px;left:52px;top:25px;border-radius:18px;background:#6af4ff;box-shadow:23px -14px 0 #6af4ff,46px -10px 0 #6af4ff,69px 4px 0 #6af4ff,0 0 24px #36dcff}.mega-face:before{content:"";position:absolute;width:105px;height:135px;border-radius:50% 50% 44% 44%;border:3px solid #c07cff;box-shadow:0 0 35px #b55cff,inset 0 0 28px rgba(192,124,255,.18)}.mega-face:after{content:"";position:absolute;width:66px;height:2px;background:#c07cff;box-shadow:0 28px 0 #c07cff,0 56px 0 rgba(192,124,255,.7);opacity:.8}.mega-bot:before{content:"";position:absolute;width:116px;height:86px;border-radius:30px;background:linear-gradient(180deg,#71e7ff,#305eff);box-shadow:0 0 36px #36dcff}.mega-bot:after{content:"";position:absolute;width:16px;height:16px;border-radius:50%;background:#07142f;left:72px;top:73px;box-shadow:36px 0 0 #07142f,18px 22px 0 -4px #07142f}

/* NAM7: pixel-perfect neon theme + Gemini real status */
.live-clock,.ai-status{font-size:11px;padding:8px 10px;border:1px solid rgba(117,240,255,.25);border-radius:999px;background:rgba(4,12,34,.45);backdrop-filter:blur(12px);color:#dcecff;box-shadow:0 0 18px rgba(49,209,255,.16);white-space:nowrap}.ai-status.ok{color:#9effdf;border-color:rgba(76,255,181,.45);box-shadow:0 0 18px rgba(76,255,181,.2)}.ai-status.warn{color:#ffd29a;border-color:rgba(255,178,76,.45);box-shadow:0 0 18px rgba(255,178,76,.16)}.msg.error{border-color:rgba(255,110,140,.45)!important;background:rgba(80,10,32,.45)!important;color:#ffe7ee}.hero-section{min-height:clamp(360px,60vh,560px)!important}.hero-person{object-fit:contain!important;object-position:bottom center!important;max-height:92%!important}.feature-tabs-wrap{transform:scale(.8);transform-origin:top center;width:125%;margin-left:-12.5%}@media(max-width:760px){.live-clock{display:none}.ai-status{font-size:10px;padding:7px 8px}.feature-tabs-wrap{transform:scale(.86);width:116%;margin-left:-8%}.hero-section{min-height:420px!important}.hero-person{opacity:.78}}

/* NAM10 refined */
.hero-section{background:linear-gradient(180deg,rgba(7,18,45,.92),rgba(7,16,38,.98)),url(assets/ui-reference.png) center/cover no-repeat!important;border-radius:34px!important;overflow:hidden!important}.hero-center h1{font-size:68px!important;letter-spacing:2px;text-shadow:0 0 35px rgba(89,227,255,.9)}.hero-center p{letter-spacing:4px!important}.search-shell{background:rgba(12,25,60,.52)!important;border:1px solid rgba(104,236,255,.45)!important;box-shadow:0 0 40px rgba(74,197,255,.25)!important}.feature-card,.mini-card,.tab-card{background:rgba(10,20,48,.82)!important;border:1px solid rgba(102,222,255,.18)!important;backdrop-filter:blur(16px)!important}.hero-left{left:-2%!important;mix-blend-mode:screen}.hero-right{right:-3%!important;mix-blend-mode:screen}.bottom-nav{background:rgba(7,14,35,.92)!important;border-top:1px solid rgba(108,227,255,.25)!important}.dashboard-grid{gap:22px!important}.feature-card h2{font-size:26px!important}.feature-card p{font-size:15px!important;line-height:1.7!important}
/* NAM11 small fixes: real app edit, no image generation */
.hero-section{isolation:isolate!important}
.hero-person{object-fit:contain!important;pointer-events:none!important;user-select:none!important;filter:drop-shadow(0 0 28px rgba(72,198,255,.34)) drop-shadow(0 0 50px rgba(138,73,255,.22))!important}
.hero-left{left:-18px!important;bottom:-8px!important;width:32%!important;height:96%!important;object-position:left bottom!important;opacity:.96!important;mix-blend-mode:normal!important;-webkit-mask-image:linear-gradient(90deg,#000 0%,#000 72%,rgba(0,0,0,.65) 86%,transparent 100%)!important;mask-image:linear-gradient(90deg,#000 0%,#000 72%,rgba(0,0,0,.65) 86%,transparent 100%)!important}
.hero-right{right:-2px!important;bottom:0!important;width:31%!important;height:94%!important;object-position:right bottom!important;opacity:.98!important;mix-blend-mode:normal!important;-webkit-mask-image:radial-gradient(ellipse 88% 88% at 50% 50%,#000 52%,rgba(0,0,0,0.85) 70%,rgba(0,0,0,0.25) 88%,transparent 100%)!important;mask-image:radial-gradient(ellipse 88% 88% at 50% 50%,#000 52%,rgba(0,0,0,0.85) 70%,rgba(0,0,0,0.25) 88%,transparent 100%)!important}
.hero-section:after{content:"";position:absolute;z-index:3;inset:0;background:linear-gradient(90deg,rgba(3,8,22,.10),transparent 24%,rgba(5,12,31,.50) 44%,rgba(5,12,31,.50) 58%,transparent 76%,rgba(3,8,22,.08));pointer-events:none}
.hero-center{z-index:6!important}.topbar{z-index:7!important}
.chat-upload-bar{display:flex;gap:10px;flex-wrap:wrap;margin:12px 0 8px;align-items:center}.upload-chip,.clear-attachments{border:1px solid rgba(99,222,255,.38);background:rgba(8,22,54,.70);color:#fff;border-radius:999px;padding:10px 14px;font-weight:800;box-shadow:0 0 18px rgba(67,196,255,.16);cursor:pointer}.upload-chip input{display:none}.clear-attachments{border-color:rgba(187,99,255,.42)}.chat-attachments{display:flex;gap:8px;flex-wrap:wrap;margin:6px 0 8px}.attachment-pill{display:flex;align-items:center;gap:8px;border:1px solid rgba(103,207,255,.28);background:rgba(5,13,35,.55);border-radius:999px;padding:8px 10px;color:#eaf6ff}.attachment-pill small{color:#9fb7d8}.attachment-pill button{border:0;background:rgba(255,255,255,.12);color:white;border-radius:50%;width:22px;height:22px}.msg-files{margin-top:8px;padding-top:8px;border-top:1px solid rgba(255,255,255,.14);font-size:12px;color:#d4e7ff}
@media(max-width:920px){.hero-left{width:43%!important;left:-78px!important}.hero-right{width:44%!important;right:-72px!important}.chat-upload-bar{gap:8px}.upload-chip,.clear-attachments{padding:9px 12px;font-size:13px}}
@media(max-width:560px){.hero-left{width:58%!important;left:-122px!important}.hero-right{width:56%!important;right:-112px!important}.chat-input{flex-wrap:wrap}.chat-input button{width:100%}}


/* NAM12 STABLE FIX - chỉ sửa app, không tạo ảnh mới
   - Dùng lại ảnh gốc để tránh lỗi xóa nền làm hỏng mặt/người.
   - Xóa nền/hòa banner bằng CSS mask + overlay, không redraw/tái tạo khuôn mặt.
   - Đưa ảnh phải sát mép banner.
*/
.hero-section{
  min-height:clamp(350px,60vh,530px)!important;
  background:
    radial-gradient(circle at 24% 18%,rgba(29,118,255,.36),transparent 21%),
    radial-gradient(circle at 78% 22%,rgba(145,77,255,.28),transparent 24%),
    linear-gradient(180deg,rgba(3,9,24,.64),rgba(4,11,28,.88)),
    url(assets/ui-reference.png) center/cover no-repeat!important;
}
.hero-section:before{
  z-index:1!important;
  background:
    radial-gradient(circle at 18% 35%,rgba(50,173,255,.20),transparent 22%),
    radial-gradient(circle at 83% 38%,rgba(188,84,255,.16),transparent 24%),
    linear-gradient(90deg,rgba(3,8,22,.22),transparent 24%,rgba(5,12,31,.40) 43%,rgba(5,12,31,.40) 58%,transparent 78%,rgba(3,8,22,.18))!important;
}
.hero-section:after{
  z-index:3!important;
  background:
    linear-gradient(90deg,rgba(2,7,20,.02),transparent 21%,rgba(5,12,31,.58) 40%,rgba(5,12,31,.58) 60%,transparent 80%,rgba(2,7,20,.02)),
    radial-gradient(circle at 50% 32%,rgba(58,191,255,.08),transparent 38%)!important;
}
.hero-person{
  z-index:2!important;
  pointer-events:none!important;
  user-select:none!important;
  max-height:none!important;
  filter:drop-shadow(0 0 22px rgba(63,185,255,.28)) drop-shadow(0 0 48px rgba(106,75,255,.20))!important;
  mix-blend-mode:normal!important;
}
.hero-left{
  content:url('assets/hero-left.png')!important;
  left:0!important;
  bottom:0!important;
  width:31.5%!important;
  height:100%!important;
  object-fit:cover!important;
  object-position:42% 48%!important;
  opacity:.92!important;
  -webkit-mask-image:linear-gradient(90deg,#000 0%,#000 70%,rgba(0,0,0,.65) 83%,transparent 100%),linear-gradient(0deg,transparent 0%,#000 11%,#000 100%)!important;
  mask-image:linear-gradient(90deg,#000 0%,#000 70%,rgba(0,0,0,.65) 83%,transparent 100%),linear-gradient(0deg,transparent 0%,#000 11%,#000 100%)!important;
  -webkit-mask-composite:source-in!important;
  mask-composite:intersect!important;
}
.hero-right{
  content:url('assets/hero-right.jpg')!important;
  right:0!important;
  bottom:0!important;
  width:30.5%!important;
  height:100%!important;
  object-fit:cover!important;
  object-position:72% 44%!important;
  opacity:.96!important;
  -webkit-mask-image:linear-gradient(90deg,transparent 0%,rgba(0,0,0,.18) 10%,rgba(0,0,0,.78) 24%,#000 42%,#000 100%),linear-gradient(0deg,transparent 0%,#000 9%,#000 100%)!important;
  mask-image:linear-gradient(90deg,transparent 0%,rgba(0,0,0,.18) 10%,rgba(0,0,0,.78) 24%,#000 42%,#000 100%),linear-gradient(0deg,transparent 0%,#000 9%,#000 100%)!important;
  -webkit-mask-composite:source-in!important;
  mask-composite:intersect!important;
}
.hero-center{max-width:690px!important;z-index:6!important}.topbar{z-index:8!important}.search-shell{max-width:650px!important}
.feature-card h2{text-transform:uppercase}.feature-card:nth-child(4) h2::first-letter{text-transform:uppercase}
.chat-upload-bar{display:flex!important}
#page-chat .chat-page h2{font-size:28px!important;text-transform:none!important}
@media(max-width:920px){
  .hero-left{left:-38px!important;width:42%!important;object-position:45% 50%!important;opacity:.88!important}
  .hero-right{right:-18px!important;width:41%!important;object-position:72% 45%!important;opacity:.92!important}
  .hero-center{max-width:620px!important}
}
@media(max-width:560px){
  .hero-left{left:-72px!important;width:58%!important;opacity:.78!important}
  .hero-right{right:-58px!important;width:56%!important;opacity:.82!important}
}


/* NAM14: Gemini Image AI inside chatbot - tạo ảnh & chỉnh sửa ảnh */
.chat-mode-tabs{display:flex;gap:10px;flex-wrap:wrap;margin:8px 0 12px}.chat-mode-tabs button{border:1px solid rgba(99,222,255,.32);background:rgba(7,21,52,.72);color:#dcecff;border-radius:999px;padding:10px 14px;font-weight:900;box-shadow:0 0 18px rgba(67,196,255,.12)}.chat-mode-tabs button.active{background:linear-gradient(135deg,rgba(25,201,255,.72),rgba(129,57,255,.72));border-color:rgba(167,224,255,.78);color:#fff;box-shadow:0 0 28px rgba(67,196,255,.32)}.image-ai-panel{border:1px solid rgba(108,227,255,.28);background:linear-gradient(145deg,rgba(8,28,64,.66),rgba(4,13,34,.62));border-radius:18px;padding:14px;margin:8px 0 12px;box-shadow:inset 0 0 28px rgba(56,158,255,.08)}.image-ai-head{display:flex;align-items:center;gap:10px;flex-wrap:wrap;color:#eaf6ff}.image-ai-head span{color:#a8bad8;font-size:13px}.image-edit-upload{margin-top:12px;display:inline-flex!important}.image-edit-preview{display:none;max-width:240px;max-height:180px;object-fit:cover;border-radius:16px;margin-top:12px;border:1px solid rgba(99,222,255,.38);box-shadow:0 0 22px rgba(67,196,255,.18)}.generated-images{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:12px;margin-top:12px}.generated-images figure{margin:0;border:1px solid rgba(99,222,255,.30);border-radius:18px;overflow:hidden;background:rgba(5,13,35,.55);box-shadow:0 0 24px rgba(67,196,255,.14)}.generated-images img{width:100%;display:block;max-height:380px;object-fit:contain;background:#020816}.generated-images figcaption{padding:10px;text-align:center}.generated-images a{display:inline-block;text-decoration:none;color:#fff;font-weight:900;border-radius:999px;padding:8px 13px;background:linear-gradient(135deg,#18c8ff,#7f35ff);box-shadow:0 0 18px rgba(81,117,255,.35)}.image-ai-result{max-width:94%!important}
@media(max-width:560px){.chat-mode-tabs button{flex:1;font-size:12px;padding:9px 8px}.image-edit-preview{max-width:100%}.generated-images{grid-template-columns:1fr}}


/* NAM16 camera + banner image edit tab */
.camera-line{display:inline-flex;align-items:center;gap:8px;margin:8px 0 12px;padding:10px 14px;border:1px solid rgba(72,210,255,.45);border-radius:999px;background:rgba(8,24,58,.72);box-shadow:0 0 18px rgba(0,195,255,.18);font-weight:700;color:#eaf6ff;cursor:pointer;width:max-content;max-width:100%}
.camera-line input{display:none}
.chat-mode-tabs button,.upload-chip{cursor:pointer}
.quick-row button:last-child{border-color:rgba(170,95,255,.72);box-shadow:0 0 18px rgba(139,92,246,.25)}
.account-ok{padding:14px;border:1px solid rgba(93,230,255,.35);border-radius:16px;background:rgba(12,55,78,.35)}
.account-warn{padding:14px;border:1px solid rgba(248,215,106,.35);border-radius:16px;background:rgba(78,58,12,.28)}
code{background:rgba(255,255,255,.08);padding:2px 6px;border-radius:8px;color:#9eefff}

/* NAM18: Professional member account + Google/Facebook login */
.auth-panel .muted,.auth-hint{color:var(--muted);font-size:13px;line-height:1.55}.social-login-row{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:12px 0}.social-login-row button{border-radius:16px;padding:12px 14px;font-weight:900;color:#fff;border:1px solid rgba(255,255,255,.18);box-shadow:0 0 22px rgba(67,196,255,.12)}.google-btn{background:linear-gradient(135deg,rgba(255,74,74,.82),rgba(255,180,42,.58))}.facebook-btn{background:linear-gradient(135deg,rgba(24,119,242,.92),rgba(68,72,255,.62))}.auth-divider{display:flex;align-items:center;gap:10px;margin:14px 0;color:var(--muted);font-size:12px;text-transform:uppercase;letter-spacing:.08em}.auth-divider:before,.auth-divider:after{content:"";height:1px;flex:1;background:linear-gradient(90deg,transparent,rgba(118,218,255,.38),transparent)}.account-head{display:flex;align-items:center;gap:12px}.account-avatar{width:58px;height:58px;border-radius:18px;object-fit:cover;border:1px solid rgba(99,222,255,.42);box-shadow:0 0 22px rgba(67,196,255,.20);background:rgba(12,31,70,.7);display:grid;place-items:center;font-size:24px}.account-avatar.fake{display:grid}.account-ok button{margin-top:10px}.account-warn,.account-ok{border:1px solid rgba(99,222,255,.22);background:rgba(7,21,52,.45);border-radius:18px;padding:14px}#accountStatus .account-ok p,#accountStatus .account-warn p{line-height:1.65}@media(max-width:680px){.social-login-row{grid-template-columns:1fr}.account-head{align-items:flex-start}}

.ai-provider-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:14px;margin:14px 0}.ai-provider-card{border:1px solid rgba(255,255,255,.16);background:rgba(255,255,255,.07);border-radius:18px;padding:14px}.ai-provider-card h3{margin:0 0 8px}.ai-provider-card input,.ai-provider-card select{width:100%;margin:6px 0 10px}.provider-dot{display:inline-block;width:10px;height:10px;border-radius:50%;background:#f59e0b;margin-right:6px}.provider-dot.ok{background:#22c55e}.multi-ai-toolbar{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:10px;margin:12px 0}.multi-ai-toolbar select,.multi-ai-toolbar input{width:100%}.council-toggle{display:flex;align-items:center;gap:8px;background:rgba(255,255,255,.07);border-radius:14px;padding:10px}.ai-note{font-size:.88rem;opacity:.8}.ai-status-list{display:grid;gap:8px}.ai-status-item{display:flex;justify-content:space-between;gap:10px;border-bottom:1px solid rgba(255,255,255,.12);padding:8px 0}.ai-status-item b{white-space:nowrap}.model-small{font-size:.8rem;opacity:.75}

/* NAM21: AI Chat Pro + Voice AI */
.chat-pro-page{padding:0!important;background:transparent!important;box-shadow:none!important;border:0!important}.chat-pro-shell{display:grid;grid-template-columns:300px minmax(0,1fr);gap:18px;min-height:72vh}.chat-pro-sidebar,.chat-pro-main{border:1px solid rgba(101,216,255,.22);background:linear-gradient(145deg,rgba(8,18,46,.82),rgba(8,11,33,.72));backdrop-filter:blur(18px);border-radius:28px;box-shadow:0 24px 80px rgba(0,0,0,.28),inset 0 0 44px rgba(51,174,255,.08)}.chat-pro-sidebar{padding:18px;display:flex;flex-direction:column;gap:14px}.chat-brand{display:flex;align-items:center;gap:12px}.brand-orb{width:46px;height:46px;border-radius:18px;display:grid;place-items:center;background:radial-gradient(circle at 30% 20%,#fff,#6fe9ff 35%,#6d35ff 72%,#12082c);box-shadow:0 0 28px rgba(97,210,255,.38);font-weight:900}.chat-brand h2,.chat-brand p{margin:0}.chat-brand p{color:var(--muted);font-size:13px}.new-chat-btn{width:100%;border:1px solid rgba(104,228,255,.32);background:linear-gradient(135deg,rgba(28,194,255,.35),rgba(121,65,255,.35));color:#fff;border-radius:18px;padding:13px 14px;font-weight:900}.mini-provider-list{display:grid;gap:8px}.mini-provider{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:10px 12px;border:1px solid rgba(255,255,255,.12);border-radius:16px;background:rgba(255,255,255,.055);color:#c9d7ef}.mini-provider.on{border-color:rgba(52,211,153,.38);background:rgba(20,121,93,.16);color:#eafff7}.mini-provider small{opacity:.72}.voice-settings{margin-top:auto;border-top:1px solid rgba(255,255,255,.12);padding-top:14px}.voice-settings h3{margin:0 0 10px}.voice-settings label{display:flex!important;align-items:center;gap:8px;margin:8px 0;color:#dcecff;font-size:13px}.voice-settings input[type=range]{width:100%}.voice-settings button,.chat-head-actions button{border:1px solid rgba(105,222,255,.28);border-radius:14px;background:rgba(255,255,255,.07);color:#eaf6ff;padding:9px 12px;font-weight:800}.chat-pro-main{padding:18px;display:flex;flex-direction:column;min-width:0}.chat-pro-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:10px}.chat-pro-head h2,.chat-pro-head p{margin:0}.chat-pro-head p{color:var(--muted);font-size:13px}.chat-head-actions{display:flex;gap:8px;flex-wrap:wrap}.pro-tabs{margin:4px 0 10px}.pro-toolbar{grid-template-columns:1.2fr 1fr auto!important;align-items:end}.voice-status{margin:8px 0 10px;border:1px solid rgba(255,255,255,.12);background:rgba(255,255,255,.06);border-radius:16px;padding:10px 12px;color:#bcd3f3;font-size:13px}.voice-status.listening{border-color:rgba(248,113,113,.55);background:rgba(127,29,29,.25);box-shadow:0 0 24px rgba(248,113,113,.18);color:#fff}.pro-chat-log{height:48vh;min-height:390px;overflow:auto;scroll-behavior:smooth;border-radius:24px;background:radial-gradient(circle at 20% 0%,rgba(61,170,255,.14),transparent 36%),rgba(2,8,23,.42);border:1px solid rgba(255,255,255,.10);padding:18px}.pro-chat-log .msg{max-width:86%;margin:12px 0;padding:14px 16px;border-radius:20px;line-height:1.65;border:1px solid rgba(255,255,255,.12);box-shadow:0 10px 30px rgba(0,0,0,.18)}.pro-chat-log .msg.me{margin-left:auto;background:linear-gradient(135deg,rgba(17,121,255,.42),rgba(113,37,255,.32));border-color:rgba(112,204,255,.28)}.pro-chat-log .msg:not(.me){background:rgba(255,255,255,.07)}.pro-chat-log .ai-msg{border-color:rgba(52,211,153,.25)!important;background:linear-gradient(145deg,rgba(11,68,75,.34),rgba(11,22,51,.50))!important}.msg-role{display:block;font-size:12px;text-transform:uppercase;letter-spacing:.08em;color:#92e6ff;margin-bottom:6px;font-weight:900}.ai-welcome{max-width:100%!important}.typing-dots{display:inline-flex;gap:4px;margin-right:8px}.typing-dots i{width:7px;height:7px;border-radius:50%;background:#7dd3fc;animation:synamDot 1s infinite ease-in-out}.typing-dots i:nth-child(2){animation-delay:.15s}.typing-dots i:nth-child(3){animation-delay:.3s}@keyframes synamDot{0%,80%,100%{opacity:.35;transform:translateY(0)}40%{opacity:1;transform:translateY(-4px)}}.pro-upload{border:1px solid rgba(255,255,255,.10);background:rgba(255,255,255,.045);border-radius:18px;padding:10px;margin-top:12px}.pro-input{display:grid!important;grid-template-columns:auto minmax(0,1fr) auto;gap:10px;align-items:center;margin-top:12px}.pro-input input,.pro-input textarea{min-height:52px;border-radius:18px!important;background:rgba(255,255,255,.08)!important;border:1px solid rgba(121,218,255,.20)!important;color:#fff;padding:14px 16px;resize:none;line-height:1.45;outline:none;max-height:240px;overflow:hidden}.pro-input button{height:52px;border-radius:18px!important}.voice-btn{width:54px;background:linear-gradient(135deg,#23d5ff,#7c3aed)!important;box-shadow:0 0 28px rgba(71,179,255,.22)!important}.voice-btn.recording{background:linear-gradient(135deg,#ff4040,#ff9f43)!important;animation:pulseVoice .95s infinite}@keyframes pulseVoice{0%,100%{transform:scale(1)}50%{transform:scale(1.06)}}.ai-provider-card input[type=password]{letter-spacing:.08em}.ai-provider-card input[type=password]::placeholder{letter-spacing:0;color:#9fb4d6}
@media(max-width:900px){.chat-pro-shell{grid-template-columns:1fr}.chat-pro-sidebar{order:2}.chat-pro-main{order:1}.pro-toolbar{grid-template-columns:1fr!important}.pro-chat-log{height:52vh;min-height:330px}.pro-chat-log .msg{max-width:94%}.chat-pro-head{flex-direction:column}.chat-head-actions{width:100%}.chat-head-actions button{flex:1}.pro-input{grid-template-columns:auto 1fr}.pro-input #chatSendBtn{grid-column:1/3;width:100%}}
@media(max-width:560px){.chat-pro-main,.chat-pro-sidebar{border-radius:22px;padding:12px}.pro-chat-log{padding:12px}.pro-chat-log .msg{font-size:14px}.chat-pro-shell{gap:12px}.pro-input input,.pro-input textarea{min-height:50px}.voice-btn{width:50px}}


/* NAM21.1 Voice Viet Pro */
.voice-settings select{width:100%;margin-top:6px;border:1px solid rgba(255,255,255,.18);border-radius:14px;padding:10px 12px;background:rgba(8,12,30,.7);color:#fff;outline:none}
.voice-note{font-size:12px;line-height:1.45;color:rgba(255,255,255,.72);margin:6px 0 10px}
.voice-status.listening{box-shadow:0 0 0 2px rgba(34,197,94,.35),0 0 22px rgba(34,197,94,.25)}

/* NAM23 AI Chat Ultra Pro update */
.voice-control-pro .voice-switch{border:1px solid rgba(100,220,255,.22);background:rgba(255,255,255,.055);border-radius:14px;padding:9px 10px!important;justify-content:flex-start}.voice-action-row{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:10px 0}.voice-action-row button{margin:0!important;width:100%;font-size:12px}.stop-btn{border-color:rgba(248,113,113,.45)!important;background:rgba(127,29,29,.30)!important}.mute-btn{border-color:rgba(96,165,250,.45)!important}.user-role small{display:inline-block;margin-left:6px;padding:1px 6px;border-radius:999px;background:rgba(255,255,255,.13);font-size:10px;color:#dbeafe}.pro-chat-log .msg.me .msg-role{color:#bdf7ff}.pro-chat-log .msg.me{position:relative}.pro-chat-log .msg.me:before{content:'';position:absolute;right:-6px;bottom:14px;border-width:8px 0 8px 8px;border-style:solid;border-color:transparent transparent transparent rgba(45,198,255,.42)}.pro-chat-log .ai-msg:before,.pro-chat-log .ai-welcome:before{content:'';position:absolute;left:-6px;bottom:14px;border-width:8px 8px 8px 0;border-style:solid;border-color:transparent rgba(255,255,255,.07) transparent transparent}.pro-chat-log .ai-msg,.pro-chat-log .ai-welcome{position:relative}.chat-pro-head h2:after{content:' NAM23';display:inline-block;margin-left:8px;font-size:12px;padding:3px 8px;border-radius:999px;background:rgba(34,211,238,.18);color:#a5f3fc;border:1px solid rgba(34,211,238,.28)}
@media(max-width:560px){.voice-action-row{grid-template-columns:1fr}.voice-action-row button{font-size:13px}.pro-chat-log .msg.me:before,.pro-chat-log .ai-msg:before,.pro-chat-log .ai-welcome:before{display:none}}


/* NAM24.1 UX REAL FIX: clean account, real menu scroll, real tab jump */
.side-menu{overflow-y:auto;overscroll-behavior:contain;padding-bottom:120px;}
.side-menu::-webkit-scrollbar{width:8px}.side-menu::-webkit-scrollbar-thumb{background:rgba(80,190,255,.45);border-radius:99px}
.side-menu button.link.active,.bottom-nav button.active{color:#7ee7ff;text-shadow:0 0 14px rgba(80,211,255,.7)}
.account-clean-layout .result-panel h3,.account-user-panel h3{color:#7ee7ff}
.account-user-panel{min-height:360px}
.clean-member-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:18px}
.clean-member-actions button{border:1px solid rgba(104,228,255,.32);background:rgba(255,255,255,.07);color:#fff;border-radius:999px;padding:11px 14px;font-weight:900}
#page-account .result-panel hr,#page-account .result-panel h3:not(.account-warn h3):not(.account-ok h3),#page-account .result-panel ul,#page-account .result-panel code{display:none!important}
.auth-panel .muted{font-size:14px;color:#bcd3f3}
.page.active{scroll-margin-top:18px}
html,body{scroll-padding-top:18px}
@media(max-width:920px){.side-menu{width:min(86vw,330px)}}

/* NAM25 MOBILE UX SURGERY: Đặng Năm brand + quick voice controls */
.voice-settings-compact{
  margin-top:10px!important;
  padding:0!important;
  border-top:1px solid rgba(255,255,255,.12)!important;
}
.voice-settings-compact summary{
  list-style:none;
  cursor:pointer;
  margin-top:12px;
  padding:11px 12px;
  border:1px solid rgba(105,222,255,.28);
  border-radius:16px;
  background:rgba(255,255,255,.065);
  color:#eaf6ff;
  font-weight:900;
}
.voice-settings-compact summary::-webkit-details-marker{display:none}
.voice-settings-compact:not([open]) > *:not(summary){display:none!important}
.mobile-voice-input .quick-voice-btn,
.mobile-voice-input .quick-stop-btn{
  width:54px;
  min-width:54px;
  padding:0!important;
  display:grid;
  place-items:center;
  border:1px solid rgba(105,222,255,.28)!important;
  background:rgba(255,255,255,.075)!important;
  color:#fff!important;
  box-shadow:0 0 18px rgba(71,179,255,.13)!important;
}
.mobile-voice-input .quick-voice-btn.off{opacity:.65;filter:grayscale(.35)}
.mobile-voice-input .quick-stop-btn{border-color:rgba(248,113,113,.48)!important;background:rgba(127,29,29,.28)!important}
.chat-pro-sidebar .mini-provider-list{max-height:300px;overflow:auto;padding-right:2px}
.chat-pro-sidebar .mini-provider-list::-webkit-scrollbar{width:6px}.chat-pro-sidebar .mini-provider-list::-webkit-scrollbar-thumb{background:rgba(80,190,255,.35);border-radius:99px}

@media(max-width:900px){
  .chat-pro-sidebar{order:2}
  .chat-pro-main{order:1}
  .chat-pro-sidebar .chat-brand,.chat-pro-sidebar .new-chat-btn{display:none}
  .voice-settings-compact{margin-top:0!important}
  .chat-pro-sidebar{padding-top:10px!important}
}
@media(max-width:560px){
  .hero-section{min-height:clamp(430px,72vh,560px)!important}
  .hero-center h1{font-size:clamp(54px,18vw,86px)!important;line-height:.98!important}
  .hero-center p{font-size:12px!important;letter-spacing:.28em!important}
  .search-shell{padding:12px!important;border-radius:28px!important}
  .search-shell input{font-size:16px!important}
  .search-shell button{height:54px!important;border-radius:22px!important}
  .quick-row{gap:10px!important}.quick-row button{font-size:13px!important;padding:11px 12px!important}
  .chat-pro-head{gap:8px!important;margin-bottom:8px!important}
  .chat-pro-head h2{font-size:25px!important}
  .chat-head-actions{display:grid!important;grid-template-columns:1fr 1fr!important}
  .chat-mode-tabs{gap:8px!important}
  .chat-mode-tabs button{font-size:13px!important;padding:10px 8px!important}
  .pro-toolbar{gap:8px!important;margin:8px 0!important}
  .voice-status{font-size:12px!important;padding:8px 10px!important;margin:6px 0 8px!important}
  .pro-chat-log{height:45vh!important;min-height:300px!important}
  .pro-upload{padding:8px!important}.chat-upload-bar{gap:8px!important}
  .upload-chip,.clear-attachments{font-size:13px!important;padding:9px 10px!important}
  .mobile-voice-input{grid-template-columns:50px minmax(0,1fr) 50px 50px!important;gap:8px!important;position:sticky;bottom:92px;z-index:20;background:rgba(4,10,27,.92);backdrop-filter:blur(14px);border:1px solid rgba(105,222,255,.18);border-radius:20px;padding:8px;box-shadow:0 12px 34px rgba(0,0,0,.32)}
  .mobile-voice-input #chatSendBtn{grid-column:1/5!important;width:100%!important;height:48px!important}
  .mobile-voice-input input,.mobile-voice-input textarea{min-height:48px!important;font-size:15px!important}
  .mobile-voice-input .voice-btn,.mobile-voice-input .quick-voice-btn,.mobile-voice-input .quick-stop-btn{width:50px!important;min-width:50px!important;height:48px!important;border-radius:16px!important}
  .bottom-nav{z-index:30!important}
}

.icon-num{--c1:#f8d76a;--c2:#35d7ff}.icon-num:before{content:'🔢';font-size:25px;left:8px;top:8px;filter:drop-shadow(0 0 10px var(--c1))}

/* NAM29 Voice UX Pro: ô chat tự mở rộng để nhìn rõ nội dung đang đọc/gõ */
#chatText{width:100%;white-space:pre-wrap}
#chatText::placeholder{color:#9fb4d6}
@media(max-width:560px){#chatText{max-height:170px!important}}


/* NAM31: ẩn lộ model/provider trong chat + thu nhỏ ảnh banner phải còn 80% */
.hero-right{
  transform:scale(.8)!important;
  transform-origin:right bottom!important;
}
@media(max-width:920px){.hero-right{transform:scale(.8)!important;transform-origin:right bottom!important}}
@media(max-width:560px){.hero-right{transform:scale(.8)!important;transform-origin:right bottom!important}}


/* NAM32: Banner phải hiển thị rõ, đầy đủ ảnh và khớp trong banner */
.hero-right{
  content:url('assets/hero-right.jpg')!important;
  right:0!important;
  bottom:0!important;
  width:32%!important;
  height:96%!important;
  max-height:96%!important;
  object-fit:contain!important;
  object-position:right bottom!important;
  transform:none!important;
  opacity:1!important;
  mix-blend-mode:normal!important;
  -webkit-mask-image:linear-gradient(90deg,transparent 0%,rgba(0,0,0,.72) 12%,#000 26%,#000 100%)!important;
  mask-image:linear-gradient(90deg,transparent 0%,rgba(0,0,0,.72) 12%,#000 26%,#000 100%)!important;
  filter:drop-shadow(0 0 28px rgba(72,198,255,.32)) drop-shadow(0 0 44px rgba(138,73,255,.20))!important;
}
@media(max-width:920px){
  .hero-right{right:0!important;width:46%!important;height:92%!important;max-height:92%!important;object-fit:contain!important;object-position:right bottom!important;transform:none!important;opacity:.96!important}
}
@media(max-width:560px){
  .hero-right{right:0!important;width:58%!important;height:88%!important;max-height:88%!important;object-fit:contain!important;object-position:right bottom!important;transform:none!important;opacity:.92!important}
}

/* NAM33 REAL DASHBOARD + BANNER BLEND FIX */
.hero-section{isolation:isolate!important}
.hero-right{
  content:url('assets/hero-right.jpg')!important;
  right:0!important;
  bottom:0!important;
  width:36%!important;
  height:94%!important;
  max-height:94%!important;
  object-fit:contain!important;
  object-position:right bottom!important;
  transform:none!important;
  opacity:.96!important;
  border:0!important;
  outline:0!important;
  box-shadow:none!important;
  filter:drop-shadow(0 0 26px rgba(103,97,255,.42)) drop-shadow(0 0 44px rgba(45,213,255,.18))!important;
  mix-blend-mode:screen!important;
  -webkit-mask-image:radial-gradient(ellipse at 70% 56%,#000 0%,#000 47%,rgba(0,0,0,.82) 61%,rgba(0,0,0,.38) 76%,transparent 96%)!important;
  mask-image:radial-gradient(ellipse at 70% 56%,#000 0%,#000 47%,rgba(0,0,0,.82) 61%,rgba(0,0,0,.38) 76%,transparent 96%)!important;
}
.hero-section:after{
  content:""!important;
  position:absolute!important;
  z-index:3!important;
  right:0!important;
  bottom:0!important;
  width:43%!important;
  height:100%!important;
  pointer-events:none!important;
  background:linear-gradient(90deg,rgba(4,11,30,.88) 0%,rgba(4,11,30,.28) 18%,transparent 40%),radial-gradient(circle at 92% 68%,rgba(124,77,255,.16),transparent 46%)!important;
}
.hero-center,.topbar{position:relative!important;z-index:5!important}
.nam33-card-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}.nam33-card-actions button{padding:9px 12px!important;font-size:13px!important}.nam33-voice-controls{display:grid;grid-template-columns:1fr;gap:10px;margin:12px 0}.nam33-voice-controls select,.nam33-voice-controls input{width:100%;border:1px solid rgba(100,200,255,.35);background:rgba(2,12,34,.62);color:#fff;border-radius:14px;padding:10px}.nam33-stats-card .ring{grid-row:span 2;position:relative}.nam33-stats-card .ring span{font-size:32px;font-weight:900}.nam33-stats-card .ring small{display:block;font-size:12px;color:#dbe7ff;font-weight:600}.history-mini-item{cursor:pointer;border-radius:12px;padding:10px!important}.history-mini-item:hover{background:rgba(80,180,255,.12)}
@media(max-width:920px){.hero-right{right:-4px!important;width:48%!important;height:91%!important;max-height:91%!important;object-fit:contain!important;opacity:.9!important}.hero-section:after{width:58%!important;background:linear-gradient(90deg,rgba(4,11,30,.75) 0%,rgba(4,11,30,.22) 20%,transparent 48%)!important}}
@media(max-width:560px){.hero-right{right:-10px!important;width:62%!important;height:86%!important;max-height:86%!important;object-position:right bottom!important;opacity:.84!important}.hero-section:after{width:74%!important}.nam33-card-actions button{flex:1}.stats-card{grid-template-columns:1fr!important}.nam33-stats-card .ring{margin:auto}}

/* NAM34: weather server guard + banner giữ ảnh gốc vừa khớp + tabs gọn */
.hero-right{
  content:normal!important;
  right:0!important;
  bottom:0!important;
  width:34%!important;
  height:94%!important;
  max-height:94%!important;
  object-fit:contain!important;
  object-position:right bottom!important;
  transform:none!important;
  opacity:1!important;
  mix-blend-mode:normal!important;
  border:0!important;
  outline:0!important;
  box-shadow:none!important;
  filter:drop-shadow(0 0 24px rgba(85,180,255,.28))!important;
  -webkit-mask-image:linear-gradient(90deg,transparent 0%,rgba(0,0,0,.7) 10%,#000 24%,#000 100%)!important;
  mask-image:linear-gradient(90deg,transparent 0%,rgba(0,0,0,.7) 10%,#000 24%,#000 100%)!important;
}
.hero-section:after{
  width:38%!important;
  background:linear-gradient(90deg,rgba(4,11,30,.78) 0%,rgba(4,11,30,.25) 18%,transparent 44%)!important;
}
.feature-tabs-wrap{
  padding:10px 10px!important;
  margin:12px 8px 14px!important;
  border-radius:22px!important;
  overflow:hidden!important;
}
.feature-tabs{
  display:flex!important;
  gap:8px!important;
  overflow-x:auto!important;
  overflow-y:hidden!important;
  scroll-snap-type:x mandatory!important;
  -webkit-overflow-scrolling:touch!important;
  padding:2px 4px 8px!important;
}
.feature-tabs::-webkit-scrollbar{height:4px}.feature-tabs::-webkit-scrollbar-thumb{background:rgba(100,200,255,.45);border-radius:99px}
.tab-card{
  flex:0 0 112px!important;
  min-height:74px!important;
  padding:8px 8px!important;
  gap:4px!important;
  font-size:13px!important;
  transform:none!important;
}
.tab-card .holo-icon{transform:scale(.82)!important;margin-bottom:0!important}.tab-card.active,.tab-card:hover{transform:translateY(-2px)!important}
@media(max-width:920px){
  .hero-right{width:46%!important;height:90%!important;max-height:90%!important;right:-2px!important;opacity:1!important}
  .hero-section:after{width:54%!important}
  .tab-card{flex-basis:96px!important;min-height:68px!important;font-size:12px!important}
}
@media(max-width:560px){
  .hero-right{width:58%!important;height:84%!important;max-height:84%!important;right:-4px!important;opacity:1!important;object-fit:contain!important;object-position:right bottom!important}
  .hero-section:after{width:68%!important}
  .feature-tabs-wrap{padding:8px 8px!important;margin:10px 4px 12px!important}
  .slide-btn{display:none!important}
  .tab-card{flex:0 0 86px!important;min-height:62px!important;font-size:11px!important;border-radius:14px!important}
  .tab-card span:last-child{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:78px!important}
}

/* NAM35: căn lại thanh tab chức năng - không lệch, không sổ hết */
.feature-tabs-wrap{
  width:min(980px,calc(100% - 18px))!important;
  margin:14px auto 18px!important;
  padding:10px 12px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:8px!important;
  overflow:hidden!important;
  border-radius:24px!important;
}
.feature-tabs{
  flex:1 1 auto!important;
  width:100%!important;
  max-width:900px!important;
  display:flex!important;
  flex-wrap:nowrap!important;
  align-items:stretch!important;
  justify-content:flex-start!important;
  gap:8px!important;
  overflow-x:auto!important;
  overflow-y:hidden!important;
  padding:4px 6px 8px!important;
  margin:0!important;
  scroll-snap-type:x proximity!important;
}
.feature-tabs .tab-card,
.tab-card{
  flex:0 0 96px!important;
  width:96px!important;
  min-width:96px!important;
  max-width:96px!important;
  min-height:70px!important;
  padding:7px 6px!important;
  margin:0!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:center!important;
  text-align:center!important;
  line-height:1.15!important;
  border-radius:16px!important;
  transform:none!important;
  scroll-snap-align:start!important;
}
.tab-card .holo-icon{
  width:34px!important;
  height:34px!important;
  min-width:34px!important;
  transform:none!important;
  margin:0 0 3px 0!important;
}
.tab-card span:last-child{
  display:block!important;
  width:100%!important;
  max-width:86px!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  font-size:11.5px!important;
}
.tab-card.active,
.tab-card:hover{
  transform:translateY(-1px)!important;
}
.slide-btn{
  flex:0 0 28px!important;
  width:28px!important;
  height:28px!important;
  display:grid!important;
  place-items:center!important;
}
@media(min-width:1100px){
  .feature-tabs-wrap{width:min(1030px,calc(100% - 24px))!important}
  .feature-tabs{max-width:950px!important}
  .feature-tabs .tab-card,.tab-card{flex-basis:100px!important;width:100px!important;min-width:100px!important;max-width:100px!important}
}
@media(max-width:920px){
  .feature-tabs-wrap{width:calc(100% - 12px)!important;margin:12px auto 16px!important;padding:9px 8px!important}
  .feature-tabs{max-width:none!important;gap:7px!important;padding:4px 4px 7px!important}
  .feature-tabs .tab-card,.tab-card{flex-basis:88px!important;width:88px!important;min-width:88px!important;max-width:88px!important;min-height:64px!important}
  .tab-card .holo-icon{width:30px!important;height:30px!important;min-width:30px!important}
  .tab-card span:last-child{font-size:10.5px!important;max-width:78px!important}
}
@media(max-width:560px){
  .feature-tabs-wrap{width:calc(100% - 8px)!important;margin:10px auto 14px!important;padding:8px 6px!important;border-radius:20px!important}
  .slide-btn{display:none!important}
  .feature-tabs{padding:3px 3px 7px!important;gap:6px!important}
  .feature-tabs .tab-card,.tab-card{flex:0 0 78px!important;width:78px!important;min-width:78px!important;max-width:78px!important;min-height:58px!important;padding:6px 4px!important}
  .tab-card .holo-icon{width:27px!important;height:27px!important;min-width:27px!important}
  .tab-card span:last-child{font-size:9.8px!important;max-width:70px!important}
}


/* NAM36: tabs thẳng hàng + banner phải giữ nguyên ảnh, vừa banner */
.hero-right{
  content:url('assets/hero-right.jpg')!important;
  right:0!important;
  bottom:0!important;
  height:100%!important;
  max-height:100%!important;
  width:auto!important;
  max-width:36%!important;
  object-fit:contain!important;
  object-position:right center!important;
  transform:none!important;
  opacity:1!important;
  mix-blend-mode:normal!important;
  border:0!important;
  box-shadow:none!important;
  filter:drop-shadow(0 0 28px rgba(50,170,255,.25))!important;
  -webkit-mask-image:linear-gradient(90deg,transparent 0%,rgba(0,0,0,.72) 12%,#000 30%,#000 100%)!important;
  mask-image:linear-gradient(90deg,transparent 0%,rgba(0,0,0,.72) 12%,#000 30%,#000 100%)!important;
}
.feature-tabs-wrap{
  width:min(1040px,calc(100% - 24px))!important;
  margin:16px auto 18px!important;
  padding:10px 12px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:8px!important;
  overflow:hidden!important;
}
.feature-tabs{
  flex:1 1 auto!important;
  width:100%!important;
  display:flex!important;
  flex-direction:row!important;
  flex-wrap:nowrap!important;
  align-items:center!important;
  justify-content:flex-start!important;
  gap:8px!important;
  overflow-x:auto!important;
  overflow-y:hidden!important;
  padding:4px 4px 8px!important;
  margin:0!important;
  scrollbar-width:none!important;
  -webkit-overflow-scrolling:touch!important;
}
.feature-tabs::-webkit-scrollbar{display:none!important}
.feature-tabs .tab-card{
  flex:0 0 92px!important;
  width:92px!important;
  min-width:92px!important;
  max-width:92px!important;
  height:68px!important;
  min-height:68px!important;
  max-height:68px!important;
  padding:6px 5px!important;
  margin:0!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:center!important;
  text-align:center!important;
  gap:3px!important;
  transform:none!important;
}
.feature-tabs .tab-card .holo-icon{width:31px!important;height:31px!important;min-width:31px!important;margin:0!important;transform:none!important}
.feature-tabs .tab-card span:last-child{font-size:10.5px!important;line-height:1.05!important;max-width:82px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
.feature-tabs .tab-card.active,.feature-tabs .tab-card:hover{transform:translateY(-1px)!important}
@media(max-width:920px){
  .hero-right{height:96%!important;max-width:46%!important;right:0!important;object-position:right center!important}
  .feature-tabs-wrap{width:calc(100% - 10px)!important;margin:12px auto 14px!important;padding:8px 8px!important}
  .feature-tabs .tab-card{flex-basis:84px!important;width:84px!important;min-width:84px!important;max-width:84px!important;height:62px!important;min-height:62px!important;max-height:62px!important}
  .feature-tabs .tab-card .holo-icon{width:28px!important;height:28px!important;min-width:28px!important}
  .feature-tabs .tab-card span:last-child{font-size:9.8px!important;max-width:76px!important}
}
@media(max-width:560px){
  .hero-right{height:90%!important;max-width:58%!important;right:0!important;object-fit:contain!important}
  .feature-tabs-wrap{width:calc(100% - 8px)!important;border-radius:18px!important;padding:7px 5px!important}
  .slide-btn{display:none!important}
  .feature-tabs{gap:6px!important;padding-bottom:7px!important}
  .feature-tabs .tab-card{flex-basis:74px!important;width:74px!important;min-width:74px!important;max-width:74px!important;height:56px!important;min-height:56px!important;max-height:56px!important;padding:5px 3px!important}
  .feature-tabs .tab-card .holo-icon{width:25px!important;height:25px!important;min-width:25px!important}
  .feature-tabs .tab-card span:last-child{font-size:9px!important;max-width:68px!important}
}

/* NAM37: Careful UI lock - banner ảnh phải khớp khung, tab không lệch, dashboard không bị nav che */
.hero-section{
  height:clamp(330px,42vw,430px)!important;
  min-height:0!important;
  overflow:hidden!important;
  isolation:isolate!important;
}
.hero-section::after{
  content:""!important;
  position:absolute!important;
  z-index:3!important;
  right:0!important;
  top:0!important;
  bottom:0!important;
  width:42%!important;
  pointer-events:none!important;
  background:linear-gradient(90deg,rgba(4,11,30,.84) 0%,rgba(4,11,30,.42) 22%,rgba(4,11,30,0) 48%)!important;
}
.hero-person{user-select:none!important;pointer-events:none!important;}
.hero-right{
  content:url('assets/hero-right.jpg')!important;
  right:0!important;
  bottom:0!important;
  top:auto!important;
  width:34%!important;
  height:100%!important;
  max-width:none!important;
  max-height:100%!important;
  object-fit:contain!important;
  object-position:right center!important;
  transform:none!important;
  opacity:.98!important;
  filter:drop-shadow(0 0 30px rgba(57,168,255,.32)) saturate(1.06)!important;
  -webkit-mask-image: radial-gradient(ellipse 88% 88% at 50% 50%, #000 52%, rgba(0,0,0,0.85) 70%, rgba(0,0,0,0.25) 88%, transparent 100%) !important;
  mask-image: radial-gradient(ellipse 88% 88% at 50% 50%, #000 52%, rgba(0,0,0,0.85) 70%, rgba(0,0,0,0.25) 88%, transparent 100%) !important;
  -webkit-mask-image:
    linear-gradient(to right, transparent 0%, rgba(0,0,0,0.18) 5%, rgba(0,0,0,0.82) 15%, #000 26%, #000 78%, rgba(0,0,0,0.82) 89%, rgba(0,0,0,0.18) 96%, transparent 100%),
    linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.18) 3%, rgba(0,0,0,0.82) 7%, #000 13%, #000 85%, rgba(0,0,0,0.82) 92%, rgba(0,0,0,0.18) 97%, transparent 100%) !important;
  -webkit-mask-composite: source-in !important;
  mask-image:
    linear-gradient(to right, transparent 0%, rgba(0,0,0,0.18) 5%, rgba(0,0,0,0.82) 15%, #000 26%, #000 78%, rgba(0,0,0,0.82) 89%, rgba(0,0,0,0.18) 96%, transparent 100%),
    linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.18) 3%, rgba(0,0,0,0.82) 7%, #000 13%, #000 85%, rgba(0,0,0,0.82) 92%, rgba(0,0,0,0.18) 97%, transparent 100%) !important;
  mask-composite: intersect !important;
}
.hero-left{
  left:0!important;
  bottom:0!important;
  width:31%!important;
  height:94%!important;
  object-fit:contain!important;
  object-position:left bottom!important;
  opacity:.96!important;
}
.hero-center{max-width:680px!important;padding-top:4px!important;}
.topbar{padding:12px 16px!important;}
.top-actions{gap:8px!important;}
.live-clock{font-size:12px!important;white-space:nowrap!important;}
.ai-status{font-size:12px!important;white-space:nowrap!important;}
.search-shell{height:58px!important;margin:14px auto 12px!important;max-width:620px!important;}
.quick-row{gap:10px!important;}
.quick-row button{padding:10px 14px!important;font-size:14px!important;}
.feature-tabs-wrap{
  position:relative!important;
  z-index:7!important;
  width:min(1080px,calc(100% - 28px))!important;
  margin:12px auto 20px!important;
  padding:9px 10px!important;
  min-height:86px!important;
  overflow:hidden!important;
  align-items:center!important;
  transform:translateZ(0)!important;
}
.feature-tabs{
  display:flex!important;
  flex-wrap:nowrap!important;
  align-items:center!important;
  justify-content:flex-start!important;
  gap:7px!important;
  overflow-x:auto!important;
  overflow-y:hidden!important;
  padding:3px 4px!important;
  margin:0!important;
  height:72px!important;
  scrollbar-width:none!important;
}
.feature-tabs::-webkit-scrollbar{display:none!important;}
.feature-tabs .tab-card{
  flex:0 0 88px!important;
  width:88px!important;
  min-width:88px!important;
  max-width:88px!important;
  height:64px!important;
  min-height:64px!important;
  max-height:64px!important;
  padding:6px 4px!important;
  margin:0!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:center!important;
  gap:3px!important;
  line-height:1.05!important;
  transform:none!important;
}
.feature-tabs .tab-card .holo-icon{width:29px!important;height:29px!important;min-width:29px!important;margin:0!important;}
.feature-tabs .tab-card span:last-child{font-size:9.8px!important;max-width:80px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;}
.slide-btn{display:grid!important;place-items:center!important;flex:0 0 26px!important;width:26px!important;height:26px!important;min-width:26px!important;}
.dashboard-grid{margin-bottom:24px!important;}
.bottom-nav{height:64px!important;bottom:8px!important;}
.bottom-nav .magic{width:68px!important;height:68px!important;transform:translateY(-14px)!important;}
@media(max-width:920px){
  .hero-section{height:clamp(300px,58vw,390px)!important;}
  .hero-center{max-width:62%!important;margin-left:22%!important;margin-right:18%!important;}
  .hero-center h1{font-size:clamp(38px,7vw,58px)!important;}
  .hero-center p{font-size:12px!important;letter-spacing:.18em!important;}
  .hero-left{width:30%!important;height:90%!important;}
  .hero-right{width:38%!important;height:100%!important;}
  .hero-section::after{width:50%!important;}
  .top-actions .live-clock{display:none!important;}
  .feature-tabs-wrap{width:calc(100% - 12px)!important;min-height:78px!important;padding:8px 7px!important;}
  .feature-tabs{height:66px!important;gap:6px!important;}
  .feature-tabs .tab-card{flex-basis:78px!important;width:78px!important;min-width:78px!important;max-width:78px!important;height:58px!important;min-height:58px!important;max-height:58px!important;}
  .feature-tabs .tab-card .holo-icon{width:25px!important;height:25px!important;min-width:25px!important;}
  .feature-tabs .tab-card span:last-child{font-size:8.9px!important;max-width:72px!important;}
}
@media(max-width:560px){
  .hero-section{height:430px!important;}
  .hero-left{width:42%!important;height:54%!important;opacity:.9!important;}
  .hero-right{width:60%!important;height:56%!important;opacity:.92!important;object-position:right bottom!important;}
  .hero-section::after{width:72%!important;background:linear-gradient(90deg,rgba(4,11,30,.92) 0%,rgba(4,11,30,.55) 24%,rgba(4,11,30,0) 58%)!important;}
  .hero-center{max-width:100%!important;margin:0!important;padding:36px 10px 0!important;}
  .hero-center h1{font-size:clamp(44px,15vw,64px)!important;}
  .search-shell{height:auto!important;min-height:56px!important;padding:8px 8px 8px 14px!important;}
  .search-shell button{padding:12px 14px!important;font-size:12px!important;}
  .quick-row button{font-size:12px!important;padding:9px 10px!important;}
  .feature-tabs-wrap{margin-top:10px!important;min-height:70px!important;width:calc(100% - 8px)!important;}
  .feature-tabs{height:60px!important;}
  .feature-tabs .tab-card{flex-basis:70px!important;width:70px!important;min-width:70px!important;max-width:70px!important;height:54px!important;min-height:54px!important;max-height:54px!important;border-radius:14px!important;}
  .feature-tabs .tab-card .holo-icon{width:23px!important;height:23px!important;min-width:23px!important;}
  .feature-tabs .tab-card span:last-child{font-size:8.4px!important;max-width:64px!important;}
  .bottom-nav{height:60px!important;border-radius:20px!important;}
}

/* NAM38: Mobile hero surgery - desktop giữ nguyên, mobile không còn ảnh đè chữ/ô tìm kiếm */
@media(max-width:560px){
  .app{padding:0 10px 92px!important;max-width:100%!important;}
  .hero-section{
    height:560px!important;
    min-height:560px!important;
    border-radius:0 0 28px 28px!important;
    margin:0 -10px 0!important;
    padding:0 10px!important;
    background:
      linear-gradient(180deg,rgba(5,12,31,.60),rgba(5,12,31,.90)),
      radial-gradient(circle at 52% 36%,rgba(55,201,255,.22),transparent 34%),
      radial-gradient(circle at 85% 62%,rgba(153,70,255,.24),transparent 30%)!important;
  }
  .topbar{
    padding:16px 8px 8px!important;
    gap:8px!important;
    align-items:center!important;
  }
  .menu-btn{width:58px!important;min-width:58px!important;height:58px!important;border-radius:22px!important;font-size:28px!important;}
  .top-actions{flex:1!important;min-width:0!important;gap:6px!important;justify-content:flex-end!important;}
  .top-actions .profile-pill,.top-actions .live-clock{display:none!important;}
  .top-actions .ai-status{
    flex:1 1 auto!important;
    min-width:0!important;
    max-width:210px!important;
    height:42px!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
    white-space:nowrap!important;
    font-size:14px!important;
    padding:0 12px!important;
    border-radius:999px!important;
  }
  .top-actions .icon-btn{width:50px!important;min-width:50px!important;height:50px!important;border-radius:20px!important;font-size:23px!important;}

  .hero-left{
    z-index:1!important;
    left:-12px!important;
    bottom:74px!important;
    width:48%!important;
    height:42%!important;
    object-fit:contain!important;
    object-position:left bottom!important;
    opacity:.36!important;
    filter:blur(.2px) drop-shadow(0 0 22px rgba(47,184,255,.22))!important;
  }
  .hero-right{
    z-index:1!important;
    right:-4px!important;
    bottom:0!important;
    width:55%!important;
    height:45%!important;
    object-fit:contain!important;
    object-position:right bottom!important;
    opacity:.42!important;
    filter:blur(.15px) drop-shadow(0 0 28px rgba(133,80,255,.25))!important;
    -webkit-mask-image:linear-gradient(90deg,transparent 0%,rgba(0,0,0,.35) 12%,#000 34%,#000 100%)!important;
    mask-image:linear-gradient(90deg,transparent 0%,rgba(0,0,0,.35) 12%,#000 34%,#000 100%)!important;
  }
  .hero-section::after{
    z-index:2!important;
    inset:0!important;
    width:100%!important;
    background:
      linear-gradient(180deg,rgba(4,11,30,.10) 0%,rgba(4,11,30,.44) 58%,rgba(4,11,30,.82) 100%),
      radial-gradient(circle at 50% 48%,rgba(44,202,255,.16),transparent 34%)!important;
  }
  .hero-center{
    position:relative!important;
    z-index:5!important;
    max-width:100%!important;
    margin:0 auto!important;
    padding:64px 10px 0!important;
    text-align:center!important;
  }
  .hero-center h1{
    font-size:clamp(48px,16vw,68px)!important;
    line-height:.96!important;
    margin:16px 0 12px!important;
    text-shadow:0 0 24px rgba(160,215,255,.95),0 4px 18px rgba(0,0,0,.55)!important;
  }
  .hero-center p{
    max-width:96%!important;
    margin:0 auto 16px!important;
    font-size:12px!important;
    line-height:1.45!important;
    letter-spacing:.22em!important;
    text-shadow:0 2px 12px rgba(0,0,0,.75)!important;
  }
  .search-shell{
    width:100%!important;
    max-width:100%!important;
    min-height:146px!important;
    height:auto!important;
    margin:14px auto 16px!important;
    padding:14px!important;
    display:grid!important;
    grid-template-columns:30px minmax(0,1fr)!important;
    gap:10px!important;
    border-radius:28px!important;
    background:rgba(12,25,58,.74)!important;
    border:1px solid rgba(97,221,255,.48)!important;
    backdrop-filter:blur(18px)!important;
  }
  .search-shell span{align-self:center!important;justify-self:center!important;font-size:22px!important;}
  .search-shell input{
    width:100%!important;
    min-width:0!important;
    font-size:18px!important;
    line-height:1.35!important;
  }
  .search-shell button{
    grid-column:1/3!important;
    width:100%!important;
    height:62px!important;
    border-radius:24px!important;
    font-size:16px!important;
    padding:0!important;
  }
  .quick-row{
    display:grid!important;
    grid-template-columns:1fr 1fr!important;
    gap:10px!important;
    max-width:100%!important;
    margin:0 auto!important;
  }
  .quick-row button{
    min-height:54px!important;
    padding:10px 8px!important;
    font-size:14px!important;
    border-radius:22px!important;
    white-space:normal!important;
  }
  .quick-row button:nth-child(n+3){display:none!important;}

  .feature-tabs-wrap{
    margin:14px auto 18px!important;
    padding:10px 8px!important;
    min-height:88px!important;
    border-radius:24px!important;
  }
  .feature-tabs{height:70px!important;gap:10px!important;padding:4px 4px 8px!important;}
  .feature-tabs .tab-card{
    flex:0 0 92px!important;
    width:92px!important;
    min-width:92px!important;
    max-width:92px!important;
    height:66px!important;
    min-height:66px!important;
    max-height:66px!important;
    border-radius:18px!important;
  }
  .feature-tabs .tab-card .holo-icon{width:31px!important;height:31px!important;min-width:31px!important;}
  .feature-tabs .tab-card span:last-child{font-size:10.5px!important;max-width:84px!important;}
  .dashboard-grid{display:block!important;}
  .feature-card,.mini-card{margin:14px 0!important;min-height:auto!important;}
  .bottom-nav{width:calc(100% - 20px)!important;}
}

/* NAM40 STABLE: Desktop giữ NAM38, Mobile trả về bố cục NAM36 để không vỡ màn hình điện thoại */
@media (max-width: 920px){
  .app{padding-left:8px!important;padding-right:8px!important;max-width:100%!important;}
  .hero-section{
    height:auto!important;
    min-height:440px!important;
    border-radius:0 0 28px 28px!important;
    margin:0!important;
    padding:0!important;
    overflow:hidden!important;
  }
  .hero-person{opacity:.58!important;z-index:2!important;pointer-events:none!important;}
  .hero-left{
    width:42%!important;
    height:88%!important;
    left:-70px!important;
    right:auto!important;
    bottom:0!important;
    object-fit:contain!important;
    object-position:bottom center!important;
    transform:none!important;
    filter:drop-shadow(0 0 34px rgba(0,161,255,.28))!important;
  }
  .hero-right{
    width:42%!important;
    max-width:none!important;
    height:82%!important;
    right:-68px!important;
    left:auto!important;
    bottom:0!important;
    object-fit:contain!important;
    object-position:bottom center!important;
    transform:none!important;
    opacity:.58!important;
    filter:drop-shadow(0 0 34px rgba(0,161,255,.28))!important;
    -webkit-mask-image:linear-gradient(90deg,transparent 0%,#000 22%,#000 82%,transparent 100%)!important;
    mask-image:linear-gradient(90deg,transparent 0%,#000 22%,#000 82%,transparent 100%)!important;
  }
  .hero-section::after{
    content:""!important;
    position:absolute!important;
    inset:0!important;
    z-index:3!important;
    width:auto!important;
    pointer-events:none!important;
    background:linear-gradient(90deg,rgba(3,8,22,.10),transparent 24%,rgba(5,12,31,.50) 44%,rgba(5,12,31,.50) 58%,transparent 76%,rgba(3,8,22,.08))!important;
  }
  .hero-center{
    position:relative!important;
    z-index:6!important;
    max-width:620px!important;
    margin:0 auto!important;
    padding:24px 12px 0!important;
    text-align:center!important;
  }
  .hero-center h1{font-size:clamp(38px,8vw,58px)!important;line-height:1!important;margin:8px 0!important;}
  .hero-center p{font-size:12px!important;letter-spacing:2px!important;margin:0 0 12px!important;}
  .search-shell{
    width:auto!important;
    max-width:650px!important;
    height:auto!important;
    min-height:0!important;
    margin:18px auto 14px!important;
    padding:13px!important;
    border-radius:26px!important;
    display:flex!important;
    align-items:stretch!important;
    flex-wrap:wrap!important;
    gap:12px!important;
    grid-template-columns:none!important;
  }
  .search-shell span{align-self:center!important;justify-self:auto!important;font-size:inherit!important;}
  .search-shell input{flex:1 1 calc(100% - 32px)!important;width:auto!important;min-width:0!important;font-size:16px!important;line-height:normal!important;}
  .search-shell button{width:100%!important;height:auto!important;min-height:46px!important;border-radius:999px!important;padding:13px 20px!important;font-size:14px!important;grid-column:auto!important;}
  .quick-row{display:flex!important;gap:14px!important;justify-content:center!important;flex-wrap:wrap!important;max-width:100%!important;}
  .quick-row button{display:inline-flex!important;align-items:center!important;justify-content:center!important;min-height:0!important;font-size:13px!important;padding:10px 12px!important;white-space:nowrap!important;}
  .quick-row button:nth-child(n+3){display:inline-flex!important;}
  .feature-tabs-wrap{
    width:auto!important;
    min-height:0!important;
    margin:18px 8px 16px!important;
    padding:18px 14px!important;
    border-radius:28px!important;
    transform:scale(.86)!important;
    transform-origin:top center!important;
    overflow:hidden!important;
  }
  .feature-tabs{
    display:flex!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
    scroll-snap-type:x mandatory!important;
    height:auto!important;
    gap:14px!important;
    padding:0!important;
  }
  .feature-tabs .tab-card,.tab-card{
    flex:0 0 104px!important;
    width:104px!important;
    min-width:104px!important;
    max-width:104px!important;
    height:auto!important;
    min-height:86px!important;
    max-height:none!important;
    padding:10px!important;
    border-radius:18px!important;
  }
  .feature-tabs .tab-card .holo-icon,.tab-card .holo-icon{width:30px!important;height:30px!important;min-width:30px!important;}
  .feature-tabs .tab-card span:last-child,.tab-card span:last-child{font-size:10.5px!important;max-width:92px!important;white-space:normal!important;line-height:1.15!important;}
}

@media (max-width: 560px){
  .app{padding:0 8px 92px!important;}
  .hero-section{
    height:auto!important;
    min-height:420px!important;
    border-radius:0 0 28px 28px!important;
    margin:0!important;
    padding:0!important;
  }
  .topbar{padding:16px!important;gap:8px!important;}
  .menu-btn{width:auto!important;min-width:44px!important;height:44px!important;border-radius:16px!important;font-size:24px!important;}
  .top-actions{gap:8px!important;justify-content:flex-end!important;}
  .top-actions .profile-pill,.top-actions .live-clock{display:none!important;}
  .top-actions .ai-status{max-width:165px!important;height:38px!important;font-size:10px!important;padding:7px 8px!important;}
  .top-actions .icon-btn{width:44px!important;min-width:44px!important;height:44px!important;border-radius:16px!important;font-size:20px!important;}
  .hero-center{padding:24px 12px 0!important;max-width:100%!important;}
  .hero-center h1{font-size:38px!important;line-height:1.05!important;margin:8px 0!important;}
  .hero-center p{font-size:12px!important;letter-spacing:2px!important;line-height:1.35!important;}
  .hero-left{width:52%!important;height:88%!important;left:-95px!important;bottom:0!important;opacity:.58!important;}
  .hero-right{width:48%!important;height:82%!important;right:-96px!important;bottom:0!important;opacity:.58!important;}
  .search-shell{margin:18px auto 14px!important;padding:13px!important;border-radius:26px!important;min-height:0!important;}
  .search-shell input{font-size:15px!important;}
  .search-shell button{height:auto!important;min-height:46px!important;border-radius:999px!important;font-size:14px!important;}
  .quick-row{gap:10px!important;display:flex!important;}
  .quick-row button{font-size:13px!important;padding:10px 12px!important;white-space:nowrap!important;display:inline-flex!important;}
  .feature-tabs-wrap{margin:18px 8px 16px!important;padding:18px 14px!important;transform:scale(.86)!important;width:auto!important;min-height:0!important;border-radius:28px!important;}
  .feature-tabs{height:auto!important;gap:14px!important;padding:0!important;}
  .feature-tabs .tab-card,.tab-card{flex:0 0 104px!important;width:104px!important;min-width:104px!important;max-width:104px!important;min-height:86px!important;height:auto!important;}
  .feature-tabs .tab-card .holo-icon,.tab-card .holo-icon{width:25px!important;height:25px!important;min-width:25px!important;}
  .feature-tabs .tab-card span:last-child,.tab-card span:last-child{font-size:9px!important;max-width:68px!important;}
  .dashboard-grid{display:grid!important;grid-template-columns:1fr!important;}
  .feature-card{padding:20px!important;display:block!important;min-height:auto!important;}
  .mini-card,.glass-panel,.result-panel,.chat-page{padding:18px!important;}
  .bottom-nav{height:66px!important;border-radius:24px!important;}
  .bottom-nav span{display:none!important;}
}

/* NAM41 MOBILE FIRST REAL FIX - ưu tiên điện thoại, không để ảnh/banner đè layout */
@media (max-width: 640px){
  html,body{width:100%!important;max-width:100%!important;overflow-x:hidden!important;background:#111d53!important;}
  body{font-size:15px!important;}
  .app{width:100%!important;max-width:100%!important;margin:0!important;padding:0 10px 94px!important;overflow-x:hidden!important;}

  /* Banner điện thoại: gọn, rõ, không bị desktop ép xuống mobile */
  .hero-section{
    width:100%!important;
    min-height:0!important;
    height:auto!important;
    margin:0 auto 14px!important;
    padding:0!important;
    border-radius:0 0 28px 28px!important;
    overflow:hidden!important;
    background:
      radial-gradient(circle at 15% 88%, rgba(18,185,255,.22), transparent 34%),
      radial-gradient(circle at 90% 50%, rgba(178,65,255,.25), transparent 34%),
      linear-gradient(180deg, rgba(5,14,39,.98), rgba(10,22,66,.96))!important;
  }
  .hero-section:before{opacity:.28!important;}
  .hero-section:after{background:linear-gradient(180deg,rgba(2,8,24,.16),rgba(2,8,24,.58))!important;z-index:3!important;}
  .hero-person{position:absolute!important;pointer-events:none!important;z-index:2!important;filter:drop-shadow(0 0 24px rgba(22,194,255,.22))!important;}
  .hero-left{width:38%!important;height:48%!important;left:-44px!important;bottom:92px!important;opacity:.34!important;object-fit:contain!important;object-position:left bottom!important;transform:none!important;}
  .hero-right{width:42%!important;height:58%!important;right:-54px!important;bottom:52px!important;opacity:.38!important;object-fit:contain!important;object-position:right bottom!important;transform:none!important;-webkit-mask-image:linear-gradient(90deg,transparent 0%,#000 24%,#000 100%)!important;mask-image:linear-gradient(90deg,transparent 0%,#000 24%,#000 100%)!important;}

  .topbar{position:relative!important;z-index:8!important;padding:16px 14px 8px!important;display:flex!important;align-items:center!important;justify-content:space-between!important;gap:8px!important;}
  .menu-btn,.top-actions .icon-btn{width:54px!important;height:54px!important;min-width:54px!important;border-radius:20px!important;font-size:26px!important;background:rgba(4,11,31,.74)!important;}
  .top-actions{display:flex!important;gap:8px!important;align-items:center!important;margin-left:auto!important;}
  .top-actions .live-clock,.top-actions .profile-pill{display:none!important;}
  .top-actions .ai-status{max-width:190px!important;min-width:0!important;height:44px!important;border-radius:999px!important;font-size:13px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;padding:0 14px!important;background:rgba(4,17,39,.62)!important;}

  .hero-center{position:relative!important;z-index:7!important;width:100%!important;max-width:100%!important;margin:0!important;padding:42px 18px 22px!important;text-align:center!important;}
  .hero-center h1{font-size:clamp(46px,15vw,62px)!important;line-height:.96!important;margin:0 auto 18px!important;max-width:360px!important;letter-spacing:.01em!important;text-shadow:0 4px 18px rgba(0,0,0,.72)!important;}
  .hero-center p{font-size:13px!important;line-height:1.55!important;letter-spacing:.24em!important;margin:0 auto 18px!important;max-width:330px!important;text-shadow:0 3px 12px rgba(0,0,0,.78)!important;}

  .search-shell{width:100%!important;max-width:100%!important;min-height:0!important;margin:0 auto 18px!important;padding:13px!important;border-radius:26px!important;display:grid!important;grid-template-columns:28px minmax(0,1fr)!important;gap:9px 10px!important;background:rgba(10,21,49,.78)!important;border:1px solid rgba(89,221,255,.42)!important;box-shadow:0 18px 42px rgba(0,0,0,.28)!important;}
  .search-shell span{font-size:23px!important;align-self:center!important;justify-self:center!important;}
  .search-shell input{width:100%!important;min-width:0!important;height:42px!important;font-size:17px!important;line-height:1.25!important;white-space:nowrap!important;text-overflow:ellipsis!important;overflow:hidden!important;padding:0!important;background:transparent!important;}
  .search-shell button{grid-column:1/3!important;width:100%!important;height:58px!important;min-height:58px!important;border-radius:22px!important;font-size:16px!important;font-weight:900!important;padding:0 16px!important;}

  .quick-row{width:100%!important;display:grid!important;grid-template-columns:1fr 1fr!important;gap:10px!important;margin:0!important;}
  .quick-row button{display:flex!important;align-items:center!important;justify-content:center!important;width:100%!important;min-height:54px!important;padding:10px 8px!important;border-radius:999px!important;font-size:14px!important;line-height:1.15!important;white-space:normal!important;}
  .quick-row button:nth-child(n+5){grid-column:1/3!important;max-width:240px!important;margin:auto!important;}

  /* Tabs mobile: nhìn đủ, không phóng to/cắt */
  .feature-tabs-wrap{width:100%!important;margin:10px auto 18px!important;padding:14px 12px!important;border-radius:26px!important;transform:none!important;min-height:0!important;overflow:hidden!important;}
  .slide-btn{width:38px!important;height:38px!important;min-width:38px!important;}
  .feature-tabs{height:auto!important;display:flex!important;gap:12px!important;overflow-x:auto!important;overflow-y:hidden!important;padding:0 2px 4px!important;scroll-snap-type:x mandatory!important;}
  .feature-tabs .tab-card,.tab-card{flex:0 0 96px!important;width:96px!important;min-width:96px!important;max-width:96px!important;min-height:82px!important;height:82px!important;padding:9px 7px!important;border-radius:18px!important;scroll-snap-align:center!important;}
  .feature-tabs .tab-card .holo-icon,.tab-card .holo-icon{width:32px!important;height:32px!important;min-width:32px!important;}
  .feature-tabs .tab-card span:last-child,.tab-card span:last-child{font-size:11px!important;line-height:1.15!important;max-width:82px!important;white-space:normal!important;}

  .dashboard-grid{display:grid!important;grid-template-columns:1fr!important;gap:14px!important;margin-top:8px!important;}
  .feature-card,.mini-card,.glass-panel,.result-panel,.chat-page{border-radius:24px!important;padding:18px!important;margin:0!important;min-height:auto!important;}
  .feature-card h2{font-size:24px!important;line-height:1.15!important;}

  /* Chat giống app chat chuyên nghiệp hơn trên điện thoại */
  #page-chat.page.active{display:block!important;padding-bottom:10px!important;}
  .chat-page{padding:0!important;background:transparent!important;border:none!important;box-shadow:none!important;}
  .chat-pro-shell{display:block!important;}
  .chat-pro-sidebar{display:none!important;}
  .chat-pro-main{min-height:calc(100vh - 104px)!important;border-radius:26px!important;padding:12px!important;background:rgba(5,12,31,.88)!important;border:1px solid rgba(98,218,255,.18)!important;}
  .chat-pro-head{display:flex!important;align-items:flex-start!important;justify-content:space-between!important;gap:10px!important;margin-bottom:10px!important;}
  .chat-pro-head h2{font-size:22px!important;margin:0!important;}
  .chat-pro-head p{font-size:12px!important;margin:4px 0 0!important;color:#b9c9e8!important;}
  .chat-head-actions{display:flex!important;gap:6px!important;width:auto!important;}
  .chat-head-actions button{font-size:0!important;width:42px!important;height:42px!important;padding:0!important;border-radius:14px!important;}
  .chat-head-actions button:first-child:before{content:'⚙️';font-size:18px!important;}
  .chat-head-actions button:last-child:before{content:'🔊';font-size:18px!important;}
  .chat-mode-tabs{display:grid!important;grid-template-columns:1fr 1fr 1fr!important;gap:7px!important;margin:8px 0!important;}
  .chat-mode-tabs button{font-size:12px!important;padding:10px 4px!important;border-radius:14px!important;}
  .multi-ai-toolbar{display:none!important;}
  .voice-status{display:none!important;}
  .pro-chat-log{height:calc(100vh - 318px)!important;min-height:320px!important;max-height:none!important;padding:12px!important;border-radius:22px!important;background:rgba(2,8,24,.52)!important;overflow-y:auto!important;}
  .pro-chat-log .msg{max-width:92%!important;font-size:15px!important;line-height:1.55!important;border-radius:18px!important;padding:12px 13px!important;}
  .pro-chat-log .msg.me{margin-left:auto!important;background:linear-gradient(135deg,rgba(34,171,255,.34),rgba(137,65,255,.31))!important;}
  .pro-chat-log .ai-msg,.pro-chat-log .ai-welcome{margin-right:auto!important;background:rgba(255,255,255,.07)!important;}
  .pro-upload{padding:8px!important;margin-top:8px!important;border-radius:18px!important;}
  .chat-upload-bar{display:flex!important;gap:7px!important;overflow-x:auto!important;}
  .upload-chip,.clear-attachments{flex:0 0 auto!important;font-size:12px!important;padding:9px 10px!important;border-radius:999px!important;}
  .mobile-voice-input{position:sticky!important;bottom:76px!important;z-index:40!important;display:grid!important;grid-template-columns:44px minmax(0,1fr) 44px 44px!important;gap:7px!important;margin-top:8px!important;padding:8px!important;border-radius:22px!important;background:rgba(4,10,27,.96)!important;border:1px solid rgba(105,222,255,.20)!important;box-shadow:0 -10px 34px rgba(0,0,0,.36)!important;}
  .mobile-voice-input textarea{min-height:44px!important;max-height:140px!important;font-size:15px!important;border-radius:16px!important;padding:12px!important;}
  .mobile-voice-input .voice-btn,.mobile-voice-input .quick-voice-btn,.mobile-voice-input .quick-stop-btn{width:44px!important;min-width:44px!important;height:44px!important;border-radius:16px!important;}
  .mobile-voice-input #chatSendBtn{grid-column:1/5!important;height:44px!important;border-radius:16px!important;font-size:15px!important;}

  .bottom-nav{position:fixed!important;left:10px!important;right:10px!important;bottom:8px!important;width:auto!important;height:66px!important;border-radius:24px!important;z-index:80!important;padding:0 10px!important;}
  .bottom-nav button{min-width:44px!important;}
  .bottom-nav span{display:none!important;}
}

@media (max-width: 380px){
  .top-actions .ai-status{max-width:150px!important;font-size:12px!important;}
  .menu-btn,.top-actions .icon-btn{width:48px!important;height:48px!important;min-width:48px!important;}
  .hero-center{padding-left:14px!important;padding-right:14px!important;}
  .hero-center h1{font-size:44px!important;}
  .hero-center p{font-size:12px!important;letter-spacing:.18em!important;}
  .quick-row button{font-size:13px!important;}
}


/* NAM42 MOBILE APP FIRST - ChatGPT/Gemini style on phone */
.mobile-chat-shortcuts{display:none}
@media(max-width:760px){
  html,body{min-height:100%;overflow-x:hidden;background:#07122f!important;}
  body{font-size:15px;}
  .app{width:100%;max-width:100%;padding:0 10px 92px!important;}
  .topbar{position:sticky!important;top:0;z-index:80;height:64px!important;min-height:64px!important;padding:8px 8px!important;margin:0 -10px 8px!important;border-radius:0 0 22px 22px!important;background:rgba(5,10,28,.84)!important;backdrop-filter:blur(16px);box-shadow:0 12px 30px rgba(0,0,0,.26)}
  .menu-btn,.icon-btn{width:48px!important;height:48px!important;min-width:48px!important;border-radius:16px!important;font-size:24px!important;}
  .top-actions{gap:8px!important;align-items:center!important;width:100%;justify-content:flex-end!important;}
  .top-actions .live-clock,.top-actions .profile-pill{display:none!important;}
  .ai-status{max-width:210px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:14px!important;padding:11px 14px!important;border-radius:999px!important;}

  /* Chat page is the real home on mobile */
  body[data-route="chat"] .hero-section,
  body[data-route="chat"] .feature-tabs-wrap{display:none!important;}
  body[data-route="chat"] .page.active{margin-top:8px!important;}
  body[data-route="chat"] .chat-page{padding:0!important;margin:0!important;}
  body[data-route="chat"] .chat-pro-shell {
  background: url('assets/chat-bg-highres.png') center/cover no-repeat !important;display:block!important;min-height:calc(100vh - 164px)!important;}
  body[data-route="chat"] .chat-pro-sidebar{display:none!important;}
  body[data-route="chat"] .chat-pro-main{padding:10px!important;border-radius:24px!important;min-height:calc(100vh - 164px)!important;background:linear-gradient(180deg,rgba(9,18,48,.96),rgba(4,8,22,.96))!important;border:1px solid rgba(91,213,255,.18)!important;box-shadow:0 18px 55px rgba(0,0,0,.32)!important;}
  body[data-route="chat"] .chat-pro-head{position:sticky;top:72px;z-index:35;background:linear-gradient(180deg,rgba(9,18,48,.98),rgba(9,18,48,.88));backdrop-filter:blur(14px);border:1px solid rgba(255,255,255,.08);border-radius:20px;padding:12px;margin:0 0 10px!important;}
  body[data-route="chat"] .chat-pro-head h2{font-size:22px!important;margin:0!important;}
  body[data-route="chat"] .chat-pro-head p{font-size:12px!important;color:#bcd3f3!important;margin-top:4px!important;}
  body[data-route="chat"] .chat-head-actions{display:flex!important;gap:8px!important;width:100%;}
  body[data-route="chat"] .chat-head-actions button{flex:1;padding:10px 8px!important;border-radius:14px!important;font-size:12px!important;}
  body[data-route="chat"] .chat-mode-tabs{display:grid!important;grid-template-columns:1fr 1fr 1fr!important;gap:7px!important;margin:8px 0!important;}
  body[data-route="chat"] .chat-mode-tabs button{min-width:0!important;padding:10px 4px!important;border-radius:14px!important;font-size:11px!important;line-height:1.2!important;}
  body[data-route="chat"] .multi-ai-toolbar{display:grid!important;grid-template-columns:1fr 1fr!important;gap:8px!important;margin:8px 0!important;}
  body[data-route="chat"] .multi-ai-toolbar label{font-size:11px!important;}
  body[data-route="chat"] .multi-ai-toolbar select{height:42px!important;font-size:13px!important;border-radius:14px!important;}
  body[data-route="chat"] .multi-ai-toolbar label:nth-child(3){grid-column:1/3;display:flex!important;align-items:center;gap:8px;justify-content:center;}
  body[data-route="chat"] .voice-status{display:none!important;}
  body[data-route="chat"] .pro-chat-log{height:calc(100vh - 380px)!important;min-height:300px!important;max-height:none!important;border-radius:20px!important;padding:12px!important;background:rgba(2,6,23,.42)!important;}
  body[data-route="chat"] .pro-chat-log .msg{max-width:92%!important;font-size:14px!important;line-height:1.58!important;padding:12px 13px!important;border-radius:18px!important;margin:10px 0!important;}
  body[data-route="chat"] .pro-chat-log .msg.me{max-width:86%!important;}
  body[data-route="chat"] .ai-welcome{max-width:100%!important;}
  body[data-route="chat"] .pro-upload{margin-top:8px!important;padding:8px!important;border-radius:16px!important;}
  body[data-route="chat"] .chat-upload-bar{display:flex!important;gap:8px!important;overflow-x:auto!important;padding-bottom:2px;}
  body[data-route="chat"] .upload-chip{white-space:nowrap!important;min-width:max-content!important;font-size:12px!important;padding:9px 10px!important;border-radius:13px!important;}
  body[data-route="chat"] .pro-input{position:sticky!important;bottom:82px!important;z-index:50;display:grid!important;grid-template-columns:46px 1fr 54px!important;gap:8px!important;margin:10px 0 0!important;padding:8px!important;background:rgba(7,12,32,.96)!important;border:1px solid rgba(91,213,255,.18)!important;border-radius:22px!important;backdrop-filter:blur(14px);box-shadow:0 -12px 36px rgba(0,0,0,.25)!important;}
  body[data-route="chat"] .pro-input input,
  body[data-route="chat"] .pro-input textarea{min-height:46px!important;height:46px!important;border-radius:16px!important;font-size:15px!important;padding:12px!important;}
  body[data-route="chat"] .voice-btn{width:46px!important;height:46px!important;min-width:46px!important;border-radius:16px!important;}
  body[data-route="chat"] #chatSendBtn{grid-column:auto!important;width:54px!important;height:46px!important;border-radius:16px!important;font-size:0!important;padding:0!important;}
  body[data-route="chat"] #chatSendBtn::before{content:'➤';font-size:22px;}

  /* Other pages mobile: compact banner, no huge landing block */
  body:not([data-route="chat"]) .hero-section{min-height:300px!important;height:auto!important;margin:8px 0 12px!important;padding:72px 14px 18px!important;border-radius:0 0 26px 26px!important;overflow:hidden!important;}
  body:not([data-route="chat"]) .hero-center{position:relative!important;z-index:3!important;padding:0!important;}
  body:not([data-route="chat"]) .hero-center h1{font-size:clamp(34px,13vw,58px)!important;line-height:1!important;margin:8px 0!important;text-align:center!important;}
  body:not([data-route="chat"]) .hero-center p{font-size:10px!important;letter-spacing:.20em!important;line-height:1.45!important;}
  body:not([data-route="chat"]) .hero-person{opacity:.28!important;filter:blur(.2px) saturate(1.05)!important;pointer-events:none!important;}
  body:not([data-route="chat"]) .hero-left{left:-34px!important;bottom:0!important;width:34%!important;height:auto!important;}
  body:not([data-route="chat"]) .hero-right{right:-26px!important;bottom:0!important;width:40%!important;height:auto!important;object-fit:cover!important;}
  body:not([data-route="chat"]) .search-shell{display:none!important;}
  body:not([data-route="chat"]) .quick-row{display:grid!important;grid-template-columns:1fr 1fr!important;gap:8px!important;margin-top:14px!important;}
  body:not([data-route="chat"]) .quick-row button{font-size:12px!important;padding:10px 8px!important;border-radius:16px!important;}
  body:not([data-route="chat"]) .feature-tabs-wrap{margin:10px 0 14px!important;padding:10px!important;border-radius:22px!important;}
  body:not([data-route="chat"]) .feature-tabs{gap:8px!important;overflow-x:auto!important;scroll-snap-type:x mandatory!important;}
  body:not([data-route="chat"]) .tab-card{min-width:96px!important;width:96px!important;height:86px!important;border-radius:18px!important;scroll-snap-align:center!important;}
  body:not([data-route="chat"]) .tab-card span{font-size:11px!important;}
  .dashboard-grid{grid-template-columns:1fr!important;gap:12px!important;}
  .feature-card,.mini-card,.glass-panel,.result-panel{border-radius:22px!important;padding:16px!important;}
  .feature-card h2{font-size:24px!important;}
  .route-layout{grid-template-columns:1fr!important;gap:12px!important;}
  .bottom-nav{position:fixed!important;left:10px!important;right:10px!important;bottom:10px!important;z-index:200;height:72px!important;border-radius:24px!important;padding:8px!important;background:rgba(5,10,28,.94)!important;backdrop-filter:blur(18px);box-shadow:0 -14px 40px rgba(0,0,0,.36)!important;}
  .bottom-nav button{font-size:21px!important;border-radius:18px!important;}
  .bottom-nav button span{font-size:10px!important;}
  .bottom-nav .magic{width:76px!important;height:76px!important;margin-top:-32px!important;font-size:32px!important;}
}
@media(min-width:761px){
  body[data-route="chat"] .chat-pro-shell{grid-template-columns:300px 1fr!important;}
}

/* Fix left image to match banner perfectly & Add click animations */
.hero-left {
  left: 0 !important;
  bottom: 0 !important;
  height: 100% !important;
  width: auto !important;
  max-width: 40% !important;
  object-fit: contain !important;
  object-position: left bottom !important;
  mask-image: linear-gradient(90deg, #000 60%, transparent 100%) !important;
  -webkit-mask-image: linear-gradient(90deg, #000 60%, transparent 100%) !important;
  opacity: 0.95 !important;
}
@media (max-width: 560px) {
  .hero-left {
    opacity: 0.8 !important;
    max-width: 45% !important;
    left: -10px !important;
  }
}
/* Button click animation */
button, .tab-card, .feature-card, .quick-row button {
  transition: transform 0.1s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.1s ease !important;
}
button:active, .tab-card:active, .feature-card:active, .quick-row button:active {
  transform: scale(0.94) !important;
}

/* Mystic background for cards */
.feature-card {
  background: linear-gradient(145deg, rgba(16, 28, 64, 0.7), rgba(4, 13, 34, 0.8)), radial-gradient(circle at top right, rgba(120, 80, 255, 0.15), transparent 50%), radial-gradient(circle at bottom left, rgba(60, 150, 255, 0.1), transparent 50%) !important;
  backdrop-filter: blur(12px) !important;
  border: 1px solid rgba(130,180,255,0.2) !important;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3), inset 0 0 20px rgba(70,150,255,0.05) !important;
  min-height: 140px !important;
  padding: 22px !important;
}
.feature-card h2 {
  font-size: 20px !important;
  text-shadow: 0 0 15px rgba(100,200,255,0.4) !important;
}
.feature-card p {
  font-size: 13px !important;
}
.dashboard-grid {
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 16px !important;
}
.feature-card {
  grid-column: span 1 !important;
}
.mini-card {
  grid-column: span 1 !important;
}
@media(max-width: 920px) {
  .dashboard-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}
@media(max-width: 600px) {
  .dashboard-grid {
    grid-template-columns: 1fr !important;
  }
}

/* Shrink card height on Web to ~2/3 */
@media (min-width: 920px) {
  .feature-card {
    min-height: 160px !important;
    max-height: 190px !important;
    padding: 16px 20px !important;
    gap: 10px !important;
  }
  .feature-card > div:first-child {
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  .feature-card h2 {
    font-size: 18px !important;
    margin-bottom: 8px !important;
  }
  .feature-card p {
    font-size: 12px !important;
    line-height: 1.4 !important;
    margin-bottom: 10px !important;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .feature-card button {
    padding: 8px 16px !important;
    font-size: 12px !important;
    width: fit-content;
  }
  .card-art {
    min-width: 90px !important;
    font-size: 40px !important;
  }
  .hand-art, .face-art, .bot-art, .ai-head {
    font-size: 50px !important;
    width: 60px !important;
    height: 60px !important;
  }
}

/* Modal Styles for App Download */
.modal-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  display: flex; justify-content: center; align-items: center;
  z-index: 10000;
  opacity: 0; pointer-events: none;
  transition: all 0.3s ease;
}
.modal-overlay.show {
  opacity: 1; pointer-events: auto;
}
.modal-content {
  position: relative;
  width: 90%; max-width: 400px;
  padding: 25px;
  transform: translateY(20px);
  transition: transform 0.3s ease;
  background: linear-gradient(135deg, rgba(8,16,66,0.95), rgba(28,4,58,0.95));
  border: 1px solid rgba(0, 240, 255, 0.3);
  box-shadow: 0 10px 40px rgba(0,0,0,0.5), 0 0 20px rgba(0, 240, 255, 0.2);
  border-radius: 20px;
}
.modal-overlay.show .modal-content {
  transform: translateY(0);
}
.close-modal {
  z-index: 1000;
  position: absolute;
  position: absolute; top: 15px; right: 15px;
  background: rgba(255,255,255,0.1); border: none; color: white;
  width: 30px; height: 30px; border-radius: 50%;
  font-size: 18px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.close-modal:hover { background: rgba(255,0,0,0.5); }


/* NAM47 — unified desktop/mobile UI. Keep the original desktop stylesheet intact. */
.chat-mobile-settings > summary { display: none; }
.chat-mobile-settings-content { display: block; }
@media (max-width: 760px) {
  html, body { min-height: 100%; width: 100%; max-width: 100%; overflow-x: hidden !important; }
  body { -webkit-text-size-adjust: 100%; }
  .app { width: 100%; max-width: 100%; padding-left: 10px !important; padding-right: 10px !important; padding-bottom: calc(100px + env(safe-area-inset-bottom, 0px)) !important; }
  .top-actions button[onclick="openAppModal()"] { display: none !important; }

  /* Compact app bar and keep the desktop feature rail available in Chat. */
  body[data-route="chat"] .hero-section {
    display: block !important; height: auto !important; min-height: 0 !important;
    margin: 0 -10px 8px !important; padding: 0 10px !important;
    overflow: visible !important; border-radius: 0 0 18px 18px !important;
  }
  body[data-route="chat"] .hero-section::before,
  body[data-route="chat"] .hero-section::after,
  body[data-route="chat"] .hero-person,
  body[data-route="chat"] .hero-center { display: none !important; }
  body[data-route="chat"] .topbar {
    position: sticky !important; top: 0 !important; z-index: 90 !important;
    min-height: 62px !important; height: 62px !important; margin: 0 -10px !important;
    padding: 7px 10px !important; border-radius: 0 0 18px 18px !important;
  }
  body[data-route="chat"] .feature-tabs-wrap {
    display: flex !important; position: sticky !important; top: 62px !important; z-index: 75 !important;
    width: calc(100% + 4px) !important; margin: 0 -2px 10px !important; padding: 8px 7px !important;
    min-height: 0 !important; border-radius: 0 0 18px 18px !important;
    background: rgba(5, 12, 31, .96) !important; backdrop-filter: blur(16px) !important;
    box-shadow: 0 10px 24px rgba(0,0,0,.22) !important;
  }
  body[data-route="chat"] .feature-tabs-wrap .slide-btn { display: none !important; }
  body[data-route="chat"] .feature-tabs {
    display: flex !important; flex: 1 1 auto !important; width: 100% !important; max-width: none !important;
    height: auto !important; gap: 7px !important; overflow-x: auto !important; overflow-y: auto !important; max-height: 120px !important;
    padding: 2px 2px 5px !important; scroll-snap-type: x proximity !important;
    -webkit-overflow-scrolling: touch !important; scrollbar-width: none !important;
  }
  body[data-route="chat"] .feature-tabs::-webkit-scrollbar { display: none !important; }
  body[data-route="chat"] .feature-tabs .tab-card {
    flex: 0 0 78px !important; width: 78px !important; min-width: 78px !important; max-width: 78px !important;
    height: 58px !important; min-height: 58px !important; max-height: 58px !important;
    padding: 5px 4px !important; border-radius: 14px !important; scroll-snap-align: start !important;
  }
  body[data-route="chat"] .feature-tabs .tab-card .holo-icon { width: 25px !important; height: 25px !important; min-width: 25px !important; }
  body[data-route="chat"] .feature-tabs .tab-card span:last-child { max-width: 70px !important; font-size: 9px !important; line-height: 1.1 !important; }

  body[data-route="chat"] #page-chat.page.active { display: block !important; margin-top: 0 !important; padding-bottom: 8px !important; }
  body[data-route="chat"] .chat-page { min-height: 0 !important; padding: 0 !important; margin: 0 !important; background: transparent !important; border: 0 !important; box-shadow: none !important; }
  body[data-route="chat"] .chat-pro-shell { display: block !important; min-height: 0 !important; }
  body[data-route="chat"] .chat-pro-sidebar { display: none !important; }
  body[data-route="chat"] .chat-pro-main {
    display: flex !important; flex-direction: column !important; height: calc(100vh - 245px) !important;
    height: calc(100dvh - 245px) !important; min-height: 420px !important; max-height: 760px !important;
    overflow: hidden !important; padding: 10px !important; border-radius: 22px !important;
    background: linear-gradient(180deg,rgba(9,18,48,.96),rgba(4,8,22,.96)) !important;
    border: 1px solid rgba(91,213,255,.18) !important; box-shadow: 0 18px 55px rgba(0,0,0,.32) !important;
  }
  body[data-route="chat"] .chat-pro-main > * { min-height: 0; }
  body[data-route="chat"] .chat-pro-head {
    display: grid !important; grid-template-columns: minmax(0,1fr) auto !important;
    align-items: start !important; column-gap: 7px !important; flex: 0 0 auto !important;
    position: relative !important; top: auto !important; z-index: 2 !important; margin-bottom: 8px !important;
  }
  body[data-route="chat"] .chat-pro-head > div:first-child { flex: 1 1 auto !important; width: auto !important; min-width: 0 !important; }
  body[data-route="chat"] .chat-pro-head h2 { font-size: 18px !important; margin: 0 !important; }
  body[data-route="chat"] .chat-pro-head p { font-size: 11px !important; line-height: 1.35 !important; margin: 4px 0 0 !important; }
  body[data-route="chat"] .chat-head-actions {
    display: flex !important; align-items: flex-start !important; justify-content: flex-end !important;
    flex: 0 0 auto !important; width: auto !important; gap: 4px !important;
  }
  body[data-route="chat"] .chat-head-actions button {
    flex: 0 0 auto !important; width: auto !important; min-width: 0 !important; max-width: 82px !important;
    height: 36px !important; padding: 6px !important; font-size: 10px !important;
    line-height: 1.1 !important; white-space: nowrap !important;
  }

  body[data-route="chat"] .chat-mobile-settings { flex: 0 0 auto !important; margin: 6px 0 !important; }
  body[data-route="chat"] .chat-mobile-settings > summary {
    display: flex !important; align-items: center !important; justify-content: space-between !important;
    min-height: 40px !important; padding: 9px 12px !important; border: 1px solid rgba(91,213,255,.22) !important;
    border-radius: 14px !important; background: rgba(255,255,255,.06) !important; color: #eaf4ff !important;
    font-size: 12px !important; font-weight: 700 !important; cursor: pointer !important; list-style: none !important;
  }
  body[data-route="chat"] .chat-mobile-settings > summary::-webkit-details-marker { display: none !important; }
  body[data-route="chat"] .chat-mobile-settings > summary::after { content: '＋'; color: #7deaff; font-size: 18px; }
  body[data-route="chat"] .chat-mobile-settings[open] > summary::after { content: '−'; }
  body[data-route="chat"] .chat-mobile-settings-content { padding: 4px 0 0 !important; }
  body[data-route="chat"] .chat-mobile-settings[open] .multi-ai-toolbar {
    display: grid !important; grid-template-columns: minmax(0,1fr) minmax(0,1fr) !important; gap: 7px !important;
  }
  body[data-route="chat"] .chat-mode-tabs { display: flex !important; gap: 7px !important; margin: 4px 0 7px !important; }
  body[data-route="chat"] .chat-mode-tabs button { flex: 1 1 auto !important; min-width: 0 !important; font-size: 12px !important; }
  body[data-route="chat"] .multi-ai-toolbar label { min-width: 0 !important; font-size: 11px !important; }
  body[data-route="chat"] .multi-ai-toolbar select,
  body[data-route="chat"] .multi-ai-toolbar input { min-width: 0 !important; width: 100% !important; font-size: 13px !important; }
  body[data-route="chat"] .multi-ai-toolbar label:nth-child(3) { grid-column: auto !important; display: block !important; }
  body[data-route="chat"] .multi-ai-toolbar .council-toggle { grid-column: 1 / -1 !important; display: flex !important; align-items: center !important; justify-content: flex-start !important; gap: 8px !important; }
  body[data-route="chat"] .multi-ai-toolbar .council-toggle input { width: auto !important; }
  body[data-route="chat"] .voice-status { display: block !important; flex: 0 0 auto !important; margin: 4px 0 !important; font-size: 11px !important; }

  body[data-route="chat"] .pro-chat-log {
    display: flex !important; flex: 1 1 0 !important; width: 100% !important; height: auto !important;
    min-height: 170px !important; max-height: none !important; padding: 10px !important;
    border-radius: 18px !important; overflow-y: auto !important; overscroll-behavior: contain !important;
  }
  body[data-route="chat"] .pro-chat-log .msg { max-width: 94% !important; font-size: 14px !important; line-height: 1.55 !important; overflow-wrap: anywhere !important; }
  body[data-route="chat"] .pro-upload { flex: 0 0 auto !important; margin-top: 7px !important; padding: 7px !important; }
  body[data-route="chat"] .chat-upload-bar { display: flex !important; gap: 6px !important; overflow-x: auto !important; -webkit-overflow-scrolling: touch !important; }
  body[data-route="chat"] .upload-chip,
  body[data-route="chat"] .clear-attachments { flex: 0 0 auto !important; white-space: nowrap !important; font-size: 11px !important; padding: 8px 9px !important; }
  body[data-route="chat"] .pro-input {
    position: sticky !important; bottom: 0 !important; z-index: 50 !important; flex: 0 0 auto !important;
    display: grid !important; grid-template-columns: 40px minmax(0,1fr) 40px 40px 40px !important;
    gap: 5px !important; margin: 7px 0 0 !important; padding: 7px !important;
  }
  body[data-route="chat"] .pro-input textarea { min-width: 0 !important; height: auto !important; min-height: 44px !important; max-height: 140px !important; }
  body[data-route="chat"] .pro-input .voice-btn,
  body[data-route="chat"] .pro-input .quick-voice-btn,
  body[data-route="chat"] .pro-input .quick-stop-btn { width: 40px !important; min-width: 40px !important; height: 42px !important; }
  body[data-route="chat"] .pro-input #chatSendBtn {
    grid-column: auto !important; width: 40px !important; min-width: 40px !important; height: 42px !important;
    padding: 0 !important; font-size: 0 !important; border-radius: 14px !important;
  }
  body[data-route="chat"] .pro-input #chatSendBtn::before { content: '➤'; font-size: 18px !important; }
  .bottom-nav { transform: none !important; bottom: calc(10px + env(safe-area-inset-bottom, 0px)) !important; }
  .bottom-nav button:not(.magic) { gap: 2px !important; font-size: 16px !important; }
  .bottom-nav button span { display: inline-block !important; font-size: 9px !important; line-height: 1.1 !important; }
  body:not([data-route="chat"]) .feature-tabs { display: flex !important; flex-wrap: nowrap !important; overflow-x: auto !important; }
  .dashboard-grid { min-width: 0 !important; }
  .feature-card, .mini-card, .glass-panel, .result-panel { overflow-wrap: anywhere !important; }
}
@media (max-width: 380px) {
  body[data-route="chat"] .chat-pro-head h2 { font-size: 17px !important; }
  body[data-route="chat"] .chat-head-actions button { max-width: 74px !important; padding: 5px 4px !important; font-size: 9px !important; }
  body[data-route="chat"] .feature-tabs .tab-card { flex-basis: 72px !important; min-width: 72px !important; max-width: 72px !important; }
}


/* Mobile final interaction details: compact controls and preserve the chat composer hit area. */
@media (max-width: 760px) {
  body[data-route="chat"] .chat-head-actions button {
    width: 36px !important; min-width: 36px !important; max-width: 36px !important;
    height: 36px !important; padding: 0 !important; font-size: 0 !important;
    display: inline-flex !important; align-items: center !important; justify-content: center !important;
  }
  body[data-route="chat"] .chat-head-actions button:first-child::before { content: '⚙'; font-size: 17px !important; }
  body[data-route="chat"] .chat-head-actions button:nth-child(2)::before { content: '🔊'; font-size: 16px !important; }
  body[data-route="chat"] .chat-mobile-settings { position: relative !important; z-index: 60 !important; }
  body[data-route="chat"] .chat-mobile-settings[open] .chat-mobile-settings-content {
    position: absolute !important; top: calc(100% + 5px) !important; left: 0 !important; right: 0 !important;
    z-index: 100 !important; max-height: min(44dvh, 340px) !important; overflow-y: auto !important;
    padding: 10px !important; border: 1px solid rgba(91,213,255,.28) !important; border-radius: 16px !important;
    background: rgba(7,15,38,.98) !important; box-shadow: 0 18px 38px rgba(0,0,0,.55) !important;
    backdrop-filter: blur(18px) !important;
  }
  body[data-route="chat"] .bottom-nav .magic { display: none !important; }
  body[data-route="chat"] .bottom-nav { grid-template-columns: repeat(4,minmax(0,1fr)) !important; }
}


/* ========================================================
   RESTORED CLEAN MOBILE UI FOR UNIFIED APP
======================================================== */
@media (max-width: 900px) {
  /* 1. Remove Top Gap & Clean Banner (Zero Top Margin) */
  body {
    margin: 0 !important;
    padding: 0 !important;
  }
  .app {
    padding: 0 !important;
  }
  .hero-section {
    margin-top: 0 !important;
    border-radius: 0 0 35px 35px !important;
    min-height: auto !important;
    padding-bottom: 25px !important;
  }
  .hero-center {
    padding-top: 15px !important;
  }
  .hero-left {
    left: -15px !important;
  }
  .hero-right {
    right: -15px !important;
  }

  /* 2. Google-Style Inline Search Bar */
  .search-shell {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    background: #ffffff !important;
    border: none !important;
    border-radius: 999px !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4) !important;
    padding: 6px 6px 6px 20px !important;
    max-width: 90% !important;
    margin: 15px auto 5px !important;
  }
  .search-shell span {
    display: none !important; /* Hide the weird icon on mobile to save space */
  }
  .search-shell input {
    flex: 1 1 auto !important;
    background: transparent !important;
    color: #333 !important;
    font-size: 15px !important;
    padding: 10px 0 !important;
    border: none !important;
    min-height: 0 !important;
  }
  .search-shell input::placeholder {
    color: #888 !important;
  }
  .search-shell button {
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: 0 !important;
    background: #f1f3f4 !important;
    color: #1a73e8 !important;
    border-radius: 999px !important;
    padding: 12px 20px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    margin-left: 8px !important;
  }

  /* 3. Clean Dashboard & Square Feature Cards */
  .dashboard-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important; /* 2 columns */
    gap: 14px !important;
    padding: 14px !important;
  }
  .feature-card.wide {
    grid-column: span 1 !important; /* Force them to be 1 column each */
    aspect-ratio: 1 / 1 !important; /* Perfect square */
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    text-align: center !important;
    padding: 16px !important;
    background: rgba(10,20,48,.95) !important;
    border: 1px solid rgba(255,255,255,0.15) !important; /* Clean border, no neon */
    border-radius: 20px !important;
  }
  .feature-card h2 {
    font-size: 16px !important;
    margin-bottom: 8px !important;
  }
  .feature-card h2 em {
    display: none !important; /* Hide 'PRO' tag on mobile square cards to save space */
  }
  .feature-card p {
    font-size: 12px !important;
    line-height: 1.4 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 3 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
  }
  .feature-card button {
    display: none !important; /* Hide the button inside square cards, whole card is clickable */
  }
  .feature-card .card-art {
    display: none !important; /* Hide background watermark art on square cards */
  }

  /* 4. Remove Neon Pink Borders on Feature Tabs (if any exist) */
  .feature-tabs .tab-card {
    border: 1px solid rgba(255,255,255,0.15) !important;
    background: rgba(255,255,255,0.1) !important;
    box-shadow: none !important;
    border-radius: 14px !important;
  }
}






/* Hide the mystic header on desktop */
@media (min-width: 901px) {
  .mobile-mystic-header,
  .mobile-mystic-tabs {
    display: none !important;
  }
}








/* ========================================================
   PREMIUM CHAT FEATURES
======================================================== */
.fade-in {
  animation: fadeInMsg 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes fadeInMsg {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

.msg-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  padding-bottom: 6px;
}

.copy-btn {
  background: rgba(255,255,255,0.1) !important;
  border: 1px solid rgba(255,255,255,0.15) !important;
  color: #a3b8cc !important;
  border-radius: 12px !important;
  padding: 4px 10px !important;
  font-size: 11px !important;
  cursor: pointer !important;
  transition: all 0.2s !important;
}
.copy-btn:hover {
  background: rgba(255,255,255,0.2) !important;
  color: #fff !important;
}

/* Markdown Standard Styling within msg */
.msg ul, .msg ol {
  padding-left: 20px;
  margin: 10px 0;
}
.msg li {
  margin-bottom: 6px;
}
.msg p {
  margin: 8px 0;
}
.msg pre {
  background: rgba(0,0,0,0.4);
  padding: 12px;
  border-radius: 10px;
  overflow-x: auto;
  border: 1px solid rgba(255,255,255,0.1);
  font-family: monospace;
}
.msg code {
  background: rgba(255,255,255,0.15);
  padding: 2px 5px;
  border-radius: 4px;
  font-family: monospace;
  font-size: 13px;
}
.msg table {
  width: 100%;
  border-collapse: collapse;
  margin: 10px 0;
}
.msg th, .msg td {
  border: 1px solid rgba(255,255,255,0.2);
  padding: 8px;
  text-align: left;
}
.msg th {
  background: rgba(255,255,255,0.1);
}





/* Mobile theme reverted */


/* --- CHAT AI MOBILE REDESIGN (BASED ON IMAGE 1) --- */
@media (max-width: 768px) {
  /* 1. Clear the background of chat containers to show the image */
  body[data-route="chat"] {
    background: url('assets/chat-bg-highres.png') center/cover no-repeat fixed !important;
  }
  body[data-route="chat"] .chat-pro-main,
  body[data-route="chat"] .chat-pro-shell,
  body[data-route="chat"] #page-chat {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
  }
  
  /* 2. Fix the header from yesterday - make it elegant */
  .mobile-mystic-header {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 10px 15px 5px !important;
    margin-bottom: 0 !important;
  }
  .mobile-mystic-header h2 {
    color: #ffd700 !important;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.3) !important;
    font-size: 20px !important;
  }
  .mobile-mystic-header p {
    color: #fff !important;
    opacity: 0.8 !important;
  }
  
  /* 3. The Function Tabs (Tử vi, Tình duyên, Chat AI) -> Like Image 1 */
  .mobile-mystic-tabs {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    background: rgba(255, 255, 255, 0.08) !important;
    backdrop-filter: blur(12px) !important;
    border-radius: 999px !important;
    padding: 4px !important;
    margin: 5px 15px 15px 15px !important;
    border: 1px solid rgba(255,255,255,0.15) !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1) !important;
  }
  .mobile-mystic-tabs button {
    flex: 1 !important;
    background: transparent !important;
    color: #fff !important;
    border: none !important;
    border-radius: 999px !important;
    padding: 8px 5px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    margin: 0 !important;
    box-shadow: none !important;
    opacity: 0.8 !important;
  }
  .mobile-mystic-tabs button.active {
    background: linear-gradient(135deg, #ffd700, #ffb300) !important;
    color: #000 !important;
    opacity: 1 !important;
    font-weight: 700 !important;
    box-shadow: 0 0 15px rgba(255,215,0,0.3) !important;
  }

  /* 4. Chat Bubbles (Glassmorphism) */
  .pro-chat-log {
    background: transparent !important;
    border: none !important;
    padding: 10px 15px !important;
    height: 60vh !important;
  }
  .pro-chat-log .msg {
    backdrop-filter: blur(12px) !important;
    border: 1px solid rgba(255,255,255,0.15) !important;
    color: #fff !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1) !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
    border-radius: 18px !important;
  }
  .pro-chat-log .msg.me {
    background: rgba(255, 215, 0, 0.15) !important;
    border-color: rgba(255, 215, 0, 0.3) !important;
  }
  .pro-chat-log .msg:not(.me) {
    background: rgba(255, 255, 255, 0.08) !important;
  }
  
  /* 5. Hide settings panel & desktop header */
  .chat-mobile-settings, .chat-pro-head {
    display: none !important;
  }

  /* 6. Upload Buttons Bar (Tải ảnh, Tải file...) - Compact horizontal row */
  .chat-upload-bar.pro-upload {
    background: transparent !important;
    border: none !important;
    padding: 0 15px !important;
    margin-bottom: 5px !important;
    display: flex !important;
    gap: 8px !important;
    overflow-x: auto !important;
    box-shadow: none !important;
    scrollbar-width: none !important; /* Firefox */
  }
  .chat-upload-bar.pro-upload::-webkit-scrollbar {
    display: none !important; /* Safari and Chrome */
  }
  .chat-upload-bar.pro-upload .upload-chip, 
  .chat-upload-bar.pro-upload .clear-attachments {
    background: rgba(255,255,255,0.1) !important;
    backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(255,255,255,0.2) !important;
    border-radius: 16px !important;
    padding: 6px 12px !important;
    font-size: 12px !important;
    color: #fff !important;
    white-space: nowrap !important;
    box-shadow: none !important;
    flex-shrink: 0 !important;
  }
  
  /* 7. The Chat Input Bar (Sleek Pill) */
  .chat-input.pro-input {
    background: rgba(30, 30, 40, 0.6) !important;
    backdrop-filter: blur(15px) !important;
    border-radius: 30px !important;
    border: 1px solid rgba(255,255,255,0.2) !important;
    padding: 5px 10px !important;
    margin: 5px 15px 15px 15px !important;
    display: flex !important;
    align-items: center !important;
    gap: 5px !important;
    grid-template-columns: none !important;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3) !important;
    flex-wrap: nowrap !important;
  }
  .chat-input.pro-input textarea {
    background: transparent !important;
    border: none !important;
    color: #fff !important;
    box-shadow: none !important;
    flex: 1 !important;
    padding: 8px !important;
    min-height: 20px !important;
    font-size: 14px !important;
  }
  .chat-input.pro-input button {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 50% !important;
    width: 36px !important;
    height: 36px !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #ffd700 !important;
    font-size: 18px !important;
    min-height: auto !important;
  }
  .chat-input.pro-input #chatSendBtn {
    background: linear-gradient(135deg, #ffd700, #ffb300) !important;
    color: #000 !important;
    font-size: 0 !important;
    position: relative !important;
    border-radius: 50% !important;
    width: 36px !important;
    height: 36px !important;
    margin: 0 !important;
    flex-shrink: 0 !important;
  }
  .chat-input.pro-input #chatSendBtn::after {
    content: '➤' !important;
    font-size: 16px !important;
    font-weight: bold !important;
  }
}














/* Desktop welcome message glass blur v5. */
@media (min-width: 769px) {
  body[data-route="chat"] .pro-chat-log .msg.ai-welcome {
    background: rgba(24,34,54,.12) !important;
    backdrop-filter: blur(26px) saturate(155%) !important;
    -webkit-backdrop-filter: blur(26px) saturate(155%) !important;
  }
}

/* Chat Icon Buttons & History Drawer */

.chat-icon-btn:hover { background: rgba(255, 255, 255, 0.2) !important; }

.history-drawer-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.6);
  z-index: 9999;
  display: flex;
  backdrop-filter: blur(3px);
}
.history-drawer {
  width: 280px;
  max-width: 80%;
  height: 100%;
  background: #0d1627;
  border-right: 1px solid rgba(255,255,255,0.1);
  box-shadow: 5px 0 25px rgba(0,0,0,0.5);
  display: flex;
  flex-direction: column;
  animation: slideInLeft 0.3s ease;
}
@keyframes slideInLeft {
  from { transform: translateX(-100%); }
  to { transform: translateX(0); }
}
.drawer-head {
  padding: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  background: rgba(0,0,0,0.2);
}
.drawer-head h3 { margin: 0; font-size: 16px; color: #fff; }
.drawer-head button {
  background: transparent; border: none; color: #fff; font-size: 18px; cursor: pointer; padding: 0 5px;
}
.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
}
.drawer-item {
  padding: 12px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 10px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: background 0.2s;
}
.drawer-item:hover { background: rgba(255,255,255,0.1); }
.drawer-item strong { color: #5bc0be; font-size: 13px; }
.drawer-item small { color: #888; font-size: 11px; }

.chat-icon-btn {
  background: rgba(34, 197, 94, 0.08) !important;
  border: 1px solid rgba(74, 222, 128, 0.28) !important;
  border-radius: 6px !important;
  font-size: 11px !important;
  padding: 5px 10px !important;
  color: #4ade80 !important;
  cursor: pointer;
  white-space: nowrap;
}
.chat-icon-btn:hover {
  background: rgba(74, 222, 128, 0.2) !important;
  color: #4ade80 !important;
  border-color: rgba(74, 222, 128, 0.6) !important;
}

/* Ensure bottom-nav and magic center button are always centered */
.bottom-nav {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  align-items: center !important;
  justify-items: center !important;
}
.bottom-nav button {
  justify-self: center !important;
  align-self: center !important;
}
.bottom-nav .magic,
.bottom-nav button.magic {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center !important;
  justify-self: center !important;
  align-self: center !important;
  text-align: center !important;
  line-height: 1 !important;
  padding: 0 !important;
  margin: -24px auto 0 auto !important;
}

@media (min-width: 768px) {
  .top-actions .live-clock {
    display: inline-flex !important;
    align-items: center !important;
  }
}

/* ========================================================
   DESKTOP CHAT AI COMPACT & BALANCED VIEWPORT LAYOUT
======================================================== */
@media (min-width: 769px) {
  /* 1. On chat route: Hide large hero image banner & feature tabs to give full-height desktop ChatGPT experience */
  body[data-route="chat"] .hero-section {
    display: block !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 0 4px !important;
    padding: 0 !important;
    overflow: visible !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
  }
  body[data-route="chat"] .hero-section::before,
  body[data-route="chat"] .hero-section::after,
  body[data-route="chat"] .hero-person,
  body[data-route="chat"] .hero-center {
    display: none !important;
  }
  body[data-route="chat"] .topbar {
    position: sticky !important;
    top: 0 !important;
    z-index: 90 !important;
    min-height: 52px !important;
    height: 52px !important;
    padding: 4px 14px !important;
    border-radius: 0 0 16px 16px !important;
    background: rgba(5, 12, 31, 0.88) !important;
    backdrop-filter: blur(14px) !important;
  }
  body[data-route="chat"] .feature-tabs-wrap {
    display: none !important;
  }
  body[data-route="chat"] .app {
    padding-top: 2px !important;
    padding-bottom: 86px !important;
    max-width: 1380px !important;
  }

  /* 2. Chat Page Container: perfectly fit inside viewport between topbar and bottom-nav */
  #page-chat.page.active {
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  .chat-pro-page {
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
  }
  .chat-pro-shell {
    display: grid !important;
    grid-template-columns: 280px minmax(0, 1fr) !important;
    gap: 14px !important;
    height: calc(100vh - 156px) !important;
    max-height: calc(100vh - 156px) !important;
    min-height: 480px !important;
    align-items: stretch !important;
    box-sizing: border-box !important;
  }

  /* 3. Left Sidebar: sleek & scrollable if providers list is long */
  .chat-pro-sidebar {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    max-height: 100% !important;
    overflow-y: auto !important;
    padding: 14px !important;
    border-radius: 20px !important;
    box-sizing: border-box !important;
    gap: 10px !important;
    background: linear-gradient(145deg, rgba(8, 18, 46, 0.85), rgba(8, 11, 33, 0.78)) !important;
    border: 1px solid rgba(101, 216, 255, 0.22) !important;
    backdrop-filter: blur(18px) !important;
    box-shadow: 0 16px 50px rgba(0, 0, 0, 0.3) !important;
  }
  .chat-pro-sidebar .chat-brand {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    flex: 0 0 auto !important;
  }
  .chat-pro-sidebar .new-chat-btn {
    display: block !important;
    flex: 0 0 auto !important;
    padding: 10px 14px !important;
    font-size: 13px !important;
    border-radius: 14px !important;
  }
  .chat-pro-sidebar .mini-provider-list {
    flex: 1 1 auto !important;
    overflow-y: auto !important;
  }

  /* 4. Main Chat Panel: flex column with strict overflow protection */
  .chat-pro-main {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    max-height: 100% !important;
    overflow: hidden !important;
    padding: 12px 18px !important;
    border-radius: 20px !important;
    box-sizing: border-box !important;
    background: linear-gradient(145deg, rgba(8, 18, 46, 0.90), rgba(6, 12, 34, 0.88)) !important;
    border: 1px solid rgba(91, 213, 255, 0.22) !important;
    backdrop-filter: blur(20px) !important;
    box-shadow: 0 16px 50px rgba(0, 0, 0, 0.35) !important;
  }

  /* 5. Chat Header & Compact Toolbar */
  .chat-pro-head {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex: 0 0 auto !important;
    margin-bottom: 4px !important;
    padding-bottom: 4px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  }
  .chat-pro-head h2 {
    font-size: 18px !important;
    margin: 0 !important;
  }
  .chat-pro-head p {
    font-size: 11px !important;
    margin: 2px 0 0 !important;
    color: #a0aec0 !important;
  }
  .chat-head-actions {
    display: flex !important;
    gap: 6px !important;
    align-items: center !important;
  }

  /* Compact single-row settings on desktop */
  .chat-mobile-settings {
    flex: 0 0 auto !important;
    margin: 2px 0 4px !important;
  }
  .chat-mobile-settings > summary {
    display: none !important;
  }
  .chat-mobile-settings-content {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 8px !important;
  }
  .chat-mode-tabs.pro-tabs {
    display: flex !important;
    margin: 0 !important;
    flex: 0 0 auto !important;
  }
  .chat-mode-tabs.pro-tabs button {
    padding: 5px 12px !important;
    font-size: 12px !important;
    border-radius: 10px !important;
  }
  .multi-ai-toolbar.pro-toolbar {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 6px 10px !important;
    margin: 0 !important;
    flex: 1 1 auto !important;
  }
  .multi-ai-toolbar.pro-toolbar label {
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    font-size: 11px !important;
    margin: 0 !important;
    color: #cbd5e1 !important;
    white-space: nowrap !important;
  }
  .multi-ai-toolbar.pro-toolbar select,
  .multi-ai-toolbar.pro-toolbar input {
    height: 30px !important;
    min-height: 30px !important;
    padding: 3px 8px !important;
    font-size: 11.5px !important;
    border-radius: 8px !important;
    background: rgba(2, 10, 27, 0.65) !important;
    border: 1px solid rgba(112, 179, 255, 0.35) !important;
    color: #fff !important;
  }
  .multi-ai-toolbar .council-toggle {
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    font-size: 11px !important;
  }
  .multi-ai-toolbar .council-toggle input {
    width: auto !important;
    height: auto !important;
    margin: 0 !important;
  }

  .voice-status {
    flex: 0 0 auto !important;
    margin: 2px 0 4px !important;
    padding: 4px 10px !important;
    font-size: 11px !important;
    border-radius: 10px !important;
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
  }

  /* 6. Message Log: flexible shrink/grow with smooth inner scroll */
  .pro-chat-log {
    flex: 1 1 0 !important;
    height: auto !important;
    min-height: 80px !important;
    max-height: none !important;
    overflow-y: auto !important;
    padding: 12px 14px !important;
    border-radius: 16px !important;
    margin-bottom: 4px !important;
    scroll-behavior: smooth !important;
    background: rgba(2, 8, 23, 0.35) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
  }
  .pro-chat-log .msg {
    max-width: 82% !important;
    margin: 8px 0 !important;
    padding: 10px 14px !important;
    font-size: 13.5px !important;
    line-height: 1.55 !important;
    border-radius: 16px !important;
  }

  /* 7. Quick prompts bar */
  .chat-quick-prompts {
    flex: 0 0 auto !important;
    display: flex !important;
    gap: 6px !important;
    overflow-x: auto !important;
    padding: 4px 0 !important;
    margin-bottom: 4px !important;
    scrollbar-width: none !important;
  }
  .chat-quick-prompts::-webkit-scrollbar {
    display: none !important;
  }
  .chat-quick-prompts .quick-chip {
    flex: 0 0 auto !important;
    font-size: 11px !important;
    padding: 4px 10px !important;
    border-radius: 999px !important;
    background: rgba(255, 255, 255, 0.07) !important;
    border: 1px solid rgba(255, 215, 0, 0.28) !important;
    color: #ffe685 !important;
    cursor: pointer !important;
    white-space: nowrap !important;
    transition: all 0.15s ease !important;
  }
  .chat-quick-prompts .quick-chip:hover {
    background: rgba(255, 215, 0, 0.18) !important;
    border-color: #ffd700 !important;
  }

  /* 8. Upload files/camera bar */
  .chat-upload-bar.pro-upload {
    flex: 0 0 auto !important;
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 6px !important;
    margin-top: 0 !important;
    margin-bottom: 4px !important;
    padding: 4px 8px !important;
    border-radius: 12px !important;
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    align-items: center !important;
  }
  .chat-upload-bar.pro-upload :is(.upload-chip, .clear-attachments) {
    padding: 4px 10px !important;
    font-size: 11px !important;
    border-radius: 8px !important;
    white-space: nowrap !important;
    cursor: pointer !important;
  }

  .chat-attachments {
    flex: 0 0 auto !important;
    max-height: 60px !important;
    overflow-y: auto !important;
    margin-bottom: 4px !important;
  }

  /* 9. Chat Input Bar: PINNED FIRMLY AT BOTTOM, NEVER CUT OFF */
  .chat-input.pro-input {
    flex: 0 0 auto !important;
    margin-top: auto !important;
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr) auto auto auto !important;
    gap: 6px !important;
    align-items: center !important;
    padding: 5px 8px !important;
    border-radius: 18px !important;
    background: rgba(12, 22, 48, 0.92) !important;
    border: 1px solid rgba(95, 172, 255, 0.35) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4) !important;
  }
  .chat-input.pro-input textarea {
    min-height: 38px !important;
    max-height: 90px !important;
    height: 38px !important;
    padding: 8px 12px !important;
    font-size: 13.5px !important;
    line-height: 1.35 !important;
    border-radius: 12px !important;
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(121, 218, 255, 0.22) !important;
    color: #fff !important;
  }
  .chat-input.pro-input button {
    height: 38px !important;
    border-radius: 12px !important;
    padding: 0 12px !important;
    font-size: 13px !important;
  }
  .chat-input.pro-input .voice-btn {
    width: 38px !important;
    min-width: 38px !important;
    padding: 0 !important;
    font-size: 16px !important;
  }
  .chat-input.pro-input .quick-voice-btn,
  .chat-input.pro-input .quick-stop-btn {
    width: 36px !important;
    min-width: 36px !important;
    padding: 0 !important;
    font-size: 14px !important;
  }
  .chat-input.pro-input #chatSendBtn {
    padding: 0 14px !important;
    font-weight: 800 !important;
    background: linear-gradient(135deg, #18c8ff, #7f35ff 70%, #b646ff) !important;
  }
}

/* Vision Tool & Face Reading Camera Styles (Xem tu?ng tr?c ti?p) */
.vision-tool-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.vision-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(125px, 1fr));
  gap: 10px;
  margin: 8px 0;
}
.vision-actions-compact {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  margin: 6px 0 10px !important;
}
.vision-action-btn.btn-sm {
  padding: 6px 14px !important;
  font-size: 12px !important;
  border-radius: 10px !important;
  height: 34px !important;
  min-height: 34px !important;
  width: auto !important;
  font-weight: 600 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
}

.vision-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 14px;
  border-radius: 14px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  border: 1px solid rgba(0, 240, 255, 0.35);
  background: rgba(10, 24, 58, 0.75);
  color: #eaf6ff;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
  transition: all 0.2s ease;
}
.vision-action-btn:hover, .vision-action-btn:active {
  transform: translateY(-2px);
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.4);
  border-color: #00f0ff;
}
.vision-action-btn.primary-camera {
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.85), rgba(168, 85, 247, 0.85));
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.45);
}
.vision-camera-box {
  position: relative;
  width: 100%;
  max-width: 460px;
  margin: 0 auto 12px;
  border-radius: 20px;
  overflow: hidden;
  border: 2px solid rgba(0, 240, 255, 0.6);
  box-shadow: 0 0 30px rgba(0, 240, 255, 0.3);
  background: #020816;
}
.vision-video {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  display: block;
}
.vision-video.mirror {
  transform: scaleX(-1);
}
.vision-face-guide {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.vision-face-oval {
  width: 190px;
  height: 250px;
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  border: 2px dashed rgba(0, 240, 255, 0.85);
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.4), inset 0 0 15px rgba(0, 240, 255, 0.2);
  animation: pulseGuide 2s infinite ease-in-out;
}
@keyframes pulseGuide {
  0%, 100% { border-color: rgba(0, 240, 255, 0.85); transform: scale(1); }
  50% { border-color: rgba(236, 72, 153, 0.95); transform: scale(1.02); }
}
.vision-guide-text {
  margin-top: 10px;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  background: rgba(0, 0, 0, 0.65);
  padding: 4px 12px;
  border-radius: 999px;
  backdrop-filter: blur(4px);
}
.vision-cam-ctrls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 12px;
  background: rgba(3, 10, 28, 0.85);
}
.vision-snap-btn {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: linear-gradient(135deg, #00f0ff, #ec4899);
  border: 3px solid #fff;
  box-shadow: 0 0 25px rgba(0, 240, 255, 0.7);
  color: #fff;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s ease;
}
.vision-snap-btn:active {
  transform: scale(0.9);
}
.vision-preview-card {
  position: relative;
  width: 100%;
  max-width: 440px;
  margin: 0 auto 12px;
  border-radius: 20px;
  overflow: hidden;
  border: 1.5px solid rgba(0, 240, 255, 0.4);
  background: rgba(3, 11, 28, 0.6);
  box-shadow: 0 0 25px rgba(0, 240, 255, 0.2);
}
.vision-preview-img-wrap {
  position: relative;
  width: 100%;
  max-height: 380px;
  overflow: hidden;
  background: #020714;
}
.vision-preview-img {
  width: 100%;
  max-height: 380px;
  object-fit: contain;
  display: block;
}
.vision-scan-bar {
  position: absolute;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, #00f0ff, #fff, #00f0ff, transparent);
  box-shadow: 0 0 15px #00f0ff, 0 0 30px #00f0ff;
  animation: scanLaser 2s infinite ease-in-out alternate;
  z-index: 5;
}
@keyframes scanLaser {
  0% { top: 2%; opacity: 0.6; }
  100% { top: 96%; opacity: 1; }
}
.vision-preview-status {
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(7, 21, 52, 0.85);
  font-size: 12px;
  color: #9feeff;
}
.vision-retake-btn {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 11px;
  cursor: pointer;
}
.vision-auto-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0;
  font-size: 13px;
  color: #a4b3e6;
  cursor: pointer;
}
.vision-auto-toggle input {
  width: 16px;
  height: 16px;
  accent-color: #00f0ff;
  cursor: pointer;
}

/* ========================================================
   STREAMING, QUICK CHIPS & PRINT WATERMARK ENHANCEMENTS
   ======================================================== */

.streaming-cursor {
  display: inline-block;
  width: 8px;
  height: 18px;
  margin-left: 4px;
  vertical-align: middle;
  background: #00f0ff;
  border-radius: 2px;
  box-shadow: 0 0 8px #00f0ff;
  animation: cursorBlink 0.9s infinite ease-in-out;
}
@keyframes cursorBlink {
  0%, 100% { opacity: 0.15; }
  50% { opacity: 1; }
}

.chat-quick-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 8px 6px;
  margin-bottom: 6px;
  scrollbar-width: none;
}
.chat-quick-chips::-webkit-scrollbar {
  display: none;
}
.quick-chip {
  flex: 0 0 auto;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 215, 0, 0.35);
  color: #ffe27a;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.quick-chip:hover, .quick-chip:active {
  background: rgba(255, 215, 0, 0.22);
  border-color: #ffd700;
  transform: translateY(-1px);
}

.small-action-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #e0e8ff;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.2s;
}
.small-action-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}


/* =========================================================================
   PHASE 2: GIAO DIỆN HỒ SƠ BẢN MỆNH + BÀN LÁ SỐ 12 CUNG 4X4 + REAL-TIME SSE
   ========================================================================= */

/* Topbar Hồ Sơ Bản Mệnh Pill & Badge */
.destiny-nav-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.16), rgba(120, 80, 255, 0.28));
  border: 1px solid rgba(255, 215, 0, 0.55);
  color: #fff;
  border-radius: 999px;
  padding: 6px 14px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 0 16px rgba(255, 215, 0, 0.2);
  white-space: nowrap;
}
.destiny-nav-pill:hover {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.3), rgba(120, 80, 255, 0.42));
  border-color: #ffd700;
  box-shadow: 0 0 24px rgba(255, 215, 0, 0.45);
  transform: translateY(-1px);
}
.destiny-nav-icon { font-size: 15px; }
.destiny-badge-status {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.destiny-badge-status.saved {
  background: rgba(46, 213, 115, 0.25);
  border: 1px solid #2ed573;
  color: #7bed9f;
  box-shadow: 0 0 8px rgba(46, 213, 115, 0.4);
}
.destiny-badge-status.not-saved {
  background: rgba(255, 171, 0, 0.2);
  border: 1px solid rgba(255, 171, 0, 0.6);
  color: #ffd36a;
}

/* =========================================================================
   UNIVERSAL MULTILINGUAL LANGUAGE SWITCHER (VI / EN / ZH)
   ========================================================================= */

/* Topbar Language Switch Bar */
.lang-switch-bar {
  display: inline-flex;
  align-items: center;
  background: rgba(8, 22, 58, 0.88);
  border: 1px solid rgba(110, 180, 255, 0.45);
  border-radius: 999px;
  padding: 3px 5px;
  gap: 4px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 100;
  flex-shrink: 0;
}
.lang-switch-bar .lang-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.22s ease;
  white-space: nowrap;
}
.lang-switch-bar .lang-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}
.lang-switch-bar .lang-btn.active {
  background: linear-gradient(135deg, #0ea5e9, #6366f1);
  color: #fff;
  font-weight: 800;
  box-shadow: 0 0 12px rgba(14, 165, 233, 0.55);
}

/* Floating Language Dock (Always visible on all screens) */
.floating-lang-dock {
  position: fixed;
  bottom: 86px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: rgba(6, 16, 44, 0.92);
  border: 1px solid rgba(110, 180, 255, 0.4);
  border-radius: 999px;
  padding: 6px 5px;
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.5), 0 0 15px rgba(56, 189, 248, 0.2);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 998;
  transition: transform 0.22s ease;
}
.floating-lang-dock:hover {
  transform: scale(1.05);
  border-color: #38bdf8;
}
.float-lang-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid transparent;
  background: transparent;
  font-size: 18px;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all 0.2s ease;
  line-height: 1;
}
.float-lang-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: scale(1.12);
}
.float-lang-btn.active {
  border-color: #ffd700;
  background: rgba(255, 215, 0, 0.22);
  box-shadow: 0 0 12px rgba(255, 215, 0, 0.6);
}

@media (max-width: 768px) {
  .floating-lang-dock {
    bottom: 146px !important;
    right: 14px !important;
  }
}

.lang-switch-wrap {
  position: relative;
  display: inline-block;
  z-index: 100;
}
.lang-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(14, 30, 68, 0.72);
  border: 1px solid rgba(110, 180, 255, 0.45);
  color: #fff;
  border-radius: 999px;
  padding: 6px 12px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.22s ease;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  white-space: nowrap;
}
.lang-pill:hover, .lang-pill:focus-visible {
  border-color: #38bdf8;
  background: rgba(20, 44, 98, 0.9);
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.35);
  transform: translateY(-1px);
}
.lang-arrow {
  font-size: 11px;
  opacity: 0.8;
  transition: transform 0.2s ease;
}
.lang-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 160px;
  background: rgba(7, 18, 45, 0.96);
  border: 1px solid rgba(110, 180, 255, 0.4);
  border-radius: 14px;
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.55), 0 0 20px rgba(56, 189, 248, 0.15);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 6px;
  display: none;
  flex-direction: column;
  gap: 4px;
  z-index: 200;
  animation: langFadeIn 0.18s ease-out;
}
.lang-dropdown.show {
  display: flex;
}
@keyframes langFadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}
.lang-opt {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: #e2e8f0;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: all 0.18s ease;
}
.lang-opt:hover {
  background: rgba(56, 189, 248, 0.15);
  border-color: rgba(56, 189, 248, 0.3);
  color: #fff;
}
.lang-opt.active {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.25), rgba(168, 85, 247, 0.25));
  border-color: rgba(56, 189, 248, 0.55);
  color: #ffd700;
  font-weight: 700;
}
.lang-opt-flag { font-size: 16px; }
.lang-opt-name { flex: 1; }

/* Sidebar language selector */
.side-lang-box {
  margin: 16px 0 10px;
  padding: 12px;
  background: rgba(10, 24, 56, 0.6);
  border: 1px solid rgba(110, 180, 255, 0.2);
  border-radius: 14px;
}
.side-lang-title {
  font-size: 12px;
  font-weight: 700;
  color: #94a3b8;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.side-lang-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}
.side-lang-grid .lang-opt {
  padding: 7px 10px;
  background: rgba(255, 255, 255, 0.05);
}
.side-lang-grid .lang-opt:hover {
  background: rgba(56, 189, 248, 0.2);
}


/* Modal Hồ Sơ Bản Mệnh */
.destiny-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 20, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.destiny-modal-backdrop.show,
.modal-overlay.destiny-modal-backdrop.show {
  opacity: 1 !important;
  pointer-events: auto !important;
}
.destiny-modal-box {
  width: 100%;
  max-width: 540px;
  background: linear-gradient(160deg, rgba(14, 28, 68, 0.96), rgba(6, 14, 38, 0.98)) !important;
  border: 1px solid rgba(255, 215, 0, 0.45) !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), 0 0 35px rgba(255, 215, 0, 0.18) !important;
  border-radius: 24px !important;
  padding: 26px !important;
  color: #fff;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(20px) scale(0.97);
  transition: transform 0.25s ease;
}
.destiny-modal-backdrop.show .destiny-modal-box,
.modal-overlay.show .destiny-modal-box {
  transform: translateY(0) scale(1) !important;
}
.destiny-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}
.destiny-modal-head h2 {
  margin: 0;
  font-size: 22px;
  color: #ffe685;
}
.destiny-modal-tag {
  font-size: 11px;
  background: rgba(0, 240, 255, 0.15);
  border: 1px solid rgba(0, 240, 255, 0.4);
  color: #7df6ff;
  border-radius: 999px;
  padding: 3px 9px;
}
.destiny-modal-sub {
  font-size: 13px;
  color: #b9ccf0;
  line-height: 1.5;
  margin: 0 0 18px;
}
.destiny-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.destiny-form-group {
  margin-bottom: 12px;
}
.destiny-form-group label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: #d8e5ff;
  margin-bottom: 5px;
}
.destiny-form-group .req { color: #ff5e7e; }
.destiny-form-group input,
.destiny-form-group select {
  width: 100%;
  padding: 10px 12px;
  background: rgba(3, 10, 28, 0.75);
  border: 1px solid rgba(110, 180, 255, 0.35);
  border-radius: 12px;
  color: #fff;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}
.destiny-form-group input:focus,
.destiny-form-group select:focus {
  border-color: #ffd700;
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.25);
}
.destiny-modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}
.destiny-modal-status {
  margin-top: 10px;
  font-size: 13px;
  text-align: center;
  color: #7bed9f;
}

/* Bàn Lá Số Tử Vi 12 Cung 4x4 Grid */
.tuvi-page-shell {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.tuvi-header-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 24px;
  background: linear-gradient(135deg, rgba(14, 28, 68, 0.75), rgba(7, 16, 42, 0.85));
  border: 1px solid rgba(255, 215, 0, 0.35);
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  flex-wrap: wrap;
}
.tuvi-header-title-wrap h2 {
  margin: 0 0 6px;
  font-size: 22px;
  color: #fff;
}
.tuvi-header-title-wrap p {
  margin: 0;
  font-size: 13.5px;
  color: #bcd0f7;
}
.destiny-quick-edit-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 215, 0, 0.45);
  color: #ffe685;
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}
.destiny-quick-edit-btn:hover {
  background: rgba(255, 215, 0, 0.15);
  border-color: #ffd700;
  transform: translateY(-1px);
}

.tuvi-board-wrap {
  width: 100%;
  padding: 6px 0;
}
.tuvi-grid-4x4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(4, minmax(115px, auto));
  gap: 12px;
  max-width: 1060px;
  margin: 0 auto;
  position: relative;
}

/* 12 Cung Cells with Metallic Gold glow */
.cung-cell {
  position: relative;
  background: linear-gradient(145deg, rgba(14, 26, 62, 0.9), rgba(6, 14, 38, 0.92));
  border: 1px solid rgba(255, 215, 0, 0.3);
  border-radius: 16px;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35), inset 0 0 12px rgba(255, 215, 0, 0.04);
  user-select: none;
}
.cung-cell:hover {
  border-color: rgba(255, 215, 0, 0.85);
  background: linear-gradient(145deg, rgba(24, 44, 98, 0.95), rgba(12, 24, 60, 0.98));
  box-shadow: 0 0 25px rgba(255, 215, 0, 0.38), inset 0 0 16px rgba(255, 215, 0, 0.15);
  transform: translateY(-3px) scale(1.02);
  z-index: 5;
}
.cung-cell.active-cung {
  border-color: #ffd700;
  background: linear-gradient(145deg, rgba(32, 58, 125, 0.98), rgba(16, 32, 78, 0.98));
  box-shadow: 0 0 30px rgba(255, 215, 0, 0.55), inset 0 0 20px rgba(255, 215, 0, 0.25);
  transform: translateY(-2px);
}
.cung-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
}
.cung-chi {
  font-weight: 900;
  color: #ffd700;
  background: rgba(255, 215, 0, 0.14);
  border: 1px solid rgba(255, 215, 0, 0.35);
  border-radius: 6px;
  padding: 1px 6px;
  letter-spacing: 1px;
}
.cung-tag {
  color: #8edeff;
  opacity: 0.85;
  font-size: 10px;
}
.cung-title {
  margin: 6px 0 2px;
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.5px;
}
.cung-desc {
  margin: 0;
  font-size: 11px;
  color: #b5c7e8;
  line-height: 1.35;
}
.cung-action-pill {
  margin-top: 6px;
  align-self: flex-start;
  font-size: 10.5px;
  color: #ffe685;
  background: rgba(255, 215, 0, 0.1);
  border: 1px solid rgba(255, 215, 0, 0.3);
  border-radius: 999px;
  padding: 2px 8px;
  font-weight: 700;
  transition: all 0.2s;
}
.cung-cell:hover .cung-action-pill {
  background: #ffd700;
  color: #1a1200;
  border-color: #ffd700;
}

/* THIÊN BÀN TRUNG TÂM (Center 2x2) */
.thien-ban {
  grid-column: 2 / 4;
  grid-row: 2 / 4;
  background: radial-gradient(circle at center, rgba(22, 38, 88, 0.95), rgba(7, 15, 42, 0.98));
  border: 2px solid rgba(255, 215, 0, 0.65);
  box-shadow: 0 0 35px rgba(255, 215, 0, 0.2), inset 0 0 30px rgba(255, 215, 0, 0.1);
  border-radius: 20px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  text-align: center;
  position: relative;
  z-index: 3;
}
.thien-ban-badge {
  font-size: 11.5px;
  font-weight: 900;
  letter-spacing: 2px;
  color: #ffd700;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.6);
}
.thien-ban-brand {
  font-size: 12px;
  color: #7df6ff;
  letter-spacing: 1px;
  margin-top: 2px;
  font-weight: 700;
}
.thien-ban-info-card {
  width: 100%;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 215, 0, 0.25);
  border-radius: 12px;
  padding: 10px 14px;
  margin: 10px 0;
}
.tb-name {
  font-size: 17px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}
.tb-grid-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 10px;
  font-size: 11.5px;
  text-align: left;
}
.tb-item {
  color: #b5c7e8;
}
.tb-item b {
  color: #ffe685;
}
.thien-ban-controls {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
  width: 100%;
}
.tb-edit-btn, .tb-overall-btn {
  flex: 1;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}
.tb-edit-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
}
.tb-edit-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}
.tb-overall-btn {
  background: linear-gradient(135deg, #00f0ff, #7f35ff);
  border: none;
  color: #fff;
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.35);
}
.tb-overall-btn:hover {
  filter: brightness(1.15);
  transform: translateY(-1px);
}
.thien-ban-quick-prompts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  width: 100%;
}
.tb-chip {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 215, 0, 0.3);
  color: #ffe27a;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.tb-chip:hover {
  background: rgba(255, 215, 0, 0.22);
  border-color: #ffd700;
  transform: translateY(-1px);
}

/* Result panel for Tu Vi */
.tuvi-result-panel {
  min-height: 280px;
  margin-top: 10px;
}
.tuvi-result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 215, 0, 0.2);
  padding-bottom: 12px;
  margin-bottom: 14px;
}
.tuvi-result-head h2 {
  margin: 0;
  font-size: 20px;
  color: #ffe685;
}
.tuvi-active-pill {
  font-size: 12px;
  font-weight: 700;
  background: linear-gradient(135deg, #ffd700, #ff9500);
  color: #1a1200;
  padding: 4px 12px;
  border-radius: 999px;
  box-shadow: 0 0 12px rgba(255, 215, 0, 0.3);
}
.tuvi-result-body {
  font-size: 14.5px;
  line-height: 1.75;
  color: #e6edff;
}
.tuvi-placeholder {
  color: #9ab4dd;
  font-style: italic;
}
.result-action-bar {
  display: flex;
  gap: 8px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  flex-wrap: wrap;
}

/* Responsive for 4x4 Grid */
@media (max-width: 768px) {
  .tuvi-grid-4x4 {
    gap: 6px;
  }
  .cung-cell {
    padding: 8px 6px;
    min-height: 95px;
  }
  .cung-title {
    font-size: 12.5px;
  }
  .cung-desc {
    display: none;
  }
  .cung-action-pill {
    font-size: 9.5px;
    padding: 1px 6px;
  }
  .thien-ban {
    padding: 10px;
  }
  .tb-name {
    font-size: 14px;
  }
  .thien-ban-badge {
    font-size: 9.5px;
  }
  .tb-grid-details {
    font-size: 10px;
    grid-template-columns: 1fr;
    gap: 2px;
  }
  .tb-chip {
    font-size: 10px;
    padding: 3px 8px;
  }
}

/* @media print for A4 export */
@media print {
  .topbar, .bottom-nav, .side-menu, .menu-shade, .hero-section,
  .search-shell, .feature-tabs-wrap, .chat-input, .chat-upload-bar,
  .chat-quick-prompts, .chat-pro-sidebar, .chat-pro-head, .chat-mobile-settings,
  .destiny-modal-backdrop, .modal-overlay, #appDownloadModal,
  .vision-actions, .vision-camera-box, .vision-cam-ctrls,
  .result-action-bar, .msg-action-bar, .tb-edit-btn, .thien-ban-quick-prompts,
  button, select, input, textarea {
    display: none !important;
  }

  body {
    background: #fff !important;
    color: #111 !important;
    font-family: 'Times New Roman', serif !important;
    font-size: 12pt !important;
    line-height: 1.6 !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  #stars { display: none !important; }

  .app {
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .tuvi-grid-4x4, .thien-ban, .cung-cell, .result-panel, .msg {
    background: #fff !important;
    color: #111 !important;
    border-color: #888 !important;
    box-shadow: none !important;
  }

  body::before {
    content: "dangnam.online";
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-35deg);
    font-size: 60pt;
    font-weight: 900;
    color: rgba(0, 0, 0, 0.05) !important;
    pointer-events: none;
    z-index: 9999;
    text-transform: uppercase;
    letter-spacing: 10px;
  }
}

/* Auth Tabs Switcher */
.auth-tabs-toggle {
  display: flex;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 4px;
  gap: 6px;
  margin-bottom: 12px;
}
.auth-tab-btn {
  flex: 1;
  padding: 9px 12px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: #a0aec0;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.25s ease;
}
.auth-tab-btn.active {
  background: linear-gradient(135deg, #00f0ff, #7000ff);
  color: #fff;
  box-shadow: 0 2px 10px rgba(0, 240, 255, 0.35);
}


/* ========================================================
   MODERN MYSTIC LUXURY CHAT AI - DANGNAM.ONLINE
   Full-screen immersive AI pair with Persona & Context Bar
======================================================== */

/* Global Chat Page Flow */
html,
body[data-route="chat"] {
  overflow-x: hidden !important;
  overflow-y: auto !important;
  height: auto !important;
  min-height: 100vh !important;
  background: radial-gradient(circle at 50% 10%, #0d1633 0%, #060a1a 100%) !important;
}

body[data-route="chat"] .hero-section {
  display: block !important;
  height: 48px !important;
  min-height: 48px !important;
  max-height: 48px !important;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  border: none !important;
  overflow: visible !important;
}
body[data-route="chat"] .hero-section::before,
body[data-route="chat"] .hero-section::after,
body[data-route="chat"] .hero-person,
body[data-route="chat"] .hero-center,
body[data-route="chat"] .feature-tabs-wrap {
  display: none !important;
}
body[data-route="chat"] .topbar {
  position: sticky !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  height: 48px !important;
  min-height: 48px !important;
  z-index: 99 !important;
  padding: 4px 16px !important;
  border-radius: 0 0 16px 16px !important;
  background: rgba(5, 12, 31, 0.94) !important;
  backdrop-filter: blur(14px) !important;
  box-sizing: border-box !important;
}

body[data-route="chat"] .app {
  position: relative !important;
  width: 100% !important;
  max-width: 1420px !important;
  margin: 0 auto !important;
  padding: 6px 14px 92px 14px !important;
  height: auto !important;
  min-height: calc(100vh - 60px) !important;
  box-sizing: border-box !important;
  display: flex !important;
  flex-direction: column !important;
}

body[data-route="chat"] #page-chat.page.active,
body[data-route="chat"] .chat-pro-page {
  display: flex !important;
  flex-direction: column !important;
  flex: 1 1 auto !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
}

/* Chat Shell: 2-column on desktop */
@media (min-width: 769px) {
  body[data-route="chat"] .chat-pro-shell {
    display: grid !important;
    grid-template-columns: 280px minmax(0, 1fr) !important;
    gap: 16px !important;
    width: 100% !important;
    flex: 1 1 auto !important;
    height: calc(100vh - 165px) !important;
    min-height: 640px !important;
    max-height: 980px !important;
  }
}
@media (max-width: 768px) {
  body[data-route="chat"] .chat-pro-shell {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    gap: 10px !important;
    min-height: calc(100dvh - 150px) !important;
  }
  body[data-route="chat"] .chat-pro-sidebar {
    display: none !important;
  }
  .desktop-only { display: none !important; }
}

/* Sidebar Styling */
body[data-route="chat"] .chat-pro-sidebar {
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
  overflow-y: auto !important;
  padding: 14px !important;
  border-radius: 20px !important;
  background: linear-gradient(155deg, rgba(10, 18, 48, 0.94), rgba(7, 12, 34, 0.90)) !important;
  border: 1px solid rgba(91, 213, 255, 0.25) !important;
  backdrop-filter: blur(20px) !important;
  box-sizing: border-box !important;
  gap: 12px !important;
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.4) !important;
}

/* Main Chat Container */
body[data-route="chat"] .chat-pro-main {
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
  overflow: hidden !important;
  padding: 12px 18px 12px 18px !important;
  border-radius: 22px !important;
  box-sizing: border-box !important;
  background: linear-gradient(155deg, rgba(8, 17, 46, 0.94), rgba(6, 11, 32, 0.92)) !important;
  border: 1px solid rgba(91, 213, 255, 0.25) !important;
  backdrop-filter: blur(24px) !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45) !important;
  position: relative !important;
}

/* Modern Mystic Header */
.mystic-head {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex: 0 0 auto !important;
  margin-bottom: 6px !important;
  padding-bottom: 8px !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  gap: 8px !important;
}
.chat-head-left {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}
.chat-online-badge {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  color: #e2e8f0 !important;
  white-space: nowrap !important;
}
.pulse-dot {
  width: 8px !important;
  height: 8px !important;
  border-radius: 50% !important;
  background: #10b981 !important;
  box-shadow: 0 0 10px #10b981 !important;
  animation: pulseGreen 2s infinite !important;
}
@keyframes pulseGreen {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1.1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.mystic-selector-group {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex-wrap: wrap !important;
}
.selector-item {
  display: inline-flex !important;
  align-items: center !important;
  background: rgba(2, 10, 28, 0.8) !important;
  border: 1px solid rgba(112, 179, 255, 0.35) !important;
  border-radius: 10px !important;
  padding: 2px 8px !important;
  gap: 4px !important;
}
.selector-icon { font-size: 13px !important; }
.selector-item select {
  background: transparent !important;
  border: none !important;
  color: #fff !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  outline: none !important;
  cursor: pointer !important;
  padding: 3px 0 !important;
}

/* Chat Message Log */
body[data-route="chat"] .chat-pro-main .pro-chat-log {
  display: block !important;
  flex: 1 1 0px !important;
  height: auto !important;
  min-height: 120px !important;
  max-height: none !important;
  overflow-y: auto !important;
  padding: 14px 16px !important;
  border-radius: 16px !important;
  margin-bottom: 6px !important;
  scroll-behavior: smooth !important;
  background: rgba(2, 8, 23, 0.38) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-sizing: border-box !important;
  position: relative !important;
}

/* Mystic Empty Welcome State */
.mystic-welcome-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px 16px 14px;
  animation: fadeIn 0.4s ease;
}
.mandala-orb {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 215, 0, 0.28), rgba(139, 92, 246, 0.24), transparent);
  border: 1.5px solid rgba(255, 215, 0, 0.6);
  display: grid;
  place-items: center;
  font-size: 24px;
  color: #ffd700;
  box-shadow: 0 0 25px rgba(255, 215, 0, 0.4);
  margin-bottom: 12px;
  animation: rotateOrb 16s linear infinite;
}
@keyframes rotateOrb {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
.mystic-welcome-box h3 {
  font-size: 20px;
  font-weight: 800;
  margin: 0 0 6px;
  background: linear-gradient(135deg, #ffe066, #ffb703 60%, #c084fc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.mystic-welcome-box p {
  font-size: 13px;
  color: #94a3b8;
  margin: 0 0 20px;
  max-width: 480px;
}

/* 2x2 Suggestion Cards Grid */
.mystic-suggestion-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
  max-width: 700px;
}
@media (max-width: 600px) {
  .mystic-suggestion-grid {
    grid-template-columns: 1fr;
  }
}
.mystic-sug-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 215, 0, 0.2);
  text-align: left;
  cursor: pointer;
  transition: all 0.25s ease;
}
.mystic-sug-card:hover {
  background: rgba(255, 215, 0, 0.12);
  border-color: rgba(255, 215, 0, 0.6);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.35);
}
.sug-icon { font-size: 22px; flex-shrink: 0; }
.sug-content b {
  display: block;
  font-size: 13px;
  color: #ffe066;
  margin-bottom: 2px;
}
.sug-content p {
  font-size: 11.5px;
  color: #cbd5e1;
  margin: 0;
  line-height: 1.35;
}

/* Active Profile Context Bar */
.chat-destiny-context-bar {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 5px 12px !important;
  margin: 4px 0 6px 0 !important;
  border-radius: 10px !important;
  background: linear-gradient(90deg, rgba(255, 215, 0, 0.12), rgba(139, 92, 246, 0.10)) !important;
  border: 1px solid rgba(255, 215, 0, 0.3) !important;
  font-size: 12px !important;
  color: #fef08a !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
}
.chat-destiny-context-bar:hover {
  background: linear-gradient(90deg, rgba(255, 215, 0, 0.20), rgba(139, 92, 246, 0.18)) !important;
  border-color: #ffd700 !important;
}
.destiny-edit-chip {
  font-size: 11px !important;
  color: #ffd700 !important;
  font-weight: 700 !important;
  margin-left: 8px !important;
  padding: 1px 6px !important;
  border-radius: 6px !important;
  background: rgba(255, 215, 0, 0.15) !important;
}

/* Floating Capsule Composer */
.mystic-composer {
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr) auto !important;
  gap: 8px !important;
  align-items: center !important;
  padding: 6px 12px !important;
  border-radius: 18px !important;
  background: rgba(12, 22, 48, 0.96) !important;
  border: 1px solid rgba(95, 172, 255, 0.45) !important;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5) !important;
  margin-top: 4px !important;
}
.mystic-composer:focus-within {
  border-color: #ffd700 !important;
  box-shadow: 0 0 25px rgba(255, 215, 0, 0.25) !important;
}
.composer-icon-btn {
  background: transparent !important;
  border: none !important;
  font-size: 20px !important;
  cursor: pointer !important;
  padding: 4px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #94a3b8 !important;
  transition: color 0.2s !important;
}
.composer-icon-btn:hover { color: #ffd700 !important; }

.mystic-composer textarea {
  min-height: 42px !important;
  max-height: 120px !important;
  height: 42px !important;
  padding: 9px 12px !important;
  font-size: 14px !important;
  line-height: 1.45 !important;
  border-radius: 12px !important;
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(121, 218, 255, 0.25) !important;
  color: #fff !important;
  resize: none !important;
  box-sizing: border-box !important;
}

.composer-send-btn {
  height: 40px !important;
  min-width: 82px !important;
  padding: 0 16px !important;
  border-radius: 12px !important;
  font-weight: 800 !important;
  font-size: 13.5px !important;
  border: none !important;
  background: linear-gradient(135deg, #00f0ff, #7f35ff 70%, #b646ff) !important;
  color: #fff !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: all 0.2s ease !important;
  box-shadow: 0 0 14px rgba(0, 240, 255, 0.35) !important;
}
.composer-send-btn:hover { filter: brightness(1.15) !important; transform: translateY(-1px) !important; }

/* Stop Generating Button State */
.composer-send-btn.is-generating {
  background: linear-gradient(135deg, #ef4444, #dc2626) !important;
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.6) !important;
  animation: pulseRed 1.6s infinite !important;
}
@keyframes pulseRed {
  0% { transform: scale(1); }
  50% { transform: scale(1.03); }
  100% { transform: scale(1); }
}

/* Mystic Shimmer Thinking State */
.mystic-thinking-shimmer {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 600;
  color: #fef08a;
  padding: 4px 10px;
  border-radius: 8px;
  background: rgba(255, 215, 0, 0.08);
  border: 1px solid rgba(255, 215, 0, 0.2);
  animation: shimmerGlow 2s ease-in-out infinite;
}
.shimmer-sparkle {
  color: #ffd700;
  animation: rotateOrb 3s linear infinite;
}
@keyframes shimmerGlow {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; text-shadow: 0 0 10px rgba(255, 215, 0, 0.6); }
}

/* Floating Scroll Bottom Button */
.scroll-bottom-pill {
  position: absolute !important;
  bottom: 120px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  background: rgba(15, 23, 42, 0.95) !important;
  border: 1px solid #ffd700 !important;
  color: #ffe066 !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  padding: 6px 14px !important;
  border-radius: 999px !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5) !important;
  cursor: pointer !important;
  z-index: 50 !important;
  transition: all 0.2s ease !important;
}
.scroll-bottom-pill:hover {
  background: #ffd700 !important;
  color: #0b0f19 !important;
}

/* Rich Mystic Markdown Elements */
.mystic-bold {
  color: #fbbf24 !important;
  font-weight: 700 !important;
  text-shadow: 0 0 8px rgba(251, 191, 36, 0.25) !important;
}
.mystic-sec-card {
  margin: 10px 0 !important;
  padding: 10px 14px !important;
  border-radius: 12px !important;
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(255, 215, 0, 0.22) !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2) !important;
}
.mystic-sec-title {
  font-size: 14px !important;
  font-weight: 800 !important;
  color: #ffe066 !important;
  margin-bottom: 6px !important;
  border-bottom: 1px solid rgba(255, 215, 0, 0.15) !important;
  padding-bottom: 4px !important;
}
.mystic-quote {
  border-left: 3px solid #fbbf24 !important;
  background: rgba(251, 191, 36, 0.06) !important;
  padding: 8px 12px !important;
  margin: 8px 0 !important;
  border-radius: 0 8px 8px 0 !important;
  font-style: italic !important;
  color: #f1f5f9 !important;
}
.msg-aborted-pill {
  margin-top: 6px;
  color: #f87171;
  font-size: 11.5px;
}

/* ==========================================================================
   CHAT SYNC & ANTI-OVERFLOW OPTIMIZATIONS (Desktop & Mobile)
   Prevents horizontal layout breaking, text dumps, and auto-scroll jitter
   ========================================================================== */
.pro-chat-log,
.pro-chat-log .msg,
.pro-chat-log .content-body,
.pro-chat-log .msg * {
  word-wrap: break-word !important;
  overflow-wrap: anywhere !important;
  word-break: break-word !important;
}

.pro-chat-log {
  overflow-x: hidden !important;
  scroll-behavior: auto !important;
}

.pro-chat-log .content-body {
  display: block;
  min-width: 0;
  max-width: 100%;
  line-height: 1.65;
}

.streaming-cursor {
  display: inline-block;
  width: 6px;
  height: 14px;
  vertical-align: middle;
  margin-left: 4px;
  background-color: #60a5fa;
  border-radius: 2px;
  animation: synamCursorPulse 0.75s infinite ease-in-out;
}

@keyframes synamCursorPulse {
  0%, 100% { opacity: 1; transform: scaleY(1); }
  50% { opacity: 0.15; transform: scaleY(0.7); }
}


/* ===== UNIVERSAL CODE BLOCK & MONOSPACE ENHANCEMENT ===== */
pre {
  background: #181926 !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  border-radius: 10px !important;
  padding: 12px 16px !important;
  overflow-x: auto !important;
  margin: 12px 0 !important;
  font-family: 'Fira Code', Consolas, Monaco, 'Courier New', monospace !important;
  font-size: 13.5px !important;
  line-height: 1.55 !important;
  color: #a6da95 !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25) !important;
}
code {
  font-family: 'Fira Code', Consolas, Monaco, 'Courier New', monospace !important;
  font-size: 13px !important;
  background: rgba(255, 255, 255, 0.1) !important;
  padding: 2px 6px !important;
  border-radius: 4px !important;
  color: #f5a97f !important;
}
pre code {
  background: transparent !important;
  padding: 0 !important;
  color: inherit !important;
  border-radius: 0 !important;
}


/* NAM60: Compact Bottom Utilities Section on Desktop */
.home-bottom-utilities {
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}
.home-utilities-header {
  margin-bottom: 12px;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: #94a3b8;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 8px;
}
.home-utilities-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.compact-card {
  min-height: 140px !important;
  max-height: 190px !important;
  padding: 14px 16px !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  border-radius: 16px !important;
  background: rgba(10, 20, 48, 0.75) !important;
  border: 1px solid rgba(100, 200, 255, 0.22) !important;
}
.compact-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 6px;
}
.compact-card-head h3 {
  font-size: 12.5px !important;
  margin: 0 !important;
  color: #ffd700 !important;
  letter-spacing: 0.5px;
  font-weight: 800;
}
.compact-actions {
  display: flex;
  gap: 5px;
  margin: 0 !important;
}
.compact-actions button {
  padding: 4px 8px !important;
  font-size: 11px !important;
  border-radius: 8px !important;
  background: rgba(255, 255, 255, 0.08) !important;
}
.compact-history-list {
  font-size: 12px;
  overflow-y: auto;
  max-height: 85px;
  line-height: 1.35;
}
.compact-history-list .history-mini-item {
  padding: 5px 8px !important;
  font-size: 11.5px !important;
  border-radius: 8px !important;
  margin-bottom: 4px;
}
.compact-voice {
  display: flex !important;
  flex-direction: column;
  gap: 8px;
  margin: 0 !important;
}
.compact-voice select {
  padding: 7px 10px !important;
  font-size: 12px !important;
  border-radius: 10px !important;
  margin: 0 !important;
  background: rgba(2, 12, 34, 0.8) !important;
}
.voice-rate-slider {
  display: flex;
  align-items: center;
  gap: 8px;
}
.voice-rate-slider input {
  margin: 0 !important;
  padding: 0 !important;
  height: 6px;
  flex: 1;
}
.compact-stats-body {
  display: grid;
  grid-template-columns: 80px 1fr;
  align-items: center;
  gap: 12px;
}
.compact-ring {
  width: 72px !important;
  height: 72px !important;
  font-size: 18px !important;
}
.compact-ring span {
  font-size: 14px !important;
}
.compact-ring small {
  font-size: 9px !important;
}
.compact-stats-list {
  padding: 0 !important;
  margin: 0 !important;
  list-style: none;
  font-size: 11px !important;
  color: #c8d5eb;
}
.compact-stats-list li {
  margin: 2px 0 !important;
  display: flex;
  justify-content: space-between;
}
.compact-stats-list b {
  color: var(--gold);
}
@media(max-width: 920px) {
  .home-utilities-grid {
    grid-template-columns: 1fr;
  }
}

/* =========================================================================
   DYNAMIC MYSTIC ANIMATED BACKGROUND (STARS, NEBULA & SHOOTING METEORS)
   ========================================================================= */
#stars {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  pointer-events: none !important;
  z-index: 0 !important;
  overflow: hidden !important;
  background-color: transparent !important;
  background-image: 
    radial-gradient(1.5px 1.5px at 25px 35px, rgba(255, 255, 255, 0.95), transparent),
    radial-gradient(1.8px 1.8px at 120px 80px, rgba(56, 213, 255, 0.9), transparent),
    radial-gradient(1.5px 1.5px at 220px 160px, rgba(183, 115, 255, 0.85), transparent),
    radial-gradient(2px 2px at 340px 60px, rgba(255, 215, 0, 0.85), transparent),
    radial-gradient(1.2px 1.2px at 80px 240px, rgba(255, 255, 255, 0.75), transparent),
    radial-gradient(1.5px 1.5px at 190px 310px, rgba(56, 213, 255, 0.8), transparent),
    radial-gradient(2px 2px at 290px 220px, rgba(255, 255, 255, 0.9), transparent),
    radial-gradient(1.2px 1.2px at 410px 290px, rgba(183, 115, 255, 0.75), transparent),
    radial-gradient(1.8px 1.8px at 60px 380px, rgba(56, 213, 255, 0.85), transparent),
    radial-gradient(1.5px 1.5px at 260px 420px, rgba(255, 215, 0, 0.8), transparent) !important;
  background-size: 450px 450px, 380px 380px, 520px 520px, 480px 480px, 320px 320px, 420px 420px, 500px 500px, 360px 360px, 460px 460px, 400px 400px !important;
  animation: cosmicStarDrift 50s linear infinite !important;
  will-change: background-position;
}

/* Living Cosmic Nebulae Glow */
#stars::before {
  content: "" !important;
  position: absolute !important;
  inset: -40% !important;
  width: 180% !important;
  height: 180% !important;
  background: 
    radial-gradient(circle at 25% 30%, rgba(30, 80, 190, 0.28) 0%, transparent 45%),
    radial-gradient(circle at 75% 25%, rgba(139, 92, 246, 0.25) 0%, transparent 42%),
    radial-gradient(circle at 50% 70%, rgba(6, 182, 212, 0.18) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(217, 70, 239, 0.18) 0%, transparent 40%) !important;
  animation: cosmicNebulaBreathe 18s ease-in-out infinite alternate !important;
  pointer-events: none !important;
  mix-blend-mode: screen !important;
  will-change: transform, opacity;
}

/* Primary Shooting Star */
#stars::after {
  content: "" !important;
  position: absolute !important;
  top: -120px !important;
  left: 65% !important;
  width: 3px !important;
  height: 140px !important;
  background: linear-gradient(180deg, #ffffff, rgba(56,213,255,0.9), transparent) !important;
  border-radius: 999px !important;
  filter: drop-shadow(0 0 10px #38d5ff) drop-shadow(0 0 20px #8b5cf6) !important;
  opacity: 0 !important;
  transform: rotate(-45deg) !important;
  animation: shootingStarMain 9s ease-in-out infinite !important;
  pointer-events: none !important;
  will-change: transform, opacity;
}

/* Extra star layers for depth & shimmer */
.star-cluster {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.star-cluster-1 {
  background-image: 
    radial-gradient(1px 1px at 45px 120px, rgba(255,255,255,0.95), transparent),
    radial-gradient(1.5px 1.5px at 160px 40px, rgba(147,197,253,0.85), transparent),
    radial-gradient(2px 2px at 280px 190px, rgba(253,224,71,0.9), transparent),
    radial-gradient(1.2px 1.2px at 390px 110px, rgba(192,132,252,0.8), transparent),
    radial-gradient(1.8px 1.8px at 90px 320px, rgba(255,255,255,0.85), transparent),
    radial-gradient(1.5px 1.5px at 310px 370px, rgba(56,213,255,0.85), transparent);
  background-size: 420px 420px;
  animation: starTwinklePulse 6s ease-in-out infinite alternate, cosmicStarDriftReverse 65s linear infinite;
  will-change: opacity, background-position;
}
.star-cluster-2 {
  background-image: 
    radial-gradient(1.2px 1.2px at 70px 70px, rgba(255,255,255,0.85), transparent),
    radial-gradient(2px 2px at 200px 260px, rgba(56,213,255,0.95), transparent),
    radial-gradient(1px 1px at 340px 180px, rgba(255,255,255,0.8), transparent),
    radial-gradient(1.8px 1.8px at 150px 390px, rgba(216,180,254,0.85), transparent);
  background-size: 350px 350px;
  animation: starTwinklePulse 8s ease-in-out 2s infinite alternate, cosmicStarDrift 55s linear infinite;
  will-change: opacity, background-position;
}

/* Staggered Shooting Stars / Meteors */
.meteor {
  position: absolute;
  width: 2.5px;
  height: 120px;
  background: linear-gradient(180deg, #ffffff, rgba(56,213,255,0.95), transparent);
  border-radius: 999px;
  filter: drop-shadow(0 0 8px #38d5ff) drop-shadow(0 0 16px #3b82f6);
  opacity: 0;
  pointer-events: none;
  transform: rotate(-45deg);
  will-change: transform, opacity;
}
.meteor-1 {
  top: -100px;
  left: 30%;
  animation: meteorFly1 12s ease-in-out 2.5s infinite;
}
.meteor-2 {
  top: -100px;
  left: 78%;
  animation: meteorFly2 16s ease-in-out 7.5s infinite;
}
.meteor-3 {
  top: -100px;
  left: 52%;
  animation: meteorFly3 20s ease-in-out 12.5s infinite;
}

@keyframes cosmicStarDrift {
  0% {
    background-position: 
      0 0, 0 0, 0 0, 0 0, 0 0, 
      0 0, 0 0, 0 0, 0 0, 0 0;
  }
  100% {
    background-position: 
      450px 900px, -380px 760px, 520px -520px, -480px 480px, 320px 640px,
      -420px 840px, 500px -500px, -360px 720px, 460px -460px, -400px 800px;
  }
}

@keyframes cosmicStarDriftReverse {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: -420px -840px;
  }
}

@keyframes starTwinklePulse {
  0%, 100% { opacity: 0.65; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.03); }
}

@keyframes cosmicNebulaBreathe {
  0% {
    transform: scale(1) rotate(0deg);
    opacity: 0.65;
  }
  50% {
    transform: scale(1.1) rotate(3deg);
    opacity: 0.95;
  }
  100% {
    transform: scale(1.04) rotate(-2deg);
    opacity: 0.72;
  }
}

@keyframes shootingStarMain {
  0% {
    transform: translate(250px, -120px) rotate(-45deg);
    opacity: 0;
  }
  2.5% {
    opacity: 1;
  }
  5.5% {
    transform: translate(-550px, 680px) rotate(-45deg);
    opacity: 0;
  }
  100% {
    transform: translate(-550px, 680px) rotate(-45deg);
    opacity: 0;
  }
}

@keyframes meteorFly1 {
  0% {
    transform: translate(200px, -100px) rotate(-45deg);
    opacity: 0;
  }
  2% {
    opacity: 1;
  }
  5% {
    transform: translate(-500px, 600px) rotate(-45deg);
    opacity: 0;
  }
  100% {
    transform: translate(-500px, 600px) rotate(-45deg);
    opacity: 0;
  }
}

@keyframes meteorFly2 {
  0% {
    transform: translate(250px, -100px) rotate(-42deg);
    opacity: 0;
  }
  2% {
    opacity: 1;
  }
  5% {
    transform: translate(-600px, 700px) rotate(-42deg);
    opacity: 0;
  }
  100% {
    transform: translate(-600px, 700px) rotate(-42deg);
    opacity: 0;
  }
}

@keyframes meteorFly3 {
  0% {
    transform: translate(180px, -80px) rotate(-48deg);
    opacity: 0;
  }
  2% {
    opacity: 1;
  }
  4.5% {
    transform: translate(-450px, 550px) rotate(-48deg);
    opacity: 0;
  }
  100% {
    transform: translate(-450px, 550px) rotate(-48deg);
    opacity: 0;
  }
}

/* =========================================================================
   UNIVERSAL SMART BIRTH DATE INPUT (DESKTOP & MOBILE HIGH CONTRAST)
   ========================================================================= */

/* Native date input dark scheme & high-contrast indicator */
input[type="date"] {
  color-scheme: dark;
}
input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(0.85) sepia(1) saturate(5) hue-rotate(5deg) brightness(1.2);
  cursor: pointer;
  opacity: 0.85;
  transition: opacity 0.2s, transform 0.2s;
  padding: 4px;
}
input[type="date"]::-webkit-calendar-picker-indicator:hover {
  opacity: 1;
  transform: scale(1.15);
}

/* Smart Date Wrapper for flexible typing, auto-masking & calendar popup */
.smart-date-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.smart-date-wrapper .smart-date-input {
  width: 100% !important;
  padding-right: 46px !important;
  box-sizing: border-box !important;
  letter-spacing: 0.5px;
  font-family: inherit;
  font-size: 14px;
}

.smart-date-picker-btn {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 215, 0, 0.12);
  border: 1px solid rgba(255, 215, 0, 0.35);
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding: 0;
  margin: 0;
  transition: all 0.2s ease;
  z-index: 3;
  color: #ffd700;
  user-select: none;
}

.smart-date-picker-btn:hover {
  background: rgba(255, 215, 0, 0.28);
  border-color: rgba(255, 215, 0, 0.7);
  box-shadow: 0 0 12px rgba(255, 215, 0, 0.4);
  transform: translateY(-50%) scale(1.08);
}

.smart-date-picker-btn:active {
  transform: translateY(-50%) scale(0.95);
}

/* Hidden date input anchor for invoking browser's native date dialog */
.smart-date-picker-hidden {
  position: absolute !important;
  right: 12px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  outline: none !important;
  pointer-events: none !important;
  color-scheme: dark !important;
}

.smart-date-hint {
  display: block;
  font-size: 11px;
  color: #94a3b8;
  margin-top: 4px;
  font-style: italic;
}



/* =========================================================================
   TRỢ LÝ CSKH & HỖ TRỢ KỸ THUẬT (Floating FAB + Panel Widget)
   ========================================================================= */
.cskh-wrap {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9998;
}

.cskh-fab {
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, rgba(14, 28, 68, 0.95), rgba(7, 16, 42, 0.95));
  border: 1.5px solid rgba(255, 215, 0, 0.65);
  border-radius: 999px;
  padding: 8px 16px 8px 12px;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45), 0 0 18px rgba(255, 215, 0, 0.28);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  user-select: none;
}

.cskh-fab:hover {
  transform: translateY(-3px) scale(1.03);
  border-color: #ffd700;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6), 0 0 28px rgba(255, 215, 0, 0.45);
}

.cskh-fab-icon {
  font-size: 20px;
  filter: drop-shadow(0 0 6px #ffd700);
}

.cskh-fab-label {
  font-size: 13px;
  font-weight: 800;
  color: #ffd700;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.cskh-fab-pulse {
  width: 8px;
  height: 8px;
  background: #22c55e;
  border-radius: 50%;
  box-shadow: 0 0 8px #22c55e;
  animation: cskhPulse 2s infinite;
}

@keyframes cskhPulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 7px rgba(34, 197, 94, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

/* Support Drawer Panel */
.cskh-drawer {
  position: fixed;
  bottom: 84px;
  right: 24px;
  z-index: 9999;
  animation: cskhSlideUp 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes cskhSlideUp {
  from { opacity: 0; transform: translateY(20px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.cskh-card {
  width: 390px;
  max-width: calc(100vw - 32px);
  height: 560px;
  max-height: calc(100vh - 120px);
  background: linear-gradient(165deg, rgba(8, 20, 52, 0.96), rgba(4, 11, 28, 0.98));
  border: 1px solid rgba(255, 215, 0, 0.45);
  border-radius: 22px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7), 0 0 30px rgba(56, 189, 248, 0.15);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: #e2e8f0;
}

/* Header */
.cskh-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
}

.cskh-header-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cskh-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(56, 189, 248, 0.3));
  border: 1px solid rgba(255, 215, 0, 0.5);
  display: grid;
  place-items: center;
  font-size: 18px;
}

.cskh-title {
  margin: 0;
  font-size: 14px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.2px;
}

.cskh-status {
  font-size: 11px;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 2px;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 6px #22c55e;
}

.cskh-close-btn {
  background: transparent;
  border: 0;
  color: #94a3b8;
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
  transition: all 0.18s ease;
}

.cskh-close-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

/* Navigation Tabs */
.cskh-nav-tabs {
  display: flex;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.15);
}

.cskh-tab-btn {
  flex: 1;
  background: transparent;
  border: 0;
  padding: 10px 6px;
  font-size: 12px;
  font-weight: 700;
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.2s ease;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  text-align: center;
}

.cskh-tab-btn:hover {
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.03);
}

.cskh-tab-btn.active {
  color: #ffd700;
  border-bottom-color: #ffd700;
  background: rgba(255, 215, 0, 0.06);
}

/* Tab Panes */
.cskh-tab-pane {
  display: none;
  flex: 1;
  flex-direction: column;
  padding: 16px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.cskh-tab-pane.active {
  display: flex;
}

.cskh-tab-desc {
  margin: 0 0 12px;
  font-size: 12px;
  line-height: 1.5;
  color: #94a3b8;
}

/* FAQ List */
.cskh-faq-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cskh-faq-card {
  background: rgba(14, 28, 68, 0.6);
  border: 1px solid rgba(110, 180, 255, 0.2);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.2s ease;
}

.cskh-faq-card:hover {
  border-color: rgba(56, 189, 248, 0.4);
  background: rgba(18, 36, 84, 0.7);
}

.cskh-faq-q {
  padding: 11px 14px;
  font-size: 13px;
  font-weight: 700;
  color: #e2e8f0;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.cskh-faq-q .faq-arrow {
  font-size: 11px;
  color: #94a3b8;
  transition: transform 0.2s ease;
}

.cskh-faq-card.open .faq-arrow {
  transform: rotate(180deg);
  color: #ffd700;
}

.cskh-faq-a {
  display: none;
  padding: 0 14px 12px;
  font-size: 12px;
  line-height: 1.6;
  color: #cbd5e1;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  margin-top: 4px;
  padding-top: 8px;
}

.cskh-faq-card.open .cskh-faq-a {
  display: block;
}

/* Report Form */
.cskh-form-group {
  margin-bottom: 12px;
}

.cskh-form-group label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: #cbd5e1;
  margin-bottom: 5px;
}

.cskh-form-group select,
.cskh-form-group input,
.cskh-form-group textarea {
  width: 100%;
  background: rgba(3, 10, 26, 0.7);
  border: 1px solid rgba(110, 180, 255, 0.3);
  border-radius: 10px;
  padding: 8px 12px;
  color: #fff;
  font-size: 13px;
  outline: none;
  box-sizing: border-box;
  font-family: inherit;
  transition: border-color 0.2s ease;
}

.cskh-form-group select:focus,
.cskh-form-group input:focus,
.cskh-form-group textarea:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.25);
}

.cskh-form-group textarea {
  resize: vertical;
  min-height: 70px;
}

.cskh-device-summary {
  font-size: 11px;
  color: #64748b;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  padding: 6px 10px;
  margin-bottom: 12px;
  line-height: 1.4;
}

.cskh-submit-btn {
  width: 100%;
  padding: 10px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #18c8ff, #7f35ff 70%, #b646ff);
  color: #fff;
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(127, 53, 255, 0.35);
  transition: all 0.2s ease;
}

.cskh-submit-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(127, 53, 255, 0.5);
}

.cskh-report-status {
  margin-top: 10px;
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}

/* Chat Tab */
.cskh-chat-logs {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-right: 4px;
  margin-bottom: 12px;
  overscroll-behavior: contain;
}

.cskh-msg {
  display: flex;
  flex-direction: column;
  max-width: 86%;
}

.cskh-msg.user {
  align-self: flex-end;
}

.cskh-msg.bot {
  align-self: flex-start;
}

.cskh-msg-bubble {
  padding: 9px 13px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.5;
  word-break: break-word;
}

.cskh-msg.user .cskh-msg-bubble {
  background: linear-gradient(135deg, #38bdf8, #2563eb);
  color: #fff;
  border-bottom-right-radius: 3px;
}

.cskh-msg.bot .cskh-msg-bubble {
  background: rgba(15, 30, 70, 0.85);
  border: 1px solid rgba(110, 180, 255, 0.25);
  color: #f1f5f9;
  border-bottom-left-radius: 3px;
}

.cskh-chat-input-bar {
  display: flex;
  gap: 8px;
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 10px;
}

.cskh-chat-input-bar input {
  flex: 1;
  background: rgba(3, 10, 26, 0.7);
  border: 1px solid rgba(110, 180, 255, 0.3);
  border-radius: 999px;
  padding: 8px 14px;
  color: #fff;
  font-size: 13px;
  outline: none;
}

.cskh-chat-input-bar input:focus {
  border-color: #38bdf8;
}

.cskh-chat-input-bar button {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 0;
  background: linear-gradient(135deg, #38bdf8, #8b5cf6);
  color: #fff;
  font-size: 15px;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: transform 0.2s ease;
}

.cskh-chat-input-bar button:hover {
  transform: scale(1.06);
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
  .cskh-wrap {
    bottom: 84px !important;
    right: 14px !important;
  }
  .cskh-fab-label {
    display: none;
  }
  .cskh-fab {
    padding: 10px;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    justify-content: center;
  }
  .cskh-fab-pulse {
    position: absolute;
    top: 3px;
    right: 3px;
  }
  .cskh-drawer {
    bottom: 140px !important;
    right: 12px !important;
    left: 12px !important;
  }
  .cskh-card {
    width: 100% !important;
    max-width: 100% !important;
    height: 490px !important;
  }
}
