.playground-shell {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  width: calc(100vw - 32px);
  max-width: calc(100vw - 32px);
  height: calc(100vh - 156px);
  min-height: 620px;
  margin-top: -8px;
  margin-right: calc(50% - 50vw + 16px);
  margin-left: calc(50% - 50vw + 16px);
  overflow: hidden;
  background: #111111;
  border: 1px solid #27272a;
  border-radius: 8px;
}

.playground-topbar,
.playground-statusbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: #18181b;
  border: 0;
  border-radius: 0;
  padding: 10px 14px;
}

.playground-topbar {
  min-height: 64px;
  border-bottom: 1px solid #27272a;
  flex: 0 0 auto;
  overflow: visible;
  flex-wrap: wrap;
}

.playground-brand {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 260px;
}

.playground-title {
  font-weight: 800;
  color: #fafafa;
}

.playground-subtitle,
.pg-muted {
  color: #a1a1aa;
  font-size: 13px;
}

.playground-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 8px;
  flex: 0 1 auto;
  min-width: 0;
}

.playground-actions-left,
.playground-actions-center,
.playground-actions-right {
  padding-left: 8px;
  border-left: 1px solid #27272a;
}

.pg-btn {
  border: 1px solid #3f3f46;
  background: #27272a;
  color: #f4f4f5;
  border-radius: 6px;
  padding: 8px 11px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.pg-btn:hover {
  border-color: #d6212e;
  color: #d6212e;
}

.pg-btn:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.pg-btn-primary {
  border-color: #d6212e;
  background: #d6212e;
  color: #ffffff;
}

.pg-btn-primary:hover {
  background: #b91c1c;
  color: #ffffff;
}

.pg-btn-danger {
  border-color: #7f1d1d;
  background: #450a0a;
  color: #fecaca;
}

.playground-canvas-wrapper {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: #171717;
}

#playground-canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

.playground-statusbar {
  justify-content: flex-start;
  flex-wrap: wrap;
  min-height: 36px;
  flex: 0 0 auto;
  font-size: 13px;
  color: #d4d4d8;
  border-top: 1px solid #27272a;
}

.playground-statusbar span {
  white-space: nowrap;
}

.playground-message {
  color: #a1a1aa;
}

.pg-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  background: rgba(17, 17, 17, 0.45);
  padding: 24px;
}

.pg-modal-overlay {
  position: absolute;
  inset: 0;
}

.pg-modal.hidden {
  display: none;
}

.pg-modal-panel {
  position: relative;
  width: min(760px, calc(100vw - 48px));
  max-height: calc(100vh - 80px);
  overflow: auto;
  background: #ffffff;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  padding: 18px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.22);
}

.pg-modal-narrow { width: min(520px, calc(100vw - 48px)); }
.pg-modal-medium { width: min(580px, calc(100vw - 48px)); }
.pg-modal-wide { width: min(880px, calc(100vw - 48px)); }
.pg-modal-xwide { width: min(960px, calc(100vw - 48px)); }
.pg-modal-settings {
  width: min(720px, calc(100vw - 48px));
  max-height: 90vh;
}

.pg-modal-close {
  float: right;
  border: 1px solid #d1d5db;
  background: #ffffff;
  border-radius: 6px;
  padding: 6px 9px;
  font-weight: 700;
  cursor: pointer;
}

.pg-modal-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pg-modal-header.pg-success {
  color: #047857;
}

.pg-modal-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #dcfce7;
}

.pg-modal-body {
  margin-top: 12px;
}

.pg-modal-subtitle,
.pg-hint,
.pg-drop-hint,
.pg-setting-meta,
.pg-input-range {
  color: #6b7280;
  font-size: 13px;
}

.pg-modal-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.pg-modal-actions-stacked,
.pg-modal-actions-row {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}

.pg-modal-actions-row {
  flex-direction: row;
  justify-content: flex-end;
}

.pg-modal-actions-primary {
  border-top: 1px solid #e5e7eb;
  padding-top: 10px;
}

.pg-divider {
  border: 0;
  border-top: 1px solid #e5e7eb;
  margin: 16px 0;
}

.pg-drop-zone {
  display: grid;
  place-items: center;
  gap: 4px;
  min-height: 160px;
  border: 2px dashed #d1d5db;
  border-radius: 8px;
  background: #f9fafb;
  cursor: pointer;
  text-align: center;
}

.pg-drop-zone.drag-over {
  border-color: #d6212e;
  background: #fef2f2;
}

.pg-drop-icon {
  font-size: 36px;
}

