/* Android install guide (android-guide.js): the modal over the site and /install-android.html. */
.ag-overlay, .ag-page {
  --ag-bg: #0b0d16;
  --ag-card: #151925;
  --ag-card-2: #1b2030;
  --ag-line: rgba(255, 255, 255, 0.09);
  --ag-text: #f3f4f8;
  --ag-text-2: #aab1c4;
  --ag-gold: #f5c451;
  --ag-grad: linear-gradient(135deg, #ffd36e, #ff9440);
  --ag-warn: rgba(255, 148, 64, 0.12);
  --ag-warn-line: rgba(255, 148, 64, 0.45);
  font-family: inherit;
  color: var(--ag-text);
}
html.mz-light .ag-overlay, html.mz-light .ag-page, html[data-theme="light"] .ag-page {
  --ag-bg: #f6f3ec;
  --ag-card: #ffffff;
  --ag-card-2: #f3efe6;
  --ag-line: rgba(20, 24, 40, 0.12);
  --ag-text: #171a24;
  --ag-text-2: #545b6e;
  --ag-gold: #b7790a;
  --ag-warn: rgba(214, 112, 20, 0.10);
  --ag-warn-line: rgba(214, 112, 20, 0.45);
}
.ag-overlay {
  position: fixed; inset: 0; z-index: 10050;
  display: flex; align-items: flex-end; justify-content: center;
  background: rgba(3, 4, 9, 0.66);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.ag-sheet {
  position: relative; width: min(560px, 100%); max-height: 92dvh; overflow-y: auto; overscroll-behavior: contain;
  background: var(--ag-bg); border: 1px solid var(--ag-line); border-bottom: 0;
  border-radius: 22px 22px 0 0; padding: 22px 18px calc(22px + env(safe-area-inset-bottom));
  box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.45);
}
@media (min-width: 720px) {
  .ag-overlay { align-items: center; }
  .ag-sheet { border-radius: 22px; border-bottom: 1px solid var(--ag-line); padding: 26px 26px 24px; }
}
.ag-close {
  position: absolute; top: 12px; left: 12px; width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--ag-line); background: var(--ag-card); color: var(--ag-text);
  font-size: 22px; line-height: 1; cursor: pointer; display: grid; place-items: center; padding: 0;
}
.ag-head { display: flex; gap: 14px; align-items: flex-start; padding-left: 40px; }
.ag-badge {
  flex: 0 0 48px; width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center;
  background: var(--ag-grad); color: #1a1205;
}
.ag-badge svg { width: 28px; height: 28px; }
.ag-head h2 { margin: 2px 0 6px; font-size: 1.18rem; line-height: 1.5; color: var(--ag-text); }
.ag-lead { margin: 0; color: var(--ag-text-2); font-size: 0.92rem; line-height: 1.85; }
.ag-lead b { color: var(--ag-text); }
.ag-download {
  margin: 18px 0 6px; display: flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 58px; border-radius: 16px; background: var(--ag-grad); color: #1a1205 !important;
  text-decoration: none !important; font-weight: 800; box-shadow: 0 10px 28px rgba(255, 148, 64, 0.28);
}
.ag-download svg { width: 24px; height: 24px; flex: 0 0 24px; }
.ag-download span { display: flex; flex-direction: column; line-height: 1.45; text-align: right; }
.ag-download b { font-size: 1.02rem; }
.ag-download small { font-weight: 600; font-size: 0.8rem; opacity: 0.85; }
.ag-started {
  margin: 8px 0 0; padding: 10px 12px; border-radius: 12px; font-size: 0.88rem; line-height: 1.8;
  background: rgba(34, 197, 94, 0.12); border: 1px solid rgba(34, 197, 94, 0.4); color: var(--ag-text);
}
.ag-steps { list-style: none; counter-reset: ag; margin: 18px 0 0; padding: 0; display: grid; gap: 10px; }
.ag-steps > li {
  counter-increment: ag; position: relative; padding: 14px 54px 14px 14px; border-radius: 16px;
  background: var(--ag-card); border: 1px solid var(--ag-line);
}
.ag-steps > li::before {
  content: counter(ag, persian); position: absolute; right: 14px; top: 14px; width: 28px; height: 28px;
  border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 0.95rem;
  background: var(--ag-card-2); color: var(--ag-gold); border: 1px solid var(--ag-line);
}
.ag-steps h3 { margin: 2px 0 6px; font-size: 0.98rem; color: var(--ag-text); }
.ag-steps p { margin: 4px 0 0; font-size: 0.9rem; line-height: 2; color: var(--ag-text-2); }
.ag-steps p b { color: var(--ag-text); }
.ag-note { font-size: 0.85rem !important; }
.ag-steps > li.ag-warn { background: var(--ag-warn); border-color: var(--ag-warn-line); }
.ag-steps > li.ag-warn::before { color: #ff9440; }
.ag-chip {
  display: inline-flex; align-items: baseline; gap: 6px; padding: 1px 9px; margin: 0 1px;
  border-radius: 8px; background: var(--ag-card-2); border: 1px solid var(--ag-line);
  color: var(--ag-text); font-size: 0.86rem; line-height: 1.8; white-space: nowrap;
}
.ag-chip b { font-weight: 700; }
.ag-chip i { font-style: normal; color: var(--ag-text-2); font-size: 0.78rem; }
.ag-more, .ag-faq details {
  margin-top: 10px; border-radius: 12px; border: 1px solid var(--ag-line); background: var(--ag-card-2);
  padding: 2px 12px;
}
.ag-more summary, .ag-faq summary {
  cursor: pointer; padding: 10px 0; font-weight: 700; font-size: 0.9rem; color: var(--ag-text); line-height: 1.7;
}
.ag-more ol { list-style: persian; margin: 0 0 10px; padding-right: 22px; color: var(--ag-text-2); font-size: 0.88rem; line-height: 2.05; }
.ag-faq { margin-top: 18px; }
.ag-faq h3 { margin: 0 0 4px; font-size: 1rem; }
.ag-faq details p { margin: 0 0 10px; color: var(--ag-text-2); font-size: 0.88rem; line-height: 1.95; }
.ag-support { margin: 16px 0 0; font-size: 0.88rem; line-height: 1.9; color: var(--ag-text-2); text-align: center; }
.ag-support a { color: var(--ag-gold); font-weight: 700; }
@media (max-width: 380px) {
  .ag-steps > li { padding-right: 48px; }
  .ag-chip { white-space: normal; }
}

/* the standalone page */
.ag-page-body { margin: 0; min-height: 100vh; background: #05060c; }
html.mz-light .ag-page-body, html[data-theme="light"] .ag-page-body { background: #efe9dc; }
.ag-page { width: min(620px, 100%); margin: 0 auto; padding: 18px 16px 40px; box-sizing: border-box; }
.ag-page .ag-head { padding-left: 0; }
.ag-page-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.ag-page-top a { color: var(--ag-gold); text-decoration: none; font-weight: 700; font-size: 0.92rem; }
.ag-page-top img { width: 36px; height: 36px; border-radius: 10px; }
.ag-page-body { font-family: "Vazirmatn", system-ui, sans-serif; }
@media (prefers-color-scheme: light) {
  .ag-page-body { background: #efe9dc; }
  .ag-page-body .ag-page {
    --ag-bg: #f6f3ec; --ag-card: #ffffff; --ag-card-2: #f3efe6; --ag-line: rgba(20, 24, 40, 0.12);
    --ag-text: #171a24; --ag-text-2: #545b6e; --ag-gold: #b7790a;
    --ag-warn: rgba(214, 112, 20, 0.10); --ag-warn-line: rgba(214, 112, 20, 0.45);
  }
}
