/* Lumis shared player styles — loaded by both the Mini App and the share page.
   Self-contained (hardcoded brand colours) so it renders identically on either
   surface regardless of their own :root variables. */

.lp, .lp *, .lp *::before, .lp *::after { box-sizing: border-box; }
.lp { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.lp-controls { min-width: 0; }
.lp-time { white-space: nowrap; }

/* ── Stage: markers over waveform over ribbon ── */
.lp-stage { position: relative; }
.lp-markers { position: relative; height: 13px; overflow: visible; }
.lp-wave-wrap { position: relative; height: 40px; cursor: pointer; touch-action: none; overflow: hidden; }
.lp-wave { position: absolute; inset: 0; display: flex; align-items: flex-end; gap: 1px; }
.lp-bar {
  flex: 1 1 0; min-width: 0; border-radius: 1px 1px 0 0; min-height: 3px;
  background: #3a3a42; transition: background 0.08s ease;
}
.lp-bar.is-past { background: #eae1a9; }
.lp-playhead {
  position: absolute; top: -2px; bottom: -2px; width: 2px; left: 0;
  background: #f4f1ea; pointer-events: none; box-shadow: 0 0 5px rgba(244,241,234,0.7); z-index: 4;
}

/* speaker-activity ribbon lane below the waveform */
.lp-ribbon { position: relative; height: 8px; overflow: hidden; background: transparent; }
.lp-ribbon-blk { position: absolute; top: 0; bottom: 0; border-radius: 3px; opacity: 0.95; transition: opacity 0.15s ease; }
.lp-ribbon-blk.dim { opacity: 0.14; }

/* chapter ticks: thin full-height grey lines that reach down over the wave */
.lp-chapter-tick {
  position: absolute; top: 0; height: 53px; width: 1px; transform: translateX(-0.5px);
  background: rgba(139,139,134,0.4); cursor: pointer; z-index: 2;
}
.lp-chapter-tick:hover { background: rgba(139,139,134,0.9); }

/* typed event markers — shape first, colour second */
.lp-marker {
  position: absolute; top: 1px; width: 11px; height: 11px; transform: translateX(-50%);
  cursor: pointer; z-index: 3;
}
.lp-marker.shape-diamond { background: var(--mk); border-radius: 2px; transform: translateX(-50%) rotate(45deg); width: 9px; height: 9px; }
.lp-marker.shape-square { background: var(--mk); border-radius: 2px; }
.lp-marker.shape-circle { background: var(--mk); border-radius: 50%; }
.lp-marker-tip {
  position: absolute; bottom: 150%; left: 50%; transform: translateX(-50%);
  background: #191920; border: 1px solid #26262d; border-radius: 8px; padding: 5px 9px;
  font-size: 11.5px; line-height: 1.35; color: #f4f1ea; white-space: normal; width: max-content; max-width: 240px;
  pointer-events: none; opacity: 0; transition: opacity 0.1s; z-index: 12;
}
.lp-marker.shape-diamond .lp-marker-tip { transform: translateX(-50%) rotate(-45deg); }
.lp-marker:hover .lp-marker-tip { opacity: 1; }

/* ── Legend ── */
.lp-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.lp-chips, .lp-speakers { display: flex; flex-wrap: wrap; gap: 6px; }
.lp-chip, .lp-spk-pill {
  display: inline-flex; align-items: center; gap: 5px; font-family: inherit; font-size: 11px; font-weight: 600;
  color: #f4f1ea; background: #191920; border: 1px solid #26262d; border-radius: 999px;
  padding: 3px 9px 3px 7px; cursor: pointer;
}
.lp-chip.off, .lp-spk-pill.off { color: #5f5f5b; opacity: 0.45; }
.lp-chip-glyph { width: 9px; height: 9px; flex-shrink: 0; }
.lp-chip-glyph.shape-diamond { background: var(--mk); border-radius: 2px; transform: rotate(45deg); width: 8px; height: 8px; }
.lp-chip-glyph.shape-square { background: var(--mk); border-radius: 2px; }
.lp-chip-glyph.shape-circle { background: var(--mk); border-radius: 50%; }
.lp-spk-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }

/* ── Controls: three optical zones, transport dead-centre ── */
.lp-controls {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; min-width: 0;
}
.lp-zone { display: flex; align-items: center; gap: 8px; min-width: 0; }
.lp-zone-left { justify-self: start; }
.lp-zone-right { justify-self: end; }
.lp-transport { display: flex; align-items: center; justify-content: center; gap: 12px; justify-self: center; }
.lp-icon-btn {
  width: 32px; height: 32px; border-radius: 8px; border: 1px solid #26262d; background: #191920;
  color: #8b8b86; cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0; padding: 0;
}
.lp-icon-btn:active { transform: scale(0.94); }
/* skip buttons flank play, a touch larger than utility icons for a 44px hit-area */
.lp-skip-btn { width: 40px; height: 38px; color: #c9c7c1; }
.lp-play {
  width: 46px; height: 46px; border-radius: 50%; border: none; cursor: pointer; flex-shrink: 0;
  background: linear-gradient(135deg, #eae1a9, #d0c485);
  box-shadow: 0 2px 10px rgba(234,225,169,0.28);
  display: flex; align-items: center; justify-content: center;
}
.lp-play:active { transform: scale(0.94); }
/* CSS-drawn triangle/bars (glyph chars aren't in the self-hosted font subset) */
.lp-play-icon {
  width: 0; height: 0; margin-left: 2px;
  border-style: solid; border-width: 6px 0 6px 10px;
  border-color: transparent transparent transparent #1a1408;
}
.lp-play.is-playing .lp-play-icon {
  width: 11px; height: 12px; margin-left: 0; background: none;
  border-style: solid; border-width: 0; border-left: 3.5px solid #1a1408; border-right: 3.5px solid #1a1408;
}
.lp-skip { display: inline-flex; align-items: center; gap: 2px; line-height: 1; font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; }
.lp-skip-svg { display: block; }
.lp-skip small { font-size: 8px; font-weight: 600; line-height: 1; }
.lp-tri { width: 0; height: 0; border-style: solid; flex-shrink: 0; }
.lp-tri-l { border-width: 4px 5px 4px 0; border-color: transparent currentColor transparent transparent; }
.lp-tri-r { border-width: 4px 0 4px 5px; border-color: transparent transparent transparent currentColor; }
.lp-chevron { width: 9px; height: 9px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform 0.15s ease; }
.lp-collapsed .lp-chevron { transform: translateY(2px) rotate(-135deg); }
.lp-time { font-size: 12px; color: #8b8b86; font-variant-numeric: tabular-nums; flex-shrink: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lp-time .lp-cur { color: #f4f1ea; }
.lp-rate {
  background: #191920; border: 1px solid #26262d; color: #f4f1ea; border-radius: 8px;
  font-family: inherit; font-size: 12.5px; font-weight: 700; padding: 6px 10px; cursor: pointer; flex-shrink: 0;
  font-variant-numeric: tabular-nums; min-width: 40px; text-align: center;
}
.lp-rate:active { transform: scale(0.94); }

/* volume: mute-toggle icon + always-visible horizontal slider (no hover-reveal:
   the share page is a touch Mini App). Slider drops on narrow screens below. */
.lp-vol { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.lp-vol-btn { width: 30px; height: 30px; }
.lp-vol-svg { display: block; }
.lp-vol .v-wave, .lp-vol .v-mute { display: none; }
.lp-vol.vol-low .v-wave1 { display: inline; }
.lp-vol.vol-high .v-wave1, .lp-vol.vol-high .v-wave2 { display: inline; }
.lp-vol.muted .v-mute { display: inline; }
.lp-vol.muted .lp-vol-btn { color: #5f5f5b; }
.lp-vol-slider {
  width: 78px; height: 4px; flex-shrink: 0;
  -webkit-appearance: none; appearance: none; background: #3a3a42; border-radius: 2px; cursor: pointer;
}
.lp-vol-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 13px; height: 13px; border-radius: 50%; background: #eae1a9; cursor: pointer; }
.lp-vol-slider::-moz-range-thumb { width: 13px; height: 13px; border: none; border-radius: 50%; background: #eae1a9; cursor: pointer; }
.lp-vol-slider::-moz-range-track { height: 4px; border-radius: 2px; background: #3a3a42; }
.lp-vol-slider::-moz-range-progress { height: 4px; border-radius: 2px; background: #eae1a9; }

/* narrow screens: drop the slider (hardware volume owns it there), keep mute */
@media (max-width: 480px) {
  .lp-vol-slider { display: none; }
  .lp-controls { gap: 6px; }
  .lp-transport { gap: 8px; }
  /* keep the current-time readout only; total would truncate in the tight column */
  .lp-time-sep, .lp-time .lp-dur { display: none; }
}

/* collapsed: hide waveform stage + legend, keep the control row */
.lp-collapsed .lp-stage, .lp-collapsed .lp-legend { display: none; }

/* ── Structure block (chapters + nested items) ── */
.lp-structure { background: #131316; border: 1px solid #26262d; border-radius: 16px; padding: 14px 16px; }
.lp-structure-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: #eae1a9; margin-bottom: 5px; }
.lp-structure-hint { font-size: 11.5px; color: #8b8b86; margin-bottom: 12px; }
.lp-ch { border-top: 1px solid #201f26; padding: 8px 0; }
.lp-ch:first-of-type { border-top: none; padding-top: 0; }
.lp-ch-head {
  display: flex; align-items: center; gap: 8px; width: 100%; text-align: left;
  background: none; border: none; cursor: pointer; font-family: inherit; padding: 3px 0; color: #f4f1ea;
}
.lp-ch-head:hover .lp-ch-title { color: #eae1a9; }
.lp-ch-caret {
  width: 6px; height: 6px; flex-shrink: 0; border-right: 2px solid #8b8b86; border-bottom: 2px solid #8b8b86;
  transform: rotate(-45deg); transition: transform 0.15s ease; margin: 0 2px 2px 0;
}
.lp-ch-open .lp-ch-caret { transform: rotate(45deg); margin: 2px 2px 0 0; }
.lp-ch-time { color: #8b8b86; font-variant-numeric: tabular-nums; flex-shrink: 0; min-width: 46px; font-size: 12px; }
.lp-ch-title { font-size: 14px; font-weight: 600; flex: 1; }
.lp-ch-count {
  flex-shrink: 0; font-size: 11px; font-weight: 700; color: #8b8b86;
  background: #191920; border: 1px solid #26262d; border-radius: 999px; min-width: 20px; text-align: center; padding: 1px 6px;
}
/* event-type facepile: overlapping glyphs standing in for the sub-item count */
.lp-ch-stack { display: inline-flex; align-items: center; flex-shrink: 0; padding-left: 4px; }
.lp-ch-stack-glyph {
  width: 11px; height: 11px; flex-shrink: 0; margin-left: -3px;
  background: var(--mk); box-shadow: 0 0 0 1.5px #131316;
}
.lp-ch-stack-glyph:first-child { margin-left: 0; }
.lp-ch-stack-glyph.shape-diamond { width: 9px; height: 9px; border-radius: 2px; transform: rotate(45deg); }
.lp-ch-stack-glyph.shape-square { border-radius: 2px; }
.lp-ch-stack-glyph.shape-circle { border-radius: 50%; }
.lp-ch-active .lp-ch-title { color: #eae1a9; }
.lp-ch-active { background: rgba(234,225,169,0.05); border-radius: 8px; margin: 0 -8px; padding-left: 8px; padding-right: 8px; }
.lp-ch-items { display: none; flex-direction: column; gap: 4px; margin: 4px 0 4px 56px; }
.lp-ch-open .lp-ch-items { display: flex; }
.lp-hl { display: flex; align-items: flex-start; gap: 8px; font-size: 12.5px; color: #c9c7c1; line-height: 1.45; }
.lp-hl-dot { width: 4px; height: 4px; border-radius: 50%; background: #5f5f5b; flex-shrink: 0; margin-top: 7px; }
.lp-mk-row {
  display: flex; align-items: flex-start; gap: 8px; width: 100%; text-align: left;
  background: none; border: none; cursor: pointer; font-family: inherit; padding: 2px 0; color: #f4f1ea;
}
.lp-mk-row:hover { color: #eae1a9; }
.lp-mk-glyph { width: 9px; height: 9px; flex-shrink: 0; margin-top: 4px; }
.lp-mk-glyph.shape-diamond { background: var(--mk); border-radius: 2px; transform: rotate(45deg); width: 8px; height: 8px; }
.lp-mk-glyph.shape-square { background: var(--mk); border-radius: 2px; }
.lp-mk-glyph.shape-circle { background: var(--mk); border-radius: 50%; }
.lp-mk-body { flex: 1; font-size: 12.5px; line-height: 1.45; color: #dcdad4; }
.lp-mk-pill { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; }
.lp-mk-by { display: block; font-size: 10.5px; color: #8b8b86; margin-top: 2px; }
.lp-mk-agree { color: #5fbf7f; }
