/* WysMy - brand palette + light/dark themes. Loaded by every page, before the page stylesheet.
   Brand:  Deep Slate #213547 (text, nav, dark containers) · Electric Teal #22BBB1 (CTAs, active states)
           Soft Mint #E6F7F5 (hover / subtle highlights) · Ice #F8FAFC (background) · White · Cool Grey #94A3B8 (borders, disabled)
           Midnight Navy #0F172A (dark-mode background)
   The "pop" colours are only for data and decoration (answer buttons, word clouds, confetti): quiz answers need
   several colours that are easy to tell apart. */
:root {
  color-scheme: light;
  --slate:#213547; --teal:#22BBB1; --mint:#E6F7F5; --ice:#F8FAFC; --grey:#94A3B8; --navy:#0F172A;

  --brand:#22BBB1; --brand-d:#14867f; --on-brand:#213547;
  --bg:#F8FAFC; --card:#FFFFFF; --ink:#213547; --dim:#5f7287; --line:#d8e1ea; --soft:#E6F7F5;
  --input:#FFFFFF; --nav-bg:#213547; --nav-ink:#F8FAFC; --nav-dim:#b4c2d1;
  --hl:#14867f;               /* teal for text on the page background */
  --good:#13a07a; --bad:#e5484d;
  --shadow:rgba(33,53,71,.14);

  --pop1:#FF6B6B; --pop2:#FFC53D; --pop3:#8B5CF6; --pop4:#38BDF8; --pop5:#34D399;
  --tint1:rgba(255,107,107,.16); --tint2:rgba(255,197,61,.22); --tint3:rgba(139,92,246,.14); --tint4:rgba(34,187,177,.16);

  --font-head:'Fredoka','Baloo 2','Segoe UI Rounded','Trebuchet MS',system-ui,sans-serif;
  --font:'Nunito','Segoe UI',system-ui,-apple-system,sans-serif;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg:#0F172A; --card:#1a2a3d; --ink:#F8FAFC; --dim:#94A3B8; --line:rgba(148,163,184,.28); --soft:rgba(34,187,177,.15);
  --input:#142236; --nav-bg:#213547; --nav-ink:#F8FAFC; --nav-dim:#a6b6c8;
  --hl:#3fd6cb;
  --good:#34d399; --bad:#ff7a7f;
  --shadow:rgba(0,0,0,.45);
  --tint1:rgba(255,107,107,.22); --tint2:rgba(255,197,61,.2); --tint3:rgba(139,92,246,.24); --tint4:rgba(34,187,177,.24);
}

