:root {
  color-scheme: dark;
  --bg: #070a0c;
  --surface: rgba(15, 22, 24, 0.9);
  --surface-soft: #152326;
  --ink: #f4f7f4;
  --muted: #a4b4b1;
  --line: rgba(180, 244, 235, 0.16);
  --green: #5eead4;
  --green-strong: #dffff9;
  --moss: #2bb8a6;
  --brass: #d6b16a;
  --ivory: #f1f0e8;
  --amber: #f1c76a;
  --terracotta: #ff8f70;
  --brick: var(--terracotta);
  --gold: var(--brass);
  --oxblood: #ff816d;
  --wood: #e7c17a;
  --night: #05070a;
  --glass: rgba(12, 18, 20, 0.72);
  --glass-strong: rgba(18, 28, 31, 0.9);
  --cyan-glow: rgba(94, 234, 212, 0.3);
  --shadow: 0 24px 82px rgba(0, 0, 0, 0.44);
  --radius: 8px;
  --max: 1180px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, #070a0c 0%, #0b1113 48%, #070a0c 100%);
  color: var(--ink);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(94, 234, 212, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(94, 234, 212, 0.045) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.75), transparent 78%);
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.75), transparent 78%);
}

a {
  color: inherit;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.site-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px clamp(16px, 4vw, 42px);
  border-bottom: 1px solid rgba(220, 205, 185, 0.88);
  background: rgba(241, 234, 223, 0.92);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: var(--radius);
  background: #050807;
  color: #fff;
  font-size: 17px;
  line-height: 1;
  overflow: hidden;
  box-shadow: 0 0 24px rgba(94, 234, 212, 0.22);
}

.brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-links a,
.button,
.ghost-button,
.icon-button,
.danger-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 9px 14px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 750;
  line-height: 1.1;
  transition: transform 0.15s ease, background 0.15s ease, border 0.15s ease, color 0.15s ease;
}

.nav-links a,
.ghost-button {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.65);
  color: var(--ink);
}

.button {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

.button.secondary {
  border-color: rgba(199, 147, 69, 0.35);
  background: #f0e1c8;
  color: var(--wood);
}

.danger-button {
  border-color: rgba(110, 43, 34, 0.28);
  background: #f0d8ce;
  color: var(--oxblood);
}

.icon-button {
  width: 40px;
  padding: 0;
  border-color: var(--line);
  background: var(--surface);
  color: var(--ink);
}

.nav-links a:hover,
.button:hover,
.ghost-button:hover,
.icon-button:hover,
.danger-button:hover {
  transform: translateY(-1px);
}

.home-topbar {
  background: rgba(9, 15, 12, 0.84);
  border-bottom-color: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.home-topbar .brand-mark {
  background: #050807;
  color: var(--green-strong);
}

.home-topbar .nav-links a {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.home-hero {
  position: relative;
  display: flex;
  min-height: clamp(560px, calc(100svh - 118px), 760px);
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: clamp(64px, 8vw, 100px) 0 0;
  background: var(--green-strong);
  color: #fff;
}

.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  filter: saturate(0.94) contrast(1.04);
}

.home-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(9, 16, 14, 0.88) 0%, rgba(9, 16, 14, 0.64) 32%, rgba(9, 16, 14, 0.22) 62%, rgba(9, 16, 14, 0.16) 100%),
    linear-gradient(180deg, rgba(9, 16, 14, 0.12) 0%, rgba(9, 16, 14, 0.16) 55%, rgba(9, 16, 14, 0.78) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
}

.hero-kicker {
  display: flex;
  width: fit-content;
  margin: 0 0 28px;
  color: var(--amber);
  font-size: 15px;
  font-weight: 900;
  text-transform: uppercase;
}

.hero-content h1 {
  max-width: 740px;
  margin: 0 0 14px;
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1;
  letter-spacing: 0;
}

.hero-title {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.2vw, 26px);
  flex-wrap: wrap;
}

.hero-title-logo {
  width: clamp(72px, 9vw, 128px);
  aspect-ratio: 1;
  flex: 0 0 auto;
  border-radius: 22px;
  object-fit: cover;
  box-shadow: 0 0 46px rgba(94, 234, 212, 0.32), 0 18px 46px rgba(0, 0, 0, 0.42);
}

.hero-content p {
  max-width: 670px;
  margin: 0 0 30px;
  color: rgba(255, 255, 255, 0.84);
  font-size: clamp(18px, 2.1vw, 24px);
  line-height: 1.48;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-primary-action {
  margin-top: clamp(24px, 4vw, 40px);
}

.hero-actions .button {
  min-height: 50px;
  padding-inline: 20px;
  background: var(--ivory);
  color: var(--green-strong);
  border-color: var(--ivory);
}

.hero-museum-button {
  min-height: clamp(64px, 7vw, 82px);
  padding: 0 clamp(30px, 5vw, 54px);
  font-size: clamp(18px, 2.1vw, 25px);
  letter-spacing: 0;
  text-transform: none;
}

.hero-actions .ghost-button {
  min-height: 50px;
  padding-inline: 20px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.36);
}

.hero-metrics {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  width: min(var(--max), calc(100% - 32px));
  margin: clamp(36px, 7vh, 76px) auto 0;
  border-top: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(9, 15, 12, 0.74);
  backdrop-filter: blur(18px);
}

.hero-metrics div {
  min-height: 96px;
  padding: 20px 22px;
  border-right: 1px solid rgba(255, 255, 255, 0.16);
}

.hero-metrics div:last-child {
  border-right: 0;
}

.hero-metrics strong {
  display: block;
  margin-bottom: 8px;
  color: #fff;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1;
}

.hero-metrics span {
  color: rgba(255, 255, 255, 0.72);
  font-weight: 800;
}

.home-featured-models,
.home-curation,
.home-collection {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
}

.home-featured-models {
  padding: clamp(42px, 7vw, 76px) 0 0;
}

.hero-featured-models {
  position: relative;
  z-index: 3;
  width: min(var(--max), calc(100% - 32px));
  margin: clamp(28px, 4vw, 44px) auto 0;
}

.hero-featured-models .section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.hero-featured-models .section-heading h2 {
  max-width: 620px;
  color: #fff;
  font-size: clamp(24px, 3vw, 38px);
}

.hero-featured-models .home-model-card {
  background: rgba(7, 10, 12, 0.7);
}

.hero-featured-models .home-model-preview {
  min-height: 180px;
}

.hero-featured-models .home-model-copy {
  padding: 13px;
}

.hero-featured-models .home-model-copy h3 {
  font-size: 18px;
}

.home-curation {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  gap: clamp(24px, 5vw, 64px);
  align-items: center;
  padding: clamp(48px, 8vw, 88px) 0;
}

.curation-copy h2,
.section-heading h2 {
  margin: 0;
  font-size: clamp(30px, 4.8vw, 58px);
  line-height: 1.02;
  letter-spacing: 0;
}

.curation-copy p {
  max-width: 680px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.65;
}

.curation-access {
  display: grid;
  gap: 10px;
}

.access-link {
  display: grid;
  gap: 6px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  text-decoration: none;
  box-shadow: 0 12px 38px rgba(34, 25, 18, 0.1);
}

.access-link.primary {
  border-color: rgba(33, 55, 45, 0.28);
  background: #e5ece5;
}

.access-link span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.access-link strong {
  font-size: 22px;
}

.home-collection {
  padding: 0 0 72px;
}

.section-heading {
  display: grid;
  gap: 8px;
  margin-bottom: 22px;
}

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

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

.featured-model-grid .empty-state {
  grid-column: 1 / -1;
}

.home-model-card {
  display: grid;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.home-model-preview {
  position: relative;
  min-height: 260px;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(199, 147, 69, 0.14), rgba(255, 250, 242, 0.22)),
    var(--surface-soft);
}

