:root {
  --page-bg: #020617;
  --surface-1: rgba(15, 23, 42, 0.9);
  --surface-2: rgba(2, 6, 23, 0.8);
  --surface-3: #0f172a;
  --border-color: rgba(148, 163, 184, 0.28);
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --accent: #38bdf8;
  --accent-hover: #0ea5e9;
  --accent-contrast: #082f49;
  --button-bg: #0f172a;
  --button-text: #f8fafc;
  --highlight-bg: rgba(152, 224, 255, 0.94);
  --highlight-hover: rgba(56, 189, 248, 0.18);
  --highlight-text: #000000;
  --progress-track: #1e293b;
  --progress-fill: #38bdf8;
  --app-font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --app-font-size: 1rem;
  --app-heading-size: 2.25rem;
}

body {
  background: var(--page-bg);
  color: var(--text-primary);
  font-family: var(--app-font-family);
  font-size: var(--app-font-size);
}

.app-frame.flex-col {
  align-items: stretch;
  justify-content: flex-start;
  max-width: 1440px;
}

.app-frame > .relative {
  display: flex;
  flex: 1;
  flex-direction: column;
  max-width: none;
  min-height: calc(100vh - 5rem);
}

.app-heading {
  position: relative;
  margin-bottom: 1.25rem;
  padding-right: 6rem;
}

.header-actions {
  z-index: 2;
}

.header-actions #customizeToggle,
.header-actions #infoToggle {
  border-color: var(--accent);
  background-color: var(--accent);
  color: var(--header-icon-color, var(--accent-contrast));
  box-shadow: 0 0 0 3px var(--surface-1);
}

.header-actions #customizeToggle:hover,
.header-actions #infoToggle:hover {
  border-color: var(--accent-hover);
  background-color: var(--accent-hover);
  color: var(--header-icon-color, var(--accent-contrast));
}

.app-heading h1 {
  margin-top: 0.3rem;
  font-size: clamp(1.5rem, 2rem, 2rem);
}

.app-brand {
  display: grid;
  width: max-content;
  max-width: 100%;
  grid-template-columns: 3.75rem auto;
  align-items: center;
  gap: 0.65rem;
  white-space: nowrap;
}

.app-brand-logo {
  width: 3.75rem;
  height: 3.75rem;
  flex: 0 0 auto;
  object-fit: contain;
}

.app-brand span {
  font-family: 'Exo 2', 'Trebuchet MS', sans-serif;
  font-size: 2rem;
  font-weight: 700;
}

.workspace-layout {
  display: grid;
  flex: 1;
  grid-template-columns: minmax(250px, 0.72fr) minmax(0, 1.55fr);
  gap: 1rem;
  min-height: 0;
}

.left-column {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 0.75rem;
}

.settings-modal {
  width: min(58rem, calc(100vw - 2rem));
  max-width: none;
  max-height: calc(100dvh - 2rem);
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  background: var(--surface-1);
  color: var(--text-primary);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
}

.settings-modal[open] {
  display: flex;
  flex-direction: column;
}

.settings-modal::backdrop {
  background: rgba(2, 6, 23, 0.76);
  backdrop-filter: blur(3px);
}

.settings-modal-header {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
}

.settings-modal-content {
  min-height: 0;
  overflow-y: auto;
  padding: 1rem;
  overscroll-behavior: contain;
  scrollbar-color: var(--accent) var(--surface-2);
  scrollbar-width: thin;
}

.settings-options {
  margin-top: 0;
}

.upload-panel,
#status,
#modelDownloadDebug,
.transcription-status,
.transcript-panel,
.media-panel {
  border: 1px solid var(--border-color);
  background: var(--surface-1);
}

.upload-title {
  display: block;
}

.audio-drop-zone {
  min-height: 10rem;
  cursor: pointer;
  border-color: var(--border-color);
  background: var(--surface-2);
}

.audio-drop-zone:hover,
.audio-drop-zone.is-dragging {
  border-color: var(--accent);
  background: var(--highlight-hover);
}

.audio-drop-zone input[type="file"] {
  max-width: 100%;
}

.audio-drop-zone:focus-within {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.audio-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  clip-path: inset(50%);
  border: 0;
}

