/* ============================================================ APP SHELL
   Two-column workout console ported from ds/App.html (design system v0.4).
   The app is a separate surface from the marketing site: no marketing
   nav-links, just the brand + a storage/account cluster.
   ------------------------------------------------------------ */
body { background: var(--bg); }

.app-wrap {
  max-width: 1480px;
  margin: 0 auto;
  padding: 24px 32px 140px; /* extra bottom padding for the sticky player */
}
.app-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
  align-items: start;
}

/* ============================================================ NAV / account cluster */
.nav-app .nav-inner { max-width: 1480px; }
.account {
  display: inline-flex; align-items: center; gap: 12px;
}
.local-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 12px;
  border-radius: var(--r-pill);
  border: 1px solid var(--rule-2);
  font-family: var(--mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-2);
  background: var(--paper);
}
.local-pill .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
}
.local-pill.synced .dot { background: #2f9e44; }
.save-cloud {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 14px 8px 10px;
  border-radius: var(--r-pill);
  background: var(--ink);
  color: var(--bg);
  font-size: 13px;
  font-weight: 500;
  border: 0; cursor: pointer;
  font-family: var(--body);
  transition: background .12s ease, color .12s ease;
}
.save-cloud:hover { background: var(--accent); color: var(--accent-ink); }
.save-cloud .cloud-ic {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px;
}
.acct-email {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-2);
  letter-spacing: 0.04em;
  max-width: 180px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.link-btn {
  background: none; border: 0; cursor: pointer;
  font-family: var(--mono); font-size: 10.5px;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--muted);
}
.link-btn:hover { color: var(--accent); }

/* ============================================================ SIDEBAR */
.sidebar {
  background: var(--paper);
  border: 1px solid var(--rule-2);
  border-radius: var(--r-xl);
  padding: 20px 18px 16px;
  position: sticky;
  top: 88px;
}
.sb-section { padding: 0 4px 18px; }
.sb-section + .sb-section {
  padding-top: 18px;
  border-top: 1px dashed var(--rule-2);
}
.sb-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 12px;
}
.sb-head .label {
  font-family: var(--mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
}
.sb-head .add {
  font-family: var(--mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-2);
  cursor: pointer;
  background: none; border: 0;
}
.sb-head .add:hover { color: var(--accent); }

.rotation {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: 2px;
}
.rot-item {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 9px 10px;
  border-radius: var(--r-md);
  cursor: pointer;
  transition: background .1s ease;
  border: none;
  background: transparent;
  text-align: left;
  width: 100%;
  color: var(--ink);
  font-family: inherit;
}
.rot-item:hover { background: var(--bg-2); }
.rot-item.active { background: var(--ink); color: var(--bg); }
.rot-item .letter {
  width: 32px; height: 32px;
  border-radius: var(--r-sm);
  background: var(--bg-2);
  color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--display);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.02em;
}
.rot-item.active .letter { background: var(--accent); color: var(--accent-ink); }
.rot-item.done .letter {
  background: color-mix(in oklab, var(--accent) 18%, var(--paper));
  color: var(--accent);
}
.rot-item .body { min-width: 0; }
.rot-item .name {
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: -0.005em;
  display: block;
  line-height: 1.2;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.rot-item .focus {
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-top: 2px;
  display: block;
}
.rot-item.active .focus { color: var(--accent-2); }
.rot-item .meta { font-family: var(--mono); font-size: 10.5px; color: var(--muted); }
.rot-item.active .meta { color: var(--accent-2); }
.rot-item.done .meta { color: var(--accent); }
.rot-item .check {
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 8px;
}

.saved-empty {
  border: 1px dashed var(--rule-2);
  border-radius: var(--r-md);
  padding: 14px 12px;
  color: var(--ink-2);
  font-size: 12.5px;
  line-height: 1.4;
}
.saved-empty b { display: block; color: var(--ink); margin-bottom: 4px; font-family: var(--display); font-size: 13.5px; font-weight: 600; letter-spacing: -0.005em; }
.saved-empty a, .saved-empty .inline-link {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: 8px;
  display: inline-block;
  cursor: pointer;
  background: none; border: 0; padding: 0;
}

/* saved-session rows (Your Sessions) */
.saved-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.saved-row {
  display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center;
  padding: 8px 10px; border-radius: var(--r-md);
  background: var(--bg-2);
}
.saved-row .sv-name { font-size: 13px; font-weight: 500; letter-spacing: -0.005em; }
.saved-row .sv-sub { font-family: var(--mono); font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin-top: 2px; display: block; }
.saved-row .sv-del { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 13px; }
.saved-row .sv-del:hover { color: var(--accent); }

/* ============================================================ MAIN */
.main { min-width: 0; }

/* === Sleeve (album cover header for a session) === */
.sleeve {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 28px;
  align-items: end;
  padding: 28px;
  background: var(--paper);
  border: 1px solid var(--rule-2);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-md);
  margin-bottom: 18px;
  position: relative;
  overflow: hidden;
}
.sleeve-art {
  width: 280px; height: 280px;
  background: var(--ink);
  color: var(--bg);
  border-radius: var(--r-lg);
  padding: 22px;
  position: relative;
  display: flex; flex-direction: column; justify-content: space-between;
  overflow: hidden;
}
.sleeve-art::after {
  content: "";
  position: absolute;
  right: -180px; bottom: -180px;
  width: 420px; height: 420px;
  border-radius: 50%;
  background:
    radial-gradient(circle at center,
      transparent 0 78px, #ffffff08 78px 79px,
      transparent 79px 100px, #ffffff08 100px 101px,
      transparent 101px 130px, #ffffff08 130px 131px,
      transparent 131px 165px, #ffffff08 165px 166px,
      transparent 166px);
  pointer-events: none;
}
.sleeve-art .ar-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  font-family: var(--mono); font-size: 10.5px; text-transform: uppercase;
  letter-spacing: 0.16em;
  color: color-mix(in oklab, var(--bg) 60%, transparent);
  position: relative; z-index: 2;
}
.sleeve-art .ar-letter {
  font-family: var(--display); font-weight: 700; font-size: 168px;
  letter-spacing: -0.06em; line-height: 0.78; color: var(--accent-2);
  position: relative; z-index: 2;
}
.sleeve-art .ar-letter em { font-style: italic; font-weight: 500; color: var(--bg); }
.sleeve-art .ar-foot {
  display: flex; justify-content: space-between; align-items: baseline;
  font-family: var(--mono); font-size: 10.5px;
  color: color-mix(in oklab, var(--bg) 60%, transparent);
  text-transform: uppercase; letter-spacing: 0.14em;
  position: relative; z-index: 2;
}
.sleeve-art .ar-foot b { color: var(--bg); font-weight: 500; }

