/* ===== ?????? ===== */
.upload-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  padding: 0 16px; margin-bottom: 12px;
}
.upload-card {
  background: var(--color-card); border-radius: var(--radius-md);
  padding: 18px 14px;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  cursor: pointer; transition: all 0.2s;
  border: 1.5px solid var(--color-border); text-align: center;
}
.upload-card:hover { border-color: var(--color-brand); background: #F0F9FF; }
.upload-card-icon {
  width: 44px; height: 44px; border-radius: var(--radius-md);
  background: var(--color-brand-light); color: var(--color-brand);
  display: flex; align-items: center; justify-content: center; font-size: 20px;
}
.upload-card-label { font-size: 13px; font-weight: 600; color: var(--color-text-primary); }
.upload-card-desc { font-size: 11px; color: var(--color-text-tertiary); line-height: 1.4; }
.upload-card-primary {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, var(--color-brand) 0%, #1D4ED8 100%);
  border: none; color: white; padding: 22px 18px;
  flex-direction: row; text-align: left; gap: 14px;
}
.upload-card-primary .upload-card-icon {
  background: rgba(255,255,255,0.2); color: white;
  width: 52px; height: 52px; font-size: 24px;
}
.upload-card-primary .upload-card-label { color: white; font-size: 16px; }
.upload-card-primary .upload-card-desc { color: rgba(255,255,255,0.75); }

/* ===== ????? ===== */
.upload-list-item {
  margin: 0 16px 8px; padding: 14px;
  background: var(--color-card);
  border-radius: var(--radius-md); box-shadow: var(--shadow-sm);
  cursor: pointer; transition: all 0.2s;
}
.upload-list-item:hover { box-shadow: var(--shadow-md); }
.upload-list-title { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.upload-list-meta { font-size: 12px; color: var(--color-text-tertiary); }
.upload-list-item--recording {
  border-left: 3px solid var(--color-brand);
}

/* ===== ???????????? ===== */
.voice-draft-body { padding: 12px 16px 32px; }
.voice-draft-status {
  text-align: center; color: var(--color-success, #16a34a); font-size: 14px; font-weight: 600;
  margin: 4px 0 16px;
}
.voice-draft-player-wrap {
  background: var(--color-card); border-radius: var(--radius-lg); padding: 12px 14px;
  margin-bottom: 12px; box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.recording-draft-video-wrap {
  position: relative;
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
  background: #111;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.recording-draft-video {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  max-height: 240px;
  object-fit: contain;
  background: #111;
  border-radius: 8px;
  display: block;
}
.recording-draft-video.is-portrait {
  max-height: min(56vh, 480px);
}
.recording-draft-video.is-landscape {
  max-height: 240px;
}
.recording-draft-video::-webkit-media-controls-overlay-play-button,
.recording-draft-video::-webkit-media-controls-start-playback-button {
  display: none !important;
  -webkit-appearance: none;
}
.recording-draft-play-btn {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.22);
  cursor: pointer;
  z-index: 2;
  transition: opacity 0.2s, transform 0.15s;
}
.recording-draft-play-btn::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-42%, -50%);
  border-style: solid;
  border-width: 8px 0 8px 13px;
  border-color: transparent transparent transparent rgba(0, 0, 0, 0.72);
}
.recording-draft-play-btn:active {
  transform: translate(-50%, -50%) scale(0.94);
}
.recording-draft-video-wrap.is-playing .recording-draft-play-btn {
  opacity: 0;
  pointer-events: none;
}

/* ===== ??/???????Get???? ===== */
.recording-draft-page { padding-bottom: 24px; }
.recording-draft-hero {
  padding: 8px 16px 12px;
  background: var(--color-card);
  margin-bottom: 10px;
}
.recording-draft-title {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.35;
  margin: 0 0 8px;
  color: var(--color-text-primary);
}
.recording-draft-created {
  font-size: 13px;
  color: var(--color-text-secondary);
  margin: 0 0 12px;
}
.recording-draft-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.recording-draft-tag-add {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px dashed var(--color-border);
  background: #fff;
  color: var(--color-text-secondary);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
.recording-draft-tag {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: #F1F5F9;
  color: var(--color-text-secondary);
  font-size: 13px;
}
.recording-draft-media-card {
  margin: 0 16px 12px;
  padding: 12px;
  background: var(--color-card);
  border-radius: var(--radius-lg);
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.recording-draft-audio-row audio { width: 100%; }
.recording-draft-speed-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
}
.recording-draft-speed-btn {
  border: 1px solid var(--color-border);
  background: #fff;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-primary);
}
.recording-draft-duration {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--color-text-secondary);
  text-align: center;
}
.recording-draft-tabs { margin-top: 4px; }
.recording-draft-tab-body {
  padding: 4px 0 20px;
  min-height: 120px;
}
.recording-draft-prose {
  padding: 0 16px;
}
.recording-draft-prose .consumer-story-p {
  font-size: 15px;
  line-height: 1.75;
  color: #374151;
  letter-spacing: normal;
  font-weight: 400;
  margin: 0 0 18px;
}
.recording-draft-empty-note {
  padding: 32px 20px;
  text-align: center;
  color: var(--color-text-secondary);
}
.recording-draft-actions {
  padding: 0 16px 8px;
  border-top: 8px solid var(--color-bg);
  margin-top: 8px;
  padding-top: 16px;
}
.voice-draft-meta { margin: 8px 0 0; font-size: 12px; color: var(--color-text-secondary); text-align: center; }
.voice-draft-transcript-card {
  background: var(--color-card); border-radius: var(--radius-lg); padding: 16px;
  margin-bottom: 20px; box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.voice-draft-transcript-label {
  font-size: 13px; font-weight: 600; color: var(--color-text-secondary); margin-bottom: 10px;
}
.voice-draft-transcript {
  font-size: 15px; line-height: 1.75; color: var(--color-text-primary);
  white-space: pre-wrap; word-break: break-word; max-height: 40vh; overflow-y: auto;
}
.voice-draft-scene-label {
  font-size: 15px; font-weight: 700; margin: 0 0 4px; color: var(--color-text-primary);
}
.voice-draft-scene-hint {
  font-size: 12px; color: var(--color-text-secondary); margin: 0 0 12px;
}
.voice-draft-scenes { display: flex; flex-direction: column; gap: 10px; }
.voice-draft-scene {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 16px;
  border: 1.5px solid var(--color-border); border-radius: var(--radius-lg);
  background: var(--color-card); cursor: pointer; text-align: left;
  transition: border-color 0.15s, background 0.15s;
}
.voice-draft-scene:active { transform: scale(0.99); }
.voice-draft-scene.preferred {
  border-color: var(--color-brand); background: var(--color-brand-light);
}
.voice-draft-scene-icon { font-size: 24px; flex-shrink: 0; }
.voice-draft-scene-title { font-size: 15px; font-weight: 600; color: var(--color-text-primary); display: block; }
.voice-draft-scene-desc { font-size: 12px; color: var(--color-text-secondary); display: block; margin-top: 2px; }
.voice-draft-save-only {
  display: block; width: 100%; margin-top: 16px; padding: 12px; border: none; background: none;
  color: var(--color-text-secondary); font-size: 14px; cursor: pointer; text-decoration: underline;
}
.voice-draft-loading {
  position: fixed; inset: 0; z-index: 200; background: rgba(255,255,255,0.92);
  display: flex; align-items: center; justify-content: center;
}
.voice-draft-loading-inner { text-align: center; }
.voice-draft-loading-spinner {
  width: 36px; height: 36px; margin: 0 auto 12px; border: 3px solid var(--color-border);
  border-top-color: var(--color-brand); border-radius: 50%;
  animation: voice-draft-spin 0.8s linear infinite;
}
@keyframes voice-draft-spin { to { transform: rotate(360deg); } }

/* ===== transcription-v1 ? ??????P1/P2 ? Tab? ===== */
.trx-draft-page {
  background: #fff;
  min-height: 100%;
}
.trx-draft-page .content.trx-draft-content {
  padding: 0 0 calc(24px + env(safe-area-inset-bottom));
  background: var(--color-card);
}
.trx-draft-nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px; flex-shrink: 0; z-index: 100;
  background: var(--color-card);
}
.trx-draft-nav .nav-back {
  width: 34px; height: 34px; display: flex; align-items: center; justify-content: center;
  font-size: 24px; border-radius: 50%;
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.trx-draft-nav-actions {
  display: flex; align-items: center; gap: 0;
}
.trx-draft-nav-icon {
  width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
  border: none; border-radius: 50%; background: transparent;
  font-size: 20px; line-height: 1; color: var(--color-text-primary); cursor: pointer;
  padding: 0;
}
.trx-draft-nav-icon:active { background: var(--color-border-light, #F3F4F6); }
.trx-draft-header { padding: 4px 16px 10px; }
.trx-draft-title {
  font-size: 21px; font-weight: 700; line-height: 30px;
  margin: 0 0 6px; color: var(--color-text-primary);
  display: block; width: 100%;
}
.trx-draft-time {
  display: block;
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--color-text-tertiary);
  line-height: 1.4;
}
.trx-draft-meta-row,
.trx-draft-pill,
.trx-draft-pill--ok,
.trx-draft-tab-badge,
.trx-draft-ts-toggle,
.trx-draft-tag-add {
  display: none !important;
}
/* trx-draft-tag-* styles unified in 03-shared.css */
.trx-draft-tags {
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px;
  margin-top: 8px;
}
.trx-draft-tag-remove {
  display: none !important;
}
.trx-draft-tag-add {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 3px 10px; border-radius: 999px;
  border: 1.5px dashed var(--color-border); background: transparent;
  color: var(--color-text-tertiary); font-size: 12px; font-weight: 500; cursor: pointer;
}
.trx-draft-video-block {
  margin: 0 16px 12px; border-radius: var(--radius-md); overflow: hidden;
}
.trx-draft-video-block .recording-draft-video-wrap { border-radius: var(--radius-md); }
.trx-draft-video-block .recording-draft-video {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  max-height: 240px;
  object-fit: contain;
}
.trx-draft-video-block .recording-draft-video.is-portrait {
  max-height: min(56vh, 480px);
}
.trx-draft-video-block .recording-draft-video.is-landscape {
  max-height: 240px;
}
/* ===== ???????????? / ?????? ===== */
.media-bar {
  display: flex; align-items: center; gap: 10px;
  margin: 0; padding: 10px 14px;
  background: #F8FAFC;
  border-bottom: 1px solid #E5E7EB;
  border-radius: 0;
}
.media-play-btn,
button.media-play-btn {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  background: #2563EB; color: #fff;
  border-radius: 50%; font-size: 14px;
  cursor: pointer; border: none; flex-shrink: 0;
  transition: transform 0.15s;
  padding-left: 2px;
}
.media-play-btn:active,
button.media-play-btn:active { transform: scale(0.93); }
.media-play-btn.playing,
button.media-play-btn.playing {
  background: #fff; border: 2px solid #2563EB; color: #2563EB;
}
.media-waveform {
  flex: 1; height: 28px; min-width: 0;
  display: flex; align-items: center; gap: 2px;
}
.media-wave-bar {
  width: 3px; background: #2563EB; border-radius: 2px; opacity: 0.35;
}
.media-wave-bar:nth-child(odd) { opacity: 0.6; }
.media-wave-bar:nth-child(3n) { opacity: 0.9; }
.media-duration {
  font-size: 12px; color: #9CA3AF; font-weight: 600;
  flex-shrink: 0; font-variant-numeric: tabular-nums;
}
.media-speed,
button.media-speed {
  padding: 3px 8px; border: 1px solid #E5E7EB; border-radius: 6px;
  font-size: 11px; font-weight: 600; color: #6B7280;
  background: #fff; cursor: pointer; flex-shrink: 0;
}

.trx-draft-media-bar {
  display: flex; align-items: center; gap: 10px;
  margin: 0; padding: 10px 14px;
  background: #F8FAFC;
  border-bottom: 1px solid var(--color-border);
  border-radius: 0;
  flex-shrink: 0;
}
.trx-draft-sticky-chrome {
  position: relative;
  top: auto;
  z-index: 1;
  background: #fff;
}
.trx-draft-sticky-chrome .note-detail-tabs--v3,
.trx-draft-sticky-chrome .trx-draft-tabs {
  background: #fff;
}
.trx-draft-panels-wrap {
  flex: none;
  min-height: auto;
  overflow: visible;
}
.trx-draft-play-btn {
  width: 36px; height: 36px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--color-brand); color: #fff; border: none;
  border-radius: 50%; font-size: 13px; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  tap-highlight-color: transparent;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
.trx-draft-play-btn:focus,
.trx-draft-play-btn:focus-visible,
.trx-draft-play-btn:active {
  outline: none;
  box-shadow: none;
}
.trx-draft-play-btn.is-playing { font-size: 11px; }
.trx-draft-waveform {
  flex: 1; height: 28px; display: flex; align-items: center; gap: 2px; min-width: 0;
}
.trx-draft-waveform span {
  width: 3px; border-radius: 2px; background: var(--color-brand); opacity: 0.35;
  transform-origin: center bottom;
}
.trx-draft-waveform span:nth-child(odd) { opacity: 0.6; }
.trx-draft-waveform span:nth-child(3n) { opacity: 0.9; }
.trx-draft-waveform.is-playing span,
.trx-draft-media-bar.is-playing .trx-draft-waveform span {
  animation: trx-draft-wave 0.75s ease-in-out infinite alternate;
}
.trx-draft-waveform.is-playing span:nth-child(3n+1),
.trx-draft-media-bar.is-playing .trx-draft-waveform span:nth-child(3n+1) { animation-delay: 0s; }
.trx-draft-waveform.is-playing span:nth-child(3n+2),
.trx-draft-media-bar.is-playing .trx-draft-waveform span:nth-child(3n+2) { animation-delay: 0.12s; }
.trx-draft-waveform.is-playing span:nth-child(3n),
.trx-draft-media-bar.is-playing .trx-draft-waveform span:nth-child(3n) { animation-delay: 0.06s; }
@keyframes trx-draft-wave {
  0% { transform: scaleY(0.35); opacity: 0.4; }
  100% { transform: scaleY(1); opacity: 1; }
}
.trx-draft-media-dur {
  font-size: 12px; color: var(--color-text-tertiary); font-weight: 600; flex-shrink: 0;
}
.trx-draft-speed-btn {
  padding: 3px 8px; border: 1px solid var(--color-border); border-radius: 6px;
  font-size: 11px; font-weight: 600; color: var(--color-text-secondary);
  background: #fff; cursor: pointer; flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
  tap-highlight-color: transparent;
  outline: none;
}
.trx-draft-speed-btn:focus,
.trx-draft-speed-btn:focus-visible,
.trx-draft-speed-btn:active {
  outline: none;
  box-shadow: none;
}
.trx-draft-native-audio {
  position: absolute; width: 0; height: 0; opacity: 0; pointer-events: none;
}
.trx-draft-tabs {
  display: flex; padding: 0 12px; gap: 16px;
  border-bottom: 1px solid var(--color-border-light, #F3F4F6);
  background: var(--color-card);
  position: static;
  top: auto;
  z-index: auto;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.trx-draft-tabs::-webkit-scrollbar { display: none; }
.trx-draft-tab {
  flex: 0 0 auto;
  padding: 10px 2px; background: none; border: none;
  border-bottom: 2.5px solid transparent;
  font-size: 14px; font-weight: 500; color: var(--color-text-tertiary); cursor: pointer;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  tap-highlight-color: transparent;
  outline: none;
}
.trx-draft-tab:focus,
.trx-draft-tab:focus-visible,
.trx-draft-tab:active {
  outline: none;
  box-shadow: none;
}
.trx-draft-tab--active {
  color: var(--color-text-primary); font-weight: 700;
  border-bottom-color: var(--color-brand);
}
.trx-draft-tab-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 5px; margin-left: 4px;
  border-radius: 9px; background: var(--color-brand); color: #fff;
  font-size: 10px; font-weight: 700; vertical-align: middle;
}
.trx-draft-panel { padding: 16px 16px 8px; min-height: 120px; }
.trx-draft-page #voiceDraftPanelAppend,
.trx-draft-page #recordingDraftPanelAppend {
  background: #f8fafc;
  margin: 0;
  padding: 16px 16px 24px;
}
.trx-draft-panel--hidden,
.trx-draft-panel[hidden] {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}
.trx-draft-reading {
  /* ???????????????15px / 26px / #374151??????iOS ????? */
  font-size: 15px;
  line-height: 26px;
  color: #374151;
  word-break: break-word;
  font-family: inherit;
}
.trx-draft-ts-toggle {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 10px; border-radius: 999px;
  background: var(--color-border-light, #F3F4F6);
  font-size: 11px; color: var(--color-text-tertiary);
  cursor: pointer; margin-bottom: 14px; border: none;
  user-select: none; font-family: inherit;
}
.trx-draft-ts-toggle--active {
  background: var(--color-brand-light, #EFF6FF);
  color: var(--color-brand-dark, #1E40AF);
}
.trx-draft-reading .transcript-body p { margin-bottom: 18px; }
.trx-draft-reading .transcript-timestamp {
  display: inline-block; font-size: 12px; color: var(--color-text-tertiary);
  font-weight: 500; margin-right: 6px; vertical-align: 1px;
}
.trx-draft-reading .consumer-story-p,
.trx-draft-reading .note-detail-prose-p {
  margin: 0 0 18px;
  font-size: 15px;
  line-height: 26px;
  color: inherit;
  font-family: inherit;
  font-weight: 400;
  letter-spacing: normal;
}
.trx-draft-reading .consumer-story-p:last-child,
.trx-draft-reading .note-detail-prose-p:last-child {
  margin-bottom: 0;
}
.trx-draft-ai-block {
  background: #FFFBEB; border-left: 3px solid #F59E0B;
  padding: 14px 16px; margin-bottom: 16px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.trx-draft-ai-label { font-size: 12px; font-weight: 700; color: #B45309; margin-bottom: 6px; }
.trx-draft-ai-text { font-size: 15px; line-height: 1.75; color: #78350F; white-space: pre-wrap; }
.trx-draft-empty-note {
  padding: 24px 8px; text-align: center; color: var(--color-text-secondary); font-size: 14px;
}
.trx-draft-scene-hint { display: none; }

/* ???? ? ???? */
.content-intent-picker {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}
.content-intent-picker--compact {
  margin: 12px 16px 4px;
}
.content-intent-chip {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  border: 1.5px solid var(--color-border, #E5E7EB);
  border-radius: var(--radius-md, 12px);
  background: #fff;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.content-intent-chip--active {
  border-color: var(--color-brand, #2563EB);
  background: linear-gradient(135deg, #EFF6FF 0%, #F5F3FF 100%);
}
.content-intent-chip-icon { font-size: 22px; line-height: 1; flex-shrink: 0; }
.content-intent-chip-body { min-width: 0; }
.content-intent-chip-label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--color-text, #111827);
}
.content-intent-chip-desc {
  display: block;
  font-size: 11px;
  color: var(--color-text-secondary, #6B7280);
  margin-top: 2px;
  line-height: 1.35;
}
.shorthand-intent-wrap {
  padding: 0 16px 8px;
}
.shorthand-intent-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-secondary);
  margin: 0 0 8px 2px;
}

.trx-draft-scene-hero {
  display: flex; align-items: center; gap: 14px; width: 100%;
  padding: 18px 16px; margin-bottom: 16px; text-align: left; cursor: pointer;
  background: linear-gradient(135deg, #EFF6FF 0%, #F5F3FF 100%);
  border: 2px solid var(--color-brand); border-radius: var(--radius-lg);
  position: relative; overflow: hidden;
}
.trx-draft-scene-hero-icon {
  width: 52px; height: 52px; border-radius: 14px; background: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; flex-shrink: 0; box-shadow: 0 2px 8px rgba(37, 99, 235, 0.12);
}
.trx-draft-scene-hero-body { flex: 1; min-width: 0; }
.trx-draft-scene-hero-title { display: block; font-size: 17px; font-weight: 700; color: var(--color-brand-dark, #1E40AF); }
.trx-draft-scene-hero-desc { display: block; font-size: 13px; color: var(--color-brand); margin-top: 3px; }
.trx-draft-scene-hero-arrow { font-size: 18px; color: var(--color-brand); opacity: 0.5; }
.trx-draft-scene-hero-badge {
  position: absolute; top: 10px; right: -20px;
  background: var(--color-brand); color: #fff;
  font-size: 10px; font-weight: 700; padding: 3px 26px; transform: rotate(45deg);
}
.trx-draft-scene-group-label {
  font-size: 13px; font-weight: 700; color: var(--color-text-tertiary);
  margin: 4px 0 10px; padding-left: 2px;
}
.trx-draft-scene-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px;
}
.trx-draft-scene-item {
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
  padding: 14px 13px; background: var(--color-card);
  border: 1.5px solid var(--color-border); border-radius: var(--radius-md);
  cursor: pointer; text-align: left;
}
.trx-draft-scene-item:active { border-color: var(--color-brand); background: var(--color-brand-light); }
.trx-draft-scene-hero.trx-draft-scene--selected,
.trx-draft-scene-item.trx-draft-scene--selected {
  border-color: var(--color-brand);
  background: var(--color-brand-light);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}
.trx-draft-scene-item-icon { font-size: 23px; }
.trx-draft-scene-item-title { font-size: 14px; font-weight: 600; color: var(--color-text-primary); }
.trx-draft-scene-item-desc { font-size: 11px; color: var(--color-text-tertiary); line-height: 1.4; }
.trx-draft-save-only {
  display: block; width: 100%; padding: 16px; margin-top: 4px;
  text-align: center; background: none; border: none; border-top: 1px solid var(--color-border-light, #F3F4F6);
  color: var(--color-text-tertiary); font-size: 14px; cursor: pointer;
}
.trx-draft-loading {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  top: 52px;
  z-index: 200;
  background: rgba(255, 255, 255, 0.96);
  display: flex;
  align-items: center;
  justify-content: center;
}
.trx-draft-loading-inner {
  text-align: center;
  padding: 0 28px;
  max-width: 320px;
  width: 100%;
}
.trx-draft-loading-mascot {
  width: 64px;
  height: 64px;
  margin: 0 auto 14px;
}
.trx-draft-loading-mascot svg,
.trx-draft-loading-mascot img {
  width: 64px;
  height: 64px;
  display: block;
  object-fit: contain;
}
.trx-draft-loading-spinner {
  width: 44px; height: 44px; margin: 0 auto 16px;
  border: 3px solid var(--color-border); border-top-color: var(--color-brand);
  border-radius: 50%; animation: voice-draft-spin 0.8s linear infinite;
}
.trx-draft-loading-title { font-size: 17px; font-weight: 700; color: var(--color-text-primary); margin-bottom: 6px; }
.trx-draft-loading-sub { font-size: 13px; color: var(--color-text-tertiary); margin: 0 0 18px; line-height: 1.5; }
.trx-draft-loading-steps {
  display: none;
  flex-direction: column;
  gap: 10px;
  text-align: left;
  margin: 0 auto;
  max-width: 220px;
}
.trx-draft-loading-step {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--color-text-tertiary);
}
.trx-draft-loading-step-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  background: #F3F4F6;
  color: #9CA3AF;
  flex-shrink: 0;
}
.trx-draft-loading-step--active {
  color: var(--color-text-primary);
  font-weight: 600;
}
.trx-draft-loading-step--active .trx-draft-loading-step-icon {
  background: var(--color-brand-light, #EFF6FF);
  color: var(--color-brand, #2563EB);
}
.trx-draft-loading-step--done {
  color: var(--color-text-secondary);
}
.trx-draft-loading-step--done .trx-draft-loading-step-icon {
  background: #ECFDF5;
  color: #059669;
}
.trx-draft-loading-step--failed {
  color: #DC2626;
}
.trx-draft-loading-step--failed .trx-draft-loading-step-icon {
  background: #FEF2F2;
  color: #DC2626;
}

.trx-draft-page--scenes .trx-draft-scroll {
  padding-bottom: calc(80px + env(safe-area-inset-bottom));
}
.trx-draft-bottom-bar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 420px;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px;
  padding-bottom: max(10px, env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--color-border);
  z-index: 120;
}
.trx-draft-bottom-bar--hidden { display: none; }
.trx-draft-bottom-secondary {
  padding: 13px 20px; border: none; border-radius: var(--radius-md);
  background: var(--color-border-light, #F3F4F6);
  color: var(--color-text-secondary);
  font-size: 15px; font-weight: 500; cursor: pointer;
  white-space: nowrap;
}
.trx-draft-bottom-primary {
  flex: 1; padding: 13px 20px; border: none; border-radius: var(--radius-md);
  background: var(--color-brand); color: #fff;
  font-size: 15px; font-weight: 600; cursor: pointer;
  text-align: center;
}
.trx-draft-bottom-primary--strong {
  background: var(--color-brand); color: #fff; font-weight: 600;
}
.trx-draft-bottom-primary--weak {
  background: var(--color-border-light, #F3F4F6);
  color: var(--color-text-secondary); font-weight: 500;
}
.trx-draft-bottom-primary:active,
.trx-draft-bottom-secondary:active { transform: scale(0.98); opacity: 0.95; }

.trx-draft-detail-bottom-bar {
  z-index: 1001;
}
#page-recording-draft:not(.trx-draft-page--scenes) #recordingDraftDetailBottomBar,
#page-voice-draft:not(.trx-draft-page--scenes) #voiceDraftDetailBottomBar {
  z-index: 1001;
}
#page-recording-draft.trx-draft-page--scenes .trx-draft-content,
#page-voice-draft.trx-draft-page--scenes .trx-draft-content {
  padding-bottom: calc(88px + env(safe-area-inset-bottom));
}
#page-recording-draft.trx-draft-page--scenes,
#page-voice-draft.trx-draft-page--scenes {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.trx-draft-page:not(.trx-draft-page--scenes) .trx-draft-content {
  padding-bottom: calc(72px + env(safe-area-inset-bottom));
}
#page-voice-draft:not(.trx-draft-page--scenes) .trx-draft-content {
  padding-bottom: calc(72px + env(safe-area-inset-bottom));
}
.trx-draft-panel .note-tab-count {
  margin-left: 2px;
}

.recording-draft-summary-card {
  background: linear-gradient(135deg, #f0f7ff 0%, #fff 100%);
  border: 1px solid #dbeafe; border-radius: var(--radius-lg);
  padding: 14px 16px; margin-bottom: 12px;
}
.recording-draft-summary-label {
  font-size: 12px; font-weight: 600; color: var(--color-brand); margin-bottom: 6px;
}
.recording-draft-summary-title {
  font-size: 16px; font-weight: 600; color: var(--color-text-primary); margin-bottom: 8px;
}
.recording-draft-summary-text {
  font-size: 14px; line-height: 1.7; color: var(--color-text-secondary); white-space: pre-wrap;
}
.recording-draft-transcript { max-height: 240px; overflow-y: auto; }
.recording-draft-instruction-wrap { margin: 12px 0 4px; }
.recording-draft-instruction-label {
  font-size: 13px; font-weight: 600; color: var(--color-text-primary); margin-bottom: 6px;
}
.recording-draft-instruction {
  width: 100%; min-height: 56px; resize: vertical; font-size: 14px; line-height: 1.5;
}

/* ===== ?? / ???? ? ?????? ===== */
.upload-form-page > .upload-form-content {
  padding: 0 0 12px;
}
.upload-form-content {
  padding: 0 0 calc(24px + env(safe-area-inset-bottom));
}
.upload-form-footer {
  flex-shrink: 0;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
  background: var(--color-card);
  border-top: 1px solid var(--color-border-light, #f3f4f6);
  box-shadow: 0 -2px 12px rgba(15, 23, 42, 0.06);
  box-sizing: border-box;
}
.upload-form-footer .submit-btn {
  width: 100%;
  margin: 0;
}
.upload-form-footer .upload-progress {
  margin: 0 0 10px;
}
.upload-form-tip {
  padding-bottom: 4px;
}
.info-card {
  margin: 16px 16px 12px;
  padding: 14px 16px;
  background: var(--color-brand-light, #DBEAFE);
  border-radius: var(--radius-md);
  border-left: none;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.info-icon {
  width: auto; height: auto;
  background: none; color: inherit;
  border-radius: 0;
  display: block;
  font-size: 22px; flex-shrink: 0; margin-top: 1px;
}
.info-text {
  font-size: 13px; color: var(--color-brand-dark, #1D4ED8); line-height: 1.65;
}
.info-text strong { color: var(--color-text-primary); font-weight: 600; }

.upload-form-content .form-group {
  padding: 0 16px; margin-bottom: 14px;
}
.upload-form-content .form-label {
  display: block;
  font-size: 12px; font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: 6px;
}
.form-label-opt {
  font-weight: 400; color: var(--color-text-tertiary);
  font-size: 11px; margin-left: 4px;
}
.upload-form-content .form-input {
  width: 100%; padding: 12px 14px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: 14px; background: var(--color-card);
  color: var(--color-text-primary);
  -webkit-user-select: text;
  user-select: text;
  touch-action: manipulation;
  outline: none; transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-appearance: none;
}
.upload-form-content .form-input:focus {
  border-color: var(--color-brand);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
.upload-form-content .form-input::placeholder { color: var(--color-text-tertiary); }

.upload-zone {
  position: relative;
  display: block;
  padding: 28px 20px;
  border: 2px dashed var(--color-border);
  border-radius: var(--radius-lg);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  background: var(--color-card);
  overflow: hidden;
}
.upload-zone-file {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
  font-size: 0;
}
.upload-zone-body {
  position: relative;
  z-index: 1;
  pointer-events: none;
}
.upload-zone:active,
.upload-zone.has-file {
  border-color: var(--color-brand);
  background: #EFF6FF;
}
.upload-zone-icon {
  width: 52px; height: 52px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 24px; margin-bottom: 10px;
}
.upload-zone-icon.tone-audio { background: linear-gradient(135deg, #DBEAFE, #BFDBFE); }
.upload-zone-icon.tone-video { background: linear-gradient(135deg, #EDE9FE, #DDD6FE); }
.upload-zone-title {
  font-size: 14px; font-weight: 600; color: var(--color-brand);
}
.upload-zone-desc {
  font-size: 11px; color: var(--color-text-tertiary); margin-top: 4px;
}
.upload-zone-format {
  display: inline-flex; align-items: center; gap: 5px;
  margin-top: 10px; padding: 4px 12px;
  background: var(--color-bg); border-radius: var(--radius-full);
  font-size: 11px; color: var(--color-text-secondary);
}
.upload-file-meta {
  margin-top: 8px; font-size: 12px; color: var(--color-text-secondary);
  line-height: 1.5; word-break: break-all;
}
.upload-form-content .media-preview {
  width: 100%; margin-top: 0; border-radius: 0;
}
.upload-form-content .upload-preview-block {
  margin: 0;
  border-radius: var(--radius-lg);
}
.upload-form-content .upload-preview-block .media-preview {
  max-height: 220px;
  width: 100%;
  object-fit: contain;
  background: #000;
  display: block;
}

/* ===== ??? ? ?????? ===== */
.audio-preview-card {
  background: var(--color-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  overflow: hidden;
}
.audio-preview-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--color-brand-light, #DBEAFE);
}
.audio-preview-header .audio-preview-icon {
  font-size: 28px;
  flex-shrink: 0;
}
.audio-preview-info {
  flex: 1;
  min-width: 0;
}
.audio-preview-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-primary);
  margin-bottom: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.audio-preview-meta {
  font-size: 12px;
  color: var(--color-text-secondary);
}
.audio-preview-remove {
  background: none;
  border: none;
  font-size: 18px;
  color: var(--color-text-tertiary);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 50%;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}
.audio-preview-remove:active { background: var(--color-border-light, #F3F4F6); }
.audio-player-wrap {
  padding: 8px 16px 12px;
  background: var(--color-card);
}
.audio-player-wrap audio {
  width: 100%;
  height: 36px;
}
.upload-form-content .audio-preview-inner {
  padding: 20px 16px 12px;
  background: linear-gradient(180deg, #1a1a2e 0%, #12121f 100%);
  text-align: center;
}
.upload-form-content .audio-preview-icon {
  font-size: 32px;
  margin-bottom: 10px;
}
.upload-form-content .audio-preview-inner .media-preview {
  width: 100%;
  max-height: none;
  background: transparent;
}

.auth-row {
  display: flex; align-items: flex-start; gap: 10px;
  margin: 0 16px 14px; padding: 13px 15px;
  background: var(--color-bg); border-radius: var(--radius-md);
  cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.auth-box {
  width: 20px; height: 20px;
  border: 2px solid var(--color-border); border-radius: 5px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; margin-top: 1px;
  background: white; font-size: 12px; color: white;
  transition: background 0.2s, border-color 0.2s;
}
.auth-row.checked .auth-box {
  background: var(--color-brand); border-color: var(--color-brand);
}
.auth-text {
  font-size: 11px; color: var(--color-text-secondary); line-height: 1.6;
}
.auth-text strong { color: var(--color-text-primary); }

.upload-form-content .upload-progress {
  margin: 0 16px 14px;
}
.submit-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: calc(100% - 32px); margin: 0 16px;
  padding: 14px 24px; border: none;
  background: linear-gradient(135deg, var(--color-brand) 0%, var(--color-brand-dark) 100%);
  color: white; font-size: 15px; font-weight: 700;
  border-radius: var(--radius-md); cursor: pointer;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
  transition: transform 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.submit-btn:active { transform: scale(0.98); }
.submit-btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

.footer-tip {
  text-align: center; font-size: 11px;
  color: var(--color-text-tertiary);
  padding: 12px 24px 8px; line-height: 1.55;
}

.source-title {
  padding: 0 16px;
  font-size: 12px; font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: 10px;
}
.source-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 8px; padding: 0 16px; margin-bottom: 16px;
}
.source-item {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  padding: 13px 6px; background: var(--color-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1.5px solid transparent;
}
.source-item-icon {
  width: 36px; height: 36px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}
.source-item-name {
  font-size: 11px; font-weight: 500; color: var(--color-text-secondary);
}

.link-input-wrap {
  position: relative; padding: 0 16px; margin-bottom: 14px;
}
.link-input-icon {
  position: absolute; left: 32px; top: 50%;
  transform: translateY(-50%);
  font-size: 17px; color: var(--color-text-tertiary);
  pointer-events: none;
}
.link-input {
  width: 100%; padding: 15px 15px 15px 44px;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-lg);
  font-size: 14px; background: var(--color-card);
  color: var(--color-text-primary);
  outline: none; transition: border-color 0.2s, box-shadow 0.2s;
}
.link-input:focus {
  border-color: var(--color-brand);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
.link-input::placeholder { color: var(--color-text-tertiary); }

/* ===== P1 ???? ? ??? / ?? ===== */
.trx-job-page { background: var(--color-card); min-height: 100%; }
.trx-job-nav {
  display: flex; align-items: center; padding: 10px 12px;
  position: sticky; top: 0; z-index: 100; background: var(--color-card);
  border-bottom: 1px solid var(--color-border-light, #F3F4F6);
}
.trx-job-nav .nav-back {
  width: 34px; height: 34px; display: flex; align-items: center; justify-content: center;
  font-size: 24px; border-radius: 50%;
}
.trx-job-nav .nav-title { flex: 1; text-align: center; font-size: 17px; font-weight: 600; }
.trx-job-nav .nav-spacer { width: 34px; }
.trx-job-content {
  display: flex; flex-direction: column; min-height: calc(100vh - 54px);
  padding: 0;
}
.trx-job-main {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  padding: 40px 24px 24px; text-align: center;
}
.trx-job-wave {
  width: 180px; height: 80px; display: flex; align-items: center;
  justify-content: center; gap: 4px; margin-bottom: 24px;
}
.trx-job-wave span {
  width: 5px; border-radius: 3px; background: var(--color-brand);
  animation: trx-job-wave 0.8s ease-in-out infinite alternate;
}
.trx-job-wave span:nth-child(1) { height: 20px; animation-delay: 0s; }
.trx-job-wave span:nth-child(2) { height: 35px; animation-delay: 0.1s; }
.trx-job-wave span:nth-child(3) { height: 50px; animation-delay: 0.05s; }
.trx-job-wave span:nth-child(4) { height: 40px; animation-delay: 0.15s; }
.trx-job-wave span:nth-child(5) { height: 55px; animation-delay: 0.02s; }
.trx-job-wave span:nth-child(6) { height: 30px; animation-delay: 0.12s; }
.trx-job-wave span:nth-child(7) { height: 45px; animation-delay: 0.08s; }
.trx-job-wave span:nth-child(8) { height: 25px; animation-delay: 0.18s; }
.trx-job-wave span:nth-child(9) { height: 50px; animation-delay: 0.03s; }
.trx-job-wave span:nth-child(10) { height: 35px; animation-delay: 0.13s; }
.trx-job-wave span:nth-child(11) { height: 20px; animation-delay: 0.07s; }
.trx-job-wave span:nth-child(12) { height: 45px; animation-delay: 0.17s; }
@keyframes trx-job-wave {
  0% { transform: scaleY(0.4); opacity: 0.5; }
  100% { transform: scaleY(1); opacity: 1; }
}
.trx-job-title { font-size: 20px; font-weight: 700; margin: 0 0 8px; }
.trx-job-sub { font-size: 14px; color: var(--color-text-secondary); margin: 0 0 28px; line-height: 1.6; }
.trx-job-progress { width: 100%; max-width: 280px; margin-bottom: 20px; }
.trx-job-progress-head {
  display: flex; justify-content: space-between; margin-bottom: 8px;
  font-size: 13px; color: var(--color-text-secondary);
}
.trx-job-progress-head span:last-child { color: var(--color-brand); font-weight: 700; }
.trx-job-progress-track {
  height: 6px; background: var(--color-border-light, #F3F4F6);
  border-radius: 3px; overflow: hidden;
}
.trx-job-progress-fill {
  height: 100%; width: 0;
  background: linear-gradient(90deg, var(--color-brand), #60A5FA);
  border-radius: 3px; transition: width 0.5s ease;
}
.trx-job-step { font-size: 13px; color: var(--color-text-tertiary); margin: 0 0 12px; }
.trx-job-steps { width: 100%; max-width: 320px; text-align: left; margin-bottom: 20px; }
.trx-job-step-item {
  display: flex; align-items: center; gap: 10px; padding: 8px 0;
  font-size: 14px; color: var(--color-text-tertiary);
}
.trx-job-step-item--done { color: var(--color-text-primary); }
.trx-job-step-item--active { color: var(--color-brand); font-weight: 600; }
.trx-job-step-item--failed { color: #DC2626; }
.trx-job-step-icon {
  width: 24px; height: 24px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; font-size: 12px; font-weight: 700;
  background: var(--color-border-light, #F3F4F6);
}
.trx-job-step-item--done .trx-job-step-icon { background: #D1FAE5; color: #059669; }
.trx-job-step-item--active .trx-job-step-icon { background: var(--color-brand-light); color: var(--color-brand); }
.trx-job-step-item--failed .trx-job-step-icon { background: #FEE2E2; color: #DC2626; }
.trx-job-tip {
  max-width: 320px; font-size: 12px; line-height: 1.6;
  color: var(--color-text-secondary); background: #F8FAFC;
  padding: 10px 14px; border-radius: var(--radius-md); text-align: left;
}
.trx-job-footer {
  padding: 12px 24px calc(24px + env(safe-area-inset-bottom));
}
.trx-job-back-btn {
  width: 100%; max-width: 320px; margin: 0 auto; display: block;
  padding: 14px; border: none; border-radius: var(--radius-md);
  background: var(--color-border-light, #F3F4F6); color: var(--color-text-secondary);
  font-size: 15px; font-weight: 500; cursor: pointer;
}
.trx-job-cases-title { font-weight: 600; margin: 16px 0 8px; font-size: 14px; }
.trx-job-case-link {
  display: block; margin-bottom: 8px; padding: 12px;
  background: var(--color-card); border: 1px solid var(--color-border);
  border-radius: var(--radius-md); text-decoration: none; color: inherit;
}
.trx-job-case-btn {
  width: 100%; margin-top: 8px; padding: 12px;
  border: 1px solid var(--color-border); border-radius: var(--radius-md);
  background: #fff; font-size: 14px; cursor: pointer;
}
.trx-job-cases-empty { font-size: 13px; color: var(--color-text-secondary); }
.trx-job-fail-main {
  display: flex; flex-direction: column; align-items: center;
  padding: 32px 24px calc(32px + env(safe-area-inset-bottom)); text-align: center;
}
.trx-job-fail-icon-wrap { margin-bottom: 16px; }
.trx-job-fail-icon {
  width: 64px; height: 64px; border-radius: 50%;
  background: #FEE2E2; color: #DC2626;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; font-weight: 700;
}
.trx-job-fail-title { font-size: 20px; font-weight: 700; color: #991B1B; margin: 0 0 8px; }
.trx-job-fail-sub { font-size: 14px; color: var(--color-text-secondary); margin: 0 0 12px; }
.trx-job-fail-reason {
  font-size: 13px; color: #DC2626; background: #FEF2F2;
  padding: 8px 14px; border-radius: var(--radius-sm);
  margin: 0 0 24px; max-width: 300px; line-height: 1.5;
}
.trx-job-file-card {
  width: 100%; max-width: 320px; text-align: left;
  background: var(--color-bg, #F9FAFB); border: 1px solid var(--color-border);
  border-radius: var(--radius-md); padding: 14px 16px; margin-bottom: 24px;
}
.trx-job-fi-row {
  display: flex; justify-content: space-between; padding: 6px 0; font-size: 13px;
}
.trx-job-fi-label { color: var(--color-text-tertiary); }
.trx-job-fi-value { font-weight: 500; }
.trx-job-fi-value--bad { color: #DC2626; }
.trx-job-solutions { width: 100%; max-width: 320px; text-align: left; margin-bottom: 24px; }
.trx-job-solutions-title { font-size: 14px; font-weight: 700; margin-bottom: 10px; }
.trx-job-solution-list { list-style: none; margin: 0; padding: 0; }
.trx-job-solution-list li {
  display: flex; align-items: flex-start; gap: 8px; padding: 8px 0;
  font-size: 13px; color: var(--color-text-secondary); line-height: 1.6;
  border-bottom: 1px solid var(--color-border-light, #F3F4F6);
}
.trx-job-solution-list li:last-child { border-bottom: none; }
.trx-job-solution-num {
  width: 20px; height: 20px; flex-shrink: 0; margin-top: 2px;
  display: flex; align-items: center; justify-content: center;
  background: var(--color-brand-light); color: var(--color-brand-dark, #1E40AF);
  border-radius: 50%; font-size: 10px; font-weight: 700;
}
.trx-job-fail-actions {
  width: 100%; max-width: 320px; display: flex; flex-direction: column; gap: 10px;
}
.trx-job-retry-btn {
  width: 100%; padding: 14px; border: none; border-radius: var(--radius-md);
  background: var(--color-brand); color: #fff;
  font-size: 15px; font-weight: 600; cursor: pointer;
}
.trx-job-secondary-btn {
  width: 100%; padding: 14px; border: none; border-radius: var(--radius-md);
  background: var(--color-border-light, #F3F4F6); color: var(--color-text-secondary);
  font-size: 14px; font-weight: 500; cursor: pointer;
}
.trx-job-delete-btn {
  width: 100%; padding: 14px; border: 1px solid #FECACA; border-radius: var(--radius-md);
  background: #FEF2F2; color: var(--color-error, #DC2626);
  font-size: 14px; font-weight: 600; cursor: pointer;
}
.trx-job-delete-btn:active { background: #FEE2E2; }
.trx-job-content--failed {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* ===== ????? ? ???????????? ===== */
#page-recording-draft.active,
#page-voice-draft.active {
  display: flex !important;
  flex-direction: column;
  padding-bottom: 0 !important;
}
#page-recording-draft.active .trx-draft-nav,
#page-voice-draft.active .trx-draft-nav {
  flex-shrink: 0;
}
#page-recording-draft.active .trx-draft-content,
#page-voice-draft.active .trx-draft-content {
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* ===== ????? ? Get ??????? / ???? ===== */
.rd-sheet-overlay {
  position: fixed; inset: 0; z-index: 1200;
  display: none; align-items: flex-end; justify-content: center;
  padding: 0; max-width: 480px; margin: 0 auto;
  pointer-events: none;
}
.rd-sheet-overlay.is-open { display: flex; pointer-events: auto; }
.rd-sheet-mask {
  position: absolute; inset: 0;
  background: rgba(15, 23, 42, 0.45);
}
.rd-sheet {
  position: relative; z-index: 1; width: 100%;
  background: #fff; border-radius: 16px 16px 0 0;
  box-shadow: 0 -8px 32px rgba(15, 23, 42, 0.12);
  max-height: min(88vh, 720px);
  display: flex; flex-direction: column;
  animation: rd-sheet-up 0.24s ease;
}
@keyframes rd-sheet-up {
  from { transform: translateY(100%); opacity: 0.6; }
  to { transform: translateY(0); opacity: 1; }
}
.rd-sheet--menu { padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); }
.rd-sheet-note {
  padding: 10px 12px 14px;
  font-size: 13px; color: var(--color-text-secondary);
  line-height: 1.5; border-bottom: 1px solid var(--color-border-light, #F3F4F6);
  margin-bottom: 8px;
}
.rd-sheet-note strong {
  display: block; font-size: 15px; color: var(--color-text-primary);
  margin-bottom: 4px; font-weight: 700;
}
.rd-sheet-action {
  width: 100%; display: flex; align-items: center; gap: 12px;
  padding: 14px 12px; border: none; background: transparent;
  font-size: 16px; color: var(--color-text-primary); cursor: pointer;
  border-radius: var(--radius-sm); text-align: left;
}
.rd-sheet-action:active { background: var(--color-border-light, #F3F4F6); }
.rd-sheet-action-icon { font-size: 20px; width: 28px; text-align: center; flex-shrink: 0; }
.rd-sheet-cancel {
  width: 100%; margin-top: 8px; padding: 14px;
  border: none; border-radius: var(--radius-md);
  background: var(--color-border-light, #F3F4F6);
  color: var(--color-text-secondary); font-size: 15px; font-weight: 600;
  cursor: pointer;
}
.rd-sheet-head {
  display: flex; align-items: center; gap: 8px;
  padding: 14px 16px 10px; border-bottom: 1px solid var(--color-border-light, #F3F4F6);
  flex-shrink: 0;
}
.rd-sheet-title {
  flex: 1; margin: 0; font-size: 17px; font-weight: 700;
  color: var(--color-text-primary); text-align: center;
}
.rd-sheet-back,
.rd-sheet-close {
  width: 36px; height: 36px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border: none; border-radius: 50%; background: transparent;
  font-size: 22px; color: var(--color-text-secondary); cursor: pointer;
}
.rd-sheet-back { font-size: 26px; }
.rd-sheet-back:active,
.rd-sheet-close:active { background: var(--color-border-light, #F3F4F6); }
.rd-tag-picker-selected {
  display: flex; flex-wrap: wrap; gap: 6px;
  padding: 14px 16px; min-height: 52px;
  border-bottom: 1px solid var(--color-border-light, #F3F4F6);
}
/* ???? .note-tag-chip ???? */
.rd-tag-picker-chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 6px;
  border: 1px solid var(--color-border, #E5E7EB);
  background: #fff; color: var(--color-text-secondary, #6B7280);
  font-size: 12px; font-weight: 500; line-height: 1.4;
}
.rd-tag-picker-chip-remove {
  border: none; background: transparent; color: var(--color-text-tertiary);
  font-size: 14px; line-height: 1; cursor: pointer; padding: 0 2px;
}
.rd-tag-picker-new {
  flex: 1; min-width: 120px; border: none; background: transparent;
  font-size: 14px; color: var(--color-text-tertiary); outline: none;
}
.rd-tag-picker-section { padding: 12px 16px 16px; flex: 1; overflow-y: auto; }
.rd-tag-picker-label {
  font-size: 13px; font-weight: 600; color: var(--color-text-tertiary);
  margin-bottom: 10px;
}
.rd-tag-picker-cloud { display: flex; flex-wrap: wrap; gap: 6px; }
.rd-tag-picker-pill {
  display: inline-flex; align-items: center;
  padding: 3px 10px; border-radius: 6px;
  border: 1px solid var(--color-border, #E5E7EB);
  background: #fff; color: var(--color-text-secondary, #6B7280);
  font-size: 12px; font-weight: 500; line-height: 1.4;
  cursor: pointer; font-family: inherit;
}
.rd-tag-picker-pill.is-active {
  border-color: var(--color-border, #E5E7EB);
  background: var(--color-border-light, #F3F4F6);
  color: var(--color-text-secondary, #6B7280);
  font-weight: 500;
}
.rd-tag-picker-foot {
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--color-border-light, #F3F4F6);
  flex-shrink: 0;
}
.rd-tag-picker-done {
  width: 100%; padding: 14px; border: none; border-radius: var(--radius-md);
  background: var(--color-brand); color: #fff;
  font-size: 16px; font-weight: 600; cursor: pointer;
}
.rd-kb-folder-list {
  flex: 1; overflow-y: auto; padding: 8px 0;
}
.rd-kb-folder-item {
  width: 100%; display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; border: none; background: transparent;
  text-align: left; cursor: pointer;
}
.rd-kb-folder-item:active { background: var(--color-border-light, #F3F4F6); }
.rd-kb-folder-icon {
  width: 40px; height: 40px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  border-radius: 10px; background: #EFF6FF; font-size: 18px;
}
.rd-kb-folder-name {
  flex: 1; font-size: 15px; color: var(--color-text-primary); font-weight: 500;
}
.rd-kb-folder-new {
  width: calc(100% - 32px); margin: 8px 16px calc(12px + env(safe-area-inset-bottom));
  padding: 14px; border: 1.5px dashed var(--color-border);
  border-radius: var(--radius-md); background: #fff;
  color: var(--color-text-secondary); font-size: 15px; font-weight: 600;
  cursor: pointer;
}
.rd-kb-folder-empty {
  padding: 24px 16px; text-align: center;
  font-size: 14px; color: var(--color-text-tertiary);
}

/* ===== AI ?? ? ???? v4.1?2??????? ===== */
#noteTabAi,
#voiceDraftPanelScenes,
#recordingDraftPanelScenes {
  --ai-scene-brand: #3B82F6;
  --ai-scene-brand-hover: #2563EB;
  --ai-scene-brand-light: #EFF6FF;
  --ai-scene-text: #111827;
  --ai-scene-text-secondary: #6B7280;
  --ai-scene-text-tertiary: #94A3B8;
  --ai-scene-surface: #F8FAFC;
  --ai-scene-radius: 14px;
  --ai-scene-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 4px 12px -4px rgba(0, 0, 0, 0.06);
  --ai-scene-shadow-active: 0 2px 6px rgba(0, 0, 0, 0.08), 0 4px 16px -4px rgba(0, 0, 0, 0.08);
  background: #fff;
}
.note-ai-pills-wrap.ai-scene-pills-hidden {
  display: none !important;
}
.ai-scene-host {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}
.ai-scene-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 11px;
  width: 100%;
  max-width: 100%;
  padding: 6px 0 8px;
  overflow: hidden;
}
.ai-scene-extra {
  margin-top: 11px;
}
.ai-scene-extra .ai-scene-card--wide {
  max-width: 100%;
}
.ai-scene-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  padding: 20px 10px 18px;
  text-align: center;
  cursor: pointer;
  border: 0.5px solid rgba(59, 130, 246, 0.25);
  border-radius: var(--ai-scene-radius);
  background: #fff;
  box-shadow: var(--ai-scene-shadow);
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}
.ai-scene-card:active {
  transform: scale(0.97);
  background: var(--ai-scene-surface);
  box-shadow: var(--ai-scene-shadow-active);
  border-color: rgba(59, 130, 246, 0.45);
}
.ai-scene-card--selected {
  background: var(--ai-scene-brand-light);
  border-color: rgba(59, 130, 246, 0.45);
  box-shadow: var(--ai-scene-shadow-active);
}
.ai-scene-card--recommended::before {
  content: "??";
  position: absolute;
  top: 0;
  right: 0;
  background: linear-gradient(135deg, #3B82F6, #2563EB);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 4px 12px 4px 10px;
  border-bottom-left-radius: 10px;
  letter-spacing: 1px;
  pointer-events: none;
  z-index: 1;
  line-height: 1.2;
}
.ai-scene-card-icon {
  width: 54px;
  height: 54px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-bottom: 12px;
  transition: transform 0.18s ease;
}
.ai-scene-card:active .ai-scene-card-icon {
  transform: scale(0.92);
}
.ai-scene-card-icon svg {
  width: 28px;
  height: 28px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ai-scene-card-icon--blue { background: linear-gradient(135deg, #DBEAFE, #BFDBFE); color: #2563EB; }
.ai-scene-card-icon--amber { background: linear-gradient(135deg, #FEF3C7, #FDE68A); color: #D97706; }
.ai-scene-card-icon--purple { background: linear-gradient(135deg, #EDE9FE, #DDD6FE); color: #7C3AED; }
.ai-scene-card-icon--green { background: linear-gradient(135deg, #D1FAE5, #A7F3D0); color: #059669; }
.ai-scene-card-icon--rose { background: linear-gradient(135deg, #FFE4E6, #FECDD3); color: #E11D48; }
.ai-scene-card-icon--gray { background: linear-gradient(135deg, #CFFAFE, #A5F3FC); color: #0891B2; }
.ai-scene-card-icon--pink { background: linear-gradient(135deg, #FCE7F3, #FBCFE8); color: #DB2777; }
.ai-scene-card-title {
  display: block;
  width: 100%;
  font-size: 16px;
  font-weight: 700;
  color: var(--ai-scene-text);
  line-height: 1.25;
  letter-spacing: 0.3px;
  margin-bottom: 6px;
}
.ai-scene-card-desc {
  display: block;
  width: 100%;
  max-width: 100%;
  font-size: 12px;
  color: var(--ai-scene-text-tertiary);
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ai-scene-card:disabled {
  opacity: 0.5;
  pointer-events: none;
}
.case-audience-wrap {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: var(--ai-scene-radius);
  background: var(--ai-scene-surface);
  border: 0.5px solid rgba(0, 0, 0, 0.06);
}
.case-audience-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ai-scene-text-secondary);
  margin-bottom: 10px;
}
.case-audience-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.case-audience-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1.5px solid rgba(0, 0, 0, 0.08);
  background: #fff;
  text-align: left;
  cursor: pointer;
}
.case-audience-btn--selected {
  border-color: var(--ai-scene-brand, #3B82F6);
  background: var(--ai-scene-brand-light, #EFF6FF);
}
.case-audience-btn-icon {
  font-size: 16px;
  line-height: 1.2;
}
.case-audience-btn-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--ai-scene-text);
}
.case-audience-btn-desc {
  font-size: 11px;
  color: var(--ai-scene-text-tertiary);
  line-height: 1.35;
}
#noteTabAi .note-ai-bottom-bar,
#recordingDraftBottomBar.note-ai-bottom-bar,
#voiceDraftBottomBar.note-ai-bottom-bar {
  gap: 12px;
}
#noteTabAi .note-ai-bottom-bar .trx-draft-bottom-primary,
#recordingDraftBottomBar.note-ai-bottom-bar .trx-draft-bottom-primary,
#voiceDraftBottomBar.note-ai-bottom-bar .trx-draft-bottom-primary {
  flex: 2.5;
  background: var(--ai-scene-brand, #3B82F6);
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
  font-weight: 700;
}
#noteTabAi .note-ai-bottom-bar .trx-draft-bottom-secondary,
#recordingDraftBottomBar.note-ai-bottom-bar .trx-draft-bottom-secondary,
#voiceDraftBottomBar.note-ai-bottom-bar .trx-draft-bottom-secondary {
  flex: 1;
  border-radius: 10px;
  background: var(--ai-scene-surface, #F8FAFC);
  border: 0.5px solid rgba(0, 0, 0, 0.09);
  color: var(--ai-scene-text-secondary, #6B7280);
  font-weight: 500;
}
#noteTabAi .note-ai-bottom-bar .trx-draft-bottom-primary.note-ai-confirm--loading {
  opacity: 0.88;
  pointer-events: none;
}
#noteTabAi .note-ai-bottom-bar .trx-draft-bottom-secondary:disabled {
  opacity: 0.5;
  pointer-events: none;
}
#page-note.note-detail-page--ai-active .content.text-note-detail {
  flex: 1;
  min-height: 0;
  background: #fff;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}
#page-note.note-detail-page--ai-active .text-note-detail--v3 {
  padding-top: 12px;
  padding-bottom: calc(88px + env(safe-area-inset-bottom));
}
#noteTabAi {
  padding-top: 0;
  margin-bottom: 4px;
}
#page-note.note-detail-page--ai-active .page-tab-item.active {
  color: var(--ai-scene-brand, #3B82F6);
}
#page-recording-draft.trx-draft-page--scenes .trx-draft-scroll,
#page-voice-draft.trx-draft-page--scenes .trx-draft-scroll {
  background: #fff;
  overflow-x: hidden;
}
#page-recording-draft.trx-draft-page--scenes #recordingDraftPanelScenes,
#page-voice-draft.trx-draft-page--scenes #voiceDraftPanelScenes {
  overflow-x: hidden;
  max-width: 100%;
}

/* ===== Phase4a detail media bar compact (no playback logic change) ===== */
#page-detail .trx-detail-media-wrap .media-bar,
#page-detail .media-bar,
#page-note .media-bar {
  margin: 0;
  padding: 12px 14px;
  background: var(--bg-card, #fff);
  border-bottom: none;
  border-radius: 0;
  gap: 12px;
}
#page-detail .media-play-btn,
#page-detail button.media-play-btn,
#page-note .media-play-btn,
#page-note button.media-play-btn {
  width: 40px;
  height: 40px;
  background: var(--c-blue, #3B82F6);
}
#page-detail .media-play-btn.playing,
#page-detail button.media-play-btn.playing,
#page-note .media-play-btn.playing,
#page-note button.media-play-btn.playing {
  background: #fff;
  border: 2px solid var(--c-blue, #3B82F6);
  color: var(--c-blue, #3B82F6);
}
#page-detail .media-wave-bar,
#page-note .media-wave-bar {
  background: var(--c-blue, #3B82F6);
}
#page-detail .media-duration,
#page-note .media-duration {
  color: var(--text-s, var(--color-text-secondary));
}
#page-detail .media-speed,
#page-detail button.media-speed,
#page-note .media-speed,
#page-note button.media-speed {
  border-color: var(--divider, #f0ede8);
  color: var(--text-s, var(--color-text-secondary));
  background: var(--bg-page, #f5f3f0);
  border-radius: 8px;
}
#page-detail .trx-detail-media-wrap .trx-detail-video,
#page-detail .trx-detail-video {
  background: #111;
  border-radius: 0;
}