.choose-file-button {
  display: inline-flex;
  min-width: 8rem;
  min-height: 2.75rem;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.25rem;
  border: 1px solid var(--border-color);
  border-radius: 9999px;
  background: var(--button-bg);
  color: var(--button-text);
  font-size: 0.9rem;
  font-weight: 600;
  transition: background-color 160ms ease, border-color 160ms ease;
}

.audio-drop-zone:hover .choose-file-button,
.audio-drop-zone.is-dragging .choose-file-button {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-contrast);
}

.selected-file-name {
  max-width: 100%;
  overflow-wrap: anywhere;
}

.right-column {
  display: grid;
  min-width: 0;
  min-height: min(70vh, 820px);
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 0.75rem;
}

.transcription-status {
  padding: 0.85rem 1rem;
  border-radius: 1rem;
}

.transcription-status #debugInfo {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text-secondary);
}

.transcription-status #progressContainer {
  margin-top: 1rem;
  padding: 0;
  border: 0;
  background: transparent !important;
}

.progress-status-row {
  min-height: 2rem;
  padding-inline: 0.65rem;
}

.transcription-status #progressContainer > div:last-child {
  margin: 1.5rem 0.5rem 0;
}

.transcript-panel {
  display: flex;
  min-height: 0;
  flex-direction: column;
  margin: 0;
}

.transcript-panel > div:first-child {
  flex: 0 0 auto;
}

.transcript-display {
  position: relative;
  flex: 1 1 auto;
  min-height: min(48vh, 620px);
  max-height: 64vh;
}

#transcript {
  width: 100%;
  height: 100%;
  min-height: 100%;
  max-height: 100%;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-color: var(--accent) var(--surface-2);
  scrollbar-width: thin;
}

.transcript-loading {
  position: absolute;
  z-index: 1;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  background: color-mix(in srgb, var(--surface-2) 72%, transparent);
}

.transcript-loading[hidden] {
  display: none;
}

.dots-bounce {
  --size: 2.4rem;
  --speed: 1;
  display: inline-flex;
  align-items: flex-end;
  gap: calc(var(--size) / 6);
  height: var(--size);
}

.dots-bounce span {
  width: calc(var(--size) / 4);
  height: calc(var(--size) / 4);
  border-radius: 50%;
  background: var(--accent);
  animation: transcript-dot-bounce calc(0.9s * var(--speed)) ease-in-out infinite;
}

.dots-bounce span:nth-child(2) {
  animation-delay: 0.1s;
}

.dots-bounce span:nth-child(3) {
  animation-delay: 0.2s;
}

@keyframes transcript-dot-bounce {
  0%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(calc(var(--size) * -0.18)); }
}

@media (prefers-reduced-motion: reduce) {
  .dots-bounce span {
    animation: none;
  }
}

.media-panel {
  border-radius: 1rem;
}

.media-controls {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.custom-player-controls {
  display: flex;
  min-width: 0;
  flex: 1;
  align-items: center;
  gap: 0.75rem;
}

.custom-player-controls.hidden {
  display: none;
}

.media-audio-engine {
  display: none;
}

.media-play {
  display: inline-flex;
  width: 2.75rem;
  height: 2.75rem;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--accent);
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-contrast);
  cursor: pointer;
  transition: background-color 160ms ease, transform 160ms ease;
}

.media-play:hover:not(:disabled) {
  border-color: var(--accent-hover);
  background: var(--accent-hover);
  transform: scale(1.04);
}

.media-play:disabled,
.media-volume-toggle:disabled,
.media-rate:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.media-timeline {
  display: grid;
  min-width: 0;
  flex: 1;
  grid-template-columns: 2.8rem minmax(2.5rem, 1fr) 2.8rem;
  align-items: center;
  gap: 0.5rem;
}

.media-time {
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
  text-align: center;
  white-space: nowrap;
}

.media-range {
  width: 100%;
  height: 1rem;
  margin: 0;
  appearance: none;
  background: transparent;
  cursor: pointer;
  --range-progress: 0%;
}

.media-range::-webkit-slider-runnable-track {
  height: 0.3rem;
  border-radius: 9999px;
  background: linear-gradient(to right, var(--accent) 0 var(--range-progress), var(--progress-track) var(--range-progress) 100%);
}

