/* crop.css - square crop editor and photo tiles. Rollback: remove the <link> to this file. */

/* photo tiles on /profile are square, like the crop */
.slot{aspect-ratio:1/1}
.slot .x{width:36px;height:36px}
.slot .cr{position:absolute;right:6px;bottom:6px;width:36px;height:36px;display:grid;place-items:center;padding:0;border:0;cursor:pointer;color:#fff;background:rgba(20,18,31,.82);border-radius:12px 12px 4px 12px}
.slot .cr svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.slot .cr:focus-visible,.slot .x:focus-visible{outline:3px solid #fff;outline-offset:-4px}

/* the editor */
.crp-back{position:fixed;inset:0;z-index:90;display:flex;align-items:flex-end;justify-content:center;background:rgba(20,18,31,.6)}
.crp{width:100%;max-width:480px;max-height:100vh;max-height:100dvh;overflow-y:auto;overscroll-behavior:contain;background:var(--s1);color:var(--t1);border-radius:28px 28px 0 0;padding:18px 18px calc(18px + env(safe-area-inset-bottom,0px));animation:crpUp .25s var(--ease)}
@keyframes crpUp{from{transform:translateY(24px);opacity:0}to{transform:none;opacity:1}}
@media (min-width:640px){
  .crp-back{align-items:center}
  .crp{border-radius:28px;padding-bottom:18px}
}
.crp-h{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin-bottom:12px}
.crp-h h3{margin:0;font-size:24px}
.crp-n{font-size:13px;font-weight:600;color:var(--t3)}

.crp-stage{position:relative;width:clamp(220px,min(100%,calc(100dvh - 430px)),440px);aspect-ratio:1/1;margin:0 auto;border-radius:6.2%;overflow:hidden;background:var(--s3);touch-action:none;cursor:grab;user-select:none;-webkit-user-select:none}
.crp-stage:active{cursor:grabbing}
.crp-stage:focus-visible{outline:3px solid var(--acc-t);outline-offset:3px}
.crp-cv{position:absolute;inset:0;display:block;width:100%;height:100%}
.crp-load{position:absolute;inset:0;display:grid;place-items:center;background:var(--s3);color:var(--t2);font-size:14px;font-weight:600}

.crp-zoom{display:flex;align-items:center;gap:8px;max-width:440px;margin:14px auto 0}
.crp-zoom .kmf-range{flex:1;min-width:0}
.crp-ic{flex:none;width:44px;height:44px;display:grid;place-items:center;padding:0;border:0;cursor:pointer;background:var(--s2);color:var(--t1);border-radius:14px}
.crp-ic:hover{background:var(--line)}
.crp-ic svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}

.crp-pv{display:flex;align-items:center;gap:12px;max-width:440px;margin:14px auto 0}
.crp-pvl{font-size:13px;font-weight:600;color:var(--t3)}
.crp-p1{width:112px;height:112px;border-radius:6.2%;background:var(--s3)}
.crp-p2{width:44px;height:44px;border-radius:6.2%;background:var(--s3)}
.crp-reset{margin-left:auto}

.crp-hint{max-width:440px;margin:10px auto 0;font-size:13px;color:var(--t2)}
.crp-warn{color:var(--acc-t);font-weight:600}
.crp-err{max-width:440px;min-height:20px;margin:6px auto 0;font-size:14px;color:var(--acc-t)}
.crp-f{display:flex;gap:10px;max-width:440px;margin:12px auto 0}
.crp-f .btn{flex:1}