/* SpoolAround — workshop paper, ink, and one filament orange. */
:root {
  color-scheme: light;
  --bg: #f6f3ec;
  --bg-2: #efeae0;
  --surface: #ffffff;
  --ink: #15171b;
  --ink-2: #4b4f57;
  --ink-3: #7b7f87;
  --line: #e5dfd3;
  --line-2: #d6cfc1;
  --accent: #ff5a1f;
  --accent-ink: #c2410c;
  --accent-soft: #fff0e8;
  --green: #17845c;
  --green-soft: #e6f4ec;
  --amber-soft: #fff6df;
  --red: #b42318;
  --red-soft: #fdecea;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(21, 23, 27, 0.04), 0 8px 24px -12px rgba(21, 23, 27, 0.12);
  --shadow-lg: 0 2px 4px rgba(21, 23, 27, 0.04), 0 24px 48px -20px rgba(21, 23, 27, 0.25);
  --display: "Bricolage Grotesque", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --sans: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--ink); text-decoration-color: var(--line-2); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--accent); }
h1, h2, h3 { font-family: var(--display); font-weight: 650; letter-spacing: -0.025em; line-height: 1.05; margin: 0 0 10px; }
h1 { font-size: clamp(2.2rem, 4.6vw, 3.6rem); }
h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); }
h3 { font-size: 1.2rem; letter-spacing: -0.015em; }
p { margin: 0 0 12px; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Frame ---------- */
header.site {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.site-inner, .footer-inner, main { width: min(1160px, calc(100% - 40px)); margin: 0 auto; }
main.narrow { width: min(760px, calc(100% - 40px)); }
main { padding: 36px 0 96px; min-height: 60vh; }
.site-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; height: 68px; }
.mark { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-family: var(--display); font-weight: 800; font-size: 1.3rem; letter-spacing: -0.03em; }
.logo { width: 30px; height: 30px; color: var(--ink); flex: 0 0 auto; }
.beta { font: 600 0.62rem/1 var(--sans); letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-ink); background: var(--accent-soft); border: 1px solid #ffd3bf; padding: 4px 6px; border-radius: 6px; font-style: normal; }
nav { display: flex; align-items: center; gap: 4px; }
nav a, button.text { color: var(--ink-2); text-decoration: none; background: none; border: 0; font: 500 0.95rem/1 var(--sans); padding: 10px 12px; border-radius: 10px; cursor: pointer; }
nav a:hover, button.text:hover { color: var(--ink); background: var(--bg-2); }
nav form { margin: 0; }
nav a.nav-cta { background: var(--ink); color: #fff; margin-left: 6px; }
nav a.nav-cta:hover { background: #2a2d33; color: #fff; }

footer.site { border-top: 1px solid var(--line); background: var(--bg-2); padding: 36px 0 90px; color: var(--ink-2); font-size: 0.92rem; }
.footer-inner { display: grid; grid-template-columns: auto 1fr auto; gap: 24px; align-items: center; }
.footer-inner p { margin: 0; }
.mark.small { font-size: 1.05rem; }
.mark.small .logo { width: 24px; height: 24px; }

/* ---------- Type helpers ---------- */
.kicker { font: 600 0.74rem/1.3 var(--sans); letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent-ink); margin-bottom: 10px; }
.kicker a { color: inherit; text-decoration: none; }
.kicker a:hover { text-decoration: underline; }
.intro { max-width: 42rem; color: var(--ink-2); font-size: 1.05rem; }
.quiet { color: var(--ink-3); }
.hint { color: var(--ink-3); font-size: 0.88rem; margin: 6px 0 0; }
.page-head { margin-bottom: 28px; }
.page-head h1 { margin-bottom: 12px; }
.row-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; }
.file-title, .file-name { overflow-wrap: anywhere; }
.file-name { font-family: var(--mono); font-size: 0.95rem; }

/* ---------- Buttons ---------- */
.button, button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--ink); color: #fff; border: 1px solid var(--ink);
  border-radius: 12px; padding: 11px 18px; min-height: 44px;
  font: 600 0.95rem/1 var(--sans); text-decoration: none; cursor: pointer;
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
}
.button:hover, button:hover { background: #2a2d33; }
.button:active, button:active { transform: translateY(1px); }
.button.big, button.big { padding: 14px 22px; min-height: 52px; font-size: 1rem; border-radius: 14px; }
.button.ghost, button.secondary { background: transparent; color: var(--ink); border-color: var(--line-2); }
.button.ghost:hover, button.secondary:hover { background: var(--surface); border-color: var(--ink); }
.button.light { background: #fff; color: var(--ink); border-color: #fff; }
.button.light:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.block-button { width: 100%; }

/* ---------- Surfaces ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); margin: 0 0 16px; }
.card h3 { margin-bottom: 8px; }
.banner { background: var(--amber-soft); border: 1px solid #f1d58f; border-radius: var(--radius-sm); padding: 12px 16px; color: #5c4508; font-size: 0.94rem; }
.banner.warn { background: var(--red-soft); border-color: #f5c2bd; color: var(--red); }
.error { color: var(--red); }
.error.box { background: var(--red-soft); border: 1px solid #f5c2bd; border-radius: var(--radius-sm); padding: 12px 16px; }
.field-error { margin: 6px 0 0; font-size: 0.88rem; }
.manual { background: var(--amber-soft); border: 1px solid #f1d58f; border-radius: var(--radius-sm); padding: 14px 16px; font-size: 0.94rem; margin: 12px 0; }
.manual p { margin: 0; }
.empty { text-align: center; background: var(--surface); border: 1px dashed var(--line-2); border-radius: var(--radius); padding: 48px 24px; }
.empty p { color: var(--ink-2); max-width: 32rem; margin: 0 auto; }
.notice-page { text-align: center; padding: 48px 0; }
.notice-page .intro { margin: 0 auto 24px; }
.notice-page p:last-child { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* ---------- Home ---------- */
.hero { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center; padding: 28px 0 72px; }
.hero h1 { font-size: clamp(2.6rem, 6vw, 4.7rem); font-weight: 800; letter-spacing: -0.045em; line-height: 0.98; margin-bottom: 20px; }
.hero .hl { color: var(--accent); }
.lede { font-size: 1.15rem; color: var(--ink-2); max-width: 34rem; margin-bottom: 28px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.trust { list-style: none; padding: 0; margin: 28px 0 0; display: flex; gap: 8px 22px; flex-wrap: wrap; color: var(--ink-2); font-size: 0.92rem; }
.trust li::before { content: "✓"; color: var(--green); font-weight: 700; margin-right: 7px; }
.hero-visual { position: relative; background: var(--ink); border-radius: 28px; aspect-ratio: 400 / 380; overflow: hidden; box-shadow: var(--shadow-lg); }
@keyframes layer-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes glow { 50% { opacity: .35; } }
.float-card { position: absolute; background: rgba(255, 255, 255, 0.96); color: var(--ink); border-radius: 14px; padding: 12px 14px; box-shadow: 0 16px 32px -12px rgba(0, 0, 0, 0.45); font-size: 0.86rem; }
.quote-float { left: 18px; bottom: 18px; display: grid; gap: 2px; min-width: 150px; }
.quote-float strong { font: 800 1.5rem/1.1 var(--display); letter-spacing: -0.03em; }
.status-float { right: 18px; top: 18px; display: flex; align-items: center; gap: 8px; font-weight: 600; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(23, 132, 92, 0.2); }

.block { padding: 24px 0 56px; }
.block-head { margin-bottom: 24px; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; counter-reset: step; }
.steps li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.steps strong, .steps span { display: block; }
.steps strong { font: 650 1.08rem/1.25 var(--display); letter-spacing: -0.01em; margin: 14px 0 6px; }
.steps li > span:last-child { color: var(--ink-2); font-size: 0.94rem; }
.num { display: inline-grid !important; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--accent-soft); color: var(--accent-ink); font: 700 0.9rem/1 var(--mono); }

.sources { display: grid; grid-template-columns: 1fr; gap: 14px; }
.source { display: flex; flex-direction: column; gap: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; text-decoration: none; color: inherit; box-shadow: var(--shadow); transition: border-color .15s, transform .15s; }
.source:hover { border-color: var(--ink); transform: translateY(-2px); }
.source-name { font: 650 1.25rem/1.2 var(--display); letter-spacing: -0.02em; display: flex; justify-content: space-between; }
.source-name b { color: var(--ink-3); font-weight: 400; }
.source p { color: var(--ink-2); font-size: 0.93rem; margin: 0; flex: 1; }
.source em { font-style: normal; font-size: 0.8rem; font-weight: 600; color: var(--green); }
.sources.compact { grid-template-columns: 1fr; gap: 8px; margin: 12px 0; }
.sources.compact .source { padding: 12px 14px; box-shadow: none; }
.sources.compact .source p { display: none; }
.sources.compact .source-name { font-size: 1rem; }

.disclosure { margin-top: 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.disclosure summary { cursor: pointer; padding: 14px 16px; font-weight: 600; list-style: none; display: flex; justify-content: space-between; }
.disclosure summary::-webkit-details-marker { display: none; }
.disclosure summary::after { content: "+"; color: var(--ink-3); font-weight: 400; font-size: 1.2rem; line-height: 1; }
.disclosure[open] summary::after { content: "−"; }
.disclosure > div { padding: 0 16px 16px; }
.license-guide table { width: 100%; border-collapse: collapse; font-size: 0.92rem; margin-bottom: 12px; }
.license-guide th { text-align: left; font: 600 0.72rem/1.2 var(--sans); text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-3); padding: 8px 10px 8px 0; border-bottom: 1px solid var(--line); }
.license-guide td { padding: 10px 10px 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.license-guide .yes { color: var(--green); font-weight: 600; }
.license-guide .no { color: var(--red); font-weight: 600; }
.license-guide .quiet { font-size: 0.86rem; margin: 0; }

.seller-band { display: grid; grid-template-columns: 1.5fr 1fr; gap: 32px; align-items: center; background: var(--ink); color: #f1eee8; border-radius: 28px; padding: clamp(28px, 5vw, 56px); margin-top: 8px; }
.seller-band h2 { color: #fff; font-size: clamp(1.7rem, 3vw, 2.5rem); max-width: 18ch; }
.seller-band p { color: #c9c6bf; max-width: 36rem; margin-bottom: 22px; }
.seller-band .kicker { color: #ff9a70; }
.band-panel { background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.12); border-radius: var(--radius); padding: 22px; }
.band-panel p { margin: 0; }

/* ---------- Forms ---------- */
label, fieldset { display: block; margin: 14px 0 0; }
label { font-weight: 600; font-size: 0.92rem; }
fieldset { border: 0; padding: 0; min-width: 0; }
legend { font: 650 1.1rem/1.2 var(--display); letter-spacing: -0.015em; padding: 0; margin-bottom: 4px; display: flex; align-items: center; gap: 10px; }
input, select, textarea {
  display: block; width: 100%; margin-top: 6px;
  font: 400 1rem/1.4 var(--sans); color: var(--ink);
  padding: 12px 14px; min-height: 48px;
  border-radius: var(--radius-sm); border: 1px solid var(--line-2); background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
input:hover, textarea:hover { border-color: #bdb5a5; }
input:focus, textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 4px rgba(21, 23, 27, 0.08); }
input::placeholder, textarea::placeholder { color: #a8a399; }
textarea { min-height: 96px; resize: vertical; }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--red); box-shadow: 0 0 0 4px rgba(180, 35, 24, 0.08); }
.check { display: flex; gap: 10px; align-items: center; font-weight: 500; }
.check input { width: 20px; height: 20px; min-height: 0; margin: 0; accent-color: var(--ink); flex: 0 0 auto; }
.check.confirm { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px; margin: 22px 0 16px; align-items: flex-start; }
.check.confirm input { margin-top: 1px; }
.form-sections fieldset { padding: 22px 0; margin: 0; border-bottom: 1px solid var(--line); }
.form-sections fieldset:first-of-type { padding-top: 4px; }
.form-sections > fieldset:last-of-type { border-bottom: 0; }
.form-sections legend { margin-bottom: 8px; }
.form-sections legend .num { width: 26px; height: 26px; font-size: 0.8rem; }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; padding-top: 8px; }
.form-foot { margin: 14px 0 0; text-align: center; font-size: 0.92rem; }
.rates { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.money-input { position: relative; display: block; }
.money-input > span { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); margin-top: 3px; color: var(--ink-3); font-weight: 500; pointer-events: none; }
.money-input input { padding-left: 28px; font-family: var(--mono); font-size: 0.98rem; }
.handoff-rows { display: grid; gap: 12px; }
.handoff-row { display: grid; grid-template-columns: 1fr 200px; gap: 14px; align-items: end; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px 14px; }
.handoff-row label { margin: 0; }
.handoff-row .check { min-height: 48px; }

.palette { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.pla { position: relative; display: inline-flex; align-items: center; gap: 8px; width: auto; margin: 0; border: 1px solid var(--line-2); border-radius: 999px; padding: 6px 14px 6px 6px; min-height: 40px; background: #fff; cursor: pointer; font: 500 0.92rem/1 var(--sans); color: var(--ink); transition: border-color .15s, box-shadow .15s; }
button.pla:hover { background: #fff; }
.pla:hover { border-color: var(--ink-3); }
.pla input { position: absolute; opacity: 0; width: 1px; height: 1px; min-height: 0; margin: 0; }
.pla i { width: 26px; height: 26px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, 0.12); display: block; box-shadow: inset 0 -3px 6px rgba(0, 0, 0, 0.12), inset 0 2px 3px rgba(255, 255, 255, 0.35); }
.pla:has(input:checked), .pla[aria-pressed="true"] { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); background: #fff; }
.pla:has(input:checked)::after, .pla[aria-pressed="true"]::after { content: "✓"; font-size: 0.8rem; font-weight: 700; margin-left: -2px; }
.pla:has(input:focus-visible) { outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent); outline-offset: 2px; }

.options { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; margin-top: 4px; }
.option { margin: 0; cursor: pointer; }
.option input { position: absolute; opacity: 0; width: 1px; height: 1px; min-height: 0; }
.option > span { display: flex; justify-content: space-between; align-items: center; border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: 14px 16px; background: #fff; font-weight: 500; transition: border-color .15s, box-shadow .15s; }
.option em { font-style: normal; font-family: var(--mono); color: var(--ink-2); }
.option input:checked + span { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.option input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent); outline-offset: 2px; }

.drop { position: relative; display: flex; align-items: center; gap: 14px; border: 1.5px dashed var(--line-2); background: var(--bg); border-radius: var(--radius); padding: 22px; margin-top: 4px; cursor: pointer; transition: border-color .15s, background .15s; }
.drop:hover, .drop:focus-within { border-color: var(--ink); background: #fff; }
.drop-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--ink); color: #fff; font-size: 1.1rem; flex: 0 0 auto; }
.drop-text { display: grid; gap: 2px; font-weight: 500; flex: 1; }
.drop-text .quiet { font-size: 0.86rem; }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; margin: 0; min-height: 0; height: 100%; }
.drop:has(input[aria-invalid="true"]) { border-color: var(--red); }
.drop + .field-error, .drop .field-error { position: relative; }

/* ---------- Layouts ---------- */
.two-col { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); gap: 24px; align-items: start; }
.side { position: sticky; top: 88px; }
.seller-card h2 { font-size: 1.6rem; margin-bottom: 2px; }
.rates-line { display: flex; gap: 22px; margin: 14px 0; }
.rates-line div { display: grid; gap: 2px; }
.rates-line dt { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-3); font-weight: 600; }
.rates-line dd { margin: 0; font-family: var(--mono); font-weight: 600; }

/* ---------- Browse ---------- */
.finder { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 0; flex: 0 1 560px; }
.finder label { flex: 1 1 220px; margin: 0; }
.finder input { margin: 0; }
.browse-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(320px, 1fr); gap: 24px; align-items: start; }
.map-col { position: sticky; top: 88px; }
#map { height: min(620px, calc(100vh - 160px)); border-radius: var(--radius); border: 1px solid var(--line); background: var(--bg-2); box-shadow: var(--shadow); margin-bottom: 10px; z-index: 0; }
#map-note { font-size: 0.88rem; }
.catalog { display: grid; gap: 14px; }
.printer { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 12px; transition: border-color .15s; }
.printer:hover { border-color: var(--line-2); }
.printer h2 { font-size: 1.4rem; margin: 0 0 2px; }
.printer p { margin: 0; }
.printer .rates-line { margin: 0; }
.printer-top { display: flex; justify-content: space-between; gap: 12px; align-items: start; }
.distance:empty { display: none; }
.distance { background: var(--accent-soft); color: var(--accent-ink); font: 600 0.82rem/1 var(--sans); padding: 7px 10px; border-radius: 999px; white-space: nowrap; }
.handoff-line { font-size: 0.9rem; color: var(--ink-2); }
.swatches { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px 4px 5px; background: var(--bg); font-size: 0.84rem; font-weight: 500; }
.chip i, .dots i { width: 16px; height: 16px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, 0.12); display: inline-block; flex: 0 0 auto; }
.dots { display: inline-flex; gap: 0; }
.dots i { width: 18px; height: 18px; margin-left: -4px; border: 2px solid #fff; }
.dots i:first-child { margin-left: 0; }
.leaflet-popup-content-wrapper { border-radius: 12px; font-family: var(--sans); }
.leaflet-popup-content a { font-weight: 600; color: var(--accent-ink); }

/* ---------- Viewer + quote ---------- */
.stage { margin: 0; }
#spool-view {
  display: block; width: 100%; height: 420px; border-radius: var(--radius-sm); touch-action: none; cursor: grab;
  background: radial-gradient(120% 90% at 50% 20%, #ffffff 0%, #efeae0 60%, #e2dbcd 100%);
}
#spool-view:active { cursor: grabbing; }
.stage > .quiet { font-size: 0.86rem; margin: 8px 0 0; }
.empty-stage { display: grid; place-items: center; height: 220px; border-radius: var(--radius-sm); background: var(--bg); border: 1px dashed var(--line-2); text-align: center; padding: 20px; }
.scale { display: flex; gap: 14px; align-items: center; margin-top: 16px; font-weight: 600; }
.scale input { flex: 1; min-height: 0; padding: 0; border: 0; box-shadow: none; accent-color: var(--accent); margin: 0; }
#scale-readout { font-family: var(--mono); min-width: 48px; text-align: right; }
.color-row { display: grid; gap: 14px; margin-top: 16px; }
.color-row:empty { display: none; }
.color-row .quiet { margin: 0 0 6px; font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; }
.viewer-card .hint { margin-top: 14px; }
.notes p:last-child { margin-bottom: 0; }
.source-link { font-size: 0.88rem; color: var(--ink-3); overflow-wrap: anywhere; margin: 12px 0 0; }

.quote-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(320px, 1fr); gap: 24px; align-items: start; }
.quote-right { position: sticky; top: 88px; }
.ticket { position: relative; }
.ticket::before { content: ""; position: absolute; left: 24px; right: 24px; top: -1px; height: 4px; border-radius: 0 0 4px 4px; background: var(--accent); }
.lines { margin: 0; }
.quote-facts, .quote-price { display: grid; gap: 0; }
.quote-price { margin-top: 20px; }
.line-kicker { margin: 0 0 4px; font: 600 0.72rem/1.2 var(--sans); text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-3); }
.line { display: flex; justify-content: space-between; align-items: center; gap: 12px; border-bottom: 1px dashed var(--line-2); padding: 10px 0; font-size: 0.95rem; }
.line > span:last-child, .line > strong:last-child { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.line.total { border-bottom: 0; border-top: 2px solid var(--ink); margin-top: 6px; padding-top: 14px; font-size: 1.05rem; }
.line.total > strong:last-child { font: 800 1.7rem/1 var(--display); letter-spacing: -0.03em; }
.line-name { display: inline-flex; align-items: center; gap: 6px; }
button.info { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; min-height: 18px; padding: 0; border-radius: 50%; border: 1px solid var(--line-2); background: transparent; color: var(--ink-3); font: 600 0.68rem/1 var(--sans); flex: 0 0 auto; }
button.info:hover { background: var(--bg-2); color: var(--ink); }
button.info .tip { display: none; position: absolute; z-index: 8; left: -8px; bottom: calc(100% + 10px); width: min(270px, calc(100vw - 56px)); padding: 12px 14px; border-radius: 12px; background: var(--ink); color: #f1eee8; font: 400 0.82rem/1.45 var(--sans); text-align: left; white-space: normal; box-shadow: var(--shadow-lg); }
button.info:hover .tip, button.info:focus .tip, button.info:focus-visible .tip { display: block; }
.tip-split { display: flex; justify-content: space-between; margin-top: 4px; font-family: var(--mono); font-size: 0.78rem; }
.pay-line { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 12px; }

/* ---------- Jobs ---------- */
.filters { position: relative; display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 28px; }
.filters input { position: absolute; width: 1px; height: 1px; margin: 0; padding: 0; opacity: 0; min-height: 0; }
.filters label { display: inline-flex; align-items: center; gap: 8px; width: auto; margin: 0; border: 1px solid var(--line-2); border-radius: 999px; padding: 8px 14px; background: var(--surface); cursor: pointer; font-weight: 500; }
.filters label span { color: var(--ink-3); font-family: var(--mono); font-size: 0.82rem; }
.filters input:checked + label { background: var(--ink); color: #fff; border-color: var(--ink); }
.filters input:checked + label span { color: #ff9a70; }
.filters input:focus-visible + label { outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent); outline-offset: 2px; }
.job-group { margin: 0 0 32px; }
.job-group h2 { font-size: 1.25rem; margin-bottom: 14px; }
.job-group:not(:has(.job-card)) { display: none; }
body:has(#status-open:checked) .job-group,
body:has(#status-accepted:checked) .job-group,
body:has(#status-handed:checked) .job-group,
body:has(#status-declined:checked) .job-group,
body:has(#status-other:checked) .job-group { display: none; }
body:has(#status-open:checked) .job-group[data-status="open"],
body:has(#status-accepted:checked) .job-group[data-status="accepted"],
body:has(#status-handed:checked) .job-group[data-status="handed"],
body:has(#status-declined:checked) .job-group[data-status="declined"],
body:has(#status-other:checked) .job-group[data-status="other"] { display: block; }
.job-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.job-card { display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: inherit; margin: 0; transition: border-color .15s, transform .15s; }
.job-card:hover { border-color: var(--ink); transform: translateY(-2px); }
.job-card h3 { overflow-wrap: anywhere; margin: 10px 0 2px; }
.job-card p { margin: 0; font-size: 0.92rem; }
.job-card-top { display: flex; justify-content: space-between; align-items: center; font-size: 0.84rem; }
.job-total { font-family: var(--mono); font-weight: 600; margin-top: 10px !important; font-size: 1rem !important; }

.pill { display: inline-flex; align-items: center; gap: 6px; font: 600 0.8rem/1 var(--sans); padding: 6px 10px; border-radius: 999px; background: var(--bg-2); color: var(--ink-2); vertical-align: middle; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill[data-status="sent"], .pill[data-status="awaiting_buyer"] { background: var(--accent-soft); color: var(--accent-ink); }
.pill[data-status="accepted"], .pill[data-status="sending"], .pill[data-status="printing"] { background: #e8f0fe; color: #1d4ed8; }
.pill[data-status="ready"] { background: var(--amber-soft); color: #8a5a00; }
.pill[data-status="handed_off"] { background: var(--green-soft); color: var(--green); }
.pill[data-status="declined"] { background: var(--red-soft); color: var(--red); }
.status-line { display: flex; align-items: center; gap: 8px; color: var(--ink-2); margin: 0; }

.timeline { list-style: none; margin: 0 0 28px; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); counter-reset: t; }
.timeline li { position: relative; padding-top: 22px; font-size: 0.84rem; font-weight: 600; color: var(--ink-3); }
.timeline li span { position: absolute; top: 0; left: 0; width: 14px; height: 14px; border-radius: 50%; background: var(--bg); border: 2px solid var(--line-2); z-index: 1; }
.timeline li::before { content: ""; position: absolute; top: 6px; left: 0; right: 0; height: 2px; background: var(--line-2); }
.timeline li:last-child::before { right: auto; width: 0; }
.timeline li.done { color: var(--ink-2); }
.timeline li.done span { background: var(--ink); border-color: var(--ink); }
.timeline li.done::before { background: var(--ink); }
.timeline li.now { color: var(--ink); }
.timeline li.now span { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 5px rgba(255, 90, 31, 0.18); }
.facts { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 12px 32px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.facts div { display: grid; gap: 6px; align-content: start; justify-items: start; }
.facts .quiet { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; }
.contact p { margin: 0 0 4px; }
.actions form { margin: 0 0 10px; }
.actions form:last-child { margin-bottom: 0; }
.actions label { margin-top: 12px; }
.actions > p:first-child { margin-bottom: 0; }
.action-row { display: grid; grid-template-columns: 1.4fr 1fr; gap: 8px; }
.action-row form, .action-row button { width: 100%; margin: 0; }
.note-card p:last-child { margin: 0; }

/* ---------- Auth ---------- */
.auth { max-width: 440px; margin: 24px auto 0; }
.auth h1 { font-size: clamp(2rem, 4vw, 2.8rem); }
.auth .card { padding: 26px; margin-top: 20px; }
.auth .card label:first-of-type { margin-top: 0; }
.auth .block-button { margin-top: 22px; }
.auth-switch { text-align: center; color: var(--ink-2); margin-top: 18px; font-size: 0.95rem; }

/* ---------- Feedback + toast ---------- */
.feedback { position: fixed; right: 20px; bottom: calc(20px + env(safe-area-inset-bottom)); z-index: 60; margin: 0; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.feedback-toggle { background: var(--surface); color: var(--ink); border: 1px solid var(--line-2); box-shadow: var(--shadow-lg); border-radius: 999px; padding: 10px 16px; min-height: 42px; font-size: 0.9rem; }
.feedback-toggle span { color: var(--accent); }
.feedback-toggle:hover { background: var(--surface); border-color: var(--ink); }
.feedback.open .feedback-toggle { background: var(--ink); color: #fff; border-color: var(--ink); }
.feedback-panel { width: min(360px, calc(100vw - 40px)); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 18px; }
.feedback-panel[hidden] { display: none !important; }
.feedback-head { font: 650 1.1rem/1.2 var(--display); margin: 0 0 4px; }
.feedback-panel .quiet { font-size: 0.86rem; margin: 0 0 10px; }
.feedback-panel .quiet:last-child { margin: 10px 0 0; }
.feedback label { margin: 0 0 10px; }
.feedback textarea { min-height: 96px; }
.feedback button[type="submit"] { width: 100%; }
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--ink); color: #fff; border-radius: 14px; padding: 12px 18px; z-index: 70; box-shadow: var(--shadow-lg); max-width: min(520px, calc(100% - 32px)); margin: 0; font-weight: 500; animation: toast-in .25s ease; }
.toast[hidden] { display: none; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 8px); } }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; gap: 32px; padding-bottom: 48px; }
  .hero-visual { max-width: 520px; }
  .steps { grid-template-columns: 1fr 1fr; }
  .two-col, .quote-grid, .browse-grid { grid-template-columns: 1fr; }
  .side, .quote-right, .map-col { position: static; }
  #map { height: 340px; }
  .seller-band { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap: 10px; }
}
@media (max-width: 640px) {
  body { font-size: 15.5px; }
  .site-inner { height: 60px; }
  .mark .beta { display: none; }
  nav { gap: 0; }
  nav a, button.text { padding: 8px 7px; font-size: 0.84rem; white-space: nowrap; }
  nav a[href="/login"] { display: none; }
  nav a.nav-cta { margin-left: 2px; padding: 9px 11px; }
  main { padding-top: 24px; }
  .steps, .sources, .rates { grid-template-columns: 1fr; }
  .card { padding: 18px; border-radius: 16px; }
  .handoff-row { grid-template-columns: 1fr; gap: 6px; }
  .handoff-row .check { min-height: 0; }
  #spool-view { height: 320px; }
  .finder button { flex: 1 1 auto; }
  .timeline li { font-size: 0; padding-top: 16px; }
  .timeline li.now { font-size: 0.78rem; }
  .facts { grid-template-columns: 1fr 1fr; }
  .action-row { grid-template-columns: 1fr; }
  .feedback { right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); }
  .license-guide table { font-size: 0.84rem; }
}
@media (max-width: 480px) {
  header.site .mark span { display: none; }
  .mark { font-size: 1.15rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .hero-scene { opacity: 0 !important; }
  .hero-scene.s3 { opacity: 1 !important; }
  .hero-scene .layer, .hero-scene .pop, .hero-scene .pop-late { opacity: 1 !important; transform: none !important; }
  .hero-scene .nozzle { transform: translate(200px, 74px) !important; }
  .hero-steps li { color: #fff !important; }
}
.job-total .quiet { font-family: var(--sans); font-weight: 400; font-size: 0.86rem; }
.deadline { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: var(--radius-sm); padding: 12px 16px; margin: -8px 0 24px; font-size: 0.94rem; color: var(--ink-2); }
.problem { margin-top: 14px; }
.problem form { padding: 0 16px 16px; }
.problem label { margin-top: 0; }
.problem button { margin-top: 10px; }
.pill[data-status="expired"], .pill[data-status="canceled"] { background: var(--bg-2); color: var(--ink-3); }
.pill[data-status="payment_failed"] { background: var(--red-soft); color: var(--red); }
.payout { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.payout > div { flex: 1 1 320px; }
.payout h3 { margin: 0 0 4px; }
.payout form { margin: 0; }
.payout.todo { border-color: #ffc9b0; background: linear-gradient(0deg, var(--surface), var(--surface)) padding-box, var(--accent-soft); box-shadow: 0 0 0 4px var(--accent-soft), var(--shadow); }
.payout.ready h3 { color: var(--green); }
.min-note { margin: -4px 0 0; padding: 0 0 8px; font-size: 0.82rem; color: var(--ink-3); border-bottom: 1px dashed var(--line-2); }
.min-note[hidden] { display: none; }
.earn { align-self: end; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 14px; font-size: 0.86rem; color: var(--ink-2); min-height: 48px; display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.earn:empty { display: none; }
.earn b { font-family: var(--mono); color: var(--ink); }
.spec p { margin: 0 0 6px; }
.admin-block { margin-bottom: 32px; }
.admin-block h2 { font-size: 1.25rem; }
.admin-list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.admin-row { display: grid; grid-template-columns: 56px minmax(0, 1.4fr) minmax(0, 1fr) auto 90px; gap: 14px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; font-size: 0.92rem; }
.admin-row:last-child { border-bottom: 0; }
.admin-row:hover { background: var(--bg); }
.admin-file { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mono { font-family: var(--mono); }
.admin-row .mono:last-child { text-align: right; }
.admin-facts { display: grid; grid-template-columns: 90px 1fr; gap: 8px 14px; margin: 0; font-size: 0.92rem; }
.admin-facts dt { color: var(--ink-3); font-weight: 600; }
.admin-facts dd { margin: 0; overflow-wrap: anywhere; }
.side form + form { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.side form button { margin-top: 10px; }
@media (max-width: 640px) { .admin-row { grid-template-columns: 1fr auto; } .admin-row > span:nth-child(1), .admin-row > span:nth-child(3) { display: none; } }
.legal { max-width: 46rem; }
.legal h2 { font-size: 1.3rem; margin: 32px 0 10px; }
.legal ul { padding-left: 1.2rem; margin: 0 0 12px; }
.legal li { margin: 6px 0; }
.legal p, .legal li { color: var(--ink-2); }
.legal strong { color: var(--ink); }
.legal-links a { color: var(--ink-2); }
.auth .check.confirm { margin: 18px 0 0; font-size: 0.88rem; }
.upload-card .drop { margin-top: 0; }
.big-drop { padding: 34px 26px; }
.hint.center { text-align: center; }
.price-row { display: flex; justify-content: space-between; align-items: end; gap: 12px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; }
.price-row > div:first-child { display: grid; gap: 2px; }
.price-row .quiet { font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; }
.price-row strong { font: 800 1.6rem/1 var(--display); letter-spacing: -0.03em; }
.price-detail { display: grid; justify-items: end; gap: 2px; font-size: 0.82rem; color: var(--ink-2); font-family: var(--mono); }
.big-price { font: 800 2.6rem/1 var(--display); letter-spacing: -0.04em; margin: 4px 0 10px; }
#q-colors-line[hidden] { display: none; }
.color-count { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 14px; font-weight: 600; font-size: 0.95rem; }
.color-count .hint { margin: 0; font-weight: 400; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface); overflow: hidden; }
.stepper button { min-height: 40px; width: 40px; padding: 0; border: 0; border-radius: 0; font-size: 1.2rem; }
.stepper button:disabled { opacity: 0.35; cursor: default; }
.stepper output { min-width: 36px; text-align: center; font: 700 1.05rem/1 var(--mono); }
.color-note { font-size: 0.78rem; color: var(--ink-3); }
.color-note[hidden], .too-few[hidden] { display: none; }
.too-few { font-size: 0.84rem; color: var(--accent-ink); }
.printer.hot { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink), var(--shadow); }
.pin-price { background: none; border: 0; }
.pin-price span { display: inline-block; transform: translate(-50%, -100%); background: var(--ink); color: #fff; font: 700 0.82rem/1 var(--sans); padding: 7px 10px; border-radius: 999px; white-space: nowrap; box-shadow: 0 6px 14px -4px rgba(0, 0, 0, 0.45); border: 2px solid #fff; }
.pin-price:hover span { background: var(--accent); }
.printer.unfit { opacity: 0.6; }
.printer.unfit .button { background: var(--bg-2); color: var(--ink-3); border-color: var(--line-2); pointer-events: none; }
.color-limit:empty { display: none; }
.color-limit { color: var(--accent-ink); }
.rates + .rates { margin-top: 4px; }
select { display: block; width: 100%; margin-top: 6px; font: 400 1rem/1.4 var(--sans); padding: 12px 14px; min-height: 48px; border-radius: var(--radius-sm); border: 1px solid var(--line-2); background: #fff; color: var(--ink); }
.pin-price.unfit span { background: #9a9ea6; box-shadow: none; }

/* Review step: spin the model and set its size */
.review-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr); gap: 24px; align-items: start; }
.big-stage #spool-view { height: clamp(320px, 52vh, 560px); }
.viewer-tools { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 10px; }
.viewer-tools .quiet { font-size: 0.86rem; margin: 0; }
button.small { min-height: 34px; padding: 6px 12px; font-size: 0.86rem; }
.file-colors { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 14px; }
.file-colors .quiet { font-size: 0.88rem; margin: 0 0 8px; }
.review-form h2 { font-size: 1.25rem; margin: 0 0 14px; }
.presets { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.presets button[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.scale-row { display: flex; align-items: center; gap: 12px; margin: 0 0 16px; }
.scale-row input[type="range"] { flex: 1; min-height: 0; padding: 0; border: 0; box-shadow: none; accent-color: var(--accent); margin: 0; }
.unit-input { position: relative; display: block; }
.unit-input input { padding-right: 40px; font-family: var(--mono); }
.unit-input > span { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--ink-3); font-size: 0.86rem; pointer-events: none; }
.unit-input.pct { width: 112px; flex: 0 0 auto; }
.unit-input.pct input { padding-right: 30px; }
.unit-input.pct input { margin: 0; }
.dims { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.dims .dim { font-size: 0.84rem; margin: 0; }
.size-facts { display: grid; gap: 8px; margin: 16px 0; padding: 14px 16px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.size-facts p { display: flex; justify-content: space-between; gap: 12px; margin: 0; font-size: 0.92rem; }
.size-facts strong { font-family: var(--mono); font-weight: 600; text-align: right; }
.warn.box { background: var(--amber-soft); border: 1px solid #f1d58f; color: #5c4508; border-radius: var(--radius-sm); padding: 10px 14px; font-size: 0.9rem; margin: 0 0 12px; }
.size-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: 8px 0 0; font-size: 0.92rem; }
.size-line > span:first-child { font-family: var(--mono); }
.size-line a { font-weight: 600; color: var(--accent-ink); }
@media (max-width: 960px) { .review-grid { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .dims { grid-template-columns: 1fr 1fr 1fr; gap: 6px; } .dims input { padding-left: 8px; padding-right: 30px; font-size: 0.9rem; } .unit-input > span { right: 8px; } }
@media (max-width: 640px) { .big-stage #spool-view { height: 340px; } }

/* Back buttons and small buttons */
.button.small { min-height: 34px; padding: 6px 12px; font-size: 0.86rem; border-radius: 10px; }
.back-button { margin: 0 0 18px; background: var(--surface); }
.view-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; }
.view-line span + span { font-family: var(--mono); color: var(--ink-2); }

/* Preview color editor */
.slot-row { display: flex; flex-wrap: wrap; gap: 8px; }
.slot { background: var(--surface); color: var(--ink); border: 1px solid var(--line-2); min-height: 40px; padding: 6px 12px 6px 8px; gap: 8px; font-weight: 500; }
.slot:hover { background: var(--bg-2); }
.slot i { width: 22px; height: 22px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, 0.15); display: inline-block; }
.slot b { color: var(--ink-3); font-size: 0.7rem; font-weight: 400; }
.slot[aria-expanded="true"] { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(21, 23, 27, 0.08); }
.slot-palette { margin-top: 10px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg); display: grid; gap: 10px; }
.preset-swatches { display: grid; grid-template-columns: repeat(7, 36px); gap: 8px; }
.swatch { width: 36px; height: 36px; min-height: 0; padding: 0; border-radius: 50%; background: transparent; border: 2px solid transparent; }
.swatch:hover { background: transparent; border-color: var(--line-2); }
.swatch[aria-pressed="true"] { border-color: var(--ink); }
.swatch i { width: 28px; height: 28px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, 0.15); display: block; }
.custom-color { display: flex; align-items: center; gap: 10px; font-size: 0.9rem; margin: 0; }
.custom-color input { width: 44px; height: 32px; min-height: 0; padding: 2px; border-radius: 8px; }
.slot-palette .text.small { justify-self: start; padding: 6px 0; font-size: 0.86rem; text-decoration: underline; }
@media (max-width: 480px) { .preset-swatches { grid-template-columns: repeat(7, 32px); gap: 6px; } .swatch { width: 32px; height: 32px; } .swatch i { width: 24px; height: 24px; } }
[hidden] { display: none !important; }

/* Ready-to-print shelf and license-keeping search */
.library-search { display: flex; gap: 8px; max-width: 560px; margin-top: 18px; }
.library-search input { flex: 1; min-width: 0; }
.library-search.compact { margin: 12px 0 4px; }
.library-search.compact button { padding-inline: 14px; }
.sources-head { margin: 36px 0 14px; font-size: 1.1rem; }
.block.tight { padding-bottom: 32px; }
.block.tight > h2 { margin-bottom: 6px; }
.block.tight > .quiet { margin-bottom: 18px; }
p.center { text-align: center; margin-top: 18px; }
.shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.shelf-item { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.shelf-thumb { position: relative; display: block; aspect-ratio: 4 / 3; background: var(--bg-2); }
.shelf-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.shelf-fallback { position: absolute; inset: 0; display: grid; place-items: center; font: 650 2.4rem/1 var(--display); color: var(--ink-3); }
.shelf-body { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px 16px; flex: 1; }
.shelf-body .kicker { margin-bottom: 2px; }
.shelf-body h3 { font-size: 1.02rem; line-height: 1.25; margin: 0; }
.shelf-body .quiet { margin: 0; font-size: 0.86rem; }
.shelf-lic { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 12px; }
.lic-badge { font: 700 0.72rem/1 var(--sans); letter-spacing: 0.04em; padding: 5px 8px; border-radius: 6px; background: var(--ink); color: var(--bg); }
.credit-chip { font-size: 0.76rem; font-weight: 600; padding: 4px 8px; border-radius: 999px; border: 1px solid var(--line); }
.credit-chip.none { background: var(--green-soft); color: var(--green); border-color: transparent; }
.credit-chip.need { color: var(--ink-2); }
.shelf-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.picked { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg); padding: 12px 14px; margin-bottom: 16px; }
.picked p { margin: 0 0 4px; }
.picked p:nth-of-type(2) { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.picked .kicker { margin-bottom: 4px; }
.credit-box { margin-top: 14px; padding: 14px 16px; border-radius: var(--radius-sm); border: 1px dashed var(--line-2); background: var(--bg); }
.credit-box .kicker { margin-bottom: 6px; }
.credit-box p { margin: 0 0 6px; }
.credit-text { font-family: var(--mono, ui-monospace, monospace); font-size: 0.86rem; overflow-wrap: anywhere; user-select: all; }
@media (max-width: 640px) { .library-search { flex-direction: column; } }

/* Hero story: five scenes, 4 s each, on a 20 s loop. --d is negative (scene index × 4s − 20s) so nothing waits. Every animation below
   runs on the same 20 s cycle, offset by its scene's --d, so 0-20% of a
   keyframe is the time its scene is on screen. */
.hero-story { position: absolute; inset: 0; }
.hero-scene { position: absolute; inset: 0 0 46px; opacity: 0; animation: hero-scene 20s infinite var(--d) backwards; }
.hero-scene svg { display: block; width: 100%; height: 100%; }
.hero-scene * { animation-delay: var(--d); animation-iteration-count: infinite; animation-fill-mode: backwards; animation-duration: 20s; }
@keyframes hero-scene { 0% { opacity: 0; } 1.5%, 18.5% { opacity: 1; } 20%, 100% { opacity: 0; } }
.scene-card { display: flex; align-items: center; gap: 10px; }
.scene-card.tl { left: 18px; top: 18px; }
.scene-card.tr { right: 18px; top: 18px; max-width: 46%; }
.scene-card.bl { left: 18px; bottom: 12px; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 150px; }
.scene-card strong { display: block; }
.scene-card .quiet { display: block; font-size: 0.8rem; }
.scene-card .big-price { font: 800 1.5rem/1.1 var(--display); letter-spacing: -0.03em; }
.pop { animation-name: hero-pop; }
.pop-late { animation-name: hero-pop-late; }
@keyframes hero-pop { 0%, 2% { opacity: 0; transform: translateY(10px); } 5%, 100% { opacity: 1; transform: none; } }
@keyframes hero-pop-late { 0%, 10% { opacity: 0; transform: translateY(10px); } 13%, 100% { opacity: 1; transform: none; } }
.file-ico { display: grid; place-items: center; width: 38px; height: 44px; border-radius: 8px; background: var(--accent); color: #fff; font: 700 0.66rem/1 var(--sans); letter-spacing: .04em; }
/* 1. Upload */
.hero-scene .drop { fill: rgba(255,255,255,.03); stroke: rgba(255,255,255,.28); stroke-width: 2; stroke-dasharray: 8 7; }
.hero-scene .hook rect { fill: var(--accent); }
.hero-scene .hook path { fill: none; stroke: #ff7440; stroke-width: 18; stroke-linecap: round; }
.hero-scene .hook.rise { animation-name: hero-rise; }
@keyframes hero-rise { 0%, 3% { opacity: 0; transform: translateY(-40px); } 8%, 100% { opacity: 1; transform: none; } }
.hero-scene .track { fill: #3a3e46; }
.hero-scene .bar { fill: var(--accent); transform-box: fill-box; transform-origin: left center; animation-name: hero-fill; }
@keyframes hero-fill { 0%, 4% { transform: scaleX(0); } 15%, 100% { transform: scaleX(1); } }
/* 2. Pick a printer */
.hero-scene .road { fill: none; stroke: rgba(255,255,255,.08); stroke-width: 12; stroke-linecap: round; }
.hero-scene .you { fill: #8fb8ff; }
.hero-scene .you-ring { fill: none; stroke: #8fb8ff; stroke-width: 2; opacity: .4; }
.hero-scene .pin-body path { fill: #6b707a; }
.hero-scene .pin-dot { fill: var(--ink); }
.hero-scene .price-tag { fill: rgba(255,255,255,.96); }
.hero-scene .price-text { font: 700 13px var(--sans); fill: var(--ink); }
.hero-scene .pin:not(.chosen) { animation-name: hero-dim; }
@keyframes hero-dim { 0%, 8% { opacity: 1; } 11%, 100% { opacity: .35; } }
.hero-scene .pin.chosen .pin-body path { animation-name: hero-pick; }
@keyframes hero-pick { 0%, 8% { fill: #6b707a; } 10%, 100% { fill: var(--accent); } }
.hero-scene .pin.chosen .pin-body { transform-box: fill-box; transform-origin: center bottom; animation-name: hero-bounce; }
@keyframes hero-bounce { 0%, 8% { transform: scale(1); } 10% { transform: scale(1.3); } 12%, 100% { transform: scale(1.15); } }
.hero-scene .pin.still .pin-body path { fill: var(--accent); animation: none; }
.hero-scene .pin.still .pin-body { animation: none; }
/* 3. Printing and the notice */
.hero-scene .bed { fill: #3a3e46; }
.hero-scene .layer { fill: var(--accent); opacity: 0; animation-name: hero-layer; animation-delay: calc(var(--d) + var(--i) * 150ms); }
.hero-scene .layer:nth-child(odd) { fill: #ff7440; }
@keyframes hero-layer { 0% { opacity: 0; transform: translateY(6px); } 1.2% { opacity: 1; transform: none; } 19% { opacity: 1; } 20%, 100% { opacity: 0; } }
.hero-scene .head { fill: #e9e5dc; }
.hero-scene .tip { fill: #b9b3a6; }
.hero-scene .glow { fill: #ffd2bd; animation: glow 1.2s ease-in-out infinite; }
.hero-scene .nozzle { animation-name: hero-nozzle; animation-timing-function: linear; }
@keyframes hero-nozzle { 0% { transform: translate(200px, 270px); } 10%, 100% { transform: translate(200px, 74px); } }
.scene-card.notice { left: 50%; bottom: 14px; width: min(300px, 84%); transform: translateX(-50%); align-items: flex-start; }
.scene-card.notice.pop-late { animation-name: hero-notice; }
@keyframes hero-notice { 0%, 10% { opacity: 0; transform: translate(-50%, 18px); } 13%, 100% { opacity: 1; transform: translate(-50%, 0); } }
.scene-card.notice span span { display: block; font-size: 0.84rem; }
.scene-card .when { margin-left: auto; }
.app-ico { flex: 0 0 auto; width: 30px; height: 30px; border-radius: 8px; background: var(--ink) radial-gradient(circle, var(--bg) 0 3px, transparent 4px), var(--ink); box-shadow: inset 0 0 0 7px var(--ink), inset 0 0 0 11px var(--accent); }
/* 4. Drive and pick up */
.hero-scene .route { fill: none; stroke: var(--accent); stroke-width: 4; stroke-dasharray: 440; stroke-dashoffset: 440; stroke-linecap: round; stroke-linejoin: round; animation-name: hero-route; animation-timing-function: linear; }
@keyframes hero-route { 0%, 2% { stroke-dashoffset: 440; } 14%, 100% { stroke-dashoffset: 0; } }
.hero-scene .house path { fill: #e9e5dc; }
.hero-scene .house .door { fill: var(--ink); }
.hero-scene .car rect { fill: #e9e5dc; }
.hero-scene .car .cab { fill: #8fb8ff; }
.hero-scene .car .wheel { fill: #111; }
.hero-scene .car { animation-name: hero-drive; animation-timing-function: linear; }
@keyframes hero-drive { 0%, 2% { transform: translate(74px, 296px); } 5.5% { transform: translate(200px, 296px); } 10.5% { transform: translate(200px, 120px); } 14%, 100% { transform: translate(300px, 120px); } }
/* 5. Pay */
.hero-scene .hook.big { transform: translate(-22px, -6px) scale(1.12); transform-origin: 200px 190px; }
.hero-scene .check circle { fill: var(--green); }
.hero-scene .check path { fill: none; stroke: #fff; stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 44; stroke-dashoffset: 44; animation-name: hero-check; }
.hero-scene .check { transform-box: fill-box; transform-origin: center; animation-name: hero-check-pop; }
@keyframes hero-check { 0%, 6% { stroke-dashoffset: 44; } 10%, 100% { stroke-dashoffset: 0; } }
@keyframes hero-check-pop { 0%, 3% { opacity: 0; transform: scale(.4); } 6%, 100% { opacity: 1; transform: scale(1); } }
/* Step row */
.hero-steps { position: absolute; left: 0; right: 0; bottom: 0; height: 46px; margin: 0; padding: 0 14px; list-style: none; display: grid; grid-template-columns: repeat(5, 1fr); align-items: center; gap: 4px; border-top: 1px solid rgba(255,255,255,.08); }
.hero-steps li { display: flex; align-items: center; justify-content: center; gap: 6px; font: 600 0.72rem/1.1 var(--sans); color: rgba(255,255,255,.4); text-align: center; animation: hero-step 20s infinite var(--d) backwards; }
.hero-steps li i { flex: 0 0 auto; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
@keyframes hero-step { 0%, 19.9% { color: #fff; } 20%, 100% { color: rgba(255,255,255,.4); } }
@media (max-width: 520px) {
  .hero-steps li span { display: none; }
  .hero-steps li i { width: 9px; height: 9px; }
  .scene-card { font-size: 0.78rem; padding: 9px 11px; }
}
