/*
 * Framkalla — application styles on top of scandi.css.
 * Uses the zinc tokens from scandi.css; adds layout and the photo-specific components.
 */

:root {
  --trim: rgba(128, 128, 128, .85);   /* 50% gray over everything that is trimmed off a print */
  --page-max: 1240px;
  --topbar-h: 60px;
  --accent: var(--zn-900);
  --ok: #15803d;
  --ok-bg: #f0fdf4;
}

html { -webkit-text-size-adjust: 100%; }
body { font-size: 14px; line-height: 1.55; background: var(--background); }
h1, h2, h3, h4 { font-family: var(--font-sans); color: var(--foreground); letter-spacing: -0.02em; margin: 0; }
h1 { font-size: 28px; font-weight: 650; }
h2 { font-size: 20px; font-weight: 600; }
h3 { font-size: 16px; font-weight: 600; }
p { margin: 0 0 12px; }
a { text-decoration: none; }
a:hover, a:focus { text-decoration: none; }
[hidden] { display: none !important; }
.muted { color: var(--muted-fg); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.nowrap { white-space: nowrap; }
.tnum { font-variant-numeric: tabular-nums; }
.icon { flex-shrink: 0; vertical-align: -3px; }
.btn .icon { vertical-align: 0; }
.mt-0 { margin-top: 0 !important; }
.mb-0 { margin-bottom: 0 !important; }
.gap-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------------------------------------------------------- top bar */
.topbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.86);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  max-width: var(--page-max); margin: 0 auto; height: var(--topbar-h);
  display: flex; align-items: center; gap: 32px; padding: 0 24px;
}
.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 700; font-size: 17px;
         letter-spacing: -0.02em; color: var(--foreground); }
.brand:hover { color: var(--foreground); }
/* next.framkalla.store (FRAMKALLA_SITE_LABEL): so nobody takes them for the real site */
.site-label { margin-left: 8px; padding: 2px 7px; border-radius: 999px; background: #c2410c; color: #fff;
              font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.brand .icon { stroke-width: 1.6; }
/* The Framkalla logo (static/logo.svg) laid out side by side: the symbol, then the wordmark. */
.brand { gap: 10px; color: #16130f; }
.brand:hover { color: #16130f; }
.brand .logo-mark { width: 30px; height: 30px; display: block; }
.brand .logo-word { height: 13px; width: auto; display: block; }
.brand span { display: block; }
.topnav { display: flex; gap: 4px; }
.topnav a {
  color: var(--muted-fg); font-weight: 500; padding: 7px 12px; border-radius: var(--radius);
  transition: color .15s, background-color .15s;
}
.topnav a:hover { color: var(--foreground); background: var(--zn-100); }
.topnav a.active { color: var(--foreground); background: var(--zn-100); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.cart-button {
  display: inline-flex; align-items: center; gap: 7px; color: var(--foreground); font-weight: 500;
  padding: 7px 12px; border-radius: 999px; border: 1px solid var(--border); transition: background-color .15s;
}
.cart-button:hover, .cart-button.active { background: var(--zn-100); color: var(--foreground); }
.cart-button .count {
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--zn-900); color: #fff;
  font-size: 11px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center;
}
.cart-button .count.bump { animation: bump .4s ease; }
@keyframes bump { 40% { transform: scale(1.35); } }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--zn-900); color: #fff;
  font-weight: 600; font-size: 13px; cursor: pointer;
}
.avatar.avatar-logo { width: auto; max-width: 140px; padding: 4px 10px; border-radius: 17px; background: #fff;
                      border: 1px solid var(--border); display: flex; align-items: center; }
.avatar-logo img { max-height: 24px; max-width: 118px; display: block; }
.site-lab .avatar.avatar-logo { background: #fff; }
.usermenu .dropdown-menu { margin-top: 8px; min-width: 220px; }
.usermenu .dropdown-menu .icon { margin-right: 6px; color: var(--muted-fg); }
.dropdown-button {
  display: block; width: 100%; text-align: left; border: 0; background: none; padding: 7px 12px;
  border-radius: var(--radius-sm); color: var(--foreground); font-size: 14px;
}
.dropdown-button:hover { background: var(--zn-100); }

/* ---------------------------------------------------------- page scaffolding */
.page { max-width: var(--page-max); margin: 0 auto; padding: 36px 24px 120px; }
.page-narrow { max-width: 760px; margin: 0 auto; padding: 48px 24px 120px; }
.page-header { display: flex; align-items: flex-end; gap: 16px; margin: 0 0 28px; padding: 0; border: 0; flex-wrap: wrap; }
.page-header .subtitle { color: var(--muted-fg); margin: 6px 0 0; font-size: 15px; }
.lab-for { margin: -12px 0 24px; }
.lab-for-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.lab-for-label { margin: 0; font-weight: 500; color: var(--muted-fg); }
.lab-for select { width: auto; min-width: 220px; }
.lab-for p { margin: 6px 0 0; }
.page-header .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--muted-fg); font-weight: 500;
             margin-bottom: 14px; }
.back-link:hover { color: var(--foreground); }
.section { margin-top: 40px; }
.section-title { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.section-title h2 { font-size: 17px; }
.section-title .hint { color: var(--muted-fg); font-size: 13px; }

.card {
  background: var(--background); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: var(--shadow-sm);
}
.card-body { padding: 22px 24px; }
.card-header { padding: 16px 24px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 10px; }
.card-header h3 { font-size: 15px; }
.card-footer { padding: 14px 24px; border-top: 1px solid var(--border); background: var(--zn-50);
               border-radius: 0 0 12px 12px; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.layout-aside { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 32px; align-items: start; }
.sticky-aside { position: sticky; top: calc(var(--topbar-h) + 24px); }

.empty {
  text-align: center; padding: 72px 24px; border: 1px dashed var(--zn-300); border-radius: 16px;
  background: var(--zn-50);
}
.empty .empty-icon {
  width: 56px; height: 56px; border-radius: 16px; background: var(--background); border: 1px solid var(--border);
  display: inline-flex; align-items: center; justify-content: center; margin-bottom: 16px; box-shadow: var(--shadow-sm);
}
.empty h3 { font-size: 17px; margin-bottom: 6px; }
.empty p { color: var(--muted-fg); max-width: 420px; margin: 0 auto 20px; }

/* ---------------------------------------------------------- forms */
.form-control { height: 40px; }
.form-group label { display: block; }
.form-group .optional { color: var(--muted-fg); font-weight: 400; }
.field-error { color: var(--destructive); font-size: 12.5px; margin-top: 4px; }
.has-error .form-control { border-color: var(--destructive); }
.check-row { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; font-weight: 400; margin: 0; }
.check-row input { margin-top: 3px; }
.check-row strong { display: block; font-weight: 500; color: var(--foreground); font-size: 14px; }
.check-row span { color: var(--muted-fg); font-size: 13px; }

/* Choice cards: big radio buttons for shipping / payment */
.choice-list { display: grid; gap: 10px; }
.choice {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--border);
  border-radius: 10px; cursor: pointer; font-weight: 400; margin: 0; transition: border-color .15s, box-shadow .15s, background-color .15s;
}
.choice:hover { border-color: var(--zn-400); }
.choice.selected { border-color: var(--zn-900); box-shadow: 0 0 0 1px var(--zn-900); background: var(--zn-50); }
.choice input { margin: 0; }
.choice .choice-icon { width: 36px; height: 36px; border-radius: 8px; background: var(--zn-100);
                       display: flex; align-items: center; justify-content: center; }
.choice .choice-text { flex: 1; }
.choice .choice-text strong { display: block; font-weight: 550; }
.choice .choice-text span { color: var(--muted-fg); font-size: 13px; }
.choice .choice-price { font-weight: 600; white-space: nowrap; }

/* Chips: compact pickers for size and paper */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1px solid var(--border); background: var(--background); border-radius: 10px; padding: 8px 12px;
  cursor: pointer; font-size: 13.5px; font-weight: 500; color: var(--foreground); text-align: left;
  transition: border-color .15s, box-shadow .15s, background-color .15s; line-height: 1.3;
}
.chip small { display: block; color: var(--muted-fg); font-weight: 400; font-size: 12px; }
.chip:hover { border-color: var(--zn-400); }
.chip.selected { border-color: var(--zn-900); box-shadow: 0 0 0 1px var(--zn-900); }
.chip[disabled] { opacity: .35; cursor: not-allowed; }
.picker-label { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
                color: var(--muted-fg); margin: 18px 0 8px; }
.picker-label:first-child { margin-top: 0; }

/* Quantity stepper */
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--input-border); border-radius: 999px;
           height: 34px; background: var(--background); }
.stepper button { width: 32px; height: 32px; border: 0; background: none; border-radius: 50%; color: var(--foreground);
                  display: inline-flex; align-items: center; justify-content: center; }
.stepper button:hover { background: var(--zn-100); }
.stepper input { width: 38px; border: 0; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums;
                 background: none; -moz-appearance: textfield; padding: 0; }
.stepper input:focus { outline: none; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; }

/* ---------------------------------------------------------- toasts */
#toasts { position: fixed; top: calc(var(--topbar-h) + 14px); left: 50%; transform: translateX(-50%); z-index: 2000;
          display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast-item {
  pointer-events: auto; background: var(--zn-900); color: #fff; padding: 11px 18px; border-radius: 999px;
  box-shadow: var(--shadow-lg); font-weight: 500; max-width: min(560px, 92vw); text-align: center;
  animation: toast-in .25s ease;
}
.toast-item.toast-danger { background: #b91c1c; }
.toast-item.toast-warning { background: #92400e; }
.toast-item.leaving { opacity: 0; transform: translateY(-6px); transition: opacity .3s, transform .3s; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px); } }

/* ---------------------------------------------------------- justified photo grid */
.photo-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.photo-grid::after { content: ""; flex-grow: 999999; }
.tile {
  position: relative; flex-grow: calc(var(--ar) * 100); flex-basis: calc(var(--ar) * var(--row-h, 220px));
  border-radius: 6px; overflow: hidden; background: var(--zn-100); cursor: pointer;
  user-select: none; -webkit-user-select: none;
}
.tile::before { content: ""; display: block; padding-bottom: calc(100% / var(--ar)); }
.tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease, opacity .3s;
            opacity: 0; }
.tile img.loaded { opacity: 1; }
.tile:hover img { transform: scale(1.02); }
.tile .tile-check {
  position: absolute; top: 10px; left: 10px; width: 24px; height: 24px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.95); background: rgba(0,0,0,.18); color: transparent;
  display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity .15s, background-color .15s;
  box-shadow: 0 1px 3px rgba(0,0,0,.25);
}
.tile .tile-check .icon { stroke-width: 3; }
.tile:hover .tile-check, .selecting .tile .tile-check { opacity: 1; }
.tile .tile-shade { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(0,0,0,.28), transparent 35%);
                    opacity: 0; transition: opacity .15s; pointer-events: none; }
