:root {
  color-scheme: dark;
  --bg: #06070a;
  --panel: rgba(16, 18, 26, 0.78);
  --panel-strong: #11141d;
  --panel-soft: rgba(255, 255, 255, 0.08);
  --text: #f7f7fb;
  --muted: #a6adbd;
  --line: rgba(255, 255, 255, 0.13);
  --hot: #ff4f7b;
  --gold: #f7c65f;
  --cyan: #66e7ff;
  --green: #72e6a9;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-pop: cubic-bezier(.2, .9, .18, 1.18);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 12% 8%, rgba(255, 79, 123, 0.24), transparent 28rem),
    radial-gradient(circle at 82% 2%, rgba(102, 231, 255, 0.2), transparent 30rem),
    linear-gradient(180deg, #070811 0%, #08090d 52%, #050507 100%);
  color: var(--text);
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  pointer-events: none;
  position: fixed;
  inset: -20%;
  z-index: -1;
  opacity: 0.42;
  background:
    radial-gradient(circle at 18% 24%, rgba(255, 79, 123, 0.18), transparent 20rem),
    radial-gradient(circle at 72% 12%, rgba(102, 231, 255, 0.16), transparent 24rem),
    radial-gradient(circle at 52% 86%, rgba(247, 198, 95, 0.1), transparent 22rem);
  filter: blur(14px);
  animation: ambientSweep 26s var(--ease-out) infinite alternate;
}

body.admin-calm-motion *,
body.admin-calm-motion *::before,
body.admin-calm-motion *::after {
  animation-duration: 1ms !important;
  transition-duration: 120ms !important;
}

button,
input,
select {
  font: inherit;
}

button,
a,
select {
  transition:
    transform 220ms var(--ease-out),
    border-color 220ms ease,
    background 220ms ease,
    color 220ms ease,
    opacity 220ms ease,
    box-shadow 220ms ease,
    filter 220ms ease;
}

button {
  cursor: pointer;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

a {
  color: inherit;
  text-decoration: none;
}

[hidden],
[aria-hidden="true"].anime-page,
[aria-hidden="true"].discovery-page,
[aria-hidden="true"].admin-page {
  display: none !important;
}

body.admin-hide-search .discovery-bar,
body.admin-hide-search #searchResultsSection {
  display: none !important;
}

.noise {
  pointer-events: none;
  position: fixed;
  inset: 0;
  opacity: 0.22;
  z-index: 20;
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(180deg, black, transparent 88%);
}

.site-header {
  position: fixed;
  inset: 16px 20px auto;
  z-index: 30;
  min-height: 68px;
  display: grid;
  grid-template-columns: max-content 1fr max-content;
  align-items: center;
  gap: 22px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(8, 9, 14, 0.64);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
  animation: headerDrop 680ms var(--ease-out) both;
}

body.admin-route .site-header {
  position: absolute;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark,
.avatar {
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #140911;
  background: linear-gradient(135deg, var(--gold), var(--hot));
  font-weight: 950;
}

.brand-mark {
  width: 48px;
  height: 48px;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 1.05rem;
}

.brand small {
  color: var(--muted);
  font-size: 0.76rem;
}

.header-nav {
  display: flex;
  justify-content: center;
  gap: clamp(10px, 2vw, 26px);
  color: var(--muted);
  font-weight: 800;
  font-size: 0.9rem;
}

.header-nav a:hover {
  color: var(--text);
}

.header-actions,
.hero-actions,
.poster-actions,
.detail-actions,
.auth-tabs,
.episode-control {
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-button,
.profile-button,
.top-pill,
.primary-button,
.secondary-button,
.tiny-button,
.text-button,
.drawer-close,
.modal-close {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-weight: 900;
}

.icon-button {
  width: 46px;
  height: 46px;
}

.profile-button {
  min-height: 46px;
  padding: 4px 14px 4px 5px;
  display: flex;
  align-items: center;
  gap: 9px;
}

.top-pill {
  min-height: 42px;
  padding: 0 14px;
  white-space: nowrap;
}

.adult-toggle[aria-pressed="false"] {
  color: var(--muted);
}

.adult-toggle[aria-pressed="true"] {
  color: #fff;
  border-color: rgba(255, 79, 123, 0.6);
  background: rgba(255, 79, 123, 0.22);
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
}

.primary-button,
.secondary-button {
  min-height: 48px;
  padding: 0 18px;
}

.primary-button {
  border: 0;
  color: #160b12;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.28), transparent 36%),
    linear-gradient(135deg, var(--gold), var(--hot));
  background-size: 200% 200%, 100% 100%;
  box-shadow: 0 12px 34px rgba(255, 79, 123, 0.28);
}

.secondary-button {
  background: rgba(255, 255, 255, 0.1);
}

.text-button {
  min-height: 38px;
  padding: 0 14px;
  color: var(--cyan);
}

.tiny-button {
  min-height: 34px;
  padding: 0 12px;
  font-size: 0.78rem;
}

.tiny-button.active,
.save-button.active {
  background: rgba(114, 230, 169, 0.18);
  border-color: rgba(114, 230, 169, 0.6);
  color: var(--green);
}

button:hover,
.provider-links a:hover,
.mal-link:hover {
  transform: translateY(-3px);
  filter: saturate(1.08);
}

.primary-button:hover {
  background-position: 100% 0, 0 0;
  box-shadow: 0 18px 48px rgba(255, 79, 123, 0.36);
}

.secondary-button:hover,
.top-pill:hover,
.profile-button:hover,
.icon-button:hover,
.tiny-button:hover,
.text-button:hover {
  border-color: rgba(102, 231, 255, 0.38);
  background: rgba(255, 255, 255, 0.14);
  box-shadow: 0 12px 38px rgba(102, 231, 255, 0.1);
}

.icon {
  width: 18px;
  height: 18px;
  display: inline-block;
  background: currentColor;
}

.icon.search {
  clip-path: polygon(40% 0, 62% 0, 80% 10%, 92% 30%, 92% 52%, 82% 68%, 100% 86%, 86% 100%, 68% 82%, 52% 92%, 30% 92%, 10% 80%, 0 62%, 0 40%, 10% 20%, 30% 8%);
}

.hero {
  position: relative;
  min-height: 92vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 360px);
  align-items: end;
  gap: clamp(20px, 5vw, 80px);
  padding: 150px clamp(18px, 5vw, 78px) 70px;
  overflow: hidden;
  animation: pageLift 780ms var(--ease-out) both;
}

.hero-backdrop,
.hero-shade {
  position: absolute;
  inset: 0;
}

.hero-backdrop {
  background-image: url("assets/hero-panorama-banner.png");
  background-size: cover;
  background-position: center;
  transform: scale(1.06);
  filter: saturate(1.12) contrast(1.05);
  animation: drift 18s ease-in-out infinite alternate, heroFocus 900ms var(--ease-out) both;
}

.hero-shade {
  background:
    linear-gradient(90deg, rgba(6, 7, 10, 0.96) 0%, rgba(6, 7, 10, 0.66) 46%, rgba(6, 7, 10, 0.24) 100%),
    linear-gradient(0deg, #06070a 0%, rgba(6, 7, 10, 0.14) 38%);
}

.hero-content,
.hero-panel {
  position: relative;
  z-index: 2;
}

.kicker {
  margin: 0;
  color: var(--cyan);
  font-size: 0.76rem;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 760px;
  margin: 14px 0;
  font-size: clamp(3rem, 8vw, 7.7rem);
  line-height: 0.88;
  letter-spacing: 0;
  text-wrap: balance;
  animation: textReveal 760ms var(--ease-out) both;
}

.hero p {
  max-width: 760px;
}

#heroSynopsis {
  color: rgba(247, 247, 251, 0.82);
  font-size: clamp(1rem, 1.6vw, 1.25rem);
  line-height: 1.6;
  animation: textReveal 820ms var(--ease-out) 80ms both;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 26px 0;
  animation: textReveal 860ms var(--ease-out) 140ms both;
}

.hero-meta span,
.genre-row span {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(247, 247, 251, 0.88);
  padding: 8px 11px;
  font-size: 0.78rem;
  font-weight: 900;
}

.hero-panel {
  align-self: center;
  justify-self: end;
  width: min(100%, 340px);
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(14, 17, 26, 0.56);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
  animation: panelFloatIn 900ms var(--ease-pop) 160ms both;
}

.pulse-ring {
  width: 116px;
  height: 116px;
  border-radius: 50%;
  margin-bottom: 18px;
  background:
    radial-gradient(circle at center, rgba(255,255,255,0.08) 0 44%, transparent 45%),
    conic-gradient(var(--hot), var(--gold), var(--cyan), var(--hot));
  animation: spin 8s linear infinite, pulseGlow 2.8s ease-in-out infinite;
}

.hero-panel p,
.hero-panel span {
  color: var(--muted);
}

.hero-panel strong {
  display: block;
  margin: 6px 0;
  font-size: 3.4rem;
  line-height: 1;
}

.hero-cover-stack {
  pointer-events: none;
  position: absolute;
  inset: 118px clamp(18px, 5vw, 78px) 58px auto;
  z-index: 1;
  width: min(44vw, 620px);
  min-width: 360px;
  opacity: 0.95;
}

.hero-stack-card {
  position: absolute;
  width: clamp(128px, 15vw, 216px);
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.56);
  transform-origin: center;
  transition: transform 520ms var(--ease-out), filter 520ms ease, opacity 520ms ease;
  animation: floatCover 8s ease-in-out infinite alternate, stackIn 780ms var(--ease-pop) both;
}

.hero-stack-card.card-1 {
  right: 110px;
  top: 32px;
  z-index: 5;
  width: clamp(172px, 19vw, 272px);
  transform: rotate(2deg);
}

.hero-stack-card.card-2 {
  right: 0;
  top: 142px;
  z-index: 4;
  transform: rotate(9deg);
  animation-delay: 900ms;
}

.hero-stack-card.card-3 {
  right: 310px;
  top: 142px;
  z-index: 3;
  transform: rotate(-10deg);
  animation-delay: 1300ms;
}

.hero-stack-card.card-4 {
  right: 215px;
  top: 0;
  z-index: 2;
  transform: rotate(-5deg) scale(0.86);
  opacity: 0.72;
  animation-delay: 1800ms;
}

.hero-stack-card.card-5 {
  right: 30px;
  top: 0;
  z-index: 1;
  transform: rotate(14deg) scale(0.78);
  opacity: 0.56;
  animation-delay: 2300ms;
}

.hero-stack-card.card-6 {
  right: 250px;
  top: 320px;
  z-index: 1;
  transform: rotate(7deg) scale(0.82);
  opacity: 0.62;
  animation-delay: 2800ms;
}

.discovery-bar {
  position: sticky;
  top: 102px;
  z-index: 10;
  display: grid;
  grid-template-columns: minmax(240px, 1fr) repeat(3, minmax(150px, 210px));
  gap: 10px;
  margin: -34px clamp(18px, 5vw, 78px) 34px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(8, 9, 14, 0.78);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.discovery-page {
  min-height: 100vh;
  padding: 118px 0 70px;
  background:
    radial-gradient(circle at 12% 6%, rgba(255, 79, 123, 0.18), transparent 28rem),
    radial-gradient(circle at 92% 0%, rgba(102, 231, 255, 0.2), transparent 32rem),
    linear-gradient(180deg, #070811 0%, #050507 100%);
  animation: pageLift 620ms var(--ease-out) both;
}

.discovery-hero {
  display: grid;
  gap: 20px;
  padding: 0 clamp(18px, 5vw, 78px) 22px;
}

.discovery-back {
  position: static !important;
  inset: auto !important;
  justify-self: start;
}

.discovery-hero h1 {
  max-width: 980px;
  margin: 10px 0 14px;
  font-size: clamp(2.8rem, 7vw, 6.4rem);
  line-height: 0.9;
  letter-spacing: 0;
}

.discovery-hero p {
  max-width: 760px;
  color: rgba(247, 247, 251, 0.78);
  font-size: clamp(1rem, 1.4vw, 1.18rem);
  line-height: 1.65;
}

.discovery-page-bar {
  margin-top: 0;
}

.tag-browser {
  margin-bottom: 36px;
  padding: clamp(18px, 3vw, 28px);
  border: 1px solid var(--line);
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), transparent 26%),
    rgba(14, 17, 26, 0.7);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
  animation: panelFloatIn 620ms var(--ease-out) both;
}

.active-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  min-height: 42px;
  align-items: center;
  margin-bottom: 14px;
  color: var(--muted);
  font-weight: 800;
}

