/* AVLOG HOME RESTORE + SECTION FRAME ALIGNMENT
   Header and four quick-entry cards deliberately retain the original theme appearance.
   Home content sections use the AI video heading-panel language. */
:root{
  --home-panel-line:rgba(255,255,255,.09);
  --home-panel-bg:linear-gradient(105deg,#183322 0%,#122319 48%,#101a13 100%);
}

/* Restore original site header: keep its original markup and original theme geometry. */
html body.body .header.site-header,
html body.body .site-header{
  position:sticky!important;
  top:0!important;
  z-index:200!important;
  background:rgba(10,16,13,.92)!important;
  border-bottom:1px solid rgba(0,200,83,.15)!important;
  box-shadow:none!important;
  -webkit-backdrop-filter:blur(14px)!important;
  backdrop-filter:blur(14px)!important;
}
html body.body .site-header-inner{
  display:flex!important;
  align-items:center!important;
  gap:16px!important;
  min-height:56px!important;
  max-width:var(--max,1240px)!important;
  margin:0 auto!important;
  padding:8px var(--pad,clamp(12px,2.2vw,20px))!important;
}
html body.body .site-brand a{
  display:inline-flex!important;
  align-items:center!important;
  gap:8px!important;
  font-size:18px!important;
  font-weight:800!important;
  letter-spacing:.02em!important;
}
html body.body .site-brand img{display:inline-block!important;height:30px!important;width:auto!important}
html body.body .site-brand .name{
  background:linear-gradient(90deg,var(--g-400,#10b981),var(--g-300,#34d399))!important;
  -webkit-background-clip:text!important;background-clip:text!important;
  color:transparent!important;-webkit-text-fill-color:transparent!important;
}

/* Restore the four original quick-entry cards without the R2 redesign decorations. */
html body.body .hub-shortcuts{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:10px!important;
  margin:0 0 var(--gap,14px)!important;
  padding:0!important;border:0!important;background:transparent!important;
}
html body.body .hub-shortcuts::before{display:none!important;content:none!important}
html body.body .hub-shortcut{
  position:relative!important;display:flex!important;align-items:center!important;
  gap:12px!important;min-width:0!important;padding:14px!important;
  border:1px solid var(--line,rgba(255,255,255,.08))!important;
  border-radius:var(--r-lg,14px)!important;
  background:var(--bg-soft,rgba(16,40,28,.45))!important;
  color:var(--tx,rgba(255,255,255,.92))!important;
  box-shadow:none!important;overflow:visible!important;
  transform:none!important;transition:border-color .15s,background .15s!important;
}
html body.body .hub-shortcut::after{content:none!important;display:none!important}
html body.body .hub-shortcut:hover{
  border-color:var(--line-g,rgba(0,200,83,.28))!important;
  background:var(--bg-chip-h,rgba(0,200,83,.10))!important;
  color:var(--tx,rgba(255,255,255,.92))!important;transform:none!important;
}
html body.body .hub-shortcut .hub-icon,
html body.body .hub-shortcut .hub-icon[aria-hidden="true"]{
  display:flex!important;align-items:center!important;justify-content:center!important;
  flex:0 0 40px!important;width:40px!important;height:40px!important;
  border-radius:10px!important;background:rgba(0,200,83,.12)!important;
  color:var(--g-400,#10b981)!important;font-size:18px!important;
}
html body.body .hub-shortcut h2{
  margin:0!important;font-size:14px!important;font-weight:700!important;
  color:var(--tx,rgba(255,255,255,.92))!important
}
html body.body .hub-shortcut p{
  display:block!important;margin:3px 0 0!important;
  color:var(--tx-2,rgba(200,220,208,.68))!important;font-size:11px!important;line-height:1.45!important
}

/* The AI feature heading is the visual reference. Other homepage sections
   lose their large enclosing frame and use the same standalone heading panel. */
html body.body .hub-wrap > .hub-section:not(.ai-video-section){
  width:100%!important;margin:0!important;padding:0!important;
  border:0!important;border-radius:0!important;background:transparent!important;
  box-shadow:none!important;overflow:visible!important;isolation:auto!important;
}
html body.body .hub-wrap > .hub-section:not(.ai-video-section)::before,
html body.body .hub-wrap > .hub-section:not(.ai-video-section)::after{display:none!important;content:none!important}
html body.body .hub-wrap > .hub-section:not(.ai-video-section) > .hub-section-head{
  position:relative!important;display:flex!important;align-items:center!important;
  justify-content:space-between!important;gap:14px!important;
  min-height:0!important;margin:0 0 13px!important;padding:18px 22px!important;
  border:0!important;border-radius:16px!important;
  background:var(--home-panel-bg)!important;overflow:hidden!important;
}
html body.body .hub-wrap > .hub-section:not(.ai-video-section) > .hub-section-head::after{
  content:"";position:absolute;right:7%;top:-36px;width:160px;height:110px;
  border:1px solid rgba(92,220,133,.07);border-radius:50%;
  box-shadow:0 0 0 18px rgba(92,220,133,.018),0 0 0 36px rgba(92,220,133,.012);
  pointer-events:none;
}
html body.body .hub-wrap > .hub-section:not(.ai-video-section) > .hub-section-head h1,
html body.body .hub-wrap > .hub-section:not(.ai-video-section) > .hub-section-head h2{
  position:relative!important;z-index:1!important;margin:0!important;padding:0!important;
  border:0!important;background:none!important;color:#fff!important;
  font-size:clamp(19px,2vw,25px)!important;font-weight:850!important;letter-spacing:-.035em!important;
}
html body.body .hub-wrap > .hub-section:not(.ai-video-section) > .hub-section-head h2::before,
html body.body .hub-wrap > .hub-section:not(.ai-video-section) > .hub-section-head h1::before{
  content:none!important;display:none!important
}
html body.body .hub-wrap > .hub-section:not(.ai-video-section) > .hub-section-head > a,
html body.body .hub-wrap > .hub-section:not(.ai-video-section) > .hub-section-head .hub-section-actions{
  position:relative!important;z-index:1!important;color:#b9d9c2!important
}
html body.body .hub-wrap > .hub-section:not(.ai-video-section) > .hub-section-head a{
  color:#b9d9c2!important;font-size:12px!important
}
html body.body .hub-wrap > .hub-section:not(.ai-video-section) > .hub-section-head a:hover{color:#8df0ad!important}

/* Content beneath the banner remains open, matching the AI video section. */
html body.body .hub-wrap > .hub-section:not(.ai-video-section) .category-con,
html body.body .hub-wrap > .hub-section:not(.ai-video-section) .home-video-category-grid,
html body.body .hub-wrap > .hub-section:not(.ai-video-section) .hub-novel-grid{
  position:relative!important;margin:0!important
}

/* Keywords: 16 columns on desktop, 6 columns on phones. */
html body.body .home-keyword-directory .keyword-directory-grid{
  display:grid!important;grid-template-columns:repeat(16,minmax(0,1fr))!important;
  gap:7px!important
}
html body.body .home-keyword-directory .keyword-directory-grid>a{
  min-width:0!important;min-height:34px!important;padding:6px 4px!important;
  border:1px solid rgba(135,190,151,.16)!important;border-radius:6px!important;
  background:rgba(255,255,255,.025)!important;color:rgba(226,239,229,.78)!important;
  font-size:12px!important;white-space:nowrap!important;overflow:hidden!important;
  text-overflow:ellipsis!important;box-shadow:none!important
}
html body.body .home-keyword-directory .keyword-directory-grid>a:hover{
  border-color:var(--fresh-green,#00c853)!important;background:rgba(0,200,83,.12)!important;
  color:#a4f0b9!important;transform:translateY(-1px)
}

/* Restore the fixed bottom-right back-to-top control and its visible state. */
html body.body .back-to-top{
  position:fixed!important;right:24px!important;bottom:26px!important;z-index:10000!important;
  display:flex!important;align-items:center!important;justify-content:center!important;
  width:44px!important;height:44px!important;padding:0!important;
  border:1px solid rgba(117,214,160,.25)!important;border-radius:13px!important;
  background:rgba(17,27,21,.94)!important;color:#cfe5d5!important;
  box-shadow:0 8px 24px rgba(0,0,0,.32)!important;
  opacity:0!important;visibility:hidden!important;transform:translateY(8px)!important;
  cursor:pointer!important;transition:opacity .22s ease,visibility .22s ease,transform .22s ease,background .22s ease,border-color .22s ease!important;
  -webkit-backdrop-filter:blur(12px)!important;backdrop-filter:blur(12px)!important
}
html body.body .back-to-top.is-visible{
  opacity:1!important;visibility:visible!important;transform:translateY(0)!important
}
html body.body .back-to-top:hover{
  background:var(--fresh-green,#00c853)!important;border-color:var(--fresh-green,#00c853)!important;
  color:#06130b!important;transform:translateY(-2px)!important
}
html body.body .back-to-top svg{display:block!important;width:21px!important;height:21px!important}
html body.body .back-to-top:focus-visible{outline:2px solid rgba(141,240,173,.75)!important;outline-offset:3px!important}

@media(max-width:1100px){
  html body.body .home-keyword-directory .keyword-directory-grid{grid-template-columns:repeat(10,minmax(0,1fr))!important}
}
@media(max-width:767px){
  html body.body .site-header-inner{min-height:56px!important;padding:8px 12px!important;gap:10px!important}
  html body.body .site-brand img{height:27px!important}
  html body.body .hub-shortcuts{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}
  html body.body .hub-shortcut{gap:9px!important;padding:10px!important}
  html body.body .hub-shortcut .hub-icon{flex-basis:34px!important;width:34px!important;height:34px!important;font-size:16px!important}
  html body.body .hub-shortcut h2{font-size:12px!important}
  html body.body .hub-shortcut p{display:none!important}
  html body.body .hub-wrap > .hub-section:not(.ai-video-section) > .hub-section-head{
    min-height:0!important;margin-bottom:9px!important;padding:15px!important;border-radius:12px!important
  }
  html body.body .hub-wrap > .hub-section:not(.ai-video-section) > .hub-section-head h2{font-size:18px!important}
  html body.body .home-keyword-directory .keyword-directory-grid{grid-template-columns:repeat(6,minmax(0,1fr))!important;gap:6px!important}
  html body.body .home-keyword-directory .keyword-directory-grid>a{min-height:32px!important;padding:5px 2px!important;font-size:11px!important}
  html body.body .back-to-top{right:14px!important;bottom:18px!important;width:42px!important;height:42px!important;border-radius:12px!important}
}
@media(prefers-reduced-motion:reduce){
  html body.body .back-to-top{transition:none!important}
}
