/* Photo editor (shared by admin panel + family app) */
body.ed-open{overflow:hidden}
.ed{position:fixed;inset:0;z-index:200;display:flex;flex-direction:column;background:#0D1110;color:#F2F5F4;font-family:'Baloo Thambi 2',system-ui,sans-serif;-webkit-user-select:none;user-select:none}
.ed svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;flex:none}
.ed-top{display:flex;align-items:center;gap:10px;padding:calc(10px + env(safe-area-inset-top,0px)) 12px 10px;background:#0D1110}
.ed-top b{flex:1;font-size:18px}
.ed-ib{display:grid;place-items:center;width:42px;height:42px;border:0;border-radius:21px;background:rgba(255,255,255,.08);color:inherit;cursor:pointer}
.ed-save{height:42px;padding:0 22px;border:0;border-radius:21px;background:#0F7B6C;color:#fff;font:inherit;font-weight:800;font-size:16px;cursor:pointer}
.ed-save:disabled{opacity:.4}
.ed-stage{position:relative;flex:1;min-height:0;display:grid;place-items:center;overflow:hidden;touch-action:none}
.ed-wrap{position:relative;display:inline-block;line-height:0}
.ed-cv{display:block;max-width:none;box-shadow:0 10px 40px rgba(0,0,0,.5)}
.ed-load{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;background:rgba(13,17,16,.85);text-align:center;padding:20px}
.ed-load[hidden]{display:none}
.ed-load p{margin:0;font-weight:700}
.ed-before{position:absolute;left:12px;bottom:12px;height:36px;padding:0 14px;border:0;border-radius:18px;background:rgba(0,0,0,.55);color:#fff;font:inherit;font-size:13.5px;font-weight:700;cursor:pointer;touch-action:none}
.ed-crop{position:absolute;box-shadow:0 0 0 9999px rgba(0,0,0,.55);outline:2px solid #fff;cursor:move;touch-action:none;
  background-image:linear-gradient(rgba(255,255,255,.35),rgba(255,255,255,.35)),linear-gradient(rgba(255,255,255,.35),rgba(255,255,255,.35)),linear-gradient(90deg,rgba(255,255,255,.35),rgba(255,255,255,.35)),linear-gradient(90deg,rgba(255,255,255,.35),rgba(255,255,255,.35));
  background-size:100% 1px,100% 1px,1px 100%,1px 100%;background-position:0 33.3%,0 66.6%,33.3% 0,66.6% 0;background-repeat:no-repeat}
.ed-crop[hidden]{display:none}
.ed-crop i{position:absolute;width:26px;height:26px;border:4px solid #fff;touch-action:none}
.ed-crop i[data-h="nw"]{left:-4px;top:-4px;border-right:0;border-bottom:0;cursor:nwse-resize}
.ed-crop i[data-h="ne"]{right:-4px;top:-4px;border-left:0;border-bottom:0;cursor:nesw-resize}
.ed-crop i[data-h="sw"]{left:-4px;bottom:-4px;border-right:0;border-top:0;cursor:nesw-resize}
.ed-crop i[data-h="se"]{right:-4px;bottom:-4px;border-left:0;border-top:0;cursor:nwse-resize}
.ed-panel{background:#161C1A;border-radius:22px 22px 0 0;padding:6px 14px calc(14px + env(safe-area-inset-bottom,0px));max-height:46vh;display:flex;flex-direction:column}
.ed-tabs{display:flex;gap:6px;padding:6px 0 10px}
.ed-tabs button{flex:1;height:40px;border:0;border-radius:20px;background:transparent;color:#9FB0AB;font:inherit;font-weight:800;font-size:15px;cursor:pointer}
.ed-tabs button.on{background:#22302C;color:#fff}
.ed-body{overflow-y:auto;min-height:0}
.ed-row{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 10px}
.ed-chip{display:inline-flex;align-items:center;gap:6px;height:40px;padding:0 14px;border:0;border-radius:20px;background:#22302C;color:#E6EEEB;font:inherit;font-weight:700;font-size:14.5px;cursor:pointer}
.ed-chip.on{background:#0F7B6C;color:#fff}
.ed-chip.warn{background:#4A2A22;color:#FFD9CC}
.ed-sl{display:block;margin:0 0 6px}
.ed-sl-l{display:flex;justify-content:space-between;font-size:14.5px;font-weight:700;color:#C9D6D2}
.ed-sl-l em{font-style:normal;color:#fff;min-width:40px;text-align:right}
.ed-sl input{width:100%;height:30px;margin:0;accent-color:#2BB39E}
.ed-looks{display:grid;grid-template-columns:repeat(auto-fill,minmax(84px,1fr));gap:10px}
.ed-look{display:flex;flex-direction:column;align-items:center;gap:4px;border:0;background:none;color:#C9D6D2;font:inherit;font-weight:700;font-size:13.5px;cursor:pointer;padding:0}
.ed-look canvas{width:84px;height:84px;border-radius:14px;border:3px solid transparent}
.ed-look.on canvas{border-color:#2BB39E}
.ed-look.on{color:#fff}
.ed-hint{margin:4px 0 0;color:#9FB0AB;font-size:14px}
@media (min-width:900px){
  .ed{display:grid;grid-template-columns:minmax(0,1fr) 380px;grid-template-rows:auto minmax(0,1fr)}
  .ed-top{grid-column:1/-1}
  .ed-stage{grid-column:1;grid-row:2}
  .ed-panel{grid-column:2;grid-row:2;max-height:none;border-radius:22px 0 0 0}
}
.ed .spinner{width:34px;height:34px;border:4px solid rgba(255,255,255,.2);border-top-color:#2BB39E;border-radius:50%;animation:edspin 1s linear infinite}
@keyframes edspin{to{transform:rotate(360deg)}}
