.kzp-kicker {
  display: inline-block;
  margin-bottom: 8px;
  color: #5cffd1;
  font-family: "Cinzel", "Unbounded", serif;
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
  text-shadow: 0 0 12px rgba(92, 255, 209, .55);
}

.kzp-foundation,
.kzp-section,
.kzp-trials,
.kzp-reader-gate,
.kzp-story-economy {
  margin-top: 14px;
}

.kzp-gate,
.kzp-reader-gate {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, .8fr);
  gap: 16px;
  align-items: stretch;
}

.kzp-gate > div,
.kzp-companion,
.kzp-grid article,
.kzp-trial-grid article,
.kzp-episode-list a,
.kzp-story-economy article,
.kzp-page-hero {
  /* Was a hardcoded dark-purple gradient (rgba(16,8,38,.92) etc.) with no
     link to the theme variables at all -- these cards stayed the exact
     same dark purple regardless of which of the 9 kingdom themes was
     selected. Switched to var(--panel)/var(--line)/var(--neon-soft) so
     they actually re-theme like the rest of the site, e.g. going light
     under Solaris/Lumen instead of being a dark island on a light page. */
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, var(--panel), var(--panel-2)),
    radial-gradient(circle at 100% 0%, var(--neon-soft), transparent 44%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .04), 0 0 24px var(--neon-soft);
}

.kzp-gate > div,
.kzp-companion,
.kzp-page-hero {
  padding: clamp(20px, 3vw, 32px);
  border-radius: 12px;
}

.kzp-gate h2,
.kzp-page-hero h1,
.kzp-section h2,
.kzp-trials h2,
.kzp-reader-gate h2 {
  margin: 0 0 10px;
  font-family: "Cinzel", "Unbounded", serif;
  color: #fff1ff;
  text-shadow: 0 0 18px rgba(255, 92, 240, .45);
}

.kzp-gate p,
.kzp-page-hero p,
.kzp-trials p,
.kzp-reader-gate p {
  max-width: 780px;
  color: var(--mist);
  line-height: 1.65;
}

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

.kzp-actions a,
.kzp-reader-gate a[href^="reader"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid rgba(255, 92, 240, .58);
  border-radius: 7px;
  color: #fff;
  background: linear-gradient(180deg, rgba(157, 92, 255, .36), rgba(31, 10, 62, .72));
  text-decoration: none;
  font-family: "Cinzel", "Unbounded", serif;
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  box-shadow: 0 0 18px rgba(255, 92, 240, .22);
}

.kzp-companion h3 {
  margin: 0 0 8px;
  font-size: 26px;
  color: #ffd6ff;
}

.kzp-companion small,
.kzp-grid small,
.kzp-trial-grid small,
.kzp-episode-list small {
  color: #b9afd4;
  line-height: 1.45;
}

.kzp-grid,
.kzp-trial-grid,
.kzp-story-economy {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
}

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

.kzp-grid article,
.kzp-trial-grid article,
.kzp-story-economy article {
  min-height: 118px;
  padding: 16px;
  border-radius: 10px;
}

.kzp-grid article span,
.kzp-trial-grid article span {
  display: block;
  margin-bottom: 8px;
  color: var(--neon);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.kzp-grid article b,
.kzp-trial-grid article h3,
.kzp-story-economy b {
  display: block;
  margin-bottom: 8px;
  color: var(--paper);
  font-family: "Cinzel", "Unbounded", serif;
}

.kzp-grid article p,
.kzp-trial-grid article p,
.kzp-story-economy span {
  color: var(--mist);
  line-height: 1.52;
}

.kzp-grid article em {
  display: inline-block;
  margin-top: 10px;
  padding: 4px 8px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 999px;
  color: #e4e5e8;
  font-size: 11px;
  font-style: normal;
}

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

.kzp-episode-list a {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 12px;
  padding: 10px;
  border-radius: 10px;
  color: #fff;
  text-decoration: none;
}

.kzp-episode-list img {
  grid-row: span 3;
  width: 74px;
  height: 94px;
  object-fit: cover;
  border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, .18);
}

.kzp-episode-list span {
  color: #5cffd1;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .12em;
}

.kzp-page-hero {
  margin: 24px auto 14px;
}

@media (max-width: 760px) {
  .kzp-gate,
  .kzp-reader-gate,
  .kzp-3 {
    grid-template-columns: 1fr;
  }

  .kzp-grid,
  .kzp-trial-grid {
    grid-template-columns: 1fr;
  }
}

