/* ============================================================
   Bran.Prompt — estilos
   Estructura: 1) fuentes  2) tokens  3) base  4) componentes
               5) biblioteca  6) editor  7) teleprompter
               8) diálogos  9) responsive y accesibilidad
   ============================================================ */

/* ---------- 1) Fuentes autohospedadas (sin peticiones a terceros) ---------- */
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/outfit.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Syne';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('/fonts/syne.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- 2) Tokens ---------- */
:root {
  color-scheme: dark;

  --noche: #05050d;
  --panel: #0f0e1f;
  --panel-alto: #1a1830;
  --linea: rgba(236, 232, 255, 0.1);
  --tinta: #f3f0ff;
  --tinta-suave: #b0aacf;
  --tinta-tenue: #7c779f;
  --rosa: #ff2d78;
  --rosa-texto: #ff7aa6;
  --morado: #9b30ff;
  --cian: #00d4ff;
  --verde: #34ff9b;
  --sobre-rosa: #12040b;

  --font-display: 'Syne', 'Avenir Next', system-ui, sans-serif;
  --font-body: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;

  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);

  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* ---------- 3) Base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  height: 100%;
  background: var(--noche);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100%;
  background: var(--noche);
  color: var(--tinta);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

[hidden] { display: none !important; }

button,
input,
textarea { font: inherit; color: inherit; }

button { cursor: pointer; }

a { color: inherit; }

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* Fondo de marca: orbes quietos + grano. Se apaga al leer. */
.ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(70vmax 70vmax at 108% -12%, rgba(155, 48, 255, 0.2), transparent 62%),
    radial-gradient(55vmax 55vmax at -18% 112%, rgba(255, 45, 120, 0.12), transparent 60%);
}
.ambient::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('/img/grain.svg');
  opacity: 0.05;
}

.view { position: relative; z-index: 1; }

/* ---------- 4) Componentes ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--linea);
  border-radius: 999px;
  background: transparent;
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  touch-action: manipulation;
  transition: background-color 0.15s var(--ease), opacity 0.15s var(--ease);
}
.btn:active { background-color: rgba(255, 255, 255, 0.06); }
.btn:disabled { cursor: default; opacity: 0.35; }

.btn-icon { width: 20px; height: 20px; flex: none; }

.btn-primary {
  border-color: transparent;
  background: var(--rosa);
  color: var(--sobre-rosa);
  font-weight: 700;
  box-shadow: 0 10px 30px -12px rgba(255, 45, 120, 0.9);
}
.btn-primary:active { background: #ff5a95; }
.btn-primary:disabled { box-shadow: none; }

.btn-ghost { border-color: transparent; color: var(--tinta-suave); }
.btn-danger { color: var(--rosa-texto); }
.btn-danger-solid { border-color: transparent; background: var(--rosa); color: var(--sobre-rosa); font-weight: 700; }
.btn-small { min-height: 38px; padding: 0 14px; font-size: 15px; }

.toast {
  position: fixed;
  left: 50%;
  top: calc(var(--safe-top) + 72px);
  z-index: 50;
  width: max-content;
  max-width: calc(100% - 32px);
  padding: 12px 18px;
  border: 1px solid var(--linea);
  border-radius: 14px;
  background: var(--panel-alto);
  color: var(--tinta);
  font-size: 15px;
  transform: translateX(-50%);
  box-shadow: 0 16px 40px -16px rgba(0, 0, 0, 0.8);
}
.toast[data-tone='error'] { border-color: rgba(255, 45, 120, 0.5); }

/* ---------- 5) Biblioteca (escaleta) ---------- */
.library {
  max-width: 760px;
  margin: 0 auto;
  padding:
    calc(var(--safe-top) + 28px)
    calc(var(--safe-right) + 22px)
    calc(var(--safe-bottom) + 48px)
    calc(var(--safe-left) + 22px);
}

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

.wordmark {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(30px, 8.5vw, 46px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.035em;
  text-shadow: -1.5px 0 rgba(0, 212, 255, 0.5), 1.5px 0 rgba(255, 45, 120, 0.5);
}
.wordmark-dot {
  color: var(--rosa);
  text-shadow: 0 0 16px rgba(255, 45, 120, 0.95);
}

.lib-title {
  margin: 40px 0 10px;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--tinta-suave);
}

.rundown {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--linea);
}

.rundown-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  border-bottom: 1px solid var(--linea);
}

.ri-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px 18px;
  padding: 18px 6px 18px 2px;
  text-decoration: none;
  touch-action: manipulation;
}
.ri-main:active { background: rgba(255, 255, 255, 0.03); }

.ri-title {
  overflow: hidden;
  font-size: 19px;
  font-weight: 600;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ri-title.is-untitled { color: var(--tinta-suave); font-style: italic; }

.ri-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 14px;
  grid-column: 1;
  font-size: 14px;
  color: var(--tinta-tenue);
}

