/*
 * Generation Generate Studio
 * Gestaltung nach IBM Carbon (Theme Gray 100), Akzent aus dem Keyvisual.
 * Schriften lokal (IBM Plex, OFL), Icons als Sprite (Carbon Icons, Apache-2.0).
 * Figma: „Generation Generate Podcaststudio“, Seiten „Screens“ und „Bausteine“.
 */

@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/IBMPlexSans-Regular-Latin1.woff2") format("woff2");
}

@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/IBMPlexSans-SemiBold-Latin1.woff2") format("woff2");
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/IBMPlexMono-Regular-Latin1.woff2") format("woff2");
}

:root {
  color-scheme: dark;

  /* Carbon g100 */
  --background: #161616;
  --background-hover: rgb(141 141 141 / 0.16);
  --layer-01: #262626;
  --layer-hover-01: #333333;
  --layer-02: #393939;
  --layer-hover-02: #474747;
  --field-01: #262626;
  --field-02: #393939;
  --border-subtle-00: #393939;
  --border-subtle-01: #525252;
  --border-strong-01: #6f6f6f;
  --border-strong-02: #8d8d8d;
  --text-primary: #f4f4f4;
  --text-secondary: #c6c6c6;
  --text-helper: #a8a8a8;
  --text-placeholder: rgb(244 244 244 / 0.4);
  --text-on-color: #ffffff;
  --text-disabled: rgb(244 244 244 / 0.25);
  --icon-primary: #f4f4f4;
  --icon-secondary: #c6c6c6;
  --focus: #ffffff;
  --overlay: rgb(0 0 0 / 0.6);
  --support-error: #fa4d56;
  --support-success: #42be65;
  --support-warning: #f1c21b;
  --button-secondary: #6f6f6f;
  --button-secondary-hover: #5e5e5e;
  --button-secondary-active: #393939;
  --button-danger: #da1e28;
  --button-danger-hover: #b81921;
  --button-danger-active: #750e13;
  --button-disabled: rgb(141 141 141 / 0.3);
  --tag-gray: #525252;
  --tag-red: #a2191f;
  --tag-red-text: #ffd7d9;

  /* Marke */
  --accent: #fbfead;
  --accent-hover: #e8eb94;
  --accent-active: #d2d57c;
  --text-on-accent: #161616;
  --step-01: #871143;
  --step-02: #921044;
  --step-03: #9b1d46;
  --step-04: #a92246;
  --step-05: #b62246;
  --step-06: #c62245;
  --step-07: #cd2f42;
  --step-08: #cd3e35;
  --step-09: #cc5533;
  --step-10: #ce6236;
  --step-11: #cc7628;
  --step-12: #bd8320;
  --step-13: #bc9121;
  --step-14: #bcaa22;

  --font-sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.2, 0, 0.38, 0.9);
  --gutter: 32px;
  --header: 48px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text-primary);
  font: 400 14px/20px var(--font-sans);
  letter-spacing: 0.16px;
  -webkit-font-smoothing: antialiased;
  /* Stufenverlauf aus dem Keyvisual: 14 gleich hohe Stufen */
  background-color: var(--step-06);
  background-image: linear-gradient(180deg,
    var(--step-01) 0 7.143%, var(--step-02) 7.143% 14.286%,
    var(--step-03) 14.286% 21.429%, var(--step-04) 21.429% 28.571%,
    var(--step-05) 28.571% 35.714%, var(--step-06) 35.714% 42.857%,
    var(--step-07) 42.857% 50%, var(--step-08) 50% 57.143%,
    var(--step-09) 57.143% 64.286%, var(--step-10) 64.286% 71.429%,
    var(--step-11) 71.429% 78.571%, var(--step-12) 78.571% 85.714%,
    var(--step-13) 85.714% 92.857%, var(--step-14) 92.857% 100%);
  background-attachment: fixed;
}

