/* 番剧资料站视觉覆盖层：尽量不改正文结构 */
:root {
  color-scheme: dark;
  --anime-bg: #070917;
  --anime-bg-2: #120a24;
  --anime-surface: rgba(18, 22, 45, 0.76);
  --anime-surface-strong: rgba(26, 32, 68, 0.92);
  --anime-border: rgba(124, 92, 255, 0.34);
  --anime-border-hot: rgba(53, 212, 255, 0.58);
  --anime-text: #eaf0ff;
  --anime-muted: #9da9d3;
  --anime-blue: #35d4ff;
  --anime-purple: #7c5cff;
  --anime-red: #ff3d6e;
  --anime-gold: #ffd36a;
  --anime-shadow: 0 24px 80px rgba(0, 0, 0, 0.46);
  --anime-ease: cubic-bezier(.2, .8, .2, 1);
  --author-chip-bg: linear-gradient(135deg, rgba(3, 8, 24, 0.88), rgba(24, 21, 54, 0.82));
  --author-chip-border: var(--anime-border);
  --author-chip-text: #f7fbff;
  --author-chip-name: #beb4ff;
  --author-chip-shadow: 0 14px 36px rgba(0, 0, 0, 0.34);
  --author-chip-name-shadow: 0 0 18px rgba(124, 92, 255, 0.56);
}

html {
  background: var(--anime-bg);
}

body {
  color: var(--anime-text);
  background:
    radial-gradient(circle at 16% 12%, rgba(53, 212, 255, 0.2), transparent 28rem),
    radial-gradient(circle at 86% 18%, rgba(124, 92, 255, 0.28), transparent 32rem),
    radial-gradient(circle at 70% 78%, rgba(255, 61, 110, 0.13), transparent 26rem),
    linear-gradient(135deg, var(--anime-bg), var(--anime-bg-2) 58%, #050611);
  overflow-x: hidden;
}

body.anime-home-page a,
body.anime-home-page a:hover,
body.anime-home-page a:focus-visible,
body.anime-home-page a:active {
  text-decoration: none;
}

body::before,
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
}

body::before {
  background-image:
    linear-gradient(rgba(53, 212, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(53, 212, 255, 0.05) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, black, transparent 82%);
}

body::after {
  background: linear-gradient(transparent 94%, rgba(53, 212, 255, 0.08) 95%, transparent 100%);
  background-size: 100% 9px;
  mix-blend-mode: screen;
  opacity: 0.45;
}

.page-header {
  min-height: 42svh;
  display: grid;
  place-items: center;
  padding: clamp(4rem, 10vh, 8rem) 1rem;
  border-bottom: 1px solid rgba(53, 212, 255, 0.18);
  background-color: #10142d;
  background-image:
    linear-gradient(to top, rgba(7, 9, 23, 0.92), rgba(7, 9, 23, 0.18) 56%, rgba(7, 9, 23, 0.78)),
    radial-gradient(circle at 72% 18%, rgba(53, 212, 255, 0.28), transparent 18rem),
    url('../picture/headPic.jpg');
  background-size: cover;
  box-shadow: inset 0 -80px 90px rgba(7, 9, 23, 0.78);
}

body.home-page .page-header {
  min-height: 100svh;
}

.page-header::before {
  background:
    linear-gradient(90deg, transparent, rgba(53, 212, 255, 0.18), transparent),
    radial-gradient(circle at 50% 50%, rgba(124, 92, 255, 0.2), transparent 22rem);
  opacity: 0.7;
}

.page-title {
  margin: 0;
  max-width: min(100%, 980px);
  color: var(--anime-text);
  font-size: clamp(2.8rem, 8vw, 7.2rem);
  line-height: 0.98;
  letter-spacing: -0.08em;
  text-shadow: 0 0 36px rgba(53, 212, 255, 0.28), 0 14px 60px rgba(0, 0, 0, 0.45);
  text-wrap: balance;
}

.author-info.secondary {
  margin-top: 1.25rem;
  padding: 0.65rem 1rem;
  border: 1px solid var(--author-chip-border);
  border-radius: 999px;
  color: var(--author-chip-text);
  background: var(--author-chip-bg);
  box-shadow: var(--author-chip-shadow);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.author-info.secondary span {
  color: var(--author-chip-name) !important;
  text-shadow: var(--author-chip-name-shadow);
}

.main-container {
  width: min(1400px, calc(100% - 2rem));
  gap: clamp(1.5rem, 3vw, 2.5rem);
  padding: clamp(1.5rem, 4vh, 3rem) 0;
}

.sidebar {
  width: 270px;
}

.nav-container,
.section,
.home-intro,
.country-article,
.object-item,
.event-item,
.term-item,
.content-section,
.other-content-box,
.org-box {
  border: 1px solid var(--anime-border);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.08), transparent),
    var(--anime-surface);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), var(--anime-shadow);
  backdrop-filter: blur(18px);
}

.nav-container {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  padding: 1.25rem;
}

.nav-container::before {
  content: 'ARCHIVE DIRECTORY';
  display: block;
  margin-bottom: 0.8rem;
  color: var(--anime-blue);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
}

.nav-title {
  color: var(--anime-text);
  border-bottom-color: rgba(53, 212, 255, 0.2);
}

.nav-list {
  display: grid;
  gap: 0.55rem;
}

.nav-item {
  margin: 0;
}

.nav-link {
  min-height: 44px;
  color: var(--anime-muted);
  border: 1px solid transparent;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.035);
  letter-spacing: 0.04em;
  transition: background-color 0.22s var(--anime-ease), color 0.22s var(--anime-ease), transform 0.22s var(--anime-ease), box-shadow 0.22s var(--anime-ease), border-color 0.22s var(--anime-ease);
}

