/* v3 ADR Region Editor — Final Cut Pro inspired */

.adr-body {
  margin: 0;
  min-height: 100vh;
  background: #141414;
  color: #e8eaed;
  font-family: -apple-system, "SF Pro Text", "Helvetica Neue", "Noto Sans JP", sans-serif;
  font-size: 13px;
  -webkit-font-smoothing: antialiased;
}

.adr-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: linear-gradient(180deg, #1e1e1e 0%, #181818 100%);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.4);
}

.adr-topbar h1 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #f5f5f7;
}

.adr-topbar-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-shrink: 0;
}

.adr-topbar-panel {
  position: relative;
}

.adr-topbar-panel > summary {
  list-style: none;
  cursor: pointer;
}

.adr-topbar-panel > summary::-webkit-details-marker {
  display: none;
}

.adr-topbar-panel[open] > .adr-topbar-panel-body {
  display: block;
  position: absolute;
  top: calc(100% + 0.45rem);
  right: 0;
  z-index: 1300;
  width: min(22rem, calc(100vw - 1.5rem));
  max-height: min(70vh, 28rem);
  overflow: auto;
  padding: 0.95rem 1.05rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: #1c1f28;
  color: #eef1f6;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
}

.adr-bug-hint {
  margin: 0 0 0.65rem;
  color: rgba(235, 240, 250, 0.78);
  line-height: 1.45;
  font-size: 0.78rem;
}

.adr-bug-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
  font-size: 0.78rem;
}

.adr-bug-field > span {
  color: rgba(235, 240, 250, 0.72);
}

.adr-bug-field textarea {
  width: 100%;
  box-sizing: border-box;
  resize: vertical;
  min-height: 6.5rem;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: #12141a;
  color: #f2f4f8;
  font: inherit;
}

.adr-bug-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

.adr-shortcuts-help {
  position: fixed;
  inset: 0;
  z-index: 1120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2vh 2vw;
}

.adr-shortcuts-help[hidden] {
  display: none !important;
}

.adr-shortcuts-help-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(4px);
}

.adr-shortcuts-help-panel {
  position: relative;
  z-index: 1;
  width: min(92vw, 720px);
  max-height: min(90vh, 820px);
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  background: #161616;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
  overflow: hidden;
}

.adr-shortcuts-help-header {
  position: relative;
  padding: 1.1rem 1.25rem 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.adr-shortcuts-help-header h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: #f5f5f7;
}

.adr-shortcuts-help-lead {
  margin: 0.4rem 0 0;
  font-size: 0.78rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.5);
  padding-right: 2rem;
}

.adr-shortcuts-help-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  min-width: 2rem;
  padding: 0.2rem 0.45rem;
  font-size: 1.1rem;
  line-height: 1;
}

.adr-shortcuts-help-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 0.85rem 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.adr-shortcuts-section h3 {
  margin: 0 0 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: none;
  color: rgba(160, 200, 255, 0.9);
}

.adr-shortcuts-dl {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.adr-shortcuts-dl > div {
  display: grid;
  grid-template-columns: minmax(7.5rem, 11rem) minmax(0, 1fr);
  gap: 0.65rem 1rem;
  align-items: baseline;
  padding: 0.35rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.adr-shortcuts-dl dt {
  margin: 0;
  font-family: "SF Mono", "Menlo", ui-monospace, monospace;
  font-size: 0.78rem;
  font-weight: 500;
  color: rgba(255, 230, 160, 0.95);
  white-space: nowrap;
}

.adr-shortcuts-dl dd {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.78);
}

.adr-shortcuts-help-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

@media (max-width: 640px) {
  .adr-shortcuts-dl > div {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }
}

.adr-layout {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.5rem;
  height: calc(100vh - 44px);
  box-sizing: border-box;
  min-height: 0;
  background: #111;
}

.adr-top-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) 280px;
  gap: 0.5rem;
  align-items: stretch;
  flex-shrink: 0;
  min-height: 0;
}

.adr-video-panel {
  justify-self: start;
  width: fit-content;
  max-width: 100%;
  min-width: 0;
  padding: 0;
  background: #000;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
  position: relative;
}

.adr-video-inner {
  aspect-ratio: 16 / 9;
  height: min(34vh, 280px);
  width: calc(min(34vh, 280px) * 16 / 9);
  max-width: 100%;
  line-height: 0;
}

.adr-video-inner iframe,
.adr-video-inner .adr-yt-host {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: #000;
}

.adr-video-inner .adr-yt-host iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.adr-speaker-panel {
  width: 280px;
  max-width: 280px;
  justify-self: end;
  padding: 0;
  height: min(34vh, 280px);
  max-height: min(34vh, 280px);
  min-height: 0;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.adr-speaker-panel-scroll {
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 0.65rem;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
}

.adr-panel {
  background: #1c1c1c;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  overflow: hidden;
  min-height: 0;
}

.adr-panel-heading {
  margin: 0 0 0.5rem;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.45);
}

