/* GriGsi Transcribe — audio file → text */
.tx-wrap { max-width: 920px; margin: 0 auto; padding: 0 20px 48px; }
.tx-hero-note { opacity: .92; max-width: 52em; margin: 8px auto 0; line-height: 1.55; }
.tx-desktop-badge {
  display: inline-block;
  margin: 12px auto 0;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: .02em;
  color: rgba(255,255,255,.95);
  background: rgba(76, 175, 130, .22);
  border: 1px solid rgba(76, 175, 130, .45);
}
.tx-desktop-badge[hidden] { display: none !important; }

.tx-card {
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 16px;
  padding: 16px 18px 20px;
  box-shadow: 0 18px 42px rgba(0,0,0,.18);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  margin-bottom: 18px;
}
.tx-card h2 {
  margin: 0 0 10px;
  font-size: 1.05rem;
  color: rgba(255,255,255,.96);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.tx-card h2 i { color: var(--liquid-accent-1, #FFC64B); }
.tx-card p { margin: 0 0 10px; color: rgba(255,255,255,.88); line-height: 1.55; }

.tx-drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 160px;
  border: 2px dashed rgba(255,255,255,.28);
  border-radius: 14px;
  padding: 24px 16px;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s, background .15s;
  color: rgba(255,255,255,.9);
}
.tx-drop:hover,
.tx-drop.is-drag {
  border-color: rgba(255,198,75,.65);
  background: rgba(255,255,255,.06);
}
.tx-drop i { font-size: 2rem; color: var(--liquid-accent-1, #FFC64B); }
.tx-drop strong { font-size: 1rem; }
.tx-drop span { font-size: 0.85rem; opacity: .85; max-width: 36em; line-height: 1.45; }

.tx-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: center;
  margin-top: 14px;
}
.tx-label { font-size: 0.82rem; font-weight: 700; color: rgba(255,255,255,.75); }

.tx-row--lang {
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.tx-lang-select {
  flex: 1 1 220px;
  min-width: 180px;
  max-width: 100%;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(0,0,0,.22);
  color: rgba(255,255,255,.95);
  font: 0.9rem Inter, system-ui, sans-serif;
  outline: none;
}
.tx-lang-select:focus {
  border-color: rgba(255, 198, 75, 0.55);
  box-shadow: 0 0 0 2px rgba(255, 198, 75, 0.2);
}
.tx-lang-hint {
  margin-top: -4px;
  margin-bottom: 10px;
}
.tx-lang-btn,
.tx-engine-btn {
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(0,0,0,.18);
  color: rgba(255,255,255,.92);
  border-radius: 999px;
  padding: 7px 14px;
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
}
.tx-lang-btn.is-on,
.tx-engine-btn.is-on {
  background: rgba(255,198,75,.22);
  border-color: rgba(255,198,75,.55);
  color: #fff;
}
.tx-engine-btn:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.tx-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 800;
  font-size: 0.9rem;
  cursor: pointer;
  background: var(--liquid-accent-1, #FFC64B);
  color: #1a1028;
}
.tx-btn:disabled { opacity: .45; cursor: not-allowed; }
.tx-btn--ghost {
  background: rgba(255,255,255,.12);
  color: rgba(255,255,255,.95);
  border: 1px solid rgba(255,255,255,.2);
}

.tx-file-meta {
  margin-top: 10px;
  font-size: 0.82rem;
  color: rgba(255,255,255,.78);
  word-break: break-all;
}

.tx-progress {
  margin-top: 14px;
  display: none;
}
.tx-progress.is-active { display: block; }
.tx-progress-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.tx-progress-spinner {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 3px solid rgba(255,255,255,.2);
  border-top-color: #ffc64b;
  animation: tx-spin .85s linear infinite;
  flex-shrink: 0;
}
.tx-progress.is-done .tx-progress-spinner {
  animation: none;
  border-color: #5fd68a;
  border-top-color: #5fd68a;
  position: relative;
}
.tx-progress.is-done .tx-progress-spinner::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: solid #1a1028;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
@keyframes tx-spin { to { transform: rotate(360deg); } }
.tx-progress-bar {
  height: 10px;
  border-radius: 999px;
  background: rgba(0,0,0,.25);
  overflow: hidden;
  position: relative;
}
.tx-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #A693EF, #FFC64B, #A693EF);
  background-size: 200% 100%;
  transition: width .35s ease;
  animation: tx-progress-shimmer 1.8s ease-in-out infinite;
}
.tx-progress.is-indeterminate .tx-progress-fill {
  width: 38% !important;
  animation: tx-progress-indeterminate 1.4s ease-in-out infinite, tx-progress-shimmer 1.8s ease-in-out infinite;
}
@keyframes tx-progress-shimmer {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
@keyframes tx-progress-indeterminate {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(320%); }
}
.tx-progress-label {
  margin: 0;
  font-size: 0.88rem;
  color: rgba(255,255,255,.92);
  font-weight: 600;
}
.tx-progress-pct {
  margin: 6px 0 0;
  font-size: 0.78rem;
  color: rgba(255,255,255,.65);
  font-variant-numeric: tabular-nums;
}
.tx-progress-eta {
  margin: 4px 0 0;
  font-size: 0.82rem;
  color: rgba(255, 198, 75, 0.92);
  font-weight: 600;
}
.tx-progress-eta:empty { display: none; }
.tx-card h2 .ggs-help-btn {
  margin-left: auto;
}
.tx-drop.is-busy {
  border-color: rgba(166, 147, 239, .55);
  animation: tx-drop-pulse 1.6s ease-in-out infinite;
}
@keyframes tx-drop-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(166, 147, 239, 0); }
  50% { box-shadow: 0 0 0 6px rgba(166, 147, 239, 0.18); }
}

.tx-output {
  width: 100%;
  min-height: 220px;
  resize: vertical;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(0,0,0,.22);
  color: rgba(255,255,255,.96) !important;
  padding: 12px 14px;
  box-sizing: border-box;
  font: 14px/1.55 Inter, system-ui, sans-serif;
  outline: none;
}
.tx-output:disabled { opacity: .7; }

.tx-error {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(240,139,131,.18);
  border: 1px solid rgba(240,139,131,.45);
  color: #ffd4d0;
  font-size: 0.88rem;
  display: none;
}
.tx-error.is-visible { display: block; }

.tx-fine {
  font-size: 0.78rem;
  color: rgba(255,255,255,.62);
  line-height: 1.45;
  margin-top: 10px;
}

.tx-links a {
  color: var(--liquid-accent-1, #FFC64B);
  font-weight: 600;
  text-decoration: none;
}
.tx-links a:hover { text-decoration: underline; }

.tx-editor[hidden] { display: none !important; }

.tx-empty-state {
  margin: 0 0 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 198, 75, 0.12);
  border: 1px dashed rgba(255, 198, 75, 0.35);
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.88rem;
  line-height: 1.45;
}
.tx-empty-state[hidden] { display: none !important; }
.tx-empty-state strong { color: #ffc64b; }

.tx-timeline-block[hidden] { display: none !important; }

.tx-timeline-block { margin: 12px 0 14px; }

.tx-timeline-meta {
  display: flex;
  gap: 8px;
  align-items: baseline;
  margin-bottom: 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88rem;
}
.tx-tc { color: rgba(255,255,255,.95); font-weight: 700; }
.tx-tc-dim { color: rgba(255,255,255,.55); font-weight: 600; }

.tx-timeline {
  position: relative;
  height: 36px;
  border-radius: 10px;
  background: rgba(0,0,0,.28);
  border: 1px solid rgba(255,255,255,.18);
  cursor: pointer;
  touch-action: none;
}
.tx-timeline-track {
  position: absolute;
  inset: 0;
  border-radius: inherit;
}
.tx-timeline-playhead {
  position: absolute;
  top: 4px;
  bottom: 4px;
  width: 3px;
  margin-left: -1px;
  background: #fff;
  border-radius: 2px;
  pointer-events: none;
  left: 0%;
  box-shadow: 0 0 8px rgba(255,255,255,.5);
}
.tx-timeline-pin {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 3px;
  margin-left: -1px;
  pointer-events: none;
}
.tx-timeline-pin--in { background: #5fd68a; z-index: 2; }
.tx-timeline-pin--out { background: #c49bff; z-index: 2; }
.tx-timeline-range {
  position: absolute;
  top: 6px;
  bottom: 6px;
  background: rgba(95, 214, 138, 0.22);
  border-left: 2px solid #5fd68a;
  border-right: 2px solid #c49bff;
  border-radius: 4px;
  pointer-events: none;
  z-index: 1;
}

.tx-audio { display: none; }

.tx-row--tight { margin-top: 10px; gap: 8px; }
.tx-btn--sm { padding: 7px 12px; font-size: 0.8rem; }

.tx-goto-label { font-size: 0.78rem; font-weight: 700; color: rgba(255,255,255,.7); }
.tx-goto-input {
  width: 7.5em;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(0,0,0,.2);
  color: rgba(255,255,255,.95);
  padding: 6px 8px;
  font: 0.82rem ui-monospace, monospace;
}

.tx-marks-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 12px 0 8px;
}
.tx-mark-btn {
  min-width: 44px;
  min-height: 40px;
  border-radius: 10px;
  border: 2px solid transparent;
  font-weight: 900;
  font-size: 0.9rem;
  cursor: pointer;
  color: #1a1028;
}
.tx-mark-btn:disabled { opacity: .4; cursor: not-allowed; }
.tx-mark-btn--in { background: #5fd68a; border-color: #3cb86a; }
.tx-mark-btn--out { background: #c49bff; border-color: #9b6fe8; color: #1e1435; }

.tx-marks-quote-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  align-items: center;
  margin: 0 0 8px;
}
.tx-marks-display {
  flex: 1 1 200px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.82rem;
  color: rgba(255,255,255,.88);
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(0,0,0,.2);
  border: 1px solid rgba(255,255,255,.12);
}
.tx-marks-display--compact {
  flex: 0 1 168px;
  min-width: 132px;
  max-width: 38%;
  font-size: 0.76rem;
  padding: 6px 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tx-quote-search-label {
  flex: 0 0 auto;
  font-size: 0.78rem;
  font-weight: 700;
  color: rgba(255,255,255,.75);
  white-space: nowrap;
}
.tx-quote-search {
  flex: 1 1 220px;
  min-width: 160px;
  min-height: 2.6em;
  max-height: 5.5em;
  resize: vertical;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(0,0,0,.22);
  color: rgba(255,255,255,.96);
  padding: 7px 10px;
  box-sizing: border-box;
  font: 0.88rem/1.45 Inter, system-ui, sans-serif;
  outline: none;
}
.tx-quote-search:focus {
  border-color: rgba(255, 198, 75, 0.55);
  box-shadow: 0 0 0 2px rgba(255, 198, 75, 0.2);
}
.tx-quote-search:disabled {
  opacity: .45;
  cursor: not-allowed;
}
.tx-quote-search-btn {
  flex: 0 0 auto;
  white-space: nowrap;
}

.tx-btn--add-list {
  background: linear-gradient(135deg, rgba(95, 214, 138, 0.95), rgba(166, 147, 239, 0.95));
  color: #1a1028;
  font-weight: 800;
  border: none;
  padding: 8px 14px;
  font-size: 0.82rem;
  border-radius: 10px;
  cursor: pointer;
  white-space: nowrap;
}
.tx-btn--add-list:hover { filter: brightness(1.06); }
.tx-btn--add-list[hidden] { display: none !important; }

.tx-selection-hint {
  margin: 0 0 8px;
  min-height: 1.2em;
  font-size: 0.8rem;
  color: rgba(255,198,75,.95);
}

.tx-transcript {
  width: 100%;
  min-height: 240px;
  max-height: min(52vh, 520px);
  overflow: auto;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(0,0,0,.22);
  color: rgba(255,255,255,.96);
  padding: 12px 14px;
  box-sizing: border-box;
  font: 15px/1.65 Inter, system-ui, sans-serif;
  outline: none;
  user-select: text;
  -webkit-user-select: text;
}
.tx-transcript:empty::before {
  content: "Transcript appears here…";
  color: rgba(255,255,255,.45);
}
.tx-transcript .tx-w {
  cursor: pointer;
  border-radius: 3px;
  padding: 0 1px;
}
.tx-timeline.is-scrubbing {
  cursor: grabbing;
}
.tx-timeline:focus {
  outline: 2px solid rgba(255, 198, 75, 0.55);
  outline-offset: 2px;
}
.tx-timeline-hint {
  margin: 0 0 8px;
}

.tx-transcript .tx-w.is-at-playhead {
  background: rgba(255, 198, 75, 0.38);
  box-shadow: inset 0 -3px 0 #ffc64b;
  border-radius: 3px;
}

.tx-transcript .tx-w:hover {
  background: rgba(255,198,75,.18);
}
.tx-transcript .tx-w.is-marked {
  background: rgba(95, 214, 138, 0.28);
  box-shadow: inset 0 -2px 0 #5fd68a;
}
.tx-transcript .tx-w.is-marked-out {
  box-shadow: inset 0 -2px 0 #c49bff;
}
.tx-transcript .tx-w.is-in-edge {
  box-shadow: inset 3px 0 0 #5fd68a;
}
.tx-transcript .tx-w.is-out-edge {
  box-shadow: inset -3px 0 0 #c49bff;
}
.tx-transcript::selection {
  background: rgba(166, 147, 239, 0.45);
}

.tx-transcript.is-working {
  position: relative;
  min-height: 200px;
  color: transparent;
  user-select: none;
  pointer-events: none;
  overflow: hidden;
}
.tx-transcript.is-working::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    linear-gradient(90deg, transparent, rgba(255,255,255,.08), transparent) 0 0 / 200% 100%,
    repeating-linear-gradient(
      180deg,
      rgba(255,255,255,.06) 0,
      rgba(255,255,255,.06) 14px,
      transparent 14px,
      transparent 28px
    );
  animation: tx-transcript-shimmer 1.6s ease-in-out infinite;
}
.tx-transcript.is-working::after {
  content: attr(data-working-label);
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  color: rgba(255,255,255,.75);
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
  pointer-events: none;
}
@keyframes tx-transcript-shimmer {
  0% { background-position: 200% 0, 0 0; }
  100% { background-position: -200% 0, 0 0; }
}

.tx-translate-block {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,.12);
}
.tx-translate-block[hidden] { display: none !important; }
.tx-translate-title {
  margin: 0 0 10px;
  font-size: 0.95rem;
  font-weight: 700;
  color: rgba(255,255,255,.94);
}
.tx-translate-row {
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 10px;
}
.tx-translate-lbl {
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(255,255,255,.78);
  margin: 0;
}
.tx-translate-scope {
  min-width: 9.5rem;
  max-width: 100%;
}
.tx-translate-scope option:disabled {
  color: rgba(255,255,255,.45);
}
.tx-translate-status {
  margin: 8px 0 0;
  font-size: 0.82rem;
  color: rgba(255,198,75,.95);
}
.tx-translate-status.is-error { color: #ff8a8a; }
.tx-translate-tabs {
  display: flex;
  gap: 6px;
  margin: 10px 0 8px;
}
.tx-translate-tabs[hidden] { display: none !important; }
.tx-translate-tab {
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(0,0,0,.18);
  color: rgba(255,255,255,.82);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}
.tx-translate-tab.is-on {
  background: rgba(255,198,75,.22);
  border-color: rgba(255,198,75,.55);
  color: #fff;
}
.tx-translated {
  min-height: 4.5rem;
  white-space: pre-wrap;
  line-height: 1.55;
}
.tx-translated[hidden] { display: none !important; }
.tx-translate-actions[hidden] { display: none !important; }

.tx-clip-panel[hidden] { display: none !important; }
.tx-clip-list {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.tx-clip-list:empty { display: none; }
.tx-clip-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 12px;
  align-items: start;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(0,0,0,.22);
  border: 1px solid rgba(255,255,255,.14);
}
.tx-clip-item-num {
  font-size: 0.72rem;
  font-weight: 800;
  color: rgba(255,198,75,.9);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 4px;
}
.tx-clip-item-tc {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.8rem;
  color: rgba(95, 214, 138, .95);
  margin-bottom: 6px;
}
.tx-clip-item-text {
  grid-column: 1;
  font-size: 0.92rem;
  line-height: 1.55;
  color: rgba(255,255,255,.94);
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
}
.tx-clip-item-remove {
  grid-column: 2;
  grid-row: 1 / span 3;
  align-self: start;
  border: none;
  background: rgba(240,139,131,.2);
  color: #ffd4d0;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
}
.tx-clip-item-remove:hover { background: rgba(240,139,131,.35); }
.tx-clip-empty {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255,255,255,.04);
  border: 1px dashed rgba(255,255,255,.18);
  color: rgba(255,255,255,.65);
  font-size: 0.85rem;
}
.tx-clip-empty[hidden] { display: none !important; }

