:root {
  color-scheme: dark;
  --bg-0: #070810;
  --bg-1: #0c0e18;
  --bg-2: #111421;
  --bg-3: #171b2b;
  --surface: rgba(18, 21, 35, 0.82);
  --surface-strong: rgba(23, 27, 44, 0.96);
  --surface-soft: rgba(255, 255, 255, 0.035);
  --line: rgba(255, 255, 255, 0.085);
  --line-strong: rgba(255, 255, 255, 0.15);
  --text-1: #f7f7fb;
  --text-2: #b7bed0;
  --text-3: #777f96;
  --purple: #8b5cf6;
  --purple-2: #a78bfa;
  --blue: #3b82f6;
  --cyan: #22d3ee;
  --green: #34d399;
  --amber: #fbbf24;
  --red: #fb7185;
  --shadow-lg: 0 32px 90px rgba(0, 0, 0, 0.48);
  --shadow-md: 0 18px 45px rgba(0, 0, 0, 0.3);
  --glow: 0 0 0 1px rgba(139, 92, 246, 0.18), 0 20px 70px rgba(76, 29, 149, 0.22);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 26px;
  --header-h: 72px;
  --reader-scale: 1;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg-0);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 8% -10%, rgba(139, 92, 246, 0.17), transparent 34rem),
    radial-gradient(circle at 92% 12%, rgba(34, 211, 238, 0.08), transparent 30rem),
    var(--bg-0);
  color: var(--text-1);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.modal-open {
  overflow: hidden;
}

button,
input,
textarea,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

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

button {
  color: inherit;
}

img,
svg {
  display: block;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--purple-2);
  outline-offset: 3px;
}

::selection {
  background: rgba(139, 92, 246, 0.38);
  color: white;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  border: 3px solid transparent;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.16);
  background-clip: padding-box;
}

.icon {
  flex: 0 0 auto;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 0 17px;
  background: transparent;
  color: var(--text-1);
  font-weight: 680;
  font-size: 14px;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
}

.button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.button:active:not(:disabled) {
  transform: translateY(0);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.47;
}

.button-primary {
  border-color: rgba(167, 139, 250, 0.34);
  background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 56%, #3b82f6 120%);
  box-shadow: 0 12px 32px rgba(91, 33, 182, 0.32), inset 0 1px rgba(255, 255, 255, 0.22);
}

.button-primary:hover:not(:disabled) {
  box-shadow: 0 15px 36px rgba(91, 33, 182, 0.42), inset 0 1px rgba(255, 255, 255, 0.28);
}

.button-secondary {
  border-color: rgba(139, 92, 246, 0.28);
  background: rgba(139, 92, 246, 0.1);
  color: #ddd6fe;
}

.button-secondary:hover:not(:disabled) {
  background: rgba(139, 92, 246, 0.17);
}

.button-ghost {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.035);
  color: var(--text-2);
}

.button-ghost:hover:not(:disabled) {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.07);
  color: white;
}

.button-muted {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.025);
  color: var(--text-3);
}

.button-danger {
  border-color: rgba(251, 113, 133, 0.24);
  background: rgba(251, 113, 133, 0.08);
  color: #fda4af;
}

.button-danger:hover:not(:disabled) {
  background: rgba(251, 113, 133, 0.15);
}

.button-lg {
  min-height: 50px;
  padding-inline: 22px;
  border-radius: 14px;
  font-size: 15px;
}

.button-sm {
  min-height: 36px;
  padding-inline: 13px;
  border-radius: 10px;
  font-size: 13px;
}

.button-block {
  width: 100%;
}

.text-link,
.text-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 0;
  padding: 0;
  background: none;
  color: var(--purple-2);
  font-weight: 650;
  cursor: pointer;
}

.text-link:hover,
.text-button:hover {
  color: white;
}

.icon-button {
  display: inline-flex;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--text-2);
  cursor: pointer;
  transition: 160ms ease;
}

.icon-button:hover {
  border-color: rgba(139, 92, 246, 0.42);
  background: rgba(139, 92, 246, 0.1);
  color: white;
}

.text-input,
.admin-input,
.admin-select,
.admin-textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(6, 8, 16, 0.62);
  color: var(--text-1);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.025);
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.text-input,
.admin-input,
.admin-select {
  height: 45px;
  padding: 0 13px;
}

.text-input-large {
  height: 54px;
  padding-inline: 16px;
  font-size: 17px;
}

.admin-textarea,
textarea {
  resize: vertical;
}

.admin-textarea {
  min-height: 112px;
  padding: 13px;
  line-height: 1.65;
}

.text-input:hover,
.admin-input:hover,
.admin-select:hover,
.admin-textarea:hover {
  border-color: var(--line-strong);
}

.text-input:focus,
.admin-input:focus,
.admin-select:focus,
.admin-textarea:focus {
  outline: none;
  border-color: rgba(139, 92, 246, 0.68);
  background: rgba(10, 12, 22, 0.9);
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.11);
}

.mono,
code,
pre {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.field-label {
  display: block;
  margin: 0 0 8px;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 650;
}

.step-kicker,
.section-kicker {
  display: inline-flex;
  color: var(--purple-2);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.brand img {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  object-fit: cover;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12), 0 8px 25px rgba(76, 29, 149, 0.28);
}

.brand-copy {
  display: grid;
  gap: 1px;
  line-height: 1.1;
}

.brand-name {
  font-weight: 760;
  letter-spacing: -0.02em;
}

.brand-sub {
  color: var(--text-3);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.12em;
}

.brand-compact .brand-copy {
  display: grid;
}

.site-header {
  position: sticky;
  z-index: 60;
  top: 0;
  height: var(--header-h);
  border-bottom: 1px solid rgba(255, 255, 255, 0.065);
  background: rgba(7, 8, 16, 0.75);
  -webkit-backdrop-filter: blur(20px) saturate(130%);
  backdrop-filter: blur(20px) saturate(130%);
}

.site-header-inner {
  display: flex;
  width: min(1180px, calc(100% - 40px));
  height: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: auto;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.desktop-nav a {
  border-radius: 9px;
  padding: 9px 13px;
  color: var(--text-3);
  font-size: 14px;
  font-weight: 620;
  transition: 160ms ease;
}

.desktop-nav a:hover,
.desktop-nav a.active {
  background: rgba(255, 255, 255, 0.045);
  color: white;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: rgba(7, 8, 16, 0.66);
}

.site-footer-inner {
  display: grid;
  width: min(1180px, calc(100% - 40px));
  grid-template-columns: auto minmax(240px, 1fr) auto auto;
  align-items: center;
  gap: 28px;
  min-height: 112px;
  margin: auto;
}

.site-footer p {
  max-width: 520px;
  margin: 0;
  color: var(--text-3);
  font-size: 12px;
  line-height: 1.7;
}

.footer-links {
  display: flex;
  gap: 16px;
  color: var(--text-2);
  font-size: 13px;
}

.footer-links a:hover {
  color: white;
}

.footer-copyright {
  color: var(--text-3);
  font-size: 12px;
}

/* Home */
.home-hero {
  position: relative;
  isolation: isolate;
  min-height: 700px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero-grid {
  position: absolute;
  z-index: -3;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.72), transparent 84%);
}

.hero-glow {
  position: absolute;
  z-index: -2;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.22;
  pointer-events: none;
}

.hero-glow-a {
  top: -250px;
  left: 8%;
  background: var(--purple);
}

.hero-glow-b {
  right: 1%;
  bottom: -330px;
  background: var(--blue);
}

.home-hero-inner {
  display: grid;
  width: min(1180px, calc(100% - 40px));
  grid-template-columns: minmax(0, 1.04fr) minmax(390px, 0.78fr);
  align-items: center;
  gap: clamp(48px, 8vw, 110px);
  min-height: 650px;
  margin: auto;
  padding: 74px 0 58px;
}

.hero-copy {
  position: relative;
}

.eyebrow-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(167, 139, 250, 0.25);
  border-radius: 99px;
  padding: 8px 12px;
  background: rgba(139, 92, 246, 0.09);
  color: #ddd6fe;
  font-size: 12px;
  font-weight: 670;
}

