/* ==========================================================================
   KAELEN DOUR — THE ENDLESS PLANE (Kael-GhurN GOTHIC DESIGN SYSTEM)
   ========================================================================== */

:root {
  --bg: #0d0806;
  --bg-alt: #140c08;
  --panel: rgba(20, 12, 8, 0.88);
  --panel-solid: #160d09;
  --panel-card: rgba(28, 16, 11, 0.94);
  --gold: #d1a054;
  --gold-bright: #f0c674;
  --gold-dim: rgba(209, 160, 84, 0.35);
  --crimson: #a32626;
  --crimson-bright: #d93838;
  --crimson-dim: rgba(163, 38, 38, 0.35);
  --text: #f0e6d2;
  --text-dim: #cbbdaf;
  --muted: #a89880;
  --border: 1px solid rgba(209, 160, 84, 0.28);
  --border-gold: 1px solid #d1a054;
  --shadow-gothic: 0 15px 45px rgba(0, 0, 0, 0.85), inset 0 0 0 1px rgba(209, 160, 84, 0.15);
  --font-serif: 'Cinzel', 'Garamond', 'Georgia', serif;
  --font-body: 'Garamond', 'Georgia', serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

body.kd-public {
  background:
    radial-gradient(circle at 15% 5%, rgba(209, 160, 84, 0.08), transparent 35%),
    radial-gradient(circle at 85% 15%, rgba(163, 38, 38, 0.08), transparent 35%),
    linear-gradient(180deg, #0d0806 0%, #160d08 35%, #0d0806 70%, #080402 100%);
  min-height: 100vh;
}

h1, h2, h3, h4, .kicker, .eyebrow, .brand, .btn {
  font-family: var(--font-serif);
  letter-spacing: 0.04em;
}

a { color: inherit; text-decoration: none; }

/* --------------------------------------------------------------------------
   TOP NAVIGATION
   -------------------------------------------------------------------------- */
.kd-compat-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 36px;
  background: rgba(13, 8, 6, 0.94);
  border-bottom: 2px solid var(--gold-dim);
  backdrop-filter: blur(12px);
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.9);
}

.kd-brand {
  display: flex;
  flex-direction: column;
}

.kd-brand span {
  font-size: 22px;
  font-weight: 900;
  color: var(--gold-bright);
  letter-spacing: 0.16em;
  text-shadow: 0 0 12px rgba(209, 160, 84, 0.4);
}

.kd-brand small {
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.22em;
}

.kd-compat-nav nav {
  display: flex;
  gap: 14px;
  align-items: center;
}

.kd-compat-nav nav a {
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-dim);
  border: 1px solid transparent;
  border-radius: 3px;
  transition: all 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.kd-compat-nav nav a:hover {
  color: var(--gold-bright);
  border-color: var(--gold-dim);
  background: rgba(209, 160, 84, 0.08);
}

.kd-compat-nav nav a.nav-login {
  border: 1px solid var(--gold-dim);
  background: rgba(20, 12, 8, 0.7);
}

.kd-compat-nav nav a.nav-register {
  background: var(--crimson);
  border: 1px solid var(--gold);
  color: #fff;
  box-shadow: 0 0 10px rgba(163, 38, 38, 0.5);
}

.kd-compat-nav nav a.nav-register:hover {
  background: #bf2e2e;
  box-shadow: 0 0 16px rgba(163, 38, 38, 0.8);
}

