:root {
  color-scheme: light;
  --bg-top: #d9ecff;
  --bg-bottom: #ffd6a3;
  --panel: rgba(255, 255, 255, 0.96);
  --panel-line: rgba(32, 41, 59, 0.1);
  --text: #20293b;
  --muted: #667085;
  --primary: #4f46e5;
  --primary-deep: #3e36d3;
  --primary-soft: rgba(79, 70, 229, 0.12);
  --success-soft: rgba(31, 138, 112, 0.12);
  --shadow: 0 24px 60px rgba(120, 84, 29, 0.12);
  --radius-xl: 32px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  font-family: 'Inter', sans-serif;
  color: var(--text);
  overflow-x: hidden;
  background:
    radial-gradient(circle at top left, rgba(255, 232, 187, 0.95), transparent 38%),
    linear-gradient(180deg, var(--bg-top) 0%, #f6f7f9 42%, var(--bg-bottom) 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
}

.hidden {
  display: none !important;
}

.sg-header {
  width: min(1180px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 20px 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.sg-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: clamp(1.7rem, 2.4vw, 2.3rem);
  font-weight: 800;
  color: #4b49e8;
}

.sg-brand-icon {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
}

.sg-admin-link,
.ghost-button,
.source-action,
.mini-button,
.mini-link {
  border: 1px solid rgba(79, 70, 229, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--text);
  transition: transform 120ms ease, border-color 120ms ease, background 120ms ease;
}

.sg-admin-link,
.ghost-button,
.source-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 20px;
  font-weight: 700;
}

.sg-admin-link:hover,
.ghost-button:hover,
.source-action:hover,
.mini-button:hover,
.mini-link:hover {
  transform: translateY(-1px);
  border-color: rgba(79, 70, 229, 0.32);
}

/* Shared nav between Repliques and Generateur */
.sg-nav {
  display: flex;
  gap: 6px;
  align-items: center;
}
.sg-nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 16px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--muted, #667085);
  text-decoration: none;
  border-radius: 999px;
  transition: all 120ms ease;
  font-family: "Inter", sans-serif;
}
.sg-nav-link:hover {
  color: var(--primary, #4f46e5);
  background: rgba(79, 70, 229, 0.08);
}
.sg-nav-active {
  color: var(--primary, #4f46e5);
  background: rgba(79, 70, 229, 0.1);
}


.sg-main {
  width: min(1180px, calc(100vw - 32px));
  margin: 0 auto;
  padding-bottom: 28px;
}

.composer-card,
.player-card,
.history-card {
  background: var(--panel);
  border: 1px solid var(--panel-line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}

.composer-card {
  padding: clamp(22px, 2.2vw, 28px);
}

.sg-badge,
.status-pill,
.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 700;
}

.sg-badge {
  min-height: 42px;
  padding: 0 18px;
  background: var(--primary);
  color: white;
}

.hero-title {
  margin: 14px 0 18px;
  font-size: clamp(2.05rem, 3.9vw, 3.45rem);
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.message-bar {
  margin-bottom: 20px;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-radius: var(--radius-md);
  background: rgba(255, 244, 230, 0.92);
  border: 1px solid rgba(212, 129, 53, 0.22);
}

.message-copy {
  font-size: 0.98rem;
  line-height: 1.5;
}

.examples-block {
  margin-bottom: 14px;
}

.section-mini-title {
  margin-bottom: 10px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.prompt-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip {
  min-height: 46px;
  padding: 10px 16px;
  border: 0;
  background: rgba(140, 191, 255, 0.36);
  color: #4b49e8;
  text-align: left;
  cursor: pointer;
  font-size: 0.95rem;
  line-height: 1.2;
  align-items: center;
}

.chip:hover {
  background: rgba(140, 191, 255, 0.54);
}

.sg-label {
  display: block;
  margin: 16px 0 10px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--muted);
}

.prompt-input {
  width: 100%;
  min-height: 132px;
  padding: 18px 20px;
  border: 1px solid rgba(32, 41, 59, 0.12);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--text);
  resize: vertical;
  outline: none;
}

.prompt-input:focus {
  border-color: rgba(79, 70, 229, 0.38);
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.08);
}

.composer-toolbar {
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.source-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  flex: 1 1 520px;
}

.source-action {
  cursor: pointer;
}

.source-upload input {
  display: none;
}

.source-pill {
  margin-top: 16px;
  padding: 14px 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  border-radius: var(--radius-md);
  background: rgba(203, 234, 255, 0.54);
  color: #184d84;
}

#source-preview {
  width: 100%;
  margin-top: 14px;
}