.pg-selected-file {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #f9fafb;
}

.pg-file-icon {
  font-size: 28px;
}

.pg-file-info {
  flex: 1 1 auto;
  min-width: 0;
}

.pg-file-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
}

.pg-file-meta {
  color: #6b7280;
  font-size: 12px;
}

.pg-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.pg-form-row {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.pg-form-row label,
.pg-setting-label {
  font-size: 13px;
  font-weight: 700;
  color: #374151;
}

.pg-form-row input,
.pg-form-row select,
.pg-setting-input input,
.pg-setting-input select {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  padding: 8px 9px;
  background: #ffffff;
  color: #111111;
}

.pg-form-row-full {
  grid-column: 1 / -1;
}

.pg-api-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr)) auto auto;
  align-items: end;
  gap: 10px;
}

.pg-api-results {
  margin-top: 14px;
  max-height: 300px;
  overflow: auto;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
}

.pg-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.pg-table th,
.pg-table td {
  border-bottom: 1px solid #e5e7eb;
  padding: 8px 9px;
  text-align: left;
  vertical-align: top;
}

.pg-table th {
  position: sticky;
  top: 0;
  background: #f9fafb;
  z-index: 1;
}

.pg-table-compact th,
.pg-table-compact td {
  padding: 6px 8px;
}

.pg-row-clickable {
  cursor: pointer;
}

.pg-row-clickable:hover {
  background: #fef2f2;
}

.pg-empty,
.pg-loading {
  color: #6b7280;
  padding: 12px;
  text-align: center;
}

.pg-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 10px;
}

.pg-api-selected {
  margin-top: 14px;
  padding: 12px;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  background: #f0fdf4;
}

.pg-api-preview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 14px;
  margin: 10px 0 12px;
  font-size: 13px;
}

.pg-info-row,
.pg-kv-row,
.pg-metric {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  border-bottom: 1px solid #f3f4f6;
}

.pg-info-label,
.pg-metric-key {
  color: #6b7280;
  font-weight: 700;
}

.pg-info-value,
.pg-metric-value {
  color: #111111;
  text-align: right;
}

.pg-detail-section {
  margin-top: 14px;
}

.pg-detail-section h3 {
  margin: 0 0 8px;
  font-size: 15px;
}

.pg-kv-list {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 6px 10px;
  background: #f9fafb;
}

.pg-logs {
  max-height: 260px;
  overflow: auto;
  padding: 10px;
  border-radius: 6px;
  background: #111827;
  color: #e5e7eb;
  font-size: 12px;
}

.pg-viz-svg {
  width: 100%;
  height: 80px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #f9fafb;
}

.pg-viz-chart {
  height: 220px;
}

.pg-quality-list {
  display: grid;
  gap: 8px;
}

.pg-quality-item {
  border-left: 4px solid #f59e0b;
  border-radius: 6px;
  background: #fffbeb;
  padding: 8px 10px;
}

