html.clearspk-page-loading { background: #6334b8; overflow: hidden; }
html.clearspk-page-loading body > :not(#sitePreloader):not(script):not(style):not(link) { visibility: hidden !important; }
html body #sitePreloader.clearspk-page-loader {
  position: fixed; inset: 0; z-index: 2147483000; display: grid; place-items: center;
  overflow: hidden; isolation: isolate; visibility: visible; pointer-events: auto;
  background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; transition: none;
  touch-action: none; cursor: progress; direction: rtl; font-family: Heebo, Arial, sans-serif;
}
html body #sitePreloader.clearspk-page-loader.is-leaving { pointer-events: none; }

/* A single lightning-shaped cut through two halves of the same artwork. */
html body #sitePreloader.cs-pyramid-switch-loader {
  --switch-deep: #291557;
  --switch-mid: #6531ad;
  --switch-bright: #aa6bea;
  --switch-rim: #ffd879;
  --switch-plate: #513080;
  background: transparent;
  padding: 0;
  overflow: hidden;
  isolation: isolate;
  transition: none;
  touch-action: none;
  cursor: progress;
}
html body #sitePreloader.cs-pyramid-switch-loader[data-sound="ts"] {
  --switch-deep: #06384d;
  --switch-mid: #087f91;
  --switch-bright: #42cfbd;
  --switch-rim: #a5fff0;
  --switch-plate: #10566e;
}
html body #sitePreloader.cs-pyramid-switch-loader.is-leaving { opacity: 1; }
/* The split panels carry identical copies of the app icon and destination. */
.cs-brand-loader {
  --switch-deep: #382068;
  --switch-mid: #7340c6;
  --switch-bright: #8c52ff;
  --switch-rim: #dac5ff;
}
.cs-brand-mark {
  position: relative; z-index: 1; display: grid; justify-items: center;
  gap: clamp(14px, 2.6vmin, 22px); width: min(88%, 560px); text-align: center;
}
.cs-brand-mark img {
  display: block; width: clamp(100px, 26vmin, 154px); aspect-ratio: 1;
  border-radius: 23%; box-shadow: 0 3px 0 #371a6d, 0 8px 16px #24103b47;
}
.cs-brand-destination {
  position: relative; isolation: isolate; box-sizing: border-box; max-width: 100%;
  padding: .26em .94em .42em; color: #fff9ff;
  font: 900 clamp(21px, 4.9vmin, 34px)/1.25 Heebo, Arial, sans-serif;
  text-shadow: 0 .065em 0 #361551; text-wrap: balance; overflow-wrap: anywhere;
}
.cs-brand-destination::before, .cs-brand-destination::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  clip-path: polygon(11px 0, 100% 0, 100% calc(100% - 10px),
    calc(100% - 11px) 100%, 0 100%, 0 10px);
}
.cs-brand-destination::before {
  background: linear-gradient(110deg, #9bcfd7, #a785ed 22%, #6d4eb6 75%, #efb9d8);
}
.cs-brand-destination::after {
  inset: 1px 1px 3px;
  background: linear-gradient(110deg, #46236e, #331952 75%);
}
.cs-switch-panel {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(ellipse at center, transparent 21%, #0d092c59 100%),
    radial-gradient(circle, #ffffff1c 0 1px, transparent 1.5px) 0 0 / 9px 9px,
    repeating-conic-gradient(from 9deg at 50% 52%, transparent 0 13deg, #ffffff0c 13deg 15deg, transparent 15deg 28deg),
    linear-gradient(130deg, var(--switch-deep) 4%, var(--switch-mid) 38%, var(--switch-bright) 72%, var(--switch-mid));
  will-change: transform;
  animation: csSwitchClose var(--switch-close) cubic-bezier(.18,.68,.38,1) var(--switch-delay) both;
}
.cs-switch-left {
  --travel: -68%;
  clip-path: polygon(0 0, 59% 0, 49% 44%, 54% 43%, 40% 100%, 0 100%);
}
.cs-switch-right {
  --travel: 68%;
  clip-path: polygon(calc(59% - 1px) 0, 100% 0, 100% 100%, calc(40% - 1px) 100%, calc(54% - 1px) 43%, calc(49% - 1px) 44%);
}
/* Overlap the shallow edge too, so the closed halves paint one intact icon. */
.cs-brand-loader .cs-switch-right {
  clip-path: polygon(calc(59% - 1px) 0, 100% 0, 100% 100%, calc(40% - 1px) 100%,
    calc(54% - 1px) calc(43% + 1px), calc(49% - 1px) calc(44% + 1px));
}
.cs-switch-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(175deg, var(--switch-rim), #fff 43%, var(--switch-rim) 77%);
  clip-path: polygon(calc(59% - 2px) 0, calc(59% + 2px) 0,
    calc(49% + 3px) 43.7%, calc(54% + 2px) 42.7%, calc(40% + 2px) 100%,
    calc(40% - 2px) 100%, calc(54% - 3px) 43.3%, calc(49% - 3px) 44.3%);
}
.cs-switch-badge {
  position: relative;
  display: grid;
  place-items: center;
  width: clamp(112px, 22vmin, 178px);
  aspect-ratio: 1;
}
.cs-switch-badge::before, .cs-switch-badge::after {
  content: "";
  position: absolute;
  inset: 5%;
  clip-path: polygon(25% 0, 75% 0, 100% 25%, 100% 75%, 75% 100%, 25% 100%, 0 75%, 0 25%);
  background: linear-gradient(145deg, white, var(--switch-rim) 33%, var(--switch-mid) 78%, var(--switch-rim));
}
.cs-switch-badge::after {
  inset: 8%;
  background:
    linear-gradient(115deg, transparent 43%, #ffffff30 50%, transparent 57%) 100% 0 / 300% 100% no-repeat,
    radial-gradient(ellipse at 32% 13%, #ffffff45, transparent 67%),
    linear-gradient(145deg, var(--switch-plate), var(--switch-deep));
  animation: csSwitchSheen 2.4s ease-in-out var(--switch-delay) infinite;
}
.cs-switch-badge img { z-index: 1; width: 74%; height: 69%; object-fit: contain; }
.is-leaving .cs-switch-panel {
  animation: csSwitchOpen var(--switch-open) cubic-bezier(.48,.02,.16,1) both;
}
@keyframes csSwitchSheen {
  0%, 22% { background-position: 100% 0, center, center; }
  66%, 100% { background-position: 0 0, center, center; }
}
@keyframes csSwitchClose {
  from { transform: translate3d(var(--travel),0,0); }
  to { transform: translate3d(0,0,0); }
}
@keyframes csSwitchOpen {
  from { transform: translate3d(0,0,0); }
  to { transform: translate3d(var(--travel),0,0); }
}
@media (prefers-reduced-motion: reduce) {
  .cs-switch-panel, .is-leaving .cs-switch-panel, .cs-switch-badge::after { animation: none; will-change: auto; }
}

/* The same artwork fits a loading card without covering the controls around it. */
:root {
  --cs-loader-icon: url("../logo/ClearSpkAppLogo.png");
  --cs-loader-art:
    var(--cs-loader-icon) center / auto min(68%, 90px) no-repeat,
    radial-gradient(circle, #ffffff28 0 1px, transparent 1.3px) 0 0 / 8px 8px,
    linear-gradient(125deg, #6035a8, #8c52ff 62%, #ac87f3);
}
.clearspk-target-loader {
  width: 100%; min-height: 126px; display: grid; place-items: center; position: relative;
}
html .store-loading-card,
html .image-frame.is-loading .image-loader,
html .lightbox-loader:not(.failed),
html #appLoader.loaderOverlay,
html body #processing-overlay {
  background: var(--cs-loader-art);
}
.clearspk-target-loader__spinner {
  box-sizing: border-box;
  width: 29px; height: 29px;
  border: 3px solid #9266d82b; border-top-color: #8956ca; border-radius: 50%;
  animation: csTargetSpin .85s linear infinite;
}
@keyframes csTargetSpin { to { transform: rotate(1turn); } }
@media (prefers-reduced-motion: reduce) {
  .clearspk-target-loader__spinner { animation: none; }
}
.clearspk-target-loader__text,
html .image-frame.is-loading .image-loader-label,
html .lightbox-loader:not(.failed) > span:last-child,
#appLoader .loaderCard {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
.store-loading-card > div,
html .image-frame.is-loading .image-spinner, html .lightbox-loader:not(.failed) .image-spinner { display: none; }
html body #processing-overlay .proc-card { background: none; box-shadow: none; border: 0; backdrop-filter: none; }
html body #processing-overlay .proc-icon-wrap { visibility: hidden; }
html.clearspk-audio-busy #practiceActionRow { display: none!important; visibility: hidden!important; pointer-events: none!important; }
/* In a button or a live status row, keep the action label and its hit area. */
html body :is(.btn-spinner,.btn-loader,.verify-loader,.lumi-thinking-spinner,.loader-inline .spinner,button .spinner,i.fa-spin:is(.fa-spinner,.fa-circle-notch)) {
  background: transparent var(--cs-loader-icon) center / contain no-repeat;
  border: none; border-radius: 4px; box-shadow: none; animation: none;
}
html body i.fa-spin:is(.fa-spinner,.fa-circle-notch) { width: 1.3em; height: 1.3em; vertical-align: middle; }
html body i.fa-spin:is(.fa-spinner,.fa-circle-notch)::before { content: none; }