.hero-copy h1 {
  max-width: 720px;
  margin: 25px 0 19px;
  font-size: clamp(44px, 6vw, 72px);
  line-height: 1.06;
  letter-spacing: -0.055em;
}

.hero-copy h1 span {
  display: block;
  margin-top: 5px;
  background: linear-gradient(90deg, #c4b5fd, #93c5fd 60%, #67e8f9);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lead {
  max-width: 630px;
  margin: 0;
  color: var(--text-2);
  font-size: 17px;
  line-height: 1.85;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 27px;
  color: var(--text-3);
  font-size: 12px;
}

.hero-meta > div {
  display: flex;
  align-items: center;
  gap: 7px;
}

.hero-game-card {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 26px;
  background: rgba(14, 16, 27, 0.8);
  box-shadow: var(--shadow-lg), var(--glow);
  transform: perspective(1000px) rotateY(-2deg) rotateX(1deg);
}

.hero-game-cover {
  position: relative;
  height: 310px;
  overflow: hidden;
}

.hero-game-cover > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cover-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(5, 6, 13, 0.04), rgba(5, 6, 13, 0.82));
}

.cover-topline {
  position: absolute;
  top: 18px;
  left: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 99px;
  padding: 7px 10px;
  background: rgba(8, 10, 17, 0.62);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  color: #d1fae5;
  font-size: 11px;
  font-weight: 650;
}

.live-dot,
.connection-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.1), 0 0 14px rgba(52, 211, 153, 0.7);
}

.connection-dot.offline {
  background: var(--amber);
  box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.1);
}

.cover-title {
  position: absolute;
  right: 22px;
  bottom: 20px;
  left: 22px;
}

.cover-title small {
  color: rgba(255, 255, 255, 0.62);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.cover-title h2 {
  margin: 7px 0 1px;
  font-size: 34px;
  letter-spacing: -0.04em;
}

.cover-title p {
  margin: 0;
  color: #c4b5fd;
}

.hero-game-body {
  padding: 20px 22px 22px;
}

.game-stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.game-stat-row div {
  display: grid;
  gap: 3px;
  text-align: center;
}

.game-stat-row div + div {
  border-left: 1px solid var(--line);
}

.game-stat-row strong {
  font-size: 18px;
}

.game-stat-row span {
  color: var(--text-3);
  font-size: 10px;
}

.hero-scene-preview {
  display: flex;
  gap: 11px;
  margin: 18px 0;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.027);
}

.hero-scene-preview p {
  margin: 0;
  color: var(--text-2);
  font-size: 12px;
  line-height: 1.65;
}

.announcement-bar {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 43px;
  border-top: 1px solid var(--line);
  background: rgba(139, 92, 246, 0.07);
  color: #ddd6fe;
  font-size: 12px;
}

.section {
  padding: 92px 0;
}

.shell-section,
.feature-section,
.story-section,
.faq-section {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 34px;
}

.section-heading.centered {
  display: grid;
  justify-items: center;
  max-width: 700px;
  margin-right: auto;
  margin-left: auto;
  text-align: center;
}

.section-heading h2,
.story-demo h2 {
  margin: 7px 0 0;
  font-size: clamp(30px, 4vw, 44px);
  letter-spacing: -0.045em;
}

.section-heading > p {
  max-width: 460px;
  margin: 0;
  color: var(--text-3);
  line-height: 1.7;
}

.world-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.925fr 0.925fr;
  gap: 18px;
}

.world-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(17, 20, 33, 0.74);
  transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

.world-card:hover {
  transform: translateY(-4px);
  border-color: rgba(139, 92, 246, 0.28);
  box-shadow: var(--shadow-md);
}

.world-card-art {
  position: relative;
  height: 235px;
  overflow: hidden;
  background: #121524;
}

.world-card-art > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.world-card-art::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 42%, rgba(10, 12, 20, 0.88));
  content: "";
}

.world-card-pattern {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  background:
    radial-gradient(circle at 35% 40%, rgba(139, 92, 246, 0.26), transparent 22%),
    linear-gradient(135deg, #15182a, #0d0f19);
  color: var(--purple-2);
}

.world-eyebrow {
  position: absolute;
  z-index: 2;
  bottom: 15px;
  left: 16px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 10px;
  font-weight: 760;
  letter-spacing: 0.08em;
}

.world-card-body {
  padding: 23px;
}

.world-card-body h3 {
  margin: 0;
  font-size: 24px;
}

.world-subtitle {
  margin: 3px 0 14px !important;
  color: var(--purple-2) !important;
  font-size: 13px;
}

.world-card-body > p {
  min-height: 68px;
  margin: 0;
  color: var(--text-3);
  font-size: 13px;
  line-height: 1.7;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 17px 0;
}

.tag-list span {
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 5px 8px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-2);
  font-size: 10px;
}

.feature-section {
  width: 100%;
  padding-right: max(20px, calc((100% - 1180px) / 2));
  padding-left: max(20px, calc((100% - 1180px) / 2));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(139, 92, 246, 0.025), rgba(59, 130, 246, 0.018));
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.feature-card {
  min-height: 210px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(17, 20, 33, 0.66);
}

.feature-icon {
  display: grid;
  width: 43px;
  height: 43px;
  margin-bottom: 34px;
  place-items: center;
  border: 1px solid rgba(139, 92, 246, 0.24);
  border-radius: 13px;
  background: rgba(139, 92, 246, 0.09);
  color: var(--purple-2);
}

.feature-card h3 {
  margin: 0 0 9px;
  font-size: 17px;
}

.feature-card p {
  margin: 0;
  color: var(--text-3);
  font-size: 13px;
  line-height: 1.75;
}

.story-demo {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(50px, 8vw, 120px);
  align-items: center;
  min-height: 500px;
  padding: clamp(32px, 6vw, 70px);
  border: 1px solid var(--line);
  border-radius: 28px;
  background:
    radial-gradient(circle at 80% 20%, rgba(59, 130, 246, 0.12), transparent 24rem),
    rgba(16, 19, 31, 0.84);
  box-shadow: var(--shadow-md);
}

.story-demo-copy > p {
  color: var(--text-2);
  line-height: 1.8;
}

.story-demo-copy ul {
  display: grid;
  gap: 11px;
  margin: 25px 0 29px;
  padding: 0;
  list-style: none;
}

.story-demo-copy li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-2);
  font-size: 13px;
}

.story-demo-copy li .icon {
  color: var(--green);
}

.choice-stack {
  display: grid;
  gap: 12px;
}

.choice-preview {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 110px;
  padding: 21px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.03);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.18);
  transition: transform 180ms ease;
}

.choice-preview:nth-child(1) { transform: translateX(-13px); }
.choice-preview:nth-child(3) { transform: translateX(13px); }
.choice-preview:hover { transform: translateX(0) scale(1.01); }

.choice-preview > span {
  color: var(--text-3);
  font-family: monospace;
  font-size: 12px;
}

.choice-preview strong {
  display: block;
  margin-bottom: 6px;
}

.choice-preview p {
  margin: 0;
  color: var(--text-3);
  font-size: 12px;
}

.choice-honest { border-left: 3px solid var(--cyan); }
.choice-protect { border-left: 3px solid var(--purple); }
.choice-bold { border-left: 3px solid var(--amber); }

.faq-list {
  display: grid;
  max-width: 800px;
  gap: 10px;
  margin: auto;
}

.faq-item {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(17, 20, 33, 0.62);
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 19px 20px;
  font-weight: 650;
  cursor: pointer;
  list-style: none;
}

.faq-item summary::-webkit-details-marker { display: none; }
.faq-item[open] summary .icon { transform: rotate(90deg); }
.faq-item p {
  margin: 0;
  padding: 0 20px 20px;
  color: var(--text-3);
  line-height: 1.75;
}