.adr-field-label {
  display: block;
  margin-bottom: 0.3rem;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.adr-select-full {
  width: 100%;
  margin-top: 0.15rem;
}

.adr-region-tools {
  margin-top: 0.65rem;
  padding-top: 0.65rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.adr-comment-panel {
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: min(34vh, 280px);
  max-height: min(34vh, 280px);
  padding: 0.65rem;
  box-sizing: border-box;
  gap: 0.55rem;
}

.adr-speaker-summary {
  flex: 0 0 auto;
  padding: 0.45rem 0.5rem 0.55rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.adr-speaker-summary[hidden] {
  display: none !important;
}

.adr-speaker-summary-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  margin-bottom: 0.35rem;
}

.adr-speaker-summary-label {
  margin-bottom: 0;
}

.adr-speaker-summary-close {
  flex: 0 0 auto;
  min-width: 1.6rem;
  height: 1.6rem;
  padding: 0;
  line-height: 1;
  font-size: 1rem;
  opacity: 0.7;
}

.adr-speaker-summary-close:hover {
  opacity: 1;
}

.adr-speaker-summary-name-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
  margin-bottom: 0.45rem;
}

.adr-speaker-summary-swatch {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 2px;
  flex-shrink: 0;
  background: rgba(255, 99, 132, 0.55);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.adr-speaker-summary-name {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.adr-speaker-summary-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.35rem;
  margin: 0;
}

.adr-speaker-summary-stats > div {
  min-width: 0;
  padding: 0.3rem 0.35rem;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.22);
}

.adr-speaker-summary-stats dt {
  margin: 0;
  font-size: 0.62rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.42);
}

.adr-speaker-summary-stats dd {
  margin: 0.12rem 0 0;
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
  color: rgba(255, 255, 255, 0.9);
}

.adr-cue-instruction {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1 1 auto;
}

.adr-cue-instruction[hidden] {
  display: none !important;
}

.adr-comment-hint {
  margin: 0 0 0.35rem;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.38);
  line-height: 1.35;
  flex-shrink: 0;
}

.adr-delete-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.adr-delete-modal[hidden] {
  display: none !important;
}

.adr-delete-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(2px);
}

.adr-delete-modal-card {
  position: relative;
  z-index: 1;
  width: min(100%, 360px);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.1rem 1.15rem;
  border-radius: 8px;
  background: #1e1e1e;
  border: 1px solid rgba(255, 120, 100, 0.35);
  box-shadow:
    0 16px 48px rgba(0, 0, 0, 0.55),
    inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.adr-delete-confirm-msg {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.55;
  color: rgba(255, 220, 210, 0.95);
  text-align: center;
}

.adr-merge-modal-card {
  border-color: rgba(120, 180, 255, 0.4);
}

.adr-merge-modal-card .adr-delete-confirm-msg {
  color: rgba(220, 235, 255, 0.95);
}

.adr-yesno-modal-card {
  border-color: rgba(255, 200, 120, 0.4);
}

.adr-yesno-modal-card .adr-delete-confirm-msg {
  color: rgba(255, 235, 210, 0.95);
}

.adr-confirm-review {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2vh 2vw;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(4px);
}

.adr-confirm-review[hidden] {
  display: none !important;
}

.adr-confirm-review-panel {
  width: min(96vw, 1100px);
  height: min(96vh, 920px);
  max-height: 96vh;
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  background: #161616;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
  overflow: hidden;
}

.adr-confirm-review-header {
  flex: 0 0 auto;
  padding: 1.25rem 1.4rem 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.adr-confirm-review-header h2 {
  margin: 0 0 0.35rem;
  font-size: 1.25rem;
  font-weight: 650;
  color: rgba(255, 255, 255, 0.95);
}

.adr-confirm-review-lead {
  margin: 0;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.45;
}

.adr-confirm-review-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.adr-confirm-review-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.85rem 1rem;
  align-items: start;
  padding: 0.9rem 1rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.adr-confirm-review-card--speaker {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.adr-confirm-review-card-summary {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.85rem 1rem;
  align-items: start;
  width: 100%;
}

.adr-confirm-review-card-name {
  margin: 0 0 0.55rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.94);
}

.adr-confirm-review-card-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem;
  margin: 0;
}

.adr-confirm-stat {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.12rem;
  margin: 0;
  padding: 0.4rem 0.45rem;
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  min-width: 0;
}

.adr-confirm-stat-label {
  font-size: 0.68rem;
  letter-spacing: 0.03em;
  color: rgba(255, 255, 255, 0.42);
}

.adr-confirm-stat-value {
  font-size: 0.95rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: rgba(255, 255, 255, 0.92);
}

.adr-confirm-stat--action {
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.adr-confirm-stat--action:hover,
.adr-confirm-stat--action:focus-visible {
  outline: none;
  border-color: rgba(120, 170, 255, 0.5);
  background: rgba(80, 120, 200, 0.16);
}

.adr-confirm-stat--action.adr-confirm-stat--active {
  border-color: rgba(120, 170, 255, 0.65);
  background: rgba(80, 120, 200, 0.24);
  box-shadow: inset 0 0 0 1px rgba(140, 190, 255, 0.2);
}

.adr-confirm-stat--action.adr-confirm-stat--active .adr-confirm-stat-label {
  color: rgba(170, 210, 255, 0.9);
}

.adr-confirm-review-card--speaker.adr-confirm-review-card--open {
  border-color: rgba(120, 170, 255, 0.4);
  background: rgba(80, 120, 200, 0.06);
}

.adr-confirm-review-card-details {
  width: 100%;
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.adr-confirm-review-details-empty {
  margin: 0;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.45);
}

.adr-confirm-review-cue-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  max-height: min(42vh, 360px);
  overflow: auto;
  padding-right: 0.15rem;
}

.adr-confirm-review-cue {
  padding: 0.65rem 0.75rem;
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.adr-confirm-review-cue--empty {
  border-color: rgba(255, 193, 7, 0.22);
  background: rgba(255, 193, 7, 0.06);
}

.adr-confirm-review-cue-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.65rem;
  margin-bottom: 0.4rem;
}

.adr-confirm-review-cue-index {
  font-size: 0.72rem;
  font-weight: 600;
  color: rgba(160, 200, 255, 0.9);
  font-variant-numeric: tabular-nums;
}

.adr-confirm-review-cue-time {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
  font-family: "SF Mono", "Menlo", ui-monospace, monospace;
  color: rgba(255, 255, 255, 0.72);
}

.adr-confirm-review-cue-badge {
  flex-shrink: 0;
  font-size: 0.68rem;
  padding: 0.12rem 0.4rem;
  border-radius: 999px;
  background: rgba(90, 180, 120, 0.18);
  color: rgba(170, 230, 190, 0.95);
  border: 1px solid rgba(90, 180, 120, 0.35);
}

.adr-confirm-review-cue-badge--empty {
  background: rgba(255, 193, 7, 0.12);
  color: rgba(255, 220, 140, 0.95);
  border-color: rgba(255, 193, 7, 0.35);
}

.adr-confirm-review-cue-comment {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  color: rgba(255, 255, 255, 0.88);
}

.adr-confirm-review-cue--empty .adr-confirm-review-cue-comment {
  color: rgba(255, 255, 255, 0.42);
  font-style: italic;
}

.adr-confirm-review-card-swatch {
  width: 0.85rem;
  height: 0.85rem;
  margin-top: 0.25rem;
  border-radius: 3px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.adr-confirm-review-card-body {
  min-width: 0;
}

.adr-confirm-review-actions {
  flex: 0 0 auto;
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  padding: 0.9rem 1.25rem 1.1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.2);
}

@media (max-width: 720px) {
  .adr-confirm-review-panel {
    width: 100%;
    height: 100%;
    max-height: none;
    border-radius: 0;
  }

  .adr-confirm-review-card-stats {
    grid-template-columns: 1fr;
  }
}

.adr-delete-confirm-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
}