.composer-actions {
  margin-top: 18px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.composer-actions-simple {
  margin-top: 0;
  justify-content: flex-end;
  flex: 0 0 auto;
}

.duration-block {
  flex: 1 1 280px;
}

.duration-block label {
  display: block;
  margin-bottom: 10px;
  font-weight: 700;
  color: var(--muted);
}

.duration-block input {
  width: 100%;
}

#duration-value {
  display: inline-block;
  margin-top: 10px;
  font-size: 1.05rem;
  font-weight: 700;
}

.generate-button {
  min-width: 190px;
  min-height: 60px;
  padding: 0 24px;
  border: 0;
  border-radius: 24px;
  background: linear-gradient(135deg, #5a52f2 0%, #4a42dd 100%);
  color: white;
  font-size: 1.15rem;
  font-weight: 800;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease, opacity 120ms ease;
}

.generate-button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 16px 28px rgba(79, 70, 229, 0.22);
}

.generate-button:disabled,
.ghost-button:disabled,
.source-action:disabled,
.mini-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.workspace-grid {
  margin-top: 24px;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.82fr);
  gap: 20px;
  align-items: start;
}

.player-card,
.history-card {
  padding: 20px;
}

.card-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 16px;
}

.card-title {
  margin: 0;
  font-size: clamp(1.5rem, 2.4vw, 2.1rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.player-meta {
  margin: 10px 0 0;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--muted);
}

.status-pill {
  min-width: 86px;
  min-height: 44px;
  padding: 0 16px;
  background: var(--primary-soft);
  color: var(--primary);
}

.status-pill.is-busy {
  background: rgba(216, 101, 51, 0.14);
  color: #9d3a14;
}

.player-empty,
.history-empty {
  margin-top: 18px;
  padding: 20px;
  border-radius: var(--radius-lg);
  background: rgba(244, 247, 251, 0.92);
  color: var(--muted);
  line-height: 1.6;
}

.thinking-panel {
  margin-top: 18px;
  padding: 22px 20px;
  border-radius: var(--radius-lg);
  background: rgba(203, 223, 255, 0.42);
  text-align: center;
}

.thinking-bars {
  display: inline-flex;
  gap: 8px;
  align-items: end;
  min-height: 58px;
}

.thinking-bars span {
  width: 14px;
  height: 22px;
  border-radius: 999px;
  background: linear-gradient(180deg, #7786ff 0%, #4f46e5 100%);
  animation: pulseBar 1s ease-in-out infinite;
}

.thinking-bars span:nth-child(2) {
  animation-delay: 0.12s;
}

.thinking-bars span:nth-child(3) {
  animation-delay: 0.24s;
}

.thinking-bars span:nth-child(4) {
  animation-delay: 0.36s;
}

@keyframes pulseBar {
  0%,
  100% {
    height: 22px;
    opacity: 0.55;
  }
  50% {
    height: 52px;
    opacity: 1;
  }
}

.thinking-title {
  margin-top: 12px;
  font-size: 1.15rem;
  font-weight: 800;
}

.thinking-copy {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.95rem;
}

.result-panel {
  margin-top: 18px;
}

.waveform-canvas {
  width: 100%;
  height: 170px;
  display: block;
  margin-bottom: 12px;
  border-radius: 18px;
  border: 1px solid rgba(32, 41, 59, 0.08);
  background: rgba(203, 223, 255, 0.38);
}

#result-audio-player {
  width: 100%;
}

.download-row {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.followup-panel {
  margin-top: 18px;
}

.followup-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.followup-chip {
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid rgba(79, 70, 229, 0.14);
  border-radius: 14px;
  background: rgba(140, 191, 255, 0.18);
  color: #4b49e8;
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
  cursor: pointer;
  transition: transform 120ms ease, border-color 120ms ease, background 120ms ease, opacity 120ms ease;
}

.followup-chip:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: rgba(79, 70, 229, 0.28);
  background: rgba(140, 191, 255, 0.34);
}

.followup-chip:disabled {
  opacity: 0.54;
  cursor: default;
}

.ghost-button.is-disabled,
.mini-link.is-disabled {
  opacity: 0.45;
  pointer-events: none;
}

.adjust-panel {
  margin-top: 24px;
  height: auto;
  padding: 24px 0 0;
  border: 0;
  border-top: 1px solid rgba(32, 41, 59, 0.1);
  border-radius: 0;
  background: transparent;
}

.adjust-title {
  margin-top: 0;
  margin-bottom: 10px;
}

.speech-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.speech-action-button {
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid rgba(79, 70, 229, 0.14);
  border-radius: 16px;
  background: rgba(140, 191, 255, 0.2);
  color: #4b49e8;
  font-weight: 700;
  cursor: pointer;
  transition: transform 120ms ease, border-color 120ms ease, background 120ms ease;
}

.speech-action-button:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: rgba(79, 70, 229, 0.28);
  background: rgba(140, 191, 255, 0.34);
}