.pg-quality-pass { border-left-color: #16a34a; background: #f0fdf4; }
.pg-quality-fail { border-left-color: #dc2626; background: #fef2f2; }
.pg-quality-partial { border-left-color: #f59e0b; background: #fffbeb; }

.pg-quality-section {
  display: grid;
  gap: 10px;
}

.pg-quality-section h3 {
  margin: 0;
  font-size: 16px;
  color: #111827;
}

.pg-score-summary {
  border: 1px solid #dbeafe;
  border-radius: 8px;
  padding: 10px 12px;
  background: #eff6ff;
  color: #1e3a8a;
}

.pg-blocks-list,
.pg-criteria-list {
  display: grid;
  gap: 10px;
}

.pg-block-card {
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
}

.pg-block-card[open] {
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.pg-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  cursor: pointer;
  background: #f8fafc;
}

.pg-block-header strong {
  min-width: 0;
  color: #0f172a;
}

.pg-block-body {
  display: grid;
  gap: 10px;
  padding: 12px 14px 14px;
}

.pg-block-score,
.pg-block-na,
.pg-criterion-status,
.pg-criterion-points {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.pg-block-score {
  background: #dcfce7;
  color: #166534;
}

.pg-block-na {
  background: #f1f5f9;
  color: #64748b;
}

.pg-block-reason {
  margin: 0;
  color: #475569;
}

.pg-criterion {
  display: grid;
  gap: 8px;
  border: 1px solid #e5e7eb;
  border-left: 4px solid #94a3b8;
  border-radius: 8px;
  padding: 10px 12px;
  background: #ffffff;
}

.pg-criterion header {
  display: grid;
  grid-template-columns: auto minmax(180px, 1fr) auto auto;
  gap: 8px;
  align-items: center;
}

.pg-criterion header strong {
  color: #334155;
}

.pg-criterion-title {
  min-width: 0;
  color: #111827;
  font-weight: 600;
}

.pg-criterion-points {
  background: #f8fafc;
  color: #334155;
}

.pg-criterion-evidence {
  margin: 0;
  border-left: 3px solid #60a5fa;
  border-radius: 6px;
  padding: 8px 10px;
  background: #eff6ff;
  color: #1e3a8a;
}

.pg-criterion-missing {
  margin: 0;
  border-radius: 6px;
  padding: 8px 10px;
  background: #fff7ed;
  color: #9a3412;
}

.pg-criterion-pass,
.pg-criterion-passed,
.pg-criterion-full,
.pg-criterion-ok {
  border-left-color: #16a34a;
  background: #f0fdf4;
}

.pg-criterion-fail,
.pg-criterion-failed,
.pg-criterion-zero {
  border-left-color: #dc2626;
  background: #fef2f2;
}

.pg-criterion-partial,
.pg-criterion-partly {
  border-left-color: #f59e0b;
  background: #fffbeb;
}

.pg-criterion-not_applicable,
.pg-criterion-na {
  border-left-color: #94a3b8;
  background: #f8fafc;
}

.pg-status-pass,
.pg-status-passed,
.pg-status-full,
.pg-status-ok {
  background: #dcfce7;
  color: #166534;
}

.pg-status-fail,
.pg-status-failed,
.pg-status-zero {
  background: #fee2e2;
  color: #991b1b;
}

.pg-status-partial,
.pg-status-partly {
  background: #fef3c7;
  color: #92400e;
}

.pg-status-not_applicable,
.pg-status-na {
  background: #e2e8f0;
  color: #475569;
}

.pg-error-list,
.pg-quality-section ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding-left: 22px;
}

.pg-quality-red-flags {
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 12px;
  background: #fef2f2;
}

.pg-employee-report {
  margin: 0;
  white-space: pre-wrap;
  color: #334155;
}

.pg-settings-form {
  display: grid;
  gap: 12px;
}

.pg-setting-row {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 10px;
  background: #f9fafb;
}

.pg-setting-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.pg-setting-title {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.pg-setting-en {
  color: #6b7280;
  font-weight: 500;
}

.pg-setting-label {
  cursor: help;
}

.pg-setting-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pg-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  padding: 2px 7px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.4;
}

.pg-badge[hidden] {
  display: none;
}

.pg-badge-sandbox {
  color: #1d4ed8;
  background: #dbeafe;
}

.pg-badge-warn {
  color: #92400e;
  background: #fef3c7;
}

.pg-setting-help {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #e5e7eb;
  color: #374151;
  cursor: help;
  font-weight: 800;
}

.pg-setting-input {
  margin-top: 8px;
}

.pg-toggle {
  display: inline-flex;
  align-items: center;
}

.pg-toggle input {
  display: none;
}

.pg-toggle-slider {
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: #d1d5db;
  position: relative;
  transition: 0.2s;
}

.pg-toggle-slider::before {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  top: 3px;
  border-radius: 999px;
  background: #ffffff;
  transition: 0.2s;
}

.pg-toggle input:checked + .pg-toggle-slider {
  background: #16a34a;
}

.pg-toggle input:checked + .pg-toggle-slider::before {
  transform: translateX(18px);
}

.pg-tooltip {
  position: fixed;
  z-index: 120;
  max-width: min(380px, calc(100vw - 24px));
  padding: 12px;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  background: #ffffff;
  color: #111111;
  box-shadow: 0 12px 38px rgba(0, 0, 0, 0.18);
  font-size: 12px;
  line-height: 1.45;
}

.pg-tooltip-text {
  color: #111827;
}

.pg-tooltip-meta {
  margin-top: 10px;
  color: #6b7280;
}

.pg-tooltip-link {
  display: inline-block;
  margin-top: 8px;
  color: #d6212e;
  font-weight: 700;
}

.pg-toast-container {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 140;
  display: grid;
  gap: 8px;
}

.pg-toast {
  min-width: 260px;
  max-width: 420px;
  transform: translateY(10px);
  opacity: 0;
  border-radius: 8px;
  padding: 10px 12px;
  color: #ffffff;
  background: #27272a;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.24);
  transition: opacity 0.2s ease, transform 0.2s ease;
  font-size: 13px;
}

.pg-toast-visible {
  transform: translateY(0);
  opacity: 1;
}

.pg-toast-success { background: #047857; }
.pg-toast-error { background: #b91c1c; }
.pg-toast-warn { background: #b45309; }
.pg-toast-info { background: #1f2937; }

.pg-modal-pre {
  margin-top: 12px;
  padding: 12px;
  border-radius: 6px;
  background: #f3f4f6;
  color: #111111;
  overflow: auto;
  max-height: 420px;
  font-size: 12px;
}

.pg-viz-stack {
  display: grid;
  gap: 12px;
}

.pg-audio-player {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid #333746;
  border-radius: 8px;
  background: #171922;
}

.pg-audio-player audio {
  width: 100%;
}

.pg-audio-variants {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pg-audio-variant.active {
  border-color: #60a5fa;
  color: #dbeafe;
}

.pg-audio-now,
.pg-row-meta {
  color: #9ca3af;
  font-size: 12px;
}

.pg-viz-summary,
.pg-role-summary,
.pg-correction-summary {
  padding: 10px;
  border: 1px solid #2b3040;
  border-radius: 8px;
  background: #141722;
}

.pg-diar-svg {
  min-height: 76px;
}

.pg-clickable-segment,
.pg-transcript-row,
.pg-utterance-table tr[data-play-start] {
  cursor: pointer;
}

.pg-clickable-segment:hover,
.pg-transcript-row:hover {
  filter: brightness(1.2);
}

.pg-crosslink-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pg-playing {
  outline: 2px solid #60a5fa;
  outline-offset: -2px;
  background: rgba(96, 165, 250, 0.12);
}

.pg-seg-active {
  filter: brightness(1.4) drop-shadow(0 0 8px currentColor);
  stroke: #ffffff;
  stroke-width: 3px;
  opacity: 1;
  animation: pg-seg-pulse 1.5s ease-in-out infinite;
}

@keyframes pg-seg-pulse {
  0%,
  100% { filter: brightness(1.35) drop-shadow(0 0 7px currentColor); }
  50% { filter: brightness(1.7) drop-shadow(0 0 11px currentColor); }
}

.pg-segment-highlighted {
  outline: 2px solid #fbbf24;
  outline-offset: 1px;
  stroke: #fbbf24;
  stroke-width: 3px;
  filter: drop-shadow(0 0 7px rgba(251, 191, 36, 0.75));
}

.pg-row-highlighted {
  background: rgba(251, 191, 36, 0.16) !important;
  box-shadow: inset 3px 0 0 #fbbf24;
}

.pg-transcript-active {
  background: rgba(59, 130, 246, 0.2) !important;
  box-shadow: inset 3px 0 0 #3b82f6;
}

.pg-speaker-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pg-speaker-legend span,
.pg-speaker-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border: 1px solid #3b4254;
  border-radius: 999px;
  background: #191d29;
  color: #e5e7eb;
  white-space: nowrap;
}

.pg-speaker-legend i {
  width: 11px;
  height: 11px;
  border-radius: 999px;
}

.pg-utterance-table td:nth-child(3) {
  min-width: 360px;
}

.pg-prior-notice {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid #2563eb;
  border-radius: 8px;
  background: rgba(37, 99, 235, 0.12);
  color: #dbeafe;
  font-size: 13px;
}

.pg-prior-notice strong {
  color: #ffffff;
}

.pg-prior-cell {
  min-width: 180px;
}

.pg-prior-cell code,
.pg-prior-cell .pg-row-meta {
  display: block;
  margin-bottom: 3px;
}

.pg-prior-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 8px;
  background: #252a38;
  color: #cbd5e1;
  font-size: 12px;
  white-space: nowrap;
}

.pg-prior-badge.active {
  background: #065f46;
  color: #d1fae5;
}

.pg-anchor-segment {
  stroke: #facc15;
  stroke-width: 4;
  filter: drop-shadow(0 0 6px rgba(250, 204, 21, 0.65));
}

.pg-anchor-star {
  fill: #facc15;
  font-size: 18px;
  font-weight: 800;
  paint-order: stroke;
  stroke: #111827;
  stroke-width: 3px;
}

.pg-anchor-notice {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid #facc15;
  border-radius: 8px;
  background: rgba(250, 204, 21, 0.12);
  color: #fef3c7;
  font-size: 13px;
}

.pg-anchor-notice.muted {
  border-color: #52525b;
  background: rgba(82, 82, 91, 0.18);
  color: #d4d4d8;
}

.pg-anchor-notice strong {
  color: #ffffff;
}

.pg-anchor-cell {
  min-width: 170px;
}

.pg-anchor-cell code,
.pg-anchor-cell .pg-anchor-mini {
  display: block;
  margin-bottom: 3px;
}

.pg-anchor-mini {
  color: #facc15;
  font-size: 12px;
  font-weight: 700;
}

.pg-anchor-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 8px;
  background: #27272a;
  color: #e4e4e7;
  font-size: 12px;
  white-space: nowrap;
}

.pg-anchor-badge.active {
  background: #854d0e;
  color: #fef3c7;
}

.pg-low-confidence {
  background: rgba(245, 158, 11, 0.12);
}

.pg-tabs-static {
  display: grid;
  gap: 14px;
}

.pg-text-preview {
  max-height: 300px;
  overflow: auto;
  white-space: pre-wrap;
  border: 1px solid #2b3040;
  border-radius: 8px;
  padding: 10px;
  background: #11131b;
  color: #e5e7eb;
}

.pg-bar-list {
  display: grid;
  gap: 8px;
}

.pg-bar-row {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) 3fr 72px;
  gap: 10px;
  align-items: center;
}

.pg-bar-row > div {
  height: 12px;
  border-radius: 999px;
  background: #2b3040;
  overflow: hidden;
}

.pg-bar-row i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #60a5fa;
}

.pg-bar-row.active i {
  background: #10b981;
}

.pg-score-card {
  display: inline-grid;
  gap: 3px;
  padding: 12px 16px;
  border: 1px solid #334155;
  border-radius: 8px;
  background: #101827;
}

.pg-score-card strong {
  font-size: 28px;
  color: #f8fafc;
}

.pg-score-card span {
  color: #94a3b8;
}

.pg-score-card-finality {
  max-width: 560px;
  border-color: #334155;
}

.pg-score-card-finality p {
  margin: 4px 0 0;
  color: #cbd5e1;
  font-size: 13px;
  line-height: 1.4;
}

.pg-finality-final {
  border-color: #16a34a;
  background: #052e16;
}

.pg-finality-needs_review {
  border-color: #f59e0b;
  background: #451a03;
}

.pg-finality-not_scored,
.pg-finality-unknown {
  border-color: #64748b;
  background: #111827;
}

.pg-finality-blocked_by_role_mapping {
  border-color: #dc2626;
  background: #450a0a;
}

.pg-score-technical {
  margin-top: 8px;
  color: #cbd5e1;
  font-size: 12px;
}

.pg-score-technical summary {
  cursor: pointer;
  font-weight: 700;
}

.pg-score-technical div,
.pg-score-technical small {
  display: block;
  margin-top: 4px;
  color: #94a3b8;
}

.pg-final-grid {
  display: grid;
  gap: 14px;
}

.pg-final-transcript {
  display: grid;
  gap: 10px;
}



.pg-btn-accent {
  background: #0f172a;
  border-color: #38bdf8;
  color: #e0f2fe;
}

.pg-btn-accent:hover:not(:disabled) {
  background: #082f49;
  border-color: #7dd3fc;
}

.pg-modal-tabs {
  display: flex;
  gap: 8px;
  margin: 12px 0 16px;
  border-bottom: 1px solid #374151;
}

.pg-tab {
  appearance: none;
  border: 1px solid transparent;
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  background: transparent;
  color: #9ca3af;
  padding: 9px 14px;
  font-weight: 700;
  cursor: pointer;
}

.pg-tab.active {
  background: #111827;
  border-color: #374151;
  color: #f9fafb;
}

.pg-api-tab.hidden {
  display: none;
}

.pg-checkbox-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #d1d5db;
  font-weight: 700;
  min-height: 40px;
}

.pg-diff-box {
  max-height: 440px;
  overflow: auto;
  border: 1px solid #374151;
  border-radius: 8px;
  background: #0b1120;
  padding: 12px;
}

.pg-diff-table td {
  vertical-align: top;
  max-width: 280px;
  overflow-wrap: anywhere;
}

@media (max-width: 1280px) {
  .playground-shell {
    width: calc(100vw - 16px);
    max-width: calc(100vw - 16px);
    min-height: 560px;
    margin-right: calc(50% - 50vw + 8px);
    margin-left: calc(50% - 50vw + 8px);
  }

  .playground-topbar {
    align-items: flex-start;
    flex-direction: column;
    min-height: 108px;
    overflow: visible;
  }

  .playground-actions {
    justify-content: flex-start;
  }

  .pg-btn {
    font-size: 12px;
    padding: 7px 9px;
  }

  .playground-canvas-wrapper::before {
    content: "Playground удобнее на ширине 1280px+.";
    position: absolute;
    left: 12px;
    top: 12px;
    z-index: 3;
    border-radius: 6px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    color: #7c2d12;
    padding: 8px 10px;
    font-size: 12px;
  }
}


.pg-analytics-viz {
  gap: 14px;
}

.pg-analytics-card {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #ffffff;
  padding: 12px;
}

.pg-analytics-card h4 {
  margin: 0 0 10px;
  font-size: 16px;
}

.pg-setting-input textarea,
.pg-setting-input select[multiple] {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  padding: 8px 10px;
  font: inherit;
  background: #ffffff;
}

.pg-setting-input textarea {
  min-height: 180px;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
}

.pg-responsibility-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid #fecaca;
  border-radius: 8px;
  background: #fff1f2;
  color: #7f1d1d;
  font-size: 14px;
}

.pg-apply-experiment {
  margin-bottom: 10px;
  padding: 10px 12px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: #eff6ff;
  color: #1e3a8a;
}

.pg-experiment-list {
  display: grid;
  gap: 12px;
}

.pg-experiment-card {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 12px;
  background: #ffffff;
}

.pg-experiment-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 6px;
}

