:root{
  --bg:#020617;
  --navy:#0a1626;
  --panel:#050d1d;
  --cyan:#00e5ff;
  --blue:#0066ff;
  --text:#e6f6ff;
  --muted:#8fb3cc;
  --border:rgba(0,229,255,.45);
  --danger:#ff5470;
  --green:#22ff88;
}
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;background:var(--bg);color:var(--text);
  font-family:system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;
  overflow:hidden;
}
/* Background iframe fills the screen — 100dvh so the page fills the
   visible screen exactly on phones (URL bar showing/hiding), and
   touch-action pan-y so the page behind scrolls on the compositor. */
#bg-wrap{position:fixed;inset:0;height:100vh;height:100dvh;background:#fff;touch-action:pan-y}
#site-frame{position:absolute;inset:0;width:100%;height:100%;border:0;background:#fff}
/* Blocked panel */
#frame-blocked{
  position:absolute;inset:0;background:#020617;color:var(--text);
  display:flex;align-items:center;justify-content:center;padding:18px;z-index:4;
}
#frame-blocked[hidden]{display:none}
.blocked-card{max-width:520px;background:var(--panel);border:1px solid var(--border);border-radius:14px;padding:20px;box-shadow:0 0 32px rgba(0,229,255,.22)}
.blocked-card h2{margin:0 0 10px;font-size:19px;color:#fff}
.blocked-card p{color:#cfe0ef;line-height:1.55;font-size:14px}
.blocked-card code{background:#0a1a33;padding:2px 6px;border-radius:6px;color:var(--cyan)}
.blocked-code{font-size:15px}
.blocked-note{color:var(--green);min-height:18px}
/* Buttons (also used by the admin page) */
.btn-primary{
  display:block;width:100%;text-align:center;text-decoration:none;
  background:linear-gradient(90deg,var(--blue),var(--cyan));
  color:#001018;font-weight:800;letter-spacing:.06em;
  border:0;border-radius:10px;padding:13px 14px;font-size:15px;cursor:pointer;
  box-shadow:0 0 18px rgba(0,229,255,.45);
}
.btn-primary:disabled{opacity:.6;cursor:wait;box-shadow:none}
.btn-ghost{
  display:block;width:100%;margin-top:10px;background:transparent;color:var(--cyan);
  border:1px solid var(--border);border-radius:10px;padding:11px;font-size:14px;cursor:pointer;
}
/* Shared bits (admin page uses these too) */
.demo-line{text-align:center;color:#ffd500;font-weight:800;font-size:12px;letter-spacing:.06em;margin:8px 0}
.demo-explain{color:var(--muted);font-size:13px;line-height:1.55;text-align:center;margin:8px 0 12px}
.field-label{display:block;font-size:13px;color:#cfeaff;margin:12px 0 6px;font-weight:700}
.error{color:var(--danger);font-size:13px;line-height:1.5;margin:10px 0 0;text-align:center}
.error[hidden]{display:none}
.hint{color:#7d9bb5;font-size:12px;line-height:1.55;text-align:center}

/* Collapsed icon — v17: no logo. Simple black circle with a cyan W. */
#mini-icon{
  position:fixed;z-index:9999;right:10px;top:10px;
  width:40px;height:40px;border-radius:50%;
  background:#050d1d;border:2px solid var(--cyan);cursor:pointer;
  box-shadow:0 0 14px rgba(0,229,255,.65);padding:0;overflow:hidden;
  color:var(--cyan);font-size:20px;font-weight:900;
  display:flex;align-items:center;justify-content:center;
}
#mini-icon[hidden]{display:none}

/* Floating widget — v17: NO logo anymore. Simple black card, exactly like
   the user's screenshot (28 Nov 2026): cyan WIN AI PRO title, white
   digital timer, password field, cyan LOGIN. The card is a flex column;
   after login the BIG/SMALL signal fills the whole black body. */
#widget{
  position:fixed;z-index:10000;top:10px;right:10px;
  /* v18: size same as the WIN AI PRO card
     (28 Nov 2026, measured by visual grounding): 30.3% of screen width,
     square — 262x259px on his 864x1920 screen. Was 35vw/340px, 4/5. */
  width:min(30vw,300px);aspect-ratio:1/1;
  will-change:transform; /* v15: drag moves with transform, stays smooth */
}
#widget.dragging{will-change:transform}
#card{
  position:relative;width:100%;height:100%;
  background:#050d1d;
  border:1.5px solid rgba(0,229,255,.75);border-radius:20px;overflow:hidden;
  box-shadow:0 0 28px rgba(0,229,255,.35),0 18px 40px rgba(0,0,0,.6);
  cursor:grab;touch-action:none;user-select:none;
  container-type:inline-size;
  display:flex;flex-direction:column;align-items:center;justify-content:space-evenly;gap:2%;padding:6%;
}
#card.dragging{cursor:grabbing;box-shadow:0 0 36px rgba(0,229,255,.6),0 24px 50px rgba(0,0,0,.7)}
/* Title — cyan (v19: bigger, fills the card) */
#card-title{
  color:var(--cyan);font-weight:900;font-size:9cqw;letter-spacing:.12em;text-align:center;
  text-shadow:0 0 14px rgba(0,229,255,.6);
}
/* Live clock — white digital timer, like the screenshot (v19: bigger) */
#live-timer{
  color:#fff;font-weight:800;font-size:10cqw;letter-spacing:.06em;text-align:center;
  font-family:ui-monospace,SFMono-Regular,Consolas,'Liberation Mono',Menlo,monospace;
  font-variant-numeric:tabular-nums;
}
/* Minimise button — small cyan ×, top-right corner. */
#min-btn{
  position:absolute;right:4%;top:3%;z-index:3;
  width:9%;aspect-ratio:1/1;border-radius:50%;padding:0;
  background:transparent;color:var(--muted);
  border:0;opacity:.35;
  font-size:3.5cqw;line-height:1;cursor:pointer;
  display:flex;align-items:center;justify-content:center;
}
/* Locked layer: password + LOGIN, stacked, centered — like the screenshot */
#lock-layer{width:100%;display:flex;flex-direction:column;align-items:center;gap:14px}
#lock-layer[hidden]{display:none}
#admin-password{
  width:92%;padding:10px 12px;
  background:#0a1626;color:#fff;border:1.5px solid rgba(0,229,255,.7);border-radius:10px;outline:none;
  font-size:6.5cqw;font-weight:800;text-align:center;
  box-shadow:0 0 12px rgba(0,229,255,.25);
  cursor:text;user-select:text;
}
#admin-password::placeholder{color:#aebfce;font-weight:700}
#admin-password:focus{box-shadow:0 0 0 2px rgba(0,229,255,.6),0 0 18px rgba(0,229,255,.5)}
/* LOGIN — bright cyan button, black bold text, like the screenshot */
#unlock-btn{
  width:92%;padding:10px 12px;
  background:linear-gradient(180deg,#00f0ff,#00c8e0);border:0;border-radius:10px;color:#001018;
  font-size:7cqw;font-weight:800;letter-spacing:.1em;cursor:pointer;
  display:flex;align-items:center;justify-content:center;
  box-shadow:0 0 16px rgba(0,229,255,.4);
}
#unlock-btn:active{background:linear-gradient(180deg,#00d8eb,#00a8bd)}
#unlock-btn.busy{
  background:linear-gradient(90deg,var(--blue),var(--cyan));
  color:#001018;box-shadow:0 0 18px rgba(0,229,255,.45);
}
/* Unlocked layer: BIG / SMALL fills the whole black body — no design,
   just the signal, big and centered, with the countdown below. */
