: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("./assets/modules/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 {
  position: relative;
  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 {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(360px, calc(100vw - 32px));
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(255, 240, 196, 0.18);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(68, 185, 255, 0.08), transparent 44%, rgba(255, 87, 87, 0.08)),
    rgba(5, 14, 31, 0.98);
  box-shadow: var(--shadow);
  transform: translateY(-6px) scale(0.98);
  transform-origin: top right;
  opacity: 0;
  pointer-events: none;
  transition:
    transform 160ms ease,
    opacity 160ms ease;
}

.primary-nav a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 10px 12px;
  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);
}

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

.header-actions {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 240, 196, 0.14);
}

.header-actions::before {
  content: "Compte";
  color: var(--soft);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.login-button,
.header-admin,
.header-share,
.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,
.header-share {
  color: var(--night);
  background: linear-gradient(135deg, var(--sky-2), var(--cream));
}

.header-share {
  cursor: pointer;
}

.header-share:disabled {
  cursor: wait;
  opacity: 0.74;
}

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

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

.nav-toggle {
  justify-self: end;
  display: grid;
  place-items: center;
  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("./assets/modules/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,
.live-section,
.talkers-section,
.discord-section {
  padding: 92px 0;
}

.live-section {
  background:
    linear-gradient(180deg, rgba(5, 14, 31, 0.88), rgba(7, 19, 40, 0.72)),
    linear-gradient(90deg, rgba(68, 185, 255, 0.1), rgba(255, 87, 87, 0.08));
}

.live-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.4fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

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

.live-panel {
  min-height: 360px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 240, 196, 0.1), rgba(255, 255, 255, 0.035)),
    rgba(6, 18, 38, 0.88);
  box-shadow: 0 20px 58px rgba(0, 0, 0, 0.24);
}

.live-panel-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.live-panel-head span {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--night);
  background: linear-gradient(135deg, var(--sky), var(--cream));
  font-weight: 950;
}

.live-panel h3 {
  color: var(--cream);
  font-size: 1.2rem;
}

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

.live-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  min-height: 86px;
  padding: 12px;
  border: 1px solid rgba(255, 240, 196, 0.13);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
}

.live-avatar {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(158, 220, 255, 0.34);
  border-radius: 8px;
  color: var(--cream);
  background: rgba(68, 185, 255, 0.14);
  font-weight: 950;
}

.live-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.live-meta,
.live-message {
  margin: 0;
  overflow-wrap: anywhere;
}

.live-meta {
  color: var(--soft);
  font-size: 0.78rem;
  font-weight: 850;
}

.live-row strong {
  display: block;
  color: #ffffff;
  font-size: 0.96rem;
}

.live-message {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.9rem;
}

.live-row-voice .live-avatar {
  color: var(--night);
  background: linear-gradient(135deg, var(--sky-2), var(--cream));
}

.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 1fr auto;
    gap: 12px;
  }

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

  .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));
  }

  .live-layout {
    grid-template-columns: 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,
  .live-grid,
  .discord-card,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

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

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

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

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

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

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

  .live-panel {
    min-height: 0;
    padding: 14px;
  }

  .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;
  }
}

.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("./assets/modules/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);
}

button.source-link {
  color: #ffffff;
  font: inherit;
  cursor: pointer;
}

button.source-link:disabled {
  cursor: wait;
  opacity: 0.72;
}

.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;
  }
}

/* AniiPote public */
.aniipote-page main {
  background:
    linear-gradient(180deg, rgba(7, 19, 40, 0.2), rgba(5, 13, 30, 0.64) 46%, rgba(6, 16, 33, 0.92)),
    repeating-linear-gradient(90deg, rgba(158, 220, 255, 0.045) 0 1px, transparent 1px 72px);
}

.aniipote-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 58px 0 42px;
  background:
    linear-gradient(118deg, rgba(4, 11, 24, 0.94), rgba(8, 23, 48, 0.9) 52%, rgba(47, 103, 255, 0.2)),
    linear-gradient(90deg, rgba(255, 87, 87, 0.14), transparent 30%, rgba(255, 240, 196, 0.09));
}

.aniipote-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    repeating-linear-gradient(0deg, transparent 0 23px, rgba(255, 240, 196, 0.055) 23px 24px),
    linear-gradient(180deg, transparent 65%, rgba(6, 16, 33, 0.95));
  opacity: 0.7;
}

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

.aniipote-hero-copy h1 {
  max-width: 720px;
  font-size: 5.4rem;
}

.aniipote-hero-subtitle {
  width: fit-content;
  margin: 12px 0 0;
  padding: 8px 10px;
  border: 1px solid rgba(158, 220, 255, 0.34);
  border-radius: var(--radius);
  color: var(--night);
  background: linear-gradient(135deg, var(--cream), var(--sky-2));
  font-weight: 950;
}

.aniipote-hero-lede {
  max-width: 690px;
  margin: 20px 0 0;
  color: #eaf7ff;
  font-size: 1.18rem;
}

.aniipote-hero-tags,
.aniipote-result-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.aniipote-hero-tags {
  margin-top: 24px;
}

.aniipote-hero-tags span,
.aniipote-result-meta span {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 7px 9px;
  border: 1px solid rgba(255, 240, 196, 0.24);
  border-radius: 6px;
  color: var(--cream);
  background: rgba(255, 240, 196, 0.09);
  font-size: 0.78rem;
  font-weight: 950;
  overflow-wrap: anywhere;
}

.aniipote-hero-art {
  position: relative;
  min-height: 420px;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 240, 196, 0.24);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 240, 196, 0.11), transparent 30%),
    linear-gradient(135deg, rgba(47, 103, 255, 0.2), rgba(255, 87, 87, 0.11)),
    rgba(5, 14, 31, 0.84);
  box-shadow: var(--shadow);
}

.aniipote-hero-art::before {
  content: "";
  position: absolute;
  inset: 16px;
  border: 1px solid rgba(158, 220, 255, 0.16);
  border-radius: var(--radius);
  pointer-events: none;
}

.aniipote-hero-art::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 46%, rgba(5, 13, 30, 0.9));
}

.aniipote-hero-art img {
  width: 100%;
  height: 460px;
  object-fit: contain;
  object-position: center bottom;
  padding: 24px 20px 86px;
}

.aniipote-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.84);
}

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

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

.aniipote-hero-art strong {
  margin-top: 4px;
  color: #ffffff;
  font-family:
    "Palatino Linotype",
    "Book Antiqua",
    Georgia,
    serif;
  font-size: 1.2rem;
  line-height: 1.12;
}

.aniipote-lab {
  padding: 54px 0 98px;
}

.aniipote-workbench {
  display: grid;
  grid-template-columns: minmax(290px, 0.42fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.aniipote-query-panel,
.aniipote-answer-panel {
  min-width: 0;
  border: 1px solid rgba(255, 240, 196, 0.24);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 240, 196, 0.08), rgba(68, 185, 255, 0.06)),
    var(--panel-strong);
  box-shadow: 0 22px 62px rgba(0, 0, 0, 0.24);
}

.aniipote-query-panel {
  display: grid;
  gap: 18px;
  padding: 18px;
}

.aniipote-form-head,
.aniipote-answer-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.aniipote-form-head h2,
.aniipote-answer-panel > h2 {
  font-size: 1.6rem;
}

.aniipote-form-head p,
.aniipote-answer-topline span {
  margin: 0;
  color: var(--soft);
  font-size: 0.82rem;
  font-weight: 900;
  white-space: nowrap;
}

.aniipote-question-field {
  display: block;
  margin-top: 12px;
}

.aniipote-question-field textarea {
  width: 100%;
  min-height: 188px;
  resize: vertical;
  border: 1px solid rgba(158, 220, 255, 0.3);
  border-radius: var(--radius);
  padding: 13px 14px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.075);
  font: inherit;
  font-weight: 760;
}

.aniipote-question-field textarea::placeholder {
  color: rgba(201, 212, 223, 0.78);
}

.aniipote-question-field textarea:focus {
  border-color: rgba(255, 240, 196, 0.72);
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 240, 196, 0.16);
}

.aniipote-submit {
  width: 100%;
  margin-top: 12px;
  cursor: pointer;
}

.aniipote-submit:disabled {
  cursor: wait;
  opacity: 0.72;
  transform: none;
}

.aniipote-suggestions h3,
.aniipote-evidence-card h3 {
  color: var(--sky-2);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: uppercase;
}

.aniipote-suggestion-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.aniipote-suggestion-list button {
  min-height: 42px;
  border: 1px solid rgba(255, 240, 196, 0.2);
  border-radius: var(--radius);
  padding: 10px 12px;
  color: #f6fbff;
  background: rgba(255, 255, 255, 0.055);
  font-weight: 900;
  text-align: left;
  cursor: pointer;
  overflow-wrap: anywhere;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

.aniipote-suggestion-list button:hover {
  transform: translateY(-2px);
  border-color: rgba(158, 220, 255, 0.58);
  background: rgba(68, 185, 255, 0.12);
}

.aniipote-rule-note {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px dashed rgba(255, 240, 196, 0.28);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.045);
}

.aniipote-rule-note strong {
  color: #ffffff;
  font-weight: 950;
}

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

.aniipote-answer-panel {
  padding: 18px;
}

.aniipote-answer-panel > h2 {
  margin-top: 4px;
  color: #fff4ce;
}

.aniipote-state {
  min-height: 228px;
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  margin-top: 16px;
  padding: 18px;
  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);
}

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

.aniipote-state.is-warning {
  border-color: rgba(255, 240, 196, 0.46);
}

.aniipote-state img {
  width: 82px;
  height: 82px;
  object-fit: contain;
}

.aniipote-state h3 {
  color: #ffffff;
  font-size: 1.8rem;
}

.aniipote-state p {
  margin: 8px 0 0;
  color: var(--muted);
}

.aniipote-result {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}

.aniipote-result-header {
  padding: 16px;
  border: 1px solid rgba(255, 240, 196, 0.18);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(47, 103, 255, 0.12), transparent 44%, rgba(255, 87, 87, 0.08)),
    rgba(255, 255, 255, 0.045);
}

.aniipote-result-header h3 {
  margin-top: 14px;
  color: #ffffff;
  font-size: 2rem;
}

.aniipote-result-header p,
.aniipote-block p,
.aniipote-mini-card p,
.aniipote-evidence-card p {
  color: var(--muted);
}

.aniipote-result-header p {
  margin: 10px 0 0;
}

.aniipote-share-link {
  width: fit-content;
}

.aniipote-result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.aniipote-blocks {
  display: grid;
  gap: 12px;
}

.aniipote-block,
.aniipote-evidence-card {
  min-width: 0;
  padding: 16px;
  border: 1px solid rgba(255, 240, 196, 0.17);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.045);
}

.aniipote-block.is-note {
  border-color: rgba(158, 220, 255, 0.32);
  background: rgba(68, 185, 255, 0.08);
}

.aniipote-block.is-warning {
  border-color: rgba(255, 87, 87, 0.38);
  background: rgba(255, 87, 87, 0.08);
}

.aniipote-block h3 {
  color: #ffffff;
  font-size: 1.42rem;
}

.aniipote-block h3 + p,
.aniipote-block p:first-child {
  margin-top: 10px;
}

.aniipote-answer-list,
.aniipote-evidence-list {
  display: grid;
  gap: 9px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.aniipote-answer-list li,
.aniipote-evidence-list li {
  min-width: 0;
  padding: 10px 11px;
  border: 1px solid rgba(255, 240, 196, 0.14);
  border-radius: 6px;
  background: rgba(5, 14, 31, 0.46);
  overflow-wrap: anywhere;
}

.aniipote-answer-list strong,
.aniipote-answer-list span {
  display: block;
}

.aniipote-answer-list strong {
  color: #ffffff;
}

.aniipote-answer-list span {
  margin-top: 4px;
  color: var(--muted);
}

.aniipote-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.aniipote-mini-card {
  min-width: 0;
  padding: 13px;
  border: 1px solid rgba(158, 220, 255, 0.22);
  border-radius: var(--radius);
  background: rgba(68, 185, 255, 0.07);
}

.aniipote-mini-card img {
  width: 74px;
  height: 74px;
  border-radius: 10px;
  object-fit: cover;
  margin-bottom: 10px;
  background: rgba(255, 255, 255, 0.08);
}

.aniipote-mini-card h4 {
  margin: 0;
  color: #ffffff;
  font-size: 1rem;
}

.aniipote-mini-card p {
  margin: 8px 0 0;
}

.aniipote-stat-list {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
}

.aniipote-stat-list div {
  display: grid;
  grid-template-columns: minmax(100px, 0.34fr) minmax(0, 1fr);
  gap: 10px;
  padding: 10px 11px;
  border: 1px solid rgba(255, 240, 196, 0.14);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.035);
}

.aniipote-stat-list dt,
.aniipote-stat-list dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.aniipote-stat-list dt {
  color: var(--soft);
  font-weight: 950;
}

.aniipote-stat-list dd {
  color: #ffffff;
  font-weight: 850;
}

.aniipote-table-wrap {
  max-width: 100%;
  overflow-x: auto;
  margin-top: 12px;
  border: 1px solid rgba(255, 240, 196, 0.14);
  border-radius: var(--radius);
}

.aniipote-table-wrap:focus-visible {
  outline: 3px solid rgba(158, 220, 255, 0.78);
  outline-offset: 3px;
}

.aniipote-table-wrap table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
}

.aniipote-table-wrap th,
.aniipote-table-wrap td {
  padding: 11px 12px;
  border-bottom: 1px solid rgba(255, 240, 196, 0.12);
  text-align: left;
  vertical-align: top;
}

.aniipote-table-wrap th {
  color: var(--cream);
  background: rgba(255, 240, 196, 0.08);
  font-size: 0.8rem;
  font-weight: 950;
  text-transform: uppercase;
}

.aniipote-table-wrap td {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.aniipote-table-wrap th:first-child,
.aniipote-table-wrap td:first-child,
.aniipote-table-wrap th:nth-child(3),
.aniipote-table-wrap td:nth-child(3) {
  white-space: nowrap;
}

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

.aniipote-evidence-list a {
  color: var(--sky-2);
  font-weight: 900;
  text-decoration: none;
}

.aniipote-evidence-list a:hover {
  color: var(--cream);
}

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

  .aniipote-hero-art {
    max-width: 600px;
  }

  .aniipote-evidence-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .aniipote-hero {
    padding: 36px 0 28px;
  }

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

  .aniipote-hero-copy h1 {
    font-size: 3.45rem;
  }

  .aniipote-hero-lede {
    font-size: 1.04rem;
  }

  .aniipote-hero-art {
    min-height: 320px;
  }

  .aniipote-hero-art img {
    height: 350px;
    padding: 12px 12px 82px;
  }

  .aniipote-lab {
    padding: 44px 0 68px;
  }

  .aniipote-query-panel,
  .aniipote-answer-panel {
    padding: 12px;
  }

  .aniipote-form-head,
  .aniipote-answer-topline {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .aniipote-question-field textarea {
    min-height: 162px;
  }

  .aniipote-state {
    grid-template-columns: 58px minmax(0, 1fr);
    min-height: 178px;
    padding: 12px;
  }

  .aniipote-state img {
    width: 58px;
    height: 58px;
  }

  .aniipote-state h3 {
    font-size: 1.38rem;
  }

  .aniipote-result-header,
  .aniipote-block,
  .aniipote-evidence-card {
    padding: 13px;
  }

  .aniipote-result-header h3 {
    font-size: 1.48rem;
  }

  .aniipote-card-grid,
  .aniipote-stat-list div {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 430px) {
  .aniipote-hero-copy h1 {
    font-size: 3rem;
  }

  .aniipote-hero-subtitle,
  .aniipote-hero-tags span,
  .aniipote-result-meta span {
    width: 100%;
  }

  .aniipote-hero-art figcaption {
    left: 10px;
    right: 10px;
    bottom: 10px;
    padding: 12px;
  }

  .aniipote-suggestion-list button {
    padding: 10px;
  }
}

.tool-page {
  background:
    linear-gradient(180deg, rgba(7, 19, 40, 0.68), rgba(7, 19, 40, 0.98) 60%, #061021),
    url("./assets/modules/background.png") center top / cover fixed no-repeat;
}

.tool-hero,
.tool-section {
  padding: 72px 0;
}

.tool-hero-grid,
.tool-detail-grid,
.team-builder-layout,
.tier-builder-layout,
.comparator-board {
  display: grid;
  gap: 18px;
}

.tool-hero-grid {
  grid-template-columns: minmax(0, 0.82fr) minmax(360px, 1fr);
  align-items: center;
}

.tool-hero-copy h1 {
  margin: 0 0 18px;
  max-width: 780px;
  font-family: "Palatino Linotype", "Book Antiqua", Georgia, serif;
  font-size: clamp(2.8rem, 5.2vw, 5.15rem);
  line-height: 0.96;
  overflow-wrap: break-word;
}

.tool-hero-copy p {
  max-width: 660px;
  color: #e7f4ff;
  font-size: 1.08rem;
}

.tool-hero-art,
.tool-detail-media {
  position: relative;
  overflow: hidden;
  margin: 0;
  border: 1px solid rgba(255, 240, 196, 0.25);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: var(--shadow);
}

.tool-hero-art img,
.tool-detail-media img {
  width: 100%;
  min-height: 320px;
  object-fit: cover;
}

.tool-panel,
.tool-detail-hero .shell,
.ranking-toolbar,
.tool-selector-card,
.public-tool-card,
.ranking-row,
.podium-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 240, 196, 0.08), transparent 46%, rgba(68, 185, 255, 0.08)),
    var(--panel);
  box-shadow: var(--shadow);
}