.nav-link:hover,
.nav-link:focus-visible,
.nav-link.active {
  color: var(--anime-text);
  border-color: var(--anime-border-hot);
  background: rgba(53, 212, 255, 0.1);
  box-shadow: 0 0 26px rgba(53, 212, 255, 0.12), inset 0 0 16px rgba(53, 212, 255, 0.06);
  transform: translateX(4px);
}

.content-area {
  min-width: 0;
}

.section,
.home-intro {
  border-radius: 32px;
  padding: clamp(1.25rem, 3vw, 2.25rem);
}

.section-title {
  color: var(--anime-text);
  border-bottom: 1px solid rgba(53, 212, 255, 0.28);
  font-size: clamp(1.7rem, 3vw, 2.55rem);
  letter-spacing: -0.04em;
}

.section-title::before {
  content: 'FILE / ';
  color: var(--anime-blue);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  vertical-align: middle;
}

.country-title,
.object-item h3,
.event-item h3,
.term-item h3,
.country-article h3,
.content-section h3 {
  color: #fff;
  border-bottom-color: rgba(124, 92, 255, 0.26);
  text-shadow: 0 0 18px rgba(124, 92, 255, 0.22);
}

h4,
h5,
.subsection-title {
  color: #d9e2ff;
  border-bottom-color: rgba(53, 212, 255, 0.16);
}

.content-paragraph,
.home-intro .content-paragraph,
.home-intro li,
.country-article p,
.object-item p,
.event-item p,
.term-item p,
.content-section p,
.other-content-box p,
.org-box p {
  color: #cbd6f6;
}

.highlight-text,
strong {
  color: #f2d6ff;
}

.image-slider {
  height: clamp(260px, 44svh, 480px);
  border: 1px solid rgba(53, 212, 255, 0.26);
  border-radius: 30px;
  background: var(--anime-surface);
  box-shadow: var(--anime-shadow), 0 0 44px rgba(124, 92, 255, 0.14);
}

.slider-item {
  background:
    radial-gradient(circle at 50% 20%, rgba(53, 212, 255, 0.12), transparent 20rem),
    rgba(16, 20, 45, 0.72);
}

.slider-item img,
.map-image img,
.content-paragraph img {
  border-radius: 22px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
}

.slider-btn,
.mode-toggle,
.music-toggle,
.back-to-top {
  min-width: 44px;
  min-height: 44px;
  color: var(--anime-text);
  border: 1px solid rgba(53, 212, 255, 0.32);
  background: rgba(7, 9, 23, 0.62);
  backdrop-filter: blur(12px);
  box-shadow: 0 0 24px rgba(53, 212, 255, 0.12);
}

.slider-btn:hover,
.mode-toggle:hover,
.music-toggle:hover,
.back-to-top:hover {
  color: #fff;
  border-color: var(--anime-border-hot);
  background: rgba(53, 212, 255, 0.13);
  transform: translateY(-2px) scale(1.04);
}

.mode-toggle:focus-visible,
.music-toggle:focus-visible,
.slider-btn:focus-visible,
.back-to-top:focus-visible,
.nav-link:focus-visible,
.sub-nav a:focus-visible {
  outline: 2px solid var(--anime-blue);
  outline-offset: 3px;
}

.sub-nav ul {
  gap: 0.75rem;
}

.sub-nav a {
  color: #dbe5ff;
  border: 1px solid rgba(124, 92, 255, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  transition: background-color 0.22s var(--anime-ease), color 0.22s var(--anime-ease), box-shadow 0.22s var(--anime-ease), border-color 0.22s var(--anime-ease);
}

.sub-nav li:hover,
.sub-nav li:hover + li,
.sub-nav li:hover ~ li {
  transform: none;
}

.sub-nav li:hover a,
.sub-nav a:focus-visible {
  color: #fff;
  border-color: var(--anime-border-hot);
  background: rgba(53, 212, 255, 0.12);
  box-shadow: 0 0 24px rgba(53, 212, 255, 0.13);
}

.country-article,
.object-item,
.event-item,
.term-item,
.content-section,
.other-content-box,
.org-box {
  border-radius: 26px;
  transition: transform 0.22s var(--anime-ease), box-shadow 0.22s var(--anime-ease), border-color 0.22s var(--anime-ease), background-color 0.22s var(--anime-ease);
}

.country-article:hover,
.object-item:hover,
.event-item:hover,
.term-item:hover,
.content-section:hover,
.other-content-box:hover,
.org-box:hover {
  border-color: var(--anime-border-hot);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.34), 0 0 32px rgba(53, 212, 255, 0.11);
  transform: translateY(-3px);
}

table {
  overflow: hidden;
  border-radius: 18px;
  border-collapse: separate;
  border-spacing: 0;
}

table th,
table td {
  border-color: rgba(124, 92, 255, 0.22) !important;
}

table th {
  color: #fff;
  background: rgba(53, 212, 255, 0.1) !important;
}

iframe {
  border-radius: 24px;
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.32);
}

.page-footer {
  border-top: 1px solid rgba(53, 212, 255, 0.18);
  color: var(--anime-muted);
  background: rgba(7, 9, 23, 0.76);
}

.page-footer p {
  color: var(--anime-muted);
}

