:root {
  color-scheme: dark;
  --obsidian: #060807;
  --asphalt: #0d110f;
  --panel: #121815;
  --line: rgba(255, 255, 255, 0.11);
  --emerald: #00f59b;
  --emerald-soft: rgba(0, 245, 155, 0.14);
  --gold: #f59e0b;
  --gold-soft: rgba(245, 158, 11, 0.15);
  --sky: #38bdf8;
  --sky-soft: rgba(56, 189, 248, 0.15);
  --sage: #94a89d;
  --text: #f4f7f5;
  --radius: 16px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--obsidian);
  color: var(--text);
  font: 15px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  overflow-x: hidden;
}
a { color: var(--emerald); text-decoration: none; }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.hidden { display: none !important; }
.mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.display {
  font-family: Impact, "Arial Black", system-ui, sans-serif;
  letter-spacing: 0.025em;
  line-height: 0.96;
  text-transform: uppercase;
}
.shell { max-width: 1240px; margin: 0 auto; padding: 0 20px; }

/* Header */
.site-nav {
  position: sticky; top: 0; z-index: 40;
  background: rgba(6, 8, 7, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  min-height: 68px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; flex-wrap: wrap; padding: 10px 0;
}
.brand { display: flex; align-items: center; gap: 11px; color: var(--text); }
.brand-mark {
  width: 40px; height: 40px; border-radius: 6px;
  background: var(--emerald); color: var(--obsidian);
  display: grid; place-items: center;
  font-size: 20px; font-weight: 900;
  box-shadow: 0 0 24px rgba(0, 245, 155, 0.25);
}
.brand-title { font-size: 20px; letter-spacing: 0.05em; }
.brand-sub { font-size: 10px; letter-spacing: 0.2em; color: var(--gold); text-transform: uppercase; }
.nav-links { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.nav-links a, .nav-link-btn {
  color: var(--sage); font-size: 12px; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  background: none; border: 0; padding: 8px 4px; min-height: 44px;
  display: inline-flex; align-items: center; gap: 6px;
}
.nav-links a:hover, .nav-link-btn:hover { color: var(--emerald); }
.nav-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* Buttons */
.btn {
  min-height: 44px; padding: 10px 18px; border-radius: 8px;
  font-size: 12px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--line); background: var(--asphalt); color: var(--text);
  transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}
.btn:hover { border-color: var(--emerald); background: #14221c; }
.btn-neon {
  background: var(--emerald); color: var(--obsidian); border-color: var(--emerald);
  box-shadow: 0 10px 28px -8px rgba(0, 245, 155, 0.4);
}
.btn-neon:hover { background: #ffffff; color: var(--obsidian); border-color: #ffffff; }
.btn-gold { background: var(--gold); color: #191306; border-color: var(--gold); }
.btn-gold:hover { background: #ffffff; color: #191306; border-color: #ffffff; }
.btn-skew { transform: skewX(-7deg); border-radius: 4px; }
.btn-skew > span { display: inline-flex; align-items: center; gap: 8px; transform: skewX(7deg); }

/* Hero */
.hero {
  position: relative; overflow: hidden;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 76% 18%, rgba(0, 245, 155, 0.2), transparent 44%),
    radial-gradient(circle at 18% 82%, rgba(245, 158, 11, 0.14), transparent 46%),
    linear-gradient(180deg, #07120d 0%, #060807 82%);
  padding: 54px 0 64px;
}
.hero-grid { display: grid; grid-template-columns: 1.2fr 0.85fr; gap: 32px; align-items: center; }
.hero-kicker {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 7px 14px; background: rgba(13, 17, 15, 0.9);
  border-left: 4px solid var(--emerald);
  font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
}
.hero h1 { font-size: clamp(44px, 6.4vw, 82px); margin: 16px 0 18px; }
.hero-accent {
  background: linear-gradient(90deg, var(--emerald), #86efac, var(--gold));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-copy { color: var(--sage); font-size: 16px; max-width: 56ch; margin: 0 0 24px; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; }
.telemetry {
  margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; max-width: 520px;
}
.telemetry .val { font-size: 26px; }
.telemetry .lbl { font-size: 11px; color: var(--sage); text-transform: uppercase; }

/* Spotlight card */
.spotlight {
  border-radius: var(--radius); overflow: hidden;
  border: 1px solid rgba(0, 245, 155, 0.35); background: var(--asphalt);
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.65);
}
.spotlight-art {
  position: relative; min-height: 290px; padding: 20px;
  display: flex; flex-direction: column; justify-content: space-between;
  background: linear-gradient(135deg, #0e261b 0%, #0b120f 55%, #23190b 100%);
  overflow: hidden;
}
.spotlight-art svg { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.85; pointer-events: none; }
.spotlight-top { position: relative; z-index: 2; display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 6px;
  font-size: 10px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase;
  border: 1px solid var(--line); background: rgba(6, 8, 7, 0.85); color: var(--text);
}
.pill.emerald { border-color: rgba(0, 245, 155, 0.45); color: var(--emerald); }
.pill.gold { border-color: rgba(245, 158, 11, 0.45); color: var(--gold); }
.pill.sky { border-color: rgba(56, 189, 248, 0.45); color: var(--sky); }
.spotlight-foot {
  padding: 14px 18px; background: var(--obsidian); border-top: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}

/* Territory Explorer */
.section { padding: 64px 0; border-bottom: 1px solid var(--line); }
.grid-bg {
  background-size: 32px 32px;
  background-image:
    linear-gradient(to right, rgba(0, 245, 155, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0, 245, 155, 0.05) 1px, transparent 1px);
}
.sec-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 20px; flex-wrap: wrap; margin-bottom: 26px;
}
.sec-head h2 { font-size: clamp(32px, 4.5vw, 52px); margin: 6px 0 0; }
.sec-head p { margin: 8px 0 0; color: var(--sage); max-width: 56ch; font-size: 14px; }
.filter-row { display: flex; flex-wrap: wrap; gap: 8px; }
.filter-btn {
  min-height: 44px; padding: 8px 14px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--asphalt); color: var(--sage);
  font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase;
}
.filter-btn[aria-pressed="true"] { background: var(--emerald); color: var(--obsidian); border-color: var(--emerald); }

.map-layout { display: grid; grid-template-columns: 1.55fr 0.85fr; gap: 22px; align-items: stretch; }
.map-card, .inspector-card {
  background: var(--asphalt); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px;
  display: flex; flex-direction: column; justify-content: space-between;
}
.map-card { background: #090d0b; border-color: rgba(0, 245, 155, 0.25); }
.map-legend {
  display: flex; justify-content: space-between; align-items: center;
  gap: 10px; flex-wrap: wrap; padding-bottom: 12px; border-bottom: 1px solid var(--line);
  font-size: 11px;
}
.legend-dots { display: flex; gap: 14px; flex-wrap: wrap; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; }
.parcel-node { cursor: pointer; transition: filter 0.2s ease, opacity 0.2s ease; }
.parcel-node:hover { filter: brightness(1.22) drop-shadow(0 0 10px rgba(0, 245, 155, 0.5)); }
.parcel-node.selected { filter: brightness(1.28) drop-shadow(0 0 14px rgba(245, 158, 11, 0.85)); }

.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 16px 0; }
.stat-box { background: var(--obsidian); border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.stat-box.full { grid-column: 1 / -1; }
.stat-lbl { font-size: 10px; color: var(--sage); text-transform: uppercase; letter-spacing: 0.1em; }
.stat-val { font-size: 14px; font-weight: 800; margin-top: 4px; }

/* Four Pillars */
.pillars { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.pillar-card {
  background: var(--asphalt); border: 1px solid var(--line); border-radius: 14px;
  overflow: hidden; display: flex; flex-direction: column; justify-content: space-between;
  transition: transform 0.22s ease, border-color 0.22s ease;
  text-align: left; padding: 0; color: inherit; width: 100%;
}
.pillar-card:hover { transform: translateY(-5px); border-color: var(--emerald); }
.pillar-art {
  position: relative; height: 168px; padding: 14px;
  display: flex; flex-direction: column; justify-content: space-between;
  background: linear-gradient(135deg, #0f2a1e, #070b09); overflow: hidden;
}
.pillar-art.gold-bg { background: linear-gradient(135deg, #261b0d, #070b09); }
.pillar-art.sky-bg { background: linear-gradient(135deg, #10232b, #070b09); }
.pillar-art svg { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.78; pointer-events: none; }
.pillar-body { padding: 18px; }
.pillar-body h3 { font-size: 22px; margin: 0 0 8px; }
.pillar-body p { margin: 0; font-size: 13px; color: var(--sage); }
.pillar-cta { padding: 0 18px 18px; font-size: 11px; font-weight: 800; color: var(--emerald); letter-spacing: 0.1em; text-transform: uppercase; }

/* People's Pass Showcase */
.pass-panel {
  border-radius: 20px; background: var(--asphalt); border: 1px solid var(--line);
  padding: 36px; display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 32px; align-items: center;
}
.holo-pass {
  background: linear-gradient(135deg, rgba(18, 24, 21, 0.97), rgba(11, 18, 15, 0.98) 55%, rgba(245, 158, 11, 0.16));
  border: 1px solid rgba(245, 158, 11, 0.48);
  border-radius: 18px; padding: 24px;
  box-shadow: 0 26px 56px -14px rgba(0, 0, 0, 0.85), 0 0 36px -10px rgba(0, 245, 155, 0.22);
  transition: transform 0.18s ease-out;
}
.pass-inner {
  margin: 20px 0; padding: 16px; border-radius: 12px;
  background: rgba(6, 8, 7, 0.85); border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
}
.pass-crest {
  width: 56px; height: 56px; border-radius: 12px;
  background: linear-gradient(135deg, rgba(0, 245, 155, 0.22), rgba(245, 158, 11, 0.24));
  border: 1px solid rgba(245, 158, 11, 0.45);
  display: grid; place-items: center; font-size: 22px; color: var(--gold);
}

/* Resident Portal (Tier 2) */
.resident-hud {
  border-radius: 16px; background: var(--asphalt); border: 1px solid rgba(0, 245, 155, 0.35);
  padding: 18px 22px; display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 22px;
}
.resident-grid { display: grid; grid-template-columns: 0.92fr 1.28fr; gap: 22px; }
.xp-bar { height: 12px; border-radius: 999px; background: var(--obsidian); border: 1px solid var(--line); overflow: hidden; padding: 2px; }
.xp-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--emerald), var(--gold)); transition: width 0.35s ease; }
.mission-item, .block-item {
  background: var(--obsidian); border: 1px solid var(--line); border-radius: 12px;
  padding: 16px; display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line); background: #040605; padding: 26px 0;
  font-size: 12px; color: var(--sage);
}
.footer-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }

/* Modal & Toast */
.modal-overlay {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(0, 0, 0, 0.84); backdrop-filter: blur(8px);
  display: grid; place-items: center; padding: 16px;
}
.modal-box {
  position: relative; width: 100%; max-width: 520px; max-height: 90vh; overflow-y: auto;
  background: var(--asphalt); border: 1px solid rgba(0, 245, 155, 0.4);
  border-radius: 18px; padding: 24px; box-shadow: 0 24px 64px rgba(0, 0, 0, 0.85);
}
.modal-close {
  position: absolute; top: 14px; right: 14px; width: 44px; height: 44px;
  border-radius: 10px; border: 1px solid var(--line); background: var(--obsidian); color: var(--text);
  font-weight: 800;
}
.field-input {
  width: 100%; min-height: 44px; padding: 10px 14px; border-radius: 10px;
  border: 1px solid rgba(0, 245, 155, 0.45); background: var(--obsidian); color: var(--text);
  font: inherit; font-weight: 700;
}
.toast {
  position: fixed; right: 18px; bottom: 18px; z-index: 90;
  background: var(--panel); border: 1px solid var(--emerald); color: var(--text);
  padding: 12px 16px; border-radius: 10px; font-size: 12px; max-width: 340px;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.7);
}

@media (max-width: 1024px) {
  .hero-grid, .map-layout, .pass-panel, .resident-grid { grid-template-columns: 1fr; }
  .pillars { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .shell { padding: 0 14px; }
  .pillars { grid-template-columns: 1fr; }
  .telemetry { grid-template-columns: 1fr 1fr; }
  .pass-panel { padding: 22px; }
  .nav-links { display: none; }
}


/* EC-TRAVEL-007: on-board avatar navigation; routes are fictional schematic paths. */
.travel-controls {
  display: flex; flex-wrap: wrap; align-items: center; gap: 9px;
  padding: 10px 0 14px; border-bottom: 1px solid var(--line);
}
.travel-controls label { font-size: 11px; color: var(--emerald); font-weight: 800; }
.travel-controls select {
  min-height: 44px; min-width: 142px;
  padding: 8px 10px; border: 1px solid var(--emerald); border-radius: 9px;
  background: #07140e; color: var(--text);
}
.travel-controls button { min-height: 44px; flex: 1 1 190px; }
.travel-controls .travel-position { color: var(--text); font-size: 11px; }
.travel-controls .travel-notice { width: 100%; color: var(--sage); font-size: 10px; }
.ec-travel-route {
  fill: none; stroke: #ffdc79; stroke-width: 5;
  stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 10 7;
  filter: drop-shadow(0 0 4px #ebc665);
}
.ec-player-halo { fill: rgba(0,245,155,.17); stroke: #00f59b; stroke-width: 2; }
.ec-player-marker { fill: #052920; stroke: #fff9d1; stroke-width: 2.5; }
.ec-player-symbol { fill: #f9d978; font-size: 19px; font-weight: 900; pointer-events: none; }
@media (max-width: 640px) {
  .travel-controls { align-items: stretch; }
  .travel-controls select { flex: 1 1 120px; }
  .travel-controls .travel-position { width: 100%; }
}

/* =========================================================================
   EC-S2-PHASE2-UI-UX-REV01: Phase 2 Local Frontend Scaffolding
   (Bottom Sheets, Beacon 03 3x3 Grid, Cinematic Overlay, Transit, Journal)
   ========================================================================= */
.p2-toolbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  margin: 12px 0 14px; padding: 12px;
  background: rgba(11, 18, 15, 0.92);
  border: 1px solid rgba(0, 245, 155, 0.28);
  border-radius: 14px;
}
.p2-toolbar-label {
  font-size: 10px; letter-spacing: 0.14em; color: var(--gold); font-weight: 800;
  margin-right: 4px;
}
.p2-pill-btn {
  min-height: 44px; padding: 8px 14px; border-radius: 10px;
  border: 1px solid rgba(0, 245, 155, 0.35);
  background: #07140e; color: var(--text);
  font-size: 11px; font-weight: 800; letter-spacing: 0.06em;
  cursor: pointer; transition: border-color 0.2s, background 0.2s;
}
.p2-pill-btn:hover, .p2-pill-btn:focus-visible {
  border-color: var(--emerald); background: #0b2419; outline: 2px solid var(--emerald); outline-offset: 2px;
}
.p2-pill-btn.beacon-active {
  border-color: var(--gold); background: rgba(245, 158, 11, 0.14); color: #fde68a;
}

.p2-taxonomy-bar {
  display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center;
  padding: 8px 12px; margin-bottom: 10px;
  background: rgba(6, 10, 8, 0.85); border: 1px solid var(--line); border-radius: 10px;
  font-size: 10.5px; color: var(--sage);
}
.p2-tax-item { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }
.p2-tax-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.p2-tax-dot.green { background: #00f59b; }
.p2-tax-dot.blue { background: #38bdf8; }
.p2-tax-dot.amber { background: #f59e0b; }
.p2-tax-dot.gray { background: #94a3b8; }

/* Mobile-First Bottom Sheet */
.p2-sheet-overlay {
  position: fixed; inset: 0; z-index: 95;
  background: rgba(0, 0, 0, 0.78); backdrop-filter: blur(6px);
  display: flex; align-items: flex-end; justify-content: center; padding: 16px;
}
.p2-sheet-overlay.hidden { display: none !important; }
.p2-sheet {
  position: relative; width: 100%; max-width: 600px; max-height: 88vh; overflow-y: auto;
  background: #0a100d; border: 1px solid rgba(0, 245, 155, 0.45);
  border-radius: 20px 20px 16px 16px; padding: 22px;
  box-shadow: 0 -14px 48px rgba(0, 0, 0, 0.88);
  animation: p2SlideUp 0.22s ease-out;
}
@keyframes p2SlideUp {
  from { transform: translateY(24px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.p2-sheet-handle {
  width: 44px; height: 4px; border-radius: 999px; background: rgba(255, 255, 255, 0.22);
  margin: 0 auto 14px;
}
.p2-sheet-close {
  position: absolute; top: 14px; right: 14px; width: 44px; height: 44px;
  border-radius: 10px; border: 1px solid var(--line); background: var(--obsidian);
  color: var(--text); font-weight: 800; cursor: pointer;
}

/* Beacon 03 3x3 Harvest & Distribute Grid */
.p2-b3-stats {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 12px 0;
}
.p2-b3-stat {
  background: #060a08; border: 1px solid var(--line); border-radius: 10px;
  padding: 10px; text-align: center;
}
.p2-b3-stat .k { font-size: 9.5px; color: var(--sage); letter-spacing: 0.1em; display: block; }
.p2-b3-stat .v { font-size: 18px; font-weight: 900; color: var(--emerald); margin-top: 2px; display: block; }
.p2-grid-3x3 {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; margin: 12px 0;
}
.p2-grid-node {
  min-height: 56px; padding: 10px 6px; border-radius: 11px;
  border: 1px solid rgba(255, 255, 255, 0.14); background: #0f1914;
  color: var(--text); font-weight: 800; font-size: 12px; letter-spacing: 0.04em;
  cursor: pointer; transition: border-color 0.18s, background 0.18s, transform 0.12s;
}
.p2-grid-node:hover { border-color: var(--emerald); background: #14261d; }
.p2-grid-node.step-done {
  border-color: var(--emerald); background: rgba(0, 245, 155, 0.18); color: #a7f3d0;
}
.p2-grid-node.step-wrong {
  border-color: #f59e0b; background: rgba(245, 158, 11, 0.16); color: #fde68a;
}
.p2-guidance-box {
  background: rgba(245, 158, 11, 0.09); border: 1px solid rgba(245, 158, 11, 0.42);
  border-radius: 12px; padding: 12px; margin: 12px 0; font-size: 12.5px; color: var(--text);
}
.p2-guidance-box.complete {
  background: rgba(0, 245, 155, 0.1); border-color: rgba(0, 245, 155, 0.5);
}

/* Cinematic Storyboard Comms Overlay */
.p2-cinematic-stage {
  background: radial-gradient(circle at 30% 20%, #0e2c21, #060908 75%);
  border: 1px solid rgba(0, 245, 155, 0.35); border-radius: 14px;
  padding: 20px; min-height: 185px; display: flex; flex-direction: column; justify-content: space-between;
  margin: 12px 0;
}
.p2-captions {
  background: rgba(0, 0, 0, 0.78); border-left: 3px solid var(--gold);
  padding: 10px 12px; border-radius: 6px; font-size: 12.5px; color: #f8fafc; margin-top: 10px;
}

/* Collapsible Right-Edge Mission Journal Drawer */
.p2-journal-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(390px, 100vw); z-index: 98;
  background: #080d0b; border-left: 1px solid rgba(0, 245, 155, 0.4);
  padding: 18px; overflow-y: auto; box-shadow: -16px 0 48px rgba(0, 0, 0, 0.82);
}
.p2-journal-drawer.hidden { display: none !important; }
.p2-boundary-banner {
  background: rgba(245, 158, 11, 0.12); border: 1px solid rgba(245, 158, 11, 0.45);
  color: #fde68a; border-radius: 10px; padding: 10px; font-size: 11px; margin: 10px 0 14px;
}
.p2-journal-list { display: grid; gap: 8px; margin: 10px 0 16px; }
.p2-journal-entry {
  background: #0e1713; border: 1px solid var(--line); border-radius: 9px;
  padding: 9px 11px; font-size: 12px; color: var(--text);
}
.p2-pathway-card {
  background: #0c1410; border: 1px solid rgba(56, 189, 248, 0.32); border-radius: 11px;
  padding: 12px; margin-bottom: 10px;
}
.p2-pathway-card a {
  display: inline-block; margin-top: 8px; color: var(--emerald); font-weight: 800; font-size: 11.5px;
}
.p2-avatar-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 12px 0; }
.p2-transit-stop {
  width: 100%; text-align: left; min-height: 48px; padding: 10px 12px; margin-bottom: 8px;
  border-radius: 10px; border: 1px solid var(--line); background: #0c1511; color: var(--text);
  cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 8px;
}
.p2-transit-stop.active { border-color: var(--emerald); background: rgba(0, 245, 155, 0.14); }

@media (max-width: 640px) {
  .p2-sheet-overlay { padding: 0; }
  .p2-sheet { border-radius: 20px 20px 0 0; max-height: 92vh; padding: 18px 14px; }
  .p2-toolbar { padding: 10px; gap: 6px; }
  .p2-pill-btn { flex: 1 1 46%; text-align: center; padding: 8px 10px; }
  .p2-avatar-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .p2-sheet { animation: none !important; }
  .p2-pill-btn, .p2-grid-node { transition: none !important; }
}

/* W13 / W16: Beats by AE Advanced 16-Step Studio 00 Beat Lab */
.p2-beat-row {
  display: grid; grid-template-columns: 60px 26px 26px 52px repeat(16, minmax(0, 1fr));
  gap: 3px; align-items: center; margin-bottom: 6px;
}
.p2-beat-label { font-size: 9.5px; font-weight: 800; color: var(--text); }
.p2-beat-vol { width: 48px; accent-color: var(--emerald); }
.p2-ms-btn {
  min-height: 28px; border-radius: 5px; border: 1px solid var(--line);
  background: #0c1410; color: var(--sage); font-size: 9.5px; font-weight: 800; cursor: pointer;
}
.p2-ms-btn.active-mute { border-color: #f59e0b; background: rgba(245, 158, 11, 0.22); color: #fde68a; }
.p2-ms-btn.active-solo { border-color: #38bdf8; background: rgba(56, 189, 248, 0.22); color: #bae6fd; }
.p2-step-pad {
  min-height: 28px; border-radius: 5px; border: 1px solid rgba(255, 255, 255, 0.14);
  background: #0d1612; cursor: pointer; padding: 0;
}
.p2-step-pad.on { background: var(--emerald); border-color: #a7f3d0; }
.p2-step-pad.playing { outline: 2px solid var(--gold); outline-offset: 1px; }
@media (max-width: 640px) {
  .p2-beat-row { grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 3px; padding: 6px; border: 1px solid var(--line); border-radius: 8px; }
  .p2-beat-label { grid-column: span 3; font-size: 10px; }
  .p2-beat-vol { grid-column: span 3; width: 100%; }
}
