:root { color-scheme: dark; font-family: system-ui, sans-serif; }
body { margin: 0; background: #14161a; color: #e8eaed; }
nav { max-width: 760px; margin: 0 auto; padding: 8px 16px 0; display: flex; flex-wrap: wrap; gap: 0 16px; white-space: nowrap; }
nav a { color: #a5abb5; text-decoration: none; padding: 10px 0; }
nav a[aria-current] { color: #e8eaed; font-weight: 600; }
main { max-width: 760px; margin: 0 auto; padding: 16px; display: grid; gap: 16px; }
.card { background: #1f2228; border-radius: 10px; padding: 16px; }
h1 { font-size: 1.1rem; margin: 0 0 12px; }
label { display: block; margin: 12px 0 4px; color: #a5abb5; font-size: .9rem; }
input[type=text], input[type=url], input[type=password], textarea, select { width: 100%; box-sizing: border-box; padding: 9px 10px;
  background: #14161a; color: inherit; border: 1px solid #3a3f49; border-radius: 6px; font: inherit; }
fieldset { border: 0; margin: 12px 0 0; padding: 0; }
legend { color: #a5abb5; font-size: .9rem; padding: 0; margin-bottom: 6px; }
.option { display: flex; align-items: center; gap: 10px; margin: 0; padding: 8px 0; color: inherit; font-size: 1rem; cursor: pointer; }
.option[hidden] { display: none; }
.swatch { width: 20px; height: 20px; border-radius: 50%; border: 1px solid #5c6370; flex: none; display: inline-block; vertical-align: middle; }
button, input[type=text], input[type=url], input[type=password], select { min-height: 44px; }
button { padding: 9px 16px; border: 0; border-radius: 6px; background: #4caf7d; color: #0d1f16; font: inherit; font-weight: 600; cursor: pointer; }
button.secondary { background: #3a3f49; color: inherit; }
button:disabled { opacity: .5; cursor: default; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; align-items: center; }
.error { color: #ff8a80; margin-top: 10px; min-height: 1.2em; }
.muted { color: #a5abb5; font-size: .9rem; }
.item { border-top: 1px solid #30343c; padding: 12px 0; }
.item:first-of-type { border-top: 0; }
.item a { color: #8ab4f8; overflow-wrap: anywhere; }
.status { float: right; font-size: .85rem; color: #a5abb5; text-transform: capitalize; }
.status.printing, .status.starting, .status.in_progress { color: #8ab4f8; }
.plates { margin-top: 12px; padding-left: 12px; border-left: 2px solid #3a3f49; }
.item.plate:first-of-type { border-top: 1px solid #30343c; margin-top: 8px; }
.status.done { color: #4caf7d; }
.status.rejected, .status.failed { color: #ff8a80; }
.button-link { display: inline-flex; align-items: center; min-height: 44px; box-sizing: border-box; padding: 9px 16px;
  border-radius: 6px; background: #4caf7d; font-weight: 600; text-decoration: none; }
.item a.button-link { color: #0d1f16; }
.model-preview { margin: 10px 0; }
.model-preview canvas { display: block; width: 100%; max-width: 480px; height: auto; border-radius: 6px; cursor: grab; touch-action: pan-y; }
.color-picker { margin-top: 12px; padding: 12px; background: #14161a; border-radius: 6px; }
.color-row { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.color-row label { margin: 0; flex: none; width: 60px; color: inherit; }
.color-row select, .color-select { flex: 1; min-width: 0; }
.color-select, .color-sheet-row { -webkit-tap-highlight-color: transparent; }
.color-select { padding: 9px 10px; background: #14161a; color: inherit; border: 1px solid #3a3f49; font-weight: 400; text-align: left; overflow-wrap: anywhere; }
.color-sheet { width: 100%; max-width: 520px; max-height: 75vh; box-sizing: border-box; margin: auto auto 0; padding: 0 16px 16px; overflow-y: auto;
  background: #1f2228; color: inherit; border: 0; border-radius: 12px 12px 0 0; }
.color-sheet::backdrop { background: rgba(0, 0, 0, .6); }
.color-sheet-header { position: sticky; top: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; background: #1f2228; }
.color-sheet-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: 8px; background: transparent; color: inherit; font-weight: 400; text-align: left; }
.color-sheet-row[aria-current] { background: #30343c; }
.color-sheet-name { flex: 1; min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 520px) {
  .color-row { flex-wrap: wrap; }
  .color-row select, .color-select { flex-basis: 100%; }
}
#colors .color-row label { width: 70px; }
.step-bar { display: flex; gap: 6px; margin: 8px 0 16px; }
.step-bar span { flex: 1; height: 4px; border-radius: 2px; background: #3a3f49; }
.step-bar span.done { background: #4caf7d; }
.step-title { font-size: 1rem; margin: 0 0 8px; outline: none; }
.step-list { margin: 0 0 12px; padding-left: 20px; color: #a5abb5; font-size: .95rem; }
.step-list li { margin: 4px 0; }
.link-row { display: flex; gap: 8px; align-items: stretch; }
.link-row input { flex: 1; min-width: 0; }
.card a.button-link { color: #0d1f16; }
.sent { color: #4caf7d; margin-bottom: 12px; }
.step-summary { padding: 10px 12px; margin-bottom: 12px; background: #14161a; border-radius: 6px; overflow-wrap: anywhere; }
.camera { position: relative; display: flex; align-items: center; justify-content: center; padding: 0; overflow: hidden; aspect-ratio: 16 / 9; background: #000; }
.camera video, .camera img { width: 100%; height: 100%; border: 0; display: block; object-fit: cover; }
.camera-pause { position: absolute; top: 8px; right: 8px; min-height: 44px; padding: 8px 14px; background: rgba(0, 0, 0, .65); color: #e8eaed; font-weight: 400; }
.camera-resume { display: block; min-height: 44px; margin: 12px auto 0; padding: 9px 16px; }
.camera-message { color: #a5abb5; padding: 16px; text-align: center; }
.camera-caption { position: absolute; left: 0; right: 0; bottom: 0; padding: 8px 12px; background: rgba(0, 0, 0, .65); overflow-wrap: anywhere; }
.photo-opens { cursor: zoom-in; }
.photo-viewer { width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; overflow: auto; background: #000; }
.photo-viewer::backdrop { background: #000; }
.photo-viewer-image { display: block; width: 100%; height: 100%; object-fit: contain; cursor: zoom-in; }
.photo-viewer.zoomed { display: flex; }
.photo-viewer.zoomed .photo-viewer-image { flex: none; margin: auto 0; width: 300%; height: auto; max-width: none; cursor: zoom-out; }
.photo-viewer-close { position: fixed; top: 12px; right: 12px; min-height: 44px; padding: 8px 14px; background: rgba(0, 0, 0, .7); color: #e8eaed; font-weight: 400; }
.queue-row { display: flex; align-items: flex-start; gap: 10px; padding: 10px 0; border-top: 1px solid #30343c; }
.queue-row:first-child { border-top: 0; }
.queue-number { flex: none; width: 1.4em; color: #a5abb5; font-variant-numeric: tabular-nums; }
.queue-body { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.queue-colors { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.queue-state { color: #a5abb5; font-size: .9rem; margin-top: 2px; }
.queue-state.ready { color: #4caf7d; }
.queue-next { padding: 1px 6px; border-radius: 4px; background: #4caf7d; color: #0d1f16; font-size: .8rem; font-weight: 600; white-space: nowrap; }
.queue-moves { flex: none; display: flex; gap: 6px; }
.queue-moves button { min-width: 44px; padding: 8px; }
.request-title { display: block; margin: 2px 0; }
details > summary { padding: 12px 0; cursor: pointer; color: #a5abb5; }
input[type=file] { width: 100%; box-sizing: border-box; padding: 8px 0; color: inherit; font: inherit; }
.group-label { margin-top: 10px; color: #a5abb5; font-size: .85rem; }
.palette { display: flex; flex-wrap: wrap; gap: 6px; }
.color-choice { padding: 5px; background: transparent; border: 2px solid transparent; border-radius: 50%; line-height: 0; }
.color-choice[aria-checked=true] { border-color: #4caf7d; }
.color-choice .swatch { width: 26px; height: 26px; }
.custom-choice { padding: 8px 12px; border-radius: 6px; background: #3a3f49; color: inherit; line-height: 1.2; font-weight: 400; }
input[type=color] { width: 60px; height: 36px; padding: 2px; background: #14161a; border: 1px solid #3a3f49; border-radius: 6px; }
.filament-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid #30343c; }
.filament-row:first-child { border-top: 0; }
.filament-row > :nth-child(2) { flex: 1; min-width: 0; }
.filament-row.out-of-stock > .swatch, .filament-row.out-of-stock > :nth-child(2) { opacity: .55; }
.link-select { flex-basis: 100%; }
.filament-actions { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 8px; }
.print-photo { display: block; width: 100%; max-width: 360px; margin-top: 10px; border-radius: 6px; }
.review { display: flex; gap: 12px; margin-top: 12px; align-items: flex-start; }
.preview { width: 120px; height: 120px; object-fit: contain; background: #14161a; border-radius: 6px; flex: none; }
.flag { margin-top: 12px; padding: 10px 12px; border-left: 3px solid #e8b04b; background: #2a2620; border-radius: 4px; }
.reasons { margin: 6px 0; padding-left: 18px; list-style: disc; }
