/* ==========================================================================
   NOCTURN — components
   Controls · media cards · shelves · chrome (header, drawer, tab bar,
   footer) · overlays (menu, modal, toast, age gate) · feedback
   ========================================================================== */

/* ==========================================================================
   1. Buttons
   ========================================================================== */
.btn {
  --h: 44px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  height: var(--h);
  padding: 0 20px;
  border-radius: var(--r-pill);
  border: 1px solid transparent;
  font: 500 14px/1 var(--f-ui);
  white-space: nowrap;
  user-select: none;
  transition: background-color var(--d-fast) var(--ease), border-color var(--d-fast) var(--ease),
    color var(--d-fast) var(--ease), filter var(--d-fast) var(--ease), transform var(--d-fast) var(--ease);
}
.btn .icon { width: 18px; height: 18px; }
.btn:active { transform: scale(.975); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .42; pointer-events: none; }

.btn--primary { background: var(--c-accent); color: var(--c-accent-ink); }
.btn--primary:hover { background: var(--c-accent-hover); }

.btn--secondary { background: var(--c-card); border-color: var(--c-line); color: var(--c-text); }
.btn--secondary:hover { border-color: var(--c-line-strong); background: var(--c-card-hover); }

.btn--outline { background: transparent; border-color: var(--c-line); color: var(--c-text); }
.btn--outline:hover { border-color: var(--c-line-strong); }

.btn--ghost { background: transparent; color: var(--c-text-2); padding-inline: 12px; }
.btn--ghost:hover { color: var(--c-text); }

.btn--white { background: var(--c-on); color: var(--c-ink); }
.btn--white:hover { background: var(--c-on-hover); }

.btn--glass {
  background: rgba(255, 255, 255, .1);
  border-color: var(--c-tint-1);
  color: #fff;
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
}
.btn--glass:hover { background: var(--c-tint-3); }

.btn--danger { background: transparent; border-color: rgba(240, 105, 109, .4); color: var(--c-danger); }
.btn--danger:hover { background: var(--c-danger-soft); }

.btn--xs { --h: 30px; padding: 0 12px; font-size: 12px; gap: 6px; }
.btn--xs .icon { width: 14px; height: 14px; }
.btn--sm { --h: 36px; padding: 0 15px; font-size: 12.5px; gap: 7px; }
.btn--sm .icon { width: 16px; height: 16px; }
.btn--lg { --h: 50px; padding: 0 26px; font-size: 15px; }
.btn--block { width: 100%; }

/* Toggle buttons render both states; aria-pressed picks one */
.when-on, .when-off { display: inline-flex; align-items: center; gap: inherit; }
[aria-pressed="true"] > .when-off,
[aria-pressed="false"] > .when-on,
:not([aria-pressed]) > .when-on { display: none; }

/* Saved states read as a quiet amber signal; “Following” stays neutral so
   a screen never lights up with several accents at once */
.btn[data-action="save-collection"][aria-pressed="true"],
.btn[data-action="fav"][aria-pressed="true"] {
  background: transparent;
  border-color: var(--c-accent-line);
  color: var(--c-accent);
}
.btn[data-action="follow"][aria-pressed="true"] {
  background: var(--c-surface);
  border-color: var(--c-line);
  color: var(--c-text-2);
}
.btn[data-action="follow"][aria-pressed="true"]:hover { color: var(--c-text); border-color: var(--c-line-strong); }

/* Icon buttons */
.icon-btn {
  --s: 38px;
  position: relative;
  display: inline-grid;
  place-items: center;
  flex: none;
  width: var(--s);
  height: var(--s);
  border-radius: 50%;
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  color: var(--c-text-2);
  transition: color var(--d-fast) var(--ease), border-color var(--d-fast) var(--ease), background-color var(--d-fast) var(--ease);
}
.icon-btn:hover { color: var(--c-text); border-color: var(--c-line-strong); }
.icon-btn:disabled { opacity: .35; }
.icon-btn .icon { width: 18px; height: 18px; }
.icon-btn--sm { --s: 32px; }
.icon-btn--sm .icon { width: 16px; height: 16px; }
.icon-btn--lg { --s: 46px; }
.icon-btn--ghost { background: transparent; border-color: transparent; }
.icon-btn--ghost:hover { background: var(--c-hover); border-color: transparent; }
.icon-btn--glass {
  background: rgba(8, 8, 8, .45);
  border-color: var(--c-tint-2);
  color: #fff;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.icon-btn--glass:hover { background: rgba(8, 8, 8, .65); border-color: rgba(255, 255, 255, .28); }
.icon-btn[aria-pressed="true"] { color: var(--c-text); border-color: var(--c-line-strong); background: var(--c-card-hover); }

.dot-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: var(--c-accent);
  color: var(--c-accent-ink);
  font: 600 9.5px/1 var(--f-ui);
  box-shadow: 0 0 0 2px var(--c-bg);
}

/* ==========================================================================
   2. Chips, tags, badges
   ========================================================================== */
.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  flex: none;
  height: 36px;
  padding: 0 16px;
  border-radius: var(--r-pill);
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  color: var(--c-text-2);
  font: 500 12.5px/1 var(--f-ui);
  white-space: nowrap;
  transition: color var(--d-fast) var(--ease), border-color var(--d-fast) var(--ease), background-color var(--d-fast) var(--ease);
}
.chip:hover { color: var(--c-text); border-color: var(--c-line-strong); }
.chip.is-active, .chip[aria-pressed="true"], .chip[aria-checked="true"] {
  background: var(--c-on);
  border-color: var(--c-on);
  color: var(--c-ink);
}
.chip .icon { width: 14px; height: 14px; }
.chip__count { font: 400 9.5px/1 var(--f-mono); color: var(--c-text-3); letter-spacing: .04em; }
.chip.is-active .chip__count, .chip[aria-pressed="true"] .chip__count { color: rgba(10, 10, 10, .55); }
.chip--sm { height: 30px; padding: 0 12px; font-weight: 400; font-size: 12px; }
.chip--tag::before { content: '#'; color: var(--c-text-4); margin-right: -3px; }
.chip--remove { padding-right: 8px; }
.chip--remove .icon { opacity: .75; }

/* Touch targets. A 36px pill reads well under a cursor; a finger needs 44.
   The control itself grows rather than carrying an invisible 44px pad,
   because the filter rows wrap with an 8px gutter — overhanging pads from
   two rows would overlap by 6px and neighbouring chips would fight over the
   same tap. Coarse pointers get it wherever they are; narrow viewports get
   it too, which is also what makes it testable in a desktop browser. */
@media (pointer: coarse), (max-width: 767px) {
  .chip, .chip--sm { height: 44px; }
  .chip--sm { padding: 0 14px; }
  .tab { min-height: 44px; }
}

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips--scroll {
  flex-wrap: nowrap;
  overflow-x: auto;
  margin-inline: calc(var(--gutter) * -1);
  padding-inline: var(--gutter);
  scroll-padding-inline: var(--gutter);
  scrollbar-width: none;
}
.chips--scroll::-webkit-scrollbar { display: none; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 20px;
  padding: 0 6px;
  border-radius: var(--r-xs);
  background: rgba(8, 8, 8, .78);
  color: var(--c-text);
  font: 500 10px/1 var(--f-mono);
  letter-spacing: .04em;
  white-space: nowrap;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.badge--accent { background: var(--c-accent); color: var(--c-accent-ink); }
.badge--muted { color: var(--c-text-2); }
.badge--new { color: var(--c-accent); }
.badge--outline { background: transparent; border: 1px solid var(--c-line); color: var(--c-text-2); backdrop-filter: none; }

.pill-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 9px;
  border-radius: var(--r-pill);
  border: 1px solid var(--c-line);
  font: 400 9.5px/1 var(--f-mono);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--c-accent);
}

.verified { color: var(--c-text); display: inline-block; vertical-align: -2px; }
.verified .icon { width: 15px; height: 15px; }

.kbd {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border: 1px solid var(--c-line);
  border-radius: var(--r-xs);
  font: 400 10px/1 var(--f-mono);
  color: var(--c-text-2);
}

/* ==========================================================================
   3. Tabs & segmented control
   ========================================================================== */
.tabs {
  display: flex;
  gap: clamp(18px, 2.2vw, 30px);
  border-bottom: 1px solid var(--c-line-soft);
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  position: relative;
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 2px 2px 13px;
  color: var(--c-text-2);
  font: 500 14.5px/1 var(--f-display);
  letter-spacing: -.005em;
  transition: color var(--d-fast) var(--ease);
}
.tab:hover { color: var(--c-text); }
.tab[aria-selected="true"] { color: var(--c-text); }
.tab[aria-selected="true"]::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  border-radius: 2px;
  background: var(--c-accent);
}
.tab__count { font: 400 10px/1 var(--f-mono); color: var(--c-text-3); letter-spacing: .06em; }

.segmented {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border-radius: var(--r-pill);
  background: var(--c-surface);
  border: 1px solid var(--c-line);
}
.segmented button {
  height: 30px;
  padding: 0 14px;
  border-radius: var(--r-pill);
  color: var(--c-text-2);
  font: 500 12.5px/1 var(--f-ui);
  white-space: nowrap;
  transition: color var(--d-fast) var(--ease), background-color var(--d-fast) var(--ease);
}
.segmented button:hover { color: var(--c-text); }
.segmented button[aria-pressed="true"] {
  background: var(--c-card-hover);
  color: var(--c-text);
  box-shadow: inset 0 0 0 1px var(--c-line), 0 1px 2px rgba(0, 0, 0, .4);
}
.segmented--icons button { width: 34px; padding: 0; display: grid; place-items: center; }
.segmented--icons .icon { width: 16px; height: 16px; }

