/* The Library — extends carbon.css.
 *
 * The player is the only place this file gets opinionated. Everything else
 * borrows the desk's existing type and rules, because a shop page that looks
 * like a different product erodes the thing it is selling. */

.lib-head {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2.1rem, 5.6vw, 3.6rem);
  line-height: 0.98;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  margin: 0 0 var(--sp-lg);
  max-width: 18ch;
}

/* --- identity row --------------------------------------------------------- */
.who {
  display: flex; gap: var(--sp-md); align-items: flex-end; flex-wrap: wrap;
  margin-top: var(--sp-xl); padding-top: var(--sp-lg);
  border-top: 1px solid var(--carbon-edge);
}
.who .field { flex: 1 1 320px; max-width: 460px; }

/* --- tiers ---------------------------------------------------------------- */
.tiers {
  display: grid; gap: 1px; background: var(--carbon-edge);
  border: 1px solid var(--carbon-edge);
}
@media (min-width: 900px) { .tiers { grid-template-columns: repeat(3, 1fr); } }

.tier {
  background: var(--carbon); padding: clamp(20px, 3vw, 30px);
  display: flex; flex-direction: column; gap: var(--sp-sm);
}
.tier h3 {
  font-family: var(--display); font-size: clamp(1.1rem, 2.2vw, 1.4rem);
  text-transform: uppercase; letter-spacing: -0.02em; margin: 0; line-height: 1;
}
.t-top { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-md); }
.t-price {
  font-family: var(--mono); font-size: 1.3rem; font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em; white-space: nowrap;
}
.t-price small { font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--white-faint); margin-left: 5px; }
.tier > p { margin: 0; font-size: 14px; line-height: 1.6; color: var(--white-soft); }
.t-list { list-style: none; padding: 0; margin: var(--sp-xs) 0 0; display: grid; gap: 6px; font-size: 13px; color: var(--white-soft); }
.t-list li { display: flex; gap: 10px; align-items: baseline; }
.t-list li::before { content: ''; width: 4px; height: 4px; background: currentColor; flex: none; opacity: .55; }
.tier .btn { margin-top: auto; align-self: flex-start; }
.t-note {
  margin-top: auto; font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--white-ghost); padding-top: var(--sp-md);
}
.tier-earn { border-top: 2px solid var(--live); }

/* --- shelf ---------------------------------------------------------------- */
.shelf { display: grid; gap: 1px; background: var(--carbon-edge); border: 1px solid var(--carbon-edge); }
.row {
  background: var(--carbon); padding: clamp(16px, 2.4vw, 22px);
  display: grid; gap: var(--sp-sm) var(--sp-lg); align-items: center;
  grid-template-columns: 1fr auto;
}
.row:hover { background: var(--carbon-raised); }
.row h3 { margin: 0 0 5px; font-size: 1.06rem; letter-spacing: -0.012em; }
.row .meta {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--white-faint);
}
.row p { margin: 8px 0 0; font-size: 13.5px; color: var(--white-soft); max-width: 62ch; line-height: 1.55; }
.row-acts { display: flex; gap: var(--sp-xs); flex-wrap: wrap; justify-content: flex-end; }
.badge {
  font-family: var(--mono); font-size: 9px; letter-spacing: 0.14em; text-transform: uppercase;
  border: 1px solid var(--carbon-line); color: var(--white-faint);
  padding: 3px 7px; white-space: nowrap;
}
.badge.on { border-color: var(--live); color: var(--live); }

