/*
  Next staging polish layer.
  This keeps the live static site untouched while tuning the rewritten Next UI
  to the original MythmereCraft logo: dark stone, cyan rift light, magenta magic,
  and carved gold game-panel trim.
*/

:root {
  --bg: #05070d;
  --bg-soft: #090f18;
  --panel: #101823;
  --panel-2: #15101d;
  --line: rgba(245, 207, 126, 0.18);
  --text: #fff2d2;
  --muted: rgba(255, 242, 210, 0.74);
  --muted-2: rgba(255, 242, 210, 0.56);
  --gold: #d49a3b;
  --gold-2: #ffe08a;
  --cyan: #21f3f0;
  --cyan-soft: rgba(33, 243, 240, 0.24);
  --magenta: #e83cff;
  --magenta-soft: rgba(232, 60, 255, 0.2);
  --stone: #1b2028;
  --shadow: 0 30px 100px rgba(0, 0, 0, 0.58);
  --radius: 10px;
  --radius-lg: 18px;
}

html {
  background: #05070d;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(
      circle at 50% -8%,
      rgba(33, 243, 240, 0.22),
      transparent 26rem
    ),
    radial-gradient(
      circle at 78% 12%,
      rgba(232, 60, 255, 0.18),
      transparent 23rem
    ),
    radial-gradient(
      circle at 18% 22%,
      rgba(212, 154, 59, 0.13),
      transparent 22rem
    ),
    linear-gradient(180deg, #05070d 0%, #080d15 38%, #05070d 100%);
  color: var(--text);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  opacity: 0.38;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.026) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.026) 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: radial-gradient(circle at 50% 12%, #000 0%, transparent 70%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(
      90deg,
      rgba(0, 0, 0, 0.58),
      transparent 18%,
      transparent 82%,
      rgba(0, 0, 0, 0.58)
    ),
    radial-gradient(
      circle at 50% 50%,
      transparent 0%,
      rgba(0, 0, 0, 0.34) 72%,
      rgba(0, 0, 0, 0.72) 100%
    );
}

.page-shell {
  position: relative;
  isolation: isolate;
}

.topbar {
  width: min(1280px, calc(100vw - 36px));
  grid-template-columns: auto minmax(400px, 1fr) auto;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid rgba(255, 224, 138, 0.2);
  background:
    linear-gradient(180deg, rgba(12, 17, 26, 0.86), rgba(5, 8, 14, 0.78)),
    radial-gradient(
      circle at 0% 50%,
      rgba(33, 243, 240, 0.11),
      transparent 28rem
    ),
    radial-gradient(
      circle at 100% 50%,
      rgba(232, 60, 255, 0.11),
      transparent 26rem
    );
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 -1px 0 rgba(0, 0, 0, 0.42);
}

.topbar::before,
.topbar::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 18px;
  height: 18px;
  border: 1px solid rgba(255, 224, 138, 0.42);
  background:
    radial-gradient(circle, rgba(33, 243, 240, 0.45), transparent 58%),
    rgba(6, 9, 15, 0.92);
  transform: translateY(-50%) rotate(45deg);
  box-shadow: 0 0 22px rgba(33, 243, 240, 0.22);
}

.topbar::before {
  left: -9px;
}

.topbar::after {
  right: -9px;
}

.brand {
  gap: 12px;
}

.brand-logo {
  width: 98px;
  height: 54px;
  filter: drop-shadow(0 0 12px rgba(33, 243, 240, 0.32))
    drop-shadow(0 10px 18px rgba(0, 0, 0, 0.62));
}

.brand-name {
  font-size: 0.9rem;
  color: #ffe7a6;
  text-shadow: 0 0 14px rgba(255, 184, 70, 0.22);
}

.brand-subtitle {
  color: rgba(33, 243, 240, 0.72);
  font-size: 0.72rem;
}

.nav {
  gap: 8px;
  flex-wrap: nowrap;
}

.nav a {
  position: relative;
  padding: 10px 11px;
  border: 1px solid rgba(255, 224, 138, 0.1);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.025);
  color: rgba(255, 242, 210, 0.74);
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 5px;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(33, 243, 240, 0.72),
    transparent
  );
  opacity: 0;
  transform: scaleX(0.2);
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

.nav a:hover {
  color: #fff8e6;
  border-color: rgba(33, 243, 240, 0.34);
  background: rgba(33, 243, 240, 0.07);
}

.nav a:hover::after {
  opacity: 1;
  transform: scaleX(1);
}

.button {
  position: relative;
  min-height: 44px;
  padding-inline: 16px;
  border-radius: 10px;
  letter-spacing: 0.02em;
  transform: translateZ(0);
}

.button::before {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: inherit;
  border: 1px solid rgba(255, 255, 255, 0.06);
  pointer-events: none;
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  border-color: rgba(255, 226, 141, 0.68);
  background:
    linear-gradient(
      180deg,
      rgba(255, 236, 156, 0.95),
      rgba(194, 123, 30, 0.95)
    ),
    radial-gradient(
      circle at 50% 0%,
      rgba(255, 255, 255, 0.38),
      transparent 58%
    );
  color: #211104;
  box-shadow:
    0 14px 32px rgba(212, 154, 59, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.34);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.24);
}

.button-secondary {
  border-color: rgba(33, 243, 240, 0.2);
  background:
    linear-gradient(180deg, rgba(17, 28, 39, 0.84), rgba(8, 12, 19, 0.86)),
    radial-gradient(circle at 0% 0%, rgba(33, 243, 240, 0.12), transparent 70%);
  color: #fdf1cf;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.button-secondary:hover {
  border-color: rgba(33, 243, 240, 0.48);
  box-shadow:
    0 12px 28px rgba(33, 243, 240, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.09);
}