/* --------------------------------------------------------------------------
   BUTTONS & TYPOGRAPHY
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn.primary {
  background: linear-gradient(135deg, #a32626 0%, #751a1a 100%);
  border: 1px solid var(--gold);
  color: #fff;
  box-shadow: 0 4px 20px rgba(163, 38, 38, 0.4);
}

.btn.primary:hover {
  background: linear-gradient(135deg, #c22f2f 0%, #912222 100%);
  box-shadow: 0 0 25px rgba(209, 160, 84, 0.5), 0 0 15px rgba(163, 38, 38, 0.8);
  transform: translateY(-2px);
}

.btn.ghost {
  background: rgba(20, 12, 8, 0.8);
  border: 1px solid var(--gold-dim);
  color: var(--text);
}

.btn.ghost:hover {
  background: rgba(209, 160, 84, 0.15);
  border-color: var(--gold);
  color: var(--gold-bright);
  transform: translateY(-2px);
}

.btn.video {
  background: rgba(13, 8, 6, 0.6);
  border: 1px dashed var(--gold-dim);
  color: var(--muted);
}

.btn.video:hover {
  border-color: var(--gold);
  color: var(--text);
}

.eyebrow, .kicker {
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin-bottom: 8px;
  display: block;
}

.section-heading {
  text-align: center;
  max-width: 860px;
  margin: 0 auto 36px;
}

.section-heading h2 {
  font-size: 32px;
  color: var(--text);
  margin-bottom: 8px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

.section-sub {
  color: var(--muted);
  font-size: 16px;
}

/* --------------------------------------------------------------------------
   HERO SECTION
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  padding: 60px 40px 40px;
  min-height: 80vh;
  display: flex;
  align-items: center;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: url(./kd_public_assets/hero-bg.webp) center/cover no-repeat;
  opacity: 0.18;
  filter: saturate(0.6) brightness(0.7);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  z-index: 2;
  width: min(1280px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 50px;
  align-items: center;
}

.hero-copy h1 {
  font-size: 46px;
  line-height: 1.15;
  color: #fff;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.9);
  margin-bottom: 18px;
}

.hero-copy p {
  font-size: 18px;
  color: var(--text-dim);
  line-height: 1.7;
  margin-bottom: 28px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}

.hero-stats {
  display: flex;
  gap: 24px;
  border-top: 1px solid rgba(209, 160, 84, 0.2);
  padding-top: 20px;
}

.hero-stats span {
  font-size: 13px;
  color: var(--muted);
}

.hero-stats span b {
  display: block;
  font-size: 14px;
  color: var(--gold-bright);
  letter-spacing: 0.08em;
}

/* --------------------------------------------------------------------------
   Kael-GhurN RELIQUARY ASTROLABE SHRINE (REPLACES SMARTPHONE FRAME)
   -------------------------------------------------------------------------- */
.kd-hero-reliquary-shrine {
  position: relative;
  background: linear-gradient(145deg, #180e08 0%, #0d0603 100%);
  border: 2px solid var(--gold);
  border-radius: 6px;
  padding: 12px;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.95),
    0 0 35px rgba(209, 160, 84, 0.25),
    inset 0 0 25px rgba(0, 0, 0, 0.8);
}

.reliquary-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px 10px;
  border-bottom: 1px solid var(--gold-dim);
  margin-bottom: 10px;
}

.reliquary-title {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.2em;
  color: var(--gold-bright);
  text-shadow: 0 0 8px rgba(209, 160, 84, 0.5);
}

.reliquary-glyph {
  font-size: 16px;
  color: var(--crimson-bright);
}

.reliquary-body {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 1px solid var(--gold-dim);
  border-radius: 4px;
  background: #000;
}

.reliquary-corner {
  position: absolute;
  width: 18px;
  height: 18px;
  z-index: 10;
  pointer-events: none;
}

.reliquary-corner.top-left {
  top: 4px; left: 4px;
  border-top: 2px solid var(--gold);
  border-left: 2px solid var(--gold);
}
.reliquary-corner.top-right {
  top: 4px; right: 4px;
  border-top: 2px solid var(--gold);
  border-right: 2px solid var(--gold);
}
.reliquary-corner.bottom-left {
  bottom: 4px; left: 4px;
  border-bottom: 2px solid var(--gold);
  border-left: 2px solid var(--gold);
}
.reliquary-corner.bottom-right {
  bottom: 4px; right: 4px;
  border-bottom: 2px solid var(--gold);
  border-right: 2px solid var(--gold);
}

.kd-hero-logo-rotator {
  position: relative;
  width: 100%;
  height: 100%;
}

.kd-showcase-pane {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.8s ease-in-out;
}

.kd-showcase-pane.is-active {
  opacity: 1;
}

.reliquary-footer {
  text-align: center;
  padding: 8px 0 2px;
}

