:root {
  --bg: #0f172a;
  --panel: #111c31;
  --panel-soft: #17233a;
  --text: #f8fafc;
  --muted: #94a3b8;
  --line: rgba(148, 163, 184, 0.22);
  --accent: #38bdf8;
  --accent-strong: #0ea5e9;
  --danger: #f87171;
  --success: #4ade80;
  --radius: 8px;
  --shadow: 0 18px 60px rgba(2, 6, 23, 0.28);
}

*, *::before, *::after {
  box-sizing: border-box;
}

[hidden] { display: none !important; }

html {
  font-size: 16px;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(56, 189, 248, 0.16), transparent 34rem),
    var(--bg);
  color: var(--text);
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.site-nav {
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 250;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.site-nav::-webkit-scrollbar { display: none; }

.nav-brand {
  color: var(--text);
  font-weight: 700;
  letter-spacing: 0.01em;
}

.nav-brand:hover,
.nav-link:hover {
  text-decoration: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}

.nav-links--main {
  flex: 1;
  justify-content: center;
}

.nav-links--auth {
  justify-content: flex-end;
}

.nav-menu {
  display: flex;
  flex: 1;
  align-items: center;
  min-width: 0;
  gap: 8px;
}

.nav-toggle {
  display: none;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  padding: 0;
}

.nav-user {
  color: var(--muted);
  font-size: 0.9rem;
}

.nav-link {
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 0.82rem;
  padding: 4px 9px;
  white-space: nowrap;
  transition: background 0.14s, color 0.14s;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--line);
  color: var(--text);
  text-decoration: none;
}

.nav-link--active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.nav-link--cta {
  border-color: rgba(56, 189, 248, 0.45);
  color: var(--accent);
}

.nav-link--cta:hover {
  color: var(--accent);
}

.nav-link--danger {
  color: var(--danger);
}

.nav-link--danger:hover {
  color: var(--danger);
}

.nav-link--admin {
  color: var(--muted);
  border-color: rgba(255,255,255,0.12);
}

.nav-link--admin:hover {
  color: var(--fg);
  border-color: rgba(255,255,255,0.25);
}

.site-main {
  flex: 1;
}


.landing {
  max-width: 1120px;
  margin: 0 auto;
  padding: 76px 24px 96px;
  position: relative;
}

.landing::before {
  animation: landingGlow 12s ease-in-out infinite alternate;
  background:
    radial-gradient(circle at 18% 18%, rgba(251, 191, 36, 0.18), transparent 26rem),
    radial-gradient(circle at 80% 10%, rgba(56, 189, 248, 0.16), transparent 22rem);
  content: "";
  inset: -58px calc(50% - 50vw) auto;
  height: 620px;
  pointer-events: none;
  position: absolute;
  z-index: -1;
}

.landing__hero {
  max-width: 820px;
  margin-bottom: 44px;
}

.landing__eyebrow {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  margin: 0 0 12px;
  text-transform: uppercase;
}

.landing__title {
  font-size: clamp(2.4rem, 8vw, 5.5rem);
  letter-spacing: -0.04em;
  line-height: 0.95;
  margin: 0 0 24px;
}

.landing__tagline {
  color: var(--muted);
  font-size: 1.18rem;
  line-height: 1.7;
  max-width: 680px;
  margin: 0 0 30px;
}

.landing__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.landing__features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.landing-section {
  content-visibility: auto;
  contain-intrinsic-size: 1px 720px;
  margin: 0 0 38px;
}

.landing-section__intro {
  margin: 0 0 18px;
  max-width: 760px;
}

.landing-section__eyebrow {
  color: #fbbf24;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  margin: 0 0 10px;
  text-transform: uppercase;
}

.landing-section__title {
  color: #fff7ed;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  line-height: 1.08;
  margin: 0 0 10px;
  text-wrap: balance;
}

.landing-section__lead {
  color: #cbd5e1;
  line-height: 1.75;
  margin: 0;
}

.landing-section__actions {
  margin-top: 18px;
}

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

.landing-step,
.landing-link-card,
.landing-news-card {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.025)),
    rgba(17, 28, 49, 0.82);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 18px;
  box-shadow: 0 20px 50px rgba(2, 6, 23, 0.16);
}

.landing-step {
  min-width: 0;
  padding: 22px;
}

.landing-step__num {
  align-items: center;
  background: linear-gradient(135deg, #fbbf24, #f97316);
  border-radius: 999px;
  color: #241207;
  display: inline-flex;
  font-size: 0.88rem;
  font-weight: 900;
  height: 34px;
  justify-content: center;
  margin-bottom: 14px;
  width: 34px;
}

.landing-step h3,
.landing-news-card h3 {
  color: #fff7ed;
  font-size: 1.08rem;
  margin: 0 0 10px;
}

.landing-step p,
.landing-link-card span,
.landing-news-card p {
  color: #cbd5e1;
  line-height: 1.7;
  margin: 0;
}

.landing-inline-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.landing-inline-link {
  color: #fde68a;
  display: inline-flex;
  font-weight: 700;
  margin-top: 14px;
}

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

.landing-link-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  padding: 22px;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.landing-link-card strong {
  color: #fff7ed;
  font-size: 1.02rem;
}

.landing-link-card:hover {
  background:
    linear-gradient(180deg, rgba(251, 191, 36, 0.08), rgba(56, 189, 248, 0.04)),
    rgba(17, 28, 49, 0.9);
  border-color: rgba(251, 191, 36, 0.34);
  text-decoration: none;
  transform: translateY(-4px);
}

.landing-news-card {
  min-width: 0;
  padding: 20px;
}

.landing-news-card__meta {
  color: #94a3b8;
  display: flex;
  flex-wrap: wrap;
  font-size: 0.74rem;
  font-weight: 700;
  gap: 12px;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
  text-transform: uppercase;
}

.landing-countdown {
  align-items: center;
  background:
    linear-gradient(135deg, rgba(30, 41, 59, 0.92), rgba(17, 24, 39, 0.86)),
    radial-gradient(circle at 18% 12%, rgba(251, 191, 36, 0.18), transparent 22rem);
  border: 1px solid rgba(251, 191, 36, 0.28);
  border-radius: var(--radius);
  box-shadow: 0 24px 60px rgba(2, 6, 23, 0.3);
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.9fr);
  margin: 0 0 34px;
  overflow: hidden;
  padding: 22px;
  position: relative;
}

