/* 「릴스 속도 테스트」 (/admin/reels/test). One column read like an instrument panel: start, verdict, per-setting
   readings, the phone-made reel, the browser, sending. Text uses the text-safe tokens; the light tokens only fill. */

.rt {
  display: grid;
  gap: 1rem;
  max-width: 42rem;
}

.rt-panel {
  display: grid;
  gap: 0.85rem;
  min-width: 0;
}

.rt-panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.25rem 0.75rem;
}

.rt-panel h2 {
  margin: 0;
}

.rt-note {
  margin: 0;
  color: var(--kk-text-secondary);
  font-size: 0.9rem;
}

/* The reel: 0.5-second cuts, then the first photo held 2 seconds. Widths are each part's share of the reel. */
.rt-timeline {
  display: grid;
  gap: 0.35rem;
}

.rt-timeline-bar {
  display: flex;
  height: 2.1rem;
  overflow: hidden;
  border: 1px solid var(--kk-line-strong);
  border-radius: var(--kk-radius-sm);
}

.rt-timeline-bar span {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  overflow: hidden;
  white-space: nowrap;
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
  color: var(--kk-text);
  background: var(--kk-gold-soft);
  border-right: 1px solid var(--kk-line-strong);
}

.rt-timeline-bar span:nth-child(even) {
  background: var(--kk-bg);
}

.rt-timeline-bar span.rt-hold {
  background: var(--kk-ink);
  color: var(--kk-bg);
  border-right: 0;
}

.rt-timeline-scale {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--kk-text-secondary);
  font-variant-numeric: tabular-nums;
}

.rt-choice {
  display: grid;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

.rt-choice legend {
  margin-bottom: 0.25rem;
  font-size: 1rem;
  font-weight: 600;
}

.rt-option {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-height: var(--kk-touch);
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--kk-line-strong);
  border-radius: var(--kk-radius-sm);
  cursor: pointer;
}

.rt-option:has(input:checked) {
  border-color: var(--kk-accent);
  background: var(--kk-gold-soft);
}

.rt-option input {
  flex: 0 0 auto;
  width: 1.25rem;
  height: 1.25rem;
  margin: 0;
  accent-color: var(--kk-cta-bg);
}

.rt-option small {
  display: block;
  color: var(--kk-text-secondary);
  font-size: 0.8rem;
}

.rt-file-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
}

.rt-file-pick {
  display: inline-flex;
  align-items: center;
  min-height: var(--kk-touch);
  margin: 0;
}

.visually-hidden:focus-visible + .rt-file-pick {
  outline: 3px solid var(--kk-focus-ring);
  outline-offset: 2px;
}

.rt-field {
  display: grid;
  gap: 0.35rem;
}

.rt-field .form-control {
  min-height: var(--kk-touch);
  font-size: 16px;
}

.rt-start {
  width: 100%;
  min-height: 48px;
  font-weight: 700;
}

.rt-progress {
  display: grid;
  gap: 0.35rem;
}

.rt-progress-track {
  height: 0.5rem;
  overflow: hidden;
  border-radius: var(--kk-radius-pill);
  background: var(--kk-gold-soft);
}

.rt-progress-fill {
  width: 0;
  height: 100%;
  background: var(--kk-accent);
  transition: width 0.25s ease;
}

.rt-status {
  margin: 0;
}

.rt-verdict {
  display: grid;
  gap: 0.75rem;
}

.rt-verdict p {
  margin: 0;
}

.rt-verdict-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
}

.rt-headline {
  font-size: 2rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.rt-headline small {
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--kk-text-secondary);
}

.rt-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.15rem 0.75rem;
  border-radius: var(--kk-radius-pill);
  font-size: 0.85rem;
  font-weight: 700;
  white-space: nowrap;
}

.rt-pill::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: currentColor;
}

.rt-pill-ok {
  color: var(--kk-success-text);
  background: var(--kk-success-bg);
}

.rt-pill-warn {
  color: var(--kk-warn-text);
  background: var(--kk-warn-bg);
}

.rt-pill-bad {
  color: var(--kk-danger-text);
  background: var(--kk-danger-bg);
}

.rt-pill-quiet {
  color: var(--kk-text-secondary);
  background: var(--kk-bg);
  border: 1px solid var(--kk-line-strong);
}

/* Time split: a stacked bar and a label list in the same order and colours. */
.rt-split-bar {
  display: flex;
  height: 0.75rem;
  overflow: hidden;
  border-radius: var(--kk-radius-pill);
  background: var(--kk-gold-soft);
}

.rt-split-bar i {
  display: block;
  height: 100%;
}

.rt-split-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  gap: 0.35rem 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rt-split-list li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  font-size: 0.875rem;
}

.rt-split-list b {
  margin-left: auto;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.rt-swatch {
  flex: 0 0 auto;
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 3px;
}

.rt-c-read { background: var(--kk-warn); }
.rt-c-compose { background: var(--kk-info); }
.rt-c-encode { background: var(--kk-accent); }
.rt-c-mux { background: var(--kk-success); }

.rt-notes {
  display: grid;
  gap: 0.25rem;
  margin: 0;
  padding-left: 1.2em;
}

.rt-readings {
  display: grid;
  gap: 0.65rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rt-reading {
  display: grid;
  gap: 0.4rem;
  min-width: 0;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--kk-line-strong);
  border-radius: var(--kk-radius-sm);
}

.rt-reading-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem 0.65rem;
}

.rt-reading-name {
  font-weight: 700;
}

.rt-reading-name code {
  display: block;
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--kk-text-secondary);
}

.rt-reading dl,
.rt-env {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: 0.25rem 1rem;
  margin: 0;
}

.rt-reading dl div,
.rt-env div {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  min-width: 0;
  font-size: 0.85rem;
}

.rt-env div {
  padding-block: 0.2rem;
  border-bottom: 1px dashed var(--kk-line-strong);
}

.rt-reading dt,
.rt-env dt {
  font-weight: 400;
  color: var(--kk-text-secondary);
}

.rt-reading dd,
.rt-env dd {
  margin: 0;
  text-align: right;
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}

.rt-player {
  aspect-ratio: 9 / 16;
  max-width: 100%;
}

.rt-copy-area {
  min-height: 10rem;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 16px;
}

.rt-details summary {
  padding-block: 0.6rem;
  font-weight: 600;
  cursor: pointer;
}

.rt-log {
  max-height: 18rem;
  margin: 0.5rem 0 0;
  padding: 0.65rem;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 0.72rem;
  line-height: 1.5;
  color: var(--kk-text);
  background: var(--kk-bg);
  border-radius: var(--kk-radius-sm);
}

@media (prefers-reduced-motion: reduce) {
  .rt-progress-fill {
    transition: none;
  }
}
