:root {
  color-scheme: dark;
  --primary: #60a5fa;
  --primary-dark: #3b82f6;
  --accent: #34d399;
  --bg: #060816;
  --bg-2: #0f172a;
  --surface: rgba(15, 23, 42, 0.92);
  --surface-strong: #111827;
  --text: #f8fafc;
  --muted: #94a3b8;
  --border: rgba(148, 163, 184, 0.16);
  --shadow: 0 20px 45px rgba(2, 6, 23, 0.45);
}

* {
  box-sizing: border-box;
}

body {
  font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
  margin: 0;
  background: radial-gradient(circle at top, #172554 0%, var(--bg) 45%, #020617 100%);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  color: var(--primary-dark);
}

.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 20px 16px;
  width: min(100%, 1160px);
}

.editor-page-container,
.editor-main {
  max-width: 100%;
  width: 100%;
}

nav,
.site-nav {
  background: rgba(2, 6, 23, 0.92);
  color: #f8fafc;
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
  position: sticky;
  top: 0;
  z-index: 20;
  box-shadow: 0 10px 24px rgba(2, 6, 23, 0.34);
}

.site-nav__container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 13px;
  padding-bottom: 13px;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
}

.brand-text {
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #f8fafc;
}

.site-nav__links {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.site-nav__links a,
nav a {
  color: #e2e8f0;
  text-decoration: none;
  margin-left: 12px;
  font-weight: 600;
  font-size: 0.95rem;
}

.site-nav__links a:hover,
nav a:hover {
  color: #fff;
}

.site-nav__toggle {
  display: none;
  border: 0;
  background: transparent;
  color: #fff;
  padding: 0;
  margin: 0 0 0 auto;
  cursor: pointer;
  line-height: 1;
  width: auto;
  height: auto;
  align-self: center;
  box-shadow: none !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  outline: none !important;
  text-shadow: none !important;
}

.site-nav__toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  margin: 3px 0;
  border-radius: 999px;
}

@media (max-width: 760px) {
  .site-nav__container {
    position: relative;
  }

  .site-nav__toggle {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    margin-left: auto;
    transform: translateY(0);
    position: relative;
    top: 0;
  }

  .site-nav__links {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    left: 0;
    padding: 12px;
    background: rgba(2, 6, 23, 0.98);
    border: 1px solid rgba(148, 163, 184, 0.16);
    box-shadow: 0 16px 34px rgba(2, 6, 23, 0.24);
    border-radius: 14px;
    flex-direction: column;
    align-items: flex-start;
  }

  .site-nav__links.is-open {
    display: flex;
  }

  .site-nav__links a,
  nav a {
    margin-left: 0;
    width: 100%;
    padding: 8px 0;
  }
}

.hero {
  padding: 36px 0 24px;
}

.card {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(10, 16, 30, 0.96));
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 24px;
  box-shadow: var(--shadow);
  width: 100%;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.grid {
  display: grid;
  gap: 18px;
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

button, .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  color: #020617;
  border: 0;
  border-radius: 12px;
  padding: 12px 18px;
  cursor: pointer;
  text-decoration: none;
  font-weight: 700;
  min-height: 44px;
  text-align: center;
  margin-top: 6px;
  box-shadow: 0 10px 20px rgba(96, 165, 250, 0.16);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

button:hover, .btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(96, 165, 250, 0.22);
  filter: brightness(1.04);
}

.hero-card {
  background: linear-gradient(135deg, #0f172a 0%, #2563eb 50%, #22c55e 100%);
  color: white;
  border: none;
  position: relative;
  overflow: hidden;
  box-shadow: 0 24px 50px rgba(15, 23, 42, 0.16);
}

.hero-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(255, 255, 255, 0.16), transparent 34%);
  pointer-events: none;
}

.hero-card > * {
  position: relative;
  z-index: 1;
}

.eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.75rem;
  font-weight: 700;
  color: #bbf7d0;
  margin-bottom: 8px;
}

