/* Đảo Phim v3: desktop density & readable navigation.
 * v3 overrides only the frontend. PHP 7.4-compatible, no Admin or DB changes.
 * Reference: screenshots at ~1850 px; layout targets 1366 & 1920 CSS pixels.
 */
:root { --dao-v3-container:1720px; --dao-v3-text:#eee8e2; }
body.dao-body { font-size:14px; }
.dao-body .dao-shell {
  max-width:var(--dao-v3-container);
  width:calc(100% - clamp(40px,7.8vw,160px));
  margin-inline:auto;
}

/* Header remains full-bleed. Text no longer shrinks to 11px on laptops. */
.dao-header .dao-nav-inner {
  height:72px; min-height:72px; padding-inline:clamp(14px,1.15vw,24px);
  gap:clamp(12px,1.15vw,22px);
}
.dao-header .dao-logo {
  width:clamp(159px,10vw,190px); min-width:0; height:57px;
}
.dao-header .dao-logo-word { font-size:clamp(25px,1.58vw,31px); }
.dao-header .dao-logo-line { font-size:clamp(7px,.45vw,8px); }
.dao-header .dao-nav { height:72px; gap:clamp(13px,1.05vw,21px); justify-content:center; }
.dao-header .dao-nav>a,
.dao-header .dao-nav-dropdown>button {
  font-size:clamp(14px,.82vw,16px); font-weight:650; line-height:1.35;
  letter-spacing:-.08px; white-space:nowrap;
}
.dao-header .dao-nav-dropdown>button { align-items:center; gap:5px; }
.dao-header .dao-nav-dropdown .dao-chevron { width:13px; height:13px; flex:0 0 13px; margin-left:1px; }
.dao-header .dao-nav>a.dao-app-link { gap:4px; color:#e7c09b; }
.dao-header .dao-app-link svg { width:13px; height:13px; flex:0 0 13px; }
.dao-header .dao-app-link:hover { color:#efae70!important; }
.dao-header .dao-nav-actions { gap:clamp(10px,1vw,18px); }
.dao-header .dao-search { width:clamp(220px,19vw,382px); height:38px; }
.dao-header .dao-search input { font-size:13px; }
.dao-header .dao-account-link { font-size:14px; }

/* Desktop proportions stay stable at full HD instead of scaling indefinitely. */
.dao-body .dao-genre-chips { padding:11px 0 12px; gap:8px; }
.dao-body .dao-genre-chips a { padding:7px 14px; font-size:12px; }
.dao-body .dao-hero { height:clamp(495px,34vw,650px); gap:14px; }
.dao-body .dao-hero-side { gap:14px; }
.dao-body .dao-hero-content h1 { font-size:clamp(29px,2vw,39px); }
.dao-body .dao-hero-content { left:26px; right:26px; bottom:23px; }
.dao-body .dao-hero-content p { font-size:13px; line-height:1.65; margin:10px 0 15px; }
.dao-body .dao-hero-actions .dao-btn-primary,
.dao-body .dao-hero-actions .dao-btn-secondary { min-height:43px; padding:8px 17px; font-size:13px; }

/* Exact-size rework of the "Mới cập nhật hôm nay" horizontal strip.
   Fixes the oversized frame, overlarge heading, tall thumbnail and scrollbar. */
.dao-body .dao-new-strip {
  margin:27px 0 24px; padding:17px 19px 19px;
  border-radius:18px; min-height:245px;
}
.dao-body .dao-new-strip .dao-section-title { margin-bottom:12px; min-height:29px; }
.dao-body .dao-new-strip .dao-section-title h2 {
  font-size:24px; line-height:1.25; letter-spacing:0; padding-left:17px;
}
.dao-body .dao-new-strip .dao-section-title h2:before { width:6px; top:3px; bottom:2px; }
.dao-body .dao-new-strip .dao-more-link { font-size:12px; padding:6px 12px; line-height:1.25; }
.dao-body .dao-new-track {
  display:flex; gap:15px; padding-bottom:0; overflow-x:auto; overflow-y:hidden;
  scrollbar-width:none; -ms-overflow-style:none;
  scroll-snap-type:x proximity; scroll-padding-inline:2px;
}
.dao-body .dao-new-track::-webkit-scrollbar { display:none; width:0; height:0; }
.dao-body .dao-new-track:focus-visible { outline:2px solid #bd7a3e; outline-offset:3px; }
.dao-body .dao-new-track-item { flex:0 0 184px; min-width:0; scroll-snap-align:start; }
.dao-body .dao-new-track .dao-card-media,
.dao-body .dao-new-track .dao-card-wide .dao-card-media {
  aspect-ratio:1.79; height:auto; max-height:none; border-radius:13px;
}
.dao-body .dao-new-track .dao-card-media>img { height:100%; width:100%; object-fit:cover; }
.dao-body .dao-new-track .dao-card-text { padding:7px 1px 0!important; }
.dao-body .dao-new-track .dao-card-name {
  font-size:12.3px; line-height:1.4; min-height:34px; font-weight:700;
  overflow:hidden; display:-webkit-box; -webkit-box-orient:vertical;
  -webkit-line-clamp:2; line-clamp:2;
}
.dao-body .dao-new-track .dao-badge-episode { font-size:10px; padding:3px 6px; }

/* Tighten rows throughout the homepage. A fixed upper cap is vital at 1920px. */
.dao-body .dao-section-title { margin-bottom:13px; }
.dao-body .dao-section-title h2 { font-size:23px; }
.dao-body .dao-home-with-sidebar { grid-template-columns:minmax(0,1fr) 296px; gap:22px; }
.dao-body .dao-home-feature-section { margin-top:24px; }
.dao-body .dao-home-feature-grid {
  grid-auto-rows:clamp(110px,7.9vw,148px); gap:11px;
}
.dao-body .dao-home-feature-grid>.dao-card-wide:first-child .dao-card-name { font-size:18px; }
.dao-body .dao-home-feature-grid .dao-card-wide .dao-card-name { font-size:13px; }
.dao-body .dao-home-feature-grid .dao-card-wide .dao-card-text { padding:32px 10px 9px; }
.dao-body .dao-home-smalllist { gap:9px 12px; }
.dao-body .dao-card-compact { min-height:90px; padding:7px; border-radius:13px; }
.dao-body .dao-compact-poster { width:64px; flex-basis:64px; height:76px; }
.dao-body .dao-compact-info .dao-card-name { font-size:13px; }
.dao-body .dao-anime-section { width:calc(100% - 318px); margin:29px 0 22px; }
.dao-body .dao-cinema-section { margin:26px 0 28px; }
.dao-body .dao-cinema-grid { gap:12px; }
.dao-body .dao-card-cinema .dao-card-media { aspect-ratio:.71; }
.dao-body .dao-home-with-sidebar .dao-ranking li a { min-height:63px; padding:8px 14px; }
.dao-body .dao-home-with-sidebar .dao-ranking h2 { padding:15px 16px; }
.dao-body .dao-home-with-sidebar .dao-rank-name { font-size:13px; }
.dao-body .dao-home-with-sidebar .dao-rank-number { width:28px; height:28px; line-height:28px; }
.dao-body .dao-footer { padding:27px 0 28px; }
.dao-body .dao-footer-intro p { font-size:13px; }

@media (min-width:1700px) {
  .dao-body .dao-shell { width:calc(100% - 160px); }
  .dao-header .dao-nav-inner { padding-inline:20px; }
  .dao-body .dao-new-strip { padding:17px 19px 21px; min-height:248px; }
}
@media (min-width:1251px) and (max-width:1699px) {
  .dao-body .dao-shell { width:calc(100% - 90px); }
  .dao-header .dao-nav-inner { height:70px; min-height:70px; gap:12px; }
  .dao-header .dao-nav { height:70px; gap:13px; }
  .dao-header .dao-nav>a,.dao-header .dao-nav-dropdown>button { font-size:14.2px; }
  .dao-header .dao-logo { width:162px; height:55px; }
  .dao-header .dao-logo-word { font-size:25px; }
  .dao-header .dao-search { width:clamp(190px,16.2vw,258px); }
  .dao-body .dao-home-with-sidebar { grid-template-columns:minmax(0,1fr) 259px; gap:19px; }
  .dao-body .dao-anime-section { width:calc(100% - 278px); }
  .dao-body .dao-home-feature-grid { grid-auto-rows:clamp(106px,8.2vw,137px); gap:10px; }
  .dao-body .dao-new-strip { min-height:230px; }
  .dao-body .dao-new-track-item { flex-basis:164px; }
  .dao-body .dao-new-strip .dao-section-title h2 { font-size:21px; }
}
@media (min-width:1121px) and (max-width:1250px) {
  .dao-header .dao-nav-inner { gap:9px; }
  .dao-header .dao-nav { gap:8px; }
  .dao-header .dao-nav>a,.dao-header .dao-nav-dropdown>button { font-size:13px; }
  .dao-header .dao-logo { width:144px; height:50px; }
  .dao-header .dao-search { width:170px; }
  .dao-body .dao-home-with-sidebar { grid-template-columns:minmax(0,1fr) 245px; gap:14px; }
  .dao-body .dao-anime-section { width:calc(100% - 259px); }
  .dao-body .dao-home-feature-grid { grid-auto-rows:118px; }
  .dao-body .dao-new-track-item { flex-basis:150px; }
}
@media (max-width:1120px) {
  .dao-header .dao-nav-inner { height:69px; min-height:69px; }
  .dao-header .dao-nav { display:none; }
  .dao-body .dao-home-with-sidebar { grid-template-columns:minmax(0,1fr) 235px; gap:15px; }
  .dao-body .dao-anime-section { width:100%; }
  .dao-body .dao-home-feature-grid { grid-auto-rows:clamp(115px,14vw,155px); }
}
@media (max-width:900px) {
  .dao-body .dao-shell { width:calc(100% - 36px); }
  .dao-body .dao-home-with-sidebar { grid-template-columns:minmax(0,1fr); }
  .dao-body .dao-anime-section { width:100%; }
  .dao-body .dao-new-track-item { flex-basis:155px; }
  .dao-body .dao-hero { height:clamp(390px,52vw,500px); }
}
@media (max-width:640px) {
  .dao-header .dao-nav-inner { height:64px; min-height:64px; }
  .dao-header .dao-logo { width:138px; height:49px; }
  .dao-header .dao-logo-word { font-size:22px; }
  .dao-body .dao-genre-chips { padding:11px 0; }
  .dao-body .dao-new-strip { margin:19px 0 20px; padding:12px 12px 15px; border-radius:12px; min-height:0; }
  .dao-body .dao-new-strip .dao-section-title { margin-bottom:10px; }
  .dao-body .dao-new-strip .dao-section-title h2 { font-size:17px; padding-left:11px; }
  .dao-body .dao-new-strip .dao-section-title h2:before { width:4px; }
  .dao-body .dao-new-track-item { flex-basis:136px; }
  .dao-body .dao-new-track .dao-card-name { font-size:11px; }
  .dao-body .dao-home-feature-grid { grid-auto-rows:auto; }
  .dao-body .dao-home-feature-grid .dao-card-wide .dao-card-name { font-size:12px; }
  .dao-body .dao-section-title h2 { font-size:18px; }
  .dao-body .dao-hero { height:auto; }
  .dao-body .dao-hero-primary { height:375px; }
  .dao-body .dao-hero-content h1 { font-size:25px; }
  .dao-body .dao-footer-intro p { font-size:12px; }
  .dao-body .dao-home-with-sidebar { grid-template-columns:minmax(0,1fr); }
  .dao-body .dao-cinema-grid { gap:9px; }
}