html.dark-mode,
body.dark-mode {
  color-scheme: dark;
  background:
    radial-gradient(circle at 16% 12%, rgba(53, 212, 255, 0.2), transparent 28rem),
    radial-gradient(circle at 86% 18%, rgba(124, 92, 255, 0.28), transparent 32rem),
    linear-gradient(135deg, var(--anime-bg), var(--anime-bg-2) 58%, #050611);
}

body.dark-mode .nav-container,
body.dark-mode .section,
body.dark-mode .home-intro,
body.dark-mode .country-article,
body.dark-mode .object-item,
body.dark-mode .event-item,
body.dark-mode .term-item,
body.dark-mode .content-section,
body.dark-mode .other-content-box,
body.dark-mode .org-box {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.08), transparent),
    var(--anime-surface);
  border-color: var(--anime-border);
}

/* 首页高还原番剧官网布局 */
.anime-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.anime-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  backdrop-filter: blur(18px);
}

.brand-mark {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: var(--anime-text);
  font-weight: 800;
  letter-spacing: 0.08em;
}

.brand-sigil {
  width: 42px;
  height: 42px;
  border: 1px solid var(--anime-border-hot);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(53, 212, 255, 0.18), rgba(124, 92, 255, 0.3)),
    rgba(255, 255, 255, 0.04);
  box-shadow: 0 0 28px rgba(53, 212, 255, 0.24), inset 0 0 18px rgba(124, 92, 255, 0.18);
  display: grid;
  place-items: center;
  position: relative;
  flex: 0 0 auto;
}

.brand-sigil::before {
  content: '';
  width: 18px;
  height: 18px;
  border: 2px solid var(--anime-blue);
  border-left-color: transparent;
  border-radius: 50%;
  transform: rotate(-24deg);
}

.nav-pills {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(7, 9, 23, 0.46);
  scrollbar-width: none;
}

.nav-pills::-webkit-scrollbar {
  display: none;
}

.nav-pills a {
  flex: 0 0 auto;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  padding: 0 15px;
  border-radius: 999px;
  color: var(--anime-muted);
  font-size: 0.9rem;
  transition: color 180ms var(--anime-ease), background-color 180ms var(--anime-ease), box-shadow 180ms var(--anime-ease);
}

.nav-pills a:hover,
.nav-pills a:focus-visible {
  color: var(--anime-text);
  background: rgba(53, 212, 255, 0.1);
  box-shadow: inset 0 0 0 1px rgba(53, 212, 255, 0.2);
  outline: none;
}

.anime-header-controls {
  position: static;
  flex: 0 0 auto;
}

.anime-hero {
  min-height: calc(100svh - 84px);
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(300px, 0.78fr);
  align-items: center;
  gap: clamp(24px, 4vw, 58px);
  padding: 48px 0 68px;
}

.anime-hero-copy {
  position: relative;
  z-index: 2;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  padding: 8px 13px;
  border: 1px solid rgba(53, 212, 255, 0.26);
  border-radius: 999px;
  color: #b9c9ff;
  background: rgba(53, 212, 255, 0.06);
  box-shadow: inset 0 0 16px rgba(53, 212, 255, 0.08);
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  text-transform: uppercase;
}

.eyebrow::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--anime-blue);
  box-shadow: 0 0 18px var(--anime-blue);
}

.anime-logo-title {
  margin: 0;
  max-width: 760px;
  font-size: clamp(3.6rem, 9vw, 8.4rem);
  line-height: 0.92;
  letter-spacing: -0.08em;
  text-wrap: balance;
}

.title-main {
  display: block;
  text-shadow: 0 0 32px rgba(53, 212, 255, 0.18);
}

.title-sub {
  display: block;
  color: transparent;
  -webkit-text-stroke: 1px rgba(234, 240, 255, 0.62);
  text-shadow: 0 0 38px rgba(124, 92, 255, 0.22);
}

.hero-lead {
  max-width: 640px;
  margin: 28px 0 0;
  color: #c4ceef;
  font-size: clamp(1.05rem, 1.5vw, 1.25rem);
  line-height: 1.85;
  text-wrap: pretty;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.btn {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  color: var(--anime-text);
  background: rgba(255, 255, 255, 0.06);
  font-weight: 700;
  letter-spacing: 0.04em;
  transition: transform 180ms var(--anime-ease), box-shadow 180ms var(--anime-ease), border-color 180ms var(--anime-ease), background-color 180ms var(--anime-ease);
}

.btn.primary {
  border-color: rgba(53, 212, 255, 0.45);
  background: linear-gradient(135deg, rgba(53, 212, 255, 0.22), rgba(124, 92, 255, 0.32));
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(53, 212, 255, 0.48);
  box-shadow: 0 0 34px rgba(53, 212, 255, 0.18);
  outline: none;
}

.poster-stack {
  position: relative;
  min-height: 600px;
}

.poster-card {
  position: absolute;
  inset: 32px 0 auto auto;
  width: min(430px, 100%);
  aspect-ratio: 0.78;
  margin: 0;
  border: 1px solid rgba(53, 212, 255, 0.28);
  border-radius: 34px;
  overflow: hidden;
  background: #10142d;
  box-shadow: var(--anime-shadow), 0 0 50px rgba(124, 92, 255, 0.2);
  transform: rotate(2deg);
}

.poster-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.12) contrast(1.05) brightness(0.72);
}

.poster-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(7, 9, 23, 0.92), transparent 58%),
    radial-gradient(circle at 78% 22%, rgba(53, 212, 255, 0.34), transparent 12rem);
}

.poster-label {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 24px;
  z-index: 2;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 22px;
  background: rgba(7, 9, 23, 0.56);
  backdrop-filter: blur(14px);
}

