.litho { padding-block: clamp(2.2rem, 4vw, 4.1rem) 3.5rem; }
.product-intro { margin-bottom: clamp(1.5rem, 3vw, 2.7rem); }
.product-intro h1 { font-size: clamp(3rem, 6.8vw, 6.35rem); }
.product-intro > p:last-child { color: var(--muted); font-size: 1.12rem; line-height: 1.55; max-width: 46ch; }
.config { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(310px, 1fr); align-items: start; gap: clamp(1rem, 3vw, 2.5rem); }
.viewer { min-width: 0; overflow: hidden; border-radius: var(--radius); color: var(--ink); background: var(--surface); }
.stage {
  --glow: .75;
  --wash: .15;
  --contrast: 1.12;
  --exposure: 1.12;
  --ambient: 1;
  --width: clamp(135px, 18vw, 220px);
  --rotation: 0deg;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  min-height: clamp(340px, 39vw, 510px);
  display: grid;
  place-items: center;
  background: #121212;
}
.stage::before, .stage::after { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: -2; }
.stage::before { background: radial-gradient(ellipse at 50% 38%, #555044, #302c24 57%, #201d17); opacity: var(--ambient); transition: opacity .28s; }
.stage::after { top: 76%; background: linear-gradient(#211d1545, #17140f80); border-top: 1px solid #e9d7ff14; }
.stage-label { top: 1rem; left: 1rem; position: absolute; z-index: 2; display: flex; align-items: center; gap: .4rem; color: #f4ecf2; font-size: .75rem; font-weight: 750; letter-spacing: .075em; }
.stage-right { right: 1rem; left: auto; }
.light-dot { width: .45rem; height: .45rem; border-radius: 50%; background: #ffcb88; box-shadow: 0 0 10px #ffbc67; }
.stage[data-off="true"] .light-dot { background: #bab1bd; box-shadow: none; }
.halo { z-index: -1; position: absolute; inset: 5% 4%; background: radial-gradient(ellipse, #ffb26378, #de8e4628 46%, transparent 70%); opacity: var(--glow); }
.scene { position: relative; width: 100%; height: 100%; min-height: inherit; perspective: 980px; }
.stand {
  position: absolute; bottom: 11%; left: 50%; transform: translateX(-50%);
  width: calc(var(--width) * 1.18); height: 30px; border-radius: 40% 40% 15% 15% / 45%;
  background: linear-gradient(172deg, #5d4439, #2d2226 48%, #181319 55%, #241a20 94%);
  box-shadow: 0 10px 22px #0d090ec9, inset 0 1px 1px #d9a9749c;
}
.plate {
  position: relative; isolation: isolate; overflow: hidden; background: #bdab96;
  border: 4px solid #c7a180; box-shadow: inset 0 0 12px #443022;
  cursor: grab; touch-action: none; user-select: none;
}
.plate.dragging { cursor: grabbing; }
.plate:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.plate img {
  position: absolute; display: block; left: 50%; top: 50%;
  width: var(--photo-width, 100%); height: var(--photo-height, 100%); max-width: none;
  transform: translate(calc(-50% + var(--pan-x, 0px)), calc(-50% + var(--pan-y, 0px)));
  object-fit: cover; pointer-events: none;
  filter: grayscale(1) sepia(.78) saturate(1.2) contrast(var(--contrast)) brightness(var(--exposure));
}
.plate::before, .plate::after { content: ""; position: absolute; inset: 0; pointer-events: none; }
.plate::before { z-index: 1; background: repeating-linear-gradient(180deg, #ffead240 0 1px, #45302537 1px 2px, transparent 2px 4px); mix-blend-mode: overlay; opacity: .44; }
.plate::after { z-index: 1; background: #cab9a8; opacity: var(--wash); box-shadow: inset 0 0 20px #fff3d2; }
.single-photo {
  position: absolute; left: 50%; bottom: calc(11% + 19px);
  width: var(--width); height: calc(var(--width) * 1.23); transform: translateX(-50%);
  border-radius: 49% 49% 4px 4px / 31% 31% 4px 4px;
  box-shadow: 7px 0 #7a5040, 10px 1px #56382e, inset 0 0 16px #52382a;
}
.outlet, .spinning, .fixed-display { display: none; }
.stage[data-style="rotating"] .single-photo, .stage[data-style="stationary"] .single-photo { display: none; }
.stage[data-style="rotating"] .spinning {
  position: absolute; display: block; left: 50%; bottom: calc(12% + 39px);
  width: var(--width); height: var(--width);
  transform: translateX(-50%) rotateX(-13deg) rotateY(calc(var(--rotation) - 16deg));
  transform-style: preserve-3d;
}
.stage[data-style="rotating"] .stand { width: calc(var(--width) * 1.44); height: 45px; bottom: 9%; }
.side, .cube-cap { position: absolute; inset: 0; backface-visibility: hidden; }
.side { border: 5px solid #9d7958; transform: rotateY(var(--side, 0deg)) translateZ(calc(var(--width) / 2)); }
.side.right { --side: 90deg; }
.side.back { --side: 180deg; }
.side.left { --side: 270deg; }
.cube-cap {
  border: 5px solid #9d7958;
  background: repeating-linear-gradient(0deg, #3b2e2a 0 3px, #41342f 3px 5px);
  box-shadow: inset 0 0 18px #201917;
  pointer-events: none;
  transform: rotateX(var(--cap)) translateZ(calc(var(--width) / 2));
}
.cube-top { --cap: 90deg; }
.cube-bottom { --cap: -90deg; }
.stage[data-style="stationary"] .fixed-display {
  position: absolute; display: grid; grid-template-columns: 1fr 1.12fr 1fr; grid-template-rows: .69fr 1fr;
  gap: 3px; width: min(76%, 390px); height: 55%; left: 50%; bottom: calc(10% + 20px);
  transform: translateX(-50%); align-items: stretch;
}
.fixed-display::before {
  content: ""; position: absolute; inset: 6% 0 0; background: #54392f;
  clip-path: polygon(22% 3%, 78% 3%, 100% 44%, 100% 100%, 0 100%, 0 44%);
}
.fixed-display .plate { border-width: 3px; border-radius: 3px; }
.fixed-top { grid-column: 1 / -1; grid-row: 1; width: 95%; height: 100%; justify-self: center; clip-path: polygon(22% 0, 78% 0, 100% 100%, 0 100%); }
.fixed-left { grid-row: 2; grid-column: 1; transform: skewY(7deg); transform-origin: right top; }
.fixed-front { grid-row: 2; grid-column: 2; border-width: 4px; }
.fixed-right { grid-row: 2; grid-column: 3; transform: skewY(-7deg); transform-origin: left top; }
.stage[data-style="stationary"] .stand { width: min(79%, 420px); bottom: 10%; border-radius: 8px; }
.stage[data-style="night"] .outlet {
  display: grid; position: absolute; left: 50%; top: 50%; width: calc(var(--width) * .76); height: calc(var(--width) * 1.23);
  transform: translate(-34%, -31%); align-content: end; justify-items: center; gap: 4px; padding-bottom: 9%;
  border: 1px solid #908195; border-radius: 9px; background: #c5b9bf; opacity: calc(.28 + var(--ambient) * .54);
  box-shadow: 7px 7px 14px #140e1a72;
}
.outlet span { width: 7px; height: 15px; border-radius: 2px; background: #493e49; }
.stage[data-style="night"] .single-photo { width: calc(var(--width) * .68); height: calc(var(--width) * .76); bottom: 40%; border-radius: 23px 23px 9px 9px; box-shadow: 5px 2px #745547; }
.stage[data-style="night"] .stand { bottom: calc(40% - 19px); width: calc(var(--width) * .8); height: 25px; border-radius: 8px; z-index: 1; background: linear-gradient(160deg, #dbcfc0, #9a8e91); }
.preview-controls, .turn-controls { display: flex; gap: .65rem; align-items: center; padding: .85rem 1rem; border-top: 1px solid var(--line); }
.brightness { flex: 1; min-width: 0; }
.control-title { display: flex; justify-content: space-between; gap: .75rem; font-size: .89rem; }
.control-title output, .turn-controls span { color: var(--gold); }
input[type="range"] { display: block; width: 100%; margin: .4rem 0 .1rem; accent-color: var(--gold); }
.dim { font-size: .86rem; min-height: 39px; padding: .5rem .7rem; color: var(--ink); border-color: var(--line); }
.dim:hover, .dim[aria-pressed="true"] { background: var(--raised); }
.viewer button:focus-visible, .viewer input:focus-visible { outline-color: var(--gold); }
.turn-controls { flex-wrap: wrap; padding-block: .65rem; }
.turn-controls span { margin-left: auto; font-size: .85rem; }
.options { display: grid; gap: .85rem; min-width: 0; }
.options fieldset { padding: 0; border: 0; min-width: 0; margin: 0; }
.options legend, .photo-options h2 { margin-bottom: .65rem; font-size: 1.34rem; font-weight: 800; letter-spacing: -.03em; }
.styles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .45rem; }
.styles label { position: relative; }
.styles input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.styles span { display: grid; gap: .18rem; border-radius: 7px; border: 1px solid var(--line); background: var(--surface); padding: .65rem .69rem; height: 100%; min-height: 3.55rem; font-size: .94rem; cursor: pointer; }
.styles small { color: var(--muted); font-size: .79rem; font-weight: 500; }
.styles input:checked + span { border-color: var(--gold); background: var(--raised); }
.styles input:focus-visible + span { outline: 3px solid var(--gold); outline-offset: 2px; }
.options-info { color: var(--muted); margin: 0; font-size: .89rem; line-height: 1.47; }
.photo-options { border-block: 1px solid var(--line); padding-block: .85rem; }
.photo-slots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .45rem; margin: .65rem 0; }
.photo-slots button { background: var(--surface); color: var(--ink); border-color: var(--line); justify-content: start; gap: .45rem; min-width: 0; text-align: left; font-size: .91rem; }
.photo-slots button:hover { background: var(--raised); }
.photo-slots .slot-icon { color: var(--gold); }
.options .framing { border-top: 1px solid var(--line); padding-block: .65rem .25rem; margin-top: .8rem; }
.options .framing legend { font-size: 1rem; margin: 0; padding-right: .55rem; }
.framing > .options-info, .framing .field { margin-bottom: .65rem; }
.framing .field label { font-size: .89rem; }
.reset { display: inline-block; padding: .35rem .05rem; background: transparent; color: var(--gold); border: 0; text-decoration: underline; text-align: left; }
#file-status:empty { display: none; }
.options > .button { justify-self: start; }
.litho-note { margin: 1.65rem 0 0; color: var(--muted); line-height: 1.5; }
@media (max-width: 820px) {
  .config { grid-template-columns: 1fr; }
  .stage { --width: clamp(130px, 30vw, 220px); }
}
@media (max-width: 365px) {
  .stage-label { font-size: .68rem; }
  .preview-controls, .turn-controls { padding-inline: .7rem; }
  .styles { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .stage::before { transition: none; }
}
