/* Move Library pages (/library/, /bachata/…). Generated by scripts/library/build.js.
   The site's nav and footer come from landing.css; everything inside <main> mirrors the APP's light theme
   (lib/theme/app_colors.dart in the app repo) so the web library and the app's Discover look like one library. */
.lb {
  --page: #FAF9F8;          /* surfacePage */
  --card: #FFFFFF;          /* surfaceCard */
  --media: #EEECEA;         /* surfaceMedia */
  --subtle: #F3F1EE;        /* surfaceSubtle */
  --ink1: #1A1A1A;          /* primaryText */
  --ink2: #5C5751;          /* secondaryText */
  --ink3: #8A857E;          /* tertiaryText */
  --gold: #E3A018;          /* primary */
  --gold-dark: #CC8F15;     /* primaryDark */
  --tint: #FBF1DC;          /* accentTint */
  --tint-ink: #8A5E06;      /* accentInk */
  --tint-edge: #F0E2C4;     /* accentBorder */
  --hair: #ECEAE7;          /* borderHairline */
  --chrome: #16130D;        /* darkChrome */
  --ok-fill: #E4F6EC; --ok-ink: #13713F;
  background: var(--page);
  color: var(--ink1);
}
.lb .dz-nav { background: var(--page); }
.lb a { color: inherit; }
.lb a.lb-topic { color: #fff; }
.js-only { display: none; }
.js .js-only { display: flex; }
.lb-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }


.lb-main { max-width: 1080px; margin: 0 auto; padding: 20px 20px 40px; }
.lb-has-sticky { padding-bottom: 24px; }
.lb-with-bar .dz-footer { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }

.lb-eyebrow { margin: 4px 0 2px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink3); }
.lb-crumb { margin: 0 0 6px; font-size: 13px; color: var(--ink3); }
.lb-crumb a { color: var(--ink2); text-decoration: none; }
.lb-crumb a:hover { text-decoration: underline; }
.lb-h1 { margin: 0; font-size: 28px; line-height: 1.15; font-weight: 800; letter-spacing: -.4px; }
.lb-sub-h1 { margin: 6px 0 0; font-size: 14px; font-weight: 600; color: var(--ink2); }
.lb-meta { margin: 4px 0 0; font-size: 14px; font-weight: 600; color: var(--ink3); }
.lb-intro { margin: 10px 0 0; max-width: 640px; font-size: 16px; line-height: 1.5; color: var(--ink2); }
.lb-section { margin: 26px 0 12px; font-size: 22px; font-weight: 800; letter-spacing: -.2px; }
.lb-fine { margin: 18px 0 0; font-size: 13px; color: var(--ink3); }
.lb-fine a { color: var(--ink2); }
.lb-empty { margin: 24px 0; font-size: 15px; color: var(--ink2); }
.lb-linkbtn { border: 0; background: none; padding: 0; font: inherit; font-weight: 700; color: var(--ink1); text-decoration: underline; cursor: pointer; }

/* Style header: the app's "Bachata ⌄", drawn as an obvious button because on the web it's a stranger's first screen. */
.lb-style {
  display: inline-flex; align-items: center; gap: 8px;
  margin: 2px 0 0; padding: 6px 14px 6px 14px;
  border: 1px solid var(--hair); border-radius: 14px; background: var(--card);
  box-shadow: 0 1px 2px rgba(26, 26, 26, .06);
  font: 800 30px/1.15 var(--font-sans); letter-spacing: -.5px; color: var(--ink1); cursor: pointer;
}
.lb-style:hover { background: var(--subtle); }
.lb-caret { width: 16px; height: 16px; flex: 0 0 auto; }
.lb-style .lb-caret { width: 20px; height: 20px; color: var(--ink2); }