.reliquary-footer small {
  font-size: 10px;
  letter-spacing: 0.22em;
  color: var(--muted);
  text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   CARDS & INTRO
   -------------------------------------------------------------------------- */
.kd-story-gate {
  width: min(1280px, calc(100% - 40px));
  margin: 40px auto;
  padding: 36px 40px;
  background: var(--panel);
  border: 1px solid var(--gold-dim);
  border-radius: 4px;
  box-shadow: var(--shadow-gothic);
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 36px;
  align-items: center;
}

.kd-story-gate h2 {
  font-size: 26px;
  color: var(--text);
  line-height: 1.3;
}

.kd-story-gate p {
  color: var(--text-dim);
  font-size: 16px;
  line-height: 1.8;
}

.cards {
  width: min(1280px, calc(100% - 40px));
  margin: 30px auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.cards article {
  background: var(--panel-card);
  border: 1px solid var(--gold-dim);
  border-radius: 4px;
  padding: 28px 24px;
  position: relative;
  transition: transform 0.2s ease, border-color 0.2s ease;
  box-shadow: var(--shadow-gothic);
}

.cards article:hover {
  transform: translateY(-4px);
  border-color: var(--gold);
}

.card-step {
  display: inline-block;
  font-size: 12px;
  font-weight: 900;
  color: var(--crimson-bright);
  border: 1px solid var(--crimson-dim);
  padding: 2px 8px;
  border-radius: 2px;
  margin-bottom: 12px;
}

.cards h3 {
  font-size: 20px;
  color: var(--gold-bright);
  margin-bottom: 10px;
}

.cards p {
  color: var(--text-dim);
  font-size: 15px;
  line-height: 1.6;
}

/* --------------------------------------------------------------------------
   SIMBOLI E SEGRETI (Ghur-MekhanIAN CODEX GRID)
   -------------------------------------------------------------------------- */
.kd-symbol-band {
  width: min(1280px, calc(100% - 40px));
  margin: 50px auto;
  padding: 44px 36px;
  background: linear-gradient(180deg, rgba(22, 13, 8, 0.95) 0%, rgba(13, 8, 6, 0.98) 100%);
  border: 2px solid var(--gold-dim);
  border-radius: 6px;
  box-shadow: var(--shadow-gothic);
}

.kd-symbol-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}

.symbol-card {
  background: rgba(18, 10, 6, 0.85);
  border: 1px solid rgba(209, 160, 84, 0.22);
  border-radius: 4px;
  padding: 24px 20px;
  text-align: center;
  transition: all 0.25s ease;
}

.symbol-card:hover {
  border-color: var(--gold);
  background: rgba(28, 16, 10, 0.95);
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.8);
}

.kd-rune-seal {
  width: 54px;
  height: 54px;
  margin: 0 auto 14px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 2px solid var(--gold);
  background: radial-gradient(circle, rgba(163, 38, 38, 0.5) 0%, rgba(13, 8, 6, 0.9) 100%);
  font-size: 24px;
  color: var(--gold-bright);
  box-shadow: 0 0 15px rgba(209, 160, 84, 0.3);
}

.symbol-tag {
  display: block;
  font-size: 11px;
  font-weight: 900;
  color: var(--gold);
  letter-spacing: 0.18em;
  margin-bottom: 8px;
}

.symbol-card h3 {
  font-size: 18px;
  color: #fff;
  margin-bottom: 10px;
}

.symbol-card p {
  font-size: 14px;
  color: var(--text-dim);
  line-height: 1.65;
}

/* --------------------------------------------------------------------------
   L'AMBIENTAZIONE: THE ENDLESS PLANE
   -------------------------------------------------------------------------- */
.kd-lore-band {
  width: min(1280px, calc(100% - 40px));
  margin: 50px auto;
  padding: 44px 36px;
  background: linear-gradient(180deg, rgba(22, 13, 8, 0.95) 0%, rgba(13, 8, 6, 0.98) 100%);
  border: 2px solid var(--gold-dim);
  border-radius: 6px;
  box-shadow: var(--shadow-gothic);
}

.kd-lore-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.kd-lore-card {
  background: rgba(18, 10, 6, 0.88);
  border: 1px solid var(--gold-dim);
  border-radius: 4px;
  padding: 28px;
}

.lore-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  border-bottom: 1px solid rgba(209, 160, 84, 0.2);
  padding-bottom: 10px;
}

.lore-icon { font-size: 24px; }

.kd-lore-card h3 {
  font-size: 20px;
  color: var(--gold-bright);
}

.kd-lore-card p {
  color: var(--text-dim);
  font-size: 15px;
  margin-bottom: 16px;
  line-height: 1.7;
}

