/* Учебка — превью разбора дорожной сцены. Mobile-first, без внешних библиотек. */
:root {
  --bg: #f0f5f1;
  --card: #ffffff;
  --ink: #16202c;
  --muted: #4a5a6b;
  --line: #d4dce6;
  --accent: #216946;
  --accent-ink: #ffffff;
  --warn-bg: #fff6e3;
  --warn-line: #e0a93b;
  --marker: #c62828;
  --tap: 44px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  padding: 0 14px 32px;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  overflow-x: hidden;
}

h1 { font-size: 1.3rem; margin: 0 0 8px; }
h2 { font-size: 1.05rem; margin: 0 0 8px; }
p { margin: 0 0 10px; }
ul { margin: 0 0 10px; padding-left: 20px; }
li { margin-bottom: 6px; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 12px 16px;
  z-index: 10;
}
.skip-link:focus { left: 8px; }

.vt-header,
.vt-notice,
.vt-gallery,
.vt-scene,
.vt-marker-info,
.vt-questions,
.vt-links,
.vt-footer {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  margin: 14px auto;
  max-width: 720px;
}

.vt-kicker {
  text-transform: uppercase;
  letter-spacing: .04em;
  font-size: .72rem;
  color: var(--muted);
  margin: 0 0 6px;
}
.vt-lead { color: var(--muted); }
.vt-hint { font-size: .85rem; color: var(--muted); }

.vt-notice {
  background: var(--warn-bg);
  border-color: var(--warn-line);
}

/* Галерея сцен */
.vt-thumbs {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(var(--tap), 1fr));
  gap: 8px;
}
.vt-thumbs button {
  width: 100%;
  min-width: var(--tap);
  min-height: var(--tap);
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
  background: #eef2f7;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
}
.vt-thumbs button[aria-current="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

/* Сцена */
.vt-scene-status {
  display: inline-block;
  font-size: .8rem;
  color: #43350a;
  background: var(--warn-bg);
  border: 1px solid var(--warn-line);
  border-radius: 999px;
  padding: 4px 10px;
}

.vt-stage { margin: 10px 0; }

.vt-canvas {
  display: block;
  position: relative;
  width: 100%;
  min-height: 160px;
  padding: 0;
  margin: 0;
  background: #e7ecf2;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  cursor: crosshair;
  touch-action: manipulation;
}
.vt-canvas img {
  display: block;
  width: 100%;
  height: auto;
}
.vt-canvas[hidden] { display: none; }

.vt-marker {
  position: absolute;
  width: 26px;
  height: 26px;
  margin: -13px 0 0 -13px;
  border: 3px solid var(--marker);
  border-radius: 50%;
  background: rgba(198, 40, 40, .18);
  pointer-events: none;
}

.vt-fallback,
.vt-img-note {
  font-size: .85rem;
  color: var(--muted);
  margin-top: 8px;
}
.vt-help { font-size: .85rem; color: var(--muted); }
.vt-marker-state {
  font-size: .9rem;
  background: #eef2f7;
  border: 1px dashed var(--line);
  border-radius: 10px;
  padding: 10px;
}

/* Кнопки управления */
.vt-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.vt-controls button {
  flex: 1 1 100%;
  min-height: var(--tap);
  padding: 10px 14px;
  font-size: 1rem;
  color: var(--accent-ink);
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 10px;
  cursor: pointer;
}
.vt-controls button#btn-clear {
  color: var(--accent);
  background: #ffffff;
}
.vt-controls button[disabled] {
  opacity: .5;
  cursor: default;
}

/* Ссылки */
.vt-link {
  display: block;
  min-height: var(--tap);
  padding: 12px 14px;
  margin-bottom: 8px;
  text-align: center;
  text-decoration: none;
  color: var(--accent);
  background: #eef2f7;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.vt-footer { font-size: .85rem; color: var(--muted); }

:focus-visible {
  outline: 3px solid #0b3d61;
  outline-offset: 2px;
}

@media (min-width: 560px) {
  h1 { font-size: 1.55rem; }
  .vt-controls button { flex: 1 1 auto; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* Phase31: visibly block incorrect/unverified road geometries in scenes 04 and 08. */
.vt-hold{margin:16px 0;padding:15px 17px;background:#fff0dd;border:2px solid #b17625;border-radius:12px;color:#593b13;line-height:1.55;font-weight:650;}
.vt-hold[hidden]{display:none!important;}
.vt-canvas:disabled{cursor:not-allowed;}