.tag-cloud {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.tag-chip {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-weight: 900;
  text-align: left;
  transform: translateZ(0);
}

.tag-chip small {
  color: var(--muted);
  font-weight: 950;
}

.tag-chip.active {
  border-color: rgba(102, 231, 255, 0.56);
  background: rgba(102, 231, 255, 0.16);
  color: #fff;
  box-shadow: 0 12px 34px rgba(102, 231, 255, 0.12);
}

.tag-chip:hover {
  transform: translateY(-3px) scale(1.02);
  border-color: rgba(102, 231, 255, 0.42);
  box-shadow: 0 14px 36px rgba(102, 231, 255, 0.12);
}

.search-field {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
}

.search-field input,
select,
.auth-card input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
}

select {
  min-height: 50px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.08);
  font-weight: 800;
}

.quick-stats,
.rails,
.continue-section,
.rail-section,
.tag-browser,
.source-note {
  margin-inline: clamp(18px, 5vw, 78px);
}

.admin-notice {
  margin: 0 clamp(18px, 5vw, 78px) 34px;
  padding: 16px 18px;
  border: 1px solid rgba(102, 231, 255, 0.28);
  border-radius: 20px;
  background: rgba(102, 231, 255, 0.08);
  color: rgba(247, 247, 251, 0.9);
  font-weight: 800;
  backdrop-filter: blur(18px);
}

