:root {
  --bg: #090b10;
  --bg-soft: #0f131b;
  --surface: #131822;
  --surface-2: #191f2b;
  --surface-3: #202837;
  --text: #f5f7fb;
  --muted: #9da8ba;
  --subtle: #6f7b8e;
  --line: rgba(255,255,255,.10);
  --line-strong: rgba(255,255,255,.18);
  --primary: #8b5cf6;
  --primary-strong: #7546e8;
  --primary-soft: rgba(139,92,246,.16);
  --accent: #ec4899;
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #38bdf8;
  --shadow: 0 22px 60px rgba(0,0,0,.36);
  --shadow-soft: 0 10px 30px rgba(0,0,0,.24);
  --radius: 18px;
  --radius-sm: 11px;
  --shell: 1240px;
  --header-h: 72px;
  color-scheme: dark;
}

html[data-theme="light"] {
  --bg: #f4f6fb;
  --bg-soft: #edf1f7;
  --surface: #ffffff;
  --surface-2: #f8f9fc;
  --surface-3: #eef1f6;
  --text: #161b25;
  --muted: #5f6979;
  --subtle: #7e8796;
  --line: rgba(16,24,40,.11);
  --line-strong: rgba(16,24,40,.20);
  --primary-soft: rgba(124,58,237,.10);
  --shadow: 0 22px 60px rgba(28,37,54,.13);
  --shadow-soft: 0 10px 28px rgba(28,37,54,.09);
  color-scheme: light;
}

@media (prefers-color-scheme: light) {
  html[data-theme="system"] {
    --bg: #f4f6fb;
    --bg-soft: #edf1f7;
    --surface: #ffffff;
    --surface-2: #f8f9fc;
    --surface-3: #eef1f6;
    --text: #161b25;
    --muted: #5f6979;
    --subtle: #7e8796;
    --line: rgba(16,24,40,.11);
    --line-strong: rgba(16,24,40,.20);
    --primary-soft: rgba(124,58,237,.10);
    --shadow: 0 22px 60px rgba(28,37,54,.13);
    --shadow-soft: 0 10px 28px rgba(28,37,54,.09);
    color-scheme: light;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    radial-gradient(circle at 7% -10%, rgba(139,92,246,.12), transparent 34rem),
    radial-gradient(circle at 92% 8%, rgba(236,72,153,.09), transparent 31rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--text); }
button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
button:disabled, input:disabled, select:disabled, textarea:disabled { cursor: not-allowed; opacity: .6; }
::selection { background: rgba(139,92,246,.35); }
:focus-visible { outline: 3px solid rgba(56,189,248,.62); outline-offset: 3px; }

.shell { width: min(calc(100% - 32px), var(--shell)); margin-inline: auto; }
.site-main { min-height: 58vh; }
.content-section { padding-block: 42px 72px; }
.narrow-page { width: min(calc(100% - 32px), 860px); padding-block: 48px 80px; }
.surface, .form-surface, .message-card {
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}
.muted { color: var(--muted); }
.optional { color: var(--subtle); font-weight: 500; }
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0,0,0,0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
.skip-link {
  position: fixed;
  left: 16px;
  top: -60px;
  z-index: 9999;
  padding: 10px 16px;
  border-radius: 10px;
  color: white;
  background: #111827;
  transition: top .18s ease;
}
.skip-link:focus { top: 14px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  min-height: var(--header-h);
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px) saturate(140%);
}
.header-inner { min-height: var(--header-h); display: flex; align-items: center; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 11px; font-weight: 850; letter-spacing: -.025em; }
.brand img { flex: 0 0 auto; }
.brand span { white-space: nowrap; }
.site-nav { display: flex; align-items: center; gap: 5px; margin-left: auto; }
.site-nav a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 42px;
  padding: 8px 13px;
  border-radius: 10px;
  color: var(--muted);
  font-weight: 720;
  font-size: .93rem;
}
.site-nav a:hover, .site-nav a.active { color: var(--text); background: var(--surface-2); }
.nav-count {
  min-width: 22px;
  height: 22px;
  padding-inline: 6px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  color: white;
  background: var(--primary);
  font-size: .72rem;
  line-height: 1;
}
.icon-button {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--text);
  background: var(--surface);
}
.icon-button:hover { border-color: var(--line-strong); background: var(--surface-2); }
.mobile-nav-toggle { display: none; margin-left: auto; }
.theme-toggle { margin-left: 4px; font-size: 1.15rem; }
.site-notice { padding: 9px 0; border-bottom: 1px solid var(--line); background: var(--primary-soft); color: var(--text); text-align: center; font-size: .88rem; }