.tile:hover .tile-shade, .selecting .tile .tile-shade { opacity: 1; }
/* Selected: the photo stays as it is; only the tick turns gold so it stands out on any picture. */
.tile { --sel: #e0a91b; --sel-fg: #3a2a00; }
.tile .tile-check { z-index: 2; }
.tile.selected .tile-check { opacity: 1; background: var(--sel); border-color: #fff; color: var(--sel-fg);
                             box-shadow: 0 0 0 1px rgba(0,0,0,.12), 0 2px 6px rgba(0,0,0,.35); }
.tile .tile-badge { position: absolute; right: 8px; bottom: 8px; background: rgba(255,255,255,.95); color: var(--foreground);
                    border-radius: 999px; font-size: 12px; font-weight: 600; padding: 3px 9px; box-shadow: var(--shadow); }
.tile.uploading img { opacity: .45; }
.tile .tile-progress { position: absolute; left: 12px; right: 12px; bottom: 12px; height: 4px; border-radius: 4px;
                       background: rgba(255,255,255,.5); overflow: hidden; }
.tile .tile-progress i { display: block; height: 100%; width: 0; background: #fff; transition: width .2s; }

/* Floating action bar for selections */
.action-bar {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 140%); z-index: 500;
  background: var(--zn-900); color: #fff; border-radius: 999px; padding: 8px 8px 8px 20px;
  display: flex; align-items: center; gap: 6px; box-shadow: 0 20px 40px -12px rgba(0,0,0,.45);
  transition: transform .3s cubic-bezier(.2,.9,.3,1.2); white-space: nowrap;
}
.action-bar.is-open { transform: translate(-50%, 0); }
.action-bar .count { font-weight: 600; margin-right: 10px; }
.action-bar .btn { height: 38px; border-radius: 999px; box-shadow: none; }
.action-bar .btn-ab { background: transparent; border-color: transparent; color: #fff; }
.action-bar .btn-ab:hover { background: rgba(255,255,255,.12); color: #fff; }
.action-bar .btn-ab-primary { background: #fff; border-color: #fff; color: var(--zn-900); }
.action-bar .btn-ab-primary:hover { background: var(--zn-200); color: var(--zn-900); }
.action-bar .divider { width: 1px; height: 22px; background: rgba(255,255,255,.2); margin: 0 4px; }

/* Upload drop zone */
.drop-overlay {
  position: fixed; inset: 0; z-index: 3000; background: rgba(250,250,250,.92); display: none;
  align-items: center; justify-content: center; pointer-events: none;
}
.drop-overlay.is-open { display: flex; }
.drop-overlay .drop-box { border: 2px dashed var(--zn-900); border-radius: 24px; padding: 64px 96px; text-align: center; }
.drop-overlay h2 { font-size: 22px; margin-top: 12px; }

/* ---------------------------------------------------------- cart */
.cart-list { display: flex; flex-direction: column; gap: 12px; }
.cart-item {
  display: grid; grid-template-columns: 148px minmax(0, 1fr); gap: 22px; padding: 18px;
  border: 1px solid var(--border); border-radius: 14px; background: var(--background); transition: opacity .2s;
}
.cart-item.busy { opacity: .6; pointer-events: none; }
.print-preview {
  width: 148px; height: 148px; display: flex; align-items: center; justify-content: center;
  background: var(--zn-100); border-radius: 10px; position: relative; cursor: pointer;
}
.print-preview .paper {
  position: relative; overflow: hidden; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.1), 0 6px 14px -4px rgba(0,0,0,.2);
}
.print-preview .paper img { position: absolute; max-width: none; }
.print-preview .crop-hint {
  position: absolute; right: 6px; bottom: 6px; width: 28px; height: 28px; border-radius: 50%; background: #fff;
  display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow); opacity: 0; transition: opacity .15s;
}
.print-preview:hover .crop-hint { opacity: 1; }
.cart-item-main { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.cart-item-head { display: flex; align-items: flex-start; gap: 12px; }
.cart-item-head .name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cart-item-head .meta { color: var(--muted-fg); font-size: 13px; }
.cart-item-head .line-price { margin-left: auto; font-weight: 600; font-size: 15px; white-space: nowrap; }
.cart-item-controls { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.cart-item-controls select.form-control { width: auto; height: 34px; padding-top: 4px; padding-bottom: 4px; border-radius: 999px; }
.cart-item-controls .btn { height: 34px; border-radius: 999px; }
.cart-item-controls .item-actions { margin-left: auto; display: flex; gap: 4px; align-items: center; white-space: nowrap; }
.warn-note { color: #b45309; font-size: 13px; display: flex; gap: 6px; align-items: center; }

.summary .row-line { display: flex; justify-content: space-between; padding: 6px 0; color: var(--muted-fg); }
.summary .row-line span:last-child { color: var(--foreground); font-variant-numeric: tabular-nums; }
.summary .row-total { display: flex; justify-content: space-between; padding: 14px 0 4px; margin-top: 8px;
                      border-top: 1px solid var(--border); font-weight: 650; font-size: 18px; }
.summary .lab-line { display: flex; gap: 12px; align-items: center; padding-bottom: 16px; margin-bottom: 10px;
                     border-bottom: 1px solid var(--border); }
.lab-mark { width: 40px; height: 40px; border-radius: 10px; background: var(--zn-900); color: #fff;
            display: flex; align-items: center; justify-content: center; font-weight: 700; flex-shrink: 0; }
.mini-items { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; max-height: 320px; overflow: auto; }
.mini-item { display: flex; gap: 12px; align-items: center; font-size: 13px; }
.mini-item .mi-print { flex: 0 0 44px; height: 44px; display: flex; align-items: center; justify-content: center; }   /* the print's shape and crop */
.mini-item .mi-paper { position: relative; overflow: hidden; border-radius: 3px; box-shadow: 0 0 0 1px rgba(0,0,0,.08); }
.mini-item .mi-paper img { position: absolute; max-width: none; display: block; pointer-events: none; -webkit-user-drag: none; }
.mini-item .mi-paper.fit { background: #fff; padding: 3px; }
.mini-item .mi-paper.fit img { position: static; width: 100%; height: 100%; object-fit: contain; }
.mini-item .mi-text { flex: 1; min-width: 0; }
.mini-item .mi-text div:first-child { font-weight: 500; }

/* Crop modal */
.crop-modal .modal-dialog { width: min(1100px, 94vw); margin-top: 3vh; }
.crop-modal .modal-body { padding: 0; background: #111; }
.crop-stage { height: min(68vh, 720px); }
.crop-stage img { display: block; max-width: 100%; }
.crop-toolbar { display: flex; gap: 10px; align-items: center; padding: 14px 20px; border-top: 1px solid var(--border);
                flex-wrap: wrap; }
.crop-toolbar .size-info { font-weight: 600; }
.crop-toolbar .quality { font-size: 13px; }
.quality.good { color: var(--ok); }
.quality.fair { color: #b45309; }
.quality.poor { color: #b91c1c; }
.crop-inner { position: absolute; inset: 28px 36px; }
/* Everything outside the frame is trimmed: dark and striped so even thin strips are obvious. */
.crop-modal .cropper-modal { opacity: 1; background-color: transparent; }
.crop-modal .cropper-canvas::after {        /* gray only over the photo; the crop box above shows it clean */
  content: ""; position: absolute; inset: 0; background: var(--trim);
}
.cropper-view-box { outline: 2px solid #fff; outline-color: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.35), 0 0 0 4px rgba(255,255,255,.18); }
.cropper-dashed { border-color: rgba(255,255,255,.55); opacity: 1; }
.cropper-line, .cropper-point { background-color: #fff; }
.cropper-point { width: 9px; height: 9px; opacity: 1; border-radius: 50%; box-shadow: 0 0 0 1px rgba(0,0,0,.35); }
.crop-meta { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1 1 240px; }   /* its text wraps before the buttons do */
.crop-meta .as-printed { width: 52px; height: 52px; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
                         background: var(--zn-100); border-radius: 8px; }
.crop-meta .lines { display: flex; flex-direction: column; gap: 1px; font-size: 13px; line-height: 1.35; }
.crop-meta .trim { color: var(--muted-fg); }
.crop-meta .trim strong { color: var(--foreground); font-weight: 600; }

/* ---------------------------------------------------------- tables & lists */
.list-card { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--background); }
.list-row {
  display: flex; align-items: center; gap: 16px; padding: 14px 20px; border-top: 1px solid var(--border);
  color: var(--foreground); transition: background-color .12s;
}
.list-row:first-child { border-top: 0; }
a.list-row:hover { background: var(--zn-50); color: var(--foreground); }
.list-row .thumb { width: 52px; height: 52px; border-radius: 8px; object-fit: cover; background: var(--zn-100); flex-shrink: 0; }
.list-row .grow { flex: 1; min-width: 0; }
.list-row .title { font-weight: 600; }
.list-row .sub { color: var(--muted-fg); font-size: 13px; }
.list-row .amount { font-weight: 600; font-variant-numeric: tabular-nums; min-width: 90px; text-align: right; }

.status { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 3px 10px;
          border-radius: 999px; white-space: nowrap; }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-warning { background: #fef3c7; color: #b45309; }
.status-info { background: #dbeafe; color: #1d4ed8; }
.status-primary { background: var(--zn-900); color: #fff; }
.status-success { background: #dcfce7; color: #15803d; }
.status-default { background: var(--zn-100); color: var(--zn-600); }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 20px; }
.tabs a { padding: 10px 14px; color: var(--muted-fg); font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px;
          display: inline-flex; gap: 8px; align-items: center; }
.tabs a:hover { color: var(--foreground); }
.tabs a.active { color: var(--foreground); border-bottom-color: var(--foreground); }
.tabs .n { background: var(--zn-100); color: var(--zn-600); font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 999px; }
.tabs a.active .n { background: var(--zn-900); color: #fff; }

/* Order detail */
.order-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.order-item { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--background); }
.order-item .oi-preview { height: 200px; background: var(--zn-100); display: flex; align-items: center; justify-content: center; }
.order-item .oi-body { padding: 12px 14px; }
.order-item .oi-body .t { font-weight: 600; display: flex; justify-content: space-between; gap: 8px; }
.order-item .oi-body .s { color: var(--muted-fg); font-size: 13px; }
.order-item .oi-actions { padding: 0 14px 14px; }
.copies-badge { background: var(--zn-900); color: #fff; border-radius: 999px; padding: 0 8px; font-size: 12px; line-height: 20px; }
.address { font-style: normal; line-height: 1.6; }
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 6px 12px; font-size: 14px; }
.kv dt { color: var(--muted-fg); font-weight: 400; }
.kv dd { margin: 0; }
.timeline { display: flex; gap: 0; margin: 4px 0 28px; }
.timeline .step { flex: 1; position: relative; padding-top: 22px; font-size: 13px; color: var(--muted-fg); font-weight: 500; }
.timeline .step::before { content: ""; position: absolute; top: 5px; left: 0; right: 0; height: 2px; background: var(--zn-200); }
.timeline .step::after { content: ""; position: absolute; top: 0; left: 0; width: 12px; height: 12px; border-radius: 50%;
                         background: var(--background); border: 2px solid var(--zn-300); }
.timeline .step.done { color: var(--foreground); }
.timeline .step.done::before, .timeline .step.done::after { background: var(--zn-900); border-color: var(--zn-900); }
.timeline .step:last-child::before { right: auto; width: 0; }

.success-hero { text-align: center; padding: 20px 0 36px; }
.success-hero .check { width: 64px; height: 64px; border-radius: 50%; background: var(--ok-bg); color: var(--ok);
                       display: inline-flex; align-items: center; justify-content: center; margin-bottom: 18px;
                       animation: pop .5s cubic-bezier(.2,.9,.3,1.4); }
@keyframes pop { from { transform: scale(.3); opacity: 0; } }

/* ---------------------------------------------------------- galleries (photographer) */
.gallery-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 22px; }
.gallery-card { color: var(--foreground); display: block; }
.gallery-card:hover { color: var(--foreground); }
.gallery-card .cover { aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden; background: var(--zn-100); position: relative;
                       display: flex; align-items: center; justify-content: center; }
.gallery-card .cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.gallery-card:hover .cover img { transform: scale(1.03); }
.gallery-card .gc-title { font-weight: 600; margin-top: 12px; font-size: 15px; }
.gallery-card .gc-sub { color: var(--muted-fg); font-size: 13px; }
.gallery-card .new-flag { position: absolute; top: 12px; left: 12px; background: #fff; border-radius: 999px; padding: 4px 10px;
                          font-size: 12px; font-weight: 600; box-shadow: var(--shadow); }
.share-box { display: flex; gap: 8px; }
.share-box input { font-family: var(--font-mono); font-size: 12.5px; background: var(--zn-50); }
.selection { border: 1px solid var(--border); border-radius: 12px; margin-bottom: 12px; background: var(--background); }
.selection-head { display: flex; gap: 12px; align-items: center; padding: 14px 18px; }
.selection-body { border-top: 1px solid var(--border); padding: 12px 18px; }
.selection .quote { background: var(--zn-50); border-radius: 8px; padding: 10px 12px; margin-bottom: 10px; font-style: italic; }
.sel-line { display: flex; gap: 12px; align-items: center; padding: 6px 0; font-size: 13px; }
.sel-line img { width: 36px; height: 36px; object-fit: cover; border-radius: 5px; }

/* ---------------------------------------------------------- public gallery (client view) */
.client-page { background: #fff; }
.client-header { max-width: 1400px; margin: 0 auto; padding: 72px 32px 40px; text-align: center; }
.client-header .by { text-transform: uppercase; letter-spacing: .16em; font-size: 12px; font-weight: 600; color: var(--muted-fg); }
.client-header h1 { font-size: clamp(32px, 5vw, 52px); font-weight: 600; letter-spacing: -0.035em; margin: 12px 0 16px; }
.client-header .message { max-width: 620px; margin: 0 auto; color: var(--zn-600); font-size: 16px; line-height: 1.7; white-space: pre-line; }
.client-grid { max-width: 1400px; margin: 0 auto; padding: 0 32px 140px; --row-h: 300px; }
.client-grid .tile { border-radius: 2px; }
.client-bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100; height: 56px; display: flex; align-items: center; padding: 0 20px;
  background: rgba(255,255,255,.9); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  transform: translateY(-100%); transition: transform .25s; border-bottom: 1px solid var(--border);
}
.client-bar.is-open { transform: none; }
.client-bar .t { font-weight: 600; }
.selection-fab {
  position: fixed; right: 24px; bottom: 24px; z-index: 500; border-radius: 999px; height: 50px; padding: 0 22px;
  background: var(--zn-900); color: #fff; border: 0; font-weight: 600; font-size: 15px; display: inline-flex; gap: 10px;
  align-items: center; box-shadow: 0 16px 32px -10px rgba(0,0,0,.5); transform: translateY(150%); transition: transform .3s cubic-bezier(.2,.9,.3,1.2);
}
.selection-fab.is-open { transform: none; }
.selection-fab .n { background: #fff; color: var(--zn-900); border-radius: 999px; min-width: 24px; height: 24px; font-size: 12px;
                    display: inline-flex; align-items: center; justify-content: center; padding: 0 7px; }
.tile .fav-badge { position: absolute; top: 10px; right: 10px; background: #fff; color: var(--zn-900); border-radius: 999px;
                   font-size: 12px; font-weight: 600; padding: 3px 9px; box-shadow: var(--shadow); display: inline-flex; gap: 4px; align-items: center; }
.powered { text-align: center; color: var(--zn-400); font-size: 12px; padding: 24px; }
.powered a { color: var(--zn-500); }
.powered-lang { display: inline-flex; align-items: center; gap: 4px; vertical-align: -2px; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 1500; background: rgba(12,12,14,.97); display: none; }
.lightbox.is-open { display: flex; animation: fade .2s ease; }
@keyframes fade { from { opacity: 0; } }
.lb-stage { flex: 1; position: relative; display: flex; align-items: center; justify-content: center; padding: 56px 72px; min-width: 0;
            min-height: 0; }   /* never grow with the photo: then "max-height: 100%" really fits it on screen */
.lb-stage img { max-width: 100%; max-height: 100%; object-fit: contain; box-shadow: 0 30px 60px -20px rgba(0,0,0,.6);
                transition: opacity .2s; }
.lb-btn { position: absolute; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255,255,255,.08); color: #fff;
          display: flex; align-items: center; justify-content: center; cursor: pointer; transition: background-color .15s; }
.lb-btn:hover { background: rgba(255,255,255,.18); }
.lb-prev { left: 16px; top: 50%; margin-top: -22px; }
.lb-next { right: 16px; top: 50%; margin-top: -22px; }
.lb-close { right: 16px; top: 16px; }
.lb-counter { position: absolute; left: 20px; top: 24px; color: rgba(255,255,255,.6); font-size: 13px; font-variant-numeric: tabular-nums; }
.lb-panel { width: 360px; background: #fff; overflow-y: auto; padding: 28px 24px; display: flex; flex-direction: column; }
.lb-panel h3 { font-size: 18px; margin-bottom: 4px; }
.lb-panel .panel-sub { color: var(--muted-fg); font-size: 13px; margin-bottom: 22px; }
.lb-lines { margin-top: 22px; border-top: 1px solid var(--border); padding-top: 16px; }
.lb-line { display: flex; align-items: center; gap: 10px; padding: 8px 0; font-size: 13.5px; }
.lb-line .grow { flex: 1; }
.lb-line .x { border: 0; background: none; color: var(--muted-fg); padding: 4px; border-radius: 6px; }
.lb-line .x:hover { background: var(--zn-100); color: var(--foreground); }
.add-row { display: flex; gap: 10px; align-items: center; margin-top: 22px; }
.add-row .btn { flex: 1; height: 40px; border-radius: 999px; }

/* Client selection drawer */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 1600; display: none; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(460px, 100vw); background: #fff; z-index: 1601;
          transform: translateX(100%); transition: transform .3s cubic-bezier(.2,.9,.3,1), box-shadow .3s; display: flex; flex-direction: column; }
.drawer.is-open { transform: none; box-shadow: -20px 0 40px -20px rgba(0,0,0,.3); }   /* closed: no shadow at the screen edge */
.drawer-head { padding: 20px 24px; border-bottom: 1px solid var(--border); display: flex; align-items: center; }
.drawer-head h3 { font-size: 18px; }
.drawer-body { flex: 1; overflow-y: auto; padding: 16px 24px; }
.drawer-foot { padding: 18px 24px; border-top: 1px solid var(--border); background: var(--zn-50); }

/* ---------------------------------------------------------- lab catalogue */
.price-matrix { width: 100%; border-collapse: separate; border-spacing: 0; }
.price-matrix th, .price-matrix td { padding: 8px 10px; border-bottom: 1px solid var(--border); text-align: left; }
.price-matrix thead th { font-size: 12px; font-weight: 600; color: var(--muted-fg); text-transform: uppercase; letter-spacing: .05em;
                         background: var(--zn-50); }
.price-matrix tbody tr:last-child td, .price-matrix tbody tr:last-child th { border-bottom: 0; }
.price-matrix tbody th { font-weight: 600; white-space: nowrap; }
.price-cell { position: relative; }
.price-cell .pc { position: relative; }
.price-cell .pc-extra { margin-top: 4px; }
.price-cell .pc-extra input { height: 28px; font-size: 12.5px; color: var(--zn-600); }
.price-cell .pc-extra input:placeholder-shown { background: none; }
.price-cell .pc-extra input::placeholder { color: var(--zn-400); }
.price-cell .pc-extra .cur { font-size: 11px; }
.price-cell input { width: 100%; min-width: 90px; height: 36px; border: 1px solid transparent; border-radius: 6px; padding: 0 34px 0 10px;
                    background: var(--zn-50); font-variant-numeric: tabular-nums; transition: border-color .15s, background-color .15s; }
.price-cell input:hover { border-color: var(--zn-300); }
.price-cell input:focus { outline: none; border-color: var(--zn-900); background: #fff; box-shadow: 0 0 0 3px rgba(24,24,27,.1); }
.price-cell input:placeholder-shown { background: repeating-linear-gradient(135deg, var(--zn-50), var(--zn-50) 6px, #fff 6px, #fff 12px); }
.price-cell .cur { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); color: var(--muted-fg); font-size: 12px; pointer-events: none; }
.price-cell .pc.saved input { border-color: #86efac; background: var(--ok-bg); }
.price-cell .pc.error input { border-color: var(--destructive); }
.catalog-row { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-top: 1px solid var(--border); }
.catalog-row:first-child { border-top: 0; }
.catalog-row .grow { flex: 1; min-width: 0; }
.catalog-row .title { font-weight: 600; }
.catalog-row .sub { color: var(--muted-fg); font-size: 13px; }
.catalog-row.inactive .title, .catalog-row.inactive .sub { opacity: .5; }
.icon-btn { width: 32px; height: 32px; border-radius: 8px; border: 0; background: none; color: var(--muted-fg);
            display: inline-flex; align-items: center; justify-content: center; }
.icon-btn:hover { background: var(--zn-100); color: var(--foreground); }
.size-shape { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.size-shape i { display: block; border: 1.5px solid var(--zn-400); border-radius: 2px; background: var(--zn-50); }
.setup-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 28px; }
.setup-step { padding: 18px 20px; border: 1px solid var(--border); border-radius: 12px; display: flex; gap: 12px; }
.setup-step .n { width: 26px; height: 26px; border-radius: 50%; background: var(--zn-100); display: flex; align-items: center;
                 justify-content: center; font-weight: 600; font-size: 13px; flex-shrink: 0; }
.setup-step.done .n { background: var(--zn-900); color: #fff; }

/* ---------------------------------------------------------- landing & auth */
.landing-hero { max-width: var(--page-max); margin: 0 auto; padding: 88px 24px 56px; display: grid;
                grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.eyebrow { display: inline-flex; gap: 8px; align-items: center; font-size: 13px; font-weight: 500; color: var(--zn-600);
           border: 1px solid var(--border); border-radius: 999px; padding: 5px 12px; margin-bottom: 22px; }
.landing-hero h1 { font-size: clamp(38px, 5.2vw, 60px); line-height: 1.04; letter-spacing: -0.045em; font-weight: 650; }
.landing-hero .lead { font-size: 18px; color: var(--zn-600); line-height: 1.6; margin: 22px 0 30px; max-width: 520px; }
.landing-hero .cta { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-art { display: flex; align-items: center; justify-content: center; }
.hero-art img { width: 100%; max-width: 420px; height: auto; display: block; }
.features { max-width: var(--page-max); margin: 0 auto; padding: 24px 24px 96px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature { padding: 28px; border: 1px solid var(--border); border-radius: 16px; }
.feature .fi { width: 44px; height: 44px; border-radius: 12px; background: var(--zn-100); display: flex; align-items: center; justify-content: center; margin-bottom: 18px; }
.feature h3 { margin-bottom: 8px; }
.feature p { color: var(--muted-fg); margin: 0; }
.landing-footer { border-top: 1px solid var(--border); padding: 28px 24px; text-align: center; color: var(--muted-fg); font-size: 13px; }

.auth-wrap { min-height: calc(100vh - var(--topbar-h)); display: flex; align-items: center; justify-content: center; padding: 40px 20px; background: var(--zn-50); }
.auth-card { width: 100%; max-width: 420px; background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 36px 34px; box-shadow: var(--shadow); }
.auth-card h1 { font-size: 24px; margin-bottom: 6px; }
.auth-card .sub { color: var(--muted-fg); margin-bottom: 26px; }
.auth-card .btn-block { height: 42px; margin-top: 8px; }
.auth-foot { text-align: center; margin-top: 20px; color: var(--muted-fg); }
.auth-foot a { font-weight: 500; }
.role-toggle { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 22px; }
.role-toggle a { border: 1px solid var(--border); border-radius: 10px; padding: 12px; color: var(--foreground); text-align: center; font-weight: 500;
                 display: flex; flex-direction: column; align-items: center; gap: 6px; }
.role-toggle a span { font-size: 12px; color: var(--muted-fg); font-weight: 400; }
.role-toggle a.selected { border-color: var(--zn-900); box-shadow: 0 0 0 1px var(--zn-900); }
.demo-hint { margin-top: 18px; padding: 12px 14px; background: var(--zn-50); border-radius: 10px; font-size: 13px; color: var(--muted-fg); }
.demo-hint code { background: none; color: var(--foreground); padding: 0; font-size: 12px; }

/* Lab picker */
.lab-options { display: grid; gap: 10px; }
.lab-option { display: flex; gap: 14px; align-items: center; padding: 14px 16px; border: 1px solid var(--border); border-radius: 12px;
              cursor: pointer; background: #fff; text-align: left; width: 100%; transition: border-color .15s; }
.lab-option:hover { border-color: var(--zn-400); }
.lab-option.selected { border-color: var(--zn-900); box-shadow: 0 0 0 1px var(--zn-900); }
.lab-option[disabled] { opacity: .45; cursor: not-allowed; }
.lab-chip { display: inline-flex; gap: 8px; align-items: center; font-size: 13px; color: var(--muted-fg); border: 1px solid var(--border);
            border-radius: 999px; padding: 4px 12px 4px 4px; background: #fff; cursor: pointer; }
.lab-chip .lab-mark { width: 24px; height: 24px; border-radius: 50%; font-size: 11px; }
.lab-chip strong { color: var(--foreground); font-weight: 600; }
.lab-chip:hover { border-color: var(--zn-400); }

.modal-body { color: var(--foreground); }
.modal-content { border-radius: 16px; }
.modal-header { border-bottom: 0; padding-bottom: 4px; }
.modal-header .modal-sub { color: var(--muted-fg); margin: 4px 0 0; }
.modal-footer { border-top: 0; }
.modal-footer .total { margin-right: auto; font-weight: 600; font-size: 15px; }

/* ---------------------------------------------------------- responsive */
@media (max-width: 960px) {
  .layout-aside { grid-template-columns: 1fr; }
  .sticky-aside { position: static; }
  .landing-hero { grid-template-columns: 1fr; padding-top: 48px; }
  .hero-art img { max-width: 240px; }
  .features, .setup-steps, .grid-3 { grid-template-columns: 1fr; }
  /* Phones and small tablets: the photo gets the whole screen, with a bar of actions at the bottom; the panel opens
     as a full-screen sheet over it (gallery.js: openSheet). Cropping happens on the photo ("adjusting"). */
  .lightbox { background: #0c0c0e; }
  .lightbox.is-open { flex-direction: column; }
  .lb-stage { padding: 56px 8px calc(84px + env(safe-area-inset-bottom)); }
  .lb-panel { position: fixed; inset: 0; z-index: 10; width: auto; padding: 0 20px calc(28px + env(safe-area-inset-bottom));
              transform: translateY(100%); transition: transform .28s cubic-bezier(.2,.9,.3,1); visibility: hidden;
              -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
  .lightbox.sheet-open .lb-panel { transform: none; visibility: visible; }
  .lb-sheet-head { display: flex; position: sticky; top: 0; z-index: 2; background: #fff; align-items: center;
                   margin: 0 -20px 16px; padding: calc(10px + env(safe-area-inset-top)) 12px 10px; border-bottom: 1px solid var(--border); }
  .lb-sheet-back { border: 0; background: none; font-weight: 600; font-size: 15px; display: inline-flex; align-items: center; gap: 4px; padding: 8px 6px; color: var(--foreground); }
  .lb-sheet-count { margin-left: auto; color: var(--muted-fg); font-size: 13px; padding-right: 6px; }
  .lb-mobilebar, .lb-adjustbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; display: flex; gap: 8px; align-items: center;
                                 padding: 12px 12px calc(12px + env(safe-area-inset-bottom));
                                 background: linear-gradient(to top, rgba(12,12,14,.95) 55%, rgba(12,12,14,0)); }
  .lb-mobilebar .btn { height: 48px; border-radius: 12px; font-weight: 600; font-size: 15px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
  .lb-mobilebar .btn-primary { flex: 1; background: #fff; color: var(--zn-900); border-color: #fff; }
  .lb-mobilebar .btn-light { min-width: 56px; background: rgba(255,255,255,.14); color: #fff; border: 0; }
  .lb-adjustbar { display: none; color: #fff; font-size: 14px; }
  .lb-adjustbar span { flex: 1; }
  .lb-adjustbar .btn { height: 48px; border-radius: 12px; padding: 0 20px; background: #fff; color: var(--zn-900); border-color: #fff; font-weight: 600; }
  /* The crop frame only in "Adjust the crop": otherwise the photo view is for looking and swiping. */
  .lightbox:not(.adjusting) .crop-overlay, .lightbox:not(.adjusting) .lb-paper { display: none !important; }
  .lightbox.adjusting .lb-mobilebar { display: none; }
  .lightbox.adjusting .lb-adjustbar { display: flex; }
  .lightbox.adjusting .lb-prev, .lightbox.adjusting .lb-next { display: none !important; }
  .crop-mini { display: flex; justify-content: center; margin: 12px 0 4px; }
  .crop-adjust-btn { display: flex; margin: 8px auto 0; gap: 6px; align-items: center; }
  .lb-panel .add-row { position: sticky; bottom: 0; background: #fff; padding: 12px 0; margin-bottom: -12px; z-index: 1; }
}
@media (max-width: 640px) {
  .topbar-inner { gap: 12px; padding: 0 14px; }
  .brand span, .cart-button span:not(.count) { display: none; }
  .topnav a { padding: 7px 8px; }
  /* Too many links for a phone: they scroll sideways, so the cart and avatar keep their place inside the bar. */
  .topnav { min-width: 0; overflow-x: auto; scrollbar-width: none; }
  .topnav::-webkit-scrollbar { display: none; }
  .topnav a { white-space: nowrap; }
  .topbar-right { flex: none; }
  .page { padding: 24px 16px 120px; }
  .grid-2 { grid-template-columns: 1fr; }
  .cart-item { grid-template-columns: 96px minmax(0, 1fr); gap: 18px; padding: 14px; }
  .print-preview { width: 96px; height: 96px; overflow: hidden; }
  .print-preview > :first-child { transform: scale(.72); flex: none; }   /* drawn for 124 px (cart.js): scaled into the box */
  .photo-grid { --row-h: 110px !important; gap: 4px; }     /* low enough that two landscape photos share a row */
  .client-grid { padding: 0 8px 120px; }
  .action-bar { left: 12px; right: 12px; transform: translateY(140%); padding-left: 16px; overflow-x: auto; }
  .action-bar.is-open { transform: none; }
  .kv { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------- order prints dialog (one row per print) */
.set-all { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 14px; background: var(--zn-50);
           border: 1px solid var(--border); border-radius: 12px; margin-bottom: 14px; }
.set-all-label { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted-fg); margin-right: auto; }
.set-all select.form-control, .order-row select.form-control { width: auto; height: 34px; padding-top: 4px; padding-bottom: 4px; border-radius: 999px; }
.order-rows { max-height: min(52vh, 520px); overflow-y: auto; margin: 0 -4px; padding: 0 4px; }
.order-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--border); }
.order-row:first-child { border-top: 0; }
.order-row.extra { padding-top: 6px; border-top-style: dashed; }
.order-row .or-thumb { width: 52px; height: 52px; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
                       background: var(--zn-100); border-radius: 8px; overflow: hidden; }
.order-row .or-thumb img { max-width: 100%; max-height: 100%; }
.order-row.extra .or-thumb { background: none; color: var(--zn-300); }
.order-row .or-name { flex: 1; min-width: 0; font-size: 13px; }
.order-row .or-name div:first-child { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.order-row .or-name div + div { color: var(--muted-fg); font-size: 12px; }
.order-row .or-price { width: 72px; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.order-row .or-actions { display: flex; gap: 2px; }
@media (max-width: 760px) {
  .order-row { flex-wrap: wrap; }
  .order-row .or-name { flex-basis: calc(100% - 62px); }
  .order-row .or-price { margin-left: auto; }
}
.order-row select[data-f="size"], #all-size { width: 136px !important; }
.order-row select[data-f="paper"], #all-paper { width: 176px !important; text-overflow: ellipsis; }
@media (max-width: 760px) {
  .order-row select[data-f="size"], .order-row select[data-f="paper"] { flex: 1 1 40%; width: auto !important; }
  .set-all-label { flex-basis: 100%; }
  #all-size, #all-paper { flex: 1 1 40%; width: auto !important; }
}

/* Print previews anywhere (cart, client selection) */
.paper { position: relative; overflow: hidden; background: #fff; flex-shrink: 0;
         box-shadow: 0 1px 2px rgba(0,0,0,.1), 0 6px 14px -4px rgba(0,0,0,.2); }
.paper img { position: absolute; max-width: none; }
.crop-tag { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; color: #1d4ed8;
            background: #dbeafe; border-radius: 999px; padding: 1px 8px; white-space: nowrap; }

/* ---------------------------------------------------------- client crop frame (public gallery lightbox) */
.lb-stage img { position: relative; z-index: 1; }
.lb-paper { position: absolute; z-index: 0; background: #fff; box-shadow: 0 30px 60px -20px rgba(0,0,0,.6); }
.crop-overlay { position: absolute; z-index: 2; overflow: hidden; touch-action: none; cursor: grab; }
.crop-overlay.locked { cursor: default; }
.crop-overlay.dragging { cursor: grabbing; }
/* Trimmed area: striped layer with a hole cut out where the frame is (clip-path set in gallery.js). */
.crop-shade { position: absolute; inset: 0; pointer-events: none; background: var(--trim); }
.crop-frame { position: absolute; outline: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.35), 0 0 0 4px rgba(255,255,255,.18);
              }
.crop-overlay.dragging .crop-frame { transition: none; }
.crop-frame::before, .crop-frame::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to right, transparent calc(33.33% - .5px), rgba(255,255,255,.35) calc(33.33% - .5px), rgba(255,255,255,.35) calc(33.33% + .5px), transparent calc(33.33% + .5px), transparent calc(66.66% - .5px), rgba(255,255,255,.35) calc(66.66% - .5px), rgba(255,255,255,.35) calc(66.66% + .5px), transparent calc(66.66% + .5px)); }
.crop-frame::after { background: linear-gradient(to bottom, transparent calc(33.33% - .5px), rgba(255,255,255,.35) calc(33.33% - .5px), rgba(255,255,255,.35) calc(33.33% + .5px), transparent calc(33.33% + .5px), transparent calc(66.66% - .5px), rgba(255,255,255,.35) calc(66.66% - .5px), rgba(255,255,255,.35) calc(66.66% + .5px), transparent calc(66.66% + .5px)); }
.crop-pill { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); background: rgba(12,12,14,.8); color: #fff;
             font-size: 12.5px; font-weight: 500; padding: 6px 12px; border-radius: 999px; white-space: nowrap; pointer-events: none;
             display: inline-flex; gap: 6px; align-items: center; transition: opacity .3s; }
.crop-pill:empty { display: none; }
.crop-note { margin-top: 18px; padding: 12px 14px; background: var(--zn-50); border: 1px solid var(--border); border-radius: 12px; }
.crop-note-text { font-size: 13px; color: var(--zn-700); margin: 0; }
.crop-note-text .icon { vertical-align: -2px; margin-right: 2px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 12px; }
.seg button { border: 1px solid var(--border); background: #fff; border-radius: 10px; padding: 8px 10px; text-align: left; line-height: 1.3; }
.seg button strong { display: block; font-size: 13px; font-weight: 600; }
.seg button small { color: var(--muted-fg); font-size: 12px; }
.seg button.selected { border-color: var(--zn-900); box-shadow: 0 0 0 1px var(--zn-900); }
.lb-line .adjust { border: 0; background: none; color: var(--muted-fg); padding: 4px; border-radius: 6px; }
.lb-line .adjust:hover { background: var(--zn-100); color: var(--foreground); }
.lb-line.editing { background: var(--zn-50); border-radius: 8px; padding-left: 6px; padding-right: 6px; }
.sel-preview { width: 60px; height: 60px; display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; }
.crop-stage { position: relative; }
.crop-fit-view { display: none; position: absolute; inset: 0; z-index: 5; align-items: center; justify-content: center; background: #111; }
.crop-stage.fit-mode .crop-fit-view { display: flex; }
.seg-inline { margin-top: 0; grid-template-columns: auto auto; }
.seg-inline button { padding: 7px 12px; }
.seg-inline button strong { font-size: 13px; }
.crop-note-text.trim { color: var(--muted-fg); }
.crop-note-text.trim strong { color: var(--foreground); font-weight: 600; }

/* Cart thumbnail: the whole photo, with the trimmed parts under a 50% gray border. */
.crop-thumb { position: relative; overflow: hidden; flex-shrink: 0; box-shadow: 0 1px 2px rgba(0,0,0,.1), 0 6px 14px -4px rgba(0,0,0,.2); }
.crop-thumb img { display: block; width: 100%; height: 100%; }
.crop-thumb .frame { position: absolute; box-shadow: 0 0 0 999px var(--trim); outline: 1px solid #fff; }

/* Lab order: print file preparation */
.files-status { display: flex; align-items: center; gap: 6px; margin: 8px 0 0; font-size: 13px; color: var(--muted-fg); }
.files-status[data-status="ready"] { color: var(--ok); }
.files-status[data-status="failed"] { color: #b91c1c; }
.files-status a { color: inherit; text-decoration: underline; }
.spinner { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--zn-300); border-top-color: var(--zn-700);
           animation: spin .8s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------------------------------------------------- photo viewer (library, gallery editor) */
.viewer { background: #0c0c0e; }                  /* opaque: nothing of the page shows through */
.viewer .lb-stage { padding: 56px 72px 96px; }
.viewer-img { max-width: 100%; max-height: 100%; object-fit: contain; box-shadow: 0 30px 60px -20px rgba(0,0,0,.6); transition: opacity .2s; }
.viewer-caption { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 24px; display: flex; align-items: center; gap: 16px;
                  justify-content: center; color: #fff; }
.viewer-text { display: flex; flex-direction: column; align-items: center; min-width: 0; }
.viewer-text strong { font-weight: 600; font-size: 15px; max-width: 60vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.viewer-text span { font-size: 12.5px; color: rgba(255,255,255,.6); font-variant-numeric: tabular-nums; }
.viewer-select { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 16px; border-radius: 999px;
                 border: 1px solid rgba(255,255,255,.35); background: transparent; color: #fff; font-weight: 500; }
.viewer-select:hover { background: rgba(255,255,255,.12); }
.viewer-select.on { background: #fff; color: var(--zn-900); border-color: #fff; }
.viewer-select .ring { width: 16px; height: 16px; border-radius: 50%; border: 2px solid #fff; display: inline-block; }
.lb-info { right: 68px; top: 16px; }
.lb-info.on { background: #fff; color: var(--zn-900); }
/* the details panel (I): beside the photo; on a phone, over the lower half */
.viewer-info { display: none; width: 340px; flex: none; background: #fff; color: var(--zn-900); overflow-y: auto; padding: 22px 22px 32px;
               font-size: 13px; }
.viewer.info-open .viewer-info { display: block; }
.viewer-info h3 { font-size: 15px; font-weight: 600; margin: 0 0 6px; overflow-wrap: anywhere; }
.viewer-info h4 { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--zn-500);
                  margin: 20px 0 6px; }
.viewer-info dl { display: grid; grid-template-columns: minmax(96px, 40%) 1fr; gap: 5px 12px; margin: 0; }
.viewer-info dt { color: var(--zn-500); font-weight: 400; overflow-wrap: anywhere; }
.viewer-info dd { margin: 0; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.viewer-info a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.viewer-map { width: 100%; height: 200px; border: 0; border-radius: 8px; margin: 2px 0 10px; background: var(--zn-100); }
@media (max-width: 640px) { .viewer .lb-stage { padding: 56px 8px 110px; } .viewer-caption { flex-direction: column; gap: 10px; } }
@media (max-width: 640px) {
  .viewer.info-open { flex-direction: column; }
  .viewer-info { width: auto; height: 50%; }
}

/* Tiles that open the viewer: the tick selects, the photo opens. */
.photo-grid.viewable .tile { cursor: zoom-in; }
.photo-grid.viewable .tile .tile-check { cursor: pointer; width: 28px; height: 28px; top: 8px; left: 8px; }
.photo-grid.viewable .tile .tile-check::after { content: ""; position: absolute; inset: -10px; }   /* easier to hit */
.photo-grid.viewable .tile .tile-check:hover { background: rgba(0,0,0,.45); }
.photo-grid.viewable .tile.selected .tile-check:hover { background: var(--sel); }
@media (hover: none) {        /* touch screens: no hover, so always show the tick */
  .photo-grid.viewable .tile .tile-check, .photo-grid.viewable .tile .tile-shade { opacity: 1; }
}

/* Client gallery: make saving photos awkward (no drag, no long-press menu, no selection) */
.client-page img { -webkit-user-drag: none; user-drag: none; -webkit-touch-callout: none; user-select: none;
                   -webkit-user-select: none; }

/* ---------------------------------------------------------- a lab's own site */
.brand-lab { gap: 10px; }
.brand-lab img { max-height: 36px; max-width: 220px; display: block; }
.brand-lab .lab-mark { width: 32px; height: 32px; border-radius: 8px; font-size: 14px; }
.brand .lab-mark { display: flex; }          /* (".brand span" would make the letter sit in the corner) */
.site-lab .brand-lab .lab-mark, .site-lab .avatar, .site-lab .cart-button .count { background: var(--brand, var(--zn-900)); color: var(--brand-fg, #fff); }
.site-lab .btn-primary { background: var(--brand, var(--zn-900)); border-color: var(--brand, var(--zn-900)); color: var(--brand-fg, #fff); }
.site-lab .btn-primary:hover, .site-lab .btn-primary:focus { background: var(--brand, var(--zn-700)); border-color: var(--brand, var(--zn-700));
                                                              color: var(--brand-fg, #fff); filter: brightness(1.1); }
.lab-hero { max-width: 760px; margin: 0 auto; padding: 96px 24px 48px; text-align: center; }
.lab-hero .lab-logo { max-height: 72px; max-width: 320px; margin: 0 auto 28px; display: block; }
.lab-hero h1 { font-size: clamp(34px, 5vw, 52px); letter-spacing: -0.04em; line-height: 1.08; }
.lab-hero .lead { font-size: 18px; color: var(--zn-600); line-height: 1.6; margin: 20px auto 30px; white-space: pre-line; max-width: 600px; }
.lab-hero .cta { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.lab-prices { max-width: 760px; margin: 0 auto; padding: 0 24px 96px; }
.lab-prices .list-card { margin-top: 12px; }
.powered-by { text-align: center; color: var(--zn-400); font-size: 12px; padding: 24px; }
.powered-by a { color: var(--zn-500); }
.form-group .check-row { display: flex; }      /* not the block layout of other form labels */

/* ---------------------------------------------------------- galleries first */
.first-gallery { max-width: 620px; margin: 40px auto 0; text-align: center; padding: 48px 24px 56px; }
.first-gallery h1 { font-size: 32px; margin-bottom: 10px; }
.first-gallery > p { color: var(--muted-fg); font-size: 16px; line-height: 1.6; margin: 0 auto 26px; }
.first-gallery-art { position: relative; width: 180px; height: 120px; margin: 0 auto 30px; }
.first-gallery-art span { position: absolute; width: 96px; height: 72px; border-radius: 6px; border: 6px solid #fff;
  box-shadow: 0 12px 24px -8px rgba(0,0,0,.3), 0 0 0 1px rgba(0,0,0,.05); }
.first-gallery-art span:nth-child(1) { left: 6px; top: 26px; transform: rotate(-8deg); background: linear-gradient(180deg,#8cbad6,#e6eef0 55%,#5f7882 56%,#304248); }
.first-gallery-art span:nth-child(2) { right: 6px; top: 20px; transform: rotate(7deg); background: linear-gradient(180deg,#222a4f,#f3a26e 60%,#3c3255 61%,#1e1a30); }
.first-gallery-art span:nth-child(3) { left: 42px; top: 4px; background: linear-gradient(180deg,#fad6a5,#f6ae8c 58%,#966060 59%,#5c3a42); }
.first-steps { list-style: none; counter-reset: step; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; padding: 0; margin: 40px 0 0; text-align: left; }
.first-steps li { counter-increment: step; border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px 16px; font-size: 13px; color: var(--muted-fg); }
.first-steps li::before { content: counter(step); display: inline-flex; width: 24px; height: 24px; border-radius: 50%; background: var(--zn-100);
  color: var(--foreground); font-weight: 600; font-size: 12px; align-items: center; justify-content: center; margin-bottom: 8px; }
.first-steps li strong { display: block; color: var(--foreground); font-weight: 600; font-size: 14px; }
.purpose-tag { display: inline-flex; align-items: center; font-size: 12px; font-weight: 600; background: var(--zn-100); color: var(--zn-700);
  border-radius: 999px; padding: 2px 10px; margin-right: 8px; vertical-align: 1px; }
.purpose-choices .choice-text span { display: block; }
@media (max-width: 640px) { .first-steps { grid-template-columns: 1fr; } }
.form-group .choice { display: flex; }        /* choice cards inside forms keep their row layout */

/* A switch: <label class="switch"><input type="checkbox"><span class="switch-track"></span> Text</label> */
.switch { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-size: 13px; font-weight: 500;
          color: var(--foreground); cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-track { position: relative; width: 34px; height: 20px; border-radius: 999px; background: var(--zn-300, #d4d4d8);
                transition: background-color .15s; flex: none; }
.switch-track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%;
                       background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .15s; }
.switch input:checked + .switch-track { background: var(--zn-900); }
.switch input:checked + .switch-track::after { transform: translateX(14px); }
.switch input:focus-visible + .switch-track { box-shadow: 0 0 0 3px rgba(24,24,27,.2); }
.photo-grid.only-selected .tile:not(.selected):not(.uploading) { display: none; }
.none-selected { text-align: center; padding: 48px 0; }
.watermark-text { margin: 0 0 14px 26px; max-width: 360px; }   /* lined up under the checkbox's text */

/* ---------- Client gallery: comments, digital files, access ---------- */
.lb-section + .lb-section { border-top: 1px solid var(--border); margin-top: 22px; padding-top: 22px; }
.lb-section h3 { margin-bottom: 12px; }
.lb-section-prints h3 { margin-bottom: 4px; }
.dl-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; font-size: 13.5px; }
.dl-row .grow { flex: 1; }
.dl-row .dl-price { color: var(--zn-600); }
.comment { padding: 8px 0; font-size: 13.5px; }
.comment + .comment { border-top: 1px solid var(--zn-100); }
.comment-meta { display: flex; align-items: baseline; gap: 6px; }
.comment-body { white-space: pre-wrap; overflow-wrap: anywhere; color: var(--zn-700); margin-top: 2px; }
.comment.from-photographer, .comment.from-me { background: var(--zn-50); border-radius: 8px; padding: 8px 10px; }
.comment.from-photographer .comment-meta strong::after, .comment.from-me .comment-meta strong::after { content: " ✓"; color: var(--zn-400); }
.comment-form { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.comment-form .btn { align-self: flex-end; }
.tile .comment-badge { position: absolute; left: 10px; bottom: 10px; background: #fff; color: var(--zn-900); border-radius: 999px;
                       font-size: 12px; font-weight: 600; padding: 3px 9px; box-shadow: var(--shadow); display: inline-flex; gap: 4px; align-items: center; }
.files-fab { background: #fff; color: var(--zn-900); box-shadow: 0 16px 32px -10px rgba(0,0,0,.35), 0 0 0 1px var(--border); }
.files-fab .n { background: var(--zn-900); color: #fff; }
body.has-files-fab .selection-fab:not(.files-fab) { bottom: 84px; }
.file-thumb { width: 44px; height: 44px; object-fit: cover; border-radius: 6px; }
.owner-note { background: var(--zn-900); color: #fff; font-size: 13px; text-align: center; padding: 9px 16px; }
.owner-note .icon { vertical-align: -2px; margin-right: 4px; }

/* ---------- Gallery settings and the photographer's gallery page ---------- */
.settings-heading { font-size: 14px; font-weight: 600; margin: 26px 0 12px; display: flex; align-items: center; gap: 8px; }
.seg-radio { border: 1px solid var(--border); background: #fff; border-radius: 10px; padding: 7px 12px; font-size: 13px;
             font-weight: 600; margin: 0; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.seg-radio input { margin: 0; }
.seg-radio.selected { border-color: var(--zn-900); box-shadow: 0 0 0 1px var(--zn-900); }
#g-downloads { grid-template-columns: repeat(3, auto); justify-content: start; }
.download-size { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 10px; }
.download-size .check-row { flex: 1 1 280px; }
.price-input { max-width: 190px; }
.purpose-tag.tag-warning { background: #fef3c7; color: #92400e; }
.purpose-tag .icon { margin-right: 4px; }
.share-notify { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); }
.thread-thumb { width: 44px; height: 44px; object-fit: cover; border-radius: 6px; }
.comment-thread { scroll-margin-top: 90px; }
.comment-del { margin-left: auto; }
.comment-del .icon-btn { width: 26px; height: 26px; opacity: .5; }
.comment-del .icon-btn:hover { opacity: 1; }
.reply-form { display: flex; gap: 8px; align-items: flex-end; margin-top: 12px; }
.reply-form textarea { flex: 1; }
.no-topbar .auth-wrap { min-height: 100vh; }   /* client pages without the top bar (closed, password) */
.auth-card .empty-icon { width: 56px; height: 56px; border-radius: 16px; background: var(--background); border: 1px solid var(--border);
                         display: inline-flex; align-items: center; justify-content: center; box-shadow: var(--shadow-sm); }
.line-price .extra-note, .extra-note { display: block; font-size: 11.5px; font-weight: 400; color: var(--muted-fg); text-align: right; white-space: normal; }
.extra-hint { margin: 8px 0 0; }
.section-actions { margin-left: auto; display: inline-flex; gap: 6px; flex-shrink: 0; }
#book-errors { display: block; }
#book-errors[hidden] { display: none; }
#book-errors ul { margin: 6px 0 0 18px; padding: 0; }
.lab-line .lab-logo { height: 40px; max-width: 120px; object-fit: contain; object-position: left center; flex-shrink: 0; }
.fill-card { margin-bottom: 8px; }
.fill-card .card-body { flex-wrap: wrap; }
.my-prices .lab-cost { font-size: 11.5px; color: var(--muted-fg); margin: 3px 0 0 10px; }
.my-prices .price-cell.off { vertical-align: middle; }
.my-prices .below-lab .pc-first input, .my-prices .below-lab .lab-cost { color: var(--destructive); }
.my-prices .below-lab .lab-cost::after { content: " ⚠"; }
.drawer .choice { align-items: center; }
.drawer .choice .choice-price { margin-left: auto; font-weight: 600; white-space: nowrap; }
.client-order-note { margin: 10px 0 0; padding: 8px 12px; border-radius: 8px; background: #fef3c7; color: #92400e; font-size: 13.5px; }
/* Start page: the big logo, centred, with the two ways in underneath. */
.landing-logo { max-width: var(--page-max); margin: 0 auto; padding: 96px 24px 72px; text-align: center; }
.landing-logo h1 { margin: 0; }
.landing-logo img { width: 100%; max-width: 480px; height: auto; display: inline-block; }
.landing-logo .cta { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 48px; }
@media (max-width: 640px) {
  .landing-logo { padding: 56px 16px 48px; }
  .landing-logo img { max-width: 280px; }
  .landing-logo .cta { margin-top: 36px; }
}
/* Wide screens: the panel sits beside the photo; the phone-only controls are hidden. */
@media (min-width: 961px) {
  .lb-mobilebar, .lb-adjustbar, .lb-sheet-head, .crop-mini, .crop-adjust-btn { display: none !important; }
}

/* ---------- Contact sheet: the client's prints drawn to the same scale ---------- */
.contact-sheet { position: fixed; inset: 0; z-index: 1700; background: var(--zn-100); display: none; flex-direction: column; }
.contact-sheet.is-open { display: flex; animation: fade .2s ease; }
.cs-head { display: flex; align-items: center; gap: 16px; padding: 16px 24px; background: #fff; border-bottom: 1px solid var(--border); }
.cs-head h3 { font-size: 18px; margin: 0; }
.cs-head p { margin: 2px 0 0; }
.cs-head .icon-btn { margin-left: 8px; }
.cs-ruler { margin-left: auto; display: inline-flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11px; color: var(--muted-fg); }
.cs-ruler i { display: block; height: 6px; border: 2px solid var(--zn-500); border-top: 0; }
.cs-body { flex: 1; overflow: auto; padding: 32px 24px 48px; display: flex; flex-wrap: wrap; gap: 36px 32px; align-items: flex-end;
           justify-content: center; align-content: flex-start; }
.cs-print { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.cs-paper { position: relative; }
.cs-paper .paper { box-shadow: 0 1px 2px rgba(0,0,0,.12), 0 8px 18px -8px rgba(0,0,0,.35); }
/* Several copies: paper edges behind the print. */
.cs-print.copies .cs-paper::before, .cs-print.many .cs-paper::after { content: ""; position: absolute; inset: 0; background: #fff;
    box-shadow: 0 1px 2px rgba(0,0,0,.15); z-index: -1; transform: translate(5px, -5px); }
.cs-print.many .cs-paper::after { transform: translate(10px, -10px); z-index: -2; }
.cs-print figcaption { font-size: 13px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: center; }
.contact-sheet-btn { margin-top: 14px; display: flex; align-items: center; justify-content: center; gap: 8px; }
@media (max-width: 640px) {
  .cs-head { padding: calc(12px + env(safe-area-inset-top)) 16px 12px; }
  .cs-head p { display: none; }
  .cs-body { padding: 24px 16px 40px; gap: 28px 20px; }
}
.cs-watermark-note { margin: 0; padding: 10px 24px; background: #ecfdf5; color: #065f46; font-size: 13.5px; border-bottom: 1px solid #d1fae5; }
.cs-watermark-note .icon { vertical-align: -2px; margin-right: 4px; }
@media (max-width: 640px) { .cs-watermark-note { padding: 9px 16px; } }
/* The payments guide on the account page. */
.pay-guide { margin-top: 18px; border-top: 1px solid var(--border); padding-top: 14px; font-size: 14px; }
.pay-guide summary { cursor: pointer; font-weight: 600; display: flex; align-items: center; gap: 8px; list-style: none; }
.pay-guide summary::-webkit-details-marker { display: none; }
.pay-guide summary::after { content: "›"; margin-left: auto; transform: rotate(90deg); transition: transform .15s; color: var(--muted-fg); font-size: 18px; }
.pay-guide:not([open]) summary::after { transform: none; }
.pay-guide h4 { font-size: 14px; font-weight: 600; margin: 18px 0 6px; }
.pay-guide p, .pay-guide li { color: var(--zn-700); line-height: 1.55; }
.pay-guide ul, .pay-guide ol { padding-left: 20px; margin: 0 0 6px; }
.pay-guide li { margin-bottom: 4px; }
/* ---------- The client gallery's cover ---------- */
.gallery-cover { position: relative; overflow: hidden; background: #111; color: #fff; }
.gallery-cover.cover-full { height: 100vh; height: 100svh; }
.gallery-cover.cover-banner { height: 56vh; min-height: 300px; max-height: 560px; }
.gallery-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
                     animation: cover-in 1.2s ease, cover-drift 15s ease-in-out 1.2s infinite alternate; }
/* A slow zoom toward the focal point and back (the "Ken Burns" look, 15 s each way), on the `scale` property so it combines with
   the fade-in (`transform`) and the parallax (`translate`). Paused while the cover is out of view (gallery.js). */
@keyframes cover-drift { from { scale: 1; } to { scale: 1.08; } }
.gallery-cover.is-away img { animation-play-state: running, paused; }
@media (prefers-reduced-motion: reduce) { .gallery-cover img { animation: none; } }
.gallery-cover::after { content: ""; position: absolute; inset: 0; pointer-events: none;
                        background: linear-gradient(to bottom, rgba(0,0,0,.05) 40%, rgba(0,0,0,.55)); }
.gc-text { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; text-align: center; padding: 0 24px 72px; }
.cover-banner .gc-text { padding-bottom: 40px; }
.gc-text .by { text-transform: uppercase; letter-spacing: .18em; font-size: 12px; font-weight: 600; opacity: .9; }
.gc-text h1 { font-size: clamp(34px, 6vw, 68px); font-weight: 600; letter-spacing: -0.035em; margin: 10px 0 0; color: #fff;
              text-shadow: 0 2px 24px rgba(0,0,0,.35); }
.gc-down { position: absolute; left: 50%; bottom: 18px; z-index: 1; transform: translateX(-50%); color: #fff; opacity: .85;
           animation: bob 2s ease-in-out infinite; }
.gc-down:hover { color: #fff; opacity: 1; }
.client-header.after-cover { padding-top: 48px; }
.client-header.after-cover:not(:has(.message)):not(:has(p)) { padding: 20px 0 0; }
@keyframes cover-in { from { opacity: 0; transform: scale(1.03); } to { opacity: 1; transform: none; } }
@keyframes bob { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 6px); } }
/* The gallery's cover in the photographer's grid and viewer. */
.tile .cover-badge { display: none; position: absolute; left: 8px; bottom: 8px; z-index: 2; background: #fff; color: var(--zn-900);
                     border-radius: 999px; font-size: 11.5px; font-weight: 600; padding: 3px 9px; box-shadow: var(--shadow);
                     align-items: center; gap: 4px; }
.tile.is-cover .cover-badge { display: inline-flex; }
.tile .cover-badge .icon { fill: #f5b301; stroke: #f5b301; }
.viewer-cover { border: 1px solid rgba(255,255,255,.3); background: none; color: #fff; border-radius: 999px; padding: 7px 14px;
                font-size: 13.5px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; margin-right: 8px; }
.viewer-cover.on { border-color: transparent; background: rgba(255,255,255,.12); cursor: default; }
.viewer-cover.on .icon { fill: #f5b301; stroke: #f5b301; }
/* Cover settings: pick the focal point, see computer and phone previews. */
#g-cover-style { grid-template-columns: repeat(3, auto); justify-content: start; }
.cover-setup { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 16px; }
.cover-pick { position: relative; width: 260px; max-width: 100%; cursor: crosshair; border-radius: 8px; overflow: hidden; line-height: 0; }
.cover-pick img { width: 100%; height: auto; display: block; }
.cover-dot { position: absolute; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; border: 3px solid #fff;
             box-shadow: 0 0 0 1px rgba(0,0,0,.4), 0 2px 8px rgba(0,0,0,.4); pointer-events: none; }
.cover-previews { flex: 1 1 240px; }
.cover-samples { display: flex; gap: 14px; align-items: flex-end; }
.cover-samples figure { margin: 0; text-align: center; font-size: 12px; color: var(--muted-fg); }
.cover-sample { overflow: hidden; border-radius: 6px; background: #111; margin-bottom: 4px; }
.cover-sample.wide { width: 176px; height: 99px; }
.cover-sample.tall { width: 56px; height: 99px; }
.cover-sample img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lightbox .lb-stage { touch-action: pan-y; }        /* sideways finger movements are ours (swipe), not the browser's */
/* A phone on its side: little height, so less space around the photo (counter and close sit over its corners). */
@media (max-width: 960px) and (max-height: 500px) and (orientation: landscape) {
  /* The photo gets the whole height; the buttons float, small and see-through, in the lower right corner. */
  .lb-stage { padding: 8px 56px calc(8px + env(safe-area-inset-bottom)); }
  .viewer .lb-stage { padding: 8px 56px 70px; }
  .lb-counter { top: 10px; }
  .lb-close { top: 8px; }
  .lb-mobilebar { left: auto; right: calc(10px + env(safe-area-inset-right)); bottom: calc(10px + env(safe-area-inset-bottom));
                  padding: 0; background: none; gap: 6px; }
  .lb-mobilebar .btn { height: 40px; border-radius: 999px; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
  .lb-mobilebar .btn-primary { flex: none; padding: 0 16px; background: rgba(255,255,255,.88); border-color: transparent; }
  .lb-mobilebar .btn-light { min-width: 44px; background: rgba(20,20,22,.55); }
  .lb-adjustbar { padding-top: 8px; padding-bottom: calc(8px + env(safe-area-inset-bottom)); }
  .lb-adjustbar .btn { height: 40px; }
}
.date-field { position: relative; display: flex; }
.date-field .form-control { padding-right: 44px; font-variant-numeric: tabular-nums; }
.date-field .date-btn { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 36px; height: 32px; border: 0;
                        background: none; color: var(--muted-fg); border-radius: 6px; display: flex; align-items: center; justify-content: center; }
.date-field .date-btn:hover { background: var(--zn-100); color: var(--foreground); }
.date-field .date-native { position: absolute; right: 0; bottom: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; border: 0; padding: 0; }
/* Photo numbers in the client gallery: on hover (a phone shows them in the viewer instead). */
.tile .tile-no { position: absolute; left: 8px; top: 8px; z-index: 2; background: rgba(12,12,14,.55); color: #fff; font-size: 11.5px;
                 font-weight: 600; padding: 2px 8px; border-radius: 999px; opacity: 0; transition: opacity .15s;
                 font-variant-numeric: tabular-nums; pointer-events: none; }
@media (hover: hover) { .client-grid .tile:hover .tile-no { opacity: 1; } }

/* Deleting a gallery: a separate, red-edged row under the settings; the facts in the confirmation. */
.danger-zone { max-width: 760px; margin-top: 28px; padding: 16px 18px; border: 1px solid #fecaca; border-radius: 10px;
               display: flex; align-items: center; gap: 16px; }
.danger-zone > div { flex: 1; }
.danger-zone p { margin: 2px 0 0; }
.btn-danger-outline { background: #fff; border-color: #fecaca; color: var(--destructive); white-space: nowrap; }
.btn-danger-outline:hover, .btn-danger-outline:focus { background: #fef2f2; border-color: var(--destructive); color: var(--destructive); }
.delete-facts { list-style: none; padding: 0; margin: 0 0 14px; }
.delete-facts li { display: flex; gap: 10px; align-items: flex-start; padding: 5px 0; font-size: 14px; }
.delete-facts li svg { flex: none; margin-top: 3px; color: var(--muted-fg); }
.archived-note { display: flex; align-items: center; gap: 16px; }
.archived-note span { flex: 1; }
@media (max-width: 600px) { .danger-zone, .archived-note { flex-direction: column; align-items: stretch; } }

/* Admin: the numbers at the top, the account list and an account's page. */
.admin-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 24px; }
.admin-stats > div { border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; background: var(--background); }
.admin-stats strong { display: block; font-size: 24px; font-variant-numeric: tabular-nums; line-height: 1.2; }
.admin-stats span { color: var(--muted-fg); font-size: 13px; }
.admin-search { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 16px; max-width: 760px; }
.admin-search .form-control[type=search] { flex: 1 1 260px; }
.admin-guests-switch { margin-left: 8px; white-space: nowrap; }
.admin-avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--zn-100); display: flex; align-items: center;
                justify-content: center; font-weight: 600; flex-shrink: 0; }
.admin-usage { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; color: var(--muted-fg); font-size: 13px;
               white-space: nowrap; }
.purpose-tag.tag-admin { background: #fef3c7; color: #92400e; }
.admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 28px; }
.admin-grid h4 { margin: 0 0 12px; }
.admin-facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; font-size: 14px; }
.admin-facts dt { color: var(--muted-fg); font-weight: 400; }
.admin-facts dd { margin: 0; }
.admin-action { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 14px; }
.admin-action .control-label, .admin-action .share-box { width: 100%; }
.admin-action .control-label { margin-bottom: -4px; }
.admin-h { font-size: 17px; margin: 0 0 10px; }
.admin-h + .list-card { margin-bottom: 28px; }
@media (max-width: 760px) {
  .admin-grid { grid-template-columns: 1fr; }
  .admin-usage { display: none; }
}

/* A phone on its side: wide enough for the desktop grid, but only ~390px tall. Rows of about a third of the
   screen's height, so several photos fit side by side and a whole row is in view. */
@media (max-height: 500px) and (orientation: landscape) {
  .client-grid { --row-h: 130px; padding: 0 12px 110px; }
  .client-grid .photo-grid { gap: 4px; }
}

/* Gallery presets and the folded-away settings in "New gallery". */
.preset-controls { display: flex; gap: 8px; align-items: center; max-width: 420px; }
.preset-controls select { flex: 1; }
.settings-accordion { border: 1px solid var(--border); border-radius: 10px; margin: 4px 0 0; }
.settings-accordion > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
.settings-accordion > summary::-webkit-details-marker { display: none; }
.settings-accordion > summary .acc-title { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; white-space: nowrap; }
.settings-accordion > summary .acc-summary { flex: 1; min-width: 0; color: var(--muted-fg); font-size: 13px;
                                             overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.settings-accordion > summary svg:last-child { flex: none; transition: transform .2s ease; color: var(--muted-fg); }
.settings-accordion[open] > summary svg:last-child { transform: rotate(180deg); }
.settings-accordion[open] > summary { border-bottom: 1px solid var(--border); }
.settings-accordion[open] > summary .acc-summary { visibility: hidden; }
.settings-accordion > .acc-body { padding: 16px; }
.preset-save { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 20px; padding-top: 16px;
               border-top: 1px solid var(--border); }
.preset-item { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--border); }
.preset-item:first-child { border-top: 0; }
.preset-item .grow { flex: 1; font-weight: 500; }
.preset-star { border: 0; background: none; padding: 4px; color: var(--zn-300, #d4d4d8); cursor: pointer; }
.preset-star.on { color: #d97706; }
.preset-star.on svg { fill: currentColor; }
@media (max-width: 640px) { .settings-accordion > summary .acc-summary { display: none; } }

/* "Client chooses prints": how the prints get ordered, as two smaller choices tucked under it. */
.sub-choices { margin: -4px 0 2px 50px; gap: 6px; }
.sub-choices .choice { padding: 10px 14px; }
.sub-choices .choice-text strong { font-size: 14px; }
.sub-choices .sub-warning { display: block; margin-top: 4px; color: #b45309; font-size: 12px; }
@media (max-width: 640px) { .sub-choices { margin-left: 16px; } }

/* The photographer's logos: the light one on a dark background, the dark one on a light background. */
.logo-slots { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 14px; }
.logo-slot { border: 1px solid var(--border); border-radius: 10px; padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.logo-preview { display: flex; align-items: center; justify-content: center; min-height: 96px; padding: 14px; border-radius: 8px; }
.logo-preview img { display: block; max-width: 100%; max-height: 90px; }
.logo-on-dark { background: #27272a; }
.logo-on-light { background: #f4f4f5; border: 1px solid var(--border); }
.logo-form { display: flex; gap: 8px; align-items: center; }
.logo-minis { display: flex; gap: 6px; margin-top: 6px; }
.logo-mini { display: block; max-height: 28px; max-width: 120px; padding: 3px; border-radius: 4px; }
@media (max-width: 640px) { .logo-slots { grid-template-columns: 1fr; } }
.logo-hint { display: flex; gap: 6px; align-items: flex-start; margin: 0; padding: 8px 10px; border-radius: 8px;
             background: #fef3c7; color: #92400e; font-size: 13px; }
.logo-hint svg { flex: none; margin-top: 2px; }
.logo-choice { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; padding-top: 12px; border-top: 1px solid var(--border); }
.logo-sizes { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-top: 4px; }
.logo-sizes .check-inline { display: inline-flex; align-items: center; gap: 8px; font-weight: 400; margin: 0; }
.logo-corner-row { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
.logo-corners { position: relative; width: 72px; height: 48px; border: 1.5px solid var(--zn-400, #a1a1aa); border-radius: 4px;
                background: linear-gradient(135deg, var(--zn-100, #f4f4f5), var(--zn-200, #e4e4e7)); }
.logo-corners label { position: absolute; margin: 0; cursor: pointer; padding: 4px; line-height: 0; }
.logo-corners input { margin: 0; cursor: pointer; }
.logo-corners .corner-nw { left: 0; top: 0; } .logo-corners .corner-ne { right: 0; top: 0; }
.logo-corners .corner-sw { left: 0; bottom: 0; } .logo-corners .corner-se { right: 0; bottom: 0; }

/* Sharing a gallery with family and friends (a link of their own). */
.own-link-note { display: inline-flex; gap: 6px; align-items: center; margin-top: 14px; padding: 6px 12px; border-radius: 999px;
                 background: var(--zn-100, #f4f4f5); font-size: 13px; }
.drawer-share { text-align: center; margin: 14px 0 0; }
.share-list { border: 1px solid var(--border); border-radius: 8px; }
.share-item { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 12px; border-top: 1px solid var(--border); }
.share-item:first-child { border-top: 0; }
.share-item .grow { flex: 1; font-weight: 500; }
.client-bar .spacer { flex: 1; }
@media (max-width: 640px) { .hide-xs { display: none; } }
.shared-link.is-closed strong { color: var(--muted-fg); text-decoration: line-through; }

/* The client's actions under the welcome message: a hint, one row of equal buttons, a caption. */
.client-hint { margin: 22px 0 0; color: var(--muted-fg); font-size: 14px; }
.client-hint svg { vertical-align: -2px; }
.client-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 270px)); justify-content: center; gap: 10px;
                  margin: 18px auto 0; max-width: 860px; }
.client-actions.cards-4 { grid-template-columns: repeat(2, 290px); }      /* four: two by two, not three and one */
.action-card { display: flex; align-items: center; gap: 12px; padding: 12px 16px; min-height: 60px; text-align: left;
               border: 1px solid var(--border); border-radius: 10px; background: var(--background); color: var(--foreground);
               font: inherit; cursor: pointer; transition: border-color .15s, background-color .15s; }
.action-card:hover, .action-card:focus { border-color: var(--zn-400, #a1a1aa); background: var(--zn-50, #fafafa);
                                         color: var(--foreground); text-decoration: none; }
.action-card svg { flex: none; color: var(--zn-600, #52525b); }
.action-card strong { display: block; font-weight: 600; font-size: 14px; line-height: 1.3; }
.action-card small { display: block; color: var(--muted-fg); font-size: 12.5px; line-height: 1.3; }
.client-caption { margin: 10px 0 0; color: var(--muted-fg); font-size: 12.5px; }
@media (max-width: 640px) { .client-actions, .client-actions.cards-4 { grid-template-columns: 1fr; max-width: 360px; } }

/* A lab's price list on its front page: a sizes × papers table in an accordion; it scrolls sideways on phones. */
.price-accordion > summary .acc-summary { visibility: visible !important; }
.price-matrix-wrap { overflow-x: auto; }
.lab-prices .price-matrix { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.lab-prices .price-matrix th, .lab-prices .price-matrix td { padding: 10px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.lab-prices .price-matrix thead th { font-weight: 600; font-size: 12.5px; color: var(--muted-fg); text-align: right; background: var(--zn-50, #fafafa); }
.lab-prices .price-matrix thead th:first-child, .lab-prices .price-matrix tbody th { text-align: left; }
.lab-prices .price-matrix tbody th { font-weight: 600; position: sticky; left: 0; background: var(--background); }
.lab-prices .price-matrix td { text-align: right; }
.lab-prices .price-matrix tbody tr:last-child th, .lab-prices .price-matrix tbody tr:last-child td { border-bottom: 0; }
.lab-prices .price-matrix tbody tr:hover th, .lab-prices .price-matrix tbody tr:hover td { background: var(--zn-50, #fafafa); }
.prices-note { margin: 18px 0 0; color: var(--muted-fg); font-size: 14px; }
.prices-note svg { vertical-align: -2px; }
.gallery-cover img, .gallery-cover .gc-text { will-change: translate; }
.addon-line { color: var(--foreground) !important; }
.addon-line svg { vertical-align: -2px; color: var(--muted-fg); }
/* Finishing options under an order row / cart line: one small select per group. */
.or-addons { flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding-left: 62px; }
.or-addons-label { font-size: 12px; color: var(--muted-fg); display: inline-flex; align-items: center; gap: 4px; }
.addon-pick { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-weight: 400; font-size: 12.5px; color: var(--muted-fg); }
.addon-pick select.form-control { height: 30px !important; width: auto !important; max-width: 220px; font-size: 12.5px; border-radius: 999px; padding: 2px 10px;
                                  line-height: normal; }   /* (Bootstrap's 30px line in a 30px box pushed the text down) */
@media (max-width: 640px) { .or-addons { padding-left: 0; } }
.cart-addons { padding-left: 0; margin-top: 10px; }
/* The lab's finishing options: a card per group, a price column per option. */
.addon-card { margin-bottom: 16px; }
.addon-matrix thead th { vertical-align: top; }
.addon-head { border: 0; background: none; padding: 0; font: inherit; font-weight: 600; color: var(--foreground); display: inline-flex;
              align-items: center; gap: 6px; cursor: pointer; }
.addon-head.inactive { color: var(--muted-fg); text-decoration: line-through; }
.addon-head svg { color: var(--muted-fg); }
.addon-papers { font-weight: 400; font-size: 11.5px; color: var(--muted-fg); margin-top: 2px; text-transform: none; letter-spacing: 0; }
.warn-text { color: #b45309; }
.swatch { display: inline-block; width: 12px; height: 12px; border-radius: 3px; border: 1px solid rgba(0,0,0,.2); }
.paper-checks { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.paper-checks .check-inline, .modal .check-inline { display: inline-flex; align-items: center; gap: 6px; font-weight: 400; margin: 0; }
.book-hint { margin: -8px 0 20px; }
.book-hint svg { vertical-align: -2px; }
.book-summary { padding-left: 18px; margin: 0 0 10px; }
.book-summary li { padding: 3px 0; }

/* The lab's price editor with many papers: compact columns, headers on two lines, the size column stays put when
   the table scrolls sideways, and a shadow on the right edge while there's more to scroll to. */
.matrix-scroll { overflow-x: auto; position: relative; }
.matrix-scroll .price-matrix thead th { white-space: normal; vertical-align: bottom; line-height: 1.25; min-width: 84px; max-width: 110px; }
.matrix-scroll .price-cell input { min-width: 0; width: 84px; padding-right: 30px; }
.matrix-scroll .price-matrix tbody th, .matrix-scroll .price-matrix thead th:first-child {
  position: sticky; left: 0; z-index: 1; background: var(--background); }
.matrix-scroll .price-matrix tbody th { box-shadow: 1px 0 0 var(--border); }
.matrix-shadow { position: relative; }
.matrix-shadow::after { content: ""; position: absolute; top: 0; right: 0; bottom: 0; width: 28px; pointer-events: none; opacity: 0;
                        background: linear-gradient(to right, rgba(0,0,0,0), rgba(0,0,0,.08)); border-radius: 0 12px 12px 0;
                        transition: opacity .2s; }
.matrix-shadow.more::after { opacity: 1; }

/* Print sizes as chips in rows by proportion; papers as a compact list; proportion rows in the price tables. */
.catalog-block { margin-bottom: 20px; }
.catalog-block .card-header .muted { margin-left: 4px; }
.size-groups { padding: 6px 20px 14px; }
.size-group { display: flex; align-items: flex-start; gap: 14px; padding: 8px 0; border-top: 1px solid var(--border); }
.size-group:first-child { border-top: 0; }
.size-group .ratio { width: 56px; flex: none; padding-top: 6px; font-size: 12px; font-weight: 600; color: var(--muted-fg); }
.size-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.size-chip { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 11px; border: 1px solid var(--border);
             border-radius: 8px; background: var(--background); font: inherit; font-size: 13px; font-weight: 500; cursor: pointer;
             color: var(--foreground); font-variant-numeric: tabular-nums; }
.size-chip:hover { border-color: var(--zn-400, #a1a1aa); background: var(--zn-50, #fafafa); }
.size-chip .shape { display: block; border: 1.5px solid var(--zn-400, #a1a1aa); border-radius: 2px; background: var(--zn-50, #fafafa); }
.size-chip.unpriced { border-style: dashed; color: var(--muted-fg); }
.size-chip.inactive { opacity: .45; }
#papers .catalog-row { padding: 9px 20px; }
#papers .catalog-row .grow { display: flex; align-items: baseline; gap: 12px; }
#papers .catalog-row .title { white-space: nowrap; }
#papers .catalog-row .sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.price-matrix tr.ratio-row th { padding: 6px 10px !important; font-size: 11.5px; font-weight: 600; color: var(--muted-fg);
                                text-transform: none; letter-spacing: .02em; background: var(--zn-50, #fafafa) !important;
                                box-shadow: none; position: static; }
.addon-chips .chip .swatch { margin-right: 6px; vertical-align: -1px; }
#c-addons .picker-label { margin-top: 14px; }
.option-table-title { font-size: 15px; font-weight: 600; margin: 0; padding: 18px 14px 6px; border-top: 1px solid var(--border); }
.matrix-scroll .price-cell .pc { width: 84px; }          /* the currency stays inside its box, however wide the column */
/* Frames drawn around print previews (finishing options with a colour): a solid profile with a little depth. */
.framed { display: inline-block; border-style: solid; line-height: 0; border-radius: 1px;
          box-shadow: 0 1px 3px rgba(0,0,0,.28), inset 0 0 0 1px rgba(255,255,255,.12); }
.framed > .paper, .framed > .crop-thumb { box-shadow: inset 0 0 3px rgba(0,0,0,.35); }
.framed .paper { border-radius: 0; }
.frame-preview { margin-top: 14px; text-align: center; padding: 18px; background: var(--zn-100, #f4f4f5); border-radius: 10px; }
.frame-preview p { margin: 10px 0 0; }
.cs-paper .framed { box-shadow: 0 2px 8px rgba(0,0,0,.3); }
/* The client's choices as a compact form: label left, menu right. */
.pick-form { display: grid; gap: 8px; margin-top: 4px; }
.pf-row { display: grid; grid-template-columns: 92px 1fr; align-items: center; gap: 10px; margin: 0; font-weight: 400; }
.pf-label { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--muted-fg); }
.pf-control { display: flex; align-items: center; gap: 8px; min-width: 0; }
.pf-control select.form-control { flex: 1; min-width: 0; height: 38px; border-radius: 8px; }
.pf-swatch { width: 16px; height: 16px; flex: none; }
.pf-fit { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.pf-fit-btn { border: 0; background: var(--background); padding: 7px 12px; font: inherit; font-size: 13px; cursor: pointer; color: var(--muted-fg); }
.pf-fit-btn + .pf-fit-btn { border-left: 1px solid var(--border); }
.pf-fit-btn.selected { background: var(--zn-900, #18181b); color: #fff; }
.line-price { text-align: right; font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; margin: 12px 0 -4px; min-height: 4px; }

/* the exploded sketch of the layers a lab offers (sketch.py), in the client's order panel */
.layer-sketch { margin: 4px 0 14px; }
.layer-sketch-svg { display: block; width: 100%; height: auto; max-height: 200px; }
.layer-sketch figcaption { margin-top: 6px; font-size: 12px; line-height: 1.45; color: var(--muted-fg); }
.layer-sketch .ls-row { display: flex; gap: 7px; align-items: baseline; margin-top: 3px; }
.layer-sketch .ls-n { flex: none; width: 16px; height: 16px; border-radius: 50%; background: var(--zn-900); color: #fff;
                      font-size: 10px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center;
                      transform: translateY(3px); }
.layer-sketch strong { color: var(--fg, #18181b); font-weight: 600; }
.layer-sketch .swatch { width: 9px; height: 9px; margin: 0 3px 0 1px; vertical-align: 0; }

/* ---------------------------------------------------------------- album designer (album.js) */
.album-page { max-width: none; padding: 14px 24px 40px; }
.al-head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 16px; margin-bottom: 16px; }
.al-head-mid { display: flex; justify-content: center; }
.al-head-right { justify-content: flex-end; }
.al-tools-btn { height: 44px; padding: 0 26px; font-size: 16px; font-weight: 600; border-radius: 10px; display: inline-flex; align-items: center; gap: 8px; }
@media (max-width: 1100px) { .al-head { grid-template-columns: 1fr auto; } .al-head-left { grid-column: 1 / -1; } }
.al-head h1 { margin: 4px 0 2px; font-size: 24px; }
.al-books-btn { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 0; color: inherit; cursor: pointer; }
.al-books-btn:hover h1 { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.al-books .dropdown-menu > li.active > a { font-weight: 600; }
.al-head-right { display: flex; align-items: center; gap: 8px; }
.al-status { min-width: 90px; text-align: right; }
.al-size { display: inline-flex; align-items: center; gap: 6px; margin: 0 8px 0 4px; color: var(--muted-fg); font-weight: normal; }
.al-size input { width: 120px; }
.al-status[data-kind="error"] { color: var(--danger, #b91c1c); }
.al-status[data-kind="ok"] { color: var(--success, #15803d); }
.al-body { display: grid; grid-template-columns: minmax(0, 1fr) 16px var(--al-panel, 300px); gap: 4px; align-items: start; }
/* the divider between the spreads and the photos: drag it to change the photos' width */
.al-splitter { position: sticky; top: 16px; height: calc(100vh - 32px); cursor: col-resize; display: flex; justify-content: center;
               align-items: center; touch-action: none; user-select: none; outline: none; }
.al-splitter i { width: 4px; height: 48px; border-radius: 2px; background: var(--zn-300, #d4d4d8); transition: background .15s, height .15s; }
.al-splitter:hover i, .al-splitter:focus-visible i, .al-splitter.dragging i { background: var(--zn-600, #52525b); height: 72px; }
body.al-resizing, body.al-resizing * { cursor: col-resize !important; user-select: none !important; }
.al-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 22px 18px; }
.al-spread { position: relative; border-radius: 10px; padding: 6px; border: 2px solid transparent; transition: border-color .15s, background-color .15s; }
.al-spread.selected .al-num { background: #fff; color: var(--zn-900); box-shadow: inset 0 0 0 2px var(--zn-900); }   /* the current spread */
.al-spread.drop-over { border-color: #2563eb; background: #eff6ff; }
.al-drop-line { position: fixed; z-index: 1000; background: #2563eb; border-radius: 2px; pointer-events: none; }   /* where a moved spread lands */
.al-paper { position: relative; aspect-ratio: var(--al-ar, 2); box-shadow: 0 1px 3px rgba(0,0,0,.18), 0 0 0 1px rgba(0,0,0,.06); overflow: hidden; }
.al-trim { position: absolute; border: 1px dashed rgba(220, 38, 38, .55); pointer-events: none; z-index: 201; }
.al-lowres { position: absolute; right: 4px; top: 4px; width: 10px; height: 10px; border-radius: 50%; background: #dc2626; box-shadow: 0 0 0 2px #fff; z-index: 2; }
.al-cpin { position: absolute; transform: translate(-50%, -50%); z-index: 210; width: 22px; height: 22px; border-radius: 50%;
           border: 2px solid #fff; background: #e11d48; color: #fff; font-size: 11px; font-weight: 700; padding: 0;
           display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 1px 4px rgba(0,0,0,.35); cursor: pointer; }
.al-cpin.draft { background: #71717a; }
/* the check (Actions → Check the photobook) */
.al-check-progress { margin-bottom: 14px; font-size: 13px; }
.al-check-bar { height: 4px; background: var(--zn-100); border-radius: 2px; margin-top: 6px; overflow: hidden; }
.al-check-bar i { display: block; height: 100%; width: 0; background: var(--zn-900); transition: width .4s; }
.al-check-head { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--zn-500); margin: 16px 0 6px; }
.al-check-list { list-style: none; margin: 0; padding: 0; }
.al-check-list li { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-top: 1px solid var(--border); font-size: 13px; }
.al-check-list li > span { flex: 1; min-width: 0; }
.al-check-list img { width: 44px; height: 44px; object-fit: cover; border-radius: 4px; flex: none; }
.al-check-face { width: 44px; height: 44px; border-radius: 50%; flex: none; background-repeat: no-repeat; background-color: var(--zn-100); }
.al-check-warn > .icon { color: #c2410c; flex: none; }
.al-check-note > .icon { color: var(--zn-500); flex: none; }
.al-check-ok { color: var(--ok); font-weight: 500; }
.al-check-mark { position: absolute; z-index: 205; border: 2px solid #f97316; border-radius: 50%; pointer-events: none;
                 box-shadow: 0 0 0 2px rgba(255,255,255,.7); animation: al-check-in .5s ease; }
.al-check-mark.this { border-color: #dc2626; border-width: 3px; }
@keyframes al-check-in { from { transform: scale(1.6); opacity: 0; } }
#al-comments-btn.has-new { border-color: #e11d48; color: #be123c; }
.al-clist { list-style: none; padding: 0; margin: 6px 0 14px; }
.al-c { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-top: 1px solid var(--border); }
.al-c p { margin: 2px 0 0; white-space: pre-wrap; }
.al-c.done p { color: var(--muted-fg); text-decoration: line-through; }
.al-c.flash { background: #fef9c3; }
.al-c .check-row { margin: 0; align-items: center; gap: 6px; }
.al-c-num { width: 22px; height: 22px; border-radius: 50%; background: #e11d48; color: #fff; font-size: 11px; font-weight: 700;
            display: inline-flex; align-items: center; justify-content: center; }
.al-c.done .al-c-num { background: #a1a1aa; }
.al-review { margin-bottom: 10px; }
.al-review h5 { margin: 12px 0 4px; font-weight: 600; }
.al-approved { color: #15803d; font-weight: 600; }
.al-review-msg { white-space: pre-wrap; background: var(--zn-50, #fafafa); padding: 8px 10px; border-radius: 6px; }
.al-actions { display: inline-block; }
.al-actions .dropdown-menu .icon { margin-right: 6px; color: var(--muted-fg); }
.al-actions .dropdown-menu > li > a.text-danger { color: #b91c1c; }
.al-actions .dropdown-menu .text-danger .icon { color: inherit; }
.al-bg-row input[type=color] { width: 56px; height: 40px; padding: 0; border: 1px solid var(--border); border-radius: 6px; background: none; }
.al-bg-presets { display: inline-flex; gap: 6px; }
.al-bg-preset { width: 28px; height: 28px; border-radius: 50%; border: 1px solid rgba(0,0,0,.2); padding: 0; }
.al-vlist { list-style: none; padding: 0; margin: 0; }
.al-v { display: flex; align-items: center; gap: 8px; padding: 10px 0; border-top: 1px solid var(--border); }
.al-v:first-child { border-top: 0; }
.al-v-main { flex: 1; min-width: 0; }
.al-products { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); }
.al-fold { position: absolute; left: 50%; top: 0; bottom: 0; width: 0; border-left: 1px dashed rgba(0,0,0,.18); pointer-events: none; z-index: 200; }
.al-cell { position: absolute; overflow: hidden; background: var(--zn-100); cursor: grab; }
.al-cell img { position: absolute; max-width: none; user-select: none; pointer-events: none; }
/* the cover (albumcover.py): empty windows, the spine and fold lines, the card above the spreads, the editor's
   photo row, the chooser and the materials */
/* graphics on a spread (albumgraphics.py): dropped files placed freely, over the photos and under the texts */
.al-graphic, .fb-graphic { position: absolute; z-index: 150; pointer-events: none; }
.al-graphic img, .fb-graphic img { display: block; width: 100%; height: 100%; pointer-events: none; user-select: none; }
.al-graphic.editing { pointer-events: auto; cursor: move; touch-action: none; }
.al-graphic.under, .fb-graphic.under { z-index: 0; }                   /* behind the photos, on the background */
.al-graphic.al-gx-ghost { z-index: 160; pointer-events: none; }         /* its handle above the photos */
.al-graphic.al-gx-ghost.selected .al-gx-ink { outline: 2px dashed #3b82f6; }
.al-gx-ghost .al-gx-tab, .al-gx-ghost .al-gx-resize, .al-gx-ghost .al-gx-del { pointer-events: auto; }
.al-gx-tab { position: absolute; left: -11px; top: -11px; width: 22px; height: 22px; border-radius: 50%; background: #3b82f6;
             color: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: move;
             box-shadow: 0 1px 3px rgba(0,0,0,.35); }
.al-gxbar .al-gx-label { font-weight: 600; color: #fff; margin-right: 4px; }
.al-gx-flip.active { background: #52525b; color: #fff; }
.al-gx-rotate { position: absolute; left: 50%; top: -30px; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%;
                background: #fff; border: 2px solid #3b82f6; cursor: grab; display: none; }
.al-gx-rotate::after { content: ""; position: absolute; left: 50%; top: 12px; height: 16px; border-left: 2px solid #3b82f6;
                       margin-left: -1px; }                                    /* the stem down to the graphic */
.al-graphic.selected .al-gx-rotate { display: block; }
.al-gx-ghost .al-gx-rotate { pointer-events: auto; }
.al-gx-under input[type=range] { width: 110px; }
.al-gx-under { display: inline-flex; align-items: center; gap: 6px; margin: 0 6px; color: #e4e4e7; font-weight: 400; }
/* the outline and handles on what shows of the graphic (.al-gx-ink), not its whole file */
.al-gx-ink { position: absolute; pointer-events: none; }
.al-gx-ink > * { pointer-events: auto; }
.al-graphic.editing:not(.al-gx-ghost):hover .al-gx-ink { outline: 1px dashed rgba(59,130,246,.8); }
.al-graphic.selected:not(.al-gx-ghost) .al-gx-ink { outline: 2px solid #3b82f6; }
.al-gx-resize { position: absolute; right: -6px; bottom: -6px; width: 12px; height: 12px; background: #fff; border: 2px solid #3b82f6;
                border-radius: 2px; cursor: nwse-resize; display: none; }
.al-gx-del { position: absolute; right: -10px; top: -10px; width: 22px; height: 22px; border-radius: 50%; border: 0; padding: 0;
             background: #ef4444; color: #fff; display: none; align-items: center; justify-content: center; }
.al-graphic.selected .al-gx-resize { display: block; }
.al-graphic.selected .al-gx-del { display: inline-flex; }
.al-gx-row { width: 100%; max-width: 1400px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 0 0;
             color: #d4d4d8; font-size: 12.5px; }
.al-gx-row[hidden] { display: none; }
.al-gx-label { font-weight: 600; color: #fff; }
.al-gx-strip { display: flex; gap: 6px; }
.al-gx-thumb { position: relative; height: 44px; min-width: 44px; padding: 3px; border-radius: 4px; cursor: grab;
               background: repeating-conic-gradient(#3f3f46 0 25%, #52525b 0 50%) 0 0 / 10px 10px; }   /* shows transparency */
.al-gx-thumb img { height: 38px; width: auto; display: block; }
.al-gx-forget { position: absolute; right: -6px; top: -6px; width: 16px; height: 16px; border-radius: 50%; border: 0; padding: 0;
                background: #18181b; color: #fff; display: none; align-items: center; justify-content: center; }
.al-gx-thumb:hover .al-gx-forget { display: inline-flex; }
.al-gx-add { color: #fff !important; cursor: pointer; margin: 0; }
.al-gx-hint { color: #a1a1aa; }
.al-gx-progress { color: #93c5fd; }
#al-ed-stage.al-gx-dropping .al-paper { outline: 3px dashed #3b82f6; outline-offset: 4px; }
/* embossing on a material cover (albumcover.py FINISHES): pressed into it, or foil; a look, not a photograph */
.al-cv-zone { position: absolute; z-index: 199; border: 1px dashed rgba(255,255,255,.8); outline: 1px dashed rgba(0,0,0,.35);
              pointer-events: none; }
.al-cv-zone span { position: absolute; left: 6px; top: 4px; font-size: 10px; letter-spacing: .05em; text-transform: uppercase;
                   color: rgba(255,255,255,.9); text-shadow: 0 1px 2px rgba(0,0,0,.5); }
.emb-blind { color: rgba(0,0,0,.24) !important; mix-blend-mode: multiply;
             text-shadow: 0 1px 0 rgba(255,255,255,.4), 0 -1px 0 rgba(0,0,0,.3); }
.emb-gold, .emb-silver, .emb-rosegold, .emb-copper { color: transparent !important; -webkit-background-clip: text; background-clip: text;
             filter: drop-shadow(0 1px 0 rgba(0,0,0,.35)); caret-color: #222; }
.emb-gold { background-image: linear-gradient(160deg, #7a5c1e, #e9d18a 30%, #b48a35 50%, #f6e7b0 68%, #8c6a26); }
.emb-silver { background-image: linear-gradient(160deg, #6b6b6b, #f2f2f2 30%, #9a9a9a 50%, #ffffff 68%, #777); }
.emb-rosegold { background-image: linear-gradient(160deg, #8e5a4f, #f3c9bd 30%, #b97a6c 50%, #f8d9cf 68%, #8e5a4f); }
.emb-copper { background-image: linear-gradient(160deg, #7a3e1d, #e8a274 30%, #a85a2c 50%, #f0b98f 68%, #7a3e1d); }
.emb-black { color: #141414 !important; text-shadow: 0 1px 0 rgba(255,255,255,.18); }
.emb-white { color: #f7f7f4 !important; text-shadow: 0 1px 1px rgba(0,0,0,.35); }
.al-tx-finish { width: auto; }
/* the border round a spread's photos (album.js borderHtml, album-view.js) and its menu in the editor */
.al-border, .fb-border { position: absolute; inset: 0; box-sizing: border-box; pointer-events: none; z-index: 2; }
.al-ed-border .dropdown-menu { padding: 14px 16px; min-width: 300px; color: var(--zn-900); }
.al-ed-tools .al-bd-menu label { color: var(--zn-900); }                    /* not the bar's light grey */
.al-bd-row { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-weight: 500; font-size: 13px; }
.al-bd-row input[type=range] { flex: 1; }
.al-bd-preset { width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--zn-300, #d4d4d8); padding: 0; }
.al-bd-preset.active { box-shadow: 0 0 0 2px #fff, 0 0 0 4px #3b82f6; }
.al-cell.al-empty { display: flex; align-items: center; justify-content: center; text-align: center; padding: 4px; font-size: 12px;
                    color: #52525b; background: rgba(255,255,255,.72); outline: 2px dashed rgba(0,0,0,.25); outline-offset: -4px; }
.al-cell.al-empty.active { outline-color: #3b82f6; }
.al-cell.drop-over { outline: 3px solid #2563eb; outline-offset: -3px; background-color: rgba(239,246,255,.85); }
.al-cover-mini { cursor: pointer; }
.al-cv-line { position: absolute; pointer-events: none; z-index: 200; }
.al-cv-line.v { top: 0; bottom: 0; width: 0; border-left: 1px dashed rgba(220,38,38,.65); }
.al-cv-line.h { left: 0; right: 0; height: 0; border-top: 1px dashed rgba(220,38,38,.65); }
.al-cv-label { position: absolute; top: 8px; transform: translateX(-50%); z-index: 201; pointer-events: none; font-size: 11px;
               font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: #fff; background: rgba(24,24,27,.55);
               padding: 2px 8px; border-radius: 999px; }
.al-cover-card { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; padding: 10px; border: 1px solid var(--border);
                 border-radius: 8px; max-width: 640px; }
.al-cover-card[hidden] { display: none; }
.al-cover-mini { width: 280px; flex: none; }
.al-cover-card .btn { margin-top: 8px; }
.al-cover-only { display: none !important; }
.al-cover-mode .al-cover-only:not([hidden]) { display: inline-flex !important; }
.al-cover-mode p.al-cover-only:not([hidden]) { display: block !important; }
.al-cover-mode .al-editor-hint:not(.al-cover-only) { display: none; }
.al-cv-strip { width: 100%; max-width: 1400px; display: flex; gap: 4px; overflow-x: auto; padding: 10px 0 4px; }
.al-cv-strip[hidden] { display: none; }
.al-cv-thumb { height: 72px; width: auto; flex: none; border-radius: 3px; cursor: grab; }
.al-cv-thumb.used { opacity: .45; }
.al-cover-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-bottom: 8px; }
.al-cover-tile { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px; border: 1px solid var(--border);
                 border-radius: 8px; background: #fff; text-align: center; font-size: 12.5px; }
.al-cover-tile:hover { border-color: var(--zn-400, #a1a1aa); }
.al-cover-tile.current { border: 2px solid var(--zn-900); }
.al-cover-tile img { width: 100%; height: 110px; object-fit: contain; }
.al-mat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; margin-bottom: 6px; }
.al-mat { display: flex; flex-direction: column; gap: 4px; padding: 0; border: 0; background: none; font-size: 12px; text-align: center; }
.al-mat img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; box-shadow: 0 0 0 1px rgba(0,0,0,.1); }
.al-mat.current img { box-shadow: 0 0 0 3px var(--zn-900); }
.al-missing { display: flex; align-items: center; justify-content: center; font-size: 11px; color: var(--muted-fg); background: repeating-linear-gradient(45deg, #f4f4f5, #f4f4f5 6px, #e4e4e7 6px, #e4e4e7 12px); }
.al-cell-no { position: absolute; left: 6px; bottom: 6px; font-size: 12px; font-weight: 600; background: rgba(0,0,0,.65); color: #fff;
              padding: 3px 8px 3px 5px; border-radius: 5px; cursor: grab; touch-action: none; user-select: none; z-index: 3;
              display: inline-flex; align-items: center; gap: 3px; }
.al-cell-no:hover { background: rgba(0,0,0,.85); }
.al-swap-ghost { position: fixed; bottom: auto; right: auto; height: auto; z-index: 2000; pointer-events: none; cursor: grabbing;
                 box-shadow: 0 4px 12px rgba(0,0,0,.4); }
.al-editor-stage .al-cell.al-swap-from { opacity: .55; }
.al-editor-stage .al-cell.al-swap-to::after { content: ""; position: absolute; inset: 0; z-index: 4; border: 4px solid #22c55e;
                                              background: rgba(34,197,94,.12); pointer-events: none; }
.al-spread { container-type: inline-size; }
.al-bar { display: flex; align-items: center; gap: 2px; margin-top: 6px; min-width: 0; }
.al-bar .al-layout { display: inline-flex; align-items: center; white-space: nowrap; }

.al-bar button { border: 0; background: none; padding: 6px 8px; border-radius: 6px; color: var(--zn-800, #27272a); line-height: 1; font-size: 19px; }
.al-bar button .icon { stroke-width: 2.5; }        /* bolder than the site's usual 1.75 */
.al-bar button:hover:not(:disabled) { background: var(--zn-100); color: var(--fg, #18181b); }
.al-bar button:disabled { opacity: .35; }
.al-bar-gap { flex: 1; }
.al-tpl { position: relative; }
.al-tpl .al-tpl-no { display: block; font-size: 11px; color: var(--muted-fg); margin-top: 3px; }
@container (max-width: 400px) { .al-bar button { padding: 5px 4px; } }       /* small spreads: tighter buttons */
@container (max-width: 300px) {                 /* the smallest: without the mirror buttons */
  .al-bar [data-act="fliph"], .al-bar [data-act="flipv"] { display: none; }
}
.al-num { min-width: 30px; height: 24px; padding: 0 9px; border-radius: 5px; letter-spacing: .02em; background: var(--zn-900); color: #fff; font-size: 13px; font-weight: 600;
          display: inline-flex; align-items: center; justify-content: center; margin-right: 6px; cursor: grab; }
.al-drop-hint { position: absolute; left: 0; right: 0; top: 34%; text-align: center; pointer-events: none; }
.al-empty { text-align: center; padding: 48px 24px; border: 2px dashed var(--border); border-radius: 10px; margin-bottom: 20px; }
.al-keys { margin-top: 20px; }
.al-export-btn { margin-left: 10px; }
#al-share.is-shared { border-color: #16a34a; color: #15803d; }
.al-progress { height: 8px; border-radius: 4px; background: var(--zn-100); overflow: hidden; }
.al-progress i { display: block; height: 100%; width: 0; background: var(--zn-900); transition: width .4s; }
.al-shapes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.al-shape { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 10px; border: 2px solid var(--border);
            border-radius: 10px; background: #fff; }
.al-shape:hover:not(:disabled) { border-color: var(--zn-900); }
.al-shape.current { border-color: var(--zn-900); }
.al-shape:disabled { opacity: .55; cursor: not-allowed; }
.al-shape-pic { width: 100%; display: flex; justify-content: center; align-items: center; min-height: 96px; }
.al-shape-pic i { display: block; width: 100%; max-width: 140px; border: 2px solid var(--zn-700, #3f3f46); border-radius: 2px;
                  background: linear-gradient(90deg, transparent calc(50% - 1px), var(--zn-400, #a1a1aa) calc(50% - 1px), var(--zn-400, #a1a1aa) calc(50% + 1px), transparent calc(50% + 1px)), var(--zn-100); }
@media (max-width: 520px) { .al-shapes { grid-template-columns: 1fr; } }
.al-auto-row { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.al-auto-row input { width: 70px; text-align: center; }
.al-auto-row select { width: auto; }
.al-auto-sub { margin-top: 8px; }
.al-photos { position: sticky; top: 16px; max-height: calc(100vh - 32px); display: flex; flex-direction: column; border: 1px solid var(--border);
             border-radius: 10px; background: #fff; }
.al-photos.drop-over { border-color: #2563eb; background: #eff6ff; }
.al-photos-head { padding: 12px 12px 8px; border-bottom: 1px solid var(--border); }
.al-photos-tools { margin-top: 8px; display: grid; gap: 4px; }
.al-photos-tools .check-row { margin: 0; }
/* the photos at their own proportions, in rows that fill the width (like the gallery's grid); the slider sets the
   rows' height */
.al-strip { overflow-y: auto; padding: 10px; display: flex; flex-wrap: wrap; gap: 1px; align-content: flex-start; --row-h: 84px; }
.al-strip::after { content: ""; flex-grow: 999999; }
.al-thumb-size { margin: 4px 0 0; }
.al-thumb-size input { flex: 1; width: auto; }
.al-body.photos-hidden { grid-template-columns: minmax(0, 1fr); }
.al-body.photos-hidden .al-photos, .al-body.photos-hidden .al-splitter { display: none; }
.al-switch { display: inline-flex; align-items: center; gap: 6px; margin: 0 6px 0 0; font-weight: normal; font-size: 13px; color: var(--muted-fg); cursor: pointer; }
.al-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.al-switch-track { width: 30px; height: 18px; border-radius: 9px; background: var(--zn-300, #d4d4d8); position: relative; transition: background .15s; }
.al-switch-track::after { content: ""; position: absolute; left: 2px; top: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff;
                          box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .15s; }
.al-switch input:checked + .al-switch-track { background: var(--zn-900); }
.al-switch input:checked + .al-switch-track::after { transform: translateX(12px); }
.al-switch input:focus-visible + .al-switch-track { outline: 2px solid #3b82f6; outline-offset: 2px; }
.al-thumb { position: relative; flex-grow: calc(var(--ar, 1) * 100); flex-basis: calc(var(--ar, 1) * var(--row-h));
            border-radius: 4px; overflow: hidden; background: var(--zn-100); cursor: pointer; }
.al-thumb::before { content: ""; display: block; padding-bottom: calc(100% / var(--ar, 1)); }
.al-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.al-thumb.used img { opacity: .45; }
.al-thumb-no { position: absolute; left: 3px; bottom: 3px; font-size: 10px; background: rgba(0,0,0,.55); color: #fff; padding: 0 4px; border-radius: 3px; }
.al-thumb-no { cursor: zoom-in; }   /* opens the photo large */
.al-thumb-no:hover { background: rgba(0,0,0,.85); }
.al-thumb-used { position: absolute; right: 3px; top: 3px; font-size: 10px; font-weight: 600; min-width: 16px; height: 16px; padding: 0 3px; border-radius: 8px;
                 background: #16a34a; color: #fff; display: inline-flex; align-items: center; justify-content: center; }
.al-thumb:not(.used) .al-thumb-used { display: none; }
.al-thumb.twice .al-thumb-used { background: #d97706; }
.al-thumb-chosen { position: absolute; left: 3px; top: 3px; color: #f59e0b; filter: drop-shadow(0 0 1px rgba(0,0,0,.6)); }
body.al-editing { overflow: hidden; }
.al-editor { position: fixed; inset: 0; z-index: 1040; background: #18181b; overflow-y: auto; display: flex; flex-direction: column; align-items: center;
             padding: 16px 24px; color: #fff; }
.al-editor-bar { width: 100%; max-width: 1400px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.al-editor-bar .btn-ghost { color: #fff; }
.al-editor .btn-ghost:hover, .al-editor .btn-ghost:focus, .al-editor .open > .btn-ghost {
  color: #fff; background: rgba(255,255,255,.14); }                   /* the site's light hover is for light pages */
.al-ed-tools { flex: 1; display: flex; align-items: center; gap: 16px; justify-content: center; flex-wrap: wrap; }
.al-ed-tools label { margin: 0; display: inline-flex; align-items: center; gap: 6px; color: #d4d4d8; }
.al-ed-tools input[type=range] { width: 160px; }
.al-ed-bg input { width: 32px; height: 24px; padding: 0; border: 0; background: none; }
.al-editor-stage { width: min(100%, 1400px, calc((100vh - 150px) * 2)); }
.al-editor-stage .al-cell { cursor: move; touch-action: none; }
.al-editor-stage .al-cell.active { outline: 2px solid #3b82f6; outline-offset: -2px; }
.al-editor-hint { color: #a1a1aa; margin-top: 12px; text-align: center; }
.al-tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; max-height: 65vh; overflow-y: auto; }
.al-tpl { border: 2px solid transparent; border-radius: 6px; padding: 4px; background: none; }
.al-tpl:hover { border-color: var(--zn-300, #d4d4d8); }
.al-tpl.current { border-color: var(--zn-900); }
.al-tpl .al-cell { cursor: pointer; }
@media (max-width: 900px) {
  .al-body { grid-template-columns: 1fr; }
  .al-splitter { display: none; }
  .al-photos { position: static; max-height: 50vh; order: -1; }
  .al-grid { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------- the shared album as a flip book (album-view.js) */
.album-view { background: #ececec; }
.fb { margin: 0 auto; padding: 68px 16px 12px; }                /* clear of the fixed bar on top */
.fb-row { display: flex; align-items: center; gap: 10px; }
.fb-book { flex: 1; min-width: 0; perspective: 2600px; }
.fb-stage { position: relative; aspect-ratio: var(--fb-ar, 2); max-height: calc(100vh - 190px); margin: 0 auto;
            width: min(100%, calc((100vh - 190px) * var(--fb-ar, 2))); touch-action: pan-y; user-select: none; cursor: pointer; }
.fb-spread { position: absolute; inset: 0; z-index: 0; box-shadow: 0 10px 30px rgba(0,0,0,.18), 0 2px 6px rgba(0,0,0,.12); }
.fb-paper { position: absolute; inset: 0; overflow: hidden; }
.fb-cell { position: absolute; overflow: hidden; }
.fb-cell img { position: absolute; max-width: none; pointer-events: none; }
.fb-missing { background: #e4e4e7; }
/* the closed book (album-view.js coverHtml): the front cover on the right page, the back on the left, against the fold */
.fb-spread-cover { box-shadow: none; }
.fb-closed { position: absolute; top: 0; bottom: 0; width: 50%; display: flex; align-items: center; }
.fb-closed-front { right: 0; justify-content: flex-start; }
.fb-closed-back { left: 0; justify-content: flex-end; }
.fb-cover-box { position: relative; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,.22), 0 2px 6px rgba(0,0,0,.14); }
.fb-closed-front .fb-cover-box { border-radius: 0 3px 3px 0; }
.fb-closed-back .fb-cover-box { border-radius: 3px 0 0 3px; }
.fb-cover-full { position: absolute; }
.fb-thumb-cover { position: relative; aspect-ratio: var(--fb-ar, 2); }
.fb-thumb-cover .fb-cover-box { box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.fb-half { position: absolute; top: 0; bottom: 0; width: 50%; overflow: hidden; }
.fb-half.fb-left { left: 0; }
.fb-half.fb-right { right: 0; }
.fb-full { position: absolute; top: 0; bottom: 0; width: 200%; }
.fb-left .fb-full { left: 0; }
.fb-right .fb-full { right: 0; }
.fb-stay { z-index: 5; }
.fb-leaf { position: absolute; top: 0; bottom: 0; transform-style: preserve-3d; z-index: 10; will-change: transform; }
.fb-face { position: absolute; inset: 0; overflow: hidden; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.fb-face .fb-full { position: absolute; top: 0; bottom: 0; }
.fb-back { transform: rotateY(180deg); }
.fb-shade { position: absolute; inset: 0; pointer-events: none; opacity: 0; z-index: 2;
            background: linear-gradient(90deg, rgba(0,0,0,.25), transparent 60%); }
.fb-arrow { flex: none; width: 48px; height: 48px; border-radius: 50%; border: 0; background: #fff; color: var(--zn-900);
            box-shadow: 0 1px 4px rgba(0,0,0,.15); display: inline-flex; align-items: center; justify-content: center; }
.fb-arrow:disabled { opacity: .3; }
.fb-count { text-align: center; margin: 12px 0 8px; font-weight: 600; }
.fb-thumbs { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 10px; justify-content: safe center; }
.fb-thumb { flex: none; width: 120px; border: 2px solid transparent; border-radius: 4px; padding: 0; background: none; position: relative; }
.fb-thumb .fb-paper { position: relative; aspect-ratio: var(--fb-ar, 2); box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.fb-thumb span { display: block; font-size: 11px; color: var(--muted-fg); margin-top: 3px; }
.fb-thumb.current { border-color: var(--zn-900); }
.fb-hint { text-align: center; margin-top: 6px; }
/* comments on the shared album: pins, the bubble, sending */
.fb-stage { cursor: crosshair; }
.fb-pins { position: absolute; inset: 0; z-index: 40; pointer-events: none; }
.fb-pin { position: absolute; transform: translate(-50%, -50%); width: 28px; height: 28px; border-radius: 50%; border: 2px solid #fff;
          background: #e11d48; color: #fff; font-size: 12px; font-weight: 700; display: inline-flex; align-items: center;
          justify-content: center; box-shadow: 0 2px 6px rgba(0,0,0,.35); pointer-events: auto; cursor: pointer; padding: 0; }
.fb-pin.sent { background: #52525b; }
.fb-pin.new { background: #2563eb; }
.fb-bubble { position: absolute; z-index: 50; width: 300px; max-width: 80vw; margin: 20px 0 0 20px; background: #fff; border-radius: 10px;
             padding: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.25); cursor: default; }
.fb-bubble.left { margin-left: -320px; }
.fb-bubble.up { transform: translateY(calc(-100% - 40px)); }
.fb-bubble-head { font-weight: 600; font-size: 13px; margin-bottom: 8px; }
.fb-bubble-text { white-space: pre-wrap; margin: 0 0 6px; }
.fb-bubble-tools { display: flex; justify-content: space-between; margin-top: 8px; }
.fb-proof { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; margin: 0 0 10px; }
.fb-review-spread { display: grid; grid-template-columns: minmax(0, 260px) 1fr; gap: 16px; align-items: start; margin-bottom: 18px; }
.fb-review-pic { position: relative; }
.fb-review-pic .fb-paper { position: relative; aspect-ratio: var(--fb-ar, 2); box-shadow: 0 1px 4px rgba(0,0,0,.2); }
.fb-review-pic .fb-pin { width: 20px; height: 20px; font-size: 10px; border-width: 1px; z-index: 5; }
.fb-review-items { padding-left: 22px; margin: 6px 0 0; }
.fb-review-items li { margin-bottom: 4px; white-space: pre-wrap; }
.fb-thanks { font-size: 16px; display: flex; gap: 8px; align-items: center; color: #15803d; }
@media (max-width: 600px) { .fb-review-spread { grid-template-columns: 1fr; } }
.fb-empty { text-align: center; padding: 80px 16px; }
.fb-rotate { display: none; text-align: center; margin: 14px 0 0; }
@media (max-width: 700px) and (orientation: portrait) { .fb-rotate { display: block; } }
@media (max-width: 700px) {
  .fb { padding-top: 64px; }
  .fb-arrow { display: none; }
  .fb-stage { max-height: none; width: 100%; }
}

/* ---------------------------------------------------------------- text on album spreads (album.js, album-view.js) */
.al-paper, .fb-paper { container-type: inline-size; }       /* text sizes in cqw follow the spread's size */
.al-text, .fb-text { position: absolute; z-index: 220; line-height: 1.25; white-space: pre-wrap; overflow-wrap: anywhere;
                     pointer-events: none; }
.al-text.editing { pointer-events: auto; }
.al-text-body { outline: none; min-height: 1em; cursor: text; }
.al-text.editing { box-shadow: 0 0 0 1px rgba(59,130,246,.0); }
.al-text.editing:hover { box-shadow: 0 0 0 1px rgba(59,130,246,.6); }
.al-text.selected { box-shadow: 0 0 0 2px #3b82f6; }
.al-text-move { position: absolute; left: -26px; top: 50%; transform: translateY(-50%); width: 22px; height: 22px; border-radius: 4px;
                background: #3b82f6; color: #fff; display: none; align-items: center; justify-content: center; cursor: move;
                touch-action: none; font-size: 0; line-height: 0; }
.al-text-resize { position: absolute; right: -5px; top: 0; bottom: 0; width: 10px; cursor: ew-resize; touch-action: none; display: none; }
.al-text-resize::after { content: ""; position: absolute; left: 3px; top: 50%; width: 4px; height: 22px; margin-top: -11px; border-radius: 2px; background: #3b82f6; }
.al-text.selected .al-text-move { display: inline-flex; }
.al-text.selected .al-text-resize { display: block; }
.al-textbar { width: 100%; max-width: 1400px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center;
              margin: -6px 0 12px; padding: 6px 10px; background: #27272a; border-radius: 8px; color: #e4e4e7; }
.al-ed-slot { width: 100%; max-width: 1400px; min-height: 54px; margin: -6px 0 12px; display: flex; flex-direction: column;
               align-items: center; justify-content: center; }
.al-ed-slot .al-textbar { margin: 0; }
.al-ed-slot-hint { margin: 0; color: #71717a; font-size: 12.5px; }
.al-ed-slot:has(.al-textbar:not([hidden])) .al-ed-slot-hint { display: none; }
.al-textbar select { width: auto; height: 32px; padding: 4px 28px 4px 10px; background-color: #18181b; color: #fff; border-color: #3f3f46; }
.al-textbar .btn-ghost { color: #e4e4e7; min-width: 30px; }
.al-textbar .btn-ghost:hover:not(.active), .al-textbar .btn-ghost:focus:not(.active) { color: #fff; background: rgba(255,255,255,.14); }
.al-textbar .btn-ghost.active { background: #52525b; color: #fff; }
.al-textbar .btn-ghost:disabled { opacity: .35; }
.al-tx-size { margin: 0; display: inline-flex; align-items: center; gap: 6px; font-weight: normal; font-size: 13px; color: #e4e4e7; }
.al-tx-size input { width: 130px; }
#al-tx-size-label { min-width: 42px; }
.al-tx-colors { display: inline-flex; align-items: center; gap: 5px; }
.al-tx-colors input { width: 30px; height: 24px; padding: 0; border: 0; background: none; }
.al-tx-preset { width: 20px; height: 20px; border-radius: 50%; border: 1px solid rgba(255,255,255,.4); padding: 0; }

/* "The client makes selections" (picks.js): a heart on each photo, "Select" in the large view */
.tile-pick { position: absolute; top: 8px; right: 8px; width: 36px; height: 36px; border-radius: 50%; border: 0; z-index: 2;
             background: rgba(255,255,255,.85); color: var(--zn-700); display: flex; align-items: center; justify-content: center;
             box-shadow: var(--shadow); cursor: pointer; transition: transform .15s, color .15s; }
.tile-pick:hover { transform: scale(1.08); color: #e11d48; background: #fff; }
.tile-pick.is-on { color: #e11d48; background: #fff; }
.tile-pick.is-on svg, .lb-pick.is-on svg { fill: currentColor; }
#pick-fab { bottom: 24px; }
.lb-pick { position: absolute; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 2; height: 42px; padding: 0 20px;
           border-radius: 999px; border: 0; background: rgba(255,255,255,.12); color: #fff; font-weight: 600; display: inline-flex;
           align-items: center; gap: 8px; cursor: pointer; transition: background-color .15s; }
.lb-pick:hover { background: rgba(255,255,255,.22); color: #fff; }
.lb-pick.is-on { background: #fff; color: #e11d48; }
.pick-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; max-height: 40vh; overflow-y: auto; }
.pick-item { position: relative; aspect-ratio: 1; background: var(--zn-100); border-radius: 6px; overflow: hidden; }
.pick-item img { width: 100%; height: 100%; object-fit: cover; }
.pick-item .tile-no { font-size: 10.5px; }
.pick-x { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border-radius: 50%; border: 0; padding: 0;
          background: rgba(255,255,255,.9); color: var(--zn-800); display: flex; align-items: center; justify-content: center; }
.pick-x:hover { background: #fff; color: #e11d48; }
.pick-item .tile-no { opacity: 1; }
.lb-pick-m { display: none; }
.lb-pick-m.is-on { background: #fff; color: #e11d48; border-color: #fff; }
.lb-pick-m.is-on svg { fill: currentColor; }
@media (max-width: 960px) {                         /* phones: in the bar of buttons at the bottom instead */
  .lb-pick { display: none; }
  .lb-pick-m { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
}
/* A client's selection of photos (no prints), for the photographer */
.sel-photos { display: flex; flex-wrap: wrap; gap: 10px; }       /* whole photos, uncropped, in rows of one height */
.sel-photos figure { margin: 0; min-width: 0; }
.sel-photos img { height: 110px; width: auto; max-width: 220px; object-fit: contain; border-radius: 4px; background: var(--zn-100); display: block; }
.sel-photos figcaption { font-size: 11.5px; color: var(--muted-fg); margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
                         max-width: 100%; width: 0; min-width: 100%; }
/* The layout editor (layouts.js): sets of the photographer's own photobook layouts */
.ly-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 18px; }
.ly-bar .spacer { flex: 1; }
.ly-tabs { display: inline-flex; background: var(--zn-100); border-radius: 10px; padding: 3px; gap: 2px; }
.ly-tabs button { border: 0; background: none; border-radius: 8px; padding: 6px 14px; font-size: 13.5px; font-weight: 500; color: var(--zn-600); }
.ly-tabs button:hover { color: var(--zn-900); }
.ly-tabs button.selected { background: #fff; color: var(--zn-900); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.ly-sets { order: 10; flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 6px; }
.ly-sets:empty { display: none; }
.ly-chip { border: 1px solid var(--border); background: #fff; color: var(--zn-800); border-radius: 999px; padding: 5px 12px; font-size: 13px; }
.ly-chip:hover { border-color: var(--zn-400); color: var(--zn-900); }
.ly-chip.selected { background: var(--zn-900); border-color: var(--zn-900); color: #fff; }
.ly-chip .n { opacity: .6; font-size: 12px; margin-left: 2px; }
.ly-set-head { display: flex; align-items: center; gap: 10px; margin: 6px 0 14px; }
.ly-set-head h3 { margin: 0; font-size: 18px; }
.ly-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.ly-tile { border: 1px solid var(--border); border-radius: 10px; background: #fff; padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.ly-tile:hover { border-color: var(--zn-400); }
.ly-open { border: 0; padding: 0; background: none; display: block; width: 100%; cursor: pointer; }
.ly-thumb { position: relative; width: 100%; background: #f4f4f5; border-radius: 3px; overflow: hidden; }
.ly-thumb .ly-fold { position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: rgba(0,0,0,.18); }
.ly-thumb .ly-cell { position: absolute; background: #d4d4d8; outline: 1px solid #a1a1aa; outline-offset: -1px; }
.ly-tile-foot { display: flex; align-items: center; gap: 2px; font-size: 12px; color: var(--muted-fg); }
.ly-tile-foot .spacer { flex: 1; }
.ly-new { cursor: pointer; border-style: dashed; justify-content: center; }
.ly-new .ly-thumb { background: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
                    color: var(--zn-600); font-weight: 500; font-size: 13.5px; }
.ly-new:hover .ly-thumb { color: var(--zn-900); }
.ly-editor .ly-hint { margin: 0 0 10px; }
.ly-canvas-wrap { width: 100%; display: flex; justify-content: center; }
#ly-canvas { display: block; touch-action: none; border-radius: 2px; box-shadow: 0 0 0 1px var(--border); cursor: crosshair; }
.ly-editor-bar { display: flex; align-items: center; gap: 8px; margin-top: 14px; }
.ly-editor-bar .spacer { flex: 1; }
.al-tpl .al-tpl-no.own { color: var(--zn-900); font-weight: 600; }
.pick-sent { margin: 0 0 12px; padding: 8px 12px; border-radius: 8px; background: var(--zn-100); font-size: 13px; }
#pick-fab.is-sent .n { background: #dcfce7; color: #166534; gap: 3px; }
/* The photobook viewer in full screen (album-view.js): only the spread on a dark ground; the arrows, counter and
   close button fade while the mouse rests (.fb-awake while it moves). */
.fb-fs-exit { display: none; }
html.fb-fs-on, html.fb-fs-on body { overflow: hidden; }
.fb.fb-fs { position: fixed; inset: 0; z-index: 3000; margin: 0; padding: 0; max-width: none; background: #111;
            display: flex; align-items: center; justify-content: center; }
.fb.fb-fs > :not(.fb-row):not(.fb-count):not(.fb-fs-exit) { display: none !important; }
.fb-fs .fb-row { width: 100%; height: 100%; justify-content: center; position: relative; }
.fb-fs .fb-book { flex: none; }
.fb-fs .fb-stage { max-height: none; cursor: pointer; }
.fb-fs .fb-spread { box-shadow: 0 20px 60px rgba(0,0,0,.6); }
.fb-fs .fb-pins { display: none; }
.fb-fs .fb-arrow, .fb-fs .fb-count, .fb-fs .fb-fs-exit { transition: opacity .3s; opacity: 0; }
.fb-fs.fb-awake .fb-arrow, .fb-fs.fb-awake .fb-count, .fb-fs.fb-awake .fb-fs-exit { opacity: 1; }
.fb-fs .fb-arrow { position: absolute; top: 50%; margin-top: -24px; z-index: 5; background: rgba(255,255,255,.14); color: #fff; }
.fb-fs .fb-arrow:hover { background: rgba(255,255,255,.26); }
.fb-fs .fb-arrow:disabled { opacity: 0 !important; }
.fb-fs #fb-prev { left: 14px; }
.fb-fs #fb-next { right: 14px; }
.fb-fs .fb-count { position: absolute; left: 18px; bottom: 12px; margin: 0; z-index: 5; color: rgba(255,255,255,.75); font-size: 13px; }
.fb-fs .fb-fs-exit { display: flex; position: absolute; top: 14px; right: 14px; z-index: 5; width: 42px; height: 42px; border-radius: 50%;
                     border: 0; background: rgba(255,255,255,.14); color: #fff; align-items: center; justify-content: center; }
.fb-fs .fb-fs-exit:hover { background: rgba(255,255,255,.26); }
@media (hover: none) { .fb-fs .fb-arrow, .fb-fs .fb-count, .fb-fs .fb-fs-exit { opacity: 1; } .fb-fs .fb-arrow { display: none; } }
/* The designer's Tools dialog (album.html): the photobook's actions as a map, in groups */
.al-tools { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px 22px; }
.al-tools section { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.al-tools h5 { margin: 0 0 4px; font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted-fg); }
.al-tool { display: flex; align-items: flex-start; gap: 12px; width: 100%; text-align: left; border: 1px solid transparent; background: none;
           border-radius: 10px; padding: 9px 10px; color: var(--zn-900); font-weight: normal; margin: 0; cursor: pointer; text-decoration: none; }
.al-tool:hover, .al-tool:focus-visible { background: var(--zn-100); border-color: var(--border); color: var(--zn-900); text-decoration: none; }
.al-tool > .icon { flex: none; margin-top: 1px; color: var(--zn-600); }
.al-tool strong { display: block; font-size: 14px; font-weight: 600; }
.al-tool small { display: block; font-size: 12.5px; color: var(--muted-fg); line-height: 1.35; margin-top: 1px; }
.al-tool.danger strong, .al-tool.danger > .icon { color: #b91c1c; }
.al-tool:disabled { opacity: .45; cursor: default; }
.al-tool:disabled:hover { background: none; border-color: transparent; }
.al-tool .al-switch { flex: none; margin-top: 1px; }
.al-tools .al-tools-help { grid-column: 1 / -1; border-top: 1px solid var(--border); padding-top: 14px; }
.al-tools-help p { margin: 0; font-size: 13px; color: var(--muted-fg); line-height: 1.55; }
/* The overview's spreads: the whole bar of tools only under the chosen spread and the one the mouse is over; the
   others show their number and pages. Double-click opens a spread large. The cover is the first tile. */
.al-bar { min-height: 34px; }
.al-pages { font-size: 12.5px; color: var(--muted-fg); margin-left: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.al-spread:not(.selected):not(:hover) .al-bar > button { display: none; }
.al-spread.selected .al-pages, .al-spread:hover .al-pages { display: none; }
@media (hover: none) { .al-spread:not(.selected) .al-bar > button { display: none; } .al-spread:hover:not(.selected) .al-pages { display: inline; } }
.al-spread.selected { background: #ececef; }        /* the current spread: on a light card, with its tools */
.al-cover-spread { position: relative; border-radius: 6px; padding: 6px; border: 2px solid transparent; container-type: inline-size; align-self: center; width: 100%; min-width: 0; }
.al-cover-spread { border-radius: 10px; transition: background-color .15s; }
.al-cover-spread:hover { background: var(--zn-50, #fafafa); }
.al-cover-spread .al-cover-mini { width: 100%; cursor: pointer; }
.al-cover-spread .al-cover-paper { width: 100%; }
.al-num-cover { padding: 0 10px; }
/* Where a dragged graphic has snapped (album.js snapToTrim): the paper's edge, a trim line or the gutter */
.al-snap-guide { position: absolute; z-index: 60; pointer-events: none; background: #2563eb; }
.al-snap-guide.x { top: -12px; bottom: -12px; width: 1px; margin-left: -.5px; }
.al-snap-guide.y { left: -12px; right: -12px; height: 1px; margin-top: -.5px; }
/* An admin acting as another account (admin.become): on every page, above everything */
.acting-bar { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 5000; display: flex; align-items: center;
              gap: 10px; margin: 0; padding: 7px 8px 7px 16px; border-radius: 999px; background: #f59e0b; color: #1c1917;
              font-size: 13.5px; font-weight: 600; box-shadow: 0 10px 30px rgba(0,0,0,.25); width: max-content; max-width: calc(100vw - 24px); }
.acting-bar .btn { background: #1c1917; color: #fff; border: 0; border-radius: 999px; font-weight: 600; }
.acting-bar .btn:hover { background: #000; color: #fff; }
/* A lab's front page (lab_home.html, labsite.py): its photo behind the headline, its sections, its contact details */
.lab-hero.with-photo { max-width: none; margin: 0; min-height: min(78vh, 720px); display: flex; flex-direction: column; align-items: center;
                       justify-content: center; padding: 120px 24px 72px; color: #fff;
                       background: linear-gradient(rgba(0,0,0,.25), rgba(0,0,0,.45)), var(--hero) center / cover no-repeat; }
.lab-hero.with-photo h1 { color: #fff; text-shadow: 0 2px 24px rgba(0,0,0,.35); max-width: 900px; }
.lab-hero.with-photo .lead { color: rgba(255,255,255,.92); text-shadow: 0 1px 12px rgba(0,0,0,.4); }
.lab-hero.with-photo .prices-note { color: rgba(255,255,255,.85); }
.lab-hero.with-photo .btn-default { background: rgba(255,255,255,.92); border-color: transparent; }
.lab-hero.with-photo + .lab-prices { padding-top: 48px; }
.lab-sections { max-width: 1040px; margin: 0 auto; padding: 24px 24px 72px; display: grid; gap: 28px 40px;
                grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.lab-sections h2 { font-size: 20px; margin: 0 0 8px; letter-spacing: -0.01em; }
.lab-sections p { margin: 0; color: var(--zn-600); line-height: 1.65; white-space: pre-line; }
.lab-footer { border-top: 1px solid var(--border); background: var(--zn-50, #fafafa); }
.lab-footer-inner { max-width: 1040px; margin: 0 auto; padding: 32px 24px 40px; display: flex; gap: 48px; flex-wrap: wrap; font-size: 14px; color: var(--zn-600); }
.lab-footer-inner strong { color: var(--zn-900); }
.lab-footer-inner p { margin: 4px 0 0; white-space: pre-line; display: flex; gap: 6px; align-items: center; }
.lab-footer-inner a { color: inherit; }
/* the lab's front-page editor */
.fp-h { font-size: 16px; margin: 26px 0 10px; }
.fp-h:first-child { margin-top: 0; }
.fp-hero-preview img { max-width: 100%; max-height: 220px; border-radius: 8px; display: block; }
.fp-section { display: flex; flex-direction: column; gap: 6px; padding: 12px; border: 1px solid var(--border); border-radius: 10px; margin-bottom: 10px; }
/* Lab settings: how to point an own domain here */
.dns-help { margin: 10px 0 0; max-width: 640px; border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; font-size: 13.5px; }
.dns-help summary { cursor: pointer; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.dns-help ol { margin: 12px 0 8px; padding-left: 20px; }
.dns-help li { margin-bottom: 8px; line-height: 1.5; }
.dns-help ul { padding-left: 18px; color: var(--zn-600); }
.dns-table { margin: 8px 0 4px; border-collapse: collapse; }
.dns-table th { text-align: left; font-weight: 500; color: var(--muted-fg); padding: 3px 14px 3px 0; white-space: nowrap; vertical-align: top; }
.dns-table td { padding: 3px 0; }
.dns-table code { font-size: 13px; background: var(--zn-100); padding: 1px 6px; border-radius: 4px; color: var(--zn-900); }
/* Ordering without an account (guests.py): the upload button that is also a drop zone, and the thank-you page */
.guest-drop { margin: 6px auto 0; max-width: 520px; padding: 22px 24px 18px; border: 2px dashed rgba(255,255,255,.55); border-radius: 16px;
              text-align: center; transition: background-color .15s, border-color .15s; }
.lab-hero:not(.with-photo) .guest-drop, .page-header + .guest-drop { border-color: var(--zn-300, #d4d4d8); }
.page-header + .guest-drop { max-width: none; margin: 0 0 22px; padding: 16px; }
.guest-drop.over { background: rgba(37,99,235,.12); border-color: #2563eb; }
.guest-drop.busy .guest-drop-btn { pointer-events: none; opacity: .7; }
.guest-drop-btn { font-size: 17px; padding: 12px 26px; display: inline-flex; align-items: center; gap: 10px; }
.guest-drop-hint { margin: 10px 0 0; font-size: 13px; opacity: .85; }
.guest-drop-progress { margin-top: 12px; font-size: 13px; }
.guest-drop-progress .bar { height: 6px; border-radius: 3px; background: rgba(127,127,127,.25); overflow: hidden; margin-bottom: 6px; }
.guest-drop-progress .bar i { display: block; height: 100%; width: 0; background: #2563eb; transition: width .2s; }
.guest-placed { text-align: center; padding-top: 24px; }
.guest-placed .empty-icon { margin: 0 auto 14px; }
.guest-placed .lead { font-size: 17px; margin: 10px 0 6px; }
.stripe-lab { padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; margin-bottom: 16px; }
/* The cart's size button and picker (cart.js openSizes): sizes to scale, the photo's own shape in light green */
.size-btn { display: inline-flex; align-items: center; justify-content: space-between; gap: 8px; width: auto; min-width: 120px; cursor: pointer; text-align: left; }
.size-btn.same-shape { background: #f0fdf4; border-color: #bbf7d0; }
.size-grid { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px 10px; }
.size-pick { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 76px; padding: 8px 6px 6px; border: 1px solid transparent;
             border-radius: 10px; background: none; cursor: pointer; font-size: 12.5px; color: var(--zn-800); }
.size-pick:hover { border-color: var(--border); background: var(--zn-50, #fafafa); }
.size-pick strong .icon { color: var(--zn-900); stroke-width: 2.5; vertical-align: -1px; }   /* the print's current size: a check, no frame */
.size-pick .size-box { display: flex; align-items: flex-end; justify-content: center; }
.size-pick strong { font-weight: 600; white-space: nowrap; }
.size-pick small { color: var(--muted-fg); white-space: nowrap; }
.size-pick.low-res { opacity: .45; }
.size-pick.low-res:hover { opacity: .8; }
.size-pick small.low { color: #b45309; font-weight: 500; }
/* The size picker's tabs, and each size with the photo as printed (cart.js sizeCard) */
.size-tabs { display: flex; gap: 4px; padding: 0 24px; border-bottom: 1px solid var(--border); }
.size-tab { border: 0; background: none; padding: 10px 12px; font-size: 14px; font-weight: 500; color: var(--muted-fg);
            border-bottom: 2px solid transparent; margin-bottom: -1px; display: inline-flex; align-items: center; gap: 6px; }
.size-tab:hover { color: var(--zn-900); }
.size-tab.active { color: var(--zn-900); border-bottom-color: var(--zn-900); font-weight: 600; }
.size-tab .n { background: var(--zn-100); border-radius: 999px; padding: 0 7px; font-size: 12px; }
.size-paper { position: relative; display: block; box-shadow: 0 0 0 1px var(--zn-400), 0 1px 3px rgba(0,0,0,.12); }
.size-paper img { position: absolute; max-width: none; display: block; pointer-events: none; -webkit-user-drag: none; user-select: none; }   /* not dragged out of the page */
.size-paper img.trimmed { opacity: .22; }                  /* what the paper's shape cuts off */
.size-paper .kept { position: absolute; inset: 0; overflow: hidden; }
.size-pick.same-shape .size-paper { box-shadow: 0 0 0 2.5px #16a34a, 0 1px 3px rgba(0,0,0,.12); }
.size-paper .cm { position: absolute; width: 6px; height: 6px; border: 0 solid var(--zn-700); }   /* crop marks */
.size-paper .cm.tl { left: -8px; top: -8px; border-right-width: 1px; border-bottom-width: 1px; }
.size-paper .cm.tr { right: -8px; top: -8px; border-left-width: 1px; border-bottom-width: 1px; }
.size-paper .cm.bl { left: -8px; bottom: -8px; border-right-width: 1px; border-top-width: 1px; }
.size-paper .cm.br { right: -8px; bottom: -8px; border-left-width: 1px; border-top-width: 1px; }
#size-low-grid .size-pick.low-res { opacity: 1; }          /* its own tab says so already: not faded too */
.cart-item img { pointer-events: none; -webkit-user-drag: none; user-select: none; }   /* the cart's thumbnails: not dragged out (a click still opens the crop) */
/* The crop window: the photo stays hidden while Cropper lays it out and applies the saved crop, then fades in */
.crop-stage .crop-inner { transition: opacity .15s ease; }
.crop-stage.preparing .crop-inner { opacity: 0; }
/* The cart's paper picker (cart.js openPapers): a card per paper with its description and price */
.paper-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.paper-pick { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; text-align: left; background: var(--card, #fff);
              border: 1px solid var(--border); border-radius: 12px; cursor: pointer; color: var(--zn-800); font-size: 13px; }
.paper-pick:hover { border-color: var(--zn-400); background: var(--zn-50, #fafafa); }
.paper-pick.current { border-color: var(--zn-900); box-shadow: 0 0 0 1px var(--zn-900); }
.paper-pick .paper-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.paper-pick strong { font-size: 15px; font-weight: 600; color: var(--zn-900); }
.paper-pick strong .icon { stroke-width: 2.5; vertical-align: -1px; }
.paper-pick .paper-price { font-weight: 600; white-space: nowrap; }
.paper-pick .paper-desc { color: var(--muted-fg); line-height: 1.45; }
.paper-pick .paper-diff { font-size: 12px; color: var(--muted-fg); margin-top: auto; }
.paper-pick .paper-diff.lowest { color: #15803d; font-weight: 500; }
/* The cart's "All prints" bar (cart.js renderApplyAll) */
.apply-all { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 14px; margin-bottom: 14px;
             border: 1px solid var(--border); border-radius: 12px; background: var(--zn-50, #fafafa); }
.apply-all[hidden] { display: none; }
.apply-all-label { font-weight: 600; font-size: 13.5px; display: inline-flex; align-items: center; gap: 6px; margin-right: 4px; }
.apply-all select.form-control, .apply-all input.form-control { width: auto; height: 34px; padding-top: 4px; padding-bottom: 4px; border-radius: 999px; }
.apply-all input.form-control { width: 96px; }
.apply-all .btn { height: 34px; border-radius: 999px; margin-left: auto; }
.cart-list.busy { opacity: .5; pointer-events: none; transition: opacity .15s; }
/* Each photo as it uploads (guest-upload.js tile): the picture from the device, its progress underneath */
.guest-tiles { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 14px; }
.guest-tiles[hidden] { display: none; }
.guest-tile { position: relative; width: 64px; height: 64px; border-radius: 8px; overflow: hidden; background: rgba(127,127,127,.25);
              display: flex; align-items: center; justify-content: center; }
.guest-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; -webkit-user-drag: none; }
.guest-tile .gt-name { display: none; font-size: 11px; font-weight: 600; opacity: .7; }
.guest-tile.no-picture .gt-name { display: block; }
.guest-tile.no-picture img { display: none; }   /* (no preview yet, or none to be had) */
.guest-tile.waiting img { opacity: .45; }
.guest-tile .gt-bar { position: absolute; left: 6px; right: 6px; bottom: 6px; height: 4px; border-radius: 2px; background: rgba(255,255,255,.7); overflow: hidden; }
.guest-tile .gt-bar b { display: block; height: 100%; width: 0; background: #2563eb; transition: width .2s; }
.guest-tile.waiting .gt-bar, .guest-tile.done .gt-bar, .guest-tile.failed .gt-bar { display: none; }
.guest-tile.done::after { content: "✓"; position: absolute; right: 4px; top: 4px; width: 18px; height: 18px; border-radius: 50%;
                          background: #16a34a; color: #fff; font-size: 12px; line-height: 18px; text-align: center; font-weight: 700; }
.guest-tile.failed { box-shadow: inset 0 0 0 2px #dc2626; }
.guest-tile.failed img { opacity: .4; }
.paper-grid .paper-others { grid-column: 1 / -1; margin: 10px 0 0; font-size: 13px; font-weight: 600; color: var(--muted-fg); }
.paper-pick .paper-diff.other-size { color: #1d4ed8; font-weight: 500; }
.paper-pick .paper-diff.other-size .icon { vertical-align: -1px; }
.crop-stage.preparing::after { content: attr(data-loading); position: absolute; inset: 0; display: flex; align-items: center;
                               justify-content: center; color: rgba(255,255,255,.6); font-size: 14px; pointer-events: none; }
/* Admin: an account's photos (admin/photos.html) */
.admin-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 18px 14px; }
.admin-photo { margin: 0; font-size: 12.5px; min-width: 0; }
.admin-photo .ap-thumb { display: flex; align-items: center; justify-content: center; aspect-ratio: 1; background: var(--zn-100); border-radius: 8px; overflow: hidden; }
.admin-photo .ap-thumb img { max-width: 100%; max-height: 100%; object-fit: contain; -webkit-user-drag: none; }
.admin-photo figcaption { margin-top: 6px; line-height: 1.45; }
.admin-photo .ap-name { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.admin-photo .ap-galleries { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.admin-pager { display: flex; gap: 8px; justify-content: center; margin-top: 24px; }
.admin-photos-link { color: var(--accent, #2563eb); cursor: pointer; border-radius: 4px; }
.admin-photos-link:hover { text-decoration: underline; }
.admin-photos-link .icon { vertical-align: -2px; }
/* Upload from your phone (phone.py, guest-upload.js): the second button, the code to scan, the phone's own page */
.guest-drop-buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.guest-phone-btn { background: rgba(255,255,255,.92); }
.phone-modal { text-align: left; }                         /* (it sits in the centred front-page section) */
.phone-modal .modal-body { padding-top: 6px; }
.phone-qr-wrap { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.phone-qr { flex: none; width: 220px; height: 220px; }
.phone-qr svg { width: 100%; height: 100%; display: block; }
.phone-steps { flex: 1 1 200px; margin: 0; padding-left: 20px; font-size: 15px; line-height: 1.5; }
.phone-steps li + li { margin-top: 8px; }
.phone-short { margin: 14px 0 0; }
.phone-short strong { color: var(--zn-900); font-weight: 600; letter-spacing: .02em; white-space: nowrap; }
.phone-arrived { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); }
.phone-count { font-weight: 600; margin: 0 0 4px; }
.phone-arrived .guest-tiles { justify-content: flex-start; margin-top: 8px; }
.phone-page h1 { font-size: 26px; margin: 8px 0 10px; }
@media (hover: none) and (max-width: 700px) { .guest-phone-btn { display: none; } }   /* already on a phone: no use */
.phone-drop { margin: 18px 0 0; max-width: none; border-color: var(--zn-300, #d4d4d8); padding: 26px 16px; }
.phone-done-bar { margin-top: 22px; text-align: center; }
.phone-done-bar p { margin: 0 0 10px; }
.phone-done-bar .muted { margin-top: 10px; }
.phone-state { text-align: center; padding-top: 30px; }
.phone-state .empty-icon { margin: 0 auto 16px; }
/* Kiosk mode (kiosk.js): "Are you still there?" over the page */
.kiosk-ask { position: fixed; inset: 0; z-index: 3000; background: rgba(0,0,0,.55); display: flex; align-items: center; justify-content: center; padding: 16px; }
.kiosk-ask-card { background: var(--background, #fff); border-radius: 16px; padding: 30px 28px; max-width: 440px; text-align: center; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.kiosk-ask-card h2 { margin: 0 0 10px; font-size: 24px; }
.kiosk-ask-card p { margin: 0 0 20px; color: var(--muted-fg); font-size: 15px; }
.kiosk-points { padding-left: 20px; line-height: 1.5; }
.kiosk-points li + li { margin-top: 6px; }
.kiosk-on { color: #15803d; font-weight: 600; }
/* The client gallery as a slideshow (js/slideshow.js): photos fading into each other with a slow zoom */
body.ss-open { overflow: hidden; }
.slideshow { position: fixed; inset: 0; z-index: 2000; background: #000; color: #fff; height: 100vh; height: 100dvh; }
.slideshow[hidden] { display: none; }
.ss-stage { position: absolute; inset: 0; overflow: hidden; }
.ss-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: 0; transition: opacity 1.2s ease;
          -webkit-user-drag: none; user-select: none; will-change: opacity, transform; }
.ss-img.on { opacity: 1; }
.ss-img.z0 { animation: ss-z0 7.4s linear forwards; } .ss-img.z1 { animation: ss-z1 7.4s linear forwards; }
.ss-img.z2 { animation: ss-z2 7.4s linear forwards; } .ss-img.z3 { animation: ss-z3 7.4s linear forwards; }
@keyframes ss-z0 { from { transform: scale(1); } to { transform: scale(1.08) translate(-1.5%, -1%); } }
@keyframes ss-z1 { from { transform: scale(1.08) translate(1.5%, 1%); } to { transform: scale(1); } }
@keyframes ss-z2 { from { transform: scale(1); } to { transform: scale(1.08) translate(1.5%, -1%); } }
@keyframes ss-z3 { from { transform: scale(1.08) translate(-1.5%, 1%); } to { transform: scale(1); } }
.slideshow.paused .ss-img { animation-play-state: paused; }
.ss-bar { position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
          padding: 14px 18px calc(14px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, rgba(0,0,0,.65));
          transition: opacity .4s; }
.ss-btn { background: none; border: 0; color: #fff; min-width: 44px; height: 44px; border-radius: 999px; display: inline-flex;
          align-items: center; justify-content: center; gap: 6px; padding: 0 10px; font-size: 14px; opacity: .9; }
.ss-btn:hover, .ss-btn:focus-visible { background: rgba(255,255,255,.15); opacity: 1; outline: none; }
.ss-main { background: rgba(255,255,255,.18); }
.ss-count { font-size: 13px; opacity: .75; margin-left: 6px; font-variant-numeric: tabular-nums; }
.ss-spacer { flex: 1; }
.ss-track { background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.25); border-radius: 999px;
            height: 36px; padding: 0 12px; font-size: 13px; max-width: 200px; }
.ss-track option { color: #000; }
.ss-fav[aria-pressed="true"] { background: rgba(255,255,255,.22); color: #fda4af; }
.ss-i-play, .slideshow.paused .ss-i-pause, .ss-i-off, .slideshow.muted .ss-i-on, .ss-i-min, .slideshow.full .ss-i-max { display: none; }
.slideshow.paused .ss-i-play, .slideshow.muted .ss-i-off, .slideshow.full .ss-i-min { display: inline-flex; }
.ss-credit { position: absolute; left: 18px; top: calc(12px + env(safe-area-inset-top)); font-size: 12px; opacity: .7;
             text-shadow: 0 1px 3px rgba(0,0,0,.8); transition: opacity .4s; max-width: calc(100% - 36px); }
.ss-credit a { color: #fff; text-decoration: underline; }
.ss-credit .icon { vertical-align: -2px; }
.slideshow.idle { cursor: none; }
.slideshow.idle .ss-bar { opacity: 0; pointer-events: none; }
.slideshow.idle .ss-credit { opacity: .45; }                /* stays readable: the licence asks for the credit */
@media (max-width: 640px) { .ss-track { max-width: 130px; } .ss-fav span { display: none; } .ss-count { display: none; } }
@media (prefers-reduced-motion: reduce) { .ss-img { transition: opacity .4s; } }
/* Gallery settings: the slideshow's music, with "Listen" */
.music-pick { display: flex; gap: 8px; max-width: 520px; }
.music-pick select { flex: 1; min-width: 0; }
#g-music-listen.playing { background: var(--zn-900); color: #fff; }
/* "Download all": the size and time first (gallery.js) */
.zip-facts { display: grid; grid-template-columns: auto 1fr; gap: 8px 18px; margin: 0 0 16px; font-size: 15px; }
.zip-facts dt { font-weight: 500; color: var(--muted-fg); }
.zip-facts dd { margin: 0; font-weight: 600; }
.zip-note { margin: 0 0 8px; }
/* Collages (collage.py, js/collage.js): four layouts to choose from, then the editor */
.cc-steps { display: flex; gap: 8px; list-style: none; padding: 0; margin: 0 0 20px; counter-reset: cc; flex-wrap: wrap; }
.cc-steps li { counter-increment: cc; font-size: 13px; color: var(--muted-fg); padding: 6px 12px 6px 8px; border-radius: 999px; background: var(--zn-100); }
.cc-steps li::before { content: counter(cc); display: inline-flex; width: 20px; height: 20px; border-radius: 50%; align-items: center;
                       justify-content: center; margin-right: 6px; background: #fff; font-weight: 600; font-size: 12px; }
.cc-steps li.on { background: var(--zn-900); color: #fff; }
.cc-steps li.on::before { color: var(--zn-900); }
.cc-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.cc-hint { flex: 1 1 240px; }
.cc-options { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; }
.cc-option { border: 1px solid var(--border); border-radius: 12px; padding: 14px; cursor: pointer; background: var(--background);
             display: flex; flex-direction: column; align-items: center; transition: border-color .15s, box-shadow .15s; }
.cc-option:hover, .cc-option:focus { border-color: var(--zn-400); box-shadow: 0 6px 18px rgba(0,0,0,.08); outline: none; }
.cc-preview { position: relative; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.18); margin: 4px 0 12px; max-width: 100%; }
.cc-option-foot { display: flex; align-items: center; gap: 8px; width: 100%; }
.cc-option-foot .cc-again { margin-left: auto; font-size: 17px; }
.cc-tag { font-size: 11.5px; background: #dcfce7; color: #166534; border-radius: 999px; padding: 1px 8px; font-weight: 500; }
.cc-stage-wrap { display: flex; justify-content: center; }
.cc-stage { position: relative; background: #fff; box-shadow: 0 2px 14px rgba(0,0,0,.18); touch-action: none; user-select: none; }
.cc-cell { position: absolute; overflow: hidden; background: var(--zn-200); cursor: grab; }
.cc-cell img { position: absolute; max-width: none; pointer-events: none; -webkit-user-drag: none; }
.cc-cell.dragging { opacity: .55; }
.cc-cell.drop-target { box-shadow: inset 0 0 0 3px #2563eb; }
.cc-cell.drop-target img { opacity: .75; }
.cc-zoom { position: absolute; right: 6px; bottom: 6px; display: flex; gap: 4px; opacity: 0; transition: opacity .15s; }
.cc-cell:hover .cc-zoom { opacity: 1; }
@media (hover: none) { .cc-zoom { opacity: .85; } }
.cc-zoom button { width: 28px; height: 28px; border-radius: 50%; border: 0; background: rgba(255,255,255,.9); font-size: 17px; line-height: 1;
                  box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.cc-stage.rearranging .cc-cell { cursor: move; }
.cc-stage.rearranging .cc-cell img { opacity: .55; }
.cc-stage.rearranging .cc-zoom { display: none; }
.cc-rendering { position: fixed; inset: 0; z-index: 1500; background: rgba(255,255,255,.85); display: flex; flex-direction: column;
                align-items: center; justify-content: center; gap: 12px; font-size: 15px; }
.cc-rendering[hidden] { display: none; }
.cc-rendering .spinner { width: 28px; height: 28px; border-width: 3px; }
.cc-saved { opacity: .5; }
.cc-helper { position: fixed; z-index: 1600; pointer-events: none; overflow: hidden; border-radius: 4px; transform: rotate(-2deg) scale(1.04);
             box-shadow: 0 10px 28px rgba(0,0,0,.35), 0 0 0 3px #fff; opacity: .95; }
.cc-helper img { display: block; object-fit: cover; }
/* Plans (plans.py): the space used, the four plans, the notice when over */
.plan-usage { margin-bottom: 20px; }
.plan-usage-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.plan-bar { height: 10px; border-radius: 5px; background: var(--zn-100); overflow: hidden; }
.plan-bar i { display: block; height: 100%; background: var(--zn-900); border-radius: 5px; }
.plan-bar.full i { background: #dc2626; }
.plan-full { color: #b91c1c; }
.plan-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.plan-card { border: 1px solid var(--border); border-radius: 14px; padding: 20px 18px; display: flex; flex-direction: column; gap: 6px; background: var(--background); }
.plan-card.current { border-color: var(--zn-900); box-shadow: 0 0 0 1px var(--zn-900); }
.plan-room { font-size: 24px; font-weight: 700; letter-spacing: -.01em; }
.plan-price { font-size: 17px; font-weight: 600; }
.plan-price small { font-weight: 400; color: var(--muted-fg); font-size: 13px; }
.plan-vat { margin-bottom: 8px; min-height: 18px; }
.plan-card form, .plan-card .plan-mine, .plan-card .plan-why { margin-top: auto; }
.plan-card .plan-invoice { text-align: center; color: var(--muted-fg); }
.plan-mine { font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; gap: 6px; }
.plan-summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.plan-notice { display: flex; align-items: center; gap: 10px; justify-content: center; flex-wrap: wrap; padding: 10px 16px; font-size: 14px; }
.plan-notice-info { background: #eff6ff; color: #1e3a8a; }
.plan-notice-warning { background: #fef3c7; color: #78350f; }
.landing-prices { max-width: 980px; margin: 10px auto 40px; padding: 0 16px; text-align: center; }
.landing-prices h2 { font-size: 26px; margin-bottom: 6px; }
.landing-prices .plan-cards { margin: 22px 0 14px; text-align: left; }
.signup-plan { margin: -6px 0 14px; }
.signup-plan .icon { vertical-align: -2px; }
/* Uploading photos (library.js): a floating panel with the progress and the time left */
.upload-panel { position: fixed; right: 20px; bottom: 20px; z-index: 1200; width: 320px; max-width: calc(100vw - 32px);
                background: var(--background, #fff); border: 1px solid var(--border); border-radius: 12px;
                box-shadow: 0 10px 30px rgba(0,0,0,.15); padding: 12px 14px 12px; font-size: 13px; }
.upload-panel[hidden] { display: none; }
.up-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.up-title { font-size: 14px; }
.up-close { border: 0; background: none; font-size: 20px; line-height: 1; color: var(--muted-fg); padding: 0 2px; }
.up-close:hover { color: var(--zn-900); }
.up-bar { height: 6px; border-radius: 3px; background: var(--zn-100); overflow: hidden; }
.up-bar i { display: block; height: 100%; width: 0; background: #2563eb; transition: width .4s; }
.upload-panel.done .up-bar i { background: #16a34a; }
.up-line { margin-top: 7px; color: var(--muted-fg); font-variant-numeric: tabular-nums; }
@media (max-width: 640px) { .upload-panel { left: 16px; right: 16px; bottom: 16px; width: auto; } }
.admin-invoices { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin-invoices th { text-align: left; font-weight: 500; color: var(--muted-fg); font-size: 12px; padding: 6px 8px; border-bottom: 1px solid var(--border); }
.admin-invoices td { padding: 8px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.admin-invoices td:last-child { text-align: right; }
@media (max-width: 640px) { .admin-invoices th:nth-child(2), .admin-invoices td:nth-child(2) { display: none; } }
.app-install { margin: 14px 0 0; text-align: center; }
.app-install .btn { color: var(--muted-fg); }
.plan-features { list-style: none; padding: 0; margin: 4px 0 12px; font-size: 13px; color: var(--muted-fg); display: grid; gap: 4px; }
.plan-features li { display: flex; align-items: center; gap: 6px; }
.plan-features .plan-plus { color: var(--foreground, #18181b); font-weight: 500; }

/* ---------------------------------------------------------- admin: album companies and their sizes */
.album-sizes-card { overflow-x: auto; }
.album-sizes td { white-space: nowrap; }
.album-sizes td:first-child { white-space: normal; }
.album-sizes tr.editing td { background: var(--zn-50); white-space: normal; }
.album-size-actions .btn { padding: 4px 8px; }
.album-size-form { display: grid; gap: 10px 8px; align-items: end;     /* one line: name, type, six numbers, layouts, save */
                   grid-template-columns: minmax(150px, 2fr) minmax(100px, 1.1fr) repeat(6, minmax(62px, .75fr)) minmax(130px, 1.6fr) auto; }
.album-size-form label { display: flex; flex-direction: column; gap: 4px; margin: 0; font-size: 12px; font-weight: 500; color: var(--muted-fg);
                         min-width: 0; }
.album-size-form .form-control { padding-left: 8px; padding-right: 8px; min-width: 0; }
@media (max-width: 1100px) {                             /* too narrow for one line: as many as fit */
  .album-size-form { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
  .album-size-form label.wide { grid-column: span 2; }
}
.album-size-buttons { display: flex; gap: 8px; align-items: center; }
.album-size-new { border-top: 1px solid var(--border); }
.album-upload h3 { font-size: 15px; margin: 18px 0 6px; }
.album-upload h3:first-child { margin-top: 0; }
.album-upload ul { margin: 0; padding-left: 20px; font-size: 14px; }
@media (max-width: 640px) { .album-size-form label.wide { grid-column: 1 / -1; } }