/* Professional admin dashboard */
.kza-admin-body {
  --kza-ink: #111827;
  --kza-paper: #f8fbff;
  --kza-panel: rgba(255, 255, 255, .76);
  --kza-line: rgba(69, 83, 115, .22);
  --kza-prism: linear-gradient(135deg, #ffffff, #f9dcff 22%, #d8f7ff 48%, #e9ffe9 72%, #fff6d7);
  color: var(--kza-ink);
  background:
    radial-gradient(circle at 14% 0%, rgba(157, 92, 255, .18), transparent 28%),
    radial-gradient(circle at 84% 8%, rgba(92, 255, 209, .18), transparent 28%),
    linear-gradient(180deg, #f8fbff, #e8f6ff 48%, #f9fbff);
}

.kza-admin-body .atmosphere,
.kza-admin-body::after {
  display: none;
}

.kza-admin-body .wrap {
  width: min(1480px, calc(100% - 32px));
  max-width: none;
}

.kza-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 18px;
  padding: 18px 0 40px;
}

.kza-side {
  position: sticky;
  top: 18px;
  height: calc(100vh - 36px);
  align-self: start;
  padding: 16px;
  border: 1px solid var(--kza-line, rgba(255, 92, 240, .22));
  border-radius: 12px;
  background: rgba(255, 255, 255, .72);
  color: var(--kza-ink, #fff);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .68), 0 18px 42px rgba(43, 55, 89, .14);
  backdrop-filter: blur(20px) saturate(1.25);
}

.kza-brand {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 10px;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 92, 240, .18);
}

.kza-brand span {
  grid-row: span 2;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 92, 240, .36);
  border-radius: 10px;
  color: #172033;
  background: var(--kza-prism, rgba(157, 92, 255, .16));
  font-family: "Cinzel", serif;
  font-size: 24px;
  box-shadow: 0 0 18px rgba(255, 92, 240, .20);
}

.kza-brand b {
  color: var(--kza-ink, #fff1ff);
  font-family: "Cinzel", serif;
}

.kza-brand small,
.kza-side a {
  color: rgba(17, 24, 39, .66);
}

.kza-side a {
  display: block;
  padding: 10px 12px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 13px;
}

.kza-side a:hover {
  color: #111827;
  background: rgba(255, 255, 255, .68);
  box-shadow: inset 0 0 0 1px rgba(69, 83, 115, .12);
}

.kza-side-card {
  margin-top: 16px;
  padding: 13px;
  border: 1px solid rgba(69, 83, 115, .16);
  border-radius: 10px;
  /* Was rgba(255,255,255,.58): a light glass card sitting directly on the
     admin dashboard's near-black body background, with no lighter surface
     behind it to blend with, composited down to low-contrast mid-gray text
     on gray -- close to unreadable. Raised to near-opaque so it reads as
     the callout it's meant to be. */
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 8px 22px rgba(0, 0, 0, .35);
}

.kza-side-card b {
  display: block;
  margin-bottom: 6px;
  color: #111827;
  font-family: "Cinzel", serif;
}

.kza-side-card p {
  margin: 0;
  color: rgba(17, 24, 39, .70);
  font-size: 12px;
  line-height: 1.45;
}

.kza-main {
  min-width: 0;
}

.kza-hero,
.kza-panel,
.kza-metrics article {
  border: 1px solid var(--kza-line, rgba(255, 92, 240, .22));
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .76), rgba(255, 255, 255, .54)),
    radial-gradient(circle at 100% 0%, rgba(92, 255, 209, .18), transparent 42%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .72), 0 18px 44px rgba(43, 55, 89, .12);
  backdrop-filter: blur(18px) saturate(1.2);
}

.kza-hero {
  position: relative;
  overflow: hidden;
  min-height: 250px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background:
    linear-gradient(90deg, rgba(5, 3, 16, .94), rgba(5, 3, 16, .58), rgba(5, 3, 16, .92)),
    url("../assets/kingdoms/scenes/scene-neon.jpg") center/cover;
}

.kza-hero::after {
  content: "";
  position: absolute;
  right: clamp(18px, 5vw, 70px);
  top: 24px;
  width: clamp(90px, 12vw, 170px);
  aspect-ratio: 1;
  background: url("../assets/logo-k-mark.png") center/contain no-repeat;
  filter: drop-shadow(0 0 28px rgba(255, 92, 240, .58));
  opacity: .8;
}

.kza-hero,
.kza-panel {
  padding: 20px;
  margin-bottom: 14px;
}

.kza-hero h1,
.kza-panel h2 {
  margin: 0 0 8px;
  font-family: "Cinzel", serif;
}

