:root {
  color-scheme: dark;
  --night: #071328;
  --night-2: #0e2444;
  --ink: #f8f0dc;
  --muted: #c9d4df;
  --soft: #8fb6d6;
  --sky: #44b9ff;
  --sky-2: #9edcff;
  --cream: #fff0c4;
  --parchment: #f4dfaa;
  --red: #ff5757;
  --blue-fr: #2f67ff;
  --panel: rgba(6, 18, 38, 0.82);
  --panel-strong: rgba(8, 23, 48, 0.94);
  --line: rgba(255, 240, 196, 0.22);
  --line-strong: rgba(158, 220, 255, 0.4);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.4);
  --max: 1180px;
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  font-family:
    "Segoe UI",
    "Aptos",
    "Helvetica Neue",
    sans-serif;
  line-height: 1.55;
  letter-spacing: 0;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(7, 19, 40, 0.72), rgba(7, 19, 40, 0.98) 58%, #061021),
    url("../panel/assets/background.png") center top / cover fixed no-repeat;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(47, 103, 255, 0.16), transparent 28%, transparent 72%, rgba(255, 87, 87, 0.13)),
    repeating-linear-gradient(135deg, rgba(255, 240, 196, 0.045) 0 1px, transparent 1px 9px);
  mix-blend-mode: screen;
  opacity: 0.58;
  z-index: -1;
}

img {
  display: block;
  max-width: 100%;
}

[hidden] {
  display: none !important;
}

a {
  color: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

:focus-visible {
  outline: 3px solid var(--cream);
  outline-offset: 3px;
}

.shell {
  width: min(calc(100% - 32px), var(--max));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: 12px;
  z-index: 50;
  transform: translateY(-140%);
  padding: 10px 14px;
  border-radius: var(--radius);
  color: var(--night);
  background: var(--cream);
  font-weight: 800;
  transition: transform 180ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(255, 240, 196, 0.12);
  background: rgba(5, 14, 31, 0.92);
  backdrop-filter: blur(18px);
}

.header-shell {
  min-height: 78px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 20px;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-mark {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 240, 196, 0.42);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 50% 38%, rgba(255, 240, 196, 0.28), transparent 54%),
    rgba(255, 255, 255, 0.07);
  box-shadow: 0 10px 28px rgba(68, 185, 255, 0.22);
  overflow: hidden;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform: scale(1.24);
}

.brand-name,
.brand-kicker {
  display: block;
  letter-spacing: 0;
}

.brand-name {
  font-family:
    "Palatino Linotype",
    "Book Antiqua",
    Georgia,
    serif;
  font-size: 1.05rem;
  font-weight: 800;
}

.brand-kicker {
  color: var(--soft);
  font-size: 0.72rem;
  font-weight: 700;
}

.primary-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2px;
  min-width: 0;
}

.primary-nav a {
  padding: 9px 10px;
  border-radius: 6px;
  color: #e9f5ff;
  font-size: 0.88rem;
  font-weight: 720;
  text-decoration: none;
  white-space: nowrap;
  transition:
    color 160ms ease,
    background 160ms ease,
    transform 160ms ease;
}

.primary-nav a:hover,
.primary-nav a[aria-current="page"] {
  color: var(--cream);
  background: rgba(255, 240, 196, 0.09);
}

.primary-nav a:active {
  transform: translateY(1px);
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.login-button,
.header-admin,
.user-pill {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(158, 220, 255, 0.34);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.88rem;
  font-weight: 850;
  text-decoration: none;
  white-space: nowrap;
}

.login-button {
  color: var(--night);
  background: linear-gradient(135deg, var(--sky-2), var(--cream));
}

.header-admin {
  color: var(--cream);
  background: rgba(255, 87, 87, 0.14);
}

.user-pill {
  max-width: 160px;
  color: #eaf7ff;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 240, 196, 0.26);
  border-radius: var(--radius);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
}

.nav-toggle-lines,
.nav-toggle-lines::before,
.nav-toggle-lines::after {
  display: block;
  width: 18px;
  height: 2px;
  margin-inline: auto;
  border-radius: 2px;
  background: currentColor;
  transition:
    transform 180ms ease,
    opacity 180ms ease;
}

.nav-toggle-lines::before,
.nav-toggle-lines::after {
  content: "";
}

.nav-toggle-lines::before {
  transform: translateY(-6px);
}

.nav-toggle-lines::after {
  transform: translateY(4px);
}

.nav-open .nav-toggle-lines {
  transform: rotate(45deg);
}

.nav-open .nav-toggle-lines::before {
  opacity: 0;
}

.nav-open .nav-toggle-lines::after {
  transform: translateY(-2px) rotate(90deg);
}

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(5, 13, 30, 0.88) 0%, rgba(5, 13, 30, 0.68) 44%, rgba(5, 13, 30, 0.25) 100%),
    linear-gradient(180deg, rgba(7, 19, 40, 0.16), rgba(7, 19, 40, 0.94)),
    url("../panel/assets/background.png") center / cover no-repeat;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 170px;
  z-index: -1;
  background: linear-gradient(180deg, transparent, rgba(6, 16, 33, 0.98));
}

.hero-shell {
  min-height: min(620px, 72svh);
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(320px, 0.78fr);
  align-items: center;
  gap: 42px;
  padding: 56px 0 74px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--sky-2);
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  font-family:
    "Palatino Linotype",
    "Book Antiqua",
    Georgia,
    serif;
  line-height: 1.03;
  letter-spacing: 0;
}

h1 {
  max-width: 760px;
  font-size: clamp(3.1rem, 7vw, 6.3rem);
  color: #fff7d9;
  text-wrap: balance;
  text-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
}

.hero-lede {
  max-width: 680px;
  margin: 22px 0 0;
  color: #eaf7ff;
  font-size: clamp(1.08rem, 2vw, 1.35rem);
}

.hero-actions,
.discord-card .button {
  margin-top: 28px;
}

.ai-note {
  width: min(100%, 560px);
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  margin-top: 24px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 240, 196, 0.24);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 240, 196, 0.11), rgba(68, 185, 255, 0.08)),
    rgba(5, 14, 31, 0.72);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.22);
}

.ai-note img {
  width: 72px;
  height: 72px;
  object-fit: contain;
}

.ai-note strong,
.ai-note span {
  display: block;
}

.ai-note strong {
  color: #ffffff;
  font-family:
    "Palatino Linotype",
    "Book Antiqua",
    Georgia,
    serif;
  font-size: 1.2rem;
}

.ai-note span {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 12px 18px;
  font-weight: 950;
  text-decoration: none;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button img {
  flex: 0 0 auto;
}

.button-discord img {
  width: 34px;
  height: 38px;
  margin: -8px 0 -6px -4px;
  object-fit: contain;
}

.button:active {
  transform: translateY(0);
}

.button-primary {
  color: var(--night);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), var(--cream) 42%, var(--sky-2));
  box-shadow: 0 16px 48px rgba(68, 185, 255, 0.26);
}

.button-primary:hover {
  box-shadow: 0 20px 58px rgba(68, 185, 255, 0.34);
}

.button-secondary {
  margin-left: 10px;
  color: var(--ink);
  border-color: rgba(255, 240, 196, 0.36);
  background: rgba(255, 240, 196, 0.08);
}

.button-secondary:hover {
  border-color: rgba(255, 240, 196, 0.7);
  background: rgba(255, 240, 196, 0.14);
}