.lore-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.lore-list li {
  font-size: 14px;
  color: var(--muted);
  position: relative;
  padding-left: 20px;
  line-height: 1.6;
}

.lore-list li::before {
  content: "❖";
  position: absolute;
  left: 0;
  color: var(--gold);
  font-size: 11px;
}

.lore-list li strong {
  color: var(--text);
}

/* --------------------------------------------------------------------------
   MULTIPLAYER SECTION
   -------------------------------------------------------------------------- */
.kd-mp-home-v1 {
  width: min(1280px, calc(100% - 40px));
  margin: 50px auto;
  padding: 44px 36px;
  background: linear-gradient(135deg, rgba(28, 16, 10, 0.95) 0%, rgba(13, 8, 6, 0.98) 100%);
  border: 2px solid var(--crimson-dim);
  border-radius: 6px;
  box-shadow: var(--shadow-gothic);
}

.kd-mp-home-copy {
  max-width: 820px;
  margin-bottom: 30px;
}

.kd-mp-home-copy h2 {
  font-size: 30px;
  color: #fff;
  margin-bottom: 12px;
}

.kd-mp-home-copy p {
  font-size: 16px;
  color: var(--text-dim);
  line-height: 1.7;
  margin-bottom: 20px;
}

.kd-mp-home-actions {
  display: flex;
  gap: 14px;
}

.kd-mp-home-features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  border-top: 1px solid rgba(209, 160, 84, 0.2);
  padding-top: 26px;
}

.mp-feature-card {
  background: rgba(15, 8, 5, 0.8);
  border: 1px solid rgba(209, 160, 84, 0.18);
  border-radius: 4px;
  padding: 18px 16px;
}

.mp-step {
  display: block;
  font-size: 11px;
  font-weight: 900;
  color: var(--crimson-bright);
  margin-bottom: 6px;
}

.mp-feature-card strong {
  display: block;
  font-size: 16px;
  color: var(--gold-bright);
  margin-bottom: 6px;
}

.mp-feature-card small {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
  display: block;
}

/* --------------------------------------------------------------------------
   SHOWCASE SCENE
   -------------------------------------------------------------------------- */
.showcase {
  width: min(1280px, calc(100% - 40px));
  margin: 50px auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.scene {
  position: relative;
  border: 1px solid var(--gold-dim);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: var(--shadow-gothic);
  aspect-ratio: 16 / 10;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.scene:hover {
  transform: translateY(-4px);
  border-color: var(--gold);
}

.scene img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.scene:hover img {
  transform: scale(1.04);
}

.scene-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(10, 5, 3, 0.95) 100%);
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.scene-overlay h3 {
  font-size: 18px;
  color: var(--gold-bright);
  margin-bottom: 4px;
}

.scene-overlay p {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.5;
}

/* --------------------------------------------------------------------------
   LE 5 GRANDI FAZIONI (5 BALANCED COLUMNS)
   -------------------------------------------------------------------------- */
.factions {
  width: min(1280px, calc(100% - 40px));
  margin: 60px auto;
  padding: 44px 36px;
  background: linear-gradient(180deg, rgba(22, 13, 8, 0.95) 0%, rgba(13, 8, 6, 0.98) 100%);
  border: 2px solid var(--gold-dim);
  border-radius: 6px;
  box-shadow: var(--shadow-gothic);
}

.faction-grid.five-columns {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 18px;
}

.faction-card {
  background: rgba(18, 10, 6, 0.92);
  border: 1px solid rgba(209, 160, 84, 0.22);
  border-radius: 4px;
  overflow: hidden;
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
}

.faction-card:hover {
  border-color: var(--gold);
  transform: translateY(-6px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.9), 0 0 15px rgba(209, 160, 84, 0.2);
}

.faction-img-wrap {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #000;
  border-bottom: 1px solid var(--gold-dim);
}

.faction-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.faction-card:hover .faction-img-wrap img {
  transform: scale(1.06);
}

.faction-content {
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.faction-badge {
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.18em;
  color: var(--crimson-bright);
  margin-bottom: 6px;
}

.faction-content h3 {
  font-size: 16px;
  color: var(--gold-bright);
  margin-bottom: 8px;
  line-height: 1.25;
}

.faction-content p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.55;
}

/* --------------------------------------------------------------------------
   STRATEGIA & SISTEMI DI GIOCO
   -------------------------------------------------------------------------- */
.kd-strategy-band {
  width: min(1280px, calc(100% - 40px));
  margin: 50px auto;
  padding: 44px 36px;
  background: linear-gradient(180deg, rgba(22, 13, 8, 0.95) 0%, rgba(13, 8, 6, 0.98) 100%);
  border: 2px solid var(--gold-dim);
  border-radius: 6px;
  box-shadow: var(--shadow-gothic);
}

.kd-strategy-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}