.adr-cue-comment {
  width: 100%;
  box-sizing: border-box;
  padding: 0.5rem 0.55rem;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.35);
  color: #f0f0f0;
  font: inherit;
  line-height: 1.45;
  resize: none;
  flex: 1 1 auto;
  min-height: 4rem;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-y: auto;
}

.adr-cue-comment:empty:before {
  content: attr(data-placeholder);
  color: rgba(255, 255, 255, 0.35);
  pointer-events: none;
}

.adr-cue-comment:focus {
  outline: none;
  border-color: rgba(100, 160, 255, 0.55);
  box-shadow: 0 0 0 2px rgba(100, 160, 255, 0.15);
}

.adr-cue-comment:disabled,
.adr-cue-comment.is-disabled,
.adr-cue-comment[data-disabled="1"] {
  opacity: 0.45;
  cursor: not-allowed;
}

.adr-cue-comment.is-readonly {
  cursor: default;
}

.adr-tc-chip {
  display: inline;
  color: #5aa7ff;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: rgba(90, 167, 255, 0.45);
  text-underline-offset: 2px;
  user-select: none;
}

.adr-tc-chip:hover {
  color: #8bc4ff;
  text-decoration-color: rgba(139, 196, 255, 0.75);
}

.adr-lane-cue-tc-mark {
  position: absolute;
  top: 0;
  bottom: 0;
  /* Fill/border set per speaker via complementary tint (inline). */
  background: rgba(255, 210, 80, 0.42);
  border: 1px solid rgba(255, 220, 120, 0.9);
  box-shadow: none;
  border-radius: 1px;
  pointer-events: none;
  z-index: 4;
}

.adr-lanes--instruction-pick .adr-lane-cue--focused,
.adr-wave--instruction-pick {
  cursor: crosshair;
}

.adr-lanes--instruction-pick .adr-lane-cue--focused {
  cursor: crosshair;
}

.adr-range-preview--instruction {
  background: rgba(64, 156, 255, 0.35) !important;
  border-color: rgba(140, 200, 255, 0.9) !important;
}

.adr-timeline {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.adr-speaker-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.35rem;
  padding: 0.2rem 0.25rem;
  border-radius: 3px;
  cursor: pointer;
  transition: opacity 0.1s, box-shadow 0.1s;
}

.adr-speaker-row--active {
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.adr-speaker--dragging {
  opacity: 0.55;
  cursor: grabbing;
  z-index: 5;
}

.adr-speaker-drop-target--before {
  box-shadow: inset 0 2px 0 0 rgba(255, 255, 255, 0.85);
}

.adr-speaker-chip.adr-speaker-drop-target--before {
  box-shadow: inset 2px 0 0 0 rgba(255, 255, 255, 0.85);
}

.adr-speaker-drop-target--after {
  box-shadow: inset 0 -2px 0 0 rgba(255, 255, 255, 0.85);
}

.adr-speaker-chip.adr-speaker-drop-target--after {
  box-shadow: inset -2px 0 0 0 rgba(255, 255, 255, 0.85);
}

.adr-lane-label.adr-speaker-drop-target--before {
  box-shadow: inset 0 2px 0 0 rgba(255, 255, 255, 0.85);
}

.adr-lane-label.adr-speaker-drop-target--after {
  box-shadow: inset 0 -2px 0 0 rgba(255, 255, 255, 0.85);
}

.adr-lane-label.adr-lane-label--active.adr-speaker-drop-target--before {
  box-shadow: inset 3px 0 0 rgba(120, 180, 255, 0.85), inset 0 2px 0 0 rgba(255, 255, 255, 0.85);
}

.adr-lane-label.adr-lane-label--active.adr-speaker-drop-target--after {
  box-shadow: inset 3px 0 0 rgba(120, 180, 255, 0.85), inset 0 -2px 0 0 rgba(255, 255, 255, 0.85);
}

.adr-speaker-swatch {
  width: 12px;
  height: 12px;
  border-radius: 2px;
  flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.3);
}

.adr-speaker-label {
  flex: 1;
  min-width: 0;
  padding: 0.3rem 0.45rem;
  border-radius: 3px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.3);
  color: inherit;
  font-size: 0.82rem;
}

.adr-wave-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: #161616;
}

.adr-wave-toolbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.6rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
  background: linear-gradient(180deg, #222 0%, #1a1a1a 100%);
}