.ri-time {
  grid-column: 2;
  grid-row: 1 / span 2;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.ri-play {
  display: grid;
  place-items: center;
  width: 56px;
  color: var(--rosa);
  text-decoration: none;
  touch-action: manipulation;
}
.ri-play svg { width: 22px; height: 22px; filter: drop-shadow(0 0 8px rgba(255, 45, 120, 0.6)); }
.ri-play[aria-disabled='true'] { color: var(--tinta-tenue); opacity: 0.4; pointer-events: none; }
.ri-play[aria-disabled='true'] svg { filter: none; }

.empty { padding: 44px 2px 8px; }
.empty-title {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.empty-text { margin: 0; color: var(--tinta-suave); }

.install-hint {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 40px;
  padding: 14px 8px 14px 16px;
  border: 1px solid var(--linea);
  border-radius: 16px;
  background: rgba(15, 14, 31, 0.7);
  font-size: 15px;
  color: var(--tinta-suave);
}
.install-hint p { margin: 0; }
.install-hint strong { color: var(--tinta); font-weight: 600; }

/* ---------- 6) Editor ---------- */
.editor {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  max-width: 860px;
  margin: 0 auto;
  padding: calc(var(--safe-top) + 8px) calc(var(--safe-right) + 16px) 0 calc(var(--safe-left) + 16px);
}

.ed-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 56px;
}
.btn-back { padding-left: 6px; }

.ed-status { font-size: 14px; color: var(--tinta-tenue); text-align: center; }
.ed-status[data-tone='ok'] { color: var(--verde); }
.ed-status[data-tone='error'] { color: var(--rosa-texto); }

.ed-title {
  width: 100%;
  padding: 10px 4px 14px;
  border: 0;
  background: transparent;
  font-family: var(--font-display);
  font-size: clamp(24px, 6vw, 34px);
  font-weight: 700;
  letter-spacing: -0.02em;
}
.ed-title::placeholder,
.ed-body::placeholder { color: var(--tinta-tenue); opacity: 1; }

.ed-body {
  flex: 1;
  min-height: 0;
  width: 100%;
  padding: 18px 4px;
  border: 0;
  border-top: 1px solid var(--linea);
  background: transparent;
  font-size: 18px;
  line-height: 1.6;
  resize: none;
}

.ed-title:focus-visible,
.ed-body:focus-visible { outline: none; }
.ed-body:focus { border-top-color: rgba(0, 212, 255, 0.45); }

.ed-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0 calc(var(--safe-bottom) + 12px);
  border-top: 1px solid var(--linea);
}

.ed-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 16px;
  margin: 0;
  font-size: 15px;
  color: var(--tinta-suave);
  font-variant-numeric: tabular-nums;
}

.btn-read { min-width: 116px; }

/* ---------- 7) Teleprompter ---------- */
body.is-reading { overflow: hidden; }
body.is-reading .ambient { display: none; }

.prompter {
  position: fixed;
  inset: 0;
  z-index: 10;
  overflow: hidden;
  background: var(--noche);
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;

  /* Valores que JS actualiza con los ajustes */
  --pr-fs: 48px;
  --pr-lh: 1.35;
  --pr-margin: 6%;
  --pr-guide: 33%;
  --pr-align: left;
  --pr-mx: 1;
  --pr-my: 1;
  --pr-line: calc(var(--pr-fs) * var(--pr-lh));
}

/* El escenario completo se voltea en modo espejo (texto, guía y cuenta regresiva). */
.pr-stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
  transform: scale(var(--pr-mx), var(--pr-my));
}

.pr-track {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  padding: 0 calc(var(--pr-margin) + var(--safe-right)) 0 calc(var(--pr-margin) + var(--safe-left));
  font-size: var(--pr-fs);
  font-weight: 500;
  line-height: var(--pr-lh);
  letter-spacing: 0.004em;
  text-align: var(--pr-align);
  color: var(--tinta);
  will-change: transform;
}
.pr-track p { margin: 0; overflow-wrap: break-word; }
.pr-track p.blank { height: var(--pr-line); }

.pr-fade { position: absolute; right: 0; left: 0; pointer-events: none; }
/* Lo ya leído (arriba de la guía) se atenúa; lo que viene queda brillante. */
.pr-fade-top {
  top: 0;
  height: calc(var(--pr-guide) - var(--pr-line) / 2);
  background: linear-gradient(var(--noche) 6%, rgba(5, 5, 13, 0.55));
}
.pr-fade-bottom {
  bottom: 0;
  height: 14%;
  background: linear-gradient(rgba(5, 5, 13, 0), var(--noche) 88%);
}