.strategy-card {
  background: rgba(18, 10, 6, 0.85);
  border: 1px solid rgba(209, 160, 84, 0.22);
  border-radius: 4px;
  padding: 24px 20px;
  transition: all 0.25s ease;
}

.strategy-card:hover {
  border-color: var(--gold);
  transform: translateY(-4px);
  background: rgba(28, 16, 10, 0.95);
}

.strategy-icon {
  font-size: 26px;
  margin-bottom: 12px;
}

.strategy-tag {
  display: block;
  font-size: 10px;
  font-weight: 900;
  color: var(--gold);
  letter-spacing: 0.18em;
  margin-bottom: 6px;
}

.strategy-card h3 {
  font-size: 18px;
  color: #fff;
  margin-bottom: 8px;
}

.strategy-card p {
  font-size: 14px;
  color: var(--text-dim);
  line-height: 1.6;
}

/* --------------------------------------------------------------------------
   CALL TO ACTION FORGIATURA
   -------------------------------------------------------------------------- */
.kd-create-character-home-v1 {
  width: min(1280px, calc(100% - 40px));
  margin: 60px auto;
  padding: 60px 40px;
  text-align: center;
  background:
    radial-gradient(circle at center, rgba(163, 38, 38, 0.2), transparent 70%),
    linear-gradient(145deg, #1f110a 0%, #0d0603 100%);
  border: 2px solid var(--gold);
  border-radius: 6px;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.95),
    0 0 30px rgba(209, 160, 84, 0.25);
}

.cta-desc {
  max-width: 780px;
  margin: 0 auto 30px;
  font-size: 17px;
  color: var(--text-dim);
  line-height: 1.7;
}

.cta-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.cta-large {
  padding: 16px 36px;
  font-size: 16px;
}

/* --------------------------------------------------------------------------
   FOOTER
   -------------------------------------------------------------------------- */
.kd-compat-footer {
  border-top: 2px solid var(--gold-dim);
  background: #080402;
  padding: 40px 36px 24px;
  margin-top: 80px;
}

.footer-inner {
  width: min(1280px, 100%);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 24px;
}

.footer-brand strong {
  font-size: 20px;
  color: var(--gold-bright);
  display: block;
}

.footer-brand p {
  color: var(--muted);
  font-size: 14px;
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  color: var(--text-dim);
  font-size: 14px;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--gold-bright);
}

.footer-bottom {
  text-align: center;
  border-top: 1px solid rgba(209, 160, 84, 0.15);
  padding-top: 20px;
  color: var(--muted);
  font-size: 12px;
}

/* --------------------------------------------------------------------------
   RESPONSIVE DESIGN
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; }
  .kd-story-gate { grid-template-columns: 1fr; }
  .cards { grid-template-columns: 1fr; }
  .kd-symbol-grid { grid-template-columns: repeat(2, 1fr); }
  .kd-lore-columns { grid-template-columns: 1fr; }
  .kd-mp-home-features { grid-template-columns: repeat(2, 1fr); }
  .faction-grid.five-columns { grid-template-columns: repeat(3, 1fr); }
  .kd-strategy-grid { grid-template-columns: repeat(2, 1fr); }
  .showcase { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .kd-compat-nav { padding: 12px 18px; flex-direction: column; gap: 10px; }
  .hero { padding: 30px 18px; }
  .hero-copy h1 { font-size: 32px; }
  .kd-symbol-grid { grid-template-columns: 1fr; }
  .kd-mp-home-features { grid-template-columns: 1fr; }
  .faction-grid.five-columns { grid-template-columns: 1fr; }
  .kd-strategy-grid { grid-template-columns: 1fr; }
}


/* Session Banner */
.kd-landing-session-banner {
  width: min(1280px, calc(100% - 40px));
  margin: 20px auto 30px;
  padding: 16px 24px;
  background: linear-gradient(135deg, rgba(30, 16, 10, 0.95), rgba(18, 10, 6, 0.98));
  border: 1px solid var(--gold);
  border-radius: 4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 4px 20px rgba(0,0,0,0.8);
}
.kd-landing-session-banner strong { color: var(--gold-bright); font-size: 16px; }
.kd-landing-session-banner p { color: var(--text-dim); font-size: 14px; margin: 0; }
.kd-landing-session-banner a { color: var(--gold); font-weight: 700; text-decoration: underline; margin-left: 12px; }

