/* Chilliwack Road Test Routes Lab — Google Maps + Road Test Guide Hub integration */
:root {
  --route-bg: #05080d;
  --route-panel: rgba(6, 13, 22, 0.86);
  --route-panel-solid: #08111c;
  --route-panel-soft: rgba(12, 24, 36, 0.74);
  --route-line: rgba(102, 232, 255, 0.18);
  --route-line-strong: rgba(102, 232, 255, 0.42);
  --route-text: #f4fbff;
  --route-muted: #aab8c5;
  --route-faint: #748393;
  --route-cyan: #66e8ff;
  --route-cyan-strong: #8af2ff;
  --route-amber: #ffd166;
  --route-orange: #ff8f2a;
  --route-green: #76e58c;
  --route-red: #ff855f;
  --route-shadow: 0 24px 90px rgba(0, 0, 0, 0.48);
}

.page-google-route-lab {
  color: var(--route-text);
}

.page-google-route-lab button {
  font: inherit;
}

.route-lab-wrap {
  max-width: 1560px;
}

.route-lab-hub-grid {
  grid-template-columns: minmax(238px, 274px) minmax(0, 1fr);
  gap: 24px 30px;
}

.route-lab-main {
  min-width: 0;
}

.route-hub-sidebar {
  border: 1px solid rgba(102, 232, 255, 0.12);
  border-radius: 18px;
  padding: 18px;
  background:
    radial-gradient(circle at 15% 0%, rgba(102, 232, 255, 0.10), transparent 36%),
    rgba(5, 10, 18, 0.78);
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.30);
  backdrop-filter: blur(16px);
}

.route-hub-links {
  display: grid;
  gap: 8px;
  margin: 10px 0 18px;
}

.route-hub-link {
  display: grid;
  gap: 3px;
  padding: 11px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  color: rgba(255, 255, 255, 0.82);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.035);
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.route-hub-link:hover,
.route-hub-link:focus-visible,
.route-hub-link.is-active {
  border-color: rgba(102, 232, 255, 0.44);
  background: rgba(102, 232, 255, 0.10);
  transform: translateY(-1px);
  outline: none;
}

.route-hub-link span {
  color: #fff;
  font-size: 0.91rem;
  font-weight: 850;
  line-height: 1.15;
}

.route-hub-link small {
  color: rgba(196, 220, 230, 0.62);
  font-size: 0.74rem;
  line-height: 1.25;
}

.route-hub-link.is-active small {
  color: rgba(164, 246, 255, 0.84);
}

.route-hub-note,
.route-hub-sidebar .bh-sidebar-cta {
  border: 1px solid rgba(255, 209, 102, 0.16);
  border-radius: 15px;
  padding: 13px;
  background: rgba(255, 209, 102, 0.055);
}

