:root {
  --bg-deep: #070b11;
  --bg-panel: rgba(13, 19, 29, 0.88);
  --bg-card: rgba(20, 29, 43, 0.78);
  --border: rgba(148, 163, 184, 0.16);
  --border-strong: rgba(56, 189, 248, 0.35);
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --gold: #f59e0b;
  --gold-soft: rgba(245, 158, 11, 0.16);
  --cyan: #38bdf8;
  --cyan-soft: rgba(56, 189, 248, 0.14);
  --green: #10b981;
  --wa-green: #25d366;
  --red: #f87171;
  --radius: 14px;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: radial-gradient(circle at 50% 0%, #111c2d 0%, var(--bg-deep) 60%);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  scroll-behavior: smooth;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* Media and embeds never exceed their container */
img,
video,
iframe,
embed,
object,
svg,
canvas {
  max-width: 100%;
}

img,
video {
  height: auto;
}

.mono {
  font-family: 'JetBrains Mono', monospace;
}

.accent-gold {
  color: var(--gold);
}

.accent-wa {
  color: var(--wa-green);
}

/* Topbar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 24px;
  background: rgba(7, 11, 17, 0.88);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  position: relative;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
}

.brand-ring {
  position: absolute;
  inset: 0;
  border-radius: 11px;
  border: 2px solid var(--gold);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(56, 189, 248, 0.12));
  box-shadow: 0 0 18px rgba(245, 158, 11, 0.25);
}

.brand-core {
  position: relative;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  color: #fff;
}

.brand-title {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.06em;
}

.brand-sub {
  font-size: 0.74rem;
  color: var(--text-muted);
}

/* On desktop the menu wrapper is transparent to layout; it only becomes a dropdown on small screens */
.topbar-menu {
  display: contents;
}

.menu-toggle {
  display: none;
}

.topbar-nav {
  display: flex;
  gap: 8px;
  background: rgba(15, 23, 36, 0.9);
  padding: 4px;
  border-radius: 999px;
  border: 1px solid var(--border);
}

.nav-chip {
  border: none;
  background: transparent;
  color: var(--text-muted);
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.nav-chip:hover {
  color: var(--text);
}

.nav-chip.active {
  background: linear-gradient(135deg, var(--cyan), #0284c7);
  color: #04111f;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.35);
}

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

.guarantee-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fde68a;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(245, 158, 11, 0.42);
}

.guarantee-shield {
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--gold);
  color: #090d14;
  font-size: 0.68rem;
  font-weight: 800;
}

.status-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.76rem;
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.dot-live {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
}

.btn-primary-sm {
  text-decoration: none;
  background: linear-gradient(135deg, var(--wa-green), #16a34a);
  color: #04180c;
  font-weight: 700;
  font-size: 0.82rem;
  padding: 9px 16px;
  border-radius: 10px;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.btn-primary-sm:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.32);
}

/* Studio Layout */
.studio-layout {
  display: grid;
  grid-template-columns: 340px 1fr 345px;
  gap: 14px;
  padding: 14px 18px;
  min-height: calc(100vh - 67px);
}

.studio-layout > *,
.booking-container > *,
.form-grid > * {
  min-width: 0;
}

.panel {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  backdrop-filter: blur(14px);
  max-height: calc(100vh - 95px);
  overflow-y: auto;
}

.panel::-webkit-scrollbar {
  width: 6px;
}
.panel::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.25);
  border-radius: 999px;
}

.panel-header-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.panel-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.eyebrow {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--cyan);
  margin-bottom: 4px;
}

.panel-title-row h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.08rem;
  margin: 0;
  line-height: 1.25;
}

.mbg-tag {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: #fde68a;
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(245, 158, 11, 0.38);
  padding: 4px 8px;
  border-radius: 999px;
  white-space: nowrap;
}

.select-full {
  width: 100%;
  background: #0f1726;
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  padding: 9px 10px;
  font-size: 0.8rem;
  font-weight: 500;
}