.hero-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 240, 196, 0.24);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, transparent 34%, rgba(5, 13, 30, 0.9)),
    linear-gradient(135deg, rgba(47, 103, 255, 0.16), rgba(255, 87, 87, 0.13));
  z-index: 1;
}

.identity-panel {
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 240, 196, 0.18), transparent 30%),
    linear-gradient(180deg, rgba(14, 36, 68, 0.85), rgba(5, 13, 30, 0.96));
}

.identity-panel::before {
  background:
    radial-gradient(circle at 50% 36%, transparent 0 46%, rgba(5, 13, 30, 0.28) 70%),
    linear-gradient(180deg, transparent 48%, rgba(5, 13, 30, 0.88));
}

.hero-panel img {
  width: 100%;
  height: clamp(340px, 34vw, 430px);
  aspect-ratio: 1 / 1;
  object-fit: cover;
  transform: scale(1.04);
}

.identity-panel img {
  height: clamp(430px, 42vw, 580px);
  object-fit: contain;
  object-position: center bottom;
  padding: 24px 14px 76px;
  transform: none;
}

.hero-panel-copy {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  z-index: 2;
  padding: 16px;
  border: 1px solid rgba(255, 240, 196, 0.22);
  border-radius: var(--radius);
  background: rgba(5, 14, 31, 0.78);
}

.hero-panel-copy span,
.hero-panel-copy strong {
  display: block;
}

.hero-panel-copy span {
  color: var(--sky-2);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.hero-panel-copy strong {
  margin-top: 4px;
  font-family:
    "Palatino Linotype",
    "Book Antiqua",
    Georgia,
    serif;
  font-size: 1.25rem;
  line-height: 1.12;
}

.section-heading {
  max-width: 730px;
  margin-bottom: 28px;
}

.section-heading.compact {
  max-width: 860px;
  margin-bottom: 18px;
}

.section-heading h2 {
  font-size: clamp(2rem, 4.4vw, 3.7rem);
  color: #fff4ce;
  text-wrap: balance;
}

.section-heading p:not(.eyebrow) {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 1.02rem;
}

.stats-band {
  position: relative;
  margin-top: -42px;
  padding: 0 0 86px;
  z-index: 2;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.stat-card {
  min-height: 148px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 240, 196, 0.1), rgba(255, 255, 255, 0.03)),
    var(--panel);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.22);
}

.stat-label,
.stat-note {
  color: var(--soft);
  font-weight: 800;
}

.stat-label {
  font-size: 0.9rem;
}

.stat-note {
  font-size: 0.82rem;
}

.stat-value {
  margin: 10px 0;
  color: #ffffff;
  font-family:
    "Palatino Linotype",
    "Book Antiqua",
    Georgia,
    serif;
  font-size: clamp(2rem, 5vw, 4.1rem);
  line-height: 1;
}

.stat-card.is-loading .stat-value {
  color: transparent;
  max-width: 210px;
  border-radius: 6px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.08), rgba(158, 220, 255, 0.22), rgba(255, 255, 255, 0.08));
  background-size: 220% 100%;
  animation: shimmer 1.8s infinite;
}

.stat-card.is-unavailable {
  border-color: rgba(255, 87, 87, 0.34);
}

.modules-section,
.talkers-section,
.discord-section {
  padding: 92px 0;
}

.modules-section {
  background:
    linear-gradient(180deg, rgba(7, 19, 40, 0.26), rgba(4, 11, 24, 0.62)),
    linear-gradient(90deg, rgba(47, 103, 255, 0.1), rgba(255, 87, 87, 0.06));
}

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

.module-card {
  position: relative;
  isolation: isolate;
  min-height: 430px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-strong);
  box-shadow: 0 20px 58px rgba(0, 0, 0, 0.24);
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.module-card:hover {
  transform: translateY(-5px);
  border-color: var(--line-strong);
  box-shadow: 0 26px 72px rgba(0, 0, 0, 0.32);
}

.module-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 20%, rgba(5, 13, 30, 0.36) 56%, rgba(5, 13, 30, 0.98));
}

.module-card img {
  width: 100%;
  height: 230px;
  object-fit: cover;
  filter: saturate(1.06) contrast(1.02);
}

.module-body {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: 200px;
  flex-direction: column;
  padding: 18px;
}

.module-state {
  align-self: flex-start;
  padding: 5px 8px;
  border: 1px solid rgba(255, 240, 196, 0.25);
  border-radius: 6px;
  color: var(--cream);
  background: rgba(255, 240, 196, 0.1);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.module-card.is-available .module-state {
  color: #c8ffe2;
  border-color: rgba(129, 255, 185, 0.38);
  background: rgba(52, 185, 120, 0.15);
}

.module-card.is-maintenance .module-state,
.module-card.is-unavailable .module-state {
  color: #ffd0d0;
  border-color: rgba(255, 87, 87, 0.45);
  background: rgba(255, 87, 87, 0.13);
}

.module-card h3 {
  margin-top: 14px;
  font-size: 1.55rem;
}

.module-card p {
  margin: 10px 0 18px;
  color: var(--muted);
}

.module-card a {
  margin-top: auto;
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid rgba(158, 220, 255, 0.3);
  border-radius: var(--radius);
  color: #ffffff;
  background: rgba(68, 185, 255, 0.1);
  font-weight: 900;
  text-decoration: none;
}

.module-card a:hover {
  border-color: rgba(158, 220, 255, 0.65);
  background: rgba(68, 185, 255, 0.17);
}

.talkers-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(360px, 1fr);
  gap: 42px;
  align-items: start;
}

.talkers-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  background:
    radial-gradient(circle at top right, rgba(68, 185, 255, 0.18), transparent 38%),
    var(--panel-strong);
  box-shadow: var(--shadow);
}

.tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.tab-button {
  min-height: 44px;
  border: 1px solid rgba(255, 240, 196, 0.2);
  border-radius: var(--radius);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.05);
  font-weight: 950;
  cursor: pointer;
}

.tab-button.is-active {
  color: var(--night);
  border-color: transparent;
  background: linear-gradient(135deg, var(--cream), var(--sky-2));
}

.talkers-list {
  display: grid;
  gap: 10px;
}

.talker-row {
  display: grid;
  grid-template-columns: 34px 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 68px;
  padding: 12px;
  border: 1px solid rgba(255, 240, 196, 0.14);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.055);
}

.talker-rank {
  color: var(--cream);
  font-weight: 950;
}

.talker-avatar {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  color: var(--night);
  background: linear-gradient(135deg, var(--cream), var(--sky-2));
  font-weight: 950;
}

.talker-name {
  min-width: 0;
  color: #ffffff;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.talker-meta {
  color: var(--soft);
  font-size: 0.84rem;
  font-weight: 750;
}

.talker-score {
  color: var(--cream);
  font-weight: 950;
  text-align: right;
  white-space: nowrap;
}

.empty-state {
  margin: 0;
  min-height: 150px;
  display: grid;
  place-items: center;
  padding: 28px;
  border: 1px dashed rgba(255, 240, 196, 0.26);
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
  background: rgba(255, 255, 255, 0.035);
}

.discord-section {
  padding-top: 36px;
}