.auth-card {
  border: 1px solid var(--border);
  max-width: 480px;
  margin: 40px auto;
  padding: 28px;
  border-radius: 22px;
  box-shadow: var(--shadow);
}

button.secondary, .btn.secondary {
  background: rgba(15, 23, 42, 0.8);
  color: var(--text);
  border: 1px solid rgba(148, 163, 184, 0.2);
  box-shadow: none;
}

label {
  display: block;
  margin-top: 14px;
  font-weight: 600;
  color: var(--text);
}

input, textarea, select {
  width: 100%;
  padding: 13px 14px;
  margin-top: 7px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  box-sizing: border-box;
  font-size: 1rem;
  background: rgba(2, 6, 23, 0.72);
  color: var(--text);
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.16);
}

.small {
  color: var(--muted);
  font-size: 0.95rem;
}

.table {
  width: 100%;
  border-collapse: collapse;
  display: block;
  overflow-x: auto;
}

.table th, .table td {
  padding: 12px 10px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  text-align: left;
  white-space: nowrap;
}

#map {
  height: 320px;
  border-radius: 16px;
  margin-top: 12px;
  border: 1px solid var(--border);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.monitor-hero {
  background: linear-gradient(135deg, #020617 0%, #172554 45%, #0f766e 100%);
  color: white;
  border: 1px solid rgba(96, 165, 250, 0.2);
  box-shadow: 0 24px 50px rgba(2, 6, 23, 0.25);
}

.monitor-hero__top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.monitor-status-pill {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.monitor-status-pill.ok {
  background: rgba(52, 211, 153, 0.16);
  color: #6ee7b7;
}

.monitor-status-pill.off {
  background: rgba(248, 113, 113, 0.16);
  color: #fda4af;
}

.monitor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.monitor-leader-card {
  margin-top: 16px;
  padding: 16px 18px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.95), rgba(10, 16, 30, 0.95));
  border: 1px solid rgba(96, 165, 250, 0.16);
  box-shadow: 0 12px 28px rgba(2, 6, 23, 0.2);
}

.monitor-list {
  display: grid;
  gap: 10px;
}

.monitor-team-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.62);
  border: 1px solid rgba(148, 163, 184, 0.14);
}

.monitor-team-item--stacked {
  align-items: flex-start;
  flex-direction: column;
}

.monitor-score-badge {
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(52, 211, 153, 0.14);
  color: #6ee7b7;
  font-weight: 700;
  white-space: nowrap;
}

.monitor-event-item {
  display: flex;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.62);
  border: 1px solid rgba(148, 163, 184, 0.14);
}

.monitor-event-badge {
  color: #60a5fa;
  font-size: 0.9rem;
  line-height: 1.4;
}

.monitor-event-time {
  margin-top: 4px;
  color: #60a5fa;
  font-size: 0.82rem;
}

.monitor-waypoint-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.62);
  border: 1px solid rgba(148, 163, 184, 0.14);
}

.monitor-map {
  height: 420px;
  margin-top: 12px;
}

body.play-page {
  min-height: 100%;
  height: 100%;
  overflow: hidden;
}

.play-shell {
  position: fixed;
  inset: 0;
  width: 100%;
  height: var(--app-height, 100vh);
  min-height: var(--app-height, 100vh);
  overflow: hidden;
}

.play-shell #map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 100%;
  margin: 0;
  border: 0;
  border-radius: 0;
}

ul.clean {
  padding-left: 18px;
  margin: 0;
}

ul.clean li {
  margin-bottom: 8px;
}

