/* 00-tokens.css */
@font-face {
  font-family: "Satoshi";
  src: url("/assets/fonts/Satoshi-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
  font-style: normal;
}

@font-face {
  font-family: "Satoshi";
  src: url("/assets/fonts/Satoshi-Medium.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
  font-style: normal;
}

@font-face {
  font-family: "Satoshi";
  src: url("/assets/fonts/Satoshi-Bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
  font-style: normal;
}

/* Graphite with a violet undertone. The red is the playhead, not the room. */
:root {
  color-scheme: dark;
  --bg: #0c0c0f;
  --surface: #16161b;
  --surface-2: #1d1d24;
  --surface-3: #25252d;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #f1eff4;
  --muted: #a9a9b5;
  --accent: #d90f3f;
  --accent-deep: #650b1e;
  --accent-text: #ff7a73;
  --on-accent: #ffffff;

  --shell: 1152px;
  --gutter: clamp(18px, 4vw, 40px);
  --radius: 10px;
  --radius-card: 20px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  --t-display: clamp(3rem, 7.2vw, 6.8rem);
  --t-h2: clamp(1.9rem, 3.6vw, 2.75rem);
  --t-h3: clamp(1.2rem, 1.8vw, 1.45rem);
  --t-lede: clamp(1.02rem, 1.25vw, 1.14rem);

  --font-ui: "Satoshi", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --glass: color-mix(in srgb, var(--surface) 72%, transparent);
  --glass-strong: color-mix(in srgb, var(--surface) 88%, transparent);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 108px;
  background: var(--bg);
}

body {
  display: flow-root;
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(80% 46% at 50% -8%, rgba(120, 24, 58, 0.16), transparent 65%),
    var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

header,
main,
footer,
.skip {
  position: relative;
  z-index: 1;
}

img,
svg,
video {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.24em;
}

p,
h1,
h2,
h3,
h4,
dl,
dd,
ul,
ol,
figure,
blockquote {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

dd {
  margin-inline-start: 0;
}

h1,
h2,
h3,
h4 {
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

::selection {
  background: var(--accent);
  color: var(--on-accent);
}

:focus-visible {
  outline: 2px solid var(--accent-text);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip {
  position: absolute;
  left: 16px;
  top: -80px;
  padding: 10px 16px;
  border-radius: var(--radius);
  background: var(--text);
  color: var(--bg);
  font-weight: 700;
  text-decoration: none;
  transition: top 0.2s var(--ease);
}

.skip:focus {
  top: 12px;
}

.shell {
  width: min(100% - (var(--gutter) * 2), var(--shell));
  margin-inline: auto;
}

.lede {
  color: var(--muted);
  font-size: var(--t-lede);
  line-height: 1.65;
  max-width: 62ch;
}

.fine {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.65;
  max-width: 68ch;
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.035), transparent 55%),
    var(--glass);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(18px) saturate(1.08);
  -webkit-backdrop-filter: blur(18px) saturate(1.08);
}

.section-kicker {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1.3;
  text-transform: uppercase;
}

.section-kicker::before {
  content: "";
  width: 14px;
  height: 2px;
  flex: none;
  border-radius: 2px;
  background: var(--accent-text);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--text);
  font-size: 0.94rem;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid var(--line-strong);
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}

.text-link svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.text-link:hover {
  color: var(--accent-text);
  border-bottom-color: var(--accent-text);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: none;
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color 0.2s var(--ease),
    border-color 0.2s var(--ease),
    color 0.2s var(--ease),
    transform 0.2s var(--ease);
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--text);
  color: #101014;
  border-color: rgba(255, 255, 255, 0.6);
}

.btn-primary:hover {
  background: #dedbe6;
  border-color: #dedbe6;
}

.btn-quiet {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.025);
  color: var(--text);
}

.btn-quiet:hover {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.06);
}

.btn-small {
  min-height: 38px;
  padding: 0 15px;
  font-size: 0.875rem;
}

.btn:disabled {
  opacity: 0.55;
  cursor: default;
}

@media (max-width: 720px) {
  body {
    font-size: 1rem;
  }

  :root {
    --radius-card: 18px;
  }
}

/* 10-chrome.css */
/* Floating capsule header */

.site-header {
  position: sticky;
  top: 14px;
  z-index: 40;
  width: min(100% - (var(--gutter) * 2), var(--shell));
  margin: 14px auto 0;
  transition: transform 0.48s var(--ease);
}

.site-header.is-hidden {
  transform: translate3d(0, calc(-100% - 24px), 0);
  pointer-events: none;
  transition-duration: 0.62s;
}

.header-bar {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 18px;
  min-height: 58px;
  padding: 8px 10px 8px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg) 76%, transparent);
  box-shadow:
    0 18px 44px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(24px) saturate(1.2);
  -webkit-backdrop-filter: blur(24px) saturate(1.2);
  transition: background-color 0.25s var(--ease), border-color 0.25s var(--ease);
}

.site-header.is-stuck .header-bar {
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  border-color: var(--line-strong);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.94rem;
  font-weight: 700;
  letter-spacing: -0.035em;
  text-decoration: none;
  white-space: nowrap;
}

.brand-mark {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  width: 22px;
  height: 17px;
  flex: none;
}

.brand-mark span {
  width: 3px;
  border-radius: 2px;
  background: linear-gradient(180deg, #fff, #ff8c84);
}

.brand-mark span:nth-child(1) {
  height: 46%;
}

.brand-mark span:nth-child(2) {
  height: 100%;
}

.brand-mark span:nth-child(3) {
  height: 66%;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 0.9rem;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  padding: 7px 13px;
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.18s var(--ease), background-color 0.18s var(--ease);
}

.site-nav a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.site-nav a[aria-current="page"] {
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
}

.nav-ext {
  display: inline-block;
  margin-left: 5px;
  stroke: currentColor;
  stroke-width: 1.6;
  fill: none;
  vertical-align: 1px;
  opacity: 0.65;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-self: end;
}

.header-account {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-account-status {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.header-profile {
  min-width: 86px;
}

.header-signin {
  border-color: transparent;
  background: transparent;
}

.header-signin:hover {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.05);
}

.footer-account {
  display: flex;
  justify-content: flex-end;
}

.footer-account:has([data-account-signout]:not([hidden])) {
  margin-bottom: 22px;
}

.footer-signout {
  min-height: 34px;
  padding: 0 13px;
  font-size: 0.8rem;
}

.nav-toggle {
  display: none;
  position: relative;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  cursor: pointer;
}

.nav-toggle span {
  position: absolute;
  left: 12px;
  width: 14px;
  height: 1.5px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.22s var(--ease), top 0.22s var(--ease);
}

.nav-toggle span:first-child {
  top: 16px;
}

.nav-toggle span:last-child {
  top: 22px;
}

body.nav-open .nav-toggle span:first-child {
  top: 19px;
  transform: rotate(45deg);
}

body.nav-open .nav-toggle span:last-child {
  top: 19px;
  transform: rotate(-45deg);
}

/* Auth dialog */

.auth-dialog {
  width: min(440px, calc(100vw - 32px));
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 22px;
  background: var(--glass-strong);
  color: var(--text);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

.auth-dialog::backdrop {
  background: rgba(5, 5, 8, 0.74);
  backdrop-filter: blur(4px);
}

.auth-dialog-inner {
  padding: 24px;
}

.auth-dialog-heading {
  display: flex;
  align-items: center;
  gap: 14px;
}

.auth-dialog-spinner {
  width: 16px;
  height: 16px;
  flex: none;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.16);
  border-top-color: var(--accent-text);
  animation: auth-spin 0.9s linear infinite;
}

.auth-dialog[data-auth-state="error"] .auth-dialog-spinner {
  border-color: var(--accent);
  animation: none;
}

.auth-dialog[data-auth-state="waiting"] .auth-dialog-spinner,
.auth-dialog[data-auth-state="checking"] .auth-dialog-spinner {
  animation-duration: 0.9s;
}

@keyframes auth-spin {
  to {
    transform: rotate(360deg);
  }
}

.auth-dialog-kicker {
  color: var(--muted);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.auth-dialog-heading h2 {
  margin-top: 3px;
  font-size: 1.2rem;
  letter-spacing: -0.025em;
}

.auth-dialog-message {
  margin-top: 16px;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.55;
}

.auth-dialog-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 22px;
}

body.auth-dialog-open {
  overflow: hidden;
}

/* Footer */

.site-footer {
  margin-top: clamp(72px, 10vw, 120px);
  border-top: 1px solid var(--line);
  padding: 40px 0 28px;
}

.footer-bar {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1.85fr) auto;
  gap: 32px;
  align-items: start;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-brand .brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: -0.03em;
  text-decoration: none;
}

.footer-brand p {
  color: var(--muted);
  font-size: 0.9rem;
  max-width: 26ch;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  padding-top: 4px;
  font-size: 0.9rem;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.18s var(--ease);
}

.footer-links a:hover {
  color: var(--text);
}

.footer-top {
  display: inline-flex;
  align-items: center;
  padding: 7px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.84rem;
  text-decoration: none;
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease);
}

.footer-top:hover {
  color: var(--text);
  border-color: var(--line-strong);
}

.footer-fine {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin-top: 32px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.82rem;
}

/* Equal side columns keep the nav centred on the bar, not on the space left
   between differently sized account actions and the wordmark. */
@media (min-width: 981px) {
  .header-bar {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    padding-right: 18px;
  }

  .wordmark {
    justify-self: start;
  }

  .site-nav {
    justify-self: center;
  }

  .header-actions {
    grid-column: 3;
    justify-self: end;
  }
}

@media (max-width: 980px) {
  .header-bar {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 12px;
  }

  .site-nav {
    display: flex;
    position: absolute;
    z-index: 2;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 10px;
    border: 1px solid var(--line-strong);
    border-radius: 22px;
    background: #17171c;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.42);
    visibility: hidden;
    opacity: 0;
    transform: translateY(-8px) scale(0.97);
    transform-origin: 100% 0;
    clip-path: inset(0 0 calc(100% - 14px) 0 round 22px);
    pointer-events: none;
    transition:
      clip-path 0.38s var(--ease),
      opacity 0.22s var(--ease),
      transform 0.38s var(--ease),
      visibility 0s linear 0.38s;
  }

  /* A hairline that draws across the top edge as the panel unfolds. */
  .site-nav::after {
    content: "";
    position: absolute;
    top: 0;
    right: 22px;
    left: 22px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08) 18%, rgba(255, 140, 132, 0.55) 50%, rgba(255, 255, 255, 0.08) 82%, transparent);
    transform: scaleX(0);
    transform-origin: right center;
    transition: transform 0.38s var(--ease);
    pointer-events: none;
  }

  body.nav-open .site-nav {
    visibility: visible;
    opacity: 1;
    transform: translateY(0) scale(1);
    clip-path: inset(0 0 0 0 round 22px);
    pointer-events: auto;
    transition:
      clip-path 0.52s cubic-bezier(0.16, 1, 0.3, 1),
      opacity 0.28s var(--ease),
      transform 0.52s cubic-bezier(0.16, 1, 0.3, 1),
      visibility 0s;
  }

  body.nav-open .site-nav::after {
    transform: scaleX(1);
    transition: transform 0.46s cubic-bezier(0.16, 1, 0.3, 1) 0.08s;
  }

  .site-nav a {
    width: 100%;
    justify-content: space-between;
    padding: 12px 14px;
    font-size: 0.98rem;
    opacity: 0;
    transform: translateX(12px);
    clip-path: inset(-4px 100% -4px -4px);
    transition:
      clip-path 0.34s var(--ease),
      opacity 0.24s var(--ease),
      transform 0.34s var(--ease),
      color 0.18s var(--ease),
      background-color 0.18s var(--ease);
  }

  body.nav-open .site-nav a {
    opacity: 1;
    transform: translateX(0);
    clip-path: inset(-4px -4px -4px -4px);
    transition-duration: 0.46s, 0.3s, 0.46s, 0.18s, 0.18s;
  }

  body.nav-open .site-nav a:nth-child(1) {
    transition-delay: 0.09s, 0.06s, 0.09s, 0s, 0s;
  }

  body.nav-open .site-nav a:nth-child(2) {
    transition-delay: 0.14s, 0.1s, 0.14s, 0s, 0s;
  }

  body.nav-open .site-nav a:nth-child(3) {
    transition-delay: 0.19s, 0.14s, 0.19s, 0s, 0s;
  }

  body.nav-open .site-nav a:nth-child(4) {
    transition-delay: 0.24s, 0.18s, 0.24s, 0s, 0s;
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .footer-bar {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
  }

  .footer-top {
    justify-self: start;
  }
}

@media (max-width: 700px) {
  .site-header {
    top: 10px;
    margin-top: 10px;
  }

  .header-bar {
    min-height: 54px;
    padding: 7px 8px 7px 15px;
  }

  .header-account {
    gap: 4px;
  }

  .footer-bar {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .footer-fine {
    flex-direction: column;
    gap: 4px;
  }
}

/* 11-rail.css */
/* Detached tray header.
 *
 * Still a floating bar, because that shape works — but not a capsule and not a
 * centred pill nav:
 *
 *   - the tray is a rounded rect (16px), squared off enough that it reads as a
 *     panel rather than a lozenge, with a vertical sheen and one hairline;
 *   - the bar keeps the wordmark left and the account actions pinned right,
 *     while the primary links sit centred in the tray like tabs;
 *   - links are text with an accent tick underneath the current page, not pill
 *     highlights that make every link look like a button;
 *   - a scroll line runs along the tray's bottom edge, inset to the tray, so
 *     progress belongs to the bar instead of the viewport.
 *
 * Loads after 10-chrome.css on purpose: same selectors, later file, so the old
 * capsule rules stay in the sheet but no longer win. */

.site-header {
  position: sticky;
  top: 16px;
  z-index: 40;
  width: min(100% - (var(--gutter) * 2), var(--shell));
  margin: 16px auto 0;
  background: none;
  border: 0;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  transition: transform 0.48s var(--ease);
}

.site-header.is-hidden {
  transform: translate3d(0, calc(-100% - 32px), 0);
  pointer-events: none;
  transition-duration: 0.55s;
}

.header-bar {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 0;
  width: 100%;
  min-height: 64px;
  margin: 0;
  padding: 0 18px;
  border: 1px solid var(--line);
  /* Rounded enough to read as a lozenge when the nav is short, but the tray is
     wide, so it stays a panel rather than a capsule. */
  border-radius: 30px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0) 58%),
    color-mix(in srgb, var(--surface) 82%, transparent);
  box-shadow:
    0 16px 40px rgba(0, 0, 0, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(22px) saturate(1.15);
  -webkit-backdrop-filter: blur(22px) saturate(1.15);
  transition:
    min-height 0.28s var(--ease),
    background-color 0.28s var(--ease),
    border-color 0.28s var(--ease);
  overflow: hidden;
}

.site-header.is-stuck .header-bar {
  min-height: 56px;
  border-color: var(--line-strong);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0) 58%),
    color-mix(in srgb, var(--surface) 94%, transparent);
}

/* Scroll position: a 1px line across the tray's own bottom edge, inset so it
   never touches the rounded corners. */
.header-bar::after {
  content: "";
  position: absolute;
  right: 14px;
  bottom: 0;
  left: 14px;
  height: 1px;
  background: linear-gradient(90deg, var(--accent), var(--accent-text));
  transform: scaleX(0);
  transform-origin: left center;
  opacity: 0.9;
  pointer-events: none;
}

@keyframes tray-progress {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

@supports (animation-timeline: scroll()) {
  .header-bar::after {
    animation: tray-progress linear both;
    animation-timeline: scroll(root block);
  }
}

.wordmark {
  justify-self: start;
  padding-right: 16px;
  font-size: 0.92rem;
  letter-spacing: -0.03em;
}

/* Tabs, not pills: the current page is marked with a short accent rule under
   the word. The group is centred between the wordmark and account actions. */
.site-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  justify-self: center;
  gap: 2px;
  min-width: 0;
  font-size: 0.86rem;
  letter-spacing: 0.005em;
}

/* Every link reserves the border so the current one does not nudge the row. */
.site-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 7px 15px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
  background: none;
  transition:
    color 0.18s var(--ease),
    background-color 0.18s var(--ease),
    border-color 0.18s var(--ease);
}

.site-nav a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.045);
}

/* The current page keeps a ring rather than a fill, so it is still a link and
   not a button: a rounded outline, tinted towards the accent. */
.site-nav a[aria-current="page"] {
  color: var(--text);
  border-color: color-mix(in srgb, var(--accent) 52%, transparent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}

.site-nav a[aria-current="page"]:hover {
  border-color: color-mix(in srgb, var(--accent) 72%, transparent);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
}

.nav-ext {
  margin-left: 6px;
  opacity: 0.55;
}

.header-actions {
  justify-self: end;
  gap: 8px;
}

/* Sign in is the one solid object in the tray. */
.header-bar .header-signin {
  min-height: 36px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 0.82rem;
  font-weight: 600;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.header-bar .header-signin:hover {
  border-color: transparent;
  background: color-mix(in srgb, var(--accent) 86%, #fff);
  color: var(--on-accent);
}

.header-bar .header-signin:focus-visible {
  outline: 2px solid var(--accent-text);
  outline-offset: 2px;
}

.header-profile,
.header-upload {
  border-radius: 999px;
}

.nav-toggle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: transparent;
}

.nav-toggle span {
  left: 11px;
  width: 15px;
}

@media (max-width: 1180px) {
  .site-nav {
    padding-left: 0;
    gap: 0;
  }

  .site-nav a {
    padding: 8px 9px;
  }
}

@media (max-width: 980px) {
  .site-header {
    top: 12px;
    margin-top: 12px;
  }

  .header-bar {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 12px;
    min-height: 60px;
    padding: 0 8px 0 15px;
    border-radius: 22px;
    overflow: visible;
  }

  .site-nav {
    position: absolute;
    z-index: 2;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 6px;
    border: 1px solid var(--line-strong);
    border-radius: 14px;
    background: color-mix(in srgb, var(--surface) 96%, transparent);
    box-shadow: 0 26px 54px rgba(0, 0, 0, 0.46);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    visibility: hidden;
    opacity: 0;
    transform: translateY(-6px);
    pointer-events: none;
    transition:
      opacity 0.22s var(--ease),
      transform 0.3s var(--ease),
      visibility 0s linear 0.3s;
  }

  .site-nav::after {
    display: none;
  }

  body.nav-open .site-nav {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
    clip-path: none;
    pointer-events: auto;
    transition:
      opacity 0.24s var(--ease),
      transform 0.34s var(--ease),
      visibility 0s;
  }

  .site-nav a {
    width: 100%;
    justify-content: space-between;
    padding: 11px 14px;
    border-radius: 12px;
    font-size: 0.94rem;
    opacity: 1;
    transform: none;
    clip-path: none;
  }

  .site-nav a:first-of-type {
    border-top: 0;
  }

  body.nav-open .site-nav a {
    opacity: 1;
    transform: none;
    clip-path: none;
    transition-delay: 0s;
  }

  .site-header.is-stuck .header-bar {
    min-height: 54px;
  }
}

@media (max-width: 700px) {
  .site-header {
    top: 10px;
    margin-top: 10px;
  }

  .header-bar {
    min-height: 56px;
    padding: 0 7px 0 14px;
    border-radius: 20px;
  }

  .site-header.is-stuck .header-bar {
    min-height: 50px;
  }
}

@media (max-width: 450px) {
  .wordmark-text {
    display: none;
  }

  .wordmark {
    gap: 0;
    min-width: 44px;
    min-height: 44px;
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-header,
  .header-bar,
  .site-nav,
  .site-nav a,
  .site-nav a::after {
    transition: none;
  }

  .header-bar::after {
    animation: none;
    transform: scaleX(0);
  }
}

/* 20-home.css */
/* Home: one loud statement, then the details. */

.home-hero {
  padding: clamp(54px, 7vw, 92px) 0 0;
}

.home-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  gap: clamp(36px, 5.5vw, 76px);
  align-items: center;
}

.home-hero-copy {
  max-width: 40rem;
}

.hero-title {
  margin-top: 24px;
  font-size: var(--t-display);
  line-height: 0.9;
  letter-spacing: -0.06em;
}

.hero-title span {
  display: block;
}

.hero-title span:last-child {
  color: var(--muted);
}

.hero-sub {
  margin-top: 26px;
  max-width: 44ch;
  color: var(--muted);
  font-size: clamp(1.06rem, 1.4vw, 1.22rem);
  line-height: 1.62;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}

.hero-note {
  margin-top: 18px;
  color: var(--muted);
  font-size: 0.86rem;
}

/* Proof */

.home-proof {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: clamp(44px, 6vw, 72px);
  border-block: 1px solid var(--line);
}

.proof-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 22px 24px 22px 0;
  border-right: 1px solid var(--line);
}

.proof-item + .proof-item {
  padding-left: 24px;
}

.proof-item:last-child {
  border-right: 0;
}

.proof-value {
  font-size: clamp(1.9rem, 2.8vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.proof-label {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.4;
}

/* Feature */

.feature {
  padding: clamp(66px, 9vw, 108px) 0;
}

.feature-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(34px, 6vw, 78px);
  padding: clamp(28px, 4.5vw, 52px);
  border: 1px solid var(--line);
  border-radius: 26px;
  background:
    radial-gradient(70% 80% at 0% 0%, rgba(150, 22, 60, 0.14), transparent 62%),
    linear-gradient(150deg, rgba(255, 255, 255, 0.035), transparent 55%),
    var(--glass);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.feature-copy h2 {
  margin-top: 14px;
  font-size: clamp(2rem, 3.8vw, 3rem);
  max-width: 12ch;
}

.feature-copy .lede {
  margin-top: 18px;
  max-width: 42ch;
}

.feature-notes {
  display: flex;
  flex-direction: column;
  align-self: center;
}

.feature-note {
  display: grid;
  grid-template-columns: minmax(0, 7.2rem) minmax(0, 1fr);
  gap: 22px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}

.feature-note:last-child {
  border-bottom: 1px solid var(--line);
}

.feature-note h3 {
  font-size: 0.96rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.feature-note p {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.58;
  max-width: 46ch;
}

/* Add-ons */

.addons {
  padding: 0 0 clamp(66px, 9vw, 104px);
}

.addons-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(20px, 5vw, 72px);
  align-items: end;
  margin-bottom: 30px;
}

.addons-head h2 {
  margin-top: 12px;
  font-size: var(--t-h2);
}

.addons-head .lede {
  justify-self: end;
  max-width: 46ch;
}

.addon-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.addon-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--glass);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.18);
  transition: transform 0.28s var(--ease), border-color 0.28s var(--ease);
}

.addon-card:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
}

.addon-media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: #09090c;
}

.addon-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.addon-media::after {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
  pointer-events: none;
}

.addon-copy {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px;
}

.addon-copy h3 {
  font-size: var(--t-h3);
  letter-spacing: -0.03em;
}

.addon-tagline {
  color: var(--text);
  font-size: 0.92rem;
  line-height: 1.45;
}

.addon-blurb {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.55;
}

/* Privacy and community */

.duo {
  padding: 0 0 clamp(66px, 9vw, 104px);
}

.duo-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
}

.privacy-panel,
.community-panel {
  padding: clamp(24px, 3.2vw, 36px);
}

.privacy-panel h2,
.community-copy h2 {
  margin-top: 13px;
  font-size: clamp(1.7rem, 2.8vw, 2.2rem);
  max-width: 15ch;
}

.privacy-panel > p:not(.section-kicker) {
  margin-top: 16px;
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 1.62;
  max-width: 46ch;
}

