/* Paper Cutout Studio - warm paper, ink and one terracotta accent. Offline: system fonts only. */
:root {
  --bg: #f1ece3;
  --bg-deep: #e7dfd2;
  --card: #fbf9f4;
  --paper: #fffdf9;
  --ink: #24201c;
  --ink-2: #554c43;
  --muted: #8d8377;
  --line: #dcd2c3;
  --line-2: #cfc3b2;
  --accent: #b8492f;
  --accent-deep: #963a24;
  --accent-soft: rgba(184, 73, 47, .12);
  --ok: #5d8a57;
  --shadow-1: 0 1px 2px rgba(60, 40, 20, .07);
  --shadow-2: 0 1px 2px rgba(60, 40, 20, .06), 0 10px 30px rgba(60, 40, 20, .09);
  --shadow-3: 0 2px 4px rgba(60, 40, 20, .08), 0 24px 60px rgba(60, 40, 20, .16);
  --piece-shadow: drop-shadow(0 2px 2px rgba(30, 18, 8, .28)) drop-shadow(0 12px 16px rgba(30, 18, 8, .24));
  --radius: 14px;
  --serif: "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  --sans: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --hand: "Segoe Print", "Ink Free", "Bradley Hand", "Marker Felt", cursive;
  --grain: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .32 0 0 0 0 .25 0 0 0 0 .17 0 0 0 .07 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  --ease-out: cubic-bezier(.2, .8, .25, 1);
  --ease-pop: cubic-bezier(.2, .9, .3, 1.25);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.45;
  color: var(--ink);
  background: var(--bg) var(--grain);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
button { font: inherit; color: inherit; }
img { -webkit-user-drag: none; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.spacer { flex: 1; }
::selection { background: rgba(184, 73, 47, .22); }

/* icons drawn with strokes */
.i, .x, .drop-icon, .add-tile svg, .cmp-divider svg {
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.i { width: 16px; height: 16px; flex: 0 0 auto; }
.x { width: 18px; height: 18px; }

/* ---------------------------------------------------------------- header */
.top {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 24px;
  padding: 12px 28px;
  background: rgba(241, 236, 227, .84);
  backdrop-filter: blur(12px) saturate(1.2);
  border-bottom: 1px solid rgba(207, 195, 178, .55);
}
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; color: var(--ink); }
.brand .name { font-family: var(--serif); font-size: 20px; letter-spacing: .2px; white-space: nowrap; }
.mark { width: 32px; height: 32px; transition: rotate .4s var(--ease-pop); }
.brand:hover .mark { rotate: -8deg; }
.mark-paper { fill: var(--card); stroke: var(--ink); stroke-width: 2; stroke-linejoin: round; }
.mark-lines { fill: none; stroke: var(--line-2); stroke-width: 1.6; stroke-linecap: round; }
.mark-dot { fill: var(--accent); }
.nav { display: flex; gap: 4px; }
.nav button {
  border: 0; background: none; cursor: pointer; padding: 7px 12px; border-radius: 9px;
  color: var(--ink-2); font-size: 13.5px; position: relative; transition: color .15s, background .15s;
}
.nav button:hover { color: var(--ink); background: rgba(207, 195, 178, .3); }
.nav button.on { color: var(--ink); font-weight: 600; }
.nav button.on::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 1px; height: 2px; border-radius: 2px; background: var(--accent);
}
.top-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.pill {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 11px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--line);
  font-size: 12px; color: var(--ink-2); white-space: nowrap;
}
.pill .led { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px rgba(93, 138, 87, .18); }
.pill.cpu .led { background: #c49a3c; box-shadow: 0 0 0 3px rgba(196, 154, 60, .2); }
.pill.busy { color: var(--accent); border-color: rgba(184, 73, 47, .35); }

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 9px 16px; border-radius: 10px;
  border: 1px solid var(--line-2); background: var(--card);
  color: var(--ink); text-decoration: none; cursor: pointer;
  box-shadow: var(--shadow-1);
  transition: background .15s, border-color .15s, transform .08s, box-shadow .15s, color .15s;
  user-select: none; white-space: nowrap; font-size: 13.5px;
}
.btn:hover { border-color: var(--ink-2); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--ink); color: #fbf7ef; border-color: var(--ink); }
.btn.primary:hover { background: #3a332c; }
.btn.danger { background: var(--accent); color: #fff8f2; border-color: var(--accent); }
.btn.danger:hover { background: var(--accent-deep); }
.btn.big { padding: 13px 26px; font-size: 15px; border-radius: 12px; }
.btn.small { padding: 6px 11px; font-size: 12.5px; border-radius: 8px; gap: 6px; }
.btn.ghost { background: transparent; box-shadow: none; }
.btn.ghost:hover { background: rgba(207, 195, 178, .25); }
.btn.glass { background: rgba(251, 249, 244, .84); backdrop-filter: blur(8px); }
.btn[disabled], .btn.disabled { opacity: .45; pointer-events: none; }
.link-btn {
  background: none; border: 0; padding: 4px 0; color: var(--muted); cursor: pointer;
  text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-2); font-size: 12.5px;
}
.link-btn:hover { color: var(--ink); text-decoration-color: currentColor; }
.link-btn[disabled] { opacity: .45; pointer-events: none; }
.icon-btn {
  width: 36px; height: 36px; display: inline-grid; place-items: center; flex: 0 0 auto;
  border-radius: 10px; border: 1px solid var(--line-2); background: var(--card); cursor: pointer; color: var(--ink);
  transition: border-color .15s, background .15s;
}
.icon-btn:hover { border-color: var(--ink-2); }
.icon-btn.round { border-radius: 50%; width: 32px; height: 32px; font-family: var(--serif); font-size: 16px; }
.icon-btn svg { width: 18px; height: 18px; }
.i-play, .i-pause { fill: currentColor; }

/* segmented controls and chips */
.seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--bg-deep); border-radius: 10px; border: 1px solid var(--line); }
.seg button {
  border: 0; background: transparent; padding: 6px 12px; border-radius: 8px; cursor: pointer;
  color: var(--ink-2); font-size: 13px; transition: background .15s, color .15s, box-shadow .15s; white-space: nowrap;
}
.seg button:hover { color: var(--ink); }
.seg button.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(60, 40, 20, .12); }
.seg.glass { background: rgba(231, 223, 210, .78); backdrop-filter: blur(8px); border-color: rgba(207, 195, 178, .7); }
.seg button[disabled] { opacity: .4; pointer-events: none; }
.seg button.warn { color: var(--accent); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips button {
  border: 1px solid var(--line-2); background: var(--card); padding: 5px 11px; border-radius: 999px;
  cursor: pointer; font-size: 12.5px; color: var(--ink-2); transition: all .15s;
}
.chips button:hover { border-color: var(--ink-2); color: var(--ink); }
.chips button.on { background: var(--ink); border-color: var(--ink); color: #fbf7ef; }
.chips.small button { padding: 3px 9px; font-size: 12px; }
.badge {
  display: inline-block; font-size: 10.5px; text-transform: uppercase; letter-spacing: .7px; font-weight: 600;
  color: var(--ink-2); background: var(--bg-deep); border: 1px solid var(--line); padding: 2px 8px; border-radius: 999px;
}
kbd {
  display: inline-block; min-width: 24px; padding: 2px 7px; border-radius: 6px; text-align: center;
  font: 600 12px/1.4 var(--sans); color: var(--ink);
  background: var(--paper); border: 1px solid var(--line-2); box-shadow: 0 2px 0 var(--line-2);
}

/* ---------------------------------------------------------------- layout */
main { max-width: 1480px; margin: 0 auto; padding: 22px 28px 70px; }
.view { animation: viewIn .35s var(--ease-out); }
@keyframes viewIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.section-head.big { margin: 10px 0 26px; align-items: center; flex-wrap: wrap; }
.section-title { font-family: var(--serif); font-weight: normal; font-size: 26px; margin: 0; }
.page-title { font-family: var(--serif); font-weight: normal; font-size: 40px; margin: 0 0 2px; letter-spacing: .2px; }
.empty { text-align: center; padding: 60px 20px; color: var(--muted); font-size: 15px; }

/* ---------------------------------------------------------------- home */
.hero {
  display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr); gap: 48px; align-items: center;
  padding: 26px 0 18px;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 0 18px;
  font-size: 12.5px; letter-spacing: .4px; color: var(--ink-2);
  padding: 5px 12px 5px 10px; border-radius: 999px; background: rgba(251, 249, 244, .7); border: 1px solid var(--line);
}
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px rgba(93, 138, 87, .18); }
.hero h1 {
  font-family: var(--serif); font-weight: normal; font-size: clamp(38px, 4.4vw, 60px); line-height: 1.06;
  letter-spacing: -.3px; margin: 0 0 18px; max-width: 13em;
}
.hero h1 em {
  font-style: italic; color: var(--accent);
  background: linear-gradient(transparent 72%, rgba(184, 73, 47, .14) 72%, rgba(184, 73, 47, .14) 92%, transparent 92%);
}
.lede { font-size: 16.5px; line-height: 1.65; color: var(--ink-2); margin: 0 0 28px; max-width: 34em; }
.drop {
  position: relative;
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 18px;
  padding: 22px 22px 22px 24px;
  background: var(--card) var(--grain);
  border: 1.5px dashed var(--line-2); border-radius: 20px;
  box-shadow: var(--shadow-2);
  transition: border-color .2s, background-color .2s, transform .25s var(--ease-pop), box-shadow .2s;
  max-width: 600px;
}
.drop:hover { border-color: var(--ink-2); }
.drop.over { border-color: var(--accent); background-color: #fff8f1; transform: scale(1.015); box-shadow: var(--shadow-3); }
.drop-icon { width: 44px; height: 44px; color: var(--accent); padding: 9px; border-radius: 12px; background: var(--accent-soft); stroke-width: 2.4; }
.drop-icon.big { width: 64px; height: 64px; padding: 13px; border-radius: 18px; }
.drop-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.drop-text strong { font-size: 15.5px; font-weight: 600; }
.drop-text span { color: var(--muted); font-size: 12.5px; }

/* sized as a whole (cqw: hundredths of its width), so the scrapbook keeps its layout at any size */
.hero-art { position: relative; width: 100%; max-width: 620px; aspect-ratio: 1 / .98; justify-self: center; container-type: inline-size; }
.hp {
  position: absolute; margin: 0; rotate: var(--r);
  animation: dropIn .9s var(--ease-pop) backwards; animation-delay: var(--dl); /* not "both": a held end state would beat :hover */
  transition: scale .35s var(--ease-pop), z-index 0s;
}
.hp img {
  display: block; width: 100%; filter: var(--piece-shadow);
  animation: bob var(--bob, 7s) ease-in-out infinite alternate; animation-delay: calc(var(--dl) * -3);
}
.hp:hover { scale: 1.06; z-index: 20 !important; }
@keyframes dropIn {
  from { opacity: 0; translate: 0 -36px; scale: 1.1; }
  to { opacity: 1; translate: 0 0; scale: 1; }
}
@keyframes bob { from { transform: translateY(0) rotate(0deg); } to { transform: translateY(-9px) rotate(.8deg); } }
/* the collage clip in a taped polaroid, with cutouts laid around and over its edges */
.hp-film {
  position: absolute; left: 5%; top: 25%; width: 72%; margin: 0; z-index: 2;
  padding: 3% 3% 0; border-radius: 3px; background: var(--paper) var(--grain); box-shadow: var(--shadow-3);
  rotate: -3deg; animation: dropIn .9s var(--ease-pop) backwards; animation-delay: .1s;
  transition: scale .35s var(--ease-pop);
}
.hp-film:hover { scale: 1.02; }
.hp-film video { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: #b08a63; border-radius: 1px; }
/* the caption sits on the polaroid's wide bottom edge, just right of the dancers laid over it */
.hp-film figcaption { padding: 1.6cqw 2% 2.4cqw 30%; text-align: left; font: 2.9cqw/1.2 var(--hand); color: var(--ink-2); white-space: nowrap; }
.hp-film .tape { top: -2cqw; left: 50%; width: 26%; height: 4.2cqw; translate: -50% 0; rotate: 4deg; z-index: 3; }
.hp.p1 { left: 0; top: 1%; width: 27%; --r: -8deg; --dl: .3s; --bob: 7.5s; z-index: 3; }
.hp.p2 { left: 67%; top: 0; width: 31%; --r: 6deg; --dl: .45s; --bob: 6.4s; z-index: 5; }
.hp.p3 { left: 0; top: 57%; width: 27%; --r: -5deg; --dl: .6s; --bob: 8.1s; z-index: 6; }
.hp.p4 { left: 45%; top: 69%; width: 18%; --r: -4deg; --dl: .75s; --bob: 6.8s; z-index: 4; }
.hp.p5 { left: 69%; top: 56%; width: 29%; --r: 5deg; --dl: .9s; --bob: 7.2s; z-index: 7; }
/* the skater kickflips over the polaroid's top edge */
.hp.p6 { left: 28%; top: -3%; width: 22%; --r: -9deg; --dl: .55s; --bob: 5.6s; z-index: 4; }
/* a note to the skater's right, its arrow curling back to him */
.hero-note {
  position: absolute; left: 52%; top: 3%; z-index: 8; pointer-events: none; rotate: -6deg;
  font: 3.1cqw/1.15 var(--hand); color: var(--ink-2);
  animation: fade .6s ease-out both; animation-delay: 1.1s;
}
.hero-arrow {
  position: absolute; left: 47%; top: 12.5%; width: 13%; z-index: 8; pointer-events: none; scale: -1 1; rotate: 14deg;
  fill: none; stroke: var(--accent); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round;
  animation: fade .6s ease-out both; animation-delay: 1.25s;
}
.hero-feats { list-style: none; display: flex; flex-wrap: wrap; gap: 10px 20px; margin: 22px 0 0; padding: 0 4px; }
.hero-feats li { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); }
.hero-feats .i { width: 17px; height: 17px; color: var(--accent); }

.tape {
  position: absolute; z-index: 2; pointer-events: none;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .18) 0 2px, transparent 2px 5px),
    rgba(222, 204, 164, .84);
  box-shadow: 0 1px 2px rgba(60, 40, 20, .14);
  clip-path: polygon(0 8%, 4% 0, 8% 10%, 12% 0, 88% 0, 92% 9%, 96% 0, 100% 10%, 100% 92%, 96% 100%, 92% 90%, 88% 100%, 12% 100%, 8% 91%, 4% 100%, 0 90%);
}