.scene {
  aspect-ratio: 16 / 11;
  display: flex;
  flex-direction: column;
}
.scene a {
  display: block;
  width: 100%;
  height: 100%;
  position: relative;
}


/* Logged in Wide Banner */
.kd-logged-wide-final {
  width: min(1280px, calc(100% - 40px));
  margin: 30px auto 40px;
  padding: 24px 32px;
  background: linear-gradient(135deg, rgba(28, 16, 10, 0.96) 0%, rgba(14, 8, 5, 0.98) 100%);
  border: 1px solid var(--gold);
  border-radius: 6px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.9), inset 0 0 15px rgba(209, 160, 84, 0.15);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.kd-wide-copy small {
  display: block;
  font-size: 11px;
  font-weight: 900;
  color: var(--crimson-bright);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.kd-wide-copy h2 {
  font-size: 24px;
  color: var(--gold-bright);
  margin-bottom: 4px;
}

.kd-wide-copy p {
  color: var(--text-dim);
  font-size: 14px;
  margin: 0;
}

.kd-wide-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.kd-wide-actions a, .kd-wide-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  font-family: var(--font-serif);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.kd-wide-actions a:first-child {
  background: var(--crimson);
  border: 1px solid var(--gold);
  color: #fff;
  box-shadow: 0 0 12px rgba(163, 38, 38, 0.5);
}

.kd-wide-actions a:first-child:hover {
  background: #bf2e2e;
  box-shadow: 0 0 18px rgba(163, 38, 38, 0.8);
}

.kd-wide-actions a:nth-child(2) {
  background: rgba(20, 12, 8, 0.8);
  border: 1px solid var(--gold-dim);
  color: var(--text);
}

.kd-wide-actions a:nth-child(2):hover {
  background: rgba(209, 160, 84, 0.15);
  border-color: var(--gold);
  color: var(--gold-bright);
}

.kd-wide-actions button#kdLandingLogoutFinal {
  background: transparent;
  border: 1px solid rgba(163, 38, 38, 0.4);
  color: var(--muted);
}

.kd-wide-actions button#kdLandingLogoutFinal:hover {
  border-color: var(--crimson-bright);
  color: #fff;
  background: rgba(163, 38, 38, 0.2);
}


/* ==========================================================================
   ANCIENT BASALT & GOTHIC CARVED STONE FRAMING SYSTEM
   ========================================================================== */

.kd-hero-reliquary-shrine,
.kd-story-gate,
.cards article,
.kd-symbol-band,
.symbol-card,
.kd-lore-band,
.kd-lore-card,
.kd-mp-home-v1,
.mp-feature-card,
.scene,
.factions,
.faction-card,
.kd-strategy-band,
.strategy-card,
.kd-create-character-home-v1,
.kd-logged-wide-final {
  border: 5px solid #1a100a !important;
  border-top-color: #3a2215 !important;
  border-bottom-color: #080402 !important;
  border-left-color: #28160e !important;
  border-right-color: #120a06 !important;
  background-color: #0d0704 !important;
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(209, 160, 84, 0.06), transparent 45%),
    radial-gradient(circle at 85% 85%, rgba(163, 38, 38, 0.06), transparent 45%),
    linear-gradient(145deg, rgba(26, 15, 9, 0.96) 0%, rgba(10, 5, 3, 0.98) 100%) !important;
  box-shadow: 
    0 18px 50px rgba(0, 0, 0, 0.95),
    inset 0 0 0 1px rgba(209, 160, 84, 0.28),
    inset 0 0 30px rgba(0, 0, 0, 0.9),
    inset 0 3px 6px rgba(209, 160, 84, 0.25),
    inset 0 -3px 6px rgba(0, 0, 0, 0.8) !important;
  border-radius: 4px !important;
  position: relative;
}