.home-model-preview .viewer-empty {
  min-height: 100%;
}

.home-model-copy {
  display: grid;
  gap: 8px;
  padding: 15px;
}

.home-model-copy span {
  color: var(--brick);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.home-model-copy h3 {
  overflow: hidden;
  margin: 0;
  color: var(--ink);
  font-size: 22px;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-model-copy p {
  overflow: hidden;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-model-copy .ghost-button {
  width: fit-content;
  margin-top: 4px;
}

.comparsa-tile {
  display: grid;
  min-height: 150px;
  align-content: space-between;
  gap: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  box-shadow: 0 12px 38px rgba(34, 25, 18, 0.1);
}

.comparsa-tile span,
.comparsa-tile small {
  color: var(--muted);
  font-weight: 800;
}

.comparsa-tile strong {
  font-size: 24px;
  line-height: 1.12;
}

.viewer-layout {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  gap: 24px;
  width: min(1640px, calc(100% - 32px));
  margin: 24px auto 42px;
}

.side-panel,
.info-panel,
.admin-panel,
.login-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.side-panel {
  position: sticky;
  top: 84px;
  align-self: start;
  max-height: calc(100vh - 104px);
  overflow: auto;
  padding: 18px;
}

.panel-heading {
  margin: 0 0 14px;
  font-size: 18px;
}

.comparsa-list {
  display: grid;
  gap: 8px;
}

.comparsa-filter {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  text-align: left;
  font-weight: 750;
}

.random-comparsa-filter {
  border-color: rgba(94, 234, 212, 0.32);
  background:
    linear-gradient(135deg, rgba(94, 234, 212, 0.16), rgba(214, 177, 106, 0.1)),
    var(--surface);
}

.random-comparsa-filter .filter-logo {
  background: linear-gradient(135deg, var(--green), var(--gold));
  color: #061111;
}

.filter-logo {
  display: grid;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  place-items: center;
  overflow: hidden;
  border-radius: 6px;
  background: var(--surface-soft);
  color: var(--green-strong);
  font-size: 13px;
  font-weight: 900;
}

.filter-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.filter-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.filter-copy strong,
.filter-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.filter-copy small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.comparsa-filter.active {
  border-color: rgba(33, 55, 45, 0.42);
  background: #e5ece5;
  color: var(--green-strong);
}

.viewer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.comparsa-profile {
  grid-column: 1 / -1;
  display: grid;
  gap: 18px;
  padding: clamp(18px, 3vw, 28px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 250, 242, 0.96), rgba(234, 223, 206, 0.92)),
    var(--surface);
  box-shadow: var(--shadow);
}

.comparsa-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(16px, 3vw, 26px);
  align-items: stretch;
}

.comparsa-hero-copy {
  display: grid;
  gap: 20px;
  align-content: space-between;
  min-width: 0;
  min-height: 340px;
  padding: clamp(16px, 3vw, 24px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 250, 242, 0.52);
}

.comparsa-title-row {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 16px;
}

.comparsa-title-copy {
  min-width: 0;
}

.comparsa-hero-copy p {
  max-width: 820px;
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.65;
}

.comparsa-quick-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.comparsa-stat {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 250, 242, 0.72);
}

.comparsa-stat strong,
.comparsa-stat span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.comparsa-stat strong {
  color: var(--ink);
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 900;
  line-height: 1;
}

.comparsa-stat span {
  margin-top: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.comparsa-profile-header {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  gap: clamp(18px, 3vw, 28px);
  align-items: center;
}

.comparsa-logo {
  display: grid;
  width: 128px;
  aspect-ratio: 1;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(199, 147, 69, 0.35);
  border-radius: var(--radius);
  background: var(--green);
  color: var(--ivory);
  font-size: 34px;
  font-weight: 900;
}

.comparsa-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.comparsa-copy {
  min-width: 0;
}

.comparsa-name {
  margin: 0;
  font-size: clamp(34px, 5vw, 68px);
  line-height: 0.98;
  letter-spacing: 0;
}

.comparsa-copy p {
  max-width: 860px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.65;
}

.comparsa-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
}

.comparsa-facts div {
  min-width: 0;
  padding: 16px;
  background: rgba(255, 250, 242, 0.78);
}

.comparsa-facts dt {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.comparsa-facts dd {
  margin: 0;
  color: var(--ink);
  font-size: clamp(20px, 3vw, 30px);
  font-weight: 900;
  line-height: 1.05;
}

.comparsa-profile-body {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 18px;
  align-items: start;
}

.comparsa-main-column,
.comparsa-side-column {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.comparsa-side-column .comparsa-facts {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.comparsa-section-heading {
  display: grid;
  gap: 6px;
}

.comparsa-section-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 750;
  line-height: 1.45;
}

.comparsa-history > p,
.rich-text p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.75;
}

.rich-text {
  display: grid;
  gap: 12px;
}

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

.collection-summary-card {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 250, 242, 0.68);
}

.collection-summary-card > span {
  color: var(--brick);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.collection-summary-card > strong {
  color: var(--ink);
  font-size: clamp(22px, 3vw, 32px);
  line-height: 1;
}

.collection-summary-card ul {
  display: grid;
  gap: 6px;
  min-height: 92px;
  margin: 0;
  padding: 0;
  color: var(--muted);
  list-style: none;
}

.collection-summary-card li,
.collection-summary-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.35;
}

.collection-jump {
  width: fit-content;
}

.collection-jump:disabled {
  opacity: 0.5;
  cursor: default;
}

.comparsa-gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.comparsa-gallery figure {
  position: relative;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.gallery-photo-button {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: transparent;
  color: inherit;
}

.comparsa-gallery img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 180ms ease, filter 180ms ease;
}

.gallery-photo-button:hover img,
.gallery-photo-button:focus-visible img {
  filter: brightness(0.82);
  transform: scale(1.04);
}

.gallery-photo-button:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: -2px;
}

.gallery-photo-hint {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 2;
  padding: 6px 9px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(5, 7, 10, 0.72);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.gallery-photo-button:hover .gallery-photo-hint,
.gallery-photo-button:focus-visible .gallery-photo-hint {
  opacity: 1;
  transform: translateY(0);
}

.comparsa-gallery figcaption {
  position: absolute;
  inset: auto 0 0;
  padding: 18px 10px 9px;
  background: linear-gradient(180deg, transparent, rgba(9, 15, 12, 0.72));
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  pointer-events: none;
}

.photo-album-open-all {
  width: fit-content;
}

body.photo-album-open {
  overflow: hidden;
}

.photo-album-modal {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) 64px;
  gap: 16px;
  align-items: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: clamp(14px, 3vw, 34px);
  background:
    radial-gradient(circle at 78% 14%, rgba(94, 234, 212, 0.12), transparent 28%),
    rgba(3, 6, 8, 0.96);
  backdrop-filter: blur(18px);
}

.photo-album-close {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 3;
  border-color: rgba(180, 244, 235, 0.28);
  background: rgba(5, 7, 10, 0.78);
  color: var(--green-strong);
}

.photo-album-nav {
  position: relative;
  z-index: 2;
  width: 56px;
  height: 56px;
  border-color: rgba(180, 244, 235, 0.28);
  background: rgba(5, 7, 10, 0.68);
  color: var(--green-strong);
  font-size: 34px;
  line-height: 1;
}

.photo-album-nav:disabled {
  opacity: 0.35;
  cursor: default;
}

.photo-album-frame {
  display: grid;
  gap: 14px;
  min-width: 0;
  max-width: min(1180px, 100%);
  max-height: calc(100dvh - 68px);
  margin: 0 auto;
}