.tool-panel,
.tool-selector-card,
.tool-detail-hero .shell {
  padding: 18px;
}

.tool-workspace,
.team-builder-layout {
  display: grid;
  gap: 18px;
}

.team-builder-layout {
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
}

.team-slots,
.selected-team-grid,
.selector-grid,
.public-tool-grid,
.score-grid,
.podium-grid {
  display: grid;
  gap: 12px;
}

.team-slots {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  margin-bottom: 16px;
}

.team-slot-card,
.selector-card,
.tool-mini-card,
.compare-card,
.tier-pool-card,
.tier-item {
  border: 1px solid rgba(158, 220, 255, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
}

.team-slot-card {
  min-height: 218px;
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 12px;
}

.team-slot-card img,
.selector-card img,
.tool-mini-card img,
.compare-card img,
.tier-pool-card img,
.tier-item img,
.public-tool-card > img,
.ranking-row img,
.podium-card img {
  width: 76px;
  height: 76px;
  border-radius: 8px;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.08);
}

.empty-slot {
  width: 100%;
  min-height: 190px;
  border: 1px dashed rgba(255, 240, 196, 0.45);
  border-radius: 8px;
  color: var(--cream);
  background: rgba(255, 255, 255, 0.04);
  font-weight: 900;
  cursor: pointer;
}

.slot-actions,
.tool-actions,
.compare-actions,
.selector-head,
.tool-section-head {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.slot-actions a,
.slot-actions button {
  min-height: 32px;
  border: 1px solid rgba(158, 220, 255, 0.28);
  border-radius: 8px;
  padding: 6px 8px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.08);
  font-weight: 850;
  text-decoration: none;
  cursor: pointer;
}

.team-form-grid,
.selector-filters,
.tool-filter-bar,
.ranking-toolbar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  align-items: end;
}

.team-form-grid {
  margin: 14px 0;
}

.team-form-grid label,
.selector-filters label,
.tool-filter-bar label,
.ranking-toolbar label,
.mini-label,
.tier-mobile-controls label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-weight: 850;
}

.team-form-grid input,
.team-form-grid textarea,
.selector-filters input,
.selector-filters select,
.tool-filter-bar input,
.tool-filter-bar select,
.ranking-toolbar input,
.ranking-toolbar select,
.mini-label select,
.tier-mobile-controls select {
  width: 100%;
  min-height: 42px;
  border: 1px solid rgba(255, 240, 196, 0.25);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(5, 14, 31, 0.92);
  padding: 8px 10px;
  font: inherit;
  font-weight: 800;
}

.team-form-grid textarea {
  resize: vertical;
}

.tool-feedback {
  min-height: 24px;
  color: var(--cream);
  font-weight: 850;
}

.score-grid {
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  margin-bottom: 14px;
}

.score-grid div {
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.score-grid span,
.public-tool-card span,
.ranking-row small {
  display: block;
  color: var(--soft);
  font-weight: 800;
}

.score-grid strong {
  display: block;
  margin-top: 4px;
  color: var(--cream);
  font-size: 1.7rem;
}

.tool-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.tool-table {
  width: 100%;
  border-collapse: collapse;
}

.tool-table th,
.tool-table td {
  padding: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  text-align: left;
}

.tool-table th {
  color: var(--cream);
}

.is-positive {
  color: #b9ffdf;
}

.is-negative {
  color: #ffb7b7;
}

.tool-list {
  margin: 8px 0 16px;
  padding-left: 20px;
  color: #edf8ff;
}

.tool-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.tool-chip-list span,
.codex-badge {
  border: 1px solid rgba(158, 220, 255, 0.28);
  border-radius: 999px;
  padding: 7px 10px;
  color: var(--cream);
  background: rgba(255, 255, 255, 0.08);
  font-weight: 850;
}

.tool-selector {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(3, 9, 20, 0.72);
  backdrop-filter: blur(12px);
}

.tool-selector-card {
  width: min(100%, 1040px);
  max-height: min(860px, calc(100vh - 36px));
  overflow: auto;
}

.selector-head {
  justify-content: space-between;
  margin-bottom: 14px;
}

.icon-close {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 240, 196, 0.25);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.08);
  font-size: 1.5rem;
  cursor: pointer;
}

.selector-grid,
.public-tool-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  margin-top: 14px;
}

.selector-card {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 10px;
  padding: 12px;
}

.selector-card .mini-label,
.selector-card button {
  grid-column: 1 / -1;
}

.public-tool-card {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 14px;
}

.public-tool-card > img {
  width: 92px;
  height: 92px;
}

.public-tool-card .tool-actions {
  grid-column: 1 / -1;
}

.public-vote-strip,
.public-voter-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-top: 10px;
}

.public-vote-strip > span:first-child {
  color: var(--soft);
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: uppercase;
}

.public-voter-pill {
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  border: 1px solid rgba(158, 220, 255, 0.24);
  border-radius: 999px;
  padding: 4px 8px;
  color: var(--ink);
  background: rgba(68, 185, 255, 0.1);
  font-size: 0.78rem;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.public-voter-pill img {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 auto;
}

.comparator-board {
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
}

.versus-badge {
  width: 70px;
  height: 70px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--night);
  background: linear-gradient(135deg, var(--sky-2), var(--cream));
  font-weight: 950;
  box-shadow: var(--shadow);
}

.compare-card {
  display: grid;
  gap: 8px;
  justify-items: start;
  padding: 12px;
  margin-bottom: 12px;
}

.tier-builder-layout {
  grid-template-columns: minmax(280px, 0.36fr) minmax(0, 0.64fr);
}

.tier-pool,
.tier-board {
  display: grid;
  gap: 10px;
}

.tier-pool {
  max-height: 740px;
  overflow: auto;
  padding-right: 4px;
}

.tier-pool-card,
.tier-item {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 68px;
  padding: 8px;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.tier-pool-card img,
.tier-item img {
  width: 54px;
  height: 54px;
}

.tier-row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 10px;
  min-height: 92px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.tier-row > strong {
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--night);
  background: var(--cream);
  font-size: 1.6rem;
}

.tier-s > strong {
  background: #ff8585;
}

.tier-a > strong {
  background: #ffd07d;
}

.tier-b > strong {
  background: #fff0a6;
}

.tier-c > strong {
  background: #baf2c4;
}

.tier-d > strong {
  background: #a9d8ff;
}

.tier-items {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tier-mobile-controls {
  margin-bottom: 12px;
}

.ranking-toolbar {
  margin-bottom: 18px;
  padding: 14px;
}

.podium-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 18px 0;
}

.podium-card {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 18px;
  text-align: center;
}

.podium-card span {
  color: var(--cream);
  font-weight: 950;
  font-size: 1.8rem;
}

.podium-card img {
  width: 104px;
  height: 104px;
}

.podium-card em {
  color: var(--sky-2);
  font-style: normal;
  font-weight: 950;
}

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

.ranking-row {
  display: grid;
  grid-template-columns: 54px 64px minmax(0, 1fr) 90px auto;
  gap: 12px;
  align-items: center;
  padding: 10px;
}

.ranking-row img {
  width: 64px;
  height: 64px;
}

.ranking-row > span,
.ranking-row b {
  color: var(--cream);
  font-weight: 950;
}

.ranking-row a {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(158, 220, 255, 0.28);
  border-radius: 8px;
  padding: 6px 8px;
  text-decoration: none;
  font-weight: 850;
}

.tool-skeleton {
  min-height: 96px;
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.06), rgba(158, 220, 255, 0.16), rgba(255, 255, 255, 0.06));
  background-size: 240% 100%;
  animation: tool-skeleton 1.4s ease infinite;
}

@keyframes tool-skeleton {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: -100% 0;
  }
}

.tool-detail-hero {
  padding: 48px 0 24px;
}

.tool-detail-hero .shell {
  padding: 28px;
}

.tool-lede {
  max-width: 760px;
  color: #e8f5ff;
  font-size: 1.06rem;
}

.community-tier-view {
  display: grid;
  gap: 10px;
}

.codex-tool-actions {
  margin: 18px 0;
}

@media (max-width: 980px) {
  .tool-hero,
  .tool-section {
    padding: 52px 0;
  }

  .tool-hero-grid,
  .team-builder-layout,
  .tier-builder-layout,
  .comparator-board {
    grid-template-columns: 1fr;
  }

  .versus-badge {
    justify-self: center;
  }

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

  .ranking-row {
    grid-template-columns: 42px 56px minmax(0, 1fr);
  }

  .ranking-row b,
  .ranking-row a {
    grid-column: 3;
    justify-self: start;
  }
}

@media (max-width: 620px) {
  .tool-hero-copy h1 {
    font-size: 3rem;
  }

  .tool-panel,
  .tool-selector-card {
    padding: 12px;
  }

  .public-tool-card,
  .selector-card {
    grid-template-columns: 1fr;
  }

  .team-slots,
  .score-grid,
  .selector-grid,
  .public-tool-grid {
    grid-template-columns: 1fr;
  }

  .tier-row {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .tier-row > strong {
    font-size: 1.2rem;
  }
}

/* Objets public */
.objects-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 56px 0 34px;
  background:
    linear-gradient(180deg, rgba(7, 19, 40, 0.74), rgba(5, 13, 30, 0.94)),
    radial-gradient(circle at 78% 20%, rgba(68, 185, 255, 0.22), transparent 34%),
    radial-gradient(circle at 14% 76%, rgba(255, 87, 87, 0.15), transparent 32%);
}

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

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

.objects-hero-copy h1 {
  max-width: 780px;
  font-size: clamp(2.8rem, 5.8vw, 5.8rem);
}

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

.objects-sync-note {
  width: min(100%, 650px);
  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);
}

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

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

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

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

.objects-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);
}

.objects-hero-art::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  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));
}

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

.objects-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);
}

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

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

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

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

.objects-toolbar {
  display: grid;
  gap: 16px;
  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);
}

.objects-search-row {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) repeat(3, minmax(180px, 0.32fr));
  gap: 12px;
  align-items: end;
}

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

.objects-field span {
  color: var(--sky-2);
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: uppercase;
}

.objects-field input,
.objects-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;
}

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

.objects-field select {
  cursor: pointer;
}

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

.objects-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.objects-switch {
  min-height: 46px;
  display: inline-grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid rgba(255, 240, 196, 0.18);
  border-radius: var(--radius);
  color: #eff8ff;
  background: rgba(255, 255, 255, 0.055);
  font-weight: 850;
  cursor: pointer;
}

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

.objects-reset {
  margin: 0;
  cursor: pointer;
}

.objects-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);
}

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

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

.objects-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);
}

.objects-state.is-error,
.objects-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);
}

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

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

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

.objects-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.43fr);
  gap: 16px;
  align-items: start;
  margin-top: 16px;
}

.objects-results {
  min-width: 0;
}

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

.objects-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;
}

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

.objects-card-media {
  position: relative;
  display: block;
  width: 100%;
  min-height: 178px;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  padding: 0;
  background:
    radial-gradient(circle at 50% 26%, rgba(255, 240, 196, 0.16), transparent 42%),
    rgba(255, 255, 255, 0.045);
  cursor: pointer;
}

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

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

.objects-card:hover .objects-card-media img,
.objects-card.is-selected .objects-card-media img {
  transform: scale(1.035);
}

.objects-card-body {
  min-height: 260px;
  display: flex;
  flex-direction: column;
  padding: 14px;
}

.objects-card-meta,
.objects-detail-badges,
.objects-card-actions,
.objects-detail-actions,
.objects-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.objects-card h3 {
  margin: 12px 0 0;
  color: #ffffff;
  font-size: 1.42rem;
  line-height: 1.08;
  overflow-wrap: anywhere;
}

.objects-card-description {
  margin: 10px 0 14px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 740;
}

.objects-card-actions {
  margin-top: auto;
}

.objects-card-action,
.objects-card-map {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(158, 220, 255, 0.3);
  border-radius: var(--radius);
  padding: 9px 11px;
  color: #ffffff;
  background: rgba(68, 185, 255, 0.1);
  font: inherit;
  font-weight: 950;
  text-decoration: none;
  cursor: pointer;
}

.objects-card-map {
  color: var(--cream);
  border-color: rgba(255, 240, 196, 0.28);
  background: rgba(255, 240, 196, 0.08);
}

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

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

.objects-pill.is-category {
  border-color: rgba(68, 185, 255, 0.42);
  background: rgba(47, 103, 255, 0.18);
}

.objects-pill.is-rarity {
  color: var(--cream);
  border-color: rgba(255, 240, 196, 0.34);
  background: rgba(255, 240, 196, 0.1);
}

.objects-pill.is-valid {
  color: #ddffe9;
  border-color: rgba(91, 255, 158, 0.34);
  background: rgba(51, 172, 104, 0.15);
}

.objects-pill.is-pending {
  color: #ffe1b8;
  border-color: rgba(255, 186, 99, 0.38);
  background: rgba(255, 167, 66, 0.13);
}

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

.objects-detail {
  position: sticky;
  top: 94px;
  min-width: 0;
}

.objects-detail-empty,
.objects-detail-loading,
.objects-detail-card {
  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);
}

.objects-detail-empty,
.objects-detail-loading {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 18px;
}

.objects-detail-empty.is-error {
  border-color: rgba(255, 87, 87, 0.42);
}

.objects-detail-empty img,
.objects-detail-loading img {
  width: 86px;
  height: 86px;
  object-fit: contain;
}

.objects-detail-empty h2,
.objects-detail-loading h2 {
  font-size: clamp(1.35rem, 2.2vw, 2rem);
}

.objects-detail-empty p:not(.eyebrow),
.objects-detail-loading p {
  margin: 8px 0 0;
  color: var(--muted);
  font-weight: 740;
}

.objects-detail-card {
  position: relative;
  overflow: hidden;
}

.objects-detail-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  min-height: 36px;
  border: 1px solid rgba(255, 240, 196, 0.22);
  border-radius: var(--radius);
  padding: 7px 9px;
  color: var(--ink);
  background: rgba(5, 14, 31, 0.78);
  font-weight: 900;
  cursor: pointer;
}

.objects-detail-visual {
  margin: 0;
  background:
    radial-gradient(circle at 50% 24%, rgba(255, 240, 196, 0.18), transparent 42%),
    rgba(255, 255, 255, 0.045);
}

.objects-detail-visual img {
  width: 100%;
  height: 240px;
  object-fit: contain;
  padding: 24px;
}

.objects-detail-body {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.objects-detail-body h2 {
  color: #ffffff;
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  overflow-wrap: anywhere;
}

.objects-detail-description,
.objects-detail-section p,
.objects-muted {
  margin: 0;
  color: var(--muted);
  font-weight: 740;
}

.objects-detail-actions .source-link {
  margin-top: 0;
}

.objects-share-button[hidden] {
  display: none;
}

.objects-detail-section {
  display: grid;
  gap: 9px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 240, 196, 0.14);
}

.objects-detail-section h3 {
  color: var(--cream);
  font-size: 1.08rem;
}

.objects-chip-list a,
.objects-chip-list span {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(158, 220, 255, 0.28);
  border-radius: 6px;
  padding: 7px 10px;
  color: var(--cream);
  background: rgba(255, 255, 255, 0.08);
  font-weight: 850;
  text-decoration: none;
}

.objects-detail-rows {
  display: grid;
  gap: 8px;
  margin: 0;
}

.objects-detail-rows div {
  display: grid;
  grid-template-columns: minmax(90px, 0.36fr) minmax(0, 1fr);
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(255, 240, 196, 0.13);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.045);
}

.objects-detail-rows dt,
.objects-detail-rows dd {
  margin: 0;
}

.objects-detail-rows dt {
  color: var(--soft);
  font-weight: 950;
}

.objects-detail-rows dd {
  color: #ffffff;
  font-weight: 850;
  overflow-wrap: anywhere;
}

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

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

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

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

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

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

.objects-skeleton {
  min-height: 438px;
  border: 1px solid rgba(255, 240, 196, 0.14);
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.045), rgba(158, 220, 255, 0.14), rgba(255, 255, 255, 0.045)),
    rgba(255, 255, 255, 0.04);
  background-size: 240% 100%;
  animation: objects-skeleton 1.4s ease infinite;
}

@keyframes objects-skeleton {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: -100% 0;
  }
}

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

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

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

  .objects-layout {
    grid-template-columns: minmax(0, 1fr) minmax(290px, 0.48fr);
  }
}

