:root {
  --bg: #071015;
  --panel: rgba(255, 255, 255, .11);
  --panel-strong: rgba(255, 255, 255, .18);
  --line: rgba(255, 255, 255, .18);
  --text: #fff;
  --muted: rgba(255, 255, 255, .68);
  --ink: #050505;
  --orange: #ff9418;
  --pink: #ff38df;
  --cyan: #70efff;
  --green: #8dff69;
  --danger: #ff4f6d;
  --radius: 28px;
  font-family: "Montserrat", "Arial Rounded MT Bold", Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 18%, rgba(255, 148, 24, .26), transparent 30%),
    radial-gradient(circle at 82% 12%, rgba(255, 56, 223, .22), transparent 30%),
    radial-gradient(circle at 50% 82%, rgba(112, 239, 255, .14), transparent 36%),
    linear-gradient(135deg, #061014, #12252a 55%, #070a0f);
  overflow-x: hidden;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(255,255,255,.025) 0 1px, transparent 1px 4px);
  mix-blend-mode: screen;
}

a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button { cursor: pointer; }

.landing-shell, .auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px 16px;
}
.hero-card, .auth-dialog, .panel, .view-card, .editor-topbar {
  border: 1px solid var(--line);
  background: linear-gradient(145deg, rgba(255,255,255,.18), rgba(255,255,255,.08));
  box-shadow: 0 28px 80px rgba(0,0,0,.38);
  backdrop-filter: blur(20px) saturate(1.15);
  -webkit-backdrop-filter: blur(20px) saturate(1.15);
}
.hero-card {
  width: min(1050px, 100%);
  border-radius: 38px;
  padding: clamp(28px, 5vw, 64px);
  position: relative;
  overflow: hidden;
}
.hero-card::after, .auth-dialog::after {
  content: "";
  position: absolute;
  inset: -2px;
  pointer-events: none;
  background: linear-gradient(115deg, transparent 0 35%, rgba(255,255,255,.20) 45%, transparent 55% 100%);
  opacity: .55;
}
.brand-pill, .auth-brand {
  display: inline-grid;
  place-items: center;
  min-height: 54px;
  padding: 0 24px;
  border-radius: 999px;
  color: var(--ink);
  background: linear-gradient(100deg, var(--orange), var(--pink));
  box-shadow: 0 12px 30px rgba(255, 56, 223, .24), inset 0 1px 0 rgba(255,255,255,.55);
  font-weight: 1000;
  letter-spacing: -.05em;
}
h1 {
  max-width: 850px;
  margin: 30px 0 18px;
  font-size: clamp(42px, 7vw, 82px);
  line-height: .88;
  letter-spacing: -.075em;
}
p { color: var(--muted); line-height: 1.48; }
.hero-card > p { max-width: 760px; font-size: 18px; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 28px; }
.hero-actions form, .topbar-actions form { margin: 0; }
.btn {
  display: inline-grid;
  place-items: center;
  min-height: 48px;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  font-weight: 950;
  letter-spacing: -.04em;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  color: var(--ink);
  background: linear-gradient(100deg, var(--orange), var(--pink));
  box-shadow: 0 14px 34px rgba(255, 80, 180, .28);
}
.btn-ghost {
  color: var(--text);
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.20);
}
.btn-full { width: 100%; }
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 38px;
}
.feature-grid article {
  padding: 20px;
  border-radius: 24px;
  background: rgba(0,0,0,.20);
  border: 1px solid rgba(255,255,255,.14);
}
.feature-grid b { display: block; margin-bottom: 8px; font-size: 18px; }
.feature-grid span { color: var(--muted); font-size: 14px; line-height: 1.35; }