.sleeve-info { min-width: 0; }
.sleeve-info .eyebrow { margin-bottom: 14px; }
.sleeve-info h1 {
  font-family: var(--display); font-weight: 600;
  font-size: clamp(40px, 4.4vw, 64px);
  letter-spacing: -0.03em; line-height: 0.96;
  margin: 0 0 14px; text-wrap: balance;
}
.sleeve-info h1 em { font-style: italic; font-weight: 500; color: var(--accent); }
.sleeve-info .credits {
  display: flex; flex-wrap: wrap; gap: 8px 18px;
  font-family: var(--mono); font-size: 11.5px;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--muted); margin-bottom: 22px;
}
.sleeve-info .credits b { color: var(--ink); font-weight: 500; }
.sleeve-info .credits .sep { color: var(--rule-2); }
.sleeve-info .credits .cap-ok { color: #2f9e44; }
.sleeve-info .credits .cap-trim { color: var(--accent); }

.sleeve-cta { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-play-lg { padding: 16px 26px; font-size: 16px; font-weight: 500; }
.btn-play-lg .tri {
  border-left: 11px solid currentColor;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
}
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--rule-2); background: transparent;
  color: var(--ink); cursor: pointer;
  transition: border-color .12s ease, background .12s ease;
}
.icon-btn:hover { border-color: var(--ink); background: var(--bg-2); }
.icon-btn.heart.on { color: var(--accent); border-color: var(--accent); }
.icon-btn svg { width: 18px; height: 18px; }