.kza-panel h2 {
  color: var(--kza-ink, #fff1ff);
  text-shadow: none;
}

/* .kza-hero keeps its own dark photo background (see .kza-hero rule
   below) unlike .kza-panel, which is light -- so its heading can't share
   .kza-panel's dark --kza-ink color. style.css already has the correct
   light/glow treatment for `.kza-hero h1` further down the cascade; this
   rule used to set color:var(--kza-ink) here too, which -- because this
   file loads after style.css -- silently won and put dark ink text back
   onto the hero's dark background despite the correct rule existing.
   Leaving color/text-shadow unset here lets style.css's rule apply. */

.kza-hero p,
.kza-panel p {
  line-height: 1.6;
}

.kza-panel p {
  color: rgba(17, 24, 39, .72);
}
/* .kza-hero p: same reasoning as .kza-hero h1 above -- dark ink is wrong
   on the hero's own dark photo background; style.css's `.kza-hero p`
   rule (color:#ded6f5) supplies the correct light color once this file
   stops setting one here too. */

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

.kza-metrics article {
  padding: 16px;
}

.kza-metrics span,
.kza-list small,
.kza-theme-card small {
  display: block;
  color: #5cffd1;
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.kza-metrics b {
  display: block;
  margin: 4px 0;
  color: var(--kza-ink, #fff);
  font-family: "Cinzel", serif;
  font-size: 30px;
}

.kza-metrics small {
  color: rgba(17, 24, 39, .62);
}

.kza-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
  margin-bottom: 10px;
}

.kza-action,
.kza-hero-actions a {
  border: 1px solid rgba(255, 92, 240, .35);
  border-radius: 8px;
  color: #111827;
  background: var(--kza-prism, rgba(157, 92, 255, .20));
  padding: 10px 13px;
  font: 700 12px "Space Grotesk", sans-serif;
  text-decoration: none;
  box-shadow: 0 10px 22px rgba(43, 55, 89, .12);
}

.kza-action.wide {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 42px;
  margin-top: 12px;
}

.kza-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.kza-hero-actions a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  text-decoration: none;
}

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

.kza-theme-card {
  --theme-scene: url("../assets/kingdoms/scenes/scene-neon.jpg");
  display: grid;
  grid-template-columns: 34px 1fr auto;
  gap: 10px;
  align-items: start;
  position: relative;
  overflow: hidden;
  min-height: 132px;
  padding: 13px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 10px;
  background:
    linear-gradient(110deg, rgba(5, 4, 16, .94), rgba(5, 4, 16, .74)),
    var(--theme-scene) center/cover;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .035);
}

.kza-theme-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .12), transparent 32%),
    radial-gradient(circle at 90% 12%, rgba(255, 92, 240, .22), transparent 36%);
  opacity: .62;
  pointer-events: none;
}

.kza-theme-card > * {
  position: relative;
  z-index: 1;
}

.kza-theme-card.locked {
  border-color: rgba(228, 229, 232, .28);
  background:
    linear-gradient(110deg, rgba(5, 4, 16, .95), rgba(5, 4, 16, .78)),
    var(--theme-scene) center/cover;
}

.kza-theme-card b,
.kza-list b {
  color: #fff1ff;
}

.kza-theme-card p,
.kza-list p {
  margin: 6px 0 0;
  color: var(--mist);
  font-size: 13px;
  line-height: 1.42;
}

.kza-theme-card em {
  justify-self: end;
  padding: 4px 7px;
  border: 1px solid rgba(255, 255, 255, .15);
  border-radius: 999px;
  color: #ddd7f2;
  font-size: 10px;
  font-style: normal;
  white-space: nowrap;
}

