/* Mortar profile picture editor. Uses app.css tokens so light and dark follow the app. No transitions or animations. */
.av-r{display:inline-flex;align-items:center;justify-content:center;overflow:hidden;border-radius:50%;color:#fff;font-weight:700;font-family:inherit}
.av-r img{width:100%;height:100%;object-fit:cover;display:block}
.av-bg{position:fixed;inset:0;z-index:75;background:rgba(18,26,28,.5);display:flex;align-items:center;justify-content:center;padding:20px}
.av-dlg{background:var(--bg-card);color:var(--ink);border:1px solid var(--line);border-radius:14px;padding:18px 20px;width:100%;max-width:380px;max-height:calc(100vh - 40px);overflow:auto;font-family:inherit;box-shadow:0 12px 40px rgba(18,26,28,.25)}
.av-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:12px}
.av-head h2{font-size:17px;margin:0}
.av-x{background:none;border:0;color:var(--ink);font-size:24px;line-height:1;width:44px;height:44px;margin:-10px -12px -10px 0;cursor:pointer;border-radius:8px;font-family:inherit}
.av-tabs{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;margin-bottom:12px}
.av-tabs .btn[aria-pressed="true"],.av-row .btn[aria-pressed="true"]{background:var(--teal);color:var(--on-teal);border-color:var(--teal)}
.av-stage{position:relative;width:min(260px,100%);aspect-ratio:1;margin:0 auto;border-radius:50%;border:1px dashed var(--line);background:var(--bg)}
.av-stage[data-mode="photo"]:has(canvas:not([hidden])){border-radius:12px;border-style:solid}
.av-stage canvas,.av-stage video{position:absolute;inset:0;width:100%;height:100%;display:block;touch-action:none;cursor:grab;border-radius:inherit}
.av-stage[data-mode="initials"] canvas{border-radius:50%;cursor:default}
.av-stage video{object-fit:cover;border-radius:50%;transform:scaleX(-1)}
.av-stage canvas[hidden],.av-stage video[hidden]{display:none}
.av-stage canvas:focus-visible{outline:2px solid var(--teal);outline-offset:3px}
.av-empty{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;text-align:center;padding:24px;color:var(--muted);font-size:13px}
.av-empty[hidden]{display:none}
.av-msg{min-height:18px;margin:8px 0 4px;color:var(--ink);text-align:center}
.av-row{display:flex;flex-wrap:wrap;gap:8px;align-items:center;justify-content:center;margin-top:10px}
.av-row[hidden],#av-init-row[hidden],.av-snap[hidden]{display:none}
.av-file{position:relative;cursor:pointer}
.av-file input{position:absolute;width:1px;height:1px;opacity:0;overflow:hidden;clip:rect(0 0 0 0)}
.av-file:focus-within{outline:2px solid var(--teal);outline-offset:2px}
.av-snap{display:block;margin:10px auto 0}
#av-init-row{margin-top:10px}
.av-colors{display:flex;flex-wrap:wrap;gap:8px;justify-content:center}
.av-color{width:34px;height:34px;border-radius:50%;border:2px solid var(--bg-card);box-shadow:0 0 0 1px var(--line);cursor:pointer;padding:0}
.av-color[aria-pressed="true"]{box-shadow:0 0 0 2px var(--ink)}
.av-tools label{margin-right:2px}
.av-tools input[type=range]{flex:1 1 120px;min-width:0;accent-color:var(--teal)}
.av-actions{justify-content:flex-end;border-top:1px solid var(--line-soft);padding-top:12px;margin-top:14px}
.av-actions .btn{min-width:120px}
html[data-theme="dark"] .av-dlg .btn.q{background:transparent;color:#9FCBC7;border-color:#4E8A8F}
html[data-theme="dark"] .av-dlg .btn.q[aria-pressed="true"]{background:var(--teal);color:var(--on-teal);border-color:var(--teal)}
@media(max-width:720px){
  .av-bg{align-items:flex-end;padding:0}
  .av-dlg{max-width:none;border-radius:14px 14px 0 0;border-bottom:0;max-height:92vh;padding:16px 16px calc(16px + env(safe-area-inset-bottom))}
  .av-dlg .btn{min-height:44px}
  .av-actions > .btn,.av-confirm{flex:1 1 0}
}
#av-initials{text-transform:uppercase}
/* MortarTeam.confirm2 adds .m-arm-hint right after Save: the wrapper keeps a fixed 20px strip under it, so arming moves nothing */
.av-confirm{position:relative;display:inline-flex;flex-direction:column;padding-bottom:20px}
.av-confirm > .m-arm-hint{position:absolute;right:0;bottom:0;height:18px;line-height:18px;white-space:nowrap;color:var(--ink);font-weight:600;font-size:12px}
.av-actions{align-items:flex-start}