/* ============================================================ TRACKLIST */
.tracklist {
  background: var(--paper);
  border: 1px solid var(--rule-2);
  border-radius: var(--r-xl);
  overflow: hidden;
}
.tl-head, .tl-row {
  display: grid;
  grid-template-columns: 36px 1fr 140px 80px 60px 44px;
  gap: 16px; align-items: center;
  padding: 12px 22px;
  border-bottom: 1px solid var(--rule);
}
.tl-head {
  font-family: var(--mono); font-size: 10.5px;
  text-transform: uppercase; letter-spacing: 0.14em; color: var(--muted);
}
.tl-head .center { text-align: center; }
.tl-row { transition: background .1s ease; position: relative; }
.tl-row:last-child { border-bottom: none; }
.tl-row:hover { background: var(--bg-2); }
.tl-row.playing { background: color-mix(in oklab, var(--accent) 5%, var(--paper)); }
.tl-row.playing::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0;
  width: 3px; background: var(--accent);
}
.tl-row.done .tl-name .title { color: var(--muted); }
.tl-row.done .tl-name .sub { color: var(--muted); }
.tl-row.section {
  background: var(--bg-2);
  border-bottom: 1px solid var(--rule-2);
  padding: 10px 22px;
  grid-template-columns: 36px 1fr auto;
}
.tl-row.section .num {
  font-family: var(--mono); font-size: 10.5px; color: var(--accent);
  letter-spacing: 0.14em; text-transform: uppercase;
}
.tl-row.section .label {
  font-family: var(--mono); font-size: 10.5px; text-transform: uppercase;
  letter-spacing: 0.16em; color: var(--accent); font-weight: 500;
}
.tl-row.section.cap .label, .tl-row.section.cap .num, .tl-row.section.cap .dur { color: var(--muted); }
.tl-row.section .dur {
  font-family: var(--mono); font-size: 11px; color: var(--accent); letter-spacing: 0.06em;
}
.tl-row.trimmed { opacity: 0.55; }

.tl-num-cell { font-family: var(--mono); font-size: 12px; color: var(--muted); position: relative; width: 36px; }
.tl-name { min-width: 0; }
.tl-name .title { font-size: 15px; font-weight: 500; letter-spacing: -0.005em; color: var(--ink); line-height: 1.2; }
a.title.tl-link { cursor: pointer; transition: color .12s ease; }
a.title.tl-link:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.tl-row.playing .tl-name .title { color: var(--accent); }
.tl-name .sub {
  display: block; font-family: var(--mono); font-size: 10.5px; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.1em; margin-top: 3px;
}
.tl-sets { font-family: var(--mono); font-size: 12.5px; color: var(--ink-2); letter-spacing: 0.02em; }
.tl-sets b { color: var(--ink); font-weight: 500; }

.tl-demos { display: inline-flex; gap: 4px; }
.demo-pill {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 26px;
  border: 1px solid var(--rule-2); border-radius: var(--r-sm);
  font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--ink-2); background: transparent; cursor: pointer;
  transition: border-color .12s ease, color .12s ease;
}
.demo-pill:hover { border-color: var(--accent); color: var(--accent); }

.tl-dur { font-family: var(--mono); font-size: 11.5px; color: var(--muted); text-align: right; }
.tl-row.playing .tl-dur { color: var(--ink); }

.tl-check {
  width: 22px; height: 22px; border-radius: 50%;
  border: 1.5px solid var(--rule-2); background: transparent; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  color: transparent; margin: 0 auto;
  transition: border-color .12s ease, background .12s ease, color .12s ease;
}
.tl-check:hover { border-color: var(--ink); }
.tl-row.done .tl-check { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.tl-check svg { width: 12px; height: 12px; }

/* ============================================================ side panels */
.side-cards { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; margin-top: 18px; }
.panel { background: var(--paper); border: 1px solid var(--rule-2); border-radius: var(--r-lg); padding: 20px 22px; }
.panel h3 { font-family: var(--display); font-weight: 600; font-size: 22px; letter-spacing: -0.015em; margin: 6px 0 4px; }
.panel .eyebrow { margin-bottom: 6px; }
.panel p { color: var(--ink-2); margin: 8px 0 0; line-height: 1.5; font-size: 14px; }

.upnext { margin-top: 14px; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px; background: var(--bg-2); border-radius: var(--r-md); }
.upnext .pair { display: flex; align-items: center; gap: 12px; }
.upnext .mini-letter {
  width: 44px; height: 44px; border-radius: var(--r-sm);
  background: var(--ink); color: var(--bg);
  font-family: var(--display); font-weight: 700; font-size: 22px; letter-spacing: -0.02em;
  display: inline-flex; align-items: center; justify-content: center;
}
.upnext .info .name { font-family: var(--display); font-weight: 600; font-size: 16px; letter-spacing: -0.01em; line-height: 1.15; }
.upnext .info .sub { font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); }
.upnext .btn { padding: 9px 14px; font-size: 12.5px; }

