/* ════ POPUPS (js/popups.js): install sheet + changelog ════
   Both reuse .mo-ov for the scrim, blur, Esc and backdrop close. */

/* ── add to home screen sheet ── */
.mo-ov.pop-sheet{align-items:flex-end;justify-content:center;padding:0 12px calc(28px + env(safe-area-inset-bottom))}
.pop-box{background:var(--surface);color:var(--ink);border:1px solid var(--border);box-sizing:border-box;font-family:var(--font-body)}
.pop-sheet .pop-box{position:relative;width:100%;max-width:420px;border-radius:24px;padding:24px 20px 12px;
  display:flex;flex-direction:column;gap:18px;box-shadow:0 20px 50px rgba(21,25,50,.35)}
[data-theme="dark"] .pop-sheet .pop-box{box-shadow:0 20px 50px rgba(0,0,0,.5)}
.pop-title{font-size:14.5px;font-weight:700;text-align:center;white-space:nowrap;padding:0 22px}   /* clear of the ✕ */
@media (max-width:440px){ .pop-title{font-size:13px} }
@media (max-width:350px){ .pop-title{font-size:11px;padding:0 18px} }
.pop-steps{display:flex;flex-direction:column;gap:10px}
.pop-step{display:flex;align-items:center;gap:12px;background:var(--surface-2);border-radius:12px;padding:10px 12px;font-size:12.5px}
.pop-step>span:first-child{flex:none;width:22px;height:22px;border-radius:50%;background:var(--accent);color:var(--accent-ink);
  font-size:11px;font-weight:700;display:flex;align-items:center;justify-content:center}
.pop-step>span:nth-child(2){flex:1}
.pop-step svg{flex:none}
.pop-later{align-self:center;height:44px;padding:0 12px;border:0;background:transparent;font:inherit;font-size:12px;
  color:var(--ink-2);text-decoration:underline;text-underline-offset:3px;cursor:pointer}
.pop-x{position:absolute;top:6px;right:6px;width:44px;height:44px;padding:0;border:0;border-radius:50%;background:transparent;
  color:var(--ink-2);cursor:pointer;display:flex;align-items:center;justify-content:center}
.pop-x:hover{background:rgba(127,127,127,.18)}

/* ── changelog ── */
.cl-box{display:flex;flex-direction:column;overflow:hidden;width:480px;max-width:92vw;height:min(470px,80vh);border-radius:22px;
  box-shadow:0 24px 60px rgba(21,25,50,.38)}
[data-theme="dark"] .cl-box{box-shadow:0 24px 60px rgba(0,0,0,.55)}
.cl-head{position:relative;flex:none;padding:26px 72px 12px 28px;display:flex;align-items:baseline;gap:10px}
.cl-head h2{margin:0;font-size:18px;font-weight:700;color:var(--ink)}
.cl-head span{font-size:12px;color:var(--ink-2)}
.cl-head .pop-x{top:14px;right:14px}
.cl-wrap{position:relative;flex:1;min-height:0}
.cl-wrap::after{content:"";position:absolute;left:0;right:0;bottom:0;height:40px;pointer-events:none;
  background:linear-gradient(180deg,color-mix(in srgb,var(--surface) 0%,transparent),var(--surface))}
.cl-scroll{position:absolute;inset:0;overflow-y:auto;padding:4px 28px 40px;display:flex;flex-direction:column;gap:16px;scrollbar-width:thin}
.cl-i{display:flex;flex-direction:column;gap:3px}
.cl-t{font-size:13.5px;font-weight:700}
.cl-d{font-size:12px;line-height:1.6;color:var(--ink-2)}
.cl-h{font-size:11px;font-weight:700;letter-spacing:.04em;color:var(--ink-2);border-top:1px solid var(--border);padding-top:16px}
.cl-foot{flex:none;display:flex;justify-content:flex-end;padding:10px 28px 20px}
.cl-ok{border-radius:999px;font-size:13px;padding:0 28px;height:44px}
/* .btn-primary's look, for pages without components.css (the admin preview) */
.cl-ok{background:var(--accent);border:1px solid var(--accent);color:var(--accent-ink);font-family:var(--font-body);font-weight:600;cursor:pointer}
@media (max-width:768px){
  .cl-box{width:min(346px,92vw);height:min(560px,80vh);border-radius:24px}
  .cl-head{padding:24px 72px 12px 22px}
  .cl-scroll{padding:4px 22px 36px}
  .cl-wrap::after{height:36px}
  .cl-foot{padding:8px 22px 20px}
  .cl-ok{width:100%;height:48px}
}