.media-range::-moz-range-track {
  height: 0.3rem;
  border-radius: 9999px;
  background: var(--progress-track);
}

.media-range::-moz-range-progress {
  height: 0.3rem;
  border-radius: 9999px;
  background: var(--accent);
}

.media-range::-webkit-slider-thumb {
  width: 0.9rem;
  height: 0.9rem;
  margin-top: -0.3rem;
  appearance: none;
  border: 2px solid var(--surface-1);
  border-radius: 50%;
  background: var(--accent);
}

.media-range::-moz-range-thumb {
  width: 0.7rem;
  height: 0.7rem;
  border: 2px solid var(--surface-1);
  border-radius: 50%;
  background: var(--accent);
}

.media-range:focus-visible,
.media-play:focus-visible,
.media-volume-toggle:focus-visible,
.media-rate:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.media-options {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.45rem;
}

.media-speed-control {
  position: relative;
}

.media-rate {
  display: inline-flex;
  height: 2.5rem;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0 0.5rem;
  border: 1px solid var(--accent);
  border-radius: 0.65rem;
  background: var(--accent);
  color: var(--accent-contrast);
  cursor: pointer;
  font-size: 0.8rem;
}

.media-rate-menu {
  position: absolute;
  z-index: 10;
  bottom: calc(100% + 0.5rem);
  left: 50%;
  width: max-content;
  min-width: 100%;
  padding: 0.25rem;
  transform: translateX(-50%);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  background: var(--surface-1);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
}

.media-rate-menu[hidden] {
  display: none;
}

.media-rate-option {
  display: block;
  width: 100%;
  padding: 0.45rem 0.65rem;
  border: 0;
  border-radius: 0.45rem;
  background: transparent;
  color: var(--text-primary);
  cursor: pointer;
  font-size: 0.8rem;
  text-align: left;
  white-space: nowrap;
}

.media-rate-option:hover,
.media-rate-option:focus-visible,
.media-rate-option.is-selected {
  background: var(--accent);
  color: var(--accent-contrast);
}

.media-rate-option:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.settings-select-control {
  position: relative;
  width: 100%;
}

.settings-native-select {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  clip-path: inset(50%);
  border: 0;
}

.settings-select-trigger {
  display: flex;
  width: 100%;
  min-height: 2.75rem;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  background: var(--surface-3);
  color: var(--text-primary);
  cursor: pointer;
  font: inherit;
  font-size: 0.875rem;
  text-align: left;
}

.settings-select-trigger:hover,
.settings-select-trigger[aria-expanded="true"] {
  border-color: var(--accent);
}

.settings-select-trigger:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.settings-select-trigger:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.settings-select-value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-select-menu {
  position: absolute;
  z-index: 20;
  top: calc(100% + 0.35rem);
  left: 0;
  width: 100%;
  max-height: min(16rem, 45vh);
  padding: 0.25rem;
  overflow-y: auto;
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  background: var(--surface-1);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
  scrollbar-color: var(--accent) var(--surface-2);
  scrollbar-width: thin;
}

.settings-select-menu[hidden] {
  display: none;
}

.settings-select-option {
  display: block;
  width: 100%;
  padding: 0.5rem 0.65rem;
  border: 0;
  border-radius: 0.45rem;
  background: transparent;
  color: var(--text-primary);
  cursor: pointer;
  font: inherit;
  font-size: 0.875rem;
  text-align: left;
  overflow-wrap: anywhere;
}

.settings-select-option:hover,
.settings-select-option:focus-visible,
.settings-select-option.is-selected {
  background: var(--accent);
  color: var(--accent-contrast);
}

.settings-select-option:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.settings-options input[type="checkbox"] {
  display: inline-grid;
  flex: 0 0 auto;
  place-content: center;
  appearance: none;
  border: 1px solid var(--border-color);
  border-radius: 0.25rem;
  background: var(--surface-3);
  cursor: pointer;
}

.settings-options input[type="checkbox"]::before {
  width: 0.3rem;
  height: 0.55rem;
  transform: rotate(45deg) scale(0);
  border: solid var(--accent-contrast);
  border-width: 0 2px 2px 0;
  content: "";
}