/* Simulation Card */
.sim-card {
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.08), rgba(15, 23, 38, 0.9));
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sim-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
}

.clean-range {
  width: 100%;
  accent-color: var(--gold);
  cursor: pointer;
}

.sim-actions {
  display: flex;
  gap: 8px;
}

.btn-glow {
  flex: 1;
  border: none;
  border-radius: 9px;
  padding: 9px 12px;
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
  background: linear-gradient(135deg, var(--gold), #ea580c);
  color: #090d14;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.28);
  transition: filter 0.2s;
}

.btn-glow:hover {
  filter: brightness(1.08);
}

.btn-ghost {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-muted);
  border-radius: 9px;
  padding: 9px 12px;
  font-size: 0.78rem;
  cursor: pointer;
}

.btn-ghost:hover {
  color: var(--text);
  border-color: var(--text-muted);
}

/* Telemetry Grid */
.telemetry-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.tele-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tele-label {
  font-size: 0.68rem;
  color: var(--text-muted);
}

.tele-value {
  font-size: 0.96rem;
  font-weight: 700;
}

.tele-sub {
  font-size: 0.67rem;
}

.tele-sub.bad {
  color: var(--red);
}

.tele-sub.good {
  color: var(--green);
}

.section-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.link-btn {
  border: none;
  background: transparent;
  color: var(--cyan);
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
}

/* Component List */
.component-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.comp-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 11px;
  border-radius: 11px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.18s ease;
}

.comp-item:hover {
  border-color: rgba(56, 189, 248, 0.45);
  transform: translateX(2px);
}

.comp-item.active {
  border-color: var(--cyan);
  background: linear-gradient(90deg, rgba(56, 189, 248, 0.14), rgba(20, 29, 43, 0.9));
  box-shadow: 0 0 18px rgba(56, 189, 248, 0.12);
}

.comp-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.comp-num {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: rgba(56, 189, 248, 0.14);
  color: var(--cyan);
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 0.76rem;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.comp-name {
  font-size: 0.83rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.comp-zone {
  font-size: 0.69rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.comp-check-hit {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
}

.comp-check {
  width: 18px;
  height: 18px;
  accent-color: var(--gold);
  cursor: pointer;
  flex-shrink: 0;
}

/* Center 3D Viewport */
.viewport-stage {
  position: relative;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: radial-gradient(circle at 50% 45%, #122036 0%, #070b11 85%);
  overflow: hidden;
  min-height: 540px;
  height: calc(100vh - 95px);
}

#fortuner-canvas {
  width: 100%;
  height: 100%;
  display: block;
  cursor: grab;
}

#fortuner-canvas:active {
  cursor: grabbing;
}

.hotspot-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.hotspot-pin {
  position: absolute;
  transform: translate(-50%, -50%);
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px 4px 5px;
  border-radius: 999px;
  background: rgba(8, 14, 24, 0.86);
  border: 1px solid rgba(56, 189, 248, 0.55);
  color: #f8fafc;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.hotspot-pin:hover,
.hotspot-pin.active {
  transform: translate(-50%, -50%) scale(1.08);
  border-color: var(--gold);
  background: rgba(245, 158, 11, 0.22);
}

.hotspot-badge {
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: var(--cyan);
  color: #04111f;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 0.7rem;
  display: grid;
  place-items: center;
}

.hotspot-pin.active .hotspot-badge {
  background: var(--gold);
}

.hover-tooltip {
  position: absolute;
  pointer-events: none;
  z-index: 20;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(8, 13, 22, 0.94);
  border: 1px solid var(--gold);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.hidden {
  display: none !important;
}

.stage-overlay-top {
  position: absolute;
  top: 14px;
  left: 14px;
  right: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  pointer-events: none;
}

.stage-badge,
.rpm-control {
  pointer-events: auto;
  background: rgba(8, 13, 22, 0.78);
  border: 1px solid var(--border);
  backdrop-filter: blur(10px);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 0.76rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan);
}

.rpm-control input {
  width: 110px;
  accent-color: var(--cyan);
}

.stage-overlay-bottom {
  position: absolute;
  bottom: 14px;
  left: 14px;
  right: 14px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px;
  pointer-events: none;
}

.cam-pill {
  pointer-events: auto;
  border: 1px solid var(--border);
  background: rgba(8, 13, 22, 0.84);
  color: var(--text-muted);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: all 0.16s ease;
}

.cam-pill:hover {
  color: #fff;
  border-color: var(--cyan);
}

.cam-pill.active {
  background: rgba(245, 158, 11, 0.2);
  border-color: var(--gold);
  color: #fde68a;
}

.webgl-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
  padding: 24px;
  background: rgba(7, 11, 17, 0.92);
}

/* Right Column Inspector */
.inspector-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.insp-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.insp-head h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.08rem;
  margin: 2px 0 4px;
}

.insp-duration {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 0.78rem;
  color: var(--cyan);
  background: var(--cyan-soft);
  border: 1px solid rgba(56, 189, 248, 0.35);
  padding: 5px 9px;
  border-radius: 8px;
  white-space: nowrap;
}

.insp-summary {
  font-size: 0.82rem;
  line-height: 1.5;
  color: #cbd5e1;
  margin: 0;
}

.method-box {
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.28);
  border-radius: 10px;
  padding: 10px 12px;
}