.route-hub-note strong {
  display: block;
  margin-bottom: 6px;
  color: #fff2bf;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.route-hub-note p,
.route-hub-sidebar .bh-sidebar-cta p {
  margin: 0;
  color: rgba(255, 244, 206, 0.74);
  font-size: 0.82rem;
  line-height: 1.48;
}

.route-hub-sidebar .bh-sidebar-cta {
  margin-top: 14px;
  border-color: rgba(102, 232, 255, 0.18);
  background: rgba(102, 232, 255, 0.055);
}

.route-hub-sidebar .bh-sidebar-cta h3 {
  margin: 0 0 6px;
  color: #fff;
}

.route-hub-sidebar .bh-btn-cyan {
  margin-top: 12px;
}

.route-lab-hero-card {
  min-height: 286px;
  border-color: rgba(102, 232, 255, 0.16);
}

.route-lab-hero-content {
  max-width: min(62%, 720px);
  padding: 30px 34px 34px;
}

.route-lab-hero-content h1 {
  margin: 8px 0 12px;
  font-size: clamp(2.2rem, 4vw, 4.2rem);
  line-height: 0.96;
  letter-spacing: -0.055em;
}

.route-lab-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.route-lab-hero-cardlet {
  position: absolute;
  z-index: 2;
  right: 24px;
  bottom: 22px;
  width: min(280px, 32%);
  overflow: hidden;
  border: 1px solid rgba(102, 232, 255, 0.22);
  border-radius: 18px;
  background: rgba(4, 10, 18, 0.74);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(14px);
}

.route-lab-cardlet-row {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 10px;
  padding: 12px 14px;
  border-top: 1px solid rgba(102, 232, 255, 0.10);
}

.route-lab-cardlet-row:first-child {
  border-top: 0;
}

.route-lab-cardlet-row strong {
  color: var(--route-cyan);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.route-lab-cardlet-row span {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.82rem;
}

.route-lab-tool-shell {
  margin-bottom: 22px;
  border-color: rgba(102, 232, 255, 0.14) !important;
  background:
    radial-gradient(circle at 30% 0%, rgba(102, 232, 255, 0.08), transparent 38%),
    rgba(5, 10, 18, 0.74) !important;
}

.route-lab-tool-head {
  align-items: end;
}

.route-lab-tool-head h2 {
  margin-bottom: 6px;
}

.route-lab-kicker,
.panel-kicker,
.eyebrow {
  display: block;
  color: var(--route-cyan);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.header-actions,
.map-theme-toggle {
  display: inline-flex;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--route-line);
  border-radius: 999px;
  background: rgba(3, 8, 14, 0.72);
}

.icon-button,
.seg-button,
.street-button,
.external-link,
.photo-card,
.route-button,
.point-button {
  border: 1px solid var(--route-line);
  color: var(--route-text);
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
}

.icon-button {
  min-width: 76px;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.icon-button.is-active,
.seg-button.is-active {
  border-color: rgba(102, 232, 255, 0.62);
  background: rgba(102, 232, 255, 0.15);
  box-shadow: 0 0 22px rgba(102, 232, 255, 0.14);
}

.route-lab-topic-strip {
  margin: 12px 0 16px;
}

.route-lab-control-grid {
  display: grid;
  grid-template-columns: minmax(230px, 0.72fr) minmax(360px, 1.28fr);
  gap: 12px;
  margin-bottom: 14px;
}

.tool-control-card {
  min-width: 0;
  border: 1px solid rgba(102, 232, 255, 0.14);
  border-radius: 18px;
  padding: 14px;
  background: rgba(6, 13, 22, 0.74);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.tool-control-head {
  margin-bottom: 10px;
}

.tool-control-head p {
  margin: 5px 0 0;
  color: var(--route-muted);
  font-size: 0.82rem;
  line-height: 1.42;
}

.route-list,
.point-list,
.filter-row {
  display: grid;
  gap: 8px;
}

.route-list {
  grid-template-columns: minmax(0, 1fr);
}

.point-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-height: 164px;
  overflow: auto;
  padding-right: 4px;
}

.filter-row {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-bottom: 8px;
}

.seg-button {
  min-height: 36px;
  border-radius: 12px;
  padding: 8px 9px;
  color: var(--route-muted);
  font-size: 11px;
  font-weight: 900;
}

.route-button,
.point-button {
  width: 100%;
  border-radius: 14px;
  padding: 11px 12px;
  text-align: left;
}

.route-button strong,
.point-button strong {
  display: block;
  color: var(--route-text);
  font-size: 13px;
  line-height: 1.2;
}

.route-button span,
.point-button span {
  display: block;
  margin-top: 5px;
  color: var(--route-muted);
  font-size: 11.5px;
  line-height: 1.35;
}

.route-button.is-active,
.point-button.is-active {
  border-color: var(--route-line-strong);
  background: rgba(102, 232, 255, 0.10);
}

.map-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 380px);
  gap: 14px;
  min-height: 720px;
}

.details-panel,
.map-column {
  min-width: 0;
  border: 1px solid var(--route-line);
  background: var(--route-panel);
  box-shadow: var(--route-shadow);
  backdrop-filter: blur(18px);
}

.details-panel {
  display: grid;
  align-content: start;
  gap: 14px;
  max-height: 720px;
  overflow: auto;
  border-radius: 18px;
  padding: 16px;
}

.map-column {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
}

.map-overlay-top {
  position: absolute;
  z-index: 4;
  top: 14px;
  left: 14px;
  right: 14px;
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  pointer-events: none;
}

.guidance-card,
.camera-card {
  pointer-events: auto;
  border: 1px solid rgba(102, 232, 255, 0.24);
  background: rgba(4, 10, 18, 0.90);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(16px);
}

.guidance-card {
  display: grid;
  gap: 10px;
  width: min(560px, calc(100% - 190px));
  padding: 13px;
  border-radius: 18px;
}

.guidance-topline,
.route-playback,
.route-speed,
.route-speed__buttons,
.guidance-main,
.guidance-next,
.camera-row {
  display: flex;
  align-items: center;
}

.guidance-topline {
  justify-content: space-between;
  gap: 10px;
}

.route-playback {
  gap: 7px;
  min-width: 0;
}

.route-speed {
  justify-content: space-between;
  gap: 10px;
  padding: 8px 9px;
  border: 1px solid rgba(102, 232, 255, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
}

.route-speed__label {
  color: var(--route-muted);
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.route-speed__buttons {
  gap: 5px;
}

.route-playback button,
.route-speed button,
.camera-row button {
  border: 1px solid rgba(102, 232, 255, 0.20);
  color: var(--route-text);
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
}

.route-playback__play {
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  color: #061018 !important;
  background: linear-gradient(135deg, #a4f6ff, #66e8ff) !important;
  font-weight: 950;
}

.route-playback__play.is-preparing {
  opacity: 0.86;
}

.route-playback__reset {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  font-size: 18px;
}

.route-playback__reset:disabled {
  opacity: 0.42;
  cursor: default;
}

.route-speed button {
  min-height: 28px;
  min-width: 42px;
  border-radius: 999px;
  color: var(--route-cyan-strong);
  font-size: 10.5px;
  font-weight: 950;
}

.route-speed button.is-active {
  color: #061018;
  border-color: rgba(102, 232, 255, 0.70);
  background: linear-gradient(135deg, #a4f6ff, #66e8ff);
  box-shadow: 0 0 18px rgba(102, 232, 255, 0.16);
}

.route-playback__progress,
.guidance-step {
  color: var(--route-muted);
  font-size: 12px;
  font-weight: 900;
}

.guidance-step {
  color: var(--route-amber);
  white-space: nowrap;
}

.guidance-main {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
}

.guidance-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: var(--route-orange);
  font-size: 30px;
  line-height: 1;
  text-shadow:
    -1px -1px 0 rgba(255,255,255,0.96),
     1px -1px 0 rgba(255,255,255,0.96),
    -1px  1px 0 rgba(255,255,255,0.96),
     1px  1px 0 rgba(255,255,255,0.96),
     0 0 16px rgba(255,143,42,0.55);
}

.guidance-main strong,
.guidance-next strong {
  display: block;
  color: var(--route-text);
  font-size: 14px;
  line-height: 1.22;
}

.guidance-main span:not(.guidance-icon),
.guidance-next span {
  display: block;
  margin-top: 3px;
  color: var(--route-muted);
  font-size: 12px;
  line-height: 1.3;
}

.guidance-next {
  align-items: start;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(102, 232, 255, 0.10);
}

.guidance-next span {
  min-width: 38px;
  margin-top: 0;
  color: var(--route-cyan);
  font-weight: 900;
  text-transform: uppercase;
}

.camera-card {
  display: grid;
  gap: 7px;
  width: 176px;
  padding: 10px;
  border-radius: 16px;
}

.camera-row {
  gap: 6px;
}

.camera-row button {
  flex: 1;
  min-height: 32px;
  border-radius: 10px;
  color: var(--route-cyan-strong);
  font-size: 10.5px;
  font-weight: 950;
  text-transform: uppercase;
}

.camera-row span {
  width: 48px;
  color: var(--route-faint);
  font-size: 10.5px;
  font-weight: 900;
  text-align: right;
}

#googleRouteMap {
  width: 100%;
  height: 720px;
  background: #07111c;
}

.map-status {
  position: absolute;
  z-index: 5;
  top: 154px;
  left: 14px;
  max-width: min(420px, calc(100% - 28px));
  padding: 10px 13px;
  border: 1px solid var(--route-line);
  border-radius: 14px;
  color: var(--route-muted);
  background: rgba(3, 8, 14, 0.78);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.28);
  font-size: 12px;
  font-weight: 800;
}

.map-status.is-ready {
  display: none;
}

.map-status.is-error {
  display: grid;
  gap: 7px;
  max-width: min(520px, calc(100% - 28px));
  border-color: rgba(255, 133, 95, 0.44);
  color: #ffd2c6;
  background: rgba(24, 9, 6, 0.92);
}

.map-status.is-error strong {
  color: #fff;
  font-size: 13px;
}

.map-status.is-error span {
  color: rgba(255, 224, 215, 0.86);
  font-size: 12px;
  line-height: 1.35;
}

.google-auth-error #googleRouteMap {
  opacity: 0.22;
  filter: grayscale(1);
}

.google-auth-error .map-status {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(520px, calc(100% - 28px));
  z-index: 7;
}

.empty-details,
.details-card {
  display: grid;
  gap: 14px;
}

.empty-mark {
  display: inline-grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border: 1px solid var(--route-line-strong);
  border-radius: 16px;
  color: var(--route-cyan);
  background: rgba(102, 232, 255, 0.10);
  font-size: 12px;
  font-weight: 950;
}

.details-card h2,
.empty-details h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.05;
}