/* ==========================================================================
   4. Form controls
   ========================================================================== */
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field__label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  font: 500 13px/1.2 var(--f-ui);
  color: var(--c-text);
}
.field__label .dim { font-weight: 400; font-size: 12px; }
.field__hint { font-size: 12px; line-height: 1.45; color: var(--c-text-3); }
.field__error { font-size: 12px; color: var(--c-danger); }
.field.is-invalid .input { border-color: rgba(240, 105, 109, .6); }

.input, .select, .textarea {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid var(--c-line);
  background: var(--c-surface);
  color: var(--c-text);
  font: 400 14px/1.2 var(--f-ui);
  transition: border-color var(--d-fast) var(--ease), box-shadow var(--d-fast) var(--ease);
}
.input:hover, .select:hover, .textarea:hover { border-color: var(--c-line-hover); }
.input:focus, .select:focus, .textarea:focus { border-color: var(--c-line-strong); box-shadow: var(--ring); outline: none; }
.textarea { height: auto; min-height: 112px; padding: 12px 14px; line-height: 1.55; resize: vertical; }
.select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23A6A39E' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
}
.select option { background: var(--c-surface); color: var(--c-text); }

.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap > .icon { position: absolute; left: 14px; color: var(--c-text-3); pointer-events: none; }
.input-wrap > .input { padding-left: 42px; }
.input-wrap > .input-wrap__end { position: absolute; right: 6px; }
.input-prefix {
  position: absolute;
  left: 14px;
  color: var(--c-text-3);
  pointer-events: none;
}
.input-wrap > .input-prefix + .input { padding-left: 32px; }

/* Switch — “on” is white, like the active chip; amber stays a signal */
.switch {
  position: relative;
  display: inline-flex;
  flex: none;
  width: 44px;
  height: 26px;
  cursor: pointer;
}
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch__track {
  width: 100%;
  height: 100%;
  border-radius: 13px;
  background: var(--c-line);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .04);
  transition: background-color var(--d-base) var(--ease);
}
.switch__track::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--c-text-3);
  transition: transform var(--d-base) var(--ease), background-color var(--d-base) var(--ease);
}
.switch input:checked + .switch__track { background: var(--c-on); }
.switch input:checked + .switch__track::after { transform: translateX(18px); background: var(--c-ink); }
.switch input:focus-visible + .switch__track { outline: 2px solid var(--c-accent); outline-offset: 3px; }
.switch--sm { width: 36px; height: 22px; }
.switch--sm .switch__track::after { width: 16px; height: 16px; }
.switch--sm input:checked + .switch__track::after { transform: translateX(14px); }

/* Checkbox & radio */
.check, .radio {
  position: relative;
  display: inline-flex;
  align-items: flex-start;
  gap: 11px;
  cursor: pointer;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--c-text);
}
.check input, .radio input { position: absolute; opacity: 0; width: 18px; height: 18px; margin: 0; cursor: pointer; }
.check__box, .radio__dot {
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  display: grid;
  place-items: center;
  border: 1.5px solid var(--c-line-control);
  background: var(--c-surface);
  transition: background-color var(--d-fast) var(--ease), border-color var(--d-fast) var(--ease);
}
.check__box { border-radius: 5px; }
.check__box .icon { width: 12px; height: 12px; color: var(--c-ink); opacity: 0; transform: scale(.6); transition: transform var(--d-fast) var(--ease), opacity var(--d-fast); }
.check input:checked + .check__box { background: var(--c-on); border-color: var(--c-on); }
.check input:checked + .check__box .icon { opacity: 1; transform: none; }
.radio__dot { border-radius: 50%; }
.radio__dot::after { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--c-ink); transform: scale(0); transition: transform var(--d-fast) var(--ease); }
.radio input:checked + .radio__dot { background: var(--c-on); border-color: var(--c-on); }
.radio input:checked + .radio__dot::after { transform: scale(1); }
.check input:focus-visible + .check__box, .radio input:focus-visible + .radio__dot { outline: 2px solid var(--c-accent); outline-offset: 2px; }
.check:hover .check__box, .radio:hover .radio__dot { border-color: var(--c-line-strong); }
.check__text small, .radio__text small { display: block; color: var(--c-text-3); font-size: 12px; }

/* Range */
.range {
  --p: 50%;
  width: 100%;
  height: 20px;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  cursor: pointer;
}
.range::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--c-text) var(--p), var(--c-line) var(--p));
}
.range::-moz-range-track { height: 4px; border-radius: 4px; background: var(--c-line); }
.range::-moz-range-progress { height: 4px; border-radius: 4px; background: var(--c-on); }
.range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  margin-top: -6px;
  border-radius: 50%;
  background: var(--c-on);
  box-shadow: 0 0 0 4px rgba(245, 245, 246, .12);
}
.range::-moz-range-thumb { width: 16px; height: 16px; border: 0; border-radius: 50%; background: var(--c-on); }

/* Setting row: label + control */
.setting {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 0;
  border-bottom: 1px solid var(--c-line-soft);
}
.setting:last-child { border-bottom: 0; }
.setting__text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.setting__title { font: 500 14px/1.3 var(--f-ui); }
.setting__desc { font-size: 12.5px; line-height: 1.5; color: var(--c-text-3); max-width: 520px; }

/* ==========================================================================
   5. Avatars
   ========================================================================== */
.avatar {
  --s: 40px;
  position: relative;
  flex: none;
  display: inline-grid;
  place-items: center;
  width: var(--s);
  height: var(--s);
  border-radius: 50%;
  overflow: hidden;
  background: var(--c-card);
  box-shadow: inset 0 0 0 1px var(--c-glass-line);
  color: var(--c-text);
  font: 500 calc(var(--s) * .36)/1 var(--f-display);
  letter-spacing: .02em;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar::after { content: ''; position: absolute; inset: 0; border-radius: 50%; box-shadow: inset 0 0 0 1px var(--c-glass-line); pointer-events: none; }
.avatar--xs { --s: 24px; }
.avatar--sm { --s: 32px; }
.avatar--md { --s: 40px; }
.avatar--lg { --s: 56px; }
.avatar--xl { --s: 88px; }
.avatar--xxl { --s: clamp(92px, 9vw, 128px); }
.avatar--initials { background: linear-gradient(140deg, var(--a1, #3A2A1E), var(--a2, var(--c-card))); }

/* ==========================================================================
   6. Media art helpers
   ========================================================================== */
.art {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: var(--c-card);
}
body.is-discreet .card__art,
body.is-discreet .tile__art,
body.is-discreet .hero__media img,
body.is-discreet .collection-card__cover > img,
body.is-discreet .spotlight__media img {
  filter: blur(22px) saturate(.5) brightness(.8);
  transform: scale(1.15);
}
body.is-discreet .card:hover .card__art,
body.is-discreet .tile:hover .tile__art {
  filter: none;
  transform: scale(1.04);
}

/* ==========================================================================
   7. Video card
   ========================================================================== */
.card { position: relative; display: flex; flex-direction: column; gap: 11px; min-width: 0; }

.card__media {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--r-m);
  overflow: hidden;
  background: var(--c-card);
  isolation: isolate;
}
.card__media::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .07);
  pointer-events: none;
  transition: box-shadow var(--d-base) var(--ease);
  z-index: 3;
}
.card:hover .card__media::after { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .2); }

.card__cover { position: absolute; inset: 0; display: block; }
.card__cover:focus-visible { outline-offset: -2px; border-radius: inherit; }
.card__art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform-origin: 60% 45%;
  transition: transform 700ms var(--ease), filter 400ms var(--ease);
}
.card:hover .card__art { transform: scale(1.045); }

.card__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, var(--c-shade-1) 0%, var(--c-shade-0) 28%, var(--c-shade-0) 62%, var(--c-shade-2) 100%);
  opacity: 0;
  transition: opacity var(--d-base) var(--ease);
}
.card:hover .card__shade, .card.has-progress .card__shade { opacity: 1; }

.card__tl, .card__tr, .card__bl, .card__br { position: absolute; z-index: 2; display: flex; gap: 5px; }
.card__tl { top: 9px; left: 9px; }
.card__tr { top: 9px; right: 9px; }
.card__bl { bottom: 9px; left: 9px; }
.card__br { bottom: 9px; right: 9px; }
.card.has-progress .card__bl, .card.has-progress .card__br { bottom: 12px; }

.card__progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: var(--c-tint-3);
  z-index: 2;
}
.card__progress i { display: block; height: 100%; background: var(--c-accent); border-radius: 0 2px 2px 0; }

