.kingdom-entry {
  position: relative;
  display: grid;
  align-items: end;
  isolation: isolate;
  min-height: clamp(225px, 28vw, 380px);
  margin-block: 12px 24px;
  overflow: hidden;
  border: 3px solid #ffe08d;
  border-radius: 28px;
  background: #183a66;
  color: #fff9e7;
  box-shadow: 0 6px 0 #765322, 0 14px 30px #12213f55;
}

.kingdom-entry > img {
  position: absolute;
  inset: 0;
  z-index: -3;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 56%;
}

.kingdom-entry::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(0deg, #091b35 0%, #091b35c9 20%, #091b3500 68%);
  content: "";
}

.kingdom-entry-copy { padding: clamp(14px, 3vw, 30px); }
.kingdom-gate { display: none; }
.kingdom-entry h1 {
  margin: 0 0 6px;
  color: inherit;
  font-size: clamp(1.5rem, 4vw, 2.75rem);
  line-height: 1.15;
}
.kingdom-entry p { margin: 0; }

.kingdom-entry-copy .story-chapter {
  display: inline-block;
  margin-block-end: 7px;
  padding: 4px 11px;
  border: 1px solid #ffe08d;
  border-radius: 999px;
  background: #14294b;
  color: #fff0c4;
  font-weight: 750;
}

.kingdom-entry-copy .story-opening {
  max-inline-size: 38ch;
  font-size: clamp(1rem, 2.1vw, 1.25rem);
  line-height: 1.5;
}