.auth-dialog {
  position: relative;
  width: min(470px, 100%);
  border-radius: 32px;
  padding: 22px;
  overflow: hidden;
}
.auth-dialog--standalone > * { position: relative; z-index: 1; }
.auth-backlink { display: inline-block; margin-bottom: 16px; color: var(--muted); }
.auth-kicker { margin: 16px 0 18px; color: var(--muted); }
.auth-form { display: grid; gap: 12px; }
.auth-form label { display: grid; gap: 7px; color: var(--muted); font-size: 13px; }
.auth-form input, .control-label select, .map-title {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 18px;
  padding: 0 16px;
  color: var(--text);
  background: rgba(0,0,0,.24);
  outline: none;
}
.auth-form input:focus, .control-label select:focus, .map-title:focus { border-color: rgba(112, 239, 255, .7); }
.auth-mini { text-align: center; font-size: 14px; }
.auth-mini a { color: var(--cyan); }
.splitter { display: grid; place-items: center; margin: 16px 0; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .12em; }
.notice {
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.18);
  margin: 14px 0;
  line-height: 1.3;
}
.notice--error { color: #ffd4dc; border-color: rgba(255,79,109,.42); background: rgba(255,79,109,.14); }
.notice--success { color: #d9ffd2; border-color: rgba(141,255,105,.35); background: rgba(141,255,105,.10); }

.editor-page { min-height: 100vh; overflow: hidden; }
.editor-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 72px;
  display: grid;
  grid-template-columns: auto minmax(180px, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-width: 0 0 1px 0;
  border-radius: 0;
}
.editor-logo { font-size: 22px; font-weight: 1000; letter-spacing: -.06em; }
.map-title { min-height: 46px; font-size: 18px; font-weight: 900; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.user-chip {
  padding: 12px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,.12);
  color: var(--muted);
}
.editor-layout {
  height: calc(100vh - 72px);
  display: grid;
  grid-template-columns: 310px 1fr;
  gap: 14px;
  padding: 14px;
}
.editor-sidebar { display: grid; align-content: start; gap: 14px; overflow: auto; padding-right: 2px; }
.panel { border-radius: var(--radius); padding: 16px; }
.panel h2 { margin: 0 0 14px; font-size: 18px; letter-spacing: -.05em; }
.tool-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tool {
  min-height: 44px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 16px;
  color: var(--text);
  background: rgba(0,0,0,.24);
  font-weight: 900;
}
.tool.is-active { color: var(--ink); background: linear-gradient(100deg, var(--orange), var(--pink)); }
.control-label { display: grid; gap: 8px; margin-top: 14px; color: var(--muted); font-size: 13px; }
.control-label select { color: var(--text); }
.hint { font-size: 13px; margin-bottom: 0; }
.maps-list { display: grid; gap: 8px; }
.map-list-item {
  display: grid;
  gap: 4px;
  padding: 11px 12px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 16px;
  background: rgba(0,0,0,.22);
  color: var(--text);
  text-align: left;
}
.map-list-item small { color: var(--muted); }
.status { color: var(--muted); line-height: 1.35; font-size: 14px; }
.workspace {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(390px, .9fr) minmax(460px, 1.1fr);
  gap: 14px;
}
.view-card { min-width: 0; min-height: 0; border-radius: var(--radius); overflow: hidden; display: grid; grid-template-rows: 48px 1fr; }
.view-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  border-bottom: 1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.18);
}
.view-head span { color: var(--muted); font-size: 13px; }
#map2d { width: 100%; height: 100%; display: block; background: rgba(0,0,0,.18); cursor: crosshair; }
#view3d { min-height: 0; outline: none; position: relative; background: #000; }
#view3d canvas { display: block; width: 100% !important; height: 100% !important; }
.walk-help {
  position: absolute;
  right: 22px;
  bottom: 22px;
  max-width: 300px;
  padding: 10px 12px;
  border-radius: 14px;
  color: rgba(255,255,255,.82);
  background: rgba(0,0,0,.42);
  border: 1px solid rgba(255,255,255,.14);
  font-size: 12px;
  pointer-events: none;
}
.view-card--3d { position: relative; }

@media (max-width: 1180px) {
  .editor-layout { grid-template-columns: 1fr; height: auto; overflow: auto; }
  .editor-page { overflow: auto; }
  .workspace { grid-template-columns: 1fr; }
  .view-card { height: 60vh; min-height: 420px; }
}
@media (max-width: 760px) {
  .feature-grid { grid-template-columns: 1fr; }
  .editor-topbar { grid-template-columns: 1fr; }
  .topbar-actions { flex-wrap: wrap; }
  h1 { font-size: 44px; }
}