h1, h2, h3, p { margin: 0; }
a { color: inherit; }
button, input { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.icon { flex: none; fill: currentColor; }

/* Typografie (Carbon Type Tokens) ------------------------------------ */

.label-01 { font-size: 12px; line-height: 16px; letter-spacing: 0.32px; }
.helper-text { font-size: 12px; line-height: 16px; letter-spacing: 0.32px; color: var(--text-helper); }
.body-01 { font-size: 14px; line-height: 20px; letter-spacing: 0.16px; }
.body-02 { font-size: 16px; line-height: 24px; letter-spacing: 0; }
.heading-compact-01 { font-size: 14px; line-height: 18px; letter-spacing: 0.16px; font-weight: 600; }
.heading-compact-02 { font-size: 16px; line-height: 22px; letter-spacing: 0; font-weight: 600; }
.heading-03 { font-size: 20px; line-height: 28px; letter-spacing: 0; font-weight: 400; }
.heading-04 { font-size: 28px; line-height: 36px; letter-spacing: 0; font-weight: 400; }
.text-secondary { color: var(--text-secondary); }

.page-title {
  font-size: clamp(32px, 4vw, 42px);
  line-height: 1.19;
  font-weight: 400;
  letter-spacing: 0;
}

.page-title--sm { font-size: 32px; line-height: 40px; }

.link {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.link:hover { color: var(--accent-hover); }

/* UI Shell Header ---------------------------------------------------- */

.shell-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  height: var(--header);
  padding-left: 16px;
  background: var(--background);
  border-bottom: 1px solid var(--border-subtle-00);
}

.shell-header__name {
  padding-right: 32px;
  font-size: 14px;
  line-height: 18px;
  text-decoration: none;
  white-space: nowrap;
}

.shell-header__name strong { font-weight: 600; }

.shell-header__nav { display: flex; height: 100%; }

.shell-header__link {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 16px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: background 110ms var(--ease), color 110ms var(--ease);
}

.shell-header__link:hover { background: var(--background-hover); color: var(--text-primary); }

.shell-header__link.is-current {
  color: var(--text-primary);
  background: var(--background-hover);
  box-shadow: inset 0 -3px 0 var(--accent);
}

.shell-header__global {
  display: flex;
  align-items: center;
  height: 100%;
  margin-left: auto;
}

.shell-header__global form { height: 100%; }

.shell-header__user {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 100%;
  padding: 0 16px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: background 110ms var(--ease), color 110ms var(--ease);
}

.shell-header__user:hover { background: var(--background-hover); color: var(--text-primary); }

.shell-header__action {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--icon-primary);
  transition: background 110ms var(--ease);
}

.shell-header__action:hover { background: var(--background-hover); }

/* Avatare ------------------------------------------------------------ */

.avatar {
  flex: none;
  display: block;
  border-radius: 50%;
  object-fit: cover;
  background: var(--layer-02);
}

.avatar--initials {
  display: grid;
  place-items: center;
  width: var(--size, 24px);
  height: var(--size, 24px);
  font-size: calc(var(--size, 24px) * 0.45);
  font-weight: 600;
}

/* Inhalt ------------------------------------------------------------- */

.content { padding: 0 var(--gutter) 48px; }

.page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 32px;
  padding: 40px 0 40px;
}

.page-header__main { display: grid; gap: 8px; }

.page-header--studio { padding: 8px 0 24px; }
.page-header--studio .page-header__main { gap: 4px; }

.breadcrumb ol {
  display: flex;
  gap: 8px;
  margin: 0;
  padding: 24px 0 0;
  list-style: none;
}

.breadcrumb li + li::before { content: "/"; margin-right: 8px; }

/* Buttons ------------------------------------------------------------ */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  min-height: 48px;
  padding: 0 16px 0 15px;
  border: 1px solid transparent;
  border-radius: 0;
  font-size: 14px;
  line-height: 18px;
  text-align: left;
  text-decoration: none;
  white-space: nowrap;
  transition: background 70ms var(--ease), color 70ms var(--ease);
}