.kza-dot {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: linear-gradient(135deg, #ff5cf0, #5c8bff, #5cffd1);
  box-shadow: 0 0 14px rgba(157, 92, 255, .35);
}

.kza-dot[data-theme-id="ignis"] { background: linear-gradient(135deg, #ff5a2e, #ffc93b); }
.kza-dot[data-theme-id="aquor"] { background: linear-gradient(135deg, #3d8bff, #bfe3ff); }
.kza-dot[data-theme-id="terra"] { background: linear-gradient(135deg, #9bcc3f, #57e89b); }
.kza-dot[data-theme-id="zephyr"] { background: linear-gradient(135deg, #b8f0ce, #ffffff); }
.kza-dot[data-theme-id="lumen"] { background: linear-gradient(135deg, #ffc93b, #fff6da); }
.kza-dot[data-theme-id="nox"] { background: linear-gradient(135deg, #a855f7, #3a1660); }
.kza-dot[data-theme-id="solaris"] { background: linear-gradient(135deg, #ffffff, #ffd6f0, #5cffd1); }
.kza-dot[data-theme-id="moon"] { background: linear-gradient(135deg, #e4e5e8, #4a4d54); }
.kza-dot[data-theme-id="kyuchome"] { background: linear-gradient(135deg, #8a7048, #c9b183); }
.kza-dot[data-theme-id="makoto"] { background: linear-gradient(135deg, #6b7a4a, #e8a54a); }

.kza-theme-card[data-theme-id="neon"] { --theme-scene: url("../assets/kingdoms/scenes/scene-neon.jpg"); }
.kza-theme-card[data-theme-id="ignis"] { --theme-scene: url("../assets/kingdoms/scenes/scene-ignis.jpg"); }
.kza-theme-card[data-theme-id="aquor"] { --theme-scene: url("../assets/kingdoms/scenes/scene-aquor.jpg"); }
.kza-theme-card[data-theme-id="terra"] { --theme-scene: url("../assets/kingdoms/scenes/scene-terra.jpg"); }
.kza-theme-card[data-theme-id="zephyr"] { --theme-scene: url("../assets/kingdoms/scenes/scene-zephyr.jpg"); }
.kza-theme-card[data-theme-id="lumen"] { --theme-scene: url("../assets/kingdoms/scenes/scene-lumen.jpg"); }
.kza-theme-card[data-theme-id="nox"] { --theme-scene: url("../assets/kingdoms/scenes/scene-nox.jpg"); }
.kza-theme-card[data-theme-id="solaris"] { --theme-scene: url("../assets/kingdoms/scenes/scene-solaris.jpg"); }
.kza-theme-card[data-theme-id="moon"] { --theme-scene: url("../assets/kingdoms/scenes/scene-moon.jpg"); }
.kza-theme-card[data-theme-id="kyuchome"] { --theme-scene: url("../assets/kingdoms/scenes/scene-kyuchome.jpg"); }
.kza-theme-card[data-theme-id="makoto"] { --theme-scene: url("../assets/kingdoms/scenes/scene-makoto.jpg"); }

.kza-moon-panel {
  background:
    linear-gradient(135deg, rgba(4, 4, 10, .94), rgba(14, 12, 24, .86)),
    url("../assets/kingdoms/scenes/scene-moon.jpg") center/cover;
}

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

.kza-panel label {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  color: rgba(17, 24, 39, .70);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.kza-panel input,
.kza-panel select {
  width: 100%;
  border: 1px solid rgba(69, 83, 115, .20);
  border-radius: 8px;
  background: rgba(255, 255, 255, .64);
  color: #111827;
  padding: 11px 12px;
  font: 14px "Space Grotesk", sans-serif;
  text-transform: none;
  letter-spacing: 0;
}

.kza-list {
  display: grid;
  gap: 9px;
}

.kza-list > div,
.kza-lock,
.kza-checks label,
.kza-chat-flow span,
.kza-status,
.kza-mini-grid span {
  padding: 12px;
  border: 1px solid rgba(69, 83, 115, .13);
  border-radius: 9px;
  background: rgba(255, 255, 255, .50);
}

.kza-lock {
  margin-top: 14px;
  color: #111827;
  border-color: rgba(69, 83, 115, .22);
}

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

.kza-status {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 10px;
  align-items: center;
}

.kza-status b {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #111827;
  background: var(--kza-prism);
  font-size: 11px;
}

.kza-status span {
  color: rgba(17, 24, 39, .72);
  font-size: 13px;
  line-height: 1.35;
}

.kza-checks input {
  accent-color: #5cffd1;
}

.kza-mini-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.kza-mini-grid span {
  text-align: center;
  color: #111827;
  font-size: 12px;
  font-weight: 700;
}

.kza-chat-flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.kza-chat-flow span {
  color: rgba(17, 24, 39, .78);
  font-size: 12px;
  line-height: 1.35;
}

@media (max-width: 980px) {
  .kza-shell {
    grid-template-columns: 1fr;
  }

  .kza-side {
    position: static;
    height: auto;
  }

  .kza-side a {
    display: inline-block;
  }

  .kza-metrics,
  .kza-columns,
  .kza-checks,
  .kza-chat-flow {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .kza-metrics,
  .kza-columns,
  .kza-theme-grid,
  .kza-checks,
  .kza-chat-flow {
    grid-template-columns: 1fr;
  }

  .kza-theme-card {
    grid-template-columns: 30px 1fr;
  }

  .kza-theme-card em {
    grid-column: 2;
    justify-self: start;
  }
}
