/* Creago, the style library (library.html), version 5. Shared parts are in css/creago.css. */

.lb-top { position: relative; padding: 128px 0 0; isolation: isolate; overflow: hidden; }
.lb-top .wrap { display: grid; justify-items: center; }
.lb-head { margin-bottom: 26px; }
.lb-top .s-search { margin-bottom: 14px; }

/* the kinds stay under the top bar while the wall scrolls. Once stuck (js/library.js sets .stuck) a solid band runs
   the full width from the top of the screen down to a hairline, so nothing shows through */
.lb-tools { position: sticky; top: 74px; z-index: 30; padding: 10px 0; }
.lb-tools::before { content: ""; position: absolute; left: 0; right: 0; top: 0; bottom: 0; background: transparent; transition: background-color .2s; }
.lb-tools.stuck::before { top: -80px; background: #050507; -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); box-shadow: 0 1px 0 rgba(255, 255, 255, .08), 0 18px 30px -18px #000; }
.lb-tools-in { position: relative; display: grid; gap: 12px; justify-items: center; }
.s-search { position: relative; display: flex; align-items: center; width: min(520px, 100%); height: 52px; border-radius: 999px; background: rgba(255, 255, 255, .045); box-shadow: inset 0 0 0 1px var(--line-2); transition: box-shadow .2s; }
.s-search:focus-within { box-shadow: inset 0 0 0 1px rgba(168, 152, 255, .6), 0 0 0 4px rgba(255, 255, 255, .05); }
.s-search svg { position: absolute; left: 18px; width: 17px; height: 17px; fill: none; stroke: var(--t2); stroke-width: 1.6; stroke-linecap: round; }
.s-search input { width: 100%; height: 100%; padding: 0 20px 0 46px; border: 0; background: none; font: inherit; font-size: 16px; color: #fff; outline: none; }
.s-search input::placeholder { color: var(--t3); }
.s-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.s-chip { display: inline-flex; align-items: center; gap: 7px; height: 44px; padding: 0 16px; border-radius: 999px; font-size: 14.5px; font-weight: 600; color: var(--t1); background: var(--card); box-shadow: inset 0 0 0 1px var(--line); transition: background-color .2s, color .2s, box-shadow .2s; }
.s-chip span { font-size: 13px; font-weight: 600; color: var(--t3); font-variant-numeric: tabular-nums; }
.s-chip:hover { color: #fff; background: rgba(255, 255, 255, .07); }
.s-chip[aria-pressed="true"] { color: #09090b; background: #fff; box-shadow: none; }
.s-chip[aria-pressed="true"] span { color: rgba(0, 0, 0, .5); }
@media (max-width: 720px) {
  .lb-tools { top: 70px; }
  .s-chips { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; width: calc(100% + var(--gutter) * 2); margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter); scrollbar-width: none; }
  .s-chips::-webkit-scrollbar { display: none; }
  .s-chip { flex: none; }
  .s-search { height: 48px; }
}

.lb-body { padding-top: 22px; padding-bottom: 30px; }
/* every picture fills its card (17 Nov, third review: a small wide strip on a blurred band looked muddy). A tall or
   square original: a 4:5 card. A wide one: two columns wide on a computer, its height the same as a 4:5 card's, so
   the rows stay even; on a phone a 4:5 card cut from the middle. The opened style always plays the whole frame. */
.s-wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); grid-auto-flow: row dense; gap: 26px 16px; }
.s-tile[hidden] { display: none; }

.s-tile a { display: grid; grid-template-rows: auto auto 1fr; align-content: start; gap: 3px; min-width: 0; height: 100%; border-radius: 18px; }
.s-tile-pic { position: relative; display: block; container-type: inline-size; margin-bottom: 8px; padding: 4px; border-radius: 18px; background: linear-gradient(160deg, #2c2c32, #0d0d10 42%, #202025);
  box-shadow: 0 24px 40px -22px #000, inset 0 1px 0 rgba(255, 255, 255, .12); transition: transform .45s var(--spring), box-shadow .3s; }
.s-tile-pic::before { content: ""; display: block; aspect-ratio: 4 / 5; }
/* a computer: a wide card spans two columns; two 4:5 columns and the 16 px gap between them: (2w + 16) / 1.25w is
   about 1.65 at these widths. Below 1000 px (three columns or fewer) every card is 4:5, so no row is left half empty */
@media (min-width: 1001px) {
  .s-tile.s-wide { grid-column: span 2; }
  .s-wide .s-tile-pic::before { aspect-ratio: 33 / 20; }
}
.s-tile-pic img { position: absolute; inset: 4px; width: calc(100% - 8px); height: calc(100% - 8px); object-fit: cover; border-radius: 14px; background: #0c0c0f; }
.s-id { position: absolute; z-index: 2; left: 12px; top: 12px; padding: 2px 8px; border-radius: 7px; font-size: 12px; font-weight: 600; color: #fff; background: rgba(0, 0, 0, .58); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.s-mini-play { position: absolute; z-index: 2; right: 12px; top: 12px; width: 34px; height: 34px; border-radius: 50%; background: rgba(255, 255, 255, .16); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22); opacity: .9; transition: opacity .2s, transform .3s var(--spring); }
.s-mini-play::after { content: ""; position: absolute; left: 13px; top: 11px; border-style: solid; border-width: 6px 0 6px 10px; border-color: transparent transparent transparent #fff; }
/* on the picture, bottom left: the account, plain text on one line (17 Nov 2026: the credit sits on the thumbnail,
   never in the opened style). --n is the length of the name: the text gets smaller so the whole name fits */
.s-tile-pic::after { content: ""; position: absolute; z-index: 1; left: 4px; right: 4px; bottom: 4px; height: 42%; border-radius: 0 0 14px 14px; background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .5) 55%, rgba(0, 0, 0, .82)); pointer-events: none; }
.s-tile-h { position: absolute; z-index: 2; left: 14px; right: 12px; bottom: 12px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
  font-size: clamp(10px, calc((100cqi - 26px) / (var(--n, 16) * .62)), 13.5px); font-weight: 600; line-height: 1.3; color: #fff; text-shadow: 0 1px 8px rgba(0, 0, 0, .6); }
.s-tile-name { padding: 0 4px; font-size: 16px; font-weight: 700; letter-spacing: -0.015em; line-height: 1.3; color: #fff; text-wrap-style: pretty; }
/* under the name: the views */
.s-tile-by { display: grid; align-content: start; gap: 1px; min-width: 0; padding: 0 4px; font-size: 13.5px; line-height: 1.4; color: var(--t2); }
.s-tile-v { color: var(--t1); font-variant-numeric: tabular-nums; }
@media (hover: hover) and (pointer: fine) {
  .s-tile a:hover .s-tile-pic { transform: translateY(-5px); box-shadow: 0 34px 50px -24px #000, 0 0 44px -14px rgba(116, 88, 246, .45), inset 0 1px 0 rgba(255, 255, 255, .16); }
  .s-tile a:hover .s-mini-play { transform: scale(1.1); background: var(--btn-top); }
}
.s-empty { padding: 60px 0; text-align: center; color: var(--t2); }
@media (max-width: 720px) {
  .s-wall { grid-template-columns: 1fr 1fr; gap: 20px 10px; }
  .s-tile-pic { padding: 3px; border-radius: 14px; }
  .s-tile-pic img { inset: 3px; width: calc(100% - 6px); height: calc(100% - 6px); border-radius: 11px; }
  .s-tile-name { font-size: 14.5px; }
  .s-tile-by { font-size: 13px; }
  .s-mini-play { width: 28px; height: 28px; right: 8px; top: 8px; }
  .s-tile-pic::after { left: 3px; right: 3px; bottom: 3px; border-radius: 0 0 11px 11px; }
  .s-tile-h { left: 10px; right: 8px; bottom: 9px; font-size: clamp(10px, calc((100cqi - 18px) / (var(--n, 16) * .62)), 13px); }
  .s-mini-play::after { left: 11px; top: 9px; border-width: 5px 0 5px 8px; }
  .s-id { left: 8px; top: 8px; font-size: 12px; padding: 1px 6px; }
}
.lb-end .end-in { display: grid; justify-items: center; gap: 22px; text-align: center; }
.end-acts { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
@media (max-width: 520px) { .end-acts { width: 100%; flex-direction: column; } .end-acts .btn { width: 100%; } .lb-top { padding-top: 96px; } }

/* ---------- the opened style ---------- */
.s-viewer { width: min(1180px, calc(100% - 32px)); max-width: none; max-height: calc(100% - 32px); padding: 0; border: 0; border-radius: 26px; background: #0b0b0e; overflow: hidden;
  box-shadow: inset 0 0 0 1px var(--line-2), 0 50px 100px -30px #000; }
.s-viewer[open] { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(320px, 1fr); }
.s-v-media { display: grid; place-items: center; background: #000; min-height: 0; }
.s-v-media video { width: 100%; max-height: calc(100vh - 32px); background: #000; }
.s-v-info { display: flex; flex-direction: column; min-height: 0; max-height: calc(100vh - 32px); }
.s-v-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 22px 24px 10px; display: flex; flex-direction: column; gap: 14px; }
/* nothing in the words may shrink: the facts box (overflow hidden) used to be squeezed to no height on a phone, which
   cut its values off (17 Nov 2026); the box scrolls instead */
.s-v-scroll > * { flex-shrink: 0; }
/* the style's line and Close stay at the top while the words scroll (17 Nov, third review) */
.s-v-top { position: sticky; top: -22px; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: -22px -24px 0; padding: 18px 24px 8px; background: #0b0b0e; box-shadow: 0 1px 0 var(--line); }
.s-v-id { min-width: 0; line-height: 1.4; }
.s-viewer.quiet .s-v-x:focus-visible { outline: none; }
.s-v-id { font-size: 13.5px; font-weight: 600; color: var(--accent); }
.s-v-x { flex: none; width: 44px; height: 44px; margin: -6px -8px -6px 0; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .06); }
.s-v-x svg { width: 14px; height: 14px; stroke: #fff; stroke-width: 1.7; fill: none; stroke-linecap: round; }
.s-v-x:hover { background: rgba(255, 255, 255, .12); }
.s-v-title { font-size: 26px; font-weight: 800; letter-spacing: -0.04em; line-height: 1.12; color: #fff; }
.s-v-line { font-size: 15.5px; line-height: 1.55; color: var(--t1); }
.s-v-buy { margin-top: 10px; font-size: 14.5px; color: var(--t2); }
.s-req-label { font-size: 13.5px; font-weight: 600; color: var(--t2); margin-bottom: 8px; }
.s-req-box { display: grid; gap: 12px; padding: 14px; border-radius: 16px; background: rgba(255, 255, 255, .04); box-shadow: inset 0 0 0 1px var(--line); }
.s-req-text { font-family: var(--mono); font-size: 13.5px; line-height: 1.55; color: #fff; }
.s-req-box .btn { justify-self: start; }
.s-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin: 0; border-radius: 14px; overflow: hidden; background: var(--line); }
.s-facts div { padding: 10px 12px; background: #0e0e12; }
.s-facts dt { font-size: 12.5px; font-weight: 600; color: var(--t3); }
.s-facts dd { margin: 2px 0 0; font-size: 14px; font-weight: 600; color: #fff; }
.s-v-block h3 { font-size: 13px; font-weight: 600; color: var(--t2); margin-bottom: 4px; }
.s-v-block p { font-size: 15px; line-height: 1.55; color: var(--t1); }
.s-v-nav { display: flex; gap: 8px; padding: 12px 24px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
.s-v-nav .btn { flex: 1; gap: 8px; }
.s-v-arrow svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.s-copy-bar { display: none; }
/* a phone: the video takes at most 45% of the screen, the words scroll, and the bottom bar always holds the main
   action ("Copy the request") between two arrows */
@media (max-width: 860px) {
  .s-viewer { width: 100%; height: 100%; max-height: 100%; border-radius: 0; }
  .s-viewer[open] { grid-template-columns: none; grid-template-rows: auto minmax(0, 1fr); }
  .s-v-media { padding: 0; }
  .s-v-media video { width: 100%; max-height: 45vh; max-height: 45svh; }
  .s-v-info { max-height: none; }
  .s-v-scroll { padding: 16px 16px 14px; gap: 12px; }
  .s-v-top { top: -16px; margin: -16px -16px 0; padding: 12px 16px 8px; }
  .s-v-title { font-size: 22px; }
  .s-copy-in { display: none; }
  .s-v-nav { padding: 10px 16px calc(12px + env(safe-area-inset-bottom)); }
  .s-v-nav .s-v-arrow { flex: none; width: 48px; height: 48px; padding: 0; }
  .s-v-arrow span { display: none; }
  .s-copy-bar { display: inline-flex; flex: 1; height: 48px; }
}