.poster-label strong {
  display: block;
  margin-bottom: 7px;
  font-size: 1.35rem;
}

.poster-label span {
  color: var(--anime-muted);
  line-height: 1.7;
}

.floating-panel {
  position: absolute;
  left: 0;
  bottom: 44px;
  width: min(330px, 82%);
  padding: 18px;
  border: 1px solid rgba(124, 92, 255, 0.34);
  border-radius: 26px;
  background: rgba(18, 22, 45, 0.66);
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.3), inset 0 0 24px rgba(124, 92, 255, 0.08);
  backdrop-filter: blur(16px);
}

.signal-line {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 12px;
  align-items: center;
  margin: 12px 0;
  color: #c8d4ff;
  font-size: 0.9rem;
}

.meter,
.progress {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.meter span,
.progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--anime-blue), var(--anime-purple));
  box-shadow: 0 0 16px rgba(53, 212, 255, 0.42);
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin: 34px 0 22px;
}

.section-kicker {
  color: var(--anime-blue);
  letter-spacing: 0.16em;
  font-size: 0.78rem;
  text-transform: uppercase;
}

.section-head h2 {
  margin: 8px 0 0;
  color: var(--anime-text);
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1.05;
  letter-spacing: -0.05em;
  text-wrap: balance;
}

.section-note {
  max-width: 420px;
  color: var(--anime-muted);
  line-height: 1.8;
  text-align: right;
}

.archive-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  padding-bottom: 48px;
}

.archive-card {
  min-height: 184px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px;
  border: 1px solid var(--anime-border);
  border-radius: 26px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.08), transparent),
    var(--anime-surface);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  overflow: hidden;
  transition: transform 220ms var(--anime-ease), border-color 220ms var(--anime-ease), box-shadow 220ms var(--anime-ease), background-color 220ms var(--anime-ease);
}

.archive-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 0%), rgba(53, 212, 255, 0.24), transparent 12rem);
  opacity: 0;
  transition: opacity 220ms var(--anime-ease);
}

.archive-card:hover,
.archive-card:focus-visible {
  transform: translateY(-6px);
  border-color: var(--anime-border-hot);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28), 0 0 34px rgba(53, 212, 255, 0.12);
  outline: none;
}

.archive-card:hover::before,
.archive-card:focus-visible::before {
  opacity: 1;
}

.card-index {
  color: var(--anime-blue);
  font-size: 0.82rem;
  letter-spacing: 0.18em;
}

.card-title {
  position: relative;
  z-index: 1;
  font-size: 1.45rem;
  font-weight: 800;
}

.card-desc {
  position: relative;
  z-index: 1;
  color: var(--anime-muted);
  line-height: 1.75;
  margin-top: 12px;
}

.world-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.75fr);
  gap: 18px;
  margin: 8px 0 52px;
}

.map-frame,
.episode-panel {
  border: 1px solid rgba(53, 212, 255, 0.24);
  border-radius: 30px;
  background: var(--anime-surface);
  box-shadow: var(--anime-shadow);
  overflow: hidden;
}

.map-frame {
  min-height: 390px;
  position: relative;
}

.map-frame img {
  width: 100%;
  height: 100%;
  min-height: 390px;
  object-fit: cover;
  filter: saturate(1.08) contrast(1.1) brightness(0.52) hue-rotate(8deg);
}

.map-frame::after {
  content: '现代世界地图 / 古代世界地图';
  position: absolute;
  left: 22px;
  bottom: 22px;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  color: #d8e2ff;
  background: rgba(7, 9, 23, 0.58);
  backdrop-filter: blur(12px);
  letter-spacing: 0.05em;
}

.episode-panel {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.episode-tag {
  width: fit-content;
  padding: 8px 12px;
  border: 1px solid rgba(255, 61, 110, 0.28);
  border-radius: 999px;
  color: #ffe6f0;
  background: rgba(255, 61, 110, 0.16);
  letter-spacing: 0.08em;
  font-size: 0.82rem;
}

.episode-title {
  margin: 0;
  color: var(--anime-text);
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.video-embed {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  max-width: 100%;
  border-radius: 24px;
}

.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.timeline-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  padding-bottom: 72px;
}

.timeline-card {
  min-height: 128px;
  position: relative;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.045);
}

.timeline-card::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 18px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--anime-gold);
  box-shadow: 0 0 18px rgba(255, 211, 106, 0.75);
}

.timeline-card strong {
  display: block;
  margin-bottom: 10px;
  color: #fff4cf;
}

.timeline-card span {
  color: var(--anime-muted);
  line-height: 1.7;
}

.reveal {
  animation: riseIn 700ms var(--anime-ease) both;
}

.reveal:nth-child(2) { animation-delay: 80ms; }
.reveal:nth-child(3) { animation-delay: 140ms; }
.reveal:nth-child(4) { animation-delay: 200ms; }

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

@media (max-width: 1024px) {
  .anime-topbar,
  .section-head {
    align-items: stretch;
    flex-direction: column;
  }

  .anime-hero,
  .world-panel {
    grid-template-columns: 1fr;
  }

  .poster-stack {
    min-height: 560px;
  }

  .poster-card {
    left: 50%;
    right: auto;
    transform: translateX(-50%) rotate(1deg);
  }

  .archive-grid,
  .timeline-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .section-note {
    text-align: left;
  }

  .main-container {
    width: min(100% - 1.25rem, 1400px);
  }

  .sidebar {
    width: 100%;
  }

  .nav-list {
    display: flex;
    gap: 0.75rem;
  }

  .nav-link:hover,
  .nav-link:focus-visible,
  .nav-link.active {
    transform: translateY(-2px);
  }
}