.button-discord {
  border-radius: 10px;
  background: linear-gradient(180deg, #7180ff 0%, #5865f2 45%, #3542bd 100%);
  border-color: rgba(174, 189, 255, 0.56);
  color: #fff;
  box-shadow:
    0 14px 30px rgba(88, 101, 242, 0.34),
    0 0 26px rgba(88, 101, 242, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.button-discord:hover {
  background: linear-gradient(180deg, #8995ff 0%, #6470ff 45%, #4350d4 100%);
  border-color: rgba(218, 225, 255, 0.72);
  box-shadow:
    0 18px 34px rgba(88, 101, 242, 0.42),
    0 0 34px rgba(88, 101, 242, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.discord-logo {
  width: 19px;
  height: 19px;
}

.button-ip,
.footer-ip {
  border-color: rgba(33, 243, 240, 0.32);
  background:
    linear-gradient(180deg, rgba(8, 15, 23, 0.9), rgba(8, 11, 17, 0.9)),
    radial-gradient(
      circle at 12% 50%,
      rgba(33, 243, 240, 0.16),
      transparent 60%
    );
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 0 22px rgba(33, 243, 240, 0.08);
}

.button-ip:hover,
.footer-ip:hover {
  border-color: rgba(33, 243, 240, 0.6);
  background:
    linear-gradient(180deg, rgba(12, 25, 34, 0.92), rgba(8, 13, 19, 0.9)),
    radial-gradient(
      circle at 12% 50%,
      rgba(33, 243, 240, 0.22),
      transparent 60%
    );
}

.server-count,
.copy-hint {
  color: #05070d;
  background: linear-gradient(180deg, #23fff9, #0db8d7);
  box-shadow: 0 0 16px rgba(33, 243, 240, 0.22);
}

.status-dot,
.hero-ip-box .status-pulse {
  background: #21f3f0;
  box-shadow: 0 0 16px rgba(33, 243, 240, 0.88);
}

@keyframes pulse-green {
  0% {
    box-shadow:
      0 0 0 0 rgba(33, 243, 240, 0.72),
      0 0 14px rgba(33, 243, 240, 0.88);
  }
  70% {
    box-shadow:
      0 0 0 8px rgba(33, 243, 240, 0),
      0 0 18px rgba(33, 243, 240, 0.72);
  }
  100% {
    box-shadow:
      0 0 0 0 rgba(33, 243, 240, 0),
      0 0 14px rgba(33, 243, 240, 0.88);
  }
}

.hero {
  width: min(1450px, calc(100vw - 28px));
  min-height: 88vh;
  margin-top: 18px;
  border-radius: 22px;
  border: 1px solid rgba(255, 224, 138, 0.22);
  background:
    linear-gradient(180deg, rgba(9, 13, 20, 0.92), rgba(5, 7, 12, 0.96)),
    #05070d;
  box-shadow:
    0 34px 110px rgba(0, 0, 0, 0.66),
    0 0 0 1px rgba(33, 243, 240, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.hero::before,
.showcase-hero::before,
.join-panel::before,
.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background:
    linear-gradient(
        90deg,
        rgba(255, 224, 138, 0.72),
        transparent 22%,
        transparent 78%,
        rgba(255, 224, 138, 0.72)
      )
      top / 100% 1px no-repeat,
    linear-gradient(
        90deg,
        rgba(33, 243, 240, 0.48),
        transparent 30%,
        transparent 70%,
        rgba(232, 60, 255, 0.48)
      )
      bottom / 100% 1px no-repeat;
  opacity: 0.75;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    radial-gradient(
      circle at 50% 18%,
      rgba(33, 243, 240, 0.18),
      transparent 22rem
    ),
    radial-gradient(
      circle at 28% 52%,
      rgba(232, 60, 255, 0.14),
      transparent 24rem
    ),
    linear-gradient(
      90deg,
      rgba(5, 7, 13, 0.78),
      transparent 42%,
      rgba(5, 7, 13, 0.42)
    );
  mix-blend-mode: screen;
}

.hero-art {
  filter: saturate(1.12) contrast(1.08) brightness(0.82);
  transform: scale(1.025);
}

.hero-overlay {
  background:
    linear-gradient(
      90deg,
      rgba(4, 6, 11, 0.94) 0%,
      rgba(4, 6, 11, 0.78) 28%,
      rgba(4, 6, 11, 0.28) 64%,
      rgba(4, 6, 11, 0.58) 100%
    ),
    linear-gradient(180deg, rgba(4, 6, 11, 0.1) 0%, rgba(4, 6, 11, 0.76) 100%);
}

.hero-content {
  width: min(640px, calc(100% - 56px));
  padding-top: clamp(96px, 12vh, 144px);
}

.eyebrow,
.section-kicker {
  color: #ffe08a;
  text-shadow:
    0 0 14px rgba(255, 224, 138, 0.28),
    0 0 22px rgba(232, 60, 255, 0.14);
}

.hero-logo {
  width: min(650px, 112%);
  margin: 8px 0 0 -36px;
  filter: drop-shadow(0 0 18px rgba(33, 243, 240, 0.42))
    drop-shadow(0 0 26px rgba(232, 60, 255, 0.28))
    drop-shadow(0 28px 52px rgba(0, 0, 0, 0.7));
}

.hero-copy {
  max-width: 54ch;
  color: rgba(255, 242, 210, 0.84);
  font-size: clamp(1.02rem, 1.1vw, 1.15rem);
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.65);
}

.hero-ip-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px 14px;
  max-width: 560px;
  padding: 12px 14px;
  border-radius: 14px;
  border-color: rgba(33, 243, 240, 0.34);
  background:
    linear-gradient(180deg, rgba(8, 16, 25, 0.82), rgba(4, 7, 13, 0.78)),
    radial-gradient(circle at 0% 0%, rgba(33, 243, 240, 0.14), transparent 70%);
  box-shadow:
    0 18px 44px rgba(0, 0, 0, 0.38),
    0 0 34px rgba(33, 243, 240, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.hero-ip-box .ip-main {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 12px;
}

.hero-ip-box .ip-texts {
  min-width: 0;
}

.hero-ip-box:hover {
  border-color: rgba(33, 243, 240, 0.62);
  background:
    linear-gradient(180deg, rgba(10, 27, 37, 0.86), rgba(5, 9, 15, 0.8)),
    radial-gradient(circle at 0% 0%, rgba(33, 243, 240, 0.2), transparent 70%);
  box-shadow:
    0 22px 50px rgba(0, 0, 0, 0.42),
    0 0 36px rgba(33, 243, 240, 0.2);
}

.hero-ip-box .ip-label,
.hero-ip-box .ip-version {
  color: #23fff9;
}

.hero-ip-box .ip-value {
  display: block;
  max-width: 300px;
  overflow: hidden;
  font-size: clamp(1rem, 1.6vw, 1.25rem);
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #fff7dc;
  text-shadow: 0 0 14px rgba(33, 243, 240, 0.22);
}

.hero-ip-box .server-meta {
  display: flex;
  flex-wrap: wrap;
  grid-column: 1 / -1;
  gap: 7px;
}

.hero-ip-box .copy-btn-inner {
  grid-column: 2;
  grid-row: 1;
  min-height: 40px;
  padding: 0 8px;
  white-space: nowrap;
}

.hero-ip-box .copy-btn-inner {
  border: 1px solid rgba(255, 224, 138, 0.34);
  color: #ffe08a;
  background: rgba(212, 154, 59, 0.13);
}

.hero-points span,
.meta-pill,
.join-note {
  border-radius: 8px;
  border-color: rgba(255, 224, 138, 0.15);
  background:
    linear-gradient(180deg, rgba(20, 27, 36, 0.66), rgba(8, 12, 18, 0.62)),
    radial-gradient(circle at 0% 50%, rgba(33, 243, 240, 0.08), transparent 70%);
}

.hero-account-panel {
  top: 54%;
  width: min(410px, calc(100% - 96px));
}

.hero-account-panel .account-card,
.profile-page .account-card,
.stat,
.feature-card,
.roadmap-item,
.news-card,
.content-hero,
.wiki-card,
.rule-card,
.topup-card,
.profile-panel {
  border-color: rgba(255, 224, 138, 0.16);
  background:
    linear-gradient(180deg, rgba(18, 24, 33, 0.84), rgba(7, 10, 16, 0.88)),
    radial-gradient(circle at 0% 0%, rgba(33, 243, 240, 0.08), transparent 68%),
    radial-gradient(
      circle at 100% 0%,
      rgba(232, 60, 255, 0.07),
      transparent 64%
    );
  box-shadow:
    0 22px 60px rgba(0, 0, 0, 0.36),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.account-tabs {
  border-radius: 12px;
  background: rgba(4, 7, 12, 0.52);
}

.account-tab {
  border-radius: 8px;
}

.account-tab:hover,
.account-tab.is-active {
  color: #06080d;
  background: linear-gradient(180deg, #25f9f4, #12b9d5);
}

.account-form input,
.profile-form input,
.topup-input {
  border-color: rgba(33, 243, 240, 0.18);
  background: rgba(4, 7, 12, 0.64);
  color: #fff2d2;
}

.section {
  position: relative;
}

.section::before {
  content: "";
  display: block;
  width: min(520px, 70vw);
  height: 1px;
  margin: 0 0 34px;
  background: linear-gradient(
    90deg,
    rgba(255, 224, 138, 0.7),
    rgba(33, 243, 240, 0.48),
    transparent
  );
  box-shadow: 0 0 18px rgba(33, 243, 240, 0.18);
}

.section-heading h2,
.showcase-copy h2,
.join-panel h2,
.content-hero h1,
.profile-hero h1 {
  color: #fff3cf;
  text-shadow:
    0 0 24px rgba(255, 224, 138, 0.1),
    0 8px 30px rgba(0, 0, 0, 0.58);
}

.stat,
.feature-card {
  position: relative;
  overflow: hidden;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.stat::after,
.feature-card::after,
.roadmap-item::after {
  content: "";
  position: absolute;
  inset: auto 18px 12px;
  height: 2px;
  background: linear-gradient(
    90deg,
    rgba(33, 243, 240, 0.68),
    rgba(232, 60, 255, 0.54),
    transparent
  );
  opacity: 0.46;
}

.stat:hover,
.feature-card:hover {
  transform: translateY(-5px);
  border-color: rgba(33, 243, 240, 0.36);
  box-shadow:
    0 26px 70px rgba(0, 0, 0, 0.45),
    0 0 34px rgba(33, 243, 240, 0.12);
}

.stat-label {
  color: #23fff9;
}

.stat strong,
.feature-card h3,
.roadmap-item h3 {
  color: #fff3cf;
}

.feature-card:nth-child(even) {
  background:
    linear-gradient(180deg, rgba(22, 18, 32, 0.84), rgba(7, 10, 16, 0.88)),
    radial-gradient(
      circle at 100% 0%,
      rgba(232, 60, 255, 0.12),
      transparent 68%
    );
}

.slideshow-shell,
.showcase-hero,
.system-image-card,
.join-panel,
.site-footer {
  position: relative;
  border-color: rgba(255, 224, 138, 0.2);
  background:
    linear-gradient(180deg, rgba(11, 17, 25, 0.94), rgba(4, 7, 12, 0.96)),
    radial-gradient(circle at 15% 0%, rgba(33, 243, 240, 0.1), transparent 50%),
    radial-gradient(circle at 88% 0%, rgba(232, 60, 255, 0.08), transparent 50%);
}

.slideshow-shell {
  border-radius: 18px;
  box-shadow:
    0 30px 90px rgba(0, 0, 0, 0.48),
    0 0 0 1px rgba(33, 243, 240, 0.08);
}

.slideshow-caption span,
.system-image-card > div > span,
.roadmap-item span {
  color: #05070d;
  border-color: rgba(33, 243, 240, 0.54);
  background: linear-gradient(180deg, #2ffffa, #0ab5d3);
  box-shadow: 0 0 18px rgba(33, 243, 240, 0.18);
}

.slideshow-dots button.is-active {
  background: linear-gradient(90deg, #23fff9, #e83cff);
  box-shadow: 0 0 18px rgba(33, 243, 240, 0.28);
}

.showcase-hero {
  border-radius: 20px;
  min-height: 560px;
}

.showcase-hero img,
.system-image-card img,
.slideshow-slide img {
  filter: saturate(1.08) contrast(1.08) brightness(0.86);
}

.showcase-hero::after,
.system-image-card::after {
  background:
    linear-gradient(
      90deg,
      rgba(4, 6, 11, 0.95) 0%,
      rgba(4, 6, 11, 0.72) 42%,
      rgba(4, 6, 11, 0.14) 100%
    ),
    radial-gradient(
      circle at 34% 34%,
      rgba(33, 243, 240, 0.14),
      transparent 34rem
    ),
    linear-gradient(180deg, rgba(4, 6, 11, 0.04) 0%, rgba(4, 6, 11, 0.76) 100%);
}

.system-image-card {
  border-radius: 18px;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.system-image-card:hover {
  transform: translateY(-4px);
  border-color: rgba(232, 60, 255, 0.34);
  box-shadow:
    0 28px 76px rgba(0, 0, 0, 0.48),
    0 0 34px rgba(232, 60, 255, 0.12);
}

.music-player {
  border-color: rgba(33, 243, 240, 0.28);
  background:
    linear-gradient(180deg, rgba(9, 18, 27, 0.9), rgba(4, 7, 12, 0.84)),
    radial-gradient(circle at 0% 50%, rgba(33, 243, 240, 0.12), transparent 70%);
}

.music-player__toggle {
  border-color: rgba(33, 243, 240, 0.4);
  background: linear-gradient(
    180deg,
    rgba(33, 243, 240, 0.28),
    rgba(9, 14, 22, 0.92)
  );
}

.music-player__wave span {
  background: linear-gradient(
    180deg,
    rgba(35, 255, 249, 0.95),
    rgba(232, 60, 255, 0.62)
  );
}

.split-section {
  gap: 34px;
}

.roadmap {
  position: relative;
}

.roadmap::before {
  content: "";
  position: absolute;
  left: 50px;
  top: 22px;
  bottom: 22px;
  width: 1px;
  background: linear-gradient(
    180deg,
    #23fff9,
    rgba(232, 60, 255, 0.62),
    transparent
  );
  opacity: 0.55;
}

.roadmap-item {
  position: relative;
  overflow: hidden;
}

.join-panel {
  overflow: hidden;
  border-radius: 20px;
}

.join-panel::after {
  content: "";
  position: absolute;
  inset: -40% -20% auto auto;
  width: 34rem;
  height: 34rem;
  pointer-events: none;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(33, 243, 240, 0.18), transparent 62%),
    radial-gradient(
      circle at 70% 35%,
      rgba(232, 60, 255, 0.18),
      transparent 45%
    );
}

.join-panel > * {
  position: relative;
  z-index: 1;
}

.site-footer {
  width: min(1280px, calc(100vw - 36px));
  margin: 0 auto 26px;
  border-radius: 18px;
  overflow: hidden;
}

.footer-brand img {
  filter: drop-shadow(0 0 14px rgba(33, 243, 240, 0.28))
    drop-shadow(0 0 18px rgba(232, 60, 255, 0.18));
}

.footer-links {
  align-items: center;
}

.footer-links a:not(.button),
.footer-links a:not(.button):visited {
  color: rgba(255, 242, 210, 0.74);
}

.content-page-shell .topbar,
.profile-page-shell .topbar {
  margin-bottom: 32px;
}

.content-page,
.profile-page,
.topup-page {
  position: relative;
}

.content-hero,
.profile-hero,
.topup-hero {
  border-radius: 22px;
  overflow: hidden;
}

.header-actions {
  flex-wrap: nowrap;
}

.button-ip .ip-text {
  max-width: 210px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header-actions .button-discord {
  white-space: nowrap;
}

.hero-content {
  width: min(620px, calc(100% - 56px));
  padding-top: clamp(54px, 6vh, 82px);
  padding-bottom: 58px;
}

.hero-logo {
  width: min(400px, 96%);
  margin: 4px 0 0 -14px;
}

.hero-copy {
  margin-top: 12px;
  line-height: 1.62;
}

.hero-ip-box {
  margin-top: 10px;
}

.hero-ip-box.server-status-card {
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "main copy"
    "meta meta";
  gap: 8px 12px;
  width: min(560px, 100%);
  max-width: 560px;
  min-height: 0;
  padding: 12px 14px;
}

.hero-ip-box.server-status-card .ip-main {
  gap: 12px;
}

.hero-ip-box.server-status-card .ip-value {
  max-width: 300px;
  margin-top: 4px;
  overflow: hidden;
  font-size: clamp(1rem, 1.6vw, 1.25rem);
  line-height: 1.1;
  overflow-wrap: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
  word-break: normal;
}

.hero-ip-box.server-status-card .server-meta {
  gap: 7px;
  padding-left: 28px;
}

.hero-ip-box.server-status-card .meta-pill,
.hero-ip-box.server-status-card .meta-pill.server-online-large,
.hero-ip-box.server-status-card .ip-version {
  min-height: 28px;
  padding: 0 10px;
  font-size: 0.76rem;
}

.hero-ip-box.server-status-card .ip-copy-action {
  min-width: 104px;
  min-height: 42px;
  padding: 0 10px;
  font-size: 0.8rem;
}

.cta-row {
  margin-top: 12px;
}

.hero-points {
  margin-top: 16px;
}

.hero-account-panel {
  top: 56%;
}

@media (max-width: 1320px) and (min-width: 1181px) {
  .topbar {
    width: min(1240px, calc(100vw - 32px));
  }

  .brand-subtitle {
    display: none;
  }

  .brand-logo {
    width: 88px;
    height: 50px;
  }

  .nav a {
    padding-inline: 10px;
    font-size: 0.86rem;
  }

  .button {
    padding-inline: 14px;
  }

  .button-ip .ip-text {
    max-width: 190px;
  }
}

@media (max-width: 1180px) {
  .topbar {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .header-actions {
    flex-wrap: wrap;
  }

  .nav {
    justify-content: flex-start;
  }
}

@media (max-width: 1100px) {
  .hero {
    min-height: auto;
  }

  .hero::after {
    background:
      radial-gradient(
        circle at 50% 18%,
        rgba(33, 243, 240, 0.16),
        transparent 20rem
      ),
      linear-gradient(180deg, rgba(5, 7, 13, 0.22), rgba(5, 7, 13, 0.68));
  }
}

@media (max-width: 720px) {
  body::before {
    background-size: 18px 18px;
    opacity: 0.26;
  }

  .topbar {
    width: calc(100vw - 20px);
    margin-top: 10px;
    padding: 12px;
    border-radius: 18px;
  }

  .topbar::before,
  .topbar::after {
    display: none;
  }

  .brand-logo {
    width: 136px;
    height: 72px;
  }

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

  .nav a {
    min-height: 42px;
    border-radius: 10px;
  }

  .hero {
    width: calc(100vw - 20px);
    border-radius: 18px;
  }

  .hero-art {
    object-position: 58% center;
  }

  .hero-content {
    width: 100%;
    padding: 72px 18px 38px;
  }

  .hero-logo {
    width: min(420px, 118%);
    margin-left: -18px;
  }

  .hero-copy {
    font-size: 0.98rem;
    line-height: 1.72;
  }

  .cta-row .button {
    width: 100%;
  }

  .hero-account-panel {
    width: calc(100% - 28px);
    margin-bottom: 36px;
  }

  .section {
    padding-top: 72px;
  }

  .section::before {
    margin-bottom: 24px;
  }

  .showcase-hero,
  .system-image-card,
  .system-image-card-wide {
    min-height: 420px;
  }

  .showcase-copy,
  .system-image-card > div {
    padding: 24px;
  }

  .roadmap::before {
    left: 33px;
  }

  .site-footer {
    width: calc(100vw - 20px);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

/*
  World Reveal direction.
  The original logo stays dominant while utility moves into a compact HUD rail.
*/

.inline-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.world-reveal-hero {
  min-height: min(880px, calc(100vh - 108px));
  isolation: isolate;
  background: #05070d;
}

.world-reveal-hero .hero-art {
  object-position: center center;
  filter: saturate(1.16) contrast(1.1) brightness(0.72);
  transform: scale(1.045);
  animation: world-breathe 14s ease-in-out infinite alternate;
}

.world-reveal-hero .hero-overlay {
  background:
    radial-gradient(
      circle at 50% 45%,
      rgba(4, 6, 12, 0.08) 0%,
      rgba(4, 6, 12, 0.2) 28%,
      rgba(4, 6, 12, 0.74) 100%
    ),
    linear-gradient(
      180deg,
      rgba(4, 6, 11, 0.5) 0%,
      rgba(4, 6, 11, 0.1) 40%,
      rgba(4, 6, 11, 0.78) 100%
    ),
    linear-gradient(
      90deg,
      rgba(4, 6, 11, 0.48),
      transparent 26%,
      transparent 74%,
      rgba(4, 6, 11, 0.48)
    );
}

.world-reveal-hero::after {
  z-index: 2;
  background:
    radial-gradient(
      circle at 50% 42%,
      rgba(33, 243, 240, 0.16),
      transparent 20rem
    ),
    radial-gradient(
      circle at 48% 47%,
      rgba(232, 60, 255, 0.14),
      transparent 28rem
    ),
    linear-gradient(180deg, transparent 50%, rgba(5, 7, 13, 0.56));
  mix-blend-mode: screen;
}

.hero-rift-glow,
.hero-rune-orbit {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 44%;
  pointer-events: none;
  transform: translate(-50%, -50%);
}

.hero-rift-glow {
  width: min(70vw, 760px);
  aspect-ratio: 1;
  border-radius: 50%;
  opacity: 0.64;
  background:
    radial-gradient(circle, rgba(33, 243, 240, 0.14), transparent 34%),
    radial-gradient(
      circle,
      transparent 44%,
      rgba(232, 60, 255, 0.12) 48%,
      transparent 62%
    );
  filter: blur(14px);
  animation: rift-pulse 5.6s ease-in-out infinite;
}

.hero-rune-orbit {
  width: min(52vw, 620px);
  aspect-ratio: 1;
  border: 1px solid rgba(255, 224, 138, 0.2);
  border-radius: 50%;
  opacity: 0.56;
  box-shadow:
    0 0 0 18px rgba(33, 243, 240, 0.025),
    0 0 0 42px rgba(232, 60, 255, 0.018);
  animation: orbit-drift 18s linear infinite;
}

.hero-rune-orbit::before,
.hero-rune-orbit::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  border: 1px solid rgba(255, 224, 138, 0.58);
  background: rgba(5, 7, 13, 0.72);
  transform: rotate(45deg);
  box-shadow: 0 0 16px rgba(33, 243, 240, 0.3);
}

.hero-rune-orbit::before {
  left: -7px;
  top: calc(50% - 7px);
}

.hero-rune-orbit::after {
  right: -7px;
  top: calc(50% - 7px);
}

.world-reveal-content {
  z-index: 5;
  width: min(790px, calc(100% - 56px));
  margin: 0 auto;
  padding: clamp(112px, 15vh, 168px) 0 154px;
  text-align: center;
}

.world-reveal-content .eyebrow {
  margin-bottom: 8px;
  font-size: 0.78rem;
}

.world-reveal-content .hero-logo {
  width: min(700px, 100%);
  margin: 0 auto;
  filter: drop-shadow(0 0 20px rgba(33, 243, 240, 0.34))
    drop-shadow(0 0 26px rgba(232, 60, 255, 0.2))
    drop-shadow(0 28px 42px rgba(0, 0, 0, 0.68));
}

.world-reveal-content .hero-copy {
  max-width: 66ch;
  margin: 12px auto 0;
  color: rgba(255, 242, 210, 0.9);
  font-size: clamp(1rem, 1.5vw, 1.18rem);
  line-height: 1.72;
}

.hero-cta-row {
  justify-content: center;
  margin-top: 26px;
}

.hero-copy-cta {
  gap: 8px;
}

.hero-copy-cta .copy-hint {
  margin-left: 4px;
  color: #1c1208;
  background: rgba(255, 255, 255, 0.26);
  box-shadow: none;
}

.world-reveal-content .hero-points {
  justify-content: center;
  margin-top: 22px;
}

.hero-status-rail {
  position: absolute;
  z-index: 6;
  left: 50%;
  bottom: 18px;
  display: grid;
  width: min(1040px, calc(100% - 36px));
  grid-template-columns: 1.05fr 0.8fr 0.95fr minmax(220px, 1.35fr);
  align-items: stretch;
  transform: translateX(-50%);
  border: 1px solid rgba(255, 224, 138, 0.24);
  border-radius: 14px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(10, 16, 25, 0.9), rgba(4, 7, 12, 0.94)),
    radial-gradient(circle at 50% 0%, rgba(33, 243, 240, 0.1), transparent 70%);
  backdrop-filter: blur(14px);
}

.hero-status-live,
.hero-status-stat,
.hero-status-copy {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
}

.hero-status-live,
.hero-status-stat {
  border-right: 1px solid rgba(255, 224, 138, 0.12);
}

.hero-status-live span:not(.status-pulse),
.hero-status-stat span {
  display: block;
  margin-bottom: 3px;
  color: rgba(255, 242, 210, 0.56);
  font-family: "Cinzel", serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-status-live strong,
.hero-status-stat strong {
  display: block;
  overflow: hidden;
  color: #fff2d2;
  font-size: 0.96rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-pulse {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #21f3f0;
  box-shadow: 0 0 14px rgba(33, 243, 240, 0.88);
  animation: pulse-green 2s infinite;
}

.hero-status-copy {
  position: relative;
  justify-content: center;
  border: 0;
  color: #fff2d2;
  background: rgba(33, 243, 240, 0.045);
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  transition:
    background 180ms ease,
    color 180ms ease;
}

.hero-status-copy:hover,
.hero-status-copy.copied {
  color: #fff;
  background: rgba(33, 243, 240, 0.12);
}

.hero-status-copy .copy-hint {
  color: #061014;
}

.world-system-strip {
  display: grid;
  margin-top: 32px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-block: 1px solid rgba(255, 224, 138, 0.2);
  background:
    linear-gradient(180deg, rgba(16, 24, 35, 0.72), rgba(6, 10, 16, 0.76)),
    radial-gradient(circle at 50% 0%, rgba(33, 243, 240, 0.08), transparent 65%);
}

.world-system-lane {
  display: grid;
  min-height: 184px;
  grid-template-columns: 58px 1fr;
  gap: 18px;
  padding: 26px 22px;
  transition: background 180ms ease;
}

.world-system-lane + .world-system-lane {
  border-left: 1px solid rgba(255, 224, 138, 0.14);
}

.world-system-lane:hover {
  background: rgba(33, 243, 240, 0.045);
}

.feature-rune-card img,
.system-card-icon,
.player-account-emblem {
  width: 48px;
  height: 48px;
  object-fit: contain;
  filter: drop-shadow(0 0 12px rgba(33, 243, 240, 0.2));
}

.world-system-lane span {
  color: #21f3f0;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.world-system-lane h3 {
  margin-top: 5px;
  color: #fff3cf;
  font-size: 1.22rem;
}

.world-system-lane p {
  margin: 10px 0 0;
  color: rgba(255, 242, 210, 0.68);
  line-height: 1.7;
}

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

.feature-rune-card {
  display: grid;
  min-height: 148px;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  padding: 22px;
  border-radius: 12px;
}

.feature-rune-card:nth-child(2),
.feature-rune-card:nth-child(4) {
  transform: translateY(18px);
}

.feature-rune-card:nth-child(2):hover,
.feature-rune-card:nth-child(4):hover {
  transform: translateY(13px);
}

.system-image-card > div > .system-card-icon {
  position: relative;
  z-index: 1;
  display: block;
  width: 50px;
  height: 50px;
  margin-bottom: 12px;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.player-account-section {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(420px, 1.1fr);
  gap: clamp(28px, 6vw, 72px);
  align-items: center;
}

.player-account-section::before {
  grid-column: 1 / -1;
  margin-bottom: 0;
}

.player-account-intro {
  max-width: 590px;
}

.player-account-emblem {
  width: 74px;
  height: 74px;
  margin-bottom: 20px;
}

.player-account-intro h2 {
  color: #fff3cf;
  font-size: clamp(2rem, 3.5vw, 3.65rem);
  line-height: 1.04;
}

.player-account-intro > p:not(.section-kicker) {
  max-width: 62ch;
  margin: 18px 0 0;
  color: rgba(255, 242, 210, 0.72);
  line-height: 1.8;
}

.account-trust-list {
  display: grid;
  gap: 10px;
  margin-top: 24px;
}

.account-trust-list span {
  position: relative;
  padding-left: 22px;
  color: rgba(255, 242, 210, 0.78);
}

.account-trust-list span::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 7px;
  height: 7px;
  border: 1px solid rgba(255, 224, 138, 0.72);
  background: rgba(33, 243, 240, 0.18);
  transform: rotate(45deg);
}

.player-account-panel {
  position: relative;
  z-index: 2;
  width: 100%;
}

.player-account-panel .account-card {
  border-color: rgba(255, 224, 138, 0.24);
  background:
    linear-gradient(180deg, rgba(15, 22, 31, 0.94), rgba(5, 8, 14, 0.94)),
    radial-gradient(circle at 0% 0%, rgba(33, 243, 240, 0.1), transparent 68%);
  box-shadow: 0 8px 8px rgba(0, 0, 0, 0.34);
}

@keyframes world-breathe {
  from {
    transform: scale(1.045);
  }
  to {
    transform: scale(1.09);
  }
}

@keyframes rift-pulse {
  0%,
  100% {
    opacity: 0.46;
    transform: translate(-50%, -50%) scale(0.96);
  }
  50% {
    opacity: 0.72;
    transform: translate(-50%, -50%) scale(1.04);
  }
}

@keyframes orbit-drift {
  from {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

@media (max-width: 980px) {
  .hero-status-rail {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .hero-status-copy {
    grid-column: 1 / -1;
    border-top: 1px solid rgba(255, 224, 138, 0.12);
  }

  .world-system-strip {
    grid-template-columns: 1fr;
  }

  .world-system-lane {
    min-height: 0;
  }

  .world-system-lane + .world-system-lane {
    border-top: 1px solid rgba(255, 224, 138, 0.14);
    border-left: 0;
  }

  .player-account-section {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .world-reveal-hero {
    min-height: 760px;
  }

  .world-reveal-hero .hero-art {
    object-position: 53% center;
  }

  .hero-rift-glow {
    width: 680px;
  }

  .hero-rune-orbit {
    width: min(104vw, 460px);
  }

  .world-reveal-content {
    width: 100%;
    padding: 92px 18px 222px;
  }

  .world-reveal-content .hero-logo {
    width: min(520px, 116%);
    max-width: none;
    margin-left: -8%;
  }

  .hero-cta-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 20px;
  }

  .world-reveal-content .hero-points {
    display: none;
  }

  .hero-status-rail {
    bottom: 12px;
    width: calc(100% - 20px);
    grid-template-columns: 1fr 1fr;
  }

  .hero-status-live {
    grid-column: 1 / -1;
    border-bottom: 1px solid rgba(255, 224, 138, 0.12);
  }

  .hero-status-stat:nth-child(3) {
    border-right: 0;
  }

  .hero-status-live,
  .hero-status-stat,
  .hero-status-copy {
    min-height: 58px;
    padding: 10px 12px;
  }

  .hero-status-copy {
    grid-column: 1 / -1;
  }

  .world-system-lane {
    grid-template-columns: 44px 1fr;
    gap: 14px;
    padding: 20px 16px;
  }

  .feature-rune-grid {
    grid-template-columns: 1fr;
  }

  .feature-rune-card:nth-child(2),
  .feature-rune-card:nth-child(4),
  .feature-rune-card:nth-child(2):hover,
  .feature-rune-card:nth-child(4):hover {
    transform: none;
  }

  .player-account-intro h2 {
    font-size: clamp(2rem, 10vw, 3.1rem);
  }
}

@media (max-width: 720px) {
  .portal-topbar {
    gap: 8px;
    padding: 10px;
  }

  .portal-topbar .brand {
    gap: 8px;
  }

  .portal-topbar .brand-logo {
    width: 98px;
    height: 52px;
  }

  .portal-topbar .brand-name {
    font-size: 0.78rem;
    letter-spacing: 0.13em;
  }

  .portal-topbar .brand-subtitle {
    display: none;
  }

  .portal-topbar .nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .portal-topbar .nav a {
    min-height: 36px;
    padding: 7px 5px;
    font-size: 0.72rem;
    text-align: center;
  }

  .portal-topbar .header-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .portal-topbar .header-actions .button {
    width: 100%;
    min-width: 0;
    min-height: 40px;
    padding-inline: 10px;
    font-size: 0.76rem;
  }

  .portal-topbar .button-ip .ip-text {
    max-width: 132px;
  }

  .portal-topbar .server-count {
    min-width: 28px;
  }

  .portal-topbar .copy-hint {
    display: none;
  }
}

/*
  Mock fidelity pass.
  Desktop follows the approved full-world composition: carved navigation,
  centered logo, vertical status HUD, three image-led system panels.
*/

.portal-topbar {
  width: min(1660px, calc(100vw - 96px));
  grid-template-columns: 148px minmax(0, 1fr) auto;
  gap: 18px;
  margin: 0;
  padding: 14px 18px;
  border-radius: 4px;
  border-color: rgba(255, 224, 138, 0.42);
  background:
    linear-gradient(180deg, rgba(12, 17, 25, 0.97), rgba(4, 7, 12, 0.97)),
    url("/ui/panel-frame.svg") center / 100% 100% no-repeat;
  box-shadow:
    0 10px 0 rgba(0, 0, 0, 0.24),
    inset 0 0 0 3px rgba(0, 0, 0, 0.32),
    inset 0 1px 0 rgba(255, 224, 138, 0.18);
}

.portal-topbar .brand-logo {
  width: 112px;
  height: 66px;
}

.portal-topbar .brand-name,
.portal-topbar .brand-subtitle {
  display: none;
}

.portal-topbar .nav {
  display: flex;
  grid-column: auto;
  grid-row: auto;
  gap: 4px;
  justify-content: center;
}

.portal-topbar .nav a {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-color: transparent;
  border-radius: 4px;
  background: transparent;
  color: rgba(255, 224, 138, 0.84);
  font-family: "Cinzel", serif;
  font-size: 0.86rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.portal-topbar .nav a img {
  width: 21px;
  height: 21px;
  object-fit: contain;
  filter: sepia(1) saturate(0.9) drop-shadow(0 0 8px rgba(255, 224, 138, 0.2));
}

.portal-topbar .nav a:hover {
  border-color: rgba(255, 224, 138, 0.22);
  color: #fff2d2;
  background: rgba(255, 224, 138, 0.055);
}

.portal-topbar .header-actions {
  display: flex;
  grid-column: auto;
  grid-row: auto;
  flex-wrap: nowrap;
  gap: 12px;
}

.portal-topbar .button {
  min-height: 48px;
  border-radius: 6px;
}

.portal-topbar .button-ip {
  min-width: 300px;
}

.portal-topbar .button-discord {
  min-width: 184px;
}

@media (min-width: 981px) {
  .portal-topbar {
    position: absolute;
    z-index: 20;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
  }
}

.world-reveal-hero {
  width: 100%;
  min-height: min(900px, 100vh);
  margin-top: 0;
  border-width: 0 0 1px;
  border-radius: 0;
}

.world-reveal-hero .hero-art {
  object-position: center center;
  filter: saturate(1.18) contrast(1.08) brightness(0.78);
}

.world-reveal-hero .hero-overlay {
  background:
    radial-gradient(
      circle at 50% 43%,
      rgba(4, 6, 12, 0.04) 0%,
      rgba(4, 6, 12, 0.12) 28%,
      rgba(4, 6, 12, 0.64) 100%
    ),
    linear-gradient(
      180deg,
      rgba(4, 6, 11, 0.18) 0%,
      rgba(4, 6, 11, 0.04) 52%,
      rgba(4, 6, 11, 0.72) 100%
    );
}

.world-reveal-content {
  width: min(760px, calc(100% - 48px));
  padding: clamp(146px, 18vh, 196px) 0 94px;
}

.world-reveal-content .hero-logo {
  width: min(650px, 78vw);
}

.world-reveal-content .eyebrow {
  margin: -18px 0 0;
  color: #e6b864;
  font-size: clamp(0.78rem, 1vw, 1rem);
  letter-spacing: 0.48em;
}

.world-reveal-content .hero-copy {
  max-width: 56ch;
  margin-top: 12px;
  color: rgba(255, 242, 210, 0.9);
  font-size: clamp(1rem, 1.25vw, 1.16rem);
}

.hero-cta-row {
  gap: 12px;
  margin-top: 22px;
}

.hero-cta-row .button {
  min-width: 194px;
  min-height: 72px;
  gap: 10px;
  border-radius: 5px;
  padding: 10px 18px;
}

.hero-cta-row .button span:not(.copy-hint) {
  display: grid;
  gap: 2px;
}

.hero-cta-row .button strong {
  font-family: "Cinzel", serif;
  font-size: 1rem;
  letter-spacing: 0.08em;
  line-height: 1.1;
  text-transform: uppercase;
}

.hero-cta-row .button small {
  color: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  opacity: 0.74;
}

.hero-copy-cta {
  border-color: rgba(255, 224, 138, 0.72);
}

.hero-copy-cta .copy-hint {
  position: absolute;
  right: 8px;
  top: 7px;
  min-width: 0;
  padding: 3px 6px;
  font-size: 0.58rem;
}

.hero-wiki-cta {
  border-color: rgba(255, 242, 210, 0.22);
}

.hero-status-rail {
  left: auto;
  right: clamp(18px, 5.4vw, 96px);
  bottom: clamp(76px, 11vh, 118px);
  display: flex;
  width: min(286px, calc(100% - 36px));
  transform: none;
  flex-direction: column;
  border-radius: 4px;
  border-color: rgba(255, 224, 138, 0.46);
  background:
    linear-gradient(180deg, rgba(6, 12, 18, 0.96), rgba(3, 7, 11, 0.96)),
    url("/ui/panel-frame.svg") center / 100% 100% no-repeat;
  box-shadow:
    0 14px 0 rgba(0, 0, 0, 0.16),
    inset 0 0 0 3px rgba(0, 0, 0, 0.38);
}

.hero-status-heading {
  margin: 0;
  padding: 13px 16px;
  border-bottom: 1px solid rgba(255, 224, 138, 0.24);
  color: rgba(255, 224, 138, 0.88);
  font-family: "Cinzel", serif;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-align: center;
  text-transform: uppercase;
}

.hero-status-live,
.hero-status-stat,
.hero-status-ip {
  min-height: 0;
  padding: 11px 16px;
  border-right: 0;
  border-bottom: 1px solid rgba(255, 224, 138, 0.14);
}

.hero-status-live strong {
  color: #5df691;
  font-family: "Cinzel", serif;
  font-size: 1.2rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-status-stat {
  display: block;
}

.hero-status-stat strong {
  margin-top: 5px;
}

.hero-status-spark {
  display: flex;
  height: 30px;
  align-items: end;
  gap: 5px;
  padding: 0 16px 11px;
  border-bottom: 1px solid rgba(255, 224, 138, 0.14);
}

.hero-status-spark span {
  width: 14px;
  height: 28%;
  background: #45e57b;
  box-shadow: 0 0 9px rgba(69, 229, 123, 0.48);
}

.hero-status-spark span:nth-child(2),
.hero-status-spark span:nth-child(8) {
  height: 48%;
}
.hero-status-spark span:nth-child(3),
.hero-status-spark span:nth-child(6) {
  height: 36%;
}
.hero-status-spark span:nth-child(4) {
  height: 72%;
}
.hero-status-spark span:nth-child(5) {
  height: 54%;
}
.hero-status-spark span:nth-child(7) {
  height: 88%;
}
.hero-status-spark span:nth-child(9) {
  height: 64%;
}

.hero-status-ip {
  display: grid;
  gap: 5px;
  border-bottom: 0;
}

.hero-status-ip > span {
  color: rgba(255, 224, 138, 0.7);
  font-family: "Cinzel", serif;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-status-copy {
  min-height: 32px;
  justify-content: space-between;
  gap: 6px;
  padding: 0;
  color: rgba(255, 242, 210, 0.9);
  font-size: 0.78rem;
  text-align: left;
}

.hero-status-copy .copy-hint {
  display: none;
}

.world-intro-section {
  width: 100%;
  padding-top: 0;
  border-top: 1px solid rgba(255, 224, 138, 0.26);
  background:
    radial-gradient(
      circle at 50% 0%,
      rgba(33, 243, 240, 0.055),
      transparent 28rem
    ),
    linear-gradient(180deg, rgba(7, 11, 17, 0.98), rgba(4, 7, 12, 0.98));
}

.world-intro-section::before {
  display: none;
}

.world-intro-section .section-heading {
  max-width: 720px;
  margin: 0 auto;
  padding: 22px 20px 0;
  text-align: center;
}

.world-intro-section .section-heading h2 {
  color: #dba74d;
  font-size: clamp(1.8rem, 2.5vw, 2.8rem);
}

.world-intro-section .section-heading p:last-child {
  margin-top: 9px;
  color: rgba(255, 242, 210, 0.62);
}

.world-intro-section .section-kicker {
  display: none;
}

.world-system-strip {
  width: min(1660px, calc(100vw - 96px));
  margin: 16px auto 0;
  gap: 18px;
  border: 0;
  background: transparent;
}

.world-system-lane {
  position: relative;
  display: flex;
  min-height: 300px;
  align-items: end;
  overflow: hidden;
  padding: 0;
  border: 1px solid rgba(255, 224, 138, 0.38);
  border-radius: 4px;
  background: #070a0f;
}

.world-system-lane + .world-system-lane {
  border-left: 1px solid rgba(255, 224, 138, 0.38);
}

.world-system-lane::before {
  content: "";
  position: absolute;
  z-index: 4;
  inset: 8px;
  border: 1px solid rgba(255, 224, 138, 0.12);
  pointer-events: none;
}

.world-system-art,
.world-system-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.world-system-art {
  object-fit: cover;
  filter: saturate(1.1) contrast(1.08) brightness(0.78);
  transition:
    transform 420ms cubic-bezier(0.22, 1, 0.36, 1),
    filter 420ms ease;
}

.world-system-shade {
  background: linear-gradient(
    180deg,
    rgba(4, 7, 12, 0.08) 12%,
    rgba(4, 7, 12, 0.4) 48%,
    rgba(4, 7, 12, 0.98) 100%
  );
}

.world-system-content {
  position: relative;
  z-index: 5;
  width: 100%;
  padding: 20px 22px 24px;
  text-align: center;
}

.world-inventory-row {
  display: flex;
  justify-content: center;
  gap: 7px;
  margin-bottom: 12px;
}

.world-inventory-slot {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid rgba(255, 224, 138, 0.28);
  background: rgba(3, 7, 11, 0.82);
  box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.62);
}

.world-inventory-slot img {
  width: 29px;
  height: 29px;
}

.world-system-content h3 {
  color: #dba74d;
  font-size: clamp(1.15rem, 1.5vw, 1.52rem);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.world-system-content p {
  max-width: 43ch;
  margin: 8px auto 0;
  color: rgba(255, 242, 210, 0.7);
  font-size: 0.86rem;
  line-height: 1.62;
}

.world-system-arrow {
  position: absolute;
  right: 16px;
  bottom: 17px;
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid rgba(255, 224, 138, 0.38);
  color: #e7b757;
  background: rgba(4, 7, 12, 0.8);
  font-size: 1.24rem;
}

.world-system-lane:hover .world-system-art {
  filter: saturate(1.18) contrast(1.08) brightness(0.9);
  transform: scale(1.04);
}

.world-system-lane:hover .world-system-arrow {
  color: #fff2d2;
  background: rgba(212, 154, 59, 0.18);
}

@media (max-width: 1320px) and (min-width: 981px) {
  .portal-topbar {
    width: calc(100vw - 40px);
    grid-template-columns: 102px minmax(0, 1fr) auto;
    gap: 8px;
    padding-inline: 12px;
  }

  .portal-topbar .brand-logo {
    width: 90px;
  }

  .portal-topbar .nav a {
    gap: 5px;
    padding-inline: 8px;
    font-size: 0.72rem;
  }

  .portal-topbar .nav a img {
    width: 18px;
    height: 18px;
  }

  .portal-topbar .button-ip {
    min-width: 244px;
  }

  .portal-topbar .button-discord {
    min-width: 154px;
  }

  .hero-status-rail {
    right: 26px;
  }

  .world-system-strip {
    width: calc(100vw - 40px);
  }
}

@media (max-width: 980px) {
  .portal-topbar {
    position: relative;
    width: calc(100vw - 20px);
    margin: 10px auto 0;
    transform: none;
  }

  .world-reveal-hero {
    width: calc(100vw - 20px);
    min-height: 860px;
    margin-top: 10px;
    border: 1px solid rgba(255, 224, 138, 0.22);
    border-radius: 8px;
  }

  .world-reveal-content {
    padding: 64px 18px 284px;
  }

  .hero-status-rail {
    right: auto;
    left: 50%;
    bottom: 12px;
    display: grid;
    width: calc(100% - 20px);
    grid-template-columns: repeat(3, minmax(0, 1fr));
    transform: translateX(-50%);
  }

  .hero-status-heading,
  .hero-status-ip {
    grid-column: 1 / -1;
  }

  .hero-status-live,
  .hero-status-stat {
    border-right: 1px solid rgba(255, 224, 138, 0.14);
    border-bottom: 1px solid rgba(255, 224, 138, 0.14);
  }

  .hero-status-spark {
    display: none;
  }

  .world-system-strip {
    width: calc(100vw - 20px);
  }
}

@media (max-width: 720px) {
  .portal-topbar .nav a {
    justify-content: center;
    gap: 4px;
  }

  .portal-topbar .nav a img {
    width: 16px;
    height: 16px;
  }

  .world-reveal-hero {
    min-height: 892px;
  }

  .world-reveal-content {
    padding: 54px 14px 298px;
  }

  .world-reveal-content .hero-logo {
    width: min(480px, 116%);
  }

  .world-reveal-content .eyebrow {
    margin-top: -10px;
    font-size: 0.62rem;
    letter-spacing: 0.3em;
  }

  .world-reveal-content .hero-copy {
    font-size: 0.9rem;
    line-height: 1.68;
  }

  .hero-cta-row .button {
    width: 100%;
    min-height: 54px;
  }

  .hero-cta-row .button strong {
    font-size: 0.86rem;
  }

  .hero-cta-row .button small {
    font-size: 0.68rem;
  }

  .hero-status-heading {
    padding-block: 9px;
  }

  .hero-status-live,
  .hero-status-stat,
  .hero-status-ip {
    padding: 9px 10px;
  }

  .hero-status-live strong {
    font-size: 0.92rem;
  }

  .hero-status-stat strong {
    font-size: 0.76rem;
  }

  .world-intro-section .section-heading {
    padding-top: 24px;
  }

  .world-system-strip {
    gap: 12px;
  }

  .world-system-lane {
    min-height: 286px;
  }
}

@media (min-width: 981px) and (max-height: 860px) {
  .world-reveal-hero {
    min-height: 720px;
  }

  .world-reveal-content {
    width: min(720px, calc(100% - 48px));
    padding: 116px 0 46px;
  }

  .world-reveal-content .hero-logo {
    width: min(520px, 58vw);
  }

  .world-reveal-content .eyebrow {
    margin-top: -14px;
    font-size: 0.72rem;
  }

  .world-reveal-content .hero-copy {
    max-width: 58ch;
    margin-top: 8px;
    font-size: 0.98rem;
    line-height: 1.62;
  }

  .hero-cta-row {
    margin-top: 16px;
  }

  .hero-cta-row .button {
    min-height: 62px;
  }

  .hero-status-rail {
    right: 26px;
    bottom: 28px;
    width: 264px;
  }

  .hero-status-heading {
    padding-block: 10px;
  }

  .hero-status-live,
  .hero-status-stat,
  .hero-status-ip {
    padding-block: 8px;
  }
}

@media (max-width: 720px) {
  .portal-topbar .header-actions {
    display: grid;
    width: 100%;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .portal-topbar .header-actions .button,
  .portal-topbar .button-ip,
  .portal-topbar .button-discord {
    width: 100%;
    min-width: 0;
  }
}

/* Codex polish: inventory icons should read as game items, not framed generic marks. */
.world-system-lane .world-system-art {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.world-inventory-row {
  gap: 9px;
}

.world-inventory-slot {
  position: relative;
  width: 52px;
  height: 52px;
  border: 1px solid rgba(225, 175, 89, 0.58);
  background:
    linear-gradient(
      145deg,
      rgba(44, 32, 20, 0.9),
      rgba(5, 9, 14, 0.94) 42%,
      rgba(13, 21, 28, 0.96)
    ),
    radial-gradient(
      circle at 50% 25%,
      rgba(54, 231, 255, 0.14),
      transparent 58%
    );
  box-shadow:
    inset 0 0 0 2px rgba(255, 235, 169, 0.06),
    inset 0 0 18px rgba(0, 0, 0, 0.72),
    0 0 16px rgba(137, 75, 255, 0.16);
}

.world-inventory-slot::before,
.world-inventory-slot::after {
  content: "";
  position: absolute;
  inset: 4px;
  pointer-events: none;
}

.world-inventory-slot::before {
  border: 1px solid rgba(255, 226, 144, 0.12);
}

.world-inventory-slot::after {
  background:
    linear-gradient(
      90deg,
      rgba(255, 226, 144, 0.42) 0 5px,
      transparent 5px calc(100% - 5px),
      rgba(255, 226, 144, 0.42) calc(100% - 5px)
    ),
    linear-gradient(
      180deg,
      rgba(255, 226, 144, 0.42) 0 5px,
      transparent 5px calc(100% - 5px),
      rgba(255, 226, 144, 0.42) calc(100% - 5px)
    );
  opacity: 0.55;
}

.world-system-lane .world-inventory-slot img {
  position: relative;
  z-index: 1;
  width: 38px;
  height: 38px;
  object-fit: contain;
  filter: drop-shadow(0 0 7px rgba(54, 231, 255, 0.3))
    drop-shadow(0 2px 0 rgba(0, 0, 0, 0.5));
}

.world-system-lane:hover .world-inventory-slot {
  border-color: rgba(108, 241, 255, 0.65);
  box-shadow:
    inset 0 0 0 2px rgba(255, 235, 169, 0.08),
    inset 0 0 20px rgba(0, 0, 0, 0.72),
    0 0 20px rgba(108, 241, 255, 0.2);
}

/* Phase 4A: admin visual editor and subpage polish. */
.subpage-shell {
  background:
    radial-gradient(
      circle at 50% 0%,
      rgba(62, 205, 255, 0.08),
      transparent 42%
    ),
    radial-gradient(
      circle at 14% 24%,
      rgba(132, 73, 255, 0.12),
      transparent 32%
    ),
    #05070d;
}

.subpage-topbar {
  position: sticky;
  top: 14px;
}

.subpage-topbar .brand-logo {
  width: 74px;
  height: auto;
}

.polished-subpage-hero {
  margin-inline: auto;
  max-width: 1180px;
  border-color: rgba(216, 175, 100, 0.32);
  background:
    linear-gradient(135deg, rgba(11, 17, 27, 0.92), rgba(8, 10, 18, 0.86)),
    radial-gradient(
      circle at 78% 20%,
      rgba(60, 226, 255, 0.14),
      transparent 42%
    );
  box-shadow:
    inset 0 0 0 1px rgba(255, 232, 164, 0.06),
    0 22px 80px rgba(0, 0, 0, 0.42);
}

.polished-wiki-layout {
  width: min(1180px, calc(100vw - 32px));
  margin-inline: auto;
}

.polished-wiki-card {
  position: relative;
  overflow: hidden;
  border-color: rgba(216, 175, 100, 0.28);
  background:
    linear-gradient(145deg, rgba(15, 24, 36, 0.88), rgba(7, 10, 17, 0.95)),
    radial-gradient(circle at 0% 0%, rgba(58, 222, 255, 0.08), transparent 34%);
}

.polished-wiki-card::after {
  content: "";
  position: absolute;
  right: -50px;
  top: -50px;
  width: 180px;
  height: 180px;
  background: radial-gradient(
    circle,
    rgba(151, 91, 255, 0.16),
    transparent 68%
  );
  pointer-events: none;
}

.wiki-card-media {
  width: 100%;
  max-height: 260px;
  margin: 18px 0;
  object-fit: cover;
  border: 1px solid rgba(216, 175, 100, 0.24);
}

.wiki-inventory-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.wiki-inventory-preview span {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  gap: 9px;
  padding: 8px 12px;
  border: 1px solid rgba(216, 175, 100, 0.26);
  background: rgba(4, 8, 14, 0.72);
  color: rgba(255, 242, 210, 0.82);
  font-size: 0.86rem;
}

.wiki-inventory-preview img {
  width: 26px;
  height: 26px;
  object-fit: contain;
}

.admin-editor {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 292px minmax(0, 1fr);
  background:
    radial-gradient(
      circle at 10% 0%,
      rgba(62, 205, 255, 0.08),
      transparent 32%
    ),
    radial-gradient(
      circle at 92% 18%,
      rgba(126, 74, 255, 0.11),
      transparent 38%
    ),
    #05070d;
  color: #f8efd5;
  font-family: Inter, system-ui, sans-serif;
}

.admin-editor-locked {
  display: grid;
  grid-template-columns: 1fr;
  place-items: center;
  padding: 32px;
}

.admin-lock-card {
  width: min(560px, 100%);
  padding: 34px;
  border: 1px solid rgba(216, 175, 100, 0.34);
  background: rgba(9, 14, 22, 0.9);
  text-align: center;
}

.admin-lock-card img {
  width: 180px;
  margin-inline: auto;
}

.admin-lock-card h1,
.admin-editor-topbar h1,
.editor-card h2,
.admin-preview-card h2 {
  color: #fff3cf;
  font-family: Cinzel, serif;
}

.admin-lock-actions,
.admin-editor-actions,
.admin-preview-actions,
.editor-inline-actions,
.editor-upload-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-editor-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 22px;
  border-right: 1px solid rgba(216, 175, 100, 0.18);
  background: linear-gradient(
    180deg,
    rgba(9, 14, 22, 0.98),
    rgba(4, 7, 12, 0.98)
  );
  overflow-y: auto;
}

.admin-editor-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  color: #fff3cf;
  font-family: Cinzel, serif;
  font-weight: 800;
  text-decoration: none;
}

.admin-editor-brand img {
  width: 64px;
}

.admin-editor-sidebar nav {
  display: grid;
  gap: 8px;
}

.admin-editor-sidebar nav button {
  min-height: 66px;
  padding: 12px;
  border: 1px solid rgba(216, 175, 100, 0.16);
  background: rgba(7, 11, 18, 0.78);
  color: rgba(255, 242, 210, 0.8);
  text-align: left;
  cursor: pointer;
}

.admin-editor-sidebar nav button strong,
.admin-editor-sidebar nav button span {
  display: block;
}

.admin-editor-sidebar nav button span {
  margin-top: 4px;
  color: rgba(255, 242, 210, 0.52);
  font-size: 0.78rem;
}

.admin-editor-sidebar nav button.is-active {
  border-color: rgba(98, 230, 255, 0.62);
  background: linear-gradient(
    135deg,
    rgba(16, 71, 88, 0.64),
    rgba(28, 16, 54, 0.78)
  );
  color: #ffffff;
}

.admin-editor-note,
.admin-preview-card,
.editor-card {
  border: 1px solid rgba(216, 175, 100, 0.22);
  background: rgba(8, 13, 21, 0.86);
}

.admin-editor-note {
  margin-top: 22px;
  padding: 14px;
  color: rgba(255, 242, 210, 0.68);
  font-size: 0.84rem;
  line-height: 1.55;
}

.admin-editor-main {
  min-width: 0;
  padding: 24px;
}

.admin-editor-topbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 18px 20px;
  border: 1px solid rgba(216, 175, 100, 0.2);
  background: rgba(8, 13, 21, 0.72);
}

.admin-kicker {
  color: #e8bf67;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.admin-editor-topbar h1 {
  margin: 4px 0 0;
  font-size: 1.55rem;
}

.admin-status {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  padding: 8px 12px;
  border: 1px solid rgba(216, 175, 100, 0.22);
  color: rgba(255, 242, 210, 0.72);
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
}

.admin-status.is-draft {
  border-color: rgba(98, 230, 255, 0.48);
  color: #8ff8ff;
}

.admin-editor-message {
  min-height: 30px;
  margin: 14px 0;
  color: rgba(255, 242, 210, 0.72);
}

.admin-editor-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 18px;
  align-items: start;
}

.admin-editor-forms {
  display: grid;
  gap: 16px;
}

.editor-card {
  padding: 18px;
}

.editor-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
}

.editor-card h2,
.admin-preview-card h2 {
  margin: 0;
  font-size: 1.14rem;
}

.editor-card button,
.admin-editor button:not(.button) {
  min-height: 38px;
  border: 1px solid rgba(216, 175, 100, 0.3);
  background: rgba(216, 175, 100, 0.1);
  color: #fff3cf;
  cursor: pointer;
}

.editor-field {
  display: grid;
  gap: 7px;
  margin-bottom: 12px;
}

.editor-field span,
.editor-toggle span,
.editor-upload-row span {
  color: rgba(255, 242, 210, 0.68);
  font-size: 0.78rem;
  font-weight: 700;
}

.editor-field input,
.editor-field textarea,
.editor-json-area {
  width: 100%;
  border: 1px solid rgba(80, 218, 235, 0.22);
  background: rgba(2, 6, 11, 0.72);
  color: #fff3cf;
  padding: 11px 12px;
  outline: none;
}

.editor-field textarea,
.editor-json-area {
  resize: vertical;
  line-height: 1.55;
}

.editor-field input:focus,
.editor-field textarea:focus,
.editor-json-area:focus {
  border-color: rgba(98, 230, 255, 0.62);
  box-shadow: 0 0 0 3px rgba(98, 230, 255, 0.08);
}

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

.editor-list-row {
  padding: 14px;
  margin-bottom: 12px;
  border: 1px solid rgba(255, 242, 210, 0.12);
  background: rgba(4, 8, 14, 0.52);
}

.editor-media-row {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) auto;
  gap: 14px;
}

.editor-media-row > img {
  width: 150px;
  height: 104px;
  object-fit: cover;
  border: 1px solid rgba(216, 175, 100, 0.22);
}

.editor-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0 12px;
}

.editor-object-key {
  color: #8ff8ff;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.editor-mini-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding: 12px;
  background: rgba(2, 6, 11, 0.5);
}

.editor-asset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.editor-asset-grid button {
  display: grid;
  gap: 7px;
  padding: 10px;
  text-align: left;
}

.editor-asset-grid img {
  width: 100%;
  height: 92px;
  object-fit: cover;
  background: #03070c;
}

.editor-asset-grid span,
.editor-asset-grid small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-preview-pane {
  position: sticky;
  top: 24px;
  display: grid;
  gap: 16px;
}

.admin-preview-card {
  padding: 18px;
}

.admin-preview-card p {
  color: rgba(255, 242, 210, 0.68);
  line-height: 1.6;
}

.admin-preview-actions a {
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid rgba(98, 230, 255, 0.22);
  color: #8ff8ff;
  text-decoration: none;
}

.admin-audit-item {
  display: grid;
  gap: 2px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 242, 210, 0.08);
}

.admin-audit-item span,
.admin-empty {
  color: rgba(255, 242, 210, 0.48);
  font-size: 0.78rem;
}

@media (max-width: 1120px) {
  .admin-editor {
    grid-template-columns: 1fr;
  }

  .admin-editor-sidebar {
    position: relative;
    height: auto;
  }

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

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

  .admin-preview-pane {
    position: relative;
    top: auto;
  }
}

@media (max-width: 720px) {
  .admin-editor-main {
    padding: 14px;
  }

  .admin-editor-topbar,
  .editor-media-row,
  .editor-grid-2 {
    grid-template-columns: 1fr;
  }

  .admin-editor-topbar {
    display: grid;
  }

  .admin-editor-sidebar nav {
    grid-template-columns: 1fr;
  }

  .editor-media-row > img {
    width: 100%;
  }
}

/* Phase 4B: post-live audit fixes for subpages, store checkout, and admin studio. */
html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

.subpage-topbar.portal-topbar {
  left: auto;
  transform: none;
  margin: 14px auto 32px;
  max-width: calc(100vw - 32px);
}

.subpage-shell .content-page,
.subpage-shell .profile-page,
.subpage-shell .topup-page,
.wiki-page {
  width: min(1180px, calc(100vw - 32px));
  max-width: calc(100vw - 32px);
  margin-inline: auto;
}

.subpage-shell .content-hero,
.subpage-shell .profile-hero,
.subpage-shell .topup-hero,
.polished-subpage-hero {
  width: 100%;
  max-width: min(1180px, calc(100vw - 32px));
  padding: clamp(28px, 5vw, 58px);
}

.subpage-shell .content-hero h1,
.subpage-shell .profile-hero h1,
.subpage-shell .topup-hero h1,
.wiki-hero h1 {
  max-width: 100%;
  overflow-wrap: anywhere;
  text-wrap: balance;
  letter-spacing: 0.01em;
}

.subpage-shell img {
  max-width: 100%;
}

.subpage-shell .nav a img,
.subpage-shell .button img,
.subpage-shell .footer-links svg {
  flex: 0 0 auto;
}

.wiki-card-media {
  min-height: 180px;
  background: rgba(3, 7, 12, 0.72);
}

.store-status-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 18px;
  padding: 16px 18px;
  border: 1px solid rgba(98, 230, 255, 0.22);
  background:
    linear-gradient(135deg, rgba(9, 18, 28, 0.92), rgba(4, 8, 15, 0.9)),
    radial-gradient(circle at 0% 50%, rgba(33, 243, 240, 0.11), transparent 55%);
  color: rgba(255, 242, 210, 0.78);
}

.store-status-panel strong {
  display: block;
  margin-bottom: 2px;
  color: #fff3cf;
}

.store-status-panel p {
  margin: 0;
  line-height: 1.55;
}

.store-status-panel.is-warning {
  border-color: rgba(255, 224, 138, 0.32);
  background:
    linear-gradient(135deg, rgba(26, 19, 9, 0.92), rgba(4, 8, 15, 0.9)),
    radial-gradient(circle at 0% 50%, rgba(212, 154, 59, 0.16), transparent 55%);
}

.store-layout {
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.44fr);
}

.store-section-head,
.store-product-footer,
.store-cart-total,
.store-cart-item,
.store-quantity-control,
.profile-action-row,
.profile-login-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.store-section-head,
.store-product-footer,
.store-cart-total,
.store-cart-item {
  justify-content: space-between;
}

.store-category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px;
}

.store-category-tabs button {
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid rgba(216, 175, 100, 0.22);
  border-radius: 8px;
  background: rgba(4, 8, 14, 0.72);
  color: rgba(255, 242, 210, 0.78);
  font-weight: 800;
  cursor: pointer;
}

.store-category-tabs button.is-active {
  border-color: rgba(98, 230, 255, 0.52);
  background: rgba(33, 243, 240, 0.12);
  color: #fff3cf;
}

.store-product-grid {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.store-product-card {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 100%;
  padding: 0;
  overflow: hidden;
}

.store-product-art {
  min-height: 156px;
  display: grid;
  place-items: center;
  border-bottom: 1px solid rgba(216, 175, 100, 0.16);
  background:
    radial-gradient(
      circle at 50% 35%,
      rgba(98, 230, 255, 0.18),
      transparent 42%
    ),
    linear-gradient(135deg, rgba(5, 9, 16, 0.84), rgba(12, 10, 20, 0.92));
}

.store-product-art img {
  width: min(128px, 54%);
  max-height: 118px;
  object-fit: contain;
  filter: drop-shadow(0 14px 24px rgba(0, 0, 0, 0.5));
}

.store-product-copy,
.store-product-footer {
  padding: 16px;
}

.store-product-copy h3 {
  margin: 7px 0 8px;
  color: #fff3cf;
  font-family: Cinzel, serif;
  font-size: 1.2rem;
}

.store-product-copy p,
.store-product-type,
.store-cart-item span,
.payment-result-card p {
  color: rgba(255, 242, 210, 0.68);
  line-height: 1.55;
}

.store-product-type {
  display: inline-flex;
  width: fit-content;
  padding: 5px 8px;
  border: 1px solid rgba(98, 230, 255, 0.2);
  background: rgba(98, 230, 255, 0.07);
  font-size: 0.76rem;
  font-weight: 800;
}

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

.store-cart-item {
  padding: 12px;
  border: 1px solid rgba(255, 242, 210, 0.1);
  background: rgba(4, 8, 14, 0.62);
}

.store-cart-item > div:first-child {
  min-width: 0;
}

.store-cart-item strong {
  display: block;
  color: #fff3cf;
  overflow-wrap: anywhere;
}

.store-quantity-control {
  flex: 0 0 auto;
  padding: 4px;
  border: 1px solid rgba(216, 175, 100, 0.22);
  background: rgba(3, 7, 12, 0.72);
}

.store-quantity-control button {
  width: 32px;
  height: 32px;
  border: 0;
  background: rgba(216, 175, 100, 0.14);
  color: #fff3cf;
  cursor: pointer;
}

.store-quantity-control span {
  min-width: 28px;
  text-align: center;
  color: #fff3cf;
  font-weight: 900;
}

.store-phone-field {
  display: grid;
  gap: 8px;
}

.store-phone-field input {
  min-height: 44px;
  border: 1px solid rgba(98, 230, 255, 0.24);
  background: rgba(2, 6, 11, 0.72);
  color: #fff3cf;
  padding: 0 12px;
}

.store-checkout-button {
  width: 100%;
}

.store-checkout-button:disabled,
.button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
  transform: none;
}

.payment-result-card {
  display: grid;
  gap: 12px;
}

.payment-result-card h2 {
  margin: 0;
  color: #fff3cf;
  font-family: Cinzel, serif;
}

.payment-qr {
  width: min(260px, 100%);
  margin-inline: auto;
  border: 1px solid rgba(216, 175, 100, 0.26);
  background: #fff;
}

.player-profile-layout {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.62fr);
}

.player-identity-card,
.profile-login-required-card {
  position: relative;
  overflow: hidden;
}

.profile-action-row,
.profile-login-actions {
  flex-wrap: wrap;
  margin-top: 22px;
}

.profile-login-required-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}

.profile-login-required-card h2 {
  margin: 0 0 8px;
  color: #fff3cf;
  font-family: Cinzel, serif;
}

.profile-login-required-card p {
  margin: 0;
  color: rgba(255, 242, 210, 0.72);
}

.editor-helper-text,
.editor-selected-asset {
  color: rgba(255, 242, 210, 0.66);
  line-height: 1.55;
}

.editor-selected-asset code {
  color: #8ff8ff;
  overflow-wrap: anywhere;
}

.editor-store-row {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 16px;
}

.editor-store-preview {
  display: grid;
  gap: 8px;
  align-content: start;
}

.editor-store-preview img {
  width: 150px;
  height: 118px;
  object-fit: contain;
  padding: 12px;
  border: 1px solid rgba(216, 175, 100, 0.22);
  background: rgba(2, 6, 11, 0.72);
}

.editor-store-preview span {
  width: fit-content;
  padding: 5px 8px;
  border: 1px solid rgba(98, 230, 255, 0.22);
  color: #8ff8ff;
  font-size: 0.74rem;
  font-weight: 800;
}

.editor-order-list {
  display: grid;
  gap: 8px;
}

.editor-order-row {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) 120px 120px 120px minmax(
      150px,
      auto
    );
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid rgba(255, 242, 210, 0.1);
  background: rgba(4, 8, 14, 0.52);
  color: rgba(255, 242, 210, 0.7);
}

.editor-order-row strong,
.editor-order-row b {
  color: #fff3cf;
}

@media (max-width: 980px) {
  .subpage-topbar.portal-topbar {
    width: calc(100vw - 20px);
    max-width: calc(100vw - 20px);
    margin: 10px auto 28px;
  }

  .subpage-shell .content-page,
  .subpage-shell .profile-page,
  .subpage-shell .topup-page,
  .wiki-page {
    width: calc(100vw - 24px);
    max-width: calc(100vw - 24px);
  }

  .store-layout,
  .player-profile-layout,
  .profile-login-required-card {
    grid-template-columns: 1fr;
  }

  .profile-login-required-card {
    display: grid;
  }

  .editor-order-row {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 720px) {
  .subpage-topbar.portal-topbar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 12px;
  }

  .subpage-topbar.portal-topbar .brand {
    justify-content: center;
  }

  .subpage-topbar.portal-topbar .nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
  }

  .subpage-topbar.portal-topbar .nav a {
    min-width: 0;
    justify-content: center;
    padding: 9px 5px;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
  }

  .subpage-topbar.portal-topbar .header-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    width: 100%;
  }

  .subpage-topbar.portal-topbar .button,
  .subpage-topbar.portal-topbar .button-ip,
  .subpage-topbar.portal-topbar .button-discord {
    width: 100%;
    min-width: 0;
  }

  .subpage-topbar.portal-topbar .button-ip .ip-text {
    max-width: none;
    min-width: 0;
  }

  .subpage-topbar.portal-topbar .copy-hint {
    display: inline-flex;
  }

  .subpage-shell .content-hero,
  .subpage-shell .profile-hero,
  .subpage-shell .topup-hero,
  .polished-subpage-hero {
    padding: 24px 18px;
  }

  .subpage-shell .content-hero h1,
  .subpage-shell .profile-hero h1,
  .subpage-shell .topup-hero h1,
  .wiki-hero h1 {
    font-size: clamp(2.25rem, 12vw, 3.25rem);
    line-height: 1.02;
  }

  .profile-hero-actions,
  .store-status-panel,
  .store-section-head,
  .store-product-footer,
  .store-cart-total,
  .store-cart-item {
    align-items: stretch;
    flex-direction: column;
  }

  .store-product-grid {
    grid-template-columns: 1fr;
  }

  .store-product-footer .button,
  .profile-hero-actions .button,
  .profile-login-actions .button,
  .profile-action-row .button {
    width: 100%;
  }

  .wiki-layout.polished-wiki-layout {
    width: calc(100vw - 24px);
    grid-template-columns: 1fr;
    gap: 18px;
    padding-top: 36px;
  }

  .wiki-sidebar {
    position: static;
    display: flex;
    overflow-x: auto;
    padding: 10px;
  }

  .wiki-sidebar a {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .wiki-card,
  .polished-wiki-card {
    padding: 18px;
  }

  .wiki-card-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .editor-store-row,
  .editor-order-row {
    grid-template-columns: 1fr;
  }

  .editor-store-preview img {
    width: 100%;
  }
}

/* Final mobile hardening after live audit: keep the ornate topbar inside narrow screens. */
*,
*::before,
*::after {
  box-sizing: border-box;
}

@media (max-width: 720px) {
  html,
  body,
  .subpage-shell,
  .subpage-page,
  .content-page,
  .profile-page,
  .topup-page,
  .wiki-page {
    max-width: 100vw;
    overflow-x: hidden;
  }

  .subpage-topbar.portal-topbar {
    width: min(100%, calc(100vw - 22px));
    max-width: calc(100vw - 22px);
    overflow: hidden;
  }

  .subpage-topbar.portal-topbar .brand,
  .subpage-topbar.portal-topbar .nav,
  .subpage-topbar.portal-topbar .header-actions {
    min-width: 0;
  }

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

  .subpage-topbar.portal-topbar .nav a {
    overflow: hidden;
  }

  .subpage-topbar.portal-topbar .nav .nav-icon,
  .subpage-topbar.portal-topbar .nav a img {
    flex: 0 0 auto;
  }

  .subpage-topbar.portal-topbar .button-ip {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    overflow: hidden;
  }

  .subpage-topbar.portal-topbar .button-ip .ip-text {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .subpage-topbar.portal-topbar .button-ip .copy-hint {
    display: none;
  }

  .subpage-topbar.portal-topbar .server-count {
    min-width: 34px;
    justify-content: center;
  }
}

/* Desktop subpage topbar: keep the game portal navigation in one strong row. */
@media (min-width: 1380px) {
  .subpage-topbar.portal-topbar {
    width: min(1376px, calc(100vw - 64px));
    grid-template-columns: 116px minmax(0, 1fr) 454px;
    align-items: center;
    gap: 12px;
    min-height: 88px;
    padding: 12px 16px;
  }

  .subpage-topbar.portal-topbar .brand-logo {
    width: 96px;
    height: 58px;
  }

  .subpage-topbar.portal-topbar .nav {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    align-items: center;
    gap: 4px;
    flex-wrap: nowrap;
  }

  .subpage-topbar.portal-topbar .nav a {
    min-width: 0;
    min-height: 44px;
    justify-content: center;
    gap: 5px;
    padding: 8px 6px;
    font-size: 0.72rem;
    letter-spacing: 0.1em;
  }

  .subpage-topbar.portal-topbar .nav a img {
    width: 18px;
    height: 18px;
  }

  .subpage-topbar.portal-topbar .header-actions {
    display: grid;
    width: 100%;
    grid-template-columns: minmax(0, 1fr) 164px;
    align-items: center;
    gap: 10px;
  }

  .subpage-topbar.portal-topbar .button-ip {
    display: grid;
    width: 100%;
    min-width: 0;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 8px;
    padding-inline: 12px;
    overflow: hidden;
  }

  .subpage-topbar.portal-topbar .button-ip .ip-text {
    display: block;
    min-width: 0;
    max-width: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .subpage-topbar.portal-topbar .button-ip .copy-hint {
    display: inline-flex;
  }

  .subpage-topbar.portal-topbar .button-discord {
    width: 100%;
    min-width: 0;
    padding-inline: 12px;
  }
}

/* Subpage header uses IP as a copy affordance; detailed player status stays in status panels. */
.subpage-topbar.portal-topbar .server-count {
  display: none;
}

.subpage-topbar.portal-topbar .button-ip {
  grid-template-columns: auto minmax(0, 1fr) auto;
}

/* Visual Editor expansion: ordering, visibility, and media-pick controls. */
.editor-row-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding: 8px;
  border: 1px solid rgba(216, 175, 100, 0.14);
  background: rgba(255, 224, 138, 0.035);
}

.editor-row-tools-full {
  grid-column: 1 / -1;
}

.editor-row-tools button,
.editor-inline-actions button,
.editor-mini-list button,
.editor-list-row > button,
.editor-rule-item > button,
.editor-inventory-item button {
  min-height: 34px;
  border: 1px solid rgba(98, 230, 255, 0.22);
  border-radius: 8px;
  padding: 7px 10px;
  color: #dffcff;
  background: rgba(8, 28, 38, 0.72);
  font-weight: 800;
  cursor: pointer;
}

.editor-row-tools button:hover,
.editor-inline-actions button:hover,
.editor-mini-list button:hover,
.editor-list-row > button:hover,
.editor-rule-item > button:hover,
.editor-inventory-item button:hover {
  border-color: rgba(98, 230, 255, 0.5);
  background: rgba(21, 72, 92, 0.82);
  box-shadow: 0 0 18px rgba(44, 231, 255, 0.16);
}

.editor-heading-row {
  border-color: rgba(98, 230, 255, 0.26);
  background:
    radial-gradient(
      circle at 90% 0%,
      rgba(98, 230, 255, 0.08),
      transparent 36%
    ),
    rgba(6, 12, 22, 0.7);
}

.editor-rule-item,
.editor-inventory-item {
  display: grid;
  gap: 10px;
  margin-top: 10px;
  padding: 10px;
  border: 1px solid rgba(255, 242, 210, 0.1);
  background: rgba(3, 7, 13, 0.46);
}

.editor-rule-item {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
}

.editor-object-key {
  width: fit-content;
  max-width: 100%;
  overflow-wrap: anywhere;
  border: 1px solid rgba(216, 175, 100, 0.22);
  border-radius: 999px;
  padding: 5px 9px;
  color: #ffe7a6;
  background: rgba(216, 175, 100, 0.08);
  font-size: 0.75rem;
  font-weight: 900;
}

.admin-preview-actions {
  flex-wrap: wrap;
}

@media (max-width: 720px) {
  .editor-rule-item {
    grid-template-columns: 1fr;
  }

  .editor-row-tools button,
  .editor-inline-actions button,
  .editor-mini-list button,
  .editor-list-row > button,
  .editor-rule-item > button,
  .editor-inventory-item button {
    width: 100%;
  }
}

/* Store payment choice, styled as a relic checkout selector. */
.payment-method-fieldset {
  position: relative;
  display: grid;
  gap: 14px;
  margin: 18px 0 0;
  padding: 22px 16px 16px;
  border: 1px solid rgba(216, 175, 100, 0.34);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(12, 17, 26, 0.82), rgba(4, 7, 12, 0.9)),
    radial-gradient(
      circle at 16% 50%,
      rgba(98, 230, 255, 0.08),
      transparent 36%
    ),
    radial-gradient(
      circle at 88% 12%,
      rgba(216, 175, 100, 0.08),
      transparent 32%
    );
  box-shadow:
    inset 0 1px 0 rgba(255, 242, 210, 0.06),
    0 16px 44px rgba(0, 0, 0, 0.2);
}

.payment-method-fieldset legend {
  padding: 0 10px;
  color: #e1c48a;
  font-family: Cinzel, Georgia, serif;
  font-size: 0.86rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.payment-method-options {
  display: grid;
  gap: 12px;
}

.payment-method-option {
  position: relative;
  display: grid;
  min-height: 94px;
  grid-template-columns: 38px minmax(118px, 0.9fr) minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 1px solid rgba(255, 242, 210, 0.12);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(13, 19, 29, 0.96), rgba(8, 11, 18, 0.96)),
    radial-gradient(circle at 20% 50%, rgba(98, 230, 255, 0.1), transparent 30%);
  cursor: pointer;
  transition:
    border-color 170ms ease,
    box-shadow 170ms ease,
    transform 170ms ease,
    background 170ms ease;
}

.payment-method-option:hover {
  border-color: rgba(98, 230, 255, 0.36);
  box-shadow: 0 0 28px rgba(44, 231, 255, 0.12);
  transform: translateY(-1px);
}

.payment-method-option.is-selected {
  border-color: rgba(225, 196, 138, 0.72);
  background:
    linear-gradient(135deg, rgba(18, 24, 34, 0.98), rgba(7, 11, 18, 0.98)),
    radial-gradient(
      circle at 22% 50%,
      rgba(98, 230, 255, 0.16),
      transparent 34%
    ),
    radial-gradient(
      circle at 86% 12%,
      rgba(216, 175, 100, 0.12),
      transparent 36%
    );
  box-shadow:
    0 0 0 1px rgba(225, 196, 138, 0.18),
    0 0 30px rgba(216, 175, 100, 0.1),
    inset 0 1px 0 rgba(255, 242, 210, 0.08);
}

.payment-method-option.is-disabled {
  cursor: not-allowed;
  opacity: 0.62;
  filter: grayscale(0.34);
}

.payment-method-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.payment-radio {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 2px solid rgba(255, 242, 210, 0.78);
  border-radius: 999px;
  background:
    radial-gradient(
      circle at 50% 50%,
      rgba(255, 255, 255, 0.9),
      rgba(255, 255, 255, 0.12) 54%,
      transparent 56%
    ),
    rgba(4, 7, 12, 0.86);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.5),
    0 0 18px rgba(255, 242, 210, 0.16);
}

.payment-method-option.is-selected .payment-radio::after {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: #20f3f0;
  box-shadow: 0 0 16px rgba(32, 243, 240, 0.86);
}

.payment-logo-frame {
  display: grid;
  min-height: 64px;
  place-items: center;
  border-right: 1px solid rgba(255, 242, 210, 0.1);
  padding-right: 12px;
}

.promptpay-mark {
  display: grid;
  width: min(168px, 100%);
  min-height: 56px;
  place-items: center;
  border: 2px solid #1f5b84;
  background: #ffffff;
  color: #07527c;
  line-height: 1;
  box-shadow:
    0 0 0 3px rgba(255, 255, 255, 0.18),
    0 8px 22px rgba(0, 0, 0, 0.24);
}

.promptpay-thai {
  margin-bottom: -2px;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.promptpay-word {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: clamp(1.42rem, 3.4vw, 2rem);
  letter-spacing: -0.04em;
}

.promptpay-word strong {
  color: #003b68;
  font-size: 1.12em;
}

.truemoney-mark {
  display: grid;
  place-items: center;
  gap: 2px;
  color: #ff7b21;
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1;
  text-align: center;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.28));
}

.truemoney-mark svg {
  width: 92px;
  height: 56px;
}

.truemoney-mark b {
  color: #ff1f2f;
  font-size: 1rem;
  letter-spacing: -0.04em;
}

.truemoney-mark small {
  color: #ff7b21;
  font-size: 0.86rem;
  font-weight: 800;
}

.payment-option-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.payment-option-copy strong {
  color: #fff3cf;
  font-family: Cinzel, Georgia, serif;
  font-size: clamp(1.2rem, 3vw, 1.6rem);
  line-height: 1.08;
  text-wrap: balance;
}

.payment-option-copy small {
  color: rgba(255, 242, 210, 0.64);
  font-weight: 800;
  line-height: 1.35;
}

@media (max-width: 720px) {
  .payment-method-fieldset {
    padding: 20px 12px 12px;
  }

  .payment-method-option {
    min-height: 86px;
    grid-template-columns: 34px minmax(96px, 0.86fr) minmax(0, 1fr);
    gap: 10px;
    padding: 12px 10px;
  }

  .payment-radio {
    width: 26px;
    height: 26px;
  }

  .payment-logo-frame {
    min-height: 58px;
    padding-right: 8px;
  }

  .promptpay-mark {
    width: 124px;
    min-height: 48px;
  }

  .promptpay-thai {
    font-size: 0.58rem;
  }

  .promptpay-word {
    font-size: 1.26rem;
  }

  .truemoney-mark svg {
    width: 72px;
    height: 46px;
  }

  .payment-option-copy strong {
    font-size: 1.12rem;
  }
}

@media (max-width: 420px) {
  .payment-method-option {
    grid-template-columns: 30px minmax(84px, 0.76fr) minmax(0, 1fr);
  }

  .promptpay-mark {
    width: 106px;
  }

  .payment-option-copy strong {
    font-size: 1rem;
  }

  .payment-option-copy small {
    font-size: 0.72rem;
  }
}

/* Real payment brand images supplied by MythmereCraft. */
.payment-logo-img {
  display: block;
  max-width: 100%;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.34));
}

.payment-logo-promptpay {
  width: min(168px, 100%);
  max-height: 58px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  background: #ffffff;
}

.payment-logo-truemoney {
  width: min(156px, 100%);
  max-height: 76px;
}

@media (max-width: 720px) {
  .payment-logo-promptpay {
    width: min(124px, 100%);
    max-height: 52px;
  }

  .payment-logo-truemoney {
    width: min(118px, 100%);
    max-height: 62px;
  }
}

@media (max-width: 420px) {
  .payment-logo-promptpay {
    width: min(106px, 100%);
  }

  .payment-logo-truemoney {
    width: min(100px, 100%);
  }
}

/* Homepage visual-editor content modules. */
.editor-upload-row-prominent {
  align-items: stretch;
  margin: 12px 0 14px;
}

.editor-upload-row-prominent label {
  flex: 1 1 220px;
  min-height: 92px;
  display: grid;
  gap: 8px;
  align-content: center;
  padding: 14px;
  border: 1px dashed rgba(98, 230, 255, 0.36);
  background: linear-gradient(
    135deg,
    rgba(15, 57, 72, 0.38),
    rgba(35, 22, 61, 0.32)
  );
}

.editor-upload-row-prominent input {
  color: rgba(255, 242, 210, 0.78);
}

.editor-helper-text code,
.editor-selected-asset code {
  color: #8ff8ff;
  word-break: break-all;
}

.editor-asset-grid button.is-selected {
  border-color: rgba(98, 230, 255, 0.82);
  background: rgba(98, 230, 255, 0.12);
  box-shadow: inset 0 0 0 1px rgba(98, 230, 255, 0.26);
}

.editor-row-tools-full {
  grid-column: 1 / -1;
}

.editor-media-row .editor-row-tools-full + img {
  align-self: start;
}

/* Wiki rich text editor and rendered article content. */
.rich-editor-field {
  display: grid;
  gap: 10px;
  margin: 16px 0;
}

.rich-editor-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.rich-editor-head span {
  color: rgba(255, 242, 210, 0.72);
  font-size: 0.82rem;
  font-weight: 800;
}

.rich-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 10px;
  border: 1px solid rgba(216, 175, 100, 0.2);
  background: rgba(3, 7, 12, 0.86);
}

.rich-toolbar select,
.rich-toolbar button,
.rich-color-control {
  min-height: 36px;
  border: 1px solid rgba(98, 230, 255, 0.22);
  background: rgba(11, 18, 28, 0.92);
  color: #fff3cf;
  padding: 7px 10px;
  font-weight: 800;
}

.rich-toolbar select {
  min-width: 150px;
}

.rich-toolbar button:hover,
.rich-editor-head button:hover {
  border-color: rgba(98, 230, 255, 0.62);
  color: #8ff8ff;
}

.rich-color-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.rich-color-control input {
  width: 30px;
  height: 24px;
  padding: 0;
  border: 0;
  background: transparent;
}

.rich-editor-canvas,
.rich-source-area {
  width: 100%;
  min-height: 420px;
  border: 1px solid rgba(98, 230, 255, 0.26);
  background:
    linear-gradient(180deg, rgba(8, 14, 22, 0.95), rgba(2, 5, 10, 0.92)),
    radial-gradient(circle at 95% 0%, rgba(128, 80, 255, 0.14), transparent 34%);
  color: #fff3cf;
  padding: 18px;
  outline: none;
  line-height: 1.75;
}

.rich-editor-canvas:focus,
.rich-source-area:focus {
  border-color: rgba(98, 230, 255, 0.72);
  box-shadow: inset 0 0 0 1px rgba(98, 230, 255, 0.2);
}

.rich-editor-canvas:empty::before {
  content: attr(data-placeholder);
  color: rgba(255, 242, 210, 0.42);
}

.rich-editor-canvas h2,
.rich-editor-canvas h3,
.wiki-rich-content h2,
.wiki-rich-content h3 {
  margin: 1.1em 0 0.35em;
  color: #fff3cf;
  font-family: Cinzel, serif;
}

.rich-editor-canvas p,
.wiki-rich-content p {
  margin: 0 0 1em;
}

.rich-editor-canvas ul,
.rich-editor-canvas ol,
.wiki-rich-content ul,
.wiki-rich-content ol {
  margin: 0.85em 0 1.1em 1.4em;
  padding: 0;
}

.rich-editor-canvas li,
.wiki-rich-content li {
  margin: 0.35em 0;
}

.rich-editor-canvas blockquote,
.wiki-rich-content blockquote {
  margin: 1em 0;
  padding: 12px 14px;
  border: 1px solid rgba(216, 175, 100, 0.26);
  background: rgba(216, 175, 100, 0.08);
  color: rgba(255, 242, 210, 0.9);
}

.rich-editor-canvas img,
.wiki-rich-content img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 14px 0;
  border: 1px solid rgba(216, 175, 100, 0.28);
}

.wiki-rich-content {
  max-width: 78ch;
  color: rgba(255, 242, 210, 0.82);
  font-size: clamp(1rem, 0.95rem + 0.2vw, 1.14rem);
  line-height: 1.9;
}

.wiki-rich-content a {
  color: #8ff8ff;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.wiki-image-caption {
  color: rgba(255, 242, 210, 0.58);
  font-size: 0.92rem;
}

/* Inline media picker for the Wiki rich editor. */
.rich-toolbar button.is-active {
  border-color: rgba(98, 230, 255, 0.72);
  background: rgba(98, 230, 255, 0.14);
  color: #8ff8ff;
}

.rich-image-picker {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(216, 175, 100, 0.28);
  background:
    radial-gradient(circle at 0 0, rgba(98, 230, 255, 0.08), transparent 34%),
    rgba(2, 6, 11, 0.92);
}

.rich-image-picker-head {
  display: grid;
  gap: 3px;
}

.rich-image-picker-head strong {
  color: #fff3cf;
}

.rich-image-picker-head span {
  color: rgba(255, 242, 210, 0.58);
  font-size: 0.86rem;
  overflow-wrap: anywhere;
}

.rich-manual-image-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.rich-manual-image-row input {
  min-width: 0;
  border: 1px solid rgba(98, 230, 255, 0.24);
  background: rgba(3, 7, 12, 0.94);
  color: #fff3cf;
  padding: 10px 12px;
}

.rich-manual-image-row button,
.rich-selected-asset {
  border: 1px solid rgba(216, 175, 100, 0.34);
  background: rgba(216, 175, 100, 0.1);
  color: #fff3cf;
  padding: 10px 12px;
  font-weight: 900;
}

.rich-selected-asset {
  width: 100%;
  text-align: left;
  overflow-wrap: anywhere;
}

.rich-image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(108px, 1fr));
  gap: 10px;
  max-height: 320px;
  overflow: auto;
  padding-right: 4px;
}

.rich-image-grid button {
  display: grid;
  gap: 7px;
  border: 1px solid rgba(216, 175, 100, 0.22);
  background: rgba(8, 14, 22, 0.88);
  color: rgba(255, 242, 210, 0.78);
  padding: 8px;
  text-align: left;
}

.rich-image-grid button:hover,
.rich-image-grid button.is-selected {
  border-color: rgba(98, 230, 255, 0.7);
  background: rgba(98, 230, 255, 0.1);
}

.rich-image-grid img {
  width: 100%;
  aspect-ratio: 1.25;
  object-fit: cover;
  background: rgba(0, 0, 0, 0.35);
}

.rich-image-grid span {
  min-width: 0;
  font-size: 0.72rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 720px) {
  .rich-manual-image-row {
    grid-template-columns: 1fr;
  }
}

/* Manual PromptPay + slip review flow. */
.manual-payment-card {
  display: grid;
  gap: 16px;
}

.manual-payment-summary {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 14px;
  padding: 14px;
  border: 1px solid rgba(216, 175, 100, 0.28);
  background: rgba(3, 7, 12, 0.72);
}

.manual-payment-summary span {
  color: rgba(255, 242, 210, 0.64);
  font-size: 0.82rem;
  font-weight: 800;
}

.manual-payment-summary strong {
  color: #fff3cf;
  text-align: right;
  overflow-wrap: anywhere;
}

.manual-payment-qr {
  width: min(100%, 420px);
  max-height: none;
  justify-self: center;
  padding: 10px;
  border: 1px solid rgba(98, 230, 255, 0.34);
  background: #ffffff;
  box-shadow: 0 0 28px rgba(98, 230, 255, 0.12);
}

.manual-slip-form {
  display: grid;
  gap: 12px;
  padding-top: 4px;
}

.manual-slip-form label {
  display: grid;
  gap: 7px;
  color: rgba(255, 242, 210, 0.72);
  font-weight: 900;
}

.manual-slip-form input,
.manual-slip-form textarea {
  width: 100%;
  border: 1px solid rgba(98, 230, 255, 0.24);
  background: rgba(3, 7, 12, 0.92);
  color: #fff3cf;
  padding: 11px 12px;
}

.manual-slip-form input:focus,
.manual-slip-form textarea:focus {
  outline: none;
  border-color: rgba(98, 230, 255, 0.68);
  box-shadow: 0 0 0 3px rgba(98, 230, 255, 0.08);
}

.manual-slip-file input {
  border-style: dashed;
}

.manual-slip-message {
  margin: 0;
  color: rgba(143, 248, 255, 0.88);
  font-weight: 800;
}

.editor-order-row a,
.editor-order-row button {
  justify-self: start;
  border: 1px solid rgba(216, 175, 100, 0.3);
  background: rgba(216, 175, 100, 0.1);
  color: #fff3cf;
  padding: 7px 10px;
  font-weight: 900;
  text-decoration: none;
}

.editor-order-row button:hover,
.editor-order-row a:hover {
  border-color: rgba(98, 230, 255, 0.66);
  color: #8ff8ff;
}

@media (max-width: 720px) {
  .manual-payment-summary {
    grid-template-columns: 1fr;
  }

  .manual-payment-summary strong {
    text-align: left;
  }
}

.manual-payment-recipient {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid rgba(216, 175, 100, 0.3);
  background:
    linear-gradient(135deg, rgba(13, 19, 29, 0.96), rgba(5, 8, 14, 0.96)),
    radial-gradient(circle at 92% 12%, rgba(255, 122, 34, 0.14), transparent 34%);
}

.manual-payment-recipient span {
  color: rgba(225, 196, 138, 0.92);
  font-weight: 900;
}

.manual-payment-recipient strong {
  color: #fff3cf;
  font-size: clamp(1.24rem, 2.8vw, 1.72rem);
  overflow-wrap: anywhere;
}

.manual-payment-recipient small,
.manual-payment-recipient p {
  margin: 0;
  color: rgba(255, 242, 210, 0.72);
  font-weight: 800;
}

.manual-payment-brand-card {
  width: min(100%, 360px);
  max-height: 230px;
  object-fit: contain;
  padding: 18px;
}

.editor-store-settings {
  display: grid;
  gap: 14px;
}

.editor-payment-method-list {
  align-items: center;
}

.editor-payment-method-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(216, 175, 100, 0.25);
  background: rgba(216, 175, 100, 0.08);
  color: #fff3cf;
  padding: 9px 11px;
  font-weight: 900;
}

.editor-payment-method-toggle input {
  accent-color: #c6a15a;
}

.editor-store-settings-note {
  margin: 0;
  color: rgba(255, 242, 210, 0.64);
  font-weight: 800;
}
