:root {
  --bg: #2a1258;
  --bg-2: #43186f;
  --card: #fff7ee;
  --line: rgba(255, 255, 255, 0.35);
  --gold: #ffd43b;
  --gold-2: #fff3a0;
  --rose: #ff6b9d;
  --mint: #5ef0c0;
  --sky: #5ad2ff;
  --wine: #ff3d7f;
  --ink: #fffaf4;
  --muted: #ffe4f2;
  --dark: #2b1248;
  --shadow: 0 18px 40px rgba(80, 10, 70, 0.35);
  --font-serif: "Fredoka", "Trebuchet MS", sans-serif;
  --font-sans: "Nunito", system-ui, sans-serif;
  --ok: #5ef0c0;
  --warn: #ffd43b;
  --bad: #ff5c7a;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 18%, #ffd43b 0 14px, transparent 15px),
    radial-gradient(circle at 88% 22%, #5ef0c0 0 10px, transparent 11px),
    radial-gradient(circle at 76% 78%, #ff6b9d 0 12px, transparent 13px),
    radial-gradient(circle at 18% 82%, #5ad2ff 0 11px, transparent 12px),
    radial-gradient(900px 520px at 0% -10%, rgba(255, 107, 157, .55), transparent 58%),
    radial-gradient(800px 480px at 100% 0%, rgba(90, 210, 255, .4), transparent 55%),
    radial-gradient(700px 500px at 50% 110%, rgba(255, 212, 59, .28), transparent 50%),
    linear-gradient(165deg, #3c1578 0%, #5b1d8a 42%, #1e3a8a 100%);
  font-family: var(--font-sans);
}
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--gold-2); }
.kiosk-body { overflow: hidden; height: 100dvh; }
.wrap { width: min(1180px, calc(100% - 28px)); margin: 0 auto; padding-bottom: 80px; }
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}
.brand img { width: 52px; height: 52px; object-fit: contain; border-radius: 14px; background: #fff; padding: 4px; }
.brand strong { display: block; font-family: var(--font-serif); font-size: 1.35rem; }
.brand em { display: block; color: var(--muted); font-style: normal; font-size: 0.82rem; }
.btn {
  appearance: none;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffe566, #ffb703);
  color: #3b0d4a;
  font-weight: 800;
  padding: 14px 22px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  box-shadow: 0 8px 0 #c97a00, 0 12px 20px rgba(0,0,0,.2);
}
.btn:active { transform: translateY(3px); box-shadow: 0 5px 0 #c97a00; }
.btn-ghost {
  background: rgba(255,255,255,.14);
  color: var(--ink);
  border: 2px solid rgba(255,255,255,.35);
  box-shadow: none;
}
.btn-xl { min-height: 68px; padding: 16px 32px; font-size: 1.25rem; }
.btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.kicker { letter-spacing: .12em; text-transform: uppercase; color: var(--gold); font-size: .78rem; margin: 0 0 8px; font-weight: 800; }
h1, h2 { font-family: var(--font-serif); font-weight: 700; margin: 0 0 10px; }
.lede { color: var(--muted); line-height: 1.5; }
.fine { color: var(--muted); font-size: .85rem; }
.muted { color: var(--muted); }
.flash { padding: 12px 16px; border-radius: 14px; margin: 12px 0; }
.flash-ok { background: rgba(94, 240, 192, .22); }
.flash-error { background: rgba(255, 92, 122, .25); }

.attract {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 48px 20px 72px;
  cursor: default;
  position: relative;
  overflow: hidden;
}
.attract-copy {
  width: min(760px, 100%);
  position: relative;
  z-index: 2;
  background: rgba(67, 24, 111, .42);
  backdrop-filter: blur(10px);
  border-radius: 32px;
  padding: 28px 24px 32px;
}
.attract-copy img { margin: 0 auto 18px; filter: drop-shadow(0 8px 16px rgba(0,0,0,.25)); }
.attract h1 { font-size: clamp(2.4rem, 7vw, 4.6rem); line-height: .95; text-shadow: 0 4px 0 rgba(0,0,0,.18); }
.attract h1 em { color: var(--gold); font-style: italic; }
.attract .lede { font-size: 1.15rem; }
.attract .sizes { margin-top: 22px; color: var(--muted); font-weight: 800; }
.flag-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin: 28px auto 0;
  max-width: 640px;
}
.flag-btn {
  display: grid;
  justify-items: center;
  gap: 12px;
  text-decoration: none;
  color: #43186f;
  background: #fff;
  border-radius: 28px;
  padding: 22px 16px 18px;
  box-shadow: 0 10px 0 rgba(0,0,0,.16);
}
.flag-btn:active { transform: translateY(4px); box-shadow: 0 6px 0 rgba(0,0,0,.12); }
.flag-img {
  width: 148px;
  height: 96px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 16px rgba(0,0,0,.2);
}
.flag-img svg { width: 100%; height: 100%; display: block; }
.flag-btn strong { font-size: 1.45rem; font-family: var(--font-serif); }
.product-grid { grid-template-columns: 1fr 1fr 1fr !important; }
.pulse { animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse {
  50% { transform: scale(1.05); box-shadow: 0 10px 0 #c97a00, 0 0 0 14px rgba(255, 107, 157, .25); }
}
.version-mark {
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 6;
  margin: 0;
  font-weight: 800;
  letter-spacing: .06em;
  font-size: .82rem;
  color: var(--gold);
  background: rgba(43, 18, 72, .55);
  border-radius: 999px;
  padding: 6px 14px;
}
.staff-link {
  position: absolute;
  right: 18px;
  bottom: 36px;
  z-index: 3;
  background: rgba(255,255,255,.18);
  border: 0;
  color: #fff;
  cursor: pointer;
  border-radius: 999px;
  padding: 8px 14px;
}
.filmstrip {
  position: absolute;
  left: 0; right: 0;
  height: 28px;
  z-index: 4;
  background:
    radial-gradient(circle, #1a1030 5px, transparent 6px) 10px 6px / 22px 28px,
    repeating-linear-gradient(90deg, #111 0 14px, #ffd43b 14px 18px, #111 18px 22px);
}
.filmstrip-top { top: 0; }
.filmstrip-bottom { bottom: 0; }
.polaroid-wall {
  position: absolute; inset: 0;
  pointer-events: none;
  z-index: 0;
}
.polaroid {
  position: absolute;
  width: 168px;
  background: #fff;
  padding: 10px 10px 28px;
  box-shadow: 0 12px 24px rgba(0,0,0,.28);
  border-radius: 4px;
  --rot: 0deg;
  transform: rotate(var(--rot));
}
.polaroid img { width: 100%; height: 118px; object-fit: cover; border-radius: 2px; }
.polaroid figcaption {
  color: #5b2b6e;
  font-family: var(--font-serif);
  font-size: .85rem;
  margin-top: 6px;
}
.polaroid:nth-child(1) { top: 8%; left: 4%; }
.polaroid:nth-child(2) { top: 12%; right: 6%; }
.polaroid:nth-child(3) { bottom: 14%; left: 8%; }
.polaroid:nth-child(4) { bottom: 10%; right: 5%; }
.polaroid:nth-child(5) { top: 42%; left: 2%; }
.polaroid:nth-child(6) { top: 48%; right: 2%; }
.rot-l { --rot: -11deg; }
.rot-r { --rot: 9deg; }
.rot-l2 { --rot: -6deg; }
.rot-r2 { --rot: 14deg; }
@keyframes floaty {
  50% { transform: translateY(-10px) rotate(var(--rot)); }
}
.polaroid.delay { animation: floaty 4.5s ease-in-out infinite; }
.polaroid.delay2 { animation: floaty 5.2s ease-in-out infinite .6s; }
.polaroid.delay3 { animation: floaty 4.8s ease-in-out infinite 1s; }
.confetti { position: absolute; inset: 0; pointer-events: none; z-index: 1; overflow: hidden; }
.confetti i {
  position: absolute;
  width: 14px; height: 18px;
  border-radius: 3px;
  opacity: .85;
  animation: confetti-fall 7s linear infinite;
}
.confetti i:nth-child(1) { left: 8%; top: -10%; background: #ff4d8d; animation-delay: 0s; }
.confetti i:nth-child(2) { left: 18%; top: -20%; background: #ffe566; width: 10px; height: 10px; border-radius: 50%; animation-delay: .4s; }
.confetti i:nth-child(3) { left: 28%; top: -8%; background: #5ad2ff; animation-delay: 1s; }
.confetti i:nth-child(4) { left: 42%; top: -18%; background: #5ef0c0; animation-delay: .2s; }
.confetti i:nth-child(5) { left: 55%; top: -12%; background: #ff9f1c; width: 8px; animation-delay: 1.6s; }
.confetti i:nth-child(6) { left: 66%; top: -22%; background: #c77dff; animation-delay: .8s; }
.confetti i:nth-child(7) { left: 76%; top: -6%; background: #ff4d8d; border-radius: 50%; animation-delay: 1.2s; }
.confetti i:nth-child(8) { left: 88%; top: -16%; background: #ffe566; animation-delay: .5s; }
.confetti i:nth-child(9) { left: 12%; top: -30%; background: #5ad2ff; animation-delay: 2s; }
.confetti i:nth-child(10) { left: 34%; top: -28%; background: #ff6b9d; animation-delay: 2.4s; }
.confetti i:nth-child(11) { left: 48%; top: -24%; background: #fff; animation-delay: 1.8s; }
.confetti i:nth-child(12) { left: 62%; top: -32%; background: #5ef0c0; animation-delay: .9s; }
.confetti i:nth-child(13) { left: 72%; top: -14%; background: #ffe566; animation-delay: 2.8s; }
.confetti i:nth-child(14) { left: 82%; top: -26%; background: #ff4d8d; animation-delay: 1.4s; }
.confetti i:nth-child(15) { left: 94%; top: -10%; background: #5ad2ff; animation-delay: 3s; }
.confetti i:nth-child(16) { left: 4%; top: -22%; background: #c77dff; animation-delay: 2.2s; }
@keyframes confetti-fall {
  0% { transform: translateY(0) rotate(0deg); }
  100% { transform: translateY(110vh) rotate(280deg); }
}
.lab-app {
  height: 100dvh;
  max-height: 100dvh;
  min-height: 0;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}
.lab-app [hidden] { display: none !important; }
.lab-bar, .lab-dock, .studio-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
}
.lab-bar, .lab-dock, .studio-top {
  background: linear-gradient(90deg, rgba(255,77,141,.92), rgba(90, 40, 180, .88) 55%, rgba(40, 150, 220, .9));
  backdrop-filter: blur(12px);
  border-bottom: 0;
}
.lab-dock { border-bottom: 0; border-top: 0; background: linear-gradient(90deg, rgba(40, 150, 220, .92), rgba(255,77,141,.9)); }
.lab-steps { display: flex; gap: 14px; color: var(--muted); font-size: .92rem; font-weight: 800; }
.lab-steps .on { color: var(--gold); font-weight: 800; text-shadow: 0 1px 0 #3b0d4a; }
.cart-pill {
  border: 0;
  border-radius: 999px;
  padding: 8px 14px;
  white-space: nowrap;
  background: #fff;
  color: #5b1d8a;
  font-weight: 800;
}
.screen {
  padding: 22px 20px 12px;
  min-height: 0;
  height: 100%;
  overflow-x: hidden;
  overflow-y: scroll;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  scrollbar-width: auto;
  scrollbar-color: var(--gold) rgba(255, 255, 255, .12);
}
.kiosk-body .screen::-webkit-scrollbar { width: 16px; }
.kiosk-body .screen::-webkit-scrollbar-track { background: rgba(255,255,255,.18); border-radius: 99px; }
.kiosk-body .screen::-webkit-scrollbar-thumb {
  background: var(--gold);
  border-radius: 99px;
  border: 3px solid #5b1d8a;
}
.screen-hello {
  text-align: center;
  font-family: var(--font-serif);
  font-size: clamp(1.4rem, 3vw, 2rem);
  margin: 8px auto 0;
}
.gallery-tools {
  position: sticky;
  top: -22px;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin: -22px -8px 16px;
  padding: 18px 8px 12px;
  background: linear-gradient(180deg, rgba(91, 29, 138, .92) 70%, rgba(91, 29, 138, 0));
}
.mini-shots {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 8px auto 4px;
}
.mini-shots img {
  width: 72px;
  height: 54px;
  object-fit: cover;
  border: 4px solid #fff;
  border-bottom-width: 14px;
  border-radius: 3px;
  box-shadow: 0 6px 0 rgba(0,0,0,.18);
  transform: rotate(-6deg);
}
.mini-shots img:nth-child(2) { transform: rotate(4deg); }
.mini-shots img:nth-child(3) { transform: rotate(-3deg); }
.mini-shots img:nth-child(4) { transform: rotate(7deg); }
.source-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 16px;
  max-width: 1100px;
  margin: 24px auto;
}
.source-grid.is-files-only {
  grid-template-columns: 1fr;
  max-width: 520px;
}
.source-tile {
  min-height: 260px;
  border: 0;
  border-radius: 28px;
  padding: 24px;
  display: grid;
  justify-items: center;
  align-content: center;
  text-align: center;
  gap: 8px;
  background: #fff;
  color: #43186f;
  cursor: pointer;
  position: relative;
  box-shadow: 0 10px 0 rgba(0,0,0,.15);
}
.source-tile:active { transform: translateY(4px); box-shadow: 0 6px 0 rgba(0,0,0,.12); }
.tile-art { width: 88px; height: 88px; }
.source-main { background: linear-gradient(180deg, #ffe566, #ffb703); color: #3b0d4a; }
.tile-usb { background: linear-gradient(180deg, #7af0ff, #5ad2ff); }
.tile-folder { background: linear-gradient(180deg, #ff9ec4, #ff6b9d); color: #3b0d4a; }
.source-tile strong { font-size: 1.5rem; font-family: var(--font-serif); }
.source-tile span { color: inherit; opacity: .85; font-weight: 700; }
label.source-tile,
label.btn {
  position: relative;
  overflow: hidden;
}
label.source-tile .file-input,
label.btn .file-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  opacity: 0;
  cursor: pointer;
  font-size: 0;
  clip: auto;
  overflow: hidden;
  z-index: 2;
}
.progress { height: 8px; background: rgba(255,255,255,.1); border-radius: 99px; overflow: hidden; max-width: 1100px; margin: 0 auto; }
.progress i { display: block; height: 100%; width: 0; background: var(--gold); }
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
  padding-bottom: 24px;
}
.photo-card {
  background: #fff;
  color: #43186f;
  border: 0;
  border-radius: 8px 8px 18px 18px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  box-shadow: 0 10px 0 rgba(67, 24, 111, .2);
  padding-bottom: 6px;
}
.photo-card img { width: 100%; height: 150px; object-fit: cover; background: #ffd6ea; }
.photo-card .meta { padding: 10px 12px 12px; }
.photo-card .qty { color: #e11d74; font-weight: 800; }
.photo-card .name { font-size: .82rem; color: #6b3a8c; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 700; }
.card-tools { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; }
.card-tools button {
  min-width: 36px; min-height: 36px; border-radius: 10px; border: 0;
  background: #ffe4f4; color: #43186f; cursor: pointer; font-size: .78rem; padding: 0 8px; font-weight: 800;
}
.search-photos {
  min-width: 180px; margin-left: auto;
}
.id-guide {
  position: absolute; inset: 12% 22%;
  border: 2px dashed rgba(243,193,92,.85);
  border-radius: 50% 50% 42% 42%;
  pointer-events: none; z-index: 3;
  box-shadow: 0 0 0 999px rgba(0,0,0,.28);
}
.btn.on { border-color: var(--gold); background: rgba(243,193,92,.16); }
.filters .search { display: flex; gap: 8px; flex: 1; min-width: 240px; }
@media print {
  .studio-top, .order-actions, .btn { display: none !important; }
  body { background: #fff; color: #111; }
}
.checkout-layout {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 22px;
  max-width: 1100px;
  margin: 0 auto;
}
.checkout-form, .summary, .auth-card, .sheet-card {
  background: #fff7ee;
  color: #43186f;
  border: 0;
  border-radius: 28px;
  padding: 24px;
  box-shadow: 0 12px 0 rgba(67, 24, 111, .18);
}
.checkout-form .lede, .summary .lede, .auth-card .lede, .pin-form .lede, .sheet-card .lede,
.auth-card .fine, .pin-form .fine, .checkout-form .fine,
.checkout-form .muted {
  color: #6b3a8c;
}
.checkout-form .btn-ghost,
.form-wide .btn-ghost,
.printer-picker .btn-ghost {
  background: #fff;
  color: #43186f;
  border: 2px solid #ff4d8d;
  font-weight: 800;
}
.checkout-form .printer-results {
  background: #ffe8f3;
  border: 2px solid #ffb4d4;
}
.checkout-form .orders th,
.checkout-form .orders td {
  color: #43186f;
  border-bottom-color: #ffd0e4;
}
.checkout-form .kicker, .auth-card .kicker, .finish-copy .kicker { color: #e11d74; }
.summary li { border-bottom: 1px solid #ffd0e4; }
.auth {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 32px 16px;
}
form.form, .checkout-form { display: grid; gap: 12px; }
label { display: grid; gap: 6px; font-size: .92rem; }
input, select, textarea {
  background: #fff;
  color: #43186f;
  border: 2px solid #ffb4d4;
  border-radius: 14px;
  padding: 12px 14px;
}
.radio { display: flex; gap: 8px; align-items: center; }
.skip-box {
  background: #ffe566;
  color: #3b0d4a;
  border-radius: 18px;
  padding: 14px 16px;
  font-weight: 800;
  font-size: 1.05rem;
}
.skip-note { text-align: left; margin: 0 0 8px; color: #6b3a8c; }
.checkout-form[data-skip="1"] [data-customer-fields] { display: none; }
.summary ul { list-style: none; padding: 0; margin: 0 0 12px; }
.summary li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,.06); }
.dock-total { font-size: 1.05rem; }

.editor {
  width: 100vw;
  height: 100dvh;
  max-width: 100vw;
  max-height: 100dvh;
  margin: 0;
  border: 0;
  border-radius: 0;
  padding: 0;
  overflow: hidden;
  background: #2b1248;
  color: var(--ink);
}
.editor::backdrop { background: rgba(43, 18, 72, .72); }
.editor[open] {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 280px);
  grid-template-rows: minmax(0, 1fr);
  height: 100dvh;
  max-height: 100dvh;
}
.editor-stage {
  background:
    radial-gradient(circle at 20% 20%, rgba(255,107,157,.25), transparent 40%),
    #1a0a36;
  min-height: 0;
  height: 100%;
  max-height: 100%;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) auto;
  padding: 8px 48px 4px;
  position: relative;
}
.editor-stage > .crop-viewport {
  grid-row: 1;
  grid-column: 1;
  min-height: 0;
  min-width: 0;
  height: 100%;
  max-height: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.editor-stage > .crop-viewport > .crop-wrap {
  max-width: 100%;
  max-height: 100%;
  min-height: 0;
}
.editor-stage > .crop-rotate-bar {
  grid-row: 2;
  grid-column: 1;
}
.crop-wrap { position: relative; display: block; overflow: hidden; max-width: 100%; background: #2b1248; }
.crop-spin { position: relative; transform-origin: center center; max-height: 100%; }
.crop-wrap img, .crop-spin img { max-height: min(100%, calc(100dvh - 200px)); max-width: min(58vw, 1100px); width: auto; height: auto; display: block; }
.crop-wrap:not(.is-fit) img,
.crop-wrap:not(.is-fit) .crop-spin img {
  max-height: none;
  max-width: none;
}
.crop-wrap.is-fit {
  background: #fff;
  box-shadow: 0 10px 0 #c97a00, 0 0 0 3px rgba(255,255,255,.35);
  overflow: hidden;
}
.crop-wrap.is-fit img,
.crop-wrap.is-fit .crop-spin img {
  max-height: none;
  max-width: none;
  display: block;
}
.paper-label {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 4;
  margin: 0;
  background: rgba(43, 18, 72, .88);
  color: #ffe566;
  font-weight: 800;
  font-size: .75rem;
  border-radius: 999px;
  padding: 4px 10px;
  pointer-events: none;
}
.fit-hint {
  margin: 8px 0 0;
  font-weight: 800;
  color: #e11d48;
  line-height: 1.35;
}
.editor-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 48px; height: 72px; border: 0; border-radius: 16px;
  background: rgba(243,193,92,.9); color: #1b1014; font-size: 2.2rem; cursor: pointer; z-index: 5;
  grid-row: 1 / -1;
  grid-column: 1;
}
.editor-prev { left: 6px; justify-self: start; }
.editor-next { right: 6px; left: auto; justify-self: end; }
.crop-rotate-bar {
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: center;
  padding: 6px; width: 100%;
}
.crop-rotate-bar .btn { min-width: 72px; min-height: 44px; font-size: .95rem; }
.straighten { display: flex; gap: 8px; align-items: center; color: #f7efe4; }
.straighten input { width: 180px; }
.caption-preview {
  position: absolute; left: 0; right: 0; bottom: 8px; z-index: 4;
  text-align: center; color: #fff; font-weight: 700;
  text-shadow: 0 1px 4px #000; pointer-events: none; font-size: 1.1rem;
}
.osk {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  background: linear-gradient(180deg, #5b1d8a, #2b1248); border-top: 4px solid #ffe566; padding: 8px;
}
.osk-row { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.osk-row button, .osk-tools button {
  min-width: 42px; min-height: 46px; border-radius: 10px;
  border: 0; background: #fff; color: #43186f; font-size: 1.05rem; font-weight: 800;
}
.osk-tools { display: flex; gap: 8px; justify-content: center; margin-top: 8px; }
.photo-card .pick {
  position: absolute; top: 8px; left: 8px; width: 28px; height: 28px;
}
.crop-wrap, .crop-spin, .crop-spin img, .crop-box {
  -webkit-user-drag: none;
  user-select: none;
  -webkit-user-select: none;
}
.crop-wrap {
  touch-action: none;
}
.crop-box {
  position: absolute;
  z-index: 3;
  border: 3px solid #f3c15c;
  box-shadow: 0 0 0 999px rgba(0,0,0,.45);
  pointer-events: auto;
  cursor: move;
  touch-action: none;
}
.crop-box i {
  position: absolute;
  width: 22px;
  height: 22px;
  background: #f3c15c;
  border-radius: 4px;
}
.crop-box i[data-handle="nw"] { left: -11px; top: -11px; cursor: nwse-resize; }
.crop-box i[data-handle="ne"] { right: -11px; top: -11px; cursor: nesw-resize; }
.crop-box i[data-handle="sw"] { left: -11px; bottom: -11px; cursor: nesw-resize; }
.crop-box i[data-handle="se"] { right: -11px; bottom: -11px; cursor: nwse-resize; }
.source-tile { appearance: none; width: 100%; }
.editor-side {
  padding: 0;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  height: 100%;
  max-height: 100dvh;
  overflow: hidden;
  background: #fff7ee;
  color: #43186f;
}
.editor-done-bar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  background: #2b1248;
  color: #fff7ee;
  z-index: 4;
}
.editor-done-bar h2 { margin: 0; font-size: 1rem; }
.editor-done-bar .btn {
  min-height: 48px;
  min-width: 110px;
  font-size: 1.05rem;
  background: #ffe566;
  color: #3b0d4a;
}
.editor-side-body {
  flex: 1;
  min-height: 0;
  min-width: 0;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 10px 12px 12px;
  display: grid;
  gap: 6px;
  align-content: start;
}
.editor-side-actions {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 8px 12px 12px;
  background: #fff7ee;
  border-top: 1px solid rgba(67, 24, 111, .12);
}
.editor-side-actions .btn {
  min-height: 44px;
  min-width: 0;
  font-size: .9rem;
  padding: 8px 10px;
}
.tone-sliders {
  display: grid;
  gap: 2px;
}
.tone-sliders label {
  display: grid;
  grid-template-columns: 88px 1fr 28px;
  gap: 6px;
  align-items: center;
  font-size: .82rem;
  margin: 0;
}
.tone-sliders input[type="range"] {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.filter-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}
.filter-tile {
  aspect-ratio: 1;
  border-radius: 10px;
  padding: 4px;
  font-size: .68rem;
  font-weight: 800;
  line-height: 1.1;
  text-align: center;
  display: grid;
  place-items: center;
  border: 2px solid #ffb4d4;
  background: #fff;
  color: #43186f;
  cursor: pointer;
}
.filter-tile.on { border-color: #ff4d8d; background: #ffe566; }
.filter-none { background: #fff; }
.filter-vivid { background: linear-gradient(#ffe566, #ff6b9d); color: #43186f; }
.filter-bw { background: #cfcfcf; color: #222; }
.filter-sepia { background: #e8c38b; color: #5a3a12; }
.seg { display: grid; gap: 8px; }
.seg button {
  background: #fff;
  border: 2px solid #ffb4d4;
  border-radius: 14px;
  padding: 10px;
  text-align: left;
  cursor: pointer;
  color: #43186f;
  font-weight: 800;
  min-width: 0;
  overflow-wrap: anywhere;
}
.seg button.on { border-color: #ff4d8d; background: #ffe566; }
.qty-row { display: grid; gap: 8px; }
.qty-line { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.stepper { display: flex; align-items: center; gap: 8px; }
.stepper button {
  width: 44px; height: 44px; border-radius: 12px;
  border: 0; background: #ffe4f4; color: #43186f; cursor: pointer; font-weight: 800;
}
.row-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.pin-dialog { border: 0; border-radius: 28px; background: #fff7ee; color: #43186f; padding: 0; }
.pin-form { padding: 24px; display: grid; gap: 12px; min-width: 280px; }
.thanks-banner { width: min(280px, 80%); height: 120px; object-fit: cover; border-radius: 18px; margin: 8px auto 16px; box-shadow: 0 8px 0 #ff6b9d; }
.photo-card.selected { outline: 4px solid #ff4d8d; outline-offset: 2px; }
.form-wide { width: min(640px, 100%); }
.auth-card { width: min(460px, 100%); }
.thanks-card { text-align: center; }
.thanks-card img { margin: 0 auto 12px; }
.finish-copy { text-align: center; max-width: 720px; margin: 0 auto 24px; }
.finish-copy h1 { font-size: clamp(2rem, 5vw, 3.4rem); margin: 8px 0; }
.finish-grid { max-width: 980px; margin: 0 auto; }
.route-name {
  display: grid;
  gap: 8px;
  width: min(420px, calc(100% - 32px));
  margin: 22px auto 0;
  color: var(--ink);
  font-weight: 800;
}
.print-form { min-width: min(520px, 92vw); max-width: 640px; }
.print-form h3 { margin: 8px 0 4px; font-size: 1rem; color: #e11d74; }
.printer-list, .size-list { display: grid; gap: 8px; max-height: 28vh; overflow: auto; }
.printer-list button, .size-list button { width: 100%; text-align: left; justify-content: flex-start; }
.lab-app.is-finish .lab-dock { display: none; }

.studio-top { position: sticky; top: 0; z-index: 5; }
.studio-nav { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.studio-nav a { color: var(--muted); text-decoration: none; padding: 8px 10px; }
.studio-nav a.on { color: var(--gold-2); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 18px 0; }
.stat { background: #fff7ee; color: #43186f; border: 0; border-radius: 18px; padding: 16px; box-shadow: 0 8px 0 rgba(67,24,111,.18); }
.stat b { display: block; font-size: 1.6rem; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.chip { border: 2px solid rgba(255,255,255,.5); border-radius: 999px; padding: 8px 14px; text-decoration: none; color: inherit; font-weight: 800; }
.chip.on { background: var(--gold); color: #3b0d4a; border-color: transparent; }
.table-wrap { overflow: auto; }
.orders { width: 100%; border-collapse: collapse; }
.orders th, .orders td { text-align: left; padding: 12px 10px; border-bottom: 1px solid rgba(255,255,255,.08); vertical-align: top; }
.badge { display: inline-block; border-radius: 999px; padding: 4px 10px; font-size: .82rem; }
.badge-new { background: rgba(245,176,65,.25); }
.badge-printing { background: rgba(243,193,92,.25); }
.badge-ready { background: rgba(125,206,160,.25); }
.badge-delivered { background: rgba(255,255,255,.1); }
.badge-cancelled { background: rgba(231,76,60,.22); }
.order-head, .toolbar, .meta-grid { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.print-now-form { display: grid; gap: 12px; width: min(100%, 520px); background: rgba(255,255,255,.1); border-radius: 20px; padding: 16px; }
.print-now-form h3 { margin: 0; }
.printer-picker { display: grid; gap: 10px; }
.printer-results { display: grid; gap: 6px; max-height: 240px; overflow: auto; padding: 8px; background: rgba(255,255,255,.12); border-radius: 16px; }
.printer-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  width: 100%;
  text-align: left;
  border: 2px solid transparent;
  background: #fff7ee;
  color: #43186f;
  border-radius: 12px;
  padding: 10px 12px;
  cursor: pointer;
  font-weight: 800;
}
.printer-item em { font-style: normal; font-size: .75rem; font-weight: 700; color: #9b6ab0; }
.printer-item.on { border-color: #ff4d8d; background: #ffe566; }
.net-row { display: flex; gap: 8px; }
.net-row input { flex: 1; }
.path-row { display: flex; gap: 8px; align-items: stretch; }
.path-row input { flex: 1; }
.path-row .btn { flex: 0 0 auto; white-space: nowrap; }
.size-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.size-chip {
  border: 2px solid #ffb4d4;
  background: #fff;
  color: #43186f;
  border-radius: 12px;
  padding: 10px 14px;
  font-weight: 800;
  cursor: pointer;
}
.size-chip.on { border-color: #ff4d8d; background: #ffe566; }
.size-map select { min-width: 220px; }
.meta-grid { display: grid; grid-template-columns: repeat(4, 1fr); margin: 16px 0; }
.meta-grid span { display: block; color: var(--muted); font-size: .8rem; }
.job-list { display: grid; gap: 12px; margin-top: 20px; }
.job-card { display: grid; grid-template-columns: 140px 1fr; gap: 14px; background: #fff7ee; color: #43186f; border: 0; border-radius: 18px; padding: 12px; box-shadow: 0 8px 0 rgba(67,24,111,.18); }
.job-thumb img { width: 140px; height: 100px; object-fit: cover; border-radius: 12px; }
.note { background: rgba(243,193,92,.1); padding: 10px 14px; border-radius: 12px; }
.price-form input[type=text] { width: 100px; }
.ticket { background: #fff; color: #111; min-height: 100vh; padding: 24px; max-width: 380px; margin: 0 auto; font-family: Georgia, serif; }
.ticket ul { padding-left: 18px; }
.ticket .total { font-size: 1.3rem; font-weight: 700; }
.license-input { letter-spacing: .12em; text-transform: uppercase; font-size: 1.15rem; text-align: center; }
.license-key { font-family: ui-monospace, Menlo, Consolas, monospace; letter-spacing: .04em; font-size: .92rem; }
.issued-box {
  background: #fff7ee;
  color: #43186f;
  border-radius: 22px;
  padding: 18px;
  margin: 0 0 18px;
  display: grid;
  gap: 8px;
  box-shadow: 0 8px 0 rgba(67,24,111,.18);
}
.issued-box .license-key { font-size: 1.05rem; }
.activate-card { width: min(520px, 100%); }
.dl-page {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 32px 16px;
}
.dl-card {
  width: min(560px, 100%);
  background: #fff7ee;
  color: #43186f;
  border-radius: 28px;
  padding: 32px 28px;
  text-align: center;
  box-shadow: 0 12px 0 rgba(67, 24, 111, .18);
}
.dl-card img { margin: 0 auto 12px; border-radius: 16px; }
.dl-card .lede, .dl-card .fine { color: #6b3a8c; }
.dl-card .btn { width: 100%; margin: 18px 0 8px; }
.dl-card h2.dl-os {
  margin: 28px 0 0;
  font-size: 1.15rem;
  color: #43186f;
}
.dl-card .btn-ghost { margin-top: 0; color: #43186f; border-color: #d4b4e8; }
.dl-changes {
  text-align: left;
  background: #efe6fb;
  border-radius: 18px;
  padding: 14px 16px;
  margin: 12px 0 4px;
}
.dl-changes .kicker { margin-bottom: 6px; }
.dl-changes ul { margin: 0; padding-left: 20px; color: #43186f; line-height: 1.45; }
.dl-changes li { margin: 6px 0; }
.dl-steps {
  text-align: left;
  color: #43186f;
  line-height: 1.45;
  padding-left: 22px;
  margin: 22px 0 12px;
}
.dl-steps li { margin: 8px 0; }
.dl-warn {
  text-align: left;
  background: #fff3d6;
  border: 2px solid #ffb703;
  border-radius: 18px;
  padding: 14px 16px;
  margin: 8px 0 16px;
}
.dl-warn .kicker { margin-bottom: 8px; }
.dl-warn ol { margin: 0 0 8px; padding-left: 22px; line-height: 1.45; }
.dl-warn p { margin: 0; color: #6b3a8c; font-size: .92rem; }
.form-error { color: #c0124a; }
.hint { text-align: center; color: var(--muted); }
.empty { text-align: center; color: var(--muted); padding: 40px; }
.cal-templates {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  max-width: 1080px;
  margin: 0 auto;
}
.cal-template {
  appearance: none;
  border: 0;
  border-radius: 28px;
  background: #fff7ee;
  color: #43186f;
  padding: 18px 16px 20px;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 12px 0 rgba(67, 24, 111, .18);
}
.cal-template:active { transform: translateY(4px); box-shadow: 0 8px 0 rgba(67, 24, 111, .18); }
.cal-template strong { display: block; font-family: var(--font-serif); font-size: 1.25rem; margin: 12px 0 6px; }
.cal-template span { color: #6b3a8c; font-weight: 700; line-height: 1.35; }
.cal-mock {
  height: 160px;
  border-radius: 18px;
  overflow: hidden;
  display: grid;
  background: #ffe8c8;
}
.cal-mock-wall { grid-template-rows: 1fr 1.1fr; }
.cal-mock-months, .cal-mock-classic { grid-template-rows: 1.3fr .8fr; }
.mock-photo, .mock-frame, .mock-grid, .mock-month { display: block; }
.mock-photo { background: linear-gradient(135deg, #ffb4d4, #ffd43b); }
.mock-frame { margin: 10px 18px 0; border: 6px solid #c99430; background: linear-gradient(135deg, #5ad2ff, #ff6b9d); }
.mock-grid {
  background:
    linear-gradient(#fff7ee 0 0) 0 0 / 33.3% 25%,
    repeating-linear-gradient(90deg, #ffd6ea 0 1px, transparent 1px 33%),
    repeating-linear-gradient(#ffd6ea 0 1px, #fff7ee 1px 25%);
}
.mock-month {
  background:
    repeating-linear-gradient(90deg, #ffd6ea 0 1px, transparent 1px 14.2%),
    repeating-linear-gradient(#ffd6ea 0 1px, #fff7ee 1px 18%);
}
.lab-app.is-calendar .photo-card .card-tools { display: none; }
.lab-app.is-calendar [data-place-calendar] { min-height: 52px; font-weight: 800; }

.screen[data-screen="cal-place"] {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  touch-action: none;
  overscroll-behavior: none;
}
.cal-place-stage {
  flex: 1;
  min-height: 0;
  display: grid;
  place-items: center;
  padding: 4px 0 8px;
}
.cal-page {
  width: min(420px, 48vh * 210 / 297);
  aspect-ratio: 210 / 297;
  max-height: 62vh;
  background: #fff7ee;
  color: #43186f;
  border-radius: 10px;
  overflow: hidden;
  display: grid;
  box-shadow: 0 14px 0 rgba(67, 24, 111, .22);
}
.cal-page[data-style="wall"] { grid-template-rows: 22% 1fr; }
.cal-page[data-style="months"] { grid-template-rows: 1.05fr 1fr; }
.cal-page[data-style="classic"] {
  grid-template-rows: auto 1.05fr 1fr;
  background: #2b1248;
  padding: 8px;
}
.cal-head { display: none; }
.cal-head:empty { display: none; }
.cal-page[data-style="classic"] .cal-head {
  display: grid;
  justify-items: center;
  gap: 2px;
  color: #c99430;
  padding: 4px 8px 6px;
  font-family: var(--font-serif);
}
.cal-page[data-style="classic"] .cal-head em { font-style: normal; font-size: .78rem; letter-spacing: .12em; }
.cal-page[data-style="classic"] .cal-head strong { color: #fff7ee; font-size: 1.05rem; }
.cal-place-stage, .cal-page, .cal-slot, .cal-slot-move { touch-action: none; }
.cal-slot {
  position: relative;
  overflow: hidden;
  background: #1a0a36;
  touch-action: none;
  cursor: grab;
  user-select: none;
}
.cal-slot.is-panning { cursor: grabbing; }
.cal-page[data-style="classic"] .cal-slot {
  margin: 4px 10px 8px;
  border: 7px solid #c99430;
  border-radius: 2px;
}
.cal-slot-move {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  cursor: grab;
  touch-action: none;
}
.cal-slot img,
.cal-slot-move img {
  width: 100%;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
  max-width: none !important;
  max-height: none;
  user-select: none;
  -webkit-user-drag: none;
}
.cal-slot-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: #43186f;
  color: #fff;
  text-align: center;
  font-family: var(--font-serif);
  padding: 6px 8px;
  font-size: .9rem;
  pointer-events: none;
}
.lab-app.is-docs .card-tools,
.lab-app.is-docs .quick-size,
.lab-app.is-docs [data-all-plus],
.lab-app.is-docs [data-all-zero],
.lab-app.is-docs [data-id-set],
.lab-app.is-docs [data-selected-plus] { display: none; }

.screen[data-screen="id-place"] {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  touch-action: none;
}
.id-place-stage {
  flex: 1;
  min-height: 0;
  display: grid;
  place-items: center;
  padding: 4px 8px;
}
.id-place-wrap {
  position: relative;
  display: block;
  overflow: hidden;
  max-width: 100%;
  touch-action: none;
  cursor: crosshair;
  user-select: none;
}
.id-place-wrap.is-adjust { cursor: grab; }
.id-place-wrap.is-panning { cursor: grabbing; }
.id-place-wrap img {
  display: block;
  max-height: min(62vh, calc(100dvh - 220px));
  max-width: min(92vw, 720px);
  width: auto;
  height: auto;
  pointer-events: none;
  -webkit-user-drag: none;
}
.id-mark {
  position: absolute;
  width: 26px;
  height: 26px;
  margin: -13px 0 0 -13px;
  border-radius: 50%;
  border: 3px solid #ffe566;
  background: #ff6b9d;
  box-shadow: 0 0 0 3px rgba(43, 18, 72, .45);
  pointer-events: none;
  z-index: 4;
}
.id-mark.bot { background: #5ad2ff; }
.id-frame {
  position: absolute;
  border: 4px solid #ffe566;
  box-shadow: 0 0 0 9999px rgba(16, 6, 36, .48);
  pointer-events: none;
  z-index: 3;
  box-sizing: border-box;
}
.cal-chrome {
  min-height: 0;
  overflow: hidden;
  background: #fff7ee;
  padding: 8px;
}
.cal-page[data-style="classic"] .cal-chrome { border-radius: 6px; }
.cal-year-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(4, 1fr);
  gap: 5px;
  height: 100%;
}
.cal-mini {
  background: #fff;
  border: 1px solid #c99430;
  border-radius: 4px;
  padding: 3px;
  font-size: 6px;
  overflow: hidden;
}
.cal-mini b { display: block; text-align: center; font-size: 7px; color: #43186f; }
.cal-weekdays, .cal-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
}
.cal-weekdays span { color: #9b6ab0; font-weight: 800; }
.cal-days span.sun { color: #e11d74; font-weight: 800; }
.cal-month-block { height: 100%; display: grid; grid-template-rows: auto 1fr; min-height: 0; }
.cal-month-block h3 {
  margin: 0 0 6px;
  font-family: var(--font-serif);
  font-size: 1.1rem;
}
.cal-month-block .cal-mini {
  height: 100%;
  font-size: 11px;
  border-width: 0;
  padding: 0;
}
.cal-month-block .cal-weekdays, .cal-month-block .cal-days { gap: 2px; }
.zoom-bar { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin: 8px 0 4px; }
.screen[data-screen="id-place"] .zoom-bar {
  flex: 0 0 auto;
  margin: 4px 0 0;
}
.screen[data-screen="id-place"] .zoom-bar .btn {
  min-height: 44px;
  padding: 8px 14px;
  font-size: .92rem;
}

@media (max-width: 900px) {
  .polaroid { width: 120px; }
  .polaroid img { height: 84px; }
  .source-grid, .product-grid, .flag-grid, .checkout-layout, .stats, .meta-grid, .job-card, .cal-templates { grid-template-columns: 1fr; }
  .editor[open] {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) minmax(160px, 36dvh);
  }
  .editor-stage { padding: 6px 40px 4px; }
  .crop-wrap img, .crop-spin img { max-width: min(92vw, 1100px); max-height: min(100%, calc(64dvh - 80px)); }
  .lab-steps { display: none; }
}
@media (max-width: 640px) {
  .polaroid-wall, .confetti { display: none; }
  .source-grid, .product-grid, .flag-grid, .checkout-layout, .stats, .meta-grid, .job-card, .cal-templates { grid-template-columns: 1fr; }
  .lab-steps { display: none; }
  .kiosk-body { overflow: hidden; height: 100dvh; }
  .mini-shots img:nth-child(n+3) { display: none; }
}
@media print {
  body { background: #fff; color: #000; }
  .studio-top, .toolbar, .btn { display: none !important; }
}