.method-box span {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--cyan);
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}

.method-box p {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.45;
}

.compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.compare-card {
  border-radius: 10px;
  padding: 10px;
  border: 1px solid var(--border);
  font-size: 0.76rem;
}

.compare-card.before {
  background: rgba(248, 113, 113, 0.07);
  border-color: rgba(248, 113, 113, 0.24);
}

.compare-card.after {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.28);
}

.compare-title {
  font-weight: 700;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}

.compare-card.before .compare-title {
  color: var(--red);
}

.compare-card.after .compare-title {
  color: var(--green);
}

.compare-kv {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.compare-kv div {
  display: flex;
  flex-direction: column;
}

.compare-kv span {
  color: var(--text-muted);
  font-size: 0.67rem;
}

.symptoms-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
}

.symptoms-box h4 {
  margin: 0 0 6px;
  font-size: 0.76rem;
  color: var(--text-muted);
}

.symptoms-box ul {
  margin: 0;
  padding-left: 16px;
  font-size: 0.77rem;
  line-height: 1.48;
  color: #cbd5e1;
}

/* Package Summary */
.package-summary {
  margin-top: auto;
  background: linear-gradient(180deg, rgba(20, 30, 46, 0.95), rgba(10, 15, 24, 0.98));
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  padding: 13px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.package-summary-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.package-summary-head h3 {
  margin: 0;
  font-size: 0.9rem;
  font-family: 'Space Grotesk', sans-serif;
}

.discount-pill {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #090d14;
  background: var(--gold);
  padding: 4px 8px;
  border-radius: 999px;
  white-space: nowrap;
}

.package-stats.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 9px 0;
}

.package-stats div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.package-stats span {
  font-size: 0.67rem;
  color: var(--text-muted);
}

.package-stats strong {
  font-size: 0.85rem;
}

.btn-primary-full {
  display: block;
  text-align: center;
  text-decoration: none;
  background: linear-gradient(135deg, var(--wa-green), #16a34a);
  color: #04180c;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 11px 14px;
  border-radius: 10px;
}

.btn-wa-outline {
  display: block;
  text-align: center;
  text-decoration: none;
  background: rgba(37, 211, 102, 0.1);
  border: 1px solid rgba(37, 211, 102, 0.4);
  color: #86efac;
  font-weight: 600;
  font-size: 0.8rem;
  padding: 9px 12px;
  border-radius: 10px;
}

.btn-wa-outline:hover {
  background: rgba(37, 211, 102, 0.18);
}

/* Booking Section */
.booking-section {
  padding: 48px 24px 64px;
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(10, 16, 26, 0.9), #06090e);
}

.booking-container {
  max-width: 1260px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 28px;
  align-items: start;
}

.booking-info h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.8rem;
  margin: 6px 0 12px;
}