.privacy-panel > p a {
  color: var(--text);
  text-decoration-color: var(--accent-text);
}

.privacy-panel .fine {
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px solid var(--line);
}

.community-panel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
}

.community-copy p {
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.58;
  max-width: 46ch;
}

.community-copy .text-link {
  margin-top: 18px;
}

.community-widget {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background:
    radial-gradient(110% 100% at 100% 0%, rgba(72, 201, 138, 0.05), transparent 58%),
    rgba(0, 0, 0, 0.18);
}

.community-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.community-identity {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 10px;
}

.community-mark {
  display: grid;
  place-items: center;
  flex: none;
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
}

.community-mark svg {
  display: block;
  width: 16px;
  height: 16px;
}

.community-identity-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 1px;
}

.community-name {
  overflow: hidden;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.community-sub {
  color: var(--muted);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  line-height: 1.2;
  text-transform: uppercase;
}

.community-count {
  display: inline-flex;
  align-items: center;
  flex: none;
  gap: 6px;
  padding: 4px 9px;
  border: 1px solid rgba(72, 201, 138, 0.18);
  border-radius: 999px;
  background: rgba(72, 201, 138, 0.07);
  color: var(--text);
  font-size: 0.76rem;
  line-height: 1.2;
  white-space: nowrap;
}

.community-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #48c98a;
  box-shadow: 0 0 0 3px rgba(72, 201, 138, 0.1);
}

.community-status {
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.84rem;
}

.community-people {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 18px;
  margin-top: 4px;
}

.community-person {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}

.community-avatar {
  position: relative;
  flex: none;
  width: 30px;
  height: 30px;
}

.community-face {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.community-face-fallback {
  display: grid;
  place-items: center;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.community-state {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.24);
  box-shadow: 0 0 0 2px #141419;
}

.community-person[data-status="online"] .community-state {
  background: #48c98a;
}

.community-person[data-status="idle"] .community-state {
  background: #d9a441;
}

.community-person[data-status="dnd"] .community-state {
  background: var(--accent);
}

.community-person-copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  gap: 1px;
}

.community-person-name {
  overflow: hidden;
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.community-person-meta {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.community-more {
  display: block;
  grid-column: 1 / -1;
  padding: 10px 0 0;
  border-bottom: 0;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.4;
}

.community-source {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.45;
}

/* Sources */

.credits {
  padding: clamp(58px, 8vw, 92px) 0;
  border-top: 1px solid var(--line);
}

.credits-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(34px, 6vw, 86px);
}

.credits-head h2 {
  margin-top: 13px;
  font-size: var(--t-h2);
  max-width: 12ch;
}

.credits-head .lede {
  margin-top: 18px;
  max-width: 40ch;
}

.credit-list {
  border-top: 1px solid var(--line);
}

.credit {
  display: grid;
  grid-template-columns: minmax(0, 7.5rem) minmax(0, 1fr);
  gap: 24px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.credit dt {
  color: var(--muted);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.credit dd strong {
  display: block;
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.credit dd p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
  max-width: 50ch;
}

.credits-note {
  margin-top: 18px;
  color: var(--muted);
  font-size: 0.84rem;
}

/* Closer */

.closer {
  padding: 0 0 clamp(64px, 9vw, 100px);
}

.closer .shell {
  position: relative;
  overflow: hidden;
  padding: clamp(30px, 5vw, 58px);
  border: 1px solid var(--line);
  border-radius: 26px;
  background:
    radial-gradient(70% 120% at 92% 10%, rgba(199, 24, 66, 0.22), transparent 62%),
    linear-gradient(150deg, rgba(255, 255, 255, 0.045), transparent 52%),
    var(--surface);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.26);
}

.closer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.78fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: end;
}

.closer h2 {
  margin-top: 12px;
  font-size: clamp(2.6rem, 6vw, 4.8rem);
  letter-spacing: -0.055em;
}

.closer-copy p {
  color: var(--muted);
  max-width: 38ch;
}

.closer .btn {
  margin-top: 20px;
}

@media (max-width: 1000px) {
  .home-hero-grid,
  .feature-panel,
  .duo-grid,
  .credits-grid,
  .closer-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .home-hero-copy {
    max-width: 42rem;
  }

  .addons-head {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  .addons-head .lede {
    justify-self: start;
  }

  .addon-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .addon-card:last-child {
    grid-column: 1 / -1;
  }

  .closer-grid {
    align-items: start;
  }

  .closer-copy {
    max-width: 34rem;
  }
}

@media (max-width: 760px) {
  .home-hero {
    padding-top: 38px;
  }

  .home-proof {
    grid-template-columns: minmax(0, 1fr);
  }

  .proof-item {
    padding: 16px 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .proof-item + .proof-item {
    padding-left: 0;
  }

  .proof-item:last-child {
    border-bottom: 0;
  }

  .community-people {
    grid-template-columns: minmax(0, 1fr);
  }

  .feature-note,
  .credit {
    grid-template-columns: minmax(0, 1fr);
    gap: 5px;
  }

  .addon-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .addon-card:last-child {
    grid-column: auto;
  }

}

/* 25-home-lab.css */
/* Chosen home layout: centered poster hero. */

/* B. Poster */

.lab-b-hero {
  padding-top: clamp(60px, 8vw, 104px);
}

.lab-b-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.lab-b-head .hero-title {
  margin-top: 22px;
  font-size: clamp(4rem, 9.6vw, 9rem);
  line-height: 0.85;
  letter-spacing: -0.065em;
}

.lab-b-head .hero-sub {
  max-width: 54ch;
  margin-top: 24px;
  text-align: center;
}

.lab-b-head .hero-actions {
  justify-content: center;
}

.lab-b-head .hero-note {
  text-align: center;
}

body.lab-b .addons-head {
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  gap: 14px;
  text-align: center;
}

body.lab-b .addons-head > div {
  width: 100%;
}

body.lab-b .addons-head .section-kicker {
  justify-content: flex-start;
}

body.lab-b .addons-head .lede {
  justify-self: center;
  max-width: 52ch;
}

body.lab-b .feature-panel {
  grid-template-columns: minmax(0, 1fr);
  gap: 38px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  text-align: center;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

body.lab-b .feature-copy h2 {
  max-width: 16ch;
  margin-inline: auto;
}

body.lab-b .feature-copy .lede {
  margin-inline: auto;
}

body.lab-b .feature-notes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}

body.lab-b .feature-note {
  display: block;
  padding: 20px 22px;
  border-top: 0;
  border-right: 1px solid var(--line);
  text-align: left;
}

body.lab-b .feature-note:last-child {
  border-right: 0;
  border-bottom: 0;
}

@media (max-width: 1000px) {
  .lab-b-head .hero-title {
    font-size: clamp(3.4rem, 11vw, 7rem);
  }

  body.lab-b .feature-notes {
    grid-template-columns: minmax(0, 1fr);
    border-top: 0;
  }

  body.lab-b .feature-note {
    padding-inline: 0;
    border-top: 1px solid var(--line);
    border-right: 0;
  }

  body.lab-b .feature-note:last-child {
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 760px) {
  .lab-b-hero {
    padding-top: 38px;
  }

  .lab-b-head .hero-title {
    font-size: clamp(3rem, 15vw, 4.6rem);
  }
}

/* 27-home-stage.css */
/* Home: a centred statement, then the things around the player. */

body.home-stage {
  background: #08090c;
}

/* The logo itself becomes the wash. Keep it dim enough for the type to sit
   over, but brighter than the old graphite-only page. */
.home-stage .kawarp {
  display: block;
  transition-duration: 0.8s;
}

.home-stage .kawarp.is-on {
  opacity: 0.54;
  filter: blur(2px);
}

.home-stage .kawarp::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(8, 9, 12, 0.28);
  pointer-events: none;
}

/* A faint fixed grain breaks the last bit of gradient banding without
   sitting over the text or the header. */
body.home-stage::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
  background-size: 160px 160px;
  opacity: 0.065;
  mix-blend-mode: soft-light;
  pointer-events: none;
}

/* No entrance fade. The page is already there when it paints. */
html.js body.home-stage .hero-title > span,
html.js body.home-stage .hero-sub,
html.js body.home-stage .hero-actions,
html.js body.home-stage .hero-note {
  opacity: 1;
}

/* Hero */

.stage-hero {
  /* Keep the first section below the fold so the landing view is only the
     hero; it reveals once the page is scrolled. */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 80px);
  min-height: calc(100svh - 80px);
  padding: 0;
  text-align: center;
}

.stage-hero > .shell {
  width: 100%;
}

.stage-eyebrow {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 500;
}

.home-stage .stage-title {
  max-width: 12ch;
  margin: 18px auto 0;
  font-size: clamp(3.3rem, 7.1vw, 6.3rem);
  line-height: 0.87;
  letter-spacing: -0.065em;
}

.home-stage .stage-title > span {
  display: block;
  color: var(--text);
}

.home-stage .stage-title .stage-dot {
  display: inline;
  color: var(--accent-text);
}

.stage-intro {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  margin-top: 28px;
}

.home-stage .stage-sub {
  max-width: 58ch;
  margin: 0 auto;
  color: var(--muted);
  font-size: clamp(1.04rem, 1.35vw, 1.18rem);
  line-height: 1.62;
  text-align: center;
}

.home-stage .stage-actions {
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 0;
}

.home-stage .stage-note {
  margin-top: -8px;
  color: var(--muted);
  font-size: 0.76rem;
  text-align: center;
}

.stage-facts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 28px;
  max-width: 880px;
  margin: clamp(32px, 4vw, 46px) auto 0;
}

.stage-facts li {
  padding: 0;
  color: var(--muted);
  font-size: 0.82rem;
  text-align: center;
}

.stage-facts strong {
  margin-right: 4px;
  color: var(--text);
  font-size: 1rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* Sections, with no rules between them. */

.stage-section {
  padding: clamp(86px, 10vw, 128px) 0;
}

/* Renderers: three bordered panels, each carrying its own logo. */

.stage-renderers-head {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  align-items: end;
  gap: clamp(24px, 5vw, 72px);
}

.stage-renderers .stage-label {
  text-align: left;
}

.stage-renderers h2 {
  max-width: 12ch;
  margin: 0;
  font-size: clamp(2.5rem, 4.6vw, 3.8rem);
  line-height: 0.94;
  letter-spacing: -0.06em;
  text-align: left;
}

.stage-renderers h2 span {
  color: var(--muted);
}

.stage-renderers .stage-lede {
  max-width: 52ch;
  margin: 0;
  text-align: left;
}

.stage-renderer-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(18px, 2vw, 24px);
  margin-top: clamp(46px, 6vw, 72px);
}

.stage-renderer {
  --renderer-accent: var(--accent-text);
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 16px 22px 22px;
  border: 1px solid color-mix(in srgb, var(--renderer-accent) 26%, var(--line));
  border-radius: var(--radius-card);
  background:
    linear-gradient(150deg, color-mix(in srgb, var(--renderer-accent) 7%, transparent), transparent 52%),
    color-mix(in srgb, var(--surface) 38%, transparent);
  text-align: left;
}

.stage-renderer[data-renderer="spicy"] {
  --renderer-accent: #a98cff;
}

.stage-renderer[data-renderer="apple"] {
  --renderer-accent: #f4f4f7;
}

.stage-renderer[data-renderer="braccato"] {
  --renderer-accent: #f20c32;
}

.stage-renderer-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.stage-renderer-logo {
  width: 32px;
  height: 32px;
  flex: none;
  border-radius: 9px;
  object-fit: contain;
}

.stage-renderer-index {
  color: var(--renderer-accent);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.stage-renderer h3 {
  margin-top: 4px;
  font-size: clamp(1.5rem, 2.2vw, 1.9rem);
  letter-spacing: -0.04em;
}

.stage-renderer h3 a {
  color: inherit;
  text-decoration: none;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
  transition: color 0.18s var(--ease);
}

.stage-renderer h3 a:hover {
  color: var(--renderer-accent);
  text-decoration: underline;
}

.stage-renderer-meta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.stage-renderer-body {
  max-width: 32ch;
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.65;
}

.stage-split {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
}

.stage-label {
  margin-bottom: 0;
  color: var(--accent-text);
  font-size: 0.74rem;
  font-weight: 700;
  text-align: center;
}

.stage-split h2,
.stage-privacy h2 {
  max-width: 20ch;
  margin: 0 auto;
  font-size: clamp(2.35rem, 4.3vw, 3.55rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
  text-align: center;
}

.stage-lede {
  max-width: 60ch;
  margin: 0 auto;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.66;
  text-align: center;
}

.stage-lede a,
.stage-body a {
  color: var(--text);
  text-decoration-color: var(--accent-text);
}

.stage-points {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(26px, 4vw, 46px);
  max-width: 1060px;
  margin: clamp(38px, 5vw, 54px) auto 0;
}

.stage-point {
  padding: 0;
  text-align: center;
}

.stage-point h3 {
  font-size: clamp(1.1rem, 1.6vw, 1.3rem);
  letter-spacing: -0.025em;
}

.stage-point p {
  max-width: 32ch;
  margin: 8px auto 0;
  color: var(--muted);
  font-size: 0.93rem;
  line-height: 1.62;
  text-align: center;
}

/* Add-ons */

.stage-addons {
  background: rgba(8, 9, 12, 0.52);
}

.stage-showcase {
  padding: clamp(26px, 4vw, 48px) 0 0;
}

.stage-showcase-inner {
  width: min(100% - (var(--gutter) * 2), 1440px);
  margin-inline: auto;
}

.stage-media-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(14px, 2vw, 22px);
}

.stage-media {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #09090c;
  /* Deliberately flat: the clips are the only visual edge in this row. */
  box-shadow: none;
}

.stage-media video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  background: #09090c;
  object-fit: cover;
}

.stage-addon-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(26px, 4vw, 46px);
  max-width: 1060px;
  margin: clamp(34px, 4vw, 46px) auto 0;
}

.stage-addon {
  padding: 0;
  text-align: center;
}

.stage-addon-tag {
  margin-bottom: 8px;
  color: var(--accent-text);
  font-size: 0.74rem;
  text-align: center;
}

.stage-addon-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.stage-addon-title h3 {
  margin: 0;
}

.stage-addon-logo {
  width: 30px;
  height: 30px;
  flex: none;
  border-radius: 8px;
  object-fit: contain;
}

.stage-addon h3 {
  font-size: clamp(1.45rem, 2.3vw, 1.9rem);
  letter-spacing: -0.045em;
}

.stage-addon > p a {
  color: var(--text);
  text-decoration-color: var(--line-strong);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  transition: color 0.18s var(--ease), text-decoration-color 0.18s var(--ease);
}

.stage-addon > p a:hover {
  color: var(--accent-text);
  text-decoration-color: currentColor;
}

.stage-addon > p a .nav-ext,
.stage-renderer h3 a .nav-ext {
  width: 9px;
  height: 9px;
  margin-left: 4px;
  opacity: 0.8;
  vertical-align: 1px;
}

.stage-addon > p:last-child {
  max-width: 32ch;
  margin: 8px auto 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.64;
  text-align: center;
}

.stage-footnote {
  margin-top: 24px;
  color: var(--muted);
  font-size: 0.8rem;
  text-align: center;
}

/* Privacy and the Discord widget */

.stage-privacy-grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(34px, 5vw, 52px);
  text-align: center;
}

.stage-privacy h2 span {
  color: var(--accent-text);
}

.stage-body {
  max-width: 62ch;
  margin: 18px auto 0;
  color: var(--muted);
  font-size: 0.97rem;
  line-height: 1.68;
  text-align: center;
}

.stage-fine {
  max-width: 62ch;
  margin: 14px auto 0;
  padding: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.6;
  text-align: center;
}

.stage-community {
  width: 100%;
  max-width: 460px;
  padding: 0;
  text-align: center;
}

.stage-community h3 {
  font-size: clamp(1.4rem, 2.2vw, 1.7rem);
  letter-spacing: -0.03em;
}

.stage-community > p:not(.stage-label) {
  max-width: 42ch;
  margin: 10px auto 0;
  color: var(--muted);
  font-size: 0.93rem;
  line-height: 1.64;
  text-align: center;
}

.stage-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 8px;
  border-bottom: 1px solid var(--accent-text);
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
  transition: color 0.2s var(--ease);
}

.stage-link:hover {
  color: var(--accent-text);
}

.stage-community .community-widget {
  margin-top: 18px;
  text-align: left;
}

.stage-community .community-people {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.stage-community .community-head,
.stage-community .community-person {
  border-color: rgba(255, 255, 255, 0.07);
}

/* Sources */

.stage-sources {
  padding: clamp(52px, 7vw, 76px) 0;
  text-align: center;
}

.stage-sources-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.stage-sources h2 {
  max-width: 20ch;
  margin: 0 auto;
  font-size: clamp(1.35rem, 2vw, 1.65rem);
  letter-spacing: -0.035em;
  text-align: center;
}

.stage-source-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 30px;
}

.stage-source-list li {
  padding: 0;
}

.stage-source-list strong {
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.stage-source-note {
  margin-top: 22px;
  color: var(--muted);
  font-size: 0.78rem;
  text-align: center;
}

/* Close */

.stage-close {
  position: relative;
  padding: clamp(96px, 11vw, 144px) 0;
  text-align: center;
}

.stage-close::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(60% 125% at 50% 108%, rgba(217, 15, 63, 0.2), transparent 66%);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 72%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 0%, #000 72%, transparent 100%);
  pointer-events: none;
}

.stage-close > .shell {
  position: relative;
}

.stage-close-grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 26px;
}

.stage-close h2 {
  font-size: clamp(3.1rem, 6vw, 5.4rem);
  line-height: 0.86;
  letter-spacing: -0.07em;
  text-align: center;
}

.stage-close-copy {
  display: flex;
  justify-content: center;
}

.home-stage .site-footer {
  margin-top: 0;
  border-top: 0;
  background: transparent;
}

.home-stage .footer-fine {
  border-top: 0;
}

/* Responsive */

@media (max-width: 820px) {
  .stage-points,
  .stage-addon-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 30px;
    max-width: 520px;
  }

  .stage-points {
    margin-top: 34px;
  }

  .stage-media-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .stage-renderers-head {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }

  .stage-renderers h2 {
    max-width: none;
  }

  .stage-renderers .stage-lede {
    max-width: 48ch;
  }

  .stage-renderer-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
    margin-top: 36px;
  }

  .stage-renderer {
    max-width: none;
    padding: 16px 20px 22px;
  }

  .stage-addon-grid {
    margin-top: 30px;
  }
}

@media (max-width: 720px) {
  .stage-hero {
    min-height: calc(100vh - 84px);
    min-height: calc(100svh - 84px);
  }

  .home-stage .stage-title {
    font-size: clamp(2.9rem, 14vw, 4rem);
  }

  .stage-facts {
    gap: 6px 18px;
  }

  .stage-section {
    padding: 72px 0;
  }

  .stage-split h2,
  .stage-privacy h2 {
    font-size: clamp(2.1rem, 10vw, 2.9rem);
  }

  .stage-close h2 {
    font-size: clamp(2.9rem, 14vw, 4rem);
  }
}

@media (max-width: 520px) {
  .stage-community .community-people {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-stage .kawarp {
    display: none;
  }

  .stage-link {
    transition: none;
  }
}

/* 30-pages.css */
.page-head {
  padding: clamp(54px, 7.5vw, 88px) 0 clamp(32px, 4.5vw, 48px);
}

.page-head-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(22px, 4vw, 60px);
  align-items: end;
}

.page-head h1 {
  font-size: clamp(2.8rem, 6vw, 4.6rem);
  line-height: 0.96;
  letter-spacing: -0.05em;
  max-width: 16ch;
}

.page-head-grid > .lede {
  justify-self: end;
  max-width: 40ch;
}

.section-tight {
  padding-bottom: clamp(56px, 8vw, 96px);
}

.faq-title {
  margin-top: clamp(40px, 6vw, 64px);
  font-size: 1.5rem;
  letter-spacing: -0.03em;
}

.form-title {
  margin-bottom: 16px;
  font-size: 1.25rem;
  letter-spacing: -0.025em;
}

/* Install */

.install-grid {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 8fr);
  gap: clamp(28px, 5vw, 66px);
  align-items: start;
}

.install-facts {
  position: sticky;
  top: 102px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.fact-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.9rem;
}

.fact-row:last-child {
  border-bottom: 0;
}

.fact-row span:first-child {
  color: var(--muted);
}

.fact-row span:last-child {
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.install-body {
  padding: clamp(22px, 3.5vw, 36px);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.steps {
  counter-reset: step;
  border-top: 1px solid var(--line);
}

.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr);
  gap: 18px;
  align-items: baseline;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
  max-width: 62ch;
}

.steps li::before {
  content: counter(step, decimal-leading-zero);
  color: var(--accent-text);
  font-size: 0.82rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.steps li span {
  font-size: 1.03rem;
  line-height: 1.5;
}

.install-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.install-help {
  margin-top: 16px;
}

/* FAQ */

.faq {
  margin-top: 26px;
  border-top: 1px solid var(--line);
}

.faq-item {
  border-bottom: 1px solid var(--line);
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 17px 0;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  color: var(--muted);
  font-weight: 400;
  font-size: 1.25rem;
  line-height: 1;
}

.faq-item[open] summary::after {
  content: "\2212";
}

.faq-body {
  overflow: hidden;
}

.faq-body p {
  padding: 0 0 20px;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.6;
  max-width: 62ch;
}

/* Changelog */

.release-index {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  padding: 16px 0 0;
  border-top: 1px solid var(--line);
  font-size: 0.88rem;
  font-variant-numeric: tabular-nums;
}

.release-index a {
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease);
}

.release-index a:hover {
  color: var(--text);
  border-color: var(--line-strong);
}

.log-list {
  border-top: 1px solid var(--line);
}

.release {
  display: grid;
  grid-template-columns: minmax(0, 8rem) minmax(0, 1fr);
  gap: clamp(20px, 4vw, 56px);
  padding: 30px 0 34px;
  border-bottom: 1px solid var(--line);
}

.release-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 4px;
}

.release-version {
  font-size: 0.98rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.release-meta time {
  color: var(--muted);
  font-size: 0.84rem;
}

.release h2 {
  font-size: 1.4rem;
  letter-spacing: -0.03em;
  max-width: 34ch;
}

.release-list {
  margin-top: 16px;
  max-width: 68ch;
}

.release-list li {
  display: grid;
  grid-template-columns: minmax(0, 6.5rem) minmax(0, 1fr);
  gap: 18px;
  padding: 7px 0;
  font-size: 0.94rem;
  line-height: 1.55;
}

.release-kind {
  padding-top: 2px;
  color: var(--muted);
  font-size: 0.82rem;
}

.release .fine {
  margin-top: 12px;
}

/* Documents */

.doc-grid {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 8fr);
  gap: clamp(28px, 5vw, 66px);
  align-items: start;
  padding-bottom: clamp(56px, 8vw, 96px);
}

.doc-toc {
  position: sticky;
  top: 102px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.doc-toc h2 {
  padding: 0 0 10px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.doc-toc a {
  display: block;
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
  text-decoration: none;
}

.doc-toc a:last-child {
  border-bottom: 0;
}

.doc-toc a:hover {
  color: var(--text);
}

.prose {
  max-width: 68ch;
  font-size: 1.01rem;
  line-height: 1.7;
}

.prose > * + * {
  margin-top: 18px;
}

.prose h2 {
  margin-top: 40px;
  font-size: 1.4rem;
  letter-spacing: -0.03em;
}

.prose h2 + * {
  margin-top: 12px;
}

.prose h3 {
  margin-top: 28px;
  font-size: 1.08rem;
}

.prose ul {
  padding-left: 0;
}

.prose li {
  position: relative;
  padding-left: 20px;
}

.prose li + li {
  margin-top: 8px;
}

.prose li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.68em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--line-strong);
}