.details-card p,
.empty-details p,
.details-section li {
  margin: 0;
  color: var(--route-muted);
  font-size: 13px;
  line-height: 1.48;
}

.status-row,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.pill,
.tag {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 5px 9px;
  border: 1px solid rgba(102, 232, 255, 0.18);
  border-radius: 999px;
  color: var(--route-muted);
  background: rgba(255, 255, 255, 0.04);
  font-size: 11px;
  font-weight: 800;
}

.pill.is-tricky-intersection {
  border-color: rgba(255, 133, 95, 0.36);
  color: #ffd2c6;
}

.pill.is-sign-restriction {
  border-color: rgba(255, 209, 102, 0.42);
  color: #ffe8aa;
}

.pill.is-school-zone,
.pill.is-playground-zone {
  border-color: rgba(118, 229, 140, 0.42);
  color: #c9ffd1;
}

.pill.is-street-target {
  border-color: rgba(102, 232, 255, 0.44);
  color: #c9f8ff;
}

.details-section {
  display: grid;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid rgba(102, 232, 255, 0.10);
}

.details-section h3 {
  margin: 0;
  color: var(--route-cyan);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.details-section ul {
  margin: 0;
  padding-left: 18px;
}

.tip-box {
  border: 1px solid rgba(255, 209, 102, 0.28);
  border-radius: 14px;
  padding: 12px;
  color: #fff0bf;
  background: rgba(255, 209, 102, 0.08);
  font-size: 13px;
  line-height: 1.45;
}

.photo-grid {
  display: grid;
  gap: 9px;
}

.photo-card {
  width: 100%;
  overflow: hidden;
  padding: 0;
  border-radius: 14px;
  text-align: left;
}

.photo-card img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 8;
  object-fit: cover;
  background: #111923;
}

.photo-card span {
  display: grid;
  gap: 2px;
  padding: 9px 10px;
}

.photo-card strong {
  font-size: 12px;
}

.photo-card em {
  color: var(--route-faint);
  font-size: 10.5px;
  font-style: normal;
}

.street-view-box {
  overflow: hidden;
  border: 1px solid rgba(102, 232, 255, 0.16);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
}

.street-pano {
  height: 250px;
  background: #0a111b;
}

.street-pano p {
  display: grid;
  min-height: 250px;
  margin: 0;
  place-items: center;
  padding: 18px;
  color: var(--route-muted);
  text-align: center;
  font-size: 12px;
  line-height: 1.4;
}

.street-view-status {
  min-height: 28px;
  padding: 8px 10px;
  border-top: 1px solid rgba(102, 232, 255, 0.12);
  color: var(--route-muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.25;
}

.street-view-status.is-ready {
  color: #9df3ff;
}

.street-view-status.is-warning {
  color: #ffd166;
}

.street-view-status.is-error {
  color: #ff9f8a;
}

.street-actions {
  display: flex;
  gap: 8px;
  padding: 10px;
}

.route-mini-map {
  display: grid;
  gap: 7px;
  padding: 10px;
  border-top: 1px solid rgba(102, 232, 255, 0.12);
}

.route-mini-map svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
  border-radius: 12px;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255,255,255,0.035) 1px, transparent 1px),
    rgba(3, 9, 16, 0.88);
  background-size: 24px 24px;
}

.route-mini-map span {
  color: var(--route-muted);
  font-size: 11px;
  font-weight: 800;
}

.mini-route-glow,
.mini-route-line {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mini-route-glow {
  stroke: rgba(102, 232, 255, 0.28);
  stroke-width: 10;
}

.mini-route-line {
  stroke: #66e8ff;
  stroke-width: 4;
}

.mini-target {
  fill: #ffffff;
  stroke: #ff8f2a;
  stroke-width: 3;
}

.street-button,
.external-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  flex: 1;
  padding: 8px 10px;
  border-radius: 12px;
  color: var(--route-cyan-strong);
  text-decoration: none;
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.route-lab-support-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 22px 0;
}

.route-lab-support-card {
  border: 1px solid rgba(102, 232, 255, 0.12);
  border-radius: 18px;
  padding: 18px;
  background: rgba(6, 13, 22, 0.72);
  box-shadow: 0 18px 52px rgba(0, 0, 0, 0.24);
}

.route-lab-support-card h2 {
  margin: 0 0 8px;
  color: #fff;
  font-size: 1.12rem;
}

.route-lab-support-card p {
  margin: 0;
  color: var(--route-muted);
  line-height: 1.58;
}

.route-lab-warning-card {
  border-color: rgba(255, 209, 102, 0.18);
  background: rgba(255, 209, 102, 0.06);
}

.photo-lightbox {
  position: fixed;
  inset: 0;
  z-index: 20000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(2, 6, 12, 0.86);
  backdrop-filter: blur(12px);
}

.photo-lightbox.is-open {
  display: flex;
}

.lightbox-card {
  position: relative;
  width: min(1020px, 96vw);
  max-height: 90vh;
  overflow: hidden;
  border: 1px solid rgba(102, 232, 255, 0.24);
  border-radius: 18px;
  background: #07111c;
  box-shadow: var(--route-shadow);
}

.lightbox-card img {
  display: block;
  width: 100%;
  max-height: calc(90vh - 64px);
  object-fit: contain;
  background: #020407;
}

.lightbox-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 15px;
  color: var(--route-muted);
  font-size: 12px;
}

.lightbox-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.20);
  border-radius: 999px;
  color: #fff;
  background: rgba(4, 8, 14, 0.84);
  cursor: pointer;
  font-size: 22px;
}

