/* Assign-wizard orb (website refresh 2026-11)

   The "Assign wizard" tile of section#configure: the app's orb (js/assign-orb-2611.js draws it with
   WebGL), its success card, and the burst canvas that is added to <body> while the burst plays.
   The mount's size and the tile's grid are set in css/refresh-2611.css, section 8
   (--tg-orb: 152 px from 1000 px up, 128 px below). Every rule here hangs on .tg-r26.

   Without JavaScript the mount shows a still picture of the same orb (<noscript>); without WebGL
   the script shows that picture and lets it breathe. Under prefers-reduced-motion nothing moves:
   the orb is one still frame and the card fades in. */

/* ---------- The tile: lit by the orb ----------
   The orb is a lamp: a wide, soft violet bloom spreads from it across most of the tile and
   fades out towards the far edge, where a fainter violet wash lies under the words, with a
   faint cyan dawn in the opposite (upper right) corner, so the whole tile is lit, never flat
   black. Closer in, a violet and cyan glow sits behind the
   glass (::before, centred on the orb wherever the layout puts it); the pale light under the orb
   is soft and wide, never a bright patch. Two faint auroras cross-
   fade very slowly (::after; opacity only, paused off screen, still under reduced motion), and a
   very light star field lies over it all (.tg-assign__sky, the idea of the Gestures band's sky).
   The background colour stays near-black (the top bar's tone script reads it). The words are a
   step lighter than on the other dark tiles, for the lighter ground. Pointing at the orb lifts
   the glow a little. */