.prose a {
  color: var(--accent-text);
}

.prose strong {
  color: var(--text);
  font-weight: 600;
}

.prose code {
  padding: 1px 5px;
  border-radius: 5px;
  background: var(--surface-2);
  font-family: var(--font-mono);
  font-size: 0.875em;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.prose th,
.prose td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

.prose th {
  background: var(--surface);
  color: var(--muted);
  font-weight: 500;
}

.prose tr:last-child td {
  border-bottom: 0;
}

/* Takedown */

.takedown-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr);
  gap: clamp(32px, 6vw, 82px);
  align-items: start;
  padding-bottom: clamp(56px, 8vw, 96px);
}

.takedown-copy h2 {
  margin-top: 34px;
  font-size: 1.24rem;
  letter-spacing: -0.025em;
}

.takedown-copy h2:first-child {
  margin-top: 0;
}

.takedown-copy p,
.takedown-copy li {
  margin-top: 12px;
  color: var(--muted);
  max-width: 58ch;
}

.takedown-copy ul {
  margin-top: 14px;
}

.takedown-copy li {
  position: relative;
  padding-left: 18px;
}

.takedown-copy li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.66em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--line-strong);
}

.contact-form {
  padding: clamp(20px, 3vw, 28px);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--glass);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.field + .field {
  margin-top: 18px;
}

.field label {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 0.84rem;
}

.control {
  position: relative;
}

.control input,
.control textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.2);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 1rem;
  line-height: 1.5;
  resize: vertical;
  transition: border-color 0.18s var(--ease), background-color 0.18s var(--ease);
}

.control input:focus,
.control textarea:focus {
  outline: none;
  border-color: var(--accent-text);
  background: rgba(0, 0, 0, 0.3);
}

.control input::placeholder,
.control textarea::placeholder {
  color: #6f6f7a;
}

.caret-mirror {
  position: absolute;
  inset: 0;
  visibility: hidden;
  pointer-events: none;
  white-space: pre-wrap;
  overflow: hidden;
}

.type-caret {
  position: absolute;
  top: 0;
  left: 0;
  width: 1.5px;
  background: var(--accent-text);
  opacity: 0;
  pointer-events: none;
}

.type-caret.is-on {
  opacity: 1;
}

.form-foot {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 22px;
}

.form-note {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
  max-width: 34ch;
}

.form-note a {
  color: var(--text);
}

.form-status {
  min-height: 1.4em;
  margin-top: 14px;
  color: var(--accent-text);
  font-size: 0.84rem;
}

/* Not found */

.notfound {
  display: flex;
  align-items: center;
  min-height: 62vh;
  padding: clamp(48px, 8vw, 96px) 0;
}

.notfound h1 {
  font-size: clamp(2.8rem, 6vw, 4.8rem);
  letter-spacing: -0.055em;
  max-width: 18ch;
}

.notfound .lede {
  margin-top: 18px;
}

.notfound .btn {
  margin-top: 28px;
}

@media (max-width: 980px) {
  .page-head-grid,
  .install-grid,
  .doc-grid,
  .takedown-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .page-head-grid > .lede {
    justify-self: start;
  }

  .install-facts,
  .doc-toc {
    position: static;
  }

  .release {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .release-meta {
    flex-direction: row;
    align-items: baseline;
    gap: 12px;
  }
}

@media (max-width: 720px) {
  .steps li,
  .release-list li {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }

  .steps li::before {
    margin-bottom: 2px;
  }

  .install-body {
    padding: 18px;
  }
}

/* 32-submit.css */
/* Submit a TTML: one solid form, one quiet rail. The form is the only object
   that needs attention, so it is the only one that leaves the page surface. */

/* This page is a standalone upload surface: no site tray above it and no
   page-wide red wash behind it. */
body.submit-standalone {
  background: var(--bg);
}

body.submit-standalone .site-header {
  display: none;
}

.submit-back-row {
  padding-top: clamp(18px, 3vw, 28px);
  animation: submit-rise 0.45s var(--ease) backwards;
}

.submit-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 14px 0 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 76%, transparent);
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 600;
  text-decoration: none;
  transition:
    color 0.18s var(--ease),
    border-color 0.18s var(--ease),
    background-color 0.18s var(--ease),
    transform 0.18s var(--ease);
}

.submit-back:hover {
  color: var(--text);
  border-color: var(--line-strong);
  background: var(--surface-2);
  transform: translateX(-2px);
}

.submit-back:focus-visible {
  outline: 2px solid var(--accent-text);
  outline-offset: 2px;
}

.submit-back-icon {
  width: 16px;
  height: 16px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.submit-head {
  padding-top: clamp(18px, 2.5vw, 28px);
  padding-bottom: clamp(24px, 3vw, 34px);
  animation: submit-rise 0.5s var(--ease) 0.05s backwards;
}

.submit-body {
  padding-bottom: clamp(48px, 7vw, 80px);
}

.submit-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 0.5fr);
  gap: clamp(24px, 4vw, 48px);
  align-items: start;
  animation: submit-rise 0.55s var(--ease) 0.12s backwards;
}

.submit-form {
  padding: clamp(20px, 3vw, 30px);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface);
  animation: submit-surface-in 0.38s var(--ease) backwards;
  transition: opacity 0.18s var(--ease), transform 0.18s var(--ease);
}

.submit-page [data-submit-form] {
  display: none;
}

html.js .submit-page [data-submit-form] {
  display: block;
}

.submit-form.is-submitting {
  opacity: 0;
  transform: translateY(-6px);
}

.submit-form-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 20px;
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.submit-form-head h2 {
  font-size: 1.32rem;
  letter-spacing: -0.03em;
}

.submit-form-head p {
  color: var(--muted);
  font-size: 0.82rem;
}

.submit-field {
  min-width: 0;
}

.submit-field + .submit-field {
  margin-top: 22px;
}

.submit-note-field {
  display: grid;
  grid-template-rows: 1fr;
  visibility: visible;
  transition:
    grid-template-rows 0.3s var(--ease),
    opacity 0.2s var(--ease),
    margin-top 0.3s var(--ease),
    visibility 0s linear 0s;
}

.submit-note-field > .submit-note-collapse {
  min-height: 0;
  overflow: hidden;
}

.submit-page[data-state="publisher"] .submit-note-field {
  grid-template-rows: 0fr;
  margin-top: 0;
  opacity: 0;
  visibility: hidden;
  transition:
    grid-template-rows 0.3s var(--ease),
    opacity 0.16s var(--ease),
    margin-top 0.3s var(--ease),
    visibility 0s linear 0.3s;
}

fieldset.submit-field {
  margin: 0;
  padding: 0;
  border: 0;
}

.submit-label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: color 0.18s var(--ease);
}

.submit-field:focus-within .submit-label {
  color: var(--text);
}

.submit-input {
  width: 100%;
  min-height: 48px;
  padding: 11px 13px;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 10px;
  background: #101013;
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 1rem;
  line-height: 1.5;
  transition: border-color 0.18s var(--ease), background-color 0.18s var(--ease);
}

.submit-input::placeholder {
  color: #8f8f9b;
}

.submit-input:hover {
  border-color: rgba(255, 255, 255, 0.46);
}

.submit-input:focus {
  border-color: var(--accent-text);
  background: #0d0d10;
  outline: none;
}

.submit-input:focus-visible {
  outline: 2px solid var(--accent-text);
  outline-offset: 2px;
}

.submit-textarea {
  min-height: 96px;
  resize: vertical;
}

.submit-drop {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  width: 100%;
  min-height: 186px;
  padding: clamp(20px, 3vw, 28px);
  border: 1.5px dashed rgba(255, 255, 255, 0.36);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.015);
  text-align: center;
  transition:
    border-color 0.2s var(--ease),
    background-color 0.2s var(--ease),
    transform 0.22s var(--ease),
    box-shadow 0.22s var(--ease);
}

.submit-drop.is-dragging {
  border-color: var(--accent-text);
  background: rgba(217, 15, 63, 0.07);
  transform: scale(1.008);
  box-shadow: 0 0 0 4px rgba(217, 15, 63, 0.08);
}

.submit-drop.is-invalid {
  border-color: var(--accent-text);
}

.submit-drop:focus-within {
  border-color: var(--accent-text);
}

.submit-drop[data-filled="true"] {
  border-style: solid;
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.02);
}

.submit-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  border: 0;
  clip-path: inset(50%);
  white-space: nowrap;
}

.submit-drop-empty {
  display: grid;
  grid-area: 1 / 1;
  justify-items: center;
  gap: 6px;
  width: 100%;
  transition: opacity 0.24s var(--ease), transform 0.24s var(--ease), visibility 0.24s;
}

.submit-drop-title {
  font-size: 1rem;
  font-weight: 600;
}

.submit-drop-hint {
  color: var(--muted);
  font-size: 0.86rem;
}

.submit-drop-note {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.78rem;
}

.submit-drop .btn {
  margin-top: 8px;
  min-height: 40px;
}

.submit-file-row {
  display: flex;
  grid-area: 1 / 1;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  text-align: left;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  pointer-events: none;
  transition: opacity 0.24s var(--ease), transform 0.24s var(--ease), visibility 0.24s;
}

.submit-drop[data-filled="true"] .submit-drop-empty {
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  pointer-events: none;
}

.submit-drop[data-filled="true"] .submit-file-row {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.submit-file-copy {
  min-width: 0;
}

.submit-file-name {
  overflow: hidden;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.submit-file-meta {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.78rem;
}

.submit-file-remove {
  min-height: 40px;
  padding: 0 10px;
  border: 0;
  background: none;
  color: var(--accent-text);
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.2em;
  cursor: pointer;
}

.submit-kind-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.submit-kind-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-height: 64px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 10px;
  background: #101013;
  cursor: pointer;
  transition: border-color 0.18s var(--ease), background-color 0.18s var(--ease);
}

.submit-kind-option:hover {
  border-color: rgba(255, 255, 255, 0.46);
}

.submit-kind-option:has(input:checked) {
  border-color: var(--accent-text);
  background: #15151a;
}

.submit-kind-option input {
  width: 16px;
  height: 16px;
  flex: none;
  margin: 3px 0 0;
  accent-color: var(--accent-text);
}

.submit-kind-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.submit-kind-copy strong {
  font-size: 0.9rem;
  font-weight: 600;
}

.submit-kind-copy small {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.4;
}

.submit-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  margin-top: 26px;
}

.submit-actions .btn-primary {
  min-width: 180px;
}

.submit-hint {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.5;
}

.submit-actions .submit-hint {
  max-width: 32ch;
}

.submit-count {
  margin-top: 6px;
  font-variant-numeric: tabular-nums;
}

.submit-status {
  min-height: 1.2em;
  margin-top: 12px;
  color: var(--accent-text);
  font-size: 0.84rem;
}

.submit-error {
  margin-top: 8px;
  color: var(--accent-text);
  font-size: 0.82rem;
  line-height: 1.5;
}

.submit-error:not([hidden]) {
  animation: submit-slide-in 0.22s var(--ease);
}

.submit-alert {
  margin-bottom: 18px;
  padding: 10px 12px;
  border: 1px solid rgba(217, 15, 63, 0.5);
  border-radius: 10px;
  background: rgba(217, 15, 63, 0.1);
  color: var(--text);
  font-size: 0.86rem;
}

.submit-alert:not([hidden]) {
  animation: submit-slide-in 0.22s var(--ease);
}

.submit-receipt,
.submit-gate {
  padding: clamp(22px, 3.5vw, 34px);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface);
  animation: submit-surface-in 0.38s var(--ease) backwards;
}

.submit-receipt:focus-visible {
  outline: 2px solid var(--accent-text);
  outline-offset: 4px;
}

.submit-receipt-kicker {
  color: var(--accent-text);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.submit-receipt h2,
.submit-gate h2 {
  margin-top: 8px;
  font-size: clamp(1.5rem, 3vw, 2rem);
  letter-spacing: -0.04em;
}

.submit-receipt-copy,
.submit-gate p {
  max-width: 52ch;
  margin-top: 12px;
  color: var(--muted);
}

.submit-receipt-facts {
  margin-top: 22px;
  border-top: 1px solid var(--line);
}

.submit-receipt-facts > div {
  display: grid;
  grid-template-columns: 5rem minmax(0, 1fr);
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  animation: submit-rise 0.35s var(--ease) backwards;
}

.submit-receipt-facts > div:nth-child(2) {
  animation-delay: 0.04s;
}

.submit-receipt-facts > div:nth-child(3) {
  animation-delay: 0.08s;
}

.submit-receipt-facts dt {
  color: var(--muted);
  font-size: 0.8rem;
}

.submit-receipt-facts dd {
  margin: 0;
  font-size: 0.9rem;
  overflow-wrap: anywhere;
}

.submit-receipt-facts dd.submit-receipt-id {
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

.submit-receipt-note {
  margin-top: 16px;
  color: var(--muted);
  font-size: 0.84rem;
}

.submit-receipt-preview {
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.76rem;
}

.submit-receipt-preview a {
  color: var(--accent-text);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.submit-receipt-preview a:hover {
  color: var(--text);
}

.submit-page [data-submit-form][hidden] {
  display: none;
}

.submit-receipt-actions {
  margin-top: 22px;
}

.submit-gate {
  max-width: 560px;
}

.submit-gate .btn {
  margin-top: 20px;
}

.submit-gate .btn + .btn {
  margin-left: 10px;
}

/* Signed out has nothing to compare the gate against, so the gate becomes the
   page: one column, no rail, centred in the shell. */
.submit-page[data-state="signed-out"] .submit-grid {
  grid-template-columns: minmax(0, 1fr);
}

.submit-page[data-state="signed-out"] .submit-main {
  width: 100%;
  max-width: 600px;
  margin-inline: auto;
}

.submit-page[data-state="signed-out"] .submit-rail {
  display: none;
}

.submit-page[data-state="signed-out"] .submit-gate {
  margin-inline: auto;
}

.submit-channel {
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.86em;
}

.submit-noscript {
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.84rem;
}

.submit-rail {
  position: sticky;
  top: 104px;
}

.submit-rail-block + .submit-rail-block {
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  transition: margin-top 0.3s var(--ease), padding-top 0.3s var(--ease), border-color 0.25s var(--ease);
}

.submit-rail-block[data-submit-rail-steps] {
  display: grid;
  grid-template-rows: 1fr;
  min-height: 0;
  transition: grid-template-rows 0.3s var(--ease), opacity 0.2s var(--ease);
}

.submit-rail-block[data-submit-rail-steps] > .submit-rail-collapse {
  min-height: 0;
  overflow: hidden;
}

.submit-page[data-state="publisher"] [data-submit-rail-steps] {
  grid-template-rows: 0fr;
  opacity: 0;
}

.submit-page[data-state="publisher"] [data-submit-rail-steps] + .submit-rail-block {
  margin-top: 0;
  padding-top: 0;
  border-top-color: transparent;
}

.submit-rail h2 {
  font-size: 0.95rem;
  letter-spacing: -0.02em;
}

.submit-rail p,
.submit-rules li {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.6;
}

.submit-rail strong {
  color: var(--text);
  font-weight: 600;
}

.submit-steps {
  margin-top: 10px;
  counter-reset: step;
}

.submit-steps li {
  display: grid;
  grid-template-columns: 1.4rem minmax(0, 1fr);
  gap: 8px;
  padding: 6px 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.55;
  counter-increment: step;
}

.submit-steps li::before {
  content: counter(step);
  color: var(--accent-text);
  font-size: 0.76rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.submit-rules li {
  position: relative;
  padding-left: 14px;
}

.submit-rules li + li {
  margin-top: 6px;
}

.submit-rules li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--line-strong);
}

@media (max-width: 980px) {
  .submit-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .submit-rail {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    margin-top: 4px;
  }

  .submit-page[data-state="publisher"] .submit-rail {
    grid-template-columns: minmax(0, 1fr);
  }

  .submit-rail-block + .submit-rail-block {
    margin: 0;
    padding: 0;
    border-top: 0;
  }
}

@media (max-width: 760px) {
  .submit-rail {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .submit-rail-block + .submit-rail-block {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
  }
}

@media (max-width: 720px) {
  .submit-form {
    padding: 18px;
  }

  .submit-drop {
    min-height: 174px;
  }

  .submit-kind-options {
    grid-template-columns: minmax(0, 1fr);
  }

  .submit-actions {
    align-items: flex-start;
  }

  .submit-actions .btn-primary {
    width: 100%;
  }

  .submit-receipt-facts > div {
    grid-template-columns: 4.2rem minmax(0, 1fr);
    gap: 12px;
  }

}

@media (pointer: coarse) {
  .submit-file-remove,
  .submit-drop .btn {
    min-height: 44px;
  }
}

@keyframes submit-rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}

@keyframes submit-surface-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.995);
  }
}

@keyframes submit-slide-in {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
}

/* Confirmation dialog: the maker's last look before the file leaves the page. */

.submit-confirm {
  width: min(460px, calc(100vw - 32px));
  margin: auto;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.55);
  opacity: 0;
  transform: translateY(14px) scale(0.97);
  transition:
    opacity 0.2s var(--ease),
    transform 0.32s var(--ease);
}

.submit-confirm[open] {
  display: block;
}

.submit-confirm.is-open {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.submit-confirm.is-closing {
  opacity: 0;
  transform: translateY(8px) scale(0.98);
}

.submit-confirm::backdrop {
  background: rgba(5, 5, 8, 0.66);
  opacity: 0;
  transition: opacity 0.25s var(--ease);
}

.submit-confirm.is-open::backdrop {
  opacity: 1;
}

.submit-confirm.is-closing::backdrop {
  opacity: 0;
}

body.submit-confirm-open {
  overflow: hidden;
}

.submit-confirm-inner {
  padding: clamp(20px, 3vw, 26px);
}

.submit-confirm-kicker {
  color: var(--accent-text);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.submit-confirm h2 {
  margin-top: 8px;
  font-size: clamp(1.4rem, 3vw, 1.72rem);
  letter-spacing: -0.035em;
}

.submit-confirm-desc {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

.submit-confirm-facts {
  margin-top: 20px;
  border-top: 1px solid var(--line);
}

.submit-confirm-facts > div {
  display: grid;
  grid-template-columns: 4.2rem minmax(0, 1fr);
  gap: 14px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}

.submit-confirm-facts dt {
  color: var(--muted);
  font-size: 0.8rem;
}

.submit-confirm-facts dd {
  margin: 0;
  font-size: 0.88rem;
  overflow-wrap: anywhere;
}

.submit-confirm-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 22px;
}

@media (max-width: 480px) {
  .submit-confirm-actions {
    flex-direction: column-reverse;
  }

  .submit-confirm-actions .btn {
    width: 100%;
  }
}

@media (pointer: coarse) {
  .submit-confirm-actions .btn {
    min-height: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .submit-page,
  .submit-page *,
  .submit-page *::before,
  .submit-page *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* 34-submissions.css */
/* My submissions: simple cards, two across, with room to breathe. */

body.submissions-standalone {
  background: var(--bg);
}

body.submissions-standalone .site-header {
  display: none;
}

.submissions-shell {
  max-width: 920px;
  padding-top: clamp(24px, 4vw, 40px);
  padding-bottom: clamp(56px, 8vw, 80px);
}

.submissions-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  font-size: 0.8rem;
  text-decoration: none;
}

.submissions-back:hover {
  color: var(--text);
}

.submissions-back svg {
  width: 13px;
  height: 13px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.submissions-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-top: clamp(28px, 4vw, 40px);
}

.submissions-heading {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px 14px;
}

.submissions-head h1 {
  font-size: clamp(2.1rem, 4vw, 2.7rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.submissions-sample {
  color: var(--muted);
  font-size: 0.72rem;
}

.submissions-new {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: none;
  color: var(--accent-text);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
}

.submissions-new:hover {
  color: var(--text);
}

.submissions-new svg {
  width: 11px;
  height: 11px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}

.submissions-section {
  margin-top: clamp(36px, 5vw, 48px);
}

.submissions-section h2 {
  font-size: 0.95rem;
  letter-spacing: -0.02em;
}

.submissions-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(14px, 2vw, 20px);
  margin-top: 12px;
}

.submission-card {
  display: flex;
  flex-direction: column;
  padding: clamp(20px, 2.6vw, 26px);
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}

.submission-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.submission-state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
  font-size: 0.74rem;
  font-weight: 600;
}

.submission-state::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.submission-state.is-review {
  color: #f2c94c;
}

.submission-state.is-fixing {
  color: var(--accent-text);
}

.submission-state.is-posted {
  color: #7fe0b4;
}

.submission-date {
  color: var(--muted);
  font-size: 0.72rem;
  white-space: nowrap;
}

.submission-title {
  margin-top: 16px;
  font-size: 1.1rem;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.submission-artist {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.82rem;
}

.submission-note {
  max-width: 60ch;
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.6;
}

.submission-note strong {
  color: var(--accent-text);
  font-weight: 600;
}

.submission-card-foot {
  margin-top: auto;
  padding-top: 18px;
}

.submission-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--accent-text);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
}

.submission-link:hover {
  color: var(--text);
}

.submission-link svg {
  width: 11px;
  height: 11px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.submission-pending {
  color: var(--muted);
  font-size: 0.8rem;
}

.submission-id {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.74rem;
}

.submission-id code {
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.95em;
}

.submissions-status {
  margin-top: clamp(28px, 4vw, 40px);
  color: var(--muted);
  font-size: 0.9rem;
}

.submissions-empty {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.85rem;
}

.submissions-gate,
.submissions-error {
  margin-top: clamp(32px, 5vw, 48px);
  padding: clamp(22px, 3vw, 30px);
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}

.submissions-gate h2,
.submissions-error h2 {
  font-size: 1.2rem;
  letter-spacing: -0.03em;
}

.submissions-gate p,
.submissions-error p {
  max-width: 58ch;
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

.submissions-gate-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.submissions-error .btn {
  margin-top: 18px;
}

@media (max-width: 760px) {
  .submissions-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .submissions-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
  }

  .submission-card {
    padding: 20px;
  }
}

/* 40-community.css */
/* Community stats */

.stats-page {
  position: relative;
  isolation: isolate;
}

.stats-page::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 38rem;
  z-index: -1;
  background: radial-gradient(58% 76% at 16% 0%, rgba(165, 20, 56, 0.18), transparent 72%);
  pointer-events: none;
}

.stats-stage {
  padding: clamp(52px, 7vw, 88px) 0 clamp(68px, 9vw, 110px);
}

.stats-head {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(18rem, 0.55fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: end;
}

.stats-title {
  margin-top: 0;
  font-size: clamp(3.4rem, 7.2vw, 6.6rem);
  line-height: 0.86;
  letter-spacing: -0.065em;
}

.stats-head-aside {
  max-width: 34rem;
  padding-bottom: 10px;
  justify-self: end;
}

.stats-lede {
  color: var(--muted);
  font-size: clamp(0.98rem, 1.1vw, 1.08rem);
  line-height: 1.65;
}

.stats-status {
  min-height: 1.3em;
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.78rem;
}

.stats-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: clamp(42px, 6vw, 74px) 0 0;
  border-block: 1px solid var(--line-strong);
}

.stats-total {
  min-width: 0;
  padding: clamp(20px, 3vw, 30px) clamp(18px, 3vw, 34px) clamp(22px, 3.4vw, 34px) 0;
  border-right: 1px solid var(--line);
}

.stats-total + .stats-total {
  padding-left: clamp(18px, 3vw, 34px);
}

.stats-total:last-child {
  border-right: 0;
}

.stats-total dt {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.stats-total dd {
  margin-top: 10px;
  font-size: clamp(3rem, 6vw, 5.2rem);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  letter-spacing: -0.06em;
  line-height: 0.82;
}

/* Spotlight and latest sync */

.stats-feature-skeleton,
.stats-feature {
  display: grid;
  grid-template-columns: minmax(0, 1.32fr) minmax(17rem, 0.68fr);
  gap: 14px;
  margin-top: clamp(38px, 5vw, 60px);
}

.stats-feature.is-single {
  grid-template-columns: minmax(0, 1fr);
}

.stats-feature-skeleton-panel {
  min-height: 288px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background-color: rgba(255, 255, 255, 0.035);
}

.stats-spotlight,
.stats-latest {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--glass);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.stats-spotlight {
  display: flex;
  flex-direction: column;
  min-height: 300px;
  padding: clamp(24px, 3.6vw, 40px);
  background:
    radial-gradient(80% 120% at 92% 0%, rgba(217, 15, 63, 0.2), transparent 60%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.055), transparent 46%),
    var(--glass);
}

.stats-spotlight-rank {
  position: absolute;
  right: -0.035em;
  bottom: -0.34em;
  color: rgba(255, 255, 255, 0.045);
  font-size: clamp(9rem, 15vw, 14rem);
  font-weight: 700;
  letter-spacing: -0.09em;
  line-height: 0.7;
  pointer-events: none;
  user-select: none;
}

.stats-spotlight-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.stats-spotlight-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border: 1px solid rgba(255, 122, 115, 0.24);
  border-radius: 999px;
  background: rgba(217, 15, 63, 0.1);
  color: var(--accent-text);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.stats-spotlight-person {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 18px;
  width: fit-content;
  max-width: 100%;
  margin-top: 24px;
  text-decoration: none;
}

.stats-avatar {
  position: relative;
  display: grid;
  place-items: center;
  flex: none;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 122, 115, 0.32), transparent 58%),
    var(--surface-2);
  color: rgba(255, 255, 255, 0.78);
  font-weight: 600;
}