.discord-card {
  display: grid;
  grid-template-columns: minmax(260px, 0.46fr) minmax(0, 1fr) auto;
  gap: 28px;
  align-items: center;
  padding: 32px;
  border: 1px solid rgba(255, 240, 196, 0.3);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(47, 103, 255, 0.18), transparent 38%, rgba(255, 87, 87, 0.14)),
    rgba(7, 19, 40, 0.88);
  box-shadow: var(--shadow);
}

.discord-visual {
  position: relative;
  align-self: stretch;
  min-height: 260px;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 240, 196, 0.2);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.06);
}

.discord-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 52%, rgba(5, 13, 30, 0.28));
}

.discord-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.discord-card h2 {
  max-width: 790px;
  font-size: clamp(2rem, 4.4vw, 3.9rem);
}

.discord-card p:not(.eyebrow) {
  max-width: 760px;
  margin: 16px 0 0;
  color: var(--muted);
}

.site-footer {
  border-top: 1px solid rgba(255, 240, 196, 0.14);
  padding: 44px 0;
  background: #050d1e;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(160px, 0.55fr) minmax(160px, 0.55fr);
  gap: 28px;
}

.footer-brand {
  margin-bottom: 14px;
}

.site-footer p {
  max-width: 560px;
  margin: 0;
  color: var(--muted);
}

.site-footer h2 {
  margin: 0 0 12px;
  color: var(--cream);
  font-family: inherit;
  font-size: 0.88rem;
  text-transform: uppercase;
}

.site-footer nav {
  display: grid;
  align-content: start;
  gap: 8px;
}

.site-footer nav a {
  color: var(--muted);
  text-decoration: none;
}

.site-footer nav a:hover {
  color: var(--cream);
}

.reveal {
  animation: lift-in 520ms ease both;
}

.delay-1 {
  animation-delay: 80ms;
}

.delay-2 {
  animation-delay: 160ms;
}

.delay-3 {
  animation-delay: 240ms;
}

@keyframes lift-in {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes shimmer {
  from {
    background-position: 180% 0;
  }

  to {
    background-position: -40% 0;
  }
}

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

@media (max-width: 1180px) {
  .header-shell {
    grid-template-columns: auto auto 1fr;
  }

  .nav-toggle {
    display: block;
    order: 2;
  }

  .brand-link {
    order: 1;
  }

  .header-actions {
    order: 3;
  }

  .primary-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: calc(100% + 8px);
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    padding: 12px;
    border: 1px solid rgba(255, 240, 196, 0.18);
    border-radius: var(--radius);
    background: rgba(5, 14, 31, 0.98);
    box-shadow: var(--shadow);
    transform-origin: top;
    transform: scaleY(0.96);
    opacity: 0;
    pointer-events: none;
    transition:
      transform 160ms ease,
      opacity 160ms ease;
  }

  .nav-open .primary-nav {
    transform: scaleY(1);
    opacity: 1;
    pointer-events: auto;
  }

  .primary-nav a {
    padding: 12px;
  }

  .hero-shell {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 58px 0 84px;
  }

  .hero-panel {
    max-width: 520px;
  }

  .hero-panel img {
    height: auto;
    aspect-ratio: 16 / 10;
  }

  .identity-panel img {
    height: 430px;
    aspect-ratio: auto;
  }

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

  .talkers-layout {
    grid-template-columns: 1fr;
  }

  .discord-card {
    grid-template-columns: minmax(230px, 0.6fr) minmax(0, 1fr);
  }

  .discord-card .button {
    grid-column: 2;
    justify-self: start;
  }
}

@media (max-width: 760px) {
  .shell {
    width: min(calc(100% - 24px), var(--max));
  }

  .site-header {
    position: sticky;
  }

  .header-shell {
    min-height: 72px;
    grid-template-columns: auto auto;
    gap: 12px;
  }

  .header-actions {
    grid-column: 1 / -1;
    width: 100%;
    justify-content: stretch;
    padding-bottom: 12px;
  }

  .header-actions > * {
    flex: 1;
  }

  .brand-kicker {
    display: none;
  }

  .nav-toggle {
    justify-self: end;
  }

  .primary-nav {
    grid-template-columns: 1fr;
  }

  .hero-shell {
    padding: 34px 0 48px;
    gap: 18px;
  }

  h1 {
    font-size: clamp(2.7rem, 14vw, 4.4rem);
  }

  .hero-actions {
    display: grid;
    gap: 10px;
  }

  .button-secondary {
    margin-left: 0;
  }

  .ai-note {
    grid-template-columns: 58px minmax(0, 1fr);
    padding: 10px;
  }

  .ai-note img {
    width: 58px;
    height: 58px;
  }

  .stats-band {
    margin-top: -28px;
    padding-bottom: 64px;
  }

  .stats-grid,
  .module-grid,
  .discord-card,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .module-card {
    min-height: auto;
  }

  .module-card img {
    position: relative;
    inset: auto;
    height: 190px;
    z-index: auto;
  }

  .module-card::after {
    display: none;
  }

  .module-body {
    position: relative;
    inset: auto;
    z-index: auto;
    min-height: 0;
    justify-content: flex-start;
    background: var(--panel-strong);
  }

  .hero-panel img {
    height: 170px;
    aspect-ratio: auto;
  }

  .identity-panel img {
    height: 320px;
    padding: 12px 10px 74px;
  }

  .modules-section,
  .talkers-section,
  .discord-section {
    padding: 64px 0;
  }

  .talkers-panel {
    padding: 12px;
  }

  .talker-row {
    grid-template-columns: 28px 40px minmax(0, 1fr);
  }

  .talker-score {
    grid-column: 3;
    text-align: left;
  }

  .discord-card {
    padding: 22px;
  }

  .discord-card .button {
    grid-column: auto;
  }

  .discord-visual {
    min-height: 230px;
  }
}

@media (max-width: 430px) {
  .brand-name {
    font-size: 0.94rem;
  }

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

  .login-button,
  .header-admin,
  .user-pill {
    min-width: 0;
    padding-inline: 8px;
    font-size: 0.82rem;
  }

  .hero-panel-copy {
    left: 10px;
    right: 10px;
    bottom: 10px;
    padding: 12px;
  }

  .tabs {
    gap: 6px;
  }
}

@media (min-width: 1181px) {
  body {
    padding-left: 0;
  }

  body:not(.state-page) main,
  body:not(.state-page) .site-footer {
    margin-left: 326px;
    transition: margin-left 180ms ease;
  }

  body.site-nav-collapsed:not(.state-page) main,
  body.site-nav-collapsed:not(.state-page) .site-footer {
    margin-left: 104px;
  }

  .site-header {
    position: fixed;
    inset: 0 auto 0 0;
    width: 286px;
    border-right: 1px solid rgba(255, 240, 196, 0.14);
    border-bottom: 0;
    transition: width 180ms ease;
  }

  .site-nav-collapsed .site-header {
    width: 84px;
  }

  .header-shell {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 18px;
    padding: 22px 16px;
  }

  .brand-link {
    min-height: 52px;
    padding-right: 52px;
  }

  .nav-toggle {
    position: absolute;
    top: 24px;
    right: 16px;
    display: grid;
  }

  .primary-nav {
    width: 100%;
    display: grid;
    justify-content: stretch;
    align-items: stretch;
    gap: 7px;
    margin-top: 12px;
  }

  .primary-nav a {
    display: flex;
    align-items: center;
    min-height: 40px;
    padding: 10px 12px;
    white-space: normal;
  }

  .header-actions {
    width: 100%;
    margin-top: auto;
    display: grid;
    gap: 10px;
  }

  .login-button,
  .header-admin,
  .user-pill {
    width: 100%;
  }

  .site-nav-collapsed .brand-link {
    justify-content: center;
    padding-right: 0;
  }

  .site-nav-collapsed .brand-link > span:not(.brand-mark),
  .site-nav-collapsed .primary-nav,
  .site-nav-collapsed .header-actions {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
  }

  .site-nav-collapsed .nav-toggle {
    top: 82px;
    right: 21px;
  }
}