/* Hover preview — the thumbnail “plays” */
.card__preview {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 8px;
  height: 2px;
  border-radius: 2px;
  background: var(--c-tint-4);
  z-index: 2;
  opacity: 0;
  transition: opacity var(--d-base) var(--ease);
  overflow: hidden;
}
.card__preview i { display: block; width: 100%; height: 100%; background: #fff; transform-origin: left; transform: scaleX(0); }
.card__live {
  position: absolute;
  top: 9px;
  left: 9px;
  z-index: 2;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity var(--d-base) var(--ease), transform var(--d-base) var(--ease);
}
.card.is-previewing .card__art { animation: card-preview 8s linear forwards; }
.card.is-previewing .card__preview { opacity: 1; }
.card.is-previewing .card__preview i { animation: preview-bar 8s linear forwards; }
.card.is-previewing .card__live { opacity: 1; transform: none; }
.card.is-previewing .card__br, .card.is-previewing .card__tl { opacity: 0; }
.card.is-previewing.has-progress .card__progress { opacity: 0; }

@keyframes card-preview {
  0% { transform: scale(1.045) translate3d(0, 0, 0); filter: brightness(1); }
  30% { filter: brightness(1.12) saturate(1.1); }
  60% { filter: brightness(.96); }
  100% { transform: scale(1.2) translate3d(-3%, 2%, 0); filter: brightness(1.08); }
}
@keyframes preview-bar { to { transform: scaleX(1); } }

/* Quick actions on hover (desktop) */
.card__quick {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 4;
  display: flex;
  flex-direction: column;
  gap: 6px;
  opacity: 0;
  transform: translateX(4px);
  transition: opacity var(--d-base) var(--ease), transform var(--d-base) var(--ease);
}
.card:hover .card__quick, .card:focus-within .card__quick { opacity: 1; transform: none; }
.card:hover .card__tr { opacity: 0; }
.quick-btn {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(8, 8, 8, .62);
  border: 1px solid var(--c-tint-2);
  color: #fff;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: background-color var(--d-fast), border-color var(--d-fast), color var(--d-fast);
}
.quick-btn:hover { background: rgba(8, 8, 8, .85); border-color: rgba(255, 255, 255, .3); }
.quick-btn .icon { width: 15px; height: 15px; }
.quick-btn[aria-pressed="true"] { color: var(--c-accent); border-color: var(--c-accent-line); }
.quick-btn--dismiss { position: absolute; top: 8px; right: 8px; z-index: 4; opacity: 0; transition: opacity var(--d-base); }
.card:hover .quick-btn--dismiss, .card:focus-within .quick-btn--dismiss { opacity: 1; }

.card__body { display: flex; align-items: flex-start; gap: 10px; min-width: 0; }
.card__text { display: flex; flex-direction: column; gap: 5px; min-width: 0; flex: 1; }
.card__title {
  font: 500 14.5px/1.3 var(--f-ui);
  color: var(--c-text);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
}
.card__title a { transition: color var(--d-fast); }
.card__meta {
  font-size: 12.5px;
  line-height: 1.35;
  color: var(--c-text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card__meta a { position: relative; z-index: 1; transition: color var(--d-fast); }
.card__meta a:hover { color: var(--c-accent); }
.card__more {
  flex: none;
  width: 28px;
  height: 28px;
  margin: -3px -6px 0 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--c-text-3);
  opacity: 0;
  position: relative;
  z-index: 1;
  transition: opacity var(--d-fast), background-color var(--d-fast), color var(--d-fast);
}
.card__more .icon { width: 18px; height: 18px; }
.card__more:hover { background: var(--c-hover); color: var(--c-text); }
.card:hover .card__more, .card__more:focus-visible, .card__more[aria-expanded="true"] { opacity: 1; }
@media (hover: none) {
  .card__more { opacity: 1; }
  .card__quick { display: none; }
  .quick-btn--dismiss { opacity: 1; }
}

/* Poster 2:3 */
.card--poster .card__media { aspect-ratio: 2 / 3; }
.card--poster .card__title { font-size: 13.5px; -webkit-line-clamp: 1; line-clamp: 1; }
.card--poster .card__meta { font-size: 11.5px; }

/* Card enter animation (used when appending pages / not-interested) */
.card.is-leaving { animation: card-leave .32s var(--ease) forwards; }
@keyframes card-leave { to { opacity: 0; transform: scale(.94); } }
.card.is-entering { animation: card-enter .45s var(--ease) both; }
@keyframes card-enter { from { opacity: 0; transform: translateY(10px); } }

/* Compact — rail “Up next” */
.card--compact {
  flex-direction: row;
  align-items: flex-start;
  gap: 12px;
}
.card--compact .card__media { width: 168px; flex: none; border-radius: 8px; }
.card--compact .card__title { font-size: 13.5px; line-height: 1.32; }
.card--compact .card__title a::after { content: ''; position: absolute; inset: 0; z-index: 0; }
.card--compact .card__meta a { z-index: 1; }
.card--compact .card__meta { font-size: 12px; white-space: normal; }
.card--compact .card__text { gap: 4px; padding-top: 1px; }
.card--compact .card__more { margin-top: -4px; }
.card--compact .badge { height: 18px; font-size: 9.5px; }

/* Row — history / collection list */
.list-row {
  position: relative;
  display: grid;
  grid-template-columns: auto 132px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--c-line-soft);
  background: var(--c-bg-sunken);
  transition: border-color var(--d-fast) var(--ease), background-color var(--d-fast) var(--ease);
}
.list-row:hover { border-color: var(--c-line); background: var(--c-bg-sunken); }
.list-row.is-current { border-color: var(--c-accent-line); }
.list-row__index { width: 26px; text-align: center; font: 400 12px/1 var(--f-mono); color: var(--c-text-3); }
.list-row__index .icon { width: 14px; height: 14px; color: var(--c-accent); }
.list-row__media { position: relative; aspect-ratio: 16 / 9; border-radius: 7px; overflow: hidden; background: var(--c-card); }
.list-row__media img { width: 100%; height: 100%; object-fit: cover; }
.list-row__media .card__progress { height: 3px; }
.list-row__media .badge { position: absolute; right: 5px; bottom: 5px; height: 17px; font-size: 9.5px; }
.list-row__text { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.list-row__title { font: 500 14px/1.3 var(--f-ui); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-row__title a::after { content: ''; position: absolute; inset: 0; z-index: 0; }
.list-row__meta { font-size: 12.5px; color: var(--c-text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-row__meta a { position: relative; z-index: 1; }
.list-row__meta a:hover { color: var(--c-accent); }
.list-row__end { position: relative; z-index: 1; display: flex; align-items: center; gap: 6px; }
.list-row--no-index { grid-template-columns: 132px minmax(0, 1fr) auto; }
.list-row.is-unavailable { background: transparent; border-style: dashed; }
.list-row.is-unavailable .list-row__title { color: var(--c-text-2); }
.list-row__media--gone { display: grid; place-items: center; color: var(--c-text-3); background: repeating-linear-gradient(45deg, var(--c-bg-sunken) 0 8px, var(--c-hatch) 8px 16px); }
@media (max-width: 600px) {
  .list-row { grid-template-columns: 112px minmax(0, 1fr) auto; gap: 12px; padding: 8px; }
  .list-row__index { display: none; }
  .list-row--no-index { grid-template-columns: 112px minmax(0, 1fr) auto; }
  .list-row__title { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; font-size: 13.5px; }
  .list-row__end .hide-sm { display: none; }
}

/* ==========================================================================
   8. Tiles — categories & collections
   ========================================================================== */
.tile {
  position: relative;
  display: flex;
  align-items: flex-end;
  aspect-ratio: 16 / 10;
  padding: clamp(16px, 1.6vw, 24px);
  border-radius: var(--r-l);
  overflow: hidden;
  isolation: isolate;
  background: var(--c-card);
}
.tile::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .07);
  transition: box-shadow var(--d-base) var(--ease);
  pointer-events: none;
}
.tile:hover::after { box-shadow: inset 0 0 0 1px var(--c-tint-4); }
.tile__art {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 900ms var(--ease), filter 400ms var(--ease);
}
.tile:hover .tile__art { transform: scale(1.05); }
.tile__shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, var(--c-shade-0) 30%, var(--c-shade-3) 100%);
}
.tile__body { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.tile__title { font: 500 19px/1.12 var(--f-display); letter-spacing: -.02em; }
.tile__desc { font-size: 12.5px; color: var(--c-text-2); line-height: 1.45; }
.tile__arrow {
  position: absolute;
  top: 14px;
  right: 14px;
  opacity: 0;
  transform: translate(-4px, 4px);
  transition: opacity var(--d-base) var(--ease), transform var(--d-base) var(--ease);
}
.tile:hover .tile__arrow { opacity: 1; transform: none; }
.tile--wide { aspect-ratio: auto; min-height: clamp(200px, 22vw, 300px); }
.tile--wide .tile__title { font-size: clamp(24px, 2.4vw, 34px); }
.tile--sm { aspect-ratio: 16 / 9; padding: 14px; }
.tile--sm .tile__title { font-size: 16px; }

/* Collection card */
.collection-card { position: relative; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.collection-card__cover {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  border-radius: 12px;
  overflow: hidden;
  isolation: isolate;
  background: var(--c-card);
}
.collection-card__cover::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .07);
  transition: box-shadow var(--d-base);
  pointer-events: none;
}
.collection-card:hover .collection-card__cover::after { box-shadow: inset 0 0 0 1px var(--c-tint-4); }
.collection-card__cover > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform 900ms var(--ease); }
.collection-card:hover .collection-card__cover > img { transform: scale(1.05); }
.collection-card__shade { position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, var(--c-shade-0) 42%, var(--c-shade-3)); }
.collection-card__foot {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 13px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
}
.collection-card__stack { display: flex; gap: 4px; }
.collection-card__stack img {
  width: 34px;
  height: 20px;
  border-radius: 4px;
  object-fit: cover;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .18);
}
.collection-card__stack img:nth-child(2) { opacity: .75; }
.collection-card__stack img:nth-child(3) { opacity: .5; }
.collection-card__body { display: flex; flex-direction: column; gap: 5px; }
.collection-card__title { font: 500 16px/1.2 var(--f-display); letter-spacing: -.01em; }
.collection-card__title a::after { content: ''; position: absolute; inset: 0; }
.collection-card__desc { font-size: 12.5px; color: var(--c-text-2); }
.collection-card--overlay .collection-card__foot { flex-direction: column; align-items: flex-start; gap: 6px; bottom: 16px; left: 18px; }
.collection-card--overlay .collection-card__title { font-size: 18px; }

