/* Thiên Long Tàng Phong homepage - classic ink & antique gold */
:root { --tp-ink:#071525; --tp-ink2:#0c2036; --tp-gold:#d5b46c; --tp-gold2:#a98545; --tp-cream:#f0dfbe; --tp-red:#6f1716; }
html,body { min-height:100%; }
body.tl-home { margin:0; color:#f3e7ca; background:#071525; overflow-x:hidden; }
body.tl-home #main-content { min-height:0; }
/* Homepage topbar is defined in the final responsive block below. */
.tp-homepage { position:relative; width:100%; min-height:calc(100vh - 64px); box-sizing:border-box; padding:12px 26px 7px; display:grid; grid-template-rows:minmax(0,1fr) auto auto; gap:8px; overflow:hidden; background:radial-gradient(ellipse at 50% 25%,rgba(26,54,80,.65),transparent 50%),linear-gradient(180deg,#08182b,#061321); }
.tp-homepage::before { content:""; position:absolute; inset:0; pointer-events:none; opacity:.16; background-image:radial-gradient(rgba(213,180,108,.35) .7px,transparent .8px); background-size:9px 9px; mix-blend-mode:screen; }
.tp-hero { position:relative; z-index:1; min-height:0; display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; padding:4px 0 7px; }
.tp-hero-ornament { position:absolute; top:4%; bottom:4%; width:min(24vw,310px); opacity:.22; pointer-events:none; background-image:url('/images/homepage-assets/dragon-ornament.png'); background-size:contain; background-repeat:no-repeat; background-position:center; }
.tp-hero-ornament-left { left:0; transform:scaleX(-1); }
.tp-hero-ornament-right { right:0; }
.tp-brand { width:min(100%,780px); display:flex; flex-direction:column; align-items:center; gap:3px; }
.tp-logo { display:block; width:clamp(235px,31vw,410px); max-height:clamp(105px,19vh,180px); height:auto; object-fit:contain; }
.tp-slogan { display:block; width:min(560px,78vw); max-height:46px; height:auto; object-fit:contain; margin-top:2px; }
.tp-free-banner { display:block; width:min(650px,88vw); max-height:82px; height:auto; object-fit:contain; margin-top:4px; }
.tp-cta-stack { position:relative; z-index:2; display:flex; flex-direction:column; align-items:center; gap:4px; margin-top:6px; }
.tp-asset-button { display:inline-flex; justify-content:center; align-items:center; line-height:0; text-decoration:none; transition:transform .18s ease,filter .18s ease; }
.tp-asset-button:hover { transform:translateY(-2px); filter:brightness(1.06); }
.tp-download img { width:min(470px,76vw); height:auto; }
.tp-secondary-actions { display:flex; align-items:center; justify-content:center; gap:12px; }
.tp-account-create img { width:min(300px,42vw); height:auto; }
.tp-zalo img { width:min(275px,40vw); height:auto; }
.tp-news { position:relative; z-index:2; width:min(1360px,100%); margin:0 auto; min-height:clamp(205px,26vh,250px); box-sizing:border-box; padding:27px clamp(26px,4vw,70px) 22px; color:#362517; }
.tp-news-frame { position:absolute; inset:0; z-index:0; border:22px solid transparent; border-image-source:url('/images/homepage-assets/news-paper-panel.png'); border-image-slice:26 28 26 28 fill; border-image-width:22px; border-image-repeat:stretch; pointer-events:none; }
.tp-news-heading { position:absolute; z-index:1; top:-16px; left:50%; transform:translateX(-50%); width:min(300px,45vw); display:flex; justify-content:center; align-items:center; }
.tp-news-heading>img { width:100%; height:auto; display:block; }
.tp-view-all { position:absolute; right:-35%; top:38%; width:118px; line-height:0; }
.tp-view-all img { width:100%; height:auto; }
.tp-news-content { position:relative; z-index:1; display:grid; grid-template-columns:minmax(0,1.08fr) minmax(0,.95fr); gap:26px; align-items:stretch; height:100%; min-height:150px; }
.tp-featured-news { display:grid; grid-template-columns:minmax(155px,39%) minmax(0,1fr); gap:18px; align-items:center; min-width:0; }
.tp-featured-image { display:block; width:100%; aspect-ratio:16/9; border:1px solid rgba(108,70,31,.48); border-radius:5px; overflow:hidden; box-shadow:0 2px 6px rgba(51,30,9,.14); }
.tp-featured-image img { display:block; width:100%; height:100%; object-fit:cover; }
.tp-featured-copy { min-width:0; display:flex; flex-direction:column; gap:5px; }
.tp-news-label { display:inline-flex; align-self:flex-start; color:#fff3dc; background:#8c261c; border-radius:3px; padding:3px 7px; font:700 10px/1.2 Georgia,serif; letter-spacing:.04em; }
.tp-featured-title { color:#4d2616; font:700 clamp(15px,1.45vw,22px)/1.23 Georgia,"Times New Roman",serif; text-decoration:none; }
.tp-featured-title:hover { color:#8a3c20; }
.tp-featured-copy p { margin:0; color:#4e3927; font:13px/1.45 Georgia,"Times New Roman",serif; }
.tp-featured-meta { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-top:2px; color:#5b3f27; font:12px Georgia,serif; }
.tp-news-detail { display:block; width:130px; line-height:0; flex:0 0 auto; }
.tp-news-detail img { display:block; width:100%; height:auto; }
.tp-news-list { display:flex; flex-direction:column; justify-content:center; border-left:1px solid rgba(133,92,45,.32); padding-left:20px; min-width:0; }
.tp-news-list-item { display:grid; grid-template-columns:20px minmax(0,1fr) auto; align-items:center; gap:9px; padding:12px 0; border-bottom:1px solid rgba(133,92,45,.3); color:#3b2818; text-decoration:none; min-width:0; }
.tp-news-list-item:first-child { border-top:1px solid rgba(133,92,45,.3); }
.tp-news-list-item:hover .tp-news-list-title { color:#8b3b21; }
.tp-news-list-mark { color:#9d642b; font-size:15px; }
.tp-news-list-title { font:700 clamp(12px,1.08vw,15px)/1.25 Georgia,"Times New Roman",serif; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.tp-news-list-item time { color:#5b4530; font:11px Georgia,serif; white-space:nowrap; }
.tp-news-empty { position:relative; z-index:1; min-height:140px; display:flex; align-items:center; justify-content:center; color:#5b4530; font:16px Georgia,serif; }
.tp-home-footer { position:relative; z-index:1; width:min(1360px,100%); margin:0 auto; line-height:0; }
.tp-home-footer img { display:block; width:100%; height:auto; max-height:92px; object-fit:contain; }
.tp-visually-hidden { position:absolute!important; width:1px!important; height:1px!important; padding:0!important; margin:-1px!important; overflow:hidden!important; clip:rect(0,0,0,0)!important; white-space:nowrap!important; border:0!important; }
@media (min-width:1500px) { .tp-homepage { padding-left:34px;padding-right:34px; } }
@media (max-height:820px) and (min-width:901px) { .tp-homepage { gap:4px;padding-top:7px;padding-bottom:4px; } .tp-logo { max-height:clamp(100px,15vh,140px); } .tp-slogan { max-height:38px; } .tp-free-banner { max-height:70px; } .tp-download img { width:min(430px,70vw); } .tp-news { min-height:205px; padding-top:24px;padding-bottom:17px; } .tp-home-footer img { max-height:75px; } }
@media (max-height:720px) and (min-width:901px) { .tp-homepage { min-height:calc(100vh - 64px); grid-template-rows:minmax(0,1fr) auto auto; } .tp-logo { width:260px;max-height:95px; } .tp-slogan { width:440px;max-height:32px; } .tp-free-banner { width:540px;max-height:55px; } .tp-download img { width:360px; } .tp-account-create img { width:230px; } .tp-zalo img { width:220px; } .tp-news { min-height:185px; padding:22px 28px 15px; } .tp-featured-copy p { display:none; } .tp-news-list-item { padding:8px 0; } .tp-home-footer img { max-height:56px; } }
@media (max-width:1100px) { .tp-topbar-shell { grid-template-columns:1fr auto; gap:10px; } .tp-social-links { display:none; } .tp-main-nav { justify-content:flex-start; gap:24px; } .tp-topbar-account { grid-column:2; } .tp-news-content { gap:17px; } .tp-featured-news { gap:12px; } .tp-news-list { padding-left:15px; } }
@media (max-width:900px) { body.tl-home { overflow-y:auto; } .tp-home-topbar { position:sticky;top:0; background-image:none; } .tp-topbar-shell { width:calc(100% - 24px); min-height:78px; grid-template-columns:1fr auto; grid-template-rows:auto auto; } .tp-main-nav { display:flex; grid-column:1/-1; grid-row:2; width:100%; justify-content:space-around; gap:10px; padding:0 0 8px; } .tp-topbar-account { grid-column:2;grid-row:1;gap:6px; } .tp-main-nav a { font-size:11px;padding:7px 2px 9px; } .tp-main-nav a.tp-nav-active::after { bottom:2px; } .tp-login-image img { width:110px; } .tp-register-image img { width:120px; } .tp-homepage { min-height:calc(100vh - 58px); display:flex; flex-direction:column; overflow:visible; padding:12px 12px 8px; gap:14px; } .tp-hero { min-height:440px; flex:0 0 auto; } .tp-hero-ornament { width:22vw; opacity:.13; } .tp-logo { width:min(360px,65vw); max-height:145px; } .tp-slogan { width:min(520px,90vw); } .tp-free-banner { width:min(600px,94vw); max-height:none; } .tp-download img { width:min(420px,88vw); } .tp-account-create img { width:min(280px,43vw); } .tp-zalo img { width:min(260px,43vw); } .tp-news { min-height:270px; padding:34px 25px 22px; } .tp-news-content { grid-template-columns:1fr; gap:10px; } .tp-featured-news { grid-template-columns:minmax(130px,36%) minmax(0,1fr); } .tp-news-list { border-left:0; border-top:1px solid rgba(133,92,45,.3); padding:0; } .tp-news-list-item { padding:9px 0; } .tp-home-footer img { max-height:none; } }
@media (max-width:560px) { .tp-topbar-shell { width:calc(100% - 16px); } .tp-social-links { display:none; } .tp-login-image img { width:94px; } .tp-register-image img { width:100px; } .tp-homepage { padding-left:8px;padding-right:8px; } .tp-hero { min-height:390px; } .tp-logo { width:min(300px,76vw); max-height:125px; } .tp-slogan { width:95vw; } .tp-free-banner { width:96vw; } .tp-secondary-actions { gap:2px; } .tp-account-create img { width:46vw; } .tp-zalo img { width:45vw; } .tp-news { padding:32px 18px 20px; min-height:330px; } .tp-news-heading { width:230px; } .tp-view-all { width:88px; right:-28%; } .tp-featured-news { grid-template-columns:1fr; gap:9px; } .tp-featured-image { max-width:320px; aspect-ratio:16/9; } .tp-featured-copy p { font-size:12px; } .tp-news-detail { width:100px; } .tp-news-list-item { grid-template-columns:16px minmax(0,1fr); gap:7px; } .tp-news-list-item time { grid-column:2; font-size:10px; } .tp-news-list-title { white-space:normal; } .tp-home-footer { margin-top:2px; } }
@media (prefers-reduced-motion:reduce) { .tp-asset-button { transition:none; } }

/* Homepage topbar — ordered exactly: Logo, Home, News, Download, Zalo, Fanpage, Login, Register */
.tp-home-topbar {
    position:relative; z-index:50; width:100%; min-height:72px; height:auto;
    background-color:#071525; background-image:url('/images/homepage-assets/topbar-ornate-bg.png');
    background-size:100% 100%; background-position:center; background-repeat:no-repeat;
    border-bottom:1px solid rgba(194,153,75,.52); box-shadow:0 3px 12px rgba(0,0,0,.18);
}
.tp-homebar-inner {
    width:min(1600px,calc(100% - 56px)); min-height:72px; margin:0 auto;
    display:grid; grid-template-columns:150px minmax(0,1fr) 250px; align-items:center; gap:24px;
}
.tp-homebar-brand { display:flex; align-items:center; justify-content:flex-start; min-width:0; text-decoration:none; }
.tp-homebar-brand img { display:block; width:clamp(108px,8.8vw,138px); max-height:58px; height:auto; object-fit:contain; }
.tp-homebar-nav { display:flex; align-items:center; justify-content:center; gap:clamp(18px,2.1vw,38px); min-width:0; }
.tp-homebar-nav a { position:relative; padding:9px 0; color:#e5d2a4; text-decoration:none; white-space:nowrap; font-family:Georgia,'Times New Roman',serif; font-size:clamp(11px,0.8vw,13px); font-weight:700; letter-spacing:.055em; transition:color .18s ease; }
.tp-homebar-nav a:hover { color:#ffdf91; }
.tp-homebar-nav a.tp-homebar-active { color:#f2d18a; }
.tp-homebar-nav a.tp-homebar-active::after { content:''; position:absolute; left:15%; right:15%; bottom:0; height:1px; background:#caa45a; }
.tp-homebar-actions { display:flex; align-items:center; justify-content:flex-end; gap:7px; min-width:0; }
.tp-homebar-login-image,.tp-homebar-register-image { display:inline-flex; align-items:center; justify-content:center; line-height:0; flex:0 0 auto; text-decoration:none; transition:transform .15s ease,filter .15s ease; }
.tp-homebar-login-image img { display:block; width:clamp(105px,7.6vw,124px); height:auto; }
.tp-homebar-register-image img { display:block; width:clamp(120px,8.8vw,142px); height:auto; }
.tp-homebar-login-image:hover,.tp-homebar-register-image:hover { transform:translateY(-1px); filter:brightness(1.07); }
.tp-homebar-account,.tp-homebar-logout button { color:#e5d2a4; border:1px solid rgba(194,153,75,.6); border-radius:3px; background:rgba(5,15,27,.38); padding:9px 11px; text-decoration:none; white-space:nowrap; font:700 11px Georgia,'Times New Roman',serif; letter-spacing:.05em; }
.tp-homebar-logout { margin:0; }
.tp-homebar-logout button { cursor:pointer; }
@media(max-width:1180px) {
    .tp-homebar-inner { width:calc(100% - 32px); grid-template-columns:126px minmax(0,1fr) 226px; gap:12px; }
    .tp-homebar-nav { gap:clamp(12px,1.5vw,20px); }
    .tp-homebar-nav a { font-size:11px; letter-spacing:.035em; }
    .tp-homebar-login-image img { width:105px; }
    .tp-homebar-register-image img { width:120px; }
}
@media(max-width:900px) {
    .tp-home-topbar { position:sticky; top:0; background-size:auto 100%; background-position:center; }
    .tp-homebar-inner { width:calc(100% - 20px); min-height:84px; grid-template-columns:112px minmax(0,1fr); grid-template-rows:44px 36px; gap:0 8px; padding:2px 0; }
    .tp-homebar-brand { grid-column:1; grid-row:1; }
    .tp-homebar-brand img { width:108px; max-height:42px; }
    .tp-homebar-actions { grid-column:2; grid-row:1; gap:4px; }
    .tp-homebar-login-image img { width:98px; }
    .tp-homebar-register-image img { width:112px; }
    .tp-homebar-nav { grid-column:1/3; grid-row:2; justify-content:space-between; gap:8px; border-top:1px solid rgba(192,153,78,.22); padding:0 3px; }
    .tp-homebar-nav a { padding:7px 0 8px; font-size:10px; }
    .tp-homebar-nav a.tp-homebar-active::after { bottom:2px; }
}
@media(max-width:480px) {
    .tp-homebar-inner { grid-template-columns:90px minmax(0,1fr); width:calc(100% - 12px); }
    .tp-homebar-brand img { width:90px; }
    .tp-homebar-login-image img { width:84px; }
    .tp-homebar-register-image img { width:98px; }
    .tp-homebar-nav { gap:5px; }
    .tp-homebar-nav a { font-size:9px; letter-spacing:.015em; }
}
