.values-training-shell {
  display: block;
  width: 100%;
  height: calc(100vh - 58px);
  min-height: 0;
  overflow: hidden;
}

.values-training {
  --values-paper: #0b0b0c;
  --values-ink: #f4f1ec;
  --values-muted: #9a968f;
  --values-line: rgba(231, 228, 225, 0.14);
  --values-line-strong: rgba(231, 228, 225, 0.26);
  --values-surface: rgba(26, 26, 26, 0.84);
  --values-ivory: #e7e4e1;
  --values-black: #1a1a1a;
  --values-violet: #7c6cff;
  --values-violet-deep: #4b3db2;
  --values-danger: #ff5f7e;
  position: relative;
  display: grid;
  width: 100%;
  height: 100%;
  grid-template-rows: 64px minmax(0, 1fr);
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 72%, rgba(124, 108, 255, 0.26), transparent 17%),
    radial-gradient(circle at 78% 20%, rgba(124, 108, 255, 0.14), transparent 20%),
    linear-gradient(145deg, #050505 0%, #11110f 52%, #070707 100%);
  color: var(--values-ink);
  font-family: "Outfit", "Arial Black", Arial, Helvetica, sans-serif;
}

.values-training * {
  box-sizing: border-box;
  min-width: 0;
}

.values-training button {
  font: inherit;
}

.values-training .is-hidden {
  display: none !important;
}

.values-training-header {
  position: relative;
  z-index: 70;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 18px;
  border-bottom: 1px solid var(--values-line);
  background: rgba(8, 8, 8, 0.72);
  backdrop-filter: blur(22px);
}

.values-title-block {
  flex: 1;
}

.values-eyebrow,
.values-title-block h1,
.values-panel h2,
.values-rail h2,
.values-message {
  margin: 0;
}