.logbook { margin-top: 12px; display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.logbook .lb { background: var(--bg-2); border-radius: var(--r-md); padding: 12px; }
.logbook .lb b { display: block; font-family: var(--display); font-weight: 700; font-size: 30px; letter-spacing: -0.025em; line-height: 0.95; }
.logbook .lb .k { font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin-top: 6px; display: block; }
.logbook .lb.accent b { color: var(--accent); }

/* ============================================================ NOW PLAYING bar */
.now { position: fixed; left: 0; right: 0; bottom: 0; background: var(--ink); color: var(--bg); border-top: 1px solid #ffffff14; z-index: 60; }
.now-inner { max-width: 1480px; margin: 0 auto; padding: 14px 32px; display: grid; grid-template-columns: 1fr 1.2fr 1fr; gap: 24px; align-items: center; }
.now-left { display: flex; align-items: center; gap: 14px; min-width: 0; }
.now-art {
  width: 56px; height: 56px; border-radius: var(--r-sm);
  background: var(--accent); color: var(--accent-ink);
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--display); font-weight: 700; font-size: 28px; letter-spacing: -0.04em; flex-shrink: 0;
}
.now-meta { min-width: 0; }
.now-meta .nm-title { font-family: var(--display); font-weight: 600; font-size: 17px; letter-spacing: -0.015em; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.now-meta .nm-sub { font-family: var(--mono); font-size: 10.5px; color: color-mix(in oklab, var(--bg) 55%, transparent); text-transform: uppercase; letter-spacing: 0.14em; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.now-center { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.now-controls { display: flex; align-items: center; gap: 14px; }
.ctrl { width: 32px; height: 32px; background: transparent; border: 0; color: color-mix(in oklab, var(--bg) 80%, transparent); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.ctrl:hover { color: var(--bg); }
.ctrl svg { width: 16px; height: 16px; }
.ctrl.play { width: 44px; height: 44px; border-radius: 50%; background: var(--bg); color: var(--ink); }
.ctrl.play:hover { background: var(--accent-2); color: var(--ink); }
.ctrl.play svg { width: 14px; height: 14px; }
.now-progress { display: flex; align-items: center; gap: 12px; width: 100%; font-family: var(--mono); font-size: 11px; color: color-mix(in oklab, var(--bg) 60%, transparent); letter-spacing: 0.04em; }
.bar { flex: 1; height: 3px; background: #ffffff18; border-radius: 999px; position: relative; overflow: hidden; }
.bar .fill { position: absolute; left: 0; top: 0; bottom: 0; width: 38%; background: var(--accent); border-radius: 999px; }

.now-right { display: flex; align-items: center; justify-content: flex-end; gap: 14px; }
.set-tracker { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px 7px 8px; border-radius: var(--r-pill); background: #ffffff10; border: 1px solid #ffffff18; font-family: var(--mono); font-size: 11px; color: color-mix(in oklab, var(--bg) 80%, transparent); text-transform: uppercase; letter-spacing: 0.12em; }
.rest-timer { display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px 8px 10px; border-radius: var(--r-pill); background: var(--accent); color: var(--accent-ink); font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; cursor: pointer; }
.rest-timer .clock { font-family: var(--display); font-size: 18px; font-weight: 600; letter-spacing: -0.02em; text-transform: none; }

/* ============================================================ toast */
.toast {
  position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%);
  background: var(--ink); color: var(--bg);
  padding: 12px 18px; border-radius: var(--r-pill);
  font-size: 13px; box-shadow: var(--shadow-lg); z-index: 80;
}

/* ============================================================ responsive */
@media (max-width: 1100px) {
  .app-grid { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .sleeve { grid-template-columns: 1fr; }
  .sleeve-art { width: 100%; height: 220px; }
  .sleeve-art .ar-letter { font-size: 120px; }
  .tl-head, .tl-row { grid-template-columns: 32px 1fr 80px 44px; }
  .tl-head .col-demos, .tl-row .tl-demos, .tl-head .col-dur, .tl-row .tl-dur { display: none; }
  .side-cards { grid-template-columns: 1fr; }
  .now-inner { grid-template-columns: 1fr auto; gap: 12px; padding: 10px 16px; }
  .now-center, .now-right .vol { display: none; }
  .account .acct-email { display: none; }
}