.quick-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 36px;
}

.quick-stats article,
.source-note,
.continue-empty {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(18px);
}

.quick-stats article {
  min-height: 108px;
  padding: 18px;
}

.quick-stats span {
  display: block;
  font-size: clamp(1.8rem, 4vw, 3.2rem);
  font-weight: 950;
  line-height: 1;
}

.quick-stats p,
.poster-meta,
.source-note p,
.auth-copy,
.continue-card p,
.drawer-section p {
  color: var(--muted);
}

.section-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.section-title h2 {
  margin: 4px 0 0;
  font-size: clamp(1.5rem, 3vw, 2.8rem);
  letter-spacing: 0;
}

.section-title span,
#resultCount {
  color: var(--muted);
  font-weight: 900;
}

.rail-section {
  scroll-margin-top: 118px;
  margin-bottom: 46px;
}

#searchResultsSection {
  display: none;
}

#searchResultsSection.is-active {
  display: block;
}

.poster-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: clamp(190px, 18vw, 252px);
  gap: 16px;
  overflow-x: auto;
  padding: 4px 4px 20px;
  scroll-snap-type: x proximity;
  scroll-behavior: smooth;
}

.poster-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 16px;
}

.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 22px 0 10px;
}

.pager span {
  color: var(--muted);
  font-weight: 900;
}