.landing-countdown::before {
  background: linear-gradient(90deg, #fbbf24, #38bdf8, #f97316);
  content: "";
  height: 3px;
  inset: 0 0 auto;
  position: absolute;
}

.landing-countdown__copy {
  min-width: 0;
}

.landing-countdown__eyebrow {
  color: #fbbf24;
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.16em;
  margin: 0 0 8px;
  text-transform: uppercase;
}

.landing-countdown h2 {
  color: #fff7ed;
  font-size: clamp(1.35rem, 2.6vw, 2.05rem);
  line-height: 1.1;
  margin: 0 0 8px;
}

.landing-countdown p {
  color: #cbd5e1;
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0;
  max-width: 560px;
}

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

.landing-countdown__unit {
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: var(--radius);
  min-width: 0;
  padding: 14px 8px 12px;
  text-align: center;
}

.landing-countdown__unit strong {
  color: #fde68a;
  display: block;
  font-size: clamp(1.45rem, 4vw, 2.45rem);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.landing-countdown__unit span {
  color: var(--muted);
  display: block;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  margin-top: 8px;
  text-transform: uppercase;
}

@media (max-width: 760px) {
  .landing-countdown {
    grid-template-columns: 1fr;
    padding: 18px;
  }

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

  .landing-journey,
  .landing-link-grid,
  .landing-news-grid {
    grid-template-columns: 1fr;
  }
}

.landing .cms-block--hero {
  align-items: center;
  display: grid;
  gap: 48px;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 0.82fr);
  margin-bottom: 62px;
  max-width: none;
  min-height: 520px;
}

.landing .cms-hero__copy {
  max-width: 690px;
}

.landing .cms-block--hero .page-eyebrow {
  color: #fbbf24;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  margin: 0 0 14px;
  text-transform: uppercase;
}

.landing .cms-block--hero .page-title {
  color: #fff7ed;
  font-size: clamp(3rem, 8vw, 6.7rem);
  letter-spacing: -0.06em;
  line-height: 0.9;
  margin: 0 0 24px;
  max-width: 760px;
  text-wrap: balance;
}

.landing .cms-block--hero .page-subtitle {
  color: #cbd5e1;
  font-size: clamp(1rem, 2vw, 1.22rem);
  line-height: 1.75;
  margin: 0 0 30px;
  max-width: 640px;
}

.landing .cms-block--hero .page-actions {
  gap: 14px;
}

.landing .cms-block--hero .btn--primary {
  background: linear-gradient(135deg, #fbbf24, #f97316);
  box-shadow: 0 18px 46px rgba(249, 115, 22, 0.28);
  color: #241207;
}

.landing .cms-block--hero .btn--primary:hover {
  color: #241207;
  filter: brightness(1.04);
}

.landing .cms-block--hero .btn--ghost {
  background: rgba(15, 23, 42, 0.5);
  border-color: rgba(251, 191, 36, 0.28);
  color: #fde68a;
}

.cms-hero-scene {
  display: none;
}

.landing .cms-hero-scene {
  display: block;
  min-height: 450px;
  position: relative;
}

.cms-hero-scene__halo {
  animation: pulseHalo 5s ease-in-out infinite;
  background: radial-gradient(circle, rgba(251, 191, 36, 0.24), transparent 64%);
  border-radius: 50%;
  filter: blur(12px);
  height: 420px;
  left: 50%;
  position: absolute;
  top: 52%;
  transform: translate(-50%, -50%);
  width: 420px;
}

.cms-hero-scene__window {
  animation: floatScene 6s ease-in-out infinite;
  aspect-ratio: 4 / 5;
  background:
    linear-gradient(180deg, rgba(8, 13, 28, 0.35), rgba(8, 13, 28, 0.1)),
    radial-gradient(circle at 50% 72%, rgba(251, 191, 36, 0.28), transparent 22%),
    linear-gradient(160deg, #13213a 0%, #0d1729 52%, #24130b 100%);
  border: 1px solid rgba(255, 237, 213, 0.16);
  border-radius: 26px;
  box-shadow:
    0 34px 90px rgba(2, 6, 23, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  margin-left: auto;
  max-width: 430px;
  overflow: hidden;
  position: relative;
}

.cms-hero-scene__stars {
  background-image:
    radial-gradient(circle, rgba(226, 232, 240, 0.95) 0 1px, transparent 1.5px),
    radial-gradient(circle, rgba(125, 211, 252, 0.9) 0 1px, transparent 1.5px);
  background-position: 10px 20px, 70px 60px;
  background-size: 90px 80px, 130px 110px;
  inset: 0;
  opacity: 0.32;
  position: absolute;
}

.cms-hero-scene__mountain {
  background: linear-gradient(135deg, #16233a, #263b5b);
  bottom: 122px;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  height: 210px;
  position: absolute;
  width: 290px;
}

.cms-hero-scene__mountain--back {
  left: -50px;
  opacity: 0.7;
}

.cms-hero-scene__mountain--front {
  background: linear-gradient(135deg, #1f2d46, #3b2a22);
  height: 250px;
  right: -70px;
  width: 360px;
}

.cms-hero-scene__forge {
  bottom: 68px;
  height: 180px;
  left: 50%;
  position: absolute;
  transform: translateX(-50%);
  width: 230px;
}

.cms-hero-scene__roof {
  background: linear-gradient(135deg, #7c2d12, #fb923c);
  clip-path: polygon(50% 0, 100% 42%, 90% 48%, 90% 100%, 10% 100%, 10% 48%, 0 42%);
  height: 145px;
  inset: 12px 0 auto;
  position: absolute;
}

.cms-hero-scene__fire {
  animation: forgeFire 0.9s ease-in-out infinite alternate;
  background:
    radial-gradient(circle at 50% 65%, #fff7ed 0 10%, transparent 11%),
    radial-gradient(circle at 46% 58%, #fbbf24 0 24%, transparent 25%),
    radial-gradient(circle at 54% 56%, #f97316 0 38%, transparent 39%);
  border-radius: 50% 50% 42% 42%;
  bottom: 24px;
  height: 70px;
  left: 50%;
  position: absolute;
  transform: translateX(-50%);
  width: 82px;
}

.cms-hero-scene__anvil {
  background: linear-gradient(180deg, #e2e8f0, #64748b);
  border-radius: 10px 10px 6px 6px;
  bottom: -18px;
  height: 38px;
  left: 50%;
  position: absolute;
  transform: translateX(-50%);
  width: 150px;
}

.cms-hero-scene__anvil::before {
  background: #cbd5e1;
  border-radius: 8px;
  content: "";
  height: 18px;
  left: -26px;
  position: absolute;
  top: 4px;
  width: 64px;
}

.cms-hero-scene__smoke {
  animation: smokeRise 4s ease-in-out infinite;
  background: rgba(203, 213, 225, 0.28);
  border-radius: 50%;
  filter: blur(4px);
  height: 56px;
  position: absolute;
  top: -34px;
  width: 56px;
}

.cms-hero-scene__smoke--one {
  left: 74px;
}

.cms-hero-scene__smoke--two {
  animation-delay: 1.1s;
  left: 110px;
  top: -48px;
}

.cms-hero-scene__blade {
  animation: bladeShine 3.6s ease-in-out infinite;
  background: linear-gradient(90deg, transparent, rgba(226, 232, 240, 0.96), #67e8f9, rgba(226, 232, 240, 0.86), transparent);
  border-radius: 999px;
  bottom: 118px;
  box-shadow: 0 0 40px rgba(103, 232, 249, 0.38);
  height: 8px;
  left: 14%;
  position: absolute;
  transform: rotate(-17deg);
  width: 76%;
}

.cms-hero-scene__ember {
  animation: emberLift 3.2s ease-in infinite;
  background: #fbbf24;
  border-radius: 50%;
  box-shadow: 0 0 18px #f97316;
  height: 7px;
  position: absolute;
  width: 7px;
}

.cms-hero-scene__ember--one {
  animation-delay: 0.2s;
  bottom: 132px;
  left: 38%;
}

.cms-hero-scene__ember--two {
  animation-delay: 1.1s;
  bottom: 116px;
  left: 59%;
}

.cms-hero-scene__ember--three {
  animation-delay: 1.8s;
  bottom: 162px;
  left: 50%;
}

.cms-hero-scene__rune {
  backdrop-filter: blur(16px);
  background: rgba(15, 23, 42, 0.76);
  border: 1px solid rgba(251, 191, 36, 0.22);
  border-radius: 999px;
  color: #fde68a;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 8px 12px;
  position: absolute;
}

.cms-hero-scene__rune--one {
  left: 10px;
  top: 86px;
}

.cms-hero-scene__rune--two {
  right: 2px;
  top: 152px;
}

.cms-hero-scene__rune--three {
  bottom: 70px;
  left: 42px;
}

.cms-hero-slider {
  display: none;
}

.landing .cms-hero-slider,
.cms-preview__frame .cms-hero-slider {
  animation: floatScene 8s ease-in-out infinite;
  background: rgba(9, 14, 26, 0.4);
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 26px;
  box-shadow: 0 30px 90px rgba(2, 6, 23, 0.4);
  display: block;
  min-height: 450px;
  overflow: hidden;
  position: relative;
}

.cms-hero-slider__track {
  display: flex;
  height: 100%;
  min-height: 450px;
  transition: transform 0.6s cubic-bezier(0.65, 0, 0.35, 1);
  will-change: transform;
}

.cms-hero-slider__slide {
  flex: 0 0 100%;
  min-height: 450px;
  position: relative;
}

.cms-hero-slider__slide img {
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.cms-hero-slider__caption {
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.86) 0%, rgba(2, 6, 23, 0) 55%);
  bottom: 0;
  left: 0;
  padding: 28px 26px 20px;
  position: absolute;
  right: 0;
}

.cms-hero-slider__caption strong {
  color: #fff7ed;
  display: block;
  font-size: 1.05rem;
  margin-bottom: 4px;
}

.cms-hero-slider__caption span {
  color: #cbd5e1;
  font-size: 0.9rem;
}

.cms-hero-slider__dots {
  bottom: 16px;
  display: flex;
  gap: 8px;
  justify-content: center;
  left: 0;
  position: absolute;
  right: 0;
}

.cms-hero-slider__dots button {
  background: rgba(255, 255, 255, 0.32);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  height: 8px;
  padding: 0;
  transition: background 0.2s ease, transform 0.2s ease, width 0.2s ease;
  width: 8px;
}

.cms-hero-slider__dots button.is-active {
  background: #fbbf24;
  width: 22px;
}

.landing .cms-block--cards {
  background: linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0.015));
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 22px;
  box-shadow: 0 24px 80px rgba(2, 6, 23, 0.18);
  padding: 22px;
}

.landing .feature-card {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.025)),
    rgba(17, 28, 49, 0.82);
  border-color: rgba(148, 163, 184, 0.18);
  box-shadow: none;
  min-height: 170px;
  position: relative;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.landing .feature-card::before {
  background: linear-gradient(180deg, #fbbf24, #38bdf8);
  border-radius: 999px;
  content: "";
  height: 36px;
  opacity: 0.7;
  position: absolute;
  right: 18px;
  top: 18px;
  width: 4px;
}

.landing .feature-card:hover {
  background:
    linear-gradient(180deg, rgba(251, 191, 36, 0.08), rgba(56, 189, 248, 0.04)),
    rgba(17, 28, 49, 0.9);
  border-color: rgba(251, 191, 36, 0.34);
  transform: translateY(-4px);
}

@keyframes landingGlow {
  from { opacity: 0.78; transform: translateY(0); }
  to { opacity: 1; transform: translateY(22px); }
}

@keyframes floatScene {
  0%, 100% { transform: translateY(0) rotate(-0.6deg); }
  50% { transform: translateY(-14px) rotate(0.6deg); }
}

@keyframes pulseHalo {
  0%, 100% { opacity: 0.64; transform: translate(-50%, -50%) scale(0.96); }
  50% { opacity: 1; transform: translate(-50%, -50%) scale(1.06); }
}

@keyframes forgeFire {
  from { filter: saturate(1) brightness(1); transform: translateX(-50%) scale(0.94); }
  to { filter: saturate(1.25) brightness(1.16); transform: translateX(-50%) scale(1.08); }
}

@keyframes smokeRise {
  0% { opacity: 0; transform: translateY(28px) scale(0.7); }
  25% { opacity: 0.42; }
  100% { opacity: 0; transform: translateY(-70px) scale(1.35); }
}

@keyframes bladeShine {
  0%, 100% { opacity: 0.62; filter: brightness(1); }
  45% { opacity: 1; filter: brightness(1.5); }
}

@keyframes emberLift {
  0% { opacity: 0; transform: translateY(0) scale(0.6); }
  20% { opacity: 1; }
  100% { opacity: 0; transform: translateY(-160px) translateX(34px) scale(1.1); }
}

@media (max-width: 980px) {
  .landing .cms-hero-scene__window,
  .landing .cms-hero-scene__halo,
  .landing .cms-hero-scene__fire,
  .landing .cms-hero-scene__smoke,
  .landing .cms-hero-scene__blade,
  .landing .cms-hero-scene__ember,
  .landing::before {
    animation: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .landing::before,
  .landing .cms-hero-scene__halo,
  .landing .cms-hero-scene__window,
  .landing .cms-hero-scene__fire,
  .landing .cms-hero-scene__smoke,
  .landing .cms-hero-scene__blade,
  .landing .cms-hero-scene__ember,
  .landing .cms-hero-slider,
  .cms-preview__frame .cms-hero-slider,
  .cms-hero-slider__track,
  .landing-link-card,
  .landing .feature-card {
    animation: none !important;
    transition: none !important;
  }
}

.feature-card,
.auth-card,
.content-card {
  background: rgba(17, 28, 49, 0.82);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.feature-card {
  padding: 22px;
}

.feature-card__title {
  font-size: 1rem;
  margin: 0 0 10px;
}

.feature-card__desc {
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
}

.btn {
  align-items: center;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  display: inline-flex;
  font-weight: 700;
  justify-content: center;
  padding: 11px 18px;
  text-decoration: none;
}

.btn:hover {
  text-decoration: none;
}

.btn--primary {
  background: var(--accent);
  color: #082f49;
}

.btn--primary:hover {
  background: var(--accent-strong);
  color: #f0f9ff;
}

.btn--ghost,
.btn--secondary {
  background: transparent;
  border-color: var(--line);
  color: var(--text);
}

.btn--full {
  width: 100%;
}

.btn--sm {
  font-size: 0.82rem;
  padding: 6px 10px;
  width: 100%;
}

.auth-page,
.content-page {
  display: flex;
  justify-content: center;
  padding: 56px 16px;
}

.auth-page {
  align-items: center;
  min-height: calc(100vh - 116px);
}

.auth-card {
  max-width: 440px;
  padding: 34px;
  width: 100%;
}

.auth-card__brand {
  margin-bottom: 24px;
  text-align: center;
}

.auth-card__title,
.page-title {
  margin: 0 0 8px;
}

.auth-card__sub,
.auth-card__footer,
.text-muted {
  color: var(--muted);
}

.auth-card__sub {
  margin: 0;
}

.auth-card__footer {
  font-size: 0.92rem;
  margin: 18px 0 0;
  text-align: center;
}

.auth-card__quick-login {
  border-top: 1px dashed var(--line);
  margin-top: 22px;
  padding-top: 18px;
}

.auth-card__quick-login-title {
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  margin: 0 0 10px;
  text-align: center;
  text-transform: uppercase;
}

.auth-card__quick-login-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, 1fr);
}

/* Honeypot — visually invisible to humans, filled by bots */
.form-group--honeypot {
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  height: 1px;
  left: -9999px;
  overflow: hidden;
  pointer-events: none;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.form-group--inline {
  align-items: center;
  flex-direction: row;
}

.form-group--terms {
  align-items: flex-start;
}

.form-label {
  color: #cbd5e1;
  font-size: 0.9rem;
  font-weight: 650;
}

.form-label--inline {
  font-weight: 500;
  line-height: 1.5;
}

.form-input {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  font: inherit;
  outline: none;
  padding: 11px 12px;
}

.form-input:focus {
  border-color: var(--accent);
}

select.form-input,
select.form-input option {
  background: var(--panel);
  color: var(--text);
}

select.form-input {
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2394a3b8' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  cursor: pointer;
  padding-right: 32px;
}

.form-checkbox {
  accent-color: var(--accent);
  height: 16px;
  margin: 2px 0 0;
  width: 16px;
}

.form-error {
  color: var(--danger);
  font-size: 0.82rem;
}

.alert {
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  margin-bottom: 16px;
  padding: 12px 14px;
}

.alert--success {
  background: rgba(74, 222, 128, 0.12);
  border-color: var(--success);
}

.alert--danger {
  background: rgba(248, 113, 113, 0.12);
  border-color: var(--danger);
}

.alert--info {
  background: rgba(56, 189, 248, 0.12);
}

.content-card {
  max-width: 820px;
  padding: 36px;
  width: 100%;
}

.content-card h2 {
  margin-top: 28px;
}

.content-card p,
.content-card li {
  color: #cbd5e1;
  line-height: 1.65;
}

.admin-page {
  max-width: 1120px;
  margin: 0 auto;
  padding: 46px 24px 80px;
}

.admin-header {
  margin-bottom: 28px;
}

.admin-eyebrow {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  margin: 0 0 10px;
  text-transform: uppercase;
}

.admin-header h1 {
  font-size: clamp(2rem, 5vw, 3.4rem);
  letter-spacing: -0.03em;
  margin: 0 0 12px;
}

.admin-header p {
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
  max-width: 720px;
}

.admin-coming-soon {
  align-items: center;
  background: rgba(255,255,255,.04);
  border: 1px dashed rgba(255,255,255,.15);
  border-radius: 8px;
  color: var(--muted);
  display: flex;
  font-size: 1rem;
  justify-content: center;
  margin-top: 24px;
  min-height: 200px;
  padding: 40px;
  text-align: center;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 26px;
}

.admin-stat,
.admin-action-card,
.admin-form {
  background: rgba(17, 28, 49, 0.82);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.admin-stat {
  padding: 18px;
}

.admin-stat__value {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.admin-stat__label {
  color: var(--muted);
  display: block;
  font-size: 0.9rem;
  margin-top: 4px;
}

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

.admin-action-card {
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 22px;
}

.admin-action-card:hover {
  border-color: rgba(56, 189, 248, 0.45);
  text-decoration: none;
}

.admin-action-card > span {
  color: var(--muted);
  line-height: 1.5;
}

.admin-action-card--muted {
  opacity: 0.72;
}

.admin-launcher__header {
  align-items: flex-end;
  display: flex;
  gap: 28px;
  justify-content: space-between;
}

.admin-launcher__summary {
  align-items: flex-end;
  border-left: 2px solid rgba(251, 191, 36, 0.72);
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  padding: 4px 0 4px 18px;
}

.admin-launcher__summary strong {
  color: var(--text);
  font-size: 1.75rem;
  line-height: 1;
}

.admin-launcher__summary span {
  color: var(--muted);
  font-size: 0.78rem;
  margin-top: 6px;
  text-transform: uppercase;
}

.admin-launcher {
  display: grid;
  gap: 34px;
}

.admin-launcher__group {
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.admin-launcher__group-header {
  align-items: baseline;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 14px;
}

.admin-launcher__group-header h2 {
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  margin: 0;
}

.admin-launcher__group-header > span {
  color: var(--muted);
  font-size: 0.78rem;
}

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

.admin-launcher__card {
  box-shadow: none;
  min-height: 150px;
  padding: 20px;
  transition: border-color 150ms ease, background-color 150ms ease, transform 150ms ease;
}

.admin-launcher__card:hover {
  background: rgba(17, 28, 49, 0.98);
  transform: translateY(-2px);
}

.admin-launcher__card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.admin-launcher__card small {
  align-items: center;
  color: var(--accent);
  display: flex;
  font-size: 0.78rem;
  font-weight: 700;
  gap: 6px;
  margin-top: auto;
}

@media (max-width: 720px) {
  .admin-launcher__header {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-launcher__summary {
    align-items: flex-start;
    border-left: 0;
    border-top: 2px solid rgba(251, 191, 36, 0.72);
    padding: 12px 0 0;
  }

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

  .admin-launcher__card {
    min-height: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .admin-launcher__card {
    transition: none;
  }

  .admin-launcher__card:hover {
    transform: none;
  }
}

.admin-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 24px;
}

.content-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.content-tab {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
  padding: 8px 12px;
}

.content-tab:hover {
  border-color: rgba(56, 189, 248, 0.45);
  color: var(--text);
  text-decoration: none;
}

.content-tab.is-active {
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.4);
  color: var(--text);
}

.content-accordion {
  display: grid;
  gap: 12px;
}

.content-section {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.content-section summary {
  align-items: center;
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  list-style: none;
  padding: 14px 16px;
}

.content-section summary::-webkit-details-marker {
  display: none;
}

.content-section summary span {
  color: var(--text);
  font-weight: 800;
}

.content-section summary small {
  color: var(--muted);
}

.content-section__fields {
  display: grid;
  gap: 18px;
  padding: 18px;
}

.content-builder {
  background: rgba(17, 28, 49, 0.82);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 18px;
  padding: 20px;
}

.content-builder__form {
  align-items: end;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(140px, 0.8fr) minmax(130px, 0.7fr) minmax(180px, 1fr) minmax(240px, 1.4fr) auto;
}

.content-edit-card {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: grid;
  gap: 12px;
  padding: 16px;
}

.content-edit-card__head {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.content-edit-card code {
  color: var(--muted);
  display: block;
  font-size: 0.76rem;
  margin-top: 4px;
}

.content-editor-guide {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0 0 18px;
}

.content-editor-guide article {
  background: rgba(17, 28, 49, 0.82);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: grid;
  gap: 6px;
  padding: 14px;
}

.content-editor-guide strong {
  color: var(--text);
}

.content-editor-guide span {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.content-editor-guide a {
  font-size: 0.82rem;
  font-weight: 800;
}

.content-toolbar {
  align-items: end;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
}

.content-toolbar__controls {
  align-items: end;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

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

.content-block-meta {
  display: grid;
  gap: 10px;
}

.content-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cms-inline-actions,
.cms-panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.block-preview-panel {
  border-top: 1px solid var(--line);
  margin-top: 8px;
  padding-top: 16px;
}

.block-preview-panel__label {
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  margin: 0 0 12px;
  text-transform: uppercase;
}

.block-live-preview {
  border-radius: var(--radius);
  overflow: hidden;
  pointer-events: none;
}

.admin-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin-field small {
  color: var(--muted);
}

.admin-form textarea.form-input {
  min-height: 120px;
  resize: vertical;
}

.admin-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

@media (max-width: 860px) {
  .site-nav {
    overflow: visible;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-menu {
    display: none;
    position: absolute;
    top: 44px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 2px;
    padding: 10px 12px 12px;
    background: rgba(15, 23, 42, 0.97);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(16px);
    z-index: 100;
  }

  .nav-menu.open {
    display: flex;
  }

  .nav-links--main,
  .nav-links--auth {
    flex: 0 0 auto;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    width: 100%;
  }

  .nav-links--auth {
    border-top: 1px solid var(--line);
    margin-top: 6px;
    padding-top: 6px;
    justify-content: flex-start;
  }

  .nav-user {
    display: none;
  }

  .admin-subnav {
    gap: 6px;
    padding: 8px 10px;
    flex-wrap: wrap;
  }

  .admin-subnav__drop {
    flex: 1 1 140px;
    min-width: 0;
  }

  .admin-subnav__group-btn {
    justify-content: center;
    width: 100%;
  }

  .admin-subnav__menu {
    min-width: min(260px, calc(100vw - 20px));
  }

  .landing {
    padding-top: 48px;
  }

  .landing .cms-block--hero {
    gap: 30px;
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .landing .cms-block--hero .page-title {
    font-size: clamp(2.7rem, 16vw, 4.2rem);
  }

  .landing .cms-hero-scene {
    min-height: 360px;
  }

  .landing .cms-hero-slider,
  .cms-preview__frame .cms-hero-slider,
  .cms-hero-slider__track,
  .cms-hero-slider__slide {
    min-height: 360px;
  }

  .cms-hero-scene__window {
    margin: 0 auto;
    max-width: 320px;
  }

  .cms-hero-scene__rune {
    display: none;
  }

  .footer-inner,
  .content-builder__form,
  .content-meta-grid,
  .cms-admin-grid,
  .cms-form-grid,
  .cms-section-row,
  .cms-section-row__form,
  .cms-item-row {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .cms-sidebar {
    position: static;
  }

  .cms-panel-head,
  .cms-subhead {
    display: grid;
  }

  .footer-top,
  .footer-nav {
    grid-template-columns: 1fr;
  }

  .footer-brand,
  .footer-copy {
    text-align: center;
  }

  .footer-nav {
    justify-items: stretch;
  }

  .footer-link {
    justify-content: center;
  }
}

/* ── Editor page ─────────────────────────────────────────────────── */

.editor-page {
  background: #0d0d0d;
  overflow: hidden;
}

.editor-page .site-nav {
  position: relative;
}

.editor-layout {
  display: flex;
  height: calc(100vh - 58px);
  overflow: hidden;
}

.editor-sidebar {
  background: #111827;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow-y: auto;
  width: 240px;
  flex-shrink: 0;
}

.editor-properties {
  background: #111827;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow-y: auto;
  width: 260px;
  flex-shrink: 0;
}

.editor-sidebar__section {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 14px;
}

.editor-label {
  color: var(--muted);
  display: block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  margin-bottom: 2px;
  text-transform: uppercase;
}

.editor-map-btns,
.editor-tool-btns {
  display: grid;
  gap: 5px;
  grid-template-columns: 1fr 1fr;
}

.editor-map-btn,
.editor-tool-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  padding: 8px 6px;
  text-align: center;
  transition: background 0.1s, border-color 0.1s;
}

.editor-map-btn:hover,
.editor-tool-btn:hover {
  background: rgba(56, 189, 248, 0.1);
  border-color: rgba(56, 189, 248, 0.3);
}

.editor-map-btn.is-active,
.editor-tool-btn.is-active {
  background: rgba(56, 189, 248, 0.16);
  border-color: rgba(56, 189, 248, 0.5);
  color: var(--accent);
}

.editor-palette {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.editor-palette-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.editor-palette-header {
  color: #5a6878;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.editor-object-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  padding: 7px 10px;
  text-align: left;
  transition: background 0.1s, border-color 0.1s;
}

.editor-object-btn:hover {
  background: rgba(255, 186, 92, 0.1);
  border-color: rgba(255, 186, 92, 0.3);
}

.editor-object-btn.is-active {
  background: rgba(255, 186, 92, 0.15);
  border-color: rgba(255, 186, 92, 0.5);
  color: #ffd891;
}

.editor-object-btn:disabled {
  background: rgba(255, 255, 255, 0.02);
  border-color: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.3);
  cursor: not-allowed;
}

.editor-object-btn:disabled:hover {
  background: rgba(255, 255, 255, 0.02);
  border-color: rgba(255, 255, 255, 0.05);
}

.editor-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.editor-field label {
  color: #7a8898;
  font-size: 11px;
}

.editor-input {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  outline: none;
  padding: 8px 10px;
}

.editor-input:focus {
  border-color: var(--accent);
}

.editor-action-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  padding: 9px 10px;
  text-align: left;
  transition: background 0.1s;
}

.editor-action-btn:hover {
  background: rgba(255, 255, 255, 0.09);
}

.editor-action-btn--primary {
  background: rgba(56, 189, 248, 0.14);
  border-color: rgba(56, 189, 248, 0.4);
  color: var(--accent);
}

.editor-action-btn--primary:hover {
  background: rgba(56, 189, 248, 0.22);
}

.editor-action-btn--danger {
  border-color: rgba(248, 113, 113, 0.2);
  color: var(--danger);
}

.editor-action-btn--danger:hover {
  background: rgba(248, 113, 113, 0.08);
}

.editor-textarea {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  color: #7a8898;
  font: inherit;
  font-size: 11px;
  min-height: 72px;
  outline: none;
  padding: 8px;
  resize: vertical;
}

.editor-textarea:focus {
  border-color: var(--accent);
  color: var(--text);
}

.editor-main {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

.editor-toolbar {
  align-items: center;
  background:
    linear-gradient(180deg, rgba(18, 28, 45, 0.98) 0%, rgba(14, 21, 34, 0.98) 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  display: flex;
  flex-shrink: 0;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 54px;
  padding: 8px 12px;
}

.editor-toolbar__group {
  align-items: center;
  display: flex;
  gap: 6px;
  min-width: 0;
}

.editor-toolbar__group--card {
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  min-height: 38px;
  padding: 5px 8px;
}

.editor-toolbar__group--meta {
  margin-left: auto;
}

.editor-toolbar__meta-separator {
  background: rgba(148, 163, 184, 0.28);
  border-radius: 999px;
  display: block;
  height: 18px;
  width: 1px;
}

.editor-canvas-wrap {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  position: relative;
}

.editor-canvas-coords {
  background: rgba(14, 21, 34, 0.82);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 8px;
  bottom: 10px;
  color: #8ea0b8;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  left: 10px;
  min-width: 132px;
  padding: 5px 10px;
  pointer-events: none;
  position: absolute;
  white-space: pre;
}

.editor-toolbar-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 8px;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  min-height: 28px;
  padding: 6px 9px;
  transition: background 0.1s, border-color 0.1s, transform 0.1s;
}

.editor-toolbar-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(125, 211, 252, 0.28);
}

.editor-toolbar-btn:active {
  transform: translateY(1px);
}

.editor-toolbar-label {
  align-items: center;
  color: var(--muted);
  display: flex;
  font-size: 12px;
  gap: 6px;
}

.editor-toolbar-label--section {
  color: #9fb0c9;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  margin-right: 2px;
  text-transform: uppercase;
}

.editor-canvas {
  cursor: crosshair;
  display: block;
  height: 100%;
  image-rendering: pixelated;
  width: 100%;
}

/* ── Terrain palette ──────────────────────────────────────────────── */

.editor-brush-row {
  align-items: center;
  display: flex;
  gap: 10px;
}

.editor-brush-slider {
  -webkit-appearance: none;
  appearance: none;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  cursor: pointer;
  flex: 1;
  height: 6px;
  outline: none;
}

.editor-brush-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  background: var(--accent);
  border-radius: 50%;
  height: 16px;
  width: 16px;
}

.editor-brush-slider::-moz-range-thumb {
  background: var(--accent);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  height: 16px;
  width: 16px;
}

.editor-brush-label {
  color: var(--accent);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  min-width: 42px;
  text-align: right;
}

.editor-terrain-section {
  border-radius: 5px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  margin-top: 6px;
  padding: 5px 8px;
  text-transform: uppercase;
}

.editor-terrain-section:first-child {
  margin-top: 0;
}

.editor-terrain-section--usable {
  background: rgba(74, 222, 128, 0.08);
  border: 1px solid rgba(74, 222, 128, 0.2);
  color: #4ade80;
}

.editor-terrain-section--static {
  background: rgba(148, 163, 184, 0.06);
  border: 1px solid rgba(148, 163, 184, 0.15);
  color: #94a3b8;
}

.editor-terrain-palette {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 340px;
  overflow-y: auto;
  padding-right: 2px;
}

.editor-terrain-palette::-webkit-scrollbar {
  width: 4px;
}

.editor-terrain-palette::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 2px;
}

.editor-terrain-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 4px;
}

.editor-terrain-btn {
  align-items: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 5px;
  color: var(--text);
  cursor: pointer;
  display: flex;
  font: inherit;
  font-size: 11px;
  gap: 7px;
  overflow: hidden;
  padding: 5px 7px;
  text-align: left;
  transition: background 0.1s, border-color 0.1s;
  white-space: nowrap;
}

.editor-terrain-btn:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.18);
}

.editor-terrain-btn.is-active {
  background: rgba(255, 186, 92, 0.14);
  border-color: rgba(255, 186, 92, 0.45);
  color: #ffd891;
}

.editor-terrain-swatch {
  border-radius: 3px;
  flex-shrink: 0;
  height: 14px;
  outline: 1px solid rgba(255, 255, 255, 0.15);
  width: 14px;
}

.editor-terrain-name {
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Object appearance panel ──────────────────────────────────────── */

.editor-vis-divider {
  background: rgba(255, 255, 255, 0.06);
  height: 1px;
  margin: 4px 0 8px;
}

.editor-vis-row {
  align-items: center;
  display: flex;
  gap: 8px;
}

.editor-color-input {
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 5px;
  cursor: pointer;
  flex-shrink: 0;
  height: 28px;
  padding: 2px 3px;
  width: 44px;
}

.editor-color-input::-webkit-color-swatch-wrapper {
  padding: 0;
}

.editor-color-input::-webkit-color-swatch {
  border: none;
  border-radius: 3px;
}

.editor-vis-meta {
  color: var(--accent);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  min-width: 46px;
}

.editor-vis-hint {
  color: #3a4a58;
  font-size: 10px;
}

.editor-own-chip {
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  vertical-align: middle;
}

.editor-own-chip--ownable {
  background: rgba(74, 222, 128, 0.12);
  border: 1px solid rgba(74, 222, 128, 0.3);
  color: #4ade80;
}

.editor-own-chip--buyable {
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.3);
  color: #fbbf24;
}

.editor-own-chip--not_ownable {
  background: rgba(148, 163, 184, 0.1);
  border: 1px solid rgba(148, 163, 184, 0.2);
  color: #94a3b8;
}

/* ── Building panel ───────────────────────────────────────────────── */

.editor-house-btn {
  align-items: center;
  background: rgba(122, 75, 45, 0.08);
  border: 1px solid rgba(122, 75, 45, 0.25);
  border-radius: 6px;
  color: var(--text);
  cursor: pointer;
  display: flex;
  font: inherit;
  font-size: 12px;
  gap: 7px;
  padding: 7px 10px;
  text-align: left;
  transition: background 0.1s, border-color 0.1s;
}

.editor-house-btn:hover {
  background: rgba(168, 65, 39, 0.15);
  border-color: rgba(168, 65, 39, 0.4);
}

.editor-house-btn.is-active {
  background: rgba(168, 65, 39, 0.22);
  border-color: rgba(255, 186, 92, 0.5);
  color: #ffd891;
}

.editor-fence-style-btn {
  background: rgba(91, 53, 31, 0.1);
  border: 1px solid rgba(91, 53, 31, 0.25);
  border-radius: 6px;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  padding: 7px 8px;
  text-align: left;
  transition: background 0.1s, border-color 0.1s;
  width: 100%;
  margin-bottom: 4px;
}

.editor-fence-style-btn:hover {
  background: rgba(91, 53, 31, 0.2);
  border-color: rgba(255, 186, 92, 0.3);
}

.editor-fence-style-btn.is-active {
  background: rgba(91, 53, 31, 0.28);
  border-color: rgba(255, 186, 92, 0.5);
  color: #ffd891;
}

.editor-bld-style-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.editor-bld-style-btn {
  align-items: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 5px;
  color: var(--text);
  cursor: pointer;
  display: flex;
  font: inherit;
  font-size: 11px;
  gap: 8px;
  padding: 6px 8px;
  text-align: left;
  transition: background 0.1s, border-color 0.1s;
}

.editor-bld-style-btn:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.2);
}

.editor-bld-style-btn.is-active {
  background: rgba(255, 186, 92, 0.14);
  border-color: rgba(255, 186, 92, 0.45);
  color: #ffd891;
}

.editor-bld-own-row {
  display: grid;
  gap: 4px;
  grid-template-columns: repeat(3, 1fr);
}

.editor-bld-own-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 5px;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: 10px;
  font-weight: 600;
  padding: 6px 4px;
  text-align: center;
  transition: background 0.1s;
}

.editor-bld-own-btn:hover {
  background: rgba(56, 189, 248, 0.1);
  border-color: rgba(56, 189, 248, 0.3);
}

.editor-bld-own-btn.is-active {
  background: rgba(56, 189, 248, 0.18);
  border-color: rgba(56, 189, 248, 0.55);
  color: var(--accent);
}

.editor-lvl-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 260px;
  overflow-y: auto;
  padding-right: 2px;
}

.editor-lvl-list::-webkit-scrollbar { width: 4px; }
.editor-lvl-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }

.editor-lvl-row {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
}

.editor-lvl-hdr {
  align-items: center;
  display: flex;
  gap: 6px;
}

.editor-lvl-num {
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  flex: 1;
}

.editor-lvl-base {
  color: #3a4a58;
  font-size: 10px;
  font-style: italic;
}

.editor-lvl-del {
  background: rgba(248, 113, 113, 0.12);
  border: 1px solid rgba(248, 113, 113, 0.25);
  border-radius: 4px;
  color: var(--danger);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  padding: 2px 6px;
}

.editor-lvl-label {
  font-size: 11px;
  padding: 5px 8px;
}

.editor-lvl-reqs {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.editor-req-row {
  align-items: center;
  display: flex;
  gap: 6px;
}

.editor-req-icon {
  font-size: 13px;
  min-width: 18px;
  text-align: center;
}

.editor-req-input {
  flex: 1;
  font-size: 11px;
  padding: 4px 6px;
}

/* ── Draft / Live slot panel ──────────────────────────────────────────── */

.editor-slot-header {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.editor-slot-badge {
  border-radius: 4px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  padding: 2px 8px;
}

.slot--draft   { background: rgba(251, 191,  36, 0.14); border: 1px solid rgba(251, 191,  36, 0.4); color: #fbbf24; }
.slot--live    { background: rgba( 74, 222, 128, 0.14); border: 1px solid rgba( 74, 222, 128, 0.4); color: #4ade80; }
.slot--loading { background: rgba(148, 163, 184, 0.08); border: 1px solid rgba(148, 163, 184, 0.2); color: #94a3b8; }
.slot--empty   { background: rgba(148, 163, 184, 0.08); border: 1px solid rgba(148, 163, 184, 0.2); color: #4a5568; }

.editor-slot-panel {
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
}

.editor-slot-panel--draft {
  background: rgba(251, 191, 36, 0.05);
  border: 1px solid rgba(251, 191, 36, 0.15);
}

.editor-slot-panel--live {
  background: rgba(74, 222, 128, 0.04);
  border: 1px solid rgba(74, 222, 128, 0.12);
}

.editor-slot-panel__label {
  color: #5a6878;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-bottom: 2px;
  text-transform: uppercase;
}

.editor-slot-hint {
  color: #3a4a58;
  font-size: 10px;
  margin: 0;
}

.editor-slot-divider-line {
  background: rgba(255, 255, 255, 0.06);
  height: 1px;
  margin: 6px 0;
}

.editor-action-btn--publish {
  background: rgba(74, 222, 128, 0.1);
  border-color: rgba(74, 222, 128, 0.35);
  color: #4ade80;
}

.editor-action-btn--publish:hover {
  background: rgba(74, 222, 128, 0.18);
  border-color: rgba(74, 222, 128, 0.55);
}

/* ── Footer ───────────────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.85rem;
}

.footer-inner {
  display: grid;
  gap: 18px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 24px 24px 18px;
}

.footer-top {
  align-items: start;
  column-gap: 32px;
  display: grid;
  grid-template-columns: minmax(240px, 1.2fr) minmax(0, 1.8fr);
}

.footer-bottom {
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  padding-top: 14px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.footer-brand__eyebrow {
  color: #7dd3fc;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.footer-brand__name {
  font-weight: 700;
  font-size: 1.2rem;
  line-height: 1.1;
}

.footer-brand__tagline {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
  max-width: 28rem;
}

.footer-nav {
  align-content: start;
  display: grid;
  gap: 10px 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  justify-items: stretch;
}

.footer-link {
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 10px;
  color: #c8d4e3;
  display: flex;
  min-height: 40px;
  align-items: center;
  font-size: 0.84rem;
  padding: 0 14px;
  transition: color 0.14s, border-color 0.14s, background 0.14s;
}

.footer-link:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(125, 211, 252, 0.24);
  text-decoration: none;
}

.footer-link--button {
  background: transparent;
  border: 0;
  cursor: pointer;
  font: inherit;
}

.footer-copy {
  color: var(--muted);
  font-size: 0.8rem;
  margin: 0;
  text-align: right;
}

.cookie-consent {
  align-items: center;
  background: #1a2a44;
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-top: 3px solid var(--accent);
  border-radius: 10px;
  bottom: 18px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(0, 0, 0, 0.3);
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr auto;
  left: 50%;
  max-width: min(860px, calc(100vw - 24px));
  padding: 14px 18px;
  position: fixed;
  transform: translateX(-50%);
  width: 100%;
  z-index: 1200;
}

.cookie-consent[hidden] {
  display: none;
}

.cookie-consent__link {
  color: var(--accent);
}
.cookie-consent__link:hover {
  text-decoration: underline;
}

/* ── Manage panel (spans full banner width) ─────────────────────────────── */

.cookie-manage-panel {
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  display: flex;
  flex-direction: column;
  gap: 0;
  grid-column: 1 / -1;
  margin-top: 4px;
  padding-top: 12px;
}

.cookie-manage-panel[hidden] {
  display: none;
}

.cookie-manage-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}

/* ── Cookie category row ────────────────────────────────────────────────── */

.cookie-category {
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding: 10px 0;
}

.cookie-category:first-child {
  border-top: none;
}

.cookie-category__info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cookie-category__info strong {
  color: var(--text);
  font-size: 0.85rem;
}

.cookie-category__info span {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

.cookie-always-on {
  color: var(--success, #4ade80);
  flex-shrink: 0;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

/* ── Toggle switch ──────────────────────────────────────────────────────── */

.cookie-toggle-label {
  cursor: pointer;
  display: inline-block;
  flex-shrink: 0;
  height: 22px;
  position: relative;
  width: 40px;
}

.cookie-toggle-input {
  height: 0;
  opacity: 0;
  position: absolute;
  width: 0;
}

.cookie-toggle-slider {
  background: rgba(148, 163, 184, 0.3);
  border-radius: 22px;
  bottom: 0;
  cursor: pointer;
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
  transition: background 0.2s;
}

.cookie-toggle-slider::before {
  background: #fff;
  border-radius: 50%;
  bottom: 3px;
  content: '';
  height: 16px;
  left: 3px;
  position: absolute;
  transition: transform 0.2s;
  width: 16px;
}

.cookie-toggle-input:checked + .cookie-toggle-slider {
  background: var(--accent, #38bdf8);
}

.cookie-toggle-input:checked + .cookie-toggle-slider::before {
  transform: translateX(18px);
}

.cookie-toggle-input:focus-visible + .cookie-toggle-slider {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ── Shared admin toggle switch (editor pages) ─────────────────────────── */

.gm-toggle-row {
  align-items: center;
  cursor: pointer;
  display: inline-flex;
  gap: 10px;
}

.gm-toggle {
  cursor: pointer;
  display: inline-block;
  flex-shrink: 0;
  height: 22px;
  position: relative;
  width: 40px;
}

.gm-toggle input {
  height: 0;
  opacity: 0;
  position: absolute;
  width: 0;
}

.gm-toggle__slider {
  background: rgba(148, 163, 184, 0.3);
  border-radius: 22px;
  bottom: 0;
  cursor: pointer;
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
  transition: background 0.2s;
}

.gm-toggle__slider::before {
  background: #fff;
  border-radius: 50%;
  bottom: 3px;
  content: '';
  height: 16px;
  left: 3px;
  position: absolute;
  transition: transform 0.2s;
  width: 16px;
}

.gm-toggle input:checked + .gm-toggle__slider {
  background: var(--accent, #38bdf8);
}

.gm-toggle input:checked + .gm-toggle__slider::before {
  transform: translateX(18px);
}

.gm-toggle input:focus-visible + .gm-toggle__slider {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.gm-toggle input:disabled + .gm-toggle__slider {
  cursor: not-allowed;
  opacity: 0.5;
}

.gm-toggle-row__label {
  font-size: 0.85rem;
}

/* ── Privacy page inline settings card ─────────────────────────────────── */

.cookie-settings-card {
  margin-top: 24px;
}

.cookie-settings-card__title {
  color: var(--text);
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 6px;
}

.cookie-settings-card__intro {
  color: var(--muted);
  font-size: 0.88rem;
  margin: 0 0 16px;
}

.cookie-settings-card__status {
  color: var(--success, #4ade80);
  font-size: 0.85rem;
  min-height: 1.4em;
  margin-top: 8px;
}

.cookie-settings-card__actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 16px;
}

.cookie-consent__copy {
  display: grid;
  gap: 4px;
}

.cookie-consent__copy strong {
  color: var(--text);
  font-size: 0.95rem;
}

.cookie-consent__copy p {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.5;
  margin: 0;
}

.cookie-consent__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.cookie-consent__actions .btn--ghost {
  border-color: rgba(148, 163, 184, 0.4);
  color: #cbd5e1;
}

.cookie-consent__actions .btn--ghost:hover {
  border-color: rgba(148, 163, 184, 0.7);
  color: #f1f5f9;
}

@media (max-width: 720px) {
  .cookie-consent {
    bottom: 10px;
    grid-template-columns: 1fr;
    padding: 12px 14px;
  }

  .cookie-consent__actions {
    justify-content: stretch;
  }

  .cookie-consent__actions .btn {
    flex: 1 1 120px;
    text-align: center;
  }
}

/* ── Inner page layout ────────────────────────────────────────────────── */
.inner-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 56px 24px 80px;
}

.page-header {
  margin-bottom: 48px;
  max-width: 680px;
}

.page-header--center {
  max-width: 100%;
  text-align: center;
}

.page-eyebrow {
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  margin: 0 0 12px;
  text-transform: uppercase;
}

.page-title {
  font-size: clamp(1.9rem, 5vw, 3rem);
  letter-spacing: -0.03em;
  line-height: 1.08;
  margin: 0 0 16px;
}

.page-subtitle {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.65;
  margin: 0;
}

/* ── Tag / Badge ─────────────────────────────────────────────────────── */
.tag {
  border-radius: 99px;
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 3px 10px;
  text-transform: uppercase;
}

.tag--blue  { background: rgba(56,189,248,0.14);  color: var(--accent); }
.tag--green { background: rgba(74,222,128,0.14);  color: var(--success); }
.tag--amber { background: rgba(251,191,36,0.14);  color: #fbbf24; }
.tag--red   { background: rgba(248,113,113,0.14); color: var(--danger); }
.tag--muted { background: rgba(148,163,184,0.14); color: var(--muted); }

/* News/Leaderboard/Shop page CSS moved to news.css / leaderboard.css / shop.css */
.admin-page--wide {
  max-width: 1340px;
}

/* ── Admin foundation (shared across admin pages) ───────────────────────── */
.form-hint {
  color: var(--muted);
  font-size: 0.8rem;
  margin-top: 4px;
}

/* "Web shop" badge in NPC column (shared status-badge variant, used across admin) */
.status-badge--blue {
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: #7dd3fc;
}

/* ── Shared public content styling (About/GameGuide/Legal/CMS preview) ─── */
.content-section-public {
  margin-bottom: 56px;
}

.content-section-public h2 {
  font-size: 1.3rem;
  letter-spacing: -0.02em;
  margin: 0 0 14px;
}

.section-intro,
.prose-text {
  color: var(--muted);
  line-height: 1.7;
}

.section-intro {
  font-size: 0.9rem;
  margin: 0 0 20px;
}

.prose-text {
  max-width: 760px;
}

.prose-text p {
  margin: 0 0 14px;
}

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

/* Cms/Index editor CSS moved to admin-cms.css */
.guide-chapter-list {
  display: grid;
  gap: 16px;
  max-width: 860px;
}

.guide-chapter {
  align-items: flex-start;
  background: rgba(17, 28, 49, 0.82);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: flex;
  gap: 16px;
  padding: 20px;
}

.guide-chapter__num {
  align-items: center;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 50%;
  color: var(--accent);
  display: flex;
  flex-shrink: 0;
  font-size: 0.82rem;
  font-weight: 800;
  height: 32px;
  justify-content: center;
  width: 32px;
}

.guide-chapter h2 {
  font-size: 1.05rem;
  margin: 0 0 8px;
}

.guide-chapter p {
  color: var(--muted);
  line-height: 1.65;
  margin: 0;
}

.guide-category-section {
  margin-bottom: 36px;
  scroll-margin-top: 72px;
}

.guide-category-section__title {
  font-size: 1.2rem;
  margin: 0 0 16px;
}

.guide-category-section__header {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 12px;
}

.guide-category-nav__grid,
.guide-category-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.guide-category-nav__grid {
  margin-top: 18px;
}

.guide-category-nav__card,
.guide-category-links__item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
}

.guide-category-nav__card:hover,
.guide-category-links__item:hover {
  border-color: rgba(56, 189, 248, 0.35);
  text-decoration: none;
}

.guide-category-nav__card span,
.guide-category-links__item {
  color: var(--muted);
}

.guide-category-links {
  margin: 0 0 18px;
}

.guide-category-links__item {
  color: var(--muted);
  scroll-margin-top: 72px;
}

/* FAQ CSS moved to contact.css; Forge & Pray modal CSS moved to play.css */

/* -- Admin dropdown ------------------------------------------------------ */
.nav-admin-menu {
  position: relative;
}

.nav-admin-menu > .nav-link--admin {
  align-items: center;
  display: inline-flex;
  gap: 5px;
}

.nav-admin-caret {
  font-size: 0.62rem;
  opacity: 0.65;
  transition: transform 150ms ease;
}

.nav-admin-menu.is-open .nav-admin-caret {
  transform: rotate(180deg);
}

.site-nav.has-admin-menu-open {
  overflow: visible;
}

.admin-subnav {
  background: rgba(10, 18, 34, 0.99);
  border: 1px solid var(--line);
  border-radius: 9px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.5);
  display: none;
  flex-direction: column;
  flex-wrap: nowrap;
  gap: 3px;
  max-height: min(76vh, 620px);
  overflow-y: auto;
  padding: 7px;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: min(300px, calc(100vw - 24px));
  z-index: 300;
}

.nav-admin-menu.is-open > .admin-subnav {
  display: flex;
}

.admin-subnav__drop {
  flex: 0 0 auto;
  min-width: 0;
  position: relative;
  width: 100%;
}

.admin-subnav__group-btn {
  align-items: center;
  background: none;
  border: none;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--muted);
  cursor: pointer;
  display: flex;
  font-size: 0.85rem;
  gap: 5px;
  justify-content: space-between;
  min-height: 38px;
  padding: 8px 10px;
  transition: background 0.14s, border-color 0.14s, color 0.14s;
  width: 100%;
  white-space: nowrap;
}
.admin-subnav__group-btn:hover,
.admin-subnav__group-btn:focus-visible {
  background: rgba(255, 255, 255, 0.055);
  border-color: rgba(148, 163, 184, 0.14);
  color: var(--text);
  outline: none;
}
.admin-subnav__group-btn--active {
  background: rgba(56, 189, 248, 0.08);
  border-color: rgba(56, 189, 248, 0.2);
  color: var(--accent);
}

.admin-subnav__caret {
  font-size: 0.65rem;
  opacity: 0.55;
  transition: transform 0.15s;
}
.admin-subnav__drop.is-open .admin-subnav__caret { transform: rotate(180deg); }

.admin-subnav__menu {
  background: rgba(5, 10, 20, 0.52);
  border: 0;
  border-radius: 6px;
  box-shadow: none;
  display: none;
  flex-direction: column;
  gap: 2px;
  margin: 3px 0 6px;
  min-width: 0;
  padding: 4px;
  position: static;
  width: 100%;
}
.admin-subnav__drop.is-open .admin-subnav__menu { display: flex; }

.admin-subnav__link {
  align-items: center;
  border-radius: 5px;
  color: var(--muted);
  display: flex;
  font-size: 0.85rem;
  gap: 10px;
  justify-content: space-between;
  padding: 8px 12px;
  text-decoration: none;
  transition: background 0.1s, color 0.1s;
  white-space: nowrap;
}
.admin-subnav__link:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  text-decoration: none;
}
.admin-subnav__link--active {
  background: rgba(99, 179, 237, 0.1);
  color: var(--accent);
}

/* A warm little workload pebble for the Patch Manager menu; no spreadsheet required. */
.admin-subnav__count {
  align-items: center;
  background: linear-gradient(135deg, #fcd34d, #f97316);
  border: 1px solid rgba(255, 237, 213, 0.72);
  border-radius: 999px;
  box-shadow: 0 3px 10px rgba(249, 115, 22, 0.28);
  color: #2a1803;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 0.86rem;
  font-weight: 800;
  justify-content: center;
  line-height: 1;
  min-height: 26px;
  min-width: 26px;
  padding: 4px 8px;
}

@media (max-width: 860px) {
  .nav-menu.open {
    max-height: calc(100vh - 44px);
    overflow-x: hidden;
    overflow-y: auto;
  }

  .nav-admin-menu {
    width: 100%;
  }

  .nav-admin-menu > .nav-link--admin {
    box-sizing: border-box;
    justify-content: space-between;
    width: 100%;
  }

  .admin-subnav {
    border-color: rgba(148, 163, 184, 0.14);
    box-shadow: none;
    margin-top: 5px;
    max-height: min(58vh, 480px);
    position: static;
    width: 100%;
  }
}

/* -- Admin table -------------------------------------------------------- */
.admin-table-wrap {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.admin-table-wrap--scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.admin-table--permissions {
  min-width: 880px;
}

.admin-table {
  border-collapse: collapse;
  font-size: 0.875rem;
  width: 100%;
}

.admin-table thead th {
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 10px 14px;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

.admin-table tbody tr {
  border-bottom: 1px solid var(--line);
  transition: background 0.1s;
}
.admin-table tbody tr:last-child { border-bottom: none; }
.admin-table tbody tr:hover { background: rgba(255, 255, 255, 0.03); }
.admin-table tbody tr.admin-table__row--selected { background: rgba(218, 170, 85, 0.08); }

.admin-table td {
  color: #cbd5e1;
  padding: 11px 14px;
  vertical-align: middle;
}

.admin-table td.td--muted { color: var(--muted); font-size: 0.82rem; }
.admin-table td.td--mono  { font-family: ui-monospace, monospace; font-size: 0.82rem; }

/* -- Admin card (for stats sections inside admin pages) ----------------- */
.admin-card {
  background: rgba(17, 28, 49, 0.82);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
}

.admin-card__title {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  margin: 0 0 8px;
  text-transform: uppercase;
}

.admin-card__value {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  margin: 0 0 4px;
}

.admin-card__sub {
  color: var(--muted);
  font-size: 0.8rem;
  margin: 0;
}

.admin-cards-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  margin-bottom: 20px;
}

.admin-card--highlight {
  border-color: var(--gold, #c8a95a);
  background: rgba(200, 169, 90, 0.07);
}
.admin-card--highlight .admin-card__value {
  color: var(--gold, #c8a95a);
}

/* -- Patch review cards -------------------------------------------------- */
.patch-review-grid {
  display: grid;
  gap: 16px;
}

.patch-review-card {
  background:
    linear-gradient(135deg, rgba(17, 28, 49, 0.96), rgba(15, 23, 42, 0.9)),
    radial-gradient(circle at 92% 12%, rgba(200, 169, 90, 0.18), transparent 18rem);
  border: 1px solid rgba(226, 232, 240, 0.13);
  border-radius: 8px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.24);
  display: grid;
  gap: 18px;
  grid-template-columns: 132px minmax(0, 1fr);
  overflow: hidden;
  padding: 16px;
}

.patch-review-card__preview {
  align-items: center;
  align-self: stretch;
  background: rgba(2, 6, 23, 0.42);
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 8px;
  display: flex;
  justify-content: center;
  min-height: 132px;
  overflow: hidden;
}

.patch-review-card__preview img {
  height: 96px;
  image-rendering: pixelated;
  object-fit: contain;
  width: 96px;
}

.patch-review-card__preview-empty {
  align-items: center;
  background: rgba(200, 169, 90, 0.12);
  border: 1px solid rgba(200, 169, 90, 0.28);
  border-radius: 999px;
  color: #f8e6b0;
  display: flex;
  font-size: 2rem;
  font-weight: 900;
  height: 72px;
  justify-content: center;
  width: 72px;
}

.patch-review-card__body {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.patch-review-card__head {
  align-items: flex-start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  min-width: 0;
}

.patch-review-card__head h3 {
  color: var(--fg);
  font-size: 1.12rem;
  line-height: 1.25;
  margin: 6px 0 0;
  overflow-wrap: anywhere;
}

.patch-review-card__meta,
.patch-review-card__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.patch-review-card__meta span,
.patch-review-card__facts span {
  background: rgba(148, 163, 184, 0.09);
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.2;
  padding: 5px 9px;
}

.patch-review-card__meta span:first-child {
  color: #f8e6b0;
}

.patch-review-card__summary,
.patch-review-card__note {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
  margin: 0;
  overflow-wrap: anywhere;
}

.patch-review-card__note {
  background: rgba(15, 23, 42, 0.58);
  border-left: 3px solid rgba(200, 169, 90, 0.65);
  border-radius: 6px;
  padding: 10px 12px;
}

.patch-review-card__actions {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.patch-review-action {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.patch-review-action .form-input {
  min-width: 0;
}

.patch-review-admin-note {
  border-left: 3px solid var(--forge-gold, #fbbf24);
  color: #fde68a;
  font-size: 0.88rem;
  margin: 12px 0 0;
  max-width: 780px;
  padding: 6px 10px;
}

.patch-review-action--live {
  background: rgba(249, 115, 22, 0.07);
  border: 1px solid rgba(249, 115, 22, 0.28);
  border-radius: 8px;
  grid-column: 1 / -1;
  padding: 9px;
}

.patch-review-card__open {
  flex: 0 0 auto;
}

@media (max-width: 920px) {
  .patch-review-card {
    grid-template-columns: 104px minmax(0, 1fr);
  }

  .patch-review-card__preview {
    min-height: 104px;
  }

  .patch-review-card__preview img {
    height: 76px;
    width: 76px;
  }

  .patch-review-card__actions {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .patch-review-card {
    grid-template-columns: 1fr;
  }

  .patch-review-card__preview {
    min-height: 116px;
  }

  .patch-review-card__head {
    display: grid;
  }

  .patch-review-action {
    grid-template-columns: 1fr;
  }

  .patch-review-action .btn,
  .patch-review-card__open {
    width: 100%;
  }
}

/* ── Map distribution bar chart ─────────────────────────── */
.admin-map-dist {
  margin-top: 4px;
  margin-bottom: 8px;
}
.admin-map-dist__label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 10px;
}
.admin-map-dist__bars {
  display: grid;
  gap: 8px;
}
.admin-map-bar {
  display: grid;
  grid-template-columns: 110px 1fr 36px;
  align-items: center;
  gap: 10px;
}
.admin-map-bar__name {
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: capitalize;
  white-space: nowrap;
}
.admin-map-bar__track {
  height: 8px;
  background: rgba(255,255,255,0.08);
  border-radius: 4px;
  overflow: hidden;
}
.admin-map-bar__fill {
  height: 100%;
  background: var(--gold, #c8a95a);
  border-radius: 4px;
  transition: width 0.4s ease;
  min-width: 4px;
}
.admin-map-bar__count {
  font-size: 0.8rem;
  color: var(--muted);
  text-align: right;
}

/* -- Admin section header ----------------------------------------------- */
.admin-section {
  margin-bottom: 36px;
}

.admin-section__title {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 14px;
}

/* -- Admin search bar --------------------------------------------------- */
.admin-search {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
}

.admin-search__input {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  flex: 1;
  font: inherit;
  max-width: 360px;
  outline: none;
  padding: 9px 12px;
}
.admin-search__input:focus { border-color: var(--accent); }

/* -- Admin form (shared between Content and News edit) ------------------ */
.admin-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 820px;
}

.admin-form--wide {
  max-width: none;
}

.admin-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.admin-field small {
  color: var(--muted);
  font-size: 0.8rem;
}

.admin-form-actions {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

/* -- Segmented control (modern toggle for status/visibility pickers) ---- */
.admin-segmented {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  padding: 4px;
}

.admin-segmented--wrap {
  border-radius: 14px;
}

.admin-segmented__option {
  cursor: pointer;
  flex: 1 1 auto;
}

.admin-segmented__option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.admin-segmented__option span {
  display: block;
  text-align: center;
  padding: 8px 16px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 650;
  white-space: nowrap;
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.admin-segmented__option input:checked + span {
  background: linear-gradient(135deg, #fbbf24, #f97316);
  box-shadow: 0 8px 20px rgba(249, 115, 22, 0.28);
  color: #241207;
}

.admin-segmented__option input:focus-visible + span {
  outline: 2px solid rgba(56, 189, 248, 0.6);
  outline-offset: 2px;
}

.admin-segmented__option:hover input:not(:checked) + span {
  background: rgba(255, 255, 255, 0.06);
  color: #e2e8f0;
}

.admin-db-snapshot {
  max-height: 280px;
  overflow: auto;
  margin: 0;
  padding: 0.75rem;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px;
  background: rgba(0,0,0,0.24);
  color: rgba(255,255,255,0.76);
  font-size: 0.74rem;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* -- Statistics page restyled ------------------------------------------- */
.stats-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  margin-bottom: 28px;
}

.stats-filter {
  margin-bottom: 24px;
}

.stats-charts-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(2, 1fr);
  margin-bottom: 24px;
}

@media (max-width: 740px) {
  .stats-charts-grid { grid-template-columns: 1fr; }
}

.chart-card {
  background: rgba(17, 28, 49, 0.82);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  padding: 18px 20px 14px;
}

.chart-card__title {
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 2px;
}

.chart-card__sub {
  color: var(--muted);
  font-size: 0.75rem;
  margin: 0 0 14px;
}

.chart-canvas-wrap {
  flex: 1;
  min-height: 0;
  position: relative;
  height: 220px;
}

.chart-canvas {
  display: block;
  height: 100%;
  width: 100%;
}

.chart-empty {
  color: var(--muted);
  font-size: 0.85rem;
  margin: 12px 0 0;
  text-align: center;
}

/* -- Player avatar initial ---------------------------------------------- */
.player-avatar {
  align-items: center;
  background: rgba(56, 189, 248, 0.14);
  border-radius: 50%;
  color: var(--accent);
  display: inline-flex;
  font-size: 0.78rem;
  font-weight: 700;
  height: 30px;
  justify-content: center;
  width: 30px;
  flex-shrink: 0;
}

.player-cell {
  align-items: center;
  display: flex;
  gap: 10px;
  min-width: 0;
  max-width: 260px;
}

.player-cell > div {
  min-width: 0;
}

.player-cell__name {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-cell__email {
  color: var(--muted);
  font-size: 0.8rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* -- News admin status badges ------------------------------------------- */
.status-badge {
  border-radius: 99px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 2px 9px;
  text-transform: uppercase;
}
.status-badge--pub  { background: rgba(74,222,128,0.14); color: var(--success); }
.status-badge--draft { background: rgba(148,163,184,0.14); color: var(--muted); }
.status-badge--published { background: rgba(74,222,128,0.14); color: var(--success); }
.status-badge--archived { background: rgba(248,113,113,0.12); color: var(--danger); }

/* -- Inline action buttons ---------------------------------------------- */
.action-btns { display: flex; gap: 6px; }

.action-btn {
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 0.78rem;
  padding: 4px 10px;
  text-decoration: none;
  transition: border-color 0.14s, color 0.14s;
  background: transparent;
}
.action-btn:hover { border-color: rgba(255,255,255,0.3); color: var(--text); text-decoration: none; }
.action-btn--danger { color: var(--danger); border-color: rgba(248,113,113,0.3); }
.action-btn--danger:hover { background: rgba(248,113,113,0.08); border-color: var(--danger); color: var(--danger); }
.action-btn--live { color: #fdba74; border-color: rgba(249,115,22,0.42); }
.action-btn--live:hover { background: rgba(249,115,22,0.1); border-color: #f97316; color: #fed7aa; }

.admin-form-actions--live {
  border-top: 1px solid rgba(249, 115, 22, 0.28);
  margin-top: 10px;
  padding-top: 12px;
}
.action-btn--disabled,
.action-btn--disabled:hover {
  pointer-events: none;
  opacity: 0.45;
  color: var(--muted);
  border-color: rgba(255,255,255,0.08);
  background: transparent;
}

.player-admin-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 18px;
  align-items: start;
  min-width: 0;
}

.player-admin-layout .admin-table-wrap {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}

.player-admin-layout .admin-table {
  min-width: 820px;
}

.player-detail-panel {
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  background: rgba(255,255,255,0.03);
  min-width: 0;
  overflow: hidden;
  padding: 18px;
}

.player-detail-empty { color: var(--muted); }

.player-detail-empty h2,
.player-detail-head h2 {
  margin: 0;
  font-size: 1.15rem;
}

.player-detail-head {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  padding-bottom: 14px;
  margin-bottom: 14px;
  min-width: 0;
}

.player-detail-head > div {
  min-width: 0;
}

.player-detail-head p {
  margin: 4px 0 0;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.player-detail-kv {
  display: grid;
  gap: 8px;
  margin: 0;
}

.player-detail-kv div,
.player-data-counts div,
.player-resource-list div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: baseline;
  min-width: 0;
}

.player-detail-kv dt,
.player-data-counts span,
.player-resource-list span {
  color: var(--muted);
  font-size: 0.82rem;
}

.player-detail-kv dd {
  margin: 0;
  min-width: 0;
  text-align: right;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.player-detail-section { margin-top: 18px; }

.player-detail-section h3 {
  font-size: 0.95rem;
  margin: 0 0 10px;
}

.player-data-counts,
.player-resource-list {
  display: grid;
  gap: 6px;
}

.player-danger-zone {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(248,113,113,0.18);
}

.admin-pagination {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  color: var(--muted);
}

@media (max-width: 1080px) {
  .player-admin-layout { grid-template-columns: minmax(0, 1fr); }
}

/* -- btn--danger (main button system) ----------------------------------- */
.btn--danger {
  background: rgba(248, 113, 113, 0.12);
  border: 1px solid rgba(248, 113, 113, 0.35);
  color: var(--danger);
}
.btn--danger:hover {
  background: rgba(248, 113, 113, 0.2);
  border-color: var(--danger);
  color: var(--danger);
}

/* -- admin-table muted row ---------------------------------------------- */
.admin-table__row--muted td { opacity: 0.45; }

/* -- admin-cards-grid spacing variant ----------------------------------- */
.admin-cards-grid--spaced { margin-bottom: 24px; }

/* -- admin-card value truncation ---------------------------------------- */
.admin-card__value--truncate {
  font-size: 1.15rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* -- editor slot tabs --------------------------------------------------- */
.editor-slot-tabs {
  display: grid;
  gap: 5px;
  grid-template-columns: 1fr 1fr;
  margin-bottom: 8px;
}

.editor-slot-tab {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 7px 6px;
  text-align: center;
  transition: background 0.1s, color 0.1s, border-color 0.1s;
}
.editor-slot-tab:hover {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
}
.editor-slot-tab--draft.is-active {
  background: rgba(251, 191, 36, 0.1);
  border-color: rgba(251, 191, 36, 0.4);
  color: #fbbf24;
}
.editor-slot-tab--live.is-active {
  background: rgba(74, 222, 128, 0.1);
  border-color: rgba(74, 222, 128, 0.4);
  color: #4ade80;
}

/* -- Stats filter form -------------------------------------------------- */
.stats-filter__form {
  align-items: center;
  display: flex;
  gap: 10px;
}
.stats-filter__label {
  color: var(--muted);
  font-size: 0.9rem;
  white-space: nowrap;
}
.stats-filter__select { padding: 8px 12px; width: auto; }

/* -- Item Designer sidebar actions -------------------------------------- */
.imd-side-actions {
  border-top: 1px solid var(--line);
  margin-top: 20px;
  padding-top: 16px;
}
.imd-side-btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}
.imd-import { display: flex; flex-direction: column; gap: 8px; }
.imd-import-row { align-items: center; display: flex; gap: 10px; }

.forge-live-quests {
  display: grid;
  gap: 0.45rem;
  margin-bottom: 0.55rem;
}

.forge-live-quest {
  border: 1px solid rgba(226, 232, 240, 0.14);
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.72);
  padding: 0.55rem 0.65rem;
}

.forge-live-quest strong,
.forge-live-quest span {
  display: block;
}

.forge-live-quest span {
  color: rgba(226, 232, 240, 0.72);
  font-size: 0.82rem;
  margin-top: 0.18rem;
}

.forge-live-quest ul {
  margin: 0.45rem 0 0;
  padding-left: 1rem;
}

.forge-live-quest li {
  font-size: 0.82rem;
  color: rgba(226, 232, 240, 0.82);
}

.forge-live-quest__accept {
  margin-top: 0.45rem;
  border: 1px solid rgba(96, 165, 250, 0.45);
  border-radius: 4px;
  background: rgba(96, 165, 250, 0.18);
  color: #e7edf8;
  padding: 0.32rem 0.5rem;
  cursor: pointer;
}

/* ═══════════════════════════════════════════════════════════════
   PAGE BACKGROUND IMAGE
   ═══════════════════════════════════════════════════════════════ */
body.has-page-bg::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: var(--page-bg);
  background-size: cover;
  background-position: center;
  opacity: 0.12;
  pointer-events: none;
  z-index: -1;
}

/* ═══════════════════════════════════════════════════════════════
   ADMIN — BG IMAGE PANEL
   ═══════════════════════════════════════════════════════════════ */
.page-bg-editor {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 16px;
  background: rgba(255,255,255,0.025);
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-bottom: 20px;
}
.page-bg-preview {
  height: 120px;
  border-radius: 8px;
  background-size: cover;
  background-position: center;
  border: 1px solid var(--line);
  display: flex;
  align-items: flex-end;
  padding: 10px 14px;
}
.page-bg-label {
  font-size: 0.78rem;
  color: #fff;
  background: rgba(0,0,0,0.55);
  padding: 3px 8px;
  border-radius: 4px;
  word-break: break-all;
}
.cms-bg-upload-form { display: flex; flex-direction: column; gap: 10px; }
.cms-bg-upload-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.cms-bg-upload-row input[type="file"] { flex: 1; min-width: 200px; }

/* -- Game Guide Designer ----------------------------------------------- */
.guide-admin-toolbar {
    margin-bottom: 18px;
}

.guide-admin-category-title {
    margin: 28px 0 12px;
}

.guide-admin-category-title:first-of-type {
    margin-top: 0;
}

.guide-chapter--admin summary {
    flex-wrap: wrap;
}

.guide-chapter__title-text {
    flex: 1 1 200px;
    min-width: 0;
}

.guide-chapter__admin-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.guide-chapter__admin-actions .action-btn {
    padding: 4px 8px;
    font-size: 0.72rem;
}

.guide-chapter__order {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--muted);
    font-size: 0.78rem;
}

.guide-chapter__order input {
    width: 60px;
    padding: 4px 6px;
}

.guide-edit-dialog {
    width: min(680px, 92vw);
    max-height: 88vh;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0;
    background: var(--surface);
    color: var(--text);
}

.guide-edit-dialog::backdrop {
    background: rgba(4, 8, 14, 0.72);
}

.guide-edit-dialog .admin-form {
    padding: 20px;
    max-height: 88vh;
    overflow-y: auto;
}

.permission-grid {
    display: grid;
    gap: 10px;
}

.permission-groups {
    display: grid;
    gap: 10px;
    min-width: min(100%, 620px);
}

.permission-group-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 10px;
    padding: 10px;
}

.permission-group-card__head {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.permission-group-card__head strong {
    display: block;
    color: var(--text);
    font-size: 0.88rem;
}

.permission-group-card__head p {
    color: var(--muted);
    font-size: 0.78rem;
    line-height: 1.35;
    margin: 4px 0 0;
}

.permission-grid--tree {
    grid-template-columns: repeat(auto-fit, minmax(172px, 1fr));
    gap: 7px;
    max-width: 100%;
}

.permission-toggle {
    margin: 0;
}

.admin-muted {
    color: var(--muted);
    font-size: 0.95rem;
    max-width: 72ch;
}

.permission-pill {
    align-items: center;
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
    color: var(--muted);
    display: flex;
    gap: 8px;
    min-height: 30px;
    padding: 5px 8px;
    text-align: left;
    font: inherit;
    font-size: 0.76rem;
    cursor: pointer;
    transition: border-color 0.12s ease, background 0.12s ease, color 0.12s ease, transform 0.12s ease;
}

.permission-pill:hover {
    border-color: rgba(125, 211, 252, 0.28);
    background: rgba(255, 255, 255, 0.05);
}

.permission-pill:active {
    transform: translateY(1px);
}

.permission-pill__check {
    align-items: center;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 999px;
    color: transparent;
    display: inline-flex;
    flex: 0 0 26px;
    font-size: 0.58rem;
    height: 17px;
    justify-content: center;
    letter-spacing: 0;
    width: 26px;
}

.permission-pill__label {
    flex: 1 1 auto;
    min-width: 0;
}

.permission-pill__label small {
    color: var(--muted);
    display: block;
    font-size: 0.66rem;
    line-height: 1.1;
    margin-top: 1px;
}

.permission-pill__label strong {
    color: inherit;
    font-size: 0.78rem;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.permission-pill--on {
    border-color: var(--accent);
    background: color-mix(in srgb, var(--accent) 18%, transparent);
    color: var(--text);
}

.permission-pill--on .permission-pill__check {
    background: var(--accent);
    border-color: var(--accent);
    color: #06111f;
    font-weight: 900;
}

.permission-pill--inherited {
    border-color: rgba(125, 211, 252, 0.22);
    background: rgba(125, 211, 252, 0.08);
    color: var(--text);
}

.permission-pill--inherited .permission-pill__check {
    background: rgba(125, 211, 252, 0.16);
    border-color: rgba(125, 211, 252, 0.28);
    color: var(--accent);
    font-weight: 800;
}

.permission-node {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 6px;
}

.permission-node--child {
    padding-left: 10px;
    position: relative;
}

.permission-node--child::before {
    content: "";
    position: absolute;
    left: 2px;
    top: 6px;
    bottom: 6px;
    width: 2px;
    border-radius: 999px;
    background: rgba(125, 211, 252, 0.18);
}

.permission-help {
    align-items: center;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 999px;
    color: var(--muted);
    cursor: help;
    display: inline-flex;
    font-size: 0.72rem;
    font-weight: 700;
    height: 18px;
    justify-content: center;
    position: relative;
    width: 18px;
}

.permission-help::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 50%;
    bottom: calc(100% + 8px);
    transform: translateX(-50%);
    background: #081018;
    border: 1px solid rgba(125, 211, 252, 0.18);
    border-radius: 10px;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.28);
    color: var(--text);
    font-size: 0.72rem;
    line-height: 1.4;
    opacity: 0;
    padding: 10px 12px;
    pointer-events: none;
    width: min(260px, 45vw);
    z-index: 25;
}

.permission-help:hover::after,
.permission-help:focus-visible::after {
    opacity: 1;
}

.guide-chapter-list--expandable {
    gap: 12px;
}

.guide-chapter--expandable {
    display: block;
    padding: 0;
    scroll-margin-top: 72px;
}

.guide-chapter--expandable summary {
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    padding: 18px;
    list-style: none;
}

.guide-chapter--expandable summary::-webkit-details-marker {
    display: none;
}

.guide-chapter--expandable summary::after {
    content: "+";
    margin-left: auto;
    color: var(--muted);
    font-size: 1.3rem;
}

.guide-chapter--expandable[open] summary::after {
    content: "-";
}

.guide-chapter__body {
    padding: 0 18px 18px 72px;
}

.guide-chapter__body img {
    display: block;
    height: auto;
    max-width: min(100%, 720px);
    border-radius: 8px;
    border: 1px solid var(--border);
    margin: 0 0 14px;
}

.cms-element--media img {
  display: block;
  height: auto;
  max-width: 100%;
}

.guide-category-section .guide-chapter__body {
    padding-left: 18px;
}

.guide-chapter__body--bg {
    background-size: cover;
    background-position: center;
    border-radius: 8px;
    padding: 16px !important;
    position: relative;
}

.guide-chapter__body--bg::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 8px;
    background: linear-gradient(180deg, rgba(8, 14, 24, 0.25) 0%, rgba(8, 14, 24, 0.6) 35%, rgba(8, 14, 24, 0.96) 100%);
    pointer-events: none;
}

.guide-chapter__body--bg p {
    position: relative;
    z-index: 1;
    color: rgba(226, 232, 240, 0.9);
}

@media (max-width: 860px) {
.guide-chapter__body {
    padding-left: 18px;
}
}

/* -- CMS block styling for styled-text + timer --
   Keeps the element canvas clear while allowing full-width, intentional editor controls.
*/
.cms-element--styled-text {
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 14px;
  padding: 16px;
  margin: 0 0 16px;
  background: rgba(17, 24, 39, 0.82);
}

.cms-styled-text__text {
  cursor: text;
  margin: 0;
}

[contenteditable].cms-styled-text__text:focus {
  outline: none;
}

.cms-styled-text__items {
  display: grid;
  gap: 12px;
}

.cms-styled-text__items--stacked {
  grid-template-columns: 1fr;
}

.cms-styled-text__items--side-by-side {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.cms-styled-text__item {
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 12px;
  padding: 10px 12px;
  background: rgba(15, 23, 42, 0.4);
}

.cms-styled-text__item-title {
  margin: 0 0 6px;
  font-size: 1rem;
  color: #fde68a;
}

.cms-styled-text__item-text {
  margin: 0;
  color: var(--muted);
}

.cms-styled-text--xs .cms-styled-text__subtitle,
.cms-styled-text--xs .cms-styled-text__text,
.cms-styled-text--xs .prose-text {
  font-size: 0.9rem;
}

.cms-styled-text--sm .cms-styled-text__subtitle,
.cms-styled-text--sm .cms-styled-text__text,
.cms-styled-text--sm .prose-text {
  font-size: 1rem;
}

.cms-styled-text--md .cms-styled-text__subtitle,
.cms-styled-text--md .cms-styled-text__text,
.cms-styled-text--md .prose-text,
.cms-styled-text--md .cms-styled-text__item-text {
  font-size: 1.06rem;
}

.cms-styled-text--lg .cms-styled-text__subtitle,
.cms-styled-text--lg .cms-styled-text__text,
.cms-styled-text--lg .prose-text,
.cms-styled-text--lg .cms-styled-text__item-text {
  font-size: 1.18rem;
}

.cms-styled-text--xl .cms-styled-text__subtitle,
.cms-styled-text--xl .cms-styled-text__text,
.cms-styled-text--xl .prose-text,
.cms-styled-text--xl .cms-styled-text__item-text {
  font-size: 1.28rem;
}

.cms-styled-text--2xl .cms-styled-text__subtitle,
.cms-styled-text--2xl .cms-styled-text__text,
.cms-styled-text--2xl .prose-text,
.cms-styled-text--2xl .cms-styled-text__item-text {
  font-size: 1.42rem;
}

.cms-styled-text--bold {
  font-weight: 700;
}

.cms-styled-text--underline {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cms-styled-text--cursive {
  font-family: "Trebuchet MS", "Comic Sans MS", cursive;
}

.cms-styled-text--spacing-sm { padding: 8px; }
.cms-styled-text--spacing-md { padding: 16px; }
.cms-styled-text--spacing-lg { padding: 24px; }
.cms-styled-text--radius-sm { border-radius: 4px; }
.cms-styled-text--radius-md { border-radius: 8px; }
.cms-styled-text--radius-lg { border-radius: 16px; }
.cms-styled-text--radius-pill { border-radius: 999px; }
.cms-styled-text--line-compact { line-height: 1.25; }
.cms-styled-text--line-normal { line-height: 1.5; }
.cms-styled-text--line-relaxed { line-height: 1.8; }

/* CMS feature library: collection elements and restrained motion primitives. */
.cms-feature { min-width: 0; }
.cms-feature > h2 { margin: 0 0 18px; }
.cms-stats { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.cms-stats article { background: rgba(17,28,49,.82); border: 1px solid rgba(148,163,184,.18); border-radius: 8px; padding: 20px; }
.cms-stats strong { color: #fde68a; display: block; font-size: 2rem; }
.cms-stats span { color: var(--muted); font-size: .86rem; }
.cms-gallery { display: grid; gap: 14px; grid-template-columns: repeat(3, minmax(0,1fr)); }
.cms-gallery a { aspect-ratio: 4/3; border: 1px solid rgba(148,163,184,.22); border-radius: 8px; color: white; overflow: hidden; position: relative; }
.cms-gallery img { height: 100%; object-fit: cover; transition: transform .4s ease; width: 100%; }
.cms-gallery a:hover img { transform: scale(1.06); }
.cms-gallery span { background: linear-gradient(transparent,rgba(2,6,23,.9)); bottom: 0; left: 0; padding: 28px 12px 10px; position: absolute; right: 0; }
.cms-gallery.el--masonry a:nth-child(2n) { aspect-ratio: 4/5; }
.cms-feature--leaderboard ol { background: rgba(17,28,49,.82); border: 1px solid rgba(148,163,184,.22); border-radius: 8px; list-style: none; margin: 0; overflow: hidden; padding: 0; }
.cms-feature--leaderboard li { align-items: center; border-top: 1px solid rgba(148,163,184,.12); display: grid; gap: 14px; grid-template-columns: 36px 1fr auto auto; padding: 13px 18px; }
.cms-rank { background: rgba(251,191,36,.14); border-radius: 50%; color: #fde68a; display: grid; height: 34px; place-items: center; width: 34px; }
.cms-feature--leaderboard small { color: var(--muted); }
.cms-feature--leaderboard b { color: #fde68a; }
.cms-feature--faq { display: grid; gap: 10px; }
.cms-feature--faq details { background: rgba(17,28,49,.82); border: 1px solid rgba(148,163,184,.22); border-radius: 8px; overflow: hidden; }
.cms-feature--faq summary { cursor: pointer; font-weight: 700; padding: 16px 18px; }
.cms-feature--faq details div { color: var(--muted); line-height: 1.6; padding: 0 18px 18px; }
.cms-feature--progress { background: rgba(17,28,49,.82); border: 1px solid rgba(148,163,184,.22); border-radius: 8px; padding: 22px; }
.cms-progress + .cms-progress { margin-top: 16px; }
.cms-progress label { display: flex; font-size: .86rem; justify-content: space-between; margin-bottom: 6px; }
.cms-progress > div { background: rgba(148,163,184,.14); border-radius: 999px; height: 10px; overflow: hidden; }
.cms-progress i { animation: cmsFeatureShimmer 2.6s linear infinite; background: linear-gradient(90deg,#7c2d12,#fbbf24,#38bdf8,#fbbf24,#7c2d12); background-size: 320px 100%; border-radius: inherit; display: block; height: 100%; }
.cms-slider { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.cms-slider article { background: rgba(17,28,49,.82); border: 1px solid rgba(148,163,184,.22); border-radius: 8px; flex: 0 0 min(520px,90%); overflow: hidden; scroll-snap-align: start; }
.cms-slider img { aspect-ratio: 16/7; object-fit: cover; width: 100%; }
.cms-slider article > div { padding: 22px; }
.cms-slider h3,.cms-slider p { margin: 0; }
.cms-slider p { color: var(--muted); margin-top: 8px; }
.cms-promo { align-items: center; background: linear-gradient(120deg,#24130b,#3b1d0d 45%,#0d1729); border: 1px solid rgba(251,191,36,.25); border-radius: 8px; display: flex; gap: 24px; justify-content: space-between; padding: 28px 32px; }
.cms-promo span { color: #fbbf24; font-size: .75rem; font-weight: 800; text-transform: uppercase; }
.cms-promo h2,.cms-promo p,.cms-promo__text { margin: 6px 0 0; }
.cms-promo p,.cms-promo__text { color: #cbd5e1; }
.cms-promo__text p { margin: 0; }
.cms-promo__text p + p { margin-top: 0.5em; }
.cms-element--divider.el--ember { background: rgba(148,163,184,.22); height: 2px; overflow: hidden; position: relative; }
.cms-element--divider.el--ember i { animation: cmsEmberTrail 3.5s linear infinite; animation-delay: calc(var(--spark) * -.58s); background: #fbbf24; border-radius: 50%; box-shadow: 0 0 14px #f97316; height: 7px; left: -10px; position: absolute; top: -3px; width: 7px; }
.cms-animate--reveal { animation: cmsFeatureReveal .6s ease both; }
.cms-animate--slide-up { animation: cmsFeatureSlideUp .65s cubic-bezier(.2,.8,.2,1) both; }
.cms-animate--pulse { animation: cmsFeaturePulse 2.4s ease-in-out infinite; }
.cms-animate--shimmer { background-image: linear-gradient(110deg,transparent 30%,rgba(255,255,255,.07) 48%,transparent 66%); background-size: 240% 100%; animation: cmsFeatureShimmer 3s linear infinite; }
.cms-animate--stagger > * { animation: cmsFeatureSlideUp .55s ease both; }
.cms-animate--stagger > *:nth-child(2) { animation-delay: .1s; }
.cms-animate--stagger > *:nth-child(3) { animation-delay: .2s; }
.cms-animate--stagger > *:nth-child(4) { animation-delay: .3s; }
@keyframes cmsFeatureReveal { from { opacity: 0; } to { opacity: 1; } }
@keyframes cmsFeatureSlideUp { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: translateY(0); } }
@keyframes cmsFeaturePulse { 50% { box-shadow: 0 0 32px rgba(251,191,36,.18); } }
@keyframes cmsFeatureShimmer { to { background-position: 320px 0; } }
@keyframes cmsEmberTrail { to { left: calc(100% + 10px); } }
@media (prefers-reduced-motion: reduce) { .cms-feature,.cms-feature * { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; } }
@media (max-width: 720px) { .cms-gallery { grid-template-columns: 1fr; } .cms-feature--leaderboard li { grid-template-columns: 34px 1fr auto; } .cms-feature--leaderboard small { display: none; } .cms-promo { align-items: flex-start; flex-direction: column; padding: 22px; } }

@media (max-width: 720px) {
  .inspector-style-options,
  .inspector-color-grid {
    grid-template-columns: 1fr;
  }
}

.cms-element--styled-text.el--plain { color: var(--text); }
.cms-element--styled-text.el--plain .cms-styled-text__item-title,
.cms-element--styled-text.el--plain .cms-styled-text__item-text { color: var(--text); }

.cms-element--styled-text.el--warm {
  color: #fde68a;
  border-color: rgba(253, 230, 138, 0.33);
}
.cms-element--styled-text.el--warm .cms-styled-text__item-title,
.cms-element--styled-text.el--warm .cms-styled-text__item-text { color: #fde68a; }

.cms-element--styled-text.el--cool {
  color: #a7f3d0;
  border-color: rgba(134, 239, 172, 0.3);
}
.cms-element--styled-text.el--cool .cms-styled-text__item-title,
.cms-element--styled-text.el--cool .cms-styled-text__item-text { color: #c2f6f6; }

.cms-element--styled-text.el--forest {
  color: #86efac;
  border-color: rgba(74, 222, 128, 0.34);
}
.cms-element--styled-text.el--forest .cms-styled-text__item-title,
.cms-element--styled-text.el--forest .cms-styled-text__item-text { color: #86efac; }

.cms-element--styled-text.el--violet {
  color: #ddd6fe;
  border-color: rgba(196, 181, 253, 0.34);
}
.cms-element--styled-text.el--violet .cms-styled-text__item-title,
.cms-element--styled-text.el--violet .cms-styled-text__item-text { color: #e9ddff; }

.cms-element--styled-text.el--sunset {
  color: #fdba74;
  border-color: rgba(251, 146, 60, 0.28);
}
.cms-element--styled-text.el--sunset .cms-styled-text__item-title,
.cms-element--styled-text.el--sunset .cms-styled-text__item-text { color: #fdba74; }

.cms-element--styled-text.el--aqua {
  color: #67e8f9;
  border-color: rgba(103, 232, 249, 0.3);
}
.cms-element--styled-text.el--aqua .cms-styled-text__item-title,
.cms-element--styled-text.el--aqua .cms-styled-text__item-text { color: #cffafe; }

.cms-element--styled-text.el--ember-ruby {
  color: #fecdd3;
  border-color: rgba(253, 164, 175, 0.35);
  background:
    linear-gradient(120deg, rgba(244, 63, 94, 0.24), rgba(236, 72, 153, 0.18));
}
.cms-element--styled-text.el--ember-ruby .cms-styled-text__item-title,
.cms-element--styled-text.el--ember-ruby .cms-styled-text__item-text { color: #ffe4e6; }

.cms-element--styled-text.el--ocean-ice {
  color: #bae6fd;
  border-color: rgba(103, 232, 249, 0.32);
  background:
    radial-gradient(circle at top left, rgba(56, 189, 248, 0.23), rgba(14, 165, 233, 0.1));
}
.cms-element--styled-text.el--ocean-ice .cms-styled-text__item-title,
.cms-element--styled-text.el--ocean-ice .cms-styled-text__item-text { color: #dbeafe; }

.cms-element--styled-text.el--aurora-mix {
  color: #99f6e4;
  border-color: rgba(52, 211, 153, 0.3);
  background:
    linear-gradient(135deg, rgba(45, 212, 191, 0.2), rgba(96, 165, 250, 0.2), rgba(167, 139, 250, 0.18));
}
.cms-element--styled-text.el--aurora-mix .cms-styled-text__item-title,
.cms-element--styled-text.el--aurora-mix .cms-styled-text__item-text { color: #d6f5ee; }

.cms-element--styled-text.el--twilight {
  color: #c7d2fe;
  border-color: rgba(129, 140, 248, 0.3);
  background:
    linear-gradient(90deg, rgba(71, 85, 105, 0.28), rgba(129, 140, 248, 0.2), rgba(248, 113, 113, 0.14));
}
.cms-element--styled-text.el--twilight .cms-styled-text__item-title,
.cms-element--styled-text.el--twilight .cms-styled-text__item-text { color: #e0e7ff; }

.cms-element--styled-text.el--mosaic {
  color: #f5d0fe;
  border-color: rgba(217, 70, 239, 0.3);
  background:
    linear-gradient(180deg, rgba(217, 70, 239, 0.18), rgba(250, 204, 21, 0.08));
}
.cms-element--styled-text.el--mosaic .cms-styled-text__item-title,
.cms-element--styled-text.el--mosaic .cms-styled-text__item-text { color: #f5d0fe; }

.cms-element--styled-text.el--molded {
  color: #bfdbfe;
  border-color: rgba(148, 163, 184, 0.42);
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.88), rgba(30, 41, 59, 0.6));
}
.cms-element--styled-text.el--molded .cms-styled-text__item-title,
.cms-element--styled-text.el--molded .cms-styled-text__item-text { color: #bfdbfe; }

.cms-element--styled-text.el--mixed {
  color: #ddd6fe;
  border-color: rgba(203, 213, 225, 0.35);
  background:
    linear-gradient(90deg, rgba(99, 102, 241, 0.26), rgba(244, 114, 182, 0.2), rgba(34, 197, 94, 0.16), rgba(14, 165, 233, 0.18));
}
.cms-element--styled-text.el--mixed .cms-styled-text__item-title,
.cms-element--styled-text.el--mixed .cms-styled-text__item-text,
.cms-element--styled-text.el--mixed .cms-styled-text__subtitle,
.cms-element--styled-text.el--mixed .cms-styled-text__text,
.cms-element--styled-text.el--mixed .prose-text {
  color: #ddd6fe;
}
.cms-element--styled-text.el--mixed .cms-styled-text__item {
  background: rgba(17, 24, 39, 0.55);
}

.cms-element--timer {
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 14px;
  padding: 16px;
  margin: 0 0 16px;
  background: rgba(17, 24, 39, 0.82);
}

.cms-element--timer.el--banner {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(14, 165, 233, 0.1));
  border-color: rgba(56, 189, 248, 0.24);
}

.cms-element--timer.el--minimal {
  padding: 10px 12px;
}

.cms-timer {
  display: grid;
  gap: 6px;
}

.cms-timer__prefix {
  color: #fde68a;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
}

.cms-timer__value {
  font-size: clamp(1.3rem, 2.8vw, 1.95rem);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.03em;
  font-weight: 750;
  color: #e2e8f0;
}

.cms-timer__message {
  margin-top: 6px;
  color: var(--muted);
}

.cms-block--composed--side-by-side {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

.cms-block--composed--side-by-side .cms-element {
  margin: 0;
}

@media (min-width: 1024px) {
  .cms-block--composed--side-by-side {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
}

.inspector-field__toggle {
  align-items: center;
  display: inline-flex;
  gap: 10px;
}

.inspector-field .form-input__label {
  color: var(--muted);
  font-size: 0.78rem;
}

.studio-property-panel .inspector-field .form-input,
.studio-property-panel .inspector-field select,
.studio-property-panel .inspector-item .form-input,
.studio-property-panel .inspector-item textarea {
  width: 100%;
  max-width: none;
}

.inspector-field--toggle {
  display: grid;
  gap: 6px;
}

@media (max-width: 960px) {
  .cms-styled-text__items--side-by-side {
    grid-template-columns: 1fr;
  }
}

/* -- Branding admin page ------------------------------------------------- */
.marketing-seo-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin: 1rem 0;
}

.marketing-seo-list {
    display: grid;
    gap: .55rem;
}

.marketing-seo-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .8rem 1rem;
    border: 1px solid var(--border);
    border-radius: .65rem;
    color: inherit;
    text-decoration: none;
    background: rgba(255, 255, 255, .025);
}

.marketing-seo-item:hover {
    border-color: var(--gold);
}

.marketing-seo-item small {
    display: block;
    margin-top: .15rem;
    color: var(--muted);
}

.marketing-seo-status {
    flex: 0 0 auto;
    padding: .25rem .55rem;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 700;
}

.marketing-seo-status--ok {
    color: #b9f6ca;
    background: rgba(45, 140, 82, .22);
}

.marketing-seo-status--missing {
    color: #ffd4a8;
    background: rgba(171, 91, 20, .24);
}

.marketing-partner-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.marketing-partner-fields__wide {
    grid-column: 1 / -1;
}

.marketing-partner-toggles {
    display: flex;
    gap: 1.25rem;
    margin-top: 1rem;
}

.marketing-partner-list {
    display: grid;
    gap: .8rem;
    margin-top: 1.5rem;
}

.marketing-partner-card {
    display: grid;
    grid-template-columns: 3.5rem minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: start;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: .7rem;
}

.marketing-partner-card__icon,
.marketing-partner-card__icon img {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: .6rem;
}

.marketing-partner-card__icon {
    display: grid;
    place-items: center;
    overflow: hidden;
    background: rgba(255, 255, 255, .08);
    font-size: 1.35rem;
    font-weight: 800;
}

.marketing-partner-card__icon img {
    object-fit: contain;
}

.marketing-partner-card__heading,
.marketing-partner-card__actions {
    display: flex;
    gap: .5rem;
    align-items: center;
}

.marketing-partner-card__heading h3,
.marketing-partner-card__body p {
    margin: 0;
}

.marketing-partner-card__body > a,
.marketing-partner-card__body > small {
    display: block;
    margin-top: .45rem;
}

.footer-link--partner {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
}

.footer-partner-icon {
    width: 1.15rem;
    height: 1.15rem;
    object-fit: contain;
    border-radius: .2rem;
}

@media (max-width: 720px) {
    .marketing-seo-summary,
    .marketing-seo-item {
        align-items: flex-start;
        flex-direction: column;
    }

    .marketing-partner-fields {
        grid-template-columns: 1fr;
    }

    .marketing-partner-fields__wide {
        grid-column: auto;
    }

    .marketing-partner-card {
        grid-template-columns: 3.5rem minmax(0, 1fr);
    }

    .marketing-partner-card__actions {
        grid-column: 1 / -1;
    }
}

.admin-section__desc {
  color: var(--muted);
  font-size: 0.875rem;
  margin: -8px 0 18px;
  line-height: 1.55;
}

.admin-form__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}
.admin-form__label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  display: flex;
  gap: 8px;
  align-items: baseline;
}
.admin-form__hint {
  font-weight: 400;
  font-size: 0.78rem;
  opacity: 0.65;
}
.admin-notice {
  padding: 12px 16px;
  border-radius: var(--radius);
  margin-bottom: 20px;
  font-size: 0.9rem;
}
.admin-notice--ok  { background: rgba(34,197,94,0.12); border: 1px solid rgba(34,197,94,0.3); color: #86efac; }
.admin-notice--err { background: rgba(239,68,68,0.12); border: 1px solid rgba(239,68,68,0.3); color: #fca5a5; }
.admin-notice--warn { background: rgba(245,158,11,0.12); border: 1px solid rgba(245,158,11,0.3); color: #fcd34d; }

.branding-row {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  flex-wrap: wrap;
}
.branding-preview {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.branding-preview--favicon { width: 96px; }
.branding-preview--og      { width: 260px; }
.branding-preview__label {
  font-size: 0.75rem;
  color: var(--muted);
  text-align: center;
  word-break: break-all;
}
.branding-favicon-img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px;
  background: rgba(255,255,255,0.04);
}
.branding-og-img {
  width: 260px;
  height: 136px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}
.branding-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 0.8rem;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
  width: 100%;
  min-height: 80px;
}
.branding-file-input {
  cursor: pointer;
}

/* -- OG link-preview card (Discord-style mockup) ------------------------- */
.og-preview-card {
  max-width: 480px;
  border-left: 4px solid #5865f2;   /* Discord blurple accent */
  border-radius: 0 var(--radius) var(--radius) 0;
  background: #2b2d31;
  overflow: hidden;
}
.og-preview-card__image-wrap { line-height: 0; }
.og-preview-card__image {
  width: 100%;
  max-height: 240px;
  object-fit: cover;
  display: block;
}
.og-preview-card__body {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.og-preview-card__site {
  font-size: 0.72rem;
  color: #b5bac1;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.og-preview-card__title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #00aff4;
  margin: 0;
}
.og-preview-card__desc {
  font-size: 0.83rem;
  color: #dbdee1;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.settings-avatar {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 1rem;
  align-items: center;
  margin-bottom: 1rem;
}
.settings-avatar__preview {
  width: 76px;
  height: 76px;
  border-radius: 999px;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: #fff;
  font-size: 1.6rem;
  font-weight: 800;
}

.studio-property-panel label {
  display: grid;
  gap: 6px;
}

.studio-property-panel .form-input,
.studio-property-panel select.form-input {
  width: 100%;
  max-width: none;
}

.studio-property-panel .cms-placeholder-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.studio-property-panel .cms-placeholder-row .action-btn--sm {
  flex: 0 0 auto;
}

.settings-avatar__preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
@media (max-width: 560px) {
  .settings-avatar { grid-template-columns: 1fr; }
}

/* ── Player admin: clickable rows ─────────────────────────────────────── */
.admin-table__row--clickable {
  cursor: pointer;
}
.admin-table__row--clickable:hover {
  background: rgba(255, 255, 255, 0.045);
}
.admin-table__row--selected {
  box-shadow: inset 3px 0 0 var(--gold, #c8a95a);
}

/* ── Player admin: danger zone label ──────────────────────────────────── */
.player-danger-zone__label {
  color: var(--danger);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  margin: 0;
  text-transform: uppercase;
  width: 100%;
}

/* ── Player admin: inline confirm panel ───────────────────────────────── */
.player-danger-confirm {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.player-danger-confirm__msg {
  color: var(--muted);
  font-size: 0.8rem;
  flex-basis: 100%;
}

/* ── Admin pagination: entry count ────────────────────────────────────── */
.admin-pagination__count {
  color: var(--muted);
  font-size: 0.8rem;
  margin-right: auto;
}

/* ── Destructive confirm variant (Delete User) ─────────────────────────── */
.player-danger-confirm--destructive {
  background: rgba(248, 113, 113, 0.06);
  border: 1px solid rgba(248, 113, 113, 0.25);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 14px;
}
.player-danger-confirm--destructive .player-danger-confirm__msg {
  color: var(--text);
  flex-basis: auto;
  font-size: 0.82rem;
  margin: 0;
}
.player-danger-confirm__type-hint {
  color: var(--muted);
  font-size: 0.8rem;
  margin: 0;
}
.player-danger-confirm__input {
  font-size: 0.875rem;
  padding: 7px 10px;
  width: 100%;
}
.player-danger-confirm__actions {
  display: flex;
  gap: 8px;
}

/* Mobile footer and analytics table ----------------------------------- */
@media (max-width: 720px) {
  .site-footer,
  .footer-inner,
  .footer-top,
  .footer-nav {
    min-width: 0;
    max-width: 100%;
  }

  .footer-inner {
    gap: 22px;
    padding: 28px 18px 20px;
  }

  .footer-top {
    gap: 22px;
    grid-template-columns: minmax(0, 1fr);
  }

  .footer-brand {
    align-items: center;
    text-align: center;
  }

  .footer-brand__tagline {
    max-width: 22rem;
  }

  .footer-nav {
    gap: 8px;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
  }

  .footer-link {
    justify-content: center;
    min-width: 0;
    padding: 10px 14px;
    text-align: center;
    width: 100%;
  }

  .footer-copy {
    line-height: 1.5;
    margin: 0;
    text-align: center;
  }

  .analytics-table-wrap {
    background: transparent;
    border: 0;
    border-radius: 0;
    overflow: visible;
  }

  .analytics-table,
  .analytics-table tbody {
    display: block;
    width: 100%;
  }

  .analytics-table thead {
    display: none;
  }

  .analytics-table tbody {
    display: grid;
    gap: 12px;
  }

  .analytics-table tbody tr {
    background: rgba(17, 28, 49, 0.82);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: hidden;
  }

  .analytics-table tbody tr:hover {
    background: rgba(17, 28, 49, 0.9);
  }

  .analytics-table td,
  .analytics-table td.td--mono,
  .analytics-table td.td--muted {
    align-content: start;
    border: 0;
    color: #d7e2ef;
    display: grid;
    font-size: 0.78rem;
    gap: 5px;
    line-height: 1.45;
    min-width: 0;
    padding: 12px 14px;
  }

  .analytics-table td::before {
    color: var(--muted);
    content: attr(data-label);
    font-family: var(--font-sans);
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
  }

  .analytics-table td:nth-child(even) {
    border-left: 1px solid rgba(148, 163, 184, 0.1);
  }

  .analytics-table td.analytics-table__wide {
    border-left: 0;
    border-top: 1px solid rgba(148, 163, 184, 0.1);
    grid-column: 1 / -1;
  }

  .analytics-table__value {
    overflow-wrap: anywhere;
    word-break: normal;
  }
}