.photo-album-frame img {
  display: block;
  max-width: 100%;
  max-height: calc(100dvh - 150px);
  margin: 0 auto;
  border: 1px solid rgba(180, 244, 235, 0.18);
  border-radius: var(--radius);
  background: #05070a;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.48);
  object-fit: contain;
}

.photo-album-frame figcaption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-width: 0;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid rgba(180, 244, 235, 0.14);
  border-radius: var(--radius);
  background: rgba(9, 15, 17, 0.82);
  color: var(--ink);
}

.photo-album-frame strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.photo-album-frame span {
  flex: 0 0 auto;
  color: var(--muted);
  font-weight: 850;
}

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

.comparsa-directory-card {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 14px;
  min-width: 0;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  text-align: left;
}

.directory-logo {
  display: grid;
  width: 72px;
  aspect-ratio: 1;
  place-items: center;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface-soft);
  color: var(--green-strong);
  font-size: 18px;
  font-weight: 900;
}

.directory-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.directory-copy {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.directory-copy small {
  color: var(--brick);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.directory-copy strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 20px;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.directory-copy span {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.directory-meta {
  grid-column: 1 / -1;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.comparsa-section {
  display: grid;
  gap: 12px;
}

.comparsa-section h2 {
  margin: 0;
  font-size: 22px;
}

.random-model-list {
  display: grid;
  gap: 1px;
  overflow: hidden;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
}

.random-model-list div {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 12px;
  padding: 12px;
  background: rgba(255, 250, 242, 0.78);
}

.random-model-list dt {
  color: var(--muted);
  font-weight: 850;
}

.random-model-list dd {
  min-width: 0;
  margin: 0;
}

.social-link-grid {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.social-link {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid rgba(33, 55, 45, 0.26);
  border-radius: var(--radius);
  background: rgba(229, 236, 229, 0.86);
  color: var(--green-strong);
  font-weight: 850;
  text-decoration: none;
}

.social-link-icon {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--green);
}

.social-link-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.social-link-icon .filled {
  fill: currentColor;
  stroke: none;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.video-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 250, 242, 0.78);
}

.video-card iframe,
.video-card a {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  background: var(--night);
}

.video-card a {
  display: grid;
  place-items: center;
  color: var(--ivory);
  font-weight: 900;
  text-decoration: none;
}

.video-card h3 {
  margin: 0;
  padding: 12px;
  font-size: 16px;
}

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

.comparsa-side-column .event-list {
  grid-template-columns: 1fr;
}

.event-card {
  display: grid;
  gap: 7px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 250, 242, 0.78);
}

.event-card time {
  color: var(--terracotta);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.event-card h3 {
  margin: 0;
  font-size: 18px;
}

.event-card p {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

.event-card span {
  color: var(--muted);
  line-height: 1.45;
}

.viewer-stage {
  width: min(100%, 1280px);
  margin-inline: auto;
  min-height: 560px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 250, 242, 0.94), rgba(234, 223, 206, 0.92)),
    radial-gradient(circle at center, rgba(199, 147, 69, 0.24), transparent 38%);
  box-shadow: var(--shadow);
}

.viewer-host {
  position: relative;
  width: 100%;
  height: min(78vh, 820px);
  min-height: 580px;
}

.viewer-host canvas,
.thumb-host canvas,
.preview-host canvas,
model-viewer {
  display: block;
  width: 100%;
  height: 100%;
}

model-viewer {
  --poster-color: transparent;
  background: transparent;
}

.web-ar-button-disabled,
model-viewer [slot="ar-button"] {
  display: none !important;
}

.ar-badge {
  display: none !important;
}

.viewer-empty {
  display: grid;
  gap: 8px;
  min-height: 320px;
  place-items: center;
  padding: 30px;
  color: var(--muted);
  text-align: center;
}

.viewer-empty strong {
  color: var(--ink);
  font-size: 18px;
}

.viewer-empty span {
  max-width: 420px;
  line-height: 1.45;
}

.viewer-loading {
  position: absolute;
  inset: auto 18px 18px;
  z-index: 2;
  width: fit-content;
  max-width: calc(100% - 36px);
  padding: 9px 12px;
  border: 1px solid rgba(199, 147, 69, 0.35);
  border-radius: var(--radius);
  background: rgba(255, 250, 242, 0.88);
  color: var(--wood);
  font-size: 13px;
  font-weight: 850;
}

.info-panel {
  width: min(100%, 1280px);
  margin-inline: auto;
  padding: 20px;
}

.eyebrow {
  display: inline-flex;
  margin-bottom: 10px;
  color: var(--brick);
  font-size: 13px;
  font-weight: 850;
  text-transform: uppercase;
}

.model-title {
  margin: 0 0 8px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.05;
}

.model-subtitle {
  margin: 0 0 20px;
  color: var(--muted);
  line-height: 1.5;
}

.fact-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
  margin: 0;
}

.fact {
  display: grid;
  gap: 6px;
  min-height: 86px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.035);
}

.fact dt {
  color: var(--muted);
  font-weight: 800;
}

.fact dd {
  min-width: 0;
  margin: 0;
}

.model-detail-sections {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
  margin-top: 20px;
}

.model-detail-section {
  display: grid;
  gap: 9px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 250, 242, 0.72);
}

.model-detail-section h3 {
  margin: 0;
  color: var(--green-strong);
  font-size: 15px;
}

.model-detail-section p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  white-space: pre-line;
}

.model-data-list {
  display: grid;
  gap: 1px;
  overflow: hidden;
  margin: 0;
  border-radius: var(--radius);
  background: var(--line);
}

.model-data-list div {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 10px;
  padding: 10px;
  background: rgba(255, 250, 242, 0.78);
}

.model-data-list dt {
  color: var(--muted);
  font-weight: 850;
}

.model-data-list dd {
  min-width: 0;
  margin: 0;
}

.model-browser {
  grid-column: 1 / -1;
  display: grid;
  gap: 22px;
  width: min(100%, 1280px);
  margin-inline: auto;
}

.category-section {
  display: grid;
  gap: 12px;
}

.category-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  font-size: 24px;
}

.category-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.model-strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 12px;
}

.model-card {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  text-align: left;
}

.model-card.active {
  border-color: rgba(33, 55, 45, 0.46);
  box-shadow: 0 0 0 3px rgba(199, 147, 69, 0.18);
}

.thumb-host {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 6px;
  background:
    linear-gradient(180deg, rgba(199, 147, 69, 0.14), rgba(255, 250, 242, 0.22)),
    #eadfce;
}

.model-card strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.model-card span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.empty-state {
  padding: 18px;
  border: 1px dashed rgba(111, 98, 83, 0.45);
  border-radius: var(--radius);
  color: var(--muted);
  background: rgba(255, 250, 242, 0.64);
}

.admin-main,
.login-wrap {
  width: min(var(--max), calc(100% - 32px));
  margin: 28px auto 56px;
}

.login-wrap {
  display: grid;
  min-height: calc(100vh - 140px);
  place-items: center;
}

.login-panel {
  width: min(460px, 100%);
  padding: 26px;
}

.login-panel h1,
.admin-panel h1,
.admin-panel h2 {
  margin: 0 0 14px;
}

.protocol-warning {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px 16px;
  align-items: center;
  width: min(var(--max), calc(100% - 32px));
  margin: 18px auto 0;
  padding: 14px;
  border: 1px solid rgba(110, 43, 34, 0.28);
  border-radius: var(--radius);
  background: #f0d8ce;
  color: var(--oxblood);
}

.protocol-warning strong {
  display: block;
  color: var(--oxblood);
}

.protocol-warning span {
  color: var(--oxblood);
  line-height: 1.45;
}

.protocol-warning .button {
  grid-row: span 2;
}

.admin-dashboard,
.admin-workspace {
  display: grid;
  gap: 18px;
}

