.vp-game {
  display: grid;
  gap: 12px;
}

.vp-head {
  display: grid;
  gap: 10px;
}

.vp-levels {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.vp-level-tab {
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: #344054;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  padding: 8px;
  font-weight: 850;
  cursor: pointer;
  touch-action: manipulation;
}

.vp-level-tab span {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #eef2f6;
  color: #475467;
  font-size: 13px;
}

.vp-level-tab strong {
  min-width: 0;
  font-size: 14px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.vp-level-tab.vp-is-active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: #0f766e;
}

.vp-level-tab.vp-is-done span {
  background: #0f766e;
  color: #fff;
}

.vp-progress {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  color: #344054;
}

.vp-progress strong {
  color: var(--ink);
  overflow-wrap: anywhere;
  text-align: right;
}

.vp-prompt {
  margin: 0;
  color: #344054;
  font-size: 16px;
}

.vp-stage {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
  padding: 12px;
  display: grid;
  gap: 12px;
  overflow: hidden;
}

.vp-lane-wrap {
  display: grid;
  gap: 8px;
}

.vp-lane-label,
.vp-section-head {
  color: #344054;
  font-size: 14px;
  font-weight: 850;
}

.vp-lane {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(44px, 1fr));
  gap: 7px;
}

.vp-token {
  min-width: 44px;
  min-height: 54px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  display: grid;
  place-items: center;
  gap: 1px;
  padding: 5px;
  cursor: pointer;
  touch-action: manipulation;
}

.vp-token.vp-is-current {
  border-color: #2563eb;
  background: #dbeafe;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.12);
}

.vp-token.vp-is-done {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.vp-token.vp-is-waiting {
  color: #667085;
  background: #f2f4f7;
}

.vp-bracket {
  font-size: 24px;
  line-height: 1;
  font-weight: 950;
}

.vp-token-label {
  color: #667085;
  font-size: 11px;
  line-height: 1.1;
}

.vp-work {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
}

.vp-scanner,
.vp-stack-panel {
  min-width: 0;
  display: grid;
  gap: 10px;
  align-content: start;
}

.vp-section-head {
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.vp-section-head strong {
  color: var(--ink);
  text-align: right;
}

.vp-current {
  width: 100%;
  min-height: 92px;
  border: 2px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  display: grid;
  place-items: center;
  gap: 5px;
  padding: 10px;
  cursor: pointer;
  touch-action: manipulation;
}

.vp-current.vp-open {
  border-color: #0f766e;
  background: #ecfdf3;
}

.vp-current.vp-close {
  border-color: #d97706;
  background: #fff7ed;
}

.vp-current.vp-is-empty {
  border-style: dashed;
  color: #475467;
  background: #f8fafc;
}

.vp-current-token {
  font-size: 42px;
  line-height: 1;
  font-weight: 950;
}

.vp-current-help {
  color: #344054;
  font-size: 13px;
  line-height: 1.25;
  text-align: center;
}

.vp-gate-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.vp-gate {
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: #344054;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  padding: 8px;
  font-weight: 850;
  cursor: pointer;
  touch-action: manipulation;
}

.vp-gate-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #eef2f6;
  color: #344054;
  font-weight: 950;
}

.vp-gate.vp-is-hot {
  border-color: #d97706;
  background: #fff7ed;
}

.vp-gate.vp-is-hot .vp-gate-icon {
  background: #f59e0b;
  color: #111827;
}

.vp-stack {
  min-height: 168px;
  border: 1px dashed #98a2b3;
  border-radius: 8px;
  background: linear-gradient(#fff, #f8fafc);
  padding: 10px;
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-start;
  gap: 8px;
}

.vp-stack-plate {
  width: 100%;
  min-height: 48px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  font-weight: 850;
  cursor: pointer;
  touch-action: manipulation;
}

.vp-stack-plate.vp-is-top {
  border-color: #2563eb;
  background: #dbeafe;
  box-shadow: 0 -6px 18px rgba(37, 99, 235, 0.1);
}

.vp-empty-stack {
  min-height: 68px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #667085;
  text-align: center;
  padding: 10px;
}

.vp-status {
  min-height: 58px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: #344054;
  padding: 11px 12px;
  overflow-wrap: anywhere;
}

.vp-status.vp-good {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.vp-status.vp-warn {
  border-color: var(--warn);
  background: #fff7ed;
}

.vp-is-wrong {
  border-color: var(--bad) !important;
  background: #fff1f0 !important;
  animation: vp-shake 360ms ease;
}

.vp-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.vp-btn {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 0 14px;
  font-weight: 850;
  cursor: pointer;
  touch-action: manipulation;
}

.vp-btn.vp-primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

@keyframes vp-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

@media (max-width: 680px) {
  .vp-work {
    grid-template-columns: 1fr;
  }

  .vp-current {
    min-height: 82px;
  }

  .vp-stack {
    min-height: 136px;
  }
}

@media (max-width: 380px) {
  .vp-stage {
    padding: 10px;
  }

  .vp-level-tab {
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 5px;
    padding: 7px 5px;
  }

  .vp-level-tab span {
    width: 24px;
    height: 24px;
  }

  .vp-level-tab strong,
  .vp-gate,
  .vp-btn {
    font-size: 13px;
  }

  .vp-current-token {
    font-size: 36px;
  }
}