.poster-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255,255,255,0.11), rgba(255,255,255,0.05));
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.22);
  scroll-snap-align: start;
  transform: translateZ(0);
  animation: cardRise 560ms var(--ease-out) backwards;
  transition:
    transform 320ms var(--ease-out),
    border-color 260ms ease,
    box-shadow 320ms ease,
    background 320ms ease;
}

.poster-card:nth-child(2n) {
  animation-delay: 45ms;
}

.poster-card:nth-child(3n) {
  animation-delay: 90ms;
}

.poster-card:nth-child(5n) {
  animation-delay: 135ms;
}

.poster-card:hover {
  transform: translateY(-10px) scale(1.025);
  border-color: rgba(102, 231, 255, 0.38);
  background:
    linear-gradient(180deg, rgba(102, 231, 255, 0.14), rgba(255,255,255,0.055));
  box-shadow: 0 26px 68px rgba(0, 0, 0, 0.34), 0 0 0 1px rgba(102, 231, 255, 0.08);
}

.poster-image {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 2 / 3;
  border: 0;
  padding: 0;
  overflow: hidden;
  background: #151822;
}

.poster-image::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  background:
    linear-gradient(120deg, transparent 18%, rgba(255, 255, 255, 0.2) 46%, transparent 68%);
  transform: translateX(-110%);
  transition: opacity 240ms ease, transform 760ms var(--ease-out);
}

.poster-card:hover .poster-image::after {
  opacity: 1;
  transform: translateX(110%);
}

.poster-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 600ms ease, filter 600ms ease;
}

.poster-card:hover .poster-image img {
  transform: scale(1.08);
  filter: saturate(1.18) contrast(1.07);
}

.score-badge,
.status-badge {
  position: absolute;
  z-index: 1;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 950;
  padding: 7px 9px;
  backdrop-filter: blur(16px);
}

.score-badge {
  top: 10px;
  left: 10px;
  color: #160b12;
  background: var(--gold);
}

.status-badge {
  right: 10px;
  bottom: 10px;
  max-width: calc(100% - 20px);
  color: var(--text);
  background: rgba(8, 9, 14, 0.72);
}

.poster-body {
  padding: 14px;
}

.poster-body h3,
.poster-title {
  margin: 0;
  font-size: 1rem;
  line-height: 1.2;
  min-height: 2.4em;
}

.poster-title {
  width: 100%;
  border: 0;
  padding: 0;
  color: var(--text);
  background: transparent;
  text-align: left;
  font-weight: 900;
}

.poster-meta {
  margin: 8px 0 12px;
  font-size: 0.8rem;
  line-height: 1.4;
}

.genre-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.genre-row span {
  padding: 5px 8px;
  font-size: 0.7rem;
}

.genre-row.large span {
  font-size: 0.78rem;
}

.poster-actions {
  margin-top: 12px;
}

.continue-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

.continue-card {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.07);
}

.continue-card img {
  width: 86px;
  height: 124px;
  object-fit: cover;
  border-radius: 16px;
}

.continue-card h3,
.continue-card p {
  margin: 0 0 8px;
}

.continue-empty {
  padding: 20px;
}

.watch-progress {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  margin: 12px 0;
}

.watch-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan), var(--green));
}

.source-note {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 520px);
  gap: 28px;
  padding: clamp(22px, 4vw, 42px);
  margin-bottom: 56px;
}

.source-note h2 {
  margin: 8px 0 0;
  font-size: clamp(1.4rem, 3vw, 2.6rem);
}

.anime-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 80% 0%, rgba(102, 231, 255, 0.16), transparent 30rem),
    linear-gradient(180deg, #070811, #050507);
  animation: pageLift 620ms var(--ease-out) both;
}

