html {
  overflow-x: hidden;
}

.pbq-arena-body {
  min-height: 100vh;
}

.pbq-arena-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 48px;
}

.pbq-arena-hero {
  margin-bottom: 22px;
  text-align: center;
}

.pbq-panel,
.pbq-status-panel,
.pbq-briefing-panel,
.pbq-workspace-panel,
.pbq-controls {
  border: 2px solid #00f7ff;
  border-radius: 12px;
  background: rgba(8, 0, 24, 0.94);
  box-shadow: 0 0 18px rgba(0, 247, 255, 0.22);
}

.pbq-panel {
  padding: 24px;
  text-align: center;
}

.pbq-status-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(250px, 0.42fr);
  align-items: center;
  gap: 24px;
  padding: 20px 24px;
  border-color: #ffd700;
}

.pbq-status-panel h2 {
  margin: 6px 0;
  color: #ffd700;
}

.pbq-eyebrow,
.pbq-panel-label {
  color: #00f7ff;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.pbq-progress-block {
  display: grid;
  gap: 7px;
}

.pbq-progress-block label {
  color: #ffd700;
  font-weight: 700;
}

.pbq-progress-block progress {
  width: 100%;
  height: 16px;
  accent-color: #00f7ff;
}

.pbq-mission-layout {
  display: grid;
  grid-template-columns: minmax(250px, 0.35fr) minmax(0, 1fr);
  align-items: start;
  gap: 20px;
  margin-top: 20px;
}

.pbq-briefing-panel,
.pbq-workspace-panel {
  padding: 22px;
}

.pbq-workspace-panel {
  min-width: 0;
  overflow: hidden;
}

.pbq-briefing-panel {
  position: sticky;
  top: 12px;
}

.pbq-briefing-panel h2,
.pbq-workspace-panel > h2 {
  margin-top: 6px;
  color: #ffd700;
}

.pbq-reference {
  margin: 20px 0;
  padding: 14px;
  border-left: 4px solid #00f7ff;
  background: rgba(0, 247, 255, 0.08);
}

.pbq-reference h3 {
  margin-top: 0;
}

.pbq-reference li,
.pbq-task-checklist li {
  margin-bottom: 9px;
  line-height: 1.5;
}

.pbq-task-checklist {
  padding-left: 0;
  list-style: none;
}

.pbq-task-checklist li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
}

.pbq-check-marker {
  display: inline-grid;
  width: 25px;
  height: 25px;
  flex: 0 0 25px;
  place-items: center;
  border: 1px solid #00f7ff;
  border-radius: 50%;
  color: #00f7ff;
  font-size: 0.78rem;
  font-weight: 800;
}

.pbq-task-checklist .is-complete .pbq-check-marker,
.pbq-task-checklist .is-correct .pbq-check-marker {
  border-color: #67ff9a;
  color: #67ff9a;
}

.pbq-task-checklist .is-incorrect .pbq-check-marker {
  border-color: #ff5f7f;
  color: #ff5f7f;
}

.pbq-matching-list {
  display: grid;
  gap: 14px;
}

.pbq-matching-task {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid rgba(0, 247, 255, 0.45);
  border-radius: 9px;
  background: rgba(0, 0, 0, 0.45);
}

.pbq-matching-task label {
  line-height: 1.5;
  font-weight: 700;
}

.pbq-select {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  box-sizing: border-box;
  border: 1px solid #00f7ff;
  border-radius: 7px;
  background: #090014;
  color: #fff;
  font: inherit;
}

.pbq-select:focus-visible,
.pbq-control-button:focus-visible,
.pbq-visual-marker:focus-visible,
.pbq-table-scroll:focus-visible,
.pbq-review:focus-visible {
  outline: 3px solid #ffd700;
  outline-offset: 3px;
}

.pbq-table-scroll {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  contain: inline-size;
  border: 1px solid rgba(0, 247, 255, 0.45);
  border-radius: 9px;
}

.pbq-configuration-table {
  width: 100%;
  min-width: 900px;
  border-collapse: collapse;
  background: rgba(0, 0, 0, 0.45);
}