/* ==========================================================================
   9. Creators
   ========================================================================== */
.creator-bubble {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  min-width: 0;
}
.creator-bubble__avatar {
  position: relative;
  width: 100%;
  max-width: 108px;
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
  margin-bottom: 6px;
  background: var(--c-card);
  transition: transform var(--d-slow) var(--ease), box-shadow var(--d-base) var(--ease);
  box-shadow: 0 0 0 1px var(--c-glass-line);
}
.creator-bubble__avatar img { width: 100%; height: 100%; object-fit: cover; }
.creator-bubble:hover .creator-bubble__avatar { transform: translateY(-3px); box-shadow: 0 0 0 1px rgba(255, 255, 255, .3), 0 14px 30px var(--c-scrim-soft); }
.creator-bubble__name { font: 500 13.5px/1.25 var(--f-ui); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.creator-bubble__name a::before { content: ''; position: absolute; inset: 0 0 34px 0; }
.creator-bubble__meta { font-size: 12px; color: var(--c-text-2); margin-bottom: 4px; }
.creator-bubble .btn { position: relative; z-index: 1; }

.creator-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: var(--r-l);
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  overflow: hidden;
  transition: border-color var(--d-base) var(--ease), transform var(--d-slow) var(--ease);
}
.creator-card:hover { border-color: var(--c-line-strong); }
.creator-card__banner { position: relative; display: block; height: 92px; overflow: hidden; background: var(--c-card); }
.creator-card__banner img { width: 100%; height: 100%; object-fit: cover; transition: transform 900ms var(--ease); }
.creator-card:hover .creator-card__banner img { transform: scale(1.05); }
.creator-card__body { display: flex; flex-direction: column; gap: 14px; padding: 0 18px 18px; }
.creator-card__id {
  /* the avatar sits on top of the banner — its own layer, ringed in card colour */
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  gap: 12px;
  margin-top: -28px;
}
.creator-card__id .avatar { --s: 60px; box-shadow: 0 0 0 3px var(--c-surface); }
.creator-card__id .avatar::after { display: none; }
.creator-card__names { display: flex; flex-direction: column; gap: 5px; min-width: 0; padding-bottom: 3px; }
.creator-card__name { font: 500 15.5px/1.15 var(--f-ui); display: flex; align-items: center; gap: 5px; }
.creator-card__name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.creator-card__stats { display: flex; gap: 8px; font-size: 12.5px; color: var(--c-text-2); }
.creator-card__stats .sep { color: var(--c-text-4); }
.creator-card__thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.creator-card__thumbs a { position: relative; aspect-ratio: 16 / 9; border-radius: 7px; overflow: hidden; background: var(--c-card); }
.creator-card__thumbs img { width: 100%; height: 100%; object-fit: cover; transition: transform 600ms var(--ease); }
.creator-card__thumbs a:hover img { transform: scale(1.08); }
.creator-card__actions { display: flex; gap: 8px; }
.creator-card__actions .btn:first-child { flex: 1; }

.creator-row {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 13px;
  border-radius: 12px;
  background: var(--c-bg-sunken);
  border: 1px solid var(--c-line-soft);
  transition: border-color var(--d-fast);
  position: relative;
}
.creator-row:hover { border-color: var(--c-line); }
.creator-row__text { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
.creator-row__name { font: 500 14px/1.2 var(--f-ui); display: flex; align-items: center; gap: 5px; }
.creator-row__name a::after { content: ''; position: absolute; inset: 0; }
.creator-row__meta { font-size: 12px; color: var(--c-text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.creator-row .btn, .creator-row .icon-btn { position: relative; z-index: 1; }

/* ==========================================================================
   10. Shelves & scrollers
   ========================================================================== */
.shelf { display: flex; flex-direction: column; gap: 16px; min-width: 0; scroll-margin-top: calc(var(--header-h) + 24px); }
.shelf__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.shelf__titles { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.shelf__title { font: 500 var(--t-h2)/1.1 var(--f-display); letter-spacing: -.015em; }
.shelf__title a { transition: color var(--d-fast); }
.shelf__title a:hover { color: var(--c-accent); }
.shelf__sub { font-size: 12.5px; color: var(--c-text-2); }
.shelf__tools { display: flex; align-items: center; gap: 12px; flex: none; }
.shelf__link { font: 500 12.5px/1 var(--f-ui); color: var(--c-text-2); display: inline-flex; align-items: center; gap: 4px; transition: color var(--d-fast); }
.shelf__link:hover { color: var(--c-text); }
.shelf__link .icon { width: 14px; height: 14px; }
.shelf__nav { display: flex; gap: 8px; }
@media (hover: none), (max-width: 767px) { .shelf__nav { display: none; } }

.scroller {
  --item-w: clamp(230px, 24vw, 320px);
  position: relative;
  margin-inline: calc(var(--gutter) * -1);
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--gutter);
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}
.scroller::-webkit-scrollbar { display: none; }
.scroller__track {
  display: flex;
  gap: clamp(12px, 1.3vw, 20px);
  width: max-content;
  padding-inline: var(--gutter);
  padding-block: 2px 6px;
}
.scroller__item { flex: 0 0 var(--item-w); width: var(--item-w); scroll-snap-align: start; min-width: 0; }
.scroller--continue { --item-w: clamp(220px, 22vw, 296px); }
.scroller--poster { --item-w: clamp(146px, 15.5vw, 206px); }
.scroller--tile { --item-w: clamp(240px, 25vw, 340px); }
.scroller--creator { --item-w: 132px; margin-block: -10px -24px; }
/* room for the avatar's hover lift, ring and shadow — the scroller clips vertically */
.scroller--creator .scroller__track { padding-block: 12px 30px; }
.scroller--collection { --item-w: clamp(280px, 30vw, 420px); }
@media (max-width: 767px) {
  .scroller { --item-w: min(74vw, 320px); }
  .scroller--continue { --item-w: min(68vw, 290px); }
  .scroller--poster { --item-w: min(40vw, 190px); }
  .scroller--tile { --item-w: min(66vw, 300px); }
  .scroller--creator { --item-w: 112px; }
  .scroller--collection { --item-w: min(80vw, 360px); }
}

/* Ranked (Top 10) */
.rank-num {
  font: 500 11px/1 var(--f-mono);
  letter-spacing: .02em;
}

/* ==========================================================================
   11. Header
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background: rgba(8, 8, 8, .82);
  backdrop-filter: saturate(150%) blur(20px);
  -webkit-backdrop-filter: saturate(150%) blur(20px);
  border-bottom: 1px solid var(--c-line-soft);
  transition: background-color var(--d-slow) var(--ease), border-color var(--d-slow) var(--ease), backdrop-filter var(--d-slow);
}
/* The header is markup-empty until the shell renders it, and it is sticky,
   so it sits in the flow: filling it pushed the whole page down by 67px
   after first paint. Worth 0.052 of layout shift on every page that does
   not overlay its header. Same height, held early. */
.site-header:empty { height: var(--header-h); }
/* ...and where the finished header floats over the hero, the empty one has to
   float too, or reserving its height just moves the jump from one direction
   to the other. */
body[data-header="overlay"] .site-header:empty { margin-bottom: calc(var(--header-h) * -1 - 1px); }

.site-header.is-overlay { margin-bottom: calc(var(--header-h) * -1 - 1px); }
.site-header.is-overlay:not(.is-solid) {
  background: linear-gradient(180deg, rgba(8, 8, 8, .72) 0%, var(--c-shade-0) 100%);
  border-color: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.site-header__inner {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2.2vw, 32px);
  max-width: var(--container);
  height: var(--header-h);
  margin: 0 auto;
  padding-inline: var(--gutter);
}
.site-header__start { display: flex; align-items: center; gap: 14px; flex: none; }

.menu-btn {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  color: var(--c-text);
  transition: border-color var(--d-fast);
}
.menu-btn:hover { border-color: var(--c-line-strong); }
.site-header.is-overlay:not(.is-solid) .menu-btn { background: var(--g-sheen), var(--c-shade-1); border-color: var(--c-tint-2); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .035); }

.brand {
  display: inline-flex;
  align-items: center;
  font: 700 17px/1 var(--f-display);
  letter-spacing: .17em;
  color: var(--c-text);
  padding-top: 1px;
}
.brand:hover { color: #fff; }

.site-nav {
  position: relative;
  display: flex;
  gap: 2px;
  flex: none;
  padding: 4px;
  border-radius: var(--r-pill);
  background: var(--g-sheen);
  border: 1px solid var(--c-hover);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .035);
}
.site-nav a {
  position: relative;
  z-index: 1;
  font-size: 13.5px;
  color: var(--c-text-2);
  padding: 7px clamp(10px, 1vw, 15px);
  border-radius: var(--r-pill);
  transition: color var(--d-fast), background-color var(--d-fast);
}
.site-nav a:hover, .site-nav a.is-on { color: var(--c-text); }
/* Focus was drawn by the sliding glow alone, which is a problem: the glow is
   cleared on pointerleave, so moving the mouse away while a nav link held
   keyboard focus left no focus indicator at all. The outline is the indicator
   now and it owes nothing to JavaScript; the glow is decoration. */
.site-nav a:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; }
.site-nav a[aria-current="page"] { color: var(--c-text); background: rgba(255, 255, 255, .055); }
.site-nav a[aria-current="page"]::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 2px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--c-accent);
  transform: translateX(-50%);
}
.site-nav.is-lit a[aria-current="page"] { background: transparent; }
.site-nav__glow {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 0;
  width: var(--w, 0);
  transform: translateX(var(--x, 0));
  border-radius: var(--r-pill);
  pointer-events: none;
  opacity: 0;
  background:
    radial-gradient(90% 130% at var(--mx, 50%) 135%, rgba(242, 138, 60, .38), rgba(242, 138, 60, .1) 55%, transparent 78%),
    linear-gradient(180deg, var(--c-tint-2), rgba(255, 255, 255, .035));
  box-shadow:
    inset 0 1px 0 var(--c-tint-3),
    inset 0 0 0 1px var(--c-hover),
    0 8px 22px -10px rgba(242, 138, 60, .45);
  transition:
    transform .38s cubic-bezier(.3, .7, .2, 1),
    width .38s cubic-bezier(.3, .7, .2, 1),
    opacity .2s ease;
}
.site-nav.is-lit .site-nav__glow { opacity: 1; }
.site-nav:has(a:focus-visible) .site-nav__glow { box-shadow: inset 0 1px 0 var(--c-tint-3); }
.site-header.is-overlay:not(.is-solid) .site-nav { background: var(--g-sheen), var(--c-shade-1); border-color: var(--c-tint-1); backdrop-filter: blur(10px); }
@media (prefers-reduced-motion: reduce) { .site-nav__glow { transition: opacity .2s ease; } }