.admin-hero,
.workspace-heading {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.admin-hero {
  padding: clamp(22px, 4vw, 34px);
}

.admin-status-panel {
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.admin-status-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.admin-status-heading h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 38px);
  line-height: 1.05;
}

.admin-status-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.status-metric {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
}

.status-metric span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.status-metric strong {
  color: var(--green-strong);
  font-size: clamp(30px, 4vw, 48px);
  line-height: 0.95;
}

.status-metric small {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-weight: 780;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-next-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.setup-step {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.setup-step::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--terracotta);
  box-shadow: 0 0 16px rgba(255, 143, 112, 0.28);
}

.setup-step.done {
  border-color: rgba(94, 234, 212, 0.32);
  color: var(--green-strong);
}

.setup-step.done::before {
  background: var(--green);
  box-shadow: 0 0 16px rgba(94, 234, 212, 0.34);
}

.admin-hero h1,
.workspace-heading h1 {
  margin: 0;
  font-size: clamp(32px, 5vw, 58px);
  line-height: 1;
}

.admin-hero p,
.workspace-heading p {
  max-width: 720px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.55;
}

.admin-choice-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.admin-choice-card {
  display: grid;
  min-height: 190px;
  align-content: space-between;
  gap: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  text-align: left;
  box-shadow: 0 12px 38px rgba(34, 25, 18, 0.1);
}

.admin-choice-card:hover {
  transform: translateY(-1px);
}

.admin-choice-card span {
  color: var(--terracotta);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-choice-card strong {
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.05;
}

.admin-choice-card small {
  color: var(--muted);
  font-weight: 850;
}

.ios-export-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.ios-export-panel h2 {
  margin: 0;
  font-size: clamp(22px, 3vw, 34px);
}

.ios-export-panel p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.ios-export-panel .notice {
  grid-column: 1 / -1;
  margin: 0;
}

.workspace-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 22px;
}

.workspace-tabs {
  position: sticky;
  top: 76px;
  z-index: 12;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(12, 18, 20, 0.82);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(18px);
}

.workspace-tabs button,
.workspace-tabs a {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border: 1px solid rgba(180, 244, 235, 0.14);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
  font-weight: 850;
  text-decoration: none;
}

.workspace-tabs button.active {
  border-color: rgba(94, 234, 212, 0.46);
  background: rgba(94, 234, 212, 0.13);
  color: var(--green-strong);
  box-shadow: inset 0 0 0 1px rgba(94, 234, 212, 0.07);
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 390px);
  gap: 18px;
  align-items: start;
}

.admin-grid.comparsa-only {
  grid-template-columns: 1fr;
}

.admin-panel {
  padding: 20px;
}

.admin-list-tools {
  margin: 12px 0 14px;
}

.admin-list-tools input {
  width: 100%;
}

.admin-stack {
  display: grid;
  gap: 18px;
}

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

.field {
  display: grid;
  gap: 7px;
}

.field.full {
  grid-column: 1 / -1;
}

.field label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.field-note {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.optimizer-panel {
  grid-column: 1 / -1;
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.optimizer-panel strong {
  color: var(--ink);
}

.optimizer-panel span {
  color: var(--muted);
  line-height: 1.45;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 42px;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
}

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

.form-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.admin-subsection {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.admin-subsection h3 {
  margin: 0;
  font-size: 16px;
}

.compact-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
}

.compact-form .field textarea {
  min-height: 74px;
}

.compact-form button {
  min-height: 42px;
}

.mini-list {
  display: grid;
  gap: 8px;
}

.mini-list-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 250, 242, 0.68);
}

.mini-list-item div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.mini-list-item strong,
.mini-list-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-list-item span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.notice {
  margin: 12px 0 0;
  padding: 11px 12px;
  border-radius: var(--radius);
  background: #f0e1c8;
  color: var(--wood);
  line-height: 1.45;
}

.notice.error {
  background: #f0d8ce;
  color: var(--oxblood);
}

.notice.success {
  background: #e5ece5;
  color: #214f3f;
}

.preview-host {
  position: relative;
  height: 360px;
  min-height: 360px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.admin-viewer-host {
  width: 100%;
}

.admin-preview-card {
  display: grid;
  height: 100%;
  min-height: 320px;
  place-items: center;
  gap: 8px;
  padding: 24px;
  color: var(--muted);
  text-align: center;
}

.admin-preview-card strong {
  color: var(--ink);
  font-size: 18px;
}

.admin-preview-card span {
  font-weight: 850;
}

.admin-preview-card small {
  color: var(--muted);
}

.media-preview {
  width: 112px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.media-preview img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.audio-preview {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
}

.audio-preview strong {
  color: var(--ink);
}

.audio-preview span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 760;
}

.audio-preview audio {
  width: 100%;
}

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

.photo-preview-grid figure {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.photo-preview-grid img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.photo-preview-grid figcaption {
  overflow: hidden;
  padding: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.list-stack {
  display: grid;
  gap: 10px;
}

.admin-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.row-title {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.admin-row-main {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}

.admin-row-logo {
  display: grid;
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  place-items: center;
  overflow: hidden;
  border-radius: 6px;
  background: var(--surface-soft);
  color: var(--green-strong);
  font-size: 13px;
  font-weight: 900;
}

.admin-row-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.row-title strong,
.row-title span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row-title span {
  color: var(--muted);
  font-size: 13px;
}

.row-actions {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.chip {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  background: #eadfce;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

/* Capa visual: museo digital limpio y futurista. */
.topbar {
  border-bottom-color: rgba(180, 244, 235, 0.13);
  background: rgba(7, 10, 12, 0.78);
  box-shadow: 0 12px 38px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(20px) saturate(1.2);
}

.home-topbar {
  background: rgba(7, 10, 12, 0.78);
  border-bottom-color: rgba(180, 244, 235, 0.13);
}

.brand {
  color: var(--ink);
}

.brand-mark,
.home-topbar .brand-mark {
  background: #050807;
  color: #051010;
  box-shadow: 0 0 34px rgba(94, 234, 212, 0.28);
}

.brand-text {
  color: var(--ink);
}

.nav-links a,
.ghost-button,
.icon-button {
  border-color: rgba(180, 244, 235, 0.17);
  background: rgba(255, 255, 255, 0.045);
  color: var(--ink);
}

.home-topbar .nav-links a {
  border-color: rgba(180, 244, 235, 0.17);
  background: rgba(255, 255, 255, 0.045);
  color: var(--ink);
}

@media (hover: hover) and (pointer: fine) {
  .home-topbar {
    position: fixed;
    right: 0;
    left: 0;
    transform: translateY(calc(-100% + 8px));
    opacity: 0.18;
    transition: transform 0.24s ease, opacity 0.24s ease, box-shadow 0.24s ease;
  }

  .home-topbar::before {
    content: "";
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    height: 34px;
  }

  .home-topbar:hover,
  .home-topbar:focus-within {
    transform: translateY(0);
    opacity: 1;
  }
}

.nav-links a:hover,
.ghost-button:hover,
.icon-button:hover {
  border-color: rgba(94, 234, 212, 0.46);
  background: rgba(94, 234, 212, 0.1);
  box-shadow: 0 0 28px rgba(94, 234, 212, 0.12);
}

.button {
  border-color: transparent;
  background: linear-gradient(135deg, var(--green), var(--gold));
  color: #051010;
  box-shadow: 0 16px 42px rgba(94, 234, 212, 0.2);
}

.button:hover {
  box-shadow: 0 18px 48px rgba(94, 234, 212, 0.28);
}

.button.secondary {
  border-color: rgba(214, 177, 106, 0.34);
  background: rgba(214, 177, 106, 0.14);
  color: var(--ivory);
}

.danger-button {
  border-color: rgba(255, 129, 109, 0.34);
  background: rgba(255, 129, 109, 0.12);
  color: #ffd8d0;
}

.home-hero {
  background: var(--night);
  border-bottom: 1px solid rgba(180, 244, 235, 0.14);
}

.hero-image {
  filter: saturate(0.72) contrast(1.12) brightness(0.66);
  transform: scale(1.01);
}

.home-hero::before {
  background:
    linear-gradient(90deg, rgba(5, 7, 10, 0.96) 0%, rgba(5, 8, 10, 0.78) 38%, rgba(5, 8, 10, 0.34) 68%, rgba(5, 8, 10, 0.22) 100%),
    linear-gradient(180deg, rgba(5, 8, 10, 0.08) 0%, rgba(5, 8, 10, 0.26) 52%, rgba(5, 8, 10, 0.94) 100%);
}

.home-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(94, 234, 212, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(94, 234, 212, 0.06) 1px, transparent 1px),
    repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 7px);
  background-size: 128px 128px, 128px 128px, 100% 7px;
  opacity: 0.48;
  mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0.86), transparent 72%);
  -webkit-mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0.86), transparent 72%);
}

