/* 🔗 «Открыть в приложении sasite?» (applink.js) — карточка постоянного размера: состояния меняют текст, не высоту */
.al-dlg { --al-grad:var(--grad, linear-gradient(135deg, #FF5A7A, #C04BE8 55%, #7B61FF));
  width:min(440px, calc(100vw - 32px)); height:min(492px, calc(100dvh - 32px)); max-height:none; margin:auto; padding:30px 28px 16px;
  border:1px solid var(--line); border-radius:20px; background:var(--card); color:var(--text); overflow:hidden;
  box-shadow:0 30px 80px -24px rgba(0,0,0,.6); text-align:center; }
.al-dlg[open] { display:flex; flex-direction:column; align-items:center; animation:al-in .18s ease-out; }
.al-dlg::backdrop { background:rgba(0,0,0,.62); -webkit-backdrop-filter:blur(4px); backdrop-filter:blur(4px); }
@keyframes al-in { from { opacity:0; transform:translateY(6px) scale(.985); } to { opacity:1; transform:none; } }

/* значок приложения + бейдж состояния */
.al-art { position:relative; width:76px; height:76px; flex:none; margin-bottom:18px; }
.al-logo { display:block; width:76px; height:76px; border-radius:50%; box-shadow:0 14px 34px -12px rgba(229,57,53,.75); }
.al-logo img { display:block; width:76px; height:76px; }
.al-badge { position:absolute; right:-4px; bottom:-4px; display:grid; place-items:center; width:30px; height:30px; border-radius:50%;
  background:var(--hover); color:var(--text); border:3px solid var(--card); transition:background-color .2s, color .2s; }
.al-bi { width:16px; height:16px; fill:none; stroke:currentColor; stroke-width:2.4; stroke-linecap:round; stroke-linejoin:round; }
.al-dlg[data-state="opened"] .al-badge { background:var(--ok); color:#fff; }
.al-dlg[data-state="missing"] .al-badge { background:var(--warn); color:#141414; }
.al-spin { width:15px; height:15px; border-radius:50%; border:2.2px solid color-mix(in srgb, currentColor 28%, transparent); border-top-color:currentColor;
  animation:al-rot .8s linear infinite; }
.al-spin.sm { width:16px; height:16px; }
@keyframes al-rot { to { transform:rotate(360deg); } }

/* текст: высота описания — постоянная (3 строки), чтобы кнопки не прыгали */
.al-t { margin:0 0 8px; font-size:21px; font-weight:700; letter-spacing:-.01em; line-height:1.25; min-height:26px; }
.al-d { margin:0; height:63px; font-size:14px; line-height:1.5; color:var(--text2); max-width:360px; overflow:hidden; }

/* куда ведёт ссылка */
.al-where { display:flex; align-items:center; gap:12px; width:100%; margin:16px 0 0; padding:10px 14px; border-radius:14px;
  background:var(--hover); border:1px solid var(--line); text-align:left; min-width:0; }
.al-where-i { width:22px; height:22px; flex:none; fill:none; stroke:var(--text2); stroke-width:1.9; stroke-linecap:round; stroke-linejoin:round; }
.al-where-c { display:flex; flex-direction:column; min-width:0; }
.al-where-t { font-weight:500; font-size:14.5px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.al-where-s { font-size:12.5px; color:var(--text2); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }

/* кнопки — во всю ширину, внизу */
.al-acts { display:flex; flex-direction:column; gap:8px; width:100%; margin-top:auto; padding-top:18px; }
.al-acts .btn { width:100%; gap:10px; }
.al-acts .btn.big { font-weight:500; }
.al-b1.al-go { background:var(--al-grad); border:0; color:#fff; box-shadow:0 12px 28px -14px rgba(192,75,232,.95); }
.al-b1.al-go:hover { background:var(--al-grad); filter:brightness(1.08); }
.al-b1.al-go:disabled { opacity:.85; cursor:progress; }
.al-i { width:18px; height:18px; flex:none; fill:none; stroke:currentColor; stroke-width:2.1; stroke-linecap:round; stroke-linejoin:round; }

/* низ: «запомнить» и ссылка */
.al-foot { display:flex; align-items:center; justify-content:space-between; gap:12px; width:100%; margin-top:14px; padding-top:12px;
  border-top:1px solid var(--line); font-size:12.5px; color:var(--text2); }
.al-chk { display:flex; align-items:center; gap:8px; cursor:pointer; white-space:nowrap; }
.al-chk input { width:16px; height:16px; min-height:0; margin:0; accent-color:var(--ok); }
.al-chk:hover { color:var(--text); }
.al-foot-a { color:var(--blue); text-decoration:none; white-space:nowrap; }
.al-foot-a:hover { text-decoration:underline; }

/* ⚙ Настройки → «Ссылки на sasite открывать» */
.seg.al-seg { display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); width:100%; border-radius:14px; }
.seg.al-seg span { text-align:center; padding:7px 8px; border-radius:11px; }

@media (prefers-reduced-motion: reduce) { .al-dlg[open] { animation:none; } .al-spin { animation-duration:2s; } }
