/* Spherography certificates (UI-10, sg_cert.js): the certificate map of an app (.sgc, inside .sg-root, over the grid,
   under the toasts and the modal) and the diploma (.sgc-dip, on the body: it shows over an open app too).
   Tokens as the map: text #e8e8e8, muted #9fb3c8, headings #cfefff, accent amber #f0a030, gold #ffd46b; --c = the
   certificate's colour. */

.sg-root .sgc { position: absolute; inset: 0; z-index: 33; overflow: hidden; opacity: 0; transition: opacity .35s ease;
  background: radial-gradient(ellipse at 50% 55%, rgba(14,22,40,.96), rgba(2,5,11,.985) 70%); }
.sg-root .sgc.in { opacity: 1; }
.sgc-sky { position: absolute; inset: -20%; pointer-events: none; opacity: .75;
  background-image: radial-gradient(1.4px 1.4px at 12% 18%, #fff 50%, transparent 52%), radial-gradient(1px 1px at 72% 12%, #cfefff 50%, transparent 52%),
    radial-gradient(1.2px 1.2px at 38% 72%, #fff 50%, transparent 52%), radial-gradient(1px 1px at 86% 64%, #ffe7a8 50%, transparent 52%),
    radial-gradient(1.3px 1.3px at 22% 88%, #cfefff 50%, transparent 52%), radial-gradient(1px 1px at 58% 38%, #fff 50%, transparent 52%),
    radial-gradient(1.1px 1.1px at 92% 28%, #fff 50%, transparent 52%), radial-gradient(1px 1px at 6% 52%, #ffe7a8 50%, transparent 52%);
  background-size: 420px 380px; animation: sgc-drift 90s linear infinite; }
@keyframes sgc-drift { to { transform: translate(-420px, -380px); } }
.sgc-glow { position: absolute; left: 50%; top: 52%; width: 860px; height: 860px; margin: -430px; pointer-events: none; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--c) 30%, transparent), transparent 62%); filter: blur(10px);
  animation: sgc-breathe 6s ease-in-out infinite; }
.sgc.sgc-cert .sgc-glow { background: radial-gradient(circle, rgba(255,212,107,.34), transparent 62%); }
@keyframes sgc-breathe { 50% { transform: scale(1.08); opacity: .8; } }
.sgc-links { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.sgc-links .sgc-spoke { stroke: rgba(255,255,255,.06); stroke-width: 1; stroke-dasharray: 2 6; }
.sgc-links .sgc-spoke.on { stroke: color-mix(in srgb, var(--c) 45%, transparent); }
.sgc-links .sgc-path { fill: none; stroke: rgba(255,255,255,.10); stroke-width: 3; stroke-linecap: round; }
.sgc-links .sgc-path.next { stroke: color-mix(in srgb, var(--c) 80%, #fff); stroke-width: 3.5; stroke-dasharray: 9 9; animation: sgc-flow 1s linear infinite;
  filter: drop-shadow(0 0 6px var(--c)); }
.sgc-links .sgc-path.on { stroke: url(#sgc_g); stroke-width: 5; filter: drop-shadow(0 0 8px var(--c)); }
@keyframes sgc-flow { to { stroke-dashoffset: -18; } }

/* the bar */
.sgc-bar { position: absolute; left: 12px; right: 12px; top: 12px; z-index: 3; display: flex; align-items: center; gap: 16px; }
.sgc-ttl { flex: 1 1 auto; min-width: 0; text-align: center; }
.sgc-k { color: var(--sg-gold); font-size: .72rem; font-weight: 750; letter-spacing: .18em; text-transform: uppercase; }
.sgc-t { color: #fff; font-family: Oxanium, "Segoe UI", sans-serif; font-size: 1.45rem; font-weight: 800; line-height: 1.15;
  text-shadow: 0 0 18px color-mix(in srgb, var(--c) 70%, transparent); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sgc-prog { flex: 0 0 auto; width: 190px; display: flex; flex-direction: column; gap: 5px; align-items: flex-end; }
.sgc-pbar { width: 100%; height: 7px; border-radius: 4px; background: rgba(255,255,255,.08); overflow: hidden; }
.sgc-pbar i { display: block; height: 100%; width: 0; border-radius: 4px; background: linear-gradient(90deg, var(--c), #ffd46b);
  box-shadow: 0 0 10px var(--c); transition: width .9s cubic-bezier(.2,.8,.2,1); }
.sgc-pn { color: var(--sg-muted); font-size: .74rem; }

/* the stage: the app in the centre, the objectives around */
.sgc-stage { position: absolute; inset: 0; z-index: 2; }
.sgc-core, .sgc-o { position: absolute; transform: translate(-50%, -50%); border: 0; background: none; padding: 0; color: inherit; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; font: inherit; }
.sgc-core { z-index: 2; transition: left .55s cubic-bezier(.2,.8,.2,1), top .55s cubic-bezier(.2,.8,.2,1); }
.sgc-crys { width: 96px; height: 96px; border-radius: 26px; transform: rotate(45deg); display: flex; align-items: center; justify-content: center;
  background: rgba(12,16,26,.94); border: 2px solid rgba(255,212,107,.8); box-shadow: 0 0 30px rgba(255,212,107,.35), inset 0 0 24px rgba(255,212,107,.12);
  transition: transform .3s ease, box-shadow .3s ease; }
.sgc-crys i { transform: rotate(-45deg); font-size: 2.3rem; color: #ffd46b; }
.sgc-core:hover .sgc-crys { transform: rotate(45deg) scale(1.06); box-shadow: 0 0 44px rgba(255,212,107,.6); }
.sgc-core.on .sgc-crys { background: linear-gradient(135deg, #fff6d8, #ffd46b 45%, #b8741a); border-color: #fff3c4;
  box-shadow: 0 0 50px rgba(255,212,107,.8), 0 0 120px rgba(255,212,107,.35); animation: sgc-gold 2.6s ease-in-out infinite; }
.sgc-core.on .sgc-crys i { color: #3a2604; }
@keyframes sgc-gold { 50% { box-shadow: 0 0 70px rgba(255,212,107,1), 0 0 160px rgba(255,212,107,.45); } }
.sgc-core-l { margin-top: 26px; color: #ffe7a8; font-weight: 800; font-size: .95rem; white-space: nowrap; text-shadow: 0 0 10px rgba(0,0,0,.9); }
.sgc-core-p { margin-top: 3px; color: var(--sg-muted); font-size: .76rem; white-space: nowrap; }
.sgc-core.on .sgc-core-p { color: var(--sg-gold); font-weight: 700; }

.sgc-o { z-index: 3; width: 150px; opacity: 0; transition: left .75s cubic-bezier(.2,.9,.25,1.15), top .75s cubic-bezier(.2,.9,.25,1.15), opacity .5s ease; }
.sgc.born .sgc-o { opacity: 1; }
.sgc-orb { position: relative; width: 66px; height: 66px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 34% 30%, rgba(255,255,255,.18), rgba(20,26,40,.95) 60%); border: 2px solid rgba(255,255,255,.14);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
.sgc-orb i { font-size: 1.45rem; color: rgba(255,255,255,.35); transition: color .25s ease; }
.sgc-o:hover .sgc-orb { transform: scale(1.1); }
.sgc-n { position: absolute; top: -4px; left: calc(50% + 20px); min-width: 24px; height: 24px; padding: 0 6px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center; font-size: .72rem; font-weight: 800; color: #9fb3c8;
  background: #0b1220; border: 1px solid rgba(255,255,255,.18); }
.sgc-l { margin-top: 9px; max-width: 150px; text-align: center; line-height: 1.25; font-size: .8rem; font-weight: 650; color: rgba(232,232,232,.55);
  text-shadow: 0 0 8px rgba(0,0,0,.95), 0 0 2px #000; }
/* ready: the next one to do, breathing in the certificate's colour */
.sgc-o.st-ready .sgc-orb { border-color: var(--c); background: radial-gradient(circle at 34% 30%, color-mix(in srgb, var(--c) 55%, #fff), color-mix(in srgb, var(--c) 30%, #0b1220) 62%);
  box-shadow: 0 0 22px var(--c), 0 0 60px color-mix(in srgb, var(--c) 45%, transparent); animation: sgc-ready 1.8s ease-in-out infinite; }
.sgc-o.st-ready .sgc-orb i { color: #fff; }
.sgc-o.st-ready .sgc-l { color: #fff; }
.sgc-o.st-ready .sgc-n { color: #0b1220; background: var(--c); border-color: #fff; }
@keyframes sgc-ready { 50% { box-shadow: 0 0 34px var(--c), 0 0 90px color-mix(in srgb, var(--c) 60%, transparent); transform: scale(1.06); } }
/* done: lit, gold rim */
.sgc-o.st-done .sgc-orb { border-color: #ffd46b; background: radial-gradient(circle at 34% 30%, #fff, color-mix(in srgb, var(--c) 85%, #fff) 30%, color-mix(in srgb, var(--c) 70%, #000) 78%);
  box-shadow: 0 0 26px color-mix(in srgb, var(--c) 90%, transparent), 0 0 4px #ffd46b inset; }
.sgc-o.st-done .sgc-orb i { color: #fff; text-shadow: 0 0 8px rgba(0,0,0,.4); }
.sgc-o.st-done .sgc-l { color: #ffe7a8; }
.sgc-o.st-done .sgc-n { color: #3a2604; background: linear-gradient(180deg, #fff3c4, #ffd46b); border-color: #ffd46b; }
.sgc-o.st-locked { cursor: pointer; }
.sgc-o.st-locked .sgc-orb { opacity: .65; }
.sgc-o.sel .sgc-orb { outline: 2px solid rgba(255,255,255,.9); outline-offset: 5px; }
.sgc-o.pop .sgc-orb { animation: sgc-pop 1.1s ease; }
@keyframes sgc-pop { 30% { transform: scale(1.55); box-shadow: 0 0 60px #ffd46b, 0 0 140px var(--c); } }

/* the side panel of an objective */
.sgc-side { position: absolute; z-index: 4; top: 70px; right: 12px; bottom: 12px; width: min(400px, 42%); padding: 18px 18px 16px; overflow-y: auto;
  border-radius: 16px; background: rgba(6,10,18,.86); border: 1px solid color-mix(in srgb, var(--c) 45%, transparent);
  box-shadow: 0 0 40px color-mix(in srgb, var(--c) 18%, transparent), 0 10px 40px rgba(0,0,0,.5); backdrop-filter: blur(8px);
  transform: translateX(30px); opacity: 0; pointer-events: none; transition: transform .35s ease, opacity .35s ease; }
.sgc-side.on { transform: none; opacity: 1; pointer-events: auto; }
.sgc-s-h { display: flex; align-items: center; gap: 8px; }
.sgc-s-h .sg-x { margin-left: auto; }
.sgc-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: .7rem; font-weight: 700;
  color: var(--c); border: 1px solid color-mix(in srgb, var(--c) 60%, transparent); background: color-mix(in srgb, var(--c) 10%, transparent); }
.sgc-chip.on { color: #ffd46b; border-color: rgba(255,212,107,.6); background: rgba(255,212,107,.08); }
.sgc-s-ic { width: 74px; height: 74px; margin: 16px auto 10px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  border: 2px solid rgba(255,255,255,.18); background: rgba(255,255,255,.04); }
.sgc-s-ic i { font-size: 1.8rem; color: rgba(255,255,255,.4); }
.sgc-s-ic.rd { border-color: var(--c); box-shadow: 0 0 26px var(--c); background: color-mix(in srgb, var(--c) 25%, transparent); }
.sgc-s-ic.rd i, .sgc-s-ic.on i { color: #fff; }
.sgc-s-ic.on { border-color: #ffd46b; background: color-mix(in srgb, var(--c) 70%, #000); box-shadow: 0 0 26px color-mix(in srgb, var(--c) 90%, transparent); }
.sgc-s-t { text-align: center; color: #fff; font-family: Oxanium, "Segoe UI", sans-serif; font-size: 1.2rem; font-weight: 800; }
.sgc-s-s { text-align: center; color: #dfe7ee; font-size: .88rem; line-height: 1.5; margin: 6px 0 4px; }
.sgc-s-k { margin-top: 14px; color: var(--sg-gold); font-size: .68rem; font-weight: 750; letter-spacing: .14em; text-transform: uppercase; }
.sgc-s-l { color: #c9d6e2; font-size: .84rem; line-height: 1.5; margin-top: 4px; }
.sgc-s-l b, .sgc-s-s b { color: #fff; }
.sgc-s-lock { margin-top: 16px; padding: 10px 12px; border-radius: 10px; color: #9fb3c8; background: rgba(255,255,255,.04); border: 1px dashed rgba(255,255,255,.14); }
.sgc-s-lock b { color: #fff; }
.sg-root .sgc .sg-btn.sgc-go { min-height: 46px; font-size: .92rem; }

/* the phone, and a narrow window */
.sgc-narrow .sgc-o { width: 104px; }
.sgc-narrow .sgc-orb { width: 52px; height: 52px; }
.sgc-narrow .sgc-orb i { font-size: 1.15rem; }
.sgc-narrow .sgc-l { font-size: .7rem; max-width: 104px; }
.sgc-narrow .sgc-crys { width: 72px; height: 72px; border-radius: 20px; }
.sgc-narrow .sgc-crys i { font-size: 1.7rem; }
.sgc-narrow .sgc-core-l { margin-top: 18px; font-size: .82rem; }
.sgc-narrow .sgc-side { left: 10px; right: 10px; width: auto; top: auto; max-height: 52%; transform: translateY(30px); }
.sgc-narrow .sgc-side.on { transform: none; }
.sgc-narrow .sgc-s-ic { width: 54px; height: 54px; margin: 8px auto 6px; }
.sgc-narrow .sgc-t { font-size: 1.15rem; }
.sgc-narrow .sgc-prog { width: 120px; }
.sgc-phone .sgc-t { font-size: 1.05rem; }
.sgc-phone .sgc-prog { width: 110px; }
.sgc-phone .sgc-back { padding: 6px 9px; }
.sgc-phone .sgc-o { width: 96px; }
.sgc-phone .sgc-orb { width: 50px; height: 50px; }
.sgc-phone .sgc-orb i { font-size: 1.1rem; }
.sgc-phone .sgc-l { font-size: .68rem; max-width: 96px; }
.sgc-phone .sgc-crys { width: 70px; height: 70px; border-radius: 20px; }
.sgc-phone .sgc-crys i { font-size: 1.7rem; }
.sgc-phone .sgc-side { left: 8px; right: 8px; width: auto; top: auto; max-height: 58%; }

/* ------------------------------------------------------------------ the diploma (on the body) */
.sgc-dip { position: fixed; inset: 0; z-index: 2147482000; display: flex; align-items: center; justify-content: center; padding: 16px;
  background: rgba(2,5,11,.78); backdrop-filter: blur(5px); opacity: 0; transition: opacity .35s ease;
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif; color: #e8e8e8; }
.sgc-dip.in { opacity: 1; }
.sgc-dip *, .sgc-dip *::before, .sgc-dip *::after { box-sizing: border-box; }
.sgc-dip-rays { position: absolute; left: 50%; top: 50%; width: 1100px; height: 1100px; margin: -550px; pointer-events: none; opacity: .55;
  background: repeating-conic-gradient(rgba(255,212,107,.16) 0 7deg, transparent 7deg 20deg); animation: sgc-spin 26s linear infinite;
  -webkit-mask: radial-gradient(circle, #000 0, transparent 62%); mask: radial-gradient(circle, #000 0, transparent 62%); }
@keyframes sgc-spin { to { transform: rotate(360deg); } }
.sgc-dip-card { position: relative; width: min(620px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; padding: 30px 34px 24px; text-align: center;
  border-radius: 18px; background: linear-gradient(180deg, rgba(20,24,34,.98), rgba(8,11,18,.98));
  border: 2px solid rgba(255,212,107,.7); outline: 1px solid rgba(255,212,107,.25); outline-offset: -10px;
  box-shadow: 0 0 80px rgba(255,212,107,.3), 0 20px 60px rgba(0,0,0,.6); transform: translateY(18px) scale(.96); transition: transform .5s cubic-bezier(.2,.9,.25,1.2); }
.sgc-dip.in .sgc-dip-card { transform: none; }
.sgc-dip .sgc-dx { position: absolute; top: 12px; right: 12px; width: 32px; height: 32px; border-radius: 9px; border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.05); color: #cfd8e2; cursor: pointer; }
.sgc-dip .sgc-dx:hover { background: rgba(255,255,255,.12); }
.sgc-dip-top { color: var(--sgc-gold, #ffd46b); font-size: .72rem; font-weight: 800; letter-spacing: .24em; text-transform: uppercase; }
.sgc-dip-seal { width: 98px; height: 98px; margin: 16px auto 14px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 35% 30%, #fff6d8, #ffd46b 40%, #b8741a 80%); border: 3px solid #fff3c4;
  box-shadow: 0 0 40px rgba(255,212,107,.8), 0 0 0 8px rgba(255,212,107,.12), 0 0 0 16px color-mix(in srgb, var(--c) 18%, transparent); }
.sgc-dip.fresh .sgc-dip-seal { animation: sgc-seal 1.2s cubic-bezier(.2,.9,.25,1.3); }
@keyframes sgc-seal { from { transform: scale(.2) rotate(-90deg); opacity: 0; } }
.sgc-dip-seal i { font-size: 2.4rem; color: #3a2604; }
.sgc-dip-k { color: #9fb3c8; font-size: .86rem; font-style: italic; margin-top: 4px; }
.sgc-dip-who { color: #fff; font-family: Oxanium, "Segoe UI", sans-serif; font-size: 1.9rem; font-weight: 800; margin: 2px 0 6px;
  text-shadow: 0 0 20px rgba(255,212,107,.45); }
.sgc-dip-app { color: #ffd46b; font-family: Oxanium, "Segoe UI", sans-serif; font-size: 1.5rem; font-weight: 800; margin: 2px 0 12px; }
.sgc-dip-list { list-style: none; margin: 0 auto; padding: 12px 14px; max-width: 470px; text-align: left; border-radius: 12px;
  background: rgba(255,255,255,.035); border: 1px solid rgba(255,255,255,.07); }
.sgc-dip-list li { display: flex; align-items: baseline; gap: 9px; padding: 4px 0; font-size: .86rem; color: #dfe7ee; }
.sgc-dip-list li i { color: var(--c); font-size: .8rem; }
.sgc-dip-list li span { flex: 1 1 auto; }
.sgc-dip-list li em { color: #7f93a8; font-style: normal; font-size: .74rem; white-space: nowrap; }
.sgc-dip-foot { display: flex; justify-content: space-between; gap: 10px; margin-top: 16px; color: #9fb3c8; font-size: .76rem; flex-wrap: wrap; }
.sgc-dip-code { font-family: Consolas, monospace; letter-spacing: .08em; color: #cfefff; }
.sgc-dip-acts { margin-top: 18px; }
.sgc-dip .sgc-db { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 8px 22px; border-radius: 10px; cursor: pointer; font: inherit;
  font-weight: 750; color: #1d1304; background: linear-gradient(180deg, #ffd46b, #f0a030); border: 1px solid #f0a030; box-shadow: 0 4px 18px rgba(240,160,48,.35); }
.sgc-dip .sgc-db:hover { filter: brightness(1.07); }

/* ------------------------------------------------------------------ the certificate on the reward panel and in Apps & awards */
.sg-root .sgc-rw { margin-top: 14px; padding: 12px 14px; border-radius: 12px; text-align: left;
  border: 1px solid color-mix(in srgb, var(--c, #a77ef0) 55%, transparent); background: color-mix(in srgb, var(--c, #a77ef0) 9%, rgba(0,0,0,.3)); }
.sg-root .sgc-rw-h { display: flex; align-items: center; gap: 9px; color: #fff; font-weight: 800; }
.sg-root .sgc-rw-h i { color: var(--sg-gold); font-size: 1.15rem; }
.sg-root .sgc-rw-s { color: #c9d6e2; font-size: calc(.8rem * var(--sg-ts, 1)); line-height: 1.45; margin-top: 4px; }
.sg-root .sgc-rw .sg-btn { margin-top: 10px; }
.sg-root .sgc-rw.on { border-color: rgba(255,212,107,.7); background: rgba(255,212,107,.08); box-shadow: 0 0 24px rgba(255,212,107,.15); }
.sg-root .sgc-rw .sg-btn.cert { color: #fff; border-color: var(--c, #a77ef0); background: color-mix(in srgb, var(--c, #a77ef0) 35%, rgba(0,0,0,.4));
  box-shadow: 0 0 18px color-mix(in srgb, var(--c, #a77ef0) 45%, transparent); animation: sgc-cta 2.2s ease-in-out infinite; }
@keyframes sgc-cta { 50% { box-shadow: 0 0 30px color-mix(in srgb, var(--c, #a77ef0) 75%, transparent); } }
.sg-root .sg-cab-cert { display: inline-flex; align-items: center; gap: 5px; margin-top: 5px; font-size: calc(.7rem * var(--sg-ts, 1)); font-weight: 700; color: #b9a6f5; }
.sg-root .sg-cab-cert.on { color: var(--sg-gold); }
.sg-root button.sg-cab-cert { padding: 2px 8px; border-radius: 999px; cursor: pointer; font-family: inherit; background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.12); }
.sg-root button.sg-cab-cert:hover { background: rgba(255,255,255,.1); border-color: currentColor; }

/* ------------------------------------------------------------------ the certificate coach (on the body, over the open app) */
.sgc-co { position: fixed; inset: 0; z-index: 2147481000; pointer-events: none; opacity: 0; transition: opacity .3s ease;
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif; color: #e8e8e8; --c: #a77ef0; }
.sgc-co.on { opacity: 1; }
.sgc-co *, .sgc-co *::before, .sgc-co *::after { box-sizing: border-box; }
/* the spotlight: the page dims around the control, every click still reaches it */
.sgc-co-ring { position: fixed; border-radius: 12px; opacity: 0; transition: left .25s ease, top .25s ease, width .25s ease, height .25s ease, opacity .25s ease;
  border: 3px solid var(--c); box-shadow: 0 0 0 4000px rgba(2,5,11,.5), 0 0 22px var(--c), inset 0 0 14px color-mix(in srgb, var(--c) 50%, transparent);
  animation: sgc-ring 1.5s ease-in-out infinite; }
.sgc-co-ring.on { opacity: 1; }
@keyframes sgc-ring { 50% { box-shadow: 0 0 0 4000px rgba(2,5,11,.5), 0 0 40px var(--c), 0 0 80px color-mix(in srgb, var(--c) 50%, transparent), inset 0 0 18px color-mix(in srgb, var(--c) 60%, transparent); } }
.sgc-co-hand { position: fixed; font-size: 30px; color: #fff; opacity: 0; transition: left .25s ease, top .25s ease, opacity .25s ease;
  filter: drop-shadow(0 0 8px var(--c)) drop-shadow(0 2px 4px #000); transform: rotate(-20deg); }
.sgc-co-hand.on { opacity: 1; animation: sgc-tap 1.1s ease-in-out infinite; }
@keyframes sgc-tap { 50% { transform: rotate(-20deg) translate(-9px, -11px) scale(.92); } }
/* the card */
.sgc-co-card { position: fixed; width: 360px; max-width: calc(100vw - 28px); pointer-events: auto; padding: 14px 16px 12px; border-radius: 16px;
  background: linear-gradient(180deg, rgba(16,20,34,.97), rgba(6,9,16,.97)); border: 1.5px solid var(--c);
  box-shadow: 0 0 34px color-mix(in srgb, var(--c) 40%, transparent), 0 14px 40px rgba(0,0,0,.6); transition: left .3s cubic-bezier(.2,.8,.2,1), top .3s cubic-bezier(.2,.8,.2,1); }
.sgc-co-card.in { animation: sgc-cardin .35s ease; }
@keyframes sgc-cardin { from { opacity: .4; transform: translateY(6px) scale(.98); } }
.sgc-co.done .sgc-co-card { border-color: #ffd46b; box-shadow: 0 0 50px rgba(255,212,107,.45), 0 14px 40px rgba(0,0,0,.6); }
.sgc-co-h { display: flex; align-items: center; gap: 11px; }
.sgc-co-orb { flex: 0 0 auto; width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 34% 30%, color-mix(in srgb, var(--c) 55%, #fff), color-mix(in srgb, var(--c) 30%, #0b1220) 62%);
  border: 2px solid var(--c); box-shadow: 0 0 16px var(--c); }
.sgc-co-orb i { color: #fff; font-size: 1.05rem; }
.sgc-co-hd { flex: 1 1 auto; min-width: 0; }
.sgc-co-k { color: #ffd46b; font-size: .66rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sgc-co-t { color: #fff; font-family: Oxanium, "Segoe UI", sans-serif; font-size: 1.05rem; font-weight: 800; line-height: 1.2; }
.sgc-co-x { flex: 0 0 auto; align-self: flex-start; width: 28px; height: 28px; border-radius: 8px; border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.05); color: #cfd8e2; cursor: pointer; }
.sgc-co-x:hover { background: rgba(255,255,255,.12); }
.sgc-co-dots { display: flex; align-items: center; gap: 6px; margin: 12px 0 2px; }
.sgc-co-dots i { width: 22px; height: 5px; border-radius: 3px; background: rgba(255,255,255,.12); }
.sgc-co-dots i.on { background: var(--c); box-shadow: 0 0 8px var(--c); }
.sgc-co-dots i.ok { background: #ffd46b; }
.sgc-co-dots span { margin-left: auto; color: #9fb3c8; font-size: .7rem; }
.sgc-co-st { margin-top: 8px; color: color-mix(in srgb, var(--c) 55%, #fff); font-size: .76rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.sgc-co-tx { margin-top: 4px; color: #e6edf3; font-size: .9rem; line-height: 1.5; }
.sgc-co-tx b { color: #fff; } .sgc-co-tx em { color: #ffe7a8; font-style: normal; }
.sgc-co-miss { margin-top: 8px; padding: 7px 9px; border-radius: 9px; font-size: .76rem; color: #9fb3c8; background: rgba(255,255,255,.04); border: 1px dashed rgba(255,255,255,.14); }
.sgc-co-acts { display: flex; align-items: center; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.sgc-co-b { display: inline-flex; align-items: center; gap: 7px; min-height: 34px; padding: 6px 13px; border-radius: 10px; cursor: pointer; font: inherit; font-size: .8rem;
  font-weight: 700; color: #e8e8e8; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.16); }
.sgc-co-b:hover { background: rgba(255,255,255,.12); }
.sgc-co-b.sm { width: 34px; padding: 0; justify-content: center; }
.sgc-co-b.acc { color: #1d1304; background: linear-gradient(180deg, #ffd46b, #f0a030); border-color: #f0a030; box-shadow: 0 4px 16px rgba(240,160,48,.3); }
.sgc-co-wait { display: inline-flex; align-items: center; gap: 8px; color: color-mix(in srgb, var(--c) 45%, #fff); font-size: .8rem; font-weight: 700; }
.sgc-co-wait.ok { color: #7ee2a0; }
.sgc-co-spin { width: 15px; height: 15px; border-radius: 50%; border: 2px solid color-mix(in srgb, var(--c) 30%, transparent); border-top-color: var(--c);
  animation: sgc-spin .8s linear infinite; display: inline-block; }
.sgc-co-f { display: flex; gap: 6px; margin-top: 12px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,.07); }
.sgc-co-f span { width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: .62rem;
  color: rgba(255,255,255,.35); background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.12); }
.sgc-co-f span.ok { color: #fff; background: color-mix(in srgb, var(--c) 70%, #000); border-color: #ffd46b; }
.sgc-co-f span.cur { outline: 2px solid var(--c); outline-offset: 2px; }
.sgc-co-win { text-align: center; margin-top: 10px; }
.sgc-co-burst { width: 74px; height: 74px; margin: 4px auto 6px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 34% 30%, #fff, color-mix(in srgb, var(--c) 85%, #fff) 30%, color-mix(in srgb, var(--c) 70%, #000) 78%);
  border: 3px solid #ffd46b; box-shadow: 0 0 40px var(--c), 0 0 80px rgba(255,212,107,.5); animation: sgc-pop 1.1s ease; }
.sgc-co-burst i { color: #fff; font-size: 1.7rem; }
.sgc-co-wt { color: #ffd46b; font-family: Oxanium, "Segoe UI", sans-serif; font-size: 1.25rem; font-weight: 800; }
/* the page's global button styles must not reach the spheres */
.sg-root .sgc .sgc-o, .sg-root .sgc .sgc-core { background: none !important; border: 0 !important; box-shadow: none !important; outline: none; min-height: 0; }
.sgc-narrow .sgc-side { padding: 12px 14px; }
.sgc-narrow .sgc-s-k, .sgc-narrow .sgc-s-l, .sgc-narrow .sgc-s-ic { display: none; }
.sgc-narrow .sgc-s-t { margin-top: 6px; font-size: 1.05rem; }
.sgc-narrow .sgc-s-s { font-size: .82rem; }
.sg-root .sgc-narrow .sg-btn.sgc-go { margin-top: 8px; min-height: 40px; }

/* ------------------------------------------------------------------ v2 (2026-11-20): AIrene, why / read, the toolbar */
/* AIrene: her cyan spotlight and a small orb with eyes on the card (assets/guide/algo_guide.css: the same colours) */
.sgc-co.ai .sgc-co-ring { border-color: #7feeff; box-shadow: 0 0 0 4000px rgba(2,6,11,.55), 0 0 26px 6px rgba(75,233,250,.35), inset 0 0 14px rgba(127,238,255,.35);
  animation: sgc-ring-ai 1.6s ease-in-out infinite; }
@keyframes sgc-ring-ai { 50% { box-shadow: 0 0 0 4000px rgba(2,6,11,.55), 0 0 44px 10px rgba(75,233,250,.45), inset 0 0 18px rgba(127,238,255,.5); } }
.sgc-co.ai .sgc-co-hand { filter: drop-shadow(0 0 8px #4be9fa) drop-shadow(0 2px 4px #000); }
.sgc-ai { display: inline-block; position: relative; width: 15px; height: 15px; border-radius: 50%; vertical-align: -2px; margin-right: 3px;
  background: radial-gradient(circle at 38% 32%, #ffffff 0%, #f3fdff 24%, #b8f4ff 50%, #58e6f7 78%, #2bc4d6 100%);
  box-shadow: 0 0 6px 1px rgba(170,248,255,.85), 0 0 14px 3px rgba(75,233,250,.38); animation: sgc-ai-b 2.6s ease-in-out infinite; }
.sgc-ai i { position: absolute; top: 36%; width: 2px; height: 3px; border-radius: 50%; background: #0c3b46; }
.sgc-ai i.l { left: 33%; } .sgc-ai i.r { left: 58%; }
@keyframes sgc-ai-b { 50% { transform: translateY(-1px) scale(1.08); } }
.sgc-co.ai .sgc-co-k { color: #9ff2ff; }
/* a step that asks: the card widens for the pictures */
.sgc-co-card.wide { width: 600px; }
.sgc-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.sgc-pk { display: flex; flex-direction: column; gap: 5px; padding: 6px; border-radius: 11px; cursor: pointer; font: inherit; text-align: left; color: #e8e8e8;
  background: rgba(255,255,255,.04); border: 1.5px solid rgba(255,255,255,.12); transition: border-color .15s, background .15s, transform .12s; position: relative; }
.sgc-pk:hover { border-color: rgba(127,238,255,.6); transform: translateY(-1px); }
.sgc-pk.on { border-color: #7feeff; background: rgba(75,233,250,.09); box-shadow: 0 0 16px rgba(75,233,250,.3); }
.sgc-pk img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: center; border-radius: 7px; background: #0b1118; }
.sgc-pk-l { position: absolute; top: 9px; left: 9px; width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: .78rem; color: #06222a; background: #7feeff; box-shadow: 0 0 8px rgba(75,233,250,.7); }
.sgc-pk-t { font-size: .74rem; line-height: 1.35; color: #cfd8e2; }
.sgc-pk.on .sgc-pk-t { color: #fff; }
.sgc-say { margin-top: 9px; padding: 9px 11px; border-radius: 10px; font-size: .84rem; line-height: 1.5; color: #e6edf3;
  background: rgba(75,233,250,.07); border: 1px solid rgba(127,238,255,.35); }
.sgc-say b { color: #fff; }
.sgc-say.ok { background: rgba(60,190,120,.09); border-color: rgba(126,226,160,.55); }
.sgc-say.no { background: rgba(240,120,90,.08); border-color: rgba(255,150,120,.5); }
.sgc-ck-q { margin-top: 10px; color: #fff; font-size: .88rem; font-weight: 650; line-height: 1.45; }
.sgc-ck { display: flex; flex-direction: column; gap: 6px; margin-top: 7px; }
.sgc-ck-o { text-align: left; padding: 8px 11px; border-radius: 10px; cursor: pointer; font: inherit; font-size: .82rem; line-height: 1.4; color: #e6edf3;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.14); }
.sgc-ck-o:hover { background: rgba(255,255,255,.1); }
.sgc-ck-o.ok { border-color: #7ee2a0; background: rgba(60,190,120,.14); color: #fff; }
.sgc-ck-o.no { border-color: #ff9a7a; background: rgba(240,120,90,.12); }
/* a 'why' objective: the lesson and its check (the map's side panel, or a window over an app) */
.sgc-why { margin-top: 10px; color: #dfe7ee; font-size: .88rem; line-height: 1.55; }
.sgc-why p { margin: 7px 0; }
.sgc-why b { color: #fff; }
.sgc-why-h { color: #ffd46b; font-style: italic; }
.sgc-why-k { margin: 10px 0 2px; padding: 8px 10px; border-radius: 10px; color: #fff3cf; background: rgba(255,212,107,.07); border: 1px solid rgba(255,212,107,.35); }
.sgc-why-k i { color: #ffd46b; margin-right: 4px; }
.sgc-why-lns { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.sgc-why-ln { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font: inherit; font-size: .76rem; color: #e8e8e8;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.16); cursor: pointer; }
.sgc-why-ln i { color: var(--c); font-size: .62rem; }
.sgc-why-ln.off { cursor: default; color: #9fb3c8; }
button.sgc-why-ln:hover { background: rgba(255,255,255,.12); }
.sgc-why-qq + .sgc-why-qq { margin-top: 8px; }
.sgc-why-done { margin-top: 12px; padding: 10px 12px; border-radius: 10px; color: #fff; background: rgba(60,190,120,.12); border: 1px solid rgba(126,226,160,.55); }
.sgc-why-done i { color: #7ee2a0; }
.sgc-win { position: fixed; inset: 0; z-index: 2147481500; display: flex; align-items: center; justify-content: center; background: rgba(2,5,11,.6);
  opacity: 0; transition: opacity .25s ease; font-family: "Segoe UI", system-ui, sans-serif; color: #e8e8e8; }
.sgc-win.in { opacity: 1; }
.sgc-win-card { width: min(560px, calc(100vw - 28px)); max-height: calc(100vh - 40px); overflow-y: auto; padding: 16px 18px; border-radius: 16px;
  background: linear-gradient(180deg, rgba(16,20,34,.98), rgba(6,9,16,.98)); border: 1.5px solid var(--c); box-shadow: 0 0 34px rgba(75,233,250,.25), 0 14px 40px rgba(0,0,0,.6); }
.sgc-win-card .sgc-s-s { text-align: left; margin-top: 10px; }
/* the toolbar button of an app (apps.py: .idea-tool.cert, next to the favourite star): hidden until a certificate exists */
.idea-tool.cert { display: none !important; }
.idea-tool.cert.sgc-tb { display: inline-flex !important; align-items: center; gap: 5px; position: relative; }
.idea-tool.cert.sgc-tb i.fa-award { color: #9fb3c8; }
.idea-tool.cert.sgc-part i.fa-award { color: var(--c, #a77ef0); }
.idea-tool.cert.sgc-done { border-color: #ffd46b !important; color: #ffe7a8 !important; box-shadow: 0 0 12px rgba(255,212,107,.35); }
.idea-tool.cert.sgc-done i.fa-award { color: #ffd46b; text-shadow: 0 0 8px rgba(255,212,107,.8); }
.sgc-tb-n { font-size: .7em; padding: 0 5px; border-radius: 999px; background: rgba(255,255,255,.08); color: #cfd8e2; }
.sgc-tb-n:empty { display: none; }
.idea-tool.cert.sgc-new { animation: sgc-tb-new 1.2s ease 3; }
@keyframes sgc-tb-new { 0%, 100% { box-shadow: 0 0 12px rgba(255,212,107,.35); transform: scale(1); }
  50% { box-shadow: 0 0 30px 6px rgba(255,212,107,.85); transform: scale(1.12); } }
/* the Marketplace card (components/pages/market.py: .mk-cert, left of the favourite star .mk-star): hidden until
   sg_cert.js finds a certificate for the app; grey = not started, a ring of the app's colour = in progress (--p),
   gold = certified */
.mk-cert { display: none; position: absolute; top: 8px; right: 46px; width: 32px; height: 32px; padding: 0; border-radius: 50%;
  align-items: center; justify-content: center; cursor: pointer; color: #cfdcea; background: rgba(0,0,0,0.55);
  border: 1px solid rgba(255,255,255,0.18); transition: transform .15s, color .15s; }
.mk-cert.sgc-has { display: inline-flex; }
.mk-cert:hover { transform: scale(1.1); color: #fff3cf; }
.mk-cert.sgc-part { color: var(--c, #a77ef0); border-color: transparent;
  background: radial-gradient(closest-side, rgba(0,0,0,.78) 82%, transparent 86%),
              conic-gradient(var(--c, #a77ef0) var(--p, 0%), rgba(255,255,255,.16) 0); }
.mk-cert.sgc-done { color: #ffd46b; border-color: rgba(255,212,107,.8); text-shadow: 0 0 10px rgba(255,212,107,.85);
  box-shadow: 0 0 12px rgba(255,212,107,.35); }
.mk-cert.sgc-new { animation: sgc-tb-new 1.2s ease 3; }
/* the 'why' lesson ends on its Next button (2026-11-27) */
.sgc-why-next { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 14px; }
.sgc-why-next .sgc-co-b:disabled { opacity: .45; cursor: default; box-shadow: none; filter: grayscale(.5); }
.sgc-why-next span { color: #9fb3c8; font-size: .76rem; }
.sgc-pop { position: fixed; z-index: 2147481200; width: 320px; padding: 12px 12px 10px; border-radius: 14px; font-family: "Segoe UI", system-ui, sans-serif; color: #e8e8e8;
  background: linear-gradient(180deg, rgba(16,20,34,.98), rgba(6,9,16,.98)); border: 1.5px solid var(--c); box-shadow: 0 0 26px rgba(75,233,250,.22), 0 12px 32px rgba(0,0,0,.6); }
.sgc-pop-h { display: flex; align-items: center; gap: 10px; }
.sgc-pop-h .sgc-ai { width: 26px; height: 26px; }
.sgc-pop-h .sgc-ai i { width: 3px; height: 5px; }
.sgc-pop .sgc-co-k { color: #9ff2ff; }
.sgc-pop-t { color: #fff; font-family: Oxanium, "Segoe UI", sans-serif; font-weight: 800; font-size: 1rem; }
.sgc-pop-p { display: flex; align-items: center; gap: 8px; margin: 10px 0 8px; }
.sgc-pop-p span { flex: 0 0 auto; color: #9fb3c8; font-size: .72rem; }
.sgc-pop-l { display: flex; flex-direction: column; gap: 4px; }
.sgc-pop-o { display: flex; align-items: center; gap: 9px; padding: 7px 9px; border-radius: 9px; cursor: pointer; font: inherit; font-size: .82rem; text-align: left;
  color: #e6edf3; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.1); }
.sgc-pop-o > i { width: 18px; text-align: center; color: var(--c); }
.sgc-pop-o span { flex: 1 1 auto; }
.sgc-pop-o em { font-style: normal; font-size: .72rem; color: #9fb3c8; }
.sgc-pop-o.ok em { color: #ffd46b; }
.sgc-pop-o.rd { border-color: rgba(127,238,255,.45); }
.sgc-pop-o.rd em { color: #7feeff; }
.sgc-pop-o.lk { opacity: .5; cursor: default; }
.sgc-pop-o:not(.lk):hover { background: rgba(255,255,255,.1); }
.sgc-pop-dip { width: 100%; justify-content: center; margin-top: 8px; }
.sgc-pop-n { margin-top: 8px; color: #7d8b99; font-size: .7rem; line-height: 1.4; }
.sgc-toast { position: fixed; z-index: 2147481600; right: 18px; bottom: 18px; display: flex; gap: 9px; align-items: center; max-width: 360px; padding: 10px 14px;
  border-radius: 12px; font-family: "Segoe UI", system-ui, sans-serif; font-size: .84rem; color: #e8e8e8; background: rgba(10,14,22,.96);
  border: 1px solid rgba(255,255,255,.14); opacity: 0; transform: translateY(8px); transition: opacity .3s, transform .3s; }
.sgc-toast.in { opacity: 1; transform: none; }