/* Ads */
.ad-slot-wrap {
  width: min(1180px, calc(100% - 40px));
  margin: 18px auto;
}

.ad-house {
  display: flex;
  width: 100%;
  min-height: 86px;
  align-items: center;
  gap: 15px;
  padding: 14px 17px;
  border: 1px solid rgba(139, 92, 246, 0.18);
  border-radius: 15px;
  background: linear-gradient(110deg, rgba(139, 92, 246, 0.09), rgba(59, 130, 246, 0.05));
  transition: border-color 160ms ease, background 160ms ease;
}

.ad-house:hover {
  border-color: rgba(139, 92, 246, 0.35);
  background: linear-gradient(110deg, rgba(139, 92, 246, 0.14), rgba(59, 130, 246, 0.08));
}

.ad-house-mark {
  display: grid;
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 13px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.3), rgba(59, 130, 246, 0.18));
  color: #ddd6fe;
}

.ad-house-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.ad-label {
  color: var(--text-3);
  font-size: 9px;
  font-weight: 760;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.ad-house-copy strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ad-house-copy p {
  overflow: hidden;
  margin: 0;
  color: var(--text-3);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ad-house-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  color: #c4b5fd;
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}

.ad-google,
.ad-domestic {
  position: relative;
  min-height: 90px;
  padding-top: 17px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
  overflow: hidden;
}

.ad-google > .ad-label,
.ad-domestic > .ad-label {
  position: absolute;
  top: 4px;
  left: 8px;
}

.ad-domestic iframe {
  display: block;
  width: 100%;
  border: 0;
}

.ad-empty {
  display: grid;
  min-height: 90px;
  place-items: center;
  border: 1px dashed var(--line);
  border-radius: 14px;
  color: var(--text-3);
  font-size: 12px;
}

/* Shared loading/error */
.page-loading,
.error-page,
.admin-message-page {
  display: grid;
  min-height: calc(100vh - var(--header-h));
  place-items: center;
  align-content: center;
  gap: 16px;
  padding: 40px 20px;
  text-align: center;
}

.loading-orb,
.generating-orb {
  width: 38px;
  height: 38px;
  border: 2px solid rgba(139, 92, 246, 0.2);
  border-top-color: var(--purple-2);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.page-loading p {
  margin: 0;
  color: var(--text-3);
  font-size: 13px;
}

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 50% { opacity: 0.45; transform: scale(0.92); } }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

/* Character creator */
.creator-page {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  overflow: hidden;
}

.creator-bg {
  position: absolute;
  z-index: -2;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(7, 8, 16, 0.2), rgba(7, 8, 16, 0.85) 70%),
    url("/assets/cover-xiantu.svg") center / cover;
  filter: saturate(0.86);
}

.creator-bg::after {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 72% 45%, transparent, rgba(7, 8, 16, 0.42) 55%, #070810 110%);
  content: "";
}

.creator-header {
  display: flex;
  width: min(1240px, calc(100% - 40px));
  height: 76px;
  align-items: center;
  justify-content: space-between;
  margin: auto;
}

.creator-layout {
  display: grid;
  width: min(1180px, calc(100% - 40px));
  grid-template-columns: minmax(300px, 0.85fr) minmax(430px, 0.75fr);
  align-items: center;
  gap: clamp(40px, 8vw, 120px);
  min-height: calc(100vh - 90px);
  margin: auto;
  padding: 30px 0 70px;
}

.creator-preview {
  max-width: 560px;
}

.creator-world-label {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #d1fae5;
  font-size: 12px;
  font-weight: 650;
}

.creator-preview h1 {
  margin: 19px 0 2px;
  font-size: clamp(48px, 7vw, 78px);
  letter-spacing: -0.06em;
}

.creator-subtitle {
  margin: 0;
  color: #c4b5fd;
  font-size: 20px;
}

.creator-intro {
  max-width: 500px;
  margin: 22px 0;
  color: var(--text-2);
  line-height: 1.8;
}

.creator-quote {
  display: flex;
  max-width: 480px;
  gap: 12px;
  padding: 15px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 15px;
  background: rgba(7, 8, 16, 0.42);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.creator-quote p {
  margin: 0;
  color: var(--text-2);
  font-size: 13px;
  line-height: 1.7;
}

.creator-feature-list {
  display: grid;
  gap: 11px;
  margin-top: 24px;
  color: var(--text-2);
  font-size: 12px;
}

.creator-feature-list > div {
  display: flex;
  align-items: center;
  gap: 9px;
}

.creator-feature-list .icon { color: var(--purple-2); }

.creator-card {
  min-height: 580px;
  padding: 30px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  background: rgba(12, 14, 24, 0.86);
  box-shadow: var(--shadow-lg), var(--glow);
  -webkit-backdrop-filter: blur(22px);
  backdrop-filter: blur(22px);
}

.creator-progress {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
  margin-bottom: 36px;
}

.creator-progress-item {
  display: grid;
  grid-template-columns: 25px 1fr;
  align-items: center;
  gap: 7px;
  color: var(--text-3);
}

.creator-progress-item::after {
  grid-column: 1 / -1;
  height: 2px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.07);
  content: "";
}

.creator-progress-item.active::after {
  background: linear-gradient(90deg, var(--purple), var(--blue));
}

.creator-progress-item > span {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  font-size: 10px;
}

.creator-progress-item.active > span {
  border-color: rgba(139, 92, 246, 0.5);
  background: rgba(139, 92, 246, 0.13);
  color: #ddd6fe;
}

.creator-progress-item small { font-size: 9px; }

.creator-step {
  animation: rise 220ms ease both;
}

.creator-step h2 {
  margin: 8px 0 8px;
  font-size: 29px;
  letter-spacing: -0.035em;
}

.creator-step > p {
  margin: 0 0 25px;
  color: var(--text-3);
  font-size: 13px;
  line-height: 1.7;
}

.name-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.name-suggestions button {
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 7px 11px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-3);
  font-size: 11px;
  cursor: pointer;
}

.name-suggestions button:hover {
  border-color: rgba(139, 92, 246, 0.32);
  color: white;
}

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

.creation-option {
  position: relative;
  display: grid;
  width: 100%;
  grid-template-columns: 41px 1fr auto;
  align-items: center;
  gap: 12px;
  min-height: 78px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 13px;
  background: rgba(255, 255, 255, 0.025);
  text-align: left;
  cursor: pointer;
  transition: 160ms ease;
}

.creation-option:hover {
  border-color: rgba(139, 92, 246, 0.3);
  background: rgba(139, 92, 246, 0.055);
}

.creation-option.selected {
  border-color: rgba(139, 92, 246, 0.6);
  background: rgba(139, 92, 246, 0.1);
  box-shadow: inset 0 0 0 1px rgba(139, 92, 246, 0.1);
}

.creation-option-icon {
  display: grid;
  width: 41px;
  height: 41px;
  place-items: center;
  border-radius: 12px;
  background: rgba(139, 92, 246, 0.09);
  color: var(--purple-2);
}

.creation-option strong {
  display: block;
  margin-bottom: 4px;
  font-size: 14px;
}

.creation-option p {
  margin: 0;
  color: var(--text-3);
  font-size: 11px;
}

.selection-check {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: transparent;
}

.creation-option.selected .selection-check {
  border-color: var(--purple);
  background: var(--purple);
  color: white;
}

.creator-summary {
  display: grid;
  gap: 4px;
  margin-top: 14px;
  padding: 13px;
  border-radius: 12px;
  background: rgba(52, 211, 153, 0.06);
}

.creator-summary span {
  color: var(--green);
  font-size: 10px;
  font-weight: 700;
}

.creator-summary strong {
  font-size: 12px;
}

.creator-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 28px;
}