.hero-content,
.hero-metrics {
  z-index: 3;
}

.hero-kicker,
.eyebrow {
  width: fit-content;
  padding: 7px 10px;
  border: 1px solid rgba(94, 234, 212, 0.24);
  border-radius: 999px;
  background: rgba(94, 234, 212, 0.08);
  color: var(--green);
}

.hero-content h1 {
  text-shadow: 0 0 42px rgba(94, 234, 212, 0.16);
}

.hero-content p {
  color: rgba(244, 247, 244, 0.82);
}

.hero-actions .button {
  border-color: transparent;
  background: linear-gradient(135deg, var(--green), var(--gold));
  color: #061111;
}

.hero-actions .hero-museum-button {
  box-shadow: 0 20px 62px rgba(94, 234, 212, 0.28), 0 0 0 1px rgba(244, 247, 244, 0.08) inset;
}

.hero-actions .ghost-button {
  border-color: rgba(244, 247, 244, 0.22);
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
}

.hero-metrics {
  overflow: hidden;
  border: 1px solid rgba(180, 244, 235, 0.15);
  border-bottom: 0;
  border-radius: var(--radius) var(--radius) 0 0;
  background: rgba(7, 10, 12, 0.72);
  box-shadow: 0 -22px 72px rgba(0, 0, 0, 0.24);
}

.hero-metrics div {
  border-right-color: rgba(180, 244, 235, 0.12);
}

.hero-metrics strong {
  color: var(--green);
}

.hero-metrics span {
  color: rgba(244, 247, 244, 0.68);
}

.home-featured-models,
.home-curation,
.home-collection {
  color: var(--ink);
}

.curation-copy p,
.model-subtitle,
.comparsa-copy p,
.comparsa-hero-copy p,
.comparsa-history > p,
.comparsa-section-heading p,
.collection-summary-card li,
.collection-summary-card p,
.event-card p,
.event-card span,
.empty-state,
.field-note {
  color: var(--muted);
}

.access-link,
.home-model-card,
.comparsa-tile,
.comparsa-directory-card,
.side-panel,
.info-panel,
.admin-panel,
.login-panel,
.admin-hero,
.workspace-heading,
.comparsa-profile,
.model-card,
.event-card,
.video-card,
.admin-choice-card,
.admin-row,
.mini-list-item,
.optimizer-panel,
.audio-preview,
.photo-preview-grid figure,
.media-preview {
  border-color: rgba(180, 244, 235, 0.15);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.018)),
    var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.access-link:hover,
.home-model-card:hover,
.comparsa-tile:hover,
.comparsa-directory-card:hover,
.admin-choice-card:hover,
.model-card:hover,
.comparsa-filter:hover {
  border-color: rgba(94, 234, 212, 0.4);
  transform: translateY(-1px);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.42), 0 0 34px rgba(94, 234, 212, 0.1);
}

.access-link.primary {
  border-color: rgba(94, 234, 212, 0.34);
  background:
    linear-gradient(135deg, rgba(94, 234, 212, 0.16), rgba(214, 177, 106, 0.1)),
    var(--surface);
}

.access-link span,
.optimizer-panel span,
.home-model-copy p,
.comparsa-tile span,
.directory-copy span,
.directory-meta,
.comparsa-tile small,
.filter-copy small,
.fact dt,
.field label,
.row-title span,
.admin-choice-card small,
.mini-list-item span,
.model-card span {
  color: var(--muted);
}

.access-link strong,
.optimizer-panel strong,
.home-model-copy h3,
.comparsa-tile strong,
.directory-copy strong,
.model-title,
.comparsa-name,
.section-heading h2,
.curation-copy h2,
.panel-heading,
.admin-panel h1,
.admin-panel h2,
.admin-hero h1,
.workspace-heading h1 {
  color: var(--ink);
}

.side-panel {
  scrollbar-color: rgba(94, 234, 212, 0.42) rgba(255, 255, 255, 0.04);
}

.comparsa-filter {
  border-color: rgba(180, 244, 235, 0.13);
  background: rgba(255, 255, 255, 0.035);
  color: var(--ink);
}

.comparsa-filter.active {
  border-color: rgba(94, 234, 212, 0.54);
  background:
    linear-gradient(135deg, rgba(94, 234, 212, 0.18), rgba(214, 177, 106, 0.08)),
    rgba(255, 255, 255, 0.035);
  color: var(--green-strong);
  box-shadow: inset 0 0 0 1px rgba(94, 234, 212, 0.08), 0 0 26px rgba(94, 234, 212, 0.12);
}

.filter-logo,
.directory-logo,
.admin-row-logo {
  border: 1px solid rgba(180, 244, 235, 0.14);
  background: rgba(94, 234, 212, 0.1);
  color: var(--green-strong);
}

.comparsa-profile {
  background:
    linear-gradient(135deg, rgba(94, 234, 212, 0.09), transparent 38%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.048), rgba(255, 255, 255, 0.018)),
    var(--surface);
}

.comparsa-hero-copy,
.comparsa-stat,
.collection-summary-card {
  border-color: rgba(180, 244, 235, 0.14);
  background: rgba(255, 255, 255, 0.04);
}

.comparsa-stat strong,
.collection-summary-card > strong {
  color: var(--green-strong);
}

.comparsa-stat span,
.collection-summary-card li,
.collection-summary-card p {
  color: var(--muted);
}

.collection-summary-card > span {
  color: var(--amber);
}

.comparsa-logo {
  border-color: rgba(214, 177, 106, 0.42);
  background:
    linear-gradient(135deg, rgba(94, 234, 212, 0.18), rgba(214, 177, 106, 0.18)),
    #0b1214;
  color: var(--ivory);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06), 0 0 34px rgba(214, 177, 106, 0.13);
}

.comparsa-facts {
  border-color: rgba(180, 244, 235, 0.14);
  background: rgba(180, 244, 235, 0.1);
}

.comparsa-facts div,
.random-model-list div,
.model-detail-section,
.model-data-list div {
  background: rgba(255, 255, 255, 0.04);
}

.comparsa-facts dd,
.random-model-list dd,
.model-data-list dd {
  color: var(--green-strong);
}

.model-detail-section,
.model-data-list {
  border-color: rgba(180, 244, 235, 0.14);
}

.model-detail-section p {
  color: rgba(244, 247, 244, 0.74);
}