.pbq-configuration-table caption {
  padding: 12px;
  color: #ffd700;
  font-weight: 800;
  text-align: left;
}

.pbq-configuration-table th,
.pbq-configuration-table td {
  padding: 12px;
  border: 1px solid rgba(0, 247, 255, 0.28);
  vertical-align: top;
}

.pbq-configuration-table thead th {
  color: #00f7ff;
  text-align: left;
}

.pbq-configuration-table tbody th {
  width: 280px;
  text-align: left;
}

.pbq-configuration-table tbody th strong,
.pbq-configuration-table tbody th span {
  display: block;
}

.pbq-configuration-table tbody th span {
  margin-top: 7px;
  font-weight: 400;
  line-height: 1.45;
}

.pbq-visual-labeling {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(260px, 0.9fr);
  align-items: start;
  gap: 18px;
}

.pbq-visual-figure {
  min-width: 0;
  margin: 0;
}

.pbq-visual-stage {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(0, 247, 255, 0.55);
  border-radius: 9px;
  background: #05000d;
}

.pbq-visual-stage.has-load-error {
  min-height: 220px;
  background:
    linear-gradient(135deg, transparent 48%, rgba(255, 95, 127, 0.45) 49%, rgba(255, 95, 127, 0.45) 51%, transparent 52%),
    #05000d;
}

.pbq-visual-image {
  display: block;
  width: 100%;
  height: auto;
}

.pbq-visual-marker {
  position: absolute;
  display: grid;
  width: 44px;
  min-width: 44px;
  height: 44px;
  padding: 0;
  transform: translate(-50%, -50%);
  place-items: center;
  border: 2px solid #ffd700;
  border-radius: 50%;
  background: #090014;
  color: #ffd700;
  box-shadow: 0 0 12px rgba(255, 215, 0, 0.55);
  cursor: pointer;
  font: inherit;
  font-weight: 900;
}

.pbq-visual-marker:hover,
.pbq-visual-marker.is-answered {
  border-color: #67ff9a;
  color: #67ff9a;
  box-shadow: 0 0 14px rgba(103, 255, 154, 0.55);
}

.pbq-visual-caption {
  padding: 10px 4px 0;
  color: #d9baff;
  line-height: 1.45;
}

.pbq-visual-answer-list {
  display: grid;
  gap: 12px;
}

.pbq-visual-answer {
  padding: 14px;
  border: 1px solid rgba(0, 247, 255, 0.45);
  border-radius: 9px;
  background: rgba(0, 0, 0, 0.45);
}

.pbq-visual-answer-heading {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
  line-height: 1.45;
}

.pbq-visual-callout-label {
  display: inline-grid;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  place-items: center;
  border: 1px solid #ffd700;
  border-radius: 50%;
  color: #ffd700;
  font-weight: 900;
}

.pbq-cell-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.pbq-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
  padding: 16px;
  border-color: #ffd700;
}

.pbq-control-button {
  min-width: 145px;
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid #00f7ff;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.82);
  color: #00f7ff;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}

.pbq-control-button:hover:not(:disabled),
.pbq-control-button:focus-visible,
.pbq-control-button.is-flagged {
  background: rgba(0, 247, 255, 0.14);
  box-shadow: 0 0 12px rgba(0, 247, 255, 0.42);
}

.pbq-submit-button {
  border-color: #ffd700;
  color: #ffd700;
}

.pbq-report-button {
  border-color: #b67cff;
  color: #d9baff;
}

.pbq-control-button:disabled,
.pbq-select:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.pbq-review {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 2px solid #ffd700;
}

.pbq-review > h2 {
  color: #ffd700;
}

.pbq-score-summary {
  color: #00f7ff;
  font-size: 1.15rem;
  font-weight: 800;
}

.pbq-review-card {
  margin-top: 14px;
  padding: 16px;
  border: 1px solid #00f7ff;
  border-radius: 9px;
  background: rgba(0, 0, 0, 0.5);
}

.pbq-review-card.is-correct {
  border-color: #67ff9a;
}

.pbq-review-card.is-incorrect {
  border-color: #ff5f7f;
}

.pbq-review-card h3 {
  margin-top: 0;
}

.pbq-review-explanation {
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  line-height: 1.55;
}

.pbq-campaign-report {
  margin-top: 20px;
  padding: 24px;
  border: 2px solid #b67cff;
  border-radius: 12px;
  background: rgba(8, 0, 24, 0.97);
  box-shadow: 0 0 20px rgba(182, 124, 255, 0.25);
}

.pbq-campaign-report:focus-visible {
  outline: 3px solid #ffd700;
  outline-offset: 3px;
}

.pbq-report-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.pbq-report-header h2,
.pbq-report-section h3 {
  margin-top: 0;
  color: #ffd700;
}

.pbq-report-subtitle {
  color: #00f7ff;
  font-weight: 700;
}

.pbq-report-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 20px 0;
}

