/* KAGE NO — original anime catalogue interface */
:root {
  --bg: #080909;
  --bg-deep: #050606;
  --surface: #0d0f0f;
  --surface-2: #111414;
  --surface-3: #171919;
  --paper: #e9e4dc;
  --ink: #f3f0ea;
  --muted: #8e9391;
  --line: rgba(255,255,255,.09);
  --line-strong: rgba(255,255,255,.16);
  --red: #ed242d;
  --red-deep: #9d0d14;
  --gold: #f0ad42;
  --sidebar: 248px;
  --rightbar: 330px;
  --topbar: 74px;
  --radius: 4px;
  --display: "Bebas Neue", Impact, sans-serif;
  --brush: "Permanent Marker", cursive;
  --sans: "Inter", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scrollbar-color: #3b3d3c #080909; }
body { margin: 0; min-width: 320px; color: var(--ink); background: var(--bg); font-family: var(--sans); font-size: 14px; overflow-x: hidden; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.grain { position: fixed; inset: 0; z-index: 100; pointer-events: none; opacity: .055; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.88' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.62'/%3E%3C/svg%3E"); mix-blend-mode: soft-light; }
.cursor-glow { position: fixed; width: 420px; height: 420px; border-radius: 50%; pointer-events: none; z-index: 0; opacity: .13; transform: translate(-50%,-50%); background: radial-gradient(circle, rgba(237,36,45,.28), transparent 67%); transition: opacity .3s; }
.petals { position: fixed; inset: 0; z-index: 90; pointer-events: none; overflow: hidden; }
.petal { position: absolute; top: -25px; width: 8px; height: 13px; border-radius: 80% 0 80% 0; background: #a91a23; opacity: .32; animation: petalFall linear forwards; }
@keyframes petalFall { to { transform: translate3d(var(--drift), 110vh, 0) rotate(720deg); opacity: 0; } }

.sidebar { position: fixed; z-index: 50; inset: 0 auto 0 0; width: var(--sidebar); display: flex; flex-direction: column; border-right: 1px solid var(--line); background: linear-gradient(180deg, #0b0c0c 0%, #060707 62%, #050505 100%); overflow-x: hidden; overflow-y: auto; }
.sidebar::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .14; background: repeating-linear-gradient(167deg, transparent 0 48px, rgba(255,255,255,.08) 49px, transparent 50px 97px); }
.side-top { height: var(--topbar); flex: 0 0 var(--topbar); display: flex; align-items: center; justify-content: center; border-bottom: 1px solid var(--line); position: relative; z-index: 3; }
.brand { display: flex; align-items: baseline; justify-content: center; position: relative; height: 57px; transform: rotate(-2deg); }
.brand-kage, .brand-no { font-family: var(--brush); font-size: 34px; line-height: 1; letter-spacing: -3px; text-shadow: 0 3px 20px rgba(0,0,0,.6); }
.brand-no { color: var(--red); margin-left: 3px; }
.brand small { position: absolute; left: 8px; right: 0; top: 42px; display: flex; gap: 7px; align-items: center; justify-content: center; font: 600 7px var(--sans); letter-spacing: 2.5px; color: #c9c5bf; white-space: nowrap; }
.brand small i { width: 24px; height: 1px; background: #c9c5bf; }
.mobile-close { display: none; position: absolute; right: 14px; top: 15px; width: 42px; height: 42px; border: 0; background: transparent; font-size: 30px; cursor: pointer; }

.side-nav { flex: 0 0 auto; position: relative; z-index: 3; padding: 20px 10px; display: grid; gap: 3px; }
.side-nav a { min-width: 0; min-height: 51px; display: grid; grid-template-columns: 36px minmax(0,1fr) auto; grid-template-rows: 1fr 1fr; align-items: end; padding: 7px 12px; color: #a7aaa8; border-left: 2px solid transparent; position: relative; transition: .22s ease; }
.side-nav a::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(237,36,45,.18), transparent); transform: scaleX(0); transform-origin: left; transition: transform .25s ease; }
.side-nav a:hover, .side-nav a.active { color: #fff; border-left-color: var(--red); }
.side-nav a:hover::after, .side-nav a.active::after { transform: scaleX(1); }
.side-nav .nav-glyph { grid-row: 1/3; width: 26px; height: 26px; border: 1px solid #555a57; display: grid; place-items: center; transform: rotate(45deg); font: 500 11px serif; }
.side-nav .nav-glyph::first-letter { transform: rotate(-45deg); }
.side-nav a.active .nav-glyph { color: var(--red); border-color: var(--red); }
.side-nav b { min-width: 0; align-self: end; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; text-transform: uppercase; letter-spacing: .7px; }
.side-nav small { min-width: 0; grid-column: 2/4; align-self: start; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 9px; color: #5f6461; letter-spacing: 1px; }

.sidebar-illustration { position: absolute; z-index: 1; left: -68px; right: -40px; bottom: 56px; height: 380px; opacity: .36; filter: grayscale(1) contrast(1.2); mask-image: linear-gradient(transparent, #000 22%, #000 72%, transparent); }
.sidebar-illustration img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; }
.vertical-copy { position: absolute; top: 60px; right: 65px; color: rgba(255,255,255,.42); font-family: serif; writing-mode: vertical-rl; letter-spacing: 6px; }
.clan-card { position: relative; z-index: 4; flex: 0 0 auto; margin: auto 18px 18px; text-align: center; padding: 19px 14px 14px; border: 1px solid var(--line); background: rgba(7,8,8,.88); backdrop-filter: blur(10px); }
.clan-mark { position: absolute; width: 34px; height: 34px; display: grid; place-items: center; left: calc(50% - 17px); top: -17px; border: 1px solid var(--red); border-radius: 50%; background: #080909; color: var(--red); font-family: serif; }
.clan-card p { margin: 3px 0 8px; text-transform: uppercase; letter-spacing: .7px; font-size: 12px; }
.clan-card p strong { color: var(--red); }
.clan-card small { display: block; color: #858987; line-height: 1.55; font-size: 10px; }
.clan-card .primary-btn { width: 100%; margin-top: 13px; min-height: 37px; font-size: 10px; }

.app { margin-left: var(--sidebar); min-height: 100vh; position: relative; z-index: 1; }
.topbar { position: sticky; z-index: 45; top: 0; height: var(--topbar); display: flex; align-items: center; gap: 20px; padding: 0 24px; border-bottom: 1px solid var(--line); background: rgba(7,8,8,.91); backdrop-filter: blur(18px); }
.top-nav { height: 100%; display: flex; align-items: stretch; gap: 26px; }
.top-nav a { display: flex; align-items: center; position: relative; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .7px; color: #b7bab8; transition: color .2s; }
.top-nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--red); transform: scaleX(0); transition: transform .2s; }
.top-nav a:hover, .top-nav a.active { color: #fff; }
.top-nav a.active::after { transform: scaleX(1); }
.menu-button, .mobile-brand { display: none; }

.search { margin-left: auto; width: min(340px, 28vw); position: relative; }
.search input { width: 100%; height: 38px; padding: 0 78px 0 16px; color: #eee; border: 1px solid var(--line-strong); border-radius: 2px; background: #0c0e0e; outline: 0; font-size: 11px; transition: .2s; }
.search input:focus { border-color: rgba(237,36,45,.7); box-shadow: 0 0 0 3px rgba(237,36,45,.08); }
.search input::placeholder { color: #6f7471; }
.search kbd { position: absolute; right: 38px; top: 10px; color: #575b59; font: 9px var(--sans); border: 1px solid #333735; border-radius: 3px; padding: 2px 4px; }
.search > button { position: absolute; right: 5px; top: 5px; width: 29px; height: 29px; border: 0; background: transparent; cursor: pointer; }
.search svg, .round-button svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.search-results { display: none; position: absolute; top: calc(100% + 9px); left: 0; right: 0; max-height: 380px; overflow: auto; padding: 7px; border: 1px solid var(--line-strong); background: #0c0e0e; box-shadow: 0 18px 60px #000; }
.search-results.open { display: block; }
.search-result { width: 100%; display: grid; grid-template-columns: 44px 1fr auto; gap: 10px; align-items: center; text-align: left; border: 0; padding: 7px; background: transparent; cursor: pointer; }
.search-result:hover { background: #181b1a; }
.search-result img { width: 44px; height: 54px; object-fit: cover; }
.search-result b { font-size: 11px; }
.search-result small { display: block; margin-top: 4px; color: #737875; font-size: 9px; }
.search-result > span:last-child { color: var(--gold); font-size: 10px; }
.search-empty { padding: 26px 15px; color: #777; text-align: center; font-size: 11px; }

.round-button { width: 38px; height: 38px; flex: 0 0 38px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: #0c0e0e; cursor: pointer; position: relative; }
.notification i { position: absolute; top: 5px; right: 4px; width: 7px; height: 7px; border: 2px solid #080909; border-radius: 50%; background: var(--red); }
.profile { min-width: 0; max-width: 190px; height: 48px; display: flex; align-items: center; gap: 9px; padding: 0; border: 0; background: transparent; text-align: left; cursor: pointer; }
.profile img { width: 38px; height: 38px; object-fit: cover; object-position: top; border: 1px solid #767b78; border-radius: 50%; }
.profile span { min-width: 0; max-width: 110px; display: grid; gap: 3px; }
.profile strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; letter-spacing: .6px; }
.profile small { overflow: hidden; color: #767b78; text-overflow: ellipsis; white-space: nowrap; font-size: 8px; }
.profile > b { color: #5b605d; }

.layout { display: grid; grid-template-columns: minmax(0,1fr) var(--rightbar); }
.main-content { min-width: 0; }
.rightbar { min-width: 0; position: relative; padding: 10px; border-left: 1px solid var(--line); background: #090a0a; isolation: isolate; }
.rightbar::after { content: ""; position: absolute; z-index: -1; left: 0; right: 0; bottom: 40px; height: 520px; opacity: .16; background: linear-gradient(0deg,#090a0a 0,transparent 32%), url("assets/webp/anime-10.webp") center bottom/cover no-repeat; filter: grayscale(1) contrast(1.12); mask-image: linear-gradient(0deg,#000 0 58%,transparent 100%); pointer-events: none; }

.hero { height: clamp(500px,64svh,620px); min-height: 0; position: relative; overflow: hidden; border-bottom: 1px solid var(--line); isolation: isolate; background: #151414; }
.hero-media { position: absolute; inset: 0; z-index: -4; background-position: center; background-size: cover; transition: opacity .45s ease, transform 6s ease; }
.hero-media.switching { opacity: .25; transform: scale(1.025); }
.hero-wash { position: absolute; inset: 0; z-index: -3; background: linear-gradient(90deg,#ebe6df 0%,rgba(235,230,223,.97) 29%,rgba(235,230,223,.76) 43%,rgba(12,13,13,.22) 66%,rgba(4,5,5,.74) 100%), linear-gradient(0deg,rgba(3,4,4,.58),transparent 48%); }
.hero::after { content: ""; position: absolute; z-index: -2; left: 0; top: 0; bottom: 0; width: 52%; opacity: .15; background-image: repeating-linear-gradient(0deg, transparent 0 22px, #111 23px), repeating-linear-gradient(90deg, transparent 0 22px, #111 23px); mask-image: linear-gradient(90deg,#000,transparent); }
.hero-copy { width: 48%; max-width: 530px; min-width: 380px; height: 100%; position: relative; z-index: 3; overflow: hidden; padding: 48px 30px 68px 55px; color: #111; }
.hero-kicker { display: flex; align-items: center; gap: 8px; color: var(--red-deep); font-size: 10px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase; }
.hero-kicker > span { width: 24px; height: 2px; background: var(--red); }
.hero-kicker b { color: #777; font-weight: 600; }
.hero h1 { display: -webkit-box; margin: 12px 0 14px; overflow: hidden; font: 400 clamp(43px,3.6vw,64px)/.92 var(--display); letter-spacing: -.7px; overflow-wrap: anywhere; text-transform: uppercase; transform: skew(-2deg); text-wrap: balance; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.hero[data-title-density="medium"] h1 { font-size: clamp(39px,3.2vw,56px); line-height: .9; }
.hero[data-title-density="long"] h1 { font-size: clamp(33px,2.65vw,47px); line-height: .98; }
.hero[data-title-density="xlong"] h1 { font-size: clamp(29px,2.25vw,40px); line-height: 1.04; }
.hero h1 em { color: var(--red); font-family: var(--brush); font-size: .78em; font-style: normal; text-shadow: 2px 2px 0 rgba(90,0,0,.15); }
.hero-copy > p { width: 92%; max-width: 470px; display: -webkit-box; margin: 0; overflow: hidden; color: #343332; font-size: 11px; line-height: 1.6; -webkit-box-orient: vertical; -webkit-line-clamp: 5; }
.hero-meta { display: flex; gap: 8px; margin-top: 16px; }
.hero-meta span { border-right: 1px solid rgba(0,0,0,.2); padding-right: 8px; color: #333; font-size: 9px; font-weight: 700; }
.hero-meta span:first-child { color: #a20e15; }
.hero-actions { display: flex; gap: 10px; margin-top: 19px; }
.primary-btn, .ghost-btn { min-height: 43px; padding: 0 20px; border: 1px solid transparent; border-radius: 2px; font-size: 10px; font-weight: 800; letter-spacing: .55px; text-transform: uppercase; cursor: pointer; transition: .22s ease; }
.primary-btn { background: linear-gradient(135deg, #ee252e, #b90e16); box-shadow: 0 8px 24px rgba(190,15,24,.24); }
.primary-btn:hover { transform: translateY(-2px); filter: brightness(1.12); box-shadow: 0 10px 30px rgba(190,15,24,.4); }
.ghost-btn { border-color: rgba(255,255,255,.18); background: #0b0c0c; }
.hero .ghost-btn { color: #fff; }
.ghost-btn:hover { border-color: var(--red); background: #171818; }
.hero-seal { position: absolute; right: 31px; top: 35px; width: 57px; height: 57px; display: grid; place-items: center; border: 2px solid rgba(137,9,16,.75); border-radius: 50%; color: #a10f16; transform: rotate(9deg); background: rgba(238,232,223,.62); }
.hero-seal::before { content: ""; position: absolute; inset: 4px; border: 1px solid currentColor; border-radius: inherit; }
.hero-seal span { font: 700 24px serif; line-height: 1; }
.hero-seal small { position: absolute; bottom: -15px; width: 80px; text-align: center; font-size: 7px; letter-spacing: 2px; }
.hero-kanji { position: absolute; top: 60px; right: 102px; padding: 10px 7px; border: 1px solid rgba(0,0,0,.22); color: #191919; background: rgba(239,234,226,.8); font: 600 13px/1.65 serif; writing-mode: vertical-rl; letter-spacing: 2px; }
.hero-brush { position: absolute; z-index: -1; left: 31%; top: 40px; color: rgba(137,9,16,.09); font: 300px/1 serif; transform: rotate(-12deg); }
.hero-poster-shell { width: clamp(178px,16vw,224px); position: absolute; z-index: 2; right: clamp(72px,9vw,130px); top: 34px; bottom: 38px; margin: 0; transform: rotate(1.2deg); }
.hero-poster-shell::before { content: ""; position: absolute; z-index: -2; inset: -16px -22px; border: 1px solid rgba(255,255,255,.12); background: rgba(5,6,6,.24); box-shadow: 0 24px 65px rgba(0,0,0,.52); backdrop-filter: blur(5px); }
.hero-poster-shadow { position: absolute; z-index: -1; inset: 12px -18px -13px 17px; border: 1px solid rgba(237,36,45,.42); background: #870b11; transform: rotate(-3.2deg); }
.hero-poster-shell > img { width: 100%; height: calc(100% - 40px); display: block; border: 1px solid rgba(255,255,255,.38); background: #111; object-fit: cover; object-position: center top; box-shadow: 0 16px 45px rgba(0,0,0,.45); }
.hero-poster-shell figcaption { height: 40px; display: grid; align-content: center; gap: 3px; padding: 0 4px; color: white; text-align: right; }
.hero-poster-shell figcaption span { color: var(--red); font-size: 6px; font-weight: 800; letter-spacing: 2px; }
.hero-poster-shell figcaption b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 8px; }
.hero-controls { position: absolute; left: 55px; bottom: 18px; display: flex; align-items: center; gap: 9px; }
.hero-arrow { width: 28px; height: 24px; border: 0; color: #312f2c; background: transparent; cursor: pointer; }
.hero-dots { display: flex; gap: 5px; }
.hero-dots button { width: 16px; height: 3px; padding: 0; border: 0; background: rgba(20,20,20,.32); cursor: pointer; transition: .2s; }
.hero-dots button.active { width: 30px; background: var(--red); }

.content-section { padding: 14px 14px 8px; }
.section-heading { min-height: 37px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); }
.section-heading > div { min-width: 0; display: flex; align-items: baseline; gap: 8px; }
.section-heading h2 { min-width: 0; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; text-transform: uppercase; letter-spacing: .45px; }
.section-heading small { min-width: 0; overflow: hidden; color: #555a57; text-overflow: ellipsis; white-space: nowrap; font: 8px serif; letter-spacing: 1px; }
.section-icon { color: var(--red); font: 16px serif; }
.text-button { max-width: 45%; flex: 0 1 auto; overflow: hidden; border: 0; padding: 8px 0; color: #8d9290; background: transparent; text-overflow: ellipsis; white-space: nowrap; font-size: 8px; cursor: pointer; }
.text-button:hover { color: var(--red); }
.text-button span { margin-left: 4px; }
.section-heading.compact { min-height: 43px; }
.section-heading.compact > div { display: grid; gap: 3px; }

.poster-scroller-wrap { position: relative; }
.poster-row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(145px, 1fr); gap: 8px; padding: 10px 0 2px; overflow-x: auto; scroll-behavior: smooth; scrollbar-width: none; }
.poster-row::-webkit-scrollbar { display: none; }
.poster-card { height: 238px; position: relative; overflow: hidden; border: 1px solid var(--line); background: #151717; cursor: pointer; isolation: isolate; }
.poster-card::after { content: ""; position: absolute; inset: 43% 0 0; background: linear-gradient(transparent, rgba(5,6,6,.93) 53%, #060707 88%); z-index: 0; }
.poster-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease, filter .3s; }
.poster-card:hover img { transform: scale(1.055); filter: saturate(1.12); }
.poster-card .card-copy { min-width: 0; position: absolute; z-index: 1; left: 10px; right: 10px; bottom: 8px; }
.poster-card h3 { min-height: 2.34em; display: -webkit-box; margin: 0 0 6px; overflow: hidden; font: 800 12px/1.17 var(--sans); letter-spacing: -.1px; text-shadow: 0 2px 10px #000; overflow-wrap: anywhere; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.poster-card .card-bottom { display: flex; align-items: center; justify-content: space-between; color: #b4b7b5; font-size: 8px; }
.poster-card .card-bottom > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.poster-card .card-bottom .rating { flex: 0 0 auto; margin-left: 6px; }
.rating { color: var(--gold); font-weight: 700; }
.poster-card .episode-badge { position: absolute; top: 8px; left: 8px; z-index: 2; padding: 4px 6px; color: #fff; background: rgba(5,6,6,.72); backdrop-filter: blur(6px); font-size: 7px; letter-spacing: .4px; }
.favorite-button { position: absolute; z-index: 3; top: 7px; right: 7px; width: 29px; height: 29px; border: 1px solid rgba(255,255,255,.2); border-radius: 50%; color: #fff; background: rgba(5,6,6,.63); cursor: pointer; opacity: 0; transform: translateY(-4px); transition: .2s; }
.poster-card:hover .favorite-button, .favorite-button.saved { opacity: 1; transform: none; }
.favorite-button.saved { color: var(--red); border-color: var(--red); }
.scroll-arrow { position: absolute; z-index: 4; top: calc(50% - 17px); width: 31px; height: 40px; border: 1px solid var(--line-strong); background: rgba(5,6,6,.82); cursor: pointer; }
.scroll-arrow:hover { color: var(--red); }
.scroll-arrow.left { left: -7px; }
.scroll-arrow.right { right: -7px; }

.dashboard-grid { display: grid; grid-template-columns: minmax(245px,.78fr) minmax(350px,1.1fr); gap: 8px; padding: 0 14px 8px; }
.panel { border: 1px solid var(--line); background: linear-gradient(150deg, rgba(18,20,20,.92), rgba(10,11,11,.96)); }
.panel > .section-heading { margin: 0 13px; }
.recommended-panel { grid-column: 1/3; }
.episode-list { min-width: 0; padding: 7px; display: grid; gap: 4px; }
.episode-item { width: 100%; min-width: 0; display: grid; grid-template-columns: 65px minmax(0,1fr) max-content; gap: 9px; align-items: center; padding: 4px; border: 0; background: transparent; text-align: left; cursor: pointer; transition: background .2s; }
.episode-item > span:nth-child(2) { min-width: 0; overflow: hidden; }
.episode-item:hover { background: rgba(255,255,255,.045); }
.episode-thumb { height: 45px; position: relative; overflow: hidden; }
.episode-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }
.episode-thumb i { position: absolute; inset: 0; display: grid; place-items: center; font-style: normal; background: rgba(0,0,0,.22); opacity: 0; transition: .2s; }
.episode-item:hover .episode-thumb i { opacity: 1; }
.episode-item b { display: -webkit-box; overflow: hidden; font-size: 10px; line-height: 1.25; overflow-wrap: anywhere; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.episode-item small { max-width: 100%; display: block; margin-top: 4px; overflow: hidden; color: #6e7370; text-overflow: ellipsis; white-space: nowrap; font-size: 8px; }
.new-badge { flex: 0 0 auto; padding: 3px 5px; color: white; background: var(--red-deep); white-space: nowrap; font-size: 7px; font-weight: 700; }

.manga-grid { display: grid; grid-template-columns: repeat(5,minmax(58px,1fr)); gap: 5px; padding: 10px; }
.manga-card { min-width: 0; border: 0; padding: 0; background: #0b0d0d; text-align: left; cursor: pointer; }
.manga-card .image { height: 123px; overflow: hidden; position: relative; }
.manga-card img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.76); transition: .35s; }
.manga-card:hover img { transform: scale(1.05); filter: saturate(1); }
.manga-card .image::after { content: "読む"; position: absolute; inset: auto 4px 4px auto; padding: 2px 4px; color: #111; background: var(--paper); font: 7px serif; opacity: 0; transition: .2s; }
.manga-card:hover .image::after { opacity: 1; }
.manga-card b { display: block; padding: 7px 5px 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 8px; }
.manga-card small { display: block; padding: 0 5px 7px; color: var(--red); font-size: 7px; }
.recommendation-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; padding: 10px; }
.recommendation { min-width: 0; height: 152px; position: relative; display: grid; grid-template-columns: 88px minmax(0,1fr); align-items: stretch; gap: 11px; overflow: hidden; border: 1px solid rgba(255,255,255,.07); padding: 10px; color: white; background: #0a0b0b; text-align: left; cursor: pointer; isolation: isolate; }
.recommendation::after { content: ""; position: absolute; z-index: -1; inset: 0; background: linear-gradient(90deg,rgba(5,6,6,.24),#080909 72%); }
.recommendation-art { position: absolute; z-index: -2; inset: 0; opacity: .25; filter: grayscale(.55) saturate(.8); }
.recommendation-art img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.recommendation-poster { min-width: 0; position: relative; z-index: 1; overflow: hidden; border: 1px solid rgba(255,255,255,.18); box-shadow: 0 10px 30px rgba(0,0,0,.35); }
.recommendation-poster img { width: 100%; height: 100%; display: block; object-fit: cover; object-position: center top; transition: transform .4s; }
.recommendation:hover .recommendation-art img { transform: scale(1.05); }
.recommendation:hover .recommendation-poster img { transform: scale(1.035); }
.recommendation-copy { min-width: 0; position: relative; z-index: 1; display: flex; flex-direction: column; justify-content: center; }
.recommendation-copy b { display: -webkit-box; overflow: hidden; font-size: 11px; line-height: 1.25; overflow-wrap: anywhere; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.recommendation-copy small { display: block; margin-top: 7px; overflow: hidden; color: var(--gold); text-overflow: ellipsis; white-space: nowrap; font-size: 7px; }
.recommendation-copy i { margin-top: 14px; color: #8b908d; font-size: 7px; font-style: normal; letter-spacing: .35px; text-transform: uppercase; }

.genre-strip { margin: 0 14px 15px; min-height: 76px; display: flex; align-items: center; border: 1px solid var(--line); background: #0d0f0f; overflow: hidden; }
.genre-title { width: 170px; flex: 0 0 170px; align-self: stretch; display: flex; align-items: center; gap: 9px; padding: 10px 14px; background: linear-gradient(90deg, rgba(237,36,45,.13), transparent); }
.genre-title > span { font: 25px serif; color: var(--red); }
.genre-title b { display: block; font-size: 9px; text-transform: uppercase; }
.genre-title small { display: block; margin-top: 4px; color: #5f6461; font-size: 7px; }
.genres { flex: 1; display: flex; overflow-x: auto; scrollbar-width: none; }
.genres::-webkit-scrollbar { display: none; }
.genres button { min-width: 88px; min-height: 74px; display: grid; place-items: center; align-content: center; gap: 7px; border: 0; border-left: 1px solid var(--line); color: #9ea2a0; background: transparent; font-size: 7px; text-transform: uppercase; cursor: pointer; transition: .2s; }
.genres button span { color: #e4e0da; font: 19px serif; }
.genres button:hover, .genres button.active { color: white; background: rgba(237,36,45,.1); }
.genres button:hover span, .genres button.active span { color: var(--red); }

.rightbar .panel { margin-bottom: 9px; }
.continue-list { padding: 4px 11px 9px; }
.continue-item { width: 100%; min-width: 0; display: grid; grid-template-columns: 105px minmax(0,1fr); gap: 10px; padding: 8px 0; border: 0; border-bottom: 1px solid var(--line); background: transparent; text-align: left; cursor: pointer; }
.continue-item:last-child { border-bottom: 0; }
.continue-image { height: 58px; overflow: hidden; position: relative; }
.continue-image img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }
.play { position: absolute; left: 8px; bottom: 7px; width: 24px; height: 24px; display: grid; place-items: center; border: 1px solid white; border-radius: 50%; background: rgba(0,0,0,.5); font-size: 8px; }
.continue-data { min-width: 0; padding-top: 3px; }
.continue-data b { display: -webkit-box; overflow: hidden; font-size: 9px; line-height: 1.25; overflow-wrap: anywhere; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.continue-data small { display: block; margin: 6px 0; color: #6b706d; font-size: 7px; }
.progress { display: block; width: 100%; height: 2px; line-height: 0; background: #292c2b; overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--red); }
.progress-copy { display: block; margin-top: 4px; color: #626764; text-align: right; font-size: 7px; }
.live { color: #6e7370; font-size: 7px; text-transform: uppercase; }
.live i { display: inline-block; width: 5px; height: 5px; margin-right: 3px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 3px rgba(237,36,45,.12); animation: livePulse 1.5s infinite; }
@keyframes livePulse { 50% { opacity: .35; } }
.ranking-panel ol { list-style: none; padding: 6px 11px 11px; margin: 0; counter-reset: ranking; }
.ranking-item { min-width: 0; min-height: 51px; display: grid; grid-template-columns: 20px 42px minmax(0,1fr) max-content; gap: 8px; align-items: center; border-bottom: 1px solid var(--line); counter-increment: ranking; cursor: pointer; }
.ranking-item::before { content: counter(ranking, decimal-leading-zero); color: #d8d8d4; font: 18px var(--display); }
.ranking-item:nth-child(1)::before { color: var(--red); }
.ranking-item img { width: 42px; height: 35px; object-fit: cover; object-position: 50% 20%; }
.ranking-item b { display: -webkit-box; overflow: hidden; font-size: 8px; line-height: 1.25; overflow-wrap: anywhere; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.ranking-item span { color: var(--gold); font-size: 8px; }

.quote-card { height: 180px; position: relative; overflow: hidden; border: 1px solid var(--line); background: var(--paper); color: #111; }
.quote-card::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(#111 1px,transparent 1px); background-size: 5px 5px; opacity: .035; }
.quote-card img { position: absolute; z-index: 1; right: -13px; bottom: -42px; width: 57%; height: 235px; object-fit: cover; object-position: top; filter: grayscale(1) contrast(1.1); mix-blend-mode: multiply; mask-image: linear-gradient(90deg,transparent 0,#000 32%); }
.quote-copy { position: relative; z-index: 2; width: 59%; padding: 17px 0 0 17px; }
.quote-copy > span { color: var(--red-deep); font: 10px serif; letter-spacing: 3px; }
.quote-copy p { margin: 14px 0 10px; font: 600 13px/1.5 serif; }
.quote-copy small { color: #69635d; font-size: 7px; }
.red-moon { position: absolute; z-index: 0; right: 18px; top: 13px; width: 75px; height: 75px; border-radius: 50%; background: rgba(184,16,24,.34); }
.calendar-card { margin-top: 9px; padding: 13px; border: 1px solid var(--line); background: #0d0f0f; }
.calendar-head { display: flex; justify-content: space-between; align-items: center; }
.calendar-head > div { display: flex; gap: 8px; align-items: center; }
.calendar-head b { color: var(--red); font: 38px/1 var(--display); }
.calendar-head span { font-size: 8px; font-weight: 700; line-height: 1.2; }
.calendar-head small { color: #666; font: 7px serif; }
.calendar-head button, .calendar-head .calendar-open { width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid var(--line); background: transparent; color: inherit; cursor: pointer; }
.calendar-head .calendar-open:hover { border-color: var(--red); color: var(--red); }
.calendar-card .timeline:hover b { color: var(--red); }
.calendar-card > .text-button { display: inline-block; padding: 10px 0 0; }
.calendar-card > p { margin: 10px 0; color: #6f7471; font-size: 8px; }
.calendar-card > p strong { color: #c6c8c7; }
.timeline { min-width: 0; min-height: 31px; display: grid; grid-template-columns: 7px 42px minmax(0,1fr); gap: 7px; align-items: center; border-top: 1px solid var(--line); font-size: 7px; }
.timeline i { width: 5px; height: 5px; border-radius: 50%; background: var(--red); }
.timeline span { color: #666; }
.timeline b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.anime-modal { width: min(820px, calc(100vw - 30px)); max-height: min(580px, calc(100vh - 30px)); padding: 0; border: 1px solid rgba(255,255,255,.17); border-radius: 3px; color: var(--ink); background: #0b0d0d; box-shadow: 0 30px 100px #000; overflow: hidden; }
.anime-modal[open] { display: grid; grid-template-columns: 43% 57%; animation: modalIn .28s ease; }
.anime-modal::backdrop { background: rgba(0,0,0,.82); backdrop-filter: blur(10px); }
@keyframes modalIn { from { opacity: 0; transform: scale(.96) translateY(10px); } }
.modal-close { position: absolute; z-index: 5; right: 12px; top: 12px; width: 36px; height: 36px; border: 1px solid var(--line-strong); border-radius: 50%; background: rgba(7,8,8,.7); cursor: pointer; }
.modal-image { min-height: 500px; position: relative; overflow: hidden; }
.modal-image img { width: 100%; height: 100%; object-fit: cover; }
.modal-image-shade { position: absolute; inset: 0; background: linear-gradient(0deg,#0b0d0d,transparent 45%); }
.modal-image > span { position: absolute; left: 19px; bottom: 17px; color: rgba(255,255,255,.76); font: 12px serif; letter-spacing: 4px; writing-mode: vertical-rl; }
.modal-content { align-self: center; padding: 44px 42px; }
.modal-kicker { color: var(--red); font-size: 9px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; }
.modal-content h2 { max-height: 3.9em; margin: 11px 0; overflow: auto; font: clamp(30px,3vw,46px)/.98 var(--display); letter-spacing: .2px; overflow-wrap: anywhere; }
.modal-stats { display: flex; flex-wrap: wrap; gap: 8px; }
.modal-stats span { padding-right: 8px; border-right: 1px solid var(--line-strong); color: #929795; font-size: 8px; }
.modal-stats span:first-child { color: var(--gold); }
.modal-content > p { max-height: 12.25em; margin: 20px 0; overflow: auto; padding-right: 6px; color: #a2a6a4; font-size: 11px; line-height: 1.75; }
.modal-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.modal-tags span { padding: 5px 8px; border: 1px solid var(--line); color: #858a87; font-size: 7px; }
.modal-actions { display: flex; gap: 8px; margin-top: 25px; }
.modal-actions a.primary-btn { display: inline-flex; align-items: center; justify-content: center; color: #fff; text-decoration: none; }

.hidden { display: none !important; }
.auth-modal { width: min(470px, calc(100vw - 28px)); padding: 34px; border: 1px solid var(--line-strong); color: var(--ink); background: radial-gradient(circle at 90% 5%, rgba(237,36,45,.13), transparent 35%), #0b0d0d; box-shadow: 0 30px 100px #000; }
.auth-modal[open] { animation: modalIn .28s ease; }
.auth-modal::backdrop { background: rgba(0,0,0,.82); backdrop-filter: blur(10px); }
.auth-mark { width: 50px; height: 50px; display: grid; place-items: center; margin-bottom: 16px; border: 1px solid var(--red); border-radius: 50%; color: var(--red); font: 25px serif; }
.auth-copy small { color: var(--red); font-size: 8px; font-weight: 800; letter-spacing: 2px; }
.auth-copy h2 { margin: 7px 0 8px; font: 44px/.95 var(--display); text-transform: uppercase; }
.auth-copy p { margin: 0 0 20px; color: var(--muted); font-size: 10px; line-height: 1.6; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; margin-bottom: 17px; border-bottom: 1px solid var(--line); }
.auth-tabs button { padding: 10px; border: 0; border-bottom: 2px solid transparent; color: var(--muted); background: transparent; cursor: pointer; font-size: 9px; font-weight: 800; text-transform: uppercase; }
.auth-tabs button.active { color: white; border-bottom-color: var(--red); }
.auth-form { display: grid; gap: 13px; }
.auth-form label { display: grid; gap: 6px; color: #a6aaa8; font-size: 8px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; }
.auth-form input { width: 100%; height: 42px; padding: 0 12px; border: 1px solid var(--line-strong); color: white; background: #080a0a; outline: 0; }
.auth-form input:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(237,36,45,.08); }
.auth-form .primary-btn { margin-top: 5px; }
.auth-session { display: grid; gap: 9px; padding: 19px; border: 1px solid var(--line); background: rgba(255,255,255,.025); }
.auth-session span { color: var(--muted); font-size: 8px; text-transform: uppercase; }
.auth-session strong { font: 32px var(--display); }
.auth-message { min-height: 16px; margin: 13px 0 0; color: #d8d9d6; font-size: 9px; }
.auth-message.error { color: #ff646b; }

.toast { position: fixed; z-index: 120; right: 22px; bottom: 22px; min-width: 260px; display: grid; grid-template-columns: 34px 1fr; align-items: center; gap: 10px; padding: 11px; border: 1px solid var(--line-strong); color: #e4e4df; background: #101212; box-shadow: 0 16px 50px #000; transform: translateY(120px); opacity: 0; transition: .35s ease; }
.toast.show { transform: none; opacity: 1; }
.toast span { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--red); border-radius: 50%; color: var(--red); font-family: serif; }
.toast p { margin: 0; font-size: 10px; }
.sidebar-scrim { display: none; }

@media (max-width: 1450px) {
  :root { --sidebar: 220px; --rightbar: 304px; }
  .top-nav { gap: 18px; }
  .hero-copy { padding-left: 38px; }
  .hero-controls { left: 38px; }
  .poster-row { grid-auto-columns: minmax(138px,1fr); }
  .recommendation-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 1200px) {
  :root { --sidebar: 210px; }
  .rightbar { display: none; }
  .layout { grid-template-columns: 1fr; }
  .profile span, .profile > b { display: none; }
  .top-nav { gap: 17px; }
  .hero { height: clamp(460px,64svh,560px); min-height: 0; }
}

@media (max-width: 960px) {
  .sidebar { transform: translateX(-105%); width: min(310px,88vw); transition: transform .3s ease; box-shadow: 20px 0 80px #000; }
  .sidebar.open { transform: none; }
  .mobile-close { display: block; }
  .sidebar-scrim { display: block; position: fixed; z-index: 49; inset: 0; background: rgba(0,0,0,.72); opacity: 0; visibility: hidden; transition: .3s; }
  .sidebar-scrim.open { opacity: 1; visibility: visible; }
  .app { margin-left: 0; }
  .menu-button { width: 42px; height: 42px; display: grid; align-content: center; gap: 5px; padding: 10px; border: 0; background: transparent; cursor: pointer; }
  .menu-button span { height: 1px; background: #d9d9d5; }
  .menu-button span:nth-child(2) { width: 70%; }
  .mobile-brand { display: block; font: 20px var(--brush); }
  .mobile-brand b { color: var(--red); }
  .top-nav { display: none; }
  .search { width: min(420px,55vw); }
  .dashboard-grid { grid-template-columns: 1fr 1.4fr; }
  .manga-grid { grid-template-columns: repeat(5,1fr); }
}

@media (max-width: 700px) {
  :root { --topbar: 62px; }
  .topbar { gap: 8px; padding: 0 10px; }
  .mobile-brand { font-size: 17px; }
  .search { flex: 1; width: auto; }
  .search input { padding-left: 12px; }
  .search kbd { display: none; }
  .profile { max-width: 44px; }
  .profile img { width: 34px; height: 34px; }
  .hero { height: 550px; min-height: 0; }
  .hero-media { background-position: 62% center; }
  .hero-wash { background: linear-gradient(0deg,#e7e2da 0%,rgba(231,226,218,.96) 48%,rgba(15,13,13,.12) 78%,rgba(3,4,4,.28)); }
  .hero-copy { position: absolute; left: 0; right: 0; bottom: 0; width: auto; min-width: 0; max-width: none; height: auto; padding: 30px 20px 55px; }
  .hero-copy > p { width: 100%; font-size: 10px; -webkit-line-clamp: 4; }
  .hero h1 { font-size: clamp(38px,11vw,52px); }
  .hero[data-title-density="long"] h1 { font-size: clamp(29px,8.3vw,39px); }
  .hero[data-title-density="xlong"] h1 { font-size: clamp(25px,7.1vw,34px); }
  .hero h1 em { display: block; max-width: 100%; font-size: clamp(32px, 10.2vw, 43px); line-height: 1; letter-spacing: -1.5px; overflow-wrap: anywhere; }
  .hero-poster-shell { display: none; }
  .hero-seal { top: 18px; right: 15px; }
  .hero-kanji, .hero-brush { display: none; }
  .hero-controls { left: 18px; bottom: 16px; }
  .hero-actions { width: 100%; gap: 8px; margin-top: 16px; }
  .hero-actions button { flex: 1 1 0; min-width: 0; padding-inline: 8px; font-size: 8px; white-space: nowrap; }
  .content-section { padding-inline: 10px; }
  .poster-row { grid-auto-columns: 44%; }
  .poster-card { height: 230px; }
  .favorite-button { opacity: 1; transform: none; }
  .dashboard-grid { grid-template-columns: 1fr; padding-inline: 10px; }
  .recommended-panel { grid-column: auto; }
  .manga-grid { grid-template-columns: repeat(4,1fr); }
  .manga-card:nth-child(5) { display: none; }
  .recommendation-grid { grid-template-columns: 1fr; }
  .genre-strip { margin-inline: 10px; display: block; }
  .genre-title { width: 100%; height: 54px; }
  .genres button { min-width: 92px; }
  .anime-modal[open] { display: block; overflow-y: auto; }
  .modal-image { min-height: 230px; height: 38vh; }
  .modal-image > span { writing-mode: horizontal-tb; }
  .modal-content { padding: 28px 22px; }
  .modal-content h2 { font-size: 37px; }
}

@media (max-width: 430px) {
  .round-button { display: none; }
  .search input { font-size: 10px; }
  .poster-row { grid-auto-columns: 59%; }
  .manga-grid { grid-template-columns: repeat(3,1fr); }
  .manga-card:nth-child(4) { display: none; }
  .recommendation-grid { grid-template-columns: 1fr; }
  .hero-meta span:nth-child(4) { display: none; }
  .toast { left: 12px; right: 12px; min-width: 0; }
}

/* ── Motion layer: cinematic, tactile, but always optional ─────────────── */
.scroll-progress { position: fixed; z-index: 140; left: 0; right: 0; top: 0; height: 2px; pointer-events: none; background: rgba(255,255,255,.025); }
.scroll-progress i { display: block; width: 0; height: 100%; background: linear-gradient(90deg, #8c080f, var(--red), #ff7b6e); box-shadow: 0 0 14px rgba(237,36,45,.8); transform-origin: left; }

.gate-intro { position: fixed; z-index: 200; inset: 0; display: grid; place-items: center; overflow: hidden; color: white; background: #050606; transition: visibility 0s 1.25s; }
.gate-panel { position: absolute; top: 0; bottom: 0; width: 51%; background-color: #070808; background-image: linear-gradient(90deg, transparent 95%, rgba(237,36,45,.2)), repeating-linear-gradient(0deg, transparent 0 79px, rgba(255,255,255,.025) 80px), radial-gradient(circle at center, rgba(255,255,255,.035), transparent 55%); transition: transform 1.15s cubic-bezier(.76,0,.24,1) .15s; }
.gate-panel::before, .gate-panel::after { content: ""; position: absolute; background: #171919; box-shadow: 0 0 0 1px #252828, 0 0 30px #000; }
.gate-panel::before { top: 9%; bottom: 9%; width: 16px; }
.gate-panel::after { left: 0; right: 0; top: 13%; height: 13px; }
.gate-left { left: 0; border-right: 1px solid #2c1012; }
.gate-left::before { right: 7%; }
.gate-right { right: 0; border-left: 1px solid #2c1012; transform: scaleX(-1); }
.gate-right::before { right: 7%; }
.intro-sun { position: absolute; width: min(34vw,430px); aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #ff4d4d, #a3080f 45%, #420307 72%); box-shadow: 0 0 80px rgba(209,11,20,.22); animation: introSun 2s ease both; }
.intro-sun::after { content: ""; position: absolute; inset: 8%; border: 1px solid rgba(255,220,210,.22); border-radius: inherit; }
.intro-mark { position: relative; z-index: 2; display: grid; justify-items: center; text-align: center; animation: introMark 1s cubic-bezier(.22,1,.36,1) both; }
.intro-kanji { position: absolute; z-index: -1; top: -100px; color: rgba(5,6,6,.38); font: 210px/.8 serif; }
.intro-logo { font: clamp(45px,7vw,91px)/1 var(--brush); letter-spacing: -5px; text-shadow: 0 8px 30px rgba(0,0,0,.5); transform: rotate(-3deg); }
.intro-logo b { color: #0a0b0b; -webkit-text-stroke: 1px rgba(255,255,255,.17); }
.intro-mark small { margin-top: 16px; font-size: 8px; font-weight: 700; letter-spacing: 4px; text-transform: uppercase; }
.intro-line { width: 190px; height: 2px; margin-top: 18px; overflow: hidden; background: rgba(255,255,255,.18); }
.intro-line i { display: block; width: 100%; height: 100%; background: white; transform-origin: left; animation: introLoad 1.45s cubic-bezier(.4,0,.2,1) both .15s; }
.gate-intro > button { position: absolute; z-index: 3; right: 25px; bottom: 22px; border: 0; color: rgba(255,255,255,.55); background: transparent; font-size: 8px; letter-spacing: 1px; text-transform: uppercase; cursor: pointer; }
.gate-intro > button:hover { color: white; }
.gate-intro.leaving .gate-left { transform: translateX(-101%); }
.gate-intro.leaving .gate-right { transform: scaleX(-1) translateX(-101%); }
.gate-intro.leaving .intro-mark, .gate-intro.leaving .intro-sun { opacity: 0; transform: scale(1.08); transition: .35s ease; }
.gate-intro.done { visibility: hidden; pointer-events: none; }
@keyframes introSun { from { opacity: 0; transform: scale(.6); filter: blur(12px); } to { opacity: 1; transform: scale(1); filter: blur(0); } }
@keyframes introMark { from { opacity: 0; transform: translateY(25px) scale(.94); } }
@keyframes introLoad { from { transform: scaleX(0); } }

.motion-toggle { font-family: serif; font-size: 13px; transition: color .25s, border-color .25s, transform .25s; }
.motion-toggle:hover { color: var(--red); border-color: rgba(237,36,45,.55); transform: rotate(12deg); }
.motion-toggle.off { color: #555; }
.motion-toggle.off::after { content: ""; position: absolute; width: 24px; height: 1px; background: #777; transform: rotate(-45deg); }

.topbar::after { content: ""; position: absolute; left: 0; bottom: -1px; width: 110px; height: 1px; background: linear-gradient(90deg, transparent, var(--red), transparent); animation: topbarScan 8s linear infinite; pointer-events: none; }
@keyframes topbarScan {
  0% { left: 0; opacity: 0; }
  8%,92% { opacity: 1; }
  100% { left: calc(100% - 110px); opacity: 0; }
}

.hero-media { animation: heroDrift 16s ease-in-out infinite alternate; will-change: transform, opacity; }
.hero-media.switching { animation-play-state: paused; }
@keyframes heroDrift { from { transform: scale(1.005) translate3d(-.25%,0,0); } to { transform: scale(1.025) translate3d(.5%,-.3%,0); } }
.hero-aura { position: absolute; z-index: -2; right: 13%; top: 44%; width: 330px; aspect-ratio: 1; border: 1px solid rgba(220,20,28,.22); border-radius: 50%; box-shadow: inset 0 0 0 18px rgba(180,10,16,.025), 0 0 80px rgba(180,10,16,.1); animation: auraSpin 24s linear infinite; }
.hero-aura::before, .hero-aura::after { content: ""; position: absolute; inset: 11%; border: 1px dashed rgba(150,8,15,.21); border-radius: 50%; }
.hero-aura::after { inset: 29%; border-style: solid; }
@keyframes auraSpin { to { transform: rotate(360deg); } }
.hero-speedlines { position: absolute; z-index: -1; inset: 0; opacity: 0; pointer-events: none; background: repeating-linear-gradient(111deg, transparent 0 31px, rgba(255,255,255,.2) 32px, transparent 33px 63px); transform: translateX(-30%); }
.hero.is-switching .hero-speedlines { animation: speedFlash .55s ease; }
@keyframes speedFlash { 0% { opacity: 0; transform: translateX(-35%); } 45% { opacity: .22; } 100% { opacity: 0; transform: translateX(15%); } }
.hero.is-switching .hero-copy > * { animation: copySwitch .5s cubic-bezier(.22,1,.36,1) both; }
.hero.is-switching .hero-copy > *:nth-child(2) { animation-delay: .035s; }
.hero.is-switching .hero-copy > *:nth-child(3) { animation-delay: .07s; }
.hero.is-switching .hero-copy > *:nth-child(4) { animation-delay: .1s; }
.hero.is-switching .hero-copy > *:nth-child(5) { animation-delay: .13s; }
@keyframes copySwitch { 0% { opacity: 0; transform: translateX(-20px) skewX(-4deg); filter: blur(4px); } 100% { opacity: 1; transform: none; filter: none; } }
.hero-seal { animation: sealFloat 5s ease-in-out infinite; }
@keyframes sealFloat { 0%,100% { transform: rotate(9deg) translateY(0); } 50% { transform: rotate(4deg) translateY(-7px); } }

.anime-ticker { height: 25px; overflow: hidden; border-bottom: 1px solid var(--line); color: #858a87; background: #070808; }
.ticker-track { width: max-content; height: 100%; display: flex; align-items: center; gap: 25px; padding-left: 25px; animation: tickerMove 28s linear infinite; }
.ticker-track span { color: var(--red); font: 9px serif; letter-spacing: 3px; }
.ticker-track b { font-size: 7px; letter-spacing: 2.2px; }
.ticker-track i { color: #383c3a; font-size: 5px; }
.anime-ticker:hover .ticker-track { animation-play-state: paused; }
@keyframes tickerMove { to { transform: translateX(-50%); } }

.reveal-ready [data-reveal] { opacity: 0; transform: translateY(26px); filter: blur(3px); transition: opacity .72s ease, transform .72s cubic-bezier(.22,1,.36,1), filter .72s ease; transition-delay: var(--reveal-delay,0ms); }
.reveal-ready [data-reveal].revealed { opacity: 1; transform: none; filter: none; }

.poster-card, .recommendation, .manga-card { --rx: 0deg; --ry: 0deg; --lift: 0px; transform: perspective(700px) rotateX(var(--rx)) rotateY(var(--ry)) translateY(var(--lift)); transform-style: preserve-3d; will-change: transform; transition: transform .18s ease, border-color .25s, box-shadow .25s; }
.poster-card:hover, .recommendation:hover, .manga-card:hover { --lift: -5px; border-color: rgba(237,36,45,.42); box-shadow: 0 15px 35px rgba(0,0,0,.42), 0 0 0 1px rgba(237,36,45,.08); }
.poster-card::before, .recommendation::before { content: ""; position: absolute; z-index: 2; inset: -40%; pointer-events: none; opacity: 0; background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,.16) 50%, transparent 65%); transform: translateX(-55%) rotate(8deg); transition: transform .65s ease, opacity .3s; }
.poster-card:hover::before, .recommendation:hover::before { opacity: .55; transform: translateX(55%) rotate(8deg); }
.poster-card .card-copy, .recommendation-copy { transform: translateZ(18px); }
.panel { position: relative; overflow: hidden; transition: border-color .3s, box-shadow .3s; }
.panel::after { content: ""; position: absolute; z-index: 0; right: -45px; top: -45px; width: 90px; height: 90px; border: 1px solid rgba(237,36,45,.08); border-radius: 50%; pointer-events: none; transition: transform .6s ease, border-color .3s; }
.panel:hover { border-color: rgba(255,255,255,.145); box-shadow: inset 0 1px rgba(255,255,255,.025), 0 14px 38px rgba(0,0,0,.18); }
.panel:hover::after { transform: scale(1.45); border-color: rgba(237,36,45,.17); }
.panel > * { position: relative; z-index: 1; }

.primary-btn, .ghost-btn, .round-button, .text-button { --mx: 0px; --my: 0px; translate: var(--mx) var(--my); }
.primary-btn { position: relative; overflow: hidden; }
.primary-btn::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 20%, rgba(255,255,255,.28) 48%, transparent 72%); transform: translateX(-130%); transition: transform .55s ease; }
.primary-btn:hover::after { transform: translateX(130%); }
.section-heading h2 { position: relative; }
.section-heading h2::after { content: ""; position: absolute; left: 0; bottom: -7px; width: 0; height: 1px; background: var(--red); transition: width .4s ease; }
.panel:hover .section-heading h2::after, .content-section:hover .section-heading h2::after { width: 100%; }

.ink-particle { position: fixed; z-index: 95; width: 4px; height: 4px; pointer-events: none; border-radius: 50%; background: var(--red); box-shadow: 0 0 8px rgba(237,36,45,.55); animation: inkFade .65s ease-out forwards; }
@keyframes inkFade { to { opacity: 0; transform: translate(var(--ink-x), var(--ink-y)) scale(.1); } }

body.motion-off *, body.motion-off *::before, body.motion-off *::after { animation-play-state: paused !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
body.motion-off .petals, body.motion-off .cursor-glow, body.motion-off .hero-speedlines { display: none !important; }
body.motion-off.reveal-ready [data-reveal] { opacity: 1; transform: none; filter: none; }
body.motion-off .ticker-track { transform: none; }

@media (max-width: 700px) {
  .gate-intro .intro-sun { width: 250px; }
  .intro-logo { font-size: 49px; }
  .intro-kanji { font-size: 160px; top: -75px; }
  .gate-intro > button { right: 16px; bottom: 16px; }
  .anime-ticker { height: 23px; }
  .hero-media { animation: none; transform: none; }
  .hero-aura { width: 250px; right: 0; top: 20%; opacity: .55; }
  .poster-card, .recommendation, .manga-card { transform: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .cursor-glow, .petals, .gate-intro, .hero-speedlines { display: none !important; }
  .reveal-ready [data-reveal] { opacity: 1 !important; transform: none !important; filter: none !important; }
}

/* Home footer — визуально согласован с portal-footer внутренних страниц */
.home-footer { display: flex; flex-wrap: wrap; gap: 18px 30px; align-items: center; justify-content: space-between; margin-top: 40px; padding: 26px 24px; border-top: 1px solid var(--line); background: #080909; }
.home-footer-brand { font: italic 900 21px var(--ui, 'Inter', sans-serif); letter-spacing: -1.5px; }
.home-footer-brand b { color: var(--red); }
.home-footer-brand small { margin-left: 8px; color: #6d7270; font: 8px serif; letter-spacing: 3px; }
.home-footer nav { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.home-footer nav a { color: #8f9392; font-size: 9px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; transition: color .2s; }
.home-footer nav a:hover { color: var(--red); }
.home-footer-top { color: #8f9392; font-size: 9px; font-weight: 800; letter-spacing: .1em; }
.home-footer-top:hover { color: var(--red); }

/* Сайдбар главной под единой shell-шапкой */
.side-controls { display: flex; align-items: center; justify-content: space-between; padding: 16px 16px 4px; }
.side-controls > span { color: #5f6461; font-size: 8px; font-weight: 800; letter-spacing: .18em; }
.side-controls .round-button { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 50%; background: transparent; cursor: pointer; }
.portal-search .search-results { top: calc(100% + 5px); }