.lead {
  color: #cbd5e1;
  line-height: 1.65;
  margin-bottom: 18px;
}

.mbg-banner {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.14), rgba(16, 185, 129, 0.08));
  border: 1px solid rgba(245, 158, 11, 0.45);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 18px;
}

.mbg-badge-lg {
  display: inline-block;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #090d14;
  background: var(--gold);
  padding: 4px 10px;
  border-radius: 6px;
  margin-bottom: 8px;
}

.mbg-banner p {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.5;
  color: #fef3c7;
}

.guarantee-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.g-card {
  display: flex;
  gap: 14px;
  padding: 14px;
  border-radius: 12px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
}

.g-num {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  color: var(--gold);
  font-size: 1.1rem;
}

.g-card h4 {
  margin: 0 0 4px;
  font-size: 0.95rem;
}

.g-card p {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.recent-bookings-box {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
}

.recent-head {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.recent-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.recent-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border-radius: 9px;
  background: var(--bg-card);
  font-size: 0.78rem;
}

.booking-form {
  background: var(--bg-panel);
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-head-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.booking-form h3 {
  margin: 0;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.25rem;
}

.form-sub {
  margin: 4px 0 0;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label {
  font-size: 0.76rem;
  color: var(--text-muted);
  font-weight: 600;
}

.field input,
.field select {
  background: #0b121e;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 9px;
  padding: 10px 12px;
  font-size: 0.86rem;
}

.field input:focus,
.field select:focus {
  outline: none;
  border-color: var(--cyan);
}

.form-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.form-pill {
  padding: 6px 11px;
  border-radius: 999px;
  font-size: 0.75rem;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-muted);
  cursor: pointer;
}

.form-pill.selected {
  background: var(--gold-soft);
  border-color: var(--gold);
  color: #fde68a;
  font-weight: 600;
}

.form-total-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.form-total-bar span {
  display: block;
  font-size: 0.74rem;
  color: var(--text-muted);
}

.form-total-bar strong {
  font-size: 1.15rem;
  font-family: 'Space Grotesk', sans-serif;
}

.btn-wa-submit {
  border: none;
  border-radius: 10px;
  padding: 12px 20px;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  background: linear-gradient(135deg, var(--wa-green), #16a34a);
  color: #04180c;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.28);
}

.booking-feedback {
  padding: 13px 14px;
  border-radius: 10px;
  font-size: 0.83rem;
  line-height: 1.5;
}

.booking-feedback.success {
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #a7f3d0;
}

.booking-feedback.error {
  background: rgba(248, 113, 113, 0.14);
  border: 1px solid rgba(248, 113, 113, 0.4);
  color: #fecaca;
}

.wa-inline-cta {
  display: inline-block;
  margin-top: 9px;
  text-decoration: none;
  background: var(--wa-green);
  color: #04180c;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 8px;
}

.footer {
  text-align: center;
  padding: 18px;
  font-size: 0.76rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}

/* Responsive */
@media (max-width: 1180px) {
  .studio-layout {
    grid-template-columns: 1fr;
    height: auto;
  }
  .panel {
    max-height: none;
  }
  .viewport-stage {
    height: 520px;
    order: -1;
  }
  .booking-container {
    grid-template-columns: 1fr;
  }
}

/* Tablets & phones: collapse the top navigation into a menu */
@media (max-width: 1024px) {
  .topbar {
    flex-wrap: nowrap;
    padding: 10px 16px;
  }

  .brand {
    min-width: 0;
  }

  .brand > div:last-child {
    min-width: 0;
  }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 11px;
    border: 1px solid var(--border-strong);
    background: rgba(15, 23, 36, 0.9);
    color: var(--text);
    cursor: pointer;
  }

  .menu-toggle-bars,
  .menu-toggle-bars::before,
  .menu-toggle-bars::after {
    display: block;
    width: 20px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    transition: transform 0.2s ease, background 0.2s ease;
  }

  .menu-toggle-bars {
    position: relative;
  }

  .menu-toggle-bars::before,
  .menu-toggle-bars::after {
    content: '';
    position: absolute;
    left: 0;
  }

  .menu-toggle-bars::before {
    top: -6px;
  }

  .menu-toggle-bars::after {
    top: 6px;
  }

  .menu-toggle.open .menu-toggle-bars {
    background: transparent;
  }

  .menu-toggle.open .menu-toggle-bars::before {
    transform: translateY(6px) rotate(45deg);
  }

  .menu-toggle.open .menu-toggle-bars::after {
    transform: translateY(-6px) rotate(-45deg);
  }

  .topbar-menu {
    display: none;
  }

  .topbar-menu.open {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 14px 16px 18px;
    max-height: calc(100vh - 64px);
    max-height: calc(100dvh - 64px);
    overflow-y: auto;
    background: rgba(7, 11, 17, 0.97);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
  }

  .topbar-menu .topbar-nav {
    flex-direction: column;
    gap: 6px;
    padding: 6px;
    border-radius: 14px;
  }

  .topbar-menu .nav-chip {
    min-height: 44px;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 1rem;
    text-align: left;
  }

  .topbar-menu .topbar-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .topbar-menu .guarantee-pill,
  .topbar-menu .status-pill {
    display: flex;
    justify-content: center;
    min-height: 44px;
    font-size: 0.9rem;
  }

  .topbar-menu .btn-primary-sm {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    font-size: 1rem;
  }
}

/* Larger touch area for the 3D hotspot pins on touch screens (invisible) */
@media (max-width: 1024px), (pointer: coarse) {
  .hotspot-pin::after {
    content: '';
    position: absolute;
    inset: -9px -4px;
    border-radius: 999px;
  }
}

/* Phones */
@media (max-width: 720px) {
  body {
    font-size: 16px;
    line-height: 1.5;
    overflow-x: hidden;
    overflow-x: clip;
  }

  .topbar {
    padding: 8px 12px;
    gap: 10px;
  }

  .brand {
    gap: 10px;
  }

  .brand-title {
    font-size: 1rem;
    letter-spacing: 0.04em;
  }

  .brand-sub {
    font-size: 0.78rem;
    line-height: 1.3;
  }

  /* Studio */
  .studio-layout {
    gap: 12px;
    padding: 10px;
    min-height: 0;
  }

  .panel {
    padding: 14px;
    gap: 16px;
    backdrop-filter: none;
  }

  .eyebrow {
    font-size: 0.75rem;
  }

  .panel-title-row,
  .package-summary-head,
  .form-head-row,
  .insp-head,
  .sim-card-top {
    flex-wrap: wrap;
  }

  .panel-title-row h1 {
    font-size: 1.35rem;
  }

  .mbg-tag,
  .discount-pill {
    font-size: 0.75rem;
  }

  .select-full,
  .field input,
  .field select {
    width: 100%;
    min-height: 44px;
    font-size: 1rem;
  }

  .sim-card {
    padding: 14px;
  }

  .sim-card-top {
    font-size: 1rem;
    gap: 4px 10px;
  }

  input[type='range'] {
    min-height: 44px;
  }

  .btn-glow,
  .btn-ghost {
    min-height: 44px;
    min-width: 44px;
    font-size: 1rem;
  }

  .tele-box {
    padding: 10px 12px;
  }

  .tele-label,
  .tele-sub {
    font-size: 0.8rem;
  }

  .tele-value {
    font-size: 1.1rem;
  }

  .section-label-row {
    font-size: 0.8rem;
    gap: 8px;
  }

  .link-btn {
    min-height: 44px;
    padding: 0 10px;
    margin-right: -10px;
    font-size: 1rem;
  }

  .comp-item {
    min-height: 60px;
    padding: 8px 4px 8px 12px;
  }

  .comp-item:hover {
    transform: none;
  }

  .comp-num {
    width: 28px;
    height: 28px;
    font-size: 0.85rem;
  }

  .comp-name {
    font-size: 1rem;
  }

  .comp-zone {
    font-size: 0.85rem;
  }

  .comp-check-hit {
    width: 44px;
    height: 44px;
  }

  .comp-check {
    width: 22px;
    height: 22px;
  }

  /* 3D viewport */
  .viewport-stage {
    min-height: 0;
    height: clamp(380px, 68vh, 520px);
    height: clamp(380px, 68svh, 520px);
  }

  .stage-overlay-top {
    top: 10px;
    left: 10px;
    right: 10px;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .stage-badge {
    border-radius: 12px;
    padding: 7px 12px;
    font-size: 0.8rem;
    line-height: 1.35;
  }

  .rpm-control {
    border-radius: 12px;
    padding: 0 12px;
    min-height: 44px;
    font-size: 0.875rem;
    justify-content: space-between;
  }

  .rpm-control label {
    white-space: nowrap;
  }

  .rpm-control input {
    flex: 1;
    min-width: 0;
    width: auto;
    max-width: 180px;
  }

  /* Camera shortcuts become a horizontally swipeable strip inside the viewport */
  .stage-overlay-bottom {
    bottom: 10px;
    left: 0;
    right: 0;
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    padding: 0 10px;
    pointer-events: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
  }

  .stage-overlay-bottom::-webkit-scrollbar {
    display: none;
  }

  .cam-pill {
    flex-shrink: 0;
    min-height: 44px;
    padding: 8px 14px;
    font-size: 0.9rem;
    white-space: nowrap;
  }

  .hotspot-pin {
    font-size: 0.8rem;
  }

  .hover-tooltip {
    font-size: 0.875rem;
  }

  /* Inspector */
  .insp-head h2 {
    font-size: 1.25rem;
  }

  .insp-duration {
    font-size: 0.875rem;
  }

  .insp-summary,
  .method-box p,
  .symptoms-box ul {
    font-size: 1rem;
    line-height: 1.55;
  }

  .method-box span {
    font-size: 0.75rem;
  }

  .symptoms-box h4 {
    font-size: 0.9rem;
  }

  .compare-card {
    font-size: 0.9rem;
    overflow-wrap: anywhere;
  }

  .compare-title {
    font-size: 0.75rem;
  }

  .compare-kv span {
    font-size: 0.75rem;
  }

  .package-summary-head h3 {
    font-size: 1.1rem;
  }

  .package-stats span {
    font-size: 0.8rem;
  }

  .package-stats strong {
    font-size: 1rem;
  }

  .btn-primary-full,
  .btn-wa-outline,
  .wa-inline-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 48px;
    font-size: 1rem;
  }

  /* Booking section */
  .booking-section {
    padding: 32px 12px 48px;
  }

  .booking-info h2 {
    font-size: 1.5rem;
    line-height: 1.3;
  }

  .lead,
  .mbg-banner p,
  .g-card p,
  .form-sub,
  .booking-feedback {
    font-size: 1rem;
    line-height: 1.6;
  }

  .g-card {
    gap: 12px;
  }

  .g-card h4 {
    font-size: 1.05rem;
  }

  .recent-head {
    font-size: 0.95rem;
    gap: 10px;
  }

  .recent-item {
    flex-wrap: wrap;
    font-size: 0.95rem;
  }

  .recent-item > div {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .recent-item [style*='font-size'] {
    font-size: 0.85rem !important;
  }

  .booking-form {
    padding: 16px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .field label {
    font-size: 0.9rem;
  }

  .form-pill {
    min-height: 44px;
    padding: 8px 14px;
    font-size: 1rem;
  }

  .form-total-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .form-total-bar span {
    font-size: 0.875rem;
  }

  .btn-wa-submit {
    width: 100%;
    min-height: 48px;
    font-size: 1rem;
  }

  .footer {
    padding: 18px 14px;
    font-size: 0.875rem;
    line-height: 1.5;
    overflow-wrap: anywhere;
  }

  /* Embeds fill the column and keep a video-friendly shape */
  iframe,
  embed,
  object {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
  }
}
