@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

/* Shared design system for every page: website, user dashboard, advertiser panel and admin. */
:root {
  --bg: #f6f5ff;
  --surface: #ffffff;
  --surface-2: #faf9ff;
  --text: #1b1638;
  --muted: #625d7f;
  --border: #e6e2f6;
  --accent: #6d4aff;
  --accent-2: #e5489b;
  --accent-3: #ff9f1c;
  --accent-4: #12b5a6;
  --accent-5: #2d9cff;
  --accent-text: #ffffff;
  --accent-soft: #efeaff;
  --danger: #d92d48;
  --warn: #c27400;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(32, 20, 90, .05), 0 12px 32px -18px rgba(60, 30, 160, .28);
  --shadow-lg: 0 30px 70px -30px rgba(70, 30, 170, .45);
  --grad: linear-gradient(120deg, #6d4aff 0%, #a347f5 45%, #e5489b 100%);
  --grad-warm: linear-gradient(120deg, #ff9f1c 0%, #e5489b 100%);
  --grad-cool: linear-gradient(120deg, #2d9cff 0%, #12b5a6 100%);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f0c1f;
    --surface: #18142e;
    --surface-2: #1d1838;
    --text: #f1eeff;
    --muted: #a8a2c9;
    --border: #2d2750;
    --accent: #9a80ff;
    --accent-2: #ff6fb4;
    --accent-3: #ffb547;
    --accent-4: #3fd6c6;
    --accent-5: #5cb5ff;
    --accent-text: #ffffff;
    --accent-soft: #261f4d;
    --danger: #ff6b81;
    --warn: #ffb547;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 14px 34px -18px rgba(0, 0, 0, .7);
    --shadow-lg: 0 30px 70px -30px rgba(0, 0, 0, .8);
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(900px 500px at 100% -10%, color-mix(in srgb, var(--accent-2) 12%, transparent), transparent 60%),
    radial-gradient(800px 500px at -10% 0%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font: 15.5px/1.6 "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); }
::selection { background: color-mix(in srgb, var(--accent) 30%, transparent); }

/* Top bar on every page */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 16px;
  max-width: 1080px;
  margin: 0 auto;
  padding: 18px 16px;
}
header nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
header a { color: var(--muted); text-decoration: none; margin-left: 10px; font-weight: 600; font-size: 14.5px; border-radius: 999px; padding: 6px 10px; transition: background .15s, color .15s; }
header nav a:hover { color: var(--accent); background: var(--accent-soft); }
.brand {
  display: inline-flex; align-items: center; gap: 9px;
  font-weight: 800; font-size: 19px; letter-spacing: -.02em;
  color: var(--text) !important; margin: 0 !important; padding: 0 !important; background: none !important;
}
.brand::before {
  content: ""; width: 30px; height: 30px; border-radius: 9px; flex: none;
  background: url("/favicon.svg") center / cover no-repeat;
  box-shadow: 0 6px 16px -6px color-mix(in srgb, var(--accent) 70%, transparent);
}
.brand img { display: none; }

main { max-width: 1080px; margin: 0 auto; padding: 0 16px 72px; }
h1 { font-size: clamp(26px, 3.4vw, 34px); line-height: 1.15; margin: 10px 0; letter-spacing: -.02em; font-weight: 800; }
h2 { font-size: 18px; margin: 0 0 12px; letter-spacing: -.01em; font-weight: 700; }
h3 { letter-spacing: -.01em; }
.lede { color: var(--muted); margin: 0 0 24px; max-width: 62ch; font-size: 16px; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
@media (max-width: 760px) { .grid { grid-template-columns: 1fr; } }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}
.card > h2:first-child { display: flex; align-items: center; gap: 10px; }
.card > h2:first-child::before { content: ""; width: 6px; height: 18px; border-radius: 3px; background: var(--grad); }

/* Forms */
label { display: block; font-weight: 600; margin: 14px 0 6px; }
.hint { color: var(--muted); font-size: 13px; font-weight: 400; }
input[type=text], input[type=email], input[type=url], input[type=number], input[type=password], input[type=tel], input[type=date], input[type=search], select, textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--accent); background: var(--surface);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent);
}
.bids { display: flex; gap: 8px; flex-wrap: wrap; }
.bids label {
  margin: 0;
  font-weight: 600;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  padding: 8px 16px;
  cursor: pointer;
  background: var(--surface);
  transition: border-color .15s, background .15s, color .15s;
}
.bids label:hover { border-color: var(--accent); }
.bids label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.bids input { margin-right: 6px; accent-color: var(--accent); }

/* Buttons */
button, .button {
  display: inline-block;
  border: 0;
  border-radius: 12px;
  padding: 11px 20px;
  background: var(--grad);
  background-size: 160% 100%;
  background-position: 0 0;
  color: var(--accent-text);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 10px 22px -12px color-mix(in srgb, var(--accent) 80%, transparent);
  transition: transform .15s, box-shadow .15s, background-position .3s;
}
button:hover, .button:hover { transform: translateY(-1px); background-position: 100% 0; box-shadow: 0 14px 26px -12px color-mix(in srgb, var(--accent-2) 80%, transparent); }
button:active, .button:active { transform: none; }
button.secondary, .button.secondary { background: var(--surface); color: var(--text); border: 1.5px solid var(--border); box-shadow: none; }
button.secondary:hover, .button.secondary:hover { border-color: var(--accent); color: var(--accent); }
button.danger { background: linear-gradient(120deg, #ff5b6e, #d92d48); color: #fff; }
button:disabled { opacity: 0.5; cursor: default; transform: none; }
.total { display: flex; justify-content: space-between; align-items: center; margin: 20px 0 12px; font-size: 18px; }
.total b { font-size: 26px; font-weight: 800; }
.error { color: var(--danger); min-height: 1.5em; }

/* Stat tiles: each one gets its own colour */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 560px) { .stats { grid-template-columns: 1fr 1fr; } }
.stat {
  --c: var(--accent);
  position: relative; overflow: hidden;
  background: color-mix(in srgb, var(--c) 9%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--c) 22%, var(--border));
  border-radius: 14px; padding: 14px 16px;
}
.stat::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--c); }
.stat:nth-child(6n+2) { --c: var(--accent-2); }
.stat:nth-child(6n+3) { --c: var(--accent-3); }
.stat:nth-child(6n+4) { --c: var(--accent-4); }
.stat:nth-child(6n+5) { --c: var(--accent-5); }
.stat:nth-child(6n+6) { --c: #a347f5; }
.stat b { display: block; font-size: 24px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; color: color-mix(in srgb, var(--c) 70%, var(--text)); }
.stat span { color: var(--muted); font-size: 13px; }

/* Tables */
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { color: var(--muted); font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; background: var(--surface-2); }
tbody tr:hover td, tr:hover > td { background: color-mix(in srgb, var(--accent) 4%, transparent); }
.table-wrap { overflow-x: auto; border-radius: 12px; }
.hidden { display: none !important; }

/* Status pills used across the dashboards and admin */
.status, .pill-status {
  display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700;
  border: 0; white-space: nowrap; background: var(--accent-soft); color: var(--accent);
}
.status.paid, .status.active, .status.completed, .status.processed { background: color-mix(in srgb, var(--accent-4) 16%, transparent); color: color-mix(in srgb, var(--accent-4) 75%, var(--text)); }
.status.requested, .status.processing, .status.pending_review, .status.awaiting_payment, .status.created { background: color-mix(in srgb, var(--accent-3) 18%, transparent); color: var(--warn); }
.status.failed, .status.rejected, .status.suspended, .status.reversed { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); }
.status.paused, .status.refunded, .status.partially_refunded { background: color-mix(in srgb, var(--accent-5) 15%, transparent); color: var(--accent-5); }

