/* A small workbench on the post office's paper and ink palette. */
.model3d { margin: 1.5rem 0; border: 1px solid var(--rule); border-radius: 4px; background: var(--paper); overflow: hidden; }
.model3d-heading { display: flex; align-items: center; flex-wrap: wrap; gap: .4rem 1rem; padding: .9rem 1.1rem; border-bottom: 1px solid var(--faint); line-height: 1.5; }
.model3d-heading > span:first-child { color: var(--red); font: .72rem var(--mono); letter-spacing: .08em; }
.model3d-heading strong { color: var(--ink); font-size: .98rem; }
.model3d-heading > span:last-child { margin-left: auto; color: var(--muted); font: .75rem var(--mono); white-space: nowrap; }
.model3d-body { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(12rem, 1fr); }
.model3d-body:not(:has(.model3d-guide)) { grid-template-columns: 1fr; }
.model3d-stage { position: relative; min-width: 0; min-height: 23rem; background-color: var(--sheet); background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px); background-size: 24px 24px; }
.model3d model-viewer { display: block; width: 100%; height: 100%; min-height: 23rem; --progress-bar-color: var(--pine); --poster-color: transparent; }
.model3d-cover { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.1rem; padding: 1.5rem; text-align: center; background: var(--sheet); }
.model3d-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: .5; pointer-events: none; }
.model3d-cover button, .model3d-cover noscript { position: relative; }
.model3d-placeholder { color: var(--pine); font: 7rem/1 var(--display); transform: rotate(-15deg); opacity: .4; }
.model3d-reset { position: absolute; right: .7rem; bottom: .7rem; padding: .35rem .65rem; background: var(--paper); border: 1px solid var(--rule); border-radius: 3px; color: var(--pine); font-size: .78rem; }
.model3d-guide { display: flex; flex-direction: column; min-width: 0; border-left: 1px solid var(--faint); }
.prose .model3d-steps { list-style: none; padding: .65rem .9rem; margin: 0; }
.model3d-steps li { border-bottom: 1px dashed var(--faint); }
.model3d-steps li:last-child { border-bottom: 0; }
.model3d-steps button { display: flex; align-items: baseline; gap: .7rem; width: 100%; padding: .65rem .2rem; text-align: left; font-weight: 600; font-size: .88rem; line-height: 1.5; }
.model3d-steps button span { flex: none; color: var(--muted); font: .72rem var(--mono); }
.model3d-steps .is-active button, .model3d-steps .is-active button span { color: var(--red); }
.model3d-steps button:hover { color: var(--red); }
.prose .model3d-steps p { margin: 0 0 .8rem; padding-left: 2rem; color: var(--muted); font-size: .82rem; line-height: 1.85; }
.model3d.is-enhanced .model3d-steps li:not(.is-active) p { display: none; }
.model3d-controls { display: flex; justify-content: space-between; gap: .5rem; margin-top: auto; padding: .75rem .9rem; border-top: 1px solid var(--faint); }
.model3d-controls button { padding: .3rem .4rem; font-size: .8rem; color: var(--pine); }
.model3d-controls button:disabled { opacity: .4; cursor: default; }
.model3d-footer { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: .35rem 1rem; padding: .7rem 1.1rem; border-top: 1px solid var(--faint); color: var(--muted); font-size: .75rem; line-height: 1.7; }
.model3d-footer a { flex: none; }
.model3d-hotspot { display: block; max-width: 12rem; padding: .3rem .65rem; border: 1px solid var(--red); border-radius: 3px; background: var(--paper); color: var(--red); box-shadow: 0 2px 6px var(--shadow); font: 600 .78rem/1.5 var(--sans); pointer-events: none; }
@media (max-width: 600px) {
  .model3d-body { grid-template-columns: 1fr; }
  .model3d-stage, .model3d model-viewer { min-height: 19rem; }
  .model3d model-viewer { height: 19rem; }
  .model3d-guide { border-left: 0; border-top: 1px solid var(--faint); }
  .model3d-heading { gap: .3rem .6rem; padding: .8rem; }
  .model3d-heading > span:first-child { width: 100%; }
  .model3d-footer { padding: .7rem .8rem; }
}