.header-search { position: relative; flex: 1 1 240px; max-width: 520px; min-width: 180px; }
.search-field {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 40px;
  padding: 0 8px 0 14px;
  border-radius: var(--r-pill);
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  transition: border-color var(--d-fast), box-shadow var(--d-fast), background-color var(--d-fast);
}
.search-field:hover { border-color: var(--c-line-hover); }
.search-field:focus-within { border-color: var(--c-line-strong); box-shadow: var(--ring); }
.search-field .icon { width: 17px; height: 17px; color: var(--c-text-2); }
.search-field input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 13.5px;
  color: var(--c-text);
}
.search-field input::-webkit-search-cancel-button { display: none; }
.search-field .kbd { margin-right: 4px; }
.search-field:focus-within .kbd { display: none; }
.site-header.is-overlay:not(.is-solid) .search-field { background: var(--g-sheen), rgba(8, 8, 8, .4); border-color: var(--c-tint-2); backdrop-filter: blur(10px); }

.header-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; flex: none; }
.header-actions .icon-btn { --s: 38px; }
.site-header.is-overlay:not(.is-solid) .header-actions .icon-btn,
.site-header.is-overlay:not(.is-solid) .header-actions .btn--outline { background: var(--g-sheen), var(--c-shade-1); border-color: var(--c-tint-2); }
.header-search-btn { display: none; }
.header-avatar { border-radius: 50%; transition: box-shadow var(--d-fast); }
.header-avatar:hover { box-shadow: 0 0 0 2px var(--c-line-strong); }
.header-avatar .avatar { --s: 36px; }

@media (max-width: 1180px) {
  .site-nav { display: none; }
}
@media (max-width: 767px) {
  .header-search, .header-upload, .header-auth .btn--ghost { display: none; }
  .header-search-btn { display: inline-grid; }
  .site-header__start { gap: 10px; }
  .brand { font-size: 15px; letter-spacing: .15em; }
  .menu-btn { width: 36px; height: 36px; }
  .header-actions { gap: 6px; }
  .header-actions .icon-btn { --s: 36px; background: transparent; border-color: transparent; }
  .header-avatar .avatar { --s: 32px; }
}

/* Suggestions dropdown */
.suggest {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 5;
  max-height: min(70vh, 560px);
  overflow-y: auto;
  padding: 8px;
  border-radius: 16px;
  background: var(--c-glass-strong);
  backdrop-filter: blur(24px) saturate(150%);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
  box-shadow: var(--sh-pop);
  animation: pop-in .2s var(--ease);
}
.suggest__group + .suggest__group { margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--c-line-soft); }
.suggest__label { padding: 8px 10px 6px; }
.suggest__item {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 8px 10px;
  border-radius: 10px;
  text-align: left;
  font-size: 13.5px;
  color: var(--c-text);
}
.suggest__item:hover, .suggest__item.is-focused { background: var(--c-hover); }
.suggest__item .icon { width: 16px; height: 16px; color: var(--c-text-3); }
.suggest__item mark { background: none; color: var(--c-accent); }
.suggest__thumb { width: 56px; aspect-ratio: 16 / 9; border-radius: 5px; object-fit: cover; flex: none; }
.suggest__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.suggest__text small { font-size: 11.5px; color: var(--c-text-2); }
.suggest__trail { margin-left: auto; font: 400 10px/1 var(--f-mono); color: var(--c-text-3); }
.suggest__remove { margin-left: auto; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; color: var(--c-text-3); }
.suggest__remove:hover { background: var(--c-hover); color: var(--c-text); }
.suggest__chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 2px 10px 8px; }

/* ==========================================================================
   12. Drawer (Browse)
   ========================================================================== */
.drawer-scrim {
  position: fixed;
  inset: 0;
  z-index: var(--z-drawer);
  background: var(--c-scrim);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s var(--ease);
}
.drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: calc(var(--z-drawer) + 1);
  width: min(90vw, 368px);
  display: flex;
  flex-direction: column;
  background: var(--c-bg-raised);
  border-right: 1px solid var(--c-line);
  transform: translateX(-101%);
  transition: transform .36s var(--ease), visibility .36s;
  visibility: hidden;
}
body.drawer-open .drawer { transform: none; visibility: visible; }
body.drawer-open .drawer-scrim { opacity: 1; pointer-events: auto; }
.drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--c-line-soft);
  flex: none;
}
.drawer__body {
  flex: 1;
  overflow-y: auto;
  padding: 22px 20px 32px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.drawer__section { display: flex; flex-direction: column; gap: 12px; }
.drawer__nav { display: none; flex-direction: column; }
.drawer__nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  font: 500 16px/1 var(--f-display);
  letter-spacing: -.01em;
  border-bottom: 1px solid var(--c-line-soft);
}
.drawer__nav a .icon { color: var(--c-text-3); width: 18px; height: 18px; }
.drawer__nav a[aria-current="page"] { color: var(--c-text); }
.drawer__nav a[aria-current="page"] .icon { color: var(--c-accent); }
@media (max-width: 1180px) { .drawer__nav { display: flex; } }
.drawer__cats { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.drawer__cat {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 11px;
  border-radius: 9px;
  background: var(--c-surface);
  border: 1px solid var(--c-line-soft);
  font-size: 12.5px;
  transition: border-color var(--d-fast);
}
.drawer__cat:hover { border-color: var(--c-line); }
.drawer__cat span:last-child { font: 400 9.5px/1 var(--f-mono); color: var(--c-text-3); }
.drawer__creators { display: flex; flex-direction: column; gap: 12px; }
.drawer__creator { position: relative; display: flex; align-items: center; gap: 11px; }
.drawer__creator-text { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.drawer__creator-text b { font: 500 13px/1.2 var(--f-ui); }
.drawer__creator-text b a::after { content: ''; position: absolute; inset: 0; }
.drawer__creator-text span { font-size: 11.5px; color: var(--c-text-2); }
.drawer__creator .btn { position: relative; z-index: 1; }
.drawer__lib { display: flex; flex-direction: column; }
.drawer__lib a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 0;
  font-size: 13.5px;
  color: var(--c-text);
  transition: color var(--d-fast);
}
.drawer__lib a:hover { color: var(--c-accent); }
.drawer__lib a .icon { width: 17px; height: 17px; color: var(--c-text-3); }
.drawer__lib a span:last-child { margin-left: auto; font: 400 10px/1 var(--f-mono); color: var(--c-text-3); }

/* ==========================================================================
   13. Mobile tab bar
   ========================================================================== */
.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: var(--z-tabbar);
  display: none;
  grid-template-columns: repeat(5, 1fr);
  height: calc(var(--tabbar-h) + var(--safe-b));
  padding-bottom: var(--safe-b);
  background: rgba(10, 10, 11, .86);
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  border-top: 1px solid var(--c-line-soft);
}
.tabbar a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font: 500 10.5px/1 var(--f-ui);
  color: var(--c-text-3);
  transition: color var(--d-fast);
}
.tabbar a .icon { width: 22px; height: 22px; }
.tabbar a[aria-current="page"] { color: var(--c-text); }
.tabbar__pill {
  display: grid;
  place-items: center;
  width: 40px;
  height: 26px;
  border-radius: 9px;
  background: var(--c-on);
  color: var(--c-ink);
}
.tabbar a .tabbar__pill .icon { width: 18px; height: 18px; }
.tabbar__upload[aria-current="page"] .tabbar__pill { background: var(--c-accent); color: var(--c-accent-ink); }
@media (max-width: 767px) {
  .tabbar { display: grid; }
}

/* ==========================================================================
   14. Footer
   ========================================================================== */