.btn--primary { background: var(--accent); color: var(--text-on-accent); }
.btn--primary:hover { background: var(--accent-hover); }
.btn--primary:active { background: var(--accent-active); }
.btn--primary:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; box-shadow: inset 0 0 0 3px var(--background); }

.btn--secondary { background: var(--button-secondary); color: var(--text-on-color); }
.btn--secondary:hover { background: var(--button-secondary-hover); }
.btn--secondary:active { background: var(--button-secondary-active); }

.btn--danger { background: var(--button-danger); color: var(--text-on-color); }
.btn--danger:hover { background: var(--button-danger-hover); }
.btn--danger:active { background: var(--button-danger-active); }

.btn--ghost { background: transparent; color: var(--icon-primary); }
.btn--ghost:hover { background: var(--background-hover); }

.btn--icon { justify-content: center; width: 48px; padding: 0; }
.btn--sm { min-height: 40px; }
.btn--sm.btn--icon { width: 40px; }
.btn--full { width: 100%; }

.btn:disabled {
  cursor: not-allowed;
  background: var(--button-disabled);
  color: var(--text-disabled);
}

.btn--ghost:disabled { background: transparent; }

/* Tags --------------------------------------------------------------- */

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 12px;
  font-size: 12px;
  line-height: 16px;
  letter-spacing: 0.32px;
  white-space: nowrap;
}

.tag--sm { min-height: 18px; }
.tag--gray { background: var(--tag-gray); color: var(--text-primary); }
.tag--accent { background: var(--accent); color: var(--text-on-accent); }
.tag--red { background: var(--tag-red); color: var(--tag-red-text); }

.tag--red::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--support-error);
}

/* Formularfelder ----------------------------------------------------- */

.text-input { display: grid; gap: 8px; }

.text-input__label {
  font-size: 12px;
  line-height: 16px;
  letter-spacing: 0.32px;
  color: var(--text-secondary);
}

.text-input__field {
  width: 100%;
  height: 40px;
  padding: 0 16px;
  border: 0;
  border-bottom: 1px solid var(--border-strong-02);
  border-radius: 0;
  background: var(--field-02);
  outline: 2px solid transparent;
  outline-offset: -2px;
}

.text-input__field::placeholder { color: var(--text-placeholder); }
.text-input__field:hover { background: var(--layer-hover-02); }
.text-input__field:focus { outline-color: var(--focus); }
.text-input.is-invalid .text-input__field { outline: 2px solid var(--support-error); }

/* Notifications ------------------------------------------------------ */

.notification {
  --kind: var(--accent);
  display: flex;
  gap: 12px;
  padding: 14px 16px 14px 13px;
  border-left: 3px solid var(--kind);
  background: var(--layer-02);
}

.notification--error { --kind: var(--support-error); }
.notification--warning { --kind: var(--support-warning); --icon-inner: #000; }
.notification__icon { color: var(--kind); margin-top: 0; }
.notification__text strong { font-weight: 600; }

/* Login / Splash ----------------------------------------------------- */

.splash {
  display: grid;
  justify-items: center;
  gap: 48px;
  padding: clamp(32px, 7vh, 64px) 0 32px;
}

.splash__logo { width: min(720px, 100%); line-height: 0; }

.splash__logo img {
  display: block;
  width: 100%;
  height: auto;
  image-rendering: pixelated;
}

/* Logo-Animation (assets/js/logo.js) ersetzt das Bild, sobald sie läuft */
.splash__logo.is-animated img { display: none; }

.splash__canvas {
  display: block;
  max-width: 100%;
  margin: 0 auto;
  image-rendering: pixelated;
}

.login-card {
  display: grid;
  gap: 24px;
  width: min(400px, 100%);
  padding: 32px;
  background: var(--layer-01);
}

.login-card__head { display: grid; gap: 8px; }
.login-card__form { display: grid; gap: 24px; }

/* Übersicht ---------------------------------------------------------- */

.tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(272px, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tile {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 232px;
  height: 100%;
  padding: 16px;
  background: var(--background);
  text-decoration: none;
  transition: background 110ms var(--ease);
}

.tile:hover { background: var(--layer-01); }
.tile--today { box-shadow: inset 3px 0 0 var(--accent); }
.tile__date { display: flex; align-items: center; gap: 8px; }

.tile__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
}

.tile__arrow { color: var(--accent); transition: transform 110ms var(--ease); }
.tile:hover .tile__arrow { transform: translateX(4px); }

.empty-state {
  display: grid;
  justify-items: start;
  gap: 8px;
  max-width: 480px;
  padding: 32px;
  background: var(--background);
}

/* Studio ------------------------------------------------------------- */

.presence { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

.presence__list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.presence-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px 4px 4px;
  border-radius: 20px;
  background: var(--background);
  color: var(--text-helper);
}

.presence-pill .avatar { opacity: 0.5; }
.presence-pill.is-online { color: var(--text-primary); }
.presence-pill.is-online .avatar { opacity: 1; }

.presence-pill::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border-strong-01);
}

