/* Cup builder steps (photocupz.com/studio/): on the cup screen the cup is
   docked under the header and one step at a time sits below it, so the cup
   never scrolls away. Computers get the cup on the left, steps on the right. */
:root{--head:66px;--dock:40vh}
body.studio-dock{overflow:hidden}
body.studio-dock.dock-tall{--dock:54vh}
.studio-dock .site-footer,.studio-dock #builderNotice{display:none}

/* The docked cup. */
.studio-dock .cup-card{position:fixed;z-index:20;top:var(--head);left:0;right:0;height:var(--dock);max-width:none;margin:0;padding:8px 8px 46px;border:0;border-bottom:1px solid var(--line);border-radius:0;display:flex;align-items:center;justify-content:center;background:radial-gradient(circle at 50% 40%,#fff 0,#f1f0ff 75%);transition:height .2s ease}
.studio-dock .real-cup-preview{display:block;width:auto;height:100%;max-width:100%;margin:0 auto;touch-action:pan-y;cursor:ew-resize}
.studio-dock .real-cup-preview[hidden]{display:none}
body.studio-dock:not(.dock-tall) .real-cup-preview{touch-action:none;cursor:grab}
.studio-dock .cup-card>.quality-pill{position:absolute;z-index:2;top:8px;left:8px;padding:5px 8px;font-size:10.5px}
.studio-dock .expand-cup{top:8px;right:8px;min-height:34px;width:34px;padding:0;justify-content:center;font-size:16px}
.dock-tools{position:absolute;left:12px;right:12px;bottom:6px;display:flex;align-items:center;justify-content:center;gap:8px}
.dock-btn{min-width:40px;height:36px;padding:0 10px;border:1px solid #d3d0e4;border-radius:999px;background:#fff;color:var(--blue-dark);font-size:18px;font-weight:850;cursor:pointer}
.dock-btn[hidden]{display:none}
.dock-wide{font-size:13px;margin-left:6px}
.dock-btn[aria-pressed="true"]{background:var(--blue);border-color:var(--blue);color:#fff}
.dock-turn{display:flex;align-items:center;gap:8px;flex:1;max-width:330px;padding:4px 12px;border:1px solid #d3d0e4;border-radius:999px;background:#fff;font-size:12.5px;font-weight:850;color:var(--ink)}
.dock-turn[hidden]{display:none}
.dock-turn input{flex:1;min-width:0;accent-color:var(--blue);margin:0}
.turn-view{min-width:70px;text-align:right;color:var(--muted);font-size:11.5px;font-weight:800}

/* Flat view: the whole design laid out, Front in the middle, Back at the edges. */
.flat-wrap{position:relative;width:min(100%,560px);border-radius:10px;overflow:hidden;box-shadow:0 0 0 1px #d8d5ea;background:#fff}
.flat-wrap[hidden]{display:none}
#flatCanvas{display:block;width:100%;height:auto;touch-action:none;cursor:grab}
.flat-mark{position:absolute;top:4px;padding:2px 7px;border-radius:999px;background:rgba(23,23,47,.72);color:#fff;font-size:10px;font-weight:850;pointer-events:none}
.flat-front{left:50%;transform:translateX(-50%)}
.flat-back-l{left:4px}.flat-back-r{right:4px}
.flat-wrap::after{content:"";position:absolute;top:0;bottom:0;left:50%;border-left:1px dashed rgba(255,255,255,.8);pointer-events:none}

/* The step panel under the cup. */
.studio-dock #checkScreen{padding:0;border:0;box-shadow:none;background:none;animation:none}
.step-panel{position:fixed;z-index:21;left:0;right:0;bottom:0;top:calc(var(--head) + var(--dock));display:grid;grid-template-rows:auto 1fr auto;background:#fff;transition:top .2s ease;padding-bottom:env(safe-area-inset-bottom,0px)}
.sheet-back{flex:0 0 auto;width:38px;height:38px;border:1px solid var(--line);border-radius:50%;background:#fff;color:var(--blue-dark);font-size:24px;line-height:1;cursor:pointer}
.sheet-body{overflow:auto;padding:12px 14px;-webkit-overflow-scrolling:touch}
.lead-text{margin:0 0 12px;color:var(--muted);font-size:14.5px;line-height:1.45}
.sheet-help{margin:10px 0 0;color:var(--muted);font-size:13px;line-height:1.4}
.sheet-help:empty{display:none}

/* First step: how the photo goes on. */
.choice-list{display:grid;gap:8px}
.choice{display:grid;gap:2px;width:100%;padding:12px 14px;border:1px solid var(--line);border-radius:14px;background:#fff;text-align:left;cursor:pointer;color:var(--ink)}
.choice[hidden]{display:none}
.choice b{font-size:15.5px}
.choice small{color:var(--muted);font-size:12.5px;font-weight:600}
.choice[aria-pressed="true"]{border-color:var(--blue);background:var(--blue-soft);box-shadow:0 0 0 2px var(--blue) inset}
.quality-inline{margin:0 0 10px;padding:10px 12px;border-radius:12px;background:#fff1d6;color:#5f3500;font-size:13px;line-height:1.4}
.quality-inline[hidden]{display:none}
.quality-pill[data-level="soft"],.quality-pill[data-level="bad"]{color:#7a4300;background:#fff1d6}
.quality-pill[data-level="sample"]{color:var(--blue-dark);background:var(--blue-soft)}
.quality-pill{border:0;font-family:inherit;line-height:1.2}
.quality-pill:not(:disabled){cursor:pointer}
.restored-note[hidden]{display:none}

/* Rows of things to change. */
.extras{display:grid;gap:8px}
.extras[hidden],.extra[hidden]{display:none}
.extra{display:grid;grid-template-columns:40px minmax(0,1fr) auto;align-items:center;gap:12px;width:100%;min-height:60px;padding:9px 12px;border:1px solid var(--line);border-radius:14px;background:#fff;text-align:left;cursor:pointer;color:var(--ink)}
.extra:hover{border-color:#b9b3f5}
.extra-icon{width:40px;height:40px;display:grid;place-items:center;border-radius:12px;background:var(--blue-soft);color:var(--blue-dark);font-weight:900;font-size:15px}
.extra-add{border-style:dashed;border-color:#b9b3f5;background:#fbfaff}
.extra-add .extra-icon{background:var(--blue);color:#fff;font-size:22px}
.extra b,.extra small{display:block}
.extra b{font-size:15px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.extra small{margin-top:2px;color:var(--muted);font-size:12.5px;font-weight:600}
.extra i{font-style:normal;font-size:22px;color:var(--muted)}
.share-box{display:grid;justify-items:center;gap:4px;margin-top:14px}

/* Words steps. */
.sheet .words-input{display:block;padding:0;font-size:13px;font-weight:800}
.sheet .words-input input{width:100%;min-height:50px;margin-top:6px;padding:10px 12px;border:1px solid #c9c6d9;border-radius:12px;font-size:17px}
#deleteText{margin-top:6px;color:#a3261f}
.sheet .font-options{position:static;width:auto;max-height:none;padding:0;border:0;box-shadow:none;display:grid;gap:6px}
.sheet .font-option{width:100%;display:grid;grid-template-columns:92px minmax(0,1fr);align-items:center;gap:10px;border:1px solid var(--line);border-radius:12px;padding:10px 12px;background:#fff;text-align:left;cursor:pointer}
.sheet .font-option span{color:var(--muted);font-size:12px;font-weight:750}
.sheet .font-option em{overflow:hidden;color:var(--ink);font-size:23px;font-style:normal;line-height:1.1;text-overflow:ellipsis;white-space:nowrap}
.sheet .font-option[aria-pressed="true"]{border-color:var(--blue);background:var(--blue-soft);box-shadow:0 0 0 2px var(--blue) inset}
.sheet .font-group{margin:8px 2px 2px;color:#77758d;font-size:10px;font-weight:900;text-transform:uppercase;letter-spacing:.08em}
#slotFonts:not(.show-all) .extra-font,#slotFonts:not(.show-all) .font-group{display:none}
.sheet .bubble-field{margin:0 0 14px;padding:0;border:0}
.sheet .bubble-field legend{margin-bottom:8px;font-size:13px;font-weight:800;color:var(--ink)}
.sheet .read-hint{margin-bottom:12px}
.place-chips[hidden]{display:none}
.chips-label{margin:0 0 6px;color:var(--muted);font-size:12px;font-weight:800}
.chip-row{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:10px}
.chip-row button{min-height:40px;padding:0 14px;border:1px solid #d8d5ea;border-radius:999px;background:#fff;font-size:13.5px;font-weight:800;cursor:pointer;color:var(--ink)}
.chip-row button[aria-pressed="true"]{border-color:var(--blue);background:var(--blue);color:#fff}
.sheet .adjust-sliders .slide-row{grid-template-columns:96px 1fr 52px;min-height:44px}
.sheet .adjust-sliders[hidden]{display:none}
.bg-picks{gap:10px}
.bg-picks span{width:42px;height:42px}

/* Computers and tablets: cup on the left, steps on the right. */
/* The small second view in the corner: the design laid flat (or, when the
   flat view is big, a small cup). Tap to swap. */
.view-inset{position:absolute;z-index:3;right:8px;bottom:50px;width:104px;padding:0;border:1px solid #d3d0e4;border-radius:10px;background:#fff;box-shadow:0 6px 16px rgba(38,32,100,.16);overflow:hidden;cursor:pointer}
.view-inset canvas{display:block;width:100%;height:auto}
.view-inset canvas[hidden]{display:none}
.inset-label{position:absolute;left:4px;bottom:4px;padding:1px 6px;border-radius:999px;background:rgba(23,23,47,.78);color:#fff;font-size:9.5px;font-weight:850;line-height:1.5}
.cup-card.flat-on .view-inset{width:58px;top:50%;bottom:auto;transform:translateY(-50%);background:radial-gradient(circle at 50% 40%,#fff 0,#f1f0ff 75%)}
.studio-dock .cup-card.flat-on .flat-wrap{width:min(calc(100% - 72px),560px);margin-right:64px}

/* Computers and tablets: the cup on the left with its controls right under
   it; the question as a centered card on the right. */
@media(min-width:900px){
  .studio-dock .cup-card{right:auto;width:52%;height:auto;bottom:0;padding:28px 28px 24px;border-bottom:0;border-right:1px solid var(--line);flex-direction:column;gap:18px}
  .studio-dock .real-cup-preview{height:min(calc(100vh - var(--head) - 150px),640px);max-height:none;flex:0 0 auto}
  .studio-dock .flat-wrap{width:min(100%,640px)}
  .dock-tools{position:static;width:min(100%,460px);gap:12px}
  .dock-turn{max-width:none;min-height:42px;font-size:14px}
  .view-inset{right:24px;bottom:92px;width:200px;border-radius:12px}
  .inset-label{left:6px;bottom:6px;font-size:11px}
  .cup-card.flat-on .view-inset{width:104px}
  .studio-dock .cup-card.flat-on .flat-wrap{width:min(calc(100% - 140px),640px);margin-right:124px}
  .step-panel{left:52%;top:var(--head);display:flex;flex-direction:column;justify-content:center;padding:32px 40px;background:var(--soft)}
  .step-panel .step-top,.step-panel .sheet-body{width:100%;max-width:520px;margin-inline:auto;background:#fff;border:1px solid var(--line)}
  .step-panel .step-top{flex:0 0 auto;padding:22px 24px 6px;border-bottom:0;border-radius:20px 20px 0 0}
  .step-panel .sheet-body{flex:0 1 auto;min-height:0;padding:12px 24px 24px;border-top:0;border-radius:0 0 20px 20px;box-shadow:0 18px 40px rgba(38,32,100,.08)}
  .step-heading b{font-size:24px}
  .sticky-answers{bottom:-24px;margin:12px -24px -24px;padding:12px 24px 20px}
  .cell-tiles{grid-template-columns:repeat(auto-fill,minmax(72px,1fr));gap:8px}
}

/* One question per screen: the question, then its answers right below. */
.step-top{display:flex;align-items:center;gap:10px;padding:10px 14px 4px}
.step-heading{min-width:0}
.step-heading b{display:block;font-size:20px;line-height:1.2;letter-spacing:-.02em}
.step-heading small{display:block;margin-bottom:1px;color:var(--blue-dark);font-size:11.5px;font-weight:850;letter-spacing:.02em}
.step-heading small[hidden]{display:none}
.box-switch{display:flex;align-items:center;justify-content:center;gap:10px;margin:2px 14px 0;padding:4px;border-radius:999px;background:var(--blue-soft);color:var(--blue-dark);font-size:13px;font-weight:850}
.box-switch[hidden]{display:none}
.box-switch button{width:34px;height:30px;border:0;border-radius:999px;background:#fff;color:var(--blue-dark);font-size:18px;font-weight:900;cursor:pointer}
.step-panel{grid-template-rows:auto auto 1fr}
.sheet-body{padding:10px 14px 16px}
/* Name cups: background swatches */
.bg-swatches{display:grid;grid-template-columns:repeat(auto-fill,minmax(44px,1fr));gap:8px;margin-bottom:12px}
.bg-swatch{aspect-ratio:1;padding:0;border:2px solid #d8d5ea;border-radius:12px;overflow:hidden;background:#fff;cursor:pointer}
.bg-swatch canvas{display:block;width:100%;height:100%}
.bg-swatch[aria-checked="true"]{border-color:var(--blue);box-shadow:0 0 0 3px var(--blue-soft)}
.sheet-step[data-step="bgPick"] .step-note{margin-bottom:8px}
@media(min-width:900px){.bg-swatches{grid-template-columns:repeat(6,1fr);gap:10px}}
/* Collages: photo tiles, the spot buttons, and layout choices */
.cell-tiles{display:grid;grid-template-columns:repeat(auto-fill,minmax(52px,1fr));gap:6px;margin-bottom:10px}
.cell-tile{position:relative;aspect-ratio:1;padding:0;border:2px solid transparent;border-radius:12px;background:var(--soft);overflow:hidden;cursor:pointer}
.cell-tile img{display:block;width:100%;height:100%;object-fit:cover}
.cell-tile span{position:absolute;top:3px;left:3px;min-width:19px;height:19px;padding:0 5px;border-radius:999px;background:rgba(23,23,47,.8);color:#fff;font-size:11.5px;font-weight:900;line-height:19px;text-align:center}
.cell-tile[aria-pressed="true"]{border-color:var(--blue);box-shadow:0 0 0 2px var(--blue-soft)}
.cell-tile[aria-pressed="true"] span{background:var(--blue)}
.add-tile{display:grid;place-content:center;gap:2px;border:2px dashed #c9c5e6;background:#fff;color:var(--blue);text-align:center}
.add-tile b{font-size:20px;line-height:1}
.add-tile small{font-size:10px;font-weight:800;line-height:1.1}
.cell-tiles.swapping .cell-tile:not([aria-pressed="true"]):not(.add-tile){border:2px dashed var(--blue);animation:swap-pulse 1.2s ease-in-out infinite}
@keyframes swap-pulse{50%{opacity:.7}}
@media(prefers-reduced-motion:reduce){.cell-tiles.swapping .cell-tile{animation:none}}
.swap-note{margin:-4px 0 10px;color:var(--blue-dark);font-weight:800}
.swap-note[hidden]{display:none}
#cellSwap[aria-pressed="true"]{border-color:var(--blue);background:var(--blue-soft);color:var(--blue-dark)}
.sheet-step[data-step="arrange"] .cell-buttons{margin-top:4px}
.sheet-step[data-step="arrange"] .adjust-sliders .slide-row{min-height:38px}
.sheet-step[data-step="arrange"] .cell-buttons .answer{min-height:42px}
.cell-actions{margin-bottom:6px}
.cell-buttons{display:grid;grid-template-columns:repeat(auto-fit,minmax(96px,1fr));gap:8px}
.cell-buttons .answer{min-height:46px;font-size:14.5px}
.cell-actions .chip-row button{min-width:44px}
.layout-options{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:10px;margin-bottom:12px}
.layout-option{display:grid;gap:6px;padding:8px;border:2px solid #d8d5ea;border-radius:14px;background:#fff;color:var(--ink);font-size:13.5px;font-weight:850;cursor:pointer}
.layout-option canvas{display:block;width:100%;height:auto;border-radius:8px;background:var(--soft)}
.layout-option[aria-checked="true"]{border-color:var(--blue);background:var(--blue-soft);color:var(--blue-dark)}
.step-note{margin:0 0 12px;color:var(--muted);font-size:14px;line-height:1.4}
.step-note[hidden]{display:none}
.small-note{margin:8px 0 10px;font-size:12.5px}
.answers{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.answers[hidden]{display:none}
.answers.stack{grid-template-columns:1fr}
.answers .answer:only-child{grid-column:1/-1}
.answer{min-height:54px;padding:10px 14px;border:1px solid #d3d0e4;border-radius:14px;background:#fff;color:var(--ink);font-size:16px;font-weight:850;cursor:pointer;text-align:center}
.answer[hidden]{display:none}
.answer.primary{background:var(--blue);border-color:var(--blue);color:#fff}
.answer[aria-pressed="true"]{border-color:var(--blue);background:var(--blue-soft);color:var(--blue-dark)}
.answer:disabled{opacity:.6}
.answers.stack .answer{text-align:left}
.change-item{display:grid;gap:2px;text-align:left}
.change-item b{font-size:15.5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.change-item small{color:var(--muted);font-size:12.5px;font-weight:650}
.cart-answer{display:grid;place-content:center;gap:1px;grid-column:1/-1}
.cart-answer small{font-size:11.5px;font-weight:700;opacity:.85}
.sticky-answers{position:sticky;bottom:-16px;margin:10px -14px -16px;padding:10px 14px 14px;background:linear-gradient(rgba(255,255,255,0),#fff 30%)}
.sheet-step[data-step="change"] .answers.stack{margin-bottom:12px}
.size-only .slide-row:not(:first-child){display:none}
.sheet .words-input input{margin:0 0 12px}
.sheet .bubble-field{margin:0 0 14px}
.sheet .bubble-picks{gap:9px}
.sheet .bubble-picks span{width:40px;height:40px}
.visually-hidden{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.share-box{margin-top:12px}
#deleteText{display:block;margin:10px auto 0}

/* Keep every question on one screen. */
.answers.stack{gap:8px}
.answers.stack .answer{min-height:50px;padding:8px 14px}
.sheet-step[data-step="wPlace"] .chips-label{margin:0 0 4px;font-size:11.5px}
.sheet-step[data-step="wPlace"] .chip-row{gap:6px;margin-bottom:8px}
.sheet-step[data-step="wPlace"] .chip-row button{min-height:36px;padding:0 12px;font-size:13px}
.sheet-step[data-step="wPlace"] .small-note{display:none}
.sheet-step[data-step="wPlace"] .adjust-sliders .slide-row{min-height:38px}
.change-item{min-height:50px;padding:6px 14px;gap:0}
.change-item b{font-size:14.5px}
.change-item small{font-size:12px}
.sheet-step[data-step="change"] .answers.stack{gap:6px}
@media(max-height:700px){
  body.studio-dock{--dock:36vh}
  body.studio-dock.dock-tall{--dock:48vh}
  .answer{min-height:48px}
  .step-heading b{font-size:18px}
}
.step-top .box-switch{margin:0 0 0 auto;flex:0 0 auto;padding:3px;gap:6px;font-size:12px}
.step-top .box-switch button{width:30px;height:28px}
.step-heading{flex:1}
.step-panel{grid-template-rows:auto 1fr}
/* Optional prepaid AI edit, kept separate from the main cup decision. */
.ai-photo-option{margin-top:20px;padding:20px;border:1px solid #c9c5fa;border-radius:18px;background:#f4f2ff}
.ai-photo-option h3{margin:0 0 6px;font-size:1.15rem}
.ai-photo-option p{margin:0 0 14px;line-height:1.45}
.ai-photo-option label{display:flex;gap:9px;align-items:flex-start;line-height:1.35;margin-bottom:14px}
.ai-photo-option input{width:20px;height:20px;flex:none;accent-color:#5144ee}
.ai-photo-option .answer{width:100%;margin-bottom:8px}
.ai-version-list{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:12px}
.ai-version-list .answer{width:auto;flex:1 1 120px;margin:0;padding:10px 12px;font-size:.9rem}
.ai-version-list .answer[aria-pressed="true"]{border-color:#5144ee;box-shadow:inset 0 0 0 2px #5144ee}