.adr-transport-left {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
  justify-self: start;
}

.adr-transport-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  justify-self: end;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.adr-audio-source-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.adr-audio-source-label {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.45);
  white-space: nowrap;
}

.adr-audio-source-select {
  min-width: 7.5rem;
  padding: 0.28rem 1.6rem 0.28rem 0.45rem;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.35)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.55)' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E")
    no-repeat right 0.4rem center;
  color: #f0f0f0;
  font: inherit;
  font-size: 0.78rem;
  appearance: none;
  cursor: pointer;
}

.adr-audio-source-select:disabled {
  opacity: 0.55;
  cursor: wait;
}

.adr-audio-source-select:focus {
  outline: none;
  border-color: rgba(100, 160, 255, 0.55);
  box-shadow: 0 0 0 2px rgba(100, 160, 255, 0.15);
}

.adr-transport-left .field-hint {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.35);
}

.adr-rate-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.4rem;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.28);
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
  color: rgba(180, 210, 255, 0.9);
}

.adr-filter-uncommented-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.55);
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}

.adr-filter-uncommented-wrap input {
  margin: 0;
  accent-color: #6ea8ff;
}

.adr-marker-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 4;
}

.adr-marker-tick {
  position: absolute;
  top: 0;
  width: 2px;
  height: 100%;
  margin-left: -1px;
  background: linear-gradient(180deg, #ffd54a 0%, rgba(255, 213, 74, 0.15) 100%);
  box-shadow: 0 0 6px rgba(255, 213, 74, 0.45);
}

.adr-filter-uncommented .adr-lane-cue--has-comment {
  opacity: 0.22;
  filter: saturate(0.35);
}

.adr-lane-cue--time-sliding {
  cursor: grabbing;
  outline: 1px dashed rgba(255, 255, 255, 0.45);
  outline-offset: -1px;
}

.adr-lanes--cue-time-sliding {
  cursor: grabbing;
}

.adr-current-time {
  justify-self: center;
  font-variant-numeric: tabular-nums;
  font-size: 0.88rem;
  font-weight: 500;
  text-align: center;
  color: #fff;
  white-space: nowrap;
  font-family: "SF Mono", "Menlo", monospace;
  letter-spacing: 0.02em;
}

.adr-audio-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 6.5rem;
  justify-content: center;
}

.adr-audio-toggle-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  background: currentColor;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolygon points='11 5 6 9 2 9 2 15 6 15 11 19 11 5'/%3E%3Cpath d='M15.54 8.46a5 5 0 0 1 0 7.07'/%3E%3Cpath d='M19.07 4.93a10 10 0 0 1 0 14.14'/%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolygon points='11 5 6 9 2 9 2 15 6 15 11 19 11 5'/%3E%3Cpath d='M15.54 8.46a5 5 0 0 1 0 7.07'/%3E%3Cpath d='M19.07 4.93a10 10 0 0 1 0 14.14'/%3E%3C/svg%3E") center / contain no-repeat;
}

.adr-audio-toggle[aria-pressed="false"] .adr-audio-toggle-icon {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolygon points='11 5 6 9 2 9 2 15 6 15 11 19 11 5'/%3E%3Cline x1='23' y1='9' x2='17' y2='15'/%3E%3Cline x1='17' y1='9' x2='23' y2='15'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolygon points='11 5 6 9 2 9 2 15 6 15 11 19 11 5'/%3E%3Cline x1='23' y1='9' x2='17' y2='15'/%3E%3Cline x1='17' y1='9' x2='23' y2='15'/%3E%3C/svg%3E");
}

.adr-audio-toggle[aria-pressed="false"] {
  opacity: 0.72;
}

.adr-skip-controls {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  flex-wrap: wrap;
}

.adr-skip-jump {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  margin: 0;
}

.adr-skip-input {
  width: 4.8rem;
  padding: 0.28rem 0.4rem;
  border-radius: 3px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.35);
  color: inherit;
  font: inherit;
  font-size: 0.82rem;
}

.adr-speaker-strip-wrap {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.55rem;
  padding: 0.35rem 0.6rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: #1a1a1a;
  flex-shrink: 0;
  min-width: 0;
}

.adr-speaker-strip-label {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.38);
  flex-shrink: 0;
  white-space: nowrap;
}

.adr-speaker-strip {
  display: flex;
  align-items: stretch;
  gap: 4px;
  min-width: 0;
  height: 24px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
}

