/* Pixovex — Passport Photo Print Sheet (builds on form.css) */
.pxs [hidden]{display:none!important}
.pxs{gap:16px}
.pxs-sec{display:flex;flex-direction:column;gap:14px;min-width:0}
.pxs-hd{display:flex;align-items:flex-start;gap:12px}
.pxs-hd h2{font-size:19px;letter-spacing:-.015em;margin:0;line-height:1.25}
.pxs-hd p{font-size:13.5px;color:var(--muted);margin:2px 0 0}
.pxs-n{width:30px;height:30px;border-radius:10px;background:var(--brand);color:#fff;font-weight:700;font-size:15px;display:grid;place-items:center;flex:none;box-shadow:0 6px 14px -6px rgba(43,76,255,.6)}

/* page layout: controls + live preview */
.pxs-work{display:grid;gap:22px;align-items:start}
.pxs-main{display:flex;flex-direction:column;gap:26px;min-width:0}
.pxs-main>.pxs-sec+.pxs-sec{padding-top:22px;border-top:1px solid var(--line)}
.pxs-side{min-width:0;padding-top:22px;border-top:1px solid var(--line)}
@media(min-width:1000px){
  .pxs-work{grid-template-columns:minmax(0,1fr) minmax(340px,410px);gap:26px}
  .pxs-side{position:sticky;top:calc(var(--header-h,68px) + 14px);padding:16px;border:1px solid var(--line);border-radius:18px;background:var(--bg-2)}
  .pxs-side .pxs-sheet{background:var(--card)}
}

/* step 1: slots + stage + edit tools */
.pxs-ed{display:grid;gap:14px;grid-template-areas:"slots" "stage" "tools";align-items:start}
.pxs-ed>.pxs-slots{grid-area:slots}
.pxs-ed>.pxs-stagebox{grid-area:stage}
.pxs-ed>.pxs-opts{grid-area:tools}
@media(min-width:1200px){
  .pxs-ed{grid-template-columns:minmax(0,1.05fr) minmax(0,.95fr);grid-template-areas:"stage slots" "stage tools";grid-template-rows:auto 1fr;column-gap:20px}
  .pxs-ed .pxs-slots{grid-template-columns:1fr}
  .pxs-ed .pxs-slot{flex-direction:row}
}
.pxs-slots{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.pxs-slot{display:flex;align-items:center;gap:10px;padding:8px 12px 8px 8px;border-radius:13px;border:1px solid var(--line);background:var(--card);text-align:left;min-width:0;transition:border-color .2s,background .2s,box-shadow .2s}
.pxs-slot:hover{border-color:var(--line-2)}
.pxs-slot.on{border-color:var(--brand);background:var(--brand-t);box-shadow:0 0 0 1px var(--brand) inset}
.pxs-slot .th,.pxs-row .th{width:38px;height:48px;border-radius:8px;background:var(--bg-2);color:var(--muted);display:grid;place-items:center;flex:none;overflow:hidden;border:1px solid var(--line)}
.pxs-slot .th .icon,.pxs-row .th .icon{width:18px;height:18px}
.pxs-slot .th img,.pxs-row .th img{width:100%;height:100%;object-fit:cover;display:block}
.pxs-slot .tl{min-width:0}
.pxs-slot .tl b{display:block;font-size:14px;font-weight:700;white-space:nowrap}
.pxs-slot .tl small{display:block;font-size:12px;color:var(--muted);font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pxs-slot.has .th{border-color:var(--mint)}
@media(max-width:560px){.pxs-slot{flex-direction:column;align-items:flex-start;gap:6px;padding:8px}.pxs-slot .th{width:100%;height:54px}}
.pxs-stagebox{width:100%}
.pxs-opts{display:flex;flex-direction:column;gap:12px;min-width:0}
.pxs-hint{display:flex;flex-direction:column;gap:4px;background:var(--bg-2);border-color:transparent}
.pxs-hint b{font-size:15px}
.pxs-hint small{color:var(--muted);font-size:13px;line-height:1.5}
.opt-row.three{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
@media(max-width:480px){.opt-row.three{grid-template-columns:1fr}}
.pxs-sub{padding-left:54px;animation:pxfIn .3s var(--ease)}
.pxs-sub label{display:flex;flex-direction:column;gap:8px;font-size:12.5px;font-weight:600;color:var(--muted)}
.pxs-lowres{display:flex;gap:8px;align-items:flex-start;font-size:12.5px;line-height:1.45;color:var(--amber);font-weight:600;margin:0}
.pxs-lowres .icon{width:16px;height:16px;flex:none;margin-top:1px}
.pxs-ai{display:flex;flex-direction:column;gap:10px;padding:12px;border-radius:12px;background:var(--brand-t)}
.pxs-prog{height:6px;border-radius:6px;background:var(--card);overflow:hidden}
.pxs-prog span{display:block;height:100%;width:0;background:var(--brand);border-radius:6px;transition:width .25s}
.pxs-aimsg{font-size:12.5px;color:var(--muted);font-weight:600;margin:0}

/* step 2 */
.pxs-grid{display:grid;gap:12px}
.pxs-grid .pxf-card{display:flex;flex-direction:column;gap:12px;min-width:0}
.pxs-t{font-size:14px;font-weight:700;letter-spacing:-.005em;margin:0}
.pxs-chips{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.pxs-chips>.pxs-chip:last-child:nth-child(odd){grid-column:1/-1}
@media(min-width:700px){.pxs-chips{grid-template-columns:repeat(5,minmax(0,1fr))}.pxs-chips>.pxs-chip:last-child:nth-child(odd){grid-column:auto}}
.pxs-chip{display:flex;flex-direction:column;gap:2px;text-align:left;padding:9px 11px;border-radius:11px;border:1px solid var(--line-2);background:var(--card);transition:border-color .2s,background .2s,box-shadow .2s;min-width:0}
.pxs-chip:hover{border-color:var(--brand)}
.pxs-chip b{font-size:14px;font-weight:700}
.pxs-chip small{font-size:11.5px;color:var(--muted);font-weight:600;line-height:1.3}
.pxs-chip.on{border-color:var(--brand);background:var(--brand-t);box-shadow:0 0 0 1px var(--brand) inset}
.pxs-custom{display:flex;flex-wrap:wrap;align-items:flex-end;gap:12px;animation:pxfIn .3s var(--ease)}
.pxs-cin{display:flex;align-items:flex-end;gap:8px}
.pxs-cin label{display:flex;flex-direction:column;gap:4px;font-size:12px;font-weight:600;color:var(--muted)}
.pxs-cin input{width:92px;height:38px;border-radius:9px;border:1px solid var(--line-2);background:var(--card);color:var(--ink);padding:0 10px;font-size:14px;font-weight:600;font-family:inherit}
.pxs-cin input:focus,.pxs-step input:focus{outline:none;border-color:var(--brand);box-shadow:0 0 0 3px var(--brand-t)}
.pxs-cin>span{height:38px;display:grid;place-items:center;color:var(--muted);font-weight:700}
.pxs-grid output{font-weight:700;color:var(--brand);margin-left:6px}
.pxs .seg{flex-wrap:wrap}
.pxs-scale{display:flex;flex-direction:column;gap:8px;padding-top:12px;border-top:1px solid var(--line)}
.pxs-scale label{display:flex;flex-direction:column;gap:8px;font-size:13px;font-weight:600;color:var(--ink-2)}
.pxs-eff{font-size:13.5px;color:var(--muted);line-height:1.5;margin:0}
.pxs-eff b{color:var(--ink)}
.pxs-eff .fmini{margin-left:6px;display:inline-block}
.pxs-more{padding:0}
.pxs-more summary{list-style:none;display:flex;align-items:center;gap:12px;padding:14px 16px;cursor:pointer}
.pxs-more summary::-webkit-details-marker{display:none}
.pxs-more summary>.icon:first-child{width:18px;height:18px;color:var(--brand);flex:none}
.pxs-more summary span{flex:1;min-width:0}
.pxs-more summary b{display:block;font-size:14px}
.pxs-more summary small{display:block;font-size:12.5px;color:var(--muted);font-weight:500}
.pxs-more summary .chev{width:18px;height:18px;color:var(--muted);transition:transform .3s var(--ease)}
.pxs-more[open] summary .chev{transform:rotate(180deg)}
.pxs-more-in{display:flex;flex-direction:column;gap:14px;padding:0 16px 16px;animation:pxfIn .3s var(--ease)}

/* copies */
.pxs-meter{height:8px;border-radius:8px;background:var(--bg-2);overflow:hidden}
.pxs-meter span{display:block;height:100%;border-radius:8px;background:var(--brand);transition:width .35s var(--ease)}
.pxs-cap{font-size:13.5px;color:var(--muted);margin:0}
.pxs-cap b{color:var(--ink)}
.pxs-rows{display:flex;flex-direction:column;gap:8px}
.pxs-row{display:flex;align-items:center;gap:10px}
.pxs-row>b{font-size:14px;flex:1;min-width:0}
.pxs-step{display:flex;align-items:center;border:1px solid var(--line-2);border-radius:11px;overflow:hidden;background:var(--card)}
.pxs-step button{width:42px;height:42px;font-size:20px;font-weight:600;color:var(--ink-2);transition:background .2s,color .2s}
.pxs-step button:hover:not(:disabled){background:var(--brand-t);color:var(--brand)}
.pxs-step button:disabled{opacity:.35;cursor:not-allowed}
.pxs-step input{width:56px;height:42px;border:0;border-left:1px solid var(--line);border-right:1px solid var(--line);text-align:center;font-size:16px;font-weight:700;background:transparent;color:var(--ink);font-family:inherit;-moz-appearance:textfield;appearance:textfield}
.pxs-step input::-webkit-outer-spin-button,.pxs-step input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}
.pxs-cop .fmini{display:inline-flex;align-items:center;gap:6px;align-self:flex-start}
.pxs-cop .fmini .icon{width:14px;height:14px}
.pxs-note{font-size:13px;color:var(--muted);line-height:1.5;margin:0}
.pxs-warn{display:flex;gap:9px;align-items:flex-start;font-size:13.5px;line-height:1.5;color:var(--rose);font-weight:600;margin:0}
.pxs-warn .icon{width:18px;height:18px;flex:none;margin-top:1px}

/* step 3: preview + download */
.pxs-sheet{display:grid;place-items:center;background:var(--bg-2);border-radius:14px;padding:14px;min-height:200px}
.pxs-sheet canvas{display:block;max-width:100%;width:auto;height:auto;max-height:min(62vh,560px);background:#fff;box-shadow:0 14px 34px -16px rgba(16,24,40,.45),0 0 0 1px var(--line-2);border-radius:2px}
@media(min-width:1000px){.pxs-sheet canvas{max-height:max(220px,calc(100vh - var(--header-h,68px) - 390px))}}
.pxs-empty{color:var(--muted);font-weight:600;font-size:14px;text-align:center}
.pxs-dl{display:flex;flex-direction:column;gap:12px}
.pxs-dlb{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.pxs-dlb .btn{height:46px;font-size:14.5px;padding:0 12px}
.pxs-dlb .btn .icon{width:18px;height:18px}
.pxs .btn:disabled{opacity:.45;pointer-events:none}
.pxs-sl{font-size:11.5px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--muted);margin:0 0 6px}
.pxs-sb{display:flex;flex-wrap:wrap;gap:6px}
.pxs-sb .btn{flex:1 1 110px;height:38px;font-size:13px;padding:0 10px}
.pxs-tip{display:flex;gap:8px;align-items:flex-start;font-size:12.5px;color:var(--ink-2);line-height:1.45;margin:0}
.pxs-tip .icon{width:16px;height:16px;color:var(--amber);flex:none;margin-top:1px}

/* phones: download bar */
.pxs-mbar{position:sticky;bottom:10px;z-index:6;display:flex;align-items:center;gap:8px;padding:10px 10px 10px 14px;border-radius:14px;background:var(--ink);color:var(--bg);box-shadow:0 16px 34px -12px rgba(16,24,40,.5);animation:pxfUp .4s var(--ease) both}
[data-theme="dark"] .pxs-mbar{background:#1B1E25;color:var(--ink);border:1px solid var(--line-2)}
.pxs-mbar span{flex:1;font-size:13.5px;font-weight:700;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pxs-mbar .btn-ghost{color:inherit;border-color:rgba(255,255,255,.25);background:transparent}
.pxs-mbar .btn .icon{width:16px;height:16px}
@media(min-width:1000px){.pxs-mbar{display:none!important}}