.values-eyebrow {
  color: var(--values-muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.values-title-block h1 {
  margin-top: 2px;
  color: var(--values-ivory);
  font-size: 24px;
  font-weight: 950;
  line-height: 1;
  text-transform: lowercase;
}

.values-phase {
  display: inline-flex;
  min-height: 20px;
  align-items: center;
  margin-top: 4px;
  border: 1px solid rgba(124, 108, 255, 0.58);
  border-radius: 999px;
  padding: 0 10px;
  background: rgba(124, 108, 255, 0.12);
  color: var(--values-ivory);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.values-status {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  font-weight: 800;
}

.values-pill,
.values-back {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--values-line-strong);
  border-radius: 8px;
  padding: 0 11px;
  background: rgba(231, 228, 225, 0.055);
  color: var(--values-muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.values-back {
  min-width: max-content;
  cursor: pointer;
}

.values-back:hover,
.values-back:focus-visible {
  border-color: rgba(231, 228, 225, 0.62);
  color: var(--values-ivory);
}

.values-pill strong {
  color: var(--values-ivory);
  font-size: 15px;
}

.values-lives {
  display: flex;
  gap: 6px;
}

.values-life-dot {
  width: 13px;
  height: 13px;
  border: 1px solid rgba(231, 228, 225, 0.88);
  border-radius: 50%;
  background: var(--values-ivory);
  box-shadow: 0 0 14px rgba(231, 228, 225, 0.26);
}

.values-life-dot.is-empty {
  background: transparent;
  opacity: 0.58;
  box-shadow: none;
}

.values-audio {
  position: relative;
  z-index: 80;
}

.values-music-toggle {
  position: relative;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--values-line-strong);
  border-radius: 8px;
  background: rgba(231, 228, 225, 0.92);
  color: var(--values-black);
  cursor: pointer;
}

.values-music-icon {
  position: relative;
  width: 24px;
  height: 22px;
}

.values-music-icon::before {
  position: absolute;
  left: 2px;
  top: 7px;
  width: 7px;
  height: 8px;
  border-radius: 2px;
  background: currentColor;
  content: "";
}

.values-music-cone {
  position: absolute;
  left: 7px;
  top: 4px;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  border-right: 10px solid currentColor;
}

.values-music-wave,
.values-music-wave::after {
  position: absolute;
  border: 2px solid currentColor;
  border-left: 0;
  border-radius: 0 999px 999px 0;
  content: "";
}

.values-music-wave {
  right: 1px;
  top: 6px;
  width: 6px;
  height: 10px;
}

.values-music-wave::after {
  right: -5px;
  top: -5px;
  width: 10px;
  height: 18px;
  opacity: 0.55;
}

.values-music-slash {
  position: absolute;
  left: 3px;
  top: 10px;
  width: 22px;
  height: 2px;
  border-radius: 999px;
  background: var(--values-danger);
  opacity: 0;
  transform: rotate(-42deg);
}

.values-music-toggle.is-muted .values-music-wave,
.values-music-toggle.is-muted .values-music-wave::after {
  opacity: 0.2;
}

.values-music-toggle.is-muted .values-music-slash {
  opacity: 1;
}

.values-music-toggle.is-partial .values-music-wave::after {
  opacity: 0.25;
}

.values-audio-menu {
  position: absolute;
  top: calc(100% + 9px);
  right: 0;
  z-index: 120;
  display: grid;
  width: min(230px, calc(100vw - 24px));
  gap: 8px;
  border: 1px solid var(--values-line-strong);
  border-radius: 8px;
  padding: 10px;
  background: rgba(16, 16, 17, 0.96);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(18px);
}

.values-audio-row {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--values-line);
  border-radius: 8px;
  padding: 8px 10px;
  background: rgba(231, 228, 225, 0.055);
  color: var(--values-muted);
  cursor: pointer;
}

.values-audio-row span {
  display: grid;
  gap: 3px;
}

.values-audio-row strong {
  color: var(--values-ivory);
  font-size: 0.84rem;
  font-weight: 900;
  line-height: 1;
}

.values-audio-row em {
  color: var(--values-muted);
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 760;
  line-height: 1;
}

.values-audio-row input {
  width: 38px;
  height: 22px;
  accent-color: var(--values-violet);
  cursor: pointer;
}

.values-workspace {
  display: grid;
  height: 100%;
  min-height: 0;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 12px;
  padding: 10px 12px;
  overflow: hidden;
}

.values-board-area {
  display: grid;
  min-height: 0;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 12px;
}

.values-panel,
.values-rail section {
  border: 1px solid var(--values-line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(231, 228, 225, 0.065), rgba(231, 228, 225, 0.028)),
    var(--values-surface);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(18px);
}

.values-panel {
  display: grid;
  min-height: 0;
  grid-template-rows: auto minmax(0, 1fr);
  padding: 10px;
}

.values-panel-heading {
  display: flex;
  min-height: 30px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.values-panel h2,
.values-rail h2 {
  color: var(--values-ivory);
  font-size: 15px;
  font-weight: 850;
  line-height: 1.2;
  text-transform: uppercase;
}

.values-board {
  display: block;
  width: min(100%, calc(100vh - 122px));
  max-height: 100%;
  aspect-ratio: 1;
  justify-self: center;
  align-self: center;
  border: 1px solid rgba(26, 26, 26, 0.1);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.64), 0 18px 58px rgba(0, 0, 0, 0.22);
}

.values-answer-shape {
  cursor: pointer;
  stroke: transparent;
  stroke-width: 0;
  transition: stroke 140ms ease, stroke-dasharray 140ms ease;
}

.values-answer-shape:hover {
  filter: drop-shadow(0 0 10px rgba(124, 108, 255, 0.28));
}

.values-answer-shape.is-selected {
  filter: none;
  stroke: transparent;
  stroke-width: 0;
}

.values-answer-shape.is-unfilled {
  fill: #ffffff;
  stroke: rgba(154, 150, 143, 0.8);
  stroke-dasharray: 8 8;
  stroke-width: 2;
}

.values-answer-shape.is-unfilled.is-selected {
  stroke: var(--values-violet);
  stroke-dasharray: 8 7;
  stroke-width: 3;
}

.values-selection-outline {
  fill: none;
  pointer-events: none;
  stroke: var(--values-violet);
  stroke-dasharray: 8 7;
  stroke-width: 2;
}

.values-answer-frame {
  cursor: default;
}

.values-correction-badge,
.values-lens {
  pointer-events: auto;
}

.values-badge-callout {
  stroke: rgba(124, 108, 255, 0.58);
  stroke-width: 1.4;
}

.values-badge-panel {
  fill: rgba(12, 12, 13, 0.88);
  stroke: rgba(231, 228, 225, 0.26);
  stroke-width: 1;
  filter: drop-shadow(0 10px 22px rgba(0, 0, 0, 0.34));
}

.values-badge-dot {
  stroke-width: 2;
}

.values-badge-dot.reference {
  stroke: var(--values-ivory);
}

.values-badge-dot.answer {
  stroke: var(--values-violet);
}

.values-badge-number,
.values-badge-score,
.values-badge-label,
.values-lens-title,
.values-lens-direction,
.values-lens-meta {
  font-family: "Arial Black", Arial, Helvetica, sans-serif;
  font-weight: 950;
  pointer-events: none;
}

.values-badge-number {
  fill: rgba(231, 228, 225, 0.76);
  font-size: 12px;
}

.values-badge-score,
.values-badge-label {
  text-anchor: end;
}

.values-badge-score {
  fill: #ffffff;
  font-size: 14px;
}

.values-badge-label {
  fill: rgba(231, 228, 225, 0.72);
  font-size: 10px;
  text-transform: uppercase;
}

.values-lens-panel {
  fill: rgba(10, 10, 11, 0.94);
  stroke: rgba(124, 108, 255, 0.72);
  stroke-width: 1.5;
  filter: drop-shadow(0 18px 34px rgba(0, 0, 0, 0.44));
}

.values-lens-scale {
  fill: transparent;
  stroke: rgba(231, 228, 225, 0.34);
  stroke-width: 1;
}

.values-lens-marker {
  stroke-width: 2.4;
}

.values-lens-marker.reference {
  stroke: var(--values-ivory);
}

.values-lens-marker.answer {
  stroke: var(--values-violet);
}

.values-lens-title {
  fill: rgba(231, 228, 225, 0.68);
  font-size: 11px;
  text-transform: uppercase;
}

.values-lens-direction {
  fill: #ffffff;
  font-size: 15px;
}

.values-lens-meta {
  fill: rgba(231, 228, 225, 0.64);
  font-family: Consolas, "Courier New", monospace;
  font-size: 11px;
}

.values-lens-meta.answer {
  fill: #bdb7ff;
}

.values-rail {
  display: grid;
  min-height: 0;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 8px;
  overflow: hidden;
}

.values-rail section {
  padding: 10px;
}

.values-picker-wrap {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.values-picker {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid rgba(231, 228, 225, 0.3);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.12), rgba(0, 0, 0, 0.12)),
    linear-gradient(180deg, #ffffff 0%, #808080 50%, #000000 100%);
  cursor: crosshair;
}

.values-handle {
  position: absolute;
  left: 0;
  width: 100%;
  height: 0;
  border-top: 2px solid #ffffff;
  border-bottom: 2px solid #111111;
  transform: translateY(-2px);
  pointer-events: none;
}

.values-current {
  display: flex;
  min-height: 38px;
  align-items: center;
  gap: 10px;
}

.values-chip {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(231, 228, 225, 0.32);
  border-radius: 50%;
}

.values-code {
  color: var(--values-ivory);
  font-family: Consolas, "Courier New", monospace;
  font-size: 14px;
  font-weight: 800;
}

.values-actions {
  display: grid;
  gap: 7px;
}

.values-primary,
.values-secondary,
.values-ghost {
  min-height: 34px;
  border: 1px solid var(--values-line-strong);
  border-radius: 8px;
  font-weight: 850;
  cursor: pointer;
}

.values-primary {
  border-color: rgba(124, 108, 255, 0.8);
  background: linear-gradient(135deg, var(--values-violet), var(--values-violet-deep));
  color: #ffffff;
}

.values-secondary,
.values-ghost {
  background: rgba(231, 228, 225, 0.055);
  color: var(--values-ivory);
}

.values-secondary.is-warning {
  border-color: rgba(255, 95, 126, 0.5);
  color: #ffd9e1;
}

.values-ghost {
  padding: 0 12px;
}

.values-training button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.values-message {
  min-height: 30px;
  color: var(--values-muted);
  font-size: 12px;
  line-height: 1.35;
}

.values-score-number {
  margin-top: 4px;
  font-size: 30px;
  font-weight: 950;
  line-height: 1;
}

.values-award-badge {
  display: grid;
  gap: 3px;
  margin-top: 6px;
  border: 1px solid var(--values-violet);
  border-radius: 8px;
  padding: 8px;
  background: rgba(231, 228, 225, 0.06);
}

.values-award-badge strong {
  color: var(--values-ivory);
  font-size: 13px;
}

.values-award-badge span,
.values-correction-hint {
  color: var(--values-muted);
  font-size: 12px;
}

.values-report {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.values-correction-hint {
  display: grid;
  gap: 4px;
  margin-top: 4px;
  border-top: 1px solid var(--values-line);
  padding-top: 8px;
  line-height: 1.35;
}

.values-correction-hint strong {
  color: var(--values-ivory);
}

.values-xp-layer {
  position: fixed;
  left: 50%;
  top: 92px;
  z-index: 50;
  display: grid;
  gap: 8px;
  width: min(300px, calc(100vw - 28px));
  pointer-events: none;
  transform: translateX(-50%);
}

.values-xp-pop {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 12px;
  align-items: center;
  border: 1px solid var(--values-violet);
  border-radius: 8px;
  padding: 11px 13px;
  background: linear-gradient(90deg, rgba(124, 108, 255, 0.24), rgba(16, 16, 17, 0.96)), #101011;
  color: #ffffff;
  animation: values-xp-pop-rise 1250ms cubic-bezier(0.2, 0.82, 0.25, 1) forwards;
}

.values-xp-pop em {
  grid-column: 1 / -1;
  color: rgba(231, 228, 225, 0.68);
  font-size: 12px;
  font-style: normal;
  font-weight: 850;
  text-transform: uppercase;
}

@keyframes values-xp-pop-rise {
  0% { opacity: 0; transform: translateY(18px) scale(0.96); }
  16% { opacity: 1; transform: translateY(0) scale(1); }
  78% { opacity: 1; transform: translateY(-10px) scale(1); }
  100% { opacity: 0; transform: translateY(-24px) scale(0.98); }
}

@media (max-width: 980px) {
  .values-training-shell {
    height: calc(100vh - 58px);
    min-height: 0;
  }

  .values-training {
    overflow: auto;
  }

  .values-workspace {
    height: auto;
    grid-template-columns: 1fr;
    overflow: visible;
  }

  .values-rail {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: none;
    overflow: visible;
  }
}

@media (max-width: 760px) {
  .values-training-shell {
    overflow: auto;
  }

  .values-training {
    min-height: 100%;
    grid-template-rows: auto minmax(0, 1fr);
  }

  .values-training-header,
  .values-board-area,
  .values-rail {
    grid-template-columns: 1fr;
  }

  .values-training-header {
    align-items: flex-start;
  }

  .values-status {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .values-back {
    width: 100%;
    justify-content: center;
  }
}
