@font-face {
  font-family: "Timeless Sans";
  src: url("assets/fonts/TimelessSansVF.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
:root {
  font-family:
    "Timeless Sans",
    -apple-system,
    BlinkMacSystemFont,
    "Helvetica Neue",
    Arial,
    sans-serif;
  color: #242623;
  background: #eeede9;
  color-scheme: light;
  --wall: #eeede9;
  --ink: #242623;
  --panel: #f8f8f4;
  --accent: #d8673f;
  --scale: 1;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-width: 320px;
  background: var(--wall);
  color: var(--ink);
  isolation: isolate;
}
button,
a,
input,
select {
  -webkit-tap-highlight-color: transparent;
}
button,
input,
select {
  font: inherit;
}
button,
a {
  touch-action: manipulation;
}
button {
  color: inherit;
  cursor: pointer;
}
button {
  border: 0;
  background: none;
}
button:disabled {
  opacity: 0.25;
  cursor: default;
}
a {
  color: inherit;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 5px;
}
button,
select,
input {
  color: inherit;
}
button svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.3;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.wall {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-position: center;
  background-size: cover;
  pointer-events: none;
}
.shell {
  margin: auto;
}
.topbar {
  display: flex;
  align-items: center;
  gap: 24px;
}
.wordmark {
  text-decoration: none;
  line-height: 1;
  font-weight: 650;
  display: flex;
  align-items: flex-start;
}
.wordmark span {
  letter-spacing: 0;
  margin: 5px 0 0 5px;
}
.top-actions {
  display: flex;
  align-items: center;
}
.top-actions time {
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  margin-right: 14px;
}
.icon {
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 27px;
  font-weight: 300;
  flex: none;
}
.icon:hover {
  background: #7b807214;
}
.stage {
  position: relative;
  display: grid;
  place-items: center;
}
.object {
  display: grid;
  place-items: center;
  transform: scale(var(--scale));
  position: relative;
}
.object svg {
  width: 100%;
  height: 100%;
  overflow: visible;
  display: block;
}
.object[data-model="shadow"] {
  width: min(65vh, 60vw, 730px);
}
.object .rendered-clock {
  filter: drop-shadow(5px 15px 15px #2528211a);
}
.eyebrow {
  display: flex;
  gap: 18px;
  font-size: 9px;
  letter-spacing: 0.12em;
  font-weight: 550;
  text-transform: uppercase;
  color: var(--muted);
}
h1 {
  line-height: 1.08;
  letter-spacing: -0.06em;
  font-weight: 480;
}
.actions {
  display: flex;
  gap: 20px;
  align-items: center;
}
.segment {
  display: flex;
  background: #83887910;
  border: 1px solid var(--line);
  padding: 3px;
  border-radius: 50px;
  gap: 1px;
}
.segment button {
  padding: 8px 15px;
  border-radius: 40px;
  position: relative;
}
.segment button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--wall);
}
.custom-dot {
  display: inline-block;
  width: 4px;
  height: 4px;
  margin-left: 5px;
  border-radius: 50%;
  background: var(--accent);
}
[hidden] {
  display: none !important;
}
.text-action {
  font-size: 11px;
  padding: 8px 0;
  white-space: nowrap;
}
.text-action:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}
.text-action span {
  margin-left: 9px;
}
.customize {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  background: var(--ink);
  color: var(--wall);
  border-radius: 7px;
  padding: 12px 16px;
  font-size: 11px;
}
.customize:hover {
  opacity: 0.85;
}
.customize svg {
  width: 16px;
  height: 16px;
}
.timeline::-webkit-scrollbar {
  display: none;
}
.timeline button {
  scroll-snap-align: center;
}
.timeline button:before {
  content: "";
  position: absolute;
  top: 6px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--line);
}
.timeline button .year {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 6px;
  font-variant-numeric: tabular-nums;
}
.timeline button .name {
  font-size: 10px;
  white-space: nowrap;
  color: var(--muted);
}
.timeline button[aria-current="true"] .year,
.timeline button[aria-current="true"] .name {
  color: var(--ink);
  font-weight: 600;
}
.timeline button:hover .name {
  color: var(--ink);
}
.drawer,
.info-panel {
  position: fixed;
  max-width: calc(100vw - 32px);
  background: var(--panel);
  color: var(--ink);
  display: flex;
  flex-direction: column;
  visibility: hidden;
  opacity: 0;
  transform: translateX(15px);
}
.drawer.open,
.info-panel.open {
  visibility: visible;
  opacity: 1;
  transform: none;
}
.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.drawer-head .eyebrow {
  font-size: 8px;
}
.drawer-body {
  overflow: auto;
  flex: 1;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}
