/* ========================================================================
   OSANIME Page Polish v21
   Unified responsive polish for Home, Search, Download, Manga and History.
   Loaded last on the targeted pages so legacy/stage CSS remains functional.
   ======================================================================== */

:root{
  --op-bg:#050a13;
  --op-surface:#0a1424;
  --op-surface-2:#0e1a2d;
  --op-surface-3:#132139;
  --op-line:rgba(255,255,255,.085);
  --op-line-strong:rgba(255,255,255,.14);
  --op-text:#f6f8fd;
  --op-muted:#8f9db2;
  --op-soft:#c7d1df;
  --op-pink:#ff4f93;
  --op-pink-2:#e83f83;
  --op-purple:#9b72ff;
  --op-blue:#67b8ff;
  --op-radius:16px;
  --op-shadow:0 18px 55px rgba(0,0,0,.20);
  --op-content:1380px;
}

body.index-home-optimized,
body.search-page.search-php-page,
body.download-page.download-php-page,
body.manga-directory-page,
body.music-history-page{
  background:var(--op-bg)!important;
  color:var(--op-text);
}

body.index-home-optimized *,
body.search-page.search-php-page *,
body.download-page.download-php-page *,
body.manga-directory-page *,
body.music-history-page *{box-sizing:border-box}

body.index-home-optimized img,
body.search-page.search-php-page img,
body.download-page.download-php-page img,
body.manga-directory-page img,
body.music-history-page img{max-width:100%}

/* ========================================================================
   HOME / INDEX
   ======================================================================== */