/* Gold corner rivets on major stone panels */
.kd-symbol-band::before,
.kd-lore-band::before,
.kd-mp-home-v1::before,
.factions::before,
.kd-strategy-band::before,
.kd-create-character-home-v1::before,
.kd-story-gate::before {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(209, 160, 84, 0.2);
  pointer-events: none;
  border-radius: 2px;
}

/* Hover effect on clickable stone cards */
.cards article:hover,
.symbol-card:hover,
.mp-feature-card:hover,
.faction-card:hover,
.strategy-card:hover,
.scene:hover {
  border-top-color: #52301e !important;
  border-color: #2e1a10 !important;
  box-shadow: 
    0 22px 60px rgba(0, 0, 0, 0.98),
    0 0 25px rgba(209, 160, 84, 0.28),
    inset 0 0 0 1px rgba(209, 160, 84, 0.45),
    inset 0 0 35px rgba(0, 0, 0, 0.85) !important;
  transform: translateY(-4px);
}


/* ==========================================================================
   KAELEN DOUR — HIGH-END MOBILE RESPONSIVE SYSTEM (SMARTPHONE & TABLET)
   ========================================================================== */

@media screen and (max-width: 768px) {

  /* 1. TOP NAVBAR MOBILE */
  .kd-compat-nav {
    padding: 10px 14px !important;
    flex-direction: column !important;
    gap: 10px !important;
    background: rgba(13, 8, 6, 0.98) !important;
    border-bottom: 2px solid #d1a054 !important;
  }

  .kd-compat-nav .kd-brand {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    width: 100% !important;
    text-align: center !important;
  }

  .kd-compat-nav .kd-brand img {
    width: 34px !important;
    height: 34px !important;
  }

  .kd-compat-nav .kd-brand span {
    font-size: 17px !important;
    letter-spacing: 2px !important;
  }

  .kd-compat-nav .kd-brand small {
    font-size: 9px !important;
    letter-spacing: 1.5px !important;
    display: block !important;
  }

  .kd-compat-nav nav {
    width: 100% !important;
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 6px !important;
  }

  .kd-compat-nav nav a {
    padding: 6px 12px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    letter-spacing: 1px !important;
    border-radius: 4px !important;
    background: rgba(20, 12, 8, 0.85) !important;
    border: 1px solid rgba(209, 160, 84, 0.25) !important;
  }

  .kd-compat-nav nav a.nav-register,
  .kd-compat-nav nav a:nth-child(2) {
    background: linear-gradient(135deg, rgba(209,160,84,0.3), rgba(163,38,38,0.3)) !important;
    border-color: #d1a054 !important;
    color: #ffd166 !important;
  }

  /* 2. AUDIO PLAYER COMPATTO SUI TELEFONI */
  .kd-creation-music-player,
  .kd-music-container,
  [data-kd-music-player] {
    padding: 6px 12px !important;
    margin: 8px 10px !important;
    border-radius: 6px !important;
    font-size: 12px !important;
    border: 1px solid rgba(209,160,84,0.3) !important;
    background: rgba(13,8,6,0.92) !important;
  }

  /* 3. HERO BANNER MOBILE */
  .hero {
    padding: 30px 14px 20px !important;
    min-height: auto !important;
  }

  .hero-grid {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }

  .hero-copy {
    padding: 20px 14px !important;
    text-align: center !important;
  }

  .kicker, .eyebrow {
    font-size: 11px !important;
    letter-spacing: 2px !important;
    margin-bottom: 10px !important;
  }

  h1 {
    font-size: clamp(26px, 7.5vw, 36px) !important;
    line-height: 1.15 !important;
    letter-spacing: 0.5px !important;
    margin-bottom: 14px !important;
    word-break: break-word !important;
  }

  .lead, p {
    font-size: 15px !important;
    line-height: 1.65 !important;
  }

  .hero-actions, .cta-actions, .kdgm-actions {
    flex-direction: column !important;
    width: 100% !important;
    gap: 10px !important;
  }

  .btn, .kdgm-btn, a.btn {
    width: 100% !important;
    min-height: 48px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 14px !important;
    letter-spacing: 1.5px !important;
    padding: 12px 20px !important;
  }

  /* 4. TUTTE LE SEZIONI E GRIGLIE A COLONNA SINGOLA */
  .section, .factions, .kd-strategy-band, .kd-story-gate, .kd-mp-home-v1 {
    padding: 30px 14px !important;
    margin: 16px 8px !important;
  }

  .section-heading h2 {
    font-size: 24px !important;
    line-height: 1.2 !important;
  }

  .faction-grid, .five-columns, .kd-strategy-grid, .cards, .grid, .kd-guide-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  .faction-card, .strategy-card, .symbol-card, .kd-guide-card {
    margin: 0 !important;
    width: 100% !important;
  }

  .faction-img-wrap {
    height: 180px !important;
  }

  .faction-content, .strategy-card {
    padding: 18px 14px !important;
  }

  /* 5. FOOTER MOBILE */
  .kd-compat-footer, .kd-footer {
    padding: 30px 16px 80px !important;
    text-align: center !important;
  }

  .footer-inner, .kd-footer__inner {
    flex-direction: column !important;
    gap: 20px !important;
  }

  .footer-links, .kd-footer__links {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 12px !important;
  }
}


