.pct-tool-surface {
  --pct-text: #edf3f8;
  --pct-muted: #a4b3bd;
  --pct-line: #3d4b57;
  --pct-teal: #90dacf;
  --pct-rainbow: linear-gradient(110deg, #a77855, #926069, #786598, #567f97, #628774);
  position: relative;
  isolation: isolate;
  width: 100%;
  min-width: 0;
  padding: clamp(16px, 2.3vw, 26px);
  border: 1px solid transparent;
  border-radius: 12px;
  background: linear-gradient(115deg, #161b22, #101820) padding-box, var(--pct-rainbow) border-box;
  color: var(--pct-text);
  color-scheme: dark;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.5;
  text-align: left;
  box-shadow: 0 18px 65px #0003;
}
.pct-tool-surface *, .pct-tool-surface *::before, .pct-tool-surface *::after { box-sizing: border-box; }
.pct-tool-surface :is(h2,p) { margin: 0; }
.pct-tool-surface :is(button,select,textarea) { font: inherit; }
.pct-tool-surface [hidden] { display: none !important; }
.pct-tool-surface :is(button,select,textarea,audio):focus-visible { outline: 2px solid var(--pct-teal); outline-offset: 3px; }
.pct-tool-surface :is(button,select) { cursor: pointer; }
.pct-tool-heading { padding-right: 20px; margin-bottom: 18px; }
.pct-tool-title { color: var(--pct-text); font-size: clamp(22px, 2.4vw, 30px); font-weight: 600; line-height: 1.2; letter-spacing: -.04em; }
.pct-tool-lead { max-width: 790px; margin-top: 8px !important; color: var(--pct-muted); font-size: 12px; line-height: 1.6; }
.pct-camera-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; }
.pct-camera-card { min-width: 0; }
.pct-field-label { display: flex; align-items: center; gap: 9px; color: #d4e0e7; font-size: 11px; font-weight: 500; line-height: 1.5; }
.pct-field-number { color: #90a2b2; font-size: 10px; font-variant-numeric: tabular-nums; }
.pct-camera-preview { display: block; width: 100%; height: auto; aspect-ratio: 1.72; margin-top: 9px; border: 1px solid #667b853d; border-radius: 6px; object-fit: cover; }
.pct-tool-surface .pct-select { display: block; width: 100%; min-width: 0; max-width: 100%; min-height: 38px; margin-top: 9px; padding: 8px 27px 8px 10px; border: 1px solid var(--pct-line); border-radius: 5px; background-color: #202a33; color: var(--pct-text); font-size: 12px; line-height: 1.4; }
.pct-camera-description { min-height: 3.2em; margin-top: 8px !important; color: var(--pct-muted); font-size: 11px; line-height: 1.6; overflow-wrap: anywhere; }
.pct-camera-footer { display: flex; justify-content: space-between; align-items: center; gap: 22px; margin-top: 17px; padding-top: 16px; border-top: 1px solid #4b5c684d; }
.pct-summary-box { min-width: 0; }
.pct-small-label { display: block; color: #a4b3bd; font-size: 10px; }
.pct-camera-summary { margin-top: 5px !important; color: #cbe2df; font-size: 12px; overflow-wrap: anywhere; }
.pct-observation { max-width: 660px; margin-top: 8px !important; color: #dec0a8; font-size: 11px; line-height: 1.6; }
.pct-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.pct-camera-footer > .pct-actions { flex: none; }
.pct-tool-surface .pct-button { display: inline-flex; justify-content: center; align-items: center; min-height: 40px; padding: 9px 13px; border: 1px solid #456f68; border-radius: 5px; background: #2b4741; color: #e0f3ee; font-size: 11px; font-weight: 500; line-height: 1.5; text-align: center; transition: background-color 140ms ease,border-color 140ms ease; }
.pct-tool-surface .pct-button:hover { background: #37594f; border-color: #85a99f; }
.pct-tool-surface .pct-button-quiet { background: #1f2a34; border-color: var(--pct-line); color: #bacbd6; }
.pct-tool-surface .pct-button-quiet:hover { background: #2a3742; border-color: #71838f; }
.pct-note { margin-top: 10px !important; color: #9dafbb; font-size: 10px; line-height: 1.65; }
.pct-status { color: #b9d7d2; font-size: 11px; line-height: 1.6; overflow-wrap: anywhere; }
.pct-status:not(:empty) { margin-top: 12px !important; }
.pct-tool-surface textarea { display: block; width: 100%; min-width: 0; border: 1px solid #42515f; border-radius: 6px; background: #0b121a; color: var(--pct-text); resize: vertical; }
.pct-tool-surface .pct-prompt-fallback { min-height: 150px; max-height: 300px; margin-top: 14px; padding: 12px; font-size: 11px; line-height: 1.7; }
.pct-audio-grid { display: grid; grid-template-columns: minmax(172px,.65fr) minmax(0,2fr); gap: 22px; }
.pct-audio-settings { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.pct-audio-field { display: block; }
.pct-audio-editors { min-width: 0; }
.pct-editor-heading, .pct-direction-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.pct-count { flex: none; color: #95aab7; font-size: 10px; font-variant-numeric: tabular-nums; line-height: 1.5; }
.pct-tool-surface .pct-script { min-height: 125px; max-height: 320px; padding: 12px 14px; font-size: 14px; line-height: 1.7; }
.pct-direction-heading { margin-top: 16px; }
.pct-delivery-flow { display: inline-flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 6px; color: #beb1d0; font-size: 10px; line-height: 1.5; }
.pct-delivery-step { padding: 3px 7px; border: 1px solid #6d657a75; border-radius: 4px; background: #2d2837; white-space: nowrap; }
.pct-delivery-arrow { color: #8796a4; }
.pct-tool-surface .pct-direction { min-height: 91px; max-height: 220px; padding: 10px 12px; font-size: 11px; line-height: 1.65; color: #c6d6e0; }
.pct-audio-editors > .pct-actions { margin-top: 13px; }
.pct-validation { color: #edbc9c; font-size: 11px; line-height: 1.6; margin-top: 8px !important; }
.pct-tool-surface textarea[aria-invalid="true"] { border-color: #c2856c; }
.pct-player-box { margin-top: 18px; padding: 15px 16px; border: 1px solid #4b61696b; border-radius: 7px; background: #1a2831; }
.pct-player-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 9px; }
.pct-settings-summary { margin-top: 3px; padding-top: 13px; border-top: 1px solid #4b5c684d; }
.pct-audio-summary { margin-top: 5px !important; color: #b6cbc9; font-size: 10px; overflow-wrap: anywhere; }
.pct-player-meta { color: #a1b6c1; font-size: 10px; text-align: right; overflow-wrap: anywhere; }
.pct-audio-player { display: block; width: 100%; min-width: 0; height: 40px; }
@media (max-width: 900px) {
  .pct-camera-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 15px; }
  .pct-camera-preview { aspect-ratio: 2.05; }
  .pct-camera-footer { align-items: flex-start; }
  .pct-camera-footer > .pct-actions { max-width: 185px; }
  .pct-audio-grid { grid-template-columns: 170px minmax(0,1fr); gap: 16px; }
  .pct-direction-heading { flex-wrap: wrap; gap: 6px; }
}
@media (max-width: 600px) {
  .pct-tool-surface { padding: 16px; border-radius: 8px; }
  .pct-tool-heading { padding-right: 16px; }
  .pct-audio-grid { grid-template-columns: minmax(0,1fr); }
  .pct-audio-settings { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
  .pct-audio-field:first-child { grid-column: 1 / -1; }
  .pct-camera-footer { flex-direction: column; gap: 13px; }
  .pct-camera-footer > .pct-actions { max-width: none; }
  .pct-player-heading { flex-direction: column; align-items: flex-start; gap: 5px; }
  .pct-settings-summary { grid-column: 1 / -1; }
  .pct-player-meta { text-align: left; }
  .pct-player-box { padding: 12px; }
  .pct-tool-surface .pct-select, .pct-tool-surface .pct-script, .pct-tool-surface .pct-direction { font-size: 16px; }
  .pct-tool-surface .pct-direction { line-height: 1.6; }
}
@media (max-width: 380px) {
  .pct-camera-grid { grid-template-columns: minmax(0,1fr); gap: 16px; }
  .pct-camera-preview { aspect-ratio: 2.15; }
  .pct-camera-description { min-height: 0; }
  .pct-editor-heading { flex-wrap: wrap; gap: 4px; }
  .pct-tool-surface .pct-button { padding-inline: 10px; }
  .pct-delivery-flow { justify-content: flex-start; }
}
@media (max-height: 700px) and (min-width: 901px) {
  .pct-tool-surface { padding: 16px 20px; }
  .pct-tool-heading { margin-bottom: 13px; }
  .pct-camera-preview { aspect-ratio: 1.95; }
  .pct-tool-surface .pct-script { min-height: 110px; }
  .pct-direction-heading { margin-top: 12px; }
  .pct-tool-surface .pct-direction { min-height: 74px; }
  .pct-player-box { margin-top: 14px; padding-block: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .pct-tool-surface .pct-button { transition: none; }
}