@media (max-width: 640px) {
  .anime-shell {
    width: min(100% - 22px, 1180px);
  }

  .anime-hero {
    padding-top: 28px;
  }

  .anime-logo-title,
  .page-title {
    font-size: clamp(2.4rem, 15vw, 4.3rem);
  }

  .hero-actions {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  .poster-stack {
    min-height: 500px;
  }

  .floating-panel {
    width: 100%;
    bottom: 16px;
  }

  .archive-grid,
  .timeline-strip {
    grid-template-columns: 1fr;
  }

  .page-title {
    font-size: clamp(2.4rem, 15vw, 4.3rem);
  }

  .section,
  .home-intro,
  .nav-container {
    border-radius: 24px;
  }

  .header-controls {
    gap: 0.5rem;
  }
}

html.light-mode,
body.light-mode {
  color-scheme: light;
  --anime-bg: #f8fbff;
  --anime-bg-2: #eef5ff;
  --anime-surface: rgba(255, 255, 255, 0.82);
  --anime-surface-strong: rgba(255, 255, 255, 0.94);
  --anime-border: rgba(63, 117, 211, 0.2);
  --anime-border-hot: rgba(35, 133, 225, 0.42);
  --anime-text: #17213d;
  --anime-muted: #5b6685;
  --anime-blue: #1679cf;
  --anime-purple: #6f55d9;
  --anime-red: #d92859;
  --anime-gold: #a86808;
  --anime-shadow: 0 24px 70px rgba(71, 106, 158, 0.18);
  --author-chip-bg: linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(231, 242, 255, 0.9));
  --author-chip-border: rgba(22, 121, 207, 0.36);
  --author-chip-text: #243047;
  --author-chip-name: #7d2188;
  --author-chip-shadow: 0 12px 30px rgba(40, 84, 148, 0.18);
  --author-chip-name-shadow: none;
  background:
    radial-gradient(circle at 18% 8%, rgba(88, 172, 255, 0.25), transparent 27rem),
    radial-gradient(circle at 86% 16%, rgba(145, 125, 255, 0.2), transparent 30rem),
    linear-gradient(135deg, #ffffff, var(--anime-bg-2) 58%, #f7faff);
}

body.light-mode::before {
  background-image:
    linear-gradient(rgba(22, 121, 207, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(22, 121, 207, 0.06) 1px, transparent 1px);
}

body.light-mode::after {
  opacity: 0.16;
}

body.light-mode .page-header {
  border-bottom-color: rgba(22, 121, 207, 0.18);
  background-color: #f4f8ff;
  background-image:
    linear-gradient(to top, rgba(248, 251, 255, 0.94), rgba(248, 251, 255, 0.36) 56%, rgba(255, 255, 255, 0.86)),
    radial-gradient(circle at 72% 18%, rgba(22, 121, 207, 0.2), transparent 18rem),
    url('../picture/headPic.jpg');
  box-shadow: inset 0 -70px 80px rgba(248, 251, 255, 0.88);
}

body.light-mode .nav-container,
body.light-mode .section,
body.light-mode .home-intro,
body.light-mode .country-article,
body.light-mode .object-item,
body.light-mode .event-item,
body.light-mode .term-item,
body.light-mode .content-section,
body.light-mode .other-content-box,
body.light-mode .org-box,
body.light-mode .archive-card,
body.light-mode .episode-panel,
body.light-mode .map-showcase {
  background:
    linear-gradient(145deg, rgba(22, 121, 207, 0.08), transparent),
    var(--anime-surface);
  border-color: var(--anime-border);
  box-shadow: var(--anime-shadow);
}

body.light-mode .nav-pills,
body.light-mode .floating-panel,
body.light-mode .poster-label,
body.light-mode .page-footer,
body.light-mode .slider-btn,
body.light-mode .mode-toggle,
body.light-mode .music-toggle,
body.light-mode .back-to-top {
  background: rgba(255, 255, 255, 0.72);
  color: var(--anime-text);
}

body.light-mode .hero-lead,
body.light-mode .content-paragraph,
body.light-mode .home-intro .content-paragraph,
body.light-mode .home-intro li,
body.light-mode .country-article p,
body.light-mode .object-item p,
body.light-mode .event-item p,
body.light-mode .term-item p,
body.light-mode .content-section p,
body.light-mode .other-content-box p,
body.light-mode .org-box p,
body.light-mode .card-desc,
body.light-mode .section-note,
body.light-mode .poster-label span {
  color: var(--anime-muted);
}

body.light-mode .country-title,
body.light-mode .object-item h3,
body.light-mode .event-item h3,
body.light-mode .term-item h3,
body.light-mode .country-article h3,
body.light-mode .content-section h3,
body.light-mode h4,
body.light-mode h5,
body.light-mode .subsection-title,
body.light-mode .episode-title,
body.light-mode .section-head h2,
body.light-mode .page-title,
body.light-mode .brand-mark,
body.light-mode .card-title {
  color: var(--anime-text);
  text-shadow: none;
}

body.light-mode .title-sub {
  -webkit-text-stroke-color: rgba(23, 33, 61, 0.54);
  text-shadow: 0 0 30px rgba(111, 85, 217, 0.12);
}

body.light-mode .poster-card img,
body.light-mode .home-map-image {
  filter: saturate(1.04) contrast(1.02) brightness(0.96);
}

.page-header {
  min-height: 34svh;
  padding: clamp(3rem, 7vh, 5.8rem) 1rem;
}

.page-title {
  font-size: clamp(2.3rem, 6vw, 5.6rem);
}

.anime-shell {
  width: 100%;
  margin: 0;
}

.anime-shell > main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.anime-topbar,
.anime-footer {
  width: 100%;
  margin: 0;
  padding-left: max(16px, calc((100% - 1180px) / 2));
  padding-right: max(16px, calc((100% - 1180px) / 2));
}

.anime-topbar {
  background: rgba(7, 9, 23, 0.52);
  border-bottom: 1px solid rgba(53, 212, 255, 0.12);
}

body.light-mode .anime-topbar {
  background: rgba(255, 255, 255, 0.72);
  border-bottom-color: rgba(22, 121, 207, 0.16);
}

.anime-hero {
  min-height: min(780px, calc(100svh - 74px));
  padding: 34px 0 52px;
}

.episode-panel-wide {
  margin: 8px 0 52px;
}

.episode-panel-wide .video-embed {
  max-width: 980px;
  width: 100%;
  margin: 0 auto;
}

.map-switch {
  display: inline-flex;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--anime-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

.map-switch-btn {
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--anime-muted);
  background: transparent;
  cursor: pointer;
  transition: color 180ms var(--anime-ease), background-color 180ms var(--anime-ease), border-color 180ms var(--anime-ease), transform 180ms var(--anime-ease);
}

.map-switch-btn:hover,
.map-switch-btn:focus-visible,
.map-switch-btn.active {
  color: var(--anime-text);
  border-color: var(--anime-border-hot);
  background: rgba(53, 212, 255, 0.12);
  outline: none;
  transform: translateY(-1px);
}

.map-showcase {
  position: relative;
  margin: 8px 0 52px;
  border: 1px solid rgba(53, 212, 255, 0.24);
  border-radius: 30px;
  background: var(--anime-surface);
  box-shadow: var(--anime-shadow);
  overflow: hidden;
}

.home-map-image {
  display: block;
  width: 100%;
  height: auto;
  filter: saturate(1.08) contrast(1.1) brightness(0.58) hue-rotate(8deg);
  transition: opacity 180ms var(--anime-ease), filter 180ms var(--anime-ease);
}

.timeline-drag-area {
  position: relative;
  margin: 8px 0 72px;
  padding: clamp(1.1rem, 3vw, 2rem);
  border: 1px solid var(--anime-border);
  border-radius: 34px;
  background:
    radial-gradient(circle at 18% 24%, rgba(53, 212, 255, 0.14), transparent 18rem),
    radial-gradient(circle at 82% 74%, rgba(124, 92, 255, 0.16), transparent 20rem),
    var(--anime-surface);
  box-shadow: var(--anime-shadow);
  overflow-x: auto;
  overflow-y: hidden;
  cursor: grab;
  scrollbar-width: thin;
  scrollbar-color: var(--anime-blue) rgba(255, 255, 255, 0.08);
  touch-action: pan-y;
  user-select: none;
}

.timeline-drag-area.dragging {
  cursor: grabbing;
}

.timeline-image-viewer {
  padding: clamp(0.75rem, 2vw, 1.25rem);
}

.timeline-image-button {
  display: block;
  width: max-content;
  max-width: none;
  padding: 0;
  border: 0;
  border-radius: 24px;
  background: transparent;
  cursor: zoom-in;
}

.timeline-drag-area.dragging .timeline-image-button {
  cursor: grabbing;
}

.timeline-image-button:focus-visible {
  outline: 2px solid var(--anime-blue);
  outline-offset: 4px;
}

.timeline-image {
  display: block;
  width: auto;
  max-width: none;
  height: clamp(230px, 32vw, 390px);
  border-radius: 24px;
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.34);
  pointer-events: none;
  user-select: none;
}

.timeline-lightbox-open {
  overflow: hidden;
}

.timeline-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: clamp(1rem, 3vw, 2rem);
  background: rgba(4, 7, 18, 0.86);
  opacity: 0;
  visibility: hidden;
  transition: opacity 180ms var(--anime-ease), visibility 180ms var(--anime-ease);
}