.admin-page {
  min-height: 100vh;
  padding: 118px clamp(18px, 5vw, 78px) 70px;
  background:
    radial-gradient(circle at 18% 8%, rgba(255, 79, 123, 0.18), transparent 28rem),
    radial-gradient(circle at 86% 0%, rgba(102, 231, 255, 0.18), transparent 30rem),
    linear-gradient(180deg, #070811 0%, #06070a 100%);
  animation: pageLift 620ms var(--ease-out) both;
}

.admin-page.is-locked {
  background:
    linear-gradient(135deg, rgba(255, 79, 123, 0.16), transparent 26rem),
    radial-gradient(circle at 50% 18%, rgba(102, 231, 255, 0.14), transparent 28rem),
    linear-gradient(180deg, #050507 0%, #020306 100%);
}

.admin-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  gap: 20px;
  align-items: end;
  margin-bottom: 22px;
}

.admin-back {
  position: static !important;
  inset: auto !important;
  z-index: 1;
  justify-self: start;
  grid-column: 1 / -1;
}

.admin-hero h1 {
  max-width: 820px;
  margin: 10px 0 14px;
  font-size: clamp(3rem, 8vw, 7rem);
  line-height: 0.9;
  letter-spacing: 0;
}

.admin-hero p {
  max-width: 780px;
  color: rgba(247, 247, 251, 0.78);
  line-height: 1.65;
}

.admin-security-card,
.admin-section-card {
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), transparent 28%),
    rgba(14, 17, 26, 0.76);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
}

.admin-security-card {
  padding: 22px;
}

.admin-security-card span,
.admin-diagnostics span {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 950;
  text-transform: uppercase;
}

.admin-security-card strong {
  display: block;
  margin: 10px 0;
  font-size: 2.3rem;
  line-height: 1;
}

.admin-shell {
  display: grid;
  grid-template-columns: minmax(240px, 330px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.admin-page.is-locked .admin-shell {
  grid-template-columns: minmax(0, 820px);
  justify-content: center;
}

.admin-page.is-locked .admin-sidebar {
  display: none;
}

.admin-page.is-locked .admin-workspace > .admin-section-card:first-child {
  position: relative;
  overflow: hidden;
  min-height: 520px;
  display: grid;
  align-content: end;
  padding: clamp(24px, 5vw, 48px);
  border-color: rgba(102, 231, 255, 0.28);
  background:
    radial-gradient(circle at 50% 22%, rgba(102, 231, 255, 0.2), transparent 16rem),
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), transparent 28%),
    rgba(8, 9, 14, 0.9);
  animation: vaultReveal 720ms var(--ease-pop) both;
}

.admin-lock-visual {
  position: relative;
  width: min(70vw, 360px);
  height: 250px;
  margin: 0 auto 28px;
}

.admin-lock-visual .chain {
  position: absolute;
  top: 34px;
  width: 190px;
  height: 32px;
  border: 8px solid rgba(247, 247, 251, 0.36);
  border-radius: 999px;
  box-shadow:
    0 0 28px rgba(102, 231, 255, 0.16),
    inset 0 0 18px rgba(0, 0, 0, 0.4);
  animation: chainTension 3.2s ease-in-out infinite;
}

.admin-lock-visual .chain-left {
  left: -8px;
  transform: rotate(-32deg);
}

.admin-lock-visual .chain-right {
  right: -8px;
  transform: rotate(32deg);
}

.admin-lock-visual .lock-shackle {
  position: absolute;
  left: 50%;
  top: 54px;
  width: 140px;
  height: 122px;
  transform: translateX(-50%);
  border: 18px solid rgba(247, 247, 251, 0.68);
  border-bottom: 0;
  border-radius: 80px 80px 0 0;
}

.admin-lock-visual .lock-body {
  position: absolute;
  left: 50%;
  bottom: 18px;
  width: 190px;
  height: 130px;
  transform: translateX(-50%);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 30px;
  background: linear-gradient(135deg, var(--gold), var(--hot));
  box-shadow:
    0 30px 90px rgba(255, 79, 123, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.42);
  animation: lockPulse 3.4s ease-in-out infinite;
}

.admin-lock-visual .lock-body::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 34px;
  width: 28px;
  height: 28px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: rgba(8, 9, 14, 0.82);
  box-shadow: 0 26px 0 4px rgba(8, 9, 14, 0.82);
}

.admin-page:not(.is-locked) .admin-lock-visual {
  display: none;
}

.admin-sidebar,
.admin-workspace,
.admin-workspace form {
  display: grid;
  gap: 16px;
}

.admin-sidebar {
  position: sticky;
  top: 104px;
}

.admin-section-card {
  padding: clamp(18px, 3vw, 26px);
}

.admin-section-card h2 {
  margin: 7px 0 14px;
  font-size: clamp(1.4rem, 3vw, 2.2rem);
}

.admin-section-card p {
  color: var(--muted);
  line-height: 1.6;
}

.admin-page label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 900;
}

.admin-page input,
.admin-page textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}

.admin-page input {
  min-height: 48px;
  padding: 0 13px;
}

.admin-page textarea {
  min-height: 92px;
  resize: vertical;
  padding: 12px 13px;
}

.admin-diagnostics {
  display: grid;
  gap: 8px;
}

.admin-diagnostics article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.07);
}