/* Mirrors the card the extension injects. */
.preview-chat { background: var(--surface-2); border: 1px solid var(--border); border-radius: 14px; padding: 16px; }
.preview-bubble { margin-left: auto; width: fit-content; max-width: 80%; background: var(--accent-soft); padding: 9px 15px; border-radius: 18px 18px 4px 18px; }
.wl-card {
  display: flex; align-items: center; gap: 10px;
  margin: 12px 0 8px; padding: 11px 13px;
  border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--border)); border-radius: 12px;
  background: var(--surface); font-size: 14px;
  box-shadow: 0 8px 20px -14px color-mix(in srgb, var(--accent) 60%, transparent);
}
.wl-card img { width: 20px; height: 20px; border-radius: 4px; object-fit: cover; }
.wl-card .wl-label { color: var(--accent); font-weight: 700; font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; }
.wl-card .wl-copy { flex: 1; color: var(--text); }
.wl-card .wl-x { color: var(--muted); }
.thinking { color: var(--muted); font-size: 14px; }

/* Sign-in / create-account card (auth-ui.js) */
.auth-card { max-width: 470px; margin: 28px auto; position: relative; overflow: hidden; }
.auth-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 5px; background: var(--grad); }
.auth-title { font-size: 25px; }
.auth-tabs { display: flex; gap: 4px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 4px; margin: 10px 0 6px; }
.auth-tabs button { flex: 1; background: none; color: var(--muted); border-radius: 9px; padding: 8px 10px; box-shadow: none; }
.auth-tabs button:hover { transform: none; }
.auth-tabs button[aria-selected=true] { color: var(--accent-text); background: var(--grad); }
.auth-row { display: flex; gap: 12px; align-items: center; justify-content: space-between; margin-top: 16px; }
.auth-row input { flex: 1; }
.auth-captcha { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.auth-captcha img { width: 170px; height: 60px; border-radius: 8px; border: 1px solid var(--border); background: #f4f1ea; }
.auth-captcha button { padding: 8px 12px; font-size: 18px; line-height: 1; }
.auth-captcha input[name=captcha] { flex: 1 1 120px; min-width: 120px; text-transform: uppercase; letter-spacing: 3px; }
.auth-social { display: grid; justify-items: center; gap: 10px; margin: 14px 0 6px; }
.auth-social .hint { margin: 0; text-align: center; }
.social-btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 280px; max-width: 100%; height: 40px; box-sizing: border-box; border-radius: 4px; color: #fff; font-weight: 600; font-size: 14px; text-decoration: none; }
.social-btn:hover { color: #fff; filter: brightness(1.08); text-decoration: none; }
.social-linkedin { background: #0a66c2; }
.social-facebook { background: #1877f2; }
.social-logo { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 3px; background: #fff; font: 700 15px/1 Arial, sans-serif; }
.social-linkedin .social-logo { color: #0a66c2; }
.social-facebook .social-logo { color: #1877f2; border-radius: 50%; font-size: 17px; padding-top: 3px; box-sizing: border-box; }
.auth-or { display: flex; align-items: center; gap: 10px; width: 100%; margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.auth-or::before, .auth-or::after { content: ''; flex: 1; border-top: 1px solid var(--border); }
.auth-dev { border-top: 1px dashed var(--border); margin-top: 18px; padding-top: 6px; }
.ok-note { color: var(--accent-4); font-weight: 600; }

/* Shared top navigation for the app pages */
.app-nav a { margin-left: 6px; }
.app-nav a.active { color: var(--accent); background: var(--accent-soft); }

/* Tabs used by the dashboards and admin (buttons or links inside a .tabs bar) */
.tabs, nav.tabs { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px; margin: 8px 0 20px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); }
.tabs button, .tabs a { background: none; color: var(--muted); box-shadow: none; padding: 8px 14px; border-radius: 10px; font-weight: 700; text-decoration: none; margin: 0; }
.tabs button:hover, .tabs a:hover { transform: none; color: var(--accent); background: var(--accent-soft); }
.tabs button[aria-selected=true], .tabs button.active, .tabs a.active, .tabs a[aria-current] { background: var(--grad); color: #fff; }

/* Dialogs (admin) */
dialog { border: 1px solid var(--border); border-radius: 18px; background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg); padding: 24px; max-width: min(560px, 94vw); }
dialog::backdrop { background: rgba(20, 10, 60, .45); backdrop-filter: blur(3px); }

/* Charts drawn with plain divs */
.chart div { background: var(--grad) !important; }
.chart div.zero { background: var(--border) !important; }

/* Toast */
#toast { background: var(--grad) !important; color: #fff !important; border-radius: 12px !important; box-shadow: var(--shadow-lg); }

/* Legal / footer used on app pages */
@media (max-width: 640px) {
  header { padding: 14px 12px; }
  header a { margin-left: 0; padding: 6px 8px; font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* Admin / dashboard extras */
.tabs .badge { display: inline-block; min-width: 18px; padding: 0 6px; margin-left: 6px; border-radius: 999px; background: var(--grad-warm); color: #fff; font-size: 11px; line-height: 18px; }
.chart .bar, .progress div, .site-row .track div { background: var(--grad) !important; }
.site-row:nth-child(2) .track div { background: var(--grad-warm) !important; }
.site-row:nth-child(3) .track div { background: var(--grad-cool) !important; }
.progress, .site-row .track { background: var(--accent-soft) !important; }
.warn { border-left: 4px solid var(--accent-3) !important; background: color-mix(in srgb, var(--accent-3) 10%, var(--surface)) !important; border-radius: 10px !important; }
.notice { border-left: 4px solid var(--accent) !important; }
.notice.bad { border-left-color: var(--danger) !important; }
fieldset { border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; margin: 0 0 16px; background: var(--surface-2); }
legend { font-weight: 800; padding: 0 8px; color: var(--accent); }
.pay-options label { border-radius: 14px !important; border-width: 1.5px !important; }
.pay-options label:has(input:checked) { border-color: var(--accent) !important; background: var(--accent-soft); }
.ok { color: var(--accent-4) !important; }

/* Terms acceptance: sign-up checkbox and the dashboard "accept the terms" box. */
.terms-check { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; font-size: 14px; line-height: 1.45; margin: 12px 0; }
.terms-check input { width: auto; margin-top: 3px; flex: none; }
.terms-gate { position: fixed; inset: 0; z-index: 1000; background: rgba(15, 12, 30, .55); display: flex; align-items: center; justify-content: center; padding: 16px; }
.terms-card { max-width: 520px; width: 100%; max-height: calc(100vh - 32px); overflow: auto; }
.terms-card h2 { margin-top: 0; }

/* ---------- Rainbow loading strip (fx.js) ---------- */
#wl-loader {
  position: fixed; top: 0; left: 0; right: 0; height: 4px; z-index: 2147483000; pointer-events: none;
  background: linear-gradient(90deg, #6ab04c, #f9ca24 14%, #f0932b 28%, #eb4d4b 44%, #a52bbf 50%, #6c5ce7 62%, #1e9e8a 76%, #badc58 88%, #f0932b);
  background-size: 200% 100%;
  transform-origin: 0 50%; transform: scaleX(0); opacity: 0;
}
#wl-loader.busy { opacity: 1; animation: wl-grow 2.4s cubic-bezier(.1, .7, .2, 1) forwards, wl-flow 1.4s linear infinite; }
#wl-loader.done { opacity: 0; transform: scaleX(1); transition: transform .25s ease-out, opacity .4s ease .25s; animation: wl-flow 1.4s linear infinite; }
@keyframes wl-grow { from { transform: scaleX(0); } 60% { transform: scaleX(.7); } to { transform: scaleX(.9); } }
@keyframes wl-flow { to { background-position: -200% 0; } }

/* ---------- Colourful icons (fx.js draws them into [data-icon]) ---------- */
.cicon {
  --tile: #fff1d6;
  display: inline-grid; place-items: center; flex: none;
  width: 58px; height: 58px; border-radius: 18px; padding: 6px; box-sizing: border-box;
  color: #231c48; /* icon outlines */
  background: radial-gradient(circle at 30% 25%, #fff 0, var(--tile) 70%);
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--tile) 70%, #231c48), 0 10px 22px -14px rgba(60, 30, 160, .45);
}
.cicon svg { width: 100%; height: 100%; overflow: visible; }
[data-icon="wallet"], [data-icon="coins"], [data-icon="crown"], [data-icon="help"], [data-icon="star"], [data-icon="key"] { --tile: #fff2cc; }
[data-icon="hourglass"], [data-icon="chat"], [data-icon="toggle"], [data-icon="card"], [data-icon="cursor"] { --tile: #ece6ff; }
[data-icon="bank"], [data-icon="eye"], [data-icon="clock"], [data-icon="idcard"], [data-icon="globe"], [data-icon="laptop"], [data-icon="code"], [data-icon="student"] { --tile: #e1f1ff; }
[data-icon="calendar"], [data-icon="gift"], [data-icon="lock"], [data-icon="target"], [data-icon="shop"], [data-icon="people"] { --tile: #ffe3ea; }
[data-icon="chart"], [data-icon="cash"], [data-icon="puzzle"], [data-icon="shield"], [data-icon="receipt"], [data-icon="phone"] { --tile: #ddf7e8; }
[data-icon="textline"], [data-icon="megaphone"], [data-icon="pen"], [data-icon="rocket"] { --tile: #ffe8d6; }
.cicon.sm { width: 40px; height: 40px; border-radius: 13px; padding: 6px; }
.cicon.lg { width: 72px; height: 72px; border-radius: 22px; padding: 10px; }

/* Pop in when scrolled into view */
.cicon { transform: scale(.6) rotate(-8deg); opacity: 0; transition: transform .55s cubic-bezier(.34, 1.56, .64, 1), opacity .35s ease; }
.cicon.in, .no-reveal .cicon { transform: none; opacity: 1; }
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s cubic-bezier(.2, .7, .2, 1); }
.reveal.in, .no-reveal .reveal { opacity: 1; transform: none; }
.reveal:not(.revealed) { transition: opacity .6s ease, transform .6s cubic-bezier(.2, .7, .2, 1) !important; }
*:hover > .cicon.in { transform: translateY(-3px) rotate(-3deg) scale(1.06); }

/* Animated parts. Each loops gently with a pause, so a page full of icons stays calm. */
.cicon [class^="p-"], .cicon [class*=" p-"] { transform-box: fill-box; transform-origin: center; }
.cicon.in .p-bob { animation: p-bob 3.2s ease-in-out infinite; }
.cicon.in .p-rise { animation: p-rise 2.8s ease-in-out infinite; }
.cicon.in .p-drop { animation: p-drop 2.4s ease-in-out infinite; }
.cicon.in .p-twinkle { animation: p-twinkle 2.2s ease-in-out infinite; }
.cicon.in .p-pop { animation: p-pop 3s ease-in-out infinite; }
.cicon.in .p-grow { transform-origin: 50% 100%; animation: p-grow 3s ease-in-out infinite; }
.cicon.in .p-blink { transform-origin: 50% 0; animation: p-blink 4s ease-in-out infinite; }
.cicon.in .p-look { animation: p-look 4s ease-in-out infinite; }
.cicon.in .p-dot { animation: p-dot 1.3s ease-in-out infinite; }
.cicon.in .p-hand { transform-origin: 50% 100%; animation: p-spin 4s linear infinite; }
.cicon.in .p-spin-slow { animation: p-spin 14s linear infinite; }
.cicon.in .p-wiggle { animation: p-wiggle 2.6s ease-in-out infinite; }
.cicon.in .p-swing { transform-origin: 50% 0; animation: p-wiggle 2.4s ease-in-out infinite; }
.cicon.in .p-shackle { transform-origin: 50% 100%; animation: p-shackle 3.4s ease-in-out infinite; }
.cicon.in .p-draw { stroke-dasharray: 30; animation: p-draw 2.8s ease-in-out infinite; }
.cicon.in .p-knob { animation: p-knob 3s ease-in-out infinite; }
.cicon.in .p-track { animation: p-track 3s ease-in-out infinite; }
.cicon.in .p-lid { transform-origin: 50% 100%; animation: p-lid 2.8s ease-in-out infinite; }
.cicon.in .p-type { stroke-dasharray: 40; animation: p-type 3.2s ease-in-out infinite; }
.cicon.in .p-write { transform-origin: 0 100%; animation: p-write 1.6s ease-in-out infinite; }
.cicon.in .p-shout { transform-origin: 30% 50%; animation: p-shout 1.8s ease-in-out infinite; }
.cicon.in .p-wave { animation: p-wave 1.8s ease-in-out infinite; }
.cicon.in .p-ripple { animation: p-ripple 1.8s ease-out infinite; }
.cicon.in .p-press { animation: p-press 1.8s ease-in-out infinite; }
.cicon.in .p-hit { animation: p-hit 2.6s ease-in-out infinite; }
.cicon.in .p-launch { animation: p-bob 1.6s ease-in-out infinite; }
.cicon.in .p-flame { transform-origin: 50% 0; animation: p-flame .35s ease-in-out infinite alternate; }
.cicon.in .p-glow { animation: p-glow 2.4s ease-in-out infinite; }
.cicon.in .p-send { animation: p-send 2.6s ease-in-out infinite; }
.cicon.in .p-sand-top { transform-origin: 50% 100%; animation: p-sand-top 3s linear infinite; }
.cicon.in .p-sand-bot { transform-origin: 50% 100%; animation: p-sand-bot 3s linear infinite; }
.cicon.in .p-blink-dot { animation: p-twinkle 1.6s ease-in-out infinite; }

@keyframes p-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@keyframes p-rise { 0%, 100% { transform: translateY(1px); } 50% { transform: translateY(-3px); } }
@keyframes p-drop { 0%, 30% { transform: translateY(-3px); } 55% { transform: translateY(2px); } 70%, 100% { transform: translateY(0); } }
@keyframes p-twinkle { 0%, 100% { transform: scale(.6) rotate(0); opacity: .5; } 50% { transform: scale(1.15) rotate(45deg); opacity: 1; } }
@keyframes p-pop { 0%, 70%, 100% { transform: scale(1); } 80% { transform: scale(1.18); } 90% { transform: scale(.95); } }
@keyframes p-grow { 0%, 100% { transform: scaleY(1); } 40% { transform: scaleY(.55); } 70% { transform: scaleY(1.06); } }
@keyframes p-blink { 0%, 44%, 52%, 100% { transform: scaleY(0); } 48% { transform: scaleY(1); } }
@keyframes p-look { 0%, 20%, 100% { transform: translateX(0); } 35%, 55% { transform: translateX(-3px); } 70%, 85% { transform: translateX(3px); } }
@keyframes p-dot { 0%, 60%, 100% { transform: translateY(0); opacity: .55; } 30% { transform: translateY(-3px); opacity: 1; } }
@keyframes p-spin { to { transform: rotate(360deg); } }
@keyframes p-wiggle { 0%, 60%, 100% { transform: rotate(0); } 70% { transform: rotate(-10deg); } 80% { transform: rotate(8deg); } 90% { transform: rotate(-4deg); } }
@keyframes p-shackle { 0%, 55%, 100% { transform: translateY(0); } 70%, 82% { transform: translateY(-4px); } }
@keyframes p-draw { 0% { stroke-dashoffset: 30; } 35%, 85% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: -30; } }
@keyframes p-knob { 0%, 15% { transform: translateX(0); } 40%, 75% { transform: translateX(20px); } 100% { transform: translateX(0); } }
@keyframes p-track { 0%, 15% { opacity: 0; } 40%, 75% { opacity: 1; } 100% { opacity: 0; } }
@keyframes p-lid { 0%, 55%, 100% { transform: translateY(0) rotate(0); } 70% { transform: translateY(-5px) rotate(-6deg); } 82% { transform: translateY(-3px) rotate(4deg); } }
@keyframes p-type { 0% { stroke-dashoffset: 40; } 45%, 85% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: 0; opacity: 0; } }
@keyframes p-write { 0%, 100% { transform: rotate(0) translateX(0); } 50% { transform: rotate(-6deg) translateX(-2px); } }
@keyframes p-shout { 0%, 100% { transform: rotate(0) scale(1); } 20% { transform: rotate(-6deg) scale(1.04); } 40% { transform: rotate(3deg); } }
@keyframes p-wave { 0%, 100% { opacity: .2; transform: translateX(-2px); } 50% { opacity: 1; transform: translateX(1px); } }
@keyframes p-ripple { 0% { transform: scale(.3); opacity: .9; } 80%, 100% { transform: scale(1.5); opacity: 0; } }
@keyframes p-press { 0%, 100% { transform: translate(0, 0); } 25% { transform: translate(-2px, -2px) scale(.94); } 45% { transform: translate(0, 0); } }
@keyframes p-hit { 0% { transform: translate(8px, -8px); opacity: 0; } 25% { transform: translate(0, 0); opacity: 1; } 32% { transform: translate(-1px, 1px); } 38%, 85% { transform: translate(0, 0); opacity: 1; } 100% { opacity: 0; } }
@keyframes p-flame { from { transform: scaleY(.8); } to { transform: scaleY(1.15); } }
@keyframes p-glow { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(1.12) drop-shadow(0 0 3px #ffb020); } }
@keyframes p-send { 0%, 20% { transform: translate(0, 0); opacity: 1; } 60% { transform: translate(6px, -4px); opacity: 0; } 61% { transform: translate(-4px, 3px); opacity: 0; } 100% { transform: translate(0, 0); opacity: 1; } }
@keyframes p-sand-top { 0% { transform: scaleY(1); } 90%, 100% { transform: scaleY(.1); } }
@keyframes p-sand-bot { 0% { transform: scaleY(.15); } 90%, 100% { transform: scaleY(1); } }
@media (prefers-reduced-motion: reduce) {
  .cicon, .cicon *, .reveal { animation: none !important; transition: none !important; opacity: 1 !important; }
  .cicon, .reveal { transform: none !important; }
  #wl-loader.busy { animation: none; transform: scaleX(.9); }
}

/* Where the icons sit */
.card > h2:first-child:has(.cicon)::before { display: none; }
h2 > .cicon, h3 > .cicon { width: 40px; height: 40px; border-radius: 13px; padding: 6px; vertical-align: middle; margin-right: 10px; }
.card > h2:first-child > .cicon { margin-right: 2px; }
/* Guide and legal pages: icon beside each section heading. */
main h2:has(> .cicon) { display: flex; align-items: center; gap: 12px; }
main h2 > .cicon { margin-right: 0; width: 44px; height: 44px; }
@media (max-width: 560px) { main h2 > .cicon { width: 36px; height: 36px; border-radius: 11px; padding: 5px; } }
.stat:has(> .cicon) { padding-right: 62px; min-height: 76px; }
.stat > .cicon { position: absolute; right: 12px; top: 50%; margin-top: -20px; width: 42px; height: 42px; border-radius: 13px; padding: 6px; }
