.photo-tools {background:linear-gradient(180deg,#f5f5ff 0%,#fbfbff 42%,#fff 90%);color:var(--ink);padding:30px 0 55px}
.photo-tools [hidden]{display:none!important}
.pt-shell{max-width:1170px}
.pt-back{color:var(--primary);text-decoration:none;font-weight:650}
.pt-back{display:inline-flex;align-items:center;gap:8px;font-size:.88rem;min-height:40px}
.pt-title{display:flex;gap:18px;align-items:center;margin:18px 0 30px}
.pt-title h1{font-size:clamp(2rem,4.6vw,3.75rem);letter-spacing:-.055em;line-height:1.07;margin:0}
.pt-title p{font-size:clamp(.98rem,1.7vw,1.1rem);color:var(--text);margin:8px 0 0}
.pt-mark,.pt-upload-icon{display:grid;place-items:center;border-radius:18px;background:#eae8ff;color:var(--primary);flex-shrink:0}
.pt-mark{width:56px;height:56px}.pt-mark .icon,.pt-upload-icon .icon{width:27px;height:27px}
.pt-layout{display:grid;grid-template-columns:minmax(0,1.9fr) minmax(275px,1fr);align-items:start;gap:20px}
.pt-panel{background:white;border:1px solid var(--line);border-radius:19px;box-shadow:0 8px 28px #3534940c;min-width:0}
.pt-panel h2{font-size:1.1rem;letter-spacing:-.025em;margin:0}.pt-bar,.pt-foot{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:10px 20px;min-height:56px}
.pt-foot{font-size:.83rem;color:var(--muted);min-height:52px;flex-wrap:wrap}
.pt-stage{position:relative;display:grid;place-items:center;min-width:0;min-height:310px;padding:14px;background-color:#f6f7fc;background-image:conic-gradient(#e9ebf3 25%,transparent 0 50%,#e9ebf3 0 75%,transparent 0);background-size:20px 20px}
.pt-stage.pt-drag{outline:3px dashed var(--primary);outline-offset:-6px}
.pt-upload{display:grid;justify-items:center;text-align:center;width:min(100%,410px);padding:22px 14px 24px;border:1px dashed #b8b5de;background:#fffffff2;border-radius:16px;margin:18px auto}
.pt-upload h3{font-size:1.35rem;letter-spacing:-.035em;margin:10px 0 1px}.pt-upload p,.pt-upload small{color:var(--muted);margin:0}
.pt-upload small{margin-top:12px;font-size:.76rem}.pt-upload .button{margin-top:15px}.pt-upload-icon{width:46px;height:46px}
.pt-frame{position:relative;max-width:100%;line-height:0}
.pt-frame img,#pt-result{display:block;max-width:100%;max-height:min(62vh,660px);width:auto;height:auto}
.pt-settings{padding:22px}.pt-settings fieldset{border:0;padding:0;margin:18px 0;min-width:0}
.pt-settings label{display:block;font-weight:650;font-size:.88rem;margin-top:14px}
.pt-settings select{background:#fafaff;color:var(--ink);border:1px solid #c8cce0;border-radius:9px;width:100%;font:inherit;font-size:.89rem;min-height:44px;margin-top:5px;padding:8px}
.pt-settings input[type=color]{width:100%;min-height:40px;border:1px solid var(--line);border-radius:6px;background:white}
.pt-settings p{color:var(--text);font-size:.86rem;margin:6px 0}.pt-colors,.pt-actions{display:flex;gap:10px}.pt-colors>label{flex:1;}
.pt-actions{flex-direction:column;border-top:1px solid var(--line);padding-top:16px}.photo-tools .button{min-height:44px;justify-content:center}
.pt-background-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 8.75rem), 1fr));
    gap: 8px;
}
.pt-background-buttons .button {
    min-width: 0;
    padding-inline: 10px;
    white-space: normal;
    text-align: center;
}
#pt-bg-name { overflow-wrap: anywhere; }
#pt-compare{display:flex;gap:4px;flex-wrap:wrap}
#pt-compare button,#pt-change{border:1px solid var(--line);background:white;color:var(--text);font-weight:650;padding:6px 10px;border-radius:8px;min-height:40px}
#pt-compare button[aria-pressed=true]{background:#eceaff;color:#3925b8;border-color:#c7c1ff}
.pt-settings .pt-status{margin:12px 0 0}.pt-status[data-error=true]{color:#962c39}.photo-tools[data-busy=true] .pt-status::before{content:"";display:inline-block;width:10px;height:10px;border:2px solid #c4bcfd;border-top-color:var(--primary);border-radius:50%;margin-right:8px;animation:pt-spin .8s linear infinite}
@keyframes pt-spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.photo-tools[data-busy=true] .pt-status::before{animation:none}}
.photo-tools :focus-visible{outline:3px solid #624eff;outline-offset:3px}
@media(max-width:760px){.photo-tools{padding:15px 0 32px}.pt-title{margin:10px 0 20px;gap:12px}.pt-mark{width:43px;height:43px;border-radius:13px}.pt-mark .icon{width:22px}.pt-layout{grid-template-columns:minmax(0,1fr);gap:12px}.pt-stage{min-height:205px;padding:8px}.pt-frame img,#pt-result{max-height:46vh}.pt-settings{padding:16px}.pt-bar,.pt-foot{padding:7px 12px}.pt-upload{margin:8px auto;padding:14px}#pt-compare button,#pt-change{min-height:44px}.pt-settings input,.pt-settings select{font-size:16px}}