.admin-diagnostics strong {
  text-align: right;
}

.admin-rail-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.file-drop.compact {
  margin-bottom: 12px;
}

.admin-save-row {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(8, 9, 14, 0.82);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
}

.admin-save-row .primary-button {
  min-width: 220px;
}

.admin-status-line {
  margin-top: 14px;
}

.page-back {
  position: fixed;
  top: 106px;
  left: clamp(18px, 6vw, 92px);
  z-index: 22;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 16px;
  color: var(--text);
  background: rgba(8, 9, 14, 0.74);
  font-weight: 950;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.anime-detail-hero {
  position: relative;
  min-height: 82vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 360px);
  align-items: end;
  gap: clamp(18px, 5vw, 72px);
  padding: 172px clamp(18px, 6vw, 92px) 58px;
  background-size: cover;
  background-position: center;
  overflow: hidden;
  animation: detailHeroIn 760ms var(--ease-out) both;
}

.anime-detail-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(6, 7, 10, 0.98), rgba(6, 7, 10, 0.72), rgba(6, 7, 10, 0.34)),
    linear-gradient(0deg, #06070a, rgba(6, 7, 10, 0.1) 48%);
}

.anime-detail-copy,
.anime-detail-cover {
  position: relative;
  z-index: 1;
}

.anime-detail-copy {
  max-width: 940px;
  animation: textReveal 760ms var(--ease-out) 80ms both;
}

.anime-detail-copy h1 {
  max-width: 900px;
  margin: 12px 0;
  font-size: clamp(2.7rem, 6.4vw, 5.8rem);
  line-height: 0.94;
  letter-spacing: 0;
  text-wrap: balance;
}

.anime-detail-copy p {
  max-width: 780px;
  color: rgba(247, 247, 251, 0.84);
  font-size: clamp(0.98rem, 1.25vw, 1.14rem);
  line-height: 1.58;
}

.anime-detail-copy > p:not(.kicker) {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 6;
}

.anime-detail-cover {
  width: min(100%, 340px);
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.46);
  justify-self: end;
  animation: coverReveal 860ms var(--ease-pop) 160ms both;
}

.anime-detail-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 420px);
  gap: 22px;
  padding: 34px clamp(18px, 6vw, 92px) 70px;
}

.detail-main {
  display: grid;
  gap: 18px;
}

.detail-block,
.detail-sidebar {
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.07);
  padding: clamp(18px, 3vw, 28px);
  backdrop-filter: blur(18px);
  animation: panelFloatIn 620ms var(--ease-out) both;
}

.detail-block h2 {
  margin: 7px 0 12px;
  font-size: clamp(1.35rem, 3vw, 2.25rem);
}

.detail-block p {
  color: var(--muted);
  line-height: 1.65;
}

.detail-sidebar {
  align-self: start;
  position: sticky;
  top: 96px;
}

.small-note {
  margin-top: 14px;
  color: var(--muted);
}

.detail-drawer,
.auth-modal {
  position: fixed;
  z-index: 50;
}

.detail-drawer {
  top: 0;
  right: 0;
  width: min(100%, 560px);
  height: 100vh;
  overflow-y: auto;
  background: rgba(9, 11, 17, 0.94);
  border-left: 1px solid var(--line);
  box-shadow: -30px 0 100px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(24px);
  transform: translateX(104%);
  transition: transform 360ms cubic-bezier(.2,.75,.2,1);
}

.detail-drawer[aria-hidden="false"] {
  transform: translateX(0);
}

.scrim {
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
  opacity: 0;
  background: rgba(0, 0, 0, 0.56);
  transition: opacity 240ms ease;
}

.scrim.active {
  pointer-events: auto;
  opacity: 1;
}

.drawer-close {
  position: sticky;
  top: 14px;
  left: 14px;
  z-index: 2;
  min-height: 38px;
  margin: 14px;
  padding: 0 14px;
  background: rgba(0, 0, 0, 0.46);
  backdrop-filter: blur(14px);
}

.drawer-hero {
  min-height: 420px;
  display: flex;
  align-items: end;
  padding: 100px 24px 24px;
  margin-top: -66px;
  background-size: cover;
  background-position: center;
  position: relative;
}

.drawer-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(9, 11, 17, 0.98), rgba(9, 11, 17, 0.14));
}

.drawer-hero > div {
  position: relative;
}

.drawer-hero h2 {
  margin: 8px 0 12px;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 0.92;
}

.drawer-hero p:last-child {
  color: rgba(247, 247, 251, 0.84);
  line-height: 1.55;
}

.drawer-body {
  padding: 0 24px 28px;
}

.fact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 20px 0;
}

.fact-grid article {
  min-height: 86px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.07);
}

