/* PEIRU sticker photo lab — independent from existing photo editor */
:root {--st-ink:#edf5ff;--st-dim:#9eafca;--st-border:rgba(142,165,212,.22);--st-bg:#08101e;--st-card:#101c31;--st-accent:#65bfff;--st-violet:#b49aff;}
[hidden]{display:none!important}
body.sticker-page{background:radial-gradient(ellipse at 65% -10%,rgba(70,113,202,.14),transparent 45%),#08101e;color:var(--st-ink)}
.sticker-page *{box-sizing:border-box}
.sticker-page button,.sticker-page input,.sticker-page select{font:inherit}
.sticker-page button{cursor:pointer}
.sticker-page button:disabled{opacity:.45;cursor:not-allowed}
.sticker-page .topbar{position:relative;z-index:2}
.sticker-shell{max-width:1480px;padding:28px 22px 75px;margin:0 auto}
.sticker-heading{display:flex;align-items:end;justify-content:space-between;gap:18px;margin:0 0 27px}
.sticker-heading h1{font-size:clamp(26px,3.3vw,38px);letter-spacing:-.07em;margin:12px 0 8px;color:#f6f9ff}
.sticker-heading h1 span{color:#86caff}.sticker-heading p{margin:0;color:var(--st-dim);font-size:14px}
.sticker-pill{display:inline-flex;align-items:center;gap:5px;letter-spacing:.12em;text-transform:uppercase;font-size:11px;font-weight:800;background:#19324b;color:#9ed9ff;padding:7px 11px;border-radius:30px}
.back-link{font-size:13px;color:#b6d7ef;text-decoration:none;border:1px solid var(--st-border);padding:10px 13px;border-radius:10px;flex-shrink:0}
.sticker-layout{display:grid;grid-template-columns:minmax(355px,450px) minmax(350px,1fr);gap:22px;align-items:start}
.sticker-controls{display:flex;flex-direction:column;gap:15px;min-width:0}
.st-card,.sticker-preview-panel{border:1px solid var(--st-border);background:linear-gradient(155deg,rgba(21,35,59,.97),rgba(11,22,41,.97));border-radius:18px;box-shadow:0 10px 32px rgba(0,0,0,.11)}
.st-card{padding:20px}
.section-title{display:flex;align-items:center;gap:10px;margin:0 0 17px}.section-title h2{font-size:16px;letter-spacing:-.035em;margin:0;color:#eaf4ff}.section-title .number{background:linear-gradient(140deg,#70c9ff,#99a8ff);color:#081223;font-weight:850;border-radius:9px;min-width:25px;height:25px;display:grid;place-items:center;font-size:12px}
.field-label{display:block;color:#cdddf2;font-size:13px;font-weight:700;margin-bottom:9px}
.layout-buttons,.filters,.action-row,.download-row{display:flex;gap:7px;flex-wrap:wrap}
.choice,.filter,.secondary,.primary,.text-button{border:1px solid var(--st-border);border-radius:9px;background:#152741;color:#d9eafa;padding:10px 15px;font-weight:700;font-size:13px;transition:background .16s,border-color .16s,transform .16s}
.choice:hover,.filter:hover,.secondary:hover{border-color:#81bdff}
.choice.is-active,.filter.is-active{background:#224766;color:#bfeaff;border-color:#5eafff}
.primary{border-color:#62b7fa;background:linear-gradient(120deg,#47aaf4,#78bbfa);color:#071a2b;font-weight:800}
.primary:hover{background:#9bceff}
.text-button{border:0;background:transparent;color:#a8cfff;padding:8px 10px;font-size:12px}
.text-button:hover{background:rgba(83,143,206,.12)}
.text-button.danger{color:#ffb5c2}
.setting-row{display:flex;justify-content:space-between;align-items:center;gap:14px;margin:13px 0}.setting-row label{font-size:13px;color:#cadcf3;min-width:75px;font-weight:650}
.setting-row select,.setting-row input{min-width:0;max-width:260px;flex:1;background:#09172b;color:#eaf3ff;border:1px solid rgba(154,178,211,.28);border-radius:9px;padding:10px 12px;outline:none;color-scheme:dark}
.setting-row input:focus,.setting-row select:focus,.unlock-row input:focus{border-color:#70bdff;box-shadow:0 0 0 2px rgba(88,174,248,.18)}
.upload-big{display:flex;flex-direction:column;align-items:center;justify-content:center;margin-top:13px;text-align:center;padding:19px 15px;border:1.5px dashed #547396;border-radius:11px;background:rgba(46,83,124,.16);gap:5px;cursor:pointer}
.upload-big:hover{background:rgba(68,126,175,.19)}.upload-big span{display:grid;place-items:center;width:34px;height:34px;border-radius:10px;background:#295b80;font-size:25px;font-weight:400;color:#d7f4ff}.upload-big strong{font-size:13px}.upload-big small{font-size:11px;color:#a8c1df}
.microcopy{font-size:11px;color:#94a9c6;line-height:1.6;margin:10px 0 7px}
.photo-slots{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:12px}.slot-card{position:relative;border:1px solid #3b5473;border-radius:9px;overflow:hidden;min-height:90px;background:#0a1729;display:flex;flex-direction:column}.slot-card img{width:100%;height:78px;object-fit:cover}.slot-card .slot-name{font-size:11px;color:#9ab4d3;padding:6px 5px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.slot-card input{display:none}.slot-card .slot-action{display:flex;align-items:center;justify-content:center;min-height:78px;cursor:pointer;color:#c8e6ff;font-size:22px}.slot-card .slot-action:hover{background:#233e5e}.slot-card .slot-controls{display:flex;align-items:center;justify-content:space-between;background:#132841}.slot-card .slot-controls label,.slot-card .slot-controls button{font-size:11px;color:#c7e7ff;padding:6px;background:none;border:0;cursor:pointer}
.filters{margin-bottom:13px}.filter{padding:8px 10px;font-size:12px}
.slider-field{margin:13px 0}.slider-field label{display:flex;justify-content:space-between;color:#caddf0;font-size:13px;margin-bottom:7px}.slider-field output{color:#93d7ff;font-size:12px;font-variant-numeric:tabular-nums}
.slider-field input[type=range]{width:100%;accent-color:#7fbbfd;cursor:pointer}
.color-choices{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:16px}.color-choice{width:32px;height:32px;border-radius:50%;background:var(--swatch);border:3px solid #233753;outline:2px solid transparent}.color-choice.is-active{outline:2px solid #8bd3ff}
.sticker-choices{display:grid;grid-template-columns:repeat(6,1fr);gap:6px}.sticker-choices button{background:#10223a;border:1px solid #314560;border-radius:9px;min-height:41px;font-size:24px}.sticker-choices button:hover{background:#294666;border-color:#95caff}
.sticker-selection{border-top:1px solid var(--st-border);margin-top:15px;padding-top:13px}.sticker-selection strong{font-size:12px}
.download-row>*{flex:1;white-space:nowrap}.sticker-status{min-height:18px;font-size:12px;color:#9cddff;margin:6px 0 0}
.sticker-preview-panel{position:sticky;top:15px;min-width:0;overflow:hidden}.sticker-preview-head{padding:17px 20px;border-bottom:1px solid var(--st-border);display:flex;align-items:center;justify-content:space-between;gap:12px}.sticker-preview-head strong{font-size:14px}.sticker-preview-head small{font-size:11px;display:block;color:#9cb5d1;margin-top:4px}
.sticker-preview-stage{padding:23px 12px;min-height:580px;background:radial-gradient(ellipse at center,rgba(121,150,210,.16),transparent 70%),linear-gradient(45deg,#101e32 25%,#13223a 25%,#13223a 50%,#101e32 50%,#101e32 75%,#13223a 75%);background-size:auto,28px 28px;display:flex;justify-content:center;align-items:start;overflow:auto;max-height:min(82vh,1200px)}
#stickerCanvas{display:block;width:auto;max-width:100%;height:auto;max-height:1100px;box-shadow:0 16px 44px rgba(0,0,0,.37);border-radius:1px;touch-action:none;cursor:grab}
#stickerCanvas.dragging{cursor:grabbing}
.preview-tip{text-align:center;padding:13px;color:#9ab2d3;font-size:11px}
.sticker-lock{min-height:calc(100vh - 190px);display:flex;justify-content:center;align-items:center;padding:65px 20px}.lock-card{width:min(100%,450px);border:1px solid #355071;border-radius:22px;padding:35px;background:linear-gradient(160deg,#182c4b,#0c1b30);box-shadow:0 22px 70px rgba(0,0,0,.25);text-align:center}.lock-emoji{font-size:54px;margin-bottom:15px}.lock-card h1{color:white;font-size:30px;letter-spacing:-.055em;margin:18px 0 8px}.lock-card>p{color:#adc2df;font-size:14px;line-height:1.7;margin-bottom:23px}.lock-card form{text-align:left}.lock-card form>label{display:block;color:#caddf0;font-weight:700;font-size:13px;margin-bottom:8px}.unlock-row{display:flex;gap:9px}.unlock-row input{min-width:0;flex:1;border-radius:9px;background:#09192b;color:#fff;border:1px solid #3e5676;padding:12px;font-size:16px}.unlock-row button{flex-shrink:0}.lock-error{min-height:24px;color:#ffb8c6!important;margin:12px 0 0!important}.lock-card>small{font-size:10px;color:#829bbb;line-height:1.6}
@media(max-width:940px){.sticker-layout{grid-template-columns:1fr}.sticker-preview-panel{position:static}.sticker-preview-stage{min-height:350px;max-height:950px}.sticker-heading{align-items:start}.sticker-shell{padding:22px 14px 65px}}
@media(max-width:520px){.sticker-heading{display:block}.back-link{display:inline-block;margin-top:15px}.st-card{padding:15px}.sticker-preview-head{padding:12px}.sticker-preview-stage{padding:14px 9px}.sticker-choices{grid-template-columns:repeat(6,minmax(0,1fr))}.sticker-choices button{min-height:38px;font-size:20px}.lock-card{padding:25px 20px}.unlock-row{display:grid}.sticker-page .main-nav a:nth-child(n+3){display:none}}
@media(prefers-reduced-motion:reduce){.sticker-page *{transition:none!important}}

/* Face-landmark AI status and original comparison */
.ai-status{border:1px solid #355673;border-radius:10px;background:#0a2035;color:#b7d8f2;padding:11px 12px;font-size:12px;line-height:1.6;margin-bottom:12px}
.ai-status[data-status="ready"]{border-color:#2c805f;color:#b8f5d7}
.ai-status[data-status="error"]{border-color:#ae5e6a;color:#ffb6c5}
.ai-compare{width:100%;margin-bottom:10px}
.ai-compare.is-active{background:#2c5373;border-color:#78c3fb}

/* PEIRU 4.4.12: native file drag-and-drop + keep complete image in frame */
.sticker-page .upload-big.is-dragover,
.sticker-page .slot-card.is-dragover,
.sticker-page .sticker-preview-stage.is-dragover{
  outline:2px dashed #72ccff;outline-offset:-3px;
  background:rgba(67,151,218,.24);box-shadow:inset 0 0 0 2px rgba(129,206,255,.18);
}
.sticker-page .upload-big.is-dragover strong{color:#d7f4ff}
.sticker-page .slot-card .slot-action img{object-fit:contain;background:#18293d}
.sticker-page .slot-card{transition:border-color .12s,background .12s}
.sticker-page .sticker-preview-stage.is-dragover{outline-offset:-7px}