.gm-style .gm-style-iw-c {
  color: #121923;
}

@media (max-width: 1280px) {
  .route-lab-hub-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .route-hub-sidebar {
    position: static;
    order: 2;
  }

  .route-lab-main {
    order: 1;
  }

  .route-hub-links {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1120px) {
  .map-workspace {
    grid-template-columns: minmax(0, 1fr);
  }

  .details-panel {
    max-height: none;
  }

  #googleRouteMap {
    height: 660px;
  }

  .street-pano {
    height: 300px;
  }

  .street-pano p {
    min-height: 300px;
  }
}

@media (max-width: 920px) {
  .route-lab-control-grid,
  .route-lab-support-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .point-list {
    grid-template-columns: minmax(0, 1fr);
    max-height: none;
  }

  .filter-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .route-lab-hero-content {
    max-width: 100%;
  }

  .route-lab-hero-cardlet {
    position: relative;
    right: auto;
    bottom: auto;
    width: auto;
    margin: 0 22px 22px;
  }

  .map-overlay-top {
    position: static;
    display: grid;
    padding: 12px;
    background: rgba(4, 10, 18, 0.92);
  }

  .guidance-card,
  .camera-card {
    width: 100%;
  }

  .camera-card {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .map-status {
    top: 14px;
  }

  #googleRouteMap {
    height: 62vh;
    min-height: 460px;
  }
}

@media (max-width: 768px) {
  .route-hub-links {
    grid-template-columns: minmax(0, 1fr);
  }

  .route-lab-tool-head {
    align-items: start;
  }
}

@media (max-width: 560px) {
  .route-lab-hero-content h1 {
    font-size: 2.35rem;
  }

  .route-lab-hero-actions,
  .street-actions {
    flex-direction: column;
  }

  .route-lab-hero-actions .btn-row {
    width: 100%;
    justify-content: center;
  }

  .header-actions,
  .map-theme-toggle,
  .filter-row {
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .header-actions,
  .map-theme-toggle {
    display: grid;
  }

  .icon-button {
    width: 100%;
  }

  .guidance-topline,
  .route-speed,
  .route-playback {
    align-items: stretch;
  }

  .guidance-topline,
  .route-speed {
    flex-direction: column;
  }

  .route-speed__buttons {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .route-speed button {
    min-width: 0;
  }

  .route-playback__play {
    flex: 1;
  }

  .route-playback__progress {
    align-self: center;
  }

  .camera-card {
    grid-template-columns: minmax(0, 1fr);
  }

  .route-lab-cardlet-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }
}

/* Map-clean pass: make the route lab open directly on the actual interactive map. */
.page-google-route-lab .route-lab-main {
  min-width: 0;
}

.page-google-route-lab .route-lab-tool-shell {
  margin-top: 0;
  padding: clamp(14px, 1.6vw, 22px) !important;
  scroll-margin-top: 92px;
}

.route-lab-compact-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin: 0 0 14px;
  padding: 0 2px 14px;
  border-bottom: 1px solid rgba(102, 232, 255, 0.12);
}

.route-lab-compact-head h1 {
  margin: 4px 0 0;
  color: #fff;
  font-size: clamp(1.85rem, 2.4vw, 2.75rem);
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.route-lab-compact-head p {
  max-width: 560px;
  margin: 0;
  color: var(--route-muted);
  font-size: 0.93rem;
  line-height: 1.48;
}

.page-google-route-lab .map-workspace {
  min-height: 760px;
}

.page-google-route-lab #googleRouteMap {
  height: 760px;
}

.page-google-route-lab .details-panel {
  max-height: 760px;
}

.map-tools-card {
  width: 184px;
}

.map-tools-card .map-theme-toggle {
  width: 100%;
  display: flex;
  gap: 5px;
  padding: 4px;
  border-radius: 13px;
}

.map-tools-card .icon-button {
  flex: 1;
  min-width: 0;
  min-height: 30px;
  padding: 0 8px;
  font-size: 10.5px;
}

.page-google-route-lab .guidance-card {
  width: min(590px, calc(100% - 202px));
}

@media (max-width: 1120px) {
  .page-google-route-lab .map-workspace {
    min-height: 0;
  }

  .page-google-route-lab #googleRouteMap {
    height: 680px;
  }

  .page-google-route-lab .details-panel {
    max-height: none;
  }
}

@media (max-width: 920px) {
  .route-lab-compact-head {
    display: grid;
    align-items: start;
  }

  .page-google-route-lab .map-tools-card {
    grid-template-columns: minmax(0, 1fr);
  }

  .page-google-route-lab .map-tools-card .map-theme-toggle {
    width: 100%;
  }

  .page-google-route-lab .guidance-card {
    width: 100%;
  }

  .page-google-route-lab #googleRouteMap {
    height: 64vh;
    min-height: 500px;
  }
}