.fact-grid span {
  display: block;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.fact-grid strong {
  line-height: 1.25;
}

.drawer-section {
  margin-top: 24px;
}

.provider-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.provider-links a,
.mal-link {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  padding: 0 14px;
  font-weight: 900;
}

.mal-link {
  margin-top: 24px;
  color: var(--cyan);
}

.auth-modal {
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  pointer-events: none;
  opacity: 0;
  background: rgba(0, 0, 0, 0.62);
  transition: opacity 220ms ease;
}

.auth-modal[aria-hidden="false"] {
  opacity: 1;
  pointer-events: auto;
}

.auth-modal[aria-hidden="false"] .auth-card {
  animation: modalPop 520ms var(--ease-pop) both;
}

.auth-card {
  position: relative;
  width: min(100%, 460px);
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), transparent 24%),
    rgba(14, 17, 26, 0.94);
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px);
}

.admin-card {
  width: min(100%, 760px);
  max-height: min(90vh, 860px);
  overflow-y: auto;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  padding: 0;
  color: var(--text);
  font-size: 1.35rem;
  line-height: 1;
  background: rgba(255, 255, 255, 0.1);
}

.modal-close:hover {
  background: rgba(255, 79, 123, 0.22);
  border-color: rgba(255, 79, 123, 0.58);
}

.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

.modal-actions > button {
  flex: 1;
}

.danger-button {
  background: linear-gradient(135deg, #ff7b54, var(--hot));
}

.file-drop {
  display: grid;
  gap: 8px;
  margin: 18px 0;
  padding: 18px;
  border: 1px dashed rgba(102, 231, 255, 0.46);
  border-radius: 20px;
  background: rgba(102, 231, 255, 0.08);
  color: var(--text);
  cursor: pointer;
}

.file-drop input {
  display: none;
}

.file-drop span {
  font-weight: 950;
}

.file-drop small,
.import-preview p,
.mal-import-data span {
  color: var(--muted);
}

.import-preview,
.mal-import-data {
  display: grid;
  gap: 7px;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.07);
}

.auth-card h2 {
  margin: 8px 0;
  font-size: 2rem;
}

.auth-tabs {
  padding: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  margin: 18px 0;
}

.auth-tabs button {
  flex: 1;
  min-height: 40px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-weight: 900;
}

.auth-tabs button.active {
  background: rgba(255, 255, 255, 0.15);
  color: var(--text);
}

.auth-card form {
  display: grid;
  gap: 12px;
}

.auth-card label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 900;
}

.auth-card input {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0 13px;
  background: rgba(255, 255, 255, 0.08);
}

.auth-card textarea {
  min-height: 86px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px 13px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.admin-wide {
  grid-column: 1 / -1;
}

.admin-check {
  display: flex !important;
  min-height: 48px;
  align-items: center;
  grid-template-columns: none !important;
  gap: 10px !important;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
}

.admin-check input {
  min-height: auto;
  width: 18px;
  height: 18px;
}

.admin-reset {
  width: 100%;
  margin-top: 12px;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--line);
}

.google-button,
.discord-button {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.94);
  color: #171920;
  font-weight: 950;
}

.discord-button {
  border-color: rgba(88, 101, 242, 0.58);
  background: #5865f2;
  color: #fff;
}

.google-button:hover,
.discord-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 42px rgba(255, 255, 255, 0.16);
}

.provider-icon {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
}

.provider-icon svg {
  width: 22px;
  height: 22px;
  display: block;
}