.pbq-report-stat,
.pbq-performance-card,
.pbq-mission-result {
  padding: 16px;
  border: 1px solid rgba(0, 247, 255, 0.5);
  border-radius: 9px;
  background: rgba(0, 0, 0, 0.45);
}

.pbq-report-stat strong {
  display: block;
  margin-top: 5px;
  color: #ffd700;
  font-size: 1.3rem;
}

.pbq-report-section {
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.pbq-performance-grid,
.pbq-mission-results {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.pbq-performance-card h4,
.pbq-mission-result h4 {
  margin: 0 0 8px;
  color: #00f7ff;
}

.pbq-performance-card p,
.pbq-mission-result p {
  margin: 5px 0;
}

.pbq-performance-card.is-strong {
  border-color: #67ff9a;
}

.pbq-performance-card.is-weak,
.pbq-mission-result.is-revisit {
  border-color: #ff5f7f;
}

.pbq-performance-card.is-developing {
  border-color: #ffd700;
}

.pbq-report-progress {
  width: 100%;
  height: 13px;
  margin-top: 8px;
  accent-color: #00f7ff;
}

.pbq-report-list {
  margin: 0;
  padding-left: 22px;
}

.pbq-report-list li {
  margin: 10px 0;
  line-height: 1.45;
}

.pbq-mission-result button,
.pbq-report-close {
  min-height: 44px;
  margin-top: 10px;
}

.pbq-screen-reader-status {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

@media (max-width: 820px) {
  .pbq-status-panel,
  .pbq-mission-layout,
  .pbq-visual-labeling {
    grid-template-columns: 1fr;
  }

  .pbq-briefing-panel {
    position: static;
  }

  .pbq-configuration-table {
    min-width: 0;
  }

  .pbq-configuration-table thead {
    display: none;
  }

  .pbq-configuration-table,
  .pbq-configuration-table tbody,
  .pbq-configuration-table tr,
  .pbq-configuration-table th,
  .pbq-configuration-table td {
    display: block;
    width: 100%;
    box-sizing: border-box;
  }

  .pbq-configuration-table tr {
    margin-bottom: 16px;
    border: 1px solid rgba(0, 247, 255, 0.45);
  }

  .pbq-configuration-table td {
    border-width: 1px 0 0;
  }

  .pbq-cell-label {
    position: static;
    display: block;
    width: auto;
    height: auto;
    margin-bottom: 7px;
    overflow: visible;
    clip: auto;
    color: #00f7ff;
    font-weight: 700;
    white-space: normal;
  }

  .pbq-report-grid,
  .pbq-performance-grid,
  .pbq-mission-results {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 480px) {
  .pbq-arena-shell {
    width: min(100% - 20px, 1180px);
    padding-top: 18px;
  }

  .pbq-status-panel,
  .pbq-briefing-panel,
  .pbq-workspace-panel {
    padding: 16px;
  }

  .pbq-controls {
    display: grid;
    grid-template-columns: 1fr;
  }

  .pbq-control-button {
    width: 100%;
  }

  .pbq-campaign-report {
    padding: 16px;
  }

  .pbq-report-header {
    display: block;
  }

  .pbq-report-grid,
  .pbq-performance-grid,
  .pbq-mission-results {
    grid-template-columns: 1fr;
  }

  .pbq-report-close {
    width: 100%;
  }

}
#pbqReturnLink {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
}