.creator-notice {
  margin: 20px 0 0;
  color: var(--text-3);
  font-size: 10px;
  line-height: 1.6;
  text-align: center;
}

.restore-cloud {
  position: fixed;
  right: 22px;
  bottom: 22px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 12px;
  padding: 11px 15px;
  background: rgba(16, 19, 31, 0.92);
  color: #ddd6fe;
  box-shadow: var(--shadow-md);
  cursor: pointer;
}

/* Game shell */
.play-root {
  height: 100vh;
  min-height: 620px;
  overflow: hidden;
}

.game-app {
  display: grid;
  height: 100vh;
  grid-template-rows: 64px minmax(0, 1fr);
  background: var(--bg-0);
}

.game-header {
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(270px, 1fr) minmax(270px, 0.8fr) minmax(210px, 1fr);
  align-items: center;
  gap: 20px;
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(11, 13, 23, 0.94);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
}

.game-header-left,
.game-header-right,
.game-header-center,
.game-title-copy {
  display: flex;
  align-items: center;
}

.game-header-left { gap: 20px; min-width: 0; }
.game-title-copy { display: grid; min-width: 0; gap: 2px; }
.game-title-copy strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.game-title-copy span { color: var(--text-3); font-size: 10px; }

.game-header-center {
  justify-content: center;
  gap: 10px;
  color: var(--text-3);
  font-size: 10px;
}

.chapter-progress {
  width: min(180px, 45%);
  height: 4px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.07);
}

.chapter-progress div {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--purple), var(--cyan));
}

.chapter-progress-label {
  color: var(--purple-2);
  font-weight: 700;
}

.game-header-right {
  justify-content: flex-end;
  gap: 11px;
}

.header-budget {
  display: flex;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(139, 92, 246, 0.21);
  border-radius: 99px;
  padding: 7px 10px;
  background: rgba(139, 92, 246, 0.07);
  color: #ddd6fe;
  font-size: 11px;
}

.game-columns {
  display: grid;
  min-height: 0;
  grid-template-columns: 280px minmax(480px, 1fr) 350px;
}

.game-side,
.game-center {
  min-width: 0;
  min-height: 0;
}

.game-side {
  overflow-y: auto;
  background: var(--bg-1);
}

.game-side-left {
  border-right: 1px solid var(--line);
  padding: 16px;
}

.game-side-right {
  border-left: 1px solid var(--line);
  padding: 14px;
  background: #0a0c14;
}

.player-card {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 11px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.03);
}

.player-avatar {
  display: grid;
  width: 48px;
  height: 48px;
  grid-row: 1 / 3;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.32), rgba(59, 130, 246, 0.22));
  color: #ede9fe;
  font-size: 19px;
  font-weight: 800;
}

.player-copy { min-width: 0; }
.player-copy small { color: var(--text-3); font-size: 9px; }
.player-copy h2 { margin: 2px 0; font-size: 16px; }
.player-copy p { overflow: hidden; margin: 0; color: var(--text-3); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.realm-badge { grid-column: 1 / -1; justify-self: start; border-radius: 99px; padding: 5px 8px; background: rgba(34, 211, 238, 0.08); color: #a5f3fc; font-size: 9px; }

.side-section {
  margin-top: 14px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.022);
}

.side-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.side-title h3 { margin: 0; font-size: 12px; }
.side-title > span,
.side-title .text-button { color: var(--text-3); font-size: 9px; }

.stat-row + .stat-row { margin-top: 10px; }
.stat-row-head { display: flex; justify-content: space-between; margin-bottom: 5px; color: var(--text-3); font-size: 9px; }
.stat-row-head strong { color: var(--text-2); }
.stat-track { height: 4px; overflow: hidden; border-radius: 99px; background: rgba(255, 255, 255, 0.06); }
.stat-fill { height: 100%; border-radius: inherit; }
.stat-green { background: var(--green); }
.stat-cyan { background: var(--cyan); }
.stat-violet { background: var(--purple-2); }
.stat-amber { background: var(--amber); }

.resource-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-top: 13px;
}

.resource-row > div {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 3px 7px;
  padding: 9px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
}

.resource-row .icon { grid-row: 1 / 3; align-self: center; color: var(--amber); }
.resource-row span { color: var(--text-3); font-size: 8px; }
.resource-row strong { font-size: 11px; }