@media (max-width: 920px) {
  .objects-layout {
    grid-template-columns: 1fr;
  }

  .objects-detail {
    position: static;
  }
}

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

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

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

  .objects-sync-note img,
  .objects-state img,
  .objects-detail-empty img,
  .objects-detail-loading img {
    width: 58px;
    height: 58px;
  }

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

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

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

  .objects-toolbar {
    padding: 12px;
  }

  .objects-search-row,
  .objects-grid {
    grid-template-columns: 1fr;
  }

  .objects-toolbar-actions {
    align-items: stretch;
  }

  .objects-switch,
  .objects-reset {
    width: 100%;
  }

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

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

  .objects-card-media {
    min-height: 160px;
  }

  .objects-card-media img {
    height: 178px;
    padding: 12px;
  }

  .objects-detail-visual img {
    height: 190px;
    padding: 16px;
  }

  .objects-detail-body {
    padding: 14px;
  }

  .objects-detail-rows div {
    grid-template-columns: 1fr;
  }

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

/* Accueil vivant Ani!mo France */
body.home-page {
  background:
    linear-gradient(180deg, rgba(6, 16, 33, 0.2), rgba(6, 16, 33, 0.94) 48%, #050d1e 100%),
    url("./assets/modules/background.png") center top / cover fixed no-repeat;
}

.home-page main {
  overflow: hidden;
}

.home-page .reveal {
  opacity: 0;
  transform: translateY(24px);
  animation: none;
  transition:
    opacity 560ms ease,
    transform 560ms ease;
}

.home-page .reveal.is-revealed {
  opacity: 1;
  transform: translateY(0);
}

.home-page .delay-1 {
  transition-delay: 80ms;
}

.home-page .delay-2 {
  transition-delay: 160ms;
}

.home-page .delay-3 {
  transition-delay: 240ms;
}

.home-hero {
  min-height: calc(100svh - 96px);
  background:
    linear-gradient(90deg, rgba(5, 13, 30, 0.96) 0%, rgba(5, 13, 30, 0.76) 45%, rgba(5, 13, 30, 0.28) 100%),
    radial-gradient(circle at 68% 38%, rgba(158, 220, 255, 0.26), transparent 33%),
    radial-gradient(circle at 18% 84%, rgba(255, 87, 87, 0.16), transparent 28%);
}

.home-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(180deg, rgba(7, 19, 40, 0.05), rgba(7, 19, 40, 0.96)),
    url("./assets/modules/background.png") center / cover no-repeat;
  filter: saturate(1.08) contrast(1.04);
}

.home-hero::after {
  height: 220px;
  background:
    linear-gradient(180deg, transparent, rgba(6, 16, 33, 0.98) 78%),
    linear-gradient(90deg, rgba(47, 103, 255, 0.22), transparent, rgba(255, 87, 87, 0.18));
}

.hero-sky {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(115deg, rgba(255, 240, 196, 0.1), transparent 24%),
    repeating-linear-gradient(132deg, rgba(255, 255, 255, 0.05) 0 1px, transparent 1px 12px);
  mask-image: linear-gradient(180deg, #000 0%, transparent 86%);
}

.home-page .hero-shell {
  min-height: calc(100svh - 132px);
  grid-template-columns: minmax(0, 0.94fr) minmax(330px, 0.86fr);
  gap: clamp(22px, 5vw, 72px);
  padding: clamp(44px, 7vw, 92px) 0 clamp(84px, 9vw, 128px);
}

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

.home-page h1 {
  max-width: 840px;
  font-size: clamp(4.2rem, 10vw, 9rem);
  line-height: 0.88;
  text-shadow: 0 18px 42px rgba(0, 0, 0, 0.5);
}

.home-page .hero-lede {
  max-width: 690px;
  color: #f5fbff;
  font-size: clamp(1.08rem, 2vw, 1.38rem);
  font-weight: 680;
}

.home-page .hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.home-page .button {
  border-radius: 8px;
}

.home-page .button-secondary {
  margin-left: 0;
  color: #fff8da;
  border-color: rgba(255, 240, 196, 0.38);
  background:
    linear-gradient(135deg, rgba(255, 240, 196, 0.1), rgba(68, 185, 255, 0.08)),
    rgba(5, 14, 31, 0.62);
}

.hero-route {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 720px;
  margin-top: clamp(28px, 5vw, 54px);
  padding: 0;
  list-style: none;
}

.hero-route li {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  border: 1px solid rgba(255, 240, 196, 0.22);
  border-radius: 8px;
  padding: 7px 10px;
  color: #eaf7ff;
  background: rgba(5, 14, 31, 0.72);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
  font-size: 0.82rem;
  font-weight: 850;
}

.hero-stage {
  position: relative;
  min-height: clamp(430px, 52vw, 660px);
  display: grid;
  place-items: center;
  isolation: isolate;
}

.hero-orbit {
  position: absolute;
  inset: 8% 4% 4%;
  z-index: -1;
  border: 1px solid rgba(158, 220, 255, 0.18);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 48%, rgba(255, 240, 196, 0.22), transparent 36%),
    radial-gradient(circle at 72% 28%, rgba(255, 87, 87, 0.16), transparent 26%),
    rgba(68, 185, 255, 0.05);
  box-shadow:
    inset 0 0 80px rgba(158, 220, 255, 0.12),
    0 28px 80px rgba(0, 0, 0, 0.22);
}

.hero-orbit span {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--cream);
  box-shadow: 0 0 24px rgba(255, 240, 196, 0.72);
}

.hero-orbit span:nth-child(1) {
  top: 12%;
  left: 24%;
}

.hero-orbit span:nth-child(2) {
  top: 46%;
  right: 6%;
  background: var(--sky-2);
}

.hero-orbit span:nth-child(3) {
  bottom: 13%;
  left: 16%;
  background: var(--red);
}

.hero-mascot {
  width: min(88%, 520px);
  height: auto;
  filter: drop-shadow(0 30px 70px rgba(0, 0, 0, 0.45));
  animation: mascot-float 5.8s ease-in-out infinite;
}

.hero-crest {
  position: absolute;
  right: 2%;
  bottom: 9%;
  width: clamp(116px, 16vw, 190px);
  height: auto;
  border: 1px solid rgba(255, 240, 196, 0.24);
  border-radius: 8px;
  padding: 8px;
  background: rgba(5, 14, 31, 0.66);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.34);
}

.hero-live-chip {
  position: absolute;
  left: 0;
  bottom: 0;
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  gap: 7px 10px;
  width: min(330px, 84%);
  padding: 14px;
  border: 1px solid rgba(255, 240, 196, 0.28);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(68, 185, 255, 0.15), rgba(255, 87, 87, 0.08)),
    rgba(5, 14, 31, 0.76);
  box-shadow: var(--shadow);
}

.hero-live-chip strong,
.hero-live-chip span:last-child {
  grid-column: 2;
}

.hero-live-chip strong {
  color: #ffffff;
}

.hero-live-chip span:last-child {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 720;
}

.live-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #63ffb0;
  box-shadow: 0 0 0 0 rgba(99, 255, 176, 0.6);
  animation: live-pulse 1.8s ease-out infinite;
}

.community-pulse {
  margin-top: -56px;
  padding: 0 0 72px;
}

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

.pulse-heading h2 {
  max-width: 760px;
  color: #fff5cf;
  font-size: clamp(1.55rem, 3vw, 2.6rem);
}

.pulse-label {
  display: inline-flex;
  flex: 0 0 auto;
  gap: 8px;
  align-items: center;
  color: #dff9ff;
  font-size: 0.82rem;
  font-weight: 950;
  text-transform: uppercase;
}

.pulse-strip {
  display: grid;
  grid-template-columns: repeat(7, minmax(128px, 1fr));
  gap: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 240, 196, 0.24);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(47, 103, 255, 0.18), rgba(255, 240, 196, 0.08), rgba(255, 87, 87, 0.14)),
    rgba(5, 14, 31, 0.86);
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.32);
}

.home-page .stat-card {
  min-height: 126px;
  justify-content: center;
  gap: 8px;
  padding: 18px 16px;
  border: 0;
  border-left: 1px solid rgba(255, 240, 196, 0.16);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.home-page .stat-card:first-child {
  border-left: 0;
}

.home-page .stat-label,
.home-page .stat-note {
  color: #b8daf1;
  font-size: 0.74rem;
  text-transform: uppercase;
}

.home-page .stat-value {
  margin: 0;
  color: #ffffff;
  font-size: clamp(1.85rem, 3.7vw, 3.6rem);
}

.live-now {
  position: relative;
  padding: 104px 0;
  background:
    linear-gradient(180deg, rgba(6, 16, 33, 0.98), rgba(10, 30, 58, 0.82)),
    radial-gradient(circle at 18% 20%, rgba(68, 185, 255, 0.22), transparent 34%),
    radial-gradient(circle at 92% 70%, rgba(255, 87, 87, 0.14), transparent 30%);
}

.live-intro {
  max-width: 820px;
  margin: 0 auto 34px;
  text-align: center;
}

.live-intro h2 {
  font-size: clamp(2.2rem, 5vw, 4.9rem);
}

.live-intro p:not(.eyebrow) {
  margin: 18px auto 0;
  max-width: 720px;
  color: var(--muted);
  font-size: 1.04rem;
}

.live-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, 0.28fr) minmax(280px, 0.78fr);
  gap: 16px;
  align-items: center;
  min-width: 0;
}

.live-stage.is-live-sparse {
  max-width: 1120px;
  margin-inline: auto;
  grid-template-columns: minmax(0, 0.84fr) minmax(140px, 0.2fr) minmax(280px, 0.72fr);
}

.home-page .live-panel {
  min-width: 0;
  min-height: 390px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-color: rgba(255, 240, 196, 0.24);
  background:
    linear-gradient(180deg, rgba(255, 240, 196, 0.09), rgba(255, 255, 255, 0.035)),
    rgba(5, 14, 31, 0.78);
  backdrop-filter: blur(12px);
}

.live-stage.is-live-sparse .live-panel {
  min-height: 330px;
}

.live-stage.is-live-sparse .live-list {
  min-height: 168px;
  display: grid;
  grid-template-rows: none;
  align-content: center;
}

.live-stage.is-live-sparse .live-companion {
  min-height: 250px;
}

.live-panel-messages {
  transform: rotate(-0.4deg);
}

.live-panel-voice {
  transform: rotate(0.6deg);
}

.home-page .live-panel-head {
  align-items: start;
}

.home-page .live-panel-head .eyebrow {
  margin-bottom: 4px;
  font-size: 0.7rem;
}

.live-icon {
  flex: 0 0 auto;
}

.live-icon-voice::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #63ffb0;
  box-shadow: 0 0 18px rgba(99, 255, 176, 0.72);
}

.live-companion {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 330px;
}

.live-companion img {
  position: relative;
  z-index: 2;
  width: min(100%, 220px);
  height: auto;
  filter: drop-shadow(0 24px 54px rgba(0, 0, 0, 0.42));
}

.signal-ring {
  position: absolute;
  width: 230px;
  height: 230px;
  border: 1px solid rgba(158, 220, 255, 0.22);
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(255, 240, 196, 0.16), transparent 48%),
    rgba(68, 185, 255, 0.06);
  animation: signal-breathe 3.8s ease-in-out infinite;
}

.home-page .live-list {
  gap: 12px;
  flex: 1;
  grid-template-rows: repeat(3, minmax(88px, 1fr));
  align-content: stretch;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.home-page .live-row {
  min-width: 0;
  max-width: 100%;
  min-height: 88px;
  align-items: center;
  border-color: rgba(255, 240, 196, 0.16);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.07), rgba(68, 185, 255, 0.055)),
    rgba(255, 255, 255, 0.035);
  animation: lift-in 520ms ease both;
  transition:
    transform 170ms ease,
    border-color 170ms ease,
    background 170ms ease;
}

.home-page .live-list.is-switching .live-row {
  animation: live-swipe-in 520ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.home-page .live-row > div {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.home-page .live-row strong,
.home-page .live-meta,
.home-page .live-message {
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.home-page .live-message {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.home-page .live-row:hover {
  transform: translateY(-2px);
  border-color: rgba(158, 220, 255, 0.42);
  background: rgba(255, 255, 255, 0.08);
}

.live-count {
  font-family:
    "Palatino Linotype",
    "Book Antiqua",
    Georgia,
    serif;
  font-size: 1.25rem;
}

.voice-avatars {
  display: flex;
  margin-top: 10px;
}

.voice-avatars img {
  width: 30px;
  height: 30px;
  border: 2px solid rgba(5, 14, 31, 0.95);
  border-radius: 50%;
  object-fit: cover;
}

.voice-avatars img + img {
  margin-left: -9px;
}

.empty-state-with-mascot {
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 14px;
  justify-items: start;
  text-align: left;
}

.empty-state-with-mascot img {
  width: 62px;
  height: 62px;
  object-fit: contain;
}

.empty-state-with-mascot p {
  margin: 0;
  color: #f2f8ff;
  font-weight: 820;
}

.important-news {
  padding: 92px 0;
  background:
    linear-gradient(180deg, rgba(6, 16, 33, 0.96), rgba(7, 19, 40, 0.76)),
    radial-gradient(circle at 84% 20%, rgba(255, 240, 196, 0.14), transparent 32%);
}

.home-page .home-news-head {
  align-items: center;
}

.news-feature-layout {
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.72fr);
  grid-auto-rows: minmax(230px, auto);
}

.home-page .home-news-card {
  border-radius: 8px;
}

.home-news-card-feature {
  grid-row: span 2;
}

.home-news-card-feature .home-news-media {
  min-height: 320px;
}

.home-news-card-feature .home-news-media img {
  height: 360px;
}

.home-news-card-feature .home-news-card-body {
  min-height: 280px;
  padding: 22px;
}

.home-news-card-feature h3 {
  font-size: clamp(1.8rem, 3vw, 2.8rem);
}

.modules-section {
  padding: 104px 0;
  background:
    linear-gradient(180deg, rgba(7, 19, 40, 0.72), rgba(5, 13, 30, 0.96)),
    radial-gradient(circle at 8% 14%, rgba(68, 185, 255, 0.18), transparent 32%),
    radial-gradient(circle at 96% 52%, rgba(255, 87, 87, 0.13), transparent 30%);
}

.module-heading {
  max-width: 820px;
}

.module-journey {
  position: relative;
  display: grid;
  grid-auto-flow: dense;
  grid-auto-rows: minmax(178px, auto);
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 14px;
  margin-top: 28px;
}

.module-journey::before {
  content: "";
  position: absolute;
  top: 48%;
  left: 4%;
  right: 4%;
  z-index: 0;
  height: 4px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, var(--sky-2), rgba(255, 240, 196, 0.92), var(--red));
  box-shadow:
    0 0 28px rgba(68, 185, 255, 0.34),
    0 0 42px rgba(255, 87, 87, 0.18);
}

.module-journey::after {
  content: "Route AniiPote";
  position: absolute;
  top: -14px;
  left: 18px;
  z-index: 3;
  border: 1px solid rgba(255, 240, 196, 0.36);
  border-radius: 8px;
  padding: 7px 10px;
  color: #fff8da;
  background: rgba(5, 14, 31, 0.9);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
  font-size: 0.73rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.home-page .module-card {
  position: relative;
  min-height: 190px;
  border-radius: 8px;
  transform: none;
  overflow: hidden;
}

.home-page .module-card:hover {
  transform: translateY(-4px);
}

.home-page .module-card::after {
  inset: 0;
  height: auto;
  z-index: 1;
  display: block;
  background:
    linear-gradient(180deg, rgba(5, 13, 30, 0.34) 0%, rgba(5, 13, 30, 0.74) 43%, rgba(5, 13, 30, 0.99) 100%),
    linear-gradient(135deg, rgba(47, 103, 255, 0.16), rgba(255, 87, 87, 0.16));
}

.home-page .module-card::before {
  content: attr(data-route-step);
  position: absolute;
  top: 18px;
  left: 18px;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 2px solid rgba(255, 240, 196, 0.78);
  border-radius: 50%;
  color: #051325;
  background:
    linear-gradient(135deg, #fff8da, var(--sky-2));
  box-shadow: 0 0 0 8px rgba(5, 14, 31, 0.72), 0 14px 34px rgba(0, 0, 0, 0.28);
  font-weight: 950;
}

.home-page .module-card img {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  opacity: 1;
  object-fit: cover;
  object-position: center;
  filter: saturate(1.12) contrast(1.04);
  transition:
    transform 220ms ease,
    filter 220ms ease;
}

.home-page .module-card:hover img {
  transform: scale(1.035);
  filter: saturate(1.2) contrast(1.08);
}

.home-page .module-body {
  position: relative;
  inset: auto;
  z-index: 2;
  min-height: 100%;
  justify-content: flex-end;
  padding: 16px;
  background: linear-gradient(180deg, transparent, rgba(5, 13, 30, 0.9) 54%, rgba(5, 13, 30, 0.99));
}

.module-step {
  width: max-content;
  max-width: 100%;
  margin-bottom: 8px;
  color: var(--sky-2);
  font-size: 0.74rem;
  font-weight: 950;
  text-transform: uppercase;
}

.home-page .module-state {
  margin-bottom: 10px;
}

.module-card-feature {
  grid-column: span 5;
  grid-row: span 2;
}

.module-card-map {
  grid-column: span 4;
  grid-row: span 1;
}

.module-card-tall {
  grid-column: span 3;
  grid-row: span 1;
}

.module-card-guide {
  grid-column: span 3;
}

.module-card-workshop {
  grid-column: span 4;
  grid-row: span 1;
}

.module-card-tool[data-module-card="comparateur"] {
  grid-column: span 3;
}

.module-card-tool[data-module-card="tier-list"] {
  grid-column: span 3;
}

.module-card-tool[data-module-card="classement"] {
  grid-column: span 3;
}

.module-card-wide {
  grid-column: span 6;
  min-height: 220px;
}

.module-card-archive {
  grid-column: span 3;
}

.module-card-ai {
  grid-column: span 3;
}

.module-card:nth-child(3n + 2) {
  margin-top: 10px;
}

.module-card:nth-child(3n) {
  margin-top: 20px;
}

.event-section {
  padding: 24px 0 96px;
  background:
    linear-gradient(180deg, rgba(5, 13, 30, 0.96), rgba(7, 19, 40, 0.78));
}

.event-panel {
  display: grid;
  grid-template-columns: minmax(250px, 0.44fr) minmax(0, 1fr);
  gap: 30px;
  align-items: center;
  padding: 24px;
  border: 1px solid rgba(255, 240, 196, 0.24);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 240, 196, 0.09), rgba(68, 185, 255, 0.08), rgba(255, 87, 87, 0.08)),
    rgba(5, 14, 31, 0.78);
  box-shadow: var(--shadow);
}

.event-visual {
  min-height: 280px;
  margin: 0;
  overflow: hidden;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
}

.event-visual img {
  width: 100%;
  height: 100%;
  min-height: 280px;
  object-fit: cover;
}

.event-copy h2,
.ai-copy h2 {
  font-size: clamp(2rem, 4vw, 3.6rem);
}

.event-copy p:not(.eyebrow),
.ai-copy p:not(.eyebrow) {
  max-width: 680px;
  color: var(--muted);
}

.ai-experience {
  padding: 96px 0;
  background:
    linear-gradient(180deg, rgba(7, 19, 40, 0.78), rgba(6, 16, 33, 0.96)),
    radial-gradient(circle at 18% 22%, rgba(158, 220, 255, 0.18), transparent 32%);
}

.ai-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(320px, 1fr);
  gap: 34px;
  align-items: center;
}

.ai-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.ai-suggestions button {
  min-height: 40px;
  border: 1px solid rgba(158, 220, 255, 0.3);
  border-radius: 8px;
  padding: 9px 12px;
  color: #ffffff;
  background: rgba(68, 185, 255, 0.11);
  font-weight: 900;
  cursor: pointer;
}

.ai-suggestions button:hover {
  border-color: rgba(255, 240, 196, 0.52);
  background: rgba(255, 240, 196, 0.12);
}

.ai-console {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(255, 240, 196, 0.24);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 240, 196, 0.1), rgba(68, 185, 255, 0.08)),
    rgba(5, 14, 31, 0.84);
  box-shadow: var(--shadow);
}

