/* =============================================================================
   ZIKRAYATI — READY-MADE ALBUMS (templates.html)
   Brand guidelines v1.0: Cream paper and Memory Ink do most of the work,
   Lavender is the brand field, pill buttons with a 2px ink edge and a solid
   offset shadow. No looping animation on an idle page.
   ============================================================================= */

/* The designs' own fonts, served from this site (html-to-image can embed them in the print) */
@font-face { font-family: 'FredokaOne'; src: url('assets/fonts/web/FredokaOne.woff2') format('woff2'), url('assets/fonts/FredokaOne.ttf') format('truetype'); font-display: block; }
@font-face { font-family: 'Pacifico'; src: url('assets/fonts/web/Pacifico.woff2') format('woff2'), url('assets/fonts/Pacifico.ttf') format('truetype'); font-display: block; }
@font-face { font-family: 'Caveat'; src: url('assets/fonts/web/Caveat.woff2') format('woff2'), url('assets/fonts/Caveat.ttf') format('truetype'); font-display: block; }
@font-face { font-family: 'LuckiestGuy'; src: url('assets/fonts/web/LuckiestGuy.woff2') format('woff2'), url('assets/fonts/LuckiestGuy.ttf') format('truetype'); font-display: block; }
@font-face { font-family: 'PatrickHand'; src: url('assets/fonts/web/PatrickHand.woff2') format('woff2'), url('assets/fonts/PatrickHand.ttf') format('truetype'); font-display: block; }
@font-face { font-family: 'Anton'; src: url('assets/fonts/web/Anton.woff2') format('woff2'), url('assets/fonts/Anton.ttf') format('truetype'); font-display: block; }
@font-face { font-family: 'Bangers'; src: url('assets/fonts/web/Bangers.woff2') format('woff2'), url('assets/fonts/Bangers.ttf') format('truetype'); font-display: block; }
@font-face { font-family: 'DancingScript'; src: url('assets/fonts/web/DancingScript.woff2') format('woff2'), url('assets/fonts/DancingScript.ttf') format('truetype'); font-display: block; }
@font-face { font-family: 'Lora'; src: url('assets/fonts/web/Lora.woff2') format('woff2'), url('assets/fonts/Lora.ttf') format('truetype'); font-display: block; }
@font-face { font-family: 'Montserrat'; src: url('assets/fonts/web/Montserrat.woff2') format('woff2'), url('assets/fonts/Montserrat.ttf') format('truetype'); font-display: block; }
@font-face { font-family: 'PlayfairDisplay'; src: url('assets/fonts/web/PlayfairDisplay.woff2') format('woff2'), url('assets/fonts/PlayfairDisplay.ttf') format('truetype'); font-display: block; }
@font-face { font-family: 'SpecialElite'; src: url('assets/fonts/web/SpecialElite.woff2') format('woff2'), url('assets/fonts/SpecialElite.ttf') format('truetype'); font-display: block; }
@font-face { font-family: 'ShadowsIntoLight'; src: url('assets/fonts/web/ShadowsIntoLight.woff2') format('woff2'), url('assets/fonts/ShadowsIntoLight.ttf') format('truetype'); font-display: block; }
@font-face { font-family: 'Merriweather'; src: url('assets/fonts/web/Merriweather.woff2') format('woff2'), url('assets/fonts/Merriweather.ttf') format('truetype'); font-display: block; }
@font-face { font-family: 'CourierPrime'; src: url('assets/fonts/web/CourierPrime.woff2') format('woff2'), url('assets/fonts/CourierPrime.ttf') format('truetype'); font-display: block; }
/* Signature collection (OFL, Latin subsets; the variable fonts carry every weight) */
@font-face { font-family: 'Cormorant'; src: url('assets/fonts/web/Cormorant.woff2') format('woff2'), url('assets/fonts/Cormorant.ttf') format('truetype'); font-weight: 300 700; font-display: block; }
@font-face { font-family: 'Cormorant'; src: url('assets/fonts/web/CormorantItalic.woff2') format('woff2'), url('assets/fonts/CormorantItalic.ttf') format('truetype'); font-weight: 300 700; font-style: italic; font-display: block; }
@font-face { font-family: 'Jost'; src: url('assets/fonts/web/Jost.woff2') format('woff2'), url('assets/fonts/Jost.ttf') format('truetype'); font-weight: 100 900; font-display: block; }
@font-face { font-family: 'BodoniModa'; src: url('assets/fonts/web/BodoniModa.woff2') format('woff2'), url('assets/fonts/BodoniModa.ttf') format('truetype'); font-weight: 400 900; font-display: block; }
@font-face { font-family: 'BodoniModa'; src: url('assets/fonts/web/BodoniModaItalic.woff2') format('woff2'), url('assets/fonts/BodoniModaItalic.ttf') format('truetype'); font-weight: 400 900; font-style: italic; font-display: block; }
@font-face { font-family: 'DMSerifDisplay'; src: url('assets/fonts/web/DMSerifDisplay.woff2') format('woff2'), url('assets/fonts/DMSerifDisplay.ttf') format('truetype'); font-display: block; }
@font-face { font-family: 'DMSerifDisplay'; src: url('assets/fonts/web/DMSerifDisplayItalic.woff2') format('woff2'), url('assets/fonts/DMSerifDisplayItalic.ttf') format('truetype'); font-style: italic; font-display: block; }
@font-face { font-family: 'PinyonScript'; src: url('assets/fonts/web/PinyonScript.woff2') format('woff2'), url('assets/fonts/PinyonScript.ttf') format('truetype'); font-display: block; }
@font-face { font-family: 'Italiana'; src: url('assets/fonts/web/Italiana.woff2') format('woff2'), url('assets/fonts/Italiana.ttf') format('truetype'); font-display: block; }
@font-face { font-family: 'NothingYouCouldDo'; src: url('assets/fonts/web/NothingYouCouldDo.woff2') format('woff2'), url('assets/fonts/NothingYouCouldDo.ttf') format('truetype'); font-display: block; }
@font-face { font-family: 'ReenieBeanie'; src: url('assets/fonts/web/ReenieBeanie.woff2') format('woff2'), url('assets/fonts/ReenieBeanie.ttf') format('truetype'); font-display: block; }
@font-face { font-family: 'Allura'; src: url('assets/fonts/web/Allura.woff2') format('woff2'), url('assets/fonts/Allura.ttf') format('truetype'); font-display: block; }
@font-face { font-family: 'HerrVonMuellerhoff'; src: url('assets/fonts/web/HerrVonMuellerhoff.woff2') format('woff2'), url('assets/fonts/HerrVonMuellerhoff.ttf') format('truetype'); font-display: block; }
@font-face { font-family: 'Blackletter'; src: url('assets/fonts/web/UnifrakturMaguntia.woff2') format('woff2'), url('assets/fonts/UnifrakturMaguntia.ttf') format('truetype'); font-display: block; }
@font-face { font-family: 'InstrumentSerif'; src: url('assets/fonts/web/InstrumentSerif.woff2') format('woff2'), url('assets/fonts/InstrumentSerif.ttf') format('truetype'); font-display: block; }
@font-face { font-family: 'InstrumentSerif'; src: url('assets/fonts/web/InstrumentSerifItalic.woff2') format('woff2'), url('assets/fonts/InstrumentSerifItalic.ttf') format('truetype'); font-style: italic; font-display: block; }
@font-face { font-family: 'BebasNeue'; src: url('assets/fonts/web/BebasNeue.woff2') format('woff2'), url('assets/fonts/BebasNeue.ttf') format('truetype'); font-display: block; }
@font-face { font-family: 'InterUI'; src: url('assets/fonts/web/InterVar.woff2') format('woff2'), url('assets/fonts/InterVar.ttf') format('truetype'); font-weight: 100 900; font-display: block; }

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
[hidden] { display: none !important; }
body.tp-body {
  background: var(--zk-paper); color: var(--zk-ink);
  font-family: var(--zk-text); font-size: 15px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
body.tp-locked { overflow: hidden; }
button { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }
:focus-visible { outline: none; box-shadow: var(--zk-focus); }

/* ---------------------------------------------------------------- buttons */
.tp-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 20px; border-radius: 999px;
  border: 2px solid var(--zk-ink); background: var(--zk-paper); color: var(--zk-ink);
  font: 600 15px/1 var(--zk-text); white-space: nowrap; cursor: pointer; text-decoration: none;
  box-shadow: 0 3px 0 var(--zk-ink); transition: transform .12s, box-shadow .12s, background .15s;
}
.tp-btn:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 0 0 var(--zk-ink); }
.tp-btn-primary { background: var(--zk-ink); color: var(--zk-paper); box-shadow: 0 3px 0 var(--zk-lavender); }
.tp-btn-primary:active:not(:disabled) { box-shadow: 0 0 0 var(--zk-lavender); }
.tp-btn-quiet { background: var(--zk-cream); }
.tp-btn-soft { background: var(--zk-mist); }
.tp-btn-wide { width: 100%; }
.tp-block { width: 100%; }
.tp-btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.tp-btn.is-busy { cursor: progress; opacity: .75; }
.tp-btn.is-busy i { animation: tpSpin .8s linear infinite; }
.tp-btn.is-busy i::before { content: "\f110"; }
@keyframes tpSpin { to { transform: rotate(360deg); } }