.adr-speaker-chip {
  flex: 0 0 auto;
  width: max-content;
  min-width: 4.75rem;
  max-width: 14rem;
  height: 24px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 3px;
  cursor: pointer;
  padding: 0 10px;
  position: relative;
  transition: border-color 0.1s, box-shadow 0.1s, opacity 0.1s;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  font-size: 0.68rem;
  line-height: 1;
  color: rgba(255, 255, 255, 0.92);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.adr-speaker-chip:hover {
  border-color: rgba(255, 255, 255, 0.35);
}

.adr-speaker-chip--active {
  border-color: #fff;
  box-shadow: 0 0 0 1px #fff, 0 2px 8px rgba(0, 0, 0, 0.35);
  font-weight: 600;
}

.adr-zoom-hint {
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.32);
  white-space: nowrap;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

.adr-btn-sm {
  padding: 0.28rem 0.5rem;
  font-size: 0.78rem;
}

.adr-speaker-del {
  flex-shrink: 0;
  padding: 0.2rem 0.4rem;
  line-height: 1;
  opacity: 0.6;
  font-size: 0.85rem;
}

.adr-speaker-del:hover:not(:disabled) {
  opacity: 1;
  color: #ff6b6b;
}

.adr-speaker-del:disabled {
  opacity: 0.2;
  cursor: not-allowed;
}

.adr-track-viewport {
  flex: 1;
  position: relative;
  min-height: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.adr-playhead-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 20;
  overflow: hidden;
}

.adr-h-scroll {
  flex: 1;
  overflow-x: auto;
  overflow-y: hidden;
  min-height: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.adr-timeline-frame {
  flex: 1;
  display: flex;
  min-height: 0;
  overflow: hidden;
}

.adr-label-column {
  flex: 0 0 108px;
  width: 108px;
  display: flex;
  flex-direction: column;
  background: #1a1a1a;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  z-index: 5;
  min-height: 0;
  align-self: stretch;
}

.adr-wave-label-spacer {
  height: 112px;
  min-height: 112px;
  flex-shrink: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  box-sizing: border-box;
  background: #1a1a1a;
}

.adr-lane-labels {
  display: flex;
  flex-direction: column;
  flex: 1 1 0;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  position: relative;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.adr-lane-labels .adr-lane-label {
  flex: 0 0 44px;
  width: 100%;
  max-width: none;
  height: 44px;
  min-height: 44px;
  border-right: 0;
  cursor: pointer;
  user-select: none;
}

.adr-lane-label--active {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 3px 0 0 rgba(120, 180, 255, 0.85);
}

.adr-playhead-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 2px;
  background: #ffffff;
  transform: translateX(-50%);
  will-change: left;
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.55);
  z-index: 3;
}

.adr-hover-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 1px;
  transform: translateX(-50%);
  border-left: 1px dashed rgba(255, 255, 255, 0.35);
  opacity: 0;
  transition: opacity 0.08s;
  z-index: 2;
}

.adr-hover-line--visible {
  opacity: 1;
}

.adr-hover-time {
  position: absolute;
  top: 4px;
  left: 0;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.75);
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.68rem;
  font-family: "SF Mono", "Menlo", monospace;
  padding: 2px 5px;
  border-radius: 3px;
  opacity: 0;
  pointer-events: none;
  z-index: 4;
  white-space: nowrap;
}

.adr-hover-time--visible {
  opacity: 1;
}

.adr-range-preview {
  position: absolute;
  top: 112px;
  height: 0;
  left: 0;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 2px;
  opacity: 0;
  pointer-events: none;
  z-index: 1;
  box-sizing: border-box;
}

.adr-range-preview--visible {
  opacity: 1;
}

.adr-h-scroll-inner {
  min-width: 100%;
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.adr-h-scroll-inner--gesture {
  will-change: transform;
  backface-visibility: hidden;
}

.adr-waveform-host {
  position: relative;
  height: 112px;
  min-height: 112px;
  max-height: 112px;
  flex-shrink: 0;
  overflow: hidden;
}

.adr-wave-slot {
  width: 100%;
  height: 100%;
}

.adr-wave-slot--active {
  position: relative;
  visibility: visible;
  z-index: 1;
  pointer-events: auto;
}

.adr-wave-slot--inactive {
  position: absolute;
  inset: 0;
  visibility: hidden;
  z-index: 0;
  pointer-events: none;
}

.adr-wave-track-wrap {
  flex-shrink: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: #141414;
  overflow: hidden;
}

.adr-lanes-viewport {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  cursor: crosshair;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
}

.adr-lanes {
  display: flex;
  flex-direction: column;
}

.adr-lane-row {
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  box-sizing: border-box;
}

.adr-lane-row:nth-child(even) .adr-lane-track {
  background: rgba(255, 255, 255, 0.02);
}

.adr-lane-label {
  width: 100%;
  padding: 0 0.5rem;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.78);
  border-right: 1px solid rgba(255, 255, 255, 0.04);
  display: block;
  line-height: 44px;
  background: #1a1a1a;
  box-sizing: border-box;
  font-weight: 500;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.adr-lane-track {
  flex: 1;
  position: relative;
  background: rgba(0, 0, 0, 0.2);
  cursor: ew-resize;
  min-height: 44px;
  height: 100%;
}

.adr-lane-cue {
  position: absolute;
  top: 4px;
  bottom: 4px;
  min-width: 4px;
  border-radius: 2px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-sizing: border-box;
  cursor: grab;
  overflow: hidden;
  font-size: 0.68rem;
  padding: 0 5px;
  line-height: 1.3;
  display: flex;
  align-items: center;
  white-space: nowrap;
  text-overflow: ellipsis;
  user-select: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
  will-change: left, width;
}

.adr-lane-cue--has-comment::after {
  content: "";
  position: absolute;
  top: 3px;
  right: 3px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 4px rgba(255, 255, 255, 0.8);
}

.adr-lane-cue--auto {
  border-style: dashed;
  opacity: 0.92;
}

.adr-lane-cue--manual {
  border-style: solid;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.adr-lane-cue--focused {
  outline: 2px solid #fff;
  outline-offset: -1px;
  z-index: 3;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.25);
}

.adr-lane-cue--selected {
  outline: 2px solid rgba(100, 180, 255, 0.75);
  outline-offset: -1px;
  z-index: 2;
  box-shadow: 0 0 8px rgba(100, 180, 255, 0.35);
}

.adr-lane-cue--dragging {
  opacity: 0.28;
  pointer-events: none;
}

.adr-lane-cue--grab-ghost {
  position: absolute;
  top: 0;
  z-index: 20;
  pointer-events: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.35);
  opacity: 0.95;
}

.adr-lanes--cue-grabbing,
.adr-lanes--cue-grabbing .adr-lane-cue {
  cursor: grabbing;
}

.adr-lane-row--drop-target .adr-lane-track {
  background: rgba(120, 180, 255, 0.12);
  box-shadow: inset 0 0 0 1px rgba(160, 210, 255, 0.45);
}