.ai-console label {
  color: var(--sky-2);
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: uppercase;
}

.ai-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.ai-input-row input {
  min-width: 0;
  min-height: 52px;
  border: 1px solid rgba(158, 220, 255, 0.32);
  border-radius: 8px;
  padding: 12px 14px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.07);
  font: inherit;
  font-weight: 760;
}

.ai-input-row input::placeholder {
  color: rgba(201, 212, 223, 0.72);
}

.ai-response {
  min-height: 128px;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px dashed rgba(255, 240, 196, 0.28);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

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

.ai-response p {
  margin: 0;
  color: var(--muted);
  font-weight: 780;
}

.ai-response.is-thinking img {
  animation: mascot-float 1.6s ease-in-out infinite;
}

.home-page .talkers-section {
  background:
    linear-gradient(180deg, rgba(6, 16, 33, 0.96), rgba(5, 13, 30, 0.88));
}

.home-page .talkers-panel {
  border-radius: 8px;
}

.final-discord {
  padding: 40px 0 104px;
  background:
    linear-gradient(180deg, rgba(5, 13, 30, 0.88), rgba(5, 13, 30, 1));
}

.home-page .discord-card {
  grid-template-columns: minmax(270px, 0.52fr) minmax(0, 1fr) auto;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(47, 103, 255, 0.2), rgba(255, 240, 196, 0.09), rgba(255, 87, 87, 0.16)),
    rgba(7, 19, 40, 0.9);
}

.home-page .discord-visual {
  border-radius: 8px;
}

@keyframes mascot-float {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-12px);
  }
}

@keyframes live-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(99, 255, 176, 0.6);
  }

  70% {
    box-shadow: 0 0 0 10px rgba(99, 255, 176, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(99, 255, 176, 0);
  }
}

@keyframes signal-breathe {
  0%,
  100% {
    transform: scale(0.94);
    opacity: 0.68;
  }

  50% {
    transform: scale(1.05);
    opacity: 1;
  }
}

