body { --accent: var(--green); }

.trail-page {
  width: min(98vw, 900px);
  max-width: 900px;
  height: min(82dvh, 720px);
  max-height: 82dvh;
}

#trail-board {
  position: relative;
  width: 100%;
  flex: 1;
  min-height: 420px;
  border: 1px solid var(--border-bright);
  border-radius: 10px;
  background: var(--surface);
  overflow: hidden;
}

#trail-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

#trail-lines line { stroke: var(--green); stroke-width: 0.45; opacity: 0.75; }

.trail-target {
  position: absolute;
  z-index: 2;
  width: clamp(34px, 5.2vw, 46px);
  height: clamp(34px, 5.2vw, 46px);
  max-width: none;
  margin: 0;
  padding: 0;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  border: 2px solid var(--text-dim);
  border-radius: 50%;
  background: #0f0f0f;
  color: var(--text);
  font: 600 14px/1 var(--font-mono);
  touch-action: manipulation;
}

.trail-target:hover, .trail-target:focus-visible { border-color: var(--green); outline: none; }
.trail-target.complete { border-color: var(--green); background: rgba(94, 201, 122, 0.18); color: var(--green); }
.trail-target.error { border-color: var(--red); color: var(--red); animation: trail-error 260ms ease; }

@keyframes trail-error { 50% { transform: translate(-50%, -50%) scale(1.18); } }

.trail-instruction { color: var(--text-dim); font-size: 12px; text-align: center; }

@media (max-height: 700px) {
  #trail-board { min-height: 330px; }
  .trail-page { height: 86dvh; max-height: 86dvh; }
}