.pg-experiment-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
}

.pg-badge-success {
  background: #dcfce7;
  color: #166534;
  border-color: #bbf7d0;
}


.pg-quality-metrics {
  border: 1px solid #dbeafe;
  border-radius: 8px;
  padding: 12px;
  background: #f8fbff;
}

.pg-quality-metrics-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.pg-quality-metrics-head span {
  color: #64748b;
  font-size: 13px;
}

.pg-quality-metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
}

.pg-quality-metric-card {
  display: grid;
  gap: 4px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 8px 10px;
  background: #ffffff;
}

.pg-quality-metric-card span {
  color: #64748b;
  font-size: 12px;
}

.pg-quality-metric-card strong {
  color: #0f172a;
  font-size: 15px;
}

.pg-quality-validation {
  border: 1px solid #fed7aa;
  border-radius: 8px;
  padding: 12px;
  background: #fff7ed;
  color: #9a3412;
}

.pg-quality-validation ul {
  margin: 0;
  padding-left: 18px;
}

.pg-criterion-na-reason,
.pg-criterion-warning {
  margin: 0;
  border-radius: 6px;
  padding: 8px 10px;
}

.pg-criterion-na-reason {
  background: #f1f5f9;
  color: #475569;
}

.pg-criterion-warning {
  background: #fef2f2;
  color: #991b1b;
}