@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }


  .kingdom-entry > img { animation: kingdom-landscape 700ms ease-out both; }

  .kingdom-gate {
    position: absolute;
    inset: 0;
    z-index: -2;
    display: block;
    pointer-events: none;
  }

  .kingdom-gate::before,
  .kingdom-gate::after {
    position: absolute;
    inset-block: 0;
    width: 50%;
    box-sizing: border-box;
    background: repeating-linear-gradient(90deg, #fff6 0 1px, transparent 1px 30px),
      linear-gradient(135deg, #25466e, #10264b);
    border: 3px solid #efce81;
    content: "";
    animation: kingdom-gate-open 700ms cubic-bezier(.32, .64, .35, 1) both;
  }

  .kingdom-gate::before { left: 0; --exit: -101%; }
  .kingdom-gate::after { right: 0; --exit: 101%; }

  @keyframes kingdom-gate-open {
    0%, 12% { transform: none; }
    100% { transform: translateX(var(--exit)); }
  }

  @keyframes kingdom-depart {
    to { opacity: .25; transform: scale(.985); }
  }
  @keyframes kingdom-arrive {
    from { opacity: .2; transform: scale(1.025); }
    to { opacity: 1; transform: none; }
  }
  @keyframes kingdom-landscape {
    from { transform: scale(1.10); }
    to { transform: none; }
  }
}

/* ---------- v34: hero, parent strip, map as secondary ---------- */
.home-hero34{display:grid;grid-template-columns:1.4fr .6fr;gap:18px;align-items:center;margin:8px 0 14px;padding:clamp(18px,3vw,34px);border:4px solid #ffdc63;border-radius:28px;background:linear-gradient(135deg,#16386e,#1f5cab 70%,#2a7fd4);color:#fff9e7;box-shadow:0 8px 0 #0b2247,0 18px 40px #03163a88}
.home-hero34-kicker{display:inline-block;margin:0 0 10px;padding:6px 14px;border-radius:999px;background:#ffffff22;border:1px solid #ffe08d;color:#fff0c4;font-weight:750;font-size:.95rem}
.home-hero34 h2{margin:0 0 10px;font-size:clamp(1.5rem,3.6vw,2.6rem);line-height:1.2;color:#fff;text-shadow:0 2px 0 #0b2247}
.home-hero34-lead{margin:0 0 18px;font-size:clamp(1rem,1.6vw,1.25rem);line-height:1.6;max-width:60ch}
.home-hero34-actions{display:flex;flex-wrap:wrap;gap:12px}
.hero-cta{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:56px;padding:12px 24px;border-radius:20px;border:3px solid #fff4c6;background:linear-gradient(#fff8b3,#ffc334);color:#502f05;font-weight:900;font-size:clamp(1.05rem,1.7vw,1.35rem);text-decoration:none;cursor:pointer;box-shadow:0 5px 0 #9b5c00;font-family:inherit}
.hero-cta:hover{filter:brightness(1.05)}
.hero-cta:active{transform:translateY(3px);box-shadow:0 2px 0 #9b5c00}
.hero-cta:focus-visible{outline:4px solid #fff;outline-offset:3px}
.hero-cta-main{background:linear-gradient(#b5f7d9,#2fd38a);border-color:#e4fff1;color:#063a22;box-shadow:0 5px 0 #0f7a4a;font-size:clamp(1.2rem,2vw,1.6rem);min-height:64px}
.hero-cta-main:active{box-shadow:0 2px 0 #0f7a4a}
.hero-cta-share{background:linear-gradient(#dcfce7,#25d366);border-color:#e4fff1;color:#063a22;box-shadow:0 5px 0 #128c4a}
.hero-cta-quiet{background:#ffffff22;border-color:#ffffff66;color:#fff9e7;box-shadow:none}
.home-hero34-note{margin:12px 0 0;min-height:1.4em;color:#ffe9a8;font-weight:700}
.home-hero34-note:empty{display:none}
.home-hero34-art{width:min(100%,260px);height:auto;justify-self:center;border-radius:40%;mask-image:linear-gradient(black 80%,transparent 100%);filter:drop-shadow(0 10px 10px #03163a99)}
.home-topbar34{display:flex;align-items:center;gap:10px;margin:6px 0 10px}.home-topbar34>.parent-strip34{flex:1;margin:0}.home-topbar34>#question-fullscreen{flex:none;margin:0}
.parent-strip34{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px 14px;margin:0;padding:6px 12px;border-radius:14px;background:#ffffffe8;border:2px solid #ffe08d;color:#213253;box-shadow:0 3px 0 #c9a04a44}
.parent-strip34-points{display:flex;flex-wrap:wrap;gap:4px 18px;margin:0;padding:0;list-style:none}
.parent-strip34-points li{display:flex;align-items:center;gap:6px;white-space:nowrap}
.parent-strip34-points li>span{font-size:1.1rem}
.parent-strip34-points strong{font-size:.82rem;color:#16386e}
.parent-strip34-points small{display:none}
.parent-strip34-actions{display:flex;flex-wrap:wrap;gap:6px;align-items:center}
.parent-strip34-actions .hero-cta{min-height:32px;font-size:.8rem;padding:4px 10px;border-width:2px;border-radius:12px;box-shadow:0 2px 0 #9b5c00}
.parent-strip34-actions .hero-cta-share{box-shadow:0 2px 0 #128c4a}
.parent-strip34-actions .hero-cta-quiet{background:#16386e12;border-color:#16386e55;color:#16386e;box-shadow:none}
.royal-home .scene{margin-top:4px}
@media(max-width:900px){.home-topbar34{flex-direction:column;align-items:stretch}.home-hero34{grid-template-columns:1fr;gap:10px}.home-hero34-art{width:min(38%,150px);order:-1}.parent-strip34{justify-content:center}.parent-strip34-points{justify-content:center}.parent-strip34-actions{justify-content:center}.parent-strip34-actions .hero-cta{flex:1 1 auto}}
@media(max-width:700px){.royal-home .scene{display:none}.home-hero34-actions .hero-cta{flex:1 1 100%}}
@media(prefers-reduced-motion:reduce){.hero-cta:active{transform:none}}

.home-player35 {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: .4rem 1rem;
  color: #16386e;
  font-size: clamp(1rem, 2.5vw, 1.35rem);
}
.home-player35 strong { overflow-wrap: anywhere; font-size: 1.15em; }
.royal-home .home-credit35 { font-size: clamp(1.05rem, 2.5vw, 1.3rem); }
.royal-home .home-credit35 strong { color: #ffe38c; font-size: 1.2em; }

/* Comfortable touch targets and wrapping for long profile names. */
.royal-home .parent-strip34-actions .hero-cta { min-height: 44px; }
.home-player35 { min-width: 0; max-width: 100%; }
.home-player35 strong { min-width: 0; }

.royal-home .site-brand { flex-wrap: wrap; }
#home-games-link { margin-inline-start: auto; }
@media (max-width: 480px) {
  .royal-home .site-brand > div { flex: 1; min-inline-size: 0; }
  #home-games-link { flex-basis: 100%; margin: 0; }
}