.hero { position: relative; overflow: hidden; padding: 64px 0 52px; border-bottom: 1px solid var(--line); }
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(115deg, rgba(139,92,246,.07), transparent 45%, rgba(236,72,153,.05));
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(290px, .75fr); align-items: center; gap: 48px; }
.hero-copy h1, .page-intro h1, .profile-summary h1, .message-card h1 {
  margin: 0;
  font-size: clamp(2.15rem, 5vw, 4.75rem);
  line-height: .99;
  letter-spacing: -.055em;
  text-wrap: balance;
}
.hero-copy > p:not(.eyebrow) { max-width: 730px; margin: 22px 0 0; color: var(--muted); font-size: clamp(1rem, 2vw, 1.18rem); }
.eyebrow {
  margin: 0 0 9px;
  color: color-mix(in srgb, var(--primary) 76%, var(--text));
  font-size: .75rem;
  font-weight: 850;
  line-height: 1.2;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.hero-search { display: flex; gap: 10px; max-width: 700px; margin-top: 30px; }
.hero-search input { min-width: 0; flex: 1; min-height: 52px; }
.stats-panel { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--line); box-shadow: var(--shadow); }
.stats-panel > div { min-height: 122px; display: flex; flex-direction: column; justify-content: center; padding: 22px; background: var(--surface); }
.stats-panel strong { display: block; font-size: clamp(1.75rem, 4vw, 2.65rem); line-height: 1; letter-spacing: -.045em; }
.stats-panel span { margin-top: 8px; color: var(--muted); font-size: .84rem; }

.page-intro { margin-bottom: 30px; }
.page-intro h1 { font-size: clamp(2rem, 5vw, 3.8rem); }
.page-intro > p:last-child { max-width: 760px; margin: 17px 0 0; color: var(--muted); font-size: 1.04rem; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 22px; margin-bottom: 24px; }
.section-heading.compact { align-items: center; margin-bottom: 15px; }
.section-heading h2 { margin: 0; font-size: clamp(1.55rem, 3vw, 2.2rem); line-height: 1.1; letter-spacing: -.035em; }
.section-heading p:not(.eyebrow) { margin: 8px 0 0; color: var(--muted); }