.invite-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(3, 10, 22, 0.72);
  backdrop-filter: blur(10px);
}

.invite-modal-card {
  width: min(100%, 520px);
  border: 1px solid rgba(255, 240, 196, 0.28);
  border-radius: var(--radius);
  padding: clamp(22px, 5vw, 34px);
  color: var(--ink);
  background:
    linear-gradient(145deg, rgba(8, 23, 48, 0.96), rgba(20, 42, 72, 0.94)),
    url("./assets/identity/aniipote-reflechis.png") right 14px bottom 8px / 190px auto no-repeat;
  box-shadow: var(--shadow);
}

.invite-modal-card h2 {
  margin-top: 0;
  font-size: clamp(2rem, 8vw, 3.6rem);
  line-height: 0.94;
}

.invite-modal-card p {
  color: var(--muted);
}

.invite-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.invite-modal-actions .button {
  margin: 0;
}

body.state-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 0;
}

.state-shell {
  width: min(calc(100% - 32px), 760px);
  padding: 48px 0;
}

.state-card {
  border: 1px solid rgba(255, 240, 196, 0.24);
  border-radius: var(--radius);
  padding: clamp(24px, 6vw, 48px);
  background:
    linear-gradient(145deg, rgba(6, 18, 38, 0.94), rgba(13, 34, 68, 0.92)),
    url("../panel/assets/codex.png") center / cover;
  box-shadow: var(--shadow);
}

.state-card h1 {
  margin-bottom: 16px;
}

.state-card p {
  max-width: 58ch;
  color: var(--muted);
}

.state-back {
  display: inline-flex;
  margin-bottom: 28px;
  color: var(--cream);
  font-weight: 850;
  text-decoration: none;
}

.module-card::after {
  z-index: 1;
  inset: 0 0 auto;
  height: 218px;
  background: linear-gradient(180deg, transparent 0%, rgba(5, 13, 30, 0.02) 48%, rgba(5, 13, 30, 0.5) 100%);
}

.module-card img {
  position: absolute;
  inset: 0 0 auto;
  z-index: 0;
  height: 218px;
  opacity: 1;
  object-position: center;
  filter: saturate(1.18) contrast(1.04) brightness(1.1);
}

.module-body {
  position: absolute;
  left: 0;
  right: 0;
  top: 168px;
  bottom: 0;
  z-index: 2;
  min-height: 0;
  justify-content: flex-end;
  background: linear-gradient(180deg, transparent, rgba(5, 13, 30, 0.82) 22%, rgba(5, 13, 30, 0.98));
}

@media (max-width: 760px) {
  .module-card {
    min-height: auto;
  }

  .module-card img {
    position: relative;
    inset: auto;
    z-index: auto;
    height: 190px;
  }

  .module-card::after {
    display: none;
  }

  .module-body {
    position: relative;
    inset: auto;
    z-index: auto;
    min-height: 0;
    justify-content: flex-start;
    background: var(--panel-strong);
  }
}

/* Codex public */
.codex-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 56px 0 34px;
  background:
    linear-gradient(180deg, rgba(7, 19, 40, 0.72), rgba(5, 13, 30, 0.92)),
    radial-gradient(circle at 76% 18%, rgba(68, 185, 255, 0.2), transparent 34%),
    radial-gradient(circle at 16% 78%, rgba(255, 87, 87, 0.16), transparent 32%);
}

.codex-hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 120px;
  z-index: -1;
  background: linear-gradient(180deg, transparent, rgba(6, 16, 33, 0.98));
}

.codex-hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.58fr);
  align-items: center;
  gap: 34px;
}

.codex-hero-copy h1 {
  max-width: 850px;
  font-size: clamp(2.6rem, 5.6vw, 5.5rem);
}

.codex-hero-lede {
  max-width: 690px;
  margin: 18px 0 0;
  color: #eaf7ff;
  font-size: clamp(1rem, 1.8vw, 1.24rem);
}

.codex-sync-note {
  width: min(100%, 610px);
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  margin-top: 24px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 240, 196, 0.24);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 240, 196, 0.12), rgba(68, 185, 255, 0.08)),
    rgba(5, 14, 31, 0.72);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.24);
}

.codex-sync-note img {
  width: 70px;
  height: 70px;
  object-fit: contain;
}

.codex-sync-note strong,
.codex-sync-note span {
  display: block;
}

.codex-sync-note strong {
  color: #ffffff;
  font-family:
    "Palatino Linotype",
    "Book Antiqua",
    Georgia,
    serif;
  font-size: 1.18rem;
}

.codex-sync-note span {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 760;
}

.codex-hero-art {
  position: relative;
  min-height: 350px;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 240, 196, 0.24);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 50% 24%, rgba(255, 240, 196, 0.18), transparent 34%),
    linear-gradient(180deg, rgba(14, 36, 68, 0.86), rgba(5, 13, 30, 0.96));
  box-shadow: var(--shadow);
}

.codex-hero-art::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, transparent 42%, rgba(5, 13, 30, 0.82)),
    linear-gradient(135deg, rgba(47, 103, 255, 0.18), rgba(255, 87, 87, 0.12));
  z-index: 1;
}

.codex-hero-art img {
  width: 100%;
  height: 410px;
  object-fit: cover;
  filter: saturate(1.12) contrast(1.04);
}

.codex-hero-art figcaption {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 2;
  padding: 14px;
  border: 1px solid rgba(255, 240, 196, 0.22);
  border-radius: var(--radius);
  background: rgba(5, 14, 31, 0.8);
}

.codex-hero-art span,
.codex-hero-art strong {
  display: block;
}

.codex-hero-art span {
  color: var(--sky-2);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.codex-hero-art strong {
  margin-top: 3px;
  color: #ffffff;
  font-family:
    "Palatino Linotype",
    "Book Antiqua",
    Georgia,
    serif;
  font-size: 1.22rem;
}

.codex-browser {
  padding: 54px 0 96px;
}

.codex-toolbar {
  display: grid;
  gap: 18px;
  padding: 18px;
  border: 1px solid rgba(255, 240, 196, 0.24);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(47, 103, 255, 0.12), transparent 42%, rgba(255, 87, 87, 0.08)),
    var(--panel-strong);
  box-shadow: 0 20px 58px rgba(0, 0, 0, 0.24);
}

.codex-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(210px, 0.28fr) auto;
  gap: 12px;
  align-items: end;
}

.codex-field {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.codex-field span,
.codex-filter-group legend {
  color: var(--sky-2);
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: uppercase;
}

.codex-field input,
.codex-field select {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(158, 220, 255, 0.3);
  border-radius: var(--radius);
  padding: 10px 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.07);
  font: inherit;
  font-weight: 780;
}

.codex-field input::placeholder {
  color: rgba(201, 212, 223, 0.76);
}

.codex-field select {
  cursor: pointer;
}