@media (max-width: 560px) {
  .route-lab-compact-head h1 {
    font-size: 2rem;
  }

  .map-tools-card .map-theme-toggle {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Panel cleanup v4: Street View first, reference photos move into map popups. */
.details-panel-inner {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.details-section--compact {
  gap: 6px;
  padding-top: 10px;
}

.details-section--compact ul {
  display: grid;
  gap: 5px;
}

.page-google-route-lab .street-view-box {
  margin-top: 2px;
}

.page-google-route-lab .street-pano {
  min-height: 280px;
  height: 280px;
}

.page-google-route-lab .street-pano p {
  min-height: 280px;
}

.gm-style .gm-style-iw-c {
  padding: 0 !important;
  border-radius: 16px !important;
  background: rgba(8, 16, 26, 0.96) !important;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.35) !important;
}

.gm-style .gm-style-iw-d {
  overflow: auto !important;
}

.gm-style .gm-style-iw-tc::after {
  background: rgba(8, 16, 26, 0.96) !important;
}

.map-point-popup {
  width: min(260px, 70vw);
  color: #edf8ff;
  font-family: inherit;
}

.map-point-popup__photo {
  overflow: hidden;
  border-radius: 14px 14px 0 0;
  background: #0b1320;
}

.map-point-popup__photo img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.map-point-popup strong,
.map-point-popup p,
.map-point-popup span {
  display: block;
  padding-inline: 12px;
}

.map-point-popup strong {
  padding-top: 11px;
  color: #ffffff;
  font-size: 13px;
  line-height: 1.2;
}

.map-point-popup p {
  margin: 0;
  padding-top: 6px;
  color: rgba(218, 231, 242, 0.82);
  font-size: 12px;
  line-height: 1.38;
}

.map-point-popup span {
  padding-top: 8px;
  padding-bottom: 12px;
  color: #66e8ff;
  font-size: 10.5px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.035em;
}

.gm-style .gm-ui-hover-effect {
  top: 2px !important;
  right: 2px !important;
  opacity: 0.95 !important;
}

.gm-style .gm-ui-hover-effect span {
  background-color: #ffffff !important;
}

/* Ride panel v5: keep the map clean and move playback guidance into the right inspector. */
.page-google-route-lab .map-overlay-top {
  left: auto;
  right: 14px;
  width: auto;
  justify-content: flex-end;
}

.page-google-route-lab .map-tools-card {
  width: 164px;
  padding: 8px;
  border-radius: 15px;
}

.page-google-route-lab .map-tools-card .map-theme-toggle {
  padding: 4px;
}

.page-google-route-lab .map-tools-card .icon-button {
  min-height: 32px;
}

.page-google-route-lab .camera-row {
  display: none !important;
}

.ride-control-panel {
  display: grid;
  min-width: 0;
}

.page-google-route-lab .guidance-card--panel {
  width: 100% !important;
  max-width: none;
  padding: 13px;
  border-radius: 16px;
  background: rgba(4, 10, 18, 0.78);
  box-shadow: none;
}

.page-google-route-lab .guidance-card--panel .guidance-topline {
  align-items: flex-start;
  gap: 8px;
}

.page-google-route-lab .guidance-card--panel .route-playback {
  flex: 1 1 auto;
  flex-wrap: wrap;
}

.page-google-route-lab .guidance-card--panel .route-playback__play {
  flex: 1 1 auto;
  min-width: 124px;
}

.page-google-route-lab .guidance-card--panel .route-playback__progress {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
}

.page-google-route-lab .guidance-card--panel .route-speed {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  gap: 8px;
}

.page-google-route-lab .guidance-card--panel .route-speed__label {
  white-space: normal;
}

.page-google-route-lab .guidance-card--panel .route-speed__buttons {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.page-google-route-lab .guidance-card--panel .route-speed button {
  min-width: 0;
}

.page-google-route-lab .guidance-card--panel .guidance-main {
  grid-template-columns: 34px minmax(0, 1fr);
}

.page-google-route-lab .guidance-card--panel .guidance-icon {
  width: 34px;
  height: 34px;
  font-size: 27px;
}

.page-google-route-lab .guidance-card--panel .guidance-main strong,
.page-google-route-lab .guidance-card--panel .guidance-next strong {
  font-size: 13px;
}

.page-google-route-lab .guidance-card--panel .guidance-main span:not(.guidance-icon),
.page-google-route-lab .guidance-card--panel .guidance-next span {
  font-size: 11.5px;
}

.page-google-route-lab .details-panel {
  gap: 14px;
}

.page-google-route-lab .details-panel-inner {
  padding-top: 2px;
  border-top: 1px solid rgba(102, 232, 255, 0.10);
}

.page-google-route-lab .ride-card h2 {
  font-size: 21px;
}

@media (max-width: 920px) {
  .page-google-route-lab .map-overlay-top {
    position: absolute;
    top: 12px;
    right: 12px;
    left: auto;
    display: flex;
    padding: 0;
    background: transparent;
  }

  .page-google-route-lab .map-tools-card {
    width: min(170px, calc(100vw - 56px));
  }
}

@media (max-width: 560px) {
  .page-google-route-lab .guidance-card--panel .guidance-topline,
  .page-google-route-lab .guidance-card--panel .route-speed {
    display: grid;
  }

  .page-google-route-lab .guidance-card--panel .route-playback {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 38px auto;
  }
}

/* Layout fix v6: compact right inspector, stable map themes, no dead camera controls. */
.page-google-route-lab .map-workspace {
  --route-tool-height: clamp(650px, 72vh, 760px);
  min-height: var(--route-tool-height);
  align-items: stretch;
}

.page-google-route-lab .map-column,
.page-google-route-lab #googleRouteMap,
.page-google-route-lab .details-panel {
  height: var(--route-tool-height);
  max-height: var(--route-tool-height);
}

.page-google-route-lab .details-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
  padding: 14px;
}

.page-google-route-lab .ride-control-panel {
  flex: 0 0 auto;
}

.page-google-route-lab .details-panel-inner {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding-top: 10px;
  scrollbar-width: thin;
  scrollbar-color: rgba(102, 232, 255, 0.42) rgba(255, 255, 255, 0.06);
}

.page-google-route-lab .details-panel-inner::-webkit-scrollbar {
  width: 8px;
}

.page-google-route-lab .details-panel-inner::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 999px;
}

.page-google-route-lab .details-panel-inner::-webkit-scrollbar-thumb {
  background: rgba(102, 232, 255, 0.34);
  border-radius: 999px;
}

.page-google-route-lab .details-card,
.page-google-route-lab .empty-details {
  gap: 10px;
}

.page-google-route-lab .details-card h2,
.page-google-route-lab .empty-details h2 {
  font-size: 20px;
  line-height: 1.08;
  letter-spacing: -0.025em;
}

.page-google-route-lab .details-card p,
.page-google-route-lab .empty-details p,
.page-google-route-lab .details-section li {
  font-size: 12px;
  line-height: 1.42;
}

.page-google-route-lab .status-row {
  display: none;
}

.attention-block {
  display: grid;
  gap: 7px;
  padding: 10px;
  border: 1px solid rgba(102, 232, 255, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
}

.attention-block h3,
.compact-notes h3 {
  margin: 0;
  color: var(--route-cyan);
  font-size: 10.5px;
  font-weight: 950;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.attention-block .tag-row {
  gap: 6px;
}

.attention-block .tag {
  min-height: 23px;
  padding: 4px 8px;
  font-size: 10.5px;
}

.page-google-route-lab .details-section {
  gap: 6px;
  padding-top: 9px;
}

.page-google-route-lab .details-section h3 {
  font-size: 10.5px;
}

.page-google-route-lab .street-view-box {
  border-radius: 14px;
}

.page-google-route-lab .street-pano {
  height: 235px;
}

.page-google-route-lab .street-pano p {
  min-height: 235px;
}

.page-google-route-lab .street-view-status {
  min-height: 24px;
  padding: 6px 9px;
  font-size: 10.5px;
}

.page-google-route-lab .street-actions {
  padding: 8px;
}

.compact-notes {
  border: 1px solid rgba(102, 232, 255, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
  overflow: hidden;
}

.compact-notes summary {
  cursor: pointer;
  padding: 10px 11px;
  color: #d9f8ff;
  font-size: 12px;
  font-weight: 900;
  list-style: none;
}

.compact-notes summary::-webkit-details-marker {
  display: none;
}

.compact-notes summary::after {
  content: '+';
  float: right;
  color: var(--route-cyan);
  font-weight: 950;
}

.compact-notes[open] summary::after {
  content: '–';
}

.compact-notes__body {
  display: grid;
  gap: 10px;
  padding: 0 11px 11px;
}

.compact-notes__body p,
.compact-notes__body li {
  color: var(--route-muted);
  font-size: 12px;
  line-height: 1.42;
}

.compact-notes__body ul {
  margin: 4px 0 0;
  padding-left: 16px;
}

.tip-box--compact {
  padding: 10px;
  font-size: 12px;
}

.page-google-route-lab .guidance-card--panel {
  gap: 9px;
  padding: 11px;
}

.page-google-route-lab .guidance-card--panel .route-playback__play,
.page-google-route-lab .guidance-card--panel .route-playback__reset {
  min-height: 34px;
}

.page-google-route-lab .guidance-card--panel .route-playback__reset {
  width: 34px;
  height: 34px;
}

.page-google-route-lab .guidance-card--panel .route-playback__progress {
  min-height: 34px;
}

.page-google-route-lab .guidance-card--panel .route-speed {
  padding: 7px 8px;
}

.page-google-route-lab .guidance-card--panel .route-speed button {
  min-height: 26px;
}

.page-google-route-lab .guidance-card--panel .guidance-next {
  padding-top: 7px;
}

@media (max-width: 1120px) {
  .page-google-route-lab .map-workspace {
    --route-tool-height: auto;
    min-height: 0;
  }

  .page-google-route-lab .map-column,
  .page-google-route-lab #googleRouteMap,
  .page-google-route-lab .details-panel {
    height: auto;
    max-height: none;
  }

  .page-google-route-lab #googleRouteMap {
    height: 680px;
  }

  .page-google-route-lab .details-panel,
  .page-google-route-lab .details-panel-inner {
    overflow: visible;
  }
}

/* Geometry fix v7: make the route tool height intentional and stop clipping Google controls. */
.page-google-route-lab .route-lab-tool-shell {
  padding: clamp(14px, 1.45vw, 18px) !important;
}

.page-google-route-lab .map-workspace {
  --route-tool-height: clamp(660px, 70vh, 740px);
  height: var(--route-tool-height);
  min-height: 0;
  align-items: stretch;
}

.page-google-route-lab .map-column,
.page-google-route-lab .details-panel {
  box-sizing: border-box;
  height: 100%;
  max-height: none;
}

.page-google-route-lab .map-column {
  display: flex;
  padding: 10px;
  overflow: visible;
  border-radius: 22px;
}

.page-google-route-lab #googleRouteMap {
  flex: 1 1 auto;
  width: 100%;
  height: 100%;
  min-height: 0;
  border-radius: 18px;
  overflow: hidden;
}

.page-google-route-lab .map-overlay-top {
  top: 20px;
  right: 20px;
}

.page-google-route-lab .map-status {
  top: 92px;
  left: 24px;
}

.page-google-route-lab .details-panel {
  overflow: hidden;
}

.page-google-route-lab .details-panel-inner {
  min-height: 0;
}

/* Move Google native controls away from the rounded/card edges when possible. */
.page-google-route-lab .map-column .gm-bundled-control,
.page-google-route-lab .map-column .gmnoprint.gm-bundled-control {
  margin-right: 8px !important;
  margin-bottom: 12px !important;
}

.page-google-route-lab .map-column .gm-fullscreen-control {
  margin-top: 8px !important;
  margin-right: 8px !important;
}

@media (max-width: 1120px) {
  .page-google-route-lab .map-workspace {
    height: auto;
    min-height: 0;
  }

  .page-google-route-lab .map-column,
  .page-google-route-lab .details-panel {
    height: auto;
    max-height: none;
  }

  .page-google-route-lab .map-column {
    min-height: 680px;
  }

  .page-google-route-lab #googleRouteMap {
    height: auto;
    min-height: 660px;
  }

  .page-google-route-lab .details-panel,
  .page-google-route-lab .details-panel-inner {
    overflow: visible;
  }
}

@media (max-width: 920px) {
  .page-google-route-lab .map-column {
    min-height: min(680px, 72vh);
  }

  .page-google-route-lab #googleRouteMap {
    min-height: min(640px, 68vh);
  }
}