.steps { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; padding: 0; margin: 30px 0 8px; }
.steps li {
  position: relative; padding: 18px 18px 16px; border-radius: 16px;
  background: var(--card) var(--grain); border: 1px solid var(--line); box-shadow: var(--shadow-1);
  transition: transform .2s var(--ease-out), box-shadow .2s;
}
.steps li:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.steps b {
  display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  background: var(--ink); color: #fbf7ef; font: italic 16px/1 var(--serif);
}
.steps h3 { font-family: var(--serif); font-weight: normal; font-size: 20px; margin: 12px 0 4px; }
.steps p { margin: 0; color: var(--ink-2); line-height: 1.55; font-size: 13.5px; }
.recent-wrap { margin-top: 46px; }

/* polaroids: recents and the library */
.polaroids { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 34px 28px; padding: 12px 6px 6px; }
.polaroid {
  position: relative; margin: 0; cursor: pointer;
  padding: 11px 11px 0; border-radius: 3px;
  background: var(--paper);
  box-shadow: 0 1px 2px rgba(60, 40, 20, .12), 0 10px 24px rgba(60, 40, 20, .1);
  rotate: var(--r, 0deg);
  transition: rotate .3s var(--ease-pop), translate .3s var(--ease-pop), box-shadow .3s;
  animation: rise .5s var(--ease-out) backwards; animation-delay: calc(var(--i, 0) * 40ms);
}
.polaroid:hover { rotate: 0deg; translate: 0 -5px; box-shadow: 0 2px 4px rgba(60, 40, 20, .1), 0 22px 44px rgba(60, 40, 20, .18); z-index: 2; }
.polaroid .tape { top: -10px; left: 50%; width: 76px; height: 21px; translate: -50% 0; rotate: var(--tr, -3deg); }
.pol-img {
  position: relative; aspect-ratio: 1; overflow: hidden;
  background: #e9e0cf var(--grain);
}
.pol-img img.photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pol-img img.cut { position: absolute; inset: 0; margin: auto; max-width: 84%; max-height: 84%; filter: var(--piece-shadow); transition: transform .35s var(--ease-pop); }
.polaroid:hover .pol-img img.cut { transform: scale(1.05) rotate(-2deg); }
.pol-badge {
  position: absolute; right: 8px; bottom: 8px; display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; color: #fbf7ef; background: rgba(36, 32, 28, .72); padding: 3px 8px; border-radius: 999px;
}
.pol-badge svg { width: 9px; height: 9px; fill: currentColor; }
.pol-badge.pending { background: rgba(251, 249, 244, .9); color: var(--ink-2); }
.polaroid figcaption {
  display: flex; justify-content: space-between; align-items: baseline; gap: 10px;
  padding: 9px 3px 13px; min-height: 46px;
}
.pol-name { font-family: var(--hand); font-size: 14.5px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pol-date { font-size: 11px; color: var(--muted); white-space: nowrap; }
.pol-del {
  position: absolute; top: -9px; right: -9px; z-index: 3;
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  border: 0; cursor: pointer; background: var(--ink); color: #fff;
  opacity: 0; scale: .7; transition: opacity .15s, scale .2s var(--ease-pop), background .15s;
}
.pol-del svg { width: 14px; height: 14px; }
.polaroid:hover .pol-del { opacity: 1; scale: 1; }
.pol-del:hover { background: var(--accent); }
@keyframes rise { from { opacity: 0; translate: 0 14px; } to { opacity: 1; translate: 0 0; } }

/* ---------------------------------------------------------------- workspace */
.workbar { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.work-title { display: flex; align-items: baseline; gap: 12px; min-width: 0; flex: 1; }
.work-title h2 {
  font-family: var(--serif); font-weight: normal; font-size: 26px; margin: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 46vw;
}
.work-actions { display: flex; align-items: center; gap: 8px; }
.export-wrap { position: relative; }
.popover {
  position: absolute; right: 0; top: calc(100% + 8px); width: 300px; z-index: 35;
  padding: 14px 16px 10px; border-radius: 14px;
  background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-3);
  animation: pop .18s var(--ease-out);
}
.popover h4 { margin: 0 0 12px; font-family: var(--serif); font-weight: normal; font-size: 18px; }
.popover .seg { display: flex; }
.popover .seg button { flex: 1; }
.popover p { margin: 4px 0 4px; line-height: 1.5; }
@keyframes pop { from { opacity: 0; transform: translateY(-4px) scale(.98); } to { opacity: 1; transform: none; } }

.workspace { display: grid; grid-template-columns: minmax(0, 1fr) 344px; gap: 26px; align-items: start; }
.stage-col { min-width: 0; }

/* desks the pieces are shown on */
[data-desk="kraft"] { background: #b08a63 var(--grain); }
[data-desk="cream"] { background: #ece4d4 var(--grain); }
[data-desk="charcoal"] { background: #34312e var(--grain); }
[data-desk="checker"] { background: #fff repeating-conic-gradient(#e9e4dc 0 25%, #fff 0 50%) 0 0 / 22px 22px; }

/* photo stage */
.stage {
  position: relative; height: clamp(440px, calc(100vh - 250px), 820px);
  border-radius: 20px; overflow: hidden; box-shadow: var(--shadow-2); border: 1px solid var(--line);
  transition: background-color .3s;
}
.cut-view { position: absolute; inset: 0; }
.cut-view img { position: absolute; inset: 0; margin: auto; max-width: 84%; max-height: 82%; }
.piece-img { filter: var(--piece-shadow); cursor: zoom-in; transition: opacity .3s; }
.piece-img.fresh { animation: settle .55s var(--ease-pop); }
@keyframes settle { from { opacity: 0; transform: scale(1.04) rotate(-1.2deg); } to { opacity: 1; transform: none; } }
.ghost-img { opacity: .32; filter: saturate(.4) blur(.5px); border-radius: 6px; transition: opacity .4s; }
.stage.rendering .piece-img { opacity: .5; }
.stage-busy {
  position: absolute; left: 50%; bottom: 22px; translate: -50% 0; z-index: 5;
  display: flex; align-items: center; gap: 10px;
  padding: 9px 16px; border-radius: 999px; font-size: 13px;
  background: rgba(251, 249, 244, .94); box-shadow: var(--shadow-2);
  animation: rise .25s var(--ease-out);
}
.stage-msg {
  position: absolute; left: 50%; top: 50%; translate: -50% -50%; z-index: 5; width: min(340px, 86%);
  padding: 20px 22px 18px; border-radius: 16px; text-align: center;
  background: rgba(251, 249, 244, .96); box-shadow: var(--shadow-3); animation: pop .25s var(--ease-out);
}
.stage-msg p { margin: 0 0 14px; line-height: 1.5; color: var(--ink-2); }
.stage-tools { position: absolute; top: 14px; left: 14px; display: flex; gap: 8px; z-index: 6; }
.desk-swatches {
  position: absolute; top: 14px; right: 14px; z-index: 6; display: flex; gap: 6px; padding: 5px;
  border-radius: 11px; background: rgba(251, 249, 244, .78); backdrop-filter: blur(8px);
}
.desk-swatches button { width: 22px; height: 22px; border-radius: 6px; border: 1px solid rgba(0, 0, 0, .15); cursor: pointer; transition: transform .15s; }
.desk-swatches button:hover { transform: scale(1.12); }
.desk-swatches button.on { outline: 2px solid var(--ink); outline-offset: 1px; }
.stage-info {
  position: absolute; left: 14px; bottom: 14px; z-index: 6;
  font-size: 11.5px; color: var(--ink-2); font-variant-numeric: tabular-nums;
  padding: 4px 10px; border-radius: 999px; background: rgba(251, 249, 244, .8); backdrop-filter: blur(8px);
}

/* before / after */
.compare { position: absolute; touch-action: none; cursor: ew-resize; user-select: none; }
.cmp-layer { position: absolute; inset: 0; }
.cmp-layer img { position: absolute; display: block; }
#cmpOrig { box-shadow: 0 6px 22px rgba(30, 18, 8, .25); }
#cmpPiece { filter: var(--piece-shadow); }
.cmp-divider { position: absolute; top: -12px; bottom: -12px; width: 2px; translate: -1px 0; background: #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .18); pointer-events: none; }
.cmp-divider span {
  position: absolute; top: 50%; left: 50%; translate: -50% -50%;
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  background: #fff; color: var(--ink); box-shadow: 0 4px 14px rgba(0, 0, 0, .28);
}
.cmp-divider svg { width: 20px; height: 20px; }
.cmp-tag {
  position: absolute; top: 10px; font-size: 10.5px; letter-spacing: .7px; text-transform: uppercase; font-weight: 600;
  color: var(--ink-2); padding: 3px 9px; border-radius: 999px; background: rgba(251, 249, 244, .88);
  box-shadow: var(--shadow-1); pointer-events: none;
}
.cmp-tag.left { left: 10px; }
.cmp-tag.right { right: 10px; }

/* the photos in this set */
.strip-row { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.strip { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 8px; min-width: 0; }
.strip:empty { display: none; }
.strip .thumb {
  flex: 0 0 auto; width: 92px; height: 70px; border-radius: 10px; cursor: pointer; position: relative;
  background: var(--bg-deep) center / cover no-repeat; border: 2px solid transparent; box-shadow: var(--shadow-1);
  transition: transform .15s, border-color .15s;
}
.strip .thumb:hover { transform: translateY(-2px); }
.strip .thumb.on { border-color: var(--ink); }
.strip .thumb .dot { position: absolute; right: 5px; bottom: 5px; width: 9px; height: 9px; border-radius: 50%; background: #c9bfb1; box-shadow: 0 0 0 2px rgba(255, 255, 255, .85); }
.strip .thumb .dot.done { background: var(--ok); }
.strip .thumb .dot.busy { background: var(--accent); animation: pulse 1s ease-in-out infinite alternate; }
@keyframes pulse { from { opacity: .45; } to { opacity: 1; } }
.add-tile {
  flex: 0 0 auto; height: 70px; padding: 0 16px; border-radius: 10px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px; color: var(--ink-2); font-size: 12.5px;
  border: 1.5px dashed var(--line-2); transition: border-color .15s, color .15s, background .15s;
}
.add-tile:hover { border-color: var(--ink-2); color: var(--ink); background: rgba(251, 249, 244, .6); }
.add-tile svg { width: 18px; height: 18px; }

/* video */
.player { position: relative; border-radius: 18px; overflow: hidden; background: #1d1a17; aspect-ratio: 16 / 9; max-height: 62vh; width: 100%; box-shadow: var(--shadow-2); }
.player video, .video-poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.video-wait {
  position: absolute; left: 50%; bottom: 16px; translate: -50% 0;
  display: flex; align-items: center; gap: 10px; padding: 7px 14px; border-radius: 999px;
  background: rgba(251, 249, 244, .92); font-size: 12.5px;
}

.timeline { position: relative; height: 66px; margin: 18px 16px 6px; cursor: pointer; touch-action: none; user-select: none; }
.tl-strip {
  position: absolute; inset: 9px 0; border-radius: 8px;
  background: #2b2723 center / 100% 100% no-repeat; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12);
}
.tl-shade {
  position: absolute; top: 9px; bottom: 9px; pointer-events: none;
  background: rgba(241, 236, 227, .55); backdrop-filter: grayscale(1) brightness(1.05);
}
#tlShadeL { left: 0; border-radius: 8px 0 0 8px; }
#tlShadeR { right: 0; border-radius: 0 8px 8px 0; }
.tl-sel { position: absolute; top: 6px; bottom: 6px; border-top: 3px solid var(--accent); border-bottom: 3px solid var(--accent); pointer-events: none; }
.tl-handle {
  position: absolute; top: 6px; bottom: 6px; width: 15px; z-index: 3;
  background: var(--accent); cursor: ew-resize; display: grid; place-items: center; touch-action: none;
  transition: background .15s;
}
.tl-handle:hover, .tl-handle.drag { background: var(--accent-deep); }
#hStart { border-radius: 8px 0 0 8px; translate: -100% 0; }
#hEnd { border-radius: 0 8px 8px 0; }
.tl-handle b { width: 3px; height: 20px; border-radius: 2px; background: rgba(255, 248, 242, .9); }
.tl-ticks { position: absolute; left: 0; right: 0; bottom: 12px; height: 10px; pointer-events: none; }
.tl-ticks i { position: absolute; bottom: 0; width: 2px; height: 9px; margin-left: -1px; border-radius: 1px; background: #fff; box-shadow: 0 0 2px rgba(0, 0, 0, .7); }
.tl-head { position: absolute; top: 2px; bottom: 2px; width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 0 1px rgba(36, 32, 28, .55); z-index: 4; pointer-events: none; border-radius: 1px; }
.tl-head::before { content: ""; position: absolute; top: -3px; left: 50%; width: 11px; height: 11px; translate: -50% 0; border-radius: 50%; background: var(--ink); border: 2px solid #fff; }
.tl-labels { display: flex; justify-content: space-between; padding: 0 16px; font-size: 12.5px; color: var(--ink-2); }
.tl-labels b { font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
#tNow, #tLen { font-variant-numeric: tabular-nums; }

.controls-card {
  margin-top: 14px; padding: 12px 14px; border-radius: var(--radius);
  background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-1); display: grid; gap: 10px;
}
.ctl-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ctl-row + .ctl-row { padding-top: 10px; border-top: 1px solid var(--line); }
.row-label { font-weight: 600; font-size: 13px; margin-right: 2px; }
.inline-field { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--ink-2); }
.inline-field input {
  width: 72px; padding: 6px 8px; border-radius: 8px; border: 1px solid var(--line-2); background: #fff;
  font: inherit; text-align: right; color: var(--ink);
}
.inline-field input:focus { border-color: var(--ink-2); outline: none; }
.count { font-size: 12.5px; color: var(--ink); background: var(--bg-deep); padding: 4px 11px; border-radius: 999px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.count.warn { background: var(--accent-soft); color: var(--accent); }
.note { font-size: 12.5px; }

.filmstrip { display: flex; gap: 8px; overflow-x: auto; margin-top: 14px; padding: 4px 2px 10px; }
.filmstrip figure { margin: 0; flex: 0 0 auto; text-align: center; cursor: pointer; }
.filmstrip img {
  display: block; width: 118px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px;
  background: var(--bg-deep); box-shadow: var(--shadow-1); transition: transform .15s, box-shadow .15s;
}
.filmstrip figure:hover img { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.filmstrip figcaption { font-size: 11px; color: var(--muted); margin-top: 4px; font-variant-numeric: tabular-nums; }
.filmstrip .more { align-self: center; color: var(--muted); font-size: 12px; padding: 0 10px; white-space: nowrap; }

.cut-row { display: flex; align-items: center; gap: 18px; margin-top: 16px; flex-wrap: wrap; }
.progress { flex: 1; display: flex; align-items: center; gap: 12px; min-width: 240px; }
.bar { flex: 1; height: 8px; border-radius: 4px; background: var(--bg-deep); overflow: hidden; border: 1px solid var(--line); }
.bar i { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 4px; transition: width .3s; }
.bar.indeterminate i { width: 30%; animation: slide 1.1s ease-in-out infinite; }
@keyframes slide { 0% { transform: translateX(-100%); } 100% { transform: translateX(340%); } }
.ptext { font-size: 12.5px; color: var(--ink-2); white-space: nowrap; font-variant-numeric: tabular-nums; }

.results { margin-top: 30px; }
.results-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.results-head h3 { font-family: var(--serif); font-weight: normal; font-size: 26px; margin: 0; }
.results-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.board { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 16px; }
.pcard {
  position: relative; aspect-ratio: 1; border-radius: 14px; overflow: hidden; cursor: zoom-in;
  border: 1px solid var(--line); box-shadow: var(--shadow-1);
  transition: transform .2s var(--ease-out), box-shadow .2s;
  animation: rise .45s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 28ms);
}
.pcard img { position: absolute; inset: 0; margin: auto; max-width: 82%; max-height: 76%; filter: var(--piece-shadow); transition: transform .3s var(--ease-pop); }
.pcard:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); }
.pcard:hover img { transform: rotate(-2deg) scale(1.04); }
.pcard .t {
  position: absolute; left: 8px; bottom: 8px; font-size: 11px; font-variant-numeric: tabular-nums;
  padding: 2px 8px; border-radius: 999px; background: rgba(251, 249, 244, .88); color: var(--ink-2);
}
.pcard .dl {
  position: absolute; right: 8px; top: 8px; width: 30px; height: 30px; border-radius: 9px; border: 0; cursor: pointer;
  display: grid; place-items: center; background: rgba(251, 249, 244, .92); color: var(--ink);
  opacity: 0; transition: opacity .15s, background .15s; box-shadow: var(--shadow-1);
}
.pcard .dl:hover { background: #fff; }
.pcard:hover .dl { opacity: 1; }
.pcard .check {
  position: absolute; left: 8px; top: 8px; width: 24px; height: 24px; border-radius: 50%;
  border: 2px solid #fff; background: rgba(36, 32, 28, .3); box-shadow: 0 1px 4px rgba(0, 0, 0, .25);
  display: none; place-items: center;
}
.board.selecting .pcard { cursor: pointer; }
.board.selecting .pcard .check { display: grid; }
.board.selecting .pcard .dl { display: none; }
.pcard.sel { box-shadow: 0 0 0 3px var(--accent), var(--shadow-2); }
.pcard.sel .check { background: var(--accent); border-color: #fff; }
.pcard.sel .check::after { content: ""; width: 6px; height: 11px; border: solid #fff; border-width: 0 2px 2px 0; rotate: 45deg; translate: 0 -1px; }

/* ---------------------------------------------------------------- look panel */
.panel {
  position: sticky; top: 80px; max-height: calc(100vh - 100px); overflow-y: auto;
  padding: 18px 18px 14px; border-radius: 20px;
  background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-2);
  scrollbar-width: thin; scrollbar-color: var(--line-2) transparent;
}
.panel-head { display: flex; align-items: baseline; justify-content: space-between; }
.panel h2 { font-family: var(--serif); font-weight: normal; font-size: 24px; margin: 0; }
#presetName { font-style: italic; font-family: var(--serif); font-size: 15px; color: var(--accent); }
#presetName.custom { color: var(--muted); }
.presets { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; margin: 12px 0 14px; }
.preset {
  border: 1.5px solid transparent; border-radius: 12px; padding: 4px 4px 7px;
  background: #ece4d4 var(--grain); cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  transition: border-color .15s, background-color .15s, transform .15s;
}
.preset:hover { transform: translateY(-1px); }
.preset .art { position: relative; width: 100%; aspect-ratio: 1 / .95; display: grid; place-items: center; }
.preset img { position: absolute; inset: 0; margin: auto; max-width: 88%; max-height: 90%; filter: drop-shadow(0 2px 3px rgba(30, 18, 8, .28)); transition: transform .25s var(--ease-pop); }
.preset:hover img { transform: scale(1.07) rotate(-2deg); }
.preset .pname { font-size: 11.5px; color: var(--ink-2); }
.preset.on { border-color: var(--ink); background-color: #e3d6c1; }
.preset.on .pname { color: var(--ink); font-weight: 600; }
.preset.plain .art::before { content: ""; width: 54%; height: 64%; border-radius: 4px; background: var(--paper); rotate: -4deg; box-shadow: var(--shadow-1); }

.group { border-top: 1px solid var(--line); }
.group > summary {
  list-style: none; cursor: pointer; user-select: none;
  display: flex; align-items: center; justify-content: space-between; padding: 13px 0;
  font-size: 11px; font-weight: 600; letter-spacing: 1.2px; text-transform: uppercase; color: var(--muted);
}
.group > summary::-webkit-details-marker { display: none; }
.group > summary::after {
  content: ""; width: 7px; height: 7px; margin-right: 3px;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  rotate: 45deg; translate: 0 -2px; transition: rotate .2s, translate .2s;
}
.group:not([open]) > summary::after { rotate: -45deg; translate: 0 0; }
.group > summary:hover { color: var(--ink); }
.group[open] { padding-bottom: 4px; }
.ctl { margin-bottom: 12px; }
.ctl > label { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 6px; color: var(--ink-2); }
.ctl output { color: var(--ink); font-variant-numeric: tabular-nums; font-size: 12.5px; }
.panel .seg { display: flex; }
.panel .seg button { flex: 1; padding: 6px 4px; }
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 22px; background: transparent; cursor: pointer; margin: 0; }
input[type="range"]::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: linear-gradient(to right, var(--ink) var(--fill, 50%), var(--line) var(--fill, 50%)); }
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 17px; height: 17px; margin-top: -6.5px; border-radius: 50%;
  background: var(--card); border: 1.5px solid var(--ink); box-shadow: var(--shadow-1); transition: transform .12s;
}
input[type="range"]:active::-webkit-slider-thumb { transform: scale(1.15); }
input[type="range"]::-moz-range-track { height: 4px; border-radius: 2px; background: var(--line); }
input[type="range"]::-moz-range-progress { height: 4px; border-radius: 2px; background: var(--ink); }
input[type="range"]::-moz-range-thumb { width: 15px; height: 15px; border-radius: 50%; background: var(--card); border: 1.5px solid var(--ink); }
.panel-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 4px; padding-top: 14px; border-top: 1px solid var(--line); }
.panel-note { margin: 12px 0 0; line-height: 1.5; }

/* what a setting does: the example photo, shown beside the Look panel */
.opt-card {
  position: fixed; z-index: 45; width: min(440px, calc(100vw - 24px)); max-height: calc(100vh - 24px); overflow: hidden;
  padding: 14px 14px 11px; border-radius: 16px; pointer-events: none;
  background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-3);
  animation: pop .16s var(--ease-out);
}
.opt-card.beside { overflow: visible; }
.opt-card.beside::after {
  content: ""; position: absolute; right: -7px; top: var(--arrow, 50%); width: 12px; height: 12px;
  translate: 0 -50%; rotate: 45deg; background: var(--card);
  border-top: 1px solid var(--line); border-right: 1px solid var(--line);
}
.opt-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.opt-card-head strong { font: normal 19px/1.2 var(--serif); }
#optValue { font: italic 15px/1.2 var(--serif); color: var(--accent); font-variant-numeric: tabular-nums; white-space: nowrap; }
.opt-stage { position: relative; height: 290px; border-radius: 12px; overflow: hidden; }
.opt-stage.empty { display: none; }
.opt-pair { position: absolute; inset: 0; filter: var(--piece-shadow); }
.opt-pair img { position: absolute; inset: 0; margin: auto; max-width: 88%; max-height: 88%; }
/* close-up: the crop fills the picture, with the whole piece in the corner */
.opt-stage.zoom .opt-pair { filter: none; }
.opt-stage.zoom .opt-pair img { width: 100%; height: 100%; max-width: none; max-height: none; object-fit: cover; }
.opt-inset {
  position: absolute; left: 8px; bottom: 8px; border-radius: 6px; overflow: hidden;
  background: inherit; box-shadow: 0 0 0 2px rgba(251, 249, 244, .9), 0 4px 12px rgba(0, 0, 0, .3);
}
.opt-inset img { display: block; width: 100%; height: 100%; }
.opt-inset i { position: absolute; border: 1.5px solid #fff; box-shadow: 0 0 0 1px rgba(36, 32, 28, .55); border-radius: 2px; }
.opt-tag {
  position: absolute; top: 8px; left: 8px; font-size: 10px; font-weight: 600; letter-spacing: .7px; text-transform: uppercase;
  color: var(--ink-2); background: rgba(251, 249, 244, .9); padding: 3px 8px; border-radius: 999px;
}
.opt-card-text { margin: 10px 0; font-size: 13px; line-height: 1.45; color: var(--ink-2); }
.opt-strip { display: grid; grid-template-columns: repeat(var(--n, 5), minmax(0, 1fr)); gap: 6px; }
.opt-strip:empty { display: none; }
.opt-strip figure { margin: 0; text-align: center; min-width: 0; }
.opt-strip .art {
  position: relative; display: block; aspect-ratio: 1; border-radius: 8px; overflow: hidden;
  background: #ece4d4 var(--grain); border: 1.5px solid transparent; transition: border-color .12s, background-color .12s;
}
.opt-strip img { position: absolute; inset: 0; margin: auto; max-width: 86%; max-height: 86%; }
.opt-strip.zoom .art { aspect-ratio: 4 / 3; }
.opt-strip.zoom img { width: 100%; height: 100%; max-width: none; max-height: none; object-fit: cover; }
.opt-strip figcaption {
  margin-top: 3px; font-size: 10.5px; color: var(--muted); font-variant-numeric: tabular-nums;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.opt-strip figure.on .art { border-color: var(--ink); background-color: #e3d6c1; }
.opt-strip figure.on figcaption { color: var(--ink); font-weight: 600; }
/* the user's current choice: a dot on the corner of its picture */
.opt-strip figure.cur .art::after {
  content: ""; position: absolute; top: 4px; right: 4px; width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 2px rgba(255, 255, 255, .9);
}
.opt-card-foot { margin: 9px 0 0; font-size: 11px; color: var(--muted); }

/* Sides slider: numbers at the left, the curved cut at the far right */
.range-ends { display: flex; justify-content: space-between; margin-top: 1px; font-size: 10.5px; color: var(--muted); }

/* animated GIF / PNG */
.modal-card.anim { width: min(980px, 100%); }
.anim-body { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 18px; padding: 0 18px; min-height: 0; overflow-y: auto; }
.anim-stage {
  position: relative; min-height: 380px; border-radius: 14px; overflow: hidden; display: grid; place-items: center;
  border: 1px solid var(--line);
}
.anim-stage[data-bg="none"] { background: #fff repeating-conic-gradient(#e9e4dc 0 25%, #fff 0 50%) 0 0 / 22px 22px; }
.anim-stage[data-bg="kraft"] { background: #b08a63 var(--grain); }
.anim-stage[data-bg="cream"] { background: #ece4d4 var(--grain); }
.anim-stage[data-bg="charcoal"] { background: #34312e var(--grain); }
.anim-stage canvas { display: block; max-width: calc(100% - 24px); max-height: calc(100% - 24px); }
.anim-play { position: absolute; left: 10px; bottom: 10px; }
.anim-info {
  position: absolute; right: 10px; bottom: 12px; font-size: 11.5px; font-variant-numeric: tabular-nums;
  padding: 3px 9px; border-radius: 999px; background: rgba(251, 249, 244, .88); color: var(--ink-2);
}
.anim-controls .seg { display: flex; }
.anim-controls .seg button { flex: 1; padding: 6px 4px; }
.anim-controls .ctl.disabled { opacity: .45; pointer-events: none; }
.anim-note { margin: 6px 0 0; line-height: 1.45; }
.anim-foot { gap: 16px; }
.anim-go { display: flex; align-items: center; gap: 14px; flex: 1; justify-content: flex-end; min-width: 0; }
.anim-go .progress { max-width: 360px; }

/* ---------------------------------------------------------------- overlays */
.modal, .lightbox {
  position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 24px;
  background: rgba(28, 24, 20, .56); backdrop-filter: blur(4px);
  animation: fade .2s ease-out;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal-card {
  width: min(1100px, 100%); max-height: 100%; display: flex; flex-direction: column;
  background: var(--card); border-radius: 20px; box-shadow: 0 30px 80px rgba(0, 0, 0, .35); overflow: hidden;
  animation: pop .22s var(--ease-out);
}
.modal-card.narrow { width: min(560px, 100%); }
.modal-head, .modal-foot { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; gap: 12px; }
.modal-head h3 { margin: 0; font-family: var(--serif); font-weight: normal; font-size: 21px; }
.pick-wrap { position: relative; margin: 0 18px; min-height: 0; display: flex; justify-content: center; background: #1d1a17; border-radius: 12px; overflow: hidden; }
.pick-wrap img { display: block; max-width: 100%; max-height: 66vh; cursor: crosshair; }
/* what a click picks out, outlined over the picture (0..1 of it), in the subject's colour */
.pick-outline { position: absolute; pointer-events: none; overflow: visible; }
.pick-outline polygon { vector-effect: non-scaling-stroke; stroke-linejoin: round; fill: none; }
.pick-outline .halo { stroke: rgba(255, 255, 255, .92); stroke-width: 5; }
.pick-outline .line { stroke: var(--c, var(--accent)); stroke-width: 2.4; fill: color-mix(in srgb, var(--c, var(--accent)) 18%, transparent); }
.pick-outline .other.line { stroke-dasharray: 7 5; fill: none; }
.pick-outline .finding { opacity: .4; }
/* what the collage cuts out by itself: dashed and neutral, under what's picked */
.pick-outline .auto.halo { stroke: rgba(20, 16, 12, .5); stroke-width: 4; }
.pick-outline .auto.line { stroke: rgba(255, 255, 255, .95); stroke-width: 1.8; stroke-dasharray: 5 4; fill: rgba(255, 255, 255, .07); }
/* a click whose outline is being worked out */
.pick-mark.busy::before {
  content: ""; position: absolute; inset: -9px; border-radius: 50%; pointer-events: none;
  border: 2.5px solid rgba(255, 255, 255, .95); border-right-color: transparent; border-bottom-color: transparent;
  filter: drop-shadow(0 0 2px rgba(0, 0, 0, .5)); animation: spin .7s linear infinite;
}
.pick-foot-btns { display: flex; gap: 8px; }
.picks-finding {
  position: absolute; top: 10px; left: 10px; display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 11px 5px 7px; border-radius: 99px; background: rgba(251, 249, 244, .92); font-size: 12px; color: var(--ink-2);
}

.modal-card.confirm { width: min(420px, 100%); padding: 22px 22px 18px; }
.confirm h3 { margin: 0 0 6px; font-family: var(--serif); font-weight: normal; font-size: 22px; }
.confirm p { margin: 0 0 20px; line-height: 1.55; }
.confirm-actions { display: flex; justify-content: flex-end; gap: 8px; }

.help-body { padding: 0 22px 20px; overflow-y: auto; }
.keys { margin: 0; display: grid; gap: 2px; }
.keys div { display: grid; grid-template-columns: 110px 1fr; align-items: center; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.keys dt { margin: 0; display: flex; gap: 4px; }
.keys dd { margin: 0; color: var(--ink-2); }
.tips { margin: 16px 0 0; padding-left: 18px; color: var(--ink-2); line-height: 1.6; }
.tips li + li { margin-top: 6px; }

.lightbox { grid-template-columns: auto 1fr auto; grid-template-rows: 1fr auto; gap: 14px 18px; cursor: zoom-out; }
.lightbox-stage {
  position: relative;
  grid-column: 2; width: 100%; height: min(78vh, 920px); justify-self: center; max-width: 1100px;
  border-radius: 18px; box-shadow: 0 30px 80px rgba(0, 0, 0, .35); cursor: default; overflow: hidden;
}
.lightbox-stage img { position: absolute; inset: 0; margin: auto; max-width: 88%; max-height: 88%; filter: var(--piece-shadow); animation: settle .4s var(--ease-pop); }
.lb-nav {
  width: 48px; height: 48px; border-radius: 50%; border: 0; cursor: pointer; align-self: center;
  background: rgba(251, 249, 244, .9); color: var(--ink); font-size: 28px; line-height: 1; padding-bottom: 4px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .25); transition: transform .15s, background .15s;
}
.lb-nav:hover { transform: scale(1.08); background: #fff; }
.lb-nav[disabled] { opacity: .3; pointer-events: none; }
.lb-nav.prev { grid-column: 1; }
.lb-nav.next { grid-column: 3; }
.lightbox-bar { grid-column: 1 / -1; justify-self: center; display: flex; align-items: center; gap: 14px; color: #fbf7ef; cursor: default; font-variant-numeric: tabular-nums; }

.drop-overlay {
  position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 24px;
  background: rgba(241, 236, 227, .84); backdrop-filter: blur(6px);
  animation: fade .15s ease-out;
}
.drop-overlay-card {
  width: min(540px, 100%); padding: 54px 30px 50px; border: 2px dashed var(--accent); border-radius: 26px;
  background: var(--card) var(--grain); box-shadow: var(--shadow-3);
  display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center;
  animation: pop .25s var(--ease-pop); pointer-events: none;
}
.drop-overlay-card strong { font-family: var(--serif); font-weight: normal; font-size: 30px; margin-top: 10px; }
.drop-overlay-card .bar { width: 70%; flex: none; margin-top: 14px; }

.toast {
  position: fixed; left: 50%; bottom: 26px; translate: -50% 0; z-index: 100;
  display: flex; align-items: center; gap: 10px;
  padding: 11px 18px; border-radius: 12px; background: var(--ink); color: #fbf7ef;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .25); font-size: 13.5px; max-width: min(560px, 90vw);
  animation: toastIn .3s var(--ease-pop);
}
.toast::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #e9c46a; flex: 0 0 auto; }
.toast.ok::before { background: #8fc488; }
.toast.error { background: #8c2f1b; }
.toast.error::before { background: #ffd3c4; }
@keyframes toastIn { from { opacity: 0; translate: -50% 16px; } to { opacity: 1; translate: -50% 0; } }

.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line-2); border-top-color: var(--accent); animation: spin .8s linear infinite; flex: 0 0 auto; }
.spinner.tiny { width: 11px; height: 11px; border-width: 1.5px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------------------------------------------------------- collage video */
#videoMode[data-make="collage"] .pieces-only,
#videoMode[data-make="collage"] .tl-ticks,
#videoMode:not([data-make="collage"]) .collage-only { display: none !important; }

.make-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.make-tabs button {
  display: flex; align-items: center; gap: 12px; text-align: left; cursor: pointer;
  padding: 11px 14px; border-radius: 14px; border: 1.5px solid var(--line); background: rgba(251, 249, 244, .55);
  color: var(--ink-2); transition: border-color .15s, background .15s, box-shadow .15s, color .15s;
}
.make-tabs button:hover { border-color: var(--line-2); background: var(--card); color: var(--ink); }
.make-tabs button.on { border-color: var(--ink); background: var(--card) var(--grain); color: var(--ink); box-shadow: var(--shadow-2); }
.make-tabs .i { width: 34px; height: 34px; padding: 7px; border-radius: 10px; background: var(--bg-deep); color: var(--ink-2); stroke-width: 1.8; }
.make-tabs button.on .i { background: var(--accent-soft); color: var(--accent); }
.make-tabs span { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.make-tabs b { font-family: var(--serif); font-weight: normal; font-size: 18px; line-height: 1.2; }
.make-tabs small { font-size: 12px; color: var(--muted); }

.pick-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pick-chips:empty { display: none; }
.pick-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 4px 3px 9px; border-radius: 999px;
  background: var(--paper); border: 1px solid var(--line-2); font-size: 12.5px; color: var(--ink);
}
.pick-chip i { width: 9px; height: 9px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--c); }
.pick-chip small { color: var(--muted); font-variant-numeric: tabular-nums; }
.pick-chip button { display: grid; place-items: center; width: 20px; height: 20px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--muted); cursor: pointer; }
.pick-chip button:hover { background: var(--bg-deep); color: var(--ink); }
.pick-chip .x { width: 12px; height: 12px; }
.col-hint { flex: 1; min-width: 200px; line-height: 1.45; }

/* the estimate: the video it makes, its cutouts, how long it takes */
.est-row { gap: 8px 10px; }
.est {
  display: inline-flex; align-items: center; gap: 7px; padding: 4px 11px 4px 9px; border-radius: 999px;
  background: var(--bg-deep); font-size: 12.5px; color: var(--ink-2); white-space: nowrap; cursor: default;
  font-variant-numeric: tabular-nums;
}
.est b { color: var(--ink); font-weight: 600; }
.est .i { width: 15px; height: 15px; color: var(--accent); }
.est.rough b { color: var(--ink-2); font-weight: normal; }
.est-basis { flex: 1; min-width: 160px; }

/* what the snapshots found: outlines over each frame of the section */
.snap-strip { margin-top: 14px; }
.snap-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; padding: 0 2px; }
.snap-head .key { display: inline-block; width: 18px; height: 10px; margin: 0 5px 0 10px; border-radius: 3px; vertical-align: -1px; }
.snap-head .key:first-child { margin-left: 0; }
.key.cut { background: rgba(184, 73, 47, .25); border: 2px solid var(--accent); }
.key.stays { border: 2px dashed #8d8377; }
.snap-list { display: flex; gap: 10px; overflow-x: auto; padding: 2px 2px 10px; scrollbar-width: thin; }
.snap { margin: 0; flex: 0 0 auto; width: 196px; cursor: pointer; }
.snap.outside { opacity: .55; }
.snap-img { position: relative; width: 100%; border-radius: 8px; overflow: hidden; background: var(--bg-deep); box-shadow: var(--shadow-1); transition: transform .15s, box-shadow .15s; }
.snap:hover .snap-img { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.snap-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.snap-img svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.snap-img polygon { vector-effect: non-scaling-stroke; stroke-width: 1.6; stroke-linejoin: round; }
.snap-img polygon.cut { fill: rgba(184, 73, 47, .22); stroke: #e4572e; }
.snap-img polygon.picked { fill: rgba(31, 158, 137, .25); stroke: #1f9e89; }
.snap-img polygon.stays { fill: rgba(255, 255, 255, .06); stroke: rgba(255, 255, 255, .9); stroke-dasharray: 3 2; }
.snap-img polygon.can-pick { cursor: copy; }
.snap-img polygon.can-pick:hover { fill: rgba(31, 158, 137, .3); stroke: #1f9e89; stroke-dasharray: none; }
.snap figcaption { font-size: 11.5px; color: var(--muted); margin-top: 5px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.snap figcaption b { color: var(--ink-2); font-weight: 600; }

.col-progress {
  margin-top: 16px; padding: 16px 18px 12px; border-radius: var(--radius);
  background: var(--card) var(--grain); border: 1px solid var(--line); box-shadow: var(--shadow-2);
  animation: rise .35s var(--ease-out);
}
.col-steps { list-style: none; display: flex; gap: 4px; padding: 0; margin: 0 0 14px; counter-reset: step; }
.col-steps li {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0;
  font-size: 11.5px; color: var(--muted); position: relative; counter-increment: step;
}
.col-steps li::before { /* the line joining the steps */
  content: ""; position: absolute; top: 11px; right: 50%; width: 100%; height: 2px; background: var(--line); z-index: 0;
}
.col-steps li:first-child::before { display: none; }
.col-steps li.done::before, .col-steps li.now::before { background: var(--accent); }
.col-steps i {
  position: relative; z-index: 1; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
  background: var(--card); border: 2px solid var(--line-2); font: italic 12px/1 var(--serif); color: var(--muted);
}
.col-steps i::after { content: counter(step); }
.col-steps li.done i { background: var(--accent); border-color: var(--accent); color: #fff; }
.col-steps li.done i::after { content: ""; width: 5px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0; rotate: 45deg; translate: 0 -1px; }
.col-steps li.now i { border-color: var(--accent); color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); animation: breathe 1.6s ease-in-out infinite alternate; }
.col-steps li.done, .col-steps li.now { color: var(--ink); }
.col-steps li.now span { font-weight: 600; }
.col-steps span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
@keyframes breathe { from { box-shadow: 0 0 0 2px var(--accent-soft); } to { box-shadow: 0 0 0 7px rgba(184, 73, 47, .05); } }
.col-now { display: flex; align-items: center; gap: 12px; }
.col-now .ptext { white-space: normal; flex: 0 1 auto; max-width: 60%; text-align: right; }
.col-foot { display: flex; align-items: center; gap: 12px; margin-top: 10px; min-height: 30px; }
.col-log {
  margin: 10px 0 2px; padding: 10px 12px; max-height: 190px; overflow: auto; border-radius: 10px;
  background: #24201c; color: #e9e1d4; font: 11.5px/1.5 ui-monospace, "Cascadia Mono", Consolas, monospace; white-space: pre-wrap;
}

.col-feature { border-radius: 18px; overflow: hidden; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-2); }
.col-player { background: #1d1a17; display: flex; justify-content: center; }
.col-player video { display: block; width: 100%; max-height: 72vh; background: #1d1a17; }
.col-feature-bar { display: flex; align-items: center; gap: 14px; padding: 12px 14px; flex-wrap: wrap; }
.col-info { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 220px; }
.col-info b { font-family: var(--serif); font-weight: normal; font-size: 18px; }
.col-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; margin-top: 16px; }
.col-card {
  display: flex; flex-direction: column; padding: 0; text-align: left; cursor: pointer; overflow: hidden;
  border-radius: 12px; border: 1.5px solid var(--line); background: var(--card); color: var(--ink);
  box-shadow: var(--shadow-1); transition: transform .15s var(--ease-out), box-shadow .15s, border-color .15s;
}
.col-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.col-card.on { border-color: var(--ink); }
.col-thumb { position: relative; aspect-ratio: 16 / 9; background: #1d1a17; overflow: hidden; }
.col-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.col-thumb .play {
  position: absolute; inset: 0; margin: auto; width: 34px; height: 34px; display: grid; place-items: center;
  border-radius: 50%; background: rgba(251, 249, 244, .9); color: var(--ink); opacity: 0; transition: opacity .15s;
}
.col-thumb .play svg { width: 14px; height: 14px; fill: currentColor; translate: 1px 0; }
.col-card:hover .play { opacity: 1; }
.col-thumb .dur {
  position: absolute; right: 6px; bottom: 6px; padding: 1px 6px; border-radius: 6px;
  background: rgba(28, 24, 20, .72); color: #fbf7ef; font-size: 11px; font-variant-numeric: tabular-nums;
}
.col-card-text { display: flex; flex-direction: column; gap: 1px; padding: 8px 10px 9px; }
.col-card-text b { font-weight: 600; font-size: 12.5px; }
.col-card-text small { color: var(--muted); font-size: 11.5px; }

.col-papers { display: grid; gap: 8px; margin: 2px 0 14px; }
.col-papers button {
  display: grid; grid-template-columns: 92px 1fr; align-items: center; gap: 12px; padding: 5px; text-align: left; cursor: pointer;
  border: 1.5px solid transparent; border-radius: 12px; background: #ece4d4 var(--grain); color: var(--ink);
  transition: border-color .15s, background-color .15s, transform .15s;
}
.col-papers button:hover { transform: translateY(-1px); }
.col-papers button.on { border-color: var(--ink); background-color: #e3d6c1; }
.col-papers .art { display: block; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; background: #b08a63 var(--grain); box-shadow: var(--shadow-1); }
.col-papers .art img { display: block; width: 100%; height: 100%; object-fit: cover; }
.col-papers .art.missing img { display: none; }
.col-papers .txt { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.col-papers b { font-size: 13px; }
.col-papers small { font-size: 11.5px; color: var(--ink-2); line-height: 1.35; }
.ctl-note { margin: 6px 0 0; line-height: 1.45; }

/* a steady size, so the picture doesn't shift under the pointer as the list of subjects grows */
.modal-card.picks { width: min(1180px, 100%); height: min(800px, 100%); }
.picks-body { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; padding: 0 18px; min-height: 0; }
.picks-main { display: flex; flex-direction: column; min-height: 0; }
.picks-body .pick-wrap { flex: 1; margin: 0; align-items: center; min-height: 200px; }
.picks-body .pick-wrap img { max-width: 100%; max-height: 100%; user-select: none; }
.picks-side { overflow-y: auto; min-height: 0; scrollbar-width: thin; }
.picks-dots { position: absolute; inset: 0; pointer-events: none; }
.pick-mark {
  position: absolute; width: 18px; height: 18px; margin: -9px 0 0 -9px; padding: 0; border-radius: 50%; cursor: pointer;
  border: 2.5px solid #fff; background: var(--c); pointer-events: auto;
  box-shadow: 0 1px 6px rgba(0, 0, 0, .45); transition: transform .12s; animation: pop .2s var(--ease-pop);
}
.pick-mark:hover { transform: scale(1.25); }
.pick-mark.cur { box-shadow: 0 0 0 3px var(--c), 0 1px 8px rgba(0, 0, 0, .5); }
.pick-mark.not { background: rgba(28, 24, 20, .55); border-color: var(--c); }
.pick-mark.not::after { content: ""; position: absolute; inset: 0; margin: auto; width: 8px; height: 2px; background: #fff; border-radius: 1px; }
.picks-loading { position: absolute; top: 10px; right: 10px; padding: 6px; border-radius: 50%; background: rgba(251, 249, 244, .9); }
.picks-time { display: flex; align-items: center; gap: 10px; padding: 10px 2px 2px; }
.picks-time .muted { white-space: nowrap; }
.picks-time b { font-weight: 600; font-variant-numeric: tabular-nums; min-width: 52px; text-align: right; font-size: 13px; }
.picks-side { display: flex; flex-direction: column; gap: 12px; padding-bottom: 6px; }
.picks-side .seg { display: flex; }
.picks-side .seg button { flex: 1; }
.picks-help { margin: 0; line-height: 1.55; color: var(--ink-2); font-size: 13px; }
.picks-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.picks-list:empty { display: none; }
.picks-list li { display: flex; align-items: center; gap: 4px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--paper); }
.picks-list li.on { border-color: var(--c); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 18%, transparent); }
.pick-name { flex: 1; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 0; background: none; cursor: pointer; text-align: left; min-width: 0; }
.pick-name i { flex: 0 0 auto; width: 12px; height: 12px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--c); }
.pick-name span { display: flex; flex-direction: column; min-width: 0; }
.pick-name b { font-size: 13px; }
.pick-name small { font-size: 11.5px; color: var(--muted); }
.picks-list li.pick-auto { border-style: dashed; background: none; }
.pick-auto .pick-name { cursor: default; }
.pick-auto .pick-name i { background: none; border: 2px dashed var(--muted); box-shadow: none; width: 11px; height: 11px; }
.pick-del { display: grid; place-items: center; width: 30px; height: 30px; margin-right: 4px; padding: 0; border: 0; border-radius: 8px; background: none; color: var(--muted); cursor: pointer; }
.pick-del:hover { background: var(--bg-deep); color: var(--ink); }
.pick-del .x { width: 14px; height: 14px; }
.picks-foot-left { display: flex; gap: 16px; }

.showcase {
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 44px; align-items: center;
  margin: 54px 0 6px;
}
.showcase-film {
  position: relative; margin: 0; padding: 10px; border-radius: 6px; rotate: -1.2deg;
  background: var(--paper); box-shadow: var(--shadow-3);
}
.showcase-film::before { /* a strip of tape */
  content: ""; position: absolute; z-index: 2; top: -13px; left: 50%; width: 120px; height: 26px; translate: -50% 0; rotate: 3deg;
  background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .18) 0 2px, transparent 2px 5px), rgba(222, 204, 164, .84);
  box-shadow: 0 1px 2px rgba(60, 40, 20, .14);
  clip-path: polygon(0 8%, 4% 0, 8% 10%, 12% 0, 88% 0, 92% 9%, 96% 0, 100% 10%, 100% 92%, 96% 100%, 92% 90%, 88% 100%, 12% 100%, 8% 91%, 4% 100%, 0 90%);
}
.showcase-film video { display: block; width: 100%; aspect-ratio: 16 / 9; background: #b08a63; border-radius: 2px; }
.showcase-tag { position: absolute; right: 18px; bottom: 18px; padding: 3px 9px; border-radius: 999px; background: rgba(28, 24, 20, .62); color: #fbf7ef; font-size: 11.5px; }
.showcase-copy h2 {
  font-family: var(--serif); font-weight: normal; font-size: clamp(30px, 3.2vw, 44px); line-height: 1.1; margin: 0 0 14px;
}
.showcase-copy h2 em {
  font-style: italic; color: var(--accent);
  background: linear-gradient(transparent 72%, rgba(184, 73, 47, .14) 72%, rgba(184, 73, 47, .14) 92%, transparent 92%);
}
.showcase-copy p { margin: 0 0 12px; font-size: 15.5px; line-height: 1.65; color: var(--ink-2); max-width: 32em; }
.showcase-copy p.small { font-size: 12.5px; }
/* the original beside its collage is twice as wide as a frame: the words go above, the clip full width */
.showcase.wide { grid-template-columns: 1fr; gap: 26px; }
.showcase.wide .showcase-copy { order: -1; display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1fr); gap: 0 44px; align-items: end; }
.showcase.wide .showcase-copy .eyebrow { grid-column: 1 / -1; justify-self: start; }
.showcase.wide .showcase-copy h2 { margin: 0; }
.showcase.wide .showcase-copy p { grid-column: 2; }
.showcase.wide .showcase-film { rotate: -.6deg; }

/* ---------------------------------------------------------------- smaller screens */
@media (max-width: 1180px) {
  .hero { gap: 30px; }
  .steps { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .anim-body { grid-template-columns: 1fr; }
  .anim-stage { min-height: 260px; }
}
@media (max-width: 1080px) {
  .workspace { grid-template-columns: 1fr; }
  .panel { position: static; max-height: none; }
  .work-title h2 { max-width: 70vw; }
}
@media (max-width: 860px) {
  .showcase { grid-template-columns: 1fr; gap: 26px; }
  .showcase.wide .showcase-copy { display: block; }
  .showcase.wide .showcase-copy h2 { margin: 0 0 14px; }
  .modal-card.picks { height: auto; }
  .picks-body { grid-template-columns: 1fr; overflow-y: auto; }
  .picks-body .pick-wrap { flex: none; }
  .picks-body .pick-wrap img { max-height: 56vh; }
  .picks-side { overflow: visible; }
  .hero { grid-template-columns: 1fr; }
  .hero-art { max-width: 470px; order: -1; }
  .drop { grid-template-columns: auto 1fr; }
  .drop .btn { grid-column: 1 / -1; }
  .top .name { display: none; }
}
@media (max-width: 640px) {
  main { padding: 14px 16px 50px; }
  .top { padding: 10px 16px; gap: 12px; }
  #gpuPill { display: none; }
  .steps { grid-template-columns: 1fr; }
  .stage { height: 62vh; min-height: 340px; }
  .stage-tools { top: 12px; left: 12px; }
  .desk-swatches { top: auto; bottom: 12px; right: 12px; }
  .stage-info { left: 12px; bottom: 12px; }
  .stage-info .wide-only { display: none; }
  .board { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
  .polaroids { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 26px 18px; }
  .timeline { margin: 16px 16px 6px; }
  .lightbox { grid-template-columns: 1fr; }
  .lb-nav { display: none; }
  .lightbox-stage { grid-column: 1; }
  .work-actions { width: 100%; }
  .make-tabs { gap: 8px; }
  .make-tabs button { padding: 9px 10px; gap: 9px; }
  .make-tabs .i { width: 28px; height: 28px; padding: 5px; }
  .make-tabs b { font-size: 15.5px; }
  .make-tabs small { display: none; }
  .col-steps span { font-size: 10.5px; }
  .col-now { flex-direction: column; align-items: stretch; gap: 8px; }
  .col-now .ptext { max-width: none; text-align: left; }
  .picks-foot-left { gap: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ---------------------------------------------------------------- the hosted site's account */
.account-wrap { position: relative; }
button.account-pill { cursor: pointer; font: inherit; font-size: 12px; }
button.account-pill:hover { border-color: var(--line-2); color: var(--ink); }
.account-pop { width: 320px; }
.account-who { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; margin: 2px 0 12px; }
.account-who span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); font-size: 13px; }
.account-who b { font-size: 15px; white-space: nowrap; }
.account-note { color: var(--accent) !important; }
.packs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 8px; }
.pack { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 6px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--paper); cursor: pointer; font: inherit; color: var(--ink); }
.pack:hover { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.pack b { font-size: 13px; }
.pack span { font-size: 12px; color: var(--muted); }
.pack:disabled { opacity: .5; cursor: progress; }
.account-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.danger-link:hover { color: var(--accent); }
.signin-body { padding: 0 22px 20px; display: grid; gap: 10px; }
.signin-body p { margin: 0; }
.text-input { width: 100%; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--paper);
  font: inherit; color: var(--ink); }
.text-input:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
.error-text { color: var(--accent); }
.ok-text { color: var(--ok); }
.signin-body a, .site-foot a { color: var(--ink-2); }
.site-foot { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; padding: 28px 16px 36px;
  font-size: 13px; color: var(--muted); }
#photoMakeRow { margin-top: 14px; }
@media (max-width: 560px) {
  .account-pop { position: fixed; left: 16px; right: 16px; top: 64px; width: auto; }
}