/* ==========================================================================
   KAELEN DOUR — NOBLE GOTHIC FOOTER & CONTAINER SYSTEM (DESKTOP + MOBILE)
   ========================================================================== */

.kd-container, .kd-compat-container, .kdgm-wrap, .wrap {
  width: min(calc(100% - 40px), 1320px) !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

.kd-footer, .kd-compat-footer, .kdgm-footer {
  width: 100% !important;
  background: rgba(10, 5, 3, 0.98) !important;
  border-top: 2px solid #d1a054 !important;
  padding: 40px 20px 50px !important;
  margin-top: 60px !important;
  box-shadow: 0 -10px 30px rgba(0,0,0,0.9) !important;
  position: relative !important;
  z-index: 20 !important;
  box-sizing: border-box !important;
}

.kd-footer__inner, .footer-inner {
  width: min(calc(100% - 40px), 1320px) !important;
  margin: 0 auto 24px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex-wrap: wrap !important;
  gap: 24px !important;
  padding-bottom: 20px !important;
  border-bottom: 1px solid rgba(209, 160, 84, 0.2) !important;
}

.kd-footer__brand strong, .footer-brand strong {
  font-family: 'Cinzel', serif !important;
  font-size: 20px !important;
  color: #d1a054 !important;
  letter-spacing: 2px !important;
  display: block !important;
  margin-bottom: 4px !important;
}

.kd-footer__brand p, .footer-brand p {
  color: #a89880 !important;
  font-size: 14px !important;
  margin: 0 !important;
}

.kd-footer__links, .footer-links {
  display: flex !important;
  align-items: center !important;
  gap: 18px !important;
  flex-wrap: wrap !important;
}

.kd-footer__links a, .footer-links a {
  color: #f0e6d2 !important;
  font-family: 'Cinzel', serif !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 1px !important;
  text-decoration: none !important;
  transition: color 0.2s ease !important;
}

.kd-footer__links a:hover, .footer-links a:hover {
  color: #ffd166 !important;
  text-shadow: 0 0 10px rgba(209,160,84,0.5) !important;
}

.kd-footer__bottom, .footer-bottom {
  width: min(calc(100% - 40px), 1320px) !important;
  margin: 0 auto !important;
  text-align: center !important;
  color: #a89880 !important;
  font-size: 12px !important;
  letter-spacing: 1.5px !important;
  text-transform: uppercase !important;
}

@media (max-width: 768px) {
  .kd-footer__inner, .footer-inner {
    flex-direction: column !important;
    text-align: center !important;
    gap: 16px !important;
  }
  .kd-footer__links, .footer-links {
    justify-content: center !important;
    gap: 12px !important;
  }
}

/* KD RTS: one main navigation entry; does not change the GDR landing layout. */
.kd-compat-nav nav a.kd-nav-rts{color:#f4d8a1;border:1px solid rgba(218,175,101,.7);background:linear-gradient(110deg,rgba(95,56,34,.7),rgba(41,52,38,.72));font-weight:800;letter-spacing:.06em;white-space:nowrap}
.kd-compat-nav nav a.kd-nav-rts:hover{background:linear-gradient(110deg,#65482f,#374c36);box-shadow:0 0 14px rgba(212,172,104,.24)}