.dashboard-hero {
  background: linear-gradient(135deg, #020617 0%, #172554 45%, #0f766e 100%);
  color: white;
  border: 1px solid rgba(96, 165, 250, 0.2);
  box-shadow: 0 20px 50px rgba(2, 6, 23, 0.35);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.hero-socials {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0 8px;
}

.social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  font-weight: 700;
  text-decoration: none;
  color: #0f172a;
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(2, 6, 23, 0.14);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.social-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(2, 6, 23, 0.18);
}

.social-btn--google {
  background: #fff;
}

.social-btn--apple {
  background: #f8fafc;
}

.social-btn--facebook {
  background: #eef5ff;
}

.hero-social-note {
  margin: 0 0 8px;
  color: rgba(255,255,255,0.86);
  font-size: 0.95rem;
}

.hero-social-note a {
  color: #dbeafe;
  text-decoration: underline;
}

.social-auth-list {
  display: grid;
  gap: 10px;
  margin: 14px 0 4px;
}

.social-auth-message {
  margin: 8px 0 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(96, 165, 250, 0.12);
  color: #dbeafe;
  border: 1px solid rgba(96, 165, 250, 0.16);
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 0 6px;
  color: var(--muted);
  font-size: 0.9rem;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(148, 163, 184, 0.2);
}

.hero-spotlight {
  display: grid;
  grid-template-columns: 1.4fr 0.9fr;
  gap: 18px;
  padding: 28px;
  background: linear-gradient(135deg, #020617 0%, #172554 45%, #0f766e 100%);
  border: 1px solid rgba(96, 165, 250, 0.2);
  box-shadow: 0 24px 60px rgba(2, 6, 23, 0.28);
}

.hero-copy h1 {
  font-size: clamp(1.7rem, 3.4vw, 2.8rem);
  line-height: 1.08;
  margin: 0 0 12px;
}

.hero-copy p {
  color: rgba(255,255,255,0.9);
  max-width: 660px;
}

.hero-proof {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.hero-proof span {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.12);
  color: white;
  font-size: 0.9rem;
}

.hero-panel {
  display: flex;
  align-items: stretch;
}

.hero-panel-card {
  width: 100%;
  background: rgba(2, 6, 23, 0.5);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 18px;
  padding: 20px;
  backdrop-filter: blur(10px);
}

.hero-panel-title {
  font-weight: 700;
  color: #dbeafe;
  margin-bottom: 10px;
}

.hero-list li {
  margin-bottom: 10px;
  color: rgba(255,255,255,0.9);
}

.trust-card {
  margin-top: 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 24px 24px;
}

.trust-card__copy h2 {
  margin: 6px 0 8px;
}

.trust-card__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.stat-pill {
  min-width: 130px;
  padding: 14px 14px;
  border-radius: 14px;
  background: rgba(96, 165, 250, 0.12);
  border: 1px solid rgba(96, 165, 250, 0.16);
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.stat-pill strong {
  color: #dbeafe;
}

.stat-pill span {
  color: var(--muted);
  font-size: 0.9rem;
}

.feature-card h3 {
  margin-top: 0;
}

.cta-card {
  margin-top: 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 24px 24px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(10, 16, 30, 0.95));
}

.demo-map-card {
  margin-top: 18px;
  padding: 24px;
}

.showcase-card {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 24px;
  align-items: start;
}

.showcase-copy {
  margin-bottom: 4px;
  text-align: left;
  align-self: start;
}

.showcase-visual {
  display: flex;
  justify-content: center;
}

.phone-mockup {
  width: min(100%, 300px);
  padding: 8px;
  border-radius: 28px;
  background: linear-gradient(145deg, #111827, #030712);
  box-shadow: 0 20px 45px rgba(2, 6, 23, 0.4);
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.phone-screen {
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.16);
  padding: 6px;
  background: #020617;
}

.phone-screen__content {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 16px;
  position: relative;
  min-height: 520px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.95), rgba(8, 15, 29, 0.95));
}

.phone-screen__content img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  position: absolute;
  inset: 0;
  transition: opacity 0.6s ease;
}

.phone-screen__content img.active {
  opacity: 1;
  position: relative;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.dashboard-metric {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.95), rgba(10, 16, 30, 0.95));
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 20px;
  padding: 18px;
  box-shadow: 0 10px 24px rgba(2, 6, 23, 0.24);
}