.comparsa-gallery figure,
.home-model-preview,
.thumb-host,
.preview-host {
  border: 1px solid rgba(180, 244, 235, 0.13);
  background:
    linear-gradient(rgba(94, 234, 212, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(94, 234, 212, 0.05) 1px, transparent 1px),
    var(--surface-soft);
  background-size: 34px 34px, 34px 34px, auto;
}

.social-link {
  border-color: rgba(94, 234, 212, 0.28);
  background: rgba(94, 234, 212, 0.1);
  color: var(--green-strong);
}

.social-link-icon {
  background: rgba(94, 234, 212, 0.14);
}

.event-card time,
.admin-choice-card span {
  color: var(--amber);
}

.viewer-stage {
  position: relative;
  border-color: rgba(180, 244, 235, 0.16);
  background:
    linear-gradient(rgba(94, 234, 212, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(94, 234, 212, 0.055) 1px, transparent 1px),
    linear-gradient(180deg, rgba(21, 35, 38, 0.96), rgba(5, 7, 10, 0.98));
  background-size: 58px 58px, 58px 58px, auto;
  box-shadow: 0 28px 88px rgba(0, 0, 0, 0.48), inset 0 0 0 1px rgba(255, 255, 255, 0.035);
}

.viewer-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(94, 234, 212, 0.06), transparent 26%),
    linear-gradient(0deg, rgba(214, 177, 106, 0.08), transparent 32%);
}

.viewer-stage::after {
  content: "Gigantes3D.com";
  position: absolute;
  left: 18px;
  bottom: 18px;
  z-index: 2;
  width: max-content;
  min-width: clamp(96px, 11vw, 142px);
  min-height: clamp(82px, 10vw, 116px);
  padding-top: clamp(60px, 8vw, 88px);
  pointer-events: none;
  background-image: url("gigantes3d-logo-ai.png");
  background-position: top left;
  background-repeat: no-repeat;
  background-size: clamp(58px, 8vw, 84px) clamp(58px, 8vw, 84px);
  color: rgba(223, 255, 249, 0.78);
  font-size: clamp(12px, 1.3vw, 16px);
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.62);
  opacity: 0.9;
}

.viewer-host {
  z-index: 1;
}

.viewer-empty strong,
.admin-preview-card strong {
  color: var(--ink);
}

.viewer-loading,
.notice {
  border: 1px solid rgba(214, 177, 106, 0.24);
  background: rgba(214, 177, 106, 0.12);
  color: #f5d994;
}

.notice.error,
.protocol-warning {
  border-color: rgba(255, 129, 109, 0.28);
  background: rgba(255, 129, 109, 0.12);
  color: #ffd8d0;
}

.protocol-warning strong,
.protocol-warning span {
  color: #ffd8d0;
}

.notice.success {
  border-color: rgba(94, 234, 212, 0.28);
  background: rgba(94, 234, 212, 0.1);
  color: var(--green-strong);
}

.fact {
  border-top-color: rgba(180, 244, 235, 0.13);
}

.category-title::after {
  background: linear-gradient(90deg, rgba(94, 234, 212, 0.38), transparent);
}

.model-card.active {
  border-color: rgba(94, 234, 212, 0.58);
  box-shadow: 0 0 0 3px rgba(94, 234, 212, 0.12), 0 20px 62px rgba(0, 0, 0, 0.38);
}

.empty-state {
  border-color: rgba(180, 244, 235, 0.18);
  background: rgba(255, 255, 255, 0.035);
}

.field input,
.field select,
.field textarea {
  border-color: rgba(180, 244, 235, 0.16);
  background: rgba(255, 255, 255, 0.045);
  color: var(--ink);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: rgba(94, 234, 212, 0.54);
  outline: 0;
  box-shadow: 0 0 0 3px rgba(94, 234, 212, 0.12);
}

.field input::file-selector-button {
  margin-right: 10px;
  border: 0;
  border-radius: 6px;
  padding: 7px 10px;
  background: rgba(94, 234, 212, 0.14);
  color: var(--green-strong);
  font-weight: 850;
}

.field select option {
  background: #101719;
  color: var(--ink);
}

.admin-subsection {
  border-top-color: rgba(180, 244, 235, 0.13);
}

.chip {
  background: rgba(94, 234, 212, 0.1);
  color: var(--green-strong);
}

:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
}

.button:disabled,
.ghost-button:disabled,
.icon-button:disabled,
.danger-button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
  transform: none;
}

.model-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 20px;
}

.exhibition-button {
  min-height: 46px;
  padding-inline: 18px;
  border-color: rgba(94, 234, 212, 0.7);
  background:
    linear-gradient(135deg, rgba(214, 177, 106, 0.9), rgba(94, 234, 212, 0.95));
  color: #061111;
  box-shadow: 0 14px 44px rgba(94, 234, 212, 0.16);
}

.tour-controls {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: calc(100% - 250px);
}

.tour-toggle {
  min-height: 44px;
  border-color: rgba(214, 177, 106, 0.62);
  background: rgba(214, 177, 106, 0.92);
  color: #061111;
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.26), 0 0 22px rgba(214, 177, 106, 0.14);
  backdrop-filter: blur(14px);
}

.tour-status {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid rgba(180, 244, 235, 0.2);
  border-radius: var(--radius);
  background: rgba(5, 7, 10, 0.68);
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.22);
}

.tour-status.active {
  border-color: rgba(94, 234, 212, 0.38);
  color: var(--green-strong);
}

.tour-caption {
  position: absolute;
  right: 16px;
  bottom: 16px;
  z-index: 4;
  display: grid;
  gap: 5px;
  width: min(440px, calc(100% - 32px));
  padding: 14px 16px;
  border: 1px solid rgba(180, 244, 235, 0.18);
  border-radius: var(--radius);
  background: rgba(5, 7, 10, 0.72);
  color: var(--ink);
  box-shadow: 0 18px 52px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(16px);
}

.tour-caption strong {
  font-size: clamp(20px, 2.4vw, 34px);
  line-height: 1.05;
}

.tour-caption span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 780;
  line-height: 1.35;
}

.exhibition-stage-button {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 4;
  min-height: 44px;
  border-color: rgba(94, 234, 212, 0.68);
  background: rgba(5, 7, 10, 0.74);
  color: var(--green-strong);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.34), 0 0 22px rgba(94, 234, 212, 0.16);
  backdrop-filter: blur(14px);
}

body.exhibition-open {
  overflow: hidden;
}

.viewer-stage.guided-tour-active {
  border-color: rgba(214, 177, 106, 0.42);
  box-shadow: 0 28px 88px rgba(0, 0, 0, 0.48), 0 0 0 3px rgba(214, 177, 106, 0.1), inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.viewer-stage:fullscreen,
.viewer-stage:-webkit-full-screen {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  max-width: none;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  border-radius: 0;
}

.viewer-stage:fullscreen .viewer-host,
.viewer-stage:-webkit-full-screen .viewer-host {
  height: 100vh;
  height: 100dvh;
  min-height: 100vh;
  min-height: 100dvh;
}

.exhibition-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  height: 100vh;
  height: 100dvh;
  padding: clamp(12px, 2vw, 28px);
  background:
    radial-gradient(circle at 78% 14%, rgba(94, 234, 212, 0.15), transparent 28%),
    linear-gradient(180deg, rgba(3, 6, 8, 0.96), rgba(5, 7, 10, 0.98));
  backdrop-filter: blur(18px);
}

.exhibition-shell {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 390px);
  gap: 18px;
  height: 100%;
  max-width: 1680px;
  margin: 0 auto;
}

.exhibition-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 5;
  border-color: rgba(180, 244, 235, 0.28);
  background: rgba(5, 7, 10, 0.74);
  color: var(--green-strong);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.34);
}

.exhibition-viewer {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgba(180, 244, 235, 0.18);
  border-radius: var(--radius);
  background:
    linear-gradient(rgba(94, 234, 212, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(94, 234, 212, 0.055) 1px, transparent 1px),
    linear-gradient(180deg, rgba(17, 29, 31, 0.96), rgba(3, 5, 7, 0.98));
  background-size: 68px 68px, 68px 68px, auto;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04), 0 30px 90px rgba(0, 0, 0, 0.48);
}