.drawer-intro {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.6;
  margin: 0 0 23px;
}
.control-section {
  border-top: 1px solid var(--line);
  padding: 20px 0;
  display: grid;
  gap: 16px;
}
.control-section h3 {
  font-weight: 500;
  margin: 0 0 2px;
  color: var(--muted);
}
.color-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.field {
  font-size: 11px;
  display: grid;
  gap: 8px;
  position: relative;
}
.color-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 10px;
}
.color-row input {
  width: 32px;
  height: 27px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: transparent;
  cursor: pointer;
}
.color-row input::-webkit-color-swatch-wrapper {
  padding: 3px;
}
.color-row input::-webkit-color-swatch {
  border: 0;
  border-radius: 2px;
}
.field select {
  appearance: auto;
  background: transparent;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  width: 100%;
  color: var(--ink);
}
.field select option {
  background: var(--panel);
}
.range-row {
  grid-template-columns: 1fr auto;
  font-size: 10px;
}
.range-row output {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.range-row input {
  grid-column: 1/-1;
  width: 100%;
  accent-color: var(--ink);
  margin: 5px 0;
}
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  font-size: 11px;
}
.toggle-row input {
  appearance: none;
  width: 30px;
  height: 18px;
  border-radius: 18px;
  background: #7c82783d;
  position: relative;
  cursor: pointer;
  flex-shrink: 0;
}
.toggle-row input:before {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  top: 3px;
  left: 3px;
  background: var(--panel);
  border-radius: 50%;
  transition: transform 0.15s;
}
.toggle-row input:checked {
  background: var(--ink);
}
.toggle-row input:checked:before {
  transform: translateX(12px);
}
.drawer-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--line);
  gap: 12px;
}
.drawer-footer .customize {
  font-size: 10px;
  padding: 11px;
}
.drawer-footer .text-action {
  font-size: 10px;
}
.help,
.credit {
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
}
.upload-label {
  display: block;
  border: 1px dashed var(--line);
  padding: 12px;
  text-align: center;
  border-radius: 6px;
  font-size: 10px;
  cursor: pointer;
}
.upload-label input {
  display: block;
  font-size: 9px;
  max-width: 100%;
  margin-top: 8px;
}
.info-panel {
  width: 380px;
  bottom: auto;
  max-height: calc(100svh - 115px);
}
.info-content {
  padding: 0 24px 26px;
  overflow: auto;
}
.info-content h2 {
  font-size: 32px;
  font-weight: 450;
  letter-spacing: -0.05em;
  margin: 10px 0 22px;
}
.info-content > p:not(.eyebrow) {
  color: var(--muted);
}
.fact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 24px 0;
}
.fact-grid small {
  display: block;
  letter-spacing: 0.08em;
  margin-bottom: 7px;
  color: var(--muted);
}
.info-content .reconstruction-note {
  border-top: 1px solid var(--line);
  padding-top: 18px;
}
.source-link {
  display: inline-block;
  margin-top: 12px;
  text-underline-offset: 4px;
}
.sr-only {
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}
.exit-immersive {
  display: none;
  position: fixed;
  right: 20px;
  top: 20px;
  z-index: 25;
  background: var(--panel);
}
body.immersive .topbar,
body.immersive .caption {
  display: none;
}
body.dark {
  --ink: #e3e4dd;
  --muted: #92998f;
  --wall: #171b18;
  --line: #dfe5d026;
  --panel: #222722;
  color-scheme: dark;
}
body.dark .wall {
  filter: brightness(0.22);
}
body.photo .topbar,
body.photo .caption {
  filter: drop-shadow(0 1px 3px #ffffff80);
}
body.dark.photo .topbar,
body.dark.photo .caption {
  filter: none;
}
.glow [data-hand],
.glow #hourHand,
.glow #minuteHand,
.glow #secondsHand {
  filter: drop-shadow(0 0 3px #b9ffcf) drop-shadow(0 0 9px #8fffb880);
}
.glow [data-hand] > * {
  fill: #c7ffdc;
  stroke: #c7ffdc;
}
.glow #yellowLacquer stop,
.glow #blueLacquer stop {
  stop-color: #c7ffdc;
}
.glow #secondsHand circle {
  fill: #c7ffdc;
}
.glow #faceBase stop {
  stop-color: #17211f;
}
@keyframes arrive {
  from {
    opacity: 0;
    translate: 0 7px;
  }
  to {
    opacity: 1;
    translate: 0 0;
  }
}
@media (min-width: 1500px) {
  .shell {
    padding: 30px 55px 24px;
  }
  .stage {
    min-height: 450px;
  }
  .caption {
    padding-bottom: 35px;
  }
  .timeline button {
    padding-bottom: 16px;
  }
}
@media (max-width: 850px) {
  .shell {
    padding: 20px 24px;
  }
  .object {
    width: min(52vh, 68vw);
    height: min(52vh, 68vw);
  }
  .stage {
    padding-left: 30px;
    padding-right: 30px;
  }
  .caption {
    align-items: flex-start;
  }
  .actions {
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  .customize {
    gap: 10px;
  }
  .top-actions {
    gap: 6px;
  }
  .top-actions time {
    margin-right: 3px;
  }
  .timeline button {
    min-width: 118px;
  }
  .drawer {
    right: 15px;
  }
  .object[data-model="shadow"] {
    width: min(65vh, 76vw);
  }
}
@media (max-width: 600px) {
  .shell {
    padding: 16px 18px max(18px, env(safe-area-inset-bottom));
    min-height: 100svh;
  }
  .wordmark {
    font-size: 34px;
  }
  .topbar {
    height: 38px;
  }
  .top-actions time {
    font-size: 11px;
  }
  .icon {
    width: 32px;
    height: 32px;
  }
  .stage {
    min-height: 310px;
    padding: 16px 25px 28px;
  }
  .object {
    width: min(62vw, 46svh);
    height: min(62vw, 46svh);
  }
  .object[data-model="shadow"] {
    width: 80vw;
    height: 65vw;
  }
  .caption {
    padding: 15px 0 22px;
  }
  .eyebrow {
    font-size: 8px;
    gap: 14px;
  }
  h1 {
    font-size: 34px;
    margin: 9px 0 7px;
  }
  .actions {
    width: 100%;
    justify-content: space-between;
  }
  .customize {
    padding: 11px 12px;
    font-size: 10px;
  }
  .text-action {
    font-size: 10px;
  }
  .timeline {
    margin-right: -18px;
    padding-right: 18px;
  }
  .drawer,
  .info-panel {
    left: 10px;
    right: 10px;
    top: auto;
    bottom: 10px;
    width: auto;
    max-width: none;
    max-height: 76svh;
  }
  .drawer-head {
    padding-top: 20px;
  }
  .drawer-body {
    min-height: 0;
  }
  .info-panel .info-content {
    max-height: 62svh;
  }
}
@media (max-height: 720px) and (min-width: 601px) {
  .shell {
    padding-top: 15px;
    padding-bottom: 14px;
  }
  .stage {
    min-height: 250px;
    padding-top: 10px;
  }
  .object {
    width: min(45vh, 49vw);
    height: min(45vh, 49vw);
  }
  .caption {
    padding-top: 8px;
    padding-bottom: 18px;
  }
  h1 {
    font-size: 34px;
  }
  .timeline {
    padding-top: 10px;
  }
  .drawer {
    top: 75px;
    bottom: 15px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

@media (min-width: 851px) {
  body.panel-open .object {
    transform: translateX(-145px) scale(calc(var(--scale) * 0.85));
  }
}
@media (max-width: 600px) {
  .drawer {
    max-height: 58svh;
  }
  .info-panel {
    max-height: 72svh;
  }
}
.topbar,
main,
.stage,
.caption,
.timeline {
  min-width: 0;
}

@media (max-width: 600px) {
  .actions {
    flex-wrap: nowrap;
    gap: 8px;
  }
  .segment button {
    padding: 8px 10px;
  }
  .actions .text-action span {
    margin-left: 4px;
  }
  .actions .customize {
    padding: 10px 9px;
    gap: 6px;
  }
  .actions .customize svg {
    width: 13px;
  }
}

.customize,
.icon,
.segment button {
  transition:
    background 0.22s ease,
    color 0.22s ease,
    opacity 0.22s ease,
    translate 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.customize:hover,
.icon:hover {
  translate: 0 -1px;
}
.customize:active,
.icon:active {
  translate: 0 1px;
}
.drawer,
.info-panel {
  transition:
    opacity 0.3s ease,
    transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0.3s;
}
.timeline button .name,
.timeline button .year,
.timeline button:after {
  transition:
    color 0.25s ease,
    background 0.25s ease,
    box-shadow 0.3s ease;
}
@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) {
    animation: none !important;
  }
}

/* A dedicated viewport layout prevents empty grid tracks from moving the clock. */
html.immersive-root,
body.immersive {
  overflow: hidden;
  overscroll-behavior: none;
}
body.immersive {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100dvh;
  min-height: 0;
}
body.immersive .shell {
  position: fixed;
  inset: 0;
  display: block;
  width: 100%;
  height: 100dvh;
  min-height: 0;
  max-width: none;
  padding: 0;
  overflow: clip;
}
body.immersive main {
  display: grid;
  grid-template: minmax(0, 1fr) / minmax(0, 1fr);
  width: 100%;
  height: 100%;
  min-height: 0;
}
body.immersive .stage {
  display: grid;
  place-items: center;
  min-height: 0;
  width: 100%;
  height: 100%;
  padding: 0;
}
body.immersive .object {
  translate: none;
  outline: none;
}
body.immersive .exit-immersive {
  display: grid;
  opacity: 0;
  pointer-events: none;
  translate: 0 -4px;
  transition:
    opacity 0.22s ease,
    translate 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
body.immersive.immersive-controls .exit-immersive {
  opacity: 1;
  pointer-events: auto;
  translate: 0 0;
}
body.immersive:not(.immersive-controls) {
  cursor: none;
}

/* The studio is wider than the clock so objects can travel through real space. */
.stage {
  padding-bottom: 12px;
}
.object {
  isolation: isolate;
  view-transition-name: none;
}
.studio-canvas {
  position: absolute;
  left: -100%;
  top: -20%;
  width: 300%;
  height: 140%;
  pointer-events: none;
  z-index: 1;
  max-width: none;
}
.object.has-studio > svg {
  opacity: 0;
  pointer-events: none;
}
h1 {
  font-size: clamp(26px, 2.7vw, 38px);
  margin: 6px 0 7px;
}
.timeline {
  padding-top: 7px;
}
.drawer-body > .segment {
  width: fit-content;
  margin: 0 0 20px;
}
.drawer-intro {
  display: none;
}
.drawer-head .eyebrow {
  display: none;
}
.drawer-head h2 {
  margin: 0;
}
@media (max-width: 600px) {
  .caption {
    display: flex;
    align-items: end;
    gap: 8px;
  }
  .caption .actions {
    gap: 12px;
  }
  .caption .text-action {
    font-size: 10px;
  }
  .caption .customize {
    font-size: 10px;
  }
  .caption .customize svg {
    display: none;
  }
  .identity {
    min-width: 0;
  }
  .identity p {
    font-size: 9px;
    max-width: 205px;
  }
  .identity h1 {
    font-size: 29px;
  }
  .caption .eyebrow {
    font-size: 8px;
  }
  .timeline button {
    min-width: 106px;
  }
}

/* Archivo lateral — a quiet gallery around a working object. */
:root {
  --muted: #777a74;
  --line: #24262320;
}
.shell {
  padding: 0;
  display: grid;
  grid-template-columns: 246px minmax(0, 1fr);
  max-width: none;
}
.archive-rail {
  grid-column: 1;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  padding: 26px 30px 18px 38px;
  min-height: 0;
  min-width: 0;
}
.wordmark {
  font-size: 37px;
  letter-spacing: -2.8px;
  width: fit-content;
}
.wordmark span {
  font-size: 9px;
  margin-top: 4px;
}
.archive-title {
  font-size: 36px;
  letter-spacing: -1.5px;
  line-height: 1.15;
  font-weight: 420;
  margin: 29px 0 25px;
}
.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0 5px 0 13px;
  margin: 0;
  border: 0;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
  position: relative;
  flex: 1;
  overscroll-behavior: contain;
}
.timeline:before {
  display: none;
}
.timeline button {
  position: relative;
  min-width: 0;
  flex: 1 0 42px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 2px;
  min-height: 42px;
  padding: 3px 0 7px 26px;
  text-align: left;
  line-height: 1.2;
  color: var(--muted);
  border: 0;
  border-left: 1px solid var(--line);
  border-radius: 0;
  font-weight: 400;
  white-space: normal;
  background: none;
}
.timeline button:after {
  content: "";
  position: absolute;
  top: 7px;
  left: -5px;
  width: 9px;
  height: 9px;
  box-sizing: border-box;
  border: 1.5px solid #a8aaa5;
  border-radius: 50%;
  background: var(--wall);
  box-shadow: 0 0 0 4px var(--wall);
  transform: none;
}
.timeline button:last-child {
  border-left-color: transparent;
  flex-grow: 0;
  padding-bottom: 0;
}
.timeline button .year,
.timeline button .name {
  font-size: 13px;
  letter-spacing: 0;
  line-height: 1.2;
  color: inherit;
  font-weight: inherit;
  margin: 0;
}
.timeline button[aria-current="true"] {
  color: var(--ink);
  font-weight: 560;
}
.timeline button[aria-current="true"]:after {
  background: var(--ink);
  border-color: var(--ink);
  box-shadow: 0 0 0 4px var(--wall);
  width: 12px;
  height: 12px;
  left: -6.5px;
  top: 5.5px;
}
.timeline button:hover {
  color: var(--ink);
}
.timeline button:focus-visible {
  outline-offset: -2px;
  outline-width: 1px;
}
.topbar {
  grid-column: 2;
  grid-row: 1;
  padding: 0 30px;
  height: 76px;
  justify-content: flex-end;
}
.top-actions {
  gap: 20px;
}
.top-actions time {
  display: none;
}
.icon {
  width: 38px;
  height: 38px;
}
.topbar svg {
  width: 21px;
  height: 21px;
}
main {
  grid-column: 2;
  grid-row: 2;
  position: relative;
  display: grid;
  grid-template-rows: minmax(0, 1fr) 174px;
  min-height: 0;
  overflow: hidden;
}
.stage {
  padding: 0 35px;
  min-height: 0;
  overflow: clip;
}
.object {
  width: min(74dvh, 60vw, 640px);
  height: min(74dvh, 60vw, 640px);
}
.caption {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  padding: 12px 25px 38px;
  gap: 0;
  pointer-events: none;
}
.identity .eyebrow {
  font-size: 11px;
  letter-spacing: 0.07em;
  color: var(--muted);
}
.identity h1 {
  font-size: 42px;
  font-weight: 450;
  letter-spacing: -1.8px;
  margin: 9px 0 9px;
  line-height: 1.1;
}
.identity p {
  font-size: 14px;
  line-height: 1.4;
  color: var(--muted);
  margin: 0;
  max-width: 500px;
}
.history-action {
  font-size: 12px;
  line-height: 1.4;
  padding: 4px 0;
  margin-top: 22px;
  pointer-events: auto;
  text-decoration: underline;
  text-underline-offset: 5px;
}
.history-action span {
  margin-left: 8px;
}
.studio-tools {
  position: absolute;
  right: 30px;
  bottom: 34px;
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 40px;
  background: color-mix(in srgb, var(--wall) 94%, transparent);
  padding: 9px 6px;
  z-index: 4;
}
.studio-tools button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  min-height: 34px;
  padding: 0 18px;
  font-size: 13px;
  line-height: 1;
  background: transparent;
  color: var(--ink);
  border: 0;
  border-radius: 0;
  font-weight: 450;
  white-space: nowrap;
}
.studio-tools button:hover {
  color: var(--accent);
  translate: none;
}
.studio-tools .palette-action {
  border-right: 1px solid var(--line);
}
.studio-tools .customize svg {
  order: -1;
}
.studio-tools svg {
  width: 18px;
  height: 18px;
}
.drawer,
.info-panel {
  top: 88px;
  right: 24px;
  bottom: 24px;
  width: 344px;
  border: 1px solid var(--line);
  box-shadow: 0 12px 50px #0000000d;
  border-radius: 16px;
  z-index: 15;
  max-height: calc(100dvh - 112px);
}
.drawer-head {
  padding: 24px;
}
.drawer-head h2 {
  font-size: 25px;
  font-weight: 450;
  letter-spacing: -0.8px;
}
.drawer-body {
  padding: 0 24px 22px;
}
.drawer-footer {
  padding: 18px 24px;
}
.field,
.toggle-row {
  font-size: 13px;
}
.control-section h3 {
  font-size: 10px;
  letter-spacing: 0.09em;
}
.help,
.credit {
  font-size: 11px;
}
.field select {
  font-size: 12px;
  min-height: 38px;
}
.info-content > p:not(.eyebrow) {
  font-size: 14px;
  line-height: 1.65;
}
.fact-grid span {
  font-size: 12px;
}
.fact-grid small {
  font-size: 10px;
}
.info-content .reconstruction-note {
  font-size: 12px !important;
}
.source-link {
  font-size: 12px;
}
.segment button {
  font-size: 12px;
}
.color-row {
  min-height: 40px;
}
body.panel-open .object {
  transform: translateX(-130px) scale(calc(var(--scale) * 0.83));
}
body.panel-open .studio-tools {
  opacity: 0;
  pointer-events: none;
}
body.photo .archive-rail {
  background: color-mix(in srgb, var(--wall) 88%, transparent);
  backdrop-filter: blur(16px);
}
body.immersive .archive-rail,
body.immersive .studio-tools {
  display: none;
}
body.immersive main {
  grid-column: auto;
  grid-row: auto;
}
body.immersive .object {
  transform: none;
  width: min(88dvh, 90vw);
  height: min(88dvh, 90vw);
}
@media (min-width: 761px) and (max-height: 700px) {
  .archive-rail {
    padding-top: 20px;
  }
  .archive-title {
    margin: 22px 0 20px;
    font-size: 32px;
  }
  .timeline button {
    flex-basis: 38px;
    min-height: 38px;
  }
  .timeline button .year,
  .timeline button .name {
    font-size: 12px;
  }
  main {
    grid-template-rows: minmax(0, 1fr) 155px;
  }
  .identity h1 {
    font-size: 36px;
  }
  .identity p {
    font-size: 12px;
  }
  .studio-tools {
    bottom: 22px;
    right: 22px;
  }
  .studio-tools button {
    font-size: 12px;
    padding: 0 12px;
  }
  .caption {
    padding-top: 6px;
  }
}
@media (max-width: 1100px) and (min-width: 761px) {
  .shell {
    grid-template-columns: 210px minmax(0, 1fr);
  }
  .archive-rail {
    padding-left: 28px;
    padding-right: 20px;
  }
  .studio-tools {
    bottom: 20px;
    right: 20px;
  }
  .studio-tools button {
    font-size: 12px;
    padding: 0 12px;
  }
  .caption {
    padding-bottom: 78px;
  }
  main {
    grid-template-rows: minmax(0, 1fr) 200px;
  }
  .identity h1 {
    font-size: 36px;
  }
  .identity p {
    font-size: 12px;
  }
  .history-action {
    margin-top: 12px;
  }
}
@media (max-width: 760px) {
  .shell {
    display: grid;
    padding: 0;
  }
  .archive-rail > .wordmark {
    position: absolute;
    z-index: 2;
  }
  .icon {
    width: 36px;
    height: 36px;
  }
  main {
    overflow: hidden;
  }
  .stage {
    min-height: 0;
  }
  .caption {
    display: flex;
  }
  .history-action {
    font-size: 12px;
  }
  .studio-tools button {
    font-size: 13px;
    padding: 0 18px;
    min-height: 32px;
  }
  .studio-tools .customize svg {
    display: block;
  }
  .timeline {
    display: flex;
    margin: 0;
    gap: 0;
    flex: none;
    scrollbar-width: none;
  }
  .timeline button {
    flex: 0 0 109px;
    min-width: 109px;
    min-height: 0;
    justify-content: flex-start;
    border-left: 0;
    border-top: 1px solid var(--line);
    padding: 18px 0 0;
    gap: 5px;
  }
  .timeline button:last-child {
    border-top: 0;
    flex: 0 0 109px;
  }
  .timeline button:after {
    width: 8px;
    height: 8px;
    box-shadow: 0 0 0 4px var(--wall);
  }
  .timeline button[aria-current="true"]:after {
    width: 10px;
    height: 10px;
  }
  .drawer,
  .info-panel {
    top: auto;
    width: auto;
    border-radius: 18px;
  }
  .info-panel .info-content {
    max-height: 60svh;
  }
  body.panel-open .object {
    transform: scale(var(--scale));
  }
  body.immersive .shell {
    min-height: 0;
  }
  body.immersive .timeline {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .studio-tools {
    transition: none;
  }
}
.timeline button:before {
  display: none;
}
.timeline {
  scroll-snap-type: none;
}
.stage {
  grid-template: minmax(0, 1fr) / minmax(0, 1fr);
}
@media (min-width: 761px) {
  .object {
    width: min(68dvh, calc(100dvh - 260px), 60vw);
    height: min(68dvh, calc(100dvh - 260px), 60vw);
  }
}
@media (min-width: 761px) {
  .archive-title {
    margin-top: 20px;
    margin-bottom: 27px;
  }
  .timeline {
    padding-left: 20px;
  }
  .timeline button {
    padding-left: 34px;
  }
  .stage {
    padding-left: 35px;
    padding-right: 105px;
  }
  .caption {
    padding-right: 95px;
  }
  body.panel-open .caption {
    translate: -130px 0;
  }
}
@media (max-width: 760px) {
  .caption {
    padding-bottom: 78px;
  }
}

.digital-fallback {
  display: block;
  width: 100%;
  height: auto;
  border: 10px solid var(--digital-case, #292d29);
  border-radius: 18px;
  align-self: center;
}
.object.has-studio > .digital-fallback {
  opacity: 0;
  pointer-events: none;
}
.archive-filters {
  font-size: 12px;
  margin: 0 0 12px;
}
.archive-filters summary {
  cursor: pointer;
  padding: 7px 0;
}
.archive-filters label {
  display: block;
  margin: 9px 0;
  color: var(--muted);
}
.archive-filters input,
.archive-filters select {
  display: block;
  width: 100%;
  margin-top: 5px;
  min-height: 34px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 6px;
  color: var(--ink);
  font-size: 12px;
}
.archive-filters button {
  font-size: 12px;
  padding: 6px 0;
}
.archive-rail #filterCount {
  margin-bottom: 10px;
}
.timeline button[hidden] {
  display: none;
}
.mode-note {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
  margin: 0 0 18px;
}
.palette-locks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin: 12px 0;
}
.palette-locks label {
  font-size: 11px;
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
}
.palette-locks i,
.palette-chip {
  width: 17px;
  height: 17px;
  display: inline-block;
  border-radius: 50%;
  border: 1px solid var(--line);
}
.button-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 14px 0;
}
.button-row button,
.saved-item button,
#favoritePalettes button {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 9px 11px;
  font-size: 12px;
}
.button-row button:hover,
.saved-item button:hover {
  background: var(--line);
}
.saved-item {
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}
.saved-item strong {
  display: block;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 5px;
}
.saved-item small {
  font-size: 11px;
  color: var(--muted);
}
.saved-item .button-row {
  margin-bottom: 0;
}
.field input[type="text"],
.field input:not([type]) {
  width: 100%;
  min-height: 38px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 9px;
}
.collection-panel {
  z-index: 18;
}
.collection-panel .drawer-body {
  overflow: auto;
}
.top-actions > .text-action {
  font-size: 12px;
}
#favoritePalettes button {
  margin: 4px 4px 4px 0;
  display: inline-flex;
  gap: 4px;
}
.archive-filters[open] {
  max-height: 285px;
  overflow: auto;
}
.archive-title {
  flex-shrink: 0;
}
.object.flat-view > svg {
  opacity: 1 !important;
}
.object.flat-view .studio-canvas {
  display: none;
}
.object.flat-view > .digital-fallback {
  opacity: 1 !important;
}
.object.flat-view .rendered-clock {
  filter: none;
}
body.immersive .object {
  max-width: 90vw;
}
body.immersive .collection-panel {
  display: none;
}
@media (max-width: 760px) {
  .archive-filters {
    position: absolute;
    left: 16px;
    z-index: 8;
    margin: 0;
    max-width: 260px;
  }
  .archive-filters[open] {
    padding: 10px 14px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 10px;
    width: 260px;
  }
  .archive-rail #filterCount {
    display: none;
  }
  .top-actions > .text-action {
    font-size: 10px;
    max-width: 90px;
    padding: 4px;
  }
  .collection-panel {
    max-height: 80svh;
  }
  .archive-title {
    display: none;
  }
  body.immersive .archive-filters {
    display: none;
  }
}
/* The three studio groups keep the inspector manageable. */
.studio-section {
  border-top: 1px solid var(--line);
  padding: 12px 0;
}
.studio-section > summary {
  font-size: 13px;
  font-weight: 550;
  cursor: pointer;
  min-height: 32px;
  display: list-item;
  list-style-position: inside;
  padding: 7px 0;
}
.studio-section > summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.studio-section .control-section {
  border-top: 0;
  margin-top: 10px;
  padding-top: 5px;
}
.studio-section .control-section > h3 {
  display: none;
}
.mode-badge {
  font-size: 10px;
  color: var(--muted);
  padding: 0 7px;
}
.mode-badge[hidden] {
  display: none;
}
.import-compositions {
  display: block;
  font-size: 12px;
  margin: 20px 0;
}
.import-compositions input {
  display: block;
  max-width: 100%;
  font-size: 11px;
  margin-top: 9px;
}
.timeline {
  scroll-padding-block: 18px;
}
.timeline button:focus-visible {
  border-radius: 5px;
}
.drawer-body {
  scrollbar-gutter: stable;
}
.drawer,
.info-panel {
  overscroll-behavior: contain;
}
body {
  overflow-x: clip;
}
.archive-filters[open] {
  scrollbar-width: thin;
}
.collection-panel .drawer-head {
  gap: 10px;
}
.collection-panel .drawer-head h2 {
  font-size: 22px;
}
.mode-note {
  margin-top: 10px;
}
@media (max-width: 760px) {
  .mode-badge {
    display: none;
  }
  .studio-section > summary {
    min-height: 40px;
  }
  .drawer-head {
    padding: 18px 20px;
  }
  .collection-panel .drawer-head h2 {
    font-size: 20px;
  }
}
.composition-thumbnail {
  display: block;
  width: 100%;
  height: 150px;
  object-fit: contain;
  background: var(--wall);
  border-radius: 10px;
  margin-bottom: 12px;
}
.composition-favorite {
  font-size: 12px;
  display: flex;
  gap: 7px;
  align-items: center;
  margin-top: 12px;
}
.saved-item input[type="text"] {
  width: 100%;
  padding: 9px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  border-radius: 6px;
  margin: 6px 0;
}
.saved-item .button-row {
  gap: 6px;
}
.saved-item .button-row button {
  font-size: 11px;
  padding: 8px;
}
.sequence-pause {
  position: fixed;
  left: 50%;
  bottom: 25px;
  translate: -50% 0;
  z-index: 26;
  background: var(--panel);
  padding: 12px 18px;
  border-radius: 25px;
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}
.sequence-pause[hidden] {
  display: none;
}
body.immersive.immersive-controls .sequence-pause {
  opacity: 1;
  pointer-events: auto;
}
body:not(.immersive) .sequence-pause {
  display: none;
}
.object {
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
@media (prefers-reduced-motion: reduce) {
  .object,
  .sequence-pause {
    transition: none;
  }
}
.saved-item > button {
  border: 1px solid var(--line);
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12px;
  margin: 4px 0 8px;
}
.saved-item > button[hidden],
.saved-item input[hidden] {
  display: none;
}
.object[data-display="flip"] > .digital-fallback {
  border-radius: 27% / 50%;
  border-width: 14px;
}

/* A dedicated footer track keeps the author credit outside the clock stage. */
.archive-rail {
  grid-row: 1 / -1;
}
:root {
  --app-height: 100vh;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}
@supports (height: 100dvh) {
  :root {
    --app-height: 100dvh;
  }
}
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
.shell {
  height: var(--app-height);
  min-height: 0;
}
.object {
  touch-action: pan-y;
}
.app-dialog {
  padding: 0;
  width: min(440px, calc(100vw - 28px));
  max-height: calc(var(--app-height) - 32px);
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--ink);
  background: var(--panel);
  overflow: auto;
  overscroll-behavior: contain;
}
.app-dialog::backdrop {
  background: #0005;
  backdrop-filter: blur(5px);
}
.app-dialog .drawer-head {
  position: sticky;
  top: 0;
  background: var(--panel);
  z-index: 1;
}
.app-dialog h2 {
  font-size: 23px;
  letter-spacing: -0.6px;
  margin: 0;
  font-weight: 450;
}
.app-dialog-body {
  padding: 0 24px 24px;
}
.app-dialog-body > p {
  font-size: 14px;
  line-height: 1.65;
}
.app-dialog-body > .help {
  font-size: 12px;
  color: var(--muted);
}
.button-row button[hidden] {
  display: none;
}
@media (max-width: 760px) {
  .shell {
    height: var(--app-height);
    min-height: 0;
  }
  .topbar {
    padding-top: var(--safe-top);
  }
  .archive-filters {
    top: calc(68px + var(--safe-top));
  }
  .archive-filters[open] {
    max-height: min(340px, calc(var(--app-height) - 160px));
  }
  .history-action {
    margin-top: 6px;
    min-height: 40px;
    align-items: center;
    justify-content: center;
  }
  .top-actions .icon,
  .drawer-head .icon,
  .app-dialog .icon {
    width: 44px;
    height: 44px;
  }
  .top-actions > .text-action {
    min-height: 44px;
  }
  .timeline {
    padding-top: 15px;
    padding-bottom: 9px;
  }
  .drawer,
  .info-panel {
    max-height: calc(var(--app-height) * 0.82);
    bottom: calc(10px + var(--safe-bottom));
    left: max(10px, env(safe-area-inset-left));
    right: max(10px, env(safe-area-inset-right));
  }
  .drawer-body {
    min-height: 0;
  }
  .studio-section > summary,
  .toggle-row {
    min-height: 44px;
  }
  .field input[type="text"],
  .field input:not([type]),
  .archive-filters input,
  .archive-filters select,
  .field select,
  .saved-item input[type="text"] {
    font-size: 16px;
  }
  .saved-item .button-row button,
  .button-row button {
    min-height: 40px;
  }
  .palette-locks label {
    min-height: 36px;
  }
  .app-dialog {
    max-height: calc(
      var(--app-height) - 24px - var(--safe-top) - var(--safe-bottom)
    );
  }
  body.immersive .shell {
    height: var(--app-height);
  }
  body.immersive .object {
    width: min(88dvh, 90vw);
    height: min(88dvh, 90vw);
  }
}
@media (orientation: landscape) and (max-height: 520px) and (max-width: 1000px) {
  .shell {
    grid-template-columns: 180px minmax(0, 1fr);
    grid-template-rows: 48px minmax(0, 1fr) 36px;
  }
  .archive-rail {
    display: flex;
    grid-column: 1;
    grid-row: 1/-1;
    padding: 12px 16px 10px max(18px, env(safe-area-inset-left));
    border-right: 1px solid var(--line);
  }
  .archive-rail > .wordmark {
    position: static;
    font-size: 28px;
  }
  .archive-title {
    display: none;
  }
  .archive-filters {
    position: static;
    font-size: 11px;
    margin: 8px 0;
  }
  .archive-filters[open] {
    position: absolute;
    top: 46px;
    left: 12px;
    width: 240px;
    max-height: calc(var(--app-height) - 70px);
    background: var(--panel);
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 9px;
    z-index: 12;
  }
  .archive-rail #filterCount {
    display: none;
  }
  .timeline {
    grid-row: auto;
    grid-column: auto;
    flex: 1;
    flex-direction: column;
    border: 0;
    padding: 9px 0 0 10px;
    margin: 0;
    overflow-y: auto;
    overflow-x: hidden;
  }
  .timeline button {
    flex: 0 0 39px;
    min-width: 0;
    border-top: 0;
    border-left: 1px solid var(--line);
    padding: 1px 0 8px 21px;
    gap: 1px;
  }
  .timeline button:after {
    left: -4px;
    top: 5px;
  }
  .timeline button[aria-current="true"]:after {
    left: -5px;
    top: 4px;
  }
  .timeline button:last-child {
    flex: 0 0 39px;
    border: 0;
  }
  .timeline button .year,
  .timeline button .name {
    font-size: 11px;
  }
  .topbar {
    grid-column: 2;
    grid-row: 1;
    height: 48px;
    padding: 0 16px;
  }
  main {
    grid-column: 2;
    grid-row: 2;
    grid-template-rows: minmax(0, 1fr) 112px;
  }
  .stage {
    padding: 0 50px;
  }
  .object,
  body:not(.immersive) .object[data-display]:not([data-display="analog"]) {
    width: min(44dvh, calc(var(--app-height) - 200px));
    height: min(44dvh, calc(var(--app-height) - 200px));
  }
  .caption {
    align-items: flex-start;
    text-align: left;
    padding: 3px 18px 38px;
  }
  .identity .eyebrow {
    font-size: 8px;
  }
  .identity h1 {
    font-size: 23px;
    margin: 4px 0;
  }
  .identity p {
    font-size: 10px;
  }
  .history-action {
    margin-top: 4px;
    font-size: 10px;
    min-height: 24px;
  }
  .studio-tools {
    right: 16px;
    bottom: 10px;
    transform: none;
    padding: 4px;
    gap: 0;
  }
  .studio-tools button {
    font-size: 11px;
    padding: 0 12px;
    min-height: 30px;
  }
  .drawer,
  .info-panel {
    top: 52px;
    bottom: 8px;
    left: auto;
    right: max(10px, env(safe-area-inset-right));
    width: 340px;
    max-height: calc(var(--app-height) - 60px);
  }
  .drawer-head {
    padding: 12px 20px;
  }
  .collection-panel .drawer-head h2 {
    font-size: 20px;
  }
  body.immersive .shell {
    display: block;
  }
  .immersive .archive-rail {
    display: none;
  }
}
/* The live announcement must not add a one-pixel scroll track below the app. */
.sr-only {
  position: fixed;
  top: 0;
  left: 0;
}
/* Mobile gallery: one header, one object and one compact navigation dock. */
.mobile-menu-toggle {
  display: none;
}
.model-details {
  letter-spacing: inherit;
  padding: 0;
  color: inherit;
  background: none;
  border: 0;
  font: inherit;
  pointer-events: auto;
}
.model-details:hover {
  opacity: 0.7;
}
.menu-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}
.menu-actions > button {
  width: 100%;
  min-height: 48px;
  text-align: left;
  justify-content: flex-start;
  padding: 12px 0;
  font-size: 16px;
}
.menu-actions #theme {
  display: flex;
  gap: 12px;
}
.menu-actions #theme:after {
  content: "Cambiar tema";
}
@media (max-width: 760px) {
  .shell {
    grid-template-columns: minmax(0, 1fr);
  }
  .archive-rail {
    display: contents;
  }
  .archive-rail > .wordmark {
    left: 22px;
    top: calc(17px + var(--safe-top));
    font-size: 29px;
  }
  .archive-title,
  #filterCount {
    display: none;
  }
  .topbar {
    grid-column: 1;
    grid-row: 1;
    height: 100%;
    padding: var(--safe-top) 16px 0;
  }
  .top-actions {
    flex-direction: row-reverse;
    gap: 4px;
  }
  .mobile-menu-toggle {
    display: block;
    font-size: 22px;
  }
  .top-actions > .icon {
    width: 44px;
    height: 44px;
  }
  main {
    grid-column: 1;
    grid-row: 2;
    grid-template-rows: minmax(0, 1fr) 144px;
  }
  .stage {
    padding: 12px 22px 0;
  }
  .object {
    width: min(84vw, calc(var(--app-height) - 310px));
    height: min(84vw, calc(var(--app-height) - 310px));
  }
  body:not(.immersive) .object[data-display]:not([data-display="analog"]) {
    width: min(76vw, calc(var(--app-height) - 320px));
    height: min(76vw, calc(var(--app-height) - 320px));
  }
  .caption {
    position: relative;
    grid-row: 2;
    align-items: center;
    text-align: center;
    justify-content: flex-start;
    padding: 8px 55px 52px;
    translate: none;
    pointer-events: auto;
  }
  .identity {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .identity .eyebrow {
    order: 2;
  }
  .identity h1 {
    font-size: 25px;
    line-height: 1.1;
    letter-spacing: -0.8px;
    margin: 0;
  }
  .identity p {
    order: 3;
    line-height: 1.35;
    max-width: 290px;
  }
  .history-action {
    display: none;
  }
  .studio-tools {
    bottom: 0;
    left: 16px;
    right: 16px;
    transform: none;
    display: flex;
    justify-content: space-between;
    border: 0;
    border-radius: 0;
    background: none;
    padding: 0;
    gap: 8px;
  }
  .studio-tools > button {
    min-height: 48px;
    padding: 0 8px;
    font-size: 13px;
    gap: 7px;
  }
  .studio-tools .palette-action {
    border: 0;
  }
  .studio-tools svg {
    width: 17px;
    height: 17px;
  }
  .studio-tools .archive-filters {
    position: static;
    margin: 0;
    padding: 0;
    border: 0;
    font-size: 13px;
  }
  .archive-filters > summary {
    display: flex;
    align-items: center;
    min-height: 48px;
    padding: 0 8px;
    list-style: none;
  }
  .archive-filters > summary::-webkit-details-marker {
    display: none;
  }
  .archive-filters > summary:after {
    content: "⌃";
    margin-left: 8px;
  }
  .studio-tools .archive-filters[open] {
    position: absolute;
    bottom: 52px;
    left: 0;
    top: auto;
    width: min(320px, calc(100vw - 32px));
    max-height: calc(var(--app-height) - 180px);
    overflow: auto;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 12px 18px;
    box-shadow: 0 8px 30px #0001;
  }
  .timeline {
    grid-column: 1;
    grid-row: 3;
    flex-direction: row;
    padding: 16px 22px calc(10px + var(--safe-bottom));
    border-top: 1px solid var(--line);
    overflow-x: auto;
    overflow-y: hidden;
  }
  .timeline button,
  .timeline button:last-child {
    flex: 0 0 112px;
    min-width: 112px;
    border-left: 0;
    border-top: 1px solid var(--line);
    padding: 15px 0 0;
    gap: 3px;
  }
  .timeline button:after {
    top: -5px;
    left: 0;
  }
  .timeline button[aria-current="true"]:after {
    top: -6px;
    left: 0;
  }
  .timeline button .year,
  .timeline button .name {
    font-size: 11px;
  }
  .timeline button .name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 106px;
  }
  body.immersive .caption,
  body.immersive .mobile-menu-toggle {
    display: none;
  }
  body.immersive main {
    display: grid;
    grid-template-rows: 1fr;
  }
}
@media (max-width: 760px) and (max-height: 600px) {
  main {
    grid-template-rows: minmax(0, 1fr) 128px;
  }
  .identity h1 {
    font-size: 22px;
  }
  .object {
    width: min(78vw, calc(var(--app-height) - 285px));
    height: min(78vw, calc(var(--app-height) - 285px));
  }
}
/* Gallery finishing: quieter typography, consistent focus and material framing. */
.model-details:focus-visible,
.studio-tools button:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 5px;
  border-radius: 4px;
}
.model-details {
  cursor: pointer;
}
.site-menu .menu-actions > button {
  border-bottom: 1px solid var(--line);
}
.site-menu .drawer-head {
  padding-bottom: 16px;
}
.object[data-model="eye"] .rendered-clock {
  overflow: visible;
}
.object[data-model="kehai"] .rendered-clock {
  filter: drop-shadow(0 3px 3px #0000000a);
}
@media (max-width: 760px) {
  .identity {
    gap: 5px;
  }
  .identity p {
    font-size: 12px;
    color: var(--muted);
  }
  .identity .eyebrow {
    font-size: 10px;
    letter-spacing: 0.05em;
  }
  .timeline button .name {
    font-size: 11px;
  }
  .studio-tools {
    border-top: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
  }
  .studio-tools > button,
  .archive-filters > summary {
    min-height: 50px;
  }
  .mobile-menu-toggle svg {
    width: 22px;
    height: 22px;
  }
  .object[data-model="eye"] {
    width: min(92vw, calc(var(--app-height) - 290px));
    height: min(92vw, calc(var(--app-height) - 290px));
  }
}
.shell {
  grid-template-rows: 76px minmax(0, 1fr);
}
.author-credit {
  font-size: 10px;
  line-height: 1.5;
  color: var(--muted);
  margin: 22px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.author-credit a {
  color: var(--ink);
  text-decoration: none;
}
.author-credit a:hover {
  text-decoration: underline;
}
.archive-rail > .author-credit {
  flex: none;
}
.site-menu .author-credit {
  margin-top: 36px;
  font-size: 12px;
}
@media (max-width: 760px) {
  .shell {
    grid-template-rows: calc(60px + var(--safe-top)) minmax(0, 1fr) calc(
        78px + var(--safe-bottom)
      );
  }
}

/* Frontal-only pieces must never expose a previous WebGL scene. */
.object[data-model="kehai"] > .studio-canvas,
.object[data-model="eye"] > .studio-canvas {
  display: none !important;
}
.object[data-model="kehai"] > svg,
.object[data-model="eye"] > svg {
  opacity: 1 !important;
  visibility: visible !important;
}

/* Navigation owns a layout row; controls never float over a clock. */
#main {
  grid-template-rows: minmax(0, 1fr) auto auto;
}
.gallery-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 24px;
  padding: 8px 28px 20px;
  min-width: 0;
}
.piece-navigation {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-inline: auto;
}
.piece-navigation .step {
  position: static;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: auto;
  height: 44px;
  padding: 0 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--ink);
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
}
.piece-navigation .step svg {
  width: 17px;
  height: 17px;
  stroke-width: 1.5;
}
.piece-navigation .step:hover:not(:disabled) {
  background: color-mix(in srgb, var(--ink) 6%, transparent);
}
.piece-navigation .step:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.model-position {
  min-width: 52px;
  color: var(--muted);
  text-align: center;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.06em;
}
.gallery-controls .studio-tools {
  position: static;
  margin-inline: auto;
  transform: none;
  border: 0;
  background: transparent;
  padding: 0;
}
#main > .caption {
  padding: 8px 24px;
}
#main .history-action {
  margin-top: 8px;
}
#main > .stage {
  container-type: size;
  padding: 12px 24px;
}
.stage > .object,
body:not(.immersive) .stage > .object[data-display] {
  --piece-size: min(68dvh, 60vw, 640px);
  --available-size: min(calc(100cqw / 1.15), calc(100cqh / 1.15));
  width: min(var(--piece-size), var(--available-size));
  height: min(var(--piece-size), var(--available-size));
}
body.panel-open #main > .caption {
  translate: none;
}
body.immersive .gallery-controls {
  display: none;
}
body.immersive #main {
  grid-template-rows: minmax(0, 1fr);
}
body.immersive #main > .stage {
  padding: 0;
}
body.immersive .stage > .object {
  --piece-size: min(88dvh, 90vw);
}
@media (max-width: 760px) {
  .gallery-controls {
    flex-direction: column;
    gap: 2px;
    padding: 0 16px 6px;
  }
  #main > .caption {
    padding: 6px 20px;
  }
  #main > .stage {
    padding: 8px 16px;
  }
  .stage > .object,
  body:not(.immersive) .stage > .object[data-display] {
    --piece-size: 84vw;
  }
  .gallery-controls .studio-tools {
    position: relative;
    width: 100%;
    justify-content: space-between;
  }
}