/* La guía: la banda "al aire" donde van tus ojos. */
.pr-guide {
  position: absolute;
  top: var(--pr-guide);
  right: 0;
  left: 0;
  height: var(--pr-line);
  transform: translateY(-50%);
  border-block: 1px solid rgba(255, 45, 120, 0.3);
  background: linear-gradient(90deg,
    rgba(255, 45, 120, 0.12), rgba(255, 45, 120, 0.035) 18%,
    rgba(255, 45, 120, 0.035) 82%, rgba(255, 45, 120, 0.12));
  pointer-events: none;
}
.prompter.no-guide .pr-guide { display: none; }

.pr-guide-mark {
  position: absolute;
  top: 50%;
  width: 0;
  height: 0;
  border-block: 11px solid transparent;
  transform: translateY(-50%);
  filter: drop-shadow(0 0 8px rgba(255, 45, 120, 0.9));
}
.pr-guide-left { left: calc(var(--safe-left) + 2px); border-left: 15px solid var(--rosa); }
.pr-guide-right { right: calc(var(--safe-right) + 2px); border-right: 15px solid var(--rosa); }

.pr-countdown {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(5, 5, 13, 0.78);
  font-family: var(--font-display);
  font-size: clamp(120px, 40vmin, 340px);
  font-weight: 800;
  line-height: 1;
  color: var(--rosa);
  text-shadow: 0 0 48px rgba(255, 45, 120, 0.65);
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}
.pr-countdown-digit { animation: tick 0.9s var(--ease); }
@keyframes tick {
  from { opacity: 0.35; transform: scale(1.18); }
  to { opacity: 1; transform: scale(1); }
}

.pr-progress {
  position: absolute;
  top: var(--safe-top);
  right: 0;
  left: 0;
  z-index: 6;
  height: 3px;
  background: rgba(255, 255, 255, 0.06);
  pointer-events: none;
}
.pr-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--rosa), var(--morado), var(--cian));
  transform: scaleX(0);
  transform-origin: left center;
}

/* HUD: sólo sus barras reciben toques; el resto pasa al escenario. */
.pr-hud { position: absolute; inset: 0; z-index: 5; pointer-events: none; }

.pr-top,
.pr-controls {
  pointer-events: auto;
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
}

.pr-top {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: calc(var(--safe-top) + 8px) calc(var(--safe-right) + 14px) 18px calc(var(--safe-left) + 8px);
  background: linear-gradient(rgba(5, 5, 13, 0.94) 55%, rgba(5, 5, 13, 0));
}

.pr-title {
  flex: 1;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  font-size: 16px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pr-remaining {
  margin: 0;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--tinta-suave);
}
.prompter.is-ended .pr-remaining { color: var(--rosa-texto); }

.pr-controls {
  position: absolute;
  right: 0;
  bottom: calc(var(--safe-bottom) + 14px);
  left: 0;
  display: flex;
  align-items: center;
  gap: 4px;
  width: max-content;
  max-width: calc(100% - 20px);
  margin-inline: auto;
  padding: 8px;
  border: 1px solid var(--linea);
  border-radius: 30px;
  background: rgba(15, 14, 31, 0.9);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

/* En pantallas anchas las dos filas se funden en una sola barra ordenada. */
.ctl-row { display: contents; }
#pr-restart { order: 1; }
.ctl-speed { order: 2; }
.ctl-play { order: 3; }
.ctl-size { order: 4; }
#pr-settings { order: 5; }

.prompter.hud-hidden .pr-top { opacity: 0; transform: translateY(-10px); pointer-events: none; }
.prompter.hud-hidden .pr-controls { opacity: 0; transform: translateY(10px); pointer-events: none; }

.ctl {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--tinta);
  touch-action: manipulation;
}
.ctl:active { background: rgba(255, 255, 255, 0.09); }
.ctl svg { width: 24px; height: 24px; }