.stats-avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.stats-spotlight-avatar {
  width: 92px;
  height: 92px;
  border-radius: 28px;
  font-size: 2rem;
}

.stats-spotlight-copy {
  min-width: 0;
}

.stats-spotlight-name {
  display: block;
  overflow-wrap: anywhere;
  font-size: clamp(2.1rem, 3.8vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.055em;
  line-height: 0.94;
}

.stats-spotlight-meta {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.86rem;
}

.stats-spotlight-numbers {
  position: relative;
  z-index: 1;
  display: flex;
  gap: clamp(28px, 4vw, 50px);
  margin-top: 26px;
}

.stats-spotlight-numbers div + div {
  padding-left: clamp(28px, 4vw, 50px);
  border-left: 1px solid var(--line);
}

.stats-spotlight-numbers dt {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.stats-spotlight-numbers dd {
  margin-top: 5px;
  font-size: clamp(1.8rem, 2.8vw, 2.4rem);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 1;
}

.stats-spotlight-link {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: fit-content;
  margin-top: auto;
  padding-top: 24px;
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 600;
  text-decoration: none;
}

.stats-spotlight-link svg {
  transition: transform 0.18s var(--ease);
}

.stats-spotlight-link:hover {
  color: var(--accent-text);
}

.stats-spotlight-link:hover svg {
  transform: translateX(3px);
}

.stats-latest {
  display: flex;
  flex-direction: column;
  min-height: 300px;
  padding: clamp(22px, 3vw, 28px);
}

.stats-latest-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.stats-latest-date {
  color: var(--muted);
  font-size: 0.72rem;
  white-space: nowrap;
}

.stats-latest-link {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: auto;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.18);
  text-decoration: none;
  transition: transform 0.22s var(--ease), border-color 0.22s var(--ease), background-color 0.22s var(--ease);
}

.stats-latest-link:hover {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.045);
  transform: translateY(-2px);
}

.stats-latest-art {
  position: relative;
  display: grid;
  place-items: center;
  width: 84px;
  aspect-ratio: 16 / 10;
  flex: none;
  overflow: hidden;
  border-radius: 10px;
  background:
    radial-gradient(circle at 25% 20%, rgba(255, 122, 115, 0.3), transparent 65%),
    var(--surface-2);
  color: rgba(255, 255, 255, 0.65);
}

.stats-latest-art img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.stats-latest-copy {
  min-width: 0;
  flex: 1;
}

.stats-latest-title {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.stats-latest-meta {
  display: block;
  overflow: hidden;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.72rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stats-latest-arrow {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: none;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease), background-color 0.18s var(--ease);
}

.stats-latest-link:hover .stats-latest-arrow {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

/* Top tracks: three across, six total */

.stats-tracks {
  margin-top: clamp(44px, 6vw, 72px);
}

.stats-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  padding-bottom: 16px;
}

.stats-section-head h2 {
  margin-top: 8px;
  font-size: clamp(1.8rem, 2.7vw, 2.5rem);
  letter-spacing: -0.045em;
  line-height: 1;
}

.stats-section-note {
  max-width: 28rem;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.5;
  text-align: right;
}

.stats-track-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
}

.stats-track-skeleton {
  min-height: 322px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background-color: rgba(255, 255, 255, 0.035);
}

.stats-track-skeleton,
.stats-feature-skeleton-panel {
  background-image: linear-gradient(
    100deg,
    rgba(255, 255, 255, 0.055) 12%,
    rgba(255, 255, 255, 0.145) 34%,
    rgba(255, 255, 255, 0.055) 56%
  );
  background-size: 220% 100%;
  animation: stats-shimmer 1.7s linear infinite;
}

.stats-track-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.05), transparent 48%),
    var(--glass);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.16);
  transition: transform 0.28s var(--ease), border-color 0.28s var(--ease), box-shadow 0.28s var(--ease);
}

.stats-track-card:hover,
.stats-track-card:focus-within {
  border-color: var(--line-strong);
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.28);
  transform: translateY(-4px);
}

.stats-track-art {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background:
    radial-gradient(circle at 24% 16%, rgba(255, 122, 115, 0.28), transparent 62%),
    linear-gradient(145deg, #2a1018, #0b0b0e 70%);
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
}

.stats-track-art img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}

.stats-track-card:hover .stats-track-art img {
  transform: scale(1.045);
}

.stats-track-art::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.24), transparent 36%, rgba(0, 0, 0, 0.68));
  pointer-events: none;
}

.stats-track-art-fallback {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.04em;
}

.stats-track-badge,
.stats-track-views {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(8, 8, 12, 0.5);
  color: #f1eff4;
  font-variant-numeric: tabular-nums;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.stats-track-badge {
  top: 11px;
  left: 11px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.stats-track-card:first-child .stats-track-badge {
  border-color: rgba(255, 122, 115, 0.34);
  background: rgba(217, 15, 63, 0.26);
  color: #fff;
}

.stats-track-views {
  right: 11px;
  bottom: 11px;
  gap: 3px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.66rem;
}

.stats-track-views strong {
  font-size: 0.78rem;
  font-weight: 700;
}

.stats-track-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  padding: 15px 17px 16px;
}

.stats-track-title {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 1.03rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.25;
}

.stats-track-title a {
  text-decoration: none;
}

.stats-track-title a:hover {
  text-decoration: underline;
}

.stats-track-artist {
  overflow: hidden;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.8rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stats-track-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 16px;
}

.stats-track-maker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.72rem;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 0.18s var(--ease);
}

.stats-track-maker:hover {
  color: var(--text);
}

.stats-track-maker-avatar {
  width: 20px;
  height: 20px;
  font-size: 0.58rem;
  border-radius: 50%;
}

.stats-track-kind {
  display: inline-flex;
  flex: none;
  align-items: center;
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
  font-size: 0.63rem;
  font-weight: 600;
  line-height: 1.1;
  white-space: nowrap;
}

.stats-page.is-loaded:not(.is-vt-reveal) .stats-feature,
.stats-page.is-loaded:not(.is-vt-reveal) .stats-tracks,
.stats-page.is-loaded:not(.is-vt-reveal) .stats-cta {
  animation: stats-reveal-in 0.5s var(--ease) both;
}

.stats-page.is-loaded:not(.is-vt-reveal) .stats-feature {
  animation-delay: 0.04s;
}

.stats-page.is-loaded:not(.is-vt-reveal) .stats-tracks {
  animation-delay: 0.1s;
}

.stats-page.is-loaded:not(.is-vt-reveal) .stats-cta {
  animation-delay: 0.14s;
}

/* Early-community invitation */

.stats-cta {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: clamp(24px, 5vw, 56px);
  overflow: hidden;
  margin-top: clamp(44px, 6vw, 72px);
  padding: clamp(26px, 4.4vw, 46px);
  border: 1px solid var(--line-strong);
  border-radius: 26px;
  background:
    radial-gradient(80% 140% at 88% 0%, rgba(217, 15, 63, 0.22), transparent 56%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.06), transparent 52%),
    var(--glass);
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.stats-cta::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 42%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 122, 115, 0.72));
  pointer-events: none;
}

.stats-cta-copy {
  max-width: 42rem;
}

.stats-cta h2 {
  margin-top: 9px;
  font-size: clamp(1.9rem, 3.2vw, 2.8rem);
  letter-spacing: -0.05em;
  line-height: 0.98;
}

.stats-cta p {
  max-width: 52ch;
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.6;
}

.stats-cta-actions {
  display: flex;
  flex: none;
  flex-wrap: wrap;
  gap: 9px;
}

.stats-ledger {
  margin-top: clamp(44px, 6vw, 76px);
}

.stats-ledger-head {
  display: flex;
  align-items: flex-end;
  gap: 24px;
  padding-bottom: 14px;
}

.stats-ledger-head h2 {
  margin-top: 8px;
  font-size: clamp(1.8rem, 2.7vw, 2.5rem);
  letter-spacing: -0.045em;
  line-height: 1;
}