.presence-pill.is-online::after { background: var(--support-success); }

.studio {
  display: grid;
  grid-template-columns: minmax(0, 11fr) minmax(320px, 5fr);
  gap: var(--gutter);
  align-items: stretch;
}

.stage { display: grid; gap: 16px; align-content: start; min-width: 0; }

.screen {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #000;
}

.screen.is-live { box-shadow: inset 0 0 0 2px var(--support-error); }

.screen video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.screen__overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 8px;
  padding: 24px;
  text-align: center;
}

.screen__empty { background: var(--background); color: var(--text-primary); }
.screen__empty .icon { margin-bottom: 8px; color: var(--icon-secondary); }

.screen__audio {
  gap: 24px;
  background: var(--background);
  color: var(--icon-secondary);
}

.screen.is-live .screen__audio { box-shadow: inset 0 0 0 2px var(--support-error); }

.bars { display: flex; align-items: flex-end; gap: 6px; height: 48px; }

.bars i {
  width: 6px;
  height: 30%;
  background: var(--accent);
  opacity: 0.5;
}

.screen.is-live .bars i { opacity: 1; animation: bar 0.9s var(--ease) infinite alternate; }
.screen.is-live .bars i:nth-child(2) { animation-delay: -0.3s; }
.screen.is-live .bars i:nth-child(3) { animation-delay: -0.6s; }
.screen.is-live .bars i:nth-child(4) { animation-delay: -0.15s; }
.screen.is-live .bars i:nth-child(5) { animation-delay: -0.45s; }

@keyframes bar {
  from { height: 20%; }
  to { height: 100%; }
}

.screen__countdown { background: var(--overlay); }

.screen__countdown-value {
  font: 400 clamp(56px, 9vw, 96px) / 1.08 var(--font-mono);
  letter-spacing: -0.04em;
  color: var(--accent);
}

/* Player */

.player {
  display: grid;
  gap: 16px;
  padding: 16px;
  background: var(--background);
}

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

.player__info { display: grid; gap: 4px; min-width: 0; }

.player__transport {
  display: flex;
  align-items: center;
  min-width: 0;
}

.player__transport .btn--primary:disabled { background: var(--accent); opacity: 0.35; color: var(--text-on-accent); }
.player__transport .btn--ghost:disabled { opacity: 0.35; color: var(--icon-primary); }

.icon-pause,
.is-playing .icon-play { display: none; }
.is-playing .icon-pause { display: block; }

.icon-sound-off,
[aria-pressed="false"] .icon-sound-on { display: none; }
[aria-pressed="false"] .icon-sound-off { display: block; }

.slider {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
  padding-left: 16px;
}

.slider:has(.slider__input:disabled) { opacity: 0.35; }

.slider__value {
  min-width: 4ch;
  font: 12px/16px var(--font-mono);
  letter-spacing: 0.32px;
  text-align: center;
}

.slider__input {
  --progress: 0%;
  flex: 1;
  min-width: 48px;
  height: 14px;
  margin: 0;
  background: transparent;
  appearance: none;
  cursor: pointer;
}