.ctl-play {
  width: 64px;
  height: 64px;
  margin-inline: 6px;
  background: var(--rosa);
  color: var(--sobre-rosa);
  box-shadow: 0 0 0 5px rgba(255, 45, 120, 0.16), 0 0 34px rgba(255, 45, 120, 0.55);
}
.ctl-play:active { background: #ff5a95; }
.ctl-play svg { width: 28px; height: 28px; }
.ctl-play .icon-pause { display: none; }
.prompter.is-playing .ctl-play .icon-play { display: none; }
.prompter.is-playing .ctl-play .icon-pause { display: block; }

.ctl-group { display: flex; align-items: center; }

.ctl-value {
  min-width: 58px;
  margin: 0;
  line-height: 1.05;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.ctl-value strong { display: block; font-family: var(--font-display); font-size: 19px; font-weight: 700; }
.ctl-value small { font-size: 11px; color: var(--tinta-tenue); }

.ctl-letter { font-family: var(--font-display); font-weight: 700; line-height: 1; }
.ctl-letter-small { font-size: 15px; }
.ctl-letter-big { font-size: 24px; }

/* ---------- 8) Diálogos ---------- */
dialog { color: var(--tinta); }

.sheet {
  width: min(560px, 100%);
  max-width: 100%;
  max-height: 80vh;
  max-height: 80dvh;
  margin: auto auto 0;
  padding: 6px 20px calc(var(--safe-bottom) + 18px);
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--linea);
  border-bottom: 0;
  border-radius: 26px 26px 0 0;
  background: rgba(15, 14, 31, 0.97);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
}
.sheet::backdrop { background: rgba(5, 5, 13, 0.3); }

.sheet-head {
  position: sticky;
  top: -6px;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 -20px;
  padding: 14px 20px 12px;
  background: rgba(15, 14, 31, 0.97);
}
.sheet-title { margin: 0; font-family: var(--font-display); font-size: 20px; font-weight: 700; }

.field {
  margin: 0;
  padding: 14px 0;
  border: 0;
  border-top: 1px solid var(--linea);
}
.field legend {
  float: left;
  width: 100%;
  margin-bottom: 10px;
  padding: 0;
  font-weight: 600;
}
.field legend + * { clear: both; }

.field-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.field-head label { font-weight: 600; }
.field-head output { color: var(--tinta-suave); font-variant-numeric: tabular-nums; }
.field-sub { margin-top: 14px; }
.field-sub label { font-weight: 500; color: var(--tinta-suave); }

input[type='range'] {
  width: 100%;
  height: 32px;
  margin: 0;
  background: transparent;
  -webkit-appearance: none;
  appearance: none;
  touch-action: pan-x;
}
input[type='range']::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--rosa), var(--morado));
}
input[type='range']::-webkit-slider-thumb {
  width: 26px;
  height: 26px;
  margin-top: -10px;
  border: 3px solid var(--noche);
  border-radius: 50%;
  background: var(--tinta);
  box-shadow: 0 0 0 1px var(--rosa), 0 0 14px rgba(255, 45, 120, 0.7);
  -webkit-appearance: none;
  appearance: none;
}
input[type='range']::-moz-range-track {
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--rosa), var(--morado));
}
input[type='range']::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border: 3px solid var(--noche);
  border-radius: 50%;
  background: var(--tinta);
}

.seg-options {
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: 14px;
  background: var(--noche);
}
.seg-options label { position: relative; flex: 1; }
.seg-options input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg-options span {
  display: block;
  padding: 10px 6px;
  border-radius: 10px;
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  color: var(--tinta-suave);
  transition: background-color 0.15s var(--ease), color 0.15s var(--ease);
}
.seg-options input:checked + span { background: var(--panel-alto); color: var(--tinta); box-shadow: inset 0 0 0 1px rgba(255, 45, 120, 0.45); }
.seg-options input:focus-visible + span { outline: 2px solid var(--cian); outline-offset: 2px; }

.switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  font-weight: 600;
  cursor: pointer;
}
.switch input {
  position: relative;
  flex: none;
  order: 2;
  width: 52px;
  height: 32px;
  margin: 0;
  border-radius: 16px;
  background: var(--panel-alto);
  box-shadow: inset 0 0 0 1px var(--linea);
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  transition: background-color 0.2s var(--ease);
}
.switch input::after {
  content: '';
  position: absolute;
  top: 4px;
  left: 4px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--tinta);
  transition: transform 0.2s var(--ease);
}
.switch input:checked { background: var(--rosa); }
.switch input:checked::after { transform: translateX(20px); }
.field .switch + .switch { margin-top: 4px; }

.note { margin: 6px 0 14px; font-size: 14px; color: var(--tinta-tenue); }
.note[data-tone='ok'] { color: var(--verde); }

.dialog {
  width: min(400px, calc(100% - 40px));
  padding: 24px;
  border: 1px solid var(--linea);
  border-radius: 22px;
  background: var(--panel);
}
.dialog::backdrop { background: rgba(5, 5, 13, 0.7); }
.dialog-title { margin: 0 0 8px; font-family: var(--font-display); font-size: 21px; font-weight: 700; }
.dialog-text { margin: 0 0 22px; color: var(--tinta-suave); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; }

/* ---------- 9) Responsive y accesibilidad ---------- */
@media (max-width: 460px) {
  .lib-head { flex-wrap: wrap; }
  .ri-time { font-size: 19px; }

  .pr-controls {
    flex-direction: column;
    gap: 6px;
    width: calc(100% - 20px);
    border-radius: 26px;
  }
  .ctl-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
  }
  .ctl-row-main { justify-content: space-around; }
  .ctl-value { min-width: 50px; }
}

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