/* RoadReel — studio + player.
   Extends style.css; every token here comes from it so the two read as one
   product. Mobile-first, because a creator recording on their phone is the
   whole point of this page existing. */

/* ---------------- shared bits ---------------- */

.studio {
  max-width: 42rem;
  margin: 0 auto;
  padding: clamp(1.5rem, 5vw, 3rem) var(--gutter) 5rem;
}

.std-panel h1 { margin: 0 0 .5rem; font-size: clamp(1.7rem, 5vw, 2.2rem); }

.std-field { margin: 0 0 1.1rem; }
.std-field label {
  display: block;
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .01em;
  color: var(--muted);
  margin-bottom: .4rem;
}
.std-opt { font-weight: 400; color: var(--faint); }

.std-field input,
.std-field select,
.std-field textarea {
  width: 100%;
  padding: .75rem .85rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  font: inherit;
  /* 16px minimum or iOS Safari zooms the whole page on focus. */
  font-size: 16px;
}
.std-field textarea { resize: vertical; }
.std-field input:focus,
.std-field select:focus,
.std-field textarea:focus {
  outline: 2px solid var(--amber);
  outline-offset: 1px;
}

.std-hint { margin: .35rem 0 0; font-size: .78rem; color: var(--faint); }
.std-error { color: #ff6b6b; font-size: .9rem; margin: .5rem 0; }
.std-note  { color: var(--amber); font-size: .9rem; margin: .5rem 0; }
.std-muted { color: var(--muted); font-size: .9rem; }

.std-wide { width: 100%; margin-top: .5rem; }
.btn-small { padding: .4rem .8rem; font-size: .85rem; }

.std-check {
  display: flex;
  gap: .6rem;
  align-items: flex-start;
  font-size: .85rem;
  color: var(--muted);
  margin: 0 0 1rem;
}
.std-check input { margin-top: .2rem; flex: none; }

.std-or {
  display: flex;
  align-items: center;
  gap: .8rem;
  color: var(--faint);
  font-size: .8rem;
  margin: 1.2rem 0;
}
.std-or::before, .std-or::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

#apple-button-box { min-height: 44px; }

/* ---------------- signed in ---------------- */

.std-topline {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.2rem;
}
.std-topline h1 { margin: 0; font-size: clamp(1.4rem, 4vw, 1.8rem); }
.std-handle { margin: .1rem 0 0; color: var(--muted); font-size: .9rem; }

.std-tabs {
  display: flex;
  gap: .3rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .25rem;
  margin-bottom: 1.6rem;
}
.std-tab {
  flex: 1;
  padding: .55rem .4rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
}
.std-tab.is-on { background: var(--amber-dim); color: var(--amber); }

/* ---------------- file picker ---------------- */

.std-drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .3rem;
  min-height: 8.5rem;
  padding: 1.5rem;
  margin-bottom: 1.4rem;
  border: 1.5px dashed var(--line);
  border-radius: 14px;
  background: var(--surface);
  cursor: pointer;
  text-align: center;
  transition: border-color .15s, background .15s;
}
.std-drop:hover, .std-drop.is-over { border-color: var(--amber); background: var(--amber-dim); }
.std-drop-main { font-weight: 600; word-break: break-all; }
.std-drop-sub { font-size: .82rem; color: var(--faint); }

/* ---------------- trim ---------------- */

.std-wave-wrap {
  position: relative;
  height: 96px;
  margin-bottom: 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
#wave { width: 100%; height: 96px; display: block; }

.std-trim-row { margin-bottom: .9rem; }
.std-trim-row label {
  display: flex;
  justify-content: space-between;
  font-size: .82rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: .35rem;
}
.std-trim-row input[type=range] {
  width: 100%;
  accent-color: var(--amber);
  /* 44px of vertical touch target — a 5px slider is unusable on a phone. */
  height: 44px;
}

.std-trim-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin: .2rem 0 1.4rem;
}
.std-len { font-size: .85rem; color: var(--muted); }
.std-len.is-bad { color: #ff6b6b; }

.std-progress {
  height: 6px;
  background: var(--surface);
  border-radius: 999px;
  overflow: hidden;
  margin: .8rem 0;
}
.std-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--amber);
  transition: width .15s linear;
}