.pg-criterion-has-warning {
  border-left-color: #ef4444;
}
.pg-short-call-banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  border: 1px solid #fbbf24;
  border-radius: 8px;
  background: #fffbeb;
  color: #78350f;
}

.pg-short-call-marker {
  flex: 0 0 auto;
  padding: 3px 7px;
  border-radius: 999px;
  background: #f59e0b;
  color: #111827;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.pg-short-call-body {
  display: grid;
  gap: 4px;
}

.pg-short-call-title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
}

.pg-short-call-title strong {
  color: #451a03;
}

.pg-short-call-title span,
.pg-short-call-body small {
  color: #92400e;
  font-size: 12px;
}

.pg-short-call-body p {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
}


.pg-pending-feedback {
  margin-bottom: 12px;
  border: 1px solid #e2e8f0;
  border-left: 4px solid #94a3b8;
  border-radius: 6px;
  padding: 14px 16px;
  background: #f8fafc;
}

.pg-pending-feedback p {
  margin: 0 0 6px;
  color: #374151;
  font-size: 14px;
}

.pg-pending-feedback p:last-child {
  margin-bottom: 0;
}

.pg-technical-details {
  margin-top: 12px;
}

.pg-technical-details summary {
  cursor: pointer;
  padding: 6px 0;
  color: #6b7280;
  font-size: 12px;
  user-select: none;
}

.pg-technical-warning {
  margin: 6px 0;
  border-radius: 4px;
  padding: 4px 8px;
  background: #fef2f2;
  color: #dc2626;
  font-size: 11px;
  font-style: italic;
}

.pg-technical-raw {
  margin-top: 8px;
  color: #6b7280;
  font-size: 12px;
}

.pg-technical-raw li {
  margin-bottom: 4px;
}
