/* My Party Rocks members — black / white / yellow.
   Signature: chapter list as a strip of show tickets. */

:root {
  --ink: #101010;
  --paper: #ffffff;
  --spark: #ffd400;
  --spark-deep: #e0a800;
  --smoke: #6b6b6b;
  --line: #e8e8e8;
  --radius: 14px;
  --display: "Bricolage Grotesque", system-ui, sans-serif;
  --body: "Instrument Sans", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--body);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  padding-bottom: 84px; /* bottom nav clearance */
}

.display {
  font-family: var(--display);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.02em;
  font-size: clamp(2rem, 7vw, 3.2rem);
  margin: 0 0 0.5em;
}

/* Top bar */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: var(--ink); color: var(--paper);
  padding: 14px 18px calc(14px);
}
.brand { font-family: var(--display); font-weight: 700; letter-spacing: 0.06em; font-size: 0.95rem; }
.brand-star { color: var(--spark); }
.brand-tag { color: var(--spark); font-size: 0.7rem; vertical-align: super; margin-left: 4px; }
.topbar-progress { height: 4px; background: #333; margin: 10px -18px -14px; }
.topbar-progress > div { height: 100%; background: var(--spark); transition: width .4s ease; }

/* Views */
.view { max-width: 640px; margin: 0 auto; padding: 28px 20px 40px; }
.page-head { margin-bottom: 24px; }
.eyebrow {
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--smoke); margin: 0 0 8px;
}
.lede { color: var(--smoke); font-size: 1.02rem; line-height: 1.5; }
.section-title { font-family: var(--display); font-weight: 700; font-size: 1.15rem; margin: 32px 0 12px; }
.hint { color: var(--smoke); font-size: 0.88rem; }

/* Forms & buttons */
.stack { display: flex; flex-direction: column; gap: 12px; }
label, .label { font-size: 0.8rem; font-weight: 600; letter-spacing: 0.04em; color: var(--smoke); }
.value { font-size: 1.05rem; font-weight: 600; margin-top: 2px; }
input, textarea {
  font: inherit; padding: 14px; border: 2px solid var(--ink);
  border-radius: var(--radius); width: 100%;
}
input:focus-visible, textarea:focus-visible, button:focus-visible {
  outline: 3px solid var(--spark); outline-offset: 2px;
}
.code-input { letter-spacing: 0.5em; font-size: 1.4rem; text-align: center; font-weight: 700; }

.btn {
  font: inherit; font-weight: 600; cursor: pointer;
  padding: 14px 18px; border-radius: var(--radius);
  border: 2px solid var(--ink); background: var(--paper); color: var(--ink);
  transition: transform .06s ease;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--spark); border-color: var(--ink); }
.btn-primary:hover { background: var(--spark-deep); }
.btn-ghost { border-color: var(--line); color: var(--smoke); background: transparent; }
.btn-wide { width: 100%; font-size: 1.05rem; }
.back-btn { margin-bottom: 12px; }
.form-msg { min-height: 1.2em; font-size: 0.9rem; font-weight: 600; }
.form-msg.err { color: #c0392b; }
.form-msg.ok { color: #1e7d32; }

/* Login */
.login-card { padding-top: 8vh; }

/* Library progress marquee */
.marquee-progress {
  height: 14px; border: 2px solid var(--ink); border-radius: 999px;
  overflow: hidden; margin: 18px 0 6px;
  background: repeating-linear-gradient(-45deg, var(--paper) 0 8px, var(--line) 8px 16px);
}
.marquee-fill { height: 100%; width: 0; background: var(--spark); transition: width .5s ease; }
.progress-label { font-size: 0.85rem; color: var(--smoke); margin: 0; }

/* Ticket strip (signature) */
.tickets { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.ticket {
  display: flex; align-items: center; gap: 14px;
  border: 2px solid var(--ink); border-radius: var(--radius);
  padding: 14px 16px; cursor: pointer; background: var(--paper);
  position: relative;
  transition: background .12s ease;
}
.ticket::before, .ticket::after { /* punched notches */
  content: ""; position: absolute; width: 14px; height: 14px; border-radius: 50%;
  background: var(--paper); border: 2px solid var(--ink); top: 50%;
}
.ticket::before { left: -9px; transform: translateY(-50%); clip-path: inset(0 0 0 50%); border-left: none; }
.ticket::after  { right: -9px; transform: translateY(-50%); clip-path: inset(0 50% 0 0); border-right: none; }
.ticket:hover { background: #fffbe0; }
.ticket .num {
  font-family: var(--display); font-weight: 800; font-size: 1.2rem;
  min-width: 2ch; text-align: center;
}
.ticket .t-title { font-weight: 600; flex: 1; }
.ticket .t-state { font-size: 1.1rem; }
.ticket.done { background: var(--spark); }
.ticket.done:hover { background: var(--spark-deep); }

/* Reader */
.chapter-body { font-size: 1.05rem; line-height: 1.65; }
.chapter-body p { margin: 0 0 1em; }
.reader-nav { margin-top: 28px; }

/* Coaching cards */
.card {
  border: 2px solid var(--ink); border-radius: var(--radius); padding: 14px 16px;
  display: flex; flex-direction: column; gap: 8px;
}
.card .when { font-size: 0.85rem; color: var(--smoke); font-weight: 600; }
.card a.zoom { font-weight: 700; color: var(--ink); }
.player { margin-top: 14px; }
.player video { width: 100%; border-radius: var(--radius); border: 2px solid var(--ink); background: #000; }

/* Account */
.account-card { border: 2px solid var(--ink); border-radius: var(--radius); padding: 18px; }

/* Bottom nav */
.bottomnav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 20;
  display: flex; background: var(--ink);
  padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
  gap: 6px;
}
.bottomnav button {
  flex: 1; font: inherit; font-weight: 600; padding: 12px 0;
  background: transparent; color: #bdbdbd; border: none; border-radius: 10px; cursor: pointer;
}
.bottomnav button.active { background: var(--spark); color: var(--ink); }

.empty { color: var(--smoke); font-size: 0.95rem; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