.settings-options input[type="checkbox"]:checked {
  border-color: var(--accent);
  background: var(--accent);
}

.settings-options input[type="checkbox"]:checked::before {
  transform: rotate(45deg) scale(1);
}

.settings-options input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.media-volume-toggle {
  display: inline-flex;
  width: 2.25rem;
  height: 2.5rem;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 0.5rem;
  background: transparent;
  color: var(--text-primary);
  cursor: pointer;
}

.media-volume {
  width: 4.5rem;
}

.media-volume::-webkit-slider-runnable-track {
  background: linear-gradient(to right, var(--accent) 0 var(--range-progress), var(--progress-track) var(--range-progress) 100%);
}

.media-volume::-moz-range-track {
  background: var(--progress-track);
}

.media-volume::-moz-range-progress {
  background: var(--accent);
}

.media-skip {
  position: relative;
  display: inline-flex;
  width: 2.75rem;
  height: 2.75rem;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text-primary);
  cursor: pointer;
  transition: color 160ms ease, transform 160ms ease;
}

.media-skip span {
  position: absolute;
  top: 50%;
  left: 50%;
  font-size: 0.58rem;
  font-weight: 700;
  transform: translate(-50%, -50%);
}

.media-skip i {
  font-size: 1rem;
}

.media-skip:hover:not(:disabled) {
  color: var(--accent);
  transform: scale(1.08);
}

.media-skip:focus-visible,
#customizeToggle:focus-visible,
#closeCustomizeModal:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.media-skip:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

@media (max-width: 640px) {
  .media-controls {
    display: grid;
    grid-template-columns: 2.75rem minmax(0, 1fr) 2.75rem;
    gap: 0.65rem;
  }

  #rewindBtn {
    grid-column: 1;
    grid-row: 1;
  }

  #forwardBtn {
    grid-column: 3;
    grid-row: 1;
  }

  .custom-player-controls {
    display: contents;
  }

  .custom-player-controls.hidden {
    display: none;
  }

  #playPauseBtn {
    grid-column: 2;
    grid-row: 1;
    justify-self: center;
  }

  .media-timeline {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .media-options {
    grid-column: 1 / -1;
    grid-row: 3;
    justify-content: center;
  }

  .media-volume {
    width: 6rem;
  }
}

body * {
  box-sizing: border-box;
}

h1, h2, h3, h4, p, span, button, input, select, pre, label {
  font-family: var(--app-font-family);
}

h1 {
  font-size: var(--app-heading-size);
}

#status,
#debugInfo,
#transcript,
#progressContainer,
#progressLabel,
#progressState,
#errorMessage {
  font-size: var(--app-font-size);
}

.highlight-current {
  background-color: var(--highlight-bg);
  color: var(--highlight-text);
  border-radius: 0.35rem;
  padding: 0 0.15rem;
  font-weight: 700;
  font-size: 1.05em;
  transform: scale(1.02);
  display: inline-block;
  box-shadow: inset 0 -0.18em 0 rgba(0, 0, 0, 0.12);
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.transcript-word {
  cursor: pointer;
  color: var(--text-primary);
  transition: background-color 120ms ease, color 120ms ease;
}

.transcript-word:hover {
  background-color: var(--highlight-hover);
}

#transcribeBtn {
  background-color: var(--accent);
  color: var(--accent-contrast);
}

#transcribeBtn:hover:not(:disabled) {
  background-color: var(--accent-hover);
}

#downloadBtn,
#clearBtn,
#closeErrorModal,
#retryErrorBtn,
#customizeToggle {
  background-color: var(--button-bg);
  color: var(--button-text);
  border-color: var(--border-color);
}

#downloadBtn:not(:disabled):hover,
#clearBtn:hover,
#closeErrorModal:hover,
#retryErrorBtn:hover,
#customizeToggle:hover {
  border-color: var(--accent);
  color: var(--text-primary);
}

#customizePanel,
#status,
#debugInfo,
#progressContainer,
#transcript,
#errorModal > div {
  background-color: var(--surface-2);
  border-color: var(--border-color);
}

#transcript,
#status,
#debugInfo,
#progressContainer,
#appDialog {
  color: var(--text-primary);
}

