/* Nex VPlay home v2 (Jeff 2026-10-19) — trial layout, see /js/home-v2.js.
   Every rule is under html.v2, so the current home is untouched.
   Type scale on this page: 11 / 12 / 14 / 17 px (hero keeps its own). Section gap 26 px.
   Orange = primary button + one accent only; badges and links are neutral. */

/* ── order, top to bottom ── */
html.v2 body{display:flex;flex-direction:column}
html.v2 #hero-section{order:-30}
html.v2 #party-live-section{order:-29}   /* Watch Party strip back (Jeff 2026-10-28); position can be changed here */
html.v2 #cw-section{order:-28}
html.v2 #top10-section{order:-27}
html.v2 #new-section{order:-26}
html.v2 #ann-slot{order:-25}
html.v2 #v2-creators{order:-25}
html.v2 #v2-fol{order:-25}
html.v2 #v2-types{order:-24}
html.v2 #mvchart-section{order:-23}
html.v2 #v2-reco{order:-22}
html.v2 #v2-g0,html.v2 #v2-g1,html.v2 #v2-g2{order:-22}
html.v2 #v2-all{order:-22}
html.v2 .mfoot-wrap{order:-21}
html.v2 #v2-foot{order:-20}
html.v2 .site-footer{order:-19}
/* rows v2 replaces: rotating banner, genre chips, party row, AI / MV / reel / genre rows */
html.v2 #banner-carousel,html.v2 #genre-row,html.v2 #soon-section,
html.v2 #aimov-section,html.v2 #ai-section,html.v2 #main-section,html.v2 #reel-section,
html.v2 #mv-section{display:none!important}
/* searching: results replace the rows (they render into #main-section) */
html.v2.v2-search #main-section{display:block!important;order:-28}
html.v2.v2-search #cw-section,html.v2.v2-search #top10-section,html.v2.v2-search #new-section,
html.v2.v2-search #ann-slot,html.v2.v2-search #v2-types,html.v2.v2-search #mvchart-section,
html.v2.v2-search #v2-creators,html.v2.v2-search #v2-fol,html.v2.v2-search #v2-reco,html.v2.v2-search #v2-g0,html.v2.v2-search #v2-g1,html.v2.v2-search #v2-g2,html.v2.v2-search #v2-all{display:none!important}