.slider-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.slider-field {
  display: block;
  padding: 12px 14px;
  border: 1px solid rgba(32, 41, 59, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.86);
}

.slider-field span {
  display: block;
  margin-bottom: 8px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--muted);
}

.slider-field input {
  width: 100%;
}

.slider-field strong {
  display: inline-block;
  margin-top: 8px;
  font-size: 0.96rem;
}

.adjust-input {
  min-height: 112px;
}

.adjust-row {
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.adjust-note {
  color: var(--muted);
  line-height: 1.5;
  font-size: 0.92rem;
  max-width: 560px;
}

.sound-adjustments.hidden,
.speech-actions.hidden {
  display: none !important;
}

.adjust-panel .generate-button {
  width: auto;
  min-width: 250px;
}

.history-list {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: min(56vh, 620px);
  overflow: auto;
  padding-right: 4px;
}

.history-item {
  padding: 14px 16px;
  border: 1px solid rgba(32, 41, 59, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  cursor: pointer;
  transition: border-color 120ms ease, transform 120ms ease, box-shadow 120ms ease;
}

.history-item:hover {
  transform: translateY(-1px);
  border-color: rgba(79, 70, 229, 0.24);
}

.history-item.is-active {
  border-color: rgba(79, 70, 229, 0.34);
  box-shadow: 0 10px 26px rgba(79, 70, 229, 0.08);
}

.history-top,
.history-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.history-top span,
.history-detail {
  color: var(--muted);
}

.history-title {
  margin-top: 8px;
  font-size: 1rem;
  font-weight: 800;
}

.history-prompt {
  margin-top: 6px;
  line-height: 1.4;
}

.history-detail {
  margin-top: 6px;
  font-size: 0.95rem;
}

.history-actions {
  margin-top: 10px;
  justify-content: flex-start;
  flex-wrap: wrap;
}

.mini-button,
.mini-link {
  min-height: 40px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
}

.mini-link {
  color: var(--primary);
}

.prompt-suggestions.is-disabled {
  opacity: 0.5;
  pointer-events: none;
}

.site-footer {
  width: min(1180px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 6px 0 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  color: rgba(32, 41, 59, 0.72);
}

@media (max-width: 1080px) {
  .workspace-grid {
    grid-template-columns: 1fr;
    margin-top: 20px;
  }

  .history-list {
    max-height: none;
    overflow: visible;
  }
}

@media (max-width: 760px) {
  .sg-header, .sg-main, .site-footer {
    width: min(100vw - 16px, 100%);
  }
  .sg-header {
    padding-top: 14px;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .hero-title {
    font-size: clamp(1.6rem, 10vw, 2.8rem);
  }
  .prompt-input {
    font-size: 16px;
  }
  .composer-toolbar {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
  }
  .source-toolbar {
    flex: 1 1 auto;
    gap: 8px;
  }
  .source-action {
    width: auto;
    min-height: 40px;
    padding: 0 14px;
    font-size: 0.82rem;
    border-radius: 12px;
    flex: 1;
  }
  .generate-button {
    width: 100%;
    min-width: unset;
    min-height: 48px;
    font-size: 1rem;
    border-radius: 14px;
  }
  .composer-actions {
    width: 100%;
  }
  .player-card, .history-card, .composer-card {
    padding: 16px;
    border-radius: 20px;
  }
  .card-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  .card-title {
    font-size: 1.3rem;
  }
  .adjust-row {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .message-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .slider-grid {
    grid-template-columns: 1fr;
  }
  .prompt-suggestions {
    gap: 8px;
  }
  .prompt-suggestions .chip {
    font-size: 0.82rem;
    padding: 8px 12px;
  }
  .speech-actions {
    grid-template-columns: repeat(2, 1fr);
  }
  .followup-actions {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .followup-chip {
    font-size: 0.8rem;
    padding: 8px 10px;
    min-height: 40px;
    border-radius: 12px;
  }
  .workspace-grid {
    gap: 16px;
  }
  .duration-control {
    gap: 8px;
  }
  .ghost-button {
    width: 100%;
    min-height: 40px;
    border-radius: 12px;
  }
}

  .sg-header {
    padding-top: 14px;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .hero-title {
    font-size: clamp(1.6rem, 10vw, 2.8rem);
  }

  .prompt-input {
    font-size: 16px; /* prevents iOS zoom */
    rows: 3;
  }

  /* Toolbar: keep horizontal, compact */
  .composer-toolbar {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
  }

  .source-toolbar {
    flex: 1 1 auto;
    gap: 8px;
  }

  /* Source action buttons: compact inline, NOT full-width ovals */
  .source-action {
    width: auto;
    min-height: 40px;
    padding: 0 14px;
    font-size: 0.82rem;
    border-radius: 12px;
    flex: 1;
  }

  /* Generate button: full width below the source buttons */
  .generate-button {
    width: 100%;
    min-width: unset;
    min-height: 48px;
    font-size: 1rem;
    border-radius: 14px;
  }

  .composer-actions {
    width: 100%;
  }

  /* Card layout */
  .player-card,
  .history-card,
  .composer-card {
    padding: 16px;
    border-radius: 20px;
  }

  .card-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .adjust-row {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .message-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .slider-grid {
    grid-template-columns: 1fr;
  }



  .speech-actions {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Followup chips: 2 columns on tablet */
  .followup-actions {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .followup-chip {
    font-size: 0.8rem;
    padding: 8px 10px;
    min-height: 40px;
    border-radius: 12px;
  }

  /* Workspace stacks */
  .workspace-grid {
    gap: 16px;
  }

  /* Duration control */
  .duration-control {
    gap: 8px;
  }

  /* Ghost/mini buttons */
  .ghost-button {
    width: 100%;
    min-height: 40px;
    border-radius: 12px;
  }
}

/* Small phones */


  .source-toolbar {
    flex-direction: column;
  }

  .source-action {
    width: 100%;
    min-height: 44px;
    border-radius: 12px;
  }

  .followup-actions {
    grid-template-columns: 1fr;
  }

  .followup-chip {
    font-size: 0.82rem;
    padding: 10px 12px;
  }

  .player-card,
  .history-card,
  .composer-card {
    padding: 14px;
    border-radius: 16px;
  }

  .prompt-suggestions .chip {
    font-size: 0.8rem;
    padding: 8px 12px;
  }

  .duration-control {
    flex-wrap: wrap;
  }

  .adjust-note {
    font-size: 0.75rem;
  }
}

/* === Library search results === */
.library-results {
  width: min(1180px, calc(100vw - 32px));
  margin: 0 auto 28px;
}
.library-results.hidden { display: none; }
.library-results-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 16px;
}
.library-results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 14px;
}
.lib-item {
  background: var(--panel);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
  padding: 18px;
  transition: transform .15s, box-shadow .15s;
  cursor: default;
}
.lib-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 50px rgba(120,84,29,.14);
}
.lib-item-title {
  font-size: .95rem; font-weight: 700; margin-bottom: 4px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.lib-item-meta {
  font-size: .75rem; color: var(--muted); margin-bottom: 12px;
  display: flex; gap: 12px;
}
.lib-item-waveform {
  display: flex; align-items: center; height: 32px; gap: 1px;
  margin-bottom: 12px; cursor: pointer;
}
.lib-item-waveform .bar {
  flex: 1; background: rgba(79,70,229,.12); border-radius: 2px;
  min-width: 2px; transition: background .1s;
}
.lib-item-waveform .bar.played { background: var(--primary); }
.lib-item-actions { display: flex; gap: 8px; }
.lib-item-btn {
  flex: 1; padding: 8px; border-radius: var(--radius-sm); border: none;
  cursor: pointer; font-size: .8rem; font-weight: 600;
  display: flex; align-items: center; justify-content: center; gap: 5px;
  font-family: inherit; transition: all .12s;
}
.lib-play-btn { background: var(--primary); color: white; }
.lib-play-btn:hover { background: var(--primary-deep); }
.lib-play-btn.playing { background: #1f8a70; }
.lib-dl-btn { background: var(--primary-soft); color: var(--primary); }
.lib-dl-btn:hover { background: var(--primary); color: white; }
@media (max-width: 640px) {
  .library-results-grid { grid-template-columns: 1fr; }
  .library-results-head { flex-direction: column; gap: 8px; align-items: flex-start; }
}


/* Duration slider */
.duration-control {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 0 4px;
  padding: 0 4px;
}
.duration-label {
  font-size: 0.82rem;
  color: var(--text-secondary, #6b7280);
  font-weight: 500;
  white-space: nowrap;
}
.duration-slider {
  flex: 1;
  height: 6px;
  -webkit-appearance: none;
  appearance: none;
  background: linear-gradient(90deg, var(--accent, #7c3aed) 0%, #e5e7eb 0%);
  border-radius: 3px;
  outline: none;
  cursor: pointer;
}
.duration-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent, #7c3aed);
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
  cursor: pointer;
}
.duration-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent, #7c3aed);
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
  cursor: pointer;
}
.duration-display {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent, #7c3aed);
  min-width: 42px;
  text-align: right;
}

/* Long generation warning */
.duration-warning {
  font-size: 0.75rem;
  color: #f59e0b;
  margin-top: 2px;
  padding: 0 4px;
  display: none;
}
.duration-warning.visible {
  display: block;
}


@media (max-width: 480px) {
  .sg-header, .sg-main, .site-footer {
    width: calc(100vw - 12px);
  }
  .source-toolbar {
    flex-direction: column;
  }
  .source-action {
    width: 100%;
    min-height: 44px;
  }
  .followup-actions {
    grid-template-columns: 1fr;
  }
  .player-card, .history-card, .composer-card {
    padding: 14px;
    border-radius: 16px;
  }
  .duration-control {
    flex-wrap: wrap;
  }
}