/* Pills: the app's SelectableChip — hollow by default, ink when narrowed. Never gold (gold is the page's verb). */
.lb-pills { gap: 8px; flex-wrap: wrap; margin: 14px 0 4px; }
.lb-pill {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px;
  padding: 0 14px; border: 1px solid #DCD8D3; border-radius: 999px; background: var(--card);
  font: 600 14px var(--font-sans); color: var(--ink1); cursor: pointer;
}
.lb-pill .lb-caret { width: 12px; height: 12px; }
.lb-pill.on { background: var(--ink1); border-color: var(--ink1); color: #fff; }

/* Moves by topic: the app's TopicCoverCard — a 3-frame cover with the title over it. */
.lb-topics { display: grid; grid-template-columns: 1fr; gap: 12px; }
.lb-topic {
  position: relative; display: block; height: 150px; border-radius: 16px; overflow: hidden;
  background: var(--chrome); text-decoration: none; color: #fff;
}
.lb-topic[hidden] { display: none; }
.lb-topic-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.lb-topic::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.18) 0%, rgba(0,0,0,.45) 45%, rgba(0,0,0,.82)); }
.lb-topic-text { position: absolute; left: 16px; right: 16px; bottom: 14px; z-index: 1; display: flex; flex-direction: column; gap: 2px; }
.lb-topic-title { text-shadow: 0 1px 3px rgba(0,0,0,.5); font-size: 20px; font-weight: 800; letter-spacing: -.2px; }
.lb-topic-meta { font-size: 14px; font-weight: 600; color: rgba(255,255,255,.78); }
.lb-topic:hover .lb-topic-title { text-decoration: underline; }

/* Topic page rows: the app's subtopic rows (#1436) — a bold title with its count, then a rail of covers. */
.lb-row { margin-top: 22px; scroll-margin-top: 90px; }
.lb-row[hidden] { display: none; }
.lb-row-title { margin: 0 0 10px; font-size: 18px; font-weight: 800; letter-spacing: -.2px; }
.lb-row-count { margin-left: 4px; font-size: 14px; font-weight: 600; color: var(--ink3); }
.lb-rail {
  display: flex; gap: 6px; overflow-x: auto; scroll-snap-type: x proximity;
  margin: 0 -20px; padding: 0 20px 4px; scroll-padding-inline: 20px; scrollbar-width: none;
}
.lb-rail::-webkit-scrollbar { display: none; }
.lb-tile {
  position: relative; flex: 0 0 132px; height: 176px; border-radius: 12px; overflow: hidden;
  background: var(--media); scroll-snap-align: start;
}
.lb-tile[hidden] { display: none; }
.lb-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lb-tile-play { position: absolute; left: 50%; top: 50%; width: 26px; height: 26px; transform: translate(-50%, -50%); color: var(--gold); filter: drop-shadow(0 1px 2px rgba(0,0,0,.45)); }
.lb-tile-play svg { width: 100%; height: 100%; }
.lb-tile:hover img { opacity: .9; }
.lb-grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.lb-grid3 .lb-tile { height: auto; aspect-ratio: 3 / 4; }
.lb-credits { margin-top: 34px; padding-top: 18px; border-top: 1px solid var(--hair); }
.lb-credits p { margin: 0; font-size: 14px; line-height: 1.7; color: var(--ink2); }
.lb-credits a { text-decoration: none; font-weight: 600; }
.lb-credits a:hover { text-decoration: underline; }