.codex-field select option {
  color: var(--night);
  background: #f8f0dc;
}

.codex-reset {
  min-width: 142px;
  margin: 0;
  cursor: pointer;
}

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

.codex-filter-group {
  min-width: 0;
  margin: 0;
  padding: 12px;
  border: 1px solid rgba(255, 240, 196, 0.18);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.045);
}

.codex-filter-group legend {
  padding: 0 4px;
}

.codex-filter-list {
  display: grid;
  gap: 7px;
  max-height: 210px;
  overflow: auto;
  padding-right: 3px;
}

.codex-check {
  min-height: 38px;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(255, 240, 196, 0.13);
  border-radius: 6px;
  color: #eff8ff;
  background: rgba(255, 255, 255, 0.045);
  cursor: pointer;
  transition:
    border-color 160ms ease,
    background 160ms ease,
    transform 160ms ease;
}

.codex-check:hover,
.codex-check:focus-within {
  border-color: rgba(158, 220, 255, 0.48);
  background: rgba(68, 185, 255, 0.1);
}

.codex-check:active {
  transform: translateY(1px);
}

.codex-check input {
  width: 16px;
  height: 16px;
  accent-color: var(--sky);
}

.codex-check span {
  min-width: 0;
  overflow: hidden;
  font-size: 0.86rem;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.codex-check small {
  color: var(--soft);
  font-size: 0.78rem;
  font-weight: 900;
}

.codex-filter-note {
  margin: 0;
  min-height: 38px;
  display: flex;
  align-items: center;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 780;
}

.codex-statusbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 18px;
  margin: 18px 0 14px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 240, 196, 0.16);
  border-radius: var(--radius);
  background: rgba(5, 14, 31, 0.64);
}

.codex-statusbar p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 760;
}

.codex-statusbar p:first-child {
  color: #ffffff;
}

.codex-state {
  min-height: 190px;
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  margin-top: 14px;
  padding: 22px;
  border: 1px dashed rgba(255, 240, 196, 0.28);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 240, 196, 0.09), rgba(68, 185, 255, 0.08)),
    rgba(255, 255, 255, 0.04);
}

.codex-state.is-error,
.codex-state.is-mongo {
  border-color: rgba(255, 87, 87, 0.42);
  background:
    linear-gradient(135deg, rgba(255, 87, 87, 0.12), rgba(68, 185, 255, 0.06)),
    rgba(255, 255, 255, 0.04);
}

.codex-state img {
  width: 92px;
  height: 92px;
  object-fit: contain;
}

.codex-state h3 {
  color: #ffffff;
  font-size: clamp(1.6rem, 3vw, 2.35rem);
}

.codex-state p {
  max-width: 760px;
  margin: 8px 0 0;
  color: var(--muted);
}

.codex-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.codex-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 240, 196, 0.07), rgba(255, 255, 255, 0.025)),
    var(--panel-strong);
  box-shadow: 0 20px 58px rgba(0, 0, 0, 0.22);
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.codex-card:hover {
  transform: translateY(-4px);
  border-color: var(--line-strong);
  box-shadow: 0 26px 74px rgba(0, 0, 0, 0.3);
}

.codex-card-media {
  position: relative;
  display: block;
  min-height: 218px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 26%, rgba(255, 240, 196, 0.16), transparent 42%),
    rgba(255, 255, 255, 0.045);
}

.codex-card-media::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 46%, rgba(5, 13, 30, 0.38));
}

.codex-card-media img {
  width: 100%;
  height: 240px;
  object-fit: contain;
  padding: 18px;
  filter: saturate(1.08) contrast(1.03);
  transition: transform 180ms ease;
}

.codex-card:hover .codex-card-media img {
  transform: scale(1.035);
}

.codex-card-body {
  display: flex;
  min-height: 300px;
  flex-direction: column;
  padding: 16px;
}

.codex-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.codex-number-pill,
.codex-stage-pill,
.codex-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  max-width: 100%;
  border-radius: 6px;
  font-size: 0.76rem;
  font-weight: 950;
  line-height: 1.1;
}

.codex-number-pill {
  padding: 6px 8px;
  color: var(--night);
  background: linear-gradient(135deg, var(--cream), var(--sky-2));
}

.codex-stage-pill {
  padding: 6px 8px;
  color: #dff3ff;
  border: 1px solid rgba(158, 220, 255, 0.28);
  background: rgba(68, 185, 255, 0.11);
}

.codex-card h3 {
  margin: 12px 0 0;
  font-size: 1.52rem;
  line-height: 1.08;
}

.codex-card h3 a {
  text-decoration: none;
}

.codex-card h3 a:hover {
  color: var(--cream);
}

.codex-badges,
.codex-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.codex-card .codex-badges {
  margin-top: 12px;
}

.codex-badge {
  padding: 6px 8px;
  border: 1px solid rgba(255, 240, 196, 0.2);
  color: #f6fbff;
  background: rgba(255, 255, 255, 0.065);
}

.codex-badge.is-element {
  border-color: rgba(68, 185, 255, 0.42);
  background: rgba(47, 103, 255, 0.18);
}

.codex-badge.is-role {
  border-color: rgba(255, 240, 196, 0.32);
  color: var(--cream);
  background: rgba(255, 240, 196, 0.1);
}

.codex-badge.is-stage,
.codex-badge.is-habitat {
  border-color: rgba(158, 220, 255, 0.34);
  background: rgba(68, 185, 255, 0.1);
}

.codex-badge.is-muted {
  color: var(--muted);
  border-color: rgba(255, 240, 196, 0.14);
  background: rgba(255, 255, 255, 0.035);
}

.codex-form-summary {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 760;
}

.codex-mini-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin: 14px 0 0;
}

.codex-mini-stats div {
  min-width: 0;
  padding: 8px;
  border: 1px solid rgba(255, 240, 196, 0.13);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.045);
}

.codex-mini-stats dt,
.codex-mini-stats dd {
  margin: 0;
  text-align: center;
}

.codex-mini-stats dt {
  color: var(--soft);
  font-size: 0.68rem;
  font-weight: 950;
}

.codex-mini-stats dd {
  margin-top: 2px;
  color: #ffffff;
  font-size: 0.88rem;
  font-weight: 950;
}

.codex-card-link {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: auto;
  padding: 10px 12px;
  border: 1px solid rgba(158, 220, 255, 0.3);
  border-radius: var(--radius);
  color: #ffffff;
  background: rgba(68, 185, 255, 0.1);
  font-weight: 950;
  text-decoration: none;
}

.codex-card-link:hover {
  border-color: rgba(158, 220, 255, 0.65);
  background: rgba(68, 185, 255, 0.17);
}

.codex-pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 26px;
}

.codex-page-button,
.codex-page-gap {
  min-width: 42px;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  font-weight: 950;
}

.codex-page-button {
  border: 1px solid rgba(158, 220, 255, 0.3);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.055);
  cursor: pointer;
}

.codex-page-button:hover:not(:disabled),
.codex-page-button[aria-current="page"] {
  color: var(--night);
  border-color: transparent;
  background: linear-gradient(135deg, var(--cream), var(--sky-2));
}

.codex-page-button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.codex-page-gap {
  color: var(--soft);
}

body.codex-detail-page main {
  padding-bottom: 34px;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding-top: 30px;
  color: var(--soft);
  font-size: 0.9rem;
  font-weight: 800;
}