.tg-r26 .tg-setup .tg-assign {
  --tg-orb-x: calc(var(--tg-pad) + var(--tg-orb) / 2);
  --tg-orb-y: 50%;
  isolation: isolate;
  background-color: var(--tg-dark-1);
  background-image:
    radial-gradient(calc(var(--tg-orb) * 3.6) calc(var(--tg-orb) * 2.1) at var(--tg-orb-x) var(--tg-orb-y),
      rgba(124, 106, 255, 0.46) 0%, rgba(110, 96, 246, 0.30) 26%, rgba(92, 88, 232, 0.15) 52%,
      rgba(80, 86, 224, 0.05) 76%, rgba(80, 86, 224, 0) 100%),
    radial-gradient(calc(var(--tg-orb) * 2.3) calc(var(--tg-orb) * 1.7) at calc(var(--tg-orb-x) + var(--tg-orb) * 0.3) 100%,
      rgba(40, 170, 255, 0.15), rgba(40, 170, 255, 0.09) 30%, rgba(40, 170, 255, 0.035) 62%, rgba(40, 170, 255, 0) 100%),
    radial-gradient(70% 140% at 100% 0%, rgba(56, 176, 255, 0.20), rgba(56, 176, 255, 0.06) 50%, rgba(56, 176, 255, 0) 80%),
    radial-gradient(60% 120% at 82% 100%, rgba(120, 96, 255, 0.14), rgba(120, 96, 255, 0) 75%),
    radial-gradient(70% 110% at 78% 50%, rgba(104, 96, 240, 0.20), rgba(104, 96, 240, 0.07) 55%, rgba(104, 96, 240, 0) 80%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.tg-r26 .tg-setup .tg-assign .tg-tile__text { color: #D1D1D6; }   /* 5.3:1 on the brightest part behind it */
.tg-r26 .tg-setup .tg-assign::before,
.tg-r26 .tg-setup .tg-assign::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  pointer-events: none;
}
.tg-r26 .tg-setup .tg-assign::before {
  background:
    radial-gradient(circle at var(--tg-orb-x) var(--tg-orb-y), rgba(125, 115, 255, 0.26) calc(var(--tg-orb) * 0.38), rgba(125, 115, 255, 0.1) calc(var(--tg-orb) * 0.58), rgba(125, 115, 255, 0) calc(var(--tg-orb) * 0.9)),
    radial-gradient(circle at calc(var(--tg-orb-x) - var(--tg-orb) * 0.14) calc(var(--tg-orb-y) - var(--tg-orb) * 0.15), rgba(150, 80, 255, 0.50) 0, rgba(150, 80, 255, 0.20) calc(var(--tg-orb) * 0.39), rgba(150, 80, 255, 0) calc(var(--tg-orb) * 0.84)),
    radial-gradient(circle at calc(var(--tg-orb-x) + var(--tg-orb) * 0.04) calc(var(--tg-orb-y) + var(--tg-orb) * 0.17), rgba(30, 180, 255, 0.30) 0, rgba(30, 180, 255, 0.085) calc(var(--tg-orb) * 0.39), rgba(30, 180, 255, 0.035) calc(var(--tg-orb) * 0.62), rgba(30, 180, 255, 0) calc(var(--tg-orb) * 1.0)),
    radial-gradient(circle at var(--tg-orb-x) var(--tg-orb-y), rgba(240, 60, 190, 0.16) 0, rgba(240, 60, 190, 0) calc(var(--tg-orb) * 0.72));
  opacity: 0.9;
  transition: opacity 0.9s cubic-bezier(0.25, 0.1, 0.25, 1);
}
.tg-r26 .tg-setup .tg-assign.is-ready::before { opacity: 1; }
.tg-r26 .tg-setup .tg-assign.is-busy::before { opacity: 0.55; transition-duration: 0.4s; }
.tg-r26 .tg-setup .tg-assign::after {
  background:
    radial-gradient(55% 100% at 62% 0%, rgba(30, 180, 255, 0.14), rgba(30, 180, 255, 0) 70%),
    radial-gradient(50% 90% at 30% 100%, rgba(150, 80, 255, 0.18), rgba(150, 80, 255, 0) 70%);
  opacity: 0;
  animation: tg-orb-aurora 9s cubic-bezier(0.37, 0, 0.63, 1) infinite alternate;
  animation-play-state: paused;
}
.tg-r26 .tg-setup .tg-assign.is-on::after { animation-play-state: running; }
@keyframes tg-orb-aurora {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ---------- The stars: very light points over the tile's light, as in the Gestures band's sky ----------
   Three still layers of tiny, faint points and one sparse layer of slightly brighter ones that
   twinkle slowly, only while the tile is on screen (.is-on). Each layer is a small SVG tile of a
   few points; the sizes differ, so no pattern repeats. Behind the words they are much fainter,
   so no point reads as a mark on a letter. */
.tg-r26 .tg-assign__sky,
.tg-r26 .tg-assign__sky::before {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
}
.tg-r26 .tg-assign__sky {
  z-index: -1;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='139' height='139'%3E%3Cg fill='%23E9EEFF'%3E%3Ccircle cx='46.4' cy='23.8' r='0.58' fill-opacity='0.29'/%3E%3Ccircle cx='74.2' cy='51.9' r='0.46' fill-opacity='0.35'/%3E%3Ccircle cx='8.9' cy='60.8' r='0.46' fill-opacity='0.29'/%3E%3Ccircle cx='59.6' cy='112.3' r='0.47' fill-opacity='0.31'/%3E%3C/g%3E%3C/svg%3E") 0 0 / 139px 139px,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='181' height='181'%3E%3Cg fill='%23E9EEFF'%3E%3Ccircle cx='54.4' cy='112.6' r='0.6' fill-opacity='0.43'/%3E%3Ccircle cx='94.4' cy='132.1' r='0.46' fill-opacity='0.38'/%3E%3Ccircle cx='19.6' cy='30.4' r='0.52' fill-opacity='0.37'/%3E%3Ccircle cx='75.1' cy='170.0' r='0.58' fill-opacity='0.27'/%3E%3Ccircle cx='148.4' cy='53.6' r='0.63' fill-opacity='0.41'/%3E%3C/g%3E%3C/svg%3E") 0 0 / 181px 181px,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='233' height='233'%3E%3Cg fill='%23E9EEFF'%3E%3Ccircle cx='118.1' cy='87.7' r='0.64' fill-opacity='0.37'/%3E%3Ccircle cx='219.3' cy='120.0' r='0.62' fill-opacity='0.39'/%3E%3Ccircle cx='41.1' cy='73.4' r='0.74' fill-opacity='0.43'/%3E%3Ccircle cx='62.1' cy='207.2' r='0.72' fill-opacity='0.50'/%3E%3Ccircle cx='145.3' cy='165.6' r='0.73' fill-opacity='0.47'/%3E%3C/g%3E%3C/svg%3E") 0 0 / 233px 233px;
  -webkit-mask-image: linear-gradient(to right, #000 calc(var(--tg-pad) + var(--tg-orb)), rgba(0, 0, 0, 0.18) calc(var(--tg-pad) + var(--tg-orb) + 24px));
  mask-image: linear-gradient(to right, #000 calc(var(--tg-pad) + var(--tg-orb)), rgba(0, 0, 0, 0.18) calc(var(--tg-pad) + var(--tg-orb) + 24px));
}
.tg-r26 .tg-assign__sky::before {
  content: "";
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='307' height='307'%3E%3Cg fill='%23E9EEFF'%3E%3Ccircle cx='108.2' cy='119.4' r='1.02' fill-opacity='0.71'/%3E%3Ccircle cx='276.5' cy='26.1' r='1.04' fill-opacity='0.61'/%3E%3Ccircle cx='238.5' cy='287.3' r='1.04' fill-opacity='0.70'/%3E%3C/g%3E%3C/svg%3E") 0 0 / 307px 307px;
  opacity: 0.7;
  animation: tg-orb-twinkle 11s ease-in-out -4s infinite alternate paused;
  /* The brighter points only round the orb, never behind the words. */
  -webkit-mask-image: linear-gradient(to right, #000 calc(var(--tg-pad) + var(--tg-orb)), transparent calc(var(--tg-pad) + var(--tg-orb) + 16px));
  mask-image: linear-gradient(to right, #000 calc(var(--tg-pad) + var(--tg-orb)), transparent calc(var(--tg-pad) + var(--tg-orb) + 16px));
}
.tg-r26 .tg-assign.is-on .tg-assign__sky::before { animation-play-state: running; }
@keyframes tg-orb-twinkle {
  from { opacity: 0.4; }
  to   { opacity: 1; }
}

/* ---------- The orb: a round button over the whole mount ---------- */
.tg-r26 .tg-orb {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
  touch-action: manipulation;          /* taps are clicks; a swipe still scrolls the page */
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
}
/* The part that squishes, bounces and dissolves (the script writes its transform and opacity). */
.tg-r26 .tg-orb__face {
  position: absolute;
  inset: 0;
  display: block;
  transform-origin: 50% 50%;
  pointer-events: none;
}
.tg-r26 .tg-orb__gl,
.tg-r26 .tg-orb__still {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}
/* The picture is the orb on the tile's colour: only the glass is shown, so the glow shows round it. */
.tg-r26 .tg-orb__still {
  border-radius: 50%;
  -webkit-mask-image: radial-gradient(circle closest-side, #000 calc(100% * 0.8), transparent calc(100% * 0.828));
  mask-image: radial-gradient(circle closest-side, #000 calc(100% * 0.8), transparent calc(100% * 0.828));
}

/* The still picture breathes like the app's orb (7 % at most, about ten seconds a breath). */
@keyframes tg-orb-breathe {
  from { transform: scale(0.96); }
  to   { transform: scale(1.04); }
}
.tg-r26 .tg-orb-mount.is-still .tg-orb__face .tg-orb__still {
  animation: tg-orb-breathe 5.1s cubic-bezier(0.37, 0, 0.63, 1) infinite alternate;
}
.tg-r26 .tg-orb-mount.is-still:not(.is-on) .tg-orb__face .tg-orb__still { animation-play-state: paused; }

/* Keyboard focus: a light ring just outside the glass (the site's navy ring is lost on near-black). */
.tg-r26 .tg-orb-mount .tg-orb:focus-visible { outline: none; }
.tg-r26 .tg-orb-mount .tg-orb:focus-visible::after {
  content: "";
  position: absolute;
  inset: calc(6% - 3px);
  border-radius: 50%;
  box-shadow: 0 0 0 2px var(--tg-on-dark-1);
  pointer-events: none;
}

/* ---------- The hint under the tile text (shown by the script once the orb can be touched) ---------- */
.tg-r26 .tg-assign__hint {
  margin: 10px 0 0;
  font-size: 13px;
  line-height: 1.38;
  color: #C7C7CC;                      /* 4.8:1 on the brightest part of the bloom behind it */
}
.tg-r26 .tg-assign__hint-touch { display: none; }
@media (hover: none) and (pointer: coarse) {
  .tg-r26 .tg-assign__hint-mouse { display: none; }
  .tg-r26 .tg-assign__hint-touch { display: inline; }
}

/* ---------- While the orb bursts and the card shows, the tile's own words step back ---------- */
.tg-r26 .tg-assign__copy { transition: opacity 0.4s ease 0.24s; }   /* back once the card has mostly gone */
.tg-r26 .tg-assign.is-busy .tg-assign__copy { opacity: 0; transition: opacity 0.22s ease; }

/* ---------- The success message: it lands on the lit tile itself (no box, no edge); the check
   sits where the orb was, the words where the tile's words were ---------- */
.tg-r26 .tg-assign__done {
  position: absolute;
  inset: 8px;
  z-index: 2;
  display: grid;
  grid-template-columns: var(--tg-orb) minmax(0, 1fr);
  align-items: center;
  column-gap: 24px;
  padding: 0 calc(var(--tg-pad) - 8px);
  border-radius: calc(var(--tg-radius) - 8px);
  background: none;
  box-shadow: none;
  color: var(--tg-on-dark-1);
  cursor: pointer;
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.3s ease, transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.tg-r26 .tg-assign__done.is-in { opacity: 1; transform: none; }
.tg-r26 .tg-assign__done.is-focus { box-shadow: 0 0 0 2px var(--tg-on-dark-1); }   /* keyboard focus only */
.tg-r26 .tg-assign__check {
  display: block;
  justify-self: center;
  width: 56px;
  height: 56px;
  opacity: 0;
}
/* The check pops a beat after the card, like the app's spring(0.42, 0.55): over 1.0 and back. */
@keyframes tg-orb-check {
  0%   { opacity: 0; transform: scale(0.4); }
  20%  { opacity: 1; }
  40%  { transform: scale(1.076); }
  80%  { transform: scale(0.99); }
  100% { opacity: 1; transform: scale(1); }
}
.tg-r26 .tg-assign__done.is-in .tg-assign__check {
  animation: tg-orb-check 0.62s cubic-bezier(0.33, 0, 0.67, 1) 0.06s both;
}
.tg-r26 .tg-assign__done-copy { margin: 0; min-width: 0; }
.tg-r26 .tg-assign__done-title {
  display: block;
  font-size: 19px;
  font-weight: 600;
  line-height: 1.21;
  color: var(--tg-on-dark-1);
  text-wrap: balance;
}
.tg-r26 .tg-assign__done-text {
  display: block;
  margin-top: 4px;
  font-size: 15px;
  line-height: 1.45;
  color: #D1D1D6;
}

/* ---------- The burst canvas: the whole window, under the navigation bar, never in the way ---------- */
.tg-r26 .tg-orb-burst {
  position: fixed;
  inset: 0;
  z-index: 90;                         /* under .nav (100) and the phone menu (99); modals are 200 */
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* ---------- Tablet and phone ---------- */
@media (max-width: 999px) {
  .tg-r26 .tg-assign__done { column-gap: 20px; }
  .tg-r26 .tg-assign__check { width: 48px; height: 48px; }
}
@media (max-width: 680px) {
  .tg-r26 .tg-assign__done { column-gap: 16px; }
  .tg-r26 .tg-assign__done-title { font-size: 17px; line-height: 1.24; }
  .tg-r26 .tg-assign__done-text { font-size: 14px; line-height: 1.43; }
}
/* Phones: the orb above the text, so the check above the words, centred. */
@media (max-width: 479px) {
  .tg-r26 .tg-setup .tg-assign { --tg-orb-x: 50%; --tg-orb-y: calc(12px + var(--tg-orb) / 2); }
  /* The words are under the orb here: the stars thin out below it. */
  .tg-r26 .tg-assign__sky {
    -webkit-mask-image: linear-gradient(to bottom, #000 calc(12px + var(--tg-orb)), rgba(0, 0, 0, 0.18) calc(12px + var(--tg-orb) + 16px));
    mask-image: linear-gradient(to bottom, #000 calc(12px + var(--tg-orb)), rgba(0, 0, 0, 0.18) calc(12px + var(--tg-orb) + 16px));
  }
  .tg-r26 .tg-assign__sky::before {
    -webkit-mask-image: linear-gradient(to bottom, #000 calc(12px + var(--tg-orb)), transparent calc(12px + var(--tg-orb) + 16px));
    mask-image: linear-gradient(to bottom, #000 calc(12px + var(--tg-orb)), transparent calc(12px + var(--tg-orb) + 16px));
  }
  .tg-r26 .tg-assign__done {
    grid-template-columns: minmax(0, 1fr);
    align-content: center;
    row-gap: 12px;
    text-align: center;
  }
}

/* ---------- Reduced motion: no squish, no burst, no pop; a calm fade ---------- */
@media (prefers-reduced-motion: reduce) {
  .tg-r26 .tg-setup .tg-assign::after { animation: none; opacity: 0.5; }
  .tg-r26 .tg-assign__sky::before { animation: none; opacity: 0.7; }   /* the stars stand still */
  .tg-r26 .tg-orb__face { transition: opacity 0.3s ease; }
  .tg-r26 .tg-orb-mount.is-still .tg-orb__face .tg-orb__still { animation: none; }
  .tg-r26 .tg-assign__done { transform: none; transition: opacity 0.3s ease; }
  .tg-r26 .tg-assign__done.is-in { transition-delay: 0.14s; }  /* after the tile's words have gone */
  .tg-r26 .tg-assign__done.is-in .tg-assign__check { animation: none; opacity: 1; }
}