.dashboard-metric strong {
  display: block;
  font-size: 1.5rem;
  color: var(--primary);
}

.dashboard-metric span {
  color: var(--muted);
  font-size: 0.95rem;
}

.dashboard-board {
  padding: 20px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.95), rgba(10, 16, 30, 0.95));
  border: 1px solid rgba(148, 163, 184, 0.16);
  box-shadow: 0 10px 24px rgba(2, 6, 23, 0.24);
}

.dashboard-board-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.dashboard-pill {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.1);
  color: var(--primary);
  font-weight: 700;
  font-size: 0.9rem;
}

.dashboard-list {
  display: grid;
  gap: 16px;
}

.mission-card {
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 22px;
  padding: 18px;
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.96), rgba(10, 16, 30, 0.96));
  box-shadow: 0 8px 20px rgba(2, 6, 23, 0.2);
}

.mission-card__top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.mission-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(52, 211, 153, 0.16);
  color: #6ee7b7;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.mission-summary {
  margin: 4px 0 0;
  color: #94a3b8;
  font-size: 0.92rem;
  line-height: 1.45;
}

.mission-status {
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.82rem;
}

.mission-status.ok {
  background: rgba(52, 211, 153, 0.16);
  color: #6ee7b7;
}

.mission-status.off {
  background: rgba(248, 113, 113, 0.16);
  color: #fda4af;
}

.mission-meta {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
  color: var(--muted);
}

.mission-meta__header {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #60a5fa;
}

.mission-meta a {
  word-break: break-all;
}

.qr-code {
  margin-top: 6px;
  width: 90px;
  height: 90px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.mission-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.quest-panel {
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  padding-top: 14px;
}

.quest-section-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #60a5fa;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.team-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.team-pill {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(96, 165, 250, 0.12);
  border: 1px solid rgba(96, 165, 250, 0.18);
}

.team-pill__name {
  font-weight: 700;
  color: #dbeafe;
}

.team-pill__code {
  font-size: 0.82rem;
  color: #93c5fd;
}

.score-section {
  margin-top: 8px;
}

.score-label {
  font-size: 0.84rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #94a3b8;
  margin-bottom: 8px;
}

.score-list {
  display: grid;
  gap: 8px;
}

.score-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.58);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.score-row strong {
  color: #34d399;
}

.mini-map {
  height: 220px;
  margin-top: 10px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.6);
}

.quiz-closed-banner {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 16px;
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.9);
  border: 1px solid rgba(248, 113, 113, 0.25);
  color: #fda4af;
  box-shadow: 0 10px 24px rgba(2, 6, 23, 0.3);
  max-width: min(92vw, 420px);
  text-align: center;
}

.finished-state-card {
  max-width: 640px;
  margin: 48px auto 0;
  text-align: center;
  padding: 36px 28px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(10, 16, 30, 0.98));
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: 0 24px 60px rgba(2, 6, 23, 0.32);
}

.finished-state-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 16px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 1.75rem;
  color: white;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  box-shadow: 0 16px 30px rgba(96, 165, 250, 0.2);
}

.finished-state-card h1 {
  margin: 8px 0 10px;
  font-size: clamp(1.4rem, 3vw, 2rem);
}

.finished-state-card p {
  max-width: 560px;
  margin: 0 auto 16px;
}

.play-closed-overlay {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: radial-gradient(circle at top, rgba(37, 99, 235, 0.24), transparent 28%), linear-gradient(135deg, rgba(2, 6, 23, 0.94), rgba(15, 23, 42, 0.98));
  backdrop-filter: blur(10px);
}

.play-closed-card {
  width: min(100%, 460px);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(10, 16, 30, 0.98));
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 24px;
  padding: 28px;
  box-shadow: 0 24px 60px rgba(2, 6, 23, 0.38);
  text-align: center;
  color: #f8fafc;
}

