.ph-cell{display:flex;align-items:center;gap:10px}
.ph-thumb{width:38px;height:38px;flex:none;border-radius:8px;object-fit:contain;object-position:center;padding:3px;background:#e5eef9;border:1px solid var(--line)}
.ph-thumb.round{border-radius:8px;width:32px;height:32px}
.ph-empty{display:inline-grid;place-items:center;color:#28547d;font-size:11px;font-weight:800;letter-spacing:.03em}
.ph-detail{display:flex;align-items:flex-end;flex-wrap:wrap;gap:12px;margin-bottom:16px}
.ph-detail img{width:auto;height:auto;max-width:min(100%,300px);max-height:min(45dvh,320px);object-fit:contain;object-position:center;padding:8px;background:linear-gradient(145deg,#fff,#e4efff);border-radius:14px;border:1px solid #bfd6fb;box-shadow:0 6px 20px #1d4ed814}
.ph-detail-empty{width:120px;height:120px;border-radius:12px;background:#f1f5fa;border:1px dashed #c9d5e5;display:grid;place-content:center;text-align:center;color:var(--muted);font-weight:700}
.ph-detail-empty small{display:block;font-weight:500;font-size:11px}
.ph-card{width:min(480px,100%)}
.ph-body{padding:22px 26px;display:grid;gap:12px;overflow-y:auto}
.ph-frame{position:relative;aspect-ratio:4/3;min-width:0;grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr);padding:6px;background:#f1f5fa;border-radius:12px;overflow:hidden;display:grid;place-items:center}
.ph-frame img{display:block;width:100%;height:100%;max-width:100%;max-height:100%;min-width:0;min-height:0;object-fit:contain;object-position:center}
.ph-frame .ph-detail-empty{width:auto;height:auto;border:0;font-size:28px}
.ph-tag{position:absolute;left:10px;bottom:10px;background:#10243fd9;color:#fff;font-size:11px;padding:4px 9px;border-radius:100px}
.ph-input{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}
.ph-pick{display:inline-flex;justify-content:center;cursor:pointer}
.ph-input:focus-visible+.ph-progress,.ph-pick:focus-within{outline:2px solid #2563eb}
.ph-progress{height:6px;background:#e2e8f0;border-radius:6px;overflow:hidden}
.ph-progress div{height:100%;background:var(--primary);transform-origin:left;transform:scaleX(0);transition:transform .15s}
.ph-status{font-size:13px;min-height:18px;color:var(--muted)}
.ph-status.error{color:#b91c1c}.ph-status.success{color:#166534;font-weight:700}
.ph-remove{color:#b91c1c}.ph-spacer{flex:1}
@media(max-width:720px){.ph-body{padding:16px}.dialog-footer{flex-wrap:wrap}}
/* Only tool upload previews use the picture's intrinsic proportions. */
.ph-frame.tool-photo-frame{height:auto;min-height:110px;aspect-ratio:auto;padding:12px;background:radial-gradient(ellipse at 25% 10%,#fff,#e4efff);border:1px solid #bfd6fb;box-shadow:0 8px 24px #1d4ed814}
.ph-frame.tool-photo-frame img{width:auto;height:auto;max-height:min(50dvh,440px)}
tr[data-tool-record] .ph-thumb:not(.round){width:auto;height:auto;max-width:72px;max-height:100px;border-color:#bfd6fb;background:linear-gradient(145deg,#fff,#e4efff);box-shadow:0 3px 10px #1d4ed812}