.breadcrumbs a {
  color: var(--cream);
  text-decoration: none;
}

.breadcrumbs a:hover {
  color: var(--sky-2);
}

.codex-detail-hero,
.codex-detail-section {
  padding: 48px 0;
}

.codex-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.52fr);
  gap: 30px;
  align-items: center;
}

.codex-detail-copy,
.detail-panel {
  border: 1px solid rgba(255, 240, 196, 0.22);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(47, 103, 255, 0.12), transparent 42%, rgba(255, 87, 87, 0.08)),
    var(--panel-strong);
  box-shadow: 0 20px 58px rgba(0, 0, 0, 0.24);
}

.codex-detail-copy {
  padding: clamp(22px, 4vw, 34px);
}

.codex-detail-copy h1 {
  font-size: clamp(2.6rem, 6vw, 5rem);
}

.codex-number {
  width: fit-content;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  margin: 0 0 12px;
  padding: 7px 10px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: var(--night);
  background: linear-gradient(135deg, var(--cream), var(--sky-2));
  font-size: 0.92rem;
  font-weight: 950;
}

.codex-detail-copy .codex-badges {
  margin-top: 18px;
}

.codex-description {
  max-width: 760px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1.02rem;
}

.source-link {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  margin-top: 20px;
  padding: 10px 12px;
  border: 1px solid rgba(158, 220, 255, 0.3);
  border-radius: var(--radius);
  color: #ffffff;
  background: rgba(68, 185, 255, 0.1);
  font-weight: 950;
  text-decoration: none;
}

.source-link:hover {
  border-color: rgba(158, 220, 255, 0.65);
  background: rgba(68, 185, 255, 0.17);
}

.codex-detail-visual {
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 240, 196, 0.22);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 50% 24%, rgba(255, 240, 196, 0.16), transparent 42%),
    rgba(255, 255, 255, 0.05);
  box-shadow: var(--shadow);
}

.codex-detail-visual img {
  width: 100%;
  height: clamp(320px, 42vw, 520px);
  object-fit: contain;
  padding: 24px;
}

.form-switcher {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.form-switcher a {
  min-height: 92px;
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(255, 240, 196, 0.18);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.045);
  font-weight: 900;
  text-decoration: none;
}

.form-switcher a[aria-current="true"] {
  color: var(--night);
  border-color: transparent;
  background: linear-gradient(135deg, var(--cream), var(--sky-2));
}

.form-switcher img {
  width: 54px;
  height: 54px;
  object-fit: contain;
}

.form-switcher span {
  flex: 1 1 auto;
  min-width: 0;
  overflow-wrap: anywhere;
}

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

.detail-panel {
  padding: clamp(18px, 3vw, 26px);
}

.detail-panel .section-heading {
  margin-bottom: 16px;
}

.detail-panel .section-heading h2 {
  font-size: clamp(1.35rem, 2vw, 2rem);
  line-height: 1.08;
}

.codex-stat-list,
.ability-grid,
.evolution-tree {
  display: grid;
  gap: 10px;
}

.codex-stat-row {
  display: grid;
  grid-template-columns: minmax(90px, 0.24fr) minmax(0, 1fr) 58px;
  gap: 10px;
  align-items: center;
}

.codex-stat-row span,
.codex-stat-row strong {
  font-weight: 950;
}

.codex-stat-track {
  appearance: none;
  -webkit-appearance: none;
  height: 10px;
  overflow: hidden;
  border: 0;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
}

.codex-stat-track::-webkit-progress-bar {
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
}

.codex-stat-track::-webkit-progress-value {
  border-radius: 6px;
  background: linear-gradient(90deg, var(--blue-fr), var(--sky-2), var(--cream));
}

.codex-stat-track::-moz-progress-bar {
  border-radius: 6px;
  background: linear-gradient(90deg, var(--blue-fr), var(--sky-2), var(--cream));
}

.evolution-tree,
.evolution-tree ol {
  margin: 0;
  padding-left: 0;
  list-style: none;
}

.evolution-tree li {
  position: relative;
  display: grid;
  gap: 10px;
}

.evolution-tree li + li,
.evolution-tree ol {
  margin-top: 10px;
}

.evolution-tree ol {
  padding-left: 24px;
  border-left: 1px solid rgba(158, 220, 255, 0.24);
}

.evolution-node {
  display: flex;
  min-height: 64px;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(255, 240, 196, 0.16);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.045);
}

.evolution-node img {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  object-fit: contain;
}

.evolution-node span {
  min-width: 0;
  color: #ffffff;
  font-weight: 950;
  overflow-wrap: anywhere;
}

.evolution-node small {
  margin-left: auto;
  color: var(--soft);
  font-size: 0.78rem;
  font-weight: 900;
  white-space: nowrap;
}

.ability-card {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 14px;
  border: 1px solid rgba(255, 240, 196, 0.16);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.045);
}

.ability-card img,
.ability-icon-fallback {
  width: 46px;
  height: 46px;
  border: 1px solid rgba(158, 220, 255, 0.28);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 50% 35%, rgba(255, 240, 196, 0.18), transparent 62%),
    rgba(68, 185, 255, 0.1);
}

.ability-card img {
  object-fit: contain;
  padding: 6px;
}

.ability-icon-fallback {
  display: inline-grid;
  place-items: center;
  color: var(--cream);
  font-family:
    "Palatino Linotype",
    "Book Antiqua",
    Georgia,
    serif;
  font-size: 1rem;
  font-weight: 950;
}

.ability-card > div {
  min-width: 0;
}

.ability-card span:not(.ability-icon-fallback) {
  color: var(--sky-2);
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: uppercase;
}

.ability-card h3 {
  margin-top: 5px;
  font-size: 1.2rem;
  overflow-wrap: anywhere;
}

.ability-card p,
.training-text {
  margin: 8px 0 0;
  color: var(--muted);
}

.training-text {
  padding: 12px;
  border: 1px solid rgba(255, 240, 196, 0.14);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.035);
}