.site-footer { border-top: 1px solid var(--c-line-soft); background: var(--c-bg-raised); }
.site-footer__inner {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) repeat(4, minmax(120px, 1fr));
  gap: 32px;
  padding-block: clamp(32px, 4vw, 56px) 28px;
}
.site-footer__brand { display: flex; flex-direction: column; gap: 12px; max-width: 290px; }
.site-footer__brand p { font-size: 12.5px; line-height: 1.6; color: var(--c-text-2); }
.site-footer__col { display: flex; flex-direction: column; gap: 10px; }
.site-footer__col a { font-size: 13px; color: var(--c-text-2); transition: color var(--d-fast); width: fit-content; }
.site-footer__col a:hover { color: var(--c-text); }
.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding-block: 18px 26px;
  border-top: 1px solid var(--c-line-soft);
  font-size: 12px;
  color: var(--c-text-3);
}
.site-footer__bottom .row { gap: 16px; flex-wrap: wrap; }
.rta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border: 1px solid var(--c-line);
  border-radius: var(--r-xs);
  font: 500 9.5px/1 var(--f-mono);
  letter-spacing: .12em;
  color: var(--c-text-2);
}
@media (max-width: 900px) {
  .site-footer__inner { grid-template-columns: 1fr 1fr; }
  .site-footer__brand { grid-column: 1 / -1; }
}

/* ==========================================================================
   15. Menus (popover API) & panels
   ========================================================================== */
.menu {
  position: fixed;
  inset: auto;
  margin: 0;
  min-width: 232px;
  max-width: calc(100vw - 24px);
  padding: 6px;
  border: 0;
  border-radius: 14px;
  background: var(--c-glass-strong);
  backdrop-filter: blur(24px) saturate(150%);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
  box-shadow: var(--sh-pop);
  color: var(--c-text);
  overflow: visible;
}
/* Menus and panels grow out of their button and fold back into it on close.
   allow-discrete keeps the popover on screen while the exit transition runs. */
.menu[popover] {
  opacity: 0;
  transform: translateY(-6px) scale(.96);
  transition: opacity .14s ease, transform .18s var(--ease-io), overlay .2s allow-discrete, display .2s allow-discrete;
}
.menu[popover].is-above { transform: translateY(6px) scale(.96); }
.menu[popover]:popover-open {
  opacity: 1;
  transform: none;
  transition: opacity .18s ease, transform .3s var(--ease), overlay .3s allow-discrete, display .3s allow-discrete;
}
@starting-style {
  .menu[popover]:popover-open { opacity: 0; transform: translateY(-6px) scale(.96); }
  .menu[popover].is-above:popover-open { transform: translateY(6px) scale(.96); }
}
.menu:popover-open .menu__item, .menu:popover-open .menu__head, .menu:popover-open .notif { animation: menu-item-in .32s var(--ease) both; }
.menu:popover-open > :nth-child(2) { animation-delay: 20ms; }
.menu:popover-open > :nth-child(3) { animation-delay: 40ms; }
.menu:popover-open > :nth-child(4) { animation-delay: 60ms; }
.menu:popover-open > :nth-child(n+5) { animation-delay: 80ms; }
.panel:popover-open .notif:nth-child(2) { animation-delay: 30ms; }
.panel:popover-open .notif:nth-child(3) { animation-delay: 60ms; }
.panel:popover-open .notif:nth-child(n+4) { animation-delay: 90ms; }
@keyframes menu-item-in { from { opacity: 0; transform: translateY(-3px); } }
.menu__head { display: flex; align-items: center; gap: 11px; padding: 10px 10px 12px; }
.menu__head b { display: block; font: 500 14px/1.2 var(--f-ui); }
.menu__head span { font-size: 12px; color: var(--c-text-2); }
.menu__item {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 10px 11px;
  border-radius: 9px;
  font-size: 13.5px;
  color: var(--c-text);
  text-align: left;
  transition: background-color var(--d-fast);
}
.menu__item:hover, .menu__item:focus-visible { background: var(--c-hover); outline: none; }
.menu__item .icon { width: 17px; height: 17px; color: var(--c-text-2); }
.menu__item--danger, .menu__item--danger .icon { color: var(--c-danger); }
.menu__item .menu__trail { margin-left: auto; font: 400 10px/1 var(--f-mono); color: var(--c-text-3); }
.menu__sep { height: 1px; margin: 6px 6px; background: var(--c-line-soft); }

.panel { width: min(400px, calc(100vw - 24px)); padding: 0; }
.panel__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px 10px; }
.panel__title { font: 500 15px/1 var(--f-display); }
.panel__list { max-height: 420px; overflow-y: auto; padding: 0 6px; }
.panel__foot { padding: 8px; border-top: 1px solid var(--c-line-soft); }
.panel__foot a { display: block; padding: 10px; border-radius: 9px; text-align: center; font-size: 13px; color: var(--c-text-2); }
.panel__foot a:hover { background: var(--c-hover); color: var(--c-text); }

@keyframes pop-in { from { opacity: 0; transform: translateY(-4px) scale(.98); } }

/* Notification item (panel + page) */
.notif {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 10px;
  border-radius: 12px;
  transition: background-color var(--d-fast);
}
.notif:hover { background: var(--c-hover); }
.notif__icon {
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--c-card);
  color: var(--c-text-2);
  box-shadow: inset 0 0 0 1px var(--c-line);
}
.notif__icon .icon { width: 17px; height: 17px; }
.notif__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; font-size: 13.5px; line-height: 1.45; color: var(--c-text-2); }
.notif__text b { color: var(--c-text); font-weight: 500; }
.notif__text a::after { content: ''; position: absolute; inset: 0; }
.notif__time { font: 400 10px/1 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--c-text-3); }
.notif__thumb { flex: none; width: 76px; aspect-ratio: 16 / 9; border-radius: 6px; object-fit: cover; }
.notif.is-unread::before {
  content: '';
  position: absolute;
  left: -2px;
  top: 50%;
  width: 6px;
  height: 6px;
  margin-top: -3px;
  border-radius: 50%;
  background: var(--c-accent);
}
.notif.is-unread .notif__text { color: var(--c-text); }

/* ==========================================================================
   16. Modal / bottom sheet (native <dialog>)
   ========================================================================== */
.modal {
  width: min(520px, calc(100vw - 32px));
  max-height: min(88vh, 780px);
  padding: 0;
  border: 0;
  border-radius: var(--r-xl);
  background: var(--c-surface);
  color: var(--c-text);
  box-shadow: var(--sh-pop);
  overflow: hidden;
}
.modal[open] { display: flex; flex-direction: column; animation: modal-in .32s var(--ease); }
.modal::backdrop { background: rgba(4, 4, 4, .7); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); opacity: calc(1 - var(--drag, 0)); }
.modal[open]::backdrop { animation: fade-in .3s var(--ease); }
.modal.is-closing { animation: modal-out .2s var(--ease-io) forwards; pointer-events: none; }
.modal.is-closing::backdrop { animation: fade-out .22s ease forwards; }
@keyframes modal-out { to { opacity: 0; transform: translateY(8px) scale(.97); } }
@keyframes fade-out { to { opacity: 0; } }
.modal--wide { width: min(720px, calc(100vw - 32px)); }
.modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 22px 4px;
  flex: none;
}
.modal__title { font: 500 19px/1.2 var(--f-display); letter-spacing: -.015em; }
.modal__sub { margin-top: 6px; font-size: 13px; color: var(--c-text-2); line-height: 1.5; }
.modal__text { font-size: 14px; line-height: 1.55; color: var(--c-text-2); }
.modal__body { padding: 18px 22px 22px; overflow-y: auto; display: flex; flex-direction: column; gap: 16px; }
.modal__foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 22px 20px;
  border-top: 1px solid var(--c-line-soft);
  flex: none;
}
.modal__grab { display: none; }
@keyframes modal-in { from { opacity: 0; transform: translateY(12px) scale(.98); } }
@keyframes fade-in { from { opacity: 0; } }
@media (max-width: 640px) {
  .modal {
    width: 100%;
    max-width: 100%;
    margin: auto 0 0;
    border-radius: 22px 22px 0 0;
    max-height: 90vh;
    padding-bottom: var(--safe-b);
  }
  .modal[open] { animation: sheet-in .38s var(--ease); transition: transform .32s var(--ease); }
  .modal.is-dragging { transition: none; }
  .modal.is-closing { animation: sheet-out .28s var(--ease-io) forwards; }
  /* bigger, easier handle: the grab bar sits in a 24px touch strip */
  .modal__grab { display: block; width: 38px; height: 4px; margin: 10px auto -6px; border-radius: 4px; background: var(--c-line-control); flex: none; box-shadow: 0 0 0 10px transparent; }
  .modal__head { touch-action: none; }
  .modal__foot .btn { flex: 1; }
}
@keyframes sheet-in { from { transform: translateY(100%); } }
@keyframes sheet-out { to { transform: translateY(100%); } }
.modal__body { overscroll-behavior: contain; }

.share-link { display: flex; gap: 8px; }
.share-link .input { font-family: var(--f-mono); font-size: 12.5px; color: var(--c-text-2); }
.share-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.share-grid button { display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 12px; color: var(--c-text-2); padding: 12px 4px; border-radius: 12px; transition: background-color var(--d-fast), color var(--d-fast); }
.share-grid button:hover { background: var(--c-hover); color: var(--c-text); }
.share-grid .icon-btn { pointer-events: none; }

