/* v1.3: compact three-panel desktop shell. Masthead spans both columns. */
html,body{height:100%}body{overflow:hidden;background:#0b0c0f}
.site-shell{width:min(1260px,calc(100% - 32px));height:calc(100dvh - 32px);min-height:500px;margin:16px auto;display:grid;grid-template-rows:186px minmax(0,1fr);gap:12px}
.banner-panel{position:relative;overflow:hidden;border:1px solid #43373c;border-radius:15px;isolation:isolate;background:radial-gradient(ellipse at 76% 0%,#642b37 0%,transparent 53%),linear-gradient(115deg,#181a20 3%,#292127 49%,#111216 100%)}
.banner-panel::before{content:"";position:absolute;right:7%;top:-180px;width:470px;height:470px;border-radius:50%;border:1px solid rgba(232,87,103,.25);box-shadow:0 0 0 70px rgba(193,54,66,.025),0 0 0 140px rgba(193,54,66,.028)}
.banner-art,.banner-shade{position:absolute;inset:0;width:100%;height:100%}.banner-art{object-fit:cover}.banner-shade{background:linear-gradient(90deg,rgba(9,10,14,.91) 0%,rgba(9,10,14,.72) 49%,rgba(9,10,14,.15) 100%)}
.banner-text{position:relative;z-index:1;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;height:100%;padding:18px 34px;max-width:810px}
.banner-site{display:inline-flex;align-items:center;gap:9px;font-size:1.02rem;font-weight:850;letter-spacing:.015em;margin-bottom:12px}.banner-logo{width:27px;height:27px;object-fit:contain}.banner-kicker{font-size:.68rem;letter-spacing:.18em;color:#f08d93;font-weight:800}.banner-text .banner-heading{font-size:clamp(1.45rem,2.6vw,2.4rem);line-height:1.2;margin:7px 0 6px}.banner-text .banner-subtitle{color:#dbd3d5;font-size:.88rem;line-height:1.45;max-width:630px}
.content-layout{display:grid;grid-template-columns:228px minmax(0,1fr);gap:12px;min-height:0}
.content-layout>.sidebar{width:auto;min-width:0;height:auto;position:relative;top:auto;border:1px solid var(--line);border-radius:14px;padding:18px 12px;background:#15161b;overflow-y:auto;overscroll-behavior:contain}
.content-layout>.sidebar .brand{margin-bottom:18px}.sidebar-bottom{gap:8px 14px}.brandname{font-size:1rem}.brandmark{width:33px;height:33px}
.content-layout>.layout{min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable;background:#14151a;border:1px solid var(--line);border-radius:14px}
.content-layout .topbar{position:sticky;top:0;z-index:15;height:60px;min-height:60px;padding:0 25px;gap:16px;background:#191a20;border-bottom:1px solid var(--line);border-radius:13px 13px 0 0}
.content-layout .main{max-width:none;padding:26px 28px 60px;flex:1;min-height:0}.content-layout .footer{padding:18px 28px}
.main>.section:first-child{margin-top:3px}.section{margin-top:32px}.anime-grid{gap:13px}.news-grid{gap:12px}.news-card,.panel{padding:18px}.filters{padding:14px}
.contact-form{margin-top:20px}.contact-form-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}.contact-form textarea{min-height:150px}.contact-honeypot{position:absolute;left:-10000px;width:1px;height:1px;overflow:hidden}.contact-form .meta-note{margin:12px 0 0}.contact-form .meta-note a{color:#eb9298}.contact-message{white-space:pre-wrap;overflow-wrap:anywhere;margin-top:20px}
@media(max-width:850px){html,body{height:auto}body{overflow:auto}.site-shell{display:flex;flex-direction:column;width:100%;height:auto;min-height:100dvh;margin:0;gap:0}.banner-panel{border-radius:0;border-left:0;border-right:0;min-height:164px}.banner-text{padding:20px 22px}.banner-text .banner-heading{font-size:1.65rem}.content-layout{display:block;min-height:0}.content-layout>.sidebar{position:fixed;top:0;bottom:0;left:0;width:min(285px,88vw);height:100dvh;min-width:0;border-radius:0;z-index:40;transform:translateX(-110%);transition:transform .17s}.content-layout>.sidebar.is-open{transform:translateX(0)}.content-layout>.layout{overflow:visible;border:0;border-radius:0;min-height:calc(100dvh - 164px)}.content-layout .topbar{border-radius:0;padding:0 20px}.content-layout .main{padding:24px 20px 55px}.content-layout .footer{padding:22px 20px}.top-logo{display:none}.menu-toggle,.mobile-close{display:block}.contact-form-grid{grid-template-columns:1fr;gap:0}}
@media(max-width:570px){.banner-panel{min-height:152px}.banner-text .banner-heading{font-size:1.38rem}.banner-text .banner-subtitle{font-size:.8rem}.content-layout .main{padding:20px 15px 48px}.content-layout .topbar{padding:0 15px}.anime-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Compact frame fallbacks for short viewports and reduced motion. */
@media(min-width:851px) and (max-height:540px){.site-shell{min-height:0;height:calc(100dvh - 16px);margin:8px auto;grid-template-rows:132px minmax(0,1fr)}.banner-text{padding:10px 24px}.banner-site{margin-bottom:4px}.banner-text .banner-heading{font-size:1.5rem}}
@media(prefers-reduced-motion:reduce){.content-layout>.sidebar{transition:none}}
/* Keep the footer after content, not overlaid on rows inside the scrolling panel. */
@media(min-width:851px){.content-layout>.layout{height:100%;}.content-layout .main{flex:1 0 auto;min-height:auto;}}

/* v1.4 - retain a true image-only hero, without darkening or covering uploaded artwork. */
.banner-panel.has-image{background:#111;border-color:#333}
.banner-panel.has-image::before,.banner-panel.has-image .banner-text,.banner-panel .banner-shade{display:none!important}
.banner-panel.has-image .banner-art{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;display:block;filter:none;opacity:1}
.content-layout>.sidebar{padding-top:16px}
.content-layout>.sidebar .brand{display:none}
.content-layout>.sidebar>.mode-switch{margin:0 0 16px}
.content-layout>.sidebar .mobile-close{position:absolute;right:10px;top:4px;z-index:2}
@media(max-width:850px){.content-layout>.sidebar>.mode-switch{margin-top:32px}}

/* Reusable discussions listings */
.forum-categories{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:22px 0}
.forum-category,.forum-topic{display:flex;flex-direction:column;gap:6px;padding:18px;background:#202127;border:1px solid var(--line);border-radius:11px}
.forum-category:hover,.forum-topic:hover{border-color:#9a4e59}
.forum-category b{font-size:1.05rem}.forum-category span,.forum-topic span{font-size:.82rem;color:#adb0ba}
.forum-topics{display:flex;flex-direction:column;gap:9px;margin:18px 0}
.forum-compose{margin:20px 0;max-width:850px}.forum-compose label{display:block;margin:10px 0 6px}.forum-compose textarea{width:100%;min-height:110px}
.forum-compose summary{cursor:pointer;font-weight:700}.forum-compose .checkline{display:block}
@media(max-width:650px){.forum-categories{grid-template-columns:1fr}}

/* v1.5: independently configurable hero text; never shade the entire uploaded image. */
.banner-panel.has-image::before,.banner-panel .banner-shade{display:none!important}
.banner-panel.has-image .banner-text{display:flex!important}
.banner-panel.has-image:not(.has-text) .banner-text{display:none!important}
.banner-panel.has-image .banner-art{filter:none;opacity:1}
.banner-text{max-width:var(--hero-text-width,45%);width:100%;min-width:0;align-items:flex-start;padding:13px 26px;gap:3px;justify-content:center;pointer-events:none}
.banner-text>*{max-width:100%;overflow-wrap:anywhere}
.banner-text .banner-site,.banner-text .banner-heading{margin:0}
.banner-text .banner-site{font-size:.95rem;letter-spacing:.02em}
.banner-text .banner-kicker{letter-spacing:.1em;font-size:.62rem;color:#f28c92}
.banner-text .banner-heading{font-size:1.75rem;line-height:1.13;font-weight:800;letter-spacing:-.02em}
.banner-text .banner-subtitle{font-size:.84rem;line-height:1.4;color:#f0e9ec;max-width:100%;margin:2px 0 0}
.banner-text.hero-align-left{margin-right:auto;text-align:left;align-items:flex-start}
.banner-text.hero-align-center{margin-left:auto;margin-right:auto;text-align:center;align-items:center}
.banner-text.hero-align-right{margin-left:auto;text-align:right;align-items:flex-end}
.banner-text.hero-vertical-top{justify-content:flex-start}
.banner-text.hero-vertical-bottom{justify-content:flex-end}
.banner-text.hero-size-small .banner-heading{font-size:1.25rem}
.banner-text.hero-size-small .banner-subtitle{font-size:.76rem}
.banner-text.hero-size-large .banner-heading{font-size:2rem}
.banner-text.hero-font-elegant .banner-heading{font-family:Georgia,'Times New Roman',serif;letter-spacing:.004em;font-weight:600}
.banner-text.hero-font-minimal .banner-heading{font-weight:500;letter-spacing:0}
.banner-text.hero-color-white .banner-heading{color:#fff}
.banner-text.hero-color-soft .banner-heading{color:#ece0df}
.banner-text.hero-color-red .banner-heading{color:#ff6c79}
.banner-text.hero-shadow{text-shadow:0 2px 9px rgba(0,0,0,.75)}
.banner-text.hero-contrast-soft{background:rgba(6,8,12,.38);border-radius:12px}
.banner-text.hero-contrast-solid{background:rgba(6,8,12,.78);border-radius:12px}
/* A header may display text on the left while a transparent-logo image occupies the right. */
.admin-hero-preview{height:186px;margin:12px 0 22px;min-height:0}
.admin-hero-preview .banner-text{pointer-events:auto}
.hero-editor{max-width:920px}
.hero-editor hr{border:0;border-top:1px solid var(--line);margin:22px 0}
.hero-editor-selects{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 16px}
.hero-editor-fields{padding-top:8px}
@media(max-width:850px){
 .banner-text{padding:12px 17px;max-width:min(75%,var(--hero-text-width,45%))}
 .banner-text .banner-site{font-size:.85rem}
 .banner-text .banner-heading{font-size:1.22rem}
 .banner-text.hero-size-large .banner-heading{font-size:1.42rem}
 .banner-text.hero-size-small .banner-heading{font-size:1rem}
 .banner-text .banner-subtitle{font-size:.72rem}
 .admin-hero-preview{height:164px}
}
@media(max-width:570px){
 .banner-text{max-width:85%;padding:10px 13px}
 .banner-text .banner-heading{font-size:1.07rem}
 .banner-text.hero-size-large .banner-heading{font-size:1.16rem}
 .banner-text .banner-kicker{font-size:.55rem}
 .banner-text.hero-mobile-desc-off .banner-subtitle{display:none}
 .hero-editor-selects{grid-template-columns:1fr}
 .admin-hero-preview{height:152px}
}

/* Compact cover hover treatment; preserve title hover emphasis without red image borders. */
.anime-card .poster,.anime-list-item .list-poster{transition:transform .17s ease,box-shadow .17s ease;transform-origin:center center;border-color:#393a41}
.anime-card:hover .poster,.anime-list-item .list-poster:hover{transform:scale(1.055);border-color:#393a41;box-shadow:0 9px 20px rgba(0,0,0,.35)}
.anime-card:hover .card-meta strong,.anime-list-item .list-titlebar a:hover{color:#ff747e}
.admin-hero-preview .banner-text[hidden],.admin-hero-preview .banner-art[hidden]{display:none!important}
@media(prefers-reduced-motion:reduce){.anime-card .poster,.anime-list-item .list-poster{transition:none}}

/* v1.6 richer profiles, accessible hero-home links */
.banner-panel .banner-home-title{pointer-events:auto;position:relative;color:inherit;text-decoration:none;z-index:4;}
.banner-panel .banner-art-home{position:absolute;right:0.5%;bottom:1%;width:29%;height:40%;z-index:3;display:block;opacity:0;background:transparent}
.banner-panel .banner-art-home:focus-visible{opacity:1;outline:3px solid #f3858c;outline-offset:-5px;border-radius:8px}
.ref-section h2,.character-grid h2{margin-bottom:16px}.ref-facts{display:grid;grid-template-columns:minmax(110px,175px) minmax(0,1fr);gap:9px 16px;line-height:1.5;margin:0}.ref-facts dt{color:var(--muted);font-weight:600}.ref-facts dd{margin:0;overflow-wrap:anywhere}.ref-facts dt:not(:first-child),.ref-facts dd:not(:nth-child(2)){border-top:1px solid rgba(255,255,255,.06);padding-top:9px}
.character-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(225px,1fr));gap:12px}.character-card{display:flex;gap:12px;padding:13px;border:1px solid var(--border, #39343a);border-radius:12px;background:#1b1a1e}.character-portrait{width:78px;min-width:78px;height:116px;display:flex;align-items:center;justify-content:center;background:#29262b;border-radius:7px;overflow:hidden;color:#b7abb1;font-size:1.6rem}.character-portrait img{width:100%;height:100%;object-fit:contain}.character-copy{display:flex;flex-direction:column;gap:4px;min-width:0;line-height:1.4;font-size:.8rem}.character-copy strong{font-size:.95rem;overflow-wrap:anywhere}.character-copy small{color:#f28e98;font-weight:700}.character-copy span{color:var(--muted)}.character-copy p{margin:5px 0 0;font-size:.8rem}.ref-episode{border-top:1px solid rgba(255,255,255,.1);padding:12px 0}.ref-episode:first-child{border-top:0}.ref-episode strong{display:block}.ref-episode small{display:block;color:var(--muted);margin-top:3px}.ref-episode details{margin-top:6px}.reference-links{padding-left:22px}.reference-links li{padding:5px 0}.reference-links small{margin-left:8px;color:var(--muted)}.admin-details{border:1px solid #423c42;border-radius:10px;margin-bottom:12px;padding:10px 14px}.admin-details summary{cursor:pointer;font-weight:700}.admin-fields{margin-top:15px}.ref-linked{display:flex;align-items:center;gap:12px;border-bottom:1px solid #39343a;padding:7px 0}.ref-linked .mini-btn{margin-left:auto}
@media(max-width:620px){.ref-facts{grid-template-columns:1fr;gap:4px}.ref-facts dt{padding-top:10px;border-top:1px solid rgba(255,255,255,.08)}.ref-facts dd{padding-bottom:6px;border:0!important}.character-grid{grid-template-columns:1fr}.banner-panel .banner-art-home{width:37%;height:42%}}

.banner-panel .banner-text{z-index:4}

/* v1.8: the site name and hero click target stay links without hover decoration. */
.banner-panel .banner-home-title,.banner-panel .banner-home-title:link,.banner-panel .banner-home-title:visited,.banner-panel .banner-home-title:hover,.banner-panel .banner-home-title:focus-visible,.banner-panel .banner-home-title:active{color:inherit!important;text-decoration:none!important;text-shadow:inherit;background:transparent!important;filter:none!important;}
.content-layout .topbar .top-logo,.content-layout .topbar .top-logo:hover,.content-layout .topbar .top-logo:focus-visible,.content-layout .topbar .top-logo:active{color:inherit!important;text-decoration:none!important;background:transparent!important;}

/* v1.9: R2-backed article images, contained within article cards and prose. */
.news-card .article-thumb{width:100%;aspect-ratio:16/9;object-fit:cover;border-radius:10px;margin-bottom:12px;display:block}
.article-media{margin:1.25rem 0 1.7rem;max-width:100%}
.article-media img{display:block;max-width:100%;width:auto;height:auto;max-height:740px;margin-inline:auto;border-radius:10px}
.article-media figcaption{font-size:.84rem;line-height:1.55;margin-top:.45rem;text-align:center;color:var(--muted,#a9a9b2)}
.article-admin-preview{display:block;width:min(440px,100%);height:auto;border-radius:10px;margin:14px 0}
.article-admin-entry{display:flex;gap:15px;align-items:flex-start;padding:12px 0;border-bottom:1px solid rgba(150,150,150,.2)}
.article-admin-entry img{width:150px;max-width:34%;height:100px;object-fit:cover;border-radius:8px}
.article-admin-entry>div{flex:1;min-width:0}
@media(max-width:550px){.article-admin-entry img{width:95px;height:72px}}

/* v1.11: responsive article media sizing. Do not enlarge small source images.
   Limit portrait/square images by height, preserve natural aspect ratios,
   and keep article visuals within the content column on any viewport. */
article > .article-media {max-width:800px;}
article > .article-media img {
  width:auto;height:auto;max-width:min(100%,760px);max-height:420px;
  object-fit:contain;margin-inline:auto;
}
article > .prose .article-media {max-width:100%;}
article > .prose .article-media img {
  width:auto;height:auto;max-width:min(100%,700px);max-height:480px;
  object-fit:contain;margin-inline:auto;
}
@media(max-width:600px){
  article > .article-media img {max-width:100%;max-height:300px;}
  article > .prose .article-media img {max-width:100%;max-height:350px;}
}