.timeline-lightbox.open {
  opacity: 1;
  visibility: visible;
}

.timeline-lightbox-frame {
  width: min(100%, 1800px);
  max-height: 86svh;
  overflow: auto;
  border: 1px solid rgba(53, 212, 255, 0.28);
  border-radius: 28px;
  background: rgba(7, 9, 23, 0.82);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.54);
}

.timeline-lightbox-image {
  display: block;
  width: auto;
  max-width: none;
  height: clamp(420px, 78svh, 760px);
}

.timeline-lightbox-close {
  position: fixed;
  top: clamp(0.75rem, 2vw, 1.25rem);
  right: clamp(0.75rem, 2vw, 1.25rem);
  width: 44px;
  height: 44px;
  border: 1px solid rgba(53, 212, 255, 0.34);
  border-radius: 50%;
  color: var(--anime-text);
  background: rgba(7, 9, 23, 0.82);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.32);
  cursor: pointer;
}

.timeline-lightbox-close:hover,
.timeline-lightbox-close:focus-visible {
  border-color: var(--anime-border-hot);
  background: rgba(53, 212, 255, 0.16);
}

.timeline-drag-area::-webkit-scrollbar {
  height: 10px;
}

.timeline-drag-area::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
}

.timeline-drag-area::-webkit-scrollbar-thumb {
  background: linear-gradient(90deg, var(--anime-blue), var(--anime-purple));
  border-radius: 999px;
}