.relation-row {
  display: grid;
  width: 100%;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  border: 0;
  border-radius: 10px;
  padding: 7px;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.relation-row:hover { background: rgba(255, 255, 255, 0.035); }
.relation-copy { display: grid; min-width: 0; gap: 2px; }
.relation-copy strong { font-size: 10px; }
.relation-copy small { overflow: hidden; color: var(--text-3); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.relation-values { display: grid; gap: 3px; color: var(--text-3); font-size: 8px; }
.relation-values span { display: flex; align-items: center; gap: 3px; }

.scene-avatar {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 10px;
  color: white;
  font-size: 10px;
  font-weight: 750;
}

.avatar-violet { background: linear-gradient(135deg, #7c3aed, #4f46e5); }
.avatar-cyan { background: linear-gradient(135deg, #0891b2, #2563eb); }
.avatar-amber { background: linear-gradient(135deg, #d97706, #e11d48); }
.avatar-green { background: linear-gradient(135deg, #059669, #0d9488); }

.mini-quest {
  display: grid;
  grid-template-columns: 31px 1fr;
  gap: 9px;
  padding: 9px 0;
}

.mini-quest + .mini-quest { border-top: 1px solid var(--line); }
.quest-icon { display: grid; width: 31px; height: 31px; place-items: center; border-radius: 9px; background: rgba(139, 92, 246, 0.08); color: var(--purple-2); }
.mini-quest strong { display: block; margin-bottom: 3px; font-size: 9px; }
.mini-quest p { margin: 0; color: var(--text-3); font-size: 8px; line-height: 1.5; }

.game-center {
  display: grid;
  grid-template-rows: 52px minmax(0, 1fr);
  background:
    radial-gradient(circle at 50% 0, rgba(139, 92, 246, 0.055), transparent 24rem),
    var(--bg-0);
}

.game-center-toolbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 15px;
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(10, 12, 20, 0.86);
}

.world-position,
.world-status,
.toolbar-actions {
  display: flex;
  align-items: center;
}

.world-position { gap: 9px; }
.world-position .icon { color: var(--purple-2); }
.world-position div { display: grid; gap: 1px; }
.world-position strong { font-size: 10px; }
.world-position span { color: var(--text-3); font-size: 8px; }
.world-status { gap: 7px; color: var(--text-3); font-size: 9px; }
.toolbar-actions { justify-content: flex-end; gap: 6px; }
.toolbar-actions .icon-button { width: 32px; height: 32px; border-radius: 9px; }

.game-center > .ad-slot-wrap {
  display: none;
}

.story-scroll {
  min-height: 0;
  overflow-y: auto;
  padding: 30px max(20px, calc((100% - 760px) / 2)) 58px;
}

.story-scroll > .ad-slot-wrap {
  width: 100%;
  margin: 18px 0;
}

.story-timeline {
  display: grid;
  gap: 17px;
}

.story-card {
  position: relative;
  padding: 24px 25px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(17, 20, 33, 0.72);
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.16);
}

.story-card-current {
  border-color: rgba(139, 92, 246, 0.25);
  box-shadow: 0 14px 45px rgba(76, 29, 149, 0.12);
}

.story-card-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 17px;
}

.story-card-head > div { display: grid; gap: 4px; }
.story-turn { color: var(--purple-2); font-family: monospace; font-size: 9px; font-weight: 750; letter-spacing: 0.08em; }
.story-card-head h3 { margin: 0; font-size: 15px; }
.ai-content-badge { display: flex; align-items: center; gap: 5px; border: 1px solid var(--line); border-radius: 99px; padding: 5px 7px; color: var(--text-3); font-size: 8px; }

.story-body {
  color: #d9dce6;
  font-family: ui-serif, "Songti SC", "Noto Serif CJK SC", Georgia, serif;
  font-size: calc(15px * var(--reader-scale));
  line-height: 2;
  letter-spacing: 0.01em;
}

.story-body p { margin: 0; }
.story-body p + p { margin-top: 15px; }

.story-notifications {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 18px;
}

.story-notifications span {
  display: flex;
  align-items: center;
  gap: 5px;
  border-radius: 99px;
  padding: 6px 8px;
  background: rgba(52, 211, 153, 0.07);
  color: #a7f3d0;
  font-size: 9px;
}

.player-action {
  margin-top: 18px;
  padding: 12px 14px;
  border-left: 2px solid var(--purple);
  border-radius: 0 10px 10px 0;
  background: rgba(139, 92, 246, 0.055);
}

.player-action-label { color: var(--purple-2); font-size: 8px; font-weight: 750; letter-spacing: 0.08em; }
.player-action p { margin: 5px 0 0; color: var(--text-2); font-size: 11px; }

.history-trim-note,
.limit-notice {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  border-radius: 10px;
  padding: 10px 12px;
  background: rgba(251, 191, 36, 0.06);
  color: #fde68a;
  font-size: 9px;
}

.story-generating {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 17px;
  padding: 16px;
  border: 1px dashed rgba(139, 92, 246, 0.28);
  border-radius: 15px;
  background: rgba(139, 92, 246, 0.035);
}

.generating-orb { width: 28px; height: 28px; }
.story-generating strong { display: block; font-size: 11px; }
.story-generating p { margin: 4px 0 0; color: var(--text-3); font-size: 9px; }

.story-composer {
  margin-top: 22px;
  padding: 20px;
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 18px;
  background: rgba(14, 17, 28, 0.94);
  box-shadow: var(--shadow-md), 0 0 0 1px rgba(139, 92, 246, 0.04);
}

.composer-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 15px;
}

.composer-head h3 { margin: 0 0 4px; font-size: 14px; }
.composer-head p { margin: 0; color: var(--text-3); font-size: 9px; }
.turn-budget { border-radius: 99px; padding: 6px 8px; background: rgba(52, 211, 153, 0.07); color: #a7f3d0; font-size: 8px; white-space: nowrap; }
.turn-budget.low { background: rgba(251, 191, 36, 0.08); color: #fde68a; }

.choice-list { display: grid; gap: 8px; }
.choice-button {
  display: grid;
  width: 100%;
  grid-template-columns: 29px 1fr auto;
  align-items: center;
  gap: 10px;
  min-height: 49px;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 8px 11px;
  background: rgba(255, 255, 255, 0.025);
  text-align: left;
  cursor: pointer;
  transition: 150ms ease;
}

.choice-button:hover:not(:disabled) {
  transform: translateX(2px);
  border-color: rgba(139, 92, 246, 0.34);
  background: rgba(139, 92, 246, 0.065);
}

.choice-button:disabled { cursor: not-allowed; opacity: 0.45; }
.choice-index { display: grid; width: 27px; height: 27px; place-items: center; border-radius: 8px; background: rgba(255, 255, 255, 0.04); color: var(--text-3); font-family: monospace; font-size: 8px; }
.choice-label { font-size: 11px; line-height: 1.45; }
.choice-neutral { border-left: 2px solid var(--blue); }
.choice-honest { border-left: 2px solid var(--cyan); }
.choice-protect { border-left: 2px solid var(--purple); }
.choice-bold { border-left: 2px solid var(--amber); }

.free-action {
  position: relative;
  margin-top: 10px;
}

.free-action textarea {
  display: block;
  width: 100%;
  min-height: 76px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 49px 24px 13px;
  background: rgba(6, 8, 15, 0.65);
  color: var(--text-1);
  font-size: 11px;
  line-height: 1.6;
}

.free-action textarea:focus { outline: none; border-color: rgba(139, 92, 246, 0.55); box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.08); }
.send-button { position: absolute; top: 10px; right: 10px; display: grid; width: 34px; height: 34px; place-items: center; border: 0; border-radius: 10px; background: var(--purple); color: white; cursor: pointer; }
.send-button:disabled { cursor: not-allowed; opacity: 0.35; }
.free-action-hint { position: absolute; right: 10px; bottom: 7px; color: var(--text-3); font-size: 7px; }
.mini-spinner { display: inline-block; width: 16px; height: 16px; border: 2px solid rgba(255, 255, 255, 0.25); border-top-color: white; border-radius: 50%; animation: spin 0.7s linear infinite; }

.jade-phone {
  display: grid;
  height: 100%;
  min-height: 0;
  grid-template-rows: 54px 52px minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 21px;
  background: #111522;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.34), inset 0 1px rgba(255, 255, 255, 0.05);
}

.phone-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 15px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(5, 150, 105, 0.08), transparent);
}

.phone-brand { display: flex; align-items: center; gap: 9px; }
.jade-gem { width: 24px; height: 24px; border: 1px solid rgba(110, 231, 183, 0.28); border-radius: 7px 12px 7px 12px; background: linear-gradient(135deg, #10b981, #0f766e); box-shadow: 0 0 18px rgba(16, 185, 129, 0.22); transform: rotate(4deg); }
.phone-brand div:last-child { display: grid; gap: 1px; }
.phone-brand strong { font-size: 10px; }
.phone-brand small { color: var(--text-3); font-size: 7px; }
.signal-bars { display: flex; align-items: end; gap: 2px; height: 10px; }
.signal-bars span { width: 2px; border-radius: 2px; background: var(--green); }
.signal-bars span:nth-child(1) { height: 4px; }
.signal-bars span:nth-child(2) { height: 7px; }
.signal-bars span:nth-child(3) { height: 10px; }

.phone-tabs {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.012);
}

.phone-tab {
  display: grid;
  place-items: center;
  gap: 3px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  color: var(--text-3);
  font-size: 7px;
  cursor: pointer;
}

.phone-tab.active { border-bottom-color: var(--green); color: #a7f3d0; }
.phone-screen { min-height: 0; overflow-y: auto; }
.phone-app { padding: 13px; }
.phone-app-title { display: flex; align-items: start; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.phone-app-title h3 { margin: 0 0 2px; font-size: 12px; }
.phone-app-title p { margin: 0; color: var(--text-3); font-size: 7px; line-height: 1.5; }
.phone-app-title > span { border-radius: 99px; padding: 5px 7px; background: rgba(52, 211, 153, 0.07); color: #a7f3d0; font-size: 7px; white-space: nowrap; }

.message-thread {
  display: grid;
  width: 100%;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 10px 3px;
  background: none;
  text-align: left;
  cursor: pointer;
}

.message-thread:hover { background: rgba(255, 255, 255, 0.02); }
.message-copy { min-width: 0; }
.message-copy > div { display: flex; justify-content: space-between; gap: 8px; }
.message-copy strong { font-size: 9px; }
.message-copy small { color: var(--text-3); font-size: 7px; }
.message-copy p { overflow: hidden; margin: 4px 0 0; color: var(--text-3); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.unread-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.phone-tip { display: flex; align-items: center; gap: 6px; margin-top: 13px; padding: 9px; border-radius: 9px; background: rgba(52, 211, 153, 0.055); color: #a7f3d0; font-size: 7px; }

.forum-post,
.task-card,
.profile-relation-card {
  margin-bottom: 9px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.023);
}

.forum-post-meta,
.task-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.forum-post-meta span,
.task-status { border-radius: 99px; padding: 4px 6px; background: rgba(139, 92, 246, 0.08); color: var(--purple-2); font-size: 7px; }
.forum-post-meta small,
.task-card-head small { color: var(--text-3); font-size: 7px; }
.forum-post h3,
.task-card h3 { margin: 8px 0 5px; font-size: 9px; line-height: 1.45; }
.forum-post p,
.task-card p { margin: 0; color: var(--text-3); font-size: 7px; line-height: 1.5; }
.task-card progress { width: 100%; height: 4px; margin-top: 9px; accent-color: var(--purple); }
.task-card.secondary { border-style: dashed; }

.mini-map {
  position: relative;
  height: 300px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 13px;
  background:
    radial-gradient(circle at 30% 30%, rgba(16, 185, 129, 0.1), transparent 25%),
    linear-gradient(135deg, #111b20, #11131e);
}

.map-path { position: absolute; height: 2px; background: rgba(110, 231, 183, 0.15); transform-origin: left; }
.path-a { top: 90px; left: 62px; width: 170px; transform: rotate(23deg); }
.path-b { top: 170px; left: 78px; width: 150px; transform: rotate(-25deg); }
.map-node { position: absolute; display: grid; place-items: center; gap: 4px; width: 68px; min-height: 50px; border: 1px solid rgba(110, 231, 183, 0.2); border-radius: 11px; padding: 6px; background: rgba(9, 17, 20, 0.88); color: #a7f3d0; font-size: 7px; cursor: pointer; }
.map-node.current { border-color: var(--green); box-shadow: 0 0 18px rgba(52, 211, 153, 0.14); }
.map-node.locked { filter: grayscale(1); opacity: 0.45; }
.node-0 { top: 25px; left: 22px; }
.node-1 { top: 64px; right: 22px; }
.node-2 { top: 150px; left: 32px; }
.node-3 { right: 35px; bottom: 30px; }
.node-4 { bottom: 22px; left: 120px; }
.map-legend { display: flex; justify-content: space-between; gap: 8px; margin-top: 9px; color: var(--text-3); font-size: 7px; }

.profile-relation-head { display: flex; align-items: center; gap: 9px; }
.profile-relation-head h3 { margin: 0 0 3px; font-size: 10px; }
.profile-relation-head p { margin: 0; color: var(--text-3); font-size: 7px; line-height: 1.4; }
.relation-meter-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin-top: 10px; }
.relation-meter-grid > div > div:first-child { display: flex; justify-content: space-between; color: var(--text-3); font-size: 7px; }
.mini-meter { height: 3px; margin-top: 4px; overflow: hidden; border-radius: 99px; background: rgba(255, 255, 255, 0.06); }
.mini-meter div { height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--purple), var(--cyan)); }
.inventory-section { margin-top: 16px; }
.inventory-section > h3 { font-size: 10px; }
.inventory-row { display: grid; grid-template-columns: 3px 1fr auto; gap: 9px; margin-top: 7px; padding: 9px; border-radius: 9px; background: rgba(255, 255, 255, 0.025); }
.item-rarity { width: 3px; border-radius: 99px; background: var(--purple); }
.rarity-rare { background: var(--cyan); }
.rarity-epic { background: var(--purple-2); }
.inventory-row strong { font-size: 8px; }
.inventory-row p { margin: 2px 0 0; color: var(--text-3); font-size: 7px; }
.inventory-row > span { color: var(--text-3); font-size: 8px; }

.mobile-game-nav { display: none; }

/* Modal and toast */
.modal-backdrop {
  position: fixed;
  z-index: 200;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(2, 3, 8, 0.76);
  opacity: 0;
  transition: opacity 180ms ease;
  -webkit-backdrop-filter: blur(11px);
  backdrop-filter: blur(11px);
}

.modal-backdrop.is-open { opacity: 1; }
.modal-panel {
  position: relative;
  width: min(560px, 100%);
  max-height: min(760px, calc(100vh - 40px));
  overflow-y: auto;
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  padding: 27px;
  background: #111421;
  box-shadow: var(--shadow-lg);
  transform: translateY(12px) scale(0.985);
  transition: transform 180ms ease;
}

.modal-backdrop.is-open .modal-panel { transform: translateY(0) scale(1); }
.modal-close { position: absolute; z-index: 2; top: 13px; right: 13px; }
.modal-heading h2 { margin: 8px 0 6px; }
.modal-heading p { margin: 0 0 22px; color: var(--text-3); font-size: 12px; }
.settings-modal-content { display: grid; gap: 12px; }
.settings-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 13px; border: 1px solid var(--line); border-radius: 12px; }
.settings-row strong { display: block; margin-bottom: 3px; font-size: 12px; }
.settings-row p { margin: 0; color: var(--text-3); font-size: 9px; }
.settings-action-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.modal-footer-actions { display: flex; justify-content: flex-end; margin-top: 7px; }
.npc-dialog-head { display: flex; align-items: center; gap: 11px; margin-bottom: 20px; }
.npc-dialog-head h3 { margin: 0 0 3px; }
.npc-dialog-head p { margin: 0; color: var(--text-3); font-size: 11px; }
.chat-bubble { padding: 14px; border-radius: 14px; background: rgba(139, 92, 246, 0.08); color: var(--text-2); line-height: 1.7; }
.npc-relation-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.npc-relation-summary > div { display: grid; gap: 4px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; text-align: center; }
.npc-relation-summary span { color: var(--text-3); font-size: 9px; }

.ad-break-modal .modal-panel { width: min(650px, 100%); }
.ad-break-content { text-align: center; }
.ad-break-kicker { color: var(--purple-2); font-size: 10px; font-weight: 800; letter-spacing: 0.1em; }
.ad-break-content h2 { margin: 8px 0; }
.ad-break-content > p { margin: 0 0 18px; color: var(--text-3); }
.ad-break-content > .ad-slot-wrap { width: 100%; margin: 16px 0; }
.ad-break-content small { display: block; margin-top: 11px; color: var(--text-3); font-size: 9px; }

.toast-stack { position: fixed; z-index: 400; right: 18px; bottom: 18px; display: grid; gap: 8px; pointer-events: none; }
.toast { max-width: 360px; border: 1px solid var(--line-strong); border-radius: 11px; padding: 11px 14px; background: rgba(20, 23, 38, 0.96); color: var(--text-2); box-shadow: var(--shadow-md); font-size: 11px; opacity: 0; transform: translateY(8px); transition: 200ms ease; }
.toast.is-visible { opacity: 1; transform: translateY(0); }
.toast-success { border-color: rgba(52, 211, 153, 0.28); }
.toast-warning { border-color: rgba(251, 191, 36, 0.28); }

/* Admin */
.admin-login-page {
  position: relative;
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 28px;
  overflow: hidden;
  background:
    linear-gradient(rgba(7, 8, 16, 0.8), rgba(7, 8, 16, 0.96)),
    url("/assets/cover-xiantu.svg") center / cover;
}

.admin-login-glow {
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: rgba(139, 92, 246, 0.2);
  filter: blur(100px);
  pointer-events: none;
}

.admin-login-card {
  position: relative;
  width: min(450px, 100%);
  padding: 34px;
  border: 1px solid var(--line-strong);
  border-radius: 24px;
  background: rgba(14, 16, 27, 0.89);
  box-shadow: var(--shadow-lg), var(--glow);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
}

.login-icon {
  display: grid;
  width: 54px;
  height: 54px;
  margin: 34px 0 17px;
  place-items: center;
  border-radius: 16px;
  background: rgba(139, 92, 246, 0.11);
  color: var(--purple-2);
}

.admin-login-card h1 { margin: 8px 0; font-size: 34px; letter-spacing: -0.045em; }
.admin-login-card > p { margin: 0 0 24px; color: var(--text-3); font-size: 12px; line-height: 1.75; }
.admin-login-card .button { margin-top: 14px; }
.login-back { margin-top: 20px; justify-content: center; width: 100%; font-size: 11px; }
.icon-reverse { transform: rotate(180deg); }

.admin-message-card {
  width: min(620px, 100%);
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface-strong);
  box-shadow: var(--shadow-lg);
  text-align: left;
}

.message-card-icon { display: grid; width: 58px; height: 58px; margin-bottom: 20px; place-items: center; border-radius: 16px; background: rgba(251, 191, 36, 0.1); color: var(--amber); }
.admin-message-card h1 { margin: 8px 0; }
.admin-message-card > p { color: var(--text-3); line-height: 1.75; }
.admin-message-card pre { overflow-x: auto; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #080a12; color: #c4b5fd; font-size: 11px; line-height: 1.7; }
.message-actions { display: flex; gap: 10px; margin-top: 20px; }

.admin-app {
  display: grid;
  min-height: 100vh;
  grid-template-columns: 250px minmax(0, 1fr);
  background: var(--bg-0);
}

.admin-sidebar {
  position: sticky;
  top: 0;
  display: grid;
  height: 100vh;
  grid-template-rows: auto 1fr auto;
  padding: 19px 14px;
  border-right: 1px solid var(--line);
  background: #0c0e18;
}

.admin-sidebar-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 7px 20px;
  border-bottom: 1px solid var(--line);
}

.admin-sidebar-brand > span { color: var(--text-3); font-size: 8px; font-weight: 800; letter-spacing: 0.12em; }
.admin-nav { display: grid; align-content: start; gap: 5px; padding-top: 18px; }
.admin-nav-item {
  display: grid;
  width: 100%;
  grid-template-columns: 34px 1fr;
  align-items: center;
  gap: 8px;
  min-height: 55px;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 8px 10px;
  background: transparent;
  color: var(--text-3);
  text-align: left;
  cursor: pointer;
}

.admin-nav-item:hover { background: rgba(255, 255, 255, 0.03); color: var(--text-2); }
.admin-nav-item.active { border-color: rgba(139, 92, 246, 0.2); background: rgba(139, 92, 246, 0.08); color: #ddd6fe; }
.admin-nav-item > .icon { justify-self: center; }
.admin-nav-item div { display: grid; gap: 3px; }
.admin-nav-item strong { font-size: 12px; }
.admin-nav-item small { color: var(--text-3); font-size: 8px; }

.admin-sidebar-footer { display: grid; gap: 3px; padding-top: 14px; border-top: 1px solid var(--line); }
.admin-sidebar-footer a,
.admin-sidebar-footer button { display: flex; align-items: center; gap: 9px; min-height: 38px; border: 0; border-radius: 9px; padding: 0 10px; background: transparent; color: var(--text-3); font-size: 10px; cursor: pointer; }
.admin-sidebar-footer a:hover,
.admin-sidebar-footer button:hover { background: rgba(255, 255, 255, 0.035); color: white; }

.admin-main { min-width: 0; }
.admin-topbar {
  position: sticky;
  z-index: 30;
  top: 0;
  display: flex;
  min-height: 92px;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
  padding: 14px 30px;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 8, 16, 0.82);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.admin-topbar-copy h1 { margin: 5px 0 3px; font-size: 23px; letter-spacing: -0.035em; }
.admin-topbar-copy p { margin: 0; color: var(--text-3); font-size: 10px; }
.admin-topbar-actions { display: flex; align-items: center; gap: 12px; }
.unsaved-hint { display: flex; align-items: center; gap: 6px; color: var(--text-3); font-size: 9px; }
.admin-content { width: min(1280px, 100%); margin: auto; padding: 26px 30px 70px; }
.admin-tab-content { display: grid; gap: 18px; animation: rise 180ms ease both; }

.status-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.status-card { display: grid; grid-template-columns: 45px 1fr; align-items: center; gap: 12px; min-height: 104px; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: rgba(17, 20, 33, 0.66); }
.status-icon { display: grid; width: 45px; height: 45px; place-items: center; border-radius: 13px; background: rgba(255, 255, 255, 0.04); }
.tone-success { background: rgba(52, 211, 153, 0.08); color: var(--green); }
.tone-warning { background: rgba(251, 191, 36, 0.08); color: var(--amber); }
.tone-danger { background: rgba(251, 113, 133, 0.08); color: var(--red); }
.tone-neutral { color: var(--text-2); }
.status-copy { display: grid; min-width: 0; gap: 3px; }
.status-copy > span { color: var(--text-3); font-size: 9px; }
.status-copy strong { overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.status-copy small { overflow: hidden; color: var(--text-3); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }

.admin-overview-grid { display: grid; grid-template-columns: 1fr 0.9fr; gap: 18px; }
.admin-card { min-width: 0; padding: 22px; border: 1px solid var(--line); border-radius: 18px; background: rgba(17, 20, 33, 0.66); box-shadow: 0 18px 50px rgba(0, 0, 0, 0.12); }
.admin-card-head { margin-bottom: 20px; }
.admin-card-head h2 { margin: 0 0 5px; font-size: 16px; }
.admin-card-head p { margin: 0; color: var(--text-3); font-size: 10px; line-height: 1.65; }
.strategy-list { display: grid; }
.strategy-row { display: grid; grid-template-columns: 32px 1fr auto; align-items: center; gap: 10px; min-height: 52px; border-bottom: 1px solid var(--line); }
.strategy-row:last-child { border-bottom: 0; }
.strategy-icon { display: grid; width: 31px; height: 31px; place-items: center; border-radius: 9px; background: rgba(139, 92, 246, 0.07); color: var(--purple-2); }
.strategy-row span { color: var(--text-3); font-size: 10px; }
.strategy-row strong { font-size: 10px; }
.admin-ad-preview { overflow: hidden; border-radius: 15px; }
.admin-ad-preview .ad-slot-wrap { width: 100%; margin: 0; }
.preview-meta { display: flex; justify-content: space-between; margin-top: 13px; color: var(--text-3); font-size: 9px; }
.preview-meta strong { color: var(--text-2); }
.deployment-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.deployment-item { display: grid; gap: 7px; min-width: 0; padding: 13px; border: 1px solid var(--line); border-radius: 11px; background: rgba(255, 255, 255, 0.02); }
.deployment-item span { color: var(--text-3); font-size: 9px; }
.deployment-item code { overflow: hidden; color: #c4b5fd; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }

.admin-field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.admin-field { display: grid; align-content: start; gap: 9px; min-width: 0; margin-bottom: 15px; }
.admin-field.wide { grid-column: 1 / -1; }
.admin-field-copy strong { display: block; font-size: 11px; }
.admin-field-copy p { margin: 4px 0 0; color: var(--text-3); font-size: 9px; line-height: 1.55; }
.admin-toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 70px; margin-top: 4px; padding: 13px 0; border-top: 1px solid var(--line); }
.admin-toggle-row strong { display: block; font-size: 11px; }
.admin-toggle-row p { margin: 4px 0 0; color: var(--text-3); font-size: 9px; line-height: 1.55; }
.switch-control { position: relative; display: block; width: 44px; height: 25px; flex: 0 0 auto; }
.switch-control input { position: absolute; opacity: 0; pointer-events: none; }
.switch-track { position: absolute; inset: 0; border: 1px solid var(--line); border-radius: 99px; background: rgba(255, 255, 255, 0.055); transition: 160ms ease; cursor: pointer; }
.switch-thumb { position: absolute; top: 3px; left: 3px; width: 17px; height: 17px; border-radius: 50%; background: var(--text-3); transition: 160ms ease; }
.switch-control input:checked + .switch-track { border-color: rgba(139, 92, 246, 0.42); background: rgba(139, 92, 246, 0.24); }
.switch-control input:checked + .switch-track .switch-thumb { left: 22px; background: white; }
.admin-note { display: flex; align-items: start; gap: 10px; margin-top: 12px; padding: 13px; border: 1px solid rgba(251, 191, 36, 0.15); border-radius: 12px; background: rgba(251, 191, 36, 0.04); color: #fde68a; }
.admin-note strong { display: block; margin-bottom: 3px; font-size: 10px; }
.admin-note p { margin: 0; color: #c7b978; font-size: 9px; line-height: 1.6; }
.domestic-placement { margin-top: 14px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255, 255, 255, 0.018); }
.domestic-placement-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.domestic-placement-head h3 { margin: 0; font-size: 12px; }
.domestic-placement-head code { color: var(--text-3); font-size: 9px; }

/* Legal */
.legal-page { width: min(850px, calc(100% - 40px)); margin: 60px auto 100px; }
.legal-page h1 { font-size: 38px; letter-spacing: -0.04em; }
.legal-page h2 { margin-top: 36px; font-size: 20px; }
.legal-page p,
.legal-page li { color: var(--text-2); line-height: 1.85; }
.legal-meta { color: var(--text-3) !important; font-size: 12px; }

/* Responsive */
@media (max-width: 1160px) {
  .game-columns { grid-template-columns: 240px minmax(430px, 1fr) 310px; }
  .game-header { grid-template-columns: minmax(230px, 1fr) 250px minmax(170px, 1fr); }
  .brand-sub { display: none; }
  .status-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 980px) {
  .home-hero-inner { grid-template-columns: 1fr; gap: 40px; padding-bottom: 92px; }
  .hero-game-card { width: min(560px, 100%); transform: none; }
  .world-grid { grid-template-columns: 1fr 1fr; }
  .world-card:first-child { grid-column: 1 / -1; }
  .feature-grid { grid-template-columns: 1fr 1fr; }
  .story-demo { grid-template-columns: 1fr; }
  .site-footer-inner { grid-template-columns: 1fr 1fr; padding: 26px 0; }
  .creator-layout { grid-template-columns: 1fr; gap: 30px; padding-top: 40px; }
  .creator-preview { display: none; }
  .creator-card { width: min(580px, 100%); justify-self: center; }
  .game-header { grid-template-columns: 1fr auto; }
  .game-header-center { display: none; }
  .game-columns { grid-template-columns: minmax(0, 1fr) 320px; }
  .game-side-left { display: none; }
  .admin-overview-grid { grid-template-columns: 1fr; }
  .deployment-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  :root { --header-h: 62px; }
  .site-header-inner { width: calc(100% - 24px); }
  .desktop-nav { display: none; }
  .header-actions .button { min-height: 36px; padding-inline: 11px; }
  .home-hero { min-height: auto; }
  .home-hero-inner { width: calc(100% - 28px); min-height: auto; padding: 56px 0 95px; }
  .hero-copy h1 { font-size: 44px; }
  .hero-lead { font-size: 15px; }
  .hero-meta { gap: 12px; }
  .hero-game-card { border-radius: 20px; }
  .hero-game-cover { height: 260px; }
  .shell-section,
  .story-section,
  .faq-section { width: calc(100% - 28px); }
  .section { padding: 70px 0; }
  .section-heading { display: grid; align-items: start; }
  .world-grid,
  .feature-grid { grid-template-columns: 1fr; }
  .world-card:first-child { grid-column: auto; }
  .world-card-art { height: 220px; }
  .story-demo { padding: 25px; border-radius: 20px; }
  .choice-preview:nth-child(n) { transform: none; }
  .site-footer-inner { width: calc(100% - 28px); grid-template-columns: 1fr; gap: 15px; }
  .footer-links { flex-wrap: wrap; }
  .announcement-bar { padding: 8px 14px; text-align: center; }
  .ad-slot-wrap { width: calc(100% - 28px); }
  .ad-house { align-items: flex-start; }
  .ad-house-copy p { white-space: normal; }
  .ad-house-cta { display: none; }

  .creator-header { width: calc(100% - 24px); }
  .creator-layout { width: calc(100% - 24px); padding: 20px 0 60px; }
  .creator-card { min-height: 610px; padding: 22px; border-radius: 20px; }
  .creator-progress-item { grid-template-columns: 23px 1fr; }
  .creator-progress-item small { display: none; }
  .creator-step h2 { font-size: 25px; }
  .restore-cloud { right: 12px; bottom: 12px; }

  .play-root { min-height: 100dvh; height: 100dvh; }
  .game-app { height: 100dvh; grid-template-rows: 56px minmax(0, 1fr) 60px; }
  .game-header { grid-template-columns: 1fr auto; gap: 8px; padding: 0 10px; }
  .game-header-left .brand-copy { display: none; }
  .game-title-copy strong { max-width: 200px; }
  .header-budget { display: none; }
  .game-header-right .icon-button { width: 36px; height: 36px; }
  .game-columns { display: block; min-height: 0; overflow: hidden; }
  .game-side,
  .game-center { display: none; height: 100%; }
  .mobile-view-stats .game-side-left { display: block; border: 0; }
  .mobile-view-story .game-center { display: grid; }
  .mobile-view-phone .game-side-right { display: block; border: 0; padding: 8px; }
  .game-center { grid-template-rows: 47px minmax(0, 1fr); }
  .game-center-toolbar { grid-template-columns: 1fr auto; padding: 0 10px; }
  .world-status { display: none; }
  .story-scroll { padding: 18px 12px 40px; }
  .story-card { padding: 19px 17px; border-radius: 15px; }
  .story-body { font-size: calc(14px * var(--reader-scale)); }
  .story-composer { padding: 15px; border-radius: 15px; }
  .composer-head { display: grid; gap: 8px; }
  .choice-button { min-height: 52px; }
  .game-side-left { padding: 12px; }
  .jade-phone { border-radius: 17px; }
  .mobile-game-nav { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); background: rgba(11, 13, 23, 0.98); }
  .mobile-game-nav-item { display: grid; place-items: center; align-content: center; gap: 3px; border: 0; background: none; color: var(--text-3); font-size: 8px; cursor: pointer; }
  .mobile-game-nav-item.active { color: var(--purple-2); }
  .modal-panel { padding: 22px 17px; border-radius: 17px; }
  .settings-action-grid { grid-template-columns: 1fr; }
  .toast-stack { right: 10px; bottom: 72px; left: 10px; }
  .toast { max-width: none; }

  .admin-app { display: block; }
  .admin-sidebar { position: fixed; z-index: 80; right: 0; bottom: 0; left: 0; top: auto; display: block; height: 62px; padding: 0; border-top: 1px solid var(--line); border-right: 0; background: rgba(11, 13, 23, 0.98); }
  .admin-sidebar-brand,
  .admin-sidebar-footer { display: none; }
  .admin-nav { display: grid; height: 100%; grid-template-columns: repeat(4, 1fr); padding: 0; }
  .admin-nav-item { display: grid; min-height: 100%; grid-template-columns: 1fr; place-items: center; align-content: center; gap: 3px; border: 0; border-radius: 0; padding: 4px; text-align: center; }
  .admin-nav-item div { display: block; }
  .admin-nav-item strong { font-size: 8px; }
  .admin-nav-item small { display: none; }
  .admin-topbar { position: relative; display: grid; min-height: 120px; gap: 13px; padding: 18px 14px; }
  .admin-topbar-actions { justify-content: space-between; }
  .admin-content { padding: 14px 12px 90px; }
  .status-grid,
  .admin-field-grid,
  .deployment-grid { grid-template-columns: 1fr; }
  .status-card { min-height: 88px; }
  .admin-card { padding: 17px; }
  .admin-login-page { padding: 12px; }
  .admin-login-card { padding: 24px 20px; }
  .message-actions { display: grid; }
}

@media (max-width: 420px) {
  .hero-copy h1 { font-size: 39px; }
  .hero-actions { display: grid; }
  .hero-actions .button { width: 100%; }
  .hero-game-cover { height: 225px; }
  .game-stat-row strong { font-size: 15px; }
  .creator-card { padding: 18px; }
  .creator-progress { gap: 3px; }
  .game-title-copy strong { max-width: 150px; }
  .story-card-head { display: grid; }
  .ai-content-badge { justify-self: start; }
  .admin-topbar-actions { display: grid; }
  .unsaved-hint { display: none; }
}

html[data-reduce-motion="true"] *,
html[data-reduce-motion="true"] *::before,
html[data-reduce-motion="true"] *::after {
  scroll-behavior: auto !important;
  animation-duration: 0.001ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.001ms !important;
}

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