/* A printable model's page (CADR-0196): the app page's layout (app.css), with the model's 3D viewer where the simulator stands. */
.model-kicker { margin: 0 0 6px; display: flex; gap: 10px; align-items: center; font-weight: 600; }
.model-kicker a { color: var(--text-soft); text-decoration: none; }
.model-kicker a:hover { color: var(--link-hover); }
.model-badge, .mdl-badge { display: inline-block; padding: 2px 10px; border-radius: 999px; background: var(--gold); color: var(--gold-ink); font-size: 13px; font-weight: 800; letter-spacing: .02em; }
.model-badge[hidden] { display: none; }
:is(.model-badge, .mdl-badge).model-test { background: var(--surface-3); color: var(--text); } /* a test print: proof of how the calc was made */
.model-kicker .model-test { margin-left: 6px; }
.model-tested time { font-weight: 700; }
.model-stage { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
@media (max-width: 760px) { .model-stage { grid-template-columns: minmax(0, 1fr); } }
.model-view { position: relative; aspect-ratio: 4 / 3; border-radius: var(--r-lg, 14px); background: radial-gradient(120% 90% at 50% 30%, var(--surface-2), var(--surface)); overflow: hidden; cursor: grab; }
.model-view:active { cursor: grabbing; }
.model-still, .model-canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block; }
.model-still[hidden] { display: none; }
.model-sec { margin: 0 0 18px; }
.model-sec[hidden] { display: none; }
.model-sec h2 { margin: 0 0 8px; font-family: var(--font-display); font-size: 20px; }
.model-files, .model-sizes { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.model-files a { display: flex; justify-content: space-between; gap: 12px; padding: 10px 14px; border-radius: var(--r-md); background: var(--btn); color: var(--text); text-decoration: none; box-shadow: 0 2px 0 var(--shadow); font-weight: 600; }
.model-files a:hover { background: var(--btn-hover); }
.model-files .k { color: var(--text-muted); font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }
.model-sizes { color: var(--text-muted); font-size: 15px; }
.model-shelf { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 720px) { .model-shelf { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; } }

/* A model's tile, here and on the Library's Printable models shelf (library-page.js). */
.mdl-tile { position: relative; min-width: 0; background: var(--surface); border-radius: var(--r-lg, 14px); padding: 10px; }
.mdl-tile a { color: inherit; text-decoration: none; display: flex; flex-direction: column; gap: 4px; }
.mdl-tile a:focus-visible { outline: 3px solid var(--gold, var(--accent)); outline-offset: 2px; border-radius: 8px; }
.mdl-art { aspect-ratio: 4 / 3; border-radius: 10px; background: radial-gradient(120% 90% at 50% 30%, var(--surface-2), var(--surface)); display: grid; place-items: center; overflow: hidden; }
.mdl-art img { width: 100%; height: 100%; object-fit: contain; }
.mdl-tile .mdl-badge { position: absolute; top: 16px; left: 16px; }
.mdl-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mdl-by { color: var(--text-muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* The upload page (model-upload.html). */
.mu-form { display: grid; gap: 14px; max-width: 560px; margin-top: 16px; }
.mu-form label { display: grid; gap: 6px; font-weight: 600; }
.mu-form input[type=text], .mu-form textarea, .mu-form select { font: inherit; padding: 10px 12px; border-radius: var(--r-sm); border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); }
.mu-form textarea { min-height: 90px; }
.mu-note { color: var(--text-muted); margin: 0; font-size: 15px; }
.model-page[data-state="missing"] :is(.model-stage, .model-kicker .model-badge) { display: none; }