@media (orientation: landscape) and (max-height: 520px) and (max-width: 1000px) {
  #main {
    grid-template-columns: minmax(0, 1fr) minmax(260px, 0.9fr);
    grid-template-rows: minmax(0, 1fr) auto;
  }
  #main > .stage {
    grid-column: 1;
    grid-row: 1 / -1;
  }
  #main > .caption {
    grid-column: 2;
    grid-row: 1;
    align-self: end;
    align-items: center;
    padding: 4px 12px;
    text-align: center;
  }
  .gallery-controls {
    grid-column: 2;
    grid-row: 2;
    flex-direction: column;
    gap: 0;
    padding: 0 8px 4px;
  }
  .gallery-controls .studio-tools {
    width: 100%;
    justify-content: space-between;
  }
  body.immersive #main {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
  }
}
@media (orientation: landscape) and (max-height: 520px) and (max-width: 1000px) {
  .gallery-controls .studio-tools > button {
    gap: 6px;
    min-height: 44px;
    padding: 0 5px;
    font-size: 11px;
  }
  .gallery-controls .archive-filters > summary {
    min-height: 44px;
    padding-inline: 5px;
    font-size: 11px;
  }
}
@media (orientation: landscape) and (max-height: 520px) and (max-width: 760px) {
  .archive-rail > .wordmark {
    position: absolute;
    top: calc(17px + var(--safe-top));
    left: 22px;
  }
}
