/* ============================================================================
   TOTN Floating Player — styles (enhancement layer, additive)
   Desktop: transport dock + case-file panel. Mobile: bottom bar + swipe sheet.
   Drives the site's existing #totn-audio. Delete this file + totn-player.js
   + the two include lines to fully revert (the legacy sticky bar returns).
   ============================================================================ */

/* Retire the legacy sticky mini-player (the old fixed bar at z-index:95). */
div[style*="z-index:95"][style*="position:fixed"] { display: none !important; }

.totnp-root { display: none; }
.totnp-root.on { display: block; }

/* -------- shared -------- */
.totnp-root, .totnp-root * { box-sizing: border-box; }
.totnp-eptitle { font-family: Anton, sans-serif; font-weight: 400; text-transform: uppercase;
  letter-spacing: .02em; color: #f2f1fa; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.totnp-ch { font-family: 'IBM Plex Mono', monospace; font-size: 10px; letter-spacing: .1em;
  color: #e8b53a; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.totnp-t { font-family: 'IBM Plex Mono', monospace; font-size: 10px; letter-spacing: .05em;
  color: #9a97b8; white-space: nowrap; font-variant-numeric: tabular-nums; }
.totnp-play { flex: none; border-radius: 50%; border: 1px solid rgba(160,92,255,.55);
  background: rgba(160,92,255,.16); color: #f2f1fa; cursor: pointer;
  display: flex; align-items: center; justify-content: center; }
.totnp-play:hover { background: rgba(160,92,255,.3); }
.totnp-skip { flex: none; border-radius: 50%; border: 1px solid rgba(242,241,250,.18); background: none;
  cursor: pointer; color: #9a97b8; display: flex; flex-direction: column; align-items: center;
  justify-content: center; line-height: 1; }
.totnp-skip:hover { color: #f2f1fa; border-color: rgba(160,92,255,.4); }
.totnp-skip svg { width: 22px; height: 22px; display: block; }
.totnp-controls .totnp-skip svg { width: 25px; height: 25px; }
.totnp-ib.totnp-volbtn { color: #a05cff; }
.totnp-ib.totnp-volbtn:hover { color: #c9a2ff; filter: drop-shadow(0 0 6px rgba(160,92,255,.5)); }
.totnp-volbtn svg { width: 21px; height: 21px; display: block; }
.totnp-spd { font-family: 'IBM Plex Mono', monospace; font-size: 10.5px; color: #2de2ff;
  border: 1px solid rgba(45,226,255,.3); border-radius: 4px; background: none; padding: 6px 9px;
  cursor: pointer; letter-spacing: .04em; min-width: 48px; }
.totnp-spd:hover { background: rgba(45,226,255,.08); border-color: rgba(45,226,255,.55); }
.totnp-track { position: relative; height: 16px; display: flex; align-items: center; cursor: pointer;
  touch-action: none; flex: 1; min-width: 0; }
.totnp-track .rail { position: absolute; left: 0; right: 0; height: 3px; border-radius: 100px;
  background: rgba(242,241,250,.14); }
.totnp-track .fill { position: absolute; left: 0; height: 3px; border-radius: 100px;
  background: linear-gradient(90deg, #a05cff, #2de2ff); pointer-events: none; }
.totnp-track .knob { position: absolute; width: 11px; height: 11px; border-radius: 50%;
  background: #f2f1fa; box-shadow: 0 0 8px rgba(160,92,255,.7); transform: translateX(-50%);
  pointer-events: none; opacity: 0; transition: opacity .15s; }
.totnp-track:hover .knob, .totnp-track.drag .knob { opacity: 1; }
.totnp-track .tick { position: absolute; top: 50%; width: 2px; height: 7px;
  transform: translate(-50%,-50%); background: rgba(232,181,58,.75); border-radius: 1px; pointer-events: none; }
.totnp-logo { border-radius: 50%; flex: none; border: 1px solid rgba(232,181,58,.45); object-fit: cover; }
.totnp-row { display: flex; gap: 10px; align-items: baseline; padding: 8px 10px; border-radius: 6px;
  cursor: pointer; border: 1px solid transparent; }
.totnp-row:hover { background: rgba(160,92,255,.08); border-color: rgba(160,92,255,.2); }
.totnp-row.on { background: rgba(232,181,58,.07); border-color: rgba(232,181,58,.3); }
.totnp-row .rt { font-family: 'IBM Plex Mono', monospace; font-size: 10.5px; color: #e8b53a;
  flex: none; font-variant-numeric: tabular-nums; }
.totnp-row .rl { font-size: 12.5px; color: #d9d7e8; line-height: 1.35; font-family: 'Instrument Sans', sans-serif; }
.totnp-row.on .rl { color: #f2f1fa; }
.totnp-exbtn { flex: none; width: 26px; height: 26px; border-radius: 50%; border: 1px solid rgba(232,181,58,.5);
  background: rgba(232,181,58,.1); color: #e8b53a; font-size: 9px; cursor: pointer; align-self: center;
  display: flex; align-items: center; justify-content: center; }
.totnp-exbtn:hover { background: rgba(232,181,58,.25); }

/* -------- desktop dock -------- */
.totnp-dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 96;
  background: rgba(18,18,31,.97); backdrop-filter: blur(12px);
  border-top: 1px solid rgba(160,92,255,.4); box-shadow: 0 -10px 34px rgba(0,0,0,.5); }
.totnp-dock-in { max-width: 1160px; margin: 0 auto; padding: 10px 22px 12px; }
.totnp-scrubrow { display: flex; align-items: center; gap: 12px; }
.totnp-ctlrow { display: flex; align-items: center; gap: 16px; margin-top: 6px; }
.totnp-meta { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; }
.totnp-meta .totnp-eptitle { font-size: 14.5px; }
.totnp-center { display: flex; align-items: center; gap: 12px; flex: none; }
.totnp-right { flex: 1; display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.totnp-ib { background: none; border: none; cursor: pointer; color: #9a97b8; font-size: 14px;
  display: flex; align-items: center; justify-content: center; }
.totnp-ib:hover { color: #f2f1fa; }
.totnp-x { color: #5c5975; font-size: 13px; }
.totnp-volwrap { position: relative; }
.totnp-volpop { position: absolute; bottom: calc(100% + 12px); left: 50%; transform: translateX(-50%);
  background: rgba(18,18,31,.98); border: 1px solid rgba(160,92,255,.28); border-radius: 8px;
  width: 42px; height: 118px; display: none; align-items: center; justify-content: center;
  box-shadow: 0 10px 30px rgba(0,0,0,.5); }
.totnp-volpop.open { display: flex; }
.totnp-volpop input { width: 92px; accent-color: #a05cff; transform: rotate(270deg); flex: none; }
.totnp-grab { width: 34px; height: 22px; border-radius: 6px; border: 1px solid transparent;
  background: none; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.totnp-grab:hover { border-color: rgba(232,181,58,.35); }
.totnp-grab i { display: block; width: 18px; height: 3px; border-radius: 100px; background: #9a97b8;
  transition: background .2s; }
.totnp-grab.on i { background: #e8b53a; }

/* case-file panel above the dock */
.totnp-panel { position: fixed; left: 0; right: 0; bottom: 0; z-index: 95;
  background: rgba(14,14,24,.97); backdrop-filter: blur(14px);
  border-top: 1px solid rgba(232,181,58,.3);
  transform: translateY(110%); transition: transform .35s cubic-bezier(.2,.8,.2,1);
  max-height: 46vh; overflow: auto; }
.totnp-panel.open { transform: translateY(0); }
.totnp-panel-in { max-width: 1160px; margin: 0 auto; padding: 22px 26px; display: grid;
  grid-template-columns: 1fr 1fr 1fr; gap: 30px; }
.totnp-panel-in.two { grid-template-columns: 1fr 1fr; }
.totnp-ph { font-family: 'IBM Plex Mono', monospace; font-size: 10px; letter-spacing: .2em;
  margin-bottom: 12px; padding-bottom: 7px; border-bottom: 1px dashed rgba(160,92,255,.3); color: #2de2ff; }
.totnp-ph.gold { color: #e8b53a; border-color: rgba(232,181,58,.3); }
.totnp-desc { font-size: 13px; line-height: 1.65; color: #cac7dd; font-family: 'Instrument Sans', sans-serif;
  min-height: 64px; }
.totnp-more { background: none; border: none; cursor: pointer; padding: 0;
  font-family: 'IBM Plex Mono', monospace; font-size: 10px; letter-spacing: .12em; color: #e8b53a; }
.totnp-more:hover { color: #f2f1fa; }

/* -------- mobile sheet (skinned to the app-shell prototype tokens) -------- */
.totnp-sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 96;
  top: max(52px, calc(env(safe-area-inset-top, 0px) + 8px));
  background: #12121f;
  transform: translateY(calc(100% - 68px - env(safe-area-inset-bottom, 0px)));
  transition: transform .34s cubic-bezier(.4, 0, .2, 1);
  border-top: 1px solid rgba(160,92,255,.4);
  display: flex; flex-direction: column; touch-action: none; }
.totnp-sheet.open { transform: translateY(0); border-radius: 24px 24px 0 0;
  border: 1px solid rgba(160,92,255,.4); border-bottom: none;
  box-shadow: 0 -18px 50px rgba(0,0,0,.55); }
.totnp-sheet.drag { transition: none; }
.totnp-mini { height: 68px; flex: none; display: flex; align-items: center; gap: 11px;
  padding: 12px 14px 8px; cursor: grab; position: relative;
  margin-bottom: env(safe-area-inset-bottom, 0px); }
.totnp-minigrab { display: none; } /* progress bar on the top edge replaced the grab pill */
.totnp-miniart { width: 40px; height: 40px; flex: none; border-radius: 8px;
  object-fit: cover; border: 1px solid rgba(160,92,255,.4); }
.totnp-mini .totnp-eptitle { font-size: 14px; }
.totnp-minitime { color: #2de2ff; flex: none; }
.totnp-mini .totnp-play { width: 38px; height: 38px; font-size: 12px; }
.totnp-minichev { flex: none; color: #9a97b8; display: flex; align-items: center; }
/* the prototype pins a 2px cyan progress line to the mini card's TOP edge;
   the touch zone stays 16px tall so scrubbing keeps a real finger target */
.totnp-miniscrub { position: absolute; left: 0; right: 0; top: -6px; height: 16px;
  touch-action: none; cursor: pointer; }
.totnp-miniscrub .rail { position: absolute; left: 0; right: 0; top: 6px; height: 2px;
  background: rgba(242,241,250,.14); }
.totnp-miniscrub .fill { position: absolute; left: 0; top: 6px; height: 2px;
  background: #2de2ff; box-shadow: 0 0 8px rgba(45,226,255,.6); pointer-events: none; }
.totnp-full { flex: 1; min-height: 0; overflow: auto; padding: 6px 22px 26px;
  opacity: 0; transition: opacity .25s;
  /* stop iOS chaining the sheet's scroll into the page (Safari reads that
     as pull-to-refresh) */
  overscroll-behavior: contain; }
.totnp-sheet.open .totnp-full { opacity: 1; }
/* the handle is a real touch target now: full-width 30px drag zone that
   always drives the sheet (touch-action none), with the bar drawn inside */
.totnp-handle { width: 100%; height: 42px; margin: 0 0 8px; border-radius: 0;
  background: none; display: flex; align-items: flex-end; justify-content: center;
  touch-action: none; cursor: grab; position: relative; }
/* drag pill sits at the very top; NOW PLAYING header centered under it */
.totnp-handle::before { content: ''; position: absolute; top: 8px; left: 50%;
  transform: translateX(-50%); width: 42px; height: 4px; border-radius: 100px;
  background: rgba(242,241,250,.25); }
.totnp-nowhdr { font-family: 'IBM Plex Mono', monospace; font-size: 10px; font-weight: 600;
  letter-spacing: .2em; color: #8f8ca8; padding-bottom: 2px; }
.totnp-collapse { position: absolute; bottom: -2px; left: 0; width: 40px; height: 34px;
  background: none; border: none; cursor: pointer; color: #9a97b8; padding: 0;
  display: flex; align-items: center; justify-content: center; }
.totnp-collapse svg { display: block; }
/* full-width banner art, bottom gradient, AUDIO ONLY pill — per prototype */
.totnp-artwrap { position: relative; height: 214px; margin: 6px 0 18px;
  border-radius: 12px; overflow: hidden; border: 1px solid rgba(160,92,255,.35);
  box-shadow: 0 18px 50px rgba(160,92,255,.18); }
.totnp-artwrap::after { content: ''; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(10,10,18,.72), transparent 55%); }
.totnp-bigart { width: 100%; height: 100%; display: block; object-fit: cover; }
.totnp-audiopill { position: absolute; left: 12px; bottom: 10px; z-index: 1;
  font-family: 'IBM Plex Mono', monospace; font-size: 8.5px; font-weight: 600;
  letter-spacing: .14em; color: #f2f1fa; background: rgba(9,9,16,.6);
  border: 1px solid rgba(242,241,250,.25); border-radius: 100px; padding: 3px 9px; }
.totnp-titleblk { text-align: center; margin-bottom: 16px; }
.totnp-titleblk .totnp-eptitle { font-size: 26px; white-space: normal; line-height: 1.05; }
.totnp-kick { font-family: 'IBM Plex Mono', monospace; font-size: 9.5px; font-weight: 600;
  letter-spacing: .16em; color: #2de2ff; }
.totnp-controls { position: relative; display: flex; align-items: center; justify-content: center; gap: 16px; margin: 16px 0 4px; }
.totnp-controls .totnp-play { width: 70px; height: 70px; font-size: 20px;
  background: linear-gradient(135deg, #a05cff, #7b3fe4); border: none;
  box-shadow: 0 10px 26px rgba(160,92,255,.38); }
.totnp-controls .totnp-play:hover { background: linear-gradient(135deg, #ad70ff, #8a4ff0); }
.totnp-controls .totnp-skip { width: 44px; height: 44px; }
/* Speed sits at the right edge, OUT of the flex centering, so back/play/fwd
   stay a symmetric triad with the play button dead-center. */
.totnp-controls .totnp-spd { position: absolute; right: 0; top: 50%; transform: translateY(-50%); }
.totnp-sec { font-family: 'IBM Plex Mono', monospace; font-size: 10px; letter-spacing: .2em;
  color: #2de2ff; border-bottom: 1px dashed rgba(160,92,255,.3); padding-bottom: 7px; margin: 22px 0 8px; }
.totnp-sec.gold { color: #e8b53a; border-color: rgba(232,181,58,.3); }

/* -------- responsive split + motion -------- */
.totnp-dock .totnp-skip { width: 38px; height: 38px; }
.totnp-dock .totnp-play { width: 44px; height: 44px; font-size: 14px; }
@media (max-width: 768px) { .totnp-dock, .totnp-panel { display: none !important; } }
@media (min-width: 769px) { .totnp-sheet { display: none !important; } }
@media (prefers-reduced-motion: reduce) {
  .totnp-panel, .totnp-sheet, .totnp-full { transition: none; }
}

/* ---- sound-reactive waveform strip (drawn by the analyser in totn-player.js;
   empty/invisible when the wave is unavailable) ---- */
.totnp-wave { display: block; width: 100%; height: 22px; margin-bottom: 6px; pointer-events: none; }
.totnp-sheet .totnp-wave { height: 30px; margin: 2px 0 8px; }
@media (prefers-reduced-motion: reduce) { .totnp-wave { display: none; } }