/* ---------------- reel list ---------------- */

.std-list { display: flex; flex-direction: column; gap: .9rem; }
.std-item {
  padding: 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.std-item-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .8rem;
  margin-bottom: .25rem;
}
.std-item audio { width: 100%; margin-top: .7rem; }
.std-badge {
  flex: none;
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .06em;
  padding: .22rem .5rem;
  border-radius: 999px;
  background: var(--amber-dim);
  color: var(--amber);
}
.std-badge.is-live { background: rgba(80, 200, 120, .16); color: #6ede9a; }
.std-badge.is-warn { background: rgba(255, 107, 107, .16); color: #ff6b6b; }

.std-public { margin-top: 1.2rem; font-size: .85rem; color: var(--muted); }

/* ---------------- homepage player ---------------- */

.hp-card {
  max-width: 32rem;
  margin: 0 auto;
  padding: 1.6rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  text-align: center;
}
.hp-head { margin-bottom: .8rem; }
.hp-cat {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--amber);
  background: var(--amber-dim);
  padding: .3rem .7rem;
  border-radius: 999px;
}
.hp-title { margin: .2rem 0 .1rem; font-size: clamp(1.3rem, 4vw, 1.7rem); }
.hp-creator { margin: 0 0 1.2rem; color: var(--muted); font-size: .9rem; }

.hp-scrub { padding: .6rem 0; cursor: pointer; }
.hp-bar {
  height: 5px;
  background: rgba(255, 255, 255, .12);
  border-radius: 999px;
  overflow: hidden;
}
.hp-fill { height: 100%; width: 0%; background: var(--amber); }
.hp-times {
  display: flex;
  justify-content: space-between;
  font-size: .75rem;
  color: var(--faint);
  margin-bottom: 1rem;
}

.hp-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.4rem;
}
.hp-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .06);
  color: var(--text);
  font-size: 1.1rem;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.hp-btn:hover:not(:disabled) { border-color: var(--amber); }
.hp-btn:disabled { opacity: .4; cursor: default; }
.hp-play {
  width: 72px;
  height: 72px;
  background: var(--amber);
  border-color: var(--amber);
  color: #000;
  font-size: 1.4rem;
}
.hp-status { margin: .9rem 0 0; font-size: .8rem; color: var(--faint); min-height: 1rem; }

/* The glow is deliberately static, matching the app: moving light in a dark
   car pulls eyes off the road, and the site should not teach a habit the app
   refuses to. */

@media (prefers-reduced-motion: reduce) {
  .hp-fill, .std-progress-fill { transition: none; }
}

/* ---------------- review queue ---------------- */

.std-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: .9rem;
}
.std-actions .btn { flex: 1 1 auto; min-width: 6.5rem; }
.std-why {
  margin: .2rem 0;
  font-size: .84rem;
  color: var(--amber);
}
.btn.std-danger { color: #ff6b6b; border-color: rgba(255, 107, 107, .35); }
.btn.std-danger:hover { border-color: #ff6b6b; }

/* ---------------- button element fixes ----------------
   style.css's .btn was written for <a> tags, which have no default background.
   Applied to a real <button>, the browser's own grey/white background shows
   through and .btn-ghost's near-white text becomes invisible against it. */

button.btn {
  background: transparent;
  color: var(--text);
  font-family: inherit;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
button.btn-primary { background: var(--amber); color: #000; }
button.btn-primary:hover:not(:disabled) { background: #FFB254; }
button.btn-ghost { border-color: var(--line); color: var(--text); }
button.btn-ghost:hover:not(:disabled) { border-color: var(--muted); }
button.btn:disabled { opacity: .5; cursor: default; }

/* ---------------- Apple button ----------------
   The Apple JS SDK renders into this container and fills whatever space it is
   given, which without a height is a very tall white slab. Apple's own
   guidance is a button no taller than it is wide is fine but it must look like
   a button. */

#appleid-signin {
  max-width: 100%;
  height: 44px;
  cursor: pointer;
  overflow: hidden;
  border-radius: 999px;
}
#appleid-signin > div,
#appleid-signin iframe { height: 44px !important; max-height: 44px !important; }
