:root {
  color-scheme: light;
  --paper: #f6f5f0;
  --surface: #fffefa;
  --ink: #172f37;
  --muted: #4b5f62;
  --line: #d7ddd8;
  --gold: #836224;
  --accent: #214c55;
  font-family: system-ui, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
a { color: var(--accent); text-underline-offset: .22em; }
button, input, select { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid #a77d33; outline-offset: 3px; }
.top, .main, .foot { width: min(92%, 1400px); margin-inline: auto; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 1.4rem; min-height: 88px; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 1rem; color: var(--ink); text-decoration: none; font-weight: 650; }
.brand img { width: 92px; height: 64px; object-fit: contain; }
.edition, .eyebrow { letter-spacing: .13em; text-transform: uppercase; color: var(--gold); font-size: .75rem; font-weight: 750; }
.main { min-height: 58vh; padding: clamp(1.4rem, 4vw, 4rem) 0; }
.foot { border-top: 1px solid var(--line); padding: 1.1rem 0 1.7rem; font-size: .82rem; color: var(--muted); }
.foot span { margin-left: 1rem; }
h1 { margin: .5rem 0 .9rem; font: 400 clamp(2.3rem, 6vw, 5.2rem)/1.02 Georgia, serif; letter-spacing: -.043em; overflow-wrap: anywhere; }
h2, p { margin: 0; }
h2 { font-size: 1.1rem; }
.lede { max-width: 62ch; color: var(--muted); line-height: 1.55; }
.catalog-hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 1rem; padding-bottom: 2rem; }
.total { min-width: 110px; padding-left: 1.2rem; border-left: 1px solid var(--line); color: var(--muted); font-size: .79rem; text-transform: uppercase; letter-spacing: .08em; }
.total strong { display: block; color: var(--ink); font: 400 3.8rem/.98 Georgia, serif; letter-spacing: -.06em; }
.filters { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: .75rem; }
.filters label { display: grid; gap: .35rem; font-size: .88rem; font-weight: 680; }
.filters input, .filters select { width: 100%; min-height: 48px; padding: .6rem .85rem; color: var(--ink); background: var(--surface); border: 1px solid #abbab7; border-radius: .2rem; }
.results { margin: 1.3rem 0 .7rem; color: var(--muted); font-size: .88rem; }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; list-style: none; padding: 0; margin: 0; }
.cards a { display: grid; min-height: 130px; height: 100%; align-content: start; gap: .55rem; padding: 1.2rem; background: var(--surface); border: 1px solid var(--line); text-decoration: none; }
.cards a:hover { border-color: var(--accent); }
.cards strong { color: var(--ink); font-size: 1.03rem; }
.small, .small-status { font-size: .8rem; line-height: 1.45; color: var(--muted); }
.small-status { align-self: end; }
.back { display: inline-block; margin-bottom: 1.5rem; font-size: .9rem; }
.detail-title { max-width: 1080px; }
.detail-title h1 { font-size: clamp(2rem, 5vw, 4.2rem); }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(300px, .85fr); gap: clamp(1.2rem, 3vw, 3rem); margin-top: 1.5rem; }
.stage, .technical { min-width: 0; }
.frame { position: relative; min-height: 330px; background: radial-gradient(ellipse at 52% 40%, #fffefa 0%, #e2e8e4 100%); border: 1px solid var(--line); }
model-viewer, .poster { display: block; width: 100%; height: clamp(340px, 56vh, 640px); }
.poster { object-fit: contain; }
.waiting { display: grid; min-height: 215px; align-content: center; gap: .75rem; padding: 1.5rem; background: var(--surface); border: 1px solid var(--line); }
.launch-zone { display: flex; flex-wrap: wrap; gap: .7rem 1rem; align-items: center; margin-top: 1.1rem; }
.launch { display: inline-flex; justify-content: center; align-items: center; padding: .65rem 1rem; min-height: 46px; border: 1px solid var(--accent); border-radius: .25rem; background: var(--accent); color: white; font-weight: 690; text-align: center; text-decoration: none; }
#quick-look::after { content: "Colocar en el suelo"; }
#quick-look img { position: absolute; width: 1px; height: 1px; opacity: 0; }
.verification { display: inline-block; color: #654d18; background: #eee7d2; border: 1px solid #dfd3ac; border-radius: 2rem; padding: .3rem .65rem; font-size: .75rem; }
.controls { display: flex; flex-wrap: wrap; gap: .45rem; align-items: center; margin: .7rem 0; }
.controls button { padding: .45rem .7rem; min-height: 36px; color: var(--accent); background: var(--surface); border: 1px solid var(--line); }
.controls button[aria-pressed="true"] { border-color: var(--accent); font-weight: 700; }
.controls .small { margin-left: auto; }
.technical { background: var(--surface); border-top: 3px solid var(--accent); padding: 1.05rem 1.15rem; }
.layers { margin: .8rem 0 1rem; padding: 0; list-style: none; counter-reset: layer; }
.layers li { border-top: 1px solid var(--line); padding: .7rem 0 .7rem 2rem; position: relative; counter-increment: layer; }
.layers li::before { position: absolute; left: 0; top: .73rem; content: counter(layer, decimal-leading-zero); color: var(--gold); font-size: .78rem; font-weight: 720; }
.layers strong { display: block; font-size: .95rem; }
.sources { display: flex; flex-wrap: wrap; gap: .55rem 1.1rem; margin-top: 1rem; font-size: .87rem; }
.loading { padding: 2rem 0; }
.model-error { display: grid; place-items: center; min-height: inherit; padding: 1rem; text-align: center; }
.reserve { padding: .65rem .85rem; margin: .6rem 0; color: #654d18; background: #eee7d2; font-size: .83rem; line-height: 1.4; }
@media (max-width: 920px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .top { min-height: 68px; gap: .6rem; }
  .brand { gap: .5rem; font-size: .79rem; }
  .brand img { width: 67px; height: 49px; }
  .edition { font-size: .64rem; text-align: right; }
  .catalog-hero { gap: .45rem; padding-bottom: 1.2rem; }
  .total { min-width: 64px; padding-left: .6rem; font-size: .65rem; }
  .total strong { font-size: 2.4rem; }
  .filters, .cards { grid-template-columns: minmax(0, 1fr); }
  .cards a { min-height: 0; }
  .frame, model-viewer, .poster { min-height: 272px; height: 76vw; max-height: 420px; }
  .launch-zone { align-items: flex-start; flex-direction: column; }
}
.embedded .main { width: 100%; height: 100dvh; min-height: 0; padding: 0; }
.embedded .stage { display: grid; grid-template-rows: minmax(0, 1fr) auto; height: 100%; }
.embedded .stage:has(.reserve) { grid-template-rows: auto minmax(0, 1fr) auto; }
.embedded .reserve { margin: 0; }
.embedded .frame, .embedded model-viewer, .embedded .poster { height: 100%; min-height: 0; max-height: none; }
.embedded .frame { border: 0; }
.embedded .model-error { min-height: 100%; }
.embedded .controls { margin: 0; padding: .4rem .55rem; }
.embedded .loading { padding: 1rem; }