.timeline-hint {
  margin: 0 0 1rem;
  color: var(--anime-muted);
  font-size: 0.9rem;
  letter-spacing: 0.04em;
}

.timeline-sequence {
  position: relative;
  display: flex;
  align-items: center;
  gap: 34px;
  width: max-content;
  min-width: 100%;
  min-height: 260px;
  margin: 0;
  padding: 44px 26px 48px;
  list-style: none;
}

.timeline-sequence::before {
  content: '';
  position: absolute;
  left: 42px;
  right: 42px;
  top: 50%;
  height: 78px;
  border-top: 3px solid rgba(53, 212, 255, 0.42);
  border-radius: 50% 50% 0 0;
  transform: translateY(-40%);
  filter: drop-shadow(0 0 14px rgba(53, 212, 255, 0.34));
}

.timeline-sequence::after {
  content: '';
  position: absolute;
  left: 90px;
  right: 90px;
  top: 50%;
  height: 80px;
  border-bottom: 3px solid rgba(255, 211, 106, 0.32);
  border-radius: 0 0 50% 50%;
  transform: translateY(-48%);
  pointer-events: none;
}

.timeline-sequence li {
  position: relative;
  z-index: 1;
  flex: 0 0 180px;
  display: grid;
  justify-items: center;
  gap: 10px;
  text-align: center;
}

.timeline-sequence li:nth-child(odd) {
  transform: translateY(-48px);
}

.timeline-sequence li:nth-child(even) {
  transform: translateY(52px);
}

.timeline-sequence li::before {
  content: '';
  width: 16px;
  height: 16px;
  border: 2px solid var(--anime-blue);
  border-radius: 50%;
  background: var(--anime-bg);
  box-shadow: 0 0 18px rgba(53, 212, 255, 0.56);
  order: 2;
}

.timeline-sequence li:nth-child(even)::before {
  border-color: var(--anime-gold);
  box-shadow: 0 0 18px rgba(255, 211, 106, 0.5);
}

.timeline-node-index {
  order: 1;
  min-width: 42px;
  padding: 5px 0;
  border: 1px solid rgba(53, 212, 255, 0.34);
  border-radius: 999px;
  color: var(--anime-blue);
  background: rgba(7, 9, 23, 0.78);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.timeline-sequence li > span:last-child {
  order: 3;
  display: inline-flex;
  justify-content: center;
  min-height: 54px;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(53, 212, 255, 0.24);
  border-radius: 18px;
  color: var(--anime-text);
  background: rgba(7, 9, 23, 0.54);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.18), inset 0 0 18px rgba(53, 212, 255, 0.06);
  line-height: 1.5;
}

.timeline-sequence li:nth-child(even) > span:last-child {
  border-color: rgba(255, 211, 106, 0.24);
}

body.light-mode .timeline-drag-area,
body.light-mode .timeline-node-index,
body.light-mode .timeline-sequence li > span:last-child {
  background: rgba(255, 255, 255, 0.82);
}

body.light-mode .timeline-lightbox {
  background: rgba(12, 23, 46, 0.66);
}

body.light-mode .timeline-lightbox-frame,
body.light-mode .timeline-lightbox-close {
  background: rgba(255, 255, 255, 0.94);
}

body.light-mode .timeline-lightbox-close {
  color: var(--anime-text);
}

body.light-mode .timeline-sequence li::before {
  background: #ffffff;
}

@media (max-width: 1024px) {
  .anime-shell > main {
    width: min(100% - 1.25rem, 1180px);
  }

  .map-switch {
    width: fit-content;
  }
}