/* --- the stage ------------------------------------------------------------ */
.stage {
  position: relative; background: #000;
  border: 1px solid var(--carbon-line); overflow: hidden;
  aspect-ratio: 16 / 10; max-height: 74vh;
}
.stage video { width: 100%; height: 100%; display: block; object-fit: contain; background: #000; }

/* The watermark drifts so it cannot be cropped out of every frame, and sits
   above the video with pointer-events off so it never blocks the controls.
   Two of them, out of phase, so one is always over picture rather than
   letterbox. */
.wm {
  position: absolute; z-index: 3; pointer-events: none; user-select: none;
  font-family: var(--mono); font-size: clamp(10px, 1.35vw, 15px);
  letter-spacing: 0.06em; color: rgba(255, 255, 255, 0.34);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.65);
  white-space: nowrap;
  animation: drift 47s linear infinite;
  top: 12%; left: 6%;
}
.wm-2 { animation: drift2 61s linear infinite; opacity: 0.72; top: 68%; left: 55%; }

@keyframes drift {
  0%   { top: 10%; left: 5%; }
  25%  { top: 74%; left: 58%; }
  50%  { top: 42%; left: 22%; }
  75%  { top: 18%; left: 66%; }
  100% { top: 10%; left: 5%; }
}
@keyframes drift2 {
  0%   { top: 70%; left: 55%; }
  25%  { top: 22%; left: 12%; }
  50%  { top: 58%; left: 70%; }
  75%  { top: 80%; left: 30%; }
  100% { top: 70%; left: 55%; }
}
/* Reduced motion still gets a mark — it just stops moving. Removing it
   entirely would hand anyone a clean capture by flipping an OS setting. */
@media (prefers-reduced-motion: reduce) {
  .wm { animation: none; top: 8%; left: 6%; }
  .wm-2 { animation: none; top: 84%; left: 58%; }
}

.play-foot {
  display: flex; justify-content: space-between; gap: var(--sp-md);
  flex-wrap: wrap; margin-top: var(--sp-md);
}
.play-foot .fine { margin: 0; }

/* --- quests --------------------------------------------------------------- */
.quests { display: grid; gap: 1px; background: var(--carbon-edge); border: 1px solid var(--carbon-edge); }
@media (min-width: 860px) { .quests { grid-template-columns: repeat(3, 1fr); } }
.quest {
  background: var(--carbon); padding: clamp(18px, 2.6vw, 26px);
  display: flex; flex-direction: column; gap: 10px; text-align: left;
  border: 0; font: inherit; color: inherit; cursor: pointer;
  transition: background-color .3s var(--ease);
}
.quest:hover { background: var(--carbon-raised); }
.quest:focus-visible { outline: 2px solid var(--white); outline-offset: -3px; }
.quest h3 { margin: 0; font-size: 1.02rem; letter-spacing: -0.01em; }
.quest .blurb { margin: 0; font-size: 13.5px; color: var(--white-soft); line-height: 1.55; }
.quest .detail { margin: 0; font-size: 12.5px; color: var(--white-ghost); line-height: 1.5; }
.quest .pick {
  margin-top: auto; padding-top: var(--sp-sm);
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase;
}

.qlive {
  border: 1px solid var(--carbon-line); background: var(--carbon-raised);
  padding: clamp(18px, 3vw, 26px); margin-top: var(--sp-lg);
}
.qlive h3 { margin: 0 0 10px; font-family: var(--display); font-size: 1.2rem; text-transform: uppercase; letter-spacing: -0.02em; font-weight: 400; }
.qlive p { margin: 0 0 12px; font-size: 14.5px; color: var(--white-soft); max-width: 64ch; line-height: 1.6; }
.share {
  display: flex; gap: var(--sp-xs); flex-wrap: wrap; align-items: center;
  margin: var(--sp-md) 0;
}
.share input {
  flex: 1 1 320px; font-family: var(--mono); font-size: 13px;
  background: var(--carbon); border: 1px solid var(--carbon-line); color: var(--white);
  padding: 11px 13px;
}
.meter { display: flex; gap: 8px; margin: var(--sp-md) 0; }
.meter i {
  width: 100%; height: 4px; background: var(--carbon-line); display: block;
}
.meter i.on { background: var(--live); }
.qcode {
  font-family: var(--mono); font-size: 1.5rem; letter-spacing: 0.14em;
  color: var(--live); margin: var(--sp-sm) 0;
}

[hidden] { display: none !important; }