.adr-lane-cue-resize {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 7px;
  cursor: ew-resize;
  z-index: 2;
}

.adr-lane-cue-resize--left {
  left: 0;
}

.adr-lane-cue-resize--right {
  right: 0;
}

.adr-btn {
  border: 0;
  border-radius: 4px;
  padding: 0.35rem 0.7rem;
  cursor: pointer;
  font: inherit;
  font-size: 0.82rem;
  transition: background 0.12s, opacity 0.12s;
}

.adr-btn-primary {
  background: linear-gradient(180deg, #e84545 0%, #c93030 100%);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.adr-btn-primary:hover {
  background: linear-gradient(180deg, #f05555 0%, #d83838 100%);
}

.adr-btn-ghost {
  background: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.adr-btn-ghost:hover {
  background: rgba(255, 255, 255, 0.12);
}

.adr-status {
  font-size: 0.78rem;
  opacity: 0.8;
  margin: 0.15rem 0 0;
  white-space: pre-wrap;
  line-height: 1.45;
}

.adr-status[data-kind="err"] {
  color: #ff7b7b;
}

.adr-status[data-kind="ok"] {
  color: #6dd99a;
}

.adr-request-page {
  max-width: 640px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.adr-request-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 1.25rem;
}

.adr-drafts-panel {
  margin-top: 1rem;
}

.adr-drafts-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}

.adr-drafts-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
}

.adr-drafts-count {
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
  color: rgba(255, 255, 255, 0.45);
}

.adr-drafts-lead {
  margin: 0 0 0.85rem;
  font-size: 0.8rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.48);
}

.adr-drafts-empty {
  margin: 0;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.4);
}

.adr-draft-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.adr-draft-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0.75rem;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.07);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.adr-draft-row:hover,
.adr-draft-row:focus-visible {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(0, 0, 0, 0.34);
  outline: none;
}

.adr-draft-row-meta {
  min-width: 0;
  flex: 1 1 auto;
}

.adr-draft-row-title {
  margin: 0 0 0.28rem;
  font-size: 0.88rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.adr-draft-row-sub {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.65rem;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.48);
}

.adr-draft-status {
  display: inline-flex;
  align-items: center;
  padding: 0.08rem 0.4rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.75);
}

.adr-draft-status--confirmed {
  border-color: rgba(100, 180, 255, 0.35);
  background: rgba(80, 140, 220, 0.16);
  color: rgba(170, 210, 255, 0.95);
}

.adr-draft-status--processing {
  border-color: rgba(255, 193, 7, 0.35);
  background: rgba(255, 193, 7, 0.1);
  color: rgba(255, 220, 140, 0.95);
}

.adr-draft-page {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: flex;
  flex-direction: column;
  background: #101010;
}

.adr-draft-page[hidden] {
  display: none !important;
}

body.adr-draft-page-open {
  overflow: hidden;
}

.adr-draft-page-top {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.35);
}

.adr-draft-page-title {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
  font-size: 1rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.adr-draft-page-top-actions {
  display: flex;
  flex-shrink: 0;
  gap: 0.4rem;
  align-items: center;
}

.adr-draft-page-top-actions .adr-btn {
  padding: 0.32rem 0.65rem;
  font-size: 0.78rem;
}

.adr-draft-page-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.adr-draft-page-meta {
  margin: 0;
}

.adr-draft-page-sub {
  margin: 0;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.58);
}

.adr-draft-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 1rem;
  align-items: start;
}

.adr-draft-detail-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.adr-draft-detail-field {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
}

.adr-draft-detail-label {
  font-size: 0.7rem;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.45);
}

.adr-draft-detail-id {
  display: block;
  padding: 0.35rem 0.45rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.72rem;
  word-break: break-all;
  color: rgba(210, 230, 255, 0.92);
}

.adr-draft-memo {
  width: 100%;
  resize: vertical;
  min-height: 4.2rem;
  padding: 0.45rem 0.5rem;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.28);
  color: rgba(255, 255, 255, 0.9);
  font: inherit;
  font-size: 0.8rem;
  line-height: 1.4;
}

.adr-draft-memo:focus {
  outline: none;
  border-color: rgba(120, 180, 255, 0.45);
}

.adr-draft-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.adr-draft-detail-actions .adr-btn {
  padding: 0.35rem 0.7rem;
  font-size: 0.78rem;
}

.adr-draft-cast.is-disabled,
#adrReqDraftPageCast.is-disabled,
#adrReqDraftPageCast[aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed;
}

.adr-draft-detail-video {
  width: 220px;
  max-width: 100%;
}

.adr-draft-video-embed {
  display: block;
  width: 220px;
  height: 124px;
  border: 0;
  border-radius: 6px;
  background: #000;
}

.adr-draft-video-empty {
  margin: 0;
  padding: 1.2rem 0.5rem;
  text-align: center;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.4);
  border-radius: 6px;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.2);
}

.adr-draft-page-confirm {
  display: flex;
  flex-direction: column;
  min-height: min(70vh, 720px);
  border-radius: 12px;
  background: #161616;
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.adr-draft-confirm-list {
  flex: 1 1 auto;
  min-height: 240px;
}

.adr-draft-confirm-actions {
  justify-content: flex-end;
}

@media (max-width: 720px) {
  .adr-draft-page-top {
    flex-wrap: wrap;
  }

  .adr-draft-page-top-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .adr-draft-detail-grid {
    grid-template-columns: 1fr;
  }

  .adr-draft-detail-video,
  .adr-draft-video-embed {
    width: 100%;
  }

  .adr-draft-video-embed {
    height: auto;
    aspect-ratio: 16 / 9;
  }
}

.adr-field {
  margin-bottom: 1rem;
}

.adr-field label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.92rem;
}