.slider__input:disabled { cursor: not-allowed; }

.slider__input::-webkit-slider-runnable-track {
  height: 2px;
  background: linear-gradient(to right, var(--accent) var(--progress), var(--layer-02) var(--progress));
}

.slider__input::-moz-range-track { height: 2px; background: var(--layer-02); }
.slider__input::-moz-range-progress { height: 2px; background: var(--accent); }

.slider__input::-webkit-slider-thumb {
  width: 14px;
  height: 14px;
  margin-top: -6px;
  border-radius: 50%;
  background: var(--text-primary);
  appearance: none;
  transition: transform 110ms var(--ease);
}

.slider__input::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border: 0;
  border-radius: 50%;
  background: var(--text-primary);
}

.slider__input:hover::-webkit-slider-thumb,
.slider__input:active::-webkit-slider-thumb { transform: scale(1.4286); }

.slider__input:focus-visible { outline: none; }
.slider__input:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 2px var(--background), 0 0 0 4px var(--focus); }

.volume {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-left: 16px;
}

.volume__input { flex: none; width: 80px; }

.volume__input::-webkit-slider-runnable-track {
  background: linear-gradient(to right, var(--text-primary) var(--progress), var(--layer-02) var(--progress));
}

.volume__input::-moz-range-progress { background: var(--text-primary); }

/* Seitenleiste */

.side {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
  min-height: 0;
}

.upload-zone {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 64px;
  padding: 12px 16px;
  border: 1px dashed var(--border-strong-01);
  background: var(--background);
  text-align: left;
  transition: border-color 110ms var(--ease), background 110ms var(--ease);
}

.upload-zone:hover { background: var(--layer-01); }
.upload-zone.is-over { border: 2px solid var(--accent); padding: 11px 15px; }
.upload-zone__icon { color: var(--accent); }
.upload-zone__text { display: grid; gap: 2px; min-width: 0; }
.upload-zone__title { font-weight: 600; line-height: 18px; color: var(--accent); }

.upload-zone__hint {
  font-size: 12px;
  line-height: 16px;
  letter-spacing: 0.32px;
  color: var(--text-secondary);
}

.clip-list {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--background);
}

.clip-list__header {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 16px;
}

.search {
  position: relative;
  display: flex;
  align-items: center;
}

.search__icon {
  position: absolute;
  left: 16px;
  color: var(--icon-secondary);
  pointer-events: none;
}

.search__input {
  width: 100%;
  height: 40px;
  padding: 0 16px 0 44px;
  border: 0;
  border-bottom: 1px solid var(--border-strong-01);
  border-radius: 0;
  background: var(--field-01);
  outline: 2px solid transparent;
  outline-offset: -2px;
}

.search__input::placeholder { color: var(--text-placeholder); }
.search__input:hover { background: var(--layer-hover-01); }
.search__input:focus { outline-color: var(--focus); }

.tabs {
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
  box-shadow: inset 0 -1px 0 var(--border-subtle-00);
}

.tabs::-webkit-scrollbar { display: none; }

.tab {
  flex: none;
  display: flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 8px;
  border: 0;
  background: none;
  color: var(--text-secondary);
  white-space: nowrap;
  box-shadow: inset 0 -1px 0 var(--border-subtle-00);
  transition: color 110ms var(--ease), box-shadow 110ms var(--ease);
}

.tab:hover { color: var(--text-primary); box-shadow: inset 0 -2px 0 var(--border-strong-01); }

.tab[aria-selected="true"] {
  color: var(--text-primary);
  font-weight: 600;
  box-shadow: inset 0 -2px 0 var(--accent);
}

.tab__count {
  font-size: 12px;
  line-height: 16px;
  letter-spacing: 0.32px;
  font-weight: 400;
  color: var(--text-helper);
}

.clip-list__scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong-01) transparent;
}

.clip-list__rows,
.clip-list__uploads {
  margin: 0;
  padding: 0;
  list-style: none;
}

.clip-list__empty { padding: 16px; }