.stats-panel {
  margin-top: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

/* Loading */

.stats-skeleton-head {
  padding-top: 13px;
  padding-bottom: 13px;
  border-bottom: 1px solid var(--line);
}

.stats-skeleton-row {
  min-height: 68px;
  border-bottom: 1px solid var(--line);
}

.stats-skeleton-row:last-child {
  border-bottom: 0;
}

.stats-skeleton-bar {
  display: block;
  height: 8px;
  border-radius: 4px;
}

.stats-skeleton-head .stats-skeleton-bar {
  width: 2.4rem;
  height: 7px;
}

.stats-skeleton-head span:nth-child(3),
.stats-skeleton-head span:nth-child(4) {
  justify-self: end;
}

.stats-skeleton-rank {
  width: 1.6rem;
}

.stats-skeleton-person {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.stats-skeleton-avatar {
  display: block;
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 50%;
}

.stats-skeleton-copy {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  width: 100%;
}

.stats-skeleton-name {
  width: min(12rem, 54%);
  height: 12px;
}

.stats-skeleton-meta {
  width: 4.8rem;
  height: 8px;
}

.stats-skeleton-syncs {
  width: 2.2rem;
  height: 9px;
  justify-self: end;
}

.stats-skeleton-views {
  width: 2.8rem;
  height: 9px;
  justify-self: end;
}

.stats-skeleton-bar,
.stats-skeleton-avatar,
.stats-page.is-loading .stats-total dd::after,
.stats-page.is-loading .stats-status::after {
  background-image: linear-gradient(
    100deg,
    rgba(255, 255, 255, 0.055) 12%,
    rgba(255, 255, 255, 0.145) 34%,
    rgba(255, 255, 255, 0.055) 56%
  );
  background-size: 220% 100%;
  animation: stats-shimmer 1.7s linear infinite;
}

.stats-page.is-loading .stats-total dd {
  position: relative;
  color: transparent;
}

.stats-page.is-loading .stats-total dd::after {
  content: "";
  position: absolute;
  top: 0.1em;
  left: 0;
  height: 0.72em;
  border-radius: 0.1em;
}

.stats-page.is-loading .stats-total:nth-child(1) dd::after {
  width: min(32%, 3.2rem);
}

.stats-page.is-loading .stats-total:nth-child(2) dd::after {
  width: min(42%, 4rem);
}

.stats-page.is-loading .stats-total:nth-child(3) dd::after {
  width: min(52%, 4.8rem);
}

.stats-page.is-loading .stats-status {
  position: relative;
  width: 5.4rem;
  color: transparent;
}

.stats-page.is-loading .stats-status::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 9px;
  border-radius: 4px;
  transform: translateY(-50%);
}

.stats-page:not(.is-loading) .stats-skeleton {
  display: none;
}

.stats-page.is-vt-reveal .stats-skeleton {
  display: none;
}

.stats-page.is-loaded:not(.is-vt-reveal) .stats-summary,
.stats-page.is-loaded:not(.is-vt-reveal) .stats-ledger {
  animation: stats-reveal-in 0.5s var(--ease) both;
}

.stats-page.is-loaded:not(.is-vt-reveal) .stats-ledger {
  animation-delay: 0.06s;
}

@keyframes stats-shimmer {
  from {
    background-position: 100% 0;
  }
  to {
    background-position: -100% 0;
  }
}

@keyframes stats-reveal-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.stats-panel-head,
.stats-maker-link,
.stats-skeleton-head,
.stats-skeleton-row {
  display: grid;
  grid-template-columns: 3.2rem minmax(0, 1fr) 5rem 5.5rem;
  gap: clamp(10px, 2.2vw, 26px);
  align-items: center;
  padding-inline: clamp(16px, 2.6vw, 30px);
}

.stats-panel-head {
  padding-top: 13px;
  padding-bottom: 13px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.stats-panel-head span:nth-child(3),
.stats-panel-head span:nth-child(4) {
  text-align: right;
}

.stats-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.stats-maker {
  border-bottom: 1px solid var(--line);
}

.stats-maker:last-child {
  border-bottom: 0;
}

.stats-maker-link {
  padding-top: 15px;
  padding-bottom: 15px;
  text-decoration: none;
  transition: background-color 0.16s var(--ease);
}

.stats-maker-link:hover {
  background: rgba(255, 255, 255, 0.045);
}

.stats-rank {
  color: var(--muted);
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}

.stats-maker:first-child .stats-rank {
  color: var(--accent-text);
}

.stats-maker-person {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.stats-maker-avatar {
  position: relative;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: none;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
}

.stats-maker-avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.stats-maker-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.stats-maker-name {
  overflow: hidden;
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stats-maker-meta {
  color: var(--muted);
  font-size: 0.72rem;
}

.stats-maker-syncs,
.stats-maker-views {
  padding-right: 2px;
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-size: 0.96rem;
}

.stats-maker-views {
  font-weight: 600;
}

.stats-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px clamp(16px, 2.6vw, 30px);
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.018);
}

.stats-controls[hidden] {
  display: none;
}

.stats-arrows {
  display: flex;
  align-items: center;
  gap: 8px;
}

.stats-arrow {
  display: grid;
  place-items: center;
  width: 2.2rem;
  height: 2.2rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  cursor: pointer;
  transition:
    border-color 0.16s var(--ease),
    color 0.16s var(--ease),
    opacity 0.16s var(--ease);
}

.stats-arrow:hover:not(:disabled) {
  border-color: var(--accent-text);
  color: var(--accent-text);
}

.stats-arrow:disabled {
  opacity: 0.3;
  cursor: default;
}

.stats-page-label {
  color: var(--muted);
  font-size: 0.76rem;
  font-variant-numeric: tabular-nums;
}

.stats-empty {
  margin: 0;
  padding: clamp(36px, 5vw, 54px) 24px;
  color: var(--muted);
  font-size: 0.96rem;
  text-align: center;
}

@media (max-width: 900px) {
  .stats-head {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    align-items: start;
  }

  .stats-head-aside {
    max-width: 46rem;
    padding-bottom: 0;
    justify-self: start;
  }

  .stats-title {
    font-size: clamp(3.2rem, 10vw, 5.6rem);
  }

  .stats-feature-skeleton,
  .stats-feature {
    grid-template-columns: minmax(0, 1fr);
  }

  .stats-latest {
    min-height: 0;
  }

  .stats-latest-link {
    margin-top: 24px;
  }

  .stats-cta {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 540px) {
  .stats-track-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .stats-feature-skeleton-panel {
    min-height: 230px;
  }

  .stats-track-skeleton {
    min-height: 280px;
  }

  .stats-spotlight {
    min-height: 0;
    padding: 22px;
  }

  .stats-spotlight-avatar {
    width: 72px;
    height: 72px;
    border-radius: 22px;
    font-size: 1.55rem;
  }

  .stats-spotlight-person {
    gap: 14px;
    margin-top: 20px;
  }

  .stats-spotlight-name {
    font-size: clamp(1.9rem, 8vw, 2.8rem);
  }

  .stats-spotlight-numbers {
    margin-top: 22px;
  }

  .stats-spotlight-numbers dd {
    font-size: 1.8rem;
  }

  .stats-latest {
    padding: 20px;
  }

  .stats-latest-art {
    width: 72px;
  }

  .stats-section-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .stats-section-note {
    text-align: left;
  }

  .stats-cta {
    gap: 22px;
    padding: 24px;
  }

  .stats-cta-actions {
    width: 100%;
  }

  .stats-cta-actions .btn {
    flex: 1;
    justify-content: center;
  }

  .stats-track-body {
    padding: 13px 14px 14px;
  }

  .stats-track-title {
    font-size: 0.97rem;
  }

  .stats-track-kind {
    display: none;
  }
  .stats-stage {
    padding-top: 42px;
  }

  .stats-total {
    padding: 18px 10px 20px 0;
  }

  .stats-total + .stats-total {
    padding-left: 12px;
  }

  .stats-total dt {
    font-size: 0.6rem;
    letter-spacing: 0.1em;
  }

  .stats-total dd {
    font-size: clamp(2.2rem, 9vw, 3rem);
  }

  .stats-ledger-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .stats-panel-head,
  .stats-maker-link,
  .stats-skeleton-head,
  .stats-skeleton-row {
    grid-template-columns: 1.8rem minmax(0, 1fr) 2.6rem 2.9rem;
    gap: 8px;
    padding-inline: 14px;
  }

  .stats-skeleton-head .stats-skeleton-bar {
    width: 1.8rem;
  }

  .stats-skeleton-row {
    min-height: 58px;
  }

  .stats-skeleton-rank {
    width: 1.2rem;
  }

  .stats-skeleton-avatar {
    width: 32px;
    height: 32px;
  }

  .stats-skeleton-name {
    width: min(9rem, 70%);
  }

  .stats-skeleton-meta {
    display: none;
  }

  .stats-skeleton-syncs {
    width: 1.8rem;
  }

  .stats-skeleton-views {
    width: 2.2rem;
  }

  .stats-panel-head {
    font-size: 0.58rem;
    letter-spacing: 0.08em;
  }

  .stats-maker-link {
    padding-top: 13px;
    padding-bottom: 13px;
  }

  .stats-maker-avatar {
    width: 32px;
    height: 32px;
  }

  .stats-maker-name {
    font-size: 0.94rem;
  }

  .stats-maker-meta {
    display: none;
  }

  .stats-maker-syncs,
  .stats-maker-views {
    font-size: 0.82rem;
  }

  .stats-controls {
    padding-inline: 14px;
  }
}

@media (max-width: 480px) {
  .stats-track-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .stats-track-art {
    aspect-ratio: 16 / 8.5;
  }

  .stats-cta-actions {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  .stats-skeleton-bar,
  .stats-skeleton-avatar,
  .stats-track-skeleton,
  .stats-feature-skeleton-panel,
  .stats-page.is-loading .stats-total dd::after,
  .stats-page.is-loading .stats-status::after {
    animation: none;
  }

  .stats-page.is-loaded:not(.is-vt-reveal) .stats-summary,
  .stats-page.is-loaded:not(.is-vt-reveal) .stats-feature,
  .stats-page.is-loaded:not(.is-vt-reveal) .stats-tracks,
  .stats-page.is-loaded:not(.is-vt-reveal) .stats-cta,
  .stats-page.is-loaded:not(.is-vt-reveal) .stats-ledger {
    animation: none;
  }
}

/* Top maker lead-in: big rank on the left, compact maker card on the right */

.stats-maker-skeleton,
.stats-maker-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: clamp(24px, 5vw, 64px);
  margin-top: clamp(38px, 5vw, 60px);
}

.stats-maker-skeleton-rank {
  width: min(54vw, 34rem);
  height: clamp(150px, 18vw, 220px);
  border: 1px solid var(--line);
  border-radius: 24px;
  background-color: rgba(255, 255, 255, 0.035);
}

.stats-maker-skeleton-card {
  width: clamp(170px, 18vw, 210px);
  height: clamp(210px, 22vw, 250px);
  flex: none;
  border: 1px solid var(--line);
  border-radius: 24px;
  background-color: rgba(255, 255, 255, 0.035);
}

.stats-maker-skeleton-rank,
.stats-maker-skeleton-card {
  background-image: linear-gradient(
    100deg,
    rgba(255, 255, 255, 0.055) 12%,
    rgba(255, 255, 255, 0.145) 34%,
    rgba(255, 255, 255, 0.055) 56%
  );
  background-size: 220% 100%;
  animation: stats-shimmer 1.7s linear infinite;
}

.stats-maker-hero-copy {
  min-width: 0;
  padding-bottom: 4px;
}

.stats-maker-rank {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  margin-top: 8px;
  line-height: 0.8;
}

.stats-maker-rank > span:first-child {
  color: var(--text);
  font-size: clamp(5rem, 11vw, 9rem);
  font-weight: 700;
  letter-spacing: -0.075em;
  line-height: 0.76;
}

.stats-maker-rank-label {
  padding-bottom: 0.62em;
  color: var(--muted);
  font-size: clamp(0.9rem, 1.5vw, 1.1rem);
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1;
  text-transform: uppercase;
}

.stats-maker-line {
  max-width: 34ch;
  margin-top: 16px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

.stats-maker-profile-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 14px;
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
}

.stats-maker-profile-link svg {
  transition: transform 0.18s var(--ease);
}

.stats-maker-profile-link:hover {
  color: var(--accent-text);
}

.stats-maker-profile-link:hover svg {
  transform: translateX(3px);
}

.stats-top-maker-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: clamp(170px, 18vw, 210px);
  min-height: clamp(210px, 22vw, 250px);
  flex: none;
  overflow: hidden;
  padding: 22px 20px 18px;
  border: 1px solid var(--line-strong);
  border-radius: 24px;
  background:
    radial-gradient(95% 85% at 50% 0%, rgba(217, 15, 63, 0.18), transparent 64%),
    linear-gradient(155deg, rgba(255, 255, 255, 0.06), transparent 48%),
    var(--glass);
  box-shadow: 0 20px 46px rgba(0, 0, 0, 0.24);
  text-align: center;
  text-decoration: none;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  transition: transform 0.26s var(--ease), border-color 0.26s var(--ease), box-shadow 0.26s var(--ease);
}

.stats-top-maker-card:hover,
.stats-top-maker-card:focus-visible {
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 26px 56px rgba(0, 0, 0, 0.32);
  transform: translateY(-4px);
}

.stats-top-maker-avatar {
  width: clamp(72px, 8vw, 96px);
  height: clamp(72px, 8vw, 96px);
  margin-bottom: 5px;
  border-radius: 26px;
  font-size: 1.8rem;
}

.stats-top-maker-name {
  max-width: 100%;
  overflow-wrap: anywhere;
  font-size: 1.22rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.stats-top-maker-meta {
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.4;
}

.stats-top-maker-arrow {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin-top: 5px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease), background-color 0.18s var(--ease);
}

.stats-top-maker-card:hover .stats-top-maker-arrow {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
}

/* Latest sync sits between the totals and the track grid */

.stats-latest[data-stats-latest] {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(14px, 2.4vw, 26px);
  min-height: 0;
  overflow: visible;
  margin-top: 20px;
  padding: 12px 0;
  border: 0;
  border-block: 1px solid var(--line);
  border-radius: 0;
  background: none;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.stats-latest-label {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
}

.stats-latest[data-stats-latest] .stats-latest-link {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  text-decoration: none;
  transition: color 0.18s var(--ease);
}

.stats-latest[data-stats-latest] .stats-latest-link:hover {
  background: none;
  transform: none;
  color: var(--text);
}

.stats-latest[data-stats-latest] .stats-latest-art {
  width: 56px;
  aspect-ratio: 16 / 10;
  border-radius: 7px;
}

.stats-latest[data-stats-latest] .stats-latest-title {
  font-size: 0.86rem;
}

.stats-latest[data-stats-latest] .stats-latest-meta {
  margin-top: 4px;
  font-size: 0.69rem;
}

.stats-latest[data-stats-latest] .stats-latest-arrow {
  width: 28px;
  height: 28px;
}

.stats-latest[data-stats-latest] .stats-latest-link:hover .stats-latest-arrow {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.stats-latest[data-stats-latest] .stats-latest-date {
  text-align: right;
}

.stats-page.is-loaded:not(.is-vt-reveal) .stats-maker-hero {
  animation: stats-reveal-in 0.5s var(--ease) both;
}

@media (max-width: 900px) {
  .stats-maker-skeleton,
  .stats-maker-hero {
    gap: clamp(18px, 4vw, 34px);
  }

  .stats-top-maker-card {
    width: 168px;
    min-height: 208px;
  }
}

@media (max-width: 680px) {
  .stats-maker-skeleton,
  .stats-maker-hero {
    align-items: center;
    gap: 16px;
  }

  .stats-maker-skeleton-rank {
    height: 150px;
  }

  .stats-maker-skeleton-card {
    width: 142px;
    height: 184px;
  }

  .stats-maker-rank {
    gap: 9px;
  }

  .stats-maker-rank > span:first-child {
    font-size: clamp(4rem, 15vw, 6rem);
  }

  .stats-maker-rank-label {
    padding-bottom: 0.45em;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
  }

  .stats-maker-line {
    max-width: 24ch;
    margin-top: 12px;
    font-size: 0.8rem;
  }

  .stats-maker-profile-link {
    margin-top: 10px;
    font-size: 0.8rem;
  }

  .stats-top-maker-card {
    width: 142px;
    min-height: 184px;
    padding: 16px 12px 14px;
    gap: 5px;
  }

  .stats-top-maker-avatar {
    width: 64px;
    height: 64px;
    border-radius: 20px;
    font-size: 1.35rem;
  }

  .stats-top-maker-name {
    font-size: 1.02rem;
  }

  .stats-top-maker-meta {
    font-size: 0.64rem;
  }

  .stats-top-maker-arrow {
    width: 25px;
    height: 25px;
  }

  .stats-latest[data-stats-latest] {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 7px 12px;
    padding: 11px 0;
  }

  .stats-latest-label {
    grid-column: 1;
  }

  .stats-latest[data-stats-latest] .stats-latest-link {
    grid-column: 1 / -1;
  }

  .stats-latest[data-stats-latest] .stats-latest-date {
    grid-column: 2;
    grid-row: 1;
  }
}

@media (max-width: 460px) {
  .stats-maker-skeleton,
  .stats-maker-hero {
    gap: 12px;
  }

  .stats-maker-skeleton-rank {
    height: 132px;
  }

  .stats-maker-skeleton-card {
    width: 124px;
    height: 164px;
  }

  .stats-maker-rank {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }

  .stats-maker-rank-label {
    padding-bottom: 0;
  }

  .stats-maker-line {
    display: none;
  }

  .stats-top-maker-card {
    width: 124px;
    min-height: 164px;
    padding: 14px 10px 12px;
  }

  .stats-top-maker-avatar {
    width: 56px;
    height: 56px;
    border-radius: 17px;
    font-size: 1.2rem;
  }

  .stats-top-maker-name {
    font-size: 0.95rem;
  }

  .stats-top-maker-meta {
    font-size: 0.61rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .stats-maker-skeleton-rank,
  .stats-maker-skeleton-card {
    animation: none;
  }

  .stats-page.is-loaded:not(.is-vt-reveal) .stats-maker-hero {
    animation: none;
  }
}

/* QoL pass: no page title, a much larger maker card, and a one-line latest link */

.stats-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  margin: -1px;
  padding: 0;
  border: 0;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.stats-page .stats-stage {
  padding-top: clamp(28px, 4vw, 52px);
}

.stats-page .stats-maker-skeleton,
.stats-page .stats-maker-hero {
  align-items: center;
  margin-top: 0;
}

.stats-page .stats-summary {
  margin-top: clamp(30px, 4vw, 48px);
}

.stats-maker-hero .stats-top-maker-card {
  isolation: isolate;
  gap: 9px;
  width: clamp(250px, 24vw, 320px);
  min-height: clamp(310px, 28vw, 380px);
  padding: 30px 24px 24px;
}

.stats-maker-hero .stats-top-maker-wash {
  position: absolute;
  inset: -30%;
  z-index: 0;
  display: block;
  overflow: hidden;
  opacity: 0.74;
  pointer-events: none;
}

.stats-top-maker-wash img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(22px) saturate(1.35) brightness(0.95);
  transform: scale(1.16);
}

.stats-top-maker-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(180deg, rgba(8, 8, 12, 0.04), rgba(8, 8, 12, 0.48));
  pointer-events: none;
}

.stats-top-maker-card > :not(.stats-top-maker-wash) {
  position: relative;
  z-index: 1;
}

.stats-maker-hero .stats-top-maker-avatar {
  width: clamp(120px, 12vw, 156px);
  height: clamp(120px, 12vw, 156px);
  margin-bottom: 8px;
  border-radius: 40px;
  font-size: 2.6rem;
}

.stats-maker-hero .stats-top-maker-name {
  font-size: clamp(1.7rem, 2.4vw, 2.3rem);
  line-height: 1;
}

.stats-maker-hero .stats-top-maker-meta {
  font-size: 0.85rem;
}

.stats-maker-hero .stats-top-maker-arrow {
  width: 34px;
  height: 34px;
  margin-top: 7px;
}

.stats-maker-skeleton-card {
  width: clamp(250px, 24vw, 320px);
  height: clamp(310px, 28vw, 380px);
}

.stats-section-head .stats-latest {
  display: inline-flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  min-height: 0;
  max-width: min(100%, 32rem);
  overflow: visible;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  text-decoration: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.stats-section-head .stats-latest-label {
  flex: none;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}

.stats-section-head .stats-latest-title {
  display: block;
  max-width: min(18rem, 40vw);
  overflow: hidden;
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stats-section-head .stats-latest-date {
  flex: none;
  color: var(--muted);
  font-size: 0.7rem;
  text-align: left;
  white-space: nowrap;
}

.stats-section-head .stats-latest-arrow {
  width: 26px;
  height: 26px;
  flex: none;
  color: var(--muted);
}

.stats-section-head .stats-latest:hover .stats-latest-title {
  color: var(--accent-text);
}

.stats-section-head .stats-latest:hover .stats-latest-arrow {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

@media (max-width: 900px) {
  .stats-maker-hero .stats-top-maker-card {
    width: 240px;
    min-height: 300px;
    padding: 24px 20px 20px;
  }

  .stats-maker-skeleton-card {
    width: 240px;
    height: 300px;
  }

  .stats-maker-hero .stats-top-maker-avatar {
    width: 112px;
    height: 112px;
    border-radius: 32px;
    font-size: 2rem;
  }

  .stats-maker-hero .stats-top-maker-name {
    font-size: 1.65rem;
  }
}

@media (max-width: 680px) {
  .stats-maker-hero .stats-top-maker-card {
    width: 210px;
    min-height: 270px;
    padding: 20px 16px 16px;
  }

  .stats-maker-skeleton-card {
    width: 210px;
    height: 270px;
  }

  .stats-maker-hero .stats-top-maker-avatar {
    width: 100px;
    height: 100px;
    border-radius: 30px;
    font-size: 1.8rem;
  }

  .stats-maker-hero .stats-top-maker-name {
    font-size: 1.55rem;
  }

  .stats-maker-hero .stats-top-maker-meta {
    font-size: 0.72rem;
  }

  .stats-maker-hero .stats-top-maker-arrow {
    width: 28px;
    height: 28px;
  }

  .stats-section-head .stats-latest {
    max-width: 100%;
    gap: 7px;
  }

  .stats-section-head .stats-latest-title {
    max-width: min(15rem, 52vw);
    font-size: 0.78rem;
  }
}

@media (max-width: 460px) {
  .stats-maker-hero .stats-top-maker-card {
    width: 160px;
    min-height: 220px;
    padding: 16px 12px 14px;
  }

  .stats-maker-skeleton-card {
    width: 160px;
    height: 220px;
  }

  .stats-maker-hero .stats-top-maker-avatar {
    width: 78px;
    height: 78px;
    border-radius: 23px;
    font-size: 1.4rem;
  }

  .stats-maker-hero .stats-top-maker-name {
    font-size: 1.12rem;
  }

  .stats-maker-hero .stats-top-maker-meta {
    font-size: 0.64rem;
  }

  .stats-section-head .stats-latest-title {
    max-width: 42vw;
  }
}

/* 45-profile.css */
/* Profile: identity, score, dock, top three, then the full ledger. */

.profile-page {
  position: relative;
  z-index: 1;
  padding-bottom: clamp(88px, 10vw, 130px);
}

.pv-page {
  --pv-gap: clamp(16px, 2.4vw, 26px);
  overflow-x: clip;
  overflow-anchor: none;
}

.pv-hero {
  padding: clamp(46px, 6.5vw, 82px) 0 0;
}

.pv-hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(24px, 4vw, 48px);
  align-items: end;
}

.pv-identity {
  display: flex;
  align-items: center;
  gap: clamp(24px, 3.2vw, 42px);
  min-width: 0;
}

.pv-avatar {
  position: relative;
  display: grid;
  place-items: center;
  width: clamp(132px, 17vw, 220px);
  aspect-ratio: 1;
  flex: none;
  overflow: hidden;
  /* No border or inset ring here: the red gradient would show through the
     translucent border as a thin red line around the portrait. */
  border: 0;
  border-radius: 44px;
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 132, 118, 0.5), transparent 55%),
    linear-gradient(145deg, #3a0b19, #121218 72%);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.38);
}

.pv-avatar-initial {
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.06em;
  color: rgba(255, 255, 255, 0.8);
}

.pv-avatar-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.45s var(--ease);
}

.pv-copy {
  min-width: 0;
}

.pv-name {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: clamp(8px, 0.9vw, 15px);
  font-size: clamp(3.1rem, 7.4vw, 7rem);
  line-height: 0.88;
  letter-spacing: -0.065em;
}

.pv-name [data-profile-name] {
  min-width: 0;
  overflow-wrap: anywhere;
}

/* The check sits on the name itself, scaled to the display type instead of
   living in a tiny pill beside it. */
.pv-maker-check {
  display: inline-grid;
  place-items: center;
  width: 0.82em;
  height: 0.82em;
  flex: none;
  border-radius: 50%;
  background: linear-gradient(145deg, #35a9ff, #1686da);
  color: #fff;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.24),
    0 8px 24px rgba(29, 155, 240, 0.22);
  transform: translateY(-0.035em);
}

.pv-maker-check svg {
  width: 58%;
  height: 58%;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pv-meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-top: 13px;
}

.pv-meta {
  color: var(--muted);
  font-size: 0.95rem;
}

/* Last synced shares the All tracks header row. */
.pv-all-head {
  align-items: center;
  gap: clamp(10px, 1.5vw, 18px);
}

.pv-all-head h2,
.pv-all-head > span:last-child {
  white-space: nowrap;
}

.pv-last-sync {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  margin-inline: auto;
}

.pv-last-sync-art {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  flex: none;
  overflow: hidden;
  border-radius: 5px;
  background:
    radial-gradient(circle at 26% 18%, rgba(255, 255, 255, 0.22), transparent 35%),
    linear-gradient(145deg, #8d2a3e, #1d1c2c 76%);
}

.pv-last-sync-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pv-last-sync-track {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
  overflow: hidden;
}

.pv-last-sync-track strong {
  flex: 0 1 auto;
  overflow: hidden;
  min-width: 0;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pv-last-sync-artist {
  flex: 0 1 auto;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.64rem;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pv-last-sync-time {
  flex: none;
  color: var(--dim);
  font-size: 0.6rem;
  line-height: 1;
  white-space: nowrap;
}

.pv-last-sync-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: none;
  padding: 0;
  border-radius: 4px;
  color: var(--dim);
  font-family: var(--font-ui);
  font-size: 0.6rem;
  font-weight: 400;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.18s var(--ease);
}

.pv-last-sync-link:hover {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.pv-last-sync-link svg {
  width: 9px;
  height: 9px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (max-width: 760px) {
  .pv-last-sync-time {
    display: none;
  }
}

@media (max-width: 520px) {
  .pv-last-sync-artist,
  .pv-last-sync-link span {
    display: none;
  }
}

.pv-links {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 16px;
}

.pv-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px 5px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-size: 0.8rem;
  text-decoration: none;
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease), background-color 0.18s var(--ease);
}

.pv-link:hover {
  color: var(--text);
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.06);
}

.pv-link-icon {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  transition: transform 0.18s var(--ease);
}

.pv-link:hover .pv-link-icon {
  transform: scale(1.06);
}

.pv-link-icon svg {
  width: 12px;
  height: 12px;
}

.pv-link[data-network="discord"] .pv-link-icon svg {
  width: 14px;
  height: 14px;
}

.pv-link[data-network="spotify"] .pv-link-icon svg {
  width: 18px;
  height: 18px;
}

.pv-link-icon img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

.pv-link[data-network="discord"] {
  border-color: rgba(88, 101, 242, 0.26);
  background: rgba(88, 101, 242, 0.1);
}

.pv-link[data-network="discord"] .pv-link-icon {
  background: #5865f2;
}

.pv-link[data-network="youtube"] {
  border-color: rgba(255, 0, 51, 0.24);
  background: rgba(255, 0, 51, 0.08);
}

.pv-link[data-network="youtube"] .pv-link-icon {
  background: #ff0033;
}

.pv-link[data-network="spotify"] {
  border-color: rgba(30, 215, 96, 0.24);
  background: rgba(30, 215, 96, 0.09);
}

.pv-link[data-network="spotify"] .pv-link-icon {
  background: #1ed760;
}

.pv-link[data-network="tiktok"] {
  border-color: rgba(37, 244, 238, 0.22);
  background: linear-gradient(90deg, rgba(37, 244, 238, 0.07), rgba(254, 44, 85, 0.07));
}

.pv-link[data-network="tiktok"] .pv-link-icon {
  background: #111116;
}

.pv-link[data-network="instagram"] {
  border-color: rgba(214, 41, 118, 0.25);
  background: rgba(214, 41, 118, 0.07);
}

.pv-link[data-network="instagram"] .pv-link-icon {
  background: linear-gradient(135deg, #feda75 0%, #fa7e1e 28%, #d62976 60%, #962fbf 78%, #4f5bd5 100%);
}

.pv-link[data-network="github"] {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.04);
}

.pv-link[data-network="github"] .pv-link-icon {
  background: #24292f;
  color: #fff;
}

.pv-link[data-network="spicy-lyrics"] {
  border-color: rgba(145, 92, 201, 0.28);
  background: rgba(91, 45, 131, 0.12);
}

.pv-link[data-network="spicy-lyrics"] .pv-link-icon {
  border-radius: 6px;
  background: transparent;
}

.pv-link[data-network="better-lyrics"] {
  border-color: rgba(242, 12, 50, 0.24);
  background: rgba(242, 12, 50, 0.07);
}

.pv-link[data-network="better-lyrics"] .pv-link-icon {
  background: transparent;
}

.pv-link[data-network="website"] {
  background: rgba(255, 255, 255, 0.045);
}

.pv-link[data-network="website"] .pv-link-icon {
  background: #3b3b47;
}

.pv-score {
  text-align: right;
}

.pv-label {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.pv-stats {
  display: flex;
  justify-content: flex-end;
  gap: 0;
  margin-top: 10px;
}

.pv-stat {
  min-width: 0;
  padding: 0 clamp(20px, 3vw, 38px);
}

.pv-stat:first-child {
  padding-left: 0;
}

.pv-stat:last-child {
  padding-right: 0;
}

.pv-stat + .pv-stat {
  border-left: 1px solid var(--line);
}

.pv-stat dt {
  color: var(--muted);
  font-size: 0.74rem;
  letter-spacing: 0.04em;
}

.pv-stat dd {
  margin-top: 3px;
  font-size: clamp(1.8rem, 3vw, 2.7rem);
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.pv-stats-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 13px;
  color: var(--muted);
  font-size: 0.8rem;
  text-decoration: none;
  transition: color 0.18s var(--ease);
}

.pv-stats-link:hover {
  color: var(--text);
}

.pv-stats-link svg {
  width: 11px;
  height: 11px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Floating track dock */

.pv-content {
  padding-top: clamp(30px, 4vw, 46px);
}

.pv-dock {
  position: sticky;
  top: 88px;
  z-index: 24;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: clamp(18px, 2.6vw, 26px);
  margin-bottom: clamp(8px, 1.2vw, 12px);
  padding: 8px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  box-shadow:
    0 18px 44px rgba(0, 0, 0, 0.36),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(22px) saturate(1.16);
  -webkit-backdrop-filter: blur(22px) saturate(1.16);
  transition: top 0.5s var(--ease);
}

.header-hidden .pv-dock {
  top: 14px;
}

.pv-count-pill {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  flex: none;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  font-size: 0.78rem;
  white-space: nowrap;
}

.pv-count-pill strong {
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.pv-search {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
  padding: 0 10px;
  border-left: 1px solid var(--line);
}

.pv-search svg {
  width: 16px;
  height: 16px;
  flex: none;
  fill: none;
  stroke: var(--muted);
  stroke-width: 1.6;
  stroke-linecap: round;
}

.pv-search input {
  width: 100%;
  min-width: 0;
  padding: 7px 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 0.9rem;
}

.pv-search input::placeholder {
  color: #7d7d89;
}

.pv-search input:focus {
  outline: none;
}

.pv-sort {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
  padding: 5px 6px 5px 12px;
  font-size: 0.78rem;
}

.pv-sort-label {
  color: var(--muted);
}

.pv-sort-trigger {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 8px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.18s var(--ease);
}

.pv-sort-trigger:hover,
.pv-sort-trigger[aria-expanded="true"] {
  background: rgba(255, 255, 255, 0.06);
}

.pv-sort-chevron {
  width: 10px;
  height: 10px;
  fill: none;
  stroke: var(--muted);
  stroke-width: 1.7;
  transition: transform 0.22s var(--ease);
}

.pv-sort-trigger[aria-expanded="true"] .pv-sort-chevron {
  transform: rotate(180deg);
}

.pv-sort-menu {
  position: absolute;
  top: calc(100% + 9px);
  right: 0;
  z-index: 50;
  width: 9.6rem;
  padding: 5px;
  border: 1px solid var(--line-strong);
  border-radius: 13px;
  background: #1b1b21;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.46);
  opacity: 0;
  transform: translateY(-6px) scale(0.98);
  transform-origin: top right;
  pointer-events: none;
  transition: opacity 0.18s var(--ease), transform 0.18s var(--ease);
}

.pv-sort-menu.is-open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.pv-sort-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 8px 9px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-ui);
  font-size: 0.84rem;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.14s var(--ease), color 0.14s var(--ease);
}

.pv-sort-option:hover,
.pv-sort-option:focus-visible {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.pv-sort-option[aria-selected="true"] {
  color: var(--text);
}

.pv-sort-check {
  width: 11px;
  height: 11px;
  fill: none;
  stroke: var(--accent-text);
  stroke-width: 1.8;
  opacity: 0;
}

.pv-sort-option[aria-selected="true"] .pv-sort-check {
  opacity: 1;
}

.pv-state {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Section heads and cards */

.pv-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 14px;
}

.pv-section-head h2 {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.pv-section-head span {
  color: var(--muted);
  font-size: 0.8rem;
}

.pv-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.pv-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.045), transparent 52%),
    var(--glass);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.2);
  transition: transform 0.28s var(--ease), border-color 0.28s var(--ease);
}

.pv-card:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
}

.pv-card.is-leaving,
.pv-track-card.is-leaving {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.12s var(--ease), transform 0.12s var(--ease);
  pointer-events: none;
}

.pv-card-art {
  position: relative;
  display: block;
  overflow: hidden;
  background: #0a0a0d;
}

.pv-card-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(0, 0, 0, 0.32));
  pointer-events: none;
}

.pv-art {
  position: relative;
  display: block;
  overflow: hidden;
  background:
    radial-gradient(circle at 30% 22%, rgba(255, 137, 121, 0.5), transparent 55%),
    linear-gradient(145deg, #3b0c1a, #121217 74%);
}

.pv-card-art-media {
  aspect-ratio: 16 / 9;
}

.pv-art-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.42);
  font-size: 2.4rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  transition: opacity 0.3s var(--ease);
}

.pv-art-fallback.is-hidden {
  opacity: 0;
}

.pv-art img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.4s var(--ease), transform 0.5s var(--ease);
}

.pv-art img.is-loaded {
  opacity: 1;
}

.pv-card:hover .pv-art img {
  transform: scale(1.035);
}

.pv-card-meta {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  padding: 15px 16px 0;
}