.adr-field input,
.adr-field select {
  width: 100%;
  box-sizing: border-box;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.2);
  color: inherit;
}

@media (max-width: 900px) {
  .adr-layout {
    height: auto;
    min-height: calc(100vh - 44px);
  }
  .adr-top-row {
    grid-template-columns: 1fr;
  }
  .adr-comment-panel {
    width: 100%;
    height: auto;
    max-height: none;
    min-height: 140px;
  }
  .adr-cue-comment {
    min-height: 100px;
    resize: vertical;
  }
  .adr-speaker-panel {
    width: 100%;
    max-height: none;
    height: auto;
  }
  .adr-video-inner {
    width: 100%;
    height: auto;
  }
  .adr-wave-toolbar {
    grid-template-columns: 1fr;
    justify-items: stretch;
  }
  .adr-current-time {
    order: -1;
    justify-self: center;
  }
  .adr-transport-right {
    justify-self: end;
  }
  .adr-zoom-hint {
    display: none;
  }
}

/* v3 ADR casting page */
.adr-casting-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 1rem;
}

.adr-casting-desc {
  margin: 0 0 1rem;
  color: #b0b3b8;
  line-height: 1.55;
  font-size: 0.9rem;
}

.adr-cast-slots {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.adr-cast-card {
  background: #1c1c1e;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 1rem;
}

.adr-cast-card-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.adr-cast-card-head h2 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  flex: 1;
}

.adr-cast-speaker-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.adr-cast-duration {
  font-size: 0.8rem;
  color: #9aa0a6;
}

.adr-cast-modes {
  display: flex;
  gap: 1rem;
  margin-bottom: 0.5rem;
  font-size: 0.85rem;
}

.adr-cast-modes label {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
}

.adr-cast-pick {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.adr-cast-pick.hidden {
  display: none;
}

.adr-cast-recruit-note {
  margin: 0;
  font-size: 0.8rem;
  color: #9aa0a6;
  line-height: 1.45;
}

.adr-cast-quote {
  margin-top: 1.25rem;
  padding: 1rem;
  background: #1c1c1e;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
}

.adr-cast-quote.hidden {
  display: none;
}

.adr-cast-quote-table {
  width: 100%;
  font-size: 0.85rem;
}

.adr-cast-quote .quote-total {
  margin: 0.75rem 0 0;
  font-size: 0.95rem;
}

.adr-offline-banner {
  margin: 0;
  padding: 0.65rem 1rem;
  background: rgba(255, 193, 7, 0.12);
  border-bottom: 1px solid rgba(255, 193, 7, 0.35);
  color: #f5d66a;
  font-size: 0.85rem;
  line-height: 1.45;
}

.adr-offline-banner[hidden] {
  display: none;
}

.adr-cast-voice-hint {
  margin: 0 0 0.75rem;
  padding: 0.65rem 0.75rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  color: #b0b3b8;
  font-size: 0.85rem;
  line-height: 1.5;
}

.adr-cast-recruit {
  margin-top: 0.75rem;
  padding: 0.75rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.adr-cast-recruit.hidden {
  display: none;
}

.adr-cast-recruit-heading {
  margin: 0 0 0.65rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #e8eaed;
}

.adr-cast-recruit-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem 0.75rem;
}

.adr-cast-recruit-full {
  grid-column: 1 / -1;
}

.adr-cast-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.adr-cast-field .adr-field-label {
  font-size: 0.8rem;
  color: #b0b3b8;
}

.adr-input {
  width: 100%;
  box-sizing: border-box;
  padding: 0.45rem 0.55rem;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #141414;
  color: #f5f5f7;
  font-size: 0.85rem;
}

.adr-input:focus {
  outline: none;
  border-color: rgba(255, 99, 132, 0.55);
}

.adr-cast-field .field-hint {
  font-size: 0.75rem;
  color: #9aa0a6;
  line-height: 1.35;
}

@media (max-width: 560px) {
  .adr-cast-recruit-grid {
    grid-template-columns: 1fr;
  }
}

/* ADR casting — 声優一覧モーダル（画面約 80%） */
html.adr-talent-modal-open,
body.adr-talent-modal-open {
  overflow: hidden !important;
  overscroll-behavior: none;
  touch-action: none;
}

.adr-talent-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10vh 10vw;
  box-sizing: border-box;
  overscroll-behavior: none;
  touch-action: none;
}

.adr-talent-modal[hidden] {
  display: none !important;
}

.adr-talent-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.58);
  cursor: pointer;
  overscroll-behavior: none;
}

.adr-talent-modal-panel {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: 80vw;
  max-width: 1200px;
  height: 80vh;
  max-height: 900px;
  border-radius: 12px;
  background: #1a1a1c;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
  overflow: hidden;
  overscroll-behavior: contain;
  touch-action: auto;
}

.adr-talent-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, #222225 0%, #1a1a1c 100%);
  flex-shrink: 0;
}

.adr-talent-modal-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: #f5f5f7;
}

.adr-talent-modal-sub {
  margin: 0.2rem 0 0;
  font-size: 0.82rem;
  color: #9aa0a6;
}

.adr-talent-modal-close {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border: none;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: #f5f5f7;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.adr-talent-modal-close:hover {
  background: rgba(255, 255, 255, 0.14);
}

.adr-talent-modal-filters {
  flex-shrink: 0;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: #161618;
  overflow: auto;
  max-height: 42%;
  overscroll-behavior: contain;
}

.adr-talent-modal-filters .filter-title {
  margin: 0 0 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #c8ccd0;
}

.adr-talent-filter-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem 0.75rem;
  margin-bottom: 0.55rem;
}

.adr-talent-online-only {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  color: #b0b3b8;
  align-self: end;
  padding-bottom: 0.35rem;
}

.adr-talent-filter-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.35rem;
}