/* Merge-pass v8: make the map workspace feel like one integrated tool, not a card inside a card. */
.page-google-route-lab .route-lab-tool-shell {
  padding: 0 !important;
  overflow: hidden;
}

.page-google-route-lab .route-lab-compact-head {
  margin: 0;
  padding: clamp(16px, 1.8vw, 22px) clamp(18px, 2vw, 26px) clamp(14px, 1.5vw, 18px);
  border-bottom: 1px solid rgba(102, 232, 255, 0.14);
}

.page-google-route-lab .map-workspace {
  --route-tool-height: clamp(680px, 72vh, 780px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(330px, 390px);
  gap: 0;
  height: var(--route-tool-height);
  min-height: 0;
  margin: 0;
  align-items: stretch;
  border-top: 0;
}

.page-google-route-lab .map-column,
.page-google-route-lab .details-panel {
  height: 100%;
  max-height: none;
  box-shadow: none;
}

.page-google-route-lab .map-column {
  display: flex;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  overflow: hidden;
}

.page-google-route-lab #googleRouteMap {
  flex: 1 1 auto;
  width: 100%;
  height: 100%;
  min-height: 0;
  border-radius: 0;
  overflow: hidden;
}

.page-google-route-lab .details-panel {
  border-width: 0 0 0 1px;
  border-color: rgba(102, 232, 255, 0.16);
  border-radius: 0;
  background:
    linear-gradient(180deg, rgba(9, 17, 29, 0.92), rgba(4, 9, 16, 0.90));
  padding: 14px;
}