.pick-list { display: flex; flex-direction: column; gap: 4px; }
.pick-list label {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 12px;
  cursor: pointer;
  transition: background-color var(--d-fast);
}
.pick-list label:hover { background: var(--c-hover); }
.pick-list img { width: 64px; aspect-ratio: 16 / 9; border-radius: 6px; object-fit: cover; }
.pick-list .pick-list__text { display: flex; flex-direction: column; gap: 3px; flex: 1; font-size: 13.5px; }
.pick-list .pick-list__text small { color: var(--c-text-3); font-size: 12px; }

/* ==========================================================================
   17. Toasts
   ========================================================================== */
.toasts {
  position: fixed;
  inset: auto auto calc(24px + var(--safe-b)) 50%;
  z-index: 999;
  width: max-content;
  max-width: calc(100vw - 32px);
  height: auto;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  overflow: visible;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}
body.has-tabbar .toasts { bottom: calc(var(--tabbar-h) + 14px + var(--safe-b)); }
.toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 11px;
  max-width: min(480px, calc(100vw - 32px));
  padding: 10px 10px 10px 16px;
  border-radius: var(--r-pill);
  background: rgba(27, 27, 30, .94);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 16px 40px var(--c-scrim-soft), 0 0 0 1px var(--c-line);
  font-size: 13.5px;
  color: var(--c-text);
  animation: toast-in .32s var(--ease);
}
.toast .icon { width: 17px; height: 17px; color: var(--c-accent); }
.toast__action { padding: 7px 12px; border-radius: var(--r-pill); color: var(--c-accent); font-weight: 500; font-size: 13px; }
.toast__action:hover { background: var(--c-hover); }
.toast:not(:has(.toast__action)) { padding-right: 18px; }
.toast.is-leaving { animation: toast-out .24s var(--ease) forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px) scale(.96); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(8px) scale(.97); } }

/* ==========================================================================
   18. Feedback — skeleton, empty state, spinner
   ========================================================================== */
.skeleton {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-m);
  background: var(--c-surface);
}
.skeleton::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, .045) 45%, transparent 90%);
  transform: translateX(-100%);
  animation: shimmer 1.5s var(--ease-io) infinite;
}
@keyframes shimmer { to { transform: translateX(100%); } }
.skeleton-card { display: flex; flex-direction: column; gap: 11px; }
.skeleton-card .skeleton:first-child { aspect-ratio: 16 / 9; }
.skeleton-line { height: 11px; border-radius: 6px; }

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: clamp(40px, 7vw, 80px) 20px;
  text-align: center;
  border: 1px dashed var(--c-line);
  border-radius: var(--r-xl);
}
.empty__icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--c-surface);
  color: var(--c-text-2);
  box-shadow: inset 0 0 0 1px var(--c-line);
  margin-bottom: 4px;
}
.empty__icon .icon { width: 22px; height: 22px; }
.empty__title { font: 500 18px/1.2 var(--f-display); }
.empty__text { font-size: 13.5px; color: var(--c-text-2); max-width: 380px; line-height: 1.55; }
.empty .btn { margin-top: 6px; }
.empty__actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }

/* A card whose picture does not exist yet: the file is on the server and the
   frame it will show is chosen by processing, so nothing is drawn in its place. */
.card__art--pending { display: block; width: 100%; height: 100%; background: var(--c-card); }

.spinner {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2.5px solid var(--c-tint-3);
  border-top-color: #fff;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ==========================================================================
   19. Hero billboard (home, collections)
   ========================================================================== */
.hero {
  position: relative;
  display: grid;
  min-height: clamp(480px, 66vh, 700px);
  overflow: hidden;
  isolation: isolate;
  background: var(--c-surface);
}
.hero__slide {
  grid-area: 1 / 1;
  position: relative;
  display: flex;
  align-items: flex-end;
  opacity: 0;
  visibility: hidden;
  transition: opacity .9s var(--ease), visibility .9s;
}
.hero__slide.is-active { opacity: 1; visibility: visible; z-index: 1; }
.hero__media { position: absolute; inset: 0; z-index: -2; overflow: hidden; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; transform-origin: 68% 50%; }
.hero__slide.is-active .hero__media img { animation: ken-burns 14s var(--ease-io) both; }
.hero.is-paused .hero__slide.is-active .hero__media img { animation-play-state: paused; }
@keyframes ken-burns {
  from { transform: scale(1.02) translate3d(0, 0, 0); }
  to { transform: scale(1.1) translate3d(-1.5%, -1%, 0); }
}
.hero__scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(8, 8, 8, .94) 0%, rgba(8, 8, 8, .72) 36%, rgba(8, 8, 8, .12) 74%, rgba(8, 8, 8, .2) 100%),
    linear-gradient(180deg, rgba(8, 8, 8, .5) 0%, var(--c-shade-0) 20%, var(--c-shade-0) 62%, var(--c-bg) 100%);
}
.hero__content {
  position: relative;
  width: 100%;
  padding-top: calc(var(--header-h) + 56px);
  padding-bottom: clamp(88px, 9vw, 124px);
}
.hero__inner { display: flex; flex-direction: column; gap: 16px; max-width: 580px; }
.hero__slide:not(.is-active) .hero__inner > * { opacity: 0; transform: translateY(12px); }
.hero__inner > * { transition: opacity .7s var(--ease), transform .7s var(--ease); }
.hero__slide.is-active .hero__inner > :nth-child(2) { transition-delay: .06s; }
.hero__slide.is-active .hero__inner > :nth-child(3) { transition-delay: .12s; }
.hero__slide.is-active .hero__inner > :nth-child(4) { transition-delay: .18s; }
.hero__title {
  font: 500 var(--t-hero)/.98 var(--f-display);
  letter-spacing: -.035em;
  text-wrap: balance;
}
.hero__desc {
  max-width: 470px;
  font-size: var(--t-body-l);
  line-height: 1.6;
  color: var(--c-text-2);
  text-wrap: pretty;
}
.hero__actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.hero__stats { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: -4px; font-size: 12.5px; color: var(--c-text-2); }
.hero__stats .sep { color: var(--c-text-4); }
.hero__footer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: clamp(30px, 4vw, 48px);
  z-index: 3;
}
.hero__footer .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.hero__pager { display: flex; gap: 8px; }
.hero__dot {
  position: relative;
  width: 36px;
  height: 20px;
  display: grid;
  align-items: center;
}
.hero__dot::before { content: ''; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .2); }
.hero__dot i {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 3px;
  margin-top: -1.5px;
  border-radius: 3px;
  background: var(--c-text);
  transform-origin: left;
  transform: scaleX(0);
}
.hero__dot.is-done i { transform: scaleX(1); opacity: .5; }
.hero__dot.is-active i { animation: hero-progress var(--hero-dur, 9s) linear forwards; }
.hero.is-paused .hero__dot.is-active i { animation-play-state: paused; }
@keyframes hero-progress { to { transform: scaleX(1); } }
.hero__side { display: flex; align-items: center; gap: 10px; }
.hero__rating {
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 12px;
  border-left: 2px solid var(--c-text-2);
  background: var(--c-shade-1);
  font: 500 10px/1 var(--f-mono);
  letter-spacing: .14em;
  color: var(--c-text);
  backdrop-filter: blur(8px);
}
@media (max-width: 767px) {
  .hero { min-height: min(84svh, 680px); }
  .hero__scrim {
    background:
      linear-gradient(180deg, var(--c-shade-2) 0%, var(--c-shade-0) 26%, rgba(8, 8, 8, .25) 50%, rgba(8, 8, 8, .92) 80%, var(--c-bg) 100%);
  }
  .hero__content { padding-bottom: 76px; }
  .hero__inner { gap: 12px; }
  .hero__desc { display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 14px; }
  .hero__actions { gap: 8px; }
  .hero__actions .btn--lg { --h: 46px; padding: 0 20px; font-size: 14px; }
  .hero__stats { width: 100%; margin: 4px 0 0; }
  .hero__details { display: none; }
  .hero__rating { display: none; }
}

/* ==========================================================================
   19b. Passcode lock · offline banner · quick exit
   ========================================================================== */
.lock {
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: radial-gradient(80% 60% at 50% 30%, var(--c-surface) 0%, var(--c-bg) 70%);
  color: var(--c-text);
}
.lock[open] { display: grid; place-items: center; }
.lock::backdrop { background: var(--c-bg); }
.lock__card { display: flex; flex-direction: column; align-items: center; gap: 12px; width: min(320px, calc(100vw - 48px)); text-align: center; }
.lock__card.is-shake { animation: shake .4s var(--ease); }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.lock__icon { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 50%; background: var(--c-surface); box-shadow: inset 0 0 0 1px var(--c-line); margin-bottom: 6px; }
.lock__icon .icon { width: 22px; height: 22px; }
.lock__title { font: 500 22px/1.2 var(--f-display); }
.lock__sub { font-size: 13px; color: var(--c-text-2); }
.lock__dots { display: flex; gap: 16px; margin: 14px 0 4px; }
.lock__dots i { width: 13px; height: 13px; border-radius: 50%; border: 1.5px solid var(--c-text-2); transition: background-color var(--d-fast), border-color var(--d-fast); }
.lock__dots i.is-on { background: var(--c-on); border-color: var(--c-on); }
.lock.is-ok .lock__dots i { background: var(--c-success); border-color: var(--c-success); }
.lock__error { min-height: 18px; font-size: 12.5px; color: var(--c-danger); }
.lock__pad { display: grid; grid-template-columns: repeat(3, 72px); gap: 14px; margin-top: 6px; }
.lock__pad button { width: 72px; height: 72px; border-radius: 50%; background: var(--c-surface); box-shadow: inset 0 0 0 1px var(--c-line); font: 400 26px/1 var(--f-ui); color: var(--c-text); display: grid; place-items: center; transition: background-color var(--d-fast); }
.lock__pad button:hover { background: var(--c-card-hover); }
.lock__pad button:active { background: var(--c-line); }
.lock__pad button .icon { width: 22px; height: 22px; }
.lock__forgot { margin-top: 14px; font-size: 13px; color: var(--c-text-2); }
.lock__forgot:hover { color: var(--c-text); }