@keyframes live-swipe-in {
  from {
    opacity: 0;
    transform: translateX(34px);
  }

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

@media (max-width: 1180px) {
  .home-page .hero-shell,
  .live-stage,
  .ai-layout {
    grid-template-columns: 1fr;
  }

  .hero-stage {
    max-width: 620px;
    margin-inline: auto;
  }

  .pulse-strip {
    grid-template-columns: repeat(4, minmax(145px, 1fr));
  }

  .live-stage {
    align-items: stretch;
  }

  .live-companion {
    order: -1;
    min-height: 190px;
  }

  .live-companion img {
    width: 150px;
  }

  .signal-ring {
    width: 170px;
    height: 170px;
  }

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

  .module-card-feature,
  .module-card-map,
  .module-card-wide,
  .module-card-ai {
    grid-column: span 3;
  }

  .module-card-tall,
  .module-card-guide,
  .module-card-workshop,
  .module-card-tool,
  .module-card-archive {
    grid-column: span 3;
    grid-row: span 1;
  }

  .module-card:nth-child(3n + 2),
  .module-card:nth-child(3n) {
    margin-top: 0;
  }

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

@media (max-width: 760px) {
  body.home-page {
    background-attachment: scroll;
  }

  .home-hero {
    min-height: auto;
  }

  .home-page .hero-shell {
    min-height: auto;
    padding: 36px 0 76px;
  }

  .home-page h1 {
    font-size: clamp(3.2rem, 18vw, 5.4rem);
  }

  .home-page .hero-actions {
    display: grid;
  }

  .hero-route {
    margin-top: 24px;
  }

  .hero-stage {
    min-height: 390px;
  }

  .hero-mascot {
    width: min(86%, 360px);
  }

  .hero-crest {
    right: 0;
    bottom: 42px;
    width: 116px;
  }

  .hero-live-chip {
    width: 100%;
  }

  .pulse-heading {
    display: grid;
    align-items: start;
  }

  .pulse-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: visible;
    scroll-snap-type: none;
  }

  .home-page .stat-card {
    min-height: 116px;
    border-left: 0;
    border-top: 1px solid rgba(255, 240, 196, 0.16);
    scroll-snap-align: none;
  }

  .home-page .stat-card:nth-child(-n + 2) {
    border-top: 0;
  }

  .home-page .stat-card:nth-child(2n) {
    border-left: 1px solid rgba(255, 240, 196, 0.16);
  }

  .live-now,
  .important-news,
  .modules-section,
  .ai-experience {
    padding: 68px 0;
  }

  .live-intro {
    text-align: left;
  }

  .home-page .live-panel {
    min-height: auto;
    transform: none;
  }

  .live-stage,
  .live-stage.is-live-sparse {
    max-width: none;
    grid-template-columns: 1fr;
  }

  .live-voice-rail {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 6px;
    scroll-snap-type: x mandatory;
  }

  .live-voice-rail .live-row-voice {
    min-width: min(86vw, 330px);
    scroll-snap-align: start;
  }

  .news-feature-layout,
  .event-panel,
  .home-page .discord-card {
    grid-template-columns: 1fr;
  }

  .home-news-card-feature {
    grid-row: auto;
  }

  .home-news-card-feature .home-news-media,
  .home-news-card-feature .home-news-media img {
    min-height: 210px;
    height: 230px;
  }

  .module-journey {
    grid-auto-rows: auto;
    grid-template-columns: 1fr;
    padding-left: 0;
  }

  .module-journey::before {
    top: 24px;
    bottom: 24px;
    left: 18px;
    right: auto;
    width: 4px;
    height: auto;
    background: linear-gradient(180deg, var(--sky-2), rgba(255, 240, 196, 0.92), var(--red));
  }

  .module-journey::after {
    left: 18px;
  }

  .module-card-feature,
  .module-card-map,
  .module-card-wide,
  .module-card-ai,
  .module-card-tall,
  .module-card-guide,
  .module-card-workshop,
  .module-card-tool,
  .module-card-tool[data-module-card="comparateur"],
  .module-card-tool[data-module-card="tier-list"],
  .module-card-tool[data-module-card="classement"],
  .module-card-archive {
    grid-column: auto;
    grid-row: auto;
  }

  .module-card:nth-child(odd)::before,
  .module-card:nth-child(even)::before,
  .module-card-feature::before,
  .module-card-guide::before,
  .module-card-tool[data-module-card="comparateur"]::before,
  .module-card-tool[data-module-card="tier-list"]::before,
  .module-card-archive::before,
  .module-card-map::before,
  .module-card-tall::before,
  .module-card-workshop::before,
  .module-card-tool[data-module-card="classement"]::before,
  .module-card-ai::before,
  .module-card-wide::before {
    top: 16px;
    right: auto;
    left: 16px;
  }

  .home-page .module-card {
    min-height: 290px;
    margin-top: 0;
  }

  .event-section {
    padding-bottom: 68px;
  }

  .event-panel {
    padding: 16px;
  }

  .ai-input-row {
    grid-template-columns: 1fr;
  }

  .ai-response,
  .empty-state-with-mascot {
    grid-template-columns: 54px minmax(0, 1fr);
  }

  .ai-response img,
  .empty-state-with-mascot img {
    width: 54px;
    height: 54px;
  }

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

@media (max-width: 430px) {
  .hero-route li {
    width: calc(50% - 4px);
    justify-content: center;
    text-align: center;
  }

  .home-page .module-body {
    padding: 14px;
  }

  .home-page .module-card {
    min-height: 260px;
  }

  .home-page .talker-row {
    gap: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-page .reveal,
  .home-page .reveal.is-revealed {
    opacity: 1;
    transform: none;
  }

  .hero-mascot,
  .live-dot,
  .signal-ring,
  .ai-response.is-thinking img {
    animation: none;
  }
}

/* Visual refonte pass: preserve content visibility while keeping the camp mood cohesive. */
.home-page .reveal {
  opacity: 1;
  transform: none;
  animation: lift-in 520ms ease both;
  transition: none;
}

.home-page .reveal.is-revealed {
  opacity: 1;
  transform: none;
}

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

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

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

.site-footer {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 58px 0 46px;
  background:
    linear-gradient(180deg, rgba(4, 11, 24, 0.88), rgba(3, 8, 18, 0.96)),
    linear-gradient(90deg, rgba(47, 103, 255, 0.15), transparent 48%, rgba(255, 87, 87, 0.12)),
    url("/assets/identity/jeu-discord.png") right bottom / auto 112% no-repeat;
}

.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(5, 13, 30, 0.34), rgba(4, 10, 22, 0.92) 62%),
    repeating-linear-gradient(135deg, rgba(255, 240, 196, 0.045) 0 1px, transparent 1px 10px);
}

.site-footer::after {
  content: "Ani!mo France";
  position: absolute;
  right: max(20px, calc((100vw - var(--max)) / 2));
  bottom: -10px;
  z-index: -1;
  color: rgba(255, 240, 196, 0.07);
  font-family: "Palatino Linotype", "Book Antiqua", Georgia, serif;
  font-size: clamp(3rem, 9vw, 8rem);
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.footer-grid {
  position: relative;
  align-items: start;
}

.site-footer nav {
  min-width: 0;
}

.site-footer nav a {
  width: fit-content;
  border-radius: 6px;
  padding: 4px 0;
}

.site-footer nav a:hover {
  color: #ffffff;
}

.button,
.source-link,
.home-news-read,
.codex-card-link,
.objects-card-action,
.objects-card-map,
.ranking-row a,
.slot-actions a,
.slot-actions button {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.button:focus-visible,
.source-link:focus-visible,
.home-news-read:focus-visible,
.codex-card-link:focus-visible,
.objects-card-action:focus-visible,
.objects-card-map:focus-visible {
  outline-color: var(--sky-2);
}

.codex-toolbar,
.objects-toolbar,
.tool-panel,
.tool-selector-card,
.ranking-toolbar,
.aniipote-query-panel,
.aniipote-answer-panel {
  background:
    linear-gradient(140deg, rgba(255, 240, 196, 0.1), transparent 42%, rgba(68, 185, 255, 0.09)),
    linear-gradient(180deg, rgba(10, 30, 58, 0.92), rgba(5, 14, 31, 0.94));
}

@media (max-width: 760px) {
  .site-footer {
    padding: 44px 0 38px;
    background-position: center bottom;
  }

  .site-footer::after {
    left: 12px;
    right: auto;
    font-size: 3rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-page .reveal {
    animation: none;
  }
}

/* Desktop navigation revision: visible route map + Discord auth CTA, mobile keeps hamburger. */
@media (min-width: 1021px) {
  .site-header {
    background:
      linear-gradient(90deg, rgba(47, 103, 255, 0.13), transparent 46%, rgba(255, 87, 87, 0.1)),
      rgba(5, 14, 31, 0.95);
  }

  .header-shell {
    width: min(calc(100% - 32px), 1360px);
    min-height: 78px;
    grid-template-columns: auto minmax(0, 1fr);
    gap: clamp(16px, 2.2vw, 30px);
  }

  .nav-toggle {
    display: none;
  }

  .primary-nav,
  .primary-nav[hidden],
  .nav-open .primary-nav {
    position: static;
    width: auto;
    min-width: 0;
    display: flex !important;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 5px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    opacity: 1;
    pointer-events: auto;
    transform: none;
    transition: none;
  }

  .primary-nav a {
    min-height: 34px;
    padding: 7px 8px;
    border: 1px solid transparent;
    border-radius: 7px;
    color: #e8f6ff;
    font-size: 0.78rem;
    font-weight: 850;
  }

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

  .header-actions {
    grid-column: auto;
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 7px;
    margin: 0 0 0 6px;
    padding: 0 0 0 10px;
    border-top: 0;
    border-left: 1px solid rgba(255, 240, 196, 0.15);
  }

  .header-actions::before {
    display: none;
  }

  .login-button,
  .header-admin,
  .header-share,
  .user-pill {
    min-height: 36px;
    padding: 8px 10px;
    font-size: 0.78rem;
  }

  .login-button {
    position: relative;
    overflow: hidden;
    border-color: rgba(255, 240, 196, 0.52);
    color: #061225;
    background:
      linear-gradient(135deg, #fff8db, var(--sky-2) 72%);
    box-shadow:
      0 12px 30px rgba(68, 185, 255, 0.22),
      inset 0 1px 0 rgba(255, 255, 255, 0.72);
  }

  .login-button::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #5865f2;
    box-shadow: 0 0 14px rgba(88, 101, 242, 0.78);
  }

  .user-pill {
    max-width: 150px;
  }
}

@media (min-width: 1021px) and (max-width: 1180px) {
  .brand-kicker {
    display: none;
  }

  .brand-name {
    font-size: 0.98rem;
  }

  .primary-nav a {
    padding-inline: 6px;
    font-size: 0.74rem;
  }
}

/* Workshop personality pass for the four tool pages. */
.teams-page {
  --tool-accent: #72e3a8;
  --tool-accent-soft: rgba(114, 227, 168, 0.16);
}

.comparator-page {
  --tool-accent: #ffcf79;
  --tool-accent-soft: rgba(255, 207, 121, 0.15);
}

.tier-builder-page {
  --tool-accent: #ff8da0;
  --tool-accent-soft: rgba(255, 141, 160, 0.15);
}

.ranking-page {
  --tool-accent: #9edcff;
  --tool-accent-soft: rgba(158, 220, 255, 0.15);
}

.tool-page .tool-hero {
  position: relative;
  isolation: isolate;
}

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

.tool-page .tool-hero-art {
  border-color: color-mix(in srgb, var(--tool-accent, var(--sky-2)) 44%, rgba(255, 240, 196, 0.18));
}

/* ==========================================================
   ANI!MO FRANCE REAL REDESIGN — QG DISCORD / GAME PORTAL
   Visual-only overrides. Hooks, routes and JS contracts stay intact.
   ========================================================== */

:root {
  --af-deep: #060d1d;
  --af-navy: #0b1831;
  --af-ink: #f7fbff;
  --af-soft: #bad2ef;
  --af-gold: #ffe8a8;
  --af-cyan: #74dcff;
  --af-blue: #2f67ff;
  --af-red: #ff596d;
  --af-discord: #5865f2;
  --af-glass: rgba(8, 18, 39, 0.74);
  --af-glass-strong: rgba(5, 12, 29, 0.92);
  --af-line: rgba(255, 232, 168, 0.22);
  --af-line-blue: rgba(116, 220, 255, 0.34);
  --af-shadow: 0 30px 90px rgba(0, 0, 0, 0.46);
  --af-radius: 8px;
}

body {
  font-family: "Segoe UI", "Aptos", "Trebuchet MS", sans-serif;
  color: var(--af-ink);
  background:
    linear-gradient(180deg, rgba(4, 12, 28, 0.38), rgba(4, 12, 28, 0.96) 68%, #050b18),
    url("./assets/modules/background.png") center top / cover fixed no-repeat;
}

body::before {
  opacity: 0.34;
  background:
    radial-gradient(circle at 12% 12%, rgba(116, 220, 255, 0.18), transparent 30%),
    radial-gradient(circle at 88% 18%, rgba(255, 89, 109, 0.13), transparent 26%),
    linear-gradient(90deg, rgba(47, 103, 255, 0.16), transparent 44%, rgba(255, 89, 109, 0.12)),
    repeating-linear-gradient(120deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 12px);
}

.eyebrow {
  letter-spacing: 0.14em;
  color: var(--af-cyan);
  text-transform: uppercase;
}

.site-header {
  border-bottom: 1px solid rgba(116, 220, 255, 0.16);
  background:
    linear-gradient(90deg, rgba(47, 103, 255, 0.13), transparent 48%, rgba(255, 89, 109, 0.11)),
    rgba(4, 10, 25, 0.88);
  backdrop-filter: blur(16px);
}

.header-shell {
  width: min(calc(100% - 28px), 1380px);
  min-height: 72px;
  grid-template-columns: auto 1fr auto;
}

.brand-name {
  font-family: "Segoe UI Black", "Arial Black", "Segoe UI", sans-serif;
  letter-spacing: 0;
}

.brand-kicker {
  color: #b8d7f6;
  font-size: 0.72rem;
}

.brand-mark {
  border-color: rgba(116, 220, 255, 0.38);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 22%, rgba(255, 232, 168, 0.3), transparent 48%),
    rgba(255, 255, 255, 0.08);
}

.nav-toggle {
  display: grid !important;
  justify-self: end;
  border-color: rgba(255, 232, 168, 0.28);
  background:
    linear-gradient(145deg, rgba(255, 232, 168, 0.14), rgba(116, 220, 255, 0.08)),
    rgba(5, 14, 33, 0.82);
}

.primary-nav {
  position: absolute !important;
  top: calc(100% + 10px) !important;
  right: 0 !important;
  left: auto !important;
  width: min(360px, calc(100vw - 28px)) !important;
  max-height: calc(100dvh - 92px);
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  padding: 14px;
  overflow: auto;
  border: 1px solid rgba(116, 220, 255, 0.22);
  border-radius: 8px;
  background:
    radial-gradient(circle at 16% 0%, rgba(116, 220, 255, 0.18), transparent 32%),
    linear-gradient(180deg, rgba(9, 23, 49, 0.98), rgba(4, 10, 25, 0.98));
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.48);
  transform-origin: top right;
}

.primary-nav a {
  min-height: 42px;
  justify-content: space-between;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.primary-nav a::after {
  content: ">";
  color: var(--af-cyan);
  opacity: 0.72;
}

.primary-nav a:hover,
.primary-nav a[aria-current="page"] {
  border-color: rgba(255, 232, 168, 0.34);
  background: linear-gradient(90deg, rgba(47, 103, 255, 0.2), rgba(255, 89, 109, 0.09));
}

.header-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 232, 168, 0.18);
}

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

.login-button {
  color: #061225;
  background: linear-gradient(135deg, #fff7db, #8ae4ff 68%, #ffffff);
}

.button {
  border-radius: 8px;
}

.button-primary,
.source-link:hover {
  color: #071326;
  background: linear-gradient(135deg, #fff3c4, #86e6ff 58%, #ffffff);
  box-shadow: 0 18px 44px rgba(116, 220, 255, 0.22);
}

.button-secondary,
.source-link {
  border-color: rgba(255, 232, 168, 0.28);
  background: rgba(5, 14, 33, 0.58);
}

.home-page main {
  background:
    linear-gradient(180deg, transparent, rgba(5, 11, 24, 0.7) 44%, rgba(5, 11, 24, 0.98));
}

.af-discord-gate {
  position: relative;
  isolation: isolate;
  min-height: calc(100dvh - 72px);
  overflow: hidden;
  padding: clamp(54px, 8vw, 96px) 0 clamp(72px, 11vw, 140px);
}

.af-discord-gate::before,
.af-discord-gate::after {
  content: "";
  position: absolute;
  pointer-events: none;
  z-index: -2;
}

.af-discord-gate::before {
  inset: 0;
  background:
    linear-gradient(90deg, rgba(5, 12, 29, 0.72), rgba(5, 12, 29, 0.14) 46%, rgba(5, 12, 29, 0.7)),
    linear-gradient(180deg, transparent 46%, rgba(5, 11, 24, 0.86)),
    url("./assets/modules/background.png") center / cover no-repeat;
  transform: scale(1.04);
}

.af-discord-gate::after {
  left: -6vw;
  right: -6vw;
  bottom: -12px;
  height: 34%;
  background:
    radial-gradient(ellipse at 50% 100%, rgba(5, 11, 24, 0.96), transparent 70%),
    linear-gradient(180deg, transparent, rgba(5, 11, 24, 0.98));
}

.af-world-depth {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: -1;
}

.af-haze {
  position: absolute;
  border-radius: 999px;
  filter: blur(6px);
}

.af-haze-blue {
  width: 36vw;
  height: 36vw;
  top: 10%;
  left: 44%;
  background: radial-gradient(circle, rgba(116, 220, 255, 0.22), transparent 62%);
}

.af-haze-red {
  width: 28vw;
  height: 28vw;
  right: -8vw;
  top: 16%;
  background: radial-gradient(circle, rgba(255, 89, 109, 0.16), transparent 64%);
}

.af-signal-line {
  position: absolute;
  left: 8vw;
  right: 8vw;
  top: 58%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(116, 220, 255, 0.52), rgba(255, 232, 168, 0.3), transparent);
  transform: rotate(-4deg);
}

.af-gate-shell {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(420px, 1fr);
  align-items: center;
  gap: clamp(26px, 4vw, 72px);
}

.af-gate-copy {
  max-width: 700px;
}

.af-gate-copy h1 {
  margin: 0;
  font-family: "Segoe UI Black", "Arial Black", "Segoe UI", sans-serif;
  font-size: clamp(4.4rem, 9.2vw, 9.2rem);
  line-height: 0.82;
  letter-spacing: 0;
  text-transform: uppercase;
  text-shadow: 0 12px 42px rgba(0, 0, 0, 0.48);
}

.af-gate-copy h1 span {
  display: block;
  color: #ffffff;
}

.af-gate-copy h1::after {
  content: "";
  display: block;
  width: min(360px, 72%);
  height: 6px;
  margin-top: 22px;
  background: linear-gradient(90deg, var(--af-blue), #fff, var(--af-red));
  box-shadow: 0 0 30px rgba(116, 220, 255, 0.4);
}

.af-gate-subtitle {
  max-width: 610px;
  margin: 22px 0 0;
  color: #e8f6ff;
  font-size: clamp(1.1rem, 1.8vw, 1.45rem);
  font-weight: 850;
  line-height: 1.45;
}

.af-discord-invite {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 30px 0 0;
}

.af-discord-invite .button {
  min-height: 58px;
  padding-inline: 20px;
  font-size: 1rem;
}

.af-world-links {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  max-width: 640px;
  margin-top: 34px;
}

.af-world-links::before {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  top: 50%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 232, 168, 0.5), transparent);
  z-index: -1;
}

.af-world-links a {
  position: relative;
  min-height: 72px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-content: center;
  align-items: center;
  column-gap: 12px;
  padding: 10px 6px;
  text-decoration: none;
  border-left: 0;
  background: transparent;
}

.af-world-links a::before {
  content: "";
  grid-row: 1 / span 2;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 232, 168, 0.72);
  border-radius: 50%;
  background: radial-gradient(circle, #74dcff 0 34%, rgba(5, 14, 33, 0.92) 37% 100%);
  box-shadow:
    0 0 0 5px rgba(116, 220, 255, 0.1),
    0 0 26px rgba(116, 220, 255, 0.44);
}

.af-world-links a:hover::before {
  background: radial-gradient(circle, #fff3c4 0 34%, rgba(5, 14, 33, 0.92) 37% 100%);
}

.af-world-links span {
  font-weight: 950;
}

.af-world-links small {
  color: var(--af-soft);
}

.af-gate-visual {
  position: relative;
  min-height: 620px;
}

.af-discord-scene {
  position: absolute;
  inset: 4% -4% auto auto;
  width: min(760px, 108%);
  max-width: none;
  border: 1px solid rgba(116, 220, 255, 0.2);
  border-radius: 8px;
  object-fit: cover;
  box-shadow: var(--af-shadow);
  transform: rotate(2deg);
}

.af-mascot-pop {
  position: absolute;
  width: min(380px, 52%);
  right: 42%;
  bottom: -3%;
  filter: drop-shadow(0 30px 42px rgba(0, 0, 0, 0.5));
  animation: af-float 5s ease-in-out infinite;
}

.af-live-bubble {
  position: absolute;
  right: 5%;
  bottom: 7%;
  width: min(330px, 48%);
  display: grid;
  gap: 4px;
  padding: 16px 18px;
  border: 1px solid rgba(255, 232, 168, 0.28);
  border-radius: 8px;
  background: rgba(5, 12, 29, 0.78);
  box-shadow: 0 20px 52px rgba(0, 0, 0, 0.36);
  backdrop-filter: blur(12px);
}

.af-live-bubble strong {
  font-weight: 950;
}

.af-live-bubble span:last-child {
  color: var(--af-soft);
  font-size: 0.92rem;
}

.af-community-signal {
  position: relative;
  padding: 34px 0 86px;
  background:
    radial-gradient(circle at 18% 12%, rgba(116, 220, 255, 0.11), transparent 28%),
    linear-gradient(180deg, rgba(5, 11, 24, 0.1), rgba(5, 11, 24, 0.86));
}

.af-signal-shell {
  display: grid;
  grid-template-columns: minmax(280px, 0.72fr) minmax(0, 1.28fr);
  align-items: center;
  gap: clamp(26px, 4vw, 68px);
}

.af-signal-copy h2 {
  margin: 12px 0;
  font-family: "Segoe UI Black", "Arial Black", "Segoe UI", sans-serif;
  font-size: clamp(2.1rem, 5vw, 4.8rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.af-signal-copy p {
  color: var(--af-soft);
  font-size: 1rem;
}

.af-avatar-line {
  display: flex;
  align-items: center;
  margin-top: 24px;
}

.af-avatar-line img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  margin-right: -12px;
  border: 1px solid rgba(116, 220, 255, 0.34);
  border-radius: 50%;
  background: rgba(5, 14, 33, 0.68);
}

.af-avatar-line span {
  margin-left: 22px;
  color: var(--af-gold);
  font-weight: 850;
}

.af-discord-metrics {
  display: grid;
  grid-template-columns: 1.35fr repeat(2, minmax(130px, 0.72fr));
  gap: 12px;
}

.home-page .stat-card {
  min-height: 134px;
  display: grid;
  align-content: center;
  padding: 16px;
  border: 0;
  border-radius: 8px;
  background:
    linear-gradient(150deg, rgba(116, 220, 255, 0.13), rgba(255, 255, 255, 0.035)),
    rgba(4, 12, 28, 0.52);
  box-shadow: none;
  transform: none;
}

.home-page .stat-card::before {
  content: "";
  width: 34px;
  height: 2px;
  margin-bottom: 12px;
  background: linear-gradient(90deg, var(--af-blue), #fff, var(--af-red));
}

.home-page .stat-card:first-child,
.home-page .af-stat-main {
  grid-row: span 2;
  min-height: 280px;
  background:
    radial-gradient(circle at 82% 18%, rgba(255, 232, 168, 0.18), transparent 28%),
    linear-gradient(150deg, rgba(88, 101, 242, 0.32), rgba(5, 14, 33, 0.72));
}

.home-page .stat-value {
  font-family: "Segoe UI Black", "Arial Black", "Segoe UI", sans-serif;
  font-size: clamp(2.1rem, 5vw, 4.8rem);
  letter-spacing: 0;
}

.home-page .stat-label {
  order: 2;
  color: #ffffff;
  font-size: 0.86rem;
}

.home-page .stat-note {
  color: var(--af-soft);
}

.live-now {
  padding-top: 74px;
  background:
    linear-gradient(180deg, rgba(5, 11, 24, 0.88), rgba(7, 19, 40, 0.68)),
    url("./assets/identity/jeu-discord.png") center / cover no-repeat;
  background-blend-mode: normal, soft-light;
}

.live-stage {
  position: relative;
  grid-template-columns: minmax(0, 0.98fr) 250px minmax(0, 0.98fr);
  align-items: stretch;
}

.live-panel {
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(6, 17, 38, 0.88), rgba(6, 17, 38, 0.62));
}

.live-panel-messages {
  transform: translateY(26px);
}

.live-panel-voice {
  transform: translateY(-12px);
}

.live-companion {
  align-self: center;
  justify-self: center;
  width: 240px;
}

.home-page .live-now .live-stage {
  max-width: 1180px;
  margin-inline: auto;
  grid-template-columns: minmax(290px, 1fr) minmax(130px, 0.32fr) minmax(290px, 1fr);
  align-items: stretch;
}

.home-page .live-now .live-panel {
  min-height: 430px;
  max-height: 430px;
  display: flex;
  flex-direction: column;
  transform: none;
}

.home-page .live-now .live-list {
  flex: 1;
  display: grid;
  grid-template-rows: repeat(3, minmax(0, 1fr));
  gap: 12px;
  min-height: 0;
}

.home-page .live-now .live-row {
  min-height: 0;
  height: 100%;
  align-items: center;
  padding: 12px 14px;
}

.home-page .live-now .live-row strong,
.home-page .live-now .live-meta,
.home-page .live-now .live-message {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
}

.home-page .live-now .live-row strong {
  -webkit-line-clamp: 1;
}

.home-page .live-now .live-meta {
  -webkit-line-clamp: 1;
}

.home-page .live-now .live-message {
  -webkit-line-clamp: 2;
}

.home-page .live-now .live-row-voice .live-message {
  -webkit-line-clamp: 1;
}

.home-page .live-now .live-list.is-switching .live-row {
  animation: live-slide-page 560ms cubic-bezier(0.2, 0.74, 0.22, 1) both;
}

@keyframes live-slide-page {
  from {
    opacity: 0;
    transform: translateX(34px) scale(0.985);
  }

  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

.important-news,
.modules-section,
.event-section,
.ai-experience,
.talkers-section {
  position: relative;
  background: linear-gradient(180deg, rgba(5, 11, 24, 0.86), rgba(5, 11, 24, 0.96));
}

.af-expedition-heading h2 {
  max-width: 860px;
  font-family: "Segoe UI Black", "Arial Black", "Segoe UI", sans-serif;
  line-height: 0.98;
}

.af-expedition-map {
  position: relative;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: minmax(170px, auto);
  gap: clamp(12px, 2vw, 22px);
  align-items: stretch;
}

.af-expedition-map::before {
  content: "";
  position: absolute;
  inset: 6% 5% 8%;
  z-index: 0;
  border: 1px dashed rgba(255, 232, 168, 0.28);
  border-radius: 50%;
  transform: rotate(-8deg);
}

.home-page .module-card {
  position: relative;
  z-index: 1;
  min-height: 240px;
  border: 0;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(4, 12, 28, 0.58);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.34);
}

.home-page .module-card::after {
  inset: 0;
  background:
    linear-gradient(180deg, transparent 28%, rgba(4, 12, 28, 0.88)),
    linear-gradient(90deg, rgba(47, 103, 255, 0.18), transparent 48%, rgba(255, 89, 109, 0.12));
}

.home-page .module-card img {
  height: 100%;
  object-fit: cover;
}

.home-page .module-card-feature,
.home-page .module-card-map,
.home-page .module-card-wide {
  grid-column: span 6;
  min-height: 330px;
}

.home-page .module-card-tall,
.home-page .module-card-workshop,
.home-page .module-card-ai {
  grid-column: span 4;
}

.home-page .module-card-tool,
.home-page .module-card-guide,
.home-page .module-card-archive {
  grid-column: span 4;
}

.home-page .module-body {
  padding: 22px;
}

.home-page .module-state,
.tool-chip-list span,
.codex-badge,
.objects-pill,
.news-pill {
  border-radius: 999px;
}

.home-page .module-card:nth-child(2n) {
  transform: translateY(26px);
}

.home-page .module-card:nth-child(3n) {
  transform: translateY(-12px);
}

.af-page-scene,
.af-tool-scene {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 520px;
  padding-block: clamp(58px, 8vw, 110px);
  background:
    linear-gradient(90deg, rgba(5, 11, 24, 0.86), rgba(5, 11, 24, 0.34) 54%, rgba(5, 11, 24, 0.84)),
    var(--af-page-image, url("./assets/modules/background.png")) center / cover no-repeat;
}

.af-page-scene::before,
.af-tool-scene::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 24% 22%, var(--af-page-glow, rgba(116, 220, 255, 0.18)), transparent 30%),
    linear-gradient(180deg, transparent 58%, rgba(5, 11, 24, 0.96));
}

.af-codex-scene { --af-page-image: url("./assets/modules/codex.png"); --af-page-glow: rgba(116, 220, 255, 0.2); }
.af-objects-scene { --af-page-image: url("./assets/modules/carte.png"); --af-page-glow: rgba(255, 232, 168, 0.18); }
.af-news-scene { --af-page-image: url("./assets/modules/actualites.png"); --af-page-glow: rgba(255, 89, 109, 0.16); }
.af-aniipote-scene { --af-page-image: url("./assets/identity/aniipote-reflechis.png"); --af-page-glow: rgba(116, 220, 255, 0.24); }
.af-team-scene { --af-page-image: url("./assets/modules/createur-equipe.png"); --af-page-glow: rgba(114, 227, 168, 0.18); }
.af-comparator-scene { --af-page-image: url("./assets/modules/comparateur.png"); --af-page-glow: rgba(255, 207, 121, 0.18); }
.af-tier-scene { --af-page-image: url("./assets/modules/tier-list.png"); --af-page-glow: rgba(255, 141, 160, 0.18); }
.af-ranking-scene { --af-page-image: url("./assets/modules/tier-list.png"); --af-page-glow: rgba(158, 220, 255, 0.18); }

.codex-hero-layout,
.objects-hero-layout,
.news-hero-layout,
.aniipote-hero-layout,
.tool-hero-grid {
  align-items: center;
  gap: clamp(28px, 5vw, 80px);
}

.codex-hero-copy h1,
.objects-hero-copy h1,
.news-hero-copy h1,
.aniipote-hero-copy h1,
.tool-hero-copy h1 {
  font-family: "Segoe UI Black", "Arial Black", "Segoe UI", sans-serif;
  font-size: clamp(2.6rem, 5.8vw, 5.8rem);
  line-height: 0.96;
  letter-spacing: 0;
  text-transform: none;
}

.codex-hero-art,
.objects-hero-art,
.news-hero-art,
.aniipote-hero-art,
.tool-hero-art {
  border: 0;
  border-radius: 8px;
  background: transparent;
  box-shadow: none;
}

.codex-hero-art img,
.objects-hero-art img,
.news-hero-art img,
.aniipote-hero-art img,
.tool-hero-art img {
  min-height: 380px;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.42);
}

.tool-page .tool-panel,
.codex-sync-note,
.objects-sync-note,
.news-source-note,
.aniipote-hero-tags span,
.tool-panel,
.codex-toolbar,
.objects-toolbar,
.news-filter-panel,
.aniipote-query-panel,
.aniipote-answer-panel,
.tool-selector-card,
.comparison-result,
.objects-detail-card,
.news-card,
.codex-card,
.objects-card {
  border-radius: 8px;
  border-color: rgba(116, 220, 255, 0.18);
  background:
    linear-gradient(145deg, rgba(116, 220, 255, 0.08), rgba(255, 232, 168, 0.035)),
    rgba(5, 14, 33, 0.72);
}

.codex-browser,
.objects-browser,
.news-board,
.aniipote-lab,
.tool-section {
  background:
    radial-gradient(circle at 12% 12%, rgba(116, 220, 255, 0.08), transparent 26%),
    linear-gradient(180deg, rgba(5, 11, 24, 0.94), rgba(5, 11, 24, 0.98));
}

.tool-workspace,
.team-builder-layout,
.comparator-board,
.tier-workspace,
.ranking-layout,
.objects-layout,
.aniipote-workbench {
  gap: clamp(18px, 3vw, 34px);
}

.team-builder-layout .tool-panel:first-child,
.aniipote-query-panel,
.objects-results {
  transform: translateY(18px);
}

.analysis-panel,
.aniipote-answer-panel,
.objects-detail {
  transform: translateY(-16px);
}

.site-footer {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(5, 11, 24, 0.88), rgba(5, 11, 24, 0.98)),
    url("./assets/identity/jeu-discord.png") center 45% / cover no-repeat;
}