/* Sticky primary action — the app's gold button. */
.lb-sticky {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  padding: 14px 20px calc(10px + env(safe-area-inset-bottom));
  background: linear-gradient(rgba(250,249,248,0), var(--page) 40%);
  text-align: center;
}
.lb-sticky-row { display: flex; gap: 10px; align-items: center; max-width: 560px; margin: 0 auto; }
.lb-cta {
  display: flex; align-items: center; justify-content: center; width: 100%; max-width: 560px; margin: 0 auto;
  min-height: 50px; border-radius: 14px; background: var(--gold); color: #fff !important;
  font: 700 17px var(--font-sans); text-decoration: none; box-shadow: 0 6px 18px rgba(227,160,24,.28);
}
.lb-cta:hover { background: var(--gold-dark); }
.lb-cta-sub[hidden] { display: none; }
.lb-cta-sub { margin: 6px 0 0; font-size: 12.5px; color: var(--ink3); }
.lb-cta-sub a { color: var(--ink2); font-weight: 600; }
.lb-share {
  flex: 0 0 50px; height: 50px; border-radius: 14px; border: 1px solid var(--hair); background: var(--card);
  color: var(--ink1); cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.lb-share svg { width: 22px; height: 22px; }

/* Dropdown menu (style + level pickers): opens under its button; rows like the app's ChoiceSheet. */
.lb-sheet { position: fixed; inset: 0; z-index: 100; }
.lb-sheet[hidden] { display: none; }
.lb-sheet-scrim { position: absolute; inset: 0; background: transparent; }
.lb-sheet-panel {
  position: fixed; min-width: 240px; max-width: calc(100vw - 24px); padding: 6px;
  background: var(--card); border: 1px solid var(--hair); border-radius: 14px;
  box-shadow: 0 12px 32px rgba(26,26,26,.16), 0 2px 6px rgba(26,26,26,.06);
}
.lb-sheet-row {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 0 12px;
  border: 0; border-radius: 10px; background: none; text-align: left; text-decoration: none;
  font: 500 15px var(--font-sans); color: var(--ink1); cursor: pointer;
}
.lb-sheet-row:hover { background: var(--subtle); }
.lb-sheet-row > span:first-child { flex: 1; }
.lb-sheet-row[aria-pressed="true"] { background: var(--subtle); font-weight: 700; }
.lb-count { color: var(--ink3); font-weight: 500; min-width: 28px; text-align: right; }
.lb-check { width: 16px; height: 16px; visibility: hidden; }
.lb-sheet-row[aria-pressed="true"] .lb-check { visibility: visible; }
.lb-sheet-note { margin: 4px 0 2px; padding: 8px 12px 6px; border-top: 1px solid var(--hair); font-size: 14px; color: var(--ink3); }

/* Move page */
.lb-move-head { margin-bottom: 12px; }
.lb-credit { display: inline-flex; align-items: center; gap: 4px; min-height: 36px; margin-top: 4px; font-size: 14px; font-weight: 600; color: var(--ink2) !important; text-decoration: none; }
.lb-credit:hover { text-decoration: underline; }
.lb-move-h1 { font-size: 24px; }
.lb-level { display: inline-block; vertical-align: middle; margin-left: 6px; padding: 2px 10px; border-radius: 999px; background: var(--ok-fill); color: var(--ok-ink); font-size: 13px; font-weight: 700; letter-spacing: 0; }
.lb-player { max-width: 460px; }
.lb-stage { position: relative; height: max(240px, calc(100dvh - 430px)); max-height: 620px; border-radius: 16px; overflow: hidden; background: var(--chrome); }
.lb-stage video { width: 100%; height: 100%; object-fit: contain; display: block; background: var(--chrome); transition: transform 160ms ease; }
.lb-stage.mirrored video { transform: scaleX(-1); }
.lb-sound {
  position: absolute; right: 10px; top: 10px; min-height: 36px; padding: 0 14px; border: 0; border-radius: 999px;
  background: rgba(255,255,255,.92); font: 700 13px var(--font-sans); color: var(--ink1); cursor: pointer;
}
.lb-transport { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.lb-pp { flex: 0 0 40px; height: 40px; border-radius: 50%; border: 0; background: var(--ink1); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.lb-pp svg { width: 20px; height: 20px; }
.lb-progress { position: relative; flex: 1; height: 28px; cursor: pointer; touch-action: none; }
.lb-progress::before { content: ""; position: absolute; left: 0; right: 0; top: 12px; height: 4px; border-radius: 2px; background: var(--media); }
.lb-progress i { position: absolute; left: 0; top: 12px; height: 4px; width: 0; border-radius: 2px; background: var(--gold); }
.lb-loopband { position: absolute; top: 9px; height: 10px; border-radius: 3px; background: rgba(227,160,24,.25); border: 1.5px solid var(--gold); }
.lb-loopband[hidden] { display: none; }
.lb-time { font-size: 13px; font-weight: 600; color: var(--ink3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.lb-tools { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 10px; }
.lb-chip {
  display: inline-flex; align-items: center; justify-content: center; text-decoration: none;
  min-height: 44px; padding: 0 12px; border: 1px solid #DCD8D3; border-radius: 999px; background: var(--card);
  font: 600 14px var(--font-sans); color: var(--ink1); cursor: pointer;
}
.lb-chip.on, .lb-chip[aria-pressed="true"] { background: var(--ink1); border-color: var(--ink1); color: #fff; }
.lb-break { flex-basis: 100%; height: 0; }
.lb-loopbtn { min-width: 104px; }
.lb-chip.lb-next { margin-left: auto; font-weight: 700; }
.lb-chip.lb-next:hover { background: var(--subtle); }
.lb-move-info { margin-top: 18px; }
.lb-move-info .lb-row-title { margin-top: 22px; }
.lb-qr { display: none; }

@media (min-width: 700px) {
  .lb-topics { grid-template-columns: 1fr 1fr; }
  .lb-h1 { font-size: 34px; }
}
@media (min-width: 900px) {
  .lb-main { padding: 28px 40px 48px; }
  .lb-has-sticky { padding-bottom: 130px; }
  /* On a laptop, rows wrap instead of scrolling sideways, so nothing hides behind a swipe. */
  .lb-rail { flex-wrap: wrap; overflow: visible; margin: 0; padding: 0; gap: 8px; }
  .lb-tile { flex-basis: 150px; height: 200px; }
  .lb-move { display: grid; grid-template-columns: 420px 1fr; column-gap: 40px; align-items: start; }
  .lb-move-head { grid-column: 1 / -1; }
  .lb-move-h1 { font-size: 34px; }
  .lb-move-info { margin-top: 0; }
  .lb-stage { height: min(640px, calc(100vh - 300px)); min-height: 380px; }
  /* Desktop: the App Store's web page is a dead end, so the primary action is a QR code that opens this move on the phone. */
  .lb-qr {
    display: flex; gap: 16px; align-items: center; margin-top: 14px; padding: 14px;
    background: var(--card); border: 1px solid var(--hair); border-radius: 16px;
  }
  .lb-qr-code { flex: 0 0 104px; width: 104px; height: 104px; }
  .lb-qr-code svg { width: 100%; height: 100%; display: block; }
  .lb-qr span:last-child { display: flex; flex-direction: column; gap: 4px; }
  .lb-qr b { font-size: 16px; }
  .lb-qr small { font-size: 14px; color: var(--ink2); line-height: 1.4; }
  .lb-move-body .lb-sticky-move { display: none; }
  /* No app on a laptop: "Already have the app?" only makes sense on a phone (move pages use the QR instead). */
  .lb-open-app { display: none; }
  .lb-move-body .lb-has-sticky { padding-bottom: 48px; }
}

.lb-fail { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; margin: 0; color: #fff; font-weight: 600; }

/* One gold action per screen: on library pages the sticky bar is the verb, so the nav's
   "Get the app" stays outlined after scrolling instead of turning gold like on the home page. */
.lb .dz-nav.scrolled .dz-nav-cta { background: transparent; color: var(--ink1); }
.lb .dz-nav.scrolled .dz-nav-cta:hover { background: var(--subtle); }

/* Footer links: full 44px tap rows on a phone. */
@media (max-width: 768px) {
  .lb .dz-footer .links a { display: inline-flex; align-items: center; min-height: 44px; }
}