@media (max-width: 640px) {
  body {
    overflow-x: clip;
  }

  body.home-page {
    scroll-snap-type: none;
  }

  .anime-shell {
    width: 100%;
  }

  .anime-topbar,
  .anime-footer {
    padding-left: 11px;
    padding-right: 11px;
  }

  .anime-topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding-top: 10px;
    padding-bottom: 8px;
  }

  .brand-mark {
    gap: 9px;
    font-size: 0.78rem;
    letter-spacing: 0.04em;
  }

  .brand-mark span:last-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .brand-sigil {
    width: 36px;
    height: 36px;
    border-radius: 12px;
  }

  .anime-header-controls {
    justify-self: end;
    gap: 8px;
  }

  .mode-toggle,
  .music-toggle,
  .slider-btn {
    min-width: 42px;
    min-height: 42px;
  }

  .nav-pills {
    grid-column: 1 / -1;
    width: 100%;
    justify-content: flex-start;
    gap: 6px;
    overflow-x: auto;
    padding: 5px;
    border-radius: 18px;
    scroll-padding-inline: 6px;
    -webkit-overflow-scrolling: touch;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 16px), transparent);
    mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 16px), transparent);
  }

  .nav-pills a {
    min-height: 40px;
    padding: 0 13px;
    font-size: 0.84rem;
    scroll-snap-align: start;
  }

  .anime-shell > main {
    width: min(100% - 22px, 1180px);
  }

  .anime-hero {
    min-height: auto;
    gap: 18px;
    padding: 24px 0 32px;
  }

  .eyebrow {
    margin-bottom: 14px;
    padding: 7px 11px;
    font-size: 0.68rem;
    letter-spacing: 0.08em;
  }

  .anime-logo-title,
  .page-title {
    font-size: clamp(2.55rem, 13vw, 4.1rem);
    line-height: 0.98;
    letter-spacing: -0.05em;
  }

  .hero-lead {
    margin-top: 18px;
    font-size: 1rem;
    line-height: 1.72;
  }

  .author-info.secondary {
    width: fit-content;
    max-width: 100%;
    margin-top: 1rem;
  }

  .hero-actions {
    gap: 10px;
    margin-top: 22px;
  }

  .btn {
    min-height: 46px;
    padding: 0 16px;
    border-radius: 14px;
  }

  .poster-stack {
    min-height: 390px;
  }

  .poster-card {
    inset: 10px auto auto 50%;
    width: min(78vw, 300px);
    border-radius: 24px;
    transform: translateX(-50%) rotate(1deg);
  }

  .poster-label {
    left: 14px;
    right: 14px;
    bottom: 14px;
    padding: 13px;
    border-radius: 18px;
  }

  .poster-label strong {
    font-size: 1.05rem;
  }

  .poster-label span {
    display: block;
    font-size: 0.86rem;
    line-height: 1.55;
  }

  .floating-panel {
    left: 50%;
    bottom: 0;
    width: min(100%, 330px);
    padding: 14px;
    border-radius: 20px;
    transform: translateX(-50%);
  }

  .signal-line {
    grid-template-columns: 74px 1fr;
    gap: 10px;
    margin: 9px 0;
    font-size: 0.82rem;
  }

  .image-slider {
    height: clamp(190px, 52vw, 260px);
    border-radius: 22px;
  }

  .section-head {
    gap: 10px;
    margin: 28px 0 16px;
  }

  .section-head h2 {
    font-size: clamp(1.8rem, 9vw, 2.6rem);
    letter-spacing: -0.035em;
  }

  .section-note {
    max-width: 100%;
    line-height: 1.65;
  }

  .archive-grid {
    gap: 12px;
    padding-bottom: 32px;
  }

  .archive-card {
    min-height: auto;
    padding: 16px;
    border-radius: 20px;
  }

  .card-title {
    font-size: 1.25rem;
  }

  .card-desc {
    line-height: 1.6;
  }

  .episode-panel {
    gap: 14px;
    padding: 14px;
    border-radius: 22px;
  }

  .episode-title {
    font-size: clamp(1.45rem, 7vw, 2rem);
    line-height: 1.16;
    letter-spacing: -0.03em;
  }

  .video-embed {
    border-radius: 16px;
  }

  .map-switch {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    gap: 6px;
    border-radius: 18px;
  }

  .map-switch-btn {
    flex: 1;
    min-height: 42px;
    padding: 0 10px;
    font-size: 0.86rem;
  }

  .map-showcase {
    margin-bottom: 34px;
    border-radius: 22px;
    overflow-x: auto;
  }

  .home-map-image {
    min-width: 580px;
  }

  .timeline-drag-area {
    margin-bottom: 42px;
    padding: 0.75rem;
    border-radius: 24px;
  }

  .timeline-image {
    height: clamp(190px, 56vw, 260px);
    border-radius: 18px;
  }

  .timeline-lightbox {
    padding: 0.75rem;
  }

  .timeline-lightbox-frame {
    max-height: 82svh;
    border-radius: 20px;
  }

  .timeline-lightbox-image {
    height: min(720px, 82svh);
  }

  .timeline-lightbox-close {
    width: 46px;
    height: 46px;
  }

  .timeline-sequence {
    min-height: 250px;
    padding-inline: 10px;
  }

  .timeline-sequence li {
    flex-basis: 158px;
  }

  .main-container {
    width: min(100% - 1rem, 1400px);
    gap: 1rem;
    padding: 0.75rem 0 1.25rem;
  }

  .page-header {
    min-height: auto;
    padding: 4.25rem 1rem 2.25rem;
  }

  .page-header .header-controls {
    top: 0.75rem;
    left: 0.75rem;
    gap: 0.5rem;
  }

  .nav-container,
  .section,
  .home-intro,
  .country-article,
  .object-item,
  .event-item,
  .term-item,
  .content-section,
  .other-content-box,
  .org-box {
    border-radius: 20px;
    padding: 1rem;
  }

  .nav-list,
  .sub-nav ul {
    gap: 0.5rem;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 0.35rem;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
  }

  .nav-item,
  .sub-nav li {
    flex: 0 0 auto;
  }

  .nav-link,
  .sub-nav a {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
  }

  .sub-nav li:hover,
  .sub-nav li:hover + li,
  .sub-nav li:hover ~ li {
    transform: none;
  }

  .section-title,
  .country-title {
    font-size: clamp(1.5rem, 8vw, 2rem);
  }

  .object-item h3,
  .event-item h3,
  .term-item h3,
  .country-article h3,
  .content-section h3 {
    font-size: 1.25rem;
  }

  .content-paragraph,
  .country-article p,
  .object-item p,
  .event-item p,
  .term-item p,
  .content-section p,
  .other-content-box p,
  .org-box p {
    line-height: 1.75;
    text-wrap: pretty;
  }

  table {
    display: block;
    width: 100%;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
  }

  .back-to-top {
    right: 0.75rem;
    bottom: 0.75rem;
  }
}

@media (max-width: 420px) {
  .anime-shell > main {
    width: calc(100% - 14px);
  }

  .nav-pills a {
    padding: 0 11px;
    font-size: 0.8rem;
  }

  .poster-stack {
    min-height: 350px;
  }

  .poster-card {
    width: min(76vw, 260px);
  }

  .floating-panel {
    width: min(100%, 300px);
  }

  .image-slider {
    height: clamp(176px, 54vw, 220px);
  }

  .home-map-image {
    min-width: 520px;
  }

  .timeline-image {
    height: clamp(176px, 58vw, 230px);
  }
}

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