.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(47, 103, 255, 0.16), transparent 50%, rgba(255, 89, 109, 0.14));
  pointer-events: none;
}

@keyframes af-float {
  0%, 100% { transform: translateY(0) rotate(-5deg); }
  50% { transform: translateY(-16px) rotate(-2deg); }
}

@media (max-width: 1080px) {
  .af-gate-shell,
  .af-signal-shell,
  .codex-hero-layout,
  .objects-hero-layout,
  .news-hero-layout,
  .aniipote-hero-layout,
  .tool-hero-grid {
    grid-template-columns: 1fr;
  }

  .af-gate-visual {
    min-height: 520px;
  }

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

  .home-page .stat-card:first-child,
  .home-page .af-stat-main {
    grid-column: 1 / -1;
    grid-row: auto;
    min-height: 210px;
  }

  .live-stage {
    grid-template-columns: 1fr;
  }

  .live-panel-messages,
  .live-panel-voice,
  .team-builder-layout .tool-panel:first-child,
  .aniipote-query-panel,
  .objects-results,
  .analysis-panel,
  .aniipote-answer-panel,
  .objects-detail {
    transform: none;
  }
}

@media (max-width: 760px) {
  .header-shell {
    min-height: 68px;
  }

  .brand-kicker {
    display: none;
  }

  .af-discord-gate {
    padding-top: 38px;
  }

  .af-gate-copy h1 {
    font-size: clamp(3.1rem, 17vw, 4.9rem);
  }

  .af-discord-invite,
  .af-world-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .af-discord-invite {
    grid-template-columns: 1fr;
  }

  .af-discord-invite .button {
    width: 100%;
  }

  .af-gate-visual {
    min-height: 430px;
    margin-top: 26px;
    overflow: hidden;
    border-radius: 8px;
  }

  .af-discord-scene {
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: none;
  }

  .af-mascot-pop {
    width: auto;
    height: 348px;
    right: auto;
    left: -36px;
    bottom: 8px;
    max-width: none;
  }

  .af-live-bubble {
    width: min(224px, 60%);
    right: 10px;
    bottom: 16px;
  }

  .af-discord-metrics,
  .af-expedition-map {
    grid-template-columns: 1fr;
  }

  .home-page .module-card,
  .home-page .module-card-feature,
  .home-page .module-card-map,
  .home-page .module-card-wide,
  .home-page .module-card-tall,
  .home-page .module-card-workshop,
  .home-page .module-card-ai,
  .home-page .module-card-tool,
  .home-page .module-card-guide,
  .home-page .module-card-archive {
    grid-column: 1;
    transform: none;
  }

  .codex-hero-art img,
  .objects-hero-art img,
  .news-hero-art img,
  .aniipote-hero-art img,
  .tool-hero-art img {
    min-height: 240px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .af-mascot-pop {
    animation: none;
  }
}
.tool-page .ranking-toolbar,
.tool-page .public-tool-card,
.tool-page .ranking-row,
.tool-page .podium-card {
  background:
    linear-gradient(140deg, var(--tool-accent-soft, rgba(68, 185, 255, 0.1)), transparent 44%, rgba(255, 240, 196, 0.055)),
    rgba(6, 18, 38, 0.88);
}

.teams-page .team-slots {
  counter-reset: team-slot;
}

.teams-page .empty-slot {
  position: relative;
  border-color: rgba(114, 227, 168, 0.5);
  background:
    linear-gradient(135deg, rgba(114, 227, 168, 0.08), rgba(255, 255, 255, 0.035));
}

.teams-page .empty-slot::before {
  counter-increment: team-slot;
  content: counter(team-slot);
  position: absolute;
  top: 10px;
  left: 10px;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  color: #061225;
  background: var(--tool-accent);
  font-size: 0.78rem;
}

.comparator-page .compare-side {
  min-height: 330px;
}

.comparator-page .versus-badge {
  outline: 9px solid rgba(255, 207, 121, 0.1);
  background: linear-gradient(135deg, #fff0c4, var(--tool-accent));
}

.tier-builder-page .tier-row {
  border-left: 4px solid var(--tool-accent);
  background:
    linear-gradient(90deg, rgba(255, 141, 160, 0.12), rgba(255, 255, 255, 0.045));
}

.ranking-page .podium-card:first-child {
  transform: translateY(-10px);
  border-color: rgba(255, 240, 196, 0.42);
}

.ranking-page .ranking-row {
  border-left: 3px solid rgba(158, 220, 255, 0.5);
}

@media (max-width: 760px) {
  .ranking-page .podium-card:first-child {
    transform: none;
  }
}

/* Final navigation lock: the official Ani!mo France menu is always hamburger-driven. */
.site-header .header-shell {
  grid-template-columns: auto minmax(0, 1fr) auto !important;
}

.site-header .nav-toggle {
  display: grid !important;
  grid-column: 3;
}

.site-header .primary-nav {
  position: absolute !important;
  top: calc(100% + 10px) !important;
  right: 0 !important;
  left: auto !important;
  width: min(372px, calc(100vw - 28px)) !important;
  max-height: calc(100dvh - 92px) !important;
  display: grid !important;
  grid-template-columns: 1fr !important;
  justify-content: stretch !important;
  align-items: stretch !important;
  gap: 7px !important;
  padding: 14px !important;
  overflow: auto !important;
  border: 1px solid rgba(116, 220, 255, 0.24) !important;
  border-radius: 8px !important;
  background:
    radial-gradient(circle at 16% 0%, rgba(116, 220, 255, 0.2), transparent 34%),
    linear-gradient(180deg, rgba(8, 23, 52, 0.98), rgba(3, 9, 23, 0.98)) !important;
  box-shadow: 0 30px 88px rgba(0, 0, 0, 0.5) !important;
}

.site-header .primary-nav[hidden] {
  display: none !important;
}

.site-header.nav-open .primary-nav {
  display: grid !important;
}

.site-header .primary-nav a,
.site-header .header-actions > * {
  width: 100%;
}

.aniipote-global-trigger {
  grid-column: 2;
  justify-self: end;
  min-height: 42px;
  border: 1px solid rgba(116, 220, 255, 0.32);
  border-radius: 8px;
  color: #f8f0dc;
  background:
    linear-gradient(135deg, rgba(116, 220, 255, 0.22), rgba(255, 240, 196, 0.08)),
    rgba(9, 27, 58, 0.72);
  padding: 0 14px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(68, 185, 255, 0.14);
}

.aniipote-global-trigger:hover {
  border-color: rgba(255, 240, 196, 0.58);
  transform: translateY(-1px);
}

.aniipote-global-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: start end;
  padding: 96px min(28px, 5vw) 24px;
  background: rgba(2, 7, 18, 0.62);
  backdrop-filter: blur(10px);
}

.aniipote-global-overlay[hidden] {
  display: none;
}

.aniipote-global-panel {
  width: min(520px, calc(100vw - 28px));
  max-height: calc(100dvh - 120px);
  overflow: auto;
  border: 1px solid rgba(116, 220, 255, 0.28);
  border-radius: 8px;
  background:
    radial-gradient(circle at 100% 0%, rgba(116, 220, 255, 0.22), transparent 34%),
    linear-gradient(180deg, rgba(9, 23, 50, 0.98), rgba(3, 9, 22, 0.98));
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.58);
  padding: 22px;
}

.aniipote-global-close {
  float: right;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  color: #f8f0dc;
  background: rgba(255, 255, 255, 0.06);
  font-size: 1.35rem;
  font-weight: 900;
  cursor: pointer;
}

.aniipote-global-panel h2 {
  max-width: 420px;
  margin: 4px 0 10px;
  color: #fff4c8;
  font-family: "Palatino Linotype", "Book Antiqua", Georgia, serif;
  font-size: clamp(1.6rem, 4vw, 2.5rem);
}

.aniipote-global-panel p {
  color: #c9d8ec;
}

.aniipote-global-form {
  display: grid;
  gap: 10px;
  margin: 16px 0;
}

.aniipote-global-form textarea {
  width: 100%;
  min-height: 112px;
  border: 1px solid rgba(116, 220, 255, 0.24);
  border-radius: 8px;
  color: #f8f0dc;
  background: rgba(1, 8, 20, 0.78);
  padding: 12px;
  resize: vertical;
}

.aniipote-global-result {
  display: grid;
  gap: 10px;
  min-height: 82px;
  border: 1px solid rgba(255, 240, 196, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
  padding: 14px;
  color: #dce9fa;
}

.aniipote-global-result h3 {
  margin: 0;
  color: #ffffff;
}

.aniipote-global-snippet {
  border-left: 3px solid #74dcff;
  padding-left: 10px;
}

.guides-page main {
  background:
    linear-gradient(180deg, rgba(4, 12, 28, 0.18), rgba(4, 12, 28, 0.92)),
    url("./assets/modules/background.png") center top / cover fixed no-repeat;
}

.guides-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(46px, 7vw, 90px) 0;
}

.guides-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(4, 12, 28, 0.88), rgba(4, 12, 28, 0.24)),
    url("./assets/modules/guides.png") center / cover no-repeat;
  opacity: 0.34;
}

.guides-hero-layout {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(380px, 0.8fr);
  gap: clamp(24px, 5vw, 72px);
  align-items: center;
}

.guides-hero-copy h1 {
  margin: 0 0 14px;
  color: #fff4c8;
  font-family: "Palatino Linotype", "Book Antiqua", Georgia, serif;
  font-size: clamp(3rem, 8vw, 7rem);
  line-height: 0.9;
}

.guides-hero-copy p {
  max-width: 620px;
  color: #d8e7f7;
  font-size: 1.08rem;
}

.guides-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.guides-hero-art {
  position: relative;
  margin: 0;
  border: 1px solid rgba(116, 220, 255, 0.24);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 24px 90px rgba(0, 0, 0, 0.48);
}

.guides-hero-art img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.guides-hero-art figcaption {
  position: absolute;
  left: 14px;
  bottom: 14px;
  border-radius: 8px;
  background: rgba(3, 9, 22, 0.78);
  padding: 8px 10px;
  color: #fff4c8;
  font-weight: 900;
}

.guides-library,
.guides-contributor {
  padding: clamp(42px, 6vw, 76px) 0;
}

.guides-library-layout {
  display: grid;
  grid-template-columns: minmax(220px, 320px) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.guides-filter-panel,
.guides-main-panel,
.guide-detail-card,
.guides-editor,
.guides-mine {
  border: 1px solid rgba(116, 220, 255, 0.2);
  border-radius: 8px;
  background: rgba(8, 23, 52, 0.82);
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.26);
}

.guides-filter-panel,
.guides-main-panel {
  padding: 18px;
}

.guides-filter-panel form,
.guides-category-list {
  display: grid;
  gap: 10px;
}

.guides-filter-panel label,
.guides-editor label {
  display: grid;
  gap: 6px;
  color: #aebeda;
  font-weight: 900;
}

.guides-filter-panel input,
.guides-editor input,
.guides-editor select,
.guides-editor textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid rgba(116, 220, 255, 0.24);
  border-radius: 8px;
  color: #f8f0dc;
  background: rgba(2, 9, 22, 0.82);
  padding: 0 12px;
  font-weight: 800;
}

.guides-editor textarea {
  min-height: 94px;
  padding: 10px 12px;
  resize: vertical;
}

.guide-category-filter {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: #e8f3ff;
  background: rgba(255, 255, 255, 0.06);
  padding: 0 12px;
  font-weight: 900;
  cursor: pointer;
}

.guide-category-filter span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--category-color, #74dcff);
}

