/* DegenPoker security check on the sign-up and sign-in forms. */
.auth-turnstile.guard-slot { height:auto; }
.auth-turnstile.guard-slot > div { position:static; width:auto; line-height:inherit; transform:none; }
.guard-box { display:grid; gap:10px; padding:14px; border:1px solid var(--line); border-radius:10px; background:var(--panel); overflow:hidden; }
#dialog-body .guard-box p { margin:0; }
/* One of three views is shown; switching views never rebuilds the picture. */
.guard-box:not([data-view="picture"]) > .guard-puzzle, .guard-box[data-view="picture"] > .guard-status, .guard-box:not([data-view="error"]) > .guard-again { display:none; }
.guard-puzzle { display:grid; gap:10px; min-width:0; }
.guard-status { display:flex; align-items:center; gap:10px; font-size:14px; line-height:1.5; color:var(--muted); }
.guard-status::before, .guard-spinner { content:""; flex:0 0 14px; width:14px; height:14px; border-radius:50%; border:2px solid var(--line); border-top-color:var(--brass); animation:guard-spin .9s linear infinite; }
.guard-status[data-state="done"] { color:var(--green); }
.guard-status[data-state="done"]::before { border-color:var(--green); background:var(--green); animation:none; }
.guard-status[data-state="error"] { color:#f0a58f; }
.guard-status[data-state="error"]::before { border-color:#f0a58f; animation:none; }
.guard-prompt { font-size:14px; line-height:1.5; font-weight:600; color:var(--cream); }
.guard-picture { position:relative; width:100%; max-width:360px; margin:0 auto; overflow:hidden; border-radius:8px; border:1px solid var(--line); background:#16321f; cursor:pointer;
  touch-action:manipulation; user-select:none; -webkit-user-select:none; -webkit-touch-callout:none; -webkit-tap-highlight-color:transparent; }
.guard-picture.guard-busy { cursor:default; }
.guard-picture img { display:block; width:100%; height:100%; pointer-events:none; }
.guard-picture img:not([src]) { visibility:hidden; }
.guard-mark { position:absolute; width:26px; height:26px; margin:-13px 0 0 -13px; border-radius:50%; background:var(--gold); color:var(--gold-ink); font:700 14px/26px 'DM Sans',system-ui,sans-serif; text-align:center; box-shadow:0 0 0 2px rgba(0,0,0,.55); pointer-events:none; animation:guard-mark .14s ease-out; }
#dialog-body .guard-box .guard-toast { position:absolute; top:8px; left:8px; right:8px; padding:6px 10px; border-radius:6px; background:rgba(20,16,14,.9); color:#f6c1b0; font-size:13px; line-height:1.4; text-align:center; pointer-events:none; }
.guard-veil { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; gap:10px; background:rgba(12,16,13,.62); color:var(--cream); font-size:14px; line-height:1.4; }
.guard-toast[hidden], .guard-veil[hidden] { display:none; }
.guard-actions { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.guard-progress { margin-right:auto; font-size:13px; color:var(--muted); }
#dialog-body .guard-actions button { width:auto; flex:0 0 auto; margin:0; min-height:40px; padding:8px 14px; border-radius:8px; font-size:13px; text-align:center; cursor:pointer; touch-action:manipulation; }
#dialog-body .guard-actions button:disabled { opacity:.5; cursor:default; }
.guard-help { font-size:12px; line-height:1.5; color:var(--muted); }
/* The second screen takes the place of the form, which stays in the page with what was typed. */
#dialog-body.guard-step-open > :not(.guard-step) { display:none !important; }
.guard-step { display:grid; gap:14px; margin-top:6px; }
#dialog-body .guard-step h3 { margin:0; font:600 18px/1.3 Outfit,system-ui,sans-serif; outline:none; }
#dialog-body .guard-step-intro { margin:0; font-size:14px; line-height:1.6; color:var(--muted); }
#dialog-body .guard-step-back[hidden] { display:none; }
@keyframes guard-spin { to { transform:rotate(360deg); } }
@keyframes guard-mark { from { transform:scale(.7); opacity:.4; } }
@media (prefers-reduced-motion:reduce) { .guard-status::before, .guard-spinner, .guard-mark { animation:none; } }

/* Administrator page: sign-up checks. */
.guard-admin-section { margin-bottom:22px; }
.guard-admin-section h2 { margin:0 0 10px; }
.guard-admin-section h3 { margin:18px 0 8px; font-size:15px; }
.guard-admin-section p { color:var(--muted); font-size:14px; line-height:1.6; }
.guard-admin-mode[data-mode="enforce"] h2 { color:var(--green); }
.guard-admin-mode[data-mode="monitor"] h2 { color:var(--gold); }
.guard-admin-tiles { display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:12px; margin:0 0 18px; }
.guard-admin-tiles > div { padding:15px 16px; border:1px solid var(--line); border-radius:10px; background:var(--surface-raised); }
.guard-admin-tiles strong { display:block; font:600 26px/1.2 Outfit,system-ui,sans-serif; font-variant-numeric:tabular-nums; }
.guard-admin-tiles span { display:block; margin-top:4px; font-size:12px; color:var(--muted); }
.guard-admin-reasons, .guard-admin-domains { list-style:none; margin:0; padding:0; display:grid; gap:6px; max-width:560px; }
.guard-admin-reasons li, .guard-admin-domains li { display:flex; justify-content:space-between; align-items:center; gap:12px; padding:9px 12px; border:1px solid var(--line); border-radius:8px; font-size:14px; overflow-wrap:anywhere; }
.guard-admin-heading { display:flex; justify-content:space-between; align-items:flex-end; gap:16px; flex-wrap:wrap; margin-bottom:12px; }
.guard-admin-heading label, .guard-admin-add label { display:flex; flex-direction:column; gap:6px; font-size:12px; color:var(--muted); }
.guard-admin-heading select, .guard-admin-add input { min-height:44px; padding:10px 12px; border:1px solid var(--line); border-radius:7px; background:var(--bg); color:var(--cream); font-size:14px; }
.guard-admin-add { display:flex; align-items:flex-end; gap:10px; flex-wrap:wrap; margin:12px 0; }
.guard-admin-add label { flex:1 1 220px; }
.guard-admin-table small { display:block; margin-top:2px; font-weight:400; color:var(--muted); }
.guard-admin-result { white-space:nowrap; }
.guard-admin-result[data-result="deny"] { color:#f0a58f; }
.guard-admin-result[data-result="flag"], .guard-admin-result[data-result="step"] { color:var(--gold); }
.guard-admin-result[data-result="allow"] { color:var(--green); }
.guard-admin-section .form-error:empty { display:none; }
.guard-admin-table td:last-child, .guard-admin-table th:last-child { text-align:left; white-space:normal; min-width:220px; line-height:1.5; }
@media (max-width:760px) {
  .guard-admin-table thead { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
  .guard-admin-table tbody tr { display:grid; grid-template-columns:minmax(0,1fr) auto auto; gap:4px 12px; align-items:baseline; padding:12px 0; border-top:1px solid var(--line); }
  .guard-admin-table tbody th, .guard-admin-table tbody td { display:block; padding:0; border:0; white-space:normal; overflow-wrap:anywhere; }
  .guard-admin-table tbody td:first-child { grid-column:1 / -1; font-size:12px; color:var(--muted); }
  .guard-admin-table tbody td:last-child { grid-column:1 / -1; min-width:0; font-size:13px; color:var(--muted); }
}