.pv-card-rank {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: none;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.pv-card-copy {
  min-width: 0;
}

.pv-card-copy h3 {
  overflow: hidden;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pv-card-copy h3 a {
  text-decoration: none;
}

.pv-card-copy h3 a:hover {
  text-decoration: underline;
}

.pv-card-copy p {
  overflow: hidden;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.82rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pv-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding: 14px 16px;
}

.pv-card-views {
  color: var(--muted);
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
}

.pv-card-views strong {
  color: var(--text);
  font-weight: 600;
}

.pv-card-play {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: none;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  transition: background-color 0.18s var(--ease), color 0.18s var(--ease), border-color 0.18s var(--ease);
}

.pv-card-play svg {
  width: 14px;
  height: 14px;
}

.pv-card-play:hover {
  background: var(--text);
  border-color: var(--text);
  color: #101014;
}

/* Most viewed parallax showcase */

.pv-featured {
  transition: opacity 0.28s var(--ease), transform 0.28s var(--ease);
}

.pv-featured.is-fading {
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
}

.pv-showcase {
  --carousel-ease: cubic-bezier(0.55, 0, 0.3, 1);
  position: relative;
}

.pv-showcase.is-search-filtered .pv-slide:not(.is-active) {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.32s var(--ease), transform 0.32s var(--ease);
}

.pv-showcase.is-search-scrolling .pv-slide {
  transition: opacity 0.32s var(--ease), transform 0.32s var(--ease);
}

.pv-carousel {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  perspective: 1200px;
  cursor: grab;
  touch-action: pan-y;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.32);
}

.pv-carousel.is-dragging {
  cursor: grabbing;
  user-select: none;
}

.pv-carousel:focus-visible {
  outline: 2px solid var(--accent-text);
  outline-offset: 4px;
}

.pv-showcase .pv-carousel-track {
  display: flex;
  gap: 0;
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow: visible;
  scroll-snap-type: none;
  transform-style: preserve-3d;
  transition: transform 1.65s var(--carousel-ease);
  will-change: transform;
}

.pv-showcase .pv-carousel-track.is-snapping {
  transition: none;
}

.pv-showcase .pv-slide {
  flex: 0 0 100%;
  width: 100%;
  min-width: 0;
  height: clamp(360px, 46vw, 570px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.pv-showcase .pv-slide.pv-card {
  height: clamp(360px, 46vw, 570px);
}

.pv-showcase .pv-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 24px;
  background: #08080b;
  box-shadow: none;
  opacity: 0.4;
  transform: scale(0.88);
  transition: opacity 1.65s var(--carousel-ease), transform 1.65s var(--carousel-ease), border-color 0.28s var(--ease);
}

.pv-showcase .pv-slide[data-offset="0"] {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
}

.pv-showcase .pv-slide[data-offset="-1"] {
  opacity: 0.28;
  transform: translate3d(-7%, 0, 0) scale(0.86) rotateY(9deg);
}

.pv-showcase .pv-slide[data-offset="1"] {
  opacity: 0.28;
  transform: translate3d(7%, 0, 0) scale(0.86) rotateY(-9deg);
}

.pv-showcase .pv-carousel.is-dragging .pv-card {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
  transition: opacity 0.45s cubic-bezier(0.22, 1, 0.36, 1), transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.28s var(--ease);
}

.pv-showcase .pv-carousel.is-dragging .pv-carousel-track {
  transition: none;
}

.pv-showcase .pv-carousel.is-dragging .pv-art,
.pv-showcase .pv-carousel.is-dragging .pv-card-blur img {
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), translate 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.pv-showcase .pv-carousel.is-drag-releasing .pv-carousel-track {
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.pv-showcase .pv-carousel.is-drag-releasing .pv-card {
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.28s var(--ease);
}

.pv-showcase .pv-carousel.is-drag-releasing .pv-art {
  transition: transform 0.85s cubic-bezier(0.16, 1, 0.3, 1), translate 0.85s cubic-bezier(0.16, 1, 0.3, 1);
}

.pv-showcase .pv-carousel img {
  -webkit-user-drag: none;
  user-select: none;
}

.pv-showcase .pv-card:hover {
  border-color: rgba(255, 255, 255, 0.28);
}

.pv-showcase .pv-card-art {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
}

.pv-showcase .pv-card-art::after {
  z-index: 5;
  border-radius: 24px;
  clip-path: inset(0 round 24px);
  background:
    linear-gradient(90deg, rgba(4, 4, 7, 0.86) 0%, rgba(4, 4, 7, 0.28) 48%, rgba(4, 4, 7, 0.06) 74%, rgba(4, 4, 7, 0.46) 100%),
    linear-gradient(0deg, rgba(4, 4, 7, 0.94) 0%, rgba(4, 4, 7, 0.34) 42%, transparent 76%);
  transition: opacity 0.42s var(--ease);
}

.pv-showcase .pv-slide[data-kind="cover"] .pv-card-art::after {
  background:
    linear-gradient(90deg, rgba(4, 4, 7, 0.62) 0%, rgba(4, 4, 7, 0.18) 34%, rgba(4, 4, 7, 0.02) 58%, rgba(4, 4, 7, 0.08) 80%, rgba(4, 4, 7, 0.3) 100%),
    linear-gradient(0deg, rgba(4, 4, 7, 0.92) 0%, rgba(4, 4, 7, 0.38) 38%, transparent 70%);
}

.pv-showcase .pv-card-blur {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  overflow: hidden;
  border-radius: 24px;
  background: transparent;
}

.pv-showcase .pv-card-blur img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(52px) brightness(0.74) saturate(1.18);
  transform: translate3d(calc(var(--art-offset, 0) * 6cqw), 0, 0) scale(1.35);
  transition: transform 1.75s var(--carousel-ease);
}

.pv-showcase .pv-card-art-media {
  aspect-ratio: auto;
}

.pv-showcase .pv-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 0;
  transform: translate3d(calc(var(--art-offset, 0) * -18%), 0, 0) scale(1.42);
  transition: transform 1.75s var(--carousel-ease);
}

/* Auto-generated art tracks put a square cover in the middle of a 16:9
   thumbnail, with a flat ambient colour either side. Keep the cover and drop
   those baked-in sides instead of showing them across the whole card. */
.pv-showcase .pv-slide.pv-card {
  overflow: visible;
}

.pv-showcase .pv-slide[data-kind="cover"] .pv-card-art {
  overflow: visible;
}

.pv-showcase .pv-slide[data-kind="cover"].pv-card {
  border: 0;
  border-radius: 24px;
  background: transparent;
}

.pv-showcase .pv-slide[data-kind="cover"].pv-card:hover {
  border: 0;
}

.pv-showcase .pv-slide[data-kind="cover"] .pv-card-art {
  container-type: inline-size;
  background: transparent;
}

.pv-showcase .pv-slide[data-kind="video"] .pv-card-art {
  overflow: hidden;
  border-radius: 24px;
}

.pv-showcase .pv-slide[data-kind="cover"] .pv-art {
  top: 50%;
  right: auto;
  bottom: auto;
  left: 50%;
  z-index: 1;
  width: auto;
  height: min(100%, 100cqw);
  aspect-ratio: 1;
  border-radius: 0;
  transform: none;
  translate: calc(-50% + var(--art-offset, 0) * -5.5cqw) -50%;
  scale: 1;
  transition: translate 1.75s var(--carousel-ease), scale 0.42s cubic-bezier(0.22, 1, 0.36, 1), border-radius 0.42s var(--ease);
}

.pv-showcase .pv-slide[data-kind="cover"] .pv-art:hover {
  z-index: 4;
  border-radius: 16px;
  scale: 1.05;
}

.pv-showcase .pv-card[data-kind="cover"]:hover .pv-art img {
  transform: none;
}

.pv-showcase .pv-card-meta,
.pv-showcase .pv-card-top {
  transition: opacity 0.32s var(--ease);
}

.pv-showcase .pv-card[data-kind="cover"]:has(.pv-art:hover) .pv-card-art::after {
  opacity: 0;
}

.pv-showcase .pv-card[data-kind="cover"]:has(.pv-art:hover) .pv-card-meta {
  opacity: 0;
}

.pv-showcase .pv-card[data-kind="cover"]:has(.pv-art:hover) .pv-card-top,
.pv-showcase .pv-card[data-kind="cover"]:has(.pv-art:hover) .pv-card-jump {
  opacity: 0.18;
}

.pv-showcase .pv-carousel {
  overflow: visible;
  clip-path: inset(-28px -30px);
  box-shadow: none;
}

.pv-showcase .pv-card-meta {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  gap: 18px;
  width: min(100%, 760px);
  margin-top: auto;
  padding: clamp(24px, 4vw, 42px) clamp(84px, 8vw, 104px) clamp(24px, 4vw, 38px) clamp(24px, 4vw, 42px);
}

.pv-showcase .pv-card-top {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: clamp(20px, 4vw, 34px) clamp(24px, 4vw, 42px);
  pointer-events: none;
}

.pv-showcase .pv-card-rank {
  width: 44px;
  height: 44px;
  flex: none;
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(8, 8, 12, 0.38);
  color: #f1eff4;
  font-size: 1rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.pv-showcase .pv-card-views {
  display: flex;
  align-items: baseline;
  gap: 6px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  line-height: 1;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.45);
}

.pv-showcase .pv-card-views strong {
  color: #fff;
  font-size: clamp(1.55rem, 2.4vw, 2.05rem);
  font-weight: 700;
  letter-spacing: -0.045em;
}

.pv-showcase .pv-card-jump {
  position: absolute;
  right: clamp(24px, 4vw, 42px);
  bottom: clamp(24px, 4vw, 38px);
  z-index: 3;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 50%;
  background: rgba(8, 8, 12, 0.42);
  color: #fff;
  text-decoration: none;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: background-color 0.22s var(--ease), border-color 0.22s var(--ease), color 0.22s var(--ease), transform 0.22s var(--ease), opacity 0.32s var(--ease);
}

.pv-showcase .pv-card-jump svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pv-showcase .pv-card-jump:hover,
.pv-showcase .pv-card-jump:focus-visible {
  border-color: #fff;
  background: #fff;
  color: #101014;
  transform: translateY(-2px);
}

.pv-showcase .pv-card-copy {
  min-width: 0;
}

.pv-showcase .pv-card-copy h3 {
  overflow: visible;
  color: #fff;
  font-size: clamp(2rem, 4.4vw, 4rem);
  line-height: 0.94;
  letter-spacing: -0.055em;
  text-overflow: clip;
  text-wrap: balance;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.35);
  white-space: normal;
}

.pv-showcase .pv-card-copy h3 a {
  color: inherit;
}

.pv-showcase .pv-card-copy p {
  overflow: visible;
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.9rem;
  text-overflow: clip;
  white-space: normal;
}

.pv-showcase .pv-card-foot {
  position: relative;
  z-index: 2;
  width: min(100%, 760px);
  margin-top: 0;
  padding: 14px clamp(24px, 4vw, 42px) clamp(24px, 4vw, 38px);
}

.pv-showcase .pv-card-play {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.pv-showcase .pv-card-play:hover {
  border-color: #fff;
  background: #fff;
  color: #101014;
}

.pv-carousel-ui {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 12px;
}

.pv-carousel-ui[hidden] {
  display: none;
}

.pv-carousel-dots {
  display: flex;
  align-items: center;
  gap: 2px;
}

.pv-carousel-dot {
  position: relative;
  width: 34px;
  height: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.pv-carousel-dot::before {
  content: "";
  position: absolute;
  top: 50%;
  right: 5px;
  left: 5px;
  height: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-50%);
  transition: background-color 0.2s var(--ease), transform 0.2s var(--ease);
}

.pv-carousel-dot:hover::before {
  background: rgba(255, 255, 255, 0.4);
}

.pv-carousel-dot.is-active::before {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-50%) scaleY(1.2);
}

.pv-carousel-dot.is-active::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 5px;
  left: 5px;
  height: 3px;
  border-radius: 999px;
  background: var(--text);
  opacity: 1;
  pointer-events: none;
  transform: translateY(-50%) scaleX(1);
  transform-origin: left center;
}

.pv-carousel-dot.is-active.is-timing::after {
  animation: pv-carousel-timer var(--carousel-interval, 5200ms) linear forwards;
}

.pv-carousel-dot.is-active.is-timing.is-paused::after {
  animation-play-state: paused;
}

@keyframes pv-carousel-timer {
  from { transform: translateY(-50%) scaleX(0); }
  to { transform: translateY(-50%) scaleX(1); }
}

.pv-carousel-side {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pv-carousel-count {
  min-width: 3.5ch;
  color: var(--muted);
  font-size: 0.74rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  text-align: right;
}

.pv-carousel-controls {
  display: flex;
  align-items: center;
  gap: 4px;
}

.pv-carousel-btn {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  cursor: pointer;
  transition: background-color 0.18s var(--ease), border-color 0.18s var(--ease);
}

.pv-carousel-btn:hover {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.09);
}

.pv-carousel-btn:focus-visible {
  outline: 2px solid var(--accent-text);
  outline-offset: 2px;
}

.pv-carousel-btn svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pv-carousel-toggle .pv-carousel-play {
  fill: currentColor;
  stroke: none;
}

.pv-carousel-toggle[aria-pressed="false"] .pv-carousel-play {
  display: none;
}

.pv-carousel-toggle[aria-pressed="true"] .pv-carousel-pause {
  display: none;
}

/* All tracks: four-up artwork grid */

.pv-all {
  margin-top: clamp(8px, 1.2vw, 12px);
}

.pv-track-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
}

.pv-track-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.055), transparent 48%),
    var(--glass);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.2);
  transition:
    transform 0.28s var(--ease),
    border-color 0.28s var(--ease),
    box-shadow 0.28s var(--ease);
}

.pv-track-card:hover {
  transform: translateY(-4px);
  border-color: var(--line-strong);
  box-shadow: 0 24px 52px rgba(0, 0, 0, 0.3);
}

.pv-track-card.is-open {
  border-color: rgba(255, 255, 255, 0.22);
}

.pv-track-card.is-leaving {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.12s var(--ease), transform 0.12s var(--ease);
  pointer-events: none;
}

.pv-track-media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1;
  background: #08080a;
}

.pv-track-art {
  position: absolute;
  inset: 0;
  display: block;
  overflow: hidden;
  background: #08080a;
}

.pv-track-art::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.12), transparent 38%, rgba(0, 0, 0, 0.24));
  pointer-events: none;
}

.pv-track-art-media {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
}

.pv-track-art-media .pv-art-fallback {
  font-size: 2rem;
}

.pv-track-art img {
  transition: opacity 0.4s var(--ease), transform 0.55s var(--ease);
}

.pv-track-card:hover .pv-track-art img {
  transform: scale(1.045);
}

.pv-track-kind {
  display: inline-flex;
  flex: none;
  align-items: center;
  padding: 3px 7px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.1;
  white-space: nowrap;
}

.pv-track-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  padding: 15px 16px 16px;
}

.pv-track-copy {
  min-width: 0;
}

.pv-track-copy h3 {
  display: -webkit-box;
  overflow: hidden;
  font-size: 1.32rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.22;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.pv-track-copy h3 a {
  text-decoration: none;
}

.pv-track-copy h3 a:hover {
  text-decoration: underline;
}

.pv-track-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  margin-top: 7px;
}

.pv-track-meta p {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.9rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pv-track-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding-top: 13px;
}

.pv-track-views {
  color: var(--muted);
  font-size: 0.84rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.pv-track-views strong {
  color: var(--text);
  font-weight: 600;
}

.pv-track-actions {
  display: flex;
  flex: none;
  align-items: center;
  gap: 5px;
}

.pv-track-expand {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 30px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
  font-family: var(--font-ui);
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: color 0.18s var(--ease), background-color 0.18s var(--ease), border-color 0.18s var(--ease);
}

.pv-track-expand:hover {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.075);
  color: var(--text);
}

.pv-track-expand svg {
  width: 10px;
  height: 10px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  transition: transform 0.2s var(--ease);
}

.pv-track-card.is-open .pv-track-expand svg {
  transform: rotate(180deg);
}

.pv-track-play,
.pv-track-version-play {
  display: grid;
  place-items: center;
  flex: none;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.075);
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: background-color 0.18s var(--ease), color 0.18s var(--ease), border-color 0.18s var(--ease);
}

.pv-track-play {
  width: 34px;
  height: 34px;
}

.pv-track-play svg {
  width: 17px;
  height: 17px;
  margin-left: 1px;
}

.pv-track-play:hover,
.pv-track-version-play:hover {
  background: var(--text);
  border-color: var(--text);
  color: #101014;
}

.pv-track-versions {
  margin: 0;
  padding: 2px 15px 12px;
  border-top: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.14);
}

.pv-track-version {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 26px;
  gap: 9px;
  align-items: center;
  padding: 9px 0;
}

.pv-track-version + .pv-track-version {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.pv-track-version-art {
  width: 34px;
  height: 34px;
  border-radius: 8px;
}

.pv-track-version-art .pv-art-fallback {
  font-size: 0.78rem;
}

.pv-track-version-copy {
  min-width: 0;
}

.pv-track-version-title {
  display: block;
  overflow: hidden;
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pv-track-version-title:hover {
  text-decoration: underline;
}

.pv-track-version-copy p {
  overflow: hidden;
  margin-top: 1px;
  color: var(--muted);
  font-size: 0.7rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pv-track-version-play {
  width: 26px;
  height: 26px;
}

.pv-track-version-play svg {
  width: 13px;
  height: 13px;
  margin-left: 1px;
}

.pv-track-card-skeleton {
  pointer-events: none;
}

.pv-track-card-skeleton:hover {
  transform: none;
  border-color: var(--line);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.2);
}

.pv-track-skeleton-art {
  display: block;
  width: 100%;
  aspect-ratio: 1;
}

.pv-track-skeleton-line {
  display: block;
  height: 9px;
  border-radius: 4px;
}

.pv-track-skeleton-line.is-title {
  width: 72%;
  height: 13px;
}

.pv-track-skeleton-line.is-artist {
  width: 44%;
  margin-top: 8px;
}

.pv-track-skeleton-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 13px;
}

.pv-track-skeleton-line.is-views {
  width: 4rem;
}

.pv-track-skeleton-play {
  width: 34px;
  height: 34px;
  border-radius: 50%;
}

.pv-empty {
  padding: 32px 20px;
  border: 1px dashed var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.015);
  color: var(--muted);
  font-size: 0.92rem;
  text-align: center;
}

/* Loading */

.pv-hero-skeleton {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(17rem, 24rem);
  gap: clamp(24px, 4vw, 48px);
  align-items: end;
  pointer-events: none;
  transition: opacity 0.45s var(--ease), visibility 0s linear 0s;
}

.pv-hs-identity {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.6vw, 30px);
  min-width: 0;
}

.pv-hs-copy {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  min-width: 0;
}

.pv-hs-avatar {
  width: clamp(96px, 11vw, 144px);
  aspect-ratio: 1;
  flex: none;
  border-radius: 32px;
}

.pv-hs-bar {
  display: block;
  border-radius: 6px;
}

.pv-hs-name {
  width: min(20rem, 70%);
  height: clamp(2.9rem, 4.8vw, 4.8rem);
  border-radius: 10px;
}

.pv-hs-meta {
  width: 10rem;
  height: 12px;
}

.pv-hs-links {
  display: flex;
  gap: 7px;
  margin-top: 2px;
}

.pv-hs-links span {
  display: block;
  width: 5rem;
  height: 25px;
  border-radius: 999px;
}

.pv-hs-score {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  width: 100%;
}

.pv-hs-label {
  width: 5.5rem;
  height: 8px;
}

.pv-hs-stats {
  display: flex;
  justify-content: flex-end;
  gap: clamp(20px, 3vw, 38px);
  width: 100%;
  margin-top: 2px;
}

.pv-hs-stat {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  min-width: 5.2rem;
}

.pv-hs-stat + .pv-hs-stat {
  padding-left: clamp(20px, 3vw, 38px);
  border-left: 1px solid var(--line);
}

.pv-hs-number {
  width: 4.5rem;
  height: clamp(1.6rem, 2.6vw, 2.4rem);
  border-radius: 7px;
}

.pv-hs-caption {
  width: 3rem;
  height: 8px;
}

.pv-hs-link {
  width: 8rem;
  height: 9px;
  margin-top: 3px;
}

.pv-hs-avatar,
.pv-hs-bar,
.pv-hs-links span,
.pv-card-skeleton-art,
.pv-card-skeleton-play,
.pv-count-pill::after,
.pv-track-skeleton-art,
.pv-track-skeleton-line,
.pv-track-skeleton-play {
  background-image: linear-gradient(
    100deg,
    rgba(255, 255, 255, 0.055) 12%,
    rgba(255, 255, 255, 0.145) 34%,
    rgba(255, 255, 255, 0.055) 56%
  );
  background-size: 220% 100%;
  animation: pv-shimmer 1.7s linear infinite;
}

.pv-page.is-loading .pv-identity,
.pv-page.is-loading .pv-score {
  opacity: 0;
  pointer-events: none;
}

.pv-page.is-loaded .pv-identity {
  animation: pv-hero-in 0.7s var(--ease) 0.04s both;
}

.pv-page.is-loaded .pv-score {
  animation: pv-hero-in 0.7s var(--ease) 0.12s both;
}

.pv-page:not(.is-loading) .pv-hero-skeleton {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.45s var(--ease), visibility 0s linear 0.45s;
}

.pv-page.is-loading .pv-count-pill {
  position: relative;
  min-width: 5.8rem;
  color: transparent;
}

.pv-page.is-loading .pv-count-pill strong,
.pv-page.is-loading .pv-count-pill span {
  opacity: 0;
}

.pv-page.is-loading .pv-count-pill::after {
  content: "";
  position: absolute;
  inset: 7px 12px;
  border-radius: 999px;
}

.pv-cards-skeleton {
  min-height: 0;
}

.pv-card-skeleton {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--glass);
}

.pv-card-skeleton-art {
  display: block;
  aspect-ratio: 16 / 9;
}

.pv-card-skeleton-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 15px 16px 0;
}

.pv-card-skeleton-body.is-foot {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding: 14px 16px;
}

.pv-card-skeleton-title {
  width: 70%;
  height: 14px;
}

.pv-card-skeleton-artist {
  width: 44%;
  height: 10px;
}

.pv-card-skeleton-views {
  width: 4rem;
  height: 10px;
}

.pv-card-skeleton-play {
  width: 30px;
  height: 30px;
  flex: none;
  border-radius: 50%;
}

.pv-page:not(.is-loading) .pv-cards-skeleton {
  display: none;
}

@keyframes pv-shimmer {
  from {
    background-position: 100% 0;
  }
  to {
    background-position: -100% 0;
  }
}

@keyframes pv-hero-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.pv-page:not(.is-loading) .pv-track-grid-skeleton {
  display: none;
}

.pv-page.is-loading .pv-fab {
  opacity: 0;
  pointer-events: none;
}

@media (max-width: 980px) {
  .pv-hero-skeleton {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
    align-items: start;
  }

  .pv-hs-score {
    align-items: flex-start;
  }

  .pv-hs-stats {
    justify-content: flex-start;
  }

  .pv-hs-stat {
    align-items: flex-start;
  }
}

@media (max-width: 760px) {
  .pv-hs-avatar {
    width: clamp(82px, 22vw, 104px);
    border-radius: 24px;
  }

  .pv-hs-name {
    height: clamp(2.7rem, 12vw, 4.4rem);
  }
}