.app-dialog {
  width: min(32rem, calc(100vw - 2rem));
  max-width: none;
  max-height: calc(100dvh - 2rem);
  margin: auto;
  padding: 1.25rem;
  overflow-y: auto;
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  background: var(--surface-1);
  color: var(--text-primary);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
}

.app-dialog::backdrop {
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(3px);
}

.app-dialog-header,
.app-dialog-heading,
.app-dialog-actions {
  display: flex;
  align-items: center;
}

.app-dialog-header {
  justify-content: space-between;
  gap: 1rem;
}

.app-dialog-heading {
  min-width: 0;
  gap: 0.75rem;
}

.app-dialog-heading h2 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 650;
}

.app-dialog-icon {
  display: inline-flex;
  width: 2.5rem;
  height: 2.5rem;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-color);
  border-radius: 50%;
  background: transparent;
  color: var(--text-primary);
}

.app-dialog-close {
  display: inline-flex;
  width: 2.5rem;
  height: 2.5rem;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-color);
  border-radius: 50%;
  background: var(--button-bg);
  color: var(--button-text);
  cursor: pointer;
}

.app-dialog-message {
  margin: 1rem 0 0;
  color: var(--text-secondary);
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.app-dialog-details {
  margin-top: 1rem;
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  background: var(--surface-2);
  color: var(--text-secondary);
}

.app-dialog-details summary {
  padding: 0.75rem;
  cursor: pointer;
}

.app-dialog-details pre {
  max-height: 12rem;
  margin: 0;
  padding: 0 0.75rem 0.75rem;
  overflow: auto;
  color: var(--text-muted);
  font-size: 0.75rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.app-dialog-actions {
  justify-content: flex-end;
  gap: 0.65rem;
  margin-top: 1.5rem;
}

.app-dialog-primary,
.app-dialog-secondary {
  min-height: 2.65rem;
  padding: 0.6rem 1rem;
  border: 1px solid var(--accent);
  border-radius: 0.7rem;
  cursor: pointer;
  font-weight: 600;
}

.app-dialog-primary {
  background: var(--accent);
  color: var(--accent-contrast);
}

.app-dialog-secondary {
  border-color: var(--border-color);
  background: var(--button-bg);
  color: var(--button-text);
}

.app-dialog-close:focus-visible,
.app-dialog-primary:focus-visible,
.app-dialog-secondary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.app-dialog button:hover:not(:disabled) {
  filter: brightness(1.08);
}

#progressBar,
#modelDownloadBar {
  background-color: var(--progress-fill);
}

#progressContainer {
  background-color: var(--surface-2);
}

#progressBar,
#modelDownloadBar,
#progressContainer {
  transition: background-color 180ms ease;
}

input[type="file"]::file-selector-button {
  background-color: var(--button-bg);
  color: var(--button-text);
  border: 1px solid var(--border-color);
}

input[type="file"]::file-selector-button:hover {
  background-color: var(--accent);
  color: var(--accent-contrast);
}

.theme-option,
.font-size-option {
  transition: all 180ms ease;
}

.theme-option {
  background-color: transparent !important;
  color: inherit;
}

.theme-option.active,
.font-size-option.active {
  background-color: transparent !important;
  color: var(--accent-contrast);
  border-color: var(--accent);
}

#fontFamilySelect,
#languageSelect {
  background-color: var(--surface-3);
  color: var(--text-primary);
  border-color: var(--border-color);
}

body .bg-slate-900\/90,
body .bg-slate-900 {
  background-color: var(--surface-1) !important;
}

body .bg-slate-950\/80,
body .bg-slate-950\/90,
body .bg-slate-950 {
  background-color: var(--surface-2) !important;
}

#infoModal > div {
  scrollbar-color: var(--accent) var(--surface-2);
  scrollbar-width: thin;
}

#infoModal > div::-webkit-scrollbar {
  width: 12px;
}

#infoModal > div::-webkit-scrollbar-track {
  background-color: var(--surface-2);
  border-radius: 999px;
}

#infoModal > div::-webkit-scrollbar-thumb {
  background-color: var(--accent);
  background-clip: content-box;
  border: 3px solid transparent;
  border-radius: 999px;
}

#infoModal > div::-webkit-scrollbar-thumb:hover {
  background-color: var(--accent-hover);
}