@media (max-width: 1180px) {
  .codex-hero-layout,
  .codex-detail-layout {
    grid-template-columns: 1fr;
  }

  .codex-hero-art {
    max-width: 560px;
  }

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

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

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

@media (max-width: 760px) {
  .codex-hero {
    padding: 34px 0 24px;
  }

  .codex-hero-layout {
    gap: 18px;
  }

  .codex-sync-note,
  .codex-state {
    grid-template-columns: 58px minmax(0, 1fr);
    padding: 12px;
  }

  .codex-sync-note img,
  .codex-state img {
    width: 58px;
    height: 58px;
  }

  .codex-hero-art {
    min-height: 260px;
  }

  .codex-hero-art img {
    height: 280px;
  }

  .codex-browser {
    padding: 44px 0 68px;
  }

  .codex-toolbar {
    padding: 12px;
  }

  .codex-search-row,
  .codex-filter-grid,
  .codex-grid,
  .detail-grid,
  .form-switcher {
    grid-template-columns: 1fr;
  }

  .codex-reset {
    width: 100%;
  }

  .codex-filter-list {
    max-height: 178px;
  }

  .codex-check span {
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
  }

  .codex-card-body {
    min-height: 0;
  }

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

  .codex-detail-hero,
  .codex-detail-section {
    padding: 34px 0;
  }

  .codex-detail-copy,
  .detail-panel {
    padding: 18px;
  }

  .detail-panel .section-heading h2 {
    font-size: clamp(1.5rem, 7vw, 2rem);
  }
}

@media (max-width: 430px) {
  .codex-statusbar {
    padding: 10px;
  }

  .codex-card-media {
    min-height: 188px;
  }

  .codex-card-media img {
    height: 200px;
    padding: 12px;
  }

  .codex-page-button {
    min-width: 42px;
    min-height: 42px;
    padding-inline: 8px;
  }

  .codex-stat-row {
    grid-template-columns: 1fr 54px;
  }

  .codex-stat-track {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}

.home-news-section {
  padding: 84px 0;
  background:
    linear-gradient(180deg, rgba(5, 13, 30, 0.4), rgba(8, 23, 48, 0.58)),
    linear-gradient(90deg, rgba(47, 103, 255, 0.08), rgba(255, 87, 87, 0.07));
}

.home-news-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 20px;
}

.home-news-head .section-heading {
  margin-bottom: 0;
}

.home-news-all-link {
  flex: 0 0 auto;
  margin-top: 0;
}

.home-news-state {
  min-height: 154px;
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 18px;
  border: 1px dashed rgba(255, 240, 196, 0.28);
  border-radius: var(--radius);
  color: var(--muted);
  background:
    linear-gradient(135deg, rgba(255, 240, 196, 0.08), rgba(68, 185, 255, 0.07)),
    rgba(255, 255, 255, 0.04);
  font-weight: 800;
}

.home-news-state img {
  width: 74px;
  height: 74px;
  object-fit: contain;
}

.home-news-state p {
  margin: 0;
}

.home-news-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.home-news-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 240, 196, 0.08), rgba(255, 255, 255, 0.025)),
    var(--panel-strong);
  box-shadow: 0 20px 54px rgba(0, 0, 0, 0.24);
  animation: lift-in 520ms ease both;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.home-news-card:hover {
  transform: translateY(-4px);
  border-color: var(--line-strong);
  box-shadow: 0 26px 72px rgba(0, 0, 0, 0.31);
}

.home-news-media {
  position: relative;
  display: block;
  min-height: 176px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 30%, rgba(255, 240, 196, 0.14), transparent 44%),
    rgba(255, 255, 255, 0.045);
}

.home-news-media::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 48%, rgba(5, 13, 30, 0.42));
}

.home-news-media img {
  width: 100%;
  height: 198px;
  object-fit: cover;
  transition: transform 180ms ease;
}

.home-news-card:hover .home-news-media img {
  transform: scale(1.035);
}

.home-news-card-body {
  display: flex;
  min-height: 252px;
  flex-direction: column;
  padding: 15px;
}

.home-news-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
}

.home-news-meta span {
  min-height: 27px;
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 6px 8px;
  border: 1px solid rgba(255, 240, 196, 0.2);
  border-radius: 6px;
  color: var(--cream);
  background: rgba(255, 240, 196, 0.09);
  font-size: 0.75rem;
  font-weight: 950;
}

.home-news-card h3 {
  margin-top: 12px;
  color: #ffffff;
  font-size: 1.42rem;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.home-news-card h3 a {
  text-decoration: none;
}

.home-news-card h3 a:hover {
  color: var(--cream);
}

.home-news-card p {
  margin: 10px 0 18px;
  color: var(--muted);
}

.home-news-read {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  margin-top: auto;
  padding: 10px 12px;
  border: 1px solid rgba(158, 220, 255, 0.3);
  border-radius: var(--radius);
  color: #ffffff;
  background: rgba(68, 185, 255, 0.1);
  font-weight: 950;
  text-decoration: none;
}

.home-news-read:hover {
  border-color: rgba(158, 220, 255, 0.65);
  background: rgba(68, 185, 255, 0.17);
}

.news-hero {
  position: relative;
  isolation: isolate;
  padding: 56px 0 42px;
  overflow: hidden;
}

.news-hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  z-index: -1;
  height: 150px;
  background: linear-gradient(180deg, transparent, rgba(6, 16, 33, 0.94));
}

.news-hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.94fr) minmax(320px, 1.02fr);
  gap: 34px;
  align-items: center;
}

.news-hero-copy h1 {
  max-width: 830px;
  font-size: clamp(2.8rem, 6.2vw, 5.9rem);
}

.news-hero-lede {
  max-width: 650px;
  margin: 18px 0 0;
  color: #eaf7ff;
  font-size: clamp(1.06rem, 1.9vw, 1.28rem);
}

.news-source-note {
  width: min(100%, 640px);
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  margin-top: 24px;
  padding: 13px 14px;
  border: 1px solid rgba(255, 240, 196, 0.24);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 240, 196, 0.12), rgba(68, 185, 255, 0.08)),
    rgba(5, 14, 31, 0.72);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.24);
}

.news-source-note img {
  width: 76px;
  height: 76px;
  object-fit: contain;
}

.news-source-note strong,
.news-source-note span {
  display: block;
}

.news-source-note strong {
  color: #ffffff;
  font-family:
    "Palatino Linotype",
    "Book Antiqua",
    Georgia,
    serif;
  font-size: 1.18rem;
}

.news-source-note span {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 760;
}

.news-hero-art {
  position: relative;
  min-height: 350px;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 240, 196, 0.24);
  border-radius: var(--radius);
  background: var(--panel-strong);
  box-shadow: var(--shadow);
}

.news-hero-art::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(180deg, transparent 45%, rgba(5, 13, 30, 0.86)),
    linear-gradient(135deg, rgba(47, 103, 255, 0.16), rgba(255, 87, 87, 0.1));
}

.news-hero-art img {
  width: 100%;
  height: 430px;
  object-fit: cover;
  filter: saturate(1.08) contrast(1.03);
}

.news-hero-art figcaption {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 2;
  padding: 14px;
  border: 1px solid rgba(255, 240, 196, 0.22);
  border-radius: var(--radius);
  background: rgba(5, 14, 31, 0.8);
}

.news-hero-art span,
.news-hero-art strong {
  display: block;
}

.news-hero-art span {
  color: var(--sky-2);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.news-hero-art strong {
  margin-top: 3px;
  color: #ffffff;
  font-family:
    "Palatino Linotype",
    "Book Antiqua",
    Georgia,
    serif;
  font-size: 1.22rem;
}

.news-board {
  padding: 52px 0 96px;
}

.news-board-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 18px;
}

.news-board-head h2 {
  color: #fff4ce;
  font-size: clamp(2rem, 4.4vw, 3.7rem);
}

.news-board-meta {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  margin: 0;
  padding: 7px 10px;
  border: 1px solid rgba(158, 220, 255, 0.28);
  border-radius: var(--radius);
  color: var(--sky-2);
  background: rgba(68, 185, 255, 0.09);
  font-size: 0.84rem;
  font-weight: 900;
}

.news-filter-panel {
  margin-bottom: 18px;
  padding: 12px;
  border: 1px solid rgba(255, 240, 196, 0.2);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 240, 196, 0.07), rgba(68, 185, 255, 0.06)),
    rgba(5, 14, 31, 0.68);
}