.tp-icon-btn {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 40px; height: 40px; border-radius: 50%;
  border: 1.5px solid var(--zk-line-2); background: var(--zk-paper); color: var(--zk-ink);
  cursor: pointer; text-decoration: none; font-size: 15px;
}
.tp-icon-btn:hover { background: var(--zk-cream); }
.tp-icon-btn:disabled { opacity: .35; cursor: default; }
.tp-link { color: var(--zk-deep); font-weight: 500; text-decoration: none; display: inline-flex; gap: 8px; align-items: center; min-height: 44px; }
.tp-link:hover { text-decoration: underline; }

/* ---------------------------------------------------------------- loading */
.tp-loading { position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; color: var(--zk-slate); }
.tp-loading-dot { width: 16px; height: 16px; border-radius: 50%; background: var(--zk-coral); animation: zkBreathe .9s ease-in-out infinite; }

/* =============================================================================
   PAGES (shared by the gallery, the editor and the print)
   ============================================================================= */
.tp-spread { display: flex; flex: none; border-radius: 3px; box-shadow: 0 18px 38px rgba(58, 46, 51, .16), 0 2px 6px rgba(58, 46, 51, .1); }
.tp-sheet { position: relative; flex: none; overflow: hidden; background: #FFFFFF; }
.tp-sheet.is-left { border-radius: 3px 0 0 3px; }
.tp-sheet.is-right { border-radius: 0 3px 3px 0; }
/* the fold */
.tp-sheet::after { content: ""; position: absolute; top: 0; bottom: 0; width: 9%; pointer-events: none; z-index: 5; }
.tp-sheet.is-left::after { right: 0; background: linear-gradient(to left, rgba(58, 46, 51, .16), rgba(58, 46, 51, 0)); }
.tp-sheet.is-right::after { left: 0; background: linear-gradient(to right, rgba(58, 46, 51, .16), rgba(58, 46, 51, 0)); }
.tp-spread.is-stacked { flex-direction: column; gap: 14px; box-shadow: none; }
.tp-spread.is-stacked .tp-sheet { border-radius: 3px; box-shadow: 0 10px 24px rgba(58, 46, 51, .14); }
.tp-spread.is-stacked .tp-sheet::after { display: none; }

.tp-page {
  position: absolute; left: 0; top: 0; width: 630px; height: 891px;
  transform-origin: 0 0; overflow: hidden; background: #FFFFFF;
  -webkit-user-select: none; user-select: none;
}
.tp-page-inside { display: flex; align-items: center; justify-content: center; background: repeating-linear-gradient(45deg, #F3EBD3 0 14px, #F8F2DF 14px 28px); }
.tp-page-inside span { font: 500 26px/1 var(--zk-text); color: var(--zk-slate); background: var(--zk-paper); padding: 14px 22px; border-radius: 999px; }
.tp-el { position: absolute; }
.tp-art { line-height: 0; }
.tp-art svg { display: block; width: 100%; height: 100%; overflow: visible; }

/* words */
.tp-tx { display: flex; align-items: center; justify-content: center; text-align: center; overflow: hidden; }
.tp-tx.is-top { align-items: flex-start; }
.tp-tx.is-left { justify-content: flex-start; text-align: left; }
.tp-tx.is-right { justify-content: flex-end; text-align: right; }
.tp-tx-in { width: 100%; white-space: pre-wrap; overflow-wrap: normal; word-break: normal; outline: none; }
.tp-tx-in[contenteditable] { cursor: text; border-radius: 6px; -webkit-user-select: text; user-select: text; }
.tp-tx-in[contenteditable]:hover { box-shadow: 0 0 0 4px rgba(91, 75, 196, .35); }
.tp-tx-in[contenteditable]:focus { box-shadow: 0 0 0 5px var(--zk-deep); background: rgba(255, 255, 255, .28); }
.tp-tx-in[contenteditable]:empty::before { content: attr(data-ph); opacity: .35; }

/* photos */
.tp-ph-frame, .tp-ph-in { position: absolute; inset: 0; overflow: hidden; }
.tp-ph-in { background: rgba(58, 46, 51, .06); }
.tp-img { position: absolute; display: block; max-width: none; -webkit-user-drag: none; pointer-events: none; }
.tp-empty { background: rgba(255, 251, 243, .78); }
.tp-empty span { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: var(--zk-slate); font: 600 24px/1 var(--zk-text); }
.tp-empty i { font-size: 40px; color: var(--zk-deep); }
.tp-empty em { font-style: normal; }
.tp-sample { position: absolute; inset: 0; }
.tp-sample svg { display: block; }
.tp-warn { position: absolute; left: 12px; top: 12px; z-index: 3; width: 46px; height: 46px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: #F59E0B; color: #FFFFFF; font-size: 22px; box-shadow: 0 2px 6px rgba(0, 0, 0, .25); }

/* =============================================================================
   GALLERY
   ============================================================================= */
.tp-gal { max-width: 1180px; margin: 0 auto; padding: 0 20px 48px; }
.tp-gal-top { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.tp-brand img { display: block; height: 44px; width: auto; }

.tp-hero { text-align: center; padding: 28px 0 34px; max-width: 760px; margin: 0 auto; }
.tp-eyebrow { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; color: var(--zk-deep); margin-bottom: 12px; }
.tp-new { background: var(--zk-lavender); color: var(--zk-ink); padding: 3px 10px; border-radius: 999px; font-size: 12.5px; }
.tp-sig { background: var(--zk-ink); color: var(--zk-paper); padding: 2px 9px; border-radius: 999px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.tp-hero h1 { font: 600 clamp(36px, 6.4vw, 62px)/1.02 var(--zk-display); letter-spacing: -.01em; }
.tp-lead { margin: 16px auto 0; font-size: 17px; color: var(--zk-slate); max-width: 620px; }
.tp-steps { list-style: none; padding: 0; margin: 24px 0 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.tp-steps li { display: inline-flex; align-items: center; gap: 10px; padding: 7px 16px 7px 7px; border-radius: 999px; background: var(--zk-cream); font-weight: 500; font-size: 14px; }
.tp-steps b { width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--zk-ink); color: var(--zk-paper); font: 600 14px/1 var(--zk-display); }

/* collections */
.tp-cats { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 14px; margin-bottom: 8px; scrollbar-width: none; justify-content: center; flex-wrap: wrap; }
.tp-cats button { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 999px; border: 1.5px solid var(--zk-line-2); background: var(--zk-paper); font-weight: 600; font-size: 14px; white-space: nowrap; cursor: pointer; }
.tp-cats button em { font-style: normal; font-size: 12px; min-width: 22px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--zk-cream); display: inline-flex; align-items: center; justify-content: center; }
.tp-cats button:hover { border-color: var(--zk-ink); }
.tp-cats button.is-on { background: var(--zk-ink); color: var(--zk-paper); border-color: var(--zk-ink); }
.tp-cats button.is-on em { background: var(--zk-lavender); color: var(--zk-ink); }

/* one card per design */
.tp-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; }
.tp-card { display: flex; flex-direction: column; border-radius: var(--zk-r-card); overflow: hidden; background: var(--zk-cream); border: 2px solid var(--zk-ink); box-shadow: 0 5px 0 var(--zk-ink); }
.tp-card-art {
  position: relative; display: flex; align-items: center; justify-content: center; height: 340px; padding: 0; border: 0; cursor: pointer; overflow: hidden;
  background: radial-gradient(circle, rgba(255, 252, 245, .45) 2px, transparent 2.6px) 0 0 / 20px 20px, var(--tint, var(--zk-mist));
}
.tp-card-cover { display: block; transform: rotate(-3deg); box-shadow: 0 14px 26px rgba(58, 46, 51, .25); border-radius: 3px; overflow: hidden; transition: transform .25s var(--zk-spring); }
.tp-card-art:hover .tp-card-cover { transform: rotate(0deg) scale(1.03); }
.tp-card-info { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.tp-card-info .tp-eyebrow { margin-bottom: 4px; font-size: 13px; }
.tp-card-info h2 { font: 600 26px/1.1 var(--zk-display); }
.tp-card-tag { margin-top: 6px; color: var(--zk-slate); font-size: 14px; flex: 1; }
.tp-facts { list-style: none; padding: 0; margin: 14px 0 16px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.tp-facts li { background: var(--zk-paper); border-radius: 12px; padding: 8px 10px; }
.tp-facts b { display: block; font: 600 16px/1.15 var(--zk-display); white-space: nowrap; }
.tp-facts span { display: block; font-size: 11.5px; color: var(--zk-slate); line-height: 1.25; }
.tp-card-cta { display: flex; gap: 8px; }
.tp-card-cta .tp-btn { flex: 1; padding: 0 12px; }

/* the viewer's strip of every spread */
.tp-view-strip { display: flex; gap: 8px; padding: 10px 14px; overflow-x: auto; border-top: 1.5px solid var(--zk-line); background: var(--zk-paper); scrollbar-width: thin; }
.tp-view-thumb { flex: none; padding: 4px; border-radius: 8px; border: 2px solid transparent; background: none; cursor: pointer; }
.tp-view-thumb:hover { background: var(--zk-cream); }
.tp-view-thumb.is-on { border-color: var(--zk-ink); background: var(--zk-cream); }
.tp-view-thumb .tp-spread { pointer-events: none; box-shadow: 0 2px 5px rgba(58, 46, 51, .16); }

.tp-design { display: flex; flex-direction: column; gap: 10px; padding: 10px; border-radius: 18px; border: 1.5px solid var(--zk-line); background: var(--zk-paper); cursor: pointer; text-align: left; transition: border-color .15s, transform .15s; }
.tp-design:hover { border-color: var(--zk-ink); transform: translateY(-2px); }
.tp-design-art { display: flex; align-items: center; justify-content: center; padding: 14px 6px; border-radius: 12px; background: var(--zk-cream-2); overflow: hidden; }
.tp-design-art .tp-spread { box-shadow: 0 6px 14px rgba(58, 46, 51, .16); }
.tp-design-cap { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 0 4px 2px; }
.tp-design-cap b { font-weight: 600; font-size: 14px; }
.tp-design-cap small { color: var(--zk-slate); font-size: 12.5px; white-space: nowrap; }
.tp-gal-foot { margin-top: 56px; text-align: center; color: var(--zk-slate); font-size: 13px; }

/* =============================================================================
   EDITOR
   ============================================================================= */
.tp-ed { position: fixed; inset: 0; display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; grid-template-columns: minmax(0, 1fr); background: #F4EEDF; }
/* fixed rows: the banner is usually hidden, and a hidden item would hand its row to the next one */
.tp-bar { grid-row: 1; }
.tp-banner { grid-row: 2; }
.tp-ed-body { grid-row: 3; }
.tp-strip { grid-row: 4; }

.tp-bar { display: flex; align-items: center; gap: 12px; height: 64px; padding: 0 16px; background: var(--zk-paper); border-bottom: 1.5px solid var(--zk-line); }
.tp-bar-title { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tp-bar-title > * { min-width: 0; max-width: 100%; }
.tp-bar-title b { font: 600 18px/1.2 var(--zk-display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tp-bar-title small { font-size: 12.5px; color: var(--zk-slate); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tp-save[data-state="unsaved"], .tp-save[data-state="saving"] { color: var(--zk-deep); }
.tp-save[data-state="error"] { color: #C2410C; font-weight: 600; }
.tp-bar-end { display: flex; align-items: center; gap: 8px; }
.tp-price { font-weight: 600; font-size: 14px; padding: 7px 12px; border-radius: 999px; background: var(--zk-cream); white-space: nowrap; }
.tp-banner { padding: 9px 16px; background: var(--zk-butter); font-size: 14px; font-weight: 500; text-align: center; border-bottom: 1.5px solid var(--zk-line); }

.tp-ed-body { display: grid; grid-template-columns: 300px minmax(0, 1fr); min-height: 0; }

/* photos */
.tp-tray { display: flex; flex-direction: column; gap: 12px; padding: 16px; min-height: 0; overflow-y: auto; background: var(--zk-paper); border-right: 1.5px solid var(--zk-line); }
.tp-tray-head { display: flex; align-items: center; gap: 8px; }
.tp-tray-head h2 { font: 600 18px/1.2 var(--zk-display); }
.tp-count { min-width: 26px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--zk-mist); font-size: 12.5px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; }
.tp-tray-close { margin-left: auto; display: none; }
/* the upload hub: as in the album editor (From computer / From phone) */
.tp-upload { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 14px; border: 2px dashed var(--zk-lavender); border-radius: 16px; background: #F5F2FD; }
.tp-upload input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.tp-upload-status { display: flex; align-items: center; justify-content: center; gap: 8px; font-weight: 600; font-size: 14px; }
.tp-upload-status i { color: var(--zk-deep); font-size: 18px; }
.tp-upload-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tp-upload-btn { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 6px; border-radius: 12px; border: 1.5px solid var(--zk-line-2); background: var(--zk-paper); font-size: 13px; font-weight: 600; cursor: pointer; transition: border-color .15s, transform .15s, background .15s; }
.tp-upload-btn i { font-size: 20px; color: var(--zk-deep); }
.tp-upload-btn:hover { border-color: var(--zk-ink); background: #FFFFFF; transform: translateY(-1px); }
.tp-upload-hint { font-size: 11.5px; color: var(--zk-slate); text-align: center; }
.tp-upload-hint i { margin-right: 3px; }
.tp-progress { position: relative; height: 30px; border-radius: 999px; background: var(--zk-cream); overflow: hidden; }
.tp-progress i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--zk-mist); transition: width .25s; }
.tp-progress span { position: relative; display: flex; height: 100%; align-items: center; justify-content: center; font-size: 12.5px; font-weight: 600; }
.tp-hint { font-size: 13px; color: var(--zk-slate); }
.tp-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; border-radius: 12px; }
.tp-tray.is-picking .tp-grid { outline: 3px solid var(--zk-deep); outline-offset: 5px; }
.tp-tray.is-picking .tp-hint::before { content: "Pick a photo for the selected spot. "; color: var(--zk-deep); font-weight: 600; }
.tp-photo { position: relative; aspect-ratio: 1; padding: 0; border: 0; border-radius: 10px; overflow: hidden; background: var(--zk-cream); cursor: grab; }
.tp-photo img { display: block; width: 100%; height: 100%; object-fit: cover; transition: opacity .15s; }
.tp-photo:hover img { opacity: .85; }
.tp-photo i { display: none; position: absolute; right: 5px; top: 5px; width: 22px; height: 22px; border-radius: 50%; align-items: center; justify-content: center; background: var(--zk-ink); color: var(--zk-paper); font-size: 11px; }
.tp-photo.is-used img { opacity: .5; }
.tp-photo.is-used i { display: flex; }

/* the spread */
.tp-main { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.tp-main-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px 0; min-height: 50px; }
.tp-where { min-width: 0; display: flex; flex-direction: column; }
.tp-where b { font: 600 18px/1.2 var(--zk-display); }
.tp-where small { font-size: 13px; color: var(--zk-slate); }
.tp-tools { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.tp-tool { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: 999px; border: 1.5px solid var(--zk-line-2); background: var(--zk-paper); font-size: 13px; font-weight: 500; cursor: pointer; white-space: nowrap; }
.tp-tool:hover:not(:disabled) { border-color: var(--zk-ink); }
.tp-tool:disabled { opacity: .38; cursor: default; }
.tp-tool-danger:hover:not(:disabled) { color: #C2410C; border-color: #C2410C; }
.tp-stage { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 16px 20px; overflow: hidden; }
.tp-stage.is-stacked { overflow-y: auto; align-items: flex-start; padding: 12px 12px 90px; }
.tp-nav { position: absolute; top: 50%; z-index: 4; width: 44px; height: 44px; margin-top: -10px; border-radius: 50%; border: 2px solid var(--zk-ink); background: var(--zk-paper); cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: 0 3px 0 var(--zk-ink); }
.tp-nav:disabled { opacity: 0; pointer-events: none; }
.tp-prev { left: 10px; }
.tp-next { right: 10px; }

body:not(.is-preview):not(.is-readonly) .tp-ed .tp-ph { cursor: pointer; }
body:not(.is-preview):not(.is-readonly) .tp-ed .tp-ph.is-filled { cursor: grab; }
.tp-ph.is-panning { cursor: grabbing !important; }
.tp-ph.is-sel::after, .tp-ph.is-drop::after { content: ""; position: absolute; inset: -9px; border: 6px solid var(--zk-deep); border-radius: 14px; pointer-events: none; z-index: 4; }
.tp-ph.is-drop::after { border-color: var(--zk-coral); background: rgba(255, 106, 100, .12); }
.tp-ed .tp-ph:not(.is-filled):hover .tp-empty { background: rgba(238, 235, 252, .92); }
.is-preview .tp-warn, .is-preview .tp-ph.is-sel::after { display: none; }

.tp-slotbar { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 6; display: flex; align-items: center; gap: 8px; padding: 7px 9px 7px 16px; max-width: calc(100% - 24px); background: var(--zk-paper); border: 2px solid var(--zk-ink); border-radius: 999px; box-shadow: 0 4px 0 var(--zk-ink); }
.tp-zoom { display: inline-flex; align-items: center; gap: 8px; color: var(--zk-slate); font-size: 13px; }
.tp-zoom input { width: 120px; accent-color: var(--zk-deep); }
.tp-slotbar-tip { font-size: 12px; color: var(--zk-slate); padding-right: 8px; white-space: nowrap; }

/* all spreads */
.tp-strip { display: flex; align-items: center; gap: 10px; padding: 8px 14px; min-width: 0; background: var(--zk-paper); border-top: 1.5px solid var(--zk-line); }
.tp-strip-list { display: flex; gap: 8px; flex: 1; min-width: 0; overflow-x: auto; padding: 4px 2px 6px; scrollbar-width: thin; }
/* one card per spread: the spread, then its number and actions underneath */
.tp-card-s { flex: none; display: flex; flex-direction: column; padding: 5px 5px 3px; border-radius: 10px; border: 2px solid transparent; background: transparent; }
.tp-card-s:hover { background: var(--zk-cream); }
.tp-card-s.is-on { border-color: var(--zk-ink); background: var(--zk-cream); }
.tp-card-s:not(.is-locked) .tp-thumb { cursor: grab; }
.tp-card-s.is-ghost { opacity: .35; }
.tp-thumb { display: block; padding: 0; border: 0; background: none; cursor: pointer; }
.tp-thumb .tp-spread { pointer-events: none; box-shadow: 0 2px 6px rgba(58, 46, 51, .16); }
.tp-card-foot { display: flex; align-items: center; gap: 4px; margin-top: 4px; min-height: 24px; }
.tp-thumb-n { flex: 1; font-size: 11.5px; font-weight: 600; padding-left: 2px; }
.tp-card-lock { font-size: 10px; color: var(--zk-slate); opacity: .6; padding-right: 4px; }
.tp-card-btn { width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--zk-line-2); background: var(--zk-paper); color: var(--zk-slate); font-size: 10px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
.tp-card-btn:hover { background: var(--zk-deep); border-color: var(--zk-deep); color: #FFFFFF; }
.tp-card-btn.is-danger:hover { background: #C2410C; border-color: #C2410C; }
.tp-main-tip { font-size: 12.5px; color: var(--zk-slate); }
.tp-strip-add { flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; width: 96px; height: 84px; border-radius: 12px; border: 2px dashed var(--zk-line-2); background: transparent; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.tp-strip-add:hover { border-color: var(--zk-ink); background: var(--zk-cream); }

.tp-fab { display: none; }

/* read only (ordered, or the admin looking) and preview */
.is-readonly .tp-upload, .is-readonly #edAutofill, .is-readonly #edOrder, .is-readonly .tp-tools, .is-readonly .tp-strip-add, .is-readonly .tp-fab { display: none !important; }
.is-preview .tp-tray, .is-preview .tp-fab, .is-preview .tp-tools, .is-preview .tp-strip-add { display: none !important; }
.is-preview .tp-ed-body { grid-template-columns: minmax(0, 1fr); }

/* photo files dragged over the page */
body.is-dropping::after {
  content: "Drop your photos to add them"; position: fixed; inset: 12px; z-index: 100; pointer-events: none;
  display: flex; align-items: center; justify-content: center; border: 3px dashed var(--zk-deep); border-radius: 22px;
  background: rgba(251, 245, 229, .9); font: 600 28px/1.2 var(--zk-display); color: var(--zk-ink);
}

/* =============================================================================
   DIALOGS, TOAST
   ============================================================================= */
.tp-dlg { width: min(560px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 0; border: 2px solid var(--zk-ink); border-radius: var(--zk-r-card); background: var(--zk-paper); color: var(--zk-ink); box-shadow: 0 6px 0 var(--zk-ink); overflow: hidden; }
.tp-dlg::backdrop { background: rgba(56, 51, 54, .45); }
.tp-dlg[open] { display: flex; flex-direction: column; }
.tp-dlg form { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.tp-dlg-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px 14px 20px; border-bottom: 1.5px solid var(--zk-line); }
.tp-dlg-head b { display: block; font: 600 20px/1.2 var(--zk-display); }
.tp-dlg-head small { display: block; font-size: 13px; color: var(--zk-slate); }
.tp-dlg-body { padding: 18px 20px; overflow-y: auto; min-height: 0; }
.tp-dlg-foot { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 12px 16px; border-top: 1.5px solid var(--zk-line); }

.tp-dlg-view { width: min(1120px, calc(100vw - 24px)); height: min(780px, calc(100dvh - 24px)); }
.tp-view-stage { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; background: var(--zk-cream-2); overflow: hidden; }
.tp-dlg-view .tp-dlg-foot { justify-content: center; }
.tp-view-count { min-width: 64px; text-align: center; font-weight: 600; font-size: 14px; }
#viewUse { margin-left: auto; }
.tp-dlg-view .tp-dlg-foot::before { content: ""; flex: 1; }

.tp-fld { display: block; }
.tp-fld span { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.tp-fld input { width: 100%; height: 48px; padding: 0 14px; border-radius: var(--zk-r-input); border: 2px solid var(--zk-line-2); background: var(--zk-cream); font: 500 16px var(--zk-text); color: var(--zk-ink); }
.tp-fld input:focus { outline: none; border-color: var(--zk-ink); }
.tp-fld-note { font-size: 12.5px; color: var(--zk-slate); margin-top: 6px; }
.tp-label { font-weight: 600; font-size: 14px; margin: 18px 0 8px; }
.tp-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tp-opt { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px 14px; border-radius: 14px; border: 2px solid var(--zk-line-2); background: var(--zk-paper); text-align: left; cursor: pointer; transition: border-color .15s, box-shadow .15s, background .15s; }
.tp-opt b { font: 600 17px/1.2 var(--zk-display); }
.tp-opt small { font-size: 12.5px; color: var(--zk-slate); }
.tp-opt.is-on { border-color: var(--zk-ink); background: #F5F2FD; box-shadow: 0 3px 0 var(--zk-ink); }
.tp-sum { margin-top: 18px; padding: 12px 14px; border-radius: 14px; background: var(--zk-cream); font-size: 14px; }
.tp-sum b { font: 600 18px var(--zk-display); }
.tp-gate { margin-top: 16px; padding: 14px; border-radius: 14px; background: var(--zk-mist); }
.tp-gate p { font-weight: 500; margin-bottom: 10px; }
.tp-gate div { display: flex; gap: 8px; flex-wrap: wrap; }

.tp-dlg-pick { width: min(1000px, calc(100vw - 24px)); }
.tp-pick-grid { flex: 1; min-height: 0; overflow-y: auto; padding: 16px; display: grid; grid-template-columns: repeat(auto-fill, minmax(214px, 1fr)); gap: 12px; }
.tp-dlg-pick .tp-dlg-foot { justify-content: flex-start; }

.tp-dlg-ask { width: min(420px, calc(100vw - 24px)); }
.tp-dlg-ask .tp-dlg-body b { display: block; font: 600 20px/1.25 var(--zk-display); margin-bottom: 6px; }
.tp-dlg-ask .tp-dlg-body p { color: var(--zk-slate); }

.tp-toast { position: fixed; left: 50%; bottom: 24px; z-index: 200; max-width: min(520px, calc(100vw - 32px)); padding: 12px 18px; border-radius: 16px; background: var(--zk-ink); color: var(--zk-paper); font-size: 14px; font-weight: 500; box-shadow: 0 10px 30px rgba(0, 0, 0, .2); transform: translate(-50%, 12px); opacity: 0; transition: opacity .22s, transform .22s; pointer-events: none; }
.tp-toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.tp-toast[data-kind="err"] { background: #7C2D12; }

/* =============================================================================
   PREVIEW: the album editor's (studio.css "PREVIEW") look and sizes
   ============================================================================= */
.tp-pv {
  position: fixed; inset: 0; z-index: 250; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: radial-gradient(1200px 700px at 50% 40%, #3a302a 0%, #1d1815 55%, #120f0d 100%); font-family: var(--zk-text);
}
.tp-pv-top { position: absolute; top: 0; left: 0; right: 0; z-index: 60; display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; }
.tp-pv-title { display: flex; align-items: center; gap: 10px; color: rgba(255, 255, 255, .75); font-family: var(--zk-display); font-size: 17px; }
.tp-pv-title i { color: #e8c38a; }
.tp-pv-close { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 99px; border: 1px solid rgba(255, 255, 255, .15); background: rgba(255, 255, 255, .08); color: #FFFFFF; font-size: 13px; font-weight: 600; cursor: pointer; transition: background .15s; }
.tp-pv-close:hover { background: rgba(255, 255, 255, .18); }
.tp-pv-stage { display: flex; align-items: center; justify-content: center; width: 100%; }
.tp-pv-book { position: relative; display: flex; justify-content: center; align-items: center; }
.tp-pv-book::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 40px; transform: translateX(-50%); z-index: 0; background: linear-gradient(to right, rgba(0, 0, 0, .05), rgba(0, 0, 0, .2), rgba(0, 0, 0, .05)); }
.tp-pv-book.is-single::before { display: none; }
.tp-pv-page { position: relative; overflow: hidden; background: #FFFFFF; box-shadow: 0 10px 30px rgba(0, 0, 0, .15); border-radius: 4px; }
.tp-pv-page.is-left { border-radius: 4px 0 0 4px; }
.tp-pv-page.is-right { border-radius: 0 4px 4px 0; }
.tp-pv-page.is-binding { display: flex; align-items: center; justify-content: center; background: #f3f4f6; }
.tp-pv-page.is-binding span { color: #9ca3af; font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: 1px; text-align: center; padding: 20px; }
.tp-pv-nav { display: flex; align-items: center; gap: 22px; margin-top: 18px; z-index: 50; }
.tp-pv-arrow { width: 52px; height: 52px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .16); color: #FFFFFF; font-size: 16px; transition: background .15s, transform .15s, opacity .2s; }
.tp-pv-arrow:hover { background: rgba(255, 255, 255, .2); transform: scale(1.06); }
.tp-pv-counter { min-width: 120px; text-align: center; color: rgba(255, 255, 255, .85); font: 600 12px/1 var(--zk-text); letter-spacing: .2em; text-transform: uppercase; }
.tp-pv-hint { margin-top: 12px; font-size: 12px; color: rgba(255, 255, 255, .4); }
@media (max-width: 1023px) {
  .tp-pv-nav { position: absolute; bottom: calc(28px + env(safe-area-inset-bottom)); left: 0; right: 0; justify-content: center; }
  .tp-pv-hint { display: none; }
  .tp-pv-top { padding: 12px 14px; }
  .tp-pv-title span { display: none; }
}

/* off screen: thumbnails and print pages are drawn here */
.tp-offstage { position: fixed; left: -12000px; top: 0; width: 630px; height: 891px; overflow: hidden; pointer-events: none; }

/* =============================================================================
   SMALLER SCREENS
   ============================================================================= */
@media (max-width: 1100px) {
  .tp-tool span, .tp-slotbar-tip { display: none; }
  .tp-tool { padding: 0 11px; }
}
@media (max-width: 960px) {
  .tp-cats { justify-content: flex-start; flex-wrap: nowrap; margin: 0 -20px 8px; padding: 4px 20px 14px; }
}
@media (max-width: 900px) {
  .tp-ed-body { grid-template-columns: minmax(0, 1fr); }
  .tp-tray {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; max-height: 74vh;
    border-right: 0; border-radius: 22px 22px 0 0; box-shadow: 0 -12px 34px rgba(56, 51, 54, .2);
    transform: translateY(105%); transition: transform .28s cubic-bezier(.3, .7, .3, 1); visibility: hidden;
  }
  .tp-tray.is-open { transform: none; visibility: visible; }
  .tp-tray-close { display: inline-flex; }
  .tp-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .tp-fab {
    display: inline-flex; align-items: center; gap: 8px; position: absolute; right: 14px; bottom: 14px; z-index: 30;
    height: 48px; padding: 0 18px; border-radius: 999px; border: 2px solid var(--zk-ink);
    background: var(--zk-ink); color: var(--zk-paper); font-weight: 600; box-shadow: 0 3px 0 var(--zk-lavender); cursor: pointer;
  }
  .tp-fab em { font-style: normal; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--zk-lavender); color: var(--zk-ink); font-size: 12px; display: inline-flex; align-items: center; justify-content: center; }
  body.tp-tray-open .tp-fab { display: none; }
  .tp-price { display: none; }
  #edPreview span, #edPrint span { display: none; }
  #edPreview, #edPrint { padding: 0 12px; }
  .tp-main-head { padding: 10px 12px 0; }
  .tp-main-head .tp-where { flex: 1; }
  .tp-main-tip { display: none; }
  .tp-tool { height: 34px; padding: 0 10px; }
  /* phones: the strip and scrolling move between spreads */
  .tp-nav { display: none; }
  .tp-slotbar { bottom: 74px; }
  .tp-thumb-n { font-size: 11px; }
  .tp-strip { padding: 6px 10px; }
  .tp-zoom input { width: 90px; }
  .tp-strip-add { width: 72px; height: 76px; }
}
@media (max-width: 560px) {
  .tp-bar { gap: 8px; padding: 0 10px; }
  .tp-btn { padding: 0 16px; }
  .tp-hero { padding-top: 12px; }
  .tp-steps li { font-size: 13px; }
  .tp-all-grid { grid-template-columns: 1fr; }
  .tp-opts { grid-template-columns: 1fr; }
  .tp-slotbar { gap: 4px; padding: 6px; }
  .tp-zoom i { display: none; }
}

/* =============================================================================
   PHONE UPLOAD: copied from studio.css (the album editor), so both editors show
   the same popup. Base placement first (album.css gives the editor its own).
   ============================================================================= */
#phoneUploadModal { position: fixed; inset: 0; z-index: 300; display: flex; align-items: center; justify-content: center; font-family: var(--zk-text); --zs-font: var(--zk-text); }
#phoneUploadModal.hidden { display: none !important; }
#phoneUploadModal .pu-card { opacity: 0; transform: translateY(10px) scale(.98); transition: opacity .3s, transform .3s; }
#phoneUploadModal { --pu-ink: #0b1a2f; --pu-ink-2: #445168; --pu-ink-3: #7a8598; --pu-line: rgba(56, 51, 54, .09); --pu-accent: #2e5bff; --pu-sun: #ffc23d; --pu-coral: #ff6b4a; --pu-ok: #0f9d63;
  justify-content: center !important; padding: 20px !important; background-color: rgba(24, 34, 66, .42) !important; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); font-family: var(--zs-font); }
#phoneUploadModal [hidden] { display: none !important; }
#phoneUploadModal svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pu-card { position: relative; width: min(780px, 100%); max-height: calc(100vh - 40px); overflow: auto; background: #fff; border-radius: 28px; color: var(--pu-ink);
  box-shadow: 0 40px 100px -28px rgba(44, 40, 42, .55), 0 0 0 1px rgba(56, 51, 54, .06); opacity: 0; transform: translateY(16px) scale(.98); transition: transform .5s cubic-bezier(.16, 1, .3, 1), opacity .25s ease; }
#phoneUploadModal.show-modal .pu-card { opacity: 1; transform: none; }
.pu-x { position: absolute; top: 14px; right: 14px; z-index: 3; display: grid; place-items: center; width: 38px; height: 38px; border: 0; border-radius: 12px; background: rgba(255, 255, 255, .85); color: var(--pu-ink-2); cursor: pointer; transition: background .2s, color .2s; }
.pu-x:hover { background: #f1f2f5; color: var(--pu-ink); }
.pu-x svg { width: 18px; height: 18px; }

.pu-grid { display: grid; grid-template-columns: 320px minmax(0, 1fr); }
.pu-scan { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; padding: 36px 30px; background: #fbf8f3; border-right: 1px solid var(--pu-line); }
/* The QR: one straight white card, navy code, quiet caption and timer underneath */
.pu-qr-card { position: relative; width: 100%; max-width: 236px; padding: 14px; border-radius: 22px; background: #fff;
  box-shadow: 0 0 0 1px rgba(56, 51, 54, .07), 0 1px 2px rgba(56, 51, 54, .05), 0 18px 36px -20px rgba(56, 51, 54, .28); }
.pu-qr { position: relative; aspect-ratio: 1; width: 100%; background: #fff; }
.pu-qr canvas, .pu-qr img { display: block; width: 100%; height: 100%; animation: puIn .5s cubic-bezier(.16, 1, .3, 1); }
.pu-qr .pu-spinner { position: absolute; left: 50%; top: 50%; margin: -18px 0 0 -18px; }
@keyframes puIn { from { opacity: 0; transform: scale(.96); } }
.pu-spinner { display: block; width: 36px; height: 36px; border-radius: 50%; border: 3px solid #e9eefc; border-top-color: var(--pu-accent); border-right-color: var(--pu-coral); animation: puSpin .8s linear infinite; }
/* Spinners inside closed panels stay still (they are hidden, not removed, so they kept animating) */
#phoneUploadModal.hidden .pu-spinner,
#mmBackgroundTooltip:not(.visible):not(.docked-tooltip) .fa-spin { animation-play-state: paused; }
/* The empty-library icon bobs a few times, then rests (it was animating forever, also while hidden) */
.photo-library-empty-prompt .icon { animation-iteration-count: 3 !important; }
@keyframes puSpin { to { transform: rotate(360deg); } }
.pu-expired { position: absolute; inset: 0; z-index: 2; display: grid; place-content: center; justify-items: center; gap: 12px; border-radius: 22px; background: rgba(255, 255, 255, .92); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); animation: puIn .3s ease; }
.pu-expired p { font-weight: 650; font-size: 16px; }
.pu-timer { display: grid; justify-items: center; gap: 5px; width: 100%; max-width: 236px; text-align: center; }
.pu-scan-cap { margin: 0; font: 600 14px/1.3 var(--zs-font); color: var(--pu-ink); }
.pu-timer-bar { position: relative; width: 56px; height: 3px; margin-top: 7px; border-radius: 3px; background: rgba(56, 51, 54, .1); overflow: hidden; }
.pu-timer-bar i { position: absolute; inset: 0; border-radius: 3px; background: var(--pu-ink); transform-origin: 0 50%; transition: transform 1s linear, background .3s; }
.pu-timer-txt { font-size: 12.5px; color: var(--pu-ink-3); }
.pu-timer-txt b { font-weight: 600; font-variant-numeric: tabular-nums; color: var(--pu-ink-2); }
.pu-timer.is-low .pu-timer-bar i { background: var(--pu-coral); }
.pu-timer.is-low .pu-timer-txt b { color: #e4512f; }

.pu-info { padding: 36px 36px 30px; }
.pu-eyebrow { display: inline-flex; align-items: center; gap: 9px; font: 600 11.5px/1 var(--zs-font); letter-spacing: .14em; text-transform: uppercase; color: var(--pu-ink-3); }
.pu-eyebrow span { width: 8px; height: 8px; border-radius: 50%; background: var(--pu-sun); }
.pu-title { margin: 12px 0 0; font: 650 25px/1.15 var(--zs-font); letter-spacing: -.03em; color: var(--pu-ink); }
.pu-steps { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 18px; }
.pu-steps li { position: relative; display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 14px; }
.pu-steps li > i { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; font: 700 13px/1 var(--zs-font); font-style: normal; color: var(--pu-accent); background: #e9f0ff; }
.pu-steps li:nth-child(2) > i { color: #b97700; background: #fff3d3; }
.pu-steps li:nth-child(3) > i { color: #e4512f; background: #ffe9dc; }
.pu-steps li:not(:last-child)::before { content: ""; position: absolute; left: 14.5px; top: 34px; bottom: -16px; width: 1px; background: repeating-linear-gradient(var(--pu-line) 0 4px, transparent 4px 7px); }
.pu-steps b { display: block; font-size: 15px; font-weight: 600; line-height: 1.3; }
.pu-steps span { display: block; margin-top: 2px; font-size: 13.5px; line-height: 1.45; color: var(--pu-ink-3); }
.pu-code { display: inline-flex; align-items: center; gap: 16px; margin-top: 12px; padding: 10px 10px 10px 18px; border: 1.5px dashed rgba(91, 75, 196, .4); border-radius: 16px; background: #f4f7ff; color: var(--pu-ink); cursor: pointer; transition: border-color .2s, background .2s, transform .2s; }
.pu-code:hover { border-color: var(--pu-accent); transform: translateY(-1px); }
.pu-code .pu-digits { display: inline; margin: 0; font: 700 28px/1 var(--zs-font); letter-spacing: .14em; font-variant-numeric: tabular-nums; color: var(--pu-ink); }
.pu-code small { padding: 7px 11px; border-radius: 10px; background: #fff; font: 600 12px/1 var(--zs-font); color: var(--pu-accent); box-shadow: 0 1px 2px rgba(56, 51, 54, .08); }
.pu-code.is-copied { border-style: solid; border-color: var(--pu-ok); background: #e9f7ef; }
.pu-code.is-copied small { color: var(--pu-ok); }
.pu-alt { margin: 22px 0 0; padding-top: 16px; border-top: 1px solid var(--pu-line); font-size: 13px; color: var(--pu-ink-3); }
.pu-link { padding: 0; border: 0; background: none; cursor: pointer; font: 600 13px/1.4 var(--zs-font); color: var(--pu-accent); }
.pu-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.pu-btn { display: inline-flex; align-items: center; justify-content: center; height: 46px; padding: 0 26px; border: 0; border-radius: 999px; background: var(--pu-ink); color: #fff; font: 600 15px/1 var(--zs-font); cursor: pointer; transition: background .2s, transform .2s; }
.pu-btn:hover { background: var(--pu-accent); }
.pu-btn:active { transform: scale(.97); }
.pu-btn-sm { height: 38px; padding: 0 18px; font-size: 14px; }

.pu-connected { display: grid; justify-items: center; text-align: center; padding: 52px 40px 40px;
  background: radial-gradient(50% 45% at 50% 0%, rgba(255, 217, 120, .45), transparent 70%), radial-gradient(40% 40% at 0% 100%, rgba(207, 224, 255, .8), transparent 70%), #fff; }
.pu-ok { position: relative; display: grid; place-items: center; width: 88px; height: 88px; border-radius: 28px; background: #e9f0ff; color: var(--pu-accent); animation: puIn .5s cubic-bezier(.34, 1.4, .64, 1); }
.pu-ok::before { content: ""; position: absolute; inset: -8px; border-radius: 34px; border: 2px solid rgba(91, 75, 196, .25); animation: puRing 2.2s ease-out infinite; }
@keyframes puRing { from { opacity: 1; transform: scale(.92); } to { opacity: 0; transform: scale(1.18); } }
.pu-ok > svg { width: 40px; height: 40px; }
.pu-ok span { position: absolute; right: -6px; bottom: -6px; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--pu-ok); color: #fff; box-shadow: 0 0 0 4px #fff; }
.pu-ok span svg { width: 18px; height: 18px; stroke-width: 2.6; }
.pu-connected .pu-title { margin-top: 22px; }
.pu-text { max-width: 36ch; margin: 8px 0 0; font-size: 14.5px; line-height: 1.55; color: var(--pu-ink-2); }
.pu-count { display: inline-flex; align-items: center; gap: 9px; margin: 22px 0 0; padding: 10px 16px; border-radius: 999px; background: #f3f4f7; font-size: 13.5px; font-weight: 600; color: var(--pu-ink-2); }
.pu-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--pu-accent); animation: puBlink 1.2s ease-in-out infinite; }
@keyframes puBlink { 50% { opacity: .25; } }
.pu-count.has-photos { background: #e9f7ef; color: var(--pu-ok); }
.pu-count.has-photos .pu-dot { background: var(--pu-ok); animation: none; }
.pu-actions { display: grid; justify-items: center; gap: 14px; margin-top: 26px; }

@media (max-width: 720px) {
  #phoneUploadModal { padding: 12px !important; }
  .pu-card { max-height: calc(100vh - 24px); border-radius: 24px; }
  .pu-grid { grid-template-columns: 1fr; }
  .pu-scan { gap: 16px; padding: 28px 22px 22px; border-right: 0; border-bottom: 1px solid var(--pu-line); }
  .pu-qr-card { max-width: 204px; padding: 12px; border-radius: 20px; }
  .pu-info { padding: 22px 22px 24px; }
  .pu-title { font-size: 21px; }
  .pu-steps { margin-top: 18px; gap: 14px; }
  .pu-code .pu-digits { font-size: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  .pu-ok::before, .pu-dot { animation: none; }
}
.pu-code.is-dead { opacity: .4; pointer-events: none; text-decoration: line-through; }

/* =============================================================================
   PHONES: the gallery as a two-column shelf (Nov 2026)
   Thirty-nine full cards made a 26,000 px scroll. On a phone each card is a
   cover, its name and a price; tapping the cover opens "Look inside", where the
   full story is.
   ============================================================================= */
@media (max-width: 560px) {
  .tp-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .tp-card { border-radius: 16px; box-shadow: 0 4px 0 var(--zk-ink); }
  .tp-card-art { height: 214px; }
  .tp-card-cover { zoom: .6; }
  .tp-card-art::after { content: "Look inside"; position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); padding: 5px 10px; border-radius: 999px;
    background: rgba(255, 252, 245, .94); color: var(--zk-ink); font: 600 12px/1 var(--zk-text); white-space: nowrap; box-shadow: 0 1px 0 rgba(58, 46, 51, .15); pointer-events: none; }
  .tp-card-info { padding: 10px 12px 12px; gap: 0; }
  .tp-card-info .tp-eyebrow { font-size: 12px; margin-bottom: 2px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .tp-card-info .tp-sig { font-size: 11px; }
  .tp-card-info h2 { font-size: 17px; line-height: 1.15; }
  .tp-card-tag { display: none; }
  .tp-facts { display: block; margin: 4px 0 10px; }
  .tp-facts li { display: none; }
  .tp-facts li:last-child { display: flex; flex-direction: row-reverse; justify-content: flex-end; align-items: baseline; gap: 5px; padding: 0; background: none; }
  .tp-facts li:last-child b { font-size: 15px; }
  .tp-facts li:last-child span { font-size: 12px; }
  .tp-card-cta .tp-btn-quiet { display: none; }
  .tp-card-cta .tp-btn { height: 40px; font-size: 14px; }
}