.clip {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 12px 8px 12px 16px;
  border-top: 1px solid var(--border-subtle-00);
  transition: background 110ms var(--ease);
}

.clip:hover { background: var(--layer-01); }

.clip.is-active {
  padding-left: 13px;
  border-left: 3px solid var(--accent);
  background: var(--layer-02);
}

.clip__main {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
}

.clip__thumb {
  position: relative;
  flex: none;
  display: grid;
  place-items: center;
  width: 72px;
  height: 40px;
  overflow: hidden;
  background: var(--layer-02);
  color: var(--icon-secondary);
}

.clip__thumb img { width: 100%; height: 100%; object-fit: cover; }

.clip__duration {
  position: absolute;
  right: 2px;
  bottom: 2px;
  padding: 0 3px;
  background: rgb(0 0 0 / 0.7);
  font: 10px/14px var(--font-mono);
  letter-spacing: 0;
  color: var(--text-primary);
}

.clip__text { display: grid; gap: 2px; min-width: 0; }

.clip__title,
.clip__meta {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.clip__title { line-height: 18px; }
.clip.is-active .clip__title { font-weight: 600; }

.clip__meta {
  font-size: 12px;
  line-height: 16px;
  letter-spacing: 0.32px;
  color: var(--text-helper);
}

.clip.is-active [data-play] { color: var(--accent); }

.upload-row {
  display: grid;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--border-subtle-00);
}

.upload-row__line {
  display: flex;
  align-items: center;
  gap: 12px;
}

.upload-row__line .clip__thumb { color: var(--accent); }
.upload-row__state { margin-left: auto; font: 12px/16px var(--font-mono); color: var(--text-secondary); }
.upload-row__bar { height: 4px; background: var(--layer-02); }

.upload-row__bar i {
  display: block;
  width: var(--progress, 0%);
  height: 100%;
  background: var(--accent);
  transition: width 200ms var(--ease);
}

.upload-row.is-done .upload-row__state { color: var(--support-success); }
.upload-row.is-error .upload-row__bar i { width: 100%; background: var(--support-error); }
.upload-row.is-error .upload-row__state { color: var(--support-error); font-family: var(--font-sans); white-space: normal; text-align: right; }

/* Modals ------------------------------------------------------------- */

.modal {
  width: min(512px, calc(100% - 32px));
  padding: 0;
  border: 0;
  background: var(--layer-01);
  color: var(--text-primary);
}

.modal::backdrop { background: var(--overlay); }

.modal__header {
  position: relative;
  display: grid;
  gap: 4px;
  padding: 16px 64px 0 16px;
}

.modal__close { position: absolute; top: 0; right: 0; }

.modal__body {
  display: grid;
  gap: 24px;
  padding: 16px 16px 48px;
}

.modal__footer { display: flex; }
.modal__footer .btn { flex: 1; min-height: 64px; align-items: flex-start; padding-top: 14px; }

.file-chip {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 0 16px;
  background: var(--layer-02);
}

.file-chip__name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-chip__size { font-size: 12px; color: var(--text-secondary); }

/* Responsive --------------------------------------------------------- */

@media (min-width: 1056px) {
  /* Liste so hoch wie Bühne und Player, sie scrollt innen */
  .side { position: relative; }
  .side > * { flex: none; }
  .side .clip-list { flex: 1; }
  .studio .side { height: 0; min-height: 100%; }
}

@media (max-width: 1055px) {
  .studio { grid-template-columns: minmax(0, 1fr); }
  .clip-list__scroll { max-height: 70vh; }
}

@media (max-width: 671px) {
  :root { --gutter: 16px; }
  .shell-header__name { padding-right: 16px; }
  .shell-header__user span { display: none; }
  .shell-header__nav { display: none; }
  .player__transport { flex-wrap: wrap; row-gap: 8px; }
  .slider { order: 5; flex-basis: 100%; padding-left: 0; }
  .volume { margin-left: auto; }
  .login-card { padding: 24px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after { animation: none !important; transition: none !important; }
}