.news-filter-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.news-filter-chip {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  border: 1px solid rgba(255, 240, 196, 0.2);
  border-radius: var(--radius);
  padding: 9px 12px;
  color: #eaf7ff;
  background: rgba(255, 255, 255, 0.055);
  font-weight: 950;
  cursor: pointer;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

.news-filter-chip span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.news-filter-chip small {
  min-width: 26px;
  min-height: 24px;
  display: inline-grid;
  place-items: center;
  padding: 3px 6px;
  border-radius: 6px;
  color: var(--night);
  background: var(--cream);
  font-size: 0.72rem;
  font-weight: 950;
}

.news-filter-chip:hover,
.news-filter-chip.is-active {
  border-color: transparent;
  color: var(--night);
  background: linear-gradient(135deg, var(--cream), var(--sky-2));
}

.news-filter-chip:hover {
  transform: translateY(-2px);
}

.news-filter-chip.is-active small {
  color: #ffffff;
  background: rgba(7, 19, 40, 0.58);
}

.news-state {
  min-height: 200px;
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  margin-top: 14px;
  padding: 22px;
  border: 1px dashed rgba(255, 240, 196, 0.28);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 240, 196, 0.09), rgba(68, 185, 255, 0.08)),
    rgba(255, 255, 255, 0.04);
}

.news-state.is-error {
  border-color: rgba(255, 87, 87, 0.42);
  background:
    linear-gradient(135deg, rgba(255, 87, 87, 0.12), rgba(68, 185, 255, 0.06)),
    rgba(255, 255, 255, 0.04);
}

.news-state img {
  width: 92px;
  height: 92px;
  object-fit: contain;
}

.news-state h3 {
  color: #ffffff;
  font-size: clamp(1.55rem, 3vw, 2.25rem);
}

.news-state p {
  max-width: 760px;
  margin: 8px 0 0;
  color: var(--muted);
}

.news-content {
  display: grid;
  gap: 16px;
}

.news-featured-slot {
  display: grid;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.news-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 240, 196, 0.08), rgba(255, 255, 255, 0.025)),
    var(--panel-strong);
  box-shadow: 0 20px 58px rgba(0, 0, 0, 0.22);
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.news-card:hover {
  transform: translateY(-4px);
  border-color: var(--line-strong);
  box-shadow: 0 26px 74px rgba(0, 0, 0, 0.3);
}

.news-card-featured {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(300px, 0.72fr);
}

.news-card-media {
  position: relative;
  display: block;
  min-height: 220px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 26%, rgba(255, 240, 196, 0.16), transparent 42%),
    rgba(255, 255, 255, 0.045);
}

.news-card-media::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 48%, rgba(5, 13, 30, 0.42));
}

.news-card-media img {
  width: 100%;
  height: 244px;
  object-fit: cover;
  filter: saturate(1.06) contrast(1.02);
  transition: transform 180ms ease;
}

.news-card-featured .news-card-media {
  min-height: 100%;
}

.news-card-featured .news-card-media img {
  height: 100%;
  min-height: 394px;
}

.news-card:hover .news-card-media img {
  transform: scale(1.035);
}

.news-card-body {
  display: flex;
  min-height: 306px;
  flex-direction: column;
  padding: 16px;
}

.news-card-featured .news-card-body {
  min-height: 394px;
  padding: clamp(18px, 3vw, 28px);
}

.news-card-meta,
.news-card-source {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
}

.news-card-source {
  margin-top: 14px;
}

.news-pill {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 6px 8px;
  border: 1px solid rgba(255, 240, 196, 0.2);
  border-radius: 6px;
  color: #f6fbff;
  background: rgba(255, 255, 255, 0.065);
  font-size: 0.76rem;
  font-weight: 950;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.news-pill.is-category {
  color: var(--cream);
  border-color: rgba(255, 240, 196, 0.32);
  background: rgba(255, 240, 196, 0.1);
}

.news-pill.is-date,
.news-pill.is-source {
  border-color: rgba(158, 220, 255, 0.34);
  background: rgba(68, 185, 255, 0.1);
}

.news-pill.is-translation {
  border-color: rgba(255, 87, 87, 0.3);
  background: rgba(255, 87, 87, 0.1);
}

.news-card h3 {
  margin: 13px 0 0;
  color: #ffffff;
  font-size: 1.55rem;
  line-height: 1.09;
  overflow-wrap: anywhere;
}

.news-card-featured h3 {
  font-size: clamp(1.9rem, 3vw, 3rem);
}

.news-card h3 a {
  text-decoration: none;
}

.news-card h3 a:hover {
  color: var(--cream);
}

.news-card-summary {
  margin: 12px 0 0;
  color: var(--muted);
}

.news-read-link {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  margin-top: auto;
  padding: 10px 12px;
  border: 1px solid rgba(158, 220, 255, 0.3);
  border-radius: var(--radius);
  color: #ffffff;
  background: rgba(68, 185, 255, 0.1);
  font-weight: 950;
  text-decoration: none;
}

.news-read-link:hover {
  border-color: rgba(158, 220, 255, 0.65);
  background: rgba(68, 185, 255, 0.17);
}

.news-pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
}

.news-page-button,
.news-page-gap {
  min-width: 42px;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  font-weight: 950;
}

.news-page-button {
  border: 1px solid rgba(158, 220, 255, 0.3);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.055);
  cursor: pointer;
}

.news-page-button:hover:not(:disabled),
.news-page-button[aria-current="page"] {
  color: var(--night);
  border-color: transparent;
  background: linear-gradient(135deg, var(--cream), var(--sky-2));
}

.news-page-button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.news-page-gap {
  color: var(--soft);
}

@media (max-width: 1180px) {
  .home-news-grid,
  .news-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .news-hero-layout,
  .news-card-featured {
    grid-template-columns: 1fr;
  }

  .news-hero-art {
    max-width: 760px;
  }

  .news-card-featured .news-card-media img {
    height: 330px;
    min-height: 330px;
  }

  .news-card-featured .news-card-body {
    min-height: 0;
  }
}

@media (max-width: 760px) {
  .home-news-section {
    padding: 62px 0;
  }

  .home-news-head,
  .news-board-head {
    display: grid;
    gap: 14px;
    align-items: start;
  }

  .home-news-all-link {
    width: 100%;
    justify-content: center;
  }

  .home-news-state,
  .news-source-note,
  .news-state {
    grid-template-columns: 58px minmax(0, 1fr);
    padding: 12px;
  }

  .home-news-state img,
  .news-source-note img,
  .news-state img {
    width: 58px;
    height: 58px;
  }

  .home-news-grid,
  .news-grid {
    grid-template-columns: 1fr;
  }

  .home-news-card-body,
  .news-card-body {
    min-height: 0;
  }

  .news-hero {
    padding: 34px 0 24px;
  }

  .news-hero-layout {
    gap: 18px;
  }

  .news-hero-art {
    min-height: 260px;
  }

  .news-hero-art img {
    height: 300px;
  }

  .news-board {
    padding: 44px 0 68px;
  }

  .news-filter-panel {
    padding: 10px;
  }

  .news-filter-chip {
    flex: 1 1 auto;
    justify-content: center;
  }

  .news-card-featured .news-card-media img,
  .news-card-media img {
    height: 222px;
    min-height: 222px;
  }
}

@media (max-width: 430px) {
  .home-news-media {
    min-height: 158px;
  }

  .home-news-media img {
    height: 174px;
  }

  .home-news-card-body,
  .news-card-body {
    padding: 14px;
  }

  .news-board-meta {
    width: 100%;
    justify-content: center;
  }

  .news-page-button {
    min-width: 42px;
    min-height: 42px;
    padding-inline: 8px;
  }
}