.net-banner {
  position: fixed;
  top: calc(var(--header-h) + 12px);
  left: 50%;
  z-index: 70;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 12px;
  width: max-content;
  max-width: calc(100vw - 32px);
  padding: 10px 10px 10px 16px;
  border-radius: 14px;
  background: rgba(40, 30, 14, .92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 16px 40px var(--c-scrim-soft), 0 0 0 1px rgba(232, 176, 75, .35);
  font-size: 13px;
  color: var(--c-text-2);
  animation: toast-in .3s var(--ease);
}
.net-banner > .icon { color: var(--c-warning); width: 18px; height: 18px; }
.net-banner b { color: var(--c-text); font-weight: 500; }
@media (max-width: 767px) { .net-banner { top: 10px; align-items: flex-start; } }
.quick-exit { color: var(--c-text); }

/* ==========================================================================
   20. Age gate
   ========================================================================== */
.age-gate {
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: var(--c-bg);
  color: var(--c-text);
  overflow: hidden;
}
.age-gate[open] { display: grid; place-items: center; }
.age-gate::backdrop { background: var(--c-bg); }
.age-gate__wall {
  position: absolute;
  inset: -10%;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
  transform: rotate(-8deg);
  opacity: .5;
  filter: blur(2px) saturate(.9);
}
.age-gate__wall img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 12px; }
.age-gate__wall div { display: flex; flex-direction: column; gap: 14px; animation: drift 60s linear infinite alternate; }
.age-gate__wall div:nth-child(even) { animation-direction: alternate-reverse; margin-top: -120px; }
@keyframes drift { to { transform: translateY(-18%); } }
.age-gate::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(8, 8, 8, .7) 0%, rgba(8, 8, 8, .92) 55%, var(--c-bg) 100%);
}
.age-gate__card {
  position: relative;
  z-index: 1;
  width: min(480px, calc(100vw - 32px));
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: clamp(28px, 4vw, 40px);
  border-radius: 24px;
  background: rgba(18, 18, 20, .82);
  backdrop-filter: blur(28px) saturate(140%);
  -webkit-backdrop-filter: blur(28px) saturate(140%);
  box-shadow: 0 40px 80px rgba(0, 0, 0, .6), 0 0 0 1px var(--c-glass-line);
  animation: modal-in .5s var(--ease);
}
.age-gate__top { display: flex; align-items: center; justify-content: space-between; }
.age-gate__badge {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px solid var(--c-text);
  font: 600 13px/1 var(--f-display);
}
.age-gate__card h1 { font: 500 clamp(28px, 4vw, 36px)/1.05 var(--f-display); letter-spacing: -.03em; }
.age-gate__card p { font-size: 14px; line-height: 1.6; color: var(--c-text-2); }
.age-gate__card p a { color: var(--c-text); text-decoration: underline; text-decoration-color: var(--c-line-strong); text-underline-offset: 3px; }
.age-gate__actions { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.age-gate__card .age-gate__note { font: 400 10px/1.6 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--c-text-3); }

/* ==========================================================================
   22. Interaction: press feedback, gestures, tab ink, back button
   ========================================================================== */
/* Press: controls give under the finger (buttons already do) */
.icon-btn, .chip {
  transition: color var(--d-fast) var(--ease), border-color var(--d-fast) var(--ease), background-color var(--d-fast) var(--ease), scale .14s var(--ease);
}
.icon-btn:active, .chip:active, .quick-btn:active { scale: .93; }
.menu__item:active { scale: .985; }
.tabbar a .icon { transition: scale .16s var(--ease); }
.tabbar a:active .icon, .tabbar a:active .tabbar__pill { scale: .88; }
@media (hover: none) {
  .card__media, .tile, .collection-card__cover, .creator-bubble__avatar { transition: scale .2s var(--ease), transform var(--d-slow) var(--ease), box-shadow var(--d-base) var(--ease); }
  .card:active .card__media, .tile:active, .collection-card:active .collection-card__cover, .creator-bubble:active .creator-bubble__avatar { scale: .975; }
}
/* long-press opens the card menu, so keep iOS from offering "Save image" */
.card__cover img, .list-row__media img, .tile img { -webkit-touch-callout: none; -webkit-user-drag: none; user-select: none; }
.card.is-held .card__media { scale: .96; }

/* Toasts can be flicked away */
.toast { touch-action: none; transition: transform .24s var(--ease), opacity .24s ease; cursor: grab; }
.toast:active { cursor: grabbing; }

/* Swipe a row left to remove it */
.list-row:has([data-swipe-remove]) { touch-action: pan-y; }
.list-row.is-swiping { transition: none; z-index: 1; }
.list-row.is-settling { transition: transform .26s var(--ease), opacity .26s ease; }
.list-row:has([data-swipe-remove])::after {
  content: 'Remove';
  position: absolute;
  top: -1px;
  bottom: -1px;
  left: calc(100% + 1px);
  /* bounded, not 100vw — this box exists in layout at all times (its
     opacity is what hides it), so an open-ended width would widen the
     page's scrollable area even at rest */
  width: 160px;
  display: flex;
  align-items: center;
  padding-left: 18px;
  border-radius: 12px 0 0 12px;
  background: rgba(240, 105, 109, .18);
  color: var(--c-danger);
  font: 500 13px/1 var(--f-ui);
  opacity: var(--swipe, 0);
  pointer-events: none;
}
/* belt and suspenders: also clip while a swipe is in progress, in case a
   row is used somewhere without a .col-list ancestor */
.is-swipe-host { overflow-x: clip; }

/* Tabs: one underline that slides to the selected tab */
.tabs { position: relative; }
.tabs__ink {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 0;
  border-radius: 2px;
  background: var(--c-accent);
  pointer-events: none;
  opacity: 0;
  transition: transform .36s var(--ease), width .36s var(--ease), opacity .2s ease;
}
.tabs.has-ink .tab[aria-selected="true"]::after { display: none; }

/* Mobile back button on inner pages (replaces the menu button there) */
.back-btn { display: none; }
@media (max-width: 767px) {
  .site-header.is-inner .back-btn { display: grid; }
  .site-header.is-inner .menu-btn { display: none; }
}

/* Drawer follows the finger when swiped shut */
.drawer.is-dragging, body.drawer-open .drawer.is-dragging { transition: none; }
.drawer-scrim.is-dragging { transition: none; }

/* Scroll lock also holds on iOS, where overflow on <body> alone leaks */
html:has(body.is-locked) { overflow: hidden; }

/* Why a card is being suggested */
.card__why {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 3px;
  font-size: 11.5px;
  line-height: 1.35;
  color: var(--c-text-3);
}
.card__why .icon { flex: none; color: var(--c-accent); opacity: .75; }
/* Platform announcement configured in the local administration workspace. */
.site-announcement {
  margin: 0 var(--gutter) 20px;
  padding: 14px 18px;
  border: 1px solid var(--c-accent-line);
  border-radius: var(--r-m);
  color: var(--c-text);
  background: var(--c-accent-soft);
  font-size: 13px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
body[data-header="overlay"] .site-announcement { margin-top: calc(var(--header-h) + 16px); }

/* Age assurance: method picker and the provider handoff */
.age-methods { display: flex; flex-direction: column; gap: 8px; margin: 4px 0 14px; }
.age-method {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 13px 14px;
  border-radius: 13px;
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  color: var(--c-text);
  text-align: left;
  transition: border-color var(--d-fast), background-color var(--d-fast);
}
.age-method:hover { border-color: var(--c-line-strong); background: var(--c-bg-sunken); }
.age-method > .icon:first-child { flex: none; color: var(--c-accent); }
.age-method > .icon:last-child { margin-left: auto; flex: none; color: var(--c-text-3); }
.age-method__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.age-method__text b { font: 500 14px/1.3 var(--f-ui); }
.age-method__text span { font-size: 12px; color: var(--c-text-2); }

.age-run { display: flex; flex-direction: column; gap: 12px; }
.age-run__where { display: flex; align-items: flex-start; gap: 9px; font-size: 12.5px; line-height: 1.5; color: var(--c-text-2); }
.age-run__where .icon { flex: none; margin-top: 2px; color: var(--c-text-3); }
.age-run__wait { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 26px 0; color: var(--c-text-2); font-size: 13.5px; }

/* Not verified where verification is required: the artwork stays covered */
body.is-unverified .card__art,
body.is-unverified .list-row__media img,
body.is-unverified .tile__art,
body.is-unverified .spotlight__media img,
body.is-unverified .loop__art,
body.is-unverified .hero__art { filter: blur(22px) saturate(.7); transform: scale(1.06); }
body.is-unverified .card:hover .card__art { filter: blur(22px) saturate(.7); }

/* A moderator's reason inside a notification: set off, never styled as a link. */
.notif__note { display: block; margin-top: 4px; color: var(--c-text-2); font-style: italic; overflow-wrap: anywhere; }
.panel__empty { padding: 18px 16px; font-size: 13px; color: var(--c-text-3); }