#result-layer{
  position:absolute;inset:0;z-index:2;
  background:#050d1d;
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4%;
  padding:7%;text-align:center;
}
#result-layer[hidden]{display:none}
#result-title{
  color:var(--cyan);font-weight:900;font-size:6cqw;letter-spacing:.14em;text-align:center;
  text-shadow:0 0 14px rgba(0,229,255,.6);
}
#signal{flex:1;display:flex;align-items:center;justify-content:center;font-size:22cqw;font-weight:900;letter-spacing:.06em;color:#fff;text-shadow:0 0 18px rgba(0,229,255,.85);transition:transform .25s ease,opacity .25s ease;line-height:1.05}
#signal.pop{transform:scale(1.08);opacity:.6}
#signal.big{color:#22ff88;text-shadow:0 0 20px rgba(34,255,136,.8)}
#signal.small{color:#ff9f1c;text-shadow:0 0 20px rgba(255,159,28,.8)}
/* v19: the 30s countdown is BIG and at the TOP of the logged-in view, so
   it is obvious the seconds are ticking — small label, big number. */
#round-line{font-size:4.5cqw;color:var(--muted);text-align:center}
#round-line strong{
  display:block;color:var(--cyan);font-weight:800;font-size:11cqw;letter-spacing:.06em;
  font-family:ui-monospace,SFMono-Regular,Consolas,'Liberation Mono',Menlo,monospace;
  font-variant-numeric:tabular-nums;
}
/* Main timer (live clock, 24h) pinned to the bottom of the card after login */
#result-clock{
  position:absolute;left:0;right:0;bottom:3%;z-index:2;text-align:center;
  color:#fff;font-weight:700;font-size:5cqw;letter-spacing:.06em;
  font-family:ui-monospace,SFMono-Regular,Consolas,'Liberation Mono',Menlo,monospace;
  font-variant-numeric:tabular-nums;
}
#lock-btn{
  font-size:3.8cqw;background:transparent;color:var(--cyan);
  border:1px solid var(--border);border-radius:20px;
  padding:2% 7%;cursor:pointer;margin-top:1%;
}
/* Error bar at the bottom edge of the card */
#unlock-error{
  position:absolute;left:5%;right:5%;bottom:1.2%;z-index:4;margin:0;
  background:rgba(255,84,112,.94);color:#fff;
  font-size:3.4cqw;line-height:1.4;text-align:center;
  padding:1.5% 2%;border-radius:8px;
}
#unlock-error[hidden]{display:none}
@media (max-width:380px){
  #widget{top:8px;right:8px}
}