.page-google-route-lab .map-overlay-top {
  top: 18px;
  right: 18px;
}

.page-google-route-lab .map-status {
  top: 82px;
  left: 18px;
}

.page-google-route-lab .ride-control-panel {
  margin: 0;
}

.page-google-route-lab .details-panel-inner {
  padding-top: 9px;
}

/* With the map flush to the tool edges, keep Google UI away from the seam/edges where possible. */
.page-google-route-lab .map-column .gm-bundled-control,
.page-google-route-lab .map-column .gmnoprint.gm-bundled-control {
  margin-right: 10px !important;
  margin-bottom: 10px !important;
}

.page-google-route-lab .map-column .gm-fullscreen-control {
  margin-top: 10px !important;
  margin-right: 10px !important;
}

@media (max-width: 1120px) {
  .page-google-route-lab .route-lab-tool-shell {
    overflow: visible;
  }

  .page-google-route-lab .map-workspace {
    grid-template-columns: minmax(0, 1fr);
    height: auto;
  }

  .page-google-route-lab .map-column {
    min-height: min(700px, 72vh);
    border-radius: 0;
  }

  .page-google-route-lab #googleRouteMap {
    height: auto;
    min-height: min(680px, 70vh);
  }

  .page-google-route-lab .details-panel {
    height: auto;
    border-width: 1px 0 0;
  }
}

@media (max-width: 920px) {
  .page-google-route-lab .route-lab-compact-head {
    padding: 16px;
  }

  .page-google-route-lab .map-column {
    min-height: min(640px, 70vh);
  }

  .page-google-route-lab #googleRouteMap {
    min-height: min(620px, 68vh);
  }
}

/* Edge-fit v9: make the map and ride panel sit directly inside the parent shell with no top/bottom dead air. */
.page-google-route-lab .route-lab-tool-shell {
  display: grid;
  grid-template-rows: auto minmax(0, auto);
  padding: 0 !important;
  overflow: hidden;
}

.page-google-route-lab .route-lab-compact-head {
  padding: clamp(14px, 1.55vw, 20px) clamp(18px, 2vw, 26px) clamp(12px, 1.25vw, 16px);
}

.page-google-route-lab .map-workspace {
  --route-tool-height: clamp(640px, 68vh, 740px);
  height: var(--route-tool-height);
  min-height: 0;
  margin: 0;
  padding: 0;
  align-items: stretch;
  background: transparent;
  overflow: hidden;
}

.page-google-route-lab .map-column {
  position: relative;
  display: block;
  height: 100%;
  min-height: 0;
  padding: 0;
  margin: 0;
  border: 0;
  border-right: 1px solid rgba(102, 232, 255, 0.12);
  border-radius: 0;
  background: transparent;
  overflow: hidden;
}

.page-google-route-lab #googleRouteMap {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  border-radius: 0;
  overflow: hidden;
}

.page-google-route-lab .details-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  max-height: none;
  padding: 12px 14px;
  margin: 0;
  border-width: 0;
  border-left: 1px solid rgba(102, 232, 255, 0.16);
  border-radius: 0;
  overflow: hidden;
}

.page-google-route-lab .ride-control-panel {
  flex: 0 0 auto;
  margin: 0 0 10px;
}

.page-google-route-lab .details-panel-inner {
  flex: 1 1 auto;
  min-height: 0;
  padding-top: 0;
  overflow-y: auto;
  overflow-x: hidden;
}

.page-google-route-lab .details-panel-inner::-webkit-scrollbar {
  width: 7px;
}

.page-google-route-lab .details-panel-inner::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 999px;
}

.page-google-route-lab .details-panel-inner::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(102, 232, 255, 0.78), rgba(102, 232, 255, 0.24));
  border-radius: 999px;
}

.page-google-route-lab .details-panel-inner {
  scrollbar-color: rgba(102, 232, 255, 0.58) rgba(255, 255, 255, 0.04);
  scrollbar-width: thin;
}

.page-google-route-lab .map-overlay-top {
  top: 18px;
  right: 18px;
}

.page-google-route-lab .map-status {
  top: 76px;
  left: 18px;
}

/* Let the CTA start after the tool instead of visually colliding with an empty bottom band. */
.page-google-route-lab .row-cta-band {
  margin-top: 28px;
}

@media (max-width: 1120px) {
  .page-google-route-lab .route-lab-tool-shell {
    overflow: visible;
  }

  .page-google-route-lab .map-workspace {
    height: auto;
    overflow: visible;
  }

  .page-google-route-lab .map-column {
    height: min(690px, 72vh);
    min-height: 560px;
    border-right: 0;
    border-bottom: 1px solid rgba(102, 232, 255, 0.14);
  }

  .page-google-route-lab #googleRouteMap {
    height: 100%;
  }

  .page-google-route-lab .details-panel {
    height: auto;
    min-height: 0;
    border-left: 0;
    border-top: 1px solid rgba(102, 232, 255, 0.14);
    overflow: visible;
  }

  .page-google-route-lab .details-panel-inner {
    overflow: visible;
  }
}

@media (max-width: 560px) {
  .page-google-route-lab .map-column {
    height: 62vh;
    min-height: 480px;
  }
}


/* Map-stretch v10: remove the bottom CTA from this page and give that vertical space to the map tool. */
.page-google-route-lab .map-workspace {
  --route-tool-height: clamp(760px, 78vh, 900px);
}

.page-google-route-lab .route-lab-main {
  gap: 0;
}

.page-google-route-lab .route-lab-tool-shell {
  margin-bottom: 0;
}

@media (max-width: 1120px) {
  .page-google-route-lab .map-column {
    height: min(760px, 76vh);
    min-height: 600px;
  }
}

@media (max-width: 560px) {
  .page-google-route-lab .map-column {
    height: 66vh;
    min-height: 500px;
  }
}

/* Training modes v11: add route/tasks/traps without turning the map into a control panel. */
.page-google-route-lab .training-mode-panel {
  display: grid;
  gap: 8px;
  flex: 0 0 auto;
  padding: 10px;
  border: 1px solid rgba(102, 232, 255, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.035);
}

.page-google-route-lab .training-mode-panel__head {
  display: grid;
  gap: 3px;
}