.play-closed-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 14px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1.6rem;
  color: white;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  box-shadow: 0 12px 24px rgba(96, 165, 250, 0.24);
}

.play-closed-card h2 {
  margin: 6px 0 8px;
  font-size: 1.45rem;
}

.play-closed-card p {
  margin: 0 0 18px;
  color: #cbd5e1;
  line-height: 1.6;
}

.play-closed-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.play-closed-actions .btn,
.play-closed-actions .btn.secondary {
  margin-top: 0;
}

.editor-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.editor-tab {
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.5);
  color: #cbd5e1;
  padding: 10px 14px;
  border-radius: 999px;
  font-weight: 700;
  box-shadow: none;
  margin-top: 0;
}

.editor-tab.active {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  color: #020617;
}

.editor-tab-panel {
  display: none;
}

.editor-tab-panel.active {
  display: block;
}

.editor-grid {
  display: grid;
  gap: 10px;
}

.bounds-editor {
  display: grid;
  gap: 10px;
  margin-top: 6px;
}

.bounds-map-shell {
  display: grid;
  gap: 8px;
}

.bounds-map {
  height: 280px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.bounds-map-hint {
  margin: 0;
}

.bounds-radius-control {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.58);
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.bounds-radius-control input[type="range"] {
  width: 100%;
  accent-color: var(--primary);
}

.toggle-switch {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  padding: 10px 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(148, 163, 184, 0.16);
  width: 100%;
  max-width: 100%;
  flex-wrap: wrap;
}

.toggle-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.toggle-slider {
  position: relative;
  width: 46px;
  height: 26px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.35);
  transition: background 0.2s ease;
  flex-shrink: 0;
}

.toggle-slider::before {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: white;
  transition: transform 0.2s ease;
  box-shadow: 0 2px 6px rgba(2, 6, 23, 0.24);
}

.toggle-switch input:checked + .toggle-slider {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
}

.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(20px);
}

.toggle-label {
  color: #e2e8f0;
  font-size: 0.95rem;
  line-height: 1.4;
  flex: 1 1 220px;
  min-width: 0;
}

.editor-share-link {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.editor-section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.editor-list {
  display: grid;
  gap: 10px;
}

.editor-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.62);
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.editor-list-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.editor-map {
  height: 260px;
  margin-top: 12px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(2, 6, 23, 0.75);
  backdrop-filter: blur(8px);
  z-index: 4000;
}

.modal-backdrop.is-open {
  display: flex;
}

.modal-dialog {
  width: min(100%, 640px);
  max-height: min(92vh, 860px);
  overflow: auto;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(10, 16, 30, 0.98));
  border: 1px solid rgba(148, 163, 184, 0.2);
  box-shadow: 0 24px 60px rgba(2, 6, 23, 0.38);
  padding: 20px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.modal-close {
  border: 0;
  background: rgba(148, 163, 184, 0.16);
  color: #f8fafc;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  cursor: pointer;
}

.modal-form {
  display: grid;
  gap: 10px;
}

@media (max-width: 640px) {
  .container {
    padding: 12px;
  }

  .card {
    padding: 16px;
    border-radius: 16px;
  }

  nav .container {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  nav a {
    margin-left: 0;
    margin-right: 10px;
  }

  button, .btn {
    width: 100%;
    padding: 13px 16px;
  }

  .hero {
    padding-top: 18px;
  }

  h1 {
    font-size: 1.45rem;
  }

  h2 {
    font-size: 1.15rem;
  }

  .small {
    font-size: 0.90rem;
  }

  .dashboard-board-header,
  .mission-card__top,
  .monitor-hero__top,
  .trust-card,
  .cta-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-actions,
  .mission-actions,
  .monitor-actions {
    flex-direction: column;
  }

  .hero-spotlight {
    grid-template-columns: 1fr;
    padding: 20px;
  }

  .demo-map-shell {
    grid-template-columns: 1fr;
  }
}