.button {
  min-height: 43px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 16px;
  border: 1px solid transparent;
  border-radius: 11px;
  font-weight: 790;
  font-size: .91rem;
  line-height: 1.15;
  transition: transform .15s ease, border-color .15s ease, background .15s ease, opacity .15s ease;
}
.button:hover { transform: translateY(-1px); }
.button-primary { color: white; background: linear-gradient(135deg, var(--primary), var(--primary-strong)); box-shadow: 0 10px 25px rgba(117,70,232,.24); }
.button-primary:hover { color: white; filter: brightness(1.06); }
.button-secondary { color: var(--text); border-color: var(--line); background: var(--surface-2); }
.button-secondary:hover { border-color: var(--line-strong); background: var(--surface-3); }
.button-danger { color: #fff; background: var(--danger); }
.button-ghost { color: var(--muted); background: transparent; }
.button-small { min-height: 36px; padding: 7px 11px; font-size: .82rem; border-radius: 9px; }
.button-large { min-height: 50px; padding-inline: 22px; }
.button-link { padding: 0; min-height: auto; color: var(--primary); background: none; border: 0; }
.button-row { display: flex; flex-wrap: wrap; gap: 10px; }
.full { width: 100%; }

input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  background: var(--surface-2);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.025);
}
input, select { min-height: 44px; padding: 9px 12px; }
textarea { min-height: 120px; padding: 12px; resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--subtle); }
input:hover, select:hover, textarea:hover { border-color: var(--line-strong); }
input:focus, select:focus, textarea:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 4px var(--primary-soft); }
label { font-weight: 720; }
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field > label, .field > span:first-child { color: var(--text); font-size: .87rem; font-weight: 760; }
.field-wide { grid-column: span 2; }
.field-full { grid-column: 1 / -1; }
.field-error { margin: 0; color: #fb7185; font-size: .82rem; font-weight: 650; }
.field-help { margin: 0; color: var(--muted); font-size: .8rem; }
.check-field { display: inline-flex; align-items: center; gap: 9px; color: var(--muted); font-size: .9rem; font-weight: 680; }
.check-field input { width: 18px; height: 18px; min-height: 0; margin: 0; accent-color: var(--primary); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-surface { padding: clamp(22px, 4vw, 36px); }
.form-footer { display: flex; align-items: center; justify-content: space-between; gap: 22px; margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); }
.form-footer p { max-width: 600px; margin: 0; color: var(--muted); font-size: .86rem; }
.form-footer a { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }
.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.filter-toggle { display: none; }
.filter-panel { display: grid; grid-template-columns: minmax(220px, 1.6fr) repeat(4, minmax(135px, .75fr)); gap: 12px; align-items: end; margin-bottom: 30px; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.filter-actions { display: flex; gap: 8px; align-self: end; }
.filter-check { min-height: 44px; align-self: end; padding: 8px 0; }

.model-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.model-card { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-soft); transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.model-card:hover { transform: translateY(-3px); border-color: var(--line-strong); box-shadow: var(--shadow); }
.model-media { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--surface-3); }
.model-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.model-card:hover .model-media img { transform: scale(1.025); }
.media-gradient { position: absolute; inset: auto 0 0; height: 44%; background: linear-gradient(transparent, rgba(0,0,0,.72)); pointer-events: none; }
.live-badge, .free-badge, .capture-time {
  position: absolute;
  z-index: 2;
  top: 11px;
  left: 11px;
  padding: 5px 8px;
  border-radius: 999px;
  color: white;
  background: rgba(7,9,13,.76);
  backdrop-filter: blur(8px);
  font-size: .7rem;
  font-weight: 850;
  line-height: 1;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.live-badge::before { content: ""; width: 7px; height: 7px; display: inline-block; margin-right: 5px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 4px rgba(34,197,94,.18); }
.free-badge { left: auto; right: 11px; background: rgba(139,92,246,.88); }
.source-badge { position: absolute; z-index: 2; right: 11px; bottom: 11px; max-width: calc(100% - 22px); overflow: hidden; padding: 5px 8px; border: 1px solid rgba(255,255,255,.16); border-radius: 999px; color: white; background: rgba(7,9,13,.76); backdrop-filter: blur(8px); font-size: .68rem; font-weight: 820; line-height: 1; text-overflow: ellipsis; white-space: nowrap; }
.capture-time { top: auto; bottom: 10px; left: 10px; text-transform: none; letter-spacing: 0; }
.model-card-body { padding: 15px; }
.model-title-row { display: flex; align-items: center; gap: 8px; }
.model-title-row h2, .model-title-row h3 { min-width: 0; flex: 1; margin: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 1.04rem; letter-spacing: -.02em; }
.favorite-button {
  width: 35px;
  height: 35px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--muted);
  background: transparent;
  font-size: 1.1rem;
}
.favorite-button:hover, .favorite-button.active { color: #fb7185; border-color: rgba(251,113,133,.32); background: rgba(251,113,133,.1); }
.favorite-button.active { font-size: 0; }
.favorite-button.active::after { content: "♥"; font-size: 1.08rem; }
.model-meta { display: flex; flex-wrap: wrap; gap: 6px 13px; margin: 9px 0 0; color: var(--muted); font-size: .78rem; }
.model-meta span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tag-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.tag-row span, .tag-row a { padding: 4px 7px; border-radius: 7px; color: var(--muted); background: var(--surface-2); font-size: .68rem; font-weight: 720; }
.tag-row a:hover { color: var(--text); background: var(--surface-3); }
.card-actions { display: flex; gap: 8px; margin-top: 14px; }
.card-actions .button { flex: 1; }

.gallery-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.gallery-card { overflow: hidden; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); transition: transform .18s ease, border-color .18s ease; }
.gallery-card:hover { transform: translateY(-2px); border-color: var(--line-strong); }
.gallery-media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--surface-3); }
.gallery-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.gallery-card:hover img { transform: scale(1.025); }
.gallery-card > div:last-child { padding: 13px; }
.gallery-card h2, .gallery-card h3 { margin: 0; font-size: .95rem; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.gallery-card p { margin: 5px 0 0; color: var(--muted); font-size: .78rem; }
.gallery-model { color: var(--primary); font-weight: 760; }
.mini-gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.mini-gallery.large { grid-template-columns: repeat(6, 1fr); }
.mini-gallery a { overflow: hidden; aspect-ratio: 4 / 3; border-radius: 10px; background: var(--surface-3); }
.mini-gallery img { width: 100%; height: 100%; object-fit: cover; }

.pagination { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 34px; }
.page-button, .page-numbers a, .page-numbers span { min-width: 39px; height: 39px; display: inline-grid; place-items: center; padding-inline: 10px; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); background: var(--surface); font-size: .84rem; font-weight: 760; }
.page-numbers { display: flex; gap: 6px; }
.page-numbers .active { color: white; border-color: var(--primary); background: var(--primary); }
.page-button.disabled { opacity: .4; pointer-events: none; }