.exhibition-viewer::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(94, 234, 212, 0.08), transparent 30%),
    linear-gradient(0deg, rgba(214, 177, 106, 0.08), transparent 34%);
}

.exhibition-viewer::after {
  content: "Gigantes3D.com";
  position: absolute;
  left: 18px;
  bottom: 18px;
  z-index: 2;
  width: max-content;
  min-width: clamp(104px, 11vw, 150px);
  min-height: clamp(86px, 10vw, 122px);
  padding-top: clamp(64px, 8vw, 92px);
  pointer-events: none;
  background-image: url("gigantes3d-logo-ai.png");
  background-position: top left;
  background-repeat: no-repeat;
  background-size: clamp(62px, 8vw, 90px) clamp(62px, 8vw, 90px);
  color: rgba(223, 255, 249, 0.82);
  font-size: clamp(12px, 1.15vw, 16px);
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.68);
  opacity: 0.92;
}

.exhibition-viewer canvas,
.exhibition-viewer model-viewer {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
}

.exhibition-viewer .viewer-empty {
  height: 100%;
}

.exhibition-info {
  align-self: end;
  display: grid;
  gap: 12px;
  max-height: calc(100svh - 56px);
  overflow: auto;
  padding: 18px;
  border: 1px solid rgba(180, 244, 235, 0.18);
  border-radius: var(--radius);
  background: rgba(9, 15, 17, 0.86);
  box-shadow: 0 24px 72px rgba(0, 0, 0, 0.38);
}

.exhibition-info h2 {
  margin: 0;
  font-size: clamp(30px, 3.4vw, 56px);
  line-height: 1.02;
}

.exhibition-info p {
  margin: 0;
  color: var(--green-strong);
  font-weight: 850;
}

.exhibition-facts {
  display: grid;
  gap: 1px;
  overflow: hidden;
  margin: 2px 0 0;
  border-radius: var(--radius);
  background: rgba(180, 244, 235, 0.14);
}

.exhibition-facts div {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 10px;
  padding: 11px 12px;
  background: rgba(255, 255, 255, 0.045);
}

.exhibition-facts dt {
  color: var(--muted);
  font-weight: 850;
}

.exhibition-facts dd {
  min-width: 0;
  margin: 0;
  color: var(--ink);
  font-weight: 760;
}

@media (max-width: 1080px) {
  .exhibition-shell {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr) auto;
  }

  .exhibition-viewer {
    min-height: 58svh;
  }

  .exhibition-info {
    align-self: stretch;
    max-height: 34svh;
  }
}