body.index-home-optimized .content{
  width:min(100%,var(--op-content));
  margin-inline:auto;
  padding:clamp(18px,2.3vw,32px) clamp(14px,3vw,42px) 0!important;
}
body.index-home-optimized .hero{
  width:min(100%,var(--op-content));
  min-height:clamp(290px,31vw,420px)!important;
  margin-inline:auto;
  border-bottom:1px solid rgba(255,255,255,.055);
}
body.index-home-optimized .hero-slide{
  padding:clamp(48px,6vw,82px) clamp(22px,4vw,58px) 86px!important;
}
body.index-home-optimized .hero-content{
  top:0!important;
  width:min(620px,74vw)!important;
  max-width:620px!important;
}
body.index-home-optimized .hero h1{
  max-width:620px;
  font-size:clamp(34px,4.2vw,58px)!important;
  line-height:1.02!important;
  letter-spacing:-.045em!important;
  margin:10px 0 15px!important;
}
body.index-home-optimized .hero p{
  max-width:560px!important;
  margin:0 0 20px!important;
  color:#c6d0df!important;
  font-size:clamp(12px,1.2vw,15px)!important;
  line-height:1.65!important;
}
body.index-home-optimized .hero-actions{
  left:clamp(22px,4vw,58px)!important;
  bottom:34px!important;
  gap:8px!important;
}
body.index-home-optimized .hero-actions .btn{
  min-height:40px!important;
  padding-inline:15px!important;
  border-radius:11px!important;
}
body.index-home-optimized .slide-btn{
  width:40px!important;
  height:40px!important;
  border:1px solid rgba(255,255,255,.12)!important;
  border-radius:12px!important;
  background:rgba(6,13,26,.62)!important;
  backdrop-filter:blur(10px);
}
body.index-home-optimized .quick{
  gap:12px!important;
  margin-bottom:16px!important;
}
body.index-home-optimized .quick-card{
  min-width:0;
  min-height:96px!important;
  height:auto!important;
  padding:17px 18px!important;
  gap:14px!important;
  border-radius:15px!important;
  border:1px solid var(--op-line)!important;
  background:linear-gradient(145deg,#101c31,#0a1426)!important;
  box-shadow:0 10px 28px rgba(0,0,0,.11)!important;
}
body.index-home-optimized .quick-card:hover{
  transform:translateY(-2px);
  border-color:rgba(255,79,147,.24)!important;
}
body.index-home-optimized .quick-icon{
  flex:0 0 auto;
  width:48px!important;
  height:48px!important;
  display:grid!important;
  place-items:center!important;
  border-radius:13px!important;
  font-size:19px!important;
}
body.index-home-optimized .quick-card h3{font-size:12px!important;line-height:1.3}
body.index-home-optimized .quick-card p{font-size:9.5px!important;line-height:1.5!important}
body.index-home-optimized .index-main-grid{
  gap:14px!important;
  align-items:stretch!important;
}
body.index-home-optimized .index-main-grid>.panel,
body.index-home-optimized .index-anime-panel,
body.index-home-optimized .panel.members,
body.index-home-optimized .index-search-panel{
  border-radius:16px!important;
  border:1px solid var(--op-line)!important;
  box-shadow:0 12px 35px rgba(0,0,0,.10)!important;
}
body.index-home-optimized .panel-head{
  gap:12px;
  justify-content:space-between;
}
body.index-home-optimized .panel-head h2{
  min-width:0;
  font-size:14px!important;
  line-height:1.3;
}
body.index-home-optimized .panel-head .see{
  flex:0 0 auto;
  white-space:nowrap;
}
body.index-home-optimized .song{
  min-width:0;
  border-radius:10px!important;
}
body.index-home-optimized .song-copy{min-width:0}
body.index-home-optimized .song-copy b{
  display:block;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
body.index-home-optimized .index-anime-grid{
  gap:12px!important;
}
body.index-home-optimized .index-anime-card{
  min-width:0;
  border-radius:14px!important;
  overflow:hidden;
}
body.index-home-optimized #memberUploadList .member{min-width:0}

/* ========================================================================
   SEARCH
   ======================================================================== */
body.search-page.search-php-page .search-hero,
body.search-page.search-php-page .search-content{
  width:min(100%,var(--op-content));
  margin-inline:auto;
}
body.search-page.search-php-page .search-hero{
  min-height:220px!important;
  padding:38px clamp(18px,3.8vw,54px)!important;
}
body.search-page.search-php-page .search-box-wrap{width:min(820px,100%)!important}
body.search-page.search-php-page .big-search{width:min(720px,100%)!important}
body.search-page.search-php-page .search-content{
  grid-template-columns:minmax(0,1fr) 300px!important;
  gap:20px!important;
  padding:22px clamp(14px,3vw,42px) 34px!important;
}
body.search-page.search-php-page .filters-row{
  position:relative;
  z-index:7;
  grid-template-columns:minmax(0,1fr) auto!important;
}
body.search-page.search-php-page .filters-row .tabs{
  min-width:0;
  overscroll-behavior-inline:contain;
  scroll-snap-type:x proximity;
}
body.search-page.search-php-page .filters-row .tabs button{scroll-snap-align:start}
body.search-page.search-php-page .filters-row .sort{position:relative;z-index:8}
body.search-page.search-php-page .filters-row .sort select{
  min-width:150px;
  color-scheme:dark;
}

/* Collapsible advanced search */
body.search-page.search-php-page .osanime-advanced-search{
  position:relative;
  z-index:6;
  margin:0 0 14px;
  border:1px solid rgba(255,255,255,.085);
  border-radius:15px;
  overflow:visible;
  background:linear-gradient(145deg,rgba(15,26,45,.86),rgba(8,17,31,.9));
  box-shadow:0 10px 32px rgba(0,0,0,.12);
}
body.search-page.search-php-page .osanime-advanced-search>summary{
  min-height:54px;
  display:flex;
  align-items:center;
  gap:12px;
  padding:10px 14px;
  cursor:pointer;
  list-style:none;
  user-select:none;
  color:#edf2fb;
  -webkit-tap-highlight-color:transparent;
}
body.search-page.search-php-page .osanime-advanced-search>summary::-webkit-details-marker{display:none}
body.search-page.search-php-page .osanime-advanced-search>summary .adv-icon{
  width:34px;
  height:34px;
  flex:0 0 34px;
  display:grid;
  place-items:center;
  border:1px solid rgba(255,79,147,.22);
  border-radius:10px;
  background:rgba(255,79,147,.09);
  color:#ff7aad;
}
body.search-page.search-php-page .osanime-advanced-search>summary .adv-copy{min-width:0;flex:1}
body.search-page.search-php-page .osanime-advanced-search>summary b{display:block;font-size:12px;line-height:1.2}
body.search-page.search-php-page .osanime-advanced-search>summary small{
  display:block;
  margin-top:4px;
  color:#8493aa;
  font-size:9px;
  line-height:1.35;
}
body.search-page.search-php-page .osanime-advanced-search>summary .adv-status{
  display:inline-flex;
  align-items:center;
  gap:7px;
  flex:0 0 auto;
  color:#95a4ba;
  font-size:9px;
  font-weight:800;
}
body.search-page.search-php-page .osanime-advanced-search>summary .adv-status i{
  transition:transform .18s ease;
}
body.search-page.search-php-page .osanime-advanced-search[open]>summary .adv-status i{transform:rotate(180deg)}
body.search-page.search-php-page .osanime-advanced-search[open]>summary{
  border-bottom:1px solid rgba(255,255,255,.07);
}
body.search-page.search-php-page .osanime-advanced-search .music-search16-panel-pro{
  margin:0!important;
  border:0!important;
  border-radius:0 0 15px 15px!important;
  box-shadow:none!important;
  overflow:visible!important;
}
body.search-page.search-php-page .music-search16-control,
body.search-page.search-php-page .music-search16-field,
body.search-page.search-php-page .music-search16-fields{overflow:visible!important}
body.search-page.search-php-page .music-search16-control select,
body.search-page.search-php-page .music-search16-control input{color-scheme:dark}

body.search-page.search-php-page .results-list{gap:8px!important}
body.search-page.search-php-page .result-item{
  grid-template-columns:84px minmax(0,1fr) 34px!important;
  min-width:0;
  min-height:108px!important;
  padding:10px!important;
  border-radius:14px!important;
}
body.search-page.search-php-page .result-item .thumb{
  width:84px!important;
  height:84px!important;
  border-radius:11px!important;
}
body.search-page.search-php-page .result-info h2{
  max-width:100%;
  font-size:13px!important;
  line-height:1.35!important;
}
body.search-page.search-php-page .result-info .meta{min-width:0}
body.search-page.search-php-page .result-info .meta span{max-width:210px}
body.search-page.search-php-page .right-sidebar{
  position:sticky!important;
  top:86px!important;
  align-self:start;
}
body.search-page.search-php-page .side-card{border-radius:14px!important}

/* ========================================================================
   DOWNLOAD DETAIL
   ======================================================================== */
body.download-page.download-php-page .download-wrap{
  width:min(100%,var(--op-content));
  margin-inline:auto;
  padding:22px clamp(14px,3vw,42px) 42px!important;
}
body.download-page.download-php-page .song-hero-detail{
  grid-template-columns:minmax(210px,260px) minmax(0,1fr) minmax(250px,300px)!important;
  gap:20px!important;
  align-items:start!important;
  padding:18px!important;
  border-radius:18px!important;
}
body.download-page.download-php-page .cover-large{
  width:100%!important;
  height:auto!important;
  aspect-ratio:1;
  max-width:260px;
}
body.download-page.download-php-page .song-info-detail{
  min-width:0;
  padding:2px 0!important;
}
body.download-page.download-php-page .song-info-detail h1{
  margin:7px 0 8px!important;
  font-size:clamp(24px,2.7vw,38px)!important;
  line-height:1.12!important;
  letter-spacing:-.035em!important;
}
body.download-page.download-php-page .song-info-detail h1 span{
  overflow-wrap:anywhere;
}
body.download-page.download-php-page .artist-line{margin-bottom:11px!important}
body.download-page.download-php-page .music-anime-theme-links{
  margin-bottom:10px!important;
  gap:6px!important;
}
body.download-page.download-php-page .music-stage7-actions{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:6px!important;
  margin:0 0 12px!important;
}
body.download-page.download-php-page .music-stage7-actions .favorite-btn{
  width:100%!important;
  min-width:0!important;
  min-height:36px!important;
  justify-content:flex-start!important;
  padding:0 10px!important;
  border-radius:10px!important;
  white-space:nowrap;
  overflow:hidden;
}
body.download-page.download-php-page .music-stage7-actions .favorite-btn span{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
}
body.download-page.download-php-page .info-grid{
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:7px!important;
}
body.download-page.download-php-page .info-grid>div{
  min-width:0;
  min-height:48px!important;
  border-radius:10px!important;
}
body.download-page.download-php-page .info-grid>div em,
body.download-page.download-php-page .info-grid>div em a{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
body.download-page.download-php-page .download-card-wrap{
  width:100%!important;
  min-width:0;
  max-width:none!important;
  gap:8px!important;
}
body.download-page.download-php-page .download-card{
  min-height:0!important;
  padding:18px!important;
  border-radius:15px!important;
}
body.download-page.download-php-page .download-card .cloud{
  width:48px!important;
  height:48px!important;
  margin:10px auto!important;
  font-size:20px!important;
}
body.download-page.download-php-page .download-card h2{font-size:14px!important}
body.download-page.download-php-page .download-card p{font-size:10px!important;line-height:1.5!important}
body.download-page.download-php-page .download-card .download-main{
  width:100%!important;
  min-width:0!important;
  min-height:46px!important;
  border-radius:11px!important;
}
body.download-page.download-php-page .notice-card{
  border-radius:13px!important;
  padding:12px 14px!important;
}
body.download-page.download-php-page .player-card.custom-player{
  border-radius:15px!important;
  margin-top:12px!important;
}
body.download-page.download-php-page .desc-share{
  grid-template-columns:minmax(0,1.6fr) minmax(260px,.4fr)!important;
  gap:10px!important;
  margin-top:10px!important;
}
body.download-page.download-php-page .desc-card,
body.download-page.download-php-page .share-card,
body.download-page.download-php-page .recommend-card{
  border-radius:15px!important;
}
body.download-page.download-php-page .recommend-row{
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:8px!important;
}
body.download-page.download-php-page .rec-item{
  min-width:0;
  border-radius:11px!important;
}
body.download-page.download-php-page .rec-item div{min-width:0}
body.download-page.download-php-page .rec-item b,
body.download-page.download-php-page .rec-item small{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

/* ========================================================================
   MANGA DIRECTORY
   ======================================================================== */
body.manga-directory-page .manga-shell{
  width:min(calc(100% - 28px),var(--op-content))!important;
  margin-inline:auto!important;
  padding-top:24px!important;
  padding-bottom:48px!important;
}
body.manga-directory-page .manga-hero{
  gap:22px!important;
  padding:26px!important;
  border-radius:19px!important;
}
body.manga-directory-page .manga-hero>div:first-child{min-width:0}
body.manga-directory-page .manga-hero h1{
  font-size:clamp(28px,3.6vw,46px)!important;
  line-height:1.08!important;
  letter-spacing:-.04em;
}
body.manga-directory-page .manga-hero p{max-width:720px;line-height:1.6}
body.manga-directory-page .manga-hero-side{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  flex-wrap:wrap!important;
  gap:7px!important;
  min-width:0;
}
body.manga-directory-page .manga-hero-side .manga-btn{
  min-height:38px!important;
  white-space:nowrap;
}
body.manga-directory-page .manga-hero-stat{
  min-width:92px;
  padding-left:16px!important;
}
body.manga-directory-page .manga-filter-card{
  position:relative;
  z-index:4;
  margin-top:14px!important;
  padding:12px!important;
  border-radius:15px!important;
}
body.manga-directory-page .manga-filter-form{
  grid-template-columns:minmax(220px,1.6fr) repeat(4,minmax(110px,.7fr)) auto auto!important;
  gap:7px!important;
  align-items:center!important;
}
body.manga-directory-page .manga-filter-form input,
body.manga-directory-page .manga-filter-form select{
  min-width:0!important;
  min-height:40px!important;
  border-radius:10px!important;
  color-scheme:dark;
}
body.manga-directory-page .manga-filter-form .manga-btn{
  min-height:40px!important;
  min-width:0!important;
}
body.manga-directory-page .manga-section-head{
  gap:14px;
  align-items:flex-end!important;
}
body.manga-directory-page .manga-section-head>div{min-width:0}
body.manga-directory-page .manga-section-head h2{
  overflow-wrap:anywhere;
  line-height:1.25;
}
body.manga-directory-page .manga-retention-grid{gap:8px!important}
body.manga-directory-page .manga-retention-card{border-radius:14px!important}
body.manga-directory-page .manga-discovery-section,
body.manga-directory-page .manga-continue-section,
body.manga-directory-page .manga-stage7-dashboard{
  border-radius:17px!important;
}
body.manga-directory-page .manga-grid{
  grid-template-columns:repeat(6,minmax(0,1fr))!important;
  gap:13px!important;
}
body.manga-directory-page .manga-card{
  min-width:0;
  border-radius:15px!important;
  overflow:hidden;
}
body.manga-directory-page .manga-cover-wrap{aspect-ratio:2/3!important}
body.manga-directory-page .manga-card h2{
  min-height:2.7em!important;
  font-size:.93rem!important;
}
body.manga-directory-page .manga-card-meta{min-width:0}
body.manga-directory-page .manga-card-bottom{min-width:0}
body.manga-directory-page .manga-latest{min-width:0}
body.manga-directory-page .manga-continue-grid,
body.manga-directory-page .manga-because-grid,
body.manga-directory-page .manga-stage5-recommend-grid,
body.manga-directory-page .manga-trending-grid,
body.manga-directory-page .manga-update-grid,
body.manga-directory-page .manga-activity-grid{gap:9px!important}

/* ========================================================================
   MUSIC HISTORY
   ======================================================================== */
body.music-history-page .mh6-wrap{
  width:min(calc(100% - 28px),var(--op-content))!important;
  margin:24px auto 62px!important;
}
body.music-history-page .mh6-hero{
  padding:25px!important;
  border-radius:18px!important;
  background:
    radial-gradient(circle at 90% 0,rgba(155,114,255,.13),transparent 34%),
    linear-gradient(135deg,#0e1a2e,#07111f)!important;
}
body.music-history-page .mh6-hero>div:first-child{min-width:0}
body.music-history-page .mh6-hero h1{
  font-size:clamp(26px,3vw,38px)!important;
  line-height:1.1;
  letter-spacing:-.035em;
}
body.music-history-page .mh6-hero-actions{justify-content:flex-end}
body.music-history-page .mh6-favorite-link,
body.music-history-page .mh6-clear{
  min-height:40px;
  border-radius:11px!important;
}
body.music-history-page .mh6-stats{
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:9px!important;
  margin:12px 0 24px!important;
}
body.music-history-page .mh6-stats>div{
  min-width:0;
  padding:15px!important;
  border-radius:14px!important;
}
body.music-history-page .mh6-stats strong{font-size:21px!important}
body.music-history-page .mh6-item{
  grid-template-columns:68px minmax(0,1fr) auto!important;
  gap:13px!important;
  min-width:0;
  padding:11px!important;
  border-radius:14px!important;
  transition:transform .16s ease,border-color .16s ease,background .16s ease;
}
body.music-history-page .mh6-item:hover{
  transform:translateY(-1px);
  border-color:rgba(96,165,250,.24)!important;
  background:linear-gradient(180deg,#0e1b30,#0a1627)!important;
}
body.music-history-page .mh6-cover{
  width:68px!important;
  height:68px!important;
  border-radius:11px!important;
}
body.music-history-page .mh6-copy,
body.music-history-page .mh6-title-row>div{min-width:0}
body.music-history-page .mh6-title-row strong{font-size:14px!important}
body.music-history-page .mh6-meta{row-gap:6px!important}
body.music-history-page .mh6-play{
  min-height:40px;
  border-radius:11px!important;
  white-space:nowrap;
}

/* ========================================================================
   RESPONSIVE: laptop / tablet landscape
   ======================================================================== */
@media(max-width:1180px){
  body.index-home-optimized .index-main-grid{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
  body.index-home-optimized .index-main-grid>.posts{grid-column:1/-1!important}

  body.search-page.search-php-page .search-content{
    grid-template-columns:minmax(0,1fr) 270px!important;
  }

  body.download-page.download-php-page .song-hero-detail{
    grid-template-columns:220px minmax(0,1fr)!important;
  }
  body.download-page.download-php-page .cover-large{max-width:220px}
  body.download-page.download-php-page .download-card-wrap{
    grid-column:1/-1;
    display:grid!important;
    grid-template-columns:minmax(0,1fr) minmax(260px,.5fr)!important;
  }
  body.download-page.download-php-page .download-card{
    display:grid!important;
    grid-template-columns:auto minmax(0,1fr) auto!important;
    grid-template-rows:auto auto!important;
    align-items:center;
    gap:4px 14px;
  }
  body.download-page.download-php-page .download-card .cloud{grid-row:1/3;margin:0!important}
  body.download-page.download-php-page .download-card h2{margin:0!important}
  body.download-page.download-php-page .download-card p{margin:0!important}
  body.download-page.download-php-page .download-card .download-main{
    grid-column:3;
    grid-row:1/3;
    min-width:180px!important;
  }
  body.download-page.download-php-page .recommend-row{grid-template-columns:repeat(3,minmax(0,1fr))!important}

  body.manga-directory-page .manga-filter-form{
    grid-template-columns:minmax(220px,1.8fr) repeat(3,minmax(120px,1fr))!important;
  }
  body.manga-directory-page .manga-filter-form .manga-btn{width:100%}
  body.manga-directory-page .manga-grid{grid-template-columns:repeat(5,minmax(0,1fr))!important}
}

/* ========================================================================
   RESPONSIVE: tablet / narrow laptop
   ======================================================================== */
@media(max-width:900px){
  body.index-home-optimized .hero-content{width:min(600px,82vw)!important}

  body.search-page.search-php-page .search-content{display:block!important}
  body.search-page.search-php-page .right-sidebar{
    position:static!important;
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:9px!important;
    margin-top:16px!important;
  }
  body.search-page.search-php-page .right-sidebar .hitz{grid-column:1/-1}

  body.download-page.download-php-page .desc-share{grid-template-columns:1fr!important}
  body.download-page.download-php-page .share-buttons{grid-template-columns:repeat(4,minmax(0,1fr))!important}

  body.manga-directory-page .manga-hero{align-items:flex-start!important;flex-direction:column!important}
  body.manga-directory-page .manga-hero-side{justify-content:flex-start!important;width:100%}
  body.manga-directory-page .manga-hero-stat{
    width:auto!important;
    min-width:96px;
    padding:0 0 0 12px!important;
    border-left:1px solid var(--manga-border)!important;
    border-top:0!important;
    text-align:left!important;
  }
  body.manga-directory-page .manga-filter-form{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  body.manga-directory-page .manga-search-field{grid-column:1/-1!important}
  body.manga-directory-page .manga-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important}

  body.music-history-page .mh6-hero{align-items:flex-start!important;flex-direction:column!important}
  body.music-history-page .mh6-hero-actions{justify-content:flex-start}
}

/* ========================================================================
   RESPONSIVE: phones
   ======================================================================== */
@media(max-width:700px){
  body.index-home-optimized .hero{
    min-height:270px!important;
    width:100%!important;
  }
  body.index-home-optimized .hero-slide{padding:26px 14px 72px!important}
  body.index-home-optimized .hero-content{width:min(100%,92vw)!important;max-width:92%!important}
  body.index-home-optimized .hero h1{font-size:clamp(24px,8vw,32px)!important;margin-top:7px!important}
  body.index-home-optimized .hero p{font-size:10.5px!important;line-height:1.5!important;max-width:92%!important}
  body.index-home-optimized .hero-actions{left:14px!important;bottom:26px!important}
  body.index-home-optimized .hero-actions .btn{min-height:35px!important;padding-inline:11px!important;font-size:9px!important}
  body.index-home-optimized .slide-btn{width:34px!important;height:34px!important}
  body.index-home-optimized .content{padding:12px 9px 0!important}
  body.index-home-optimized .quick{grid-template-columns:1fr!important;gap:7px!important}
  body.index-home-optimized .quick-card{
    min-height:62px!important;
    display:grid!important;
    grid-template-columns:38px minmax(0,1fr)!important;
    justify-items:stretch!important;
    gap:10px!important;
    padding:10px 11px!important;
    text-align:left!important;
  }
  body.index-home-optimized .quick-icon{width:38px!important;height:38px!important;font-size:15px!important}
  body.index-home-optimized .quick-card h3{font-size:10px!important}
  body.index-home-optimized .quick-card p{display:block!important;font-size:8px!important;margin-top:2px!important}
  body.index-home-optimized .index-main-grid{grid-template-columns:1fr!important;gap:8px!important}
  body.index-home-optimized .index-main-grid>.posts{grid-column:auto!important}
  body.index-home-optimized .index-main-grid>.panel{padding:12px 10px!important}
  body.index-home-optimized .index-anime-panel{padding:12px 9px!important}
  body.index-home-optimized .index-anime-grid{
    display:flex!important;
    overflow-x:auto!important;
    gap:8px!important;
    padding-bottom:3px;
    scroll-snap-type:x mandatory;
    scrollbar-width:none;
  }
  body.index-home-optimized .index-anime-grid::-webkit-scrollbar{display:none}
  body.index-home-optimized .index-anime-card{flex:0 0 min(72vw,220px);scroll-snap-align:start}

  body.search-page.search-php-page .search-hero{padding:22px 12px 24px!important}
  body.search-page.search-php-page .search-content{padding:11px 8px 24px!important}
  body.search-page.search-php-page .filters-row{grid-template-columns:1fr!important;gap:7px!important}
  body.search-page.search-php-page .filters-row .sort{width:100%!important;justify-content:space-between}
  body.search-page.search-php-page .filters-row .sort select{width:min(190px,58vw)!important;min-width:0}
  body.search-page.search-php-page .osanime-advanced-search>summary{min-height:50px;padding:8px 10px}
  body.search-page.search-php-page .osanime-advanced-search>summary .adv-status span{display:none}
  body.search-page.search-php-page .osanime-advanced-search>summary small{font-size:8px}
  body.search-page.search-php-page .music-search16-head{padding-inline:12px!important}
  body.search-page.search-php-page .music-search16-form{padding-inline:12px!important}
  body.search-page.search-php-page .result-item{
    grid-template-columns:66px minmax(0,1fr) 25px!important;
    min-height:86px!important;
    gap:8px!important;
    padding:8px!important;
  }
  body.search-page.search-php-page .result-item .thumb{width:66px!important;height:66px!important}
  body.search-page.search-php-page .result-info h2{font-size:11px!important}
  body.search-page.search-php-page .result-info .meta{flex-wrap:nowrap!important;overflow:hidden}
  body.search-page.search-php-page .result-info .meta span{max-width:105px!important}
  body.search-page.search-php-page .result-info .meta span:nth-child(n+3){display:none!important}
  body.search-page.search-php-page .result-info p{display:none!important}
  body.search-page.search-php-page .right-sidebar{grid-template-columns:1fr!important}
  body.search-page.search-php-page .right-sidebar .hitz{grid-column:auto}

  body.download-page.download-php-page .download-wrap{padding:11px 8px 28px!important}
  body.download-page.download-php-page .song-hero-detail{
    display:flex!important;
    flex-direction:column!important;
    gap:10px!important;
    padding:10px!important;
  }
  body.download-page.download-php-page .cover-large{
    width:124px!important;
    max-width:124px!important;
    margin:2px auto 0!important;
    border-radius:11px!important;
  }
  body.download-page.download-php-page .song-info-detail{width:100%;min-width:0;text-align:left}
  body.download-page.download-php-page .song-info-detail .category{margin:0 0 5px!important}
  body.download-page.download-php-page .song-info-detail h1{font-size:18px!important;margin:4px 0 6px!important}
  body.download-page.download-php-page .download-file-name{font-size:8px!important;margin-bottom:7px!important}
  body.download-page.download-php-page .artist-line{margin-bottom:7px!important}
  body.download-page.download-php-page .artist-line img{width:28px!important;height:28px!important}
  body.download-page.download-php-page .song-info-detail>.favorite-btn{min-height:32px!important;padding:0 9px!important;font-size:8px!important}
  body.download-page.download-php-page .music-anime-theme-links,
  body.download-page.download-php-page .music-stage7-actions,
  body.download-page.download-php-page .info-grid{width:100%;}
  body.download-page.download-php-page .music-stage7-actions{
    display:flex!important;
    overflow-x:auto;
    gap:5px!important;
    margin-top:8px!important;
    padding-bottom:2px;
    scrollbar-width:none;
  }
  body.download-page.download-php-page .music-stage7-actions::-webkit-scrollbar{display:none}
  body.download-page.download-php-page .music-stage7-actions .favorite-btn{
    flex:0 0 auto!important;
    width:auto!important;
    min-height:32px!important;
    padding:0 9px!important;
    font-size:8px!important;
  }
  body.download-page.download-php-page .info-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:5px!important;margin-top:8px!important}
  body.download-page.download-php-page .info-grid>div{min-height:43px!important;padding:6px!important}
  body.download-page.download-php-page .download-card-wrap{
    display:flex!important;
    flex-direction:column!important;
    gap:6px!important;
  }
  body.download-page.download-php-page .download-card{display:block!important;padding:12px!important}
  body.download-page.download-php-page .download-card .cloud{display:none!important}
  body.download-page.download-php-page .download-card p{margin-bottom:9px!important}
  body.download-page.download-php-page .download-card .download-main{min-height:42px!important}
  body.download-page.download-php-page .player-card.custom-player{padding:9px!important}
  body.download-page.download-php-page .recommend-row{grid-template-columns:1fr!important}

  body.manga-directory-page .manga-shell{width:min(calc(100% - 16px),var(--op-content))!important;padding-top:12px!important}
  body.manga-directory-page .manga-hero{padding:18px!important;border-radius:15px!important;gap:15px!important}
  body.manga-directory-page .manga-hero h1{font-size:28px!important}
  body.manga-directory-page .manga-hero-side{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr));
    width:100%;
  }
  body.manga-directory-page .manga-hero-side .manga-btn{width:100%;justify-content:center;font-size:.72rem!important}
  body.manga-directory-page .manga-hero-stat{
    grid-column:1/-1;
    width:100%!important;
    min-width:0;
    padding:10px 0 0!important;
    border-left:0!important;
    border-top:1px solid var(--manga-border)!important;
  }
  body.manga-directory-page .manga-filter-card{padding:8px!important}
  body.manga-directory-page .manga-filter-form{grid-template-columns:1fr 1fr!important;gap:6px!important}
  body.manga-directory-page .manga-search-field{grid-column:1/-1!important}
  body.manga-directory-page .manga-filter-form .manga-btn{font-size:.7rem!important}
  body.manga-directory-page .manga-section-head{align-items:flex-start!important;flex-direction:column!important;gap:7px}
  body.manga-directory-page .manga-section-head>.manga-btn{width:100%;justify-content:center}
  body.manga-directory-page .manga-retention-grid{
    display:flex!important;
    overflow-x:auto;
    gap:7px!important;
    scrollbar-width:none;
    scroll-snap-type:x mandatory;
  }
  body.manga-directory-page .manga-retention-grid::-webkit-scrollbar{display:none}
  body.manga-directory-page .manga-retention-card{flex:0 0 150px;scroll-snap-align:start}
  body.manga-directory-page .manga-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:8px!important}
  body.manga-directory-page .manga-card-body{padding:9px!important}
  body.manga-directory-page .manga-card h2{font-size:.78rem!important;margin-bottom:5px!important}
  body.manga-directory-page .manga-card-meta{font-size:.6rem!important}
  body.manga-directory-page .manga-chip-row{gap:4px!important;margin:7px 0!important}
  body.manga-directory-page .manga-chip-row span{padding:4px 6px!important;font-size:.56rem!important}
  body.manga-directory-page .manga-card-bottom{padding-top:7px!important;margin-top:7px!important}
  body.manga-directory-page .manga-latest{font-size:.58rem!important}

  body.music-history-page .mh6-wrap{width:min(calc(100% - 16px),var(--op-content))!important;margin:12px auto 42px!important}
  body.music-history-page .mh6-hero{padding:18px!important;border-radius:15px!important}
  body.music-history-page .mh6-hero h1{font-size:26px!important}
  body.music-history-page .mh6-hero-actions{width:100%;display:grid!important;grid-template-columns:1fr 1fr}
  body.music-history-page .mh6-hero-actions>a,
  body.music-history-page .mh6-hero-actions form,
  body.music-history-page .mh6-hero-actions button{width:100%;justify-content:center}
  body.music-history-page .mh6-stats{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:6px!important}
  body.music-history-page .mh6-stats>div{padding:12px!important}
  body.music-history-page .mh6-item{
    grid-template-columns:56px minmax(0,1fr)!important;
    gap:10px!important;
    padding:9px!important;
  }
  body.music-history-page .mh6-cover{width:56px!important;height:56px!important}
  body.music-history-page .mh6-title-row{display:block!important}
  body.music-history-page .mh6-title-row small{margin-top:4px;white-space:normal!important}
  body.music-history-page .mh6-play{grid-column:1/-1;width:100%;justify-content:center!important;min-height:37px}
}

@media(max-width:430px){
  body.search-page.search-php-page .big-search{height:48px!important}
  body.search-page.search-php-page .filters-row .tabs button{min-width:68px!important;padding:0 8px!important}
  body.search-page.search-php-page .result-item{grid-template-columns:60px minmax(0,1fr) 22px!important}
  body.search-page.search-php-page .result-item .thumb{width:60px!important;height:60px!important}

  body.download-page.download-php-page .cover-large{width:112px!important;max-width:112px!important}
  body.download-page.download-php-page .song-info-detail h1{font-size:16px!important}
  body.download-page.download-php-page .info-grid{grid-template-columns:1fr!important}

  body.manga-directory-page .manga-hero-side{grid-template-columns:1fr!important}
  body.manga-directory-page .manga-hero-stat{grid-column:auto}
  body.manga-directory-page .manga-filter-form{grid-template-columns:1fr!important}
  body.manga-directory-page .manga-filter-form>*{grid-column:1!important}
  body.manga-directory-page .manga-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}

  body.music-history-page .mh6-hero-actions{grid-template-columns:1fr!important}
}

@media(prefers-reduced-motion:reduce){
  body.index-home-optimized *,
  body.search-page.search-php-page *,
  body.download-page.download-php-page *,
  body.manga-directory-page *,
  body.music-history-page *{
    scroll-behavior:auto!important;
    transition-duration:.01ms!important;
    animation-duration:.01ms!important;
    animation-iteration-count:1!important;
  }
}

/* ========================================================================
   MY MANGA / PERSONAL LIBRARY
   ======================================================================== */
body.manga-my-page{
  background:var(--op-bg)!important;
  color:var(--op-text);
}
body.manga-my-page *{box-sizing:border-box}
body.manga-my-page .manga-shell{
  width:min(calc(100% - 28px),var(--op-content))!important;
  margin-inline:auto!important;
  padding-top:24px!important;
  padding-bottom:48px!important;
}
body.manga-my-page .manga-hero{
  gap:18px!important;
  padding:25px!important;
  border-radius:18px!important;
}
body.manga-my-page .manga-hero>div:first-child{min-width:0}
body.manga-my-page .manga-hero h1{
  font-size:clamp(28px,3.4vw,44px)!important;
  line-height:1.08!important;
  letter-spacing:-.04em;
}
body.manga-my-page .manga-hero-side{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  flex-wrap:wrap!important;
  gap:7px!important;
}
body.manga-my-page .manga-hero-side .manga-btn{
  min-height:38px!important;
  white-space:nowrap;
}
body.manga-my-page .manga-stage7-dashboard{
  margin:14px 0 18px!important;
}
body.manga-my-page .manga-retention-grid{
  gap:9px!important;
  margin:12px 0!important;
}
body.manga-my-page .manga-retention-card{
  padding:15px!important;
  border-radius:14px!important;
}
body.manga-my-page .manga-retention-card strong{font-size:24px!important}
body.manga-my-page .manga-stage7-split{gap:10px!important}
body.manga-my-page .manga-stage7-panel{
  padding:17px!important;
  border-radius:15px!important;
}
body.manga-my-page .manga-goal-form{gap:7px!important}
body.manga-my-page .manga-goal-form input{min-width:0;color-scheme:dark}
body.manga-my-page .manga-badge-grid{gap:7px!important}
body.manga-my-page .manga-badge-card{
  min-width:0;
  padding:10px!important;
  border-radius:11px!important;
}
body.manga-my-page .manga-history-list{gap:7px!important}
body.manga-my-page .manga-history-item{
  min-width:0;
  padding:9px!important;
  border-radius:11px!important;
}
body.manga-my-page .manga-history-item>div{min-width:0}
body.manga-my-page .manga-history-item h3{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
body.manga-my-page .manga-library-tabs{
  gap:6px!important;
  padding:1px 1px 11px!important;
  scroll-snap-type:x proximity;
  overscroll-behavior-inline:contain;
}
body.manga-my-page .manga-library-tabs a{
  scroll-snap-align:start;
  min-height:38px!important;
  border-radius:10px!important;
}
body.manga-my-page .manga-my-grid{
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:10px!important;
}
body.manga-my-page .manga-my-card{
  grid-template-columns:116px minmax(0,1fr)!important;
  gap:12px!important;
  min-width:0;
  padding:11px!important;
  border-radius:14px!important;
}
body.manga-my-page .manga-my-cover img{
  width:116px!important;
  height:auto!important;
  aspect-ratio:2/3;
  border-radius:10px!important;
}
body.manga-my-page .manga-my-copy,
body.manga-my-page .manga-my-top>div{min-width:0}
body.manga-my-page .manga-my-top h2{font-size:.94rem!important}
body.manga-my-page .manga-library-progress{
  margin:9px 0!important;
  padding:8px!important;
}
body.manga-my-page .manga-my-actions,
body.manga-my-page .manga-library-controls{gap:5px!important}
body.manga-my-page .manga-my-actions .manga-btn{min-height:35px!important}
body.manga-my-page .manga-library-controls>label,
body.manga-my-page .manga-library-controls select{min-width:0;color-scheme:dark}
body.manga-my-page .manga-account-btn{min-height:35px!important}
body.manga-my-page .manga-notification-preferences{gap:6px!important}
body.manga-my-page .manga-notification-preferences select{color-scheme:dark}

@media(max-width:1050px){
  body.manga-my-page .manga-hero{align-items:flex-start!important;flex-direction:column!important}
  body.manga-my-page .manga-hero-side{justify-content:flex-start!important;width:100%}
  body.manga-my-page .manga-my-grid{grid-template-columns:1fr!important}
}

@media(max-width:700px){
  body.manga-my-page .manga-shell{width:min(calc(100% - 16px),var(--op-content))!important;padding-top:12px!important}
  body.manga-my-page .manga-hero{padding:18px!important;border-radius:15px!important}
  body.manga-my-page .manga-hero h1{font-size:28px!important}
  body.manga-my-page .manga-hero-side{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  body.manga-my-page .manga-hero-side .manga-btn{width:100%;justify-content:center;font-size:.7rem!important}
  body.manga-my-page .manga-retention-grid{
    display:flex!important;
    overflow-x:auto;
    gap:7px!important;
    scrollbar-width:none;
    scroll-snap-type:x mandatory;
  }
  body.manga-my-page .manga-retention-grid::-webkit-scrollbar{display:none}
  body.manga-my-page .manga-retention-card{flex:0 0 150px;scroll-snap-align:start}
  body.manga-my-page .manga-stage7-panel{padding:13px!important}
  body.manga-my-page .manga-stage7-panel h2{font-size:17px!important}
  body.manga-my-page .manga-goal-form{grid-template-columns:1fr!important}
  body.manga-my-page .manga-badge-grid{grid-template-columns:1fr!important}
  body.manga-my-page .manga-history-item{grid-template-columns:48px minmax(0,1fr)!important}
  body.manga-my-page .manga-history-item img{width:48px!important;height:64px!important}
  body.manga-my-page .manga-history-item>div:last-child{grid-column:2!important}
  body.manga-my-page .manga-library-tabs{margin-inline:-1px;scrollbar-width:none}
  body.manga-my-page .manga-library-tabs::-webkit-scrollbar{display:none}
  body.manga-my-page .manga-my-card{
    grid-template-columns:82px minmax(0,1fr)!important;
    gap:9px!important;
    padding:9px!important;
  }
  body.manga-my-page .manga-my-cover img{width:82px!important}
  body.manga-my-page .manga-my-top h2{font-size:.82rem!important}
  body.manga-my-page .manga-library-progress{grid-column:1/-1}
  body.manga-my-page .manga-my-actions{display:grid!important;grid-template-columns:1fr 1fr!important}
  body.manga-my-page .manga-my-actions .manga-btn{width:100%;justify-content:center;font-size:.65rem!important;padding-inline:7px!important}
  body.manga-my-page .manga-library-controls{display:grid!important;grid-template-columns:1fr 1fr!important}
  body.manga-my-page .manga-library-controls>label{grid-column:1/-1!important;width:100%!important}
  body.manga-my-page .manga-account-btn{width:100%!important;justify-content:center!important}
  body.manga-my-page .manga-notification-preferences{align-items:stretch!important;flex-direction:column!important}
  body.manga-my-page .manga-notification-preferences>label:last-child{justify-content:space-between!important}
}

@media(max-width:430px){
  body.manga-my-page .manga-hero-side{grid-template-columns:1fr!important}
  body.manga-my-page .manga-my-card{grid-template-columns:72px minmax(0,1fr)!important}
  body.manga-my-page .manga-my-cover img{width:72px!important}
  body.manga-my-page .manga-library-controls{grid-template-columns:1fr!important}
  body.manga-my-page .manga-library-controls>label{grid-column:1!important}
}

/* Native select menus: keep options readable on dark OS/browser themes. */
body.search-page.search-php-page select,
body.download-page.download-php-page select,
body.manga-directory-page select,
body.manga-my-page select{color-scheme:dark!important}
body.search-page.search-php-page select option,
body.download-page.download-php-page select option,
body.manga-directory-page select option,
body.manga-my-page select option{
  background:#0d182a;
  color:#f6f8fd;
}