.auth-hint {
  margin: -2px 0 2px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
}

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 600ms ease, transform 600ms cubic-bezier(.2,.75,.2,1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes ambientSweep {
  from {
    transform: translate3d(-2%, -1%, 0) rotate(0deg) scale(1);
  }
  to {
    transform: translate3d(2%, 1%, 0) rotate(5deg) scale(1.08);
  }
}

@keyframes headerDrop {
  from {
    opacity: 0;
    transform: translateY(-18px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes pageLift {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes heroFocus {
  from {
    filter: saturate(0.78) contrast(0.96) blur(8px);
  }
  to {
    filter: saturate(1.12) contrast(1.05) blur(0);
  }
}

@keyframes textReveal {
  from {
    opacity: 0;
    transform: translateY(18px);
    filter: blur(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

@keyframes panelFloatIn {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes cardRise {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.985);
    filter: blur(6px) saturate(0.84);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0) saturate(1);
  }
}

@keyframes pulseGlow {
  0%,
  100% {
    box-shadow: 0 0 0 rgba(102, 231, 255, 0);
  }
  50% {
    box-shadow: 0 0 42px rgba(102, 231, 255, 0.24);
  }
}

@keyframes stackIn {
  from {
    filter: blur(10px) saturate(0.72);
  }
  to {
    filter: blur(0) saturate(1);
  }
}

@keyframes detailHeroIn {
  from {
    opacity: 0;
    background-position: center 42%;
    filter: saturate(0.82) contrast(0.96);
  }
  to {
    opacity: 1;
    background-position: center;
    filter: saturate(1) contrast(1);
  }
}

@keyframes coverReveal {
  from {
    opacity: 0;
    transform: translateY(28px) rotate(2deg) scale(0.96);
    filter: blur(8px) saturate(0.78);
  }
  to {
    opacity: 1;
    transform: translateY(0) rotate(0deg) scale(1);
    filter: blur(0) saturate(1);
  }
}

@keyframes modalPop {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes vaultReveal {
  from {
    opacity: 0;
    transform: translateY(28px) scale(0.96);
    filter: blur(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes chainTension {
  0%,
  100% {
    filter: brightness(1);
  }
  50% {
    filter: brightness(1.25) drop-shadow(0 0 16px rgba(102, 231, 255, 0.24));
  }
}

@keyframes lockPulse {
  0%,
  100% {
    transform: translateX(-50%) scale(1);
    box-shadow:
      0 30px 90px rgba(255, 79, 123, 0.32),
      inset 0 1px 0 rgba(255, 255, 255, 0.42);
  }
  50% {
    transform: translateX(-50%) scale(1.025);
    box-shadow:
      0 34px 110px rgba(255, 79, 123, 0.42),
      0 0 36px rgba(102, 231, 255, 0.2),
      inset 0 1px 0 rgba(255, 255, 255, 0.48);
  }
}

@keyframes drift {
  from { transform: scale(1.06) translate3d(0, 0, 0); }
  to { transform: scale(1.13) translate3d(-2%, 1%, 0); }
}

@keyframes floatCover {
  from { translate: 0 0; }
  to { translate: 0 -16px; }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 1040px) {
  .site-header {
    grid-template-columns: 1fr max-content;
  }

  .header-nav {
    display: none;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .hero-cover-stack {
    position: relative;
    inset: auto;
    width: min(100%, 520px);
    min-width: 0;
    height: 360px;
    justify-self: center;
    grid-row: 2;
  }

  .hero-stack-card {
    width: clamp(110px, 28vw, 180px);
  }

  .hero-panel {
    justify-self: start;
  }

  .discovery-bar {
    grid-template-columns: 1fr 1fr;
    top: 96px;
  }

  .quick-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .source-note {
    grid-template-columns: 1fr;
  }

  .anime-detail-hero,
  .anime-detail-body {
    grid-template-columns: 1fr;
  }

  .admin-hero,
  .admin-shell {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    position: static;
  }

  .admin-rail-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .anime-detail-cover {
    justify-self: start;
    max-width: 260px;
  }

  .page-back {
    top: 104px;
  }

  .detail-sidebar {
    position: static;
  }
}

@media (max-width: 700px) {
  .site-header {
    inset: 10px 10px auto;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .header-actions {
    justify-content: space-between;
    flex-wrap: wrap;
  }

  .top-pill {
    flex: 1;
  }

  .hero {
    padding: 168px 16px 52px;
  }

  .hero-cover-stack {
    height: 260px;
    order: 2;
  }

  .hero-stack-card.card-1 {
    right: 36%;
    top: 12px;
  }

  .hero-stack-card.card-2 {
    right: 5%;
    top: 88px;
  }

  .hero-stack-card.card-3 {
    right: 58%;
    top: 94px;
  }

  .hero-stack-card.card-4,
  .hero-stack-card.card-5,
  .hero-stack-card.card-6 {
    display: none;
  }

  .hero h1 {
    font-size: clamp(2.5rem, 18vw, 4.8rem);
  }

  .hero-actions,
  .detail-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .discovery-bar {
    position: static;
    grid-template-columns: 1fr;
    margin: -22px 12px 28px;
  }

  .quick-stats,
  .rails,
  .continue-section,
  .rail-section,
  .tag-browser,
  .source-note,
  .admin-notice {
    margin-inline: 12px;
  }

  .discovery-page {
    padding-top: 218px;
  }

  .discovery-hero {
    padding-inline: 12px;
  }

  .tag-cloud {
    grid-template-columns: 1fr;
  }

  .admin-grid {
    grid-template-columns: 1fr;
  }

  .admin-page {
    padding: 218px 12px 82px;
  }

  .admin-rail-list {
    grid-template-columns: 1fr;
  }

  .admin-save-row {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-save-row .primary-button {
    min-width: 0;
  }

  .quick-stats {
    grid-template-columns: 1fr;
  }

  .poster-rail {
    grid-auto-columns: 72vw;
  }

  .section-title {
    align-items: flex-start;
    flex-direction: column;
  }

  .fact-grid {
    grid-template-columns: 1fr;
  }

  .detail-drawer {
    width: 100%;
  }

  .page-back {
    top: auto;
    left: 12px;
    right: 12px;
    bottom: 12px;
    z-index: 32;
  }

  .anime-detail-hero {
    padding: 172px 16px 42px;
  }

  .anime-detail-copy h1 {
    font-size: clamp(2.35rem, 13vw, 4.2rem);
  }

  .anime-detail-body {
    padding: 22px 12px 80px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }
}