.guide-category-filter.is-active {
  color: #06152d;
  background: linear-gradient(135deg, #74dcff, #fff0c4);
}

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

.guide-card {
  overflow: hidden;
  border: 1px solid rgba(116, 220, 255, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
}

.guide-card > img {
  display: block;
  width: 100%;
  height: 168px;
  object-fit: cover;
}

.guide-card-body {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.guide-card h3,
.guide-detail-card h2,
.guides-editor h3,
.guides-mine h3 {
  margin: 0;
  color: #fff4c8;
  font-family: "Palatino Linotype", "Book Antiqua", Georgia, serif;
}

.guide-card p,
.guide-detail-card p,
.guides-mine {
  color: #d4e2f5;
}

.guide-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.guide-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border: 1px solid rgba(116, 220, 255, 0.24);
  border-radius: 999px;
  color: #dff6ff;
  background: rgba(116, 220, 255, 0.12);
  padding: 0 9px;
  font-size: 0.78rem;
  font-weight: 900;
}

.guide-pill.is-date {
  border-color: rgba(255, 240, 196, 0.24);
  color: #fff0c4;
  background: rgba(255, 240, 196, 0.1);
}

.contribution-credit {
  color: #9fc0df;
  font-weight: 900;
}

.guide-detail-card {
  display: grid;
  gap: 16px;
  padding: clamp(16px, 3vw, 28px);
}

.guide-detail-media {
  margin: 0;
  border-radius: 8px;
  overflow: hidden;
}

.guide-detail-media img {
  display: block;
  width: 100%;
  max-height: 430px;
  object-fit: cover;
}

.guide-detail-excerpt {
  font-size: 1.06rem;
  font-weight: 800;
}

.guide-rich-content {
  display: grid;
  gap: 12px;
  color: #dce9fa;
}

.guide-rich-content h3,
.guide-rich-content h4 {
  margin: 18px 0 0;
  color: #ffffff;
}

.guide-rich-content ul {
  margin: 0;
  padding-left: 20px;
}

.guides-pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.guide-page-button {
  min-width: 38px;
  height: 38px;
  border: 1px solid rgba(116, 220, 255, 0.24);
  border-radius: 8px;
  color: #f8f0dc;
  background: rgba(255, 255, 255, 0.06);
  font-weight: 900;
}

.guide-page-button:disabled {
  color: #06152d;
  background: linear-gradient(135deg, #74dcff, #fff0c4);
}

.guides-contributor-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
  gap: 16px;
}

.guides-editor,
.guides-mine {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.guides-editor .wide,
.guides-editor-actions,
.objects-editor {
  grid-column: 1 / -1;
}

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

.guides-editor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.guide-contribution-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
  padding: 10px;
}

.guide-contribution-row strong,
.guide-contribution-row small {
  display: block;
}

.guides-empty,
.form-note {
  color: #aebeda;
  font-weight: 800;
}

@media (max-width: 1060px) {
  .guides-hero-layout,
  .guides-library-layout,
  .guides-contributor-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 720px) {
  .aniipote-global-trigger {
    max-width: 138px;
    min-height: 38px;
    padding: 0 10px;
    font-size: 0.72rem;
  }

  .aniipote-global-overlay {
    place-items: start stretch;
    padding-top: 84px;
  }

  .guides-grid,
  .guides-editor {
    grid-template-columns: 1fr;
  }

  .guide-contribution-row {
    grid-template-columns: 1fr;
  }
}

/* Desktop homepage composition fix: keep the loved mobile layout, clean up wide screens. */
@media (min-width: 1021px) {
  .home-page .af-discord-gate {
    min-height: calc(100dvh - 72px);
    padding: clamp(52px, 5.5vw, 82px) 0 clamp(62px, 6vw, 92px);
  }

  .home-page .af-discord-gate::before {
    background:
      linear-gradient(90deg, rgba(5, 12, 29, 0.86), rgba(5, 12, 29, 0.2) 52%, rgba(5, 12, 29, 0.76)),
      linear-gradient(180deg, rgba(5, 11, 24, 0.18), rgba(5, 11, 24, 0.92)),
      url("./assets/modules/background.png") center / cover no-repeat;
    transform: none;
  }

  .home-page .af-gate-shell {
    width: min(calc(100% - 72px), 1500px);
    display: grid;
    grid-template-columns: minmax(500px, 0.92fr) minmax(460px, 0.88fr);
    align-items: center;
    gap: clamp(46px, 5vw, 92px);
  }

  .home-page .af-gate-copy {
    max-width: 670px;
    padding: clamp(18px, 2vw, 34px) 0;
  }

  .home-page .af-gate-copy h1 {
    max-width: 660px;
    font-size: clamp(5rem, 6.6vw, 8.1rem);
    line-height: 0.84;
  }

  .home-page .af-gate-copy h1::after {
    width: min(360px, 58%);
    height: 5px;
    margin-top: 18px;
  }

  .home-page .af-gate-subtitle {
    max-width: 580px;
    font-size: clamp(1.08rem, 1.22vw, 1.32rem);
  }

  .home-page .af-discord-invite {
    margin-top: 26px;
  }

  .home-page .af-world-links {
    max-width: 580px;
    margin-top: 28px;
    gap: 10px;
  }

  .home-page .af-world-links::before {
    top: 31px;
  }

  .home-page .af-world-links a {
    min-height: 58px;
    padding: 6px 2px;
  }

  .home-page .af-gate-visual {
    min-height: min(610px, calc(100dvh - 190px));
    max-height: 660px;
    border: 1px solid rgba(116, 220, 255, 0.22);
    border-radius: 8px;
    background:
      radial-gradient(circle at 18% 0%, rgba(116, 220, 255, 0.18), transparent 38%),
      linear-gradient(145deg, rgba(8, 23, 52, 0.74), rgba(3, 9, 23, 0.82));
    box-shadow: 0 30px 86px rgba(0, 0, 0, 0.46);
    overflow: hidden;
  }

  .home-page .af-gate-visual::before {
    content: "";
    position: absolute;
    inset: 16px;
    z-index: 0;
    border: 1px solid rgba(255, 232, 168, 0.2);
    border-radius: 8px;
    pointer-events: none;
  }

  .home-page .af-discord-scene {
    inset: 16px;
    width: calc(100% - 32px);
    height: calc(100% - 32px);
    max-width: none;
    border-color: rgba(116, 220, 255, 0.18);
    object-fit: cover;
    object-position: center 46%;
    transform: none;
    filter: saturate(1.08) contrast(1.03);
  }

  .home-page .af-discord-scene::selection {
    background: transparent;
  }

  .home-page .af-mascot-pop {
    width: auto;
    height: clamp(190px, 15.5vw, 290px);
    right: auto;
    left: -22px;
    bottom: 18px;
    z-index: 2;
    max-width: none;
  }

  .home-page .af-live-bubble {
    right: 34px;
    bottom: 34px;
    z-index: 3;
    width: min(330px, 52%);
    padding: 15px 17px;
  }

  .home-page .af-community-signal {
    padding: clamp(74px, 8vw, 112px) 0 clamp(78px, 8vw, 116px);
    background:
      linear-gradient(90deg, rgba(5, 11, 24, 0.92), rgba(7, 18, 38, 0.62) 54%, rgba(5, 11, 24, 0.92)),
      url("./assets/identity/jeu-discord.png") center 45% / cover no-repeat;
  }

  .home-page .af-signal-shell {
    width: min(calc(100% - 72px), 1360px);
    grid-template-columns: minmax(380px, 0.82fr) minmax(560px, 1.18fr);
    align-items: center;
    gap: clamp(42px, 5vw, 82px);
  }

  .home-page .af-signal-copy h2 {
    max-width: 620px;
    font-size: clamp(2.6rem, 3.7vw, 4.6rem);
    line-height: 0.98;
  }

  .home-page .af-signal-copy p {
    max-width: 540px;
  }

  .home-page .af-discord-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
  }

  .home-page .stat-card,
  .home-page .stat-card:first-child,
  .home-page .af-stat-main {
    grid-column: auto;
    grid-row: auto;
    min-height: 142px;
    padding: 17px;
    border: 1px solid rgba(116, 220, 255, 0.18);
    background:
      linear-gradient(145deg, rgba(116, 220, 255, 0.12), rgba(255, 232, 168, 0.055)),
      rgba(5, 14, 33, 0.76);
    overflow: hidden;
  }

  .home-page .stat-card:first-child,
  .home-page .af-stat-main {
    grid-column: 1 / -1;
    min-height: 170px;
    background:
      linear-gradient(90deg, rgba(88, 101, 242, 0.36), rgba(5, 14, 33, 0.76)),
      radial-gradient(circle at 88% 22%, rgba(255, 232, 168, 0.18), transparent 30%);
  }

  .home-page .stat-value {
    max-width: 100%;
    font-size: clamp(2rem, 2.4vw, 3.25rem);
    line-height: 0.92;
    overflow-wrap: anywhere;
  }

  .home-page .stat-card:first-child .stat-value,
  .home-page .af-stat-main .stat-value {
    font-size: clamp(3.4rem, 4.8vw, 5.6rem);
  }

  .home-page .stat-label {
    margin-top: 8px;
    font-size: 0.78rem;
    line-height: 1.25;
  }
}

/* Codex database redesign - scoped to Codex pages only */
.codex-page main,
body.codex-detail-page main {
  background:
    radial-gradient(circle at 72% 4%, rgba(88, 101, 242, 0.12), transparent 30%),
    linear-gradient(135deg, rgba(5, 11, 24, 0.98), rgba(8, 18, 38, 0.98) 58%, rgba(7, 12, 24, 0.98));
}

.codex-page .codex-hero {
  display: none;
}

.codex-page .codex-hero::after {
  height: 100%;
  background:
    linear-gradient(180deg, rgba(5, 11, 24, 0.1), rgba(5, 11, 24, 0.94)),
    linear-gradient(90deg, rgba(5, 11, 24, 0.94), transparent 56%, rgba(5, 11, 24, 0.82));
}

.codex-page .codex-hero-layout {
  grid-template-columns: minmax(0, 0.86fr) minmax(360px, 0.54fr);
  gap: clamp(28px, 5vw, 76px);
}

.codex-page .codex-hero-copy h1 {
  max-width: 760px;
  font-family: "Segoe UI Black", "Arial Black", "Segoe UI", sans-serif;
  font-size: clamp(2.6rem, 5vw, 5.4rem);
  line-height: 0.94;
  color: #ffffff;
}

.codex-page .codex-hero-lede {
  max-width: 620px;
  color: rgba(232, 243, 255, 0.9);
}

.codex-page .codex-sync-note {
  width: min(100%, 520px);
  border-color: rgba(116, 220, 255, 0.22);
  border-radius: 8px;
  background: rgba(7, 15, 31, 0.76);
}

.codex-page .codex-hero-art {
  min-height: 290px;
  border-radius: 8px;
  border-color: rgba(116, 220, 255, 0.24);
  background: rgba(9, 18, 36, 0.72);
}

.codex-page .codex-hero-art img {
  height: clamp(290px, 30vw, 420px);
  object-position: center 42%;
}

.codex-page .codex-browser {
  padding: clamp(32px, 4vw, 52px) 0 94px;
  background:
    linear-gradient(90deg, rgba(5, 11, 24, 0.96), rgba(8, 18, 38, 0.92)),
    linear-gradient(rgba(116, 220, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(116, 220, 255, 0.035) 1px, transparent 1px);
  background-size: auto, 46px 46px, 46px 46px;
}

.codex-page .codex-browser .section-heading.compact {
  margin-bottom: 18px;
}

.codex-page .codex-browser > .shell {
  width: min(calc(100% - 72px), 1540px);
}

.codex-page .codex-browser .section-heading h2 {
  max-width: 820px;
  font-family: "Segoe UI Black", "Arial Black", "Segoe UI", sans-serif;
  font-size: clamp(2rem, 3vw, 3.35rem);
  line-height: 0.96;
}

.codex-page .codex-toolbar,
.codex-page .codex-statusbar,
.codex-page .codex-state,
.codex-page .codex-table-shell {
  border-radius: 8px;
  border-color: rgba(116, 220, 255, 0.2);
  background:
    linear-gradient(145deg, rgba(116, 220, 255, 0.075), rgba(255, 232, 168, 0.025)),
    rgba(8, 17, 34, 0.88);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.32);
}

.codex-page .codex-toolbar {
  align-self: start;
  padding: 16px;
}

.codex-page .codex-mode-control {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin: 14px 0;
  padding: 6px;
  border: 1px solid rgba(139, 168, 205, 0.22);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(116, 220, 255, 0.08), rgba(255, 232, 168, 0.025)),
    rgba(3, 8, 18, 0.58);
}

