/* Tsukiro 2.7.9 — compact schedule, strict franchises and visible character bios. */

/* "Твой аниме-мир" is a loading state only. The normal title hero takes over
   as soon as the first item from the 5000-title sequence is ready. */
.hero.hero-is-loading{
  min-height:clamp(640px,78vh,820px);
  isolation:isolate;
  background:
    radial-gradient(circle at 77% 32%,rgba(209,71,173,.18),transparent 26%),
    radial-gradient(circle at 65% 68%,rgba(111,76,255,.14),transparent 32%),
    linear-gradient(135deg,#07070b 0%,#0d0912 48%,#09090e 100%);
}
.hero.hero-is-loading::before,
.hero.hero-is-loading::after{
  content:"";position:absolute;z-index:0;border-radius:999px;pointer-events:none;filter:blur(2px);opacity:.78;
}
.hero.hero-is-loading::before{
  width:min(46vw,620px);aspect-ratio:1;right:8vw;top:12%;
  border:1px solid rgba(255,119,193,.12);
  box-shadow:inset 0 0 90px rgba(208,64,169,.08),0 0 110px rgba(127,71,255,.06);
  animation:v277-orbit 9s ease-in-out infinite alternate;
}
.hero.hero-is-loading::after{
  width:min(24vw,330px);aspect-ratio:1;right:18vw;top:31%;
  background:radial-gradient(circle at 38% 32%,rgba(255,255,255,.08),rgba(211,72,176,.12) 18%,rgba(91,57,178,.08) 48%,transparent 70%);
  animation:v277-pulse 3.2s ease-in-out infinite;
}
 .hero.hero-is-loading .hero-image-stack{opacity:.42!important;visibility:visible!important;filter:saturate(.72) brightness(.68)}
.hero.hero-is-loading .hero-image-layer{transform:scale(1.035);filter:blur(1.4px)}
.hero.hero-is-loading .hero-frame-video-host{display:none!important}
.hero.hero-is-loading .hero-overlay{background:linear-gradient(90deg,rgba(5,5,8,.96) 0%,rgba(5,5,8,.82) 44%,rgba(5,5,8,.38) 72%,rgba(5,5,8,.18) 100%)!important}
.hero.hero-is-loading .hero-content{position:relative;z-index:3;max-width:1320px;padding-top:clamp(120px,18vh,190px);padding-bottom:100px}
.hero.hero-is-loading .hero-kicker{letter-spacing:.32em;color:#dba5d0}
.hero.hero-is-loading #heroTitle{max-width:780px;font-size:clamp(58px,8vw,112px);line-height:.88;letter-spacing:-.065em;margin:18px 0 18px}
.hero.hero-is-loading #heroAltTitle{font-size:clamp(16px,2vw,22px);color:#c5becb}
.hero.hero-is-loading #heroMeta{display:none!important}
.hero.hero-is-loading #heroGenres,.hero.hero-is-loading .hero-actions{display:none!important}
.hero.hero-is-loading #heroDescription{max-width:520px;color:#a29ba8;margin-top:20px}
.hero-loading-indicator{display:inline-flex;align-items:center;gap:10px;margin-top:26px;color:#aaa3b0;font-size:12px;font-weight:850;letter-spacing:.08em;text-transform:uppercase}
.hero-loading-indicator i{width:34px;height:4px;border-radius:999px;background:linear-gradient(90deg,#e75aae,#9164ff,#e75aae);background-size:200% 100%;animation:v277-loader 1.25s linear infinite}
.hero-loading-indicator.hidden{display:none!important}
@keyframes v277-loader{to{background-position:-200% 0}}
@keyframes v277-pulse{50%{transform:scale(1.08);opacity:.52}}
@keyframes v277-orbit{to{transform:translate3d(-22px,18px,0) rotate(4deg)}}

/* Tsukiro 2.8.2 — once the first title is ready, the loading composition must
   never remain above the real hero. This specifically prevents stale layers in
   iOS Safari/WebKit after GPU compositing. */
.hero.hero-ready,
.hero.hero-ready.hero-is-loading{
  background:#08080c!important;
}
.hero.hero-ready::before,
.hero.hero-ready::after,
.hero.hero-ready.hero-is-loading::before,
.hero.hero-ready.hero-is-loading::after{
  content:none!important;
  display:none!important;
  opacity:0!important;
  animation:none!important;
}
.hero.hero-ready .hero-loading-indicator{display:none!important}
.hero.hero-ready .hero-image-stack,
.hero.hero-ready.hero-is-loading .hero-image-stack{
  opacity:1!important;
  visibility:visible!important;
  filter:none!important;
}
.hero.hero-ready.hero-is-loading .hero-frame-video-host{display:block!important}
.hero.hero-ready.hero-is-loading #heroMeta{display:flex!important}
.hero.hero-ready.hero-is-loading #heroGenres{display:flex!important}
.hero.hero-ready.hero-is-loading .hero-actions{display:flex!important}
.hero.hero-ready.hero-is-loading .hero-content{padding-top:inherit;padding-bottom:inherit}

@media(max-width:760px){
  .hero.hero-ready.hero-is-loading{
    min-height:650px!important;
  }
  .hero.hero-ready.hero-is-loading .hero-overlay{
    background:
      linear-gradient(180deg,rgba(7,7,10,.16) 0%,rgba(7,7,10,.18) 28%,rgba(7,7,10,.66) 57%,rgba(7,7,10,.96) 88%,#07070a 100%),
      linear-gradient(90deg,rgba(7,7,10,.70) 0%,rgba(7,7,10,.18) 74%,rgba(7,7,10,.12) 100%)!important;
  }
  .hero.hero-ready.hero-is-loading .hero-content{
    padding:90px 0 calc(104px + env(safe-area-inset-bottom))!important;
  }
  .hero.hero-ready.hero-is-loading #heroTitle{
    max-width:100%!important;
    font-size:clamp(31px,9.2vw,43px)!important;
  }
  .hero.hero-ready.hero-is-loading #heroDescription{max-width:100%!important}
}

/* Owner-only Premium/role controls in Admin > Users. */
.admin-owner-tools{margin:12px 14px 14px;padding:14px;border:1px solid rgba(255,95,174,.17);border-radius:15px;background:linear-gradient(145deg,rgba(255,79,163,.045),rgba(123,83,255,.035));display:grid;gap:12px}
.admin-owner-tools__head{display:flex;align-items:center;justify-content:space-between;gap:12px}
.admin-owner-tools__head strong{font-size:12px}.admin-owner-tools__head small{color:#8f8996;font-size:10px;text-align:right}
.admin-owner-tools__row{display:grid;grid-template-columns:minmax(88px,130px) minmax(100px,150px) auto auto;gap:8px;align-items:end}
.admin-owner-tools label{display:grid;gap:5px;color:#85808d;font-size:9px;font-weight:850;text-transform:uppercase;letter-spacing:.07em}
.admin-owner-tools input,.admin-owner-tools select{width:100%;height:38px;border:1px solid #2b2932;border-radius:10px;background:#111017;color:#f8f4fa;padding:0 10px;outline:none}
.admin-owner-tools input:focus,.admin-owner-tools select:focus{border-color:rgba(255,92,173,.44)}
.admin-owner-tools__role{grid-template-columns:minmax(160px,220px) auto 1fr}
.admin-owner-tools__message{min-height:14px;margin:0;color:#9992a0;font-size:10px}
.admin-title-chip.is-static{cursor:default}
.admin-user-card[data-admin-user-role="moderator"]{border-color:rgba(151,114,255,.18)}

@media(max-width:720px){
  .hero.hero-is-loading{min-height:calc(100svh - 58px)}
  .hero.hero-is-loading::before{width:78vw;right:-24vw;top:18%}
  .hero.hero-is-loading::after{width:48vw;right:5vw;top:26%}
  .hero.hero-is-loading .hero-overlay{background:linear-gradient(0deg,rgba(5,5,8,.98) 0%,rgba(5,5,8,.8) 52%,rgba(5,5,8,.3) 100%)!important}
  .hero.hero-is-loading .hero-content{padding-top:30svh;padding-bottom:72px}
  .hero.hero-is-loading #heroTitle{font-size:clamp(50px,16vw,76px);max-width:92vw}
  .hero.hero-is-loading #heroDescription{max-width:86vw}
  .admin-owner-tools__row,.admin-owner-tools__role{grid-template-columns:1fr 1fr}
  .admin-owner-tools__row .button,.admin-owner-tools__role .button{width:100%}
  .admin-owner-tools__message{grid-column:1/-1}
}

@media(prefers-reduced-motion:reduce){
  .hero.hero-is-loading::before,.hero.hero-is-loading::after,.hero-loading-indicator i{animation:none!important}
}


/* 2.7.9 — never reserve a blank viewport after the final schedule rows. */
body[data-page="home"] main,
body[data-page="home"] .home-sections,
body[data-page="home"] #schedule{min-height:0!important;height:auto!important}
body[data-page="home"] #schedule{padding-bottom:0!important;margin-bottom:0!important}
body[data-page="home"] .footer-modern{margin-top:28px!important}
body[data-page="schedule"] .page-main{min-height:0!important;height:auto!important;padding-bottom:44px!important}
body[data-page="schedule"] .footer-modern{margin-top:24px!important}

/* Visible cast block on title pages. */
.characters-section{margin-top:34px;padding:0!important}
.characters-section .section-heading{margin-bottom:16px}
.characters-section .section-note{display:block;margin-top:5px}
.character-card--bio{appearance:none;width:100%;padding:0;color:inherit;text-align:left;cursor:pointer;font:inherit}
.character-card--bio em{display:block;margin-top:7px;color:#8d8793;font-size:8px;font-style:normal;font-weight:850;letter-spacing:.02em}
.character-card--bio:hover em,.character-card--bio:focus-visible em{color:#f0a9cf}
.character-card--bio:focus-visible{outline:2px solid rgba(255,91,172,.55);outline-offset:2px}
.character-bio-source.is-curated{display:inline-flex;align-items:center;min-height:28px;padding:0 10px;border:1px solid rgba(255,91,172,.18);border-radius:999px;background:rgba(255,79,163,.07);color:#e6a5c8;font-size:9px;font-weight:850}
@media(max-width:680px){
  .characters-section{margin-top:26px}
  .characters-grid--small{grid-template-columns:repeat(3,minmax(0,1fr))!important}
  .character-card--bio em{font-size:8px}
}


/* Tsukiro 2.8.0 — instant schedule + inline character biographies */
.characters-section.fold-card{margin-top:14px;padding:0!important}
.characters-section.fold-card>summary{padding:17px 19px}
.characters-inline-note{margin:16px 0 12px;color:#858590;font-size:11px}
.characters-section .fold-content{padding-bottom:18px}
.characters-empty{grid-column:1/-1;padding:18px;border:1px dashed rgba(255,255,255,.1);border-radius:14px;color:#8e8e99;font-size:12px}
.discovery-empty--compact{min-height:82px!important;padding:18px!important;display:flex!important;align-items:center!important;justify-content:center!important;gap:10px!important}
.discovery-empty--compact span{font-size:16px!important}
.discovery-empty--compact strong{font-size:13px!important}
@media(max-width:760px){
  .characters-grid--small{grid-template-columns:repeat(3,minmax(0,1fr))!important}
  .characters-section.fold-card>summary{padding:15px}
  .characters-inline-note{font-size:10px}
}

/* 3.6.29 Premium adjustment */
.admin-owner-tools{background:#111116!important;border-color:#2b2a32!important;border-radius:12px!important}
.admin-premium-adjust-row{grid-template-columns:minmax(90px,120px) minmax(100px,130px) auto auto auto!important}
@media(max-width:980px){.admin-premium-adjust-row{grid-template-columns:1fr 1fr!important}.admin-premium-adjust-row .button{width:100%}}
