/* AHI 10.6.2 — theme-aware unlock screen.
 * The BaziAndroid theme changes its design tokens on body.dark-mode;
 * use them directly instead of forcing a permanently dark card.
 * Scoped to .ahi-unlock: never modifies the site's header or footer.
 */
html:has(.ahi-unlock),body:has(.ahi-unlock){overflow-y:auto!important;max-height:none!important;height:auto!important}
.ahi-unlock{
  --ahi-u-page:var(--bg-page,#f0f2f5);
  --ahi-u-surface:var(--bg-card,#fff);
  --ahi-u-title:var(--text-primary,#1f2126);
  --ahi-u-muted:var(--text-secondary,#555b66);
  --ahi-u-subtle:var(--text-muted,#666c76);
  --ahi-u-border:var(--border-color,rgba(15,23,42,.10));
  --ahi-u-accent:var(--theme-color,#16a34a);
  --ahi-u-soft:var(--input-bg,#f8f9fa);
  --ahi-u-shadow:var(--shadow-card,0 12px 36px rgba(15,23,42,.06));
  box-sizing:border-box;font-family:inherit;direction:rtl;width:100%;
  min-height:52vh;padding:clamp(14px,3vw,25px) 12px 36px;
  background:radial-gradient(ellipse at 80% 0,color-mix(in srgb,var(--ahi-u-accent) 6%,transparent),transparent 60%),var(--ahi-u-page);
  color:var(--ahi-u-title);overflow:visible;touch-action:pan-y;
  color-scheme:light;
  transition:background-color .18s ease,color .18s ease;
}
/* Keep compatibility with older themes that implement dark mode via selectors
   rather than design tokens. BaziAndroid values remain the source of truth. */
body.dark-mode .ahi-unlock,html.dark-mode .ahi-unlock,[data-theme="dark"] .ahi-unlock{
  --ahi-u-page:var(--bg-page,#171b22);
  --ahi-u-surface:var(--bg-card,#1a1d24);
  --ahi-u-title:var(--text-primary,#eef0f2);
  --ahi-u-muted:var(--text-secondary,#a8afba);
  --ahi-u-subtle:var(--text-muted,#a4acb8);
  --ahi-u-border:var(--border-color,rgba(255,255,255,.11));
  --ahi-u-soft:var(--input-bg,#23272f);
  --ahi-u-shadow:var(--shadow-card,0 12px 32px rgba(0,0,0,.24));
  color-scheme:dark;
}
.ahi-unlock *{box-sizing:border-box}
.ahi-unlock-wrap{width:min(100%,460px);margin:0 auto}
.ahi-unlock-back{display:inline-flex;align-items:center;gap:4px;color:var(--ahi-u-muted)!important;text-decoration:none!important;margin:0 0 11px;font-size:13px;font-weight:650}
.ahi-unlock-back:hover,.ahi-unlock-back:focus-visible{color:var(--ahi-u-accent)!important}
.ahi-unlock-panel{border:1px solid var(--ahi-u-border);background:var(--ahi-u-surface);border-radius:18px;padding:clamp(16px,3vw,23px);box-shadow:var(--ahi-u-shadow);color:var(--ahi-u-title)}
.ahi-unlock-hero{display:flex;align-items:center;gap:11px;margin:0 0 14px}
.ahi-unlock-hero>div{min-width:0}
.ahi-unlock-cover{height:52px;width:52px;flex:0 0 52px;object-fit:cover;border-radius:11px}
.ahi-unlock-eyebrow{color:var(--ahi-u-accent);font-weight:800;font-size:11px}
.ahi-unlock h1{font-size:clamp(18px,4vw,23px)!important;color:var(--ahi-u-title)!important;margin:2px 0 1px!important;line-height:1.5!important}
.ahi-unlock-hero p{margin:0;font-size:12px;color:var(--ahi-u-muted);line-height:1.7;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.ahi-gate-clock{width:116px;height:116px;margin:5px auto 10px;position:relative;display:grid;place-items:center}
.ahi-gate-clock svg{position:absolute;inset:0;transform:rotate(-90deg);width:100%;height:100%;fill:none;stroke-width:7}
.ahi-gate-track{stroke:color-mix(in srgb,var(--ahi-u-title) 13%,transparent)}
.ahi-gate-arc{stroke:var(--ahi-u-accent);stroke-linecap:round}
.ahi-gate-time{display:flex;flex-direction:column;align-items:center}
.ahi-gate-time strong{font-size:36px;line-height:1.1;color:var(--ahi-u-title);font-variant-numeric:tabular-nums}
.ahi-gate-time span{color:var(--ahi-u-subtle);font-size:12px}
.ahi-gate-note{text-align:center;color:var(--ahi-u-muted);font-size:12px;line-height:1.85;margin:8px auto 14px;max-width:350px}
.ahi-unlock-btn,.ahi-unlock-download{background:var(--ahi-u-accent);border:0;color:#fff!important;font-family:inherit;cursor:pointer;font-weight:800;font-size:14px;min-height:46px;border-radius:12px;padding:10px 16px;width:100%;text-align:center;text-decoration:none!important;display:flex;align-items:center;justify-content:center;gap:8px;box-shadow:none}
.ahi-unlock-btn:hover,.ahi-unlock-download:hover{background:color-mix(in srgb,var(--ahi-u-accent) 84%,#10191a);color:#fff!important}
.ahi-unlock-btn:focus-visible,.ahi-unlock-download:focus-visible{outline:3px solid color-mix(in srgb,var(--ahi-u-accent) 43%,transparent);outline-offset:3px}
.ahi-unlock-btn:disabled{opacity:.6;cursor:wait}
.ahi-unlock [hidden]{display:none!important}
.ahi-unlock #ahiUnlockMessage{font-size:12px;text-align:center;color:var(--ahi-u-muted);margin:8px 0 0;min-height:0;line-height:1.6}
.ahi-unlock-result{margin-top:12px}
.ahi-unlock-ready-mark{width:50px;height:50px;border-radius:50%;display:grid;place-items:center;margin:0 auto;background:color-mix(in srgb,var(--ahi-u-accent) 13%,var(--ahi-u-surface));color:var(--ahi-u-accent);font-size:30px;font-weight:800}
.ahi-unlock-warning{padding:18px;background:var(--ahi-u-soft);border:1px solid var(--ahi-u-border);border-radius:12px;color:var(--ahi-u-title)}
.ahi-unlock-warning p{margin-bottom:0;font-size:12px;color:var(--ahi-u-muted)}
@media(max-width:520px){.ahi-unlock{padding:12px 10px 28px;min-height:50vh}.ahi-unlock-panel{padding:15px;border-radius:15px}.ahi-unlock-wrap{max-width:380px}.ahi-gate-clock{width:100px;height:100px;margin:5px auto 7px}.ahi-gate-time strong{font-size:32px}.ahi-unlock-hero{margin-bottom:11px}.ahi-gate-note{margin-bottom:12px}}
@media(max-height:650px){.ahi-unlock{min-height:auto}.ahi-gate-clock{width:88px;height:88px}.ahi-unlock-panel{padding:14px}}
@media(prefers-reduced-motion:reduce){.ahi-unlock{transition:none}}