.codex-page .codex-mode-control legend {
  grid-column: 1 / -1;
  padding: 0 4px 2px;
  color: #a8dfff;
  font-size: 0.68rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.codex-page .codex-mode-option {
  position: relative;
  min-width: 0;
  cursor: pointer;
}

.codex-page .codex-mode-option input {
  position: absolute;
  inset: 0;
  opacity: 0;
}

.codex-page .codex-mode-option span {
  min-height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(139, 168, 205, 0.18);
  border-radius: 7px;
  color: #c8d5e8;
  background: rgba(255, 255, 255, 0.035);
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.codex-page .codex-mode-option:hover span,
.codex-page .codex-mode-option input:focus-visible + span {
  border-color: rgba(116, 220, 255, 0.5);
  color: #ffffff;
}

.codex-page .codex-mode-option input:focus-visible + span {
  outline: 2px solid rgba(116, 220, 255, 0.58);
  outline-offset: 2px;
}

.codex-page .codex-mode-option input:checked + span {
  color: #06101f;
  border-color: rgba(255, 232, 168, 0.82);
  background: linear-gradient(135deg, #74dcff, #ffe8a8);
  transform: translateY(-1px);
}

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

.codex-page .codex-field input,
.codex-page .codex-field select {
  min-height: 44px;
  border-radius: 8px;
  border-color: rgba(139, 168, 205, 0.34);
  background: rgba(3, 8, 18, 0.68);
}

.codex-page .codex-reset {
  width: 100%;
  min-width: 0;
}

.codex-page .codex-filter-group {
  border-color: rgba(139, 168, 205, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

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

.codex-page .codex-check {
  min-height: 34px;
  border-radius: 7px;
  border-color: rgba(139, 168, 205, 0.18);
  background: rgba(255, 255, 255, 0.035);
}

.codex-page .codex-statusbar {
  margin: 0 0 14px;
}

.codex-page .codex-grid.is-table {
  display: block;
  margin-top: 0;
}

.codex-table-shell {
  overflow-x: auto;
  overflow-y: hidden;
}

.codex-table {
  width: 100%;
  min-width: 1040px;
  border-collapse: collapse;
  color: #eff6ff;
  font-size: 0.88rem;
}

.codex-table caption {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.codex-table th,
.codex-table td {
  border-bottom: 1px solid rgba(139, 168, 205, 0.16);
  padding: 10px 12px;
  vertical-align: middle;
}

.codex-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  color: #a8dfff;
  background: rgba(8, 17, 34, 0.96);
  font-size: 0.68rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-align: left;
  text-transform: uppercase;
}

.codex-table tbody tr {
  background: rgba(255, 255, 255, 0.015);
  transition:
    background 160ms ease,
    transform 160ms ease;
}

.codex-table tbody tr:hover {
  background:
    linear-gradient(90deg, rgba(116, 220, 255, 0.09), rgba(255, 232, 168, 0.035));
}

.codex-table tbody tr.is-form-row {
  background: rgba(116, 220, 255, 0.032);
}

.codex-table tbody tr.is-form-row .codex-table-number {
  color: #d5f2ff;
}

.codex-grid.is-complete-mode .codex-table tbody tr.is-form-row {
  background:
    linear-gradient(90deg, rgba(116, 220, 255, 0.035), rgba(255, 255, 255, 0.012));
}

.codex-grid.is-complete-mode .codex-table tbody tr.is-form-row:hover {
  background:
    linear-gradient(90deg, rgba(116, 220, 255, 0.12), rgba(255, 232, 168, 0.04));
}

.codex-table-number {
  width: 68px;
  color: #9aaac0;
  font-weight: 900;
}

.codex-table-identity {
  min-width: 230px;
}

.codex-table-identity a {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  color: #ffffff;
  text-decoration: none;
}

.codex-table-identity a:hover strong {
  color: var(--cream);
}

.codex-table-avatar {
  width: 54px;
  height: 54px;
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(116, 220, 255, 0.24);
  border-radius: 10px;
  background:
    radial-gradient(circle at 50% 35%, rgba(116, 220, 255, 0.2), transparent 60%),
    rgba(255, 255, 255, 0.045);
}

.codex-table-avatar img {
  width: 50px;
  height: 50px;
  object-fit: contain;
  filter: saturate(1.08) contrast(1.04);
}

.codex-table-identity strong,
.codex-table-identity small {
  display: block;
}

.codex-table-identity strong {
  font-size: 0.98rem;
  line-height: 1.15;
}

.codex-table-identity small {
  margin-top: 3px;
  color: #8da0b9;
  font-size: 0.74rem;
  font-weight: 800;
}

.codex-table-chips {
  min-width: 118px;
}

.codex-table .codex-badges {
  gap: 5px;
}

.codex-table .codex-badge,
.codex-table .codex-stage-pill,
.codex-table .codex-number-pill {
  min-height: 22px;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 0.68rem;
}

.codex-badge[data-slug="feu"] { border-color: rgba(255, 91, 61, 0.58); background: rgba(255, 91, 61, 0.2); }
.codex-badge[data-slug="eau"] { border-color: rgba(48, 151, 255, 0.6); background: rgba(48, 151, 255, 0.2); }
.codex-badge[data-slug="glace"] { border-color: rgba(134, 221, 255, 0.62); background: rgba(134, 221, 255, 0.17); }
.codex-badge[data-slug="plante"] { border-color: rgba(75, 211, 112, 0.62); background: rgba(75, 211, 112, 0.18); }
.codex-badge[data-slug="vent"] { border-color: rgba(49, 208, 171, 0.6); background: rgba(49, 208, 171, 0.17); }
.codex-badge[data-slug="electrique"] { border-color: rgba(255, 214, 76, 0.66); background: rgba(255, 214, 76, 0.17); }
.codex-badge[data-slug="roche"] { border-color: rgba(189, 144, 84, 0.62); background: rgba(189, 144, 84, 0.2); }
.codex-badge[data-slug="tenebres"] { border-color: rgba(158, 93, 241, 0.64); background: rgba(158, 93, 241, 0.22); }
.codex-badge[data-slug="magique"] { border-color: rgba(255, 119, 193, 0.64); background: rgba(255, 119, 193, 0.2); }

.codex-badge[data-slug="dps"] { color: #ffe9bd; border-color: rgba(255, 144, 55, 0.7); background: rgba(255, 144, 55, 0.2); }
.codex-badge[data-slug="break"] { color: #dcecff; border-color: rgba(88, 147, 232, 0.68); background: rgba(88, 147, 232, 0.2); }
.codex-badge[data-slug="support"],
.codex-badge[data-slug="soin"] { color: #fff0a6; border-color: rgba(255, 220, 66, 0.7); background: rgba(255, 220, 66, 0.16); }
.codex-badge[data-slug="regen"] { color: #f0dcff; border-color: rgba(180, 112, 255, 0.68); background: rgba(180, 112, 255, 0.19); }
.codex-badge[data-slug="tank"] { color: #d7ffe2; border-color: rgba(75, 211, 112, 0.68); background: rgba(75, 211, 112, 0.17); }

.codex-table-forms {
  max-width: 185px;
  color: #c8d5e8;
  font-size: 0.78rem;
  font-weight: 800;
}

.codex-table-stat {
  width: 84px;
}

.codex-stat-meter {
  --stat: 0%;
  position: relative;
  width: 100%;
  min-width: 58px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  overflow: hidden;
  border-radius: 6px;
  background: rgba(139, 168, 205, 0.12);
}

.codex-stat-meter::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--stat);
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(116, 220, 255, 0.72), rgba(255, 232, 168, 0.84));
}

.codex-stat-meter strong {
  position: relative;
  z-index: 1;
  padding: 0 8px;
  color: #ffffff;
  font-size: 0.78rem;
  line-height: 1;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.46);
}

.codex-table-action {
  width: 86px;
  text-align: right;
}

.codex-table-action .codex-card-link {
  min-height: 34px;
  margin: 0;
  border-radius: 7px;
  padding: 7px 10px;
  font-size: 0.78rem;
}

body.has-codex-modal {
  overflow: hidden;
}

.codex-modal[hidden] {
  display: none;
}

.codex-modal {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: grid;
  place-items: center;
  padding: 28px;
  background: rgba(2, 6, 14, 0.74);
  backdrop-filter: blur(9px);
}

.codex-modal-card {
  position: relative;
  width: min(1120px, 100%);
  max-height: min(860px, calc(100vh - 56px));
  overflow: auto;
  border: 1px solid rgba(139, 168, 205, 0.28);
  border-radius: 12px;
  background:
    linear-gradient(145deg, rgba(116, 220, 255, 0.07), rgba(255, 232, 168, 0.025)),
    #0d121b;
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.58);
}

.codex-modal-card.is-loading {
  width: min(440px, 100%);
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 34px;
  text-align: center;
}

.codex-modal-card.is-loading img {
  width: 112px;
  height: 112px;
  object-fit: contain;
}

.codex-modal-card.is-loading h2 {
  margin: 0;
  color: #fff7d3;
  font-size: 1.8rem;
}

.codex-modal-card.is-loading p {
  margin: 0;
  color: #c6d4e8;
}

.codex-modal-header {
  position: sticky;
  top: 0;
  z-index: 3;
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 22px;
  border-bottom: 1px solid rgba(139, 168, 205, 0.2);
  background: rgba(13, 18, 27, 0.96);
  backdrop-filter: blur(12px);
}

.codex-modal-avatar {
  width: 82px;
  height: 82px;
  object-fit: contain;
  border: 1px solid rgba(116, 220, 255, 0.24);
  border-radius: 16px;
  background:
    radial-gradient(circle at 50% 38%, rgba(116, 220, 255, 0.18), transparent 58%),
    rgba(255, 255, 255, 0.045);
}

.codex-modal-number {
  display: block;
  color: #8fb5d9;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.codex-modal-header h2 {
  margin: 4px 0 8px;
  color: #ffffff;
  font-family: "Segoe UI Black", "Arial Black", "Segoe UI", sans-serif;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 0.96;
}

.codex-modal-close {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(139, 168, 205, 0.25);
  border-radius: 9px;
  color: #dce9fb;
  background: rgba(255, 255, 255, 0.045);
  font: inherit;
  font-size: 1.4rem;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.codex-modal-close:hover {
  border-color: rgba(116, 220, 255, 0.6);
  background: rgba(116, 220, 255, 0.12);
}

.codex-modal-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.48fr);
  gap: 18px;
  padding: 22px;
}

.codex-modal-stack {
  display: grid;
  gap: 14px;
  align-content: start;
}

.codex-modal-description {
  margin: 0;
  padding: 16px;
  border: 1px solid rgba(139, 168, 205, 0.18);
  border-radius: 10px;
  color: #dce8f8;
  background: rgba(255, 255, 255, 0.035);
  line-height: 1.65;
}

.codex-modal-panel {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(139, 168, 205, 0.2);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
}

.codex-modal-panel h3 {
  margin: 0 0 2px;
  color: #ffffff;
  font-size: 0.86rem;
  font-weight: 950;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.codex-modal-stat {
  --stat: 0%;
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr) 58px;
  gap: 10px;
  align-items: center;
  color: #dce8f8;
  font-size: 0.82rem;
  font-weight: 850;
}

.codex-modal-stat i {
  position: relative;
  height: 8px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(139, 168, 205, 0.14);
}

.codex-modal-stat i::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--stat);
  border-radius: inherit;
  background: linear-gradient(90deg, #60c7ff, #fff0a2);
}

.codex-modal-stat strong {
  color: #ffffff;
  text-align: right;
}

.codex-modal-place {
  min-height: 36px;
  display: flex;
  align-items: center;
  border: 1px solid rgba(139, 168, 205, 0.16);
  border-radius: 8px;
  padding: 8px 10px;
  color: #eff6ff;
  background: rgba(7, 13, 25, 0.52);
  font-size: 0.84rem;
  font-weight: 850;
}

.codex-modal-forms,
.codex-modal-evolution {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.codex-modal-forms span,
.codex-modal-evolution span {
  min-height: 42px;
  display: inline-flex;
  gap: 8px;
  align-items: center;
  border: 1px solid rgba(139, 168, 205, 0.18);
  border-radius: 9px;
  padding: 7px 10px;
  color: #eff6ff;
  background: rgba(7, 13, 25, 0.52);
  font-size: 0.82rem;
  font-weight: 850;
}

.codex-modal-forms span.is-active {
  color: #071225;
  border-color: transparent;
  background: linear-gradient(135deg, #fff7c9, #9feaff);
}

.codex-modal-forms img,
.codex-modal-evolution img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.codex-modal-side {
  display: grid;
  gap: 14px;
  align-content: start;
}

.codex-modal-side > img {
  width: 100%;
  max-height: 330px;
  object-fit: contain;
  border: 1px solid rgba(139, 168, 205, 0.2);
  border-radius: 10px;
  padding: 18px;
  background:
    radial-gradient(circle at 50% 38%, rgba(116, 220, 255, 0.2), transparent 54%),
    rgba(255, 255, 255, 0.035);
  filter: drop-shadow(0 24px 42px rgba(0, 0, 0, 0.42));
}

.codex-modal-ability {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 8px;
  border: 1px solid rgba(139, 168, 205, 0.16);
  border-radius: 8px;
  background: rgba(7, 13, 25, 0.52);
}

.codex-modal-ability img {
  width: 38px;
  height: 38px;
  object-fit: contain;
}

.codex-modal-ability strong,
.codex-modal-ability span {
  display: block;
}

.codex-modal-ability strong {
  color: #ffffff;
  font-size: 0.82rem;
}

.codex-modal-ability span,
.codex-modal-empty {
  color: #8fa2bd;
  font-size: 0.76rem;
  font-weight: 800;
}

.codex-modal-empty {
  margin: 0;
}

.codex-modal-actions {
  display: grid;
  gap: 8px;
}

.codex-modal-actions .codex-card-link {
  margin: 0;
}

@media (max-width: 840px) {
  .codex-modal {
    padding: 10px;
    place-items: stretch;
  }

  .codex-modal-card {
    width: 100%;
    max-height: calc(100vh - 20px);
  }

  .codex-modal-header {
    grid-template-columns: 58px minmax(0, 1fr) auto;
    gap: 12px;
    padding: 14px;
  }

  .codex-modal-avatar {
    width: 58px;
    height: 58px;
    border-radius: 12px;
  }

  .codex-modal-header h2 {
    font-size: clamp(1.55rem, 9vw, 2.4rem);
  }

  .codex-modal-main {
    grid-template-columns: 1fr;
    padding: 14px;
  }

  .codex-modal-stat {
    grid-template-columns: 64px minmax(0, 1fr) 48px;
  }
}

@media (min-width: 1120px) {
  .codex-page .codex-browser > .shell {
    display: grid;
    grid-template-columns: 318px minmax(0, 1fr);
    grid-template-areas:
      "heading heading"
      "filters status"
      "filters results"
      "filters pagination";
    gap: 18px 22px;
    align-items: start;
  }

  .codex-page .codex-browser .section-heading.compact {
    grid-area: heading;
  }

  .codex-page .codex-toolbar {
    position: sticky;
    top: 96px;
    grid-area: filters;
  }

  .codex-page .codex-statusbar {
    grid-area: status;
  }

  .codex-page .codex-state,
  .codex-page .codex-grid {
    grid-area: results;
  }

  .codex-page .codex-pagination {
    grid-area: pagination;
  }
}

@media (max-width: 1119px) {
  .codex-page .codex-toolbar {
    margin-bottom: 16px;
  }

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

  .codex-table-shell {
    overflow-x: auto;
  }
}

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

  .codex-page .codex-hero-art {
    display: none;
  }

  .codex-page .codex-filter-grid {
    grid-template-columns: 1fr;
  }

  .codex-page .codex-table {
    min-width: 900px;
  }

  .home-page .live-list {
    grid-template-rows: none;
  }

  .live-voice-rail {
    display: grid;
    overflow: hidden;
    padding-bottom: 0;
    scroll-snap-type: none;
  }

  .live-voice-rail .live-row-voice {
    min-width: 0;
    scroll-snap-align: none;
  }
}

body.codex-detail-page .breadcrumbs {
  padding-top: 24px;
}

body.codex-detail-page .codex-detail-hero {
  padding: clamp(34px, 5vw, 62px) 0 clamp(18px, 3vw, 32px);
}

body.codex-detail-page .codex-detail-layout {
  grid-template-columns: minmax(0, 0.98fr) minmax(320px, 0.62fr);
  gap: clamp(18px, 3vw, 32px);
  align-items: stretch;
}

body.codex-detail-page .codex-detail-copy,
body.codex-detail-page .codex-detail-visual,
body.codex-detail-page .detail-panel {
  border-radius: 10px;
  border-color: rgba(139, 168, 205, 0.24);
  background:
    linear-gradient(145deg, rgba(116, 220, 255, 0.065), rgba(255, 232, 168, 0.022)),
    rgba(10, 15, 25, 0.92);
  box-shadow: 0 28px 82px rgba(0, 0, 0, 0.38);
}

body.codex-detail-page .codex-detail-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 360px;
}

body.codex-detail-page .codex-detail-copy h1 {
  font-family: "Segoe UI Black", "Arial Black", "Segoe UI", sans-serif;
  font-size: clamp(3rem, 6vw, 5.8rem);
  line-height: 0.92;
  color: #fff7d3;
}

body.codex-detail-page .codex-description {
  max-width: 760px;
  color: #d8e4f6;
  font-size: 1rem;
  line-height: 1.7;
}

body.codex-detail-page .codex-detail-visual {
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 48% 40%, rgba(116, 220, 255, 0.2), transparent 45%),
    rgba(255, 255, 255, 0.035);
}

body.codex-detail-page .codex-detail-visual img {
  height: 100%;
  min-height: 360px;
  max-height: 560px;
  padding: 30px;
  filter: drop-shadow(0 34px 52px rgba(0, 0, 0, 0.42));
}

body.codex-detail-page .codex-detail-section {
  padding: 26px 0;
}

body.codex-detail-page .detail-grid {
  gap: 18px;
}

body.codex-detail-page .form-switcher a {
  border-radius: 10px;
  border-color: rgba(139, 168, 205, 0.24);
  background: rgba(10, 15, 25, 0.78);
}

body.codex-detail-page .form-switcher a[aria-current="true"] {
  color: #071225;
  background: linear-gradient(135deg, #fff7c9, #9feaff);
}

body.codex-detail-page .codex-stat-row {
  grid-template-columns: minmax(80px, 0.22fr) minmax(0, 1fr) 58px;
  min-height: 34px;
}

body.codex-detail-page .codex-stat-row[data-stat="hp"] .codex-stat-track::-webkit-progress-value { background: linear-gradient(90deg, #3ed178, #8df3aa); }
body.codex-detail-page .codex-stat-row[data-stat="physicalAttack"] .codex-stat-track::-webkit-progress-value { background: linear-gradient(90deg, #ff7e31, #ffd15c); }
body.codex-detail-page .codex-stat-row[data-stat="magicAttack"] .codex-stat-track::-webkit-progress-value { background: linear-gradient(90deg, #8d6dff, #e093ff); }
body.codex-detail-page .codex-stat-row[data-stat="physicalDefense"] .codex-stat-track::-webkit-progress-value,
body.codex-detail-page .codex-stat-row[data-stat="magicDefense"] .codex-stat-track::-webkit-progress-value { background: linear-gradient(90deg, #6b9cff, #9be4ff); }
body.codex-detail-page .codex-stat-row[data-stat="haste"] .codex-stat-track::-webkit-progress-value { background: linear-gradient(90deg, #b56cff, #f4a2ff); }
body.codex-detail-page .codex-stat-row[data-stat="attributeValue"] .codex-stat-track::-webkit-progress-value { background: linear-gradient(90deg, #ffe05f, #fff7c9); }

body.codex-detail-page .codex-stat-row[data-stat="hp"] .codex-stat-track::-moz-progress-bar { background: linear-gradient(90deg, #3ed178, #8df3aa); }
body.codex-detail-page .codex-stat-row[data-stat="physicalAttack"] .codex-stat-track::-moz-progress-bar { background: linear-gradient(90deg, #ff7e31, #ffd15c); }
body.codex-detail-page .codex-stat-row[data-stat="magicAttack"] .codex-stat-track::-moz-progress-bar { background: linear-gradient(90deg, #8d6dff, #e093ff); }
body.codex-detail-page .codex-stat-row[data-stat="physicalDefense"] .codex-stat-track::-moz-progress-bar,
body.codex-detail-page .codex-stat-row[data-stat="magicDefense"] .codex-stat-track::-moz-progress-bar { background: linear-gradient(90deg, #6b9cff, #9be4ff); }
body.codex-detail-page .codex-stat-row[data-stat="haste"] .codex-stat-track::-moz-progress-bar { background: linear-gradient(90deg, #b56cff, #f4a2ff); }
body.codex-detail-page .codex-stat-row[data-stat="attributeValue"] .codex-stat-track::-moz-progress-bar { background: linear-gradient(90deg, #ffe05f, #fff7c9); }

body.codex-detail-page .ability-card,
body.codex-detail-page .evolution-node,
body.codex-detail-page .training-text,
body.codex-detail-page .empty-state {
  border-radius: 9px;
  border-color: rgba(139, 168, 205, 0.2);
  background: rgba(255, 255, 255, 0.035);
}

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

@media (max-width: 1180px) {
  .home-page .live-now .live-stage {
    max-width: 720px;
    grid-template-columns: 1fr;
  }

  .home-page .live-now .live-panel {
    max-height: none;
    min-height: 360px;
  }

  .home-page .live-now .live-companion {
    order: -1;
  }
}

@media (max-width: 760px) {
  .home-page .live-now .live-panel {
    min-height: 430px;
    max-height: 430px;
  }

  .home-page .live-now .live-list {
    grid-template-rows: repeat(3, minmax(0, 1fr));
  }

  .home-page .live-now .live-row {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 10px;
    padding: 10px;
  }

  .home-page .live-now .live-avatar {
    width: 40px;
    height: 40px;
  }

  .home-page .live-now .voice-avatars {
    margin-top: 6px;
  }

  .home-page .live-now .voice-avatars img {
    width: 24px;
    height: 24px;
  }
}