/* ── one section rhythm ── */
html.v2 #cw-section:not(:empty),html.v2 #top10-section:not(:empty),html.v2 #new-section:not(:empty),
html.v2 #v2-types,html.v2 #mvchart-section:not(:empty),html.v2 #v2-reco:not(:empty),
html.v2 #v2-creators:not(:empty),html.v2 #v2-fol:not(:empty),html.v2 #v2-g0:not(:empty),html.v2 #v2-g1:not(:empty),html.v2 #v2-g2:not(:empty),html.v2 #v2-all:not(:empty){margin-bottom:26px}
html.v2 .cat-scroll,html.v2 .top10-scroll,html.v2 .cw-scroll{padding:0 16px;gap:10px}
html.v2 .sec-header{padding:0 16px 10px;display:flex;justify-content:space-between;align-items:center;gap:8px}
html.v2 .sec-title{font-size:17px;font-weight:700;color:#fff;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
html.v2 .sec-more{font-size:12px;color:#a8a8a8;white-space:nowrap;flex-shrink:0}
html.v2 .top10-tag{display:none}
/* small line under a header (Top 10: what the ranking is based on) */
html.v2 .v2-h-note{font-size:12px;line-height:1.4;color:#9a9a9a;padding:0 16px 10px;margin-top:-6px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
html.v2 #ann-slot{margin:0 16px!important}
html.v2 #ann-slot:has(.nex-ann){margin-bottom:26px!important}

/* ── positioning line ── */

/* ── video cards: 2:3, same height in a row. Phone rows show whole cards + ~15 % of the
   next one at the right edge: width = (screen − 16 left − n gaps) / (n + 0.15) ── */
html.v2 .cat-item{width:calc((min(100vw,480px) - 46px) / 3.15);min-width:0;max-width:none;flex:0 0 auto}
html.v2 .mcard.v2c{background:none;border:0;border-radius:0;overflow:visible}
html.v2 .v2c .mcard-thumb{aspect-ratio:2/3;border-radius:10px;overflow:hidden;background:#1a1a1a;position:relative}
html.v2 .v2c .mcard-img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:center top}
html.v2 .v2c-info{padding:8px 2px 0;min-height:0}
html.v2 .v2c-title{font-size:14px;line-height:1.3;color:#f0f0f0;font-weight:500;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;min-height:2.6em}
html.v2 .v2c-sub{font-size:12px;line-height:1.4;color:#9a9a9a;margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-height:1.4em}
html.v2 a.v2c-cr{display:flex;align-items:baseline;gap:3px;color:#b8b8b8;text-decoration:none;padding:8px 0;margin:-6px 0 -8px;cursor:pointer}   /* 33 px to tap, same layout */
html.v2 .v2c-crn{min-width:0;overflow:hidden;text-overflow:ellipsis;text-decoration:underline;text-decoration-color:rgba(255,255,255,.25);text-underline-offset:2px}
html.v2 .v2c-go{flex:0 0 auto;color:#8a8a8a}
@media (hover:hover){html.v2 a.v2c-cr:hover{color:var(--gold)}html.v2 a.v2c-cr:hover .v2c-crn{text-decoration-color:currentColor}}
html.v2 .v2-badge{position:absolute;top:6px;left:6px;z-index:2;font-size:11px;line-height:1.3;padding:2px 6px;border-radius:5px;background:rgba(0,0,0,.72);color:#eee;border:0.5px solid rgba(255,255,255,.18)}

/* ── Top 10: bigger than every other card ── */
html.v2 .v2t{display:block}
html.v2 .v2t .top10-poster{width:calc((min(100vw,480px) - 36px) / 2.15)}
html.v2 .v2t-rank{position:absolute;left:8px;bottom:2px;z-index:2;font-family:'Anton',sans-serif;font-size:56px;line-height:1;color:#fff;text-shadow:0 2px 10px rgba(0,0,0,.7)}
html.v2 .v2-cmt{position:absolute;right:6px;bottom:8px;z-index:2;font-size:11px;line-height:1.3;padding:1px 6px;border-radius:9px;background:rgba(0,0,0,.66);color:#eee;white-space:nowrap;pointer-events:none}   /* 💬 count (2026-10-27) */

/* ── music chart: square covers + ▶ (not the video Top 10 look) ── */
html.v2 .v2m-scroll{display:flex;gap:12px;overflow-x:auto;padding:0 16px;scrollbar-width:none}
html.v2 .v2m-scroll::-webkit-scrollbar{display:none}
html.v2 .v2m{flex:0 0 auto;width:calc((min(100vw,480px) - 52px) / 3.15);cursor:pointer}
html.v2 .v2m-cover{position:relative;aspect-ratio:1/1;border-radius:10px;overflow:hidden;background:#1a1a1a}
html.v2 .v2m-cover .mcard-img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
/* music chart card (Jeff 2026-10-20): rank big in the top-left, a small see-through ▶ in the
   bottom-right, both 8 px from the edges; a soft dark corner under the rank keeps it readable on a
   light cover; 1–3 gold / silver / bronze. The ▶ is 32 px to see (36 on a computer) but 40 px to tap. */
html.v2 .v2m-cover::before{content:"";position:absolute;left:0;top:0;width:60%;height:55%;background:radial-gradient(circle at 0 0,rgba(0,0,0,.5),rgba(0,0,0,0) 70%);z-index:1;pointer-events:none}
html.v2 .v2m-rank{position:absolute;top:8px;left:8px;z-index:2;font-size:24px;line-height:1;font-weight:700;color:#fff;text-shadow:0 1px 3px rgba(0,0,0,.9),0 0 1px rgba(0,0,0,.9)}
html.v2 .v2m-rank.r1,html.v2 .v2m-rank.r2,html.v2 .v2m-rank.r3{font-size:32px;font-weight:800}   /* 1–3 bigger, all white (Jeff 2026-10-21) */
html.v2 .v2m-play{position:absolute;right:4px;bottom:4px;z-index:2;width:40px;height:40px;display:flex;align-items:center;justify-content:center}
html.v2 .v2m-play::before{content:"";position:absolute;width:32px;height:32px;border-radius:50%;background:rgba(0,0,0,.5);box-shadow:0 0 0 1px rgba(255,255,255,.18)}
html.v2 .v2m-play svg{position:relative;width:13px;height:13px;margin-left:2px;fill:#fff}
html.v2 .v2m .v2c-title{margin-top:8px}

/* ── empty card while its title loads (genre rows, "ทั้งหมด" grid) ── */
html.v2 .v2-sk .mcard-thumb{background:#1a1a1a}
html.v2 .v2-sk .v2c-title{background:linear-gradient(#1a1a1a,#1a1a1a) 0 3px/80% 13px no-repeat}
/* ── "ทั้งหมด (N เรื่อง)": 3 per row ── */
html.v2 .v2a-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px 10px;padding:0 16px}
html.v2 .v2a-cell{min-width:0}

/* ── ครีเอเตอร์มาแรง: round face + one-line name, 4 + ~15 % of the 5th on a phone ── */
html.v2 .v2cr-scroll{display:flex;gap:12px;overflow-x:auto;padding:0 16px;scrollbar-width:none}
html.v2 .v2cr-scroll::-webkit-scrollbar{display:none}
html.v2 .v2cr{flex:0 0 auto;width:calc((min(100vw,480px) - 64px) / 4.15);display:flex;flex-direction:column;align-items:center;gap:6px;text-decoration:none}
html.v2 .v2cr-face{position:relative;width:64px;height:64px;border-radius:50%;overflow:hidden;background:#262626;border:0.5px solid #333;display:flex;align-items:center;justify-content:center}
html.v2 .v2cr-ini{font-size:24px;font-weight:600;color:#cfcfcf}
html.v2 .v2cr-img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
html.v2 .v2cr-name{font-size:12px;line-height:1.4;color:#e0e0e0;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
/* waiting for the list, and it was shown last time: keep the row's height (measured 123 px at 390) */
html.v2 .v2cr-fans{font-size:11px;line-height:1.4;min-height:1.4em;margin-top:-4px}
/* + follower count (11 px line) + follow pill (24 px): measured 170 px at 390; following row 263 px */
html.v2 #v2-creators.v2cr-wait{min-height:170px;margin-bottom:26px}
html.v2 #v2-fol.v2fol-wait{min-height:263px}
@media (min-width:600px){html.v2 .v2cr{width:88px}}

/* ── type chips ── */
html.v2 .v2-chips{display:flex;gap:8px;overflow-x:auto;padding:0 16px;scrollbar-width:none}
html.v2 .v2-chips::-webkit-scrollbar{display:none}
html.v2 .v2-chip{flex:0 0 auto;font-family:inherit;font-size:14px;color:#e8e8e8;background:#1a1a1a;border:0.5px solid #333;border-radius:20px;padding:7px 14px;cursor:pointer;white-space:nowrap}

/* ── sponsor card in the feed: same shape as a video card + a small "โฆษณา" ── */
html.v2 .feed-ad-item .mcard{background:none;border:0;overflow:visible}
html.v2 .feed-ad .mcard-thumb{aspect-ratio:2/3;border-radius:10px;overflow:hidden}
html.v2 .feed-ad .mcard-over{display:none}
html.v2 .feed-ad .mcard-info{padding:8px 2px 0}
html.v2 .feed-ad-tag{font-size:11px}
html.v2 .feed-ad .mcard-meta,html.v2 .feed-ad-cta{font-size:12px}
html.v2 .feed-ad .nexads-adv{font-size:11px}

/* ── continue watching / footer ── */
html.v2 .cw-scroll .cw-card{flex:0 0 auto;width:calc((min(100vw,480px) - 46px) / 3.15);min-width:0;max-width:none}
html.v2 .v2-foot{display:flex;justify-content:center;gap:22px;padding:6px 16px 18px;flex-wrap:wrap}
html.v2 .v2-foot a{font-size:14px;color:#c8c8c8;text-decoration:none}
html.v2 .logo{color:var(--gold)}html.v2 .logo span{color:#e0e0e0;font-weight:700}   /* "Nex" orange + "VPlay" light grey (Jeff 2026-10-21); VPlay 400 → 700, it read thin (Jeff 2026-10-26) */

/* ── tablet / desktop: fixed card sizes ── */
@media (min-width:600px){
  html.v2 .cat-item,html.v2 .cw-scroll .cw-card{width:170px}
  html.v2 .v2a-grid{grid-template-columns:repeat(auto-fill,minmax(150px,1fr))}
  html.v2 .v2t .top10-poster{width:220px}
  html.v2 .v2m{width:160px}
  html.v2 .v2m-play::before{width:36px;height:36px}html.v2 .v2m-play svg{width:15px;height:15px}
}
@media (min-width:1024px){
  html.v2 .cat-item{width:190px}
  html.v2 .v2t .top10-poster{width:240px}
  html.v2 .v2t-rank{font-size:68px}
}

/* ── nothing under 11 px on the home page ── */
html.v2 .boost-tag{font-size:11px}
html.v2 .tier-badge{font-size:11px}
html.v2 .nexads-presented,html.v2 .nexads-presented .nexads-adv{font-size:11px!important}
html.v2 .ni{font-size:11px}
html.v2 .mfoot-tag,html.v2 .mfoot-glow-req{font-size:11px}
html.v2 .mfoot-note,html.v2 .mfoot-cta,html.v2 .mfoot-info-text p{font-size:12px}
html.v2 .mfoot-info-text h3{font-size:14px}
/* footer "อัปเดต" promos (incl. a Watch Party card) — v2 keeps only the partner perks */
html.v2 .mfoot-wrap .mfoot-section ~ .mfoot-section{display:none}
html.v2 .mfoot-cta{background:#262626;color:#eee}   /* orange stays for the primary button */

/* ── Hero text lower (Jeff 2026-10-21), phones/small tablets (≤767 px = movies-browse.html's phone block) ──
   The positioning box under the Hero is gone; its space (dots row 32 + box 57 + gap 26 = 115 px) goes to the
   Hero: the card is 89 px taller, the dots float inside its bottom edge under the play button, and the Hero
   keeps the 26 px section gap — so every row below starts exactly where it did (ดูต่อ / Top 10 …).
   The text block is bottom-anchored, so badges / title / meta / บันทึก / ▶ เล่น all move down together and
   the title printed on the cover shows. The paid Hero ad slide gets the same height (it was a 16:9 box, so
   the page jumped whenever the carousel reached it). */
@media (max-width:767px){
  html.v2 #hero-section{margin-bottom:26px}
  html.v2 .hero-card{height:calc(74vh + 89px);min-height:569px;max-height:809px}
  html.v2 .hero-overlay{padding-bottom:42px}
  html.v2 .hero-dots2{position:absolute;left:0;right:0;bottom:8px;z-index:3;padding:0;min-height:22px}
  html.v2 .hero-dots2 .hd::after{background:rgba(255,255,255,.38)}
  html.v2 .hero-dots2 .hd.on::after{background:var(--gold)}
  html.v2 .hero-card .hero-teaser-bar{padding-bottom:36px}   /* preview bar: its buttons stay above the dots */
  html.v2 #hero-section .nexads-hero{aspect-ratio:auto;height:calc(74vh + 89px);min-height:569px;max-height:809px;border-radius:0}
  html.v2 #hero-section .nexads-hero-ov{padding:16px 16px 42px}
}
/* desktop: the paid Hero ad slide = the film slides' height too (card 82vh, min 560 + the 32 px dots row) */
@media (min-width:1024px){
  html.v2 #hero-section .nexads-hero{aspect-ratio:auto;height:82vh;min-height:560px;border-radius:0;margin-bottom:32px}
  html.v2 #hero-section .nexads-hero-ov{padding:0 56px 64px}
}
html.v2 #mvnew-section{order:-22}
html.v2 #mvnew-section:not(:empty){margin-bottom:26px}

/* 2026-10-22: see-all grid - equal columns while more cards load */
html.v2 .grid2>*{min-width:0}

/* weekly creator crown (2026-10-22): sits ABOVE the round face (face has overflow:hidden) */
html.v2 .v2cr-wrap{position:relative;display:block;width:64px;height:64px}
html.v2 .v2cr-crown{position:absolute;top:-15px;left:50%;transform:translateX(-50%);width:28px;height:20px;z-index:2;pointer-events:none;filter:drop-shadow(0 1px 2px rgba(0,0,0,.6))}
html.v2 .v2cr-crown.gold{filter:drop-shadow(0 0 5px rgba(255,200,40,.85))}
html.v2 .v2cr-face.crowned-gold{border-color:#f5c542;box-shadow:0 0 8px rgba(245,197,66,.55)}
html.v2 .v2cr-face.crowned-silver{border-color:#cfd6df}
html.v2 .v2cr-face.crowned-bronze{border-color:#c07a3e}

/* crown v2 (2026-10-22): bigger metal crown, glow, sparkle on gold */
html.v2 .v2cr-crown{top:-19px;width:38px;height:29px;overflow:visible}
html.v2 .v2cr-crown.gold{filter:drop-shadow(0 0 6px rgba(255,196,40,.9)) drop-shadow(0 1px 1px rgba(0,0,0,.7))}
html.v2 .v2cr-crown.silver{filter:drop-shadow(0 0 4px rgba(210,225,255,.6)) drop-shadow(0 1px 1px rgba(0,0,0,.7))}
html.v2 .v2cr-crown.bronze{filter:drop-shadow(0 0 4px rgba(220,130,60,.55)) drop-shadow(0 1px 1px rgba(0,0,0,.7))}
html.v2 .v2cr-crown .sp{transform-box:fill-box;transform-origin:center;animation:crTw 2.6s ease-in-out infinite}
html.v2 .v2cr-crown .sp2{animation-delay:1.3s}
@keyframes crTw{0%,100%{opacity:0;transform:scale(.3)}50%{opacity:1;transform:scale(1)}}
@media (prefers-reduced-motion:reduce){html.v2 .v2cr-crown .sp{animation:none;opacity:.8}}

/* crown v3 (2026-10-22): room above the avatars so the crown is never clipped (phones: scroller has overflow hidden) */
html.v2 .v2cr-scroll{padding-top:36px !important;margin-top:-22px !important}

/* creators row switch (2026-10-22): two small chips on the header line; z-index lifts them above the scroller's -22px overlap */
html.v2 .v2cr-tabs{display:flex;gap:4px;flex-shrink:0;position:relative;z-index:2}
html.v2 .v2cr-tabs button{font:inherit;font-size:12px;line-height:16px;padding:2px 9px;border-radius:12px;border:0.5px solid #333;background:transparent;color:#a8a8a8;cursor:pointer;white-space:nowrap}
html.v2 .v2cr-tabs button.on{background:#fff;color:#000;border-color:#fff}
html.v2 .v2-badge.v2-badge-ne{background:var(--gold,#d4a017);color:var(--on-gold,#1a1200);border:0;font-weight:700}