@media (max-width: 480px) {
  .pv-hs-identity {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .pv-hs-copy {
    gap: 10px;
  }

  .pv-hs-name {
    width: min(16rem, 82%);
    height: clamp(2.4rem, 14vw, 3.3rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  .pv-hero-skeleton {
    display: none;
  }

  .pv-page.is-loading .pv-identity,
  .pv-page.is-loading .pv-score {
    opacity: 1;
  }

  .pv-page.is-loaded .pv-identity,
  .pv-page.is-loaded .pv-score {
    animation: none;
  }

  .pv-hs-avatar,
  .pv-hs-bar,
  .pv-hs-links span,
  .pv-card-skeleton-art,
  .pv-card-skeleton-play,
  .pv-count-pill::after,
  .pv-track-skeleton-art,
  .pv-track-skeleton-line,
  .pv-track-skeleton-play {
    animation: none;
  }
}

/* Profile reveal */

.pv-page.is-vt-reveal .pv-hero-skeleton,
.pv-page.is-vt-reveal .pv-cards-skeleton,
.pv-page.is-vt-reveal .pv-track-grid-skeleton {
  display: none;
}

.pv-page.is-vt-reveal .pv-identity,
.pv-page.is-vt-reveal .pv-score {
  opacity: 1;
  animation: none;
}

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 0.65s;
  animation-timing-function: var(--ease);
}

/* Floating action dock */

.pv-fab {
  position: fixed;
  right: clamp(14px, 2.4vw, 28px);
  bottom: clamp(14px, 2.4vw, 28px);
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  transition: opacity 0.2s var(--ease);
}

.pv-fab-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 0 13px;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.18s var(--ease), color 0.18s var(--ease);
}

.pv-fab-btn:hover {
  background: rgba(255, 255, 255, 0.07);
}

.pv-fab-btn svg {
  width: 15px;
  height: 15px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pv-fab-btn > span {
  flex: none;
  white-space: nowrap;
}

.pv-fab-edit {
  background: var(--text);
  color: #101014;
}

.pv-fab-edit:hover {
  background: #dedbe6;
}

/* Background variants */

body[data-profile-background="ember"] {
  background: linear-gradient(180deg, #210d10 0%, #100708 54%, #170a0c 100%);
  --star-color: #ffb27a;
}

body[data-profile-background="midnight"] {
  background: linear-gradient(180deg, #081426 0%, #060c17 55%, #03060c 100%);
  --star-color: #dbe7ff;
}

body[data-profile-background="mono"] {
  background: linear-gradient(180deg, #18181c, #0b0b0e 60%);
}

body[data-profile-background="aurora"] {
  background: linear-gradient(180deg, #071815 0%, #050f0e 52%, #050b0b 100%);
}

body[data-profile-background="aurora-stars"] {
  background: linear-gradient(180deg, #071815 0%, #050f0e 52%, #050b0b 100%);
  --star-color: #c9fff1;
}

body[data-profile-background="nebula"] {
  background: linear-gradient(180deg, #1a0d2b 0%, #0c0718 55%, #06040c 100%);
  --star-color: #edd9ff;
}

body[data-profile-background="dusk"] {
  background: linear-gradient(180deg, #2a1528 0%, #160c19 52%, #0b070e 100%);
}

body[data-profile-background="tide"] {
  background: linear-gradient(180deg, #08202a 0%, #04141a 52%, #020b0e 100%);
}

body[data-profile-background="custom"] {
  background: var(--profile-base, #0c0c0f);
  --scene-a: color-mix(in srgb, var(--profile-accent, #ff7a73) 65%, transparent);
  --scene-b: color-mix(in srgb, var(--profile-base, #08080a) 25%, var(--profile-accent, #ff7a73));
  --scene-c: color-mix(in srgb, var(--profile-accent, #ff7a73) 25%, transparent);
}

@media (max-width: 980px) {
  .pv-hero-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  .pv-score {
    text-align: left;
  }

  .pv-stats {
    justify-content: flex-start;
  }

  .pv-stats-link {
    margin-top: 10px;
  }

  .pv-name {
    font-size: clamp(3rem, 10vw, 5.4rem);
  }

  .pv-track-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .pv-hero {
    padding-top: 34px;
  }

  .pv-identity {
    align-items: flex-start;
  }

  .pv-avatar {
    width: clamp(112px, 30vw, 148px);
    border-radius: 34px;
  }

  .pv-name {
    font-size: clamp(2.7rem, 12vw, 4.4rem);
  }

  .pv-dock {
    top: 78px;
    flex-wrap: wrap;
    gap: 6px;
    padding: 7px;
    border-radius: 22px;
  }

  .pv-count-pill {
    order: 1;
  }

  .pv-sort {
    order: 2;
    margin-left: auto;
    border-left: 0;
  }

  .pv-search {
    order: 3;
    flex: 1 0 100%;
    padding: 5px 8px;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .pv-cards {
    grid-auto-flow: column;
    grid-auto-columns: 84%;
    grid-template-columns: none;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 8px;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }

  .pv-cards::-webkit-scrollbar {
    display: none;
  }

  .pv-card {
    scroll-snap-align: start;
  }

  .pv-track-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .pv-fab {
    right: 12px;
    bottom: 12px;
  }
}

@media (max-width: 480px) {
  .pv-identity {
    flex-direction: column;
    gap: 16px;
  }

  .pv-name {
    font-size: clamp(2.5rem, 15vw, 3.6rem);
  }

  .pv-meta-row {
    margin-top: 10px;
  }

  .pv-track-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .pv-fab-btn {
    padding: 0 11px;
  }

  .pv-fab-btn span {
    font-size: 0.78rem;
  }
}

@media (max-width: 760px) {
  .pv-carousel {
    border-radius: 20px;
  }

  .pv-showcase .pv-card-art::after {
    border-radius: 20px;
    clip-path: inset(0 round 20px);
  }

  .pv-showcase .pv-slide.pv-card {
    height: clamp(380px, 96vw, 540px);
  }

  .pv-showcase .pv-card {
    border-radius: 20px;
  }

  .pv-showcase .pv-card-blur {
    border-radius: 20px;
  }

  .pv-showcase .pv-slide[data-kind="video"] .pv-card-art {
    border-radius: 20px;
  }

  .pv-showcase .pv-card-meta {
    gap: 12px;
    padding: 22px 20px 8px;
  }

  .pv-showcase .pv-card-rank {
    width: 34px;
    height: 34px;
  }

  .pv-showcase .pv-card-copy h3 {
    font-size: clamp(2rem, 10vw, 3.2rem);
  }

  .pv-showcase .pv-card-foot {
    padding: 15px 20px 22px;
  }

  .pv-carousel-ui {
    gap: 10px;
  }

  .pv-carousel-side {
    gap: 7px;
  }

  .pv-carousel-btn {
    width: 32px;
    height: 32px;
  }

  .pv-carousel-count {
    font-size: 0.7rem;
  }
}

/* While a finger is on the carousel, the parallax layers must follow it frame
   by frame. Any transition here makes them lag until the drag stops. */
.pv-showcase .pv-carousel.is-dragging .pv-card-blur img,
.pv-showcase .pv-carousel.is-dragging .pv-art,
.pv-showcase .pv-carousel.is-dragging .pv-slide[data-kind="cover"] .pv-art {
  transition: none;
}

/* 46-profile-editor.css */
/* Profile editor: a solid side sheet, not another glass card. */

dialog.profile-editor {
  position: fixed;
  inset: 12px 12px 12px auto;
  z-index: 60;
  width: min(432px, calc(100vw - 24px));
  height: calc(100dvh - 24px);
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #141418;
  color: var(--text);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.55);
  opacity: 0;
  transform: translateX(calc(100% + 24px));
  transition:
    opacity 0.22s var(--ease),
    transform 0.34s var(--ease);
}

dialog.profile-editor[open] {
  display: block;
}

dialog.profile-editor.is-open {
  opacity: 1;
  transform: translateX(0);
}

dialog.profile-editor.is-closing {
  opacity: 0;
  transform: translateX(calc(100% + 24px));
}

dialog.profile-editor::backdrop {
  background: rgba(5, 5, 8, 0.58);
  opacity: 0;
  transition: opacity 0.25s var(--ease);
}

dialog.profile-editor.is-open::backdrop {
  opacity: 1;
}

dialog.profile-editor.is-closing::backdrop {
  opacity: 0;
}

.profile-editor-form {
  display: flex;
  flex-direction: column;
  height: 100%;
  max-height: none;
  padding: 0;
}

.profile-editor-grabber {
  display: none;
  width: 36px;
  height: 4px;
  flex: none;
  margin: 8px auto 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
}

.profile-editor-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  flex: none;
  padding: 24px 24px 0;
}

.profile-editor-head h2 {
  margin: 0;
  font-size: 1.55rem;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.profile-editor-desc {
  max-width: 36ch;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.45;
}

.profile-editor-close {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: none;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition:
    color 0.18s var(--ease),
    background-color 0.18s var(--ease);
}

.profile-editor-close svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
}

.profile-editor-close:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.profile-editor-close:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.55);
  outline-offset: 2px;
}

/* Plain text tabs with a moving state line, no segmented pill. */

.profile-editor-tabs {
  display: flex;
  gap: 24px;
  flex: none;
  margin: 20px 24px 0;
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: none;
}

.profile-editor-tab {
  position: relative;
  flex: none;
  min-height: 42px;
  padding: 0 0 11px;
  border: 0;
  border-radius: 0;
  background: none;
  color: var(--muted);
  font-family: var(--font-ui);
  font-size: 0.86rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: color 0.18s var(--ease);
}

.profile-editor-tab::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: var(--text);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.24s var(--ease);
}

.profile-editor-tab:hover,
.profile-editor-tab.is-active {
  color: var(--text);
}

.profile-editor-tab.is-active::after {
  transform: scaleX(1);
}

.profile-editor-tab:focus-visible {
  outline: 2px solid var(--accent-text);
  outline-offset: 2px;
}

.profile-editor-body {
  flex: 1;
  min-height: 0;
  padding: 20px 24px 8px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: var(--surface-3) transparent;
  scrollbar-width: thin;
}

.profile-editor-body::-webkit-scrollbar {
  width: 8px;
}

.profile-editor-body::-webkit-scrollbar-track {
  background: transparent;
}

.profile-editor-body::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 99px;
  background: var(--surface-3);
  background-clip: padding-box;
}

.profile-editor-panel:not([hidden]) {
  animation: pv-editor-fade 0.18s ease both;
}

.profile-editor-fieldset {
  min-width: 0;
  margin: 0 0 22px;
  padding: 0 0 22px;
  border: 0;
  border-bottom: 1px solid var(--line);
}

.profile-editor-fieldset:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
}

.profile-editor-fieldset legend {
  padding: 0;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.profile-editor-hint {
  max-width: 38ch;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

/* Background picker: previews, labels, no enclosing cards. */

.profile-background-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 11px 9px;
  margin-top: 12px;
}

.profile-background-option {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  cursor: pointer;
}

.profile-background-option:hover .profile-background-swatch {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.profile-background-option:has(input:checked) .profile-background-swatch {
  box-shadow: 0 0 0 2px var(--accent-text);
}

.profile-background-option:has(input:focus-visible) {
  outline: 2px solid var(--accent-text);
  outline-offset: 3px;
  border-radius: 7px;
}

.profile-background-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.profile-background-swatch {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 6px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  transition: box-shadow 0.18s var(--ease);
}

.profile-background-swatch::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.profile-background-swatch::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.1), transparent 46%, rgba(0, 0, 0, 0.2));
  pointer-events: none;
}

.profile-background-swatch {
  --swatch-stars:
    radial-gradient(circle at 8% 18%, rgba(255, 255, 255, 0.9) 0 1px, transparent 1.4px),
    radial-gradient(circle at 21% 62%, rgba(190, 220, 255, 0.7) 0 0.8px, transparent 1.2px),
    radial-gradient(circle at 29% 30%, rgba(255, 255, 255, 0.55) 0 0.7px, transparent 1.1px),
    radial-gradient(circle at 39% 78%, rgba(255, 255, 255, 0.8) 0 0.9px, transparent 1.3px),
    radial-gradient(circle at 48% 14%, rgba(190, 220, 255, 0.6) 0 0.8px, transparent 1.2px),
    radial-gradient(circle at 57% 54%, rgba(255, 255, 255, 0.7) 0 1px, transparent 1.4px),
    radial-gradient(circle at 68% 22%, rgba(190, 220, 255, 0.55) 0 0.7px, transparent 1.1px),
    radial-gradient(circle at 78% 70%, rgba(255, 255, 255, 0.75) 0 0.9px, transparent 1.3px),
    radial-gradient(circle at 88% 36%, rgba(255, 255, 255, 0.6) 0 0.8px, transparent 1.2px),
    radial-gradient(circle at 94% 84%, rgba(190, 220, 255, 0.5) 0 0.7px, transparent 1.1px),
    radial-gradient(circle at 14% 88%, rgba(255, 255, 255, 0.55) 0 0.7px, transparent 1.1px);
}

.profile-background-swatch[data-background="kawarp"] {
  background:
    radial-gradient(ellipse 42% 50% at 50% 46%, rgba(255, 194, 170, 0.78), transparent 70%),
    linear-gradient(145deg, #5d182b, #160e13 72%);
}

.profile-background-swatch[data-background="kawarp"]::before {
  inset: -12%;
  background: repeating-radial-gradient(ellipse at 50% 55%, transparent 0 10%, rgba(255, 194, 170, 0.22) 10.5% 11.5%, transparent 12% 22%);
  filter: blur(1px);
  transform: rotate(-8deg) scale(1.12);
}

.profile-background-swatch[data-background="ember"] {
  background: linear-gradient(145deg, #2b0d0e, #0b0607 78%);
}

.profile-background-swatch[data-background="ember"]::before {
  background:
    radial-gradient(circle at 74% 38%, transparent 0 15.5%, rgba(255, 128, 72, 0.34) 15.9% 16.7%, transparent 17%),
    linear-gradient(180deg, transparent 63%, rgba(255, 120, 65, 0.34) 63.4%, transparent 64%),
    radial-gradient(circle at 17% 73%, rgba(255, 184, 112, 0.9) 0 0.8px, transparent 1.2px),
    radial-gradient(circle at 31% 58%, rgba(255, 140, 80, 0.7) 0 1.1px, transparent 1.5px),
    radial-gradient(circle at 44% 82%, rgba(255, 184, 112, 0.8) 0 0.8px, transparent 1.2px),
    radial-gradient(circle at 59% 66%, rgba(255, 140, 80, 0.6) 0 1px, transparent 1.4px),
    radial-gradient(circle at 86% 72%, rgba(255, 184, 112, 0.75) 0 0.9px, transparent 1.3px),
    radial-gradient(circle at 66% 88%, rgba(255, 120, 70, 0.65) 0 1px, transparent 1.4px),
    linear-gradient(180deg, transparent 60%, rgba(255, 95, 55, 0.06) 100%);
}

.profile-background-swatch[data-background="midnight"] {
  background: linear-gradient(145deg, #0a1528, #050914 78%);
}

.profile-background-swatch[data-background="midnight"]::before {
  background:
    var(--swatch-stars),
    linear-gradient(180deg, transparent 76%, rgba(40, 100, 190, 0.18));
}

.profile-background-swatch[data-background="mono"] {
  background: linear-gradient(145deg, #29292e, #111114 78%);
}

.profile-background-swatch[data-background="mono"]::before {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.13) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.13) 1px, transparent 1px),
    linear-gradient(180deg, transparent 65%, rgba(255, 255, 255, 0.28) 65.4%, transparent 65.8%);
  background-size: 16px 16px, 16px 16px, 100% 100%;
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.9), transparent 94%);
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.9), transparent 94%);
}

.profile-background-swatch[data-background="aurora"] {
  background: linear-gradient(145deg, #0b211c, #07100f 76%);
}

.profile-background-swatch[data-background="aurora"]::before,
.profile-background-swatch[data-background="aurora-stars"]::before {
  inset: -14%;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.06) 0 1px, transparent 1px 7px),
    linear-gradient(100deg, transparent 16%, rgba(47, 255, 184, 0.5) 26%, transparent 37%),
    linear-gradient(96deg, transparent 42%, rgba(58, 190, 255, 0.42) 51%, transparent 61%),
    linear-gradient(104deg, transparent 64%, rgba(136, 80, 230, 0.46) 73%, transparent 84%);
  filter: blur(6px);
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 18%, #000 82%, transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0, #000 18%, #000 82%, transparent 100%);
  transform: rotate(-2deg);
}

.profile-background-swatch[data-background="aurora-stars"] {
  background:
    radial-gradient(circle at 18% 24%, rgba(255, 255, 255, 0.95) 0 1.2px, transparent 1.7px),
    radial-gradient(circle at 78% 34%, rgba(220, 255, 245, 0.9) 0 1px, transparent 1.5px),
    var(--swatch-stars),
    linear-gradient(145deg, #0a241e, #07110f 76%);
}

.profile-background-swatch[data-background="nebula"] {
  background: linear-gradient(145deg, #281430, #080616 78%);
}

.profile-background-swatch[data-background="nebula"]::before {
  inset: -18%;
  background: linear-gradient(105deg, transparent 32%, rgba(160, 75, 215, 0.42) 44%, rgba(62, 105, 220, 0.35) 55%, transparent 68%);
  filter: blur(8px);
  transform: rotate(-16deg);
}

.profile-background-swatch[data-background="nebula"]::after {
  background:
    radial-gradient(circle at 34% 44%, #f4e8ff 0 1.4px, transparent 1.9px),
    radial-gradient(circle at 58% 36%, #f4e8ff 0 1.1px, transparent 1.6px),
    radial-gradient(circle at 72% 62%, #f4e8ff 0 1.5px, transparent 2px),
    linear-gradient(28deg, transparent 0 45%, rgba(233, 214, 255, 0.5) 45.2% 45.8%, transparent 46%),
    linear-gradient(-34deg, transparent 0 58%, rgba(233, 214, 255, 0.4) 58.2% 58.7%, transparent 59%),
    linear-gradient(68deg, transparent 0 30%, rgba(233, 214, 255, 0.34) 30.2% 30.6%, transparent 31%),
    var(--swatch-stars),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 46%, rgba(0, 0, 0, 0.24));
}

.profile-background-swatch[data-background="dusk"] {
  background: linear-gradient(180deg, #321a2c 0%, #1a0e19 48%, #0d070e 100%);
}

.profile-background-swatch[data-background="dusk"]::before {
  background:
    radial-gradient(circle at 67% 36%, #ffd8a2 0 6.5%, rgba(255, 190, 125, 0.24) 7% 15%, transparent 15.5%),
    linear-gradient(180deg, transparent 61.8%, rgba(255, 172, 110, 0.2) 62.1%, transparent 62.6%),
    radial-gradient(ellipse 125% 68% at 18% 100%, #2a1424 0 68%, transparent 69%),
    radial-gradient(ellipse 110% 62% at 72% 100%, #180d18 0 69%, transparent 70%),
    radial-gradient(ellipse 140% 52% at 50% 108%, #0a060d 0 72%, transparent 73%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 45%, rgba(0, 0, 0, 0.12));
}

.profile-background-swatch[data-background="tide"] {
  background: linear-gradient(180deg, #08232c 0%, #04141a 55%, #020b0e 100%);
}

.profile-background-swatch[data-background="tide"]::before {
  background:
    radial-gradient(circle at 71% 24%, #d5fbf4 0 6%, rgba(190, 250, 240, 0.25) 6.4% 13%, transparent 13.5%),
    linear-gradient(180deg, transparent 29%, rgba(150, 250, 240, 0.1) 32%, transparent 78%),
    radial-gradient(ellipse 125% 34% at 28% 78%, #0d3943 0 67%, transparent 68%),
    radial-gradient(ellipse 130% 32% at 74% 88%, #082a33 0 68%, transparent 69%),
    radial-gradient(ellipse 150% 40% at 50% 108%, #031017 0 72%, transparent 73%);
}

.profile-background-swatch[data-background="tide"]::after {
  background:
    linear-gradient(180deg, transparent 58%, rgba(180, 255, 245, 0.3) 58.5%, transparent 59%),
    linear-gradient(180deg, transparent 68%, rgba(180, 255, 245, 0.25) 68.5%, transparent 69%),
    linear-gradient(180deg, transparent 78%, rgba(180, 255, 245, 0.2) 78.5%, transparent 79%),
    linear-gradient(180deg, transparent 87%, rgba(180, 255, 245, 0.15) 87.5%, transparent 88%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 45%, rgba(0, 0, 0, 0.24));
}

.profile-background-swatch[data-background="custom"] {
  background:
    linear-gradient(135deg, transparent 0 48%, rgba(255, 255, 255, 0.16) 49%, transparent 51%),
    linear-gradient(135deg, var(--profile-accent, #ff6f68) 0 50%, var(--profile-base, #08080a) 50% 100%);
}

.profile-background-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.profile-background-copy strong {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.71rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 0.18s var(--ease);
}

.profile-background-option:has(input:checked) .profile-background-copy strong {
  color: var(--text);
}

.profile-background-copy small {
  display: none;
}

/* Custom colors */

.profile-color-fieldset:not([hidden]) {
  animation: pv-editor-fade 0.18s ease both;
}

.profile-color-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.profile-color-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.profile-color-label {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 500;
}

.profile-color-control {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 3px 8px 3px 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #101013;
}

.profile-color-control:focus-within {
  border-color: var(--accent-text);
}

.profile-color-control input[type="color"] {
  width: 30px;
  height: 30px;
  flex: none;
  padding: 2px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  cursor: pointer;
}

.profile-color-control input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}

.profile-color-control input[type="color"]::-webkit-color-swatch {
  border: 0;
  border-radius: 4px;
}

.profile-color-value {
  overflow: hidden;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.02em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

/* Social links */

.profile-link-fields {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
}

.profile-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.profile-field-label {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 500;
}

.profile-field-icon {
  display: none;
}

.profile-field input {
  width: 100%;
  height: 42px;
  min-width: 0;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #101013;
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 0.84rem;
  transition:
    border-color 0.18s var(--ease),
    background-color 0.18s var(--ease);
}

.profile-field input::placeholder {
  color: #8a8a96;
}

.profile-field input:focus {
  outline: none;
  border-color: var(--accent-text);
  background: #0d0d10;
}

/* Showcase mode and spotlight order */

.profile-showcase-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.profile-showcase-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #101013;
  cursor: pointer;
  transition: border-color 0.18s var(--ease), background-color 0.18s var(--ease);
}

.profile-showcase-option:hover,
.profile-showcase-option:has(input:checked) {
  border-color: rgba(255, 255, 255, 0.24);
  background: #15151a;
}

.profile-showcase-option:has(input:checked) {
  border-color: var(--accent-text);
}

.profile-showcase-option input {
  flex: none;
  margin: 2px 0 0;
  accent-color: var(--accent-text);
}

.profile-showcase-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.profile-showcase-copy strong {
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.profile-showcase-copy small {
  color: var(--muted);
  font-size: 0.73rem;
  line-height: 1.4;
}

.profile-spotlight-slots {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-top: 12px;
}

.profile-spotlight-slot {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
}

.profile-spotlight-position {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-variant-numeric: tabular-nums;
}

.profile-spotlight-select {
  width: 100%;
  height: 42px;
  min-width: 0;
  padding: 0 32px 0 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background-color: #101013;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='m2.5 4.5 3.5 3.5 3.5-3.5' fill='none' stroke='%23a6a6b0' stroke-width='1.4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
  background-size: 12px;
  color: var(--text);
  color-scheme: dark;
  font-family: var(--font-ui);
  font-size: 0.8rem;
  cursor: pointer;
  appearance: none;
  transition: border-color 0.18s var(--ease), background-color 0.18s var(--ease);
}

.profile-spotlight-select:focus {
  outline: none;
  border-color: var(--accent-text);
  background-color: #0d0d10;
}

.profile-spotlight-select option {
  background: #101013;
  color: var(--text);
}

.profile-spotlight-count {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.4;
}

.profile-spotlight-count:empty {
  display: none;
}

/* Footer */

.profile-editor-foot {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: none;
  padding: 14px 24px calc(16px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: #111114;
}

.profile-editor-status {
  min-width: 0;
  margin: 0;
  color: var(--accent-text);
  font-size: 0.78rem;
  line-height: 1.4;
}

.profile-editor-status:empty {
  display: none;
}

.profile-editor-status:not(:empty) {
  animation: pv-editor-fade 0.18s ease both;
}

.profile-editor-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.profile-editor-actions .btn {
  min-height: 40px;
  padding: 0 16px;
  font-size: 0.85rem;
}

.profile-editor-actions .btn-primary {
  min-width: 124px;
}

.profile-editor-save {
  gap: 8px;
}

.profile-editor-spinner {
  display: none;
  width: 13px;
  height: 13px;
  border: 2px solid rgba(16, 16, 20, 0.24);
  border-top-color: #101014;
  border-radius: 50%;
  animation: pv-editor-spin 0.7s linear infinite;
}

.profile-editor-save.is-saving .profile-editor-spinner {
  display: block;
}

.profile-editor-save.is-saving .profile-editor-save-label {
  opacity: 0.72;
}

.pv-editor-account {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.025);
}

.pv-editor-avatar {
  display: grid;
  place-items: center;
  width: 33px;
  height: 33px;
  flex: none;
  border-radius: 10px;
  background:
    radial-gradient(circle at 28% 20%, rgba(255, 255, 255, 0.28), transparent 35%),
    linear-gradient(145deg, #d84660, #3d1822 76%);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}

.pv-editor-account-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.pv-editor-account-copy strong {
  overflow: hidden;
  font-size: 0.76rem;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pv-editor-account-copy span {
  overflow: hidden;
  color: var(--dim);
  font-size: 0.66rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@keyframes pv-editor-fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes pv-editor-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 720px) {
  dialog.profile-editor {
    inset: auto 0 0;
    width: 100%;
    height: min(92dvh, 860px);
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 16px 16px 0 0;
    transform: translateY(100%);
  }

  dialog.profile-editor.is-open {
    transform: translateY(0);
  }

  dialog.profile-editor.is-closing {
    transform: translateY(100%);
  }

  .profile-editor-grabber {
    display: block;
  }

  .profile-editor-head {
    padding: 16px 20px 0;
  }

  .profile-editor-head h2 {
    font-size: 1.45rem;
  }

  .profile-editor-tabs {
    margin: 16px 20px 0;
  }

  .profile-editor-body {
    padding: 18px 20px 8px;
  }

  .profile-editor-foot {
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px 20px calc(12px + env(safe-area-inset-bottom));
  }

  .profile-editor-status {
    flex: 1 0 100%;
  }

  .profile-editor-actions {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    width: 100%;
    margin-left: 0;
  }

  .profile-editor-actions .btn {
    width: 100%;
  }

  .profile-editor-actions .btn-primary {
    min-width: 0;
  }
}

@media (max-width: 380px) {
  .profile-background-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  dialog.profile-editor {
    transition: none;
  }

  .profile-editor-panel:not([hidden]),
  .profile-color-fieldset:not([hidden]),
  .profile-editor-status:not(:empty) {
    animation: none;
  }
}

/* 47-profile-error.css */
/* A failed load hides the page content and leaves only the recovery state. */

.pv-page.is-error .pv-hero,
.pv-page.is-error .pv-content,
.pv-page.is-error .pv-fab {
  display: none;
}

.stats-page.is-error .stats-stage {
  display: none;
}

.pv-error {
  padding: clamp(58px, 11vh, 136px) 0 clamp(72px, 12vh, 150px);
}

.pv-error-card {
  width: min(100%, 520px);
  margin: 0 auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  text-align: center;
}

.pv-error-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin: 0 auto 16px;
  border: 0;
  border-radius: 50%;
  background: rgba(217, 15, 63, 0.1);
  color: var(--accent-text);
}

.pv-error-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
}

.pv-error-kicker {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.pv-error-card h2 {
  margin-top: 7px;
  font-size: clamp(1.45rem, 3vw, 1.9rem);
  letter-spacing: -0.04em;
  line-height: 1.05;
}

.pv-error-copy {
  max-width: 34ch;
  margin: 10px auto 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

.pv-error-note {
  min-height: 1.2em;
  margin-top: 7px;
  color: var(--muted);
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
  line-height: 1.4;
}

.pv-error-note:empty {
  display: none;
}

.pv-error-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 22px;
}

.pv-error-actions .btn {
  min-width: 104px;
  min-height: 42px;
  padding: 0 20px;
  font-size: 0.88rem;
}

.pv-error-retry {
  position: relative;
  gap: 8px;
}

.pv-error-spinner {
  display: none;
  width: 13px;
  height: 13px;
  border: 2px solid rgba(16, 16, 20, 0.24);
  border-top-color: #101014;
  border-radius: 50%;
  animation: pv-error-spin 0.7s linear infinite;
}

.pv-error-retry.is-loading .pv-error-spinner {
  display: block;
}

.pv-error-retry.is-loading [data-profile-retry-label],
.pv-error-retry.is-loading [data-stats-retry-label] {
  opacity: 0.72;
}

.pv-error.is-retrying .pv-error-icon,
.pv-error.is-retrying .pv-error-kicker,
.pv-error.is-retrying .pv-error-card h2,
.pv-error.is-retrying .pv-error-copy {
  opacity: 0.52;
  transition: opacity 0.22s var(--ease);
}

.pv-error-card,
.pv-error-icon,
.pv-error-copy,
.pv-error-note {
  transition: opacity 0.22s var(--ease);
}

@keyframes pv-error-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 480px) {
  .pv-error {
    padding-top: 48px;
  }

  .pv-error-card {
    width: 100%;
  }

  .pv-error-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .pv-error-actions .btn {
    width: 100%;
    min-width: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pv-error-spinner {
    animation: none;
  }
}

/* 48-profile-scenes.css */
/* Profile scenes. Kawarp keeps its portrait canvas; the presets below use
   separate compositions instead of a shared colored-blob wash. */

.profile-scene {
  --scene-ease: cubic-bezier(0.45, 0.05, 0.55, 0.95);
  position: fixed;
  inset: 0;
  z-index: 0;
  display: none;
  overflow: hidden;
  pointer-events: none;
  box-shadow: inset 0 0 180px rgba(0, 0, 0, 0.35);
}

.profile-scene::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0;
  pointer-events: none;
}

.profile-scene::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
  opacity: 0.06;
  mix-blend-mode: soft-light;
  pointer-events: none;
}

body.community-profile-page[data-profile-background]:not([data-profile-background="kawarp"]) .profile-scene {
  display: block;
}

/* Midnight keeps the star field; Aurora and Nebula use it as supporting sky. */

.profile-scene-stars {
  position: absolute;
  top: -24%;
  left: -8%;
  width: 116%;
  height: 148%;
  z-index: 2;
  display: none;
  color: var(--star-color, #dbe7ff);
  opacity: 0.62;
}

body[data-profile-background="midnight"] .profile-scene-stars,
body[data-profile-background="nebula"] .profile-scene-stars {
  display: block;
  animation: scene-stars 90s linear infinite;
}

body[data-profile-background="nebula"] .profile-scene-stars {
  opacity: 0.27;
}

body[data-profile-background="aurora-stars"] .profile-scene-stars {
  display: block;
  opacity: 0.72;
  animation: scene-stars 90s linear infinite;
}

/* Ember: warm particles rising above a horizon and a thin ring. */

body[data-profile-background="ember"] .profile-scene-stars {
  display: block;
  opacity: 0.58;
  animation: scene-embers 10s var(--scene-ease) infinite alternate;
}

body[data-profile-background="ember"] .profile-scene::before {
  opacity: 0.85;
  background:
    radial-gradient(circle at 73% 42%, transparent 0 8.7%, rgba(255, 126, 70, 0.22) 8.9%, transparent 9.25%),
    linear-gradient(180deg, transparent 61.5%, rgba(255, 118, 64, 0.18) 61.8%, transparent 62.2%),
    linear-gradient(115deg, transparent 36%, rgba(255, 90, 50, 0.05) 47%, transparent 58%);
}

/* Aurora: tall curtains with fine vertical striation and a slow sway. */

.profile-scene-aurora {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: none;
}

body[data-profile-background="aurora"] .profile-scene-aurora,
body[data-profile-background="aurora-stars"] .profile-scene-aurora {
  display: block;
}

.profile-scene-aurora-band {
  position: absolute;
  top: -18%;
  height: 136%;
  width: 24vw;
  filter: blur(88px);
  opacity: 0.62;
  -webkit-mask-image: radial-gradient(ellipse 60% 118% at 50% 50%, #000 0 50%, transparent 86%);
  mask-image: radial-gradient(ellipse 60% 118% at 50% 50%, #000 0 50%, transparent 86%);
}

.profile-scene-aurora-band.is-a {
  left: 3%;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.07) 0 1px, transparent 1px 10px),
    linear-gradient(180deg, transparent 0%, rgba(77, 255, 183, 0.1) 12%, rgba(77, 255, 183, 0.5) 35%, rgba(40, 176, 255, 0.24) 58%, rgba(124, 74, 236, 0.16) 72%, transparent 92%);
  animation: aurora-sway-a 19s var(--scene-ease) infinite alternate;
}

.profile-scene-aurora-band.is-b {
  left: 26%;
  width: 17vw;
  opacity: 0.5;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.06) 0 1px, transparent 1px 9px),
    linear-gradient(180deg, transparent 0%, rgba(80, 193, 255, 0.08) 16%, rgba(88, 151, 255, 0.38) 42%, rgba(124, 74, 236, 0.28) 64%, transparent 91%);
  animation: aurora-sway-b 27s var(--scene-ease) infinite alternate;
}

.profile-scene-aurora-band.is-c {
  left: 51%;
  width: 22vw;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.07) 0 1px, transparent 1px 11px),
    linear-gradient(180deg, transparent 0%, rgba(59, 255, 196, 0.08) 18%, rgba(49, 214, 173, 0.42) 39%, rgba(34, 120, 194, 0.28) 61%, transparent 90%);
  animation: aurora-sway-c 23s var(--scene-ease) infinite alternate;
}

.profile-scene-aurora-band.is-d {
  left: 77%;
  width: 18vw;
  opacity: 0.44;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.06) 0 1px, transparent 1px 9px),
    linear-gradient(180deg, transparent 0%, rgba(136, 108, 255, 0.1) 15%, rgba(136, 108, 255, 0.36) 41%, rgba(54, 218, 181, 0.24) 66%, transparent 92%);
  animation: aurora-sway-d 29s var(--scene-ease) infinite alternate;
}

/* Dusk and Tide are drawn scenes: a sun over ridges, and a moon over water. */

.profile-scene-art {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: none;
  width: 100%;
  height: 100%;
}

body[data-profile-background="dusk"] .profile-scene-dusk,
body[data-profile-background="tide"] .profile-scene-tide,
body[data-profile-background="nebula"] .profile-scene-constellation {
  display: block;
}

.profile-scene-dusk .dusk-sun {
  animation: dusk-breathe 20s var(--scene-ease) infinite alternate;
}

.profile-scene-tide .tide-swell {
  animation: tide-swell 24s var(--scene-ease) infinite alternate;
}

.profile-scene-constellation .nebula-band {
  animation: nebula-breathe 26s var(--scene-ease) infinite alternate;
}

/* Mono: a quiet blueprint grid, no color wash. */

body[data-profile-background="mono"] .profile-scene::before {
  opacity: 1;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(180deg, transparent 68%, rgba(255, 255, 255, 0.1) 68.1%, transparent 68.3%);
  background-size: 92px 92px, 92px 92px, 100% 100%;
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.9), transparent 86%);
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.9), transparent 86%);
}

body[data-profile-background="mono"] .profile-scene > * {
  display: none;
}

/* Custom keeps the color wash because the colors are the point. */

.profile-scene-glow {
  position: absolute;
  z-index: 1;
  display: none;
  width: 52vmax;
  height: 52vmax;
  border-radius: 50%;
  filter: blur(56px);
  opacity: 0.9;
  transform: translate3d(0, 0, 0);
}

body[data-profile-background="custom"] .profile-scene-glow {
  display: block;
  opacity: 0.58;
  animation-duration: 31s;
}

.profile-scene-glow.is-a {
  top: -26%;
  left: -16%;
  background: radial-gradient(circle, var(--scene-a, transparent) 0, transparent 68%);
  animation: scene-drift-a 22s var(--scene-ease) infinite alternate;
}

.profile-scene-glow.is-b {
  top: 8%;
  right: -22%;
  background: radial-gradient(circle, var(--scene-b, transparent) 0, transparent 68%);
  animation: scene-drift-b 27s var(--scene-ease) infinite alternate;
}

.profile-scene-glow.is-c {
  bottom: -34%;
  left: 18%;
  width: 68vmax;
  height: 68vmax;
  background: radial-gradient(circle, var(--scene-c, transparent) 0, transparent 68%);
  animation: scene-drift-c 33s var(--scene-ease) infinite alternate;
}

@keyframes scene-stars {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(0, -10%, 0);
  }
}

@keyframes scene-embers {
  from {
    opacity: 0.38;
    transform: translate3d(0, 1.5%, 0);
  }
  to {
    opacity: 0.7;
    transform: translate3d(0, -2.5%, 0);
  }
}

@keyframes aurora-sway-a {
  from {
    transform: translate3d(-3%, 0, 0) rotate(-13deg) skewX(-8deg) scaleX(0.96);
  }
  to {
    transform: translate3d(3%, -1%, 0) rotate(-8deg) skewX(-13deg) scaleX(1.04);
  }
}

@keyframes aurora-sway-b {
  from {
    transform: translate3d(3%, 1%, 0) rotate(9deg) skewX(10deg) scaleX(0.97);
  }
  to {
    transform: translate3d(-3%, -1%, 0) rotate(14deg) skewX(5deg) scaleX(1.03);
  }
}

@keyframes aurora-sway-c {
  from {
    transform: translate3d(-2%, 0, 0) rotate(-7deg) skewX(-12deg) scaleX(1.02);
  }
  to {
    transform: translate3d(4%, 1%, 0) rotate(-13deg) skewX(-5deg) scaleX(0.96);
  }
}

@keyframes aurora-sway-d {
  from {
    transform: translate3d(2%, -1%, 0) rotate(12deg) skewX(7deg) scaleX(0.98);
  }
  to {
    transform: translate3d(-3%, 1%, 0) rotate(7deg) skewX(12deg) scaleX(1.03);
  }
}

@keyframes dusk-breathe {
  from {
    opacity: 0.78;
  }
  to {
    opacity: 1;
  }
}

@keyframes tide-swell {
  from {
    transform: translateX(-10px);
  }
  to {
    transform: translateX(14px);
  }
}

@keyframes nebula-breathe {
  from {
    opacity: 0.62;
  }
  to {
    opacity: 0.92;
  }
}

@keyframes scene-drift-a {
  from {
    transform: translate3d(-4%, -2%, 0) scale(0.94);
  }
  to {
    transform: translate3d(7%, 5%, 0) scale(1.08);
  }
}

@keyframes scene-drift-b {
  from {
    transform: translate3d(4%, 3%, 0) scale(1.02);
  }
  to {
    transform: translate3d(-6%, -4%, 0) scale(1.12);
  }
}

@keyframes scene-drift-c {
  from {
    transform: translate3d(0, 2%, 0) scale(1);
  }
  to {
    transform: translate3d(-7%, -3%, 0) scale(1.08);
  }
}

@media (max-width: 720px) {
  .profile-scene-aurora-band {
    filter: blur(48px);
    opacity: 0.54;
  }

  .profile-scene-glow {
    filter: blur(48px);
  }

  .profile-scene-stars {
    opacity: 0.48;
  }
}

@media (prefers-reduced-motion: reduce) {
  .profile-scene-glow,
  .profile-scene-stars,
  .profile-scene-aurora-band,
  .profile-scene-dusk .dusk-sun,
  .profile-scene-tide .tide-swell,
  .profile-scene-constellation .nebula-band {
    animation: none;
  }
}

/* 50-motion.css */
.kawarp {
  position: fixed;
  inset: -24px;
  z-index: 0;
  display: none;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1.2s var(--ease);
}

/* The backdrop samples the maker's portrait, so it belongs to a profile and
   nowhere else. It runs the full viewport rather than fading out below the
   hero, with no separate colored blobs behind it. */
body.community-profile-page[data-profile-background="kawarp"] {
  background: var(--bg);
}

body.community-profile-page[data-profile-background="kawarp"] .kawarp {
  display: block;
}

/* Stats uses the top maker's avatar as the same full-page portrait wash as
   their profile. The layer only appears after the texture is ready, so a
   missing avatar leaves the plain graphite page rather than a logo flash. */
body.community-stats-page[data-stats-background="kawarp"] .kawarp {
  display: block;
}

body.community-stats-page .kawarp.is-on {
  opacity: 1;
  filter: brightness(1.8) saturate(1.9) contrast(1.02);
}

/* No page-wide scrim: the wash runs behind the entire scroll, including the
   footer, instead of fading back to graphite halfway down the page. */
body.community-stats-page[data-stats-background="kawarp"] .stats-page::before {
  display: none;
}

body.community-stats-page[data-stats-background="kawarp"] .site-footer {
  background: transparent;
}

.kawarp.is-on {
  opacity: 0.96;
  filter: brightness(1.62) saturate(1.9) contrast(1.02);
}

.kawarp canvas {
  width: 100%;
  height: 100%;
}

/* A light portrait makes Kawarp light too. Keep the unbacked hero and footer
   text legible by switching only those surfaces to dark ink; the dock, cards,
   and header keep their own dark palette. */
body[data-profile-background="kawarp"].is-kawarp-light .pv-name,
body[data-profile-background="kawarp"].is-kawarp-light .pv-meta,
body[data-profile-background="kawarp"].is-kawarp-light .pv-label,
body[data-profile-background="kawarp"].is-kawarp-light .pv-stat dt,
body[data-profile-background="kawarp"].is-kawarp-light .pv-stat dd,
body[data-profile-background="kawarp"].is-kawarp-light .pv-stats-link,
body[data-profile-background="kawarp"].is-kawarp-light .pv-section-head h2,
body[data-profile-background="kawarp"].is-kawarp-light .pv-section-head span {
  transition: color 0.55s var(--ease);
}

body[data-profile-background="kawarp"].is-kawarp-light .pv-name,
body[data-profile-background="kawarp"].is-kawarp-light .pv-stat dd,
body[data-profile-background="kawarp"].is-kawarp-light .pv-section-head h2 {
  color: #101014;
}

body[data-profile-background="kawarp"].is-kawarp-light .pv-meta,
body[data-profile-background="kawarp"].is-kawarp-light .pv-label,
body[data-profile-background="kawarp"].is-kawarp-light .pv-stat dt,
body[data-profile-background="kawarp"].is-kawarp-light .pv-section-head span {
  color: rgba(16, 16, 20, 0.66);
}

body[data-profile-background="kawarp"].is-kawarp-light .pv-stat + .pv-stat {
  border-left-color: rgba(16, 16, 20, 0.16);
  transition: border-color 0.55s var(--ease);
}

body[data-profile-background="kawarp"].is-kawarp-light .pv-stats-link {
  color: rgba(16, 16, 20, 0.7);
}

body[data-profile-background="kawarp"].is-kawarp-light .pv-stats-link:hover {
  color: #101014;
}

body[data-profile-background="kawarp"].is-kawarp-light .pv-link,
body[data-profile-background="kawarp"].is-kawarp-light .pv-link:hover {
  color: #101014;
}

body[data-profile-background="kawarp"].is-kawarp-light .pv-link {
  border-color: rgba(16, 16, 20, 0.16);
  background: rgba(255, 255, 255, 0.52);
  transition: color 0.55s var(--ease), border-color 0.55s var(--ease), background-color 0.55s var(--ease);
}

body[data-profile-background="kawarp"].is-kawarp-light .pv-link:hover {
  border-color: rgba(16, 16, 20, 0.3);
  background: rgba(255, 255, 255, 0.8);
}

body[data-profile-background="kawarp"].is-kawarp-light .pv-link[data-network="discord"] {
  border-color: rgba(88, 101, 242, 0.34);
  background: rgba(88, 101, 242, 0.12);
}

body[data-profile-background="kawarp"].is-kawarp-light .pv-link[data-network="youtube"] {
  border-color: rgba(255, 0, 51, 0.32);
  background: rgba(255, 0, 51, 0.1);
}

body[data-profile-background="kawarp"].is-kawarp-light .pv-link[data-network="spotify"] {
  border-color: rgba(29, 185, 84, 0.32);
  background: rgba(29, 185, 84, 0.12);
}

body[data-profile-background="kawarp"].is-kawarp-light .pv-link[data-network="website"] {
  border-color: rgba(16, 16, 20, 0.16);
  background: rgba(255, 255, 255, 0.52);
}

body[data-profile-background="kawarp"].is-kawarp-light .site-footer {
  --text: #101014;
  --muted: rgba(16, 16, 20, 0.66);
  --line: rgba(16, 16, 20, 0.14);
  --line-strong: rgba(16, 16, 20, 0.28);
  color: #101014;
  transition: border-color 0.55s var(--ease);
}

body[data-profile-background="kawarp"].is-kawarp-light .footer-brand .brand,
body[data-profile-background="kawarp"].is-kawarp-light .footer-brand p,
body[data-profile-background="kawarp"].is-kawarp-light .footer-links a,
body[data-profile-background="kawarp"].is-kawarp-light .footer-top,
body[data-profile-background="kawarp"].is-kawarp-light .footer-fine {
  transition: color 0.55s var(--ease), border-color 0.55s var(--ease);
}

body[data-profile-background="kawarp"].is-kawarp-light .site-footer .brand-mark span {
  background: linear-gradient(180deg, #101014, #b31339);
}

body[data-profile-background="kawarp"].is-kawarp-light .pv-carousel-count {
  color: rgba(16, 16, 20, 0.66);
  transition: color 0.55s var(--ease);
}

body[data-profile-background="kawarp"].is-kawarp-light .pv-carousel-dot::before {
  background: rgba(16, 16, 20, 0.24);
}

body[data-profile-background="kawarp"].is-kawarp-light .pv-carousel-dot.is-active::before {
  background: rgba(16, 16, 20, 0.24);
}

body[data-profile-background="kawarp"].is-kawarp-light .pv-carousel-dot.is-active::after {
  background: #101014;
}

body[data-profile-background="kawarp"].is-kawarp-light .pv-carousel-btn {
  border-color: rgba(16, 16, 20, 0.18);
  background: rgba(255, 255, 255, 0.52);
  color: #101014;
  transition: color 0.55s var(--ease), border-color 0.55s var(--ease), background-color 0.55s var(--ease);
}

body[data-profile-background="kawarp"].is-kawarp-light .pv-carousel-btn:hover {
  border-color: rgba(16, 16, 20, 0.3);
  background: rgba(255, 255, 255, 0.82);
}

body.no-kawarp .kawarp {
  display: none;
}

/* The veil sits above everything and only shows during a same-origin nav. */
.page-veil {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  background: var(--bg);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s var(--ease);
}

.page-spinner {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.14);
  border-top-color: var(--accent-text);
  animation: page-spin 0.8s linear infinite;
}

@keyframes page-spin {
  to {
    transform: rotate(360deg);
  }
}

html.is-navigating .page-veil {
  opacity: 1;
}

main,
.site-footer {
  transition: opacity 0.24s var(--ease), transform 0.24s var(--ease);
}

html.is-leaving main {
  opacity: 0;
  transform: translateY(-5px);
}

html.is-navigating main {
  opacity: 0;
}

/* Reveals are opt-in through data-reveal, and GSAP clears them. Without JS, or
   with reduced motion, everything is visible from the first paint. */
.js [data-reveal] {
  opacity: 0;
}

.js.reveal-all [data-reveal],
.js [data-reveal].is-revealed {
  opacity: 1;
}

/* The hero entrance starts from opacity 0 too. Hide it before the first paint
   so GSAP does not wipe out visible text before animating it back in. */
.js .hero-title > span,
.js .hero-sub,
.js .hero-actions,
.js .hero-note {
  opacity: 0;
}

.js.reveal-all .hero-title > span,
.js.reveal-all .hero-sub,
.js.reveal-all .hero-actions,
.js.reveal-all .hero-note {
  opacity: 1;
}

/* Profile cards and rows are animated from profile.js so filtering and
   sorting can move the elements that stay on screen. */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .js [data-reveal] {
    opacity: 1;
  }

  .kawarp {
    display: none;
  }

  .pv-card:hover,
  .addon-card:hover {
    transform: none;
  }

  .pv-showcase .pv-slide[data-kind="cover"] .pv-art:hover {
    scale: 1;
  }
}