.empty-state { padding: 46px 24px; border: 1px dashed var(--line-strong); border-radius: var(--radius); text-align: center; color: var(--muted); background: color-mix(in srgb, var(--surface) 72%, transparent); }
.empty-state.full { grid-column: 1 / -1; }
.empty-state > span { display: block; margin-bottom: 10px; font-size: 2.2rem; }
.empty-state h2 { margin: 0; color: var(--text); font-size: 1.25rem; }
.empty-state p { margin: 8px auto 0; max-width: 570px; }

.breadcrumbs { display: flex; align-items: center; gap: 7px; padding-top: 24px; color: var(--muted); font-size: .82rem; }
.breadcrumbs a:hover { color: var(--primary); }
.profile-page { padding-bottom: 72px; }
.profile-hero { display: grid; grid-template-columns: minmax(300px, .9fr) minmax(0, 1.3fr); gap: 34px; align-items: stretch; margin-top: 24px; }
.profile-preview { position: relative; min-height: 420px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-3); box-shadow: var(--shadow); }
.profile-preview img { width: 100%; height: 100%; object-fit: cover; }
.profile-summary { display: flex; flex-direction: column; justify-content: center; padding: clamp(26px, 5vw, 52px); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.profile-summary h1 { font-size: clamp(2.3rem, 5vw, 4.4rem); }
.profile-handle { margin: 9px 0 0; color: var(--muted); font-size: 1rem; }
.profile-facts { display: flex; flex-wrap: wrap; gap: 8px; margin: 21px 0 0; }
.profile-facts span, .status-pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 9px; border-radius: 999px; color: var(--muted); background: var(--surface-2); font-size: .76rem; font-weight: 730; }
.status-pill.success { color: #86efac; background: rgba(34,197,94,.14); }
.status-pill.warning { color: #fcd34d; background: rgba(245,158,11,.14); }
.status-pill.danger { color: #fda4af; background: rgba(239,68,68,.14); }
.status-pill.neutral { color: var(--muted); }
.profile-buttons { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.status-copy { margin: 20px 0 0; color: var(--muted); }
.profile-layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(260px, .55fr); gap: 24px; margin-top: 28px; }
.profile-main, .profile-aside { display: flex; flex-direction: column; gap: 24px; }
.profile-main > .surface, .profile-aside > .surface { padding: 24px; }
.profile-main h2, .profile-aside h2 { margin: 0 0 13px; font-size: 1.25rem; }
.prose { color: var(--muted); }
.prose p:first-child { margin-top: 0; }
.prose p:last-child { margin-bottom: 0; }
.detail-list { display: grid; gap: 0; margin: 0; }
.detail-list > div { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.detail-list > div:last-child { border-bottom: 0; }
.detail-list dt { color: var(--muted); }
.detail-list dd { margin: 0; text-align: right; font-weight: 720; }
.social-list { display: flex; flex-direction: column; gap: 8px; }
.social-list a { padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); background: var(--surface-2); }
.social-list a:hover { color: var(--text); border-color: var(--line-strong); }
.safety-note { padding: 14px; border-radius: 11px; color: var(--muted); background: rgba(245,158,11,.09); border: 1px solid rgba(245,158,11,.18); font-size: .82rem; }
.related-section { margin-top: 38px; }

.capture-page { padding-block: 28px 72px; }
.capture-layout { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(280px, .55fr); gap: 24px; align-items: start; }
.capture-stage { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: #030406; box-shadow: var(--shadow); }
.capture-stage img { width: 100%; max-height: 78vh; object-fit: contain; margin: auto; }
.capture-info { position: sticky; top: calc(var(--header-h) + 20px); padding: 24px; }
.capture-info h1 { margin: 0; font-size: 1.65rem; letter-spacing: -.035em; }
.stack-actions { display: flex; flex-direction: column; gap: 9px; margin-top: 18px; }

.favorites-toolbar { display: flex; flex-wrap: wrap; align-items: end; gap: 16px; margin-bottom: 25px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.favorites-toolbar .inline { flex-direction: row; align-items: center; gap: 10px; }
.favorites-toolbar select { width: auto; min-width: 160px; }
.favorites-toolbar .button { margin-left: auto; }

.legal-page { padding-block: 46px 80px; }
.legal-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 24px; align-items: start; }
.legal-nav { position: sticky; top: calc(var(--header-h) + 20px); display: flex; flex-direction: column; gap: 4px; padding: 12px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); }
.legal-nav a { padding: 9px 10px; border-radius: 8px; color: var(--muted); font-size: .88rem; font-weight: 700; }
.legal-nav a:hover { color: var(--text); background: var(--surface-2); }
.legal-article { padding: clamp(22px, 4vw, 40px); }
.legal-article section + section { margin-top: 32px; padding-top: 28px; border-top: 1px solid var(--line); }
.legal-article h2 { margin: 0 0 12px; font-size: 1.34rem; }
.legal-article p { margin: 0; color: var(--muted); }
.legal-article a { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }

.message-card { padding: clamp(28px, 6vw, 52px); text-align: center; }
.message-card h1 { font-size: clamp(2rem, 5vw, 3.4rem); }
.message-card > p:not(.eyebrow):not(.error-reference) { max-width: 600px; margin: 17px auto; color: var(--muted); }
.message-icon { width: 62px; height: 62px; display: grid; place-items: center; margin: 0 auto 22px; border-radius: 50%; color: white; background: var(--success); font-size: 1.8rem; }
.message-card .button-row { justify-content: center; margin-top: 25px; }
.error-card .error-code { display: block; color: var(--primary); font-size: clamp(3rem, 10vw, 7rem); line-height: .9; font-weight: 950; letter-spacing: -.06em; }
.error-reference { color: var(--muted); }
code { padding: 2px 6px; border-radius: 6px; color: #c4b5fd; background: var(--surface-3); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .86em; }
pre { overflow: auto; padding: 16px; border: 1px solid var(--line); border-radius: 11px; color: #dbeafe; background: #070a0f; text-align: left; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .8rem; }

.flash-stack { position: fixed; z-index: 600; top: calc(var(--header-h) + 15px); right: 18px; width: min(420px, calc(100% - 36px)); display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.flash { display: flex; align-items: flex-start; gap: 11px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 12px; color: var(--text); background: color-mix(in srgb, var(--surface) 96%, transparent); box-shadow: var(--shadow); pointer-events: auto; }
.flash > span { width: 25px; height: 25px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; color: white; background: var(--info); font-size: .76rem; font-weight: 850; }
.flash p { flex: 1; margin: 1px 0 0; font-size: .87rem; }
.flash button { border: 0; color: var(--muted); background: none; font-size: 1rem; }
.flash-success > span { background: var(--success); }
.flash-error > span { background: var(--danger); }
.flash-warning > span { background: var(--warning); }

.modal-backdrop { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 20px; background: rgba(2,4,8,.80); backdrop-filter: blur(14px); }
.modal-backdrop[hidden] { display: none; }
.modal-card { width: min(100%, 520px); padding: clamp(25px, 5vw, 42px); border: 1px solid var(--line-strong); border-radius: 22px; background: var(--surface); box-shadow: var(--shadow); text-align: center; }
.modal-card h2 { margin: 0; font-size: clamp(1.8rem, 4vw, 2.7rem); letter-spacing: -.04em; }
.modal-card p { color: var(--muted); }
.modal-card .button-row { justify-content: center; margin-top: 23px; }
.cookie-banner { position: fixed; z-index: 900; left: 50%; bottom: 18px; width: min(calc(100% - 32px), 830px); transform: translateX(-50%); display: flex; align-items: center; gap: 20px; padding: 18px; border: 1px solid var(--line-strong); border-radius: 16px; background: color-mix(in srgb, var(--surface) 97%, transparent); box-shadow: var(--shadow); backdrop-filter: blur(15px); }
.cookie-banner[hidden] { display: none; }
.cookie-banner > div:first-child { flex: 1; }
.cookie-banner h2 { margin: 0; font-size: 1rem; }
.cookie-banner p { margin: 5px 0 0; color: var(--muted); font-size: .82rem; }
.cookie-banner a { color: var(--primary); text-decoration: underline; }

.site-footer { margin-top: 20px; padding: 50px 0 26px; border-top: 1px solid var(--line); background: color-mix(in srgb, var(--bg-soft) 76%, transparent); }
.footer-grid { display: grid; grid-template-columns: 1.7fr .65fr .75fr; gap: 48px; }
.brand-footer { margin-bottom: 14px; }
.footer-grid p { max-width: 520px; margin: 9px 0; color: var(--muted); font-size: .88rem; }
.footer-grid h2 { margin: 0 0 12px; font-size: .79rem; letter-spacing: .1em; text-transform: uppercase; }
.footer-grid > div:not(:first-child) { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.footer-grid > div:not(:first-child) a { color: var(--muted); font-size: .87rem; }
.footer-grid > div:not(:first-child) a:hover { color: var(--text); }
.footer-bottom { display: flex; justify-content: space-between; gap: 18px; margin-top: 34px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--subtle); font-size: .79rem; }

.auth-body { min-height: 100vh; display: grid; place-items: center; padding: 28px; background: radial-gradient(circle at 50% -10%, rgba(139,92,246,.22), transparent 42rem), var(--bg); }
.auth-shell { width: min(100%, 470px); }
.auth-brand { display: flex; justify-content: center; margin-bottom: 22px; }
.auth-card { padding: clamp(24px, 6vw, 42px); border: 1px solid var(--line); border-radius: 22px; background: var(--surface); box-shadow: var(--shadow); }
.auth-card h1 { margin: 0; font-size: 2rem; letter-spacing: -.04em; }
.auth-card > div:first-child > p:last-child { margin: 9px 0 25px; color: var(--muted); }
.auth-card form { display: flex; flex-direction: column; gap: 17px; }
.auth-note { margin: 22px 0 0; color: var(--subtle); font-size: .78rem; text-align: center; }

@media (max-width: 1100px) {
  .model-grid, .gallery-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .filter-panel { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filter-actions { align-self: end; }
  .profile-layout { grid-template-columns: minmax(0, 1.25fr) minmax(240px, .55fr); }
}

@media (max-width: 820px) {
  :root { --header-h: 64px; }
  .shell, .narrow-page { width: min(calc(100% - 24px), var(--shell)); }
  .header-inner { min-height: var(--header-h); gap: 9px; }
  .mobile-nav-toggle { display: inline-grid; }
  .site-nav { position: fixed; top: var(--header-h); left: 12px; right: 12px; display: none; flex-direction: column; align-items: stretch; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); }
  .site-nav.open { display: flex; }
  .site-nav a { justify-content: space-between; }
  .theme-toggle { margin-left: 0; }
  .hero { padding: 46px 0 40px; }
  .hero-grid, .profile-hero, .capture-layout { grid-template-columns: 1fr; gap: 22px; }
  .stats-panel { max-width: none; }
  .profile-preview { min-height: 340px; }
  .profile-layout { grid-template-columns: 1fr; }
  .capture-info { position: static; }
  .legal-layout { grid-template-columns: 1fr; }
  .legal-nav { position: static; flex-direction: row; overflow-x: auto; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > div:first-child { grid-column: 1 / -1; }
  .mini-gallery.large { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 640px) {
  body { font-size: 15px; }
  .brand span { max-width: 160px; overflow: hidden; text-overflow: ellipsis; }
  .hero-copy h1, .page-intro h1 { font-size: clamp(2rem, 12vw, 3.15rem); }
  .hero-search { flex-direction: column; }
  .stats-panel > div { min-height: 100px; padding: 17px; }
  .content-section { padding-block: 32px 56px; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .filter-toggle { display: inline-flex; }
  .filter-panel { display: none; }
  .filter-panel.open { display: grid; }
  .filter-panel, .form-grid { grid-template-columns: 1fr; }
  .field-wide, .field-full { grid-column: auto; }
  .filter-actions { width: 100%; }
  .filter-actions .button { flex: 1; }
  .model-grid, .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .model-card-body { padding: 12px; }
  .model-meta { flex-direction: column; gap: 2px; }
  .tag-row { display: none; }
  .card-actions .button-secondary { display: none; }
  .profile-summary { padding: 24px; }
  .profile-summary h1 { font-size: 2.55rem; }
  .form-footer, .cookie-banner { flex-direction: column; align-items: stretch; }
  .form-footer .button, .cookie-banner .button { width: 100%; }
  .cookie-banner { bottom: 10px; }
  .favorites-toolbar { align-items: stretch; flex-direction: column; }
  .favorites-toolbar .inline { justify-content: space-between; }
  .favorites-toolbar .button { width: 100%; margin-left: 0; }
  .pagination { gap: 4px; }
  .page-numbers a, .page-numbers span { min-width: 34px; height: 36px; padding-inline: 6px; }
  .page-button { min-width: 36px; height: 36px; }
  .mini-gallery, .mini-gallery.large { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-grid > div:first-child { grid-column: auto; }
  .footer-bottom { flex-direction: column; }
  .flash-stack { top: calc(var(--header-h) + 10px); right: 10px; width: calc(100% - 20px); }
}

@media (max-width: 420px) {
  .model-grid, .gallery-grid { grid-template-columns: 1fr; }
  .model-media { aspect-ratio: 16 / 11; }
  .stats-panel { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

.footer-link-button {
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.footer-link-button:hover,
.footer-link-button:focus-visible { color: var(--text); }

/* Small component consistency fixes. */
.model-title-row > div { min-width: 0; flex: 1; }
.model-title-row p { margin: 3px 0 0; overflow: hidden; color: var(--muted); font-size: .75rem; text-overflow: ellipsis; white-space: nowrap; }
.live-badge.offline::before { background: #64748b; box-shadow: 0 0 0 4px rgba(100,116,139,.16); }
.button.full { width: 100%; }