.page-google-route-lab .training-mode-panel__head span {
  color: var(--route-cyan);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.page-google-route-lab .training-mode-panel__head small {
  color: rgba(231, 241, 249, 0.68);
  font-size: 11px;
  line-height: 1.35;
}

.page-google-route-lab .training-mode-buttons {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.page-google-route-lab .training-mode-buttons button {
  min-width: 0;
  min-height: 30px;
  border: 1px solid rgba(102, 232, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(231, 241, 249, 0.86);
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
}

.page-google-route-lab .training-mode-buttons button.is-active {
  border-color: rgba(102, 232, 255, 0.72);
  background: rgba(102, 232, 255, 0.9);
  color: #061018;
  box-shadow: 0 0 22px rgba(102, 232, 255, 0.18);
}

.page-google-route-lab .details-card--task {
  gap: 10px;
}

.page-google-route-lab .task-type-pill {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 10px;
  border: 1px solid rgba(255, 179, 71, 0.45);
  border-radius: 999px;
  background: rgba(255, 179, 71, 0.12);
  color: #ffd49a;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.page-google-route-lab .examiner-prompt {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid rgba(255, 179, 71, 0.18);
  border-radius: 14px;
  background: rgba(255, 179, 71, 0.08);
}

.page-google-route-lab .examiner-prompt span,
.page-google-route-lab .details-section--task-list h3 {
  color: var(--route-cyan);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.page-google-route-lab .examiner-prompt strong {
  color: #fff;
  font-size: 12.5px;
  line-height: 1.35;
}

.page-google-route-lab .details-section--task-list {
  gap: 8px;
  padding-top: 2px;
}

.page-google-route-lab .task-checklist {
  display: grid;
  gap: 6px;
}

.page-google-route-lab .task-checklist label {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: start;
  gap: 8px;
  color: rgba(231, 241, 249, 0.84);
  font-size: 11.5px;
  line-height: 1.35;
}

.page-google-route-lab .task-checklist label span {
  width: 15px;
  height: 15px;
  margin-top: 1px;
  border: 1px solid rgba(102, 232, 255, 0.46);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.035);
  box-shadow: inset 0 0 0 2px rgba(5, 10, 18, 0.7);
}

.page-google-route-lab .task-checklist label strong {
  color: inherit;
  font-size: inherit;
  font-weight: 760;
}

.page-google-route-lab .map-task-popup strong {
  color: #ffd49a;
}

@media (max-width: 1120px) {
  .page-google-route-lab .training-mode-panel {
    order: -2;
  }
}

/* Task anchors v12: compact right-panel anchors + lower guide placeholders. */
.page-google-route-lab .task-anchor-block {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(102, 232, 255, 0.14);
  border-radius: 14px;
  background: rgba(102, 232, 255, 0.055);
}

.page-google-route-lab .task-anchor-block h3 {
  margin: 0;
  color: var(--route-cyan);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.page-google-route-lab .task-anchor-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.page-google-route-lab .task-anchor-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 27px;
  padding: 5px 8px;
  border: 1px solid rgba(102, 232, 255, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  color: rgba(231, 241, 249, 0.9);
  font-size: 10.5px;
  font-weight: 850;
  line-height: 1;
  text-decoration: none;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.page-google-route-lab .task-anchor-chip:hover,
.page-google-route-lab .task-anchor-chip:focus-visible {
  border-color: rgba(102, 232, 255, 0.72);
  background: rgba(102, 232, 255, 0.13);
  transform: translateY(-1px);
  outline: none;
}

.page-google-route-lab .task-anchor-chip em {
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: rgba(102, 232, 255, 0.88);
  color: #061018;
  font-size: 10px;
  font-style: normal;
  font-weight: 950;
}

.page-google-route-lab .road-test-task-guide {
  display: grid;
  gap: 18px;
  margin-top: 22px;
  padding: clamp(18px, 2vw, 24px);
  border: 1px solid rgba(102, 232, 255, 0.12);
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(7, 17, 28, 0.86), rgba(5, 10, 18, 0.66));
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.22);
}

.page-google-route-lab .task-guide-head {
  display: grid;
  gap: 8px;
  max-width: 820px;
}

.page-google-route-lab .task-guide-head h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(1.25rem, 2.2vw, 1.85rem);
  line-height: 1.12;
}

.page-google-route-lab .task-guide-head p,
.page-google-route-lab .task-guide-card p {
  margin: 0;
  color: rgba(231, 241, 249, 0.72);
  font-size: 0.92rem;
  line-height: 1.55;
}

.page-google-route-lab .task-guide-section {
  display: grid;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid rgba(102, 232, 255, 0.10);
}

.page-google-route-lab .task-guide-section__head {
  display: grid;
  gap: 4px;
}

.page-google-route-lab .task-guide-section__head span {
  color: var(--route-cyan);
  font-size: 0.74rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.page-google-route-lab .task-guide-section__head h3 {
  margin: 0;
  color: #fff;
  font-size: 1.12rem;
}

.page-google-route-lab .task-guide-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.page-google-route-lab .task-guide-grid--compact {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.page-google-route-lab .task-guide-card {
  scroll-margin-top: 96px;
  display: grid;
  gap: 7px;
  min-height: 116px;
  padding: 13px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
}

.page-google-route-lab .task-guide-card:target {
  border-color: rgba(102, 232, 255, 0.74);
  box-shadow: 0 0 0 1px rgba(102, 232, 255, 0.28), 0 0 32px rgba(102, 232, 255, 0.12);
}

.page-google-route-lab .task-guide-card h4 {
  margin: 0;
  color: #fff;
  font-size: 0.98rem;
  line-height: 1.25;
}

@media (max-width: 980px) {
  .page-google-route-lab .task-guide-grid,
  .page-google-route-lab .task-guide-grid--compact {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .page-google-route-lab .road-test-task-guide {
    border-radius: 18px;
    padding: 16px;
  }

  .page-google-route-lab .task-guide-card {
    min-height: 0;
  }
}

/* Route Lab city selector */
.page-google-route-lab .route-lab-compact-head {
  flex-wrap: wrap;
  align-items: center;
}

.page-google-route-lab .route-lab-compact-head > p {
  flex: 1 1 100%;
  max-width: 900px;
}

.page-google-route-lab .route-lab-city-switch {
  margin-left: auto;
}

@media (max-width: 760px) {
  .page-google-route-lab .route-lab-compact-head {
    align-items: stretch;
  }

  .page-google-route-lab .route-lab-city-switch {
    width: 100%;
    margin-left: 0;
  }
}
