/* ================================================================
   PRIYO STORY — IMAGE CROPPER
   ================================================================ */
.ic-overlay{
  position:fixed; inset:0;
  height:100vh;
  height:100dvh;
  z-index:10010;
  background:rgba(10,16,13,.72);
  display:none;
  align-items:center; justify-content:center;
  padding:18px;
  opacity:0;
  transition:opacity .18s ease;
  font-family:'Hind Siliguri', sans-serif;
}
.ic-overlay.open{ display:flex; }
.ic-overlay.shown{ opacity:1; }

.ic-modal{
  width:min(760px, 100%);
  max-height:calc(100vh - 36px);
  background:#fff;
  border-radius:16px;
  display:flex; flex-direction:column;
  overflow:hidden;
  box-shadow:0 24px 70px rgba(0,0,0,.4);
  color:var(--text, #1f2a24);
}

.ic-head{
  padding:14px 16px;
  border-bottom:1px solid var(--border, #e2e8e4);
  display:flex; align-items:center; justify-content:space-between;
  flex-shrink:0;
}
.ic-head h3{ font-size:19.5px; font-weight:700; }
.ic-x{
  width:34px; height:34px; border-radius:50%;
  border:none; background:var(--bg, #f0f2f0);
  color:var(--muted, #6b7a72);
  display:flex; align-items:center; justify-content:center;
  cursor:pointer;
}
.ic-x svg{ width:18px; height:18px; }

/* ---------------- stage ---------------- */
.ic-stage{
  flex:1;
  min-height:0;
  background:#121815;
  padding:18px;
  display:flex; flex-direction:column;
  align-items:center; justify-content:center;
  gap:12px;
  overflow:hidden;
}
.ic-frame{
  position:relative;
  width:100%;
  max-width:560px;
  aspect-ratio:var(--ic-aspect, 1);
  max-height:52vh;
  overflow:hidden;
  border-radius:12px;
  background:#000;
  cursor:grab;
  touch-action:none;
  box-shadow:0 0 0 2px rgba(255,255,255,.85), 0 0 0 9999px rgba(0,0,0,.35);
  user-select:none;
  -webkit-user-select:none;
}
.ic-frame.round{ border-radius:50%; max-width:340px; }
.ic-frame.dragging{ cursor:grabbing; }
.ic-frame img{
  position:absolute;
  left:50%; top:50%;
  transform-origin:center center;
  max-width:none;
  will-change:transform;
  pointer-events:none;
  -webkit-user-drag:none;
}
.ic-hint{
  color:rgba(255,255,255,.72);
  font-size:15.5px;
  text-align:center;
  position:relative;
  z-index:2;
}

/* ---------------- tools ---------------- */
.ic-tools{
  display:flex; align-items:center; gap:10px;
  padding:12px 16px;
  border-top:1px solid var(--border, #e2e8e4);
  flex-shrink:0;
}
.ic-tool{
  width:38px; height:38px;
  border:1px solid var(--border, #e2e8e4);
  background:#fff;
  border-radius:50%;
  color:var(--text, #1f2a24);
  display:flex; align-items:center; justify-content:center;
  cursor:pointer;
  flex-shrink:0;
  transition:background .15s ease;
}
.ic-tool:hover{ background:var(--green-light, #e8f5ee); }
.ic-tool svg{ width:17px; height:17px; }
.ic-zoom{
  flex:1;
  min-width:0;
  accent-color:var(--green-dark, #0f5132);
  height:4px;
}

/* ---------------- footer ---------------- */
.ic-foot{
  padding:12px 16px;
  padding-bottom:calc(12px + env(safe-area-inset-bottom, 0px));
  border-top:1px solid var(--border, #e2e8e4);
  display:flex; gap:9px;
  flex-shrink:0;
}
.ic-btn{
  flex:1;
  border:none; border-radius:10px;
  padding:12px;
  font-family:inherit; font-size:17.5px; font-weight:700;
  cursor:pointer;
}
.ic-btn.ghost{ background:var(--bg, #f0f2f0); color:var(--muted, #6b7a72); }
.ic-btn.primary{ background:var(--green-dark, #0f5132); color:#fff; }
.ic-btn:hover{ opacity:.93; }

/* ---------------- responsive ---------------- */
@media (max-width:700px){
  .ic-overlay{ padding:0; align-items:flex-end; }
  .ic-modal{
    width:100%;
    max-height:92vh;
    max-height:92dvh;
    border-radius:16px 16px 0 0;
  }
  .ic-head{ padding-top:calc(14px + env(safe-area-inset-top, 0px)); }
  .ic-stage{ padding:14px; }
  .ic-frame{ max-height:44vh; }
  .ic-frame.round{ max-width:min(260px, 70vw); }
  .ic-hint{ font-size:14.5px; }
}
@media (max-width:380px){
  .ic-tool{ width:34px; height:34px; }
  .ic-tool svg{ width:15px; height:15px; }
  .ic-tools{ gap:7px; padding:10px 12px; }
}
@media (prefers-reduced-motion:reduce){
  .ic-overlay{ transition:none; }
}