body .bg-slate-800 {
  background-color: var(--surface-3) !important;
}

body .text-slate-100 {
  color: var(--text-primary) !important;
}

body .text-slate-200,
body .text-slate-300 {
  color: var(--text-secondary) !important;
}

body .text-slate-400,
body .text-slate-500,
body .text-slate-600,
body .text-slate-700 {
  color: var(--text-muted) !important;
}

body .text-sky-300,
body .text-sky-300\/90,
body .text-sky-400,
body .text-sky-500 {
  color: var(--accent) !important;
}

body[data-theme="yellow"] .app-brand span {
  color: #241307 !important;
}

body[data-theme="yellow"] #transcribeBtn {
  color: #fff7ed !important;
}

body[data-theme="yellow"] #transcribeBtn:hover:not(:disabled) {
  background-color: #783f10;
}

body[data-theme="yellow"] .media-rate {
  color: #fff7ed;
}

body[data-theme="yellow"] .media-rate-option:hover,
body[data-theme="yellow"] .media-rate-option:focus-visible,
body[data-theme="yellow"] .media-rate-option.is-selected {
  background: #783f10;
  color: #fff7ed;
}

body[data-theme="yellow"] .settings-select-option:hover,
body[data-theme="yellow"] .settings-select-option:focus-visible,
body[data-theme="yellow"] .settings-select-option.is-selected {
  color: #fff7ed !important;
}

body[data-theme="yellow"] .settings-options label[for$="Toggle"] {
  background-color: var(--surface-3) !important;
}

body[data-theme="yellow"] #closeCustomizeModal {
  background-color: var(--surface-3) !important;
  color: var(--text-primary) !important;
  border-color: var(--border-color) !important;
}

body[data-theme="pink"] .app-brand span {
  color: #2a0718 !important;
}

body[data-theme="pink"] .choose-file-button {
  background-color: var(--surface-3);
  color: var(--text-primary);
}

body[data-theme="pink"] .media-rate-menu,
body[data-theme="pink"] .settings-select-menu {
  background: var(--surface-3);
}

body[data-theme="pink"] .media-rate-option:hover,
body[data-theme="pink"] .media-rate-option:focus-visible,
body[data-theme="pink"] .media-rate-option.is-selected,
body[data-theme="pink"] .settings-select-option:hover,
body[data-theme="pink"] .settings-select-option:focus-visible,
body[data-theme="pink"] .settings-select-option.is-selected {
  background: #a8396d;
  color: #fff7ed !important;
}

body[data-theme="pink"] .settings-options label[for$="Toggle"] {
  background-color: var(--surface-3) !important;
}

body[data-theme="pink"] #closeCustomizeModal {
  background-color: var(--surface-3) !important;
  color: var(--text-primary) !important;
  border-color: var(--border-color) !important;
}

body .border-slate-800 {
  border-color: var(--border-color) !important;
}

body .shadow-slate-950\/30,
body .shadow-slate-950\/20 {
  box-shadow: 0 20px 45px rgba(2, 6, 23, 0.28) !important;
}

@media (max-width: 640px) {
  body {
    padding: 0;
  }

  #customizePanel .theme-option,
  #customizePanel .font-size-option {
    flex: 1 1 calc(50% - 0.25rem);
    justify-content: center;
    text-align: center;
  }

  #transcribeBtn,
  #downloadBtn,
  #clearBtn {
    width: 100%;
  }

  #transcript {
    font-size: 0.95rem;
    line-height: 1.6;
  }
}

@media (max-width: 800px) {
  .app-frame {
    padding: 0.75rem;
  }

  .app-frame > .relative {
    min-height: 0;
    padding: 1rem;
  }

  .workspace-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .right-column {
    min-height: 0;
    grid-template-rows: auto minmax(340px, auto) auto;
  }

  #transcript {
    min-height: 100%;
    max-height: 100%;
  }

  .transcript-display {
    min-height: 48vh;
    max-height: 62vh;
  }
}

@media (min-width: 801px) {
  .workspace-layout {
    min-height: 0;
  }

  .left-column > .upload-panel {
    order: 1;
  }

  .left-column > #status {
    order: 2;
  }

  .left-column > #modelDownloadDebug {
    order: 3;
  }

}