.adr-talent-picker-count {
  margin-left: auto;
  font-size: 0.8rem;
  color: #9aa0a6;
}

.adr-talent-picker-grid {
  flex: 1;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 1rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.85rem;
  align-content: start;
  touch-action: pan-y;
}

.adr-talent-picker-grid .talent-card {
  min-width: 0;
  max-width: none;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.adr-talent-pick-bio {
  margin: 0 0 0.5rem;
  font-size: 0.78rem;
  line-height: 1.45;
  color: #9aa0a6;
}

.adr-talent-picker-grid .talent-tags {
  margin-bottom: 0.65rem;
  flex: 1;
}

.adr-talent-picker-grid .talent-cta {
  margin-top: auto;
  width: 100%;
}

.adr-talent-picker-empty {
  grid-column: 1 / -1;
  margin: 2rem auto;
  text-align: center;
  color: #9aa0a6;
  font-size: 0.9rem;
  line-height: 1.55;
  max-width: 28rem;
}

@media (max-width: 720px) {
  .adr-talent-modal {
    padding: 5vh 5vw;
  }
  .adr-talent-modal-panel {
    width: 90vw;
    height: 85vh;
  }
  .adr-talent-filter-row {
    grid-template-columns: 1fr;
  }
}

/* ─── ADR captions (Whisper overlay + panel) ─────────────────────────── */
.adr-caption-root {
  position: relative;
}

.rw-ref-video-panel.adr-caption-root,
.rw-ref-video-panel {
  position: relative;
}

.adr-caption-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
}

.adr-caption-overlay:not([hidden]) {
  pointer-events: auto;
}

.adr-caption-overlay-box {
  position: absolute;
  max-width: min(92%, 36rem);
  min-width: 4rem;
  pointer-events: auto;
  cursor: grab;
  touch-action: none;
}

.adr-caption-overlay-box:active {
  cursor: grabbing;
}

.adr-caption-overlay-text {
  display: inline-block;
  max-width: 100%;
  padding: 0.45em 0.75em;
  border-radius: 8px;
  background: rgba(8, 10, 14, 0.72);
  color: #f4f6f8;
  line-height: 1.45;
  font-weight: 600;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
  white-space: pre-wrap;
  word-break: break-word;
  user-select: none;
}

.adr-caption-overlay[data-size="sm"] .adr-caption-overlay-text:not([style*="font-size"]) {
  font-size: 0.85rem;
}
.adr-caption-overlay[data-size="md"] .adr-caption-overlay-text:not([style*="font-size"]) {
  font-size: 1.15rem;
}
.adr-caption-overlay[data-size="lg"] .adr-caption-overlay-text:not([style*="font-size"]) {
  font-size: 1.55rem;
}

.adr-caption-resize-handle {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.5);
  cursor: nwse-resize;
  touch-action: none;
  z-index: 2;
}

.adr-caption-resize-handle--overlay {
  right: -4px;
  bottom: -4px;
}

.adr-caption-resize-handle--panel {
  right: 4px;
  bottom: 4px;
}

body.adr-caption-dragging {
  user-select: none;
  cursor: grabbing;
}

.adr-caption-panel {
  position: fixed;
  top: 4.5rem;
  right: 0.75rem;
  width: min(22rem, 42vw);
  height: min(26rem, 55vh);
  max-height: calc(100vh - 5.5rem);
  z-index: 40;
  display: flex;
  flex-direction: column;
  background: #12151a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  overflow: hidden;
  --adr-caption-panel-font: 0.9rem;
}

.adr-caption-panel[hidden] {
  display: none !important;
}

.adr-caption-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.55rem 0.7rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  cursor: grab;
  touch-action: none;
  flex-shrink: 0;
}

.adr-caption-panel-head:active {
  cursor: grabbing;
}

.adr-caption-panel-title {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 650;
  pointer-events: none;
}

.adr-caption-panel-hint {
  font-size: 0.68rem;
  color: #7a8088;
  white-space: nowrap;
  pointer-events: none;
}

.adr-caption-panel-body {
  overflow: auto;
  padding: 0.4rem;
  flex: 1;
  min-height: 0;
}

.adr-caption-line-text {
  font-size: var(--adr-caption-panel-font, 0.9rem);
}

.adr-caption-panel[data-size="sm"] .adr-caption-line-text {
  font-size: var(--adr-caption-panel-font, 0.78rem);
}
.adr-caption-panel[data-size="md"] .adr-caption-line-text {
  font-size: var(--adr-caption-panel-font, 0.9rem);
}
.adr-caption-panel[data-size="lg"] .adr-caption-line-text {
  font-size: var(--adr-caption-panel-font, 1.05rem);
}

.adr-caption-line {
  display: grid;
  grid-template-columns: 3.6rem 1fr;
  gap: 0.45rem;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0.4rem 0.45rem;
  border-radius: 8px;
  cursor: pointer;
}

.adr-caption-line:hover {
  background: rgba(255, 255, 255, 0.05);
}

.adr-caption-line.is-active {
  background: rgba(88, 166, 255, 0.16);
}

.adr-caption-line-time {
  font-variant-numeric: tabular-nums;
  font-size: 0.72rem;
  color: #9aa0a6;
  padding-top: 0.12rem;
}

.adr-caption-line-text {
  line-height: 1.4;
  white-space: pre-wrap;
  word-break: break-word;
}

.adr-caption-empty {
  margin: 0.75rem;
  color: #9aa0a6;
  font-size: 0.85rem;
  line-height: 1.5;
}

@media (max-width: 900px) {
  .adr-caption-panel {
    width: min(100vw - 1rem, 22rem);
    right: 0.5rem;
    left: auto;
    max-height: 40vh;
    top: auto;
    bottom: 0.5rem;
  }
}