/* ---- logo ---- */
:root { --logo-a:#213547; }
:root[data-theme="dark"] { --logo-a:#F8FAFC; }
.topbar { --logo-a:#F8FAFC; }                       /* the nav bar is Deep Slate in both themes */
.mark { display:block; flex:none; overflow:visible; }
.mark .a { stroke:var(--logo-a); }
.mark .af { fill:var(--logo-a); stroke:var(--logo-a); }
.mark .t { stroke:var(--teal); }
.wordmark { display:inline-block; vertical-align:middle; height:1.4em; width:auto; aspect-ratio:487.1/176; overflow:visible; color:var(--logo-a); }
.wordmark .a { stroke:currentColor; }
.wordmark .t { stroke:var(--teal); }
.brand { gap:9px; }

/* ---- "+10 s" effect (shared by projector, phones and console) ---- */
.plusfx { position:absolute; left:50%; top:0; z-index:5; transform:translateX(-50%); font-family:var(--font-head); font-weight:700; font-size:max(18px, 1.15em); color:var(--teal); text-shadow:0 2px 0 rgba(0,0,0,.25); pointer-events:none; white-space:nowrap; animation:plusUp 1.7s cubic-bezier(.2,.8,.3,1) forwards; }
@keyframes plusUp { 0% { opacity:0; transform:translate(-50%,40%) scale(.5); } 18% { opacity:1; transform:translate(-50%,-30%) scale(1.35); } 100% { opacity:0; transform:translate(-50%,-190%) scale(1); } }
.bump { animation:bump .9s cubic-bezier(.3,1.7,.5,1); }
@keyframes bump { 0% { transform:scale(1); box-shadow:0 0 0 0 rgba(34,187,177,.7); } 25% { transform:scale(1.22); box-shadow:0 0 0 .9vh rgba(34,187,177,.45); } 100% { transform:scale(1); box-shadow:0 0 0 2.4vh rgba(34,187,177,0); } }

/* ---- animated background: survey charts, clouds and speech bubbles (markup: wm_bgfx()) ---- */
.bgfx { position:fixed; inset:0; z-index:-1; overflow:hidden; pointer-events:none; }
.bgs { position:absolute; display:block; aspect-ratio:1; opacity:.22; animation:bgDrift var(--dur,20s) ease-in-out var(--dl,0s) infinite; transform:rotate(var(--rot,0deg)); }
:root[data-theme="dark"] .bgs { opacity:.1; }
.bgs svg { width:100%; height:100%; overflow:visible; display:block; }
.bgs.a1 { animation-name:bgDrift2; } .bgs.a2 { animation-name:bgDrift3; }
.bgs .c1 { fill:var(--brand); } .bgs .c2 { fill:var(--pop2); } .bgs .c3 { fill:var(--pop3); } .bgs .c4 { fill:var(--pop4); } .bgs .c5 { fill:var(--pop5); }
.bgs .st.c1 { stroke:var(--brand); fill:none; } .bgs .st.c2 { stroke:var(--pop2); fill:none; } .bgs .st.c3 { stroke:var(--pop3); fill:none; } .bgs .st.c4 { stroke:var(--pop4); fill:none; } .bgs .st.c5 { stroke:var(--pop5); fill:none; }
.bgs .grow { transform-box:fill-box; transform-origin:bottom; animation:bgGrow 4.5s ease-in-out var(--d,0s) infinite; }
.bgs .growx { transform-box:fill-box; transform-origin:left; animation:bgGrowX 5s ease-in-out var(--d,0s) infinite; }
.bgs .dot { animation:bgDot 1.6s ease-in-out var(--d,0s) infinite; }
.bgs .twk { animation:bgTwk 3s ease-in-out var(--d,0s) infinite; transform-box:fill-box; transform-origin:center; }
@keyframes bgDrift { 0%,100% { translate:0 0; scale:1; } 50% { translate:1.6vmin -3vmin; scale:1.07; } }
@keyframes bgDrift2 { 0%,100% { translate:0 0; rotate:0deg; } 50% { translate:-2.4vmin 2vmin; rotate:7deg; } }
@keyframes bgDrift3 { 0%,100% { translate:0 0; scale:1; } 33% { translate:2vmin 1.4vmin; scale:.94; } 66% { translate:-1vmin -2.2vmin; scale:1.05; } }
@keyframes bgGrow { 0%,100% { transform:scaleY(.55); } 50% { transform:scaleY(1); } }
@keyframes bgGrowX { 0%,100% { transform:scaleX(.5); } 50% { transform:scaleX(1); } }
@keyframes bgDot { 0%,100% { opacity:.35; } 50% { opacity:1; } }
@keyframes bgTwk { 0%,100% { transform:scale(.8); } 50% { transform:scale(1.15); } }
@media (prefers-reduced-motion:reduce) { .bgs, .bgs * { animation:none !important; } }
/* themed floating backgrounds (wm_bgfx_all): every layer is in the page, <body data-bgt="..."> shows the chosen one; each theme has its own colours */
.bgfx[data-t]:not([data-t="floating"]) { display:none; }
body[data-bgt="quiz"] .bgfx[data-t="quiz"], body[data-bgt="party"] .bgfx[data-t="party"], body[data-bgt="sport"] .bgfx[data-t="sport"],
body[data-bgt="space"] .bgfx[data-t="space"], body[data-bgt="nature"] .bgfx[data-t="nature"] { display:block; }
body[data-bgt="quiz"] .bgfx[data-t="floating"], body[data-bgt="party"] .bgfx[data-t="floating"], body[data-bgt="sport"] .bgfx[data-t="floating"],
body[data-bgt="space"] .bgfx[data-t="floating"], body[data-bgt="nature"] .bgfx[data-t="floating"] { display:none; }
.bgfx[data-t="quiz"] { --brand:#14968d; --pop2:#f5a524; --pop3:#7c3aed; --pop4:#e5484d; --pop5:#2f6feb; }
.bgfx[data-t="party"] { --brand:#e5368f; --pop2:#ffc53d; --pop3:#8b5cf6; --pop4:#22bbb1; --pop5:#ff7a45; }
.bgfx[data-t="sport"] { --brand:#16a34a; --pop2:#f59e0b; --pop3:#2563eb; --pop4:#0f766e; --pop5:#dc2626; }
.bgfx[data-t="space"] { --brand:#6d28d9; --pop2:#facc15; --pop3:#2563eb; --pop4:#0ea5e9; --pop5:#f472b6; }
.bgfx[data-t="nature"] { --brand:#16a34a; --pop2:#eab308; --pop3:#0ea5e9; --pop4:#f472b6; --pop5:#92400e; }

/* ---- tables on slides (coloured from the presentation's theme: --tbl is its first answer colour) ---- */
.wm-table { border-collapse:separate; border-spacing:0; width:100%; table-layout:fixed; font-size:inherit; line-height:1.25; color:var(--ink); border-radius:.55em; overflow:hidden; border:.08em solid color-mix(in srgb, var(--tbl) 45%, transparent); }
.wm-table th, .wm-table td { padding:.45em .7em; border-bottom:.06em solid color-mix(in srgb, var(--tbl) 25%, transparent); word-break:break-word; text-align:inherit; vertical-align:middle; }
.wm-table th { background:var(--tbl); color:#fff; font-weight:800; }
.wm-table tr:last-child > * { border-bottom:0; }
.wm-table tr:nth-child(even) td { background:color-mix(in srgb, var(--tbl) 10%, transparent); }

/* ---- slide transitions (big screen): the incoming slide gets one of these classes for a moment ---- */
@keyframes trFade { from { opacity:0; } to { opacity:1; } }
@keyframes trSlide { from { opacity:0; transform:translateX(9%); } to { opacity:1; transform:none; } }
@keyframes trRise { from { opacity:0; transform:translateY(9%); } to { opacity:1; transform:none; } }
@keyframes trZoom { from { opacity:0; transform:scale(.86); } to { opacity:1; transform:none; } }
@keyframes trFlip { from { opacity:0; transform:perspective(1200px) rotateY(-70deg); } to { opacity:1; transform:none; } }
@keyframes trPop { 0% { opacity:0; transform:scale(.55); } 65% { opacity:1; transform:scale(1.06); } 100% { transform:none; } }
.tr-fade { animation:trFade .6s ease both; } .tr-slide { animation:trSlide .55s cubic-bezier(.2,.8,.3,1) both; } .tr-rise { animation:trRise .55s cubic-bezier(.2,.8,.3,1) both; }
.tr-zoom { animation:trZoom .55s cubic-bezier(.2,.8,.3,1) both; } .tr-flip { animation:trFlip .7s ease both; } .tr-pop { animation:trPop .6s ease both; }
@media (prefers-reduced-motion: reduce) { [class*="tr-"] { animation:none !important; } }

/* ---- the break picture: a coffee cup with rising steam (projector, phones and the console's Break tab) ---- */
.cup { display:inline-block; line-height:0; }
.cup svg { width:100%; height:auto; overflow:visible; }
.steam path { opacity:.2; animation:steamup 2.4s ease-in-out infinite; }
.steam path:nth-child(2) { animation-delay:.5s; } .steam path:nth-child(3) { animation-delay:1s; }
@keyframes steamup { 0%,100% { opacity:.15; transform:translateY(3px); } 50% { opacity:.85; transform:translateY(-3px); } }
.big .cup { width:112px; }
.sslide .bigicon .cup { width:min(38vh, 42vw); }
@media (prefers-reduced-motion: reduce) { .steam path { animation:none; opacity:.5; } }/* the beer's rising bubbles (also in wm.css for the editor, like .steam) */
.bub { animation:bubup 2.4s ease-in infinite; } .bub.b2 { animation-delay:.8s; } .bub.b3 { animation-delay:1.6s; }
@keyframes bubup { 0% { transform:translateY(6px); opacity:0; } 25% { opacity:.8; } 100% { transform:translateY(-16px); opacity:0; } }
@media (prefers-reduced-motion: reduce) { .bub { animation:none; } }
/* wmConfetti (wm.js): pieces fall from above the top edge, drifting and spinning */
.wmconf { position:fixed; inset:0; z-index:300; pointer-events:none; overflow:hidden; }
.wmconf i { position:absolute; top:-4vh; display:block; animation:wmconf 2.4s cubic-bezier(.25,.6,.4,1) both; }
@keyframes wmconf { 0% { transform:translate(0,0) rotate(0); opacity:1; } 85% { opacity:1; } 100% { transform:translate(var(--dx), 108vh) rotate(var(--rot)); opacity:0; } }
/* a team's mark (teamIco in avatars.js): its icon on a soft circle of the team colour, or a plain colour dot */
.tico { display:inline-grid; place-items:center; flex:none; width:.7em; height:.7em; border-radius:50%; background:var(--tc); font-style:normal; line-height:1; vertical-align:middle; }
.tico.has { width:1.45em; height:1.45em; font-size:.9em; background:color-mix(in srgb, var(--tc) 22%, transparent); box-shadow:inset 0 0 0 2px color-mix(in srgb, var(--tc) 70%, transparent); }
/* the picture picker (avatarPicker in avatars.js): category tabs over a grid. The grid / buttons are styled in stage.css (phones);
   the console and editor get the same look from these fallbacks. */
.avpick { display:flex; flex-direction:column; gap:8px; min-width:0; }
.avtabs { display:flex; gap:6px; overflow-x:auto; padding:2px 2px 4px; scrollbar-width:thin; -webkit-overflow-scrolling:touch; }
.avtab { flex:none; border:2px solid var(--line, #d8e1ea); background:var(--card, #fff); color:inherit; border-radius:999px; padding:5px 11px; font:600 13px/1.2 inherit; cursor:pointer; white-space:nowrap; }
.avtab.on { border-color:var(--brand); background:color-mix(in srgb, var(--brand) 14%, var(--card, #fff)); font-weight:800; }
.avpick .avgrid { display:grid; grid-template-columns:repeat(auto-fill, minmax(42px, 1fr)); gap:6px; max-height:240px; overflow:auto; padding:6px; border:2px solid var(--line, #d8e1ea); border-radius:14px; }
.avpick .avb { aspect-ratio:1; border:2px solid transparent; border-radius:10px; background:transparent; font-size:24px; line-height:1; cursor:pointer; padding:0; }
.avpick .avb.on { border-color:var(--brand); background:color-mix(in srgb, var(--brand) 12%, transparent); }

/* the brand drawings that replace the team / person emoji (wm_ico() in inc/layout.php, wmIco() in wm.js): sit on the text line like an emoji */
.wmico { display:inline-block; width:1.15em; height:1.15em; vertical-align:-.2em; flex:none; }
/* the small Privacy policy · Terms · POPIA links (wm_legal_links / play.js legalLinks) */
.legalfoot { text-align:center; font-size:12px; margin:14px 0 0; opacity:.85; }
.legalfoot a, .legalnote a { color:inherit; text-decoration:underline; text-underline-offset:2px; }
.legalnote { font-size:12.5px; line-height:1.45; margin:12px 0 0; text-align:center; }