@media (max-width: 760px) {
  .model-actions .button {
    width: 100%;
  }

  .tour-controls {
    top: auto;
    right: 12px;
    bottom: 12px;
    left: 12px;
    max-width: none;
    justify-content: space-between;
  }

  .tour-toggle {
    min-height: 40px;
    padding-inline: 12px;
    font-size: 13px;
  }

  .tour-status {
    min-height: 32px;
    font-size: 12px;
  }

  .tour-caption {
    right: 12px;
    bottom: 68px;
    left: 12px;
    width: auto;
    padding: 12px;
  }

  .tour-caption strong {
    font-size: 22px;
  }

  .tour-caption span {
    font-size: 12px;
  }

  .exhibition-stage-button {
    top: 12px;
    right: 12px;
    min-height: 40px;
    padding-inline: 12px;
    font-size: 13px;
  }

  .exhibition-modal {
    padding: 10px;
  }

  .exhibition-shell {
    gap: 10px;
  }

  .exhibition-close {
    top: 10px;
    right: 10px;
  }

  .exhibition-viewer {
    min-height: 56svh;
  }

  .exhibition-info {
    max-height: 38svh;
    padding: 14px;
  }

  .exhibition-info h2 {
    font-size: 28px;
  }

  .exhibition-facts div {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

body.catalog-body {
  background: #eef1ed;
  color: #151c1d;
}

body.catalog-body::before {
  display: none;
}

.catalog-toolbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px clamp(16px, 4vw, 42px);
  border-bottom: 1px solid rgba(20, 28, 29, 0.12);
  background: rgba(238, 241, 237, 0.92);
  backdrop-filter: blur(16px);
}

.catalog-document {
  width: min(1120px, calc(100% - 32px));
  margin: 24px auto 64px;
}

.catalog-page,
.catalog-comparsa {
  margin-bottom: 20px;
  padding: clamp(22px, 4vw, 42px);
  border: 1px solid rgba(20, 28, 29, 0.12);
  border-radius: 8px;
  background: #fffdf8;
  color: #151c1d;
  box-shadow: 0 18px 58px rgba(20, 28, 29, 0.12);
}

.catalog-cover {
  display: grid;
  gap: 22px;
  min-height: 640px;
  align-content: center;
  background:
    linear-gradient(135deg, rgba(94, 234, 212, 0.13), transparent 44%),
    linear-gradient(180deg, #fffdf8, #f4efe5);
}

.catalog-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: fit-content;
  font-weight: 900;
}

.catalog-brand img {
  width: 58px;
  aspect-ratio: 1;
  border-radius: 8px;
  object-fit: cover;
}

.catalog-cover h1 {
  max-width: 820px;
  margin: 0;
  color: #0f1718;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 0.96;
  letter-spacing: 0;
}

.catalog-lead {
  max-width: 760px;
  margin: 0;
  color: #516263;
  font-size: clamp(18px, 2.5vw, 24px);
  line-height: 1.5;
}

.catalog-eyebrow {
  width: fit-content;
  margin: 0;
  padding: 6px 10px;
  border: 1px solid rgba(43, 184, 166, 0.28);
  border-radius: 999px;
  background: rgba(43, 184, 166, 0.08);
  color: #177a70;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.catalog-date,
.catalog-muted {
  margin: 0;
  color: #667574;
}

.catalog-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid rgba(20, 28, 29, 0.12);
  border-radius: 8px;
  background: rgba(20, 28, 29, 0.12);
}

.catalog-metrics.compact {
  margin-top: 20px;
}

.catalog-metrics div {
  padding: 18px;
  background: rgba(255, 255, 255, 0.8);
}

.catalog-metrics strong {
  display: block;
  margin-bottom: 6px;
  color: #0f1718;
  font-size: 32px;
  line-height: 1;
}

.catalog-metrics span {
  color: #667574;
  font-weight: 850;
}

.catalog-index h2,
.catalog-comparsa h2 {
  margin: 0;
  color: #0f1718;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1;
}

.catalog-index ol {
  display: grid;
  gap: 10px;
  margin: 22px 0 0;
  padding-left: 22px;
}

.catalog-index li {
  padding: 12px;
  border: 1px solid rgba(20, 28, 29, 0.1);
  border-radius: 8px;
  background: #f7f4ed;
}

.catalog-index li strong,
.catalog-index li span {
  display: block;
}

.catalog-index li span {
  margin-top: 4px;
  color: #667574;
  font-weight: 750;
}

.catalog-comparsa {
  display: grid;
  gap: 22px;
}

.catalog-comparsa-header {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  gap: 20px;
  align-items: center;
}

.catalog-logo {
  display: grid;
  width: 116px;
  aspect-ratio: 1;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(20, 28, 29, 0.12);
  border-radius: 8px;
  background: #112022;
  color: #eafefa;
  font-size: 30px;
  font-weight: 900;
}

.catalog-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.catalog-intro {
  max-width: 860px;
  margin: 14px 0 0;
  color: #516263;
  line-height: 1.6;
}

.catalog-photo-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.catalog-photo-strip figure {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(20, 28, 29, 0.1);
  border-radius: 8px;
  background: #f7f4ed;
}

.catalog-photo-strip img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.catalog-photo-strip figcaption {
  padding: 7px;
  color: #667574;
  font-size: 11px;
  font-weight: 750;
}

.catalog-extra-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.catalog-extra-grid section {
  padding: 14px;
  border: 1px solid rgba(20, 28, 29, 0.1);
  border-radius: 8px;
  background: #f7f4ed;
}

.catalog-extra-grid h3,
.catalog-model-group h3 {
  margin: 0 0 10px;
  color: #0f1718;
  font-size: 20px;
}

.catalog-extra-grid p {
  margin: 6px 0 0;
  color: #516263;
  overflow-wrap: anywhere;
}

.catalog-model-group {
  display: grid;
  gap: 10px;
}

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

.catalog-model-card {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(20, 28, 29, 0.1);
  border-radius: 8px;
  background: #fdfbf6;
}

.catalog-model-preview-wrap {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(20, 28, 29, 0.1);
  border-radius: 8px;
  background:
    linear-gradient(rgba(43, 184, 166, 0.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(43, 184, 166, 0.07) 1px, transparent 1px),
    #102023;
  background-size: 28px 28px, 28px 28px, auto;
}

.catalog-model-preview {
  position: relative;
  min-height: 230px;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.catalog-model-preview canvas,
.catalog-model-preview model-viewer,
.catalog-model-capture {
  display: block;
  width: 100%;
  height: 100%;
}

.catalog-model-preview.has-capture canvas,
.catalog-model-preview.has-capture model-viewer,
.catalog-model-preview.has-capture .viewer-loading {
  display: none;
}

.catalog-model-capture {
  position: absolute;
  inset: 0;
  object-fit: contain;
}

.catalog-model-preview-wrap figcaption {
  padding: 8px 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.72);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.catalog-model-header {
  display: grid;
  gap: 5px;
}

.catalog-model-type {
  color: #c45b42;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.catalog-model-header h4 {
  margin: 0;
  color: #0f1718;
  font-size: 22px;
  line-height: 1.1;
}

.catalog-data-list {
  display: grid;
  gap: 1px;
  overflow: hidden;
  margin: 0;
  border: 1px solid rgba(20, 28, 29, 0.1);
  border-radius: 8px;
  background: rgba(20, 28, 29, 0.08);
}

.catalog-data-list div {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 8px;
  padding: 8px 10px;
  background: #fffdf8;
}

.catalog-data-list dt {
  color: #667574;
  font-size: 12px;
  font-weight: 850;
}

.catalog-data-list dd {
  min-width: 0;
  margin: 0;
  color: #151c1d;
  font-weight: 750;
  overflow-wrap: anywhere;
}

.catalog-model-notes {
  display: grid;
  gap: 6px;
}

.catalog-model-notes p {
  margin: 0;
  color: #516263;
  line-height: 1.45;
}

@media print {
  @page {
    size: A4;
    margin: 13mm;
  }

  :root {
    color-scheme: light;
  }

  body.catalog-body {
    background: #fff;
  }

  .catalog-toolbar {
    display: none !important;
  }

  .catalog-document {
    width: auto;
    margin: 0;
  }

  .catalog-page,
  .catalog-comparsa {
    margin: 0 0 10mm;
    padding: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: #fff;
    break-after: page;
  }

  .catalog-cover {
    min-height: 240mm;
  }

  .catalog-comparsa,
  .catalog-model-card,
  .catalog-extra-grid section,
  .catalog-photo-strip figure {
    break-inside: avoid;
  }

  .catalog-metrics div,
  .catalog-index li,
  .catalog-extra-grid section,
  .catalog-model-card,
  .catalog-data-list div {
    background: #fff;
  }

  .catalog-model-preview-wrap,
  .catalog-photo-strip img,
  .catalog-model-capture,
  .catalog-logo img,
  .catalog-brand img {
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .catalog-model-preview {
    min-height: 48mm;
  }
}

.hidden {
  display: none !important;
}

@media (max-width: 1080px) {
  .viewer-layout,
  .viewer-grid,
  .admin-grid,
  .home-curation,
  .comparsa-hero,
  .comparsa-profile-body {
    grid-template-columns: 1fr;
  }

  .side-panel {
    position: static;
    max-height: none;
  }

  .comparsa-list {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }

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

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

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

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

  .ios-export-panel {
    grid-template-columns: 1fr;
  }

  .comparsa-facts,
  .comparsa-quick-stats,
  .comparsa-gallery,
  .comparsa-directory-grid,
  .video-grid,
  .event-list,
  .collection-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav-links {
    width: 100%;
    justify-content: flex-start;
  }

  .home-hero {
    min-height: auto;
    padding-top: 72px;
  }

  .hero-image {
    object-position: 62% center;
  }

  .home-hero::before {
    background:
      linear-gradient(90deg, rgba(9, 16, 14, 0.86) 0%, rgba(9, 16, 14, 0.66) 58%, rgba(9, 16, 14, 0.36) 100%),
      linear-gradient(180deg, rgba(9, 16, 14, 0.1) 0%, rgba(9, 16, 14, 0.56) 70%, rgba(9, 16, 14, 0.88) 100%);
  }

  .hero-content p {
    max-width: 94%;
  }

  .hero-primary-action,
  .hero-museum-button {
    width: 100%;
  }

  .hero-museum-button {
    justify-content: center;
  }

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

  .hero-metrics div {
    min-height: 82px;
    padding: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  }

  .form-grid,
  .featured-model-grid,
  .home-comparsa-grid,
  .admin-choice-grid,
  .admin-status-grid,
  .catalog-metrics,
  .catalog-photo-strip,
  .catalog-extra-grid,
  .catalog-model-grid,
  .comparsa-facts,
  .comparsa-quick-stats,
  .comparsa-gallery,
  .comparsa-directory-grid,
  .video-grid,
  .event-list,
  .collection-summary-grid,
  .compact-form {
    grid-template-columns: 1fr;
  }

  .comparsa-profile-header {
    grid-template-columns: 1fr;
  }

  .comparsa-side-column .comparsa-facts {
    grid-template-columns: 1fr;
  }

  .comparsa-title-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .comparsa-hero-copy {
    min-height: 0;
  }

  .photo-album-modal {
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    gap: 8px;
    padding: 12px;
  }

  .photo-album-nav {
    width: 42px;
    height: 42px;
    font-size: 26px;
  }

  .photo-album-close {
    top: 12px;
    right: 12px;
  }

  .photo-album-frame {
    max-height: calc(100dvh - 24px);
  }

  .photo-album-frame img {
    max-height: calc(100dvh - 132px);
  }

  .photo-album-frame figcaption {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .photo-album-frame strong {
    white-space: normal;
  }

  .catalog-comparsa-header,
  .catalog-data-list div {
    grid-template-columns: 1fr;
  }

  .comparsa-logo {
    width: 96px;
  }

  .comparsa-directory-card {
    grid-template-columns: 58px minmax(0, 1fr);
  }

  .directory-logo {
    width: 58px;
  }

  .workspace-heading {
    flex-direction: column;
  }

  .admin-status-heading {
    flex-direction: column;
  }

  .workspace-tabs {
    position: static;
  }

  .workspace-tabs button,
  .workspace-tabs a {
    flex: 1 1 130px;
  }

  .protocol-warning {
    grid-template-columns: 1fr;
  }

  .protocol-warning .button {
    grid-row: auto;
  }

  .viewer-host {
    height: 58vh;
    min-height: 360px;
  }

  .viewer-stage {
    min-height: 360px;
  }

  .fact {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .model-detail-sections {
    grid-template-columns: 1fr;
  }

  .random-model-list div {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .model-data-list div {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .admin-row {
    grid-template-columns: 1fr;
  }

  .row-actions {
    justify-content: flex-start;
  }
}
