:root {
  --accent: #ff5a00;
  --ink: #2b2f33;
  --muted: #6b7076;
  --surface: rgba(255, 255, 255, 0.94);
  --line: rgba(0, 0, 0, 0.08);
  --shadow: 0 4px 18px rgba(0, 0, 0, 0.18);
}

html {
  height: 100%;
}

body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  background: #fff;
  font-family: Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
}

/* ---------- COMPACT TOOLBAR ---------- */
.toolbar {
  position: fixed;
  left: 50%;
  bottom: calc(14px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
  background: var(--surface);
  border-radius: 999px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* Taps stay taps: no double-tap zoom of the page (iOS). The 3D view, dial and slider
   handle their own gestures with touch-action: none. */
* {
  touch-action: manipulation;
}

.toolbar .sep {
  width: 1px;
  height: 22px;
  background: var(--line);
  margin: 0 2px;
}

.tb {
  position: relative;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  display: grid;
  place-items: center;
  cursor: pointer;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.tb:hover {
  background: rgba(0, 0, 0, 0.05);
}

.tb.on,
.tb[aria-expanded="true"] {
  background: var(--accent);
  color: #fff;
}

.tb:focus-visible,
.chip:focus-visible,
.eye:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.tb[hidden],
.chip[hidden] {
  display: none;
}

svg.i {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.badge {
  position: absolute;
  top: -3px;
  right: -5px;
  min-width: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-size: 10px;
  line-height: 16px;
  font-weight: 600;
  text-align: center;
  pointer-events: none;
}

.badge:empty {
  display: none;
}

.chip {
  height: 32px;
  padding: 0 10px;
  border: 0;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.06);
  color: var(--ink);
  font: 600 12px/32px Roboto, "Helvetica Neue", Arial, sans-serif;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}

/* ---------- LAYERS SHEET ---------- */
.sheet {
  position: fixed;
  left: 50%;
  bottom: calc(70px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 20;
  width: min(260px, calc(100vw - 32px));
  padding: 6px 10px;
  background: var(--surface);
  border-radius: 14px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.sheet[hidden] {
  display: none;
}

/* Tall menus scroll inside the screen instead of running off the top. */
.sheet {
  max-height: calc(100vh - 100px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  overflow-y: auto;
  overscroll-behavior: contain;
}

.layer {
  display: grid;
  grid-template-columns: 20px 1fr 32px;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
}

.layer + .layer {
  border-top: 1px solid var(--line);
}

.layer[hidden] {
  display: none;
}

.layer > svg.i {
  width: 18px;
  height: 18px;
  color: var(--muted);
}

.layer .name {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--ink);
}

.layer .name output {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.layer input[type="range"] {
  width: 100%;
  margin: 2px 0 0;
  accent-color: var(--accent);
}

.layer.off .name,
.layer.off input[type="range"] {
  opacity: 0.4;
}

.eye {
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.eye svg.i {
  width: 18px;
  height: 18px;
}

.eye .off-icon,
.layer.off .eye .on-icon {
  display: none;
}

.layer.off .eye .off-icon {
  display: block;
}

/* Overlay files (one row each), their CAD / KML layers and the labels row */
#file-layers:empty {
  display: none;
}
#file-layers {
  border-top: 1px solid var(--line);
}
.file-layer .fl-kind {
  font-size: 8px;
  font-weight: 800;
  text-align: center;
  color: var(--muted);
}
.file-layer .fl-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 150px;
}
.fl-subs {
  margin: 0 0 4px 28px;
  font-size: 11px;
  color: var(--muted);
}
.fl-subs summary {
  cursor: pointer;
  padding: 2px 0;
}
.fl-sub {
  display: grid;
  grid-template-columns: 16px 10px 1fr;
  align-items: center;
  gap: 6px;
  padding: 2px 0;
  color: var(--ink);
}
.fl-sub i {
  width: 10px;
  height: 10px;
  border-radius: 3px;
}
.fl-sub span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* Compact file cards (layers sheet) */
#layers-sheet {
  width: min(320px, calc(100vw - 24px));
}
.fl-file,
.fl-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 4px 6px 6px 8px;
  margin: 5px 0;
  background: rgba(0, 0, 0, 0.02);
}
.fl-head {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
}
.fl-head .eye {
  margin-left: auto;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
}
.fl-title {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--ink);
  overflow-wrap: anywhere;  /* full file names, wrapped */
}
.fl-kind {
  flex: 0 0 auto;
  min-width: 30px;
  padding: 2px 4px;
  border-radius: 5px;
  font-size: 9px;
  font-weight: 800;
  text-align: center;
  color: #fff;
  background: #7a8590;
}
.fl-kind.k-glb { background: #1e88e5; }
.fl-kind.k-kml { background: #2e9d5b; }
.fl-kind.k-cad { background: #e07b00; }
.fl-kind.k-txt { background: #3b4148; }
.fl-tag {
  margin-left: 6px;
  padding: 0 4px;
  border-radius: 4px;
  background: rgba(255, 90, 0, 0.12);
}
.fl-op {
  display: grid;
  grid-template-columns: 1fr 34px;
  align-items: center;
  gap: 6px;
}
.fl-op input[type="range"],
.fl-mini input[type="range"] {
  width: 100%;
  margin: 0;
  accent-color: var(--accent);
}
.fl-op output,
.fl-mini output {
  font-size: 10px;
  color: var(--muted);
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.fl-grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.fl-mini {
  display: block;
  font-size: 10px;
  color: var(--muted);
}
.fl-mini span {
  display: flex;
  justify-content: space-between;
}
.fl-off .fl-title,
.fl-off .fl-op,
.fl-off .fl-grid2 {
  opacity: 0.4;
}
.fl-off .eye .on-icon {
  display: none;
}
.fl-off .eye .off-icon {
  display: block;
}
.fl-file .fl-subs {
  margin: 4px 0 0;
}
.fl-sublist {
  max-height: 220px;
  overflow-y: auto;
}
.fl-sub span {
  overflow-wrap: anywhere;
  white-space: normal;
}
.fl-ontop {
  display: flex;
  justify-content: flex-end;
  margin: 2px 0 6px;
}
.fl-dists {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
}
.fl-dist-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}
.fl-dist-row input {
  width: 64px;
  margin-left: auto;
  font: inherit;
  padding: 2px 4px;
}
.fl-seg {
  display: flex;
  gap: 4px;
  margin: 6px 0;
}
.fl-seg button,
.fl-chip {
  flex: 1;
  min-height: 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}
.fl-seg button:active,
.fl-chip.on {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.fl-chip {
  flex: 0 0 auto;
  min-height: 22px;
  padding: 0 8px;
}
.fl-chip:disabled {
  opacity: 0.4;
}
.fl-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 2px 8px 8px;
  margin: 6px 0;
}
.fl-card.off .fl-slider {
  opacity: 0.4;
}
.fl-card .name {
  align-items: center;
}
.fl-slider {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}
.fl-slider span {
  display: flex;
  justify-content: space-between;
}
.fl-slider input[type="range"] {
  width: 100%;
  margin: 2px 0 0;
  accent-color: var(--accent);
}
.fl-tag {
  font-style: normal;
  font-size: 9px;
  font-weight: 700;
  color: var(--accent);
}
.fl-filter {
  width: 100%;
  box-sizing: border-box;
  margin: 0 0 4px;
  padding: 4px 6px;
  font: inherit;
  font-size: 12px;
}
.fl-sub[hidden] {
  display: none;
}
.fl-sub {
  grid-template-columns: 16px 10px 1fr auto;
}
.fl-sub small {
  color: var(--muted);
  font-size: 10px;
}
.fl-subs > .fl-sub {
  max-width: 100%;
}
.fl-subs[open] {
  max-height: 320px;
  overflow-y: auto;
}

/* ---------- STATUS / HINT ---------- */
.hint {
  position: fixed;
  left: 50%;
  top: calc(14px + env(safe-area-inset-top));
  transform: translateX(-50%);
  z-index: 20;
  max-width: calc(100vw - 32px);
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(32, 33, 36, 0.78);
  color: #fff;
  font-size: 12px;
  line-height: 1.4;
  text-align: center;
  pointer-events: none;
  transition: opacity 0.3s;
}

.place-label {
  position: fixed;
  left: 50%;
  top: calc(50% + 44px);
  transform: translateX(-50%);
  z-index: 20;
  max-width: calc(100vw - 48px);
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(32, 33, 36, 0.72);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  pointer-events: none;
}

.place-label[hidden] {
  display: none;
}

.hint:empty,
.hint.fade {
  opacity: 0;
}

.hint.warn {
  background: rgba(176, 0, 32, 0.85);
}

/* ---------- MENUS (AR mode chooser, scale presets) ---------- */
.menu {
  padding: 4px;
}

.option {
  display: grid;
  grid-template-columns: 20px 1fr;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.option[hidden] {
  display: none;
}

.option:hover,
.option:focus-visible {
  background: rgba(0, 0, 0, 0.05);
  outline: none;
}

.option b {
  display: block;
  font-size: 13px;
}

.option small {
  display: block;
  font-size: 11px;
  color: var(--muted);
}

.scale-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  width: min(232px, calc(100vw - 32px));
  padding: 6px;
}

.scale-grid[hidden] {
  display: none;
}

.scale-grid button {
  height: 32px;
  border: 0;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.05);
  color: var(--ink);
  font: 600 12px Roboto, "Helvetica Neue", Arial, sans-serif;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}

.scale-grid button.on {
  background: var(--accent);
  color: #fff;
}

.layer > div {
  min-width: 0;
}

/* ---------- VERTICAL HEIGHT SLIDER ---------- */
.vslider {
  position: fixed;
  right: calc(14px + env(safe-area-inset-right));
  /* 20 px above the toolbar (14 px margin + 48 px toolbar) */
  bottom: calc(82px + env(safe-area-inset-bottom));
  z-index: 20;
  width: 36px;
  height: min(16vh, 128px);
  touch-action: none;
  cursor: ns-resize;
}

.vslider[hidden] {
  display: none;
}

.vslider .vtrack {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 6px;
  margin-left: -3px;
  border-radius: 3px;
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.vslider .vfill {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--accent);
}

.vslider .vthumb {
  position: absolute;
  left: 50%;
  width: 22px;
  height: 22px;
  margin: -11px 0 0 -11px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--accent);
  box-sizing: border-box;
  box-shadow: var(--shadow);
}

.vslider .vthumb output {
  position: absolute;
  right: 28px;
  top: 50%;
  transform: translateY(-50%);
  padding: 2px 8px;
  border-radius: 10px;
  background: rgba(32, 33, 36, 0.78);
  color: #fff;
  font: 600 11px/16px Roboto, "Helvetica Neue", Arial, sans-serif;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.vslider:focus-visible .vthumb {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ---------- INTRO: WELCOME + TOUR ---------- */
.intro {
  position: fixed;
  inset: 0;
  z-index: 1001;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(18, 20, 24, 0.5);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.intro[hidden] {
  display: none;
}

.intro.open {
  opacity: 1;
}

.intro-card {
  width: min(360px, 100%);
  max-height: calc(100vh - 32px);
  overflow: auto;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  color: var(--ink);
  transform: translateY(16px) scale(0.97);
  transition: transform 0.3s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}

.intro.open .intro-card {
  transform: none;
}

.intro-hero {
  position: relative;
  height: 156px;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: linear-gradient(140deg, #ff9a3c 0%, var(--accent) 50%, #c23400 100%);
}

.intro-orb {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.45), rgba(255, 255, 255, 0) 70%);
  animation: intro-drift 9s ease-in-out infinite alternate;
}

.intro-orb.o1 { width: 180px; height: 180px; left: -50px; top: -70px; }
.intro-orb.o2 { width: 120px; height: 120px; right: -30px; bottom: -40px; animation-delay: -3s; }
.intro-orb.o3 { width: 60px; height: 60px; right: 70px; top: 18px; animation-delay: -6s; }

@keyframes intro-drift {
  to { transform: translate(14px, 10px) scale(1.08); }
}

.intro-badge {
  position: relative;
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  border-radius: 26px;
  background: #fff;
  color: var(--accent);
  box-shadow: 0 10px 28px rgba(120, 30, 0, 0.35);
  animation: intro-float 4s ease-in-out infinite;
}

.intro-badge svg.i {
  width: 40px;
  height: 40px;
  stroke-width: 1.8;
}

.intro-badge.logo {
  width: auto;
  height: 64px;
  padding: 0 18px;
  border-radius: 18px;
}

.intro-badge.logo {
  margin-top: 18px;  /* clear of the Skip button */
  gap: 14px;
  grid-auto-flow: column;
  height: 72px;
}

.intro-badge.logo img {
  display: block;
  height: 32px;
  width: auto;
}

.intro-badge.logo img + i + img {
  height: 52px;  /* this logo has more white space around it */
}

.intro-badge.logo i {
  width: 1px;
  height: 40px;
  background: rgba(0, 0, 0, 0.12);
}

/* Animated gesture demos: a small phone with fingers */
.intro-badge.demo {
  width: 74px;
  height: 118px;
  border-radius: 16px;
  padding: 6px;
}

.demo-phone {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 11px;
  background: linear-gradient(180deg, #dfe8f2, #f6f2ec);
}

.demo-site {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 34px;
  height: 22px;
  margin: -11px 0 0 -17px;
  border-radius: 6px;
  background: linear-gradient(140deg, #ff9a3c, var(--accent));
  animation: demo-site 4s ease-in-out infinite;
}

.demo-dot {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 18px;
  height: 18px;
  margin: -9px 0 0 -9px;
  border-radius: 50%;
  background: rgba(30, 34, 40, 0.38);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.7);
  opacity: 0;
}

.demo-dot.d1 { animation: demo-d1 4s ease-in-out infinite; }
.demo-dot.d2 { animation: demo-d2 4s ease-in-out infinite; }

@keyframes demo-site {
  0% { transform: translateX(-12px); }
  45% { transform: translateX(12px) scale(1); }
  50% { transform: translateX(12px) scale(1); }
  90% { transform: translateX(12px) scale(1.5); }
  100% { transform: translateX(-12px); }
}

@keyframes demo-d1 {
  0% { transform: translate(-12px, 14px); opacity: 0; }
  6% { opacity: 1; }
  45% { transform: translate(12px, 14px); opacity: 1; }
  48% { opacity: 0; }
  50% { transform: translate(-6px, -6px); opacity: 0; }
  54% { opacity: 1; }
  90% { transform: translate(-18px, -20px); opacity: 1; }
  96%, 100% { opacity: 0; }
}

@keyframes demo-d2 {
  0%, 50% { transform: translate(6px, 6px); opacity: 0; }
  54% { opacity: 1; }
  90% { transform: translate(18px, 20px); opacity: 1; }
  96%, 100% { opacity: 0; }
}

.demo-ring {
  position: absolute;
  left: 50%;
  top: 64%;
  width: 34px;
  height: 14px;
  margin: -7px 0 0 -17px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  animation: demo-ring 3.2s ease-in-out infinite;
}

.demo-model {
  position: absolute;
  left: 50%;
  top: 64%;
  width: 26px;
  height: 20px;
  margin: -18px 0 0 -13px;
  border-radius: 5px;
  background: linear-gradient(140deg, #ff9a3c, var(--accent));
  transform-origin: 50% 100%;
  animation: demo-model 3.2s ease-out infinite;
}

.demo-dot.tap {
  top: 64%;
  animation: demo-tap 3.2s ease-in-out infinite;
}

@keyframes demo-ring {
  0%, 35% { opacity: 1; transform: scale(1); }
  20% { transform: scale(1.12); }
  45%, 100% { opacity: 0; }
}

@keyframes demo-model {
  0%, 38% { opacity: 0; transform: scale(0.2); }
  48% { opacity: 1; transform: scale(1.1); }
  55%, 92% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; }
}

@keyframes demo-tap {
  0%, 15% { opacity: 0; transform: translateY(18px) scale(1.2); }
  25% { opacity: 1; transform: translateY(0) scale(1.2); }
  33% { transform: scale(0.8); }
  40% { opacity: 1; transform: scale(1); }
  50%, 100% { opacity: 0; transform: translateY(18px); }
}

/* Spotlight on the real button (tour steps about a button) */
.intro.spot {
  background: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.intro-spot {
  position: fixed;
  z-index: 0;
  box-shadow: 0 0 0 200vmax rgba(10, 14, 22, 0.62);
  cursor: pointer;
  transition: left 0.35s ease, top 0.35s ease, width 0.35s ease, height 0.35s ease;
}

.intro-spot::after {
  content: "";
  position: absolute;
  inset: -4px;
  border: 3px solid var(--accent);
  border-radius: inherit;
  animation: intro-pulse 1.4s ease-out infinite;
}

.intro-spot[hidden] {
  display: none;
}

@keyframes intro-pulse {
  0% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.45); }
}

.intro.spot .intro-card {
  position: fixed;
  z-index: 1;
  width: min(330px, calc(100% - 24px));
  overflow: visible;
  transition: left 0.35s ease, top 0.35s ease, transform 0.3s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}

.intro.spot .intro-hero {
  height: 92px;
  border-radius: 24px 24px 0 0;
}

.intro.spot .intro-badge {
  transform: scale(0.72);
  animation: none;
}

.intro.spot .intro-body {
  min-height: 0;
  padding-top: 14px;
}

.intro-arrow {
  display: none;
  position: absolute;
  bottom: -8px;
  width: 18px;
  height: 18px;
  margin-left: -9px;
  background: #fff;
  transform: rotate(45deg);
  border-radius: 3px;
}

.intro.spot .intro-arrow {
  display: block;
}

.intro.spot .intro-card.below .intro-arrow {
  top: -8px;
  bottom: auto;
  background: #ff9a3c;
}

.intro-tap {
  margin: 10px 0 0;
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
}

.intro-tap[hidden] {
  display: none;
}

@keyframes intro-float {
  50% { transform: translateY(-5px); }
}

.intro-skip {
  position: absolute;
  z-index: 2;
  top: 12px;
  right: 12px;
  height: 30px;
  padding: 0 12px;
  border: 0;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
  font: 600 12px Roboto, "Helvetica Neue", Arial, sans-serif;
  letter-spacing: 0.02em;
  cursor: pointer;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.intro-skip:hover {
  background: rgba(255, 255, 255, 0.34);
}

.intro-body {
  padding: 20px 22px 4px;
  min-height: 150px;
}

.intro-body.swap {
  animation: intro-in 0.32s ease both;
}

@keyframes intro-in {
  from { opacity: 0; transform: translateX(12px); }
}

.intro-step {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.intro-step:empty {
  display: none;
}

.intro-body h2 {
  margin: 0 0 8px;
  font-size: 20px;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.intro-text {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.intro-lang {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.04);
}

.intro-lang[hidden] {
  display: none;
}

.intro-lang-label {
  font-size: 13px;
  font-weight: 600;
}

.intro-foot {
  padding: 14px 22px 20px;
}

.intro-progress {
  display: flex;
  gap: 5px;
  margin-bottom: 14px;
}

.intro-progress span {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: rgba(0, 0, 0, 0.1);
  transition: background 0.3s;
}

.intro-progress span.on {
  background: var(--accent);
}

.intro-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.intro-actions .btn.primary {
  min-width: 120px;
  box-shadow: 0 4px 14px rgba(255, 90, 0, 0.35);
}

.lang-switch {
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.07);
}

.lang-btn {
  height: 30px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font: 600 12px Roboto, "Helvetica Neue", Arial, sans-serif;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.lang-select {
  height: 34px;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font: 600 13px Roboto, "Helvetica Neue", Arial, sans-serif;
  cursor: pointer;
}

.lang-select option {
  background: #fff;
  color: #222;
}

.lang-select:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.lang-btn[aria-pressed="true"] {
  background: var(--accent);
  color: #fff;
}

.btn {
  height: 40px;
  padding: 0 18px;
  border: 0;
  border-radius: 20px;
  font: 600 14px Roboto, "Helvetica Neue", Arial, sans-serif;
  cursor: pointer;
}

.btn[hidden] {
  display: none;
}

.btn.primary {
  background: var(--accent);
  color: #fff;
}

.btn.ghost {
  background: rgba(0, 0, 0, 0.06);
  color: var(--ink);
}

.btn:focus-visible,
.lang-btn:focus-visible,
.intro-skip:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .intro, .intro-card { transition: none; }
  .intro-orb, .intro-badge, .intro-body.swap, .intro-spot::after,
  .demo-site, .demo-dot, .demo-ring, .demo-model { animation: none; }
  .demo-dot.d1, .demo-model { opacity: 1; }
}

/* ---------- AR CALL TO ACTION ---------- */
.ar-cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  margin-left: 2px;
  padding: 0 16px 0 12px;
  border: 0;
  border-radius: 20px;
  background: linear-gradient(135deg, #ff8a2b 0%, var(--accent) 55%, #e63e00 100%);
  color: #fff;
  font: 800 15px/1 Roboto, "Helvetica Neue", Arial, sans-serif;
  letter-spacing: 0.04em;
  box-shadow: 0 2px 10px rgba(255, 90, 0, 0.45);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.ar-cta[hidden] {
  display: none;
}

.ar-cta svg.i {
  width: 20px;
  height: 20px;
}

.ar-cta::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 23px;
  border: 2px solid rgba(255, 90, 0, 0.55);
  animation: ar-pulse 2.4s ease-out infinite;
  pointer-events: none;
}

@keyframes ar-pulse {
  0% { opacity: 0.9; transform: scale(1); }
  70%, 100% { opacity: 0; transform: scale(1.18); }
}

@media (prefers-reduced-motion: reduce) {
  .ar-cta::after { animation: none; opacity: 0; }
}

.ar-cta:active {
  transform: scale(0.97);
}

.ar-cta:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

/* ---------- TRACKED AR DETAIL PICKER ---------- */
.menu-title {
  margin: 4px 10px 2px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
}

.ql-setting {
  margin: 2px 10px 8px;
}

.ql-setting[hidden] {
  display: none;
}

.ql-setting .menu-title {
  display: flex;
  justify-content: space-between;
  margin: 0 0 4px;
}

.ql-setting output {
  color: var(--muted);
  font-weight: 400;
}

.ql-setting input[type="range"] {
  width: 100%;
  margin: 0;
  accent-color: var(--accent);
}

.seg {
  display: flex;
  gap: 4px;
}

.seg button {
  flex: 1;
  min-height: 30px;
  padding: 4px 6px;
  line-height: 1.2;
  border: 0;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.06);
  color: var(--ink);
  font: 600 11px Roboto, "Helvetica Neue", Arial, sans-serif;
  cursor: pointer;
}

.seg button.on {
  background: var(--accent);
  color: #fff;
}

.menu-note {
  margin: 2px 10px 6px;
  font-size: 11px;
  line-height: 1.4;
  color: var(--muted);
}
