/* game-board.css — the Stepping Stones home as a game (Kevin, 2026-10-02).
   Loaded last. Everything is under body.stones-on. */

@property --gb-a { syntax: '<angle>'; inherits: false; initial-value: 0deg; }

/* ---------- buttons: flat and dull until ready, then they pop out ---------- */
body.stones-on #home-view button:disabled,
body.stones-on #home-view button[aria-disabled="true"],
body.stones-on #home-view .is-blocked {
  background: var(--al-mist) !important; background-image: none !important;
  color: color-mix(in srgb, var(--al-muted) 80%, transparent) !important;
  border: 1px dashed var(--al-line) !important;
  box-shadow: none !important; transform: none !important; filter: saturate(0) !important;
  text-shadow: none !important; opacity: .9 !important;
}
body.stones-on #home-view button.al-ran:disabled[data-done="1"] { background: var(--al-mist) !important; color: var(--al-muted) !important; opacity: .9 !important; }
/* ready: raised off the page, with a ledge under it */
body.stones-on #home-view button:not(:disabled):not([aria-disabled="true"]):not(.stone-head):not(.toggle-switch):not(.chip):not(.icon-btn):not([class*="close"]):not(.file-open):not(.apin-light):not(#studentSelectClear) {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), inset 0 -2px 0 rgba(0, 0, 0, .4), 0 4px 0 rgba(0, 0, 0, .55), 0 10px 18px rgba(0, 0, 0, .4) !important;
  transform: translateY(-1px);
  transition: transform .16s cubic-bezier(.3, 1.6, .5, 1), box-shadow .16s ease, filter .2s ease !important;
}
body.stones-on #home-view button:not(:disabled):not([aria-disabled="true"]):not(.stone-head):not(.toggle-switch):not(.chip):not(.icon-btn):not([class*="close"]):not(.file-open):not(.apin-light):not(#studentSelectClear):hover {
  transform: translateY(-3px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), inset 0 -2px 0 rgba(0, 0, 0, .4), 0 6px 0 rgba(0, 0, 0, .55), 0 16px 26px rgba(0, 0, 0, .45) !important;
}
/* pressed: it visibly goes down onto its ledge */
body.stones-on #home-view button:not(:disabled):not([aria-disabled="true"]):not(.stone-head):not(.toggle-switch):not(.chip):not(.icon-btn):not([class*="close"]):not(.file-open):not(.apin-light):not(#studentSelectClear):active {
  transform: translateY(3px) scale(.985) !important;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, .18), 0 1px 0 rgba(43, 40, 44, .25), 0 2px 4px rgba(43, 40, 44, .12) !important;
  transition-duration: .05s !important;
}
/* and springs back up when let go */
body.stones-on #home-view button.gb-bounce { animation: gbBounce .42s cubic-bezier(.3, 1.6, .5, 1) !important; }
@keyframes gbBounce { 0% { transform: translateY(3px) scale(.985); } 55% { transform: translateY(-4px) scale(1.02); } 100% { transform: translateY(-1px); } }
/* waking up: from flat to raised, with a burst of light */
@keyframes moWake {
  0% { transform: translateY(0) scale(.96); filter: saturate(0) brightness(.95) drop-shadow(0 0 0 rgba(240, 122, 58, 0)); }
  40% { transform: translateY(-6px) scale(1.05); filter: saturate(1.3) brightness(1.15) drop-shadow(0 0 14px rgba(240, 122, 58, .85)); }
  100% { transform: translateY(-1px) scale(1); filter: none; }
}
body.stones-on #home-view button.mo-wake { animation: moWake .9s cubic-bezier(.2, 1.4, .35, 1) both !important; }

/* The spinning edge was a light with no job. The open section already shows where you are. */
body.stones-on #home-view .stone.is-now {
  animation: none !important;
}
@keyframes gbOrbit { to { --gb-a: 360deg; } }
body.stones-on #home-view .stone.is-later:not(.is-open) { filter: saturate(.25); }
body.stones-on #home-view .stone.is-later .stone-num { color: transparent; }
.gb-lock { display: none; width: 12px; height: 12px; }
body.stones-on #home-view .stone.is-later .stone-num { position: relative; }
body.stones-on #home-view .stone.is-later .gb-lock { display: block; position: absolute; inset: 0; margin: auto; color: var(--al-muted); }

/* ---------- one small bar per aspect, under each step's name ---------- */
.gb-segs { display: flex; gap: 3px; margin-top: 7px; height: 5px; max-width: 100%; }
.gb-segs:empty { display: none; }
.gb-segs i { flex: 1 1 0; min-width: 6px; max-width: 46px; height: 6px; border-radius: 3px; background: #4A433C; overflow: hidden; position: relative; }
body.stones-on .section-title-row { flex-wrap: wrap; }
body.stones-on .section-title-row > .gb-segs,
body.stones-on .stones-auto-head > .gb-segs { flex: 1 0 100%; max-width: none; margin-top: 8px; }
.gb-segs i b { position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(90deg, var(--al-red), #F07A3A); transform: scaleX(0); transform-origin: left; transition: transform var(--gb-ms, 600ms) cubic-bezier(.2, .8, .2, 1); }
.gb-segs i.on b { transform: scaleX(1); }
.stone.is-done .gb-segs i.on b { background: linear-gradient(90deg, var(--al-ok), #5FC28C); }
.gb-segs i.stale b { background: var(--al-warn); transform: scaleX(1); animation: stonesPulse 1.9s ease-out infinite; }
.gb-segs i.flash { animation: gbSegFlash .9s ease-out; }
@keyframes gbSegFlash { 0% { box-shadow: 0 0 0 0 rgba(240, 122, 58, .9); } 100% { box-shadow: 0 0 0 6px rgba(240, 122, 58, 0); } }

/* ---------- wires between the steps ---------- */
body.stones-on #home-view .gb-wire { position: relative; height: 14px; margin: -14px 0 !important; padding: 0 !important; flex-shrink: 0; pointer-events: none; }
body.stones-on #home-view .gb-wire i { position: absolute; left: 31px; top: -2px; bottom: -2px; width: 3px; border-radius: 3px; background: var(--al-line); transition: background-color .5s ease, box-shadow .5s ease; }
body.stones-on #home-view .gb-wire.lit i,
body.stones-on #home-view .gb-wire.flow i {
  background: var(--al-line) !important;
  box-shadow: none !important;
  animation: none !important;
}
@keyframes gbFlow { from { background-position: 0 0; } to { background-position: 0 -300%; } }

/* ---------- lights around the ring, one per step ---------- */
.gb-ring-light { stroke: var(--al-line-soft); transition: stroke .5s ease, filter .5s ease; }
.gb-ring-light.on { stroke: var(--al-line-soft); filter: none; }
.gb-level { display: inline-flex; align-items: baseline; gap: 4px; font: 600 12px/1 var(--al-mono); color: var(--al-muted); }
.gb-level b { font: 900 18px/1 var(--al-head); color: var(--al-ok); font-variant-numeric: tabular-nums; }

/* ---------- unlock and clear ---------- */
body.stones-on #home-view .stone.gb-unlocked { animation: gbUnlock 1.2s cubic-bezier(.2, .8, .2, 1); }
@keyframes gbUnlock { 0% { box-shadow: 0 0 0 0 rgba(240, 122, 58, .7); transform: scale(.985); } 40% { box-shadow: 0 0 0 10px rgba(240, 122, 58, .18); transform: scale(1.01); } 100% { box-shadow: 0 0 0 0 rgba(240, 122, 58, 0); transform: none; } }
body.stones-on #home-view .stone.gb-cleared > .stone-head::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(100deg, transparent 20%, rgba(95, 194, 140, .45) 50%, transparent 80%);
  animation: gbSweep .9s ease-out both;
}
body.stones-on #home-view .stone > .stone-head { position: relative; overflow: visible; }
@keyframes gbSweep { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
body.stones-on #home-view .stone.gb-cleared .stone-num { animation: gbBadge .9s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes gbBadge { 0% { transform: scale(1); } 40% { transform: scale(1.35) rotate(-12deg); box-shadow: 0 0 0 8px rgba(95, 194, 140, .35); } 100% { transform: none; } }
.gb-sparks { position: absolute; left: 31px; top: 50%; width: 0; height: 0; pointer-events: none; }
.gb-sparks i { position: absolute; width: 5px; height: 5px; margin: -2.5px; border-radius: 50%; background: #5FC28C; box-shadow: 0 0 6px #5FC28C; animation: gbSpark .9s ease-out both; }
.gb-sparks i:nth-child(3n) { background: #F07A3A; box-shadow: 0 0 6px #F07A3A; }
@keyframes gbSpark { from { transform: rotate(var(--a)) translateX(0) scale(1); opacity: 1; } to { transform: rotate(var(--a)) translateX(var(--d)) scale(.3); opacity: 0; } }
.gb-toast {
  position: fixed; left: 50%; bottom: 84px; z-index: 900; transform: translate(-50%, 20px); opacity: 0;
  padding: 10px 18px; border-radius: 999px; background: var(--al-ink); color: #fff; font: 800 13px/1 var(--al-head); letter-spacing: .02em;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .25), 0 0 0 3px rgba(95, 194, 140, .5); animation: gbToastIn .45s cubic-bezier(.3, 1.6, .5, 1) forwards; pointer-events: none;
}
.gb-toast.out { animation: gbToastOut .5s ease forwards; }
@keyframes gbToastIn { to { transform: translate(-50%, 0); opacity: 1; } }
@keyframes gbToastOut { from { transform: translate(-50%, 0); opacity: 1; } to { transform: translate(-50%, -14px); opacity: 0; } }

/* ---------- Status and Activity: live bars that spawn sub-bars ---------- */
body.stones-on #home-view .status-job-track, .gb-run-track, .gb-stage-track, .gb-sub-track {
  position: relative; display: block; overflow: hidden; border-radius: 99px; background: var(--al-line-soft) !important;
}
body.stones-on #home-view .status-job-fill, .gb-run-fill, .gb-stage-fill, .gb-sub-fill {
  display: block; height: 100%; width: 0; border-radius: inherit;
  background: linear-gradient(90deg, var(--al-red), #F07A3A) !important;
  box-shadow: 0 0 10px rgba(240, 122, 58, .55);
  position: relative; overflow: hidden;
}
body.stones-on #home-view .status-job-fill::after, .gb-run-fill::after, .gb-stage-fill::after, .gb-sub-fill::after {
  content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .5), transparent);
  background-size: 50% 100%; background-repeat: no-repeat; animation: gbShine 1.4s linear infinite;
}
@keyframes gbShine { from { background-position: -60% 0; } to { background-position: 160% 0; } }
.gb-run { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 12px; background: var(--al-mist); animation: stonesSlide .45s cubic-bezier(.2, .8, .2, 1); transition: opacity .5s ease; }
.gb-run.gone { opacity: 0; }
.gb-run-head { display: flex; justify-content: space-between; align-items: baseline; font: 800 13px/1 var(--al-head); color: var(--al-ink); }
.gb-run-pct { font: 800 13px/1 var(--al-mono); color: var(--al-red-deep); font-variant-numeric: tabular-nums; }
.gb-run-track { height: 8px; }
.gb-run-fill { transition: width .9s cubic-bezier(.2, .8, .2, 1); }
.gb-run.finished .gb-run-fill, .gb-stage.done .gb-stage-fill, .gb-sub.done .gb-sub-fill { background: linear-gradient(90deg, var(--al-ok), #5FC28C) !important; box-shadow: 0 0 10px rgba(95, 194, 140, .55); }
.gb-stage { display: flex; flex-direction: column; gap: 4px; opacity: .55; transition: opacity .4s ease; }
.gb-stage.on, .gb-stage.done { opacity: 1; }
.gb-stage-head { display: flex; justify-content: space-between; font: 700 11.5px/1.2 var(--al-head); color: var(--al-ink); }
.gb-stage-head em { font: 600 11px/1 var(--al-mono); font-style: normal; color: var(--al-muted); }
.gb-stage-track { height: 5px; }
.gb-stage-fill { transition: width .6s cubic-bezier(.2, .8, .2, 1); }
.gb-subs { display: flex; flex-direction: column; gap: 3px; padding-left: 10px; border-left: 2px solid var(--al-line-soft); }
.gb-stage:not(.on) .gb-subs { display: none; }
.gb-stage .gb-sub { display: none; grid-template-columns: minmax(0, 1fr) 90px; align-items: center; gap: 8px; font: 500 11px/1.3 var(--al-mono); color: var(--al-muted); }
.gb-stage.on .gb-sub { display: grid; animation: stonesSlide .4s cubic-bezier(.2, .8, .2, 1) both; }
.gb-sub.on { color: var(--al-ink); }
.gb-sub-track { height: 4px; }
.gb-sub-fill { transition: width var(--gb-ms, 600ms) cubic-bezier(.2, .8, .2, 1); }

@media (prefers-reduced-motion: reduce) {
  body.stones-on #home-view .stone.is-now, .gb-wire.flow i, .gb-segs i, body.stones-on #home-view .status-job-fill::after, .gb-run-fill::after, .gb-stage-fill::after, .gb-sub-fill::after { animation: none !important; }
}

/* ---------- Report Complete (Kevin, 2026-10-02) ---------- */
.gb-complete { position: fixed; inset: 0; z-index: 2000; display: grid; place-items: center; background: rgba(20, 19, 26, .55); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); animation: gbFadeIn .35s ease both; overflow: hidden; }
.gb-complete.out { animation: gbFadeOut .45s ease both; }
@keyframes gbFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes gbFadeOut { from { opacity: 1; } to { opacity: 0; } }
.gb-complete-card {
  position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center;
  width: min(520px, calc(100vw - 48px)); padding: 34px 32px 28px; border-radius: 24px;
  background: var(--al-surface, #fff); border: 2px solid transparent;
  background: linear-gradient(var(--al-surface, #fff), var(--al-surface, #fff)) padding-box, conic-gradient(from var(--gb-a), #2F7D55, #5FC28C, #F07A3A, #D9412C, #2F7D55) border-box;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .35), 0 0 0 8px rgba(95, 194, 140, .18);
  animation: gbCardIn .7s cubic-bezier(.2, 1.3, .3, 1) both, gbOrbit 2.6s linear infinite;
}
@keyframes gbCardIn { from { opacity: 0; transform: translateY(30px) scale(.9); } to { opacity: 1; transform: none; } }
.gb-complete-ring { position: relative; width: 148px; height: 148px; }
.gb-complete-ring svg { width: 148px; height: 148px; transform: rotate(-90deg); animation: gbSpin 6s linear infinite; }
@keyframes gbSpin { to { transform: rotate(270deg); } }
.gb-complete-ring circle { stroke: var(--al-line-soft, #E9E4E3); animation: gbLightOn .35s ease forwards; animation-delay: calc(.25s + var(--i) * .09s); }
@keyframes gbLightOn { to { stroke: #2F7D55; filter: drop-shadow(0 0 4px rgba(95, 194, 140, .9)); } }
.gb-complete-ring b { position: absolute; inset: 0; display: grid; place-items: center; font: 900 30px/1 var(--al-head, sans-serif); color: var(--al-ok, #2F7D55); animation: gbCardIn .6s cubic-bezier(.2, 1.4, .3, 1) 1.2s both; }
.gb-complete-eyebrow { font: 700 11px/1 var(--al-mono, monospace); letter-spacing: .16em; text-transform: uppercase; color: var(--al-muted, #6F6870); }
.gb-complete-word { margin: 0; font: 900 34px/1.05 var(--al-head, sans-serif); letter-spacing: .12em; color: var(--al-ink, #2B282C); white-space: nowrap; }
.gb-complete-word span { display: inline-block; opacity: 0; transform: translateY(14px) scale(.6); animation: gbLetter .5s cubic-bezier(.2, 1.5, .3, 1) forwards; animation-delay: calc(.35s + var(--i) * .05s); }
.gb-complete-word span:nth-child(-n+6) { color: var(--al-red, #D9412C); }
@keyframes gbLetter { to { opacity: 1; transform: none; } }
.gb-complete-line { margin: 0; font: 500 14px/1.45 var(--al-head, sans-serif); color: var(--al-muted, #6F6870); }
.gb-complete-btn {
  display: inline-flex; align-items: center; justify-content: center; user-select: none;
  margin-top: 8px; min-height: 44px; padding: 0 26px; border-radius: 12px; border: 0; cursor: pointer;
  background: var(--al-ok, #2F7D55); color: #fff; font: 800 14px/1 var(--al-head, sans-serif); letter-spacing: .04em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 4px 0 rgba(20, 60, 40, .45), 0 12px 22px rgba(47, 125, 85, .3);
  transition: transform .16s cubic-bezier(.3, 1.6, .5, 1), box-shadow .16s ease;
}
.gb-complete-btn:hover { transform: translateY(-2px); }
.gb-complete-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(20, 60, 40, .45); transition-duration: .05s; }
.gb-confetti { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.gb-confetti i { position: absolute; top: -12px; width: 8px; height: 13px; border-radius: 2px; opacity: .95; animation-name: gbFall; animation-timing-function: cubic-bezier(.25, .6, .4, 1); animation-fill-mode: both; }
@keyframes gbFall { from { transform: translate(0, 0) rotate(0); } to { transform: translate(var(--dx), 110vh) rotate(var(--rot)); opacity: .9; } }
@media (prefers-reduced-motion: reduce) {
  .gb-complete, .gb-complete-card, .gb-complete-ring svg, .gb-complete-word span, .gb-complete-ring b { animation: none !important; opacity: 1 !important; transform: none !important; }
  .gb-complete-ring circle { animation: none !important; stroke: #2F7D55; }
}

/* ---------- the mark in the middle of the empty home screen (Kevin, 2026-10-02:
   "there is a white border around the black icon ... that same icon is used in
   the center of the homscreen"): the dark tile itself, full size, no white frame. ---------- */
#home-view .empty-board .empty-mark,
:root[data-al-theme="night"] #home-view .empty-board .empty-mark {
  background: url("assets/automata-app-icon.png") center / cover no-repeat !important;
  border: 0 !important; border-radius: 22px !important;
  box-shadow: 0 2px 0 rgba(0, 0, 0, .25), 0 14px 30px rgba(43, 40, 44, .28) !important;
}

/* Dark charcoal ledge so raised buttons still stand off the stones home. */
body.stones-on .gb-toast {
  background: #1C1916;
  color: #F3EEE6;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .5), 0 0 0 3px rgba(255, 106, 26, .45);
}
body.stones-on .gb-complete-card {
  --al-surface: #1C1916;
  --al-ink: #F3EEE6;
  --al-muted: #B7AB9E;
  --al-red: #FF6A1A;
  --al-ok: #3DDC84;
  --al-line-soft: #3C352F;
}

/* Kevin, 2026-10-15: Signed In, Help, and Settings are one small chip.
   The encrypted light sits in the corner above them. The student picture is a
   portrait, and the add-mark does not cover a photo that is already there. */
html body.stones-on #home-view #appBanner .al-banner-right {
  top: 12px !important;
  right: 16px !important;
  bottom: 14px !important;
  height: auto !important;
  transform: none !important;
  display: grid !important;
  grid-template-columns: auto auto auto;
  grid-template-rows: auto 1fr;
  justify-content: end;
  align-items: end;
  column-gap: 6px;
  row-gap: 0;
}
html body.stones-on #home-view #appBanner .app-banner-left {
  display: flex !important;
  align-items: center !important;
  gap: 14px !important;
}
html body.stones-on #home-view #appBanner .app-banner-identity {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
}
html body.stones-on #home-view #appBanner .al-banner-right > #bannerDataLock:not(#hs0):not(#hs1):not(#hs2):not(#hs3):not(#hs4):not(#hs5) {
  grid-row: 1;
  grid-column: 1 / -1;
  justify-self: end;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  background: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  font: 700 9px/1 var(--al-head) !important;
}
html body.stones-on #home-view #appBanner .al-banner-right > #bannerAccountBtn:not(#hs0):not(#hs1):not(#hs2):not(#hs3):not(#hs4):not(#hs5),
html body.stones-on #home-view #appBanner .al-banner-right > #caseloadHelpLink:not(#hs0):not(#hs1):not(#hs2):not(#hs3):not(#hs4):not(#hs5),
html body.stones-on #home-view #appBanner .al-banner-right > #settingsOpenBtn:not(#hs0):not(#hs1):not(#hs2):not(#hs3):not(#hs4):not(#hs5) {
  grid-row: 2;
  box-sizing: border-box !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 22px !important;
  min-height: 22px !important;
  max-height: 22px !important;
  width: auto !important;
  padding: 0 8px !important;
  margin: 0 !important;
  border-radius: 6px !important;
  border: 1px solid #3C352F !important;
  background: #1C1916 !important;
  background-image: none !important;
  color: #F3EEE6 !important;
  font: 600 10px/1 var(--al-head) !important;
  letter-spacing: .01em !important;
  text-transform: none !important;
  text-decoration: none !important;
  box-shadow: none !important;
  text-shadow: none !important;
  transform: none !important;
  filter: none !important;
  gap: 5px !important;
}
html body.stones-on #home-view #appBanner .al-banner-right > #bannerAccountBtn:not(#hs0):not(#hs1):not(#hs2):not(#hs3):not(#hs4):not(#hs5)::before {
  width: 5px !important;
  height: 5px !important;
  flex: 0 0 5px !important;
  background: #F3EEE6 !important;
}
html body.stones-on #home-view #appBanner #stonesPhotoTile:not(#hs0):not(#hs1):not(#hs2):not(#hs3):not(#hs4):not(#hs5) {
  width: 72px !important;
  height: 72px !important;
  min-height: 0 !important;
  max-height: 72px !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 50% !important;
  background: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  overflow: visible !important;
  transform: none !important;
  filter: none !important;
}
html body.stones-on #home-view #appBanner #stonesPhotoTile .spt-pic {
  width: 72px !important;
  height: 72px !important;
  border-radius: 50% !important;
  background-position: center center !important;
  background-size: cover !important;
  border: 2px solid #3C352F !important;
  box-sizing: border-box !important;
}
html body.stones-on #home-view #appBanner #stonesPhotoTile.has-photo .spt-plus { display: none !important; }
html body.stones-on #home-view #appBanner #stonesPhotoTile:not(.has-photo) .spt-pic::before,
html body.stones-on #home-view #appBanner #stonesPhotoTile:not(.has-photo) .spt-pic::after { display: none !important; }

/* Kevin, 2026-10-24: "remove the orange and green bars because they dont do anything" -
   the small per-aspect bars under each step name and list heading are gone. */
.gb-segs, body.stones-on .gb-segs, html body.stones-on #home-view .gb-segs { display: none !important; }

/* ---------- finishing a step, made plain (Kevin, 2026-10-29) ----------
   "the COMPLETED box is outlined in GREEN, A GREEN LINE IS DRAWN FROM THE
   COMPLETED BOX TO THE UNLOCKED BOX, and the rolling light moves to scroll
   around the perimeter of the UNLOCKED section." */
body.stones-on #home-view .stone.is-done:not(#gb0) {
  border-color: #3FB56E !important;
  box-shadow: 0 0 0 1px rgba(63, 181, 110, .55), 0 0 18px rgba(63, 181, 110, .14) !important;
}
body.stones-on #home-view .stone.is-done:not(#gb0) .stone-num { background: #2F7D55 !important; color: #fff !important; border-color: #3FB56E !important; }
/* the green trail stays between finished steps */
body.stones-on #home-view .gb-wire.lit:not(#gb0) i { background: #3FB56E !important; box-shadow: 0 0 8px rgba(63, 181, 110, .6) !important; }

/* the rolling light: a bright spot running round the edge of the step to do */
body.stones-on #home-view .stone.is-now:not(.is-done)::before,
body.stones-on #stonesAuto.is-now::before {
  content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none;
  border-radius: inherit; padding: 3px;
  background: conic-gradient(from var(--gb-a), transparent 0deg, transparent 220deg, rgba(240, 122, 58, .2) 260deg, rgba(240, 122, 58, .7) 300deg, #F07A3A 325deg, #FFE3CC 342deg, #F07A3A 354deg, transparent 360deg);
  filter: drop-shadow(0 0 6px rgba(240, 122, 58, .8));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  animation: gbOrbit 3.2s linear infinite;
  opacity: 1; transition: opacity .45s ease;
}
body.stones-on #stonesAuto { position: relative; }
/* while the green line is still on its way, the light waits */
body.stones-on #home-view .stone.gb-wait::before,
body.stones-on #stonesAuto.gb-wait::before { opacity: 0 !important; }

/* the straight line from the finished step to the one it opened, then the
   new step's edge drawn round in green */
.gb-link { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 900; overflow: visible; }
.gb-link line { stroke: #3FB56E; stroke-width: 4; stroke-linecap: round; filter: drop-shadow(0 0 6px rgba(63, 181, 110, .85)); }
.gb-link .gb-edge { fill: none; stroke: #3FB56E; stroke-width: 3; filter: drop-shadow(0 0 8px rgba(63, 181, 110, .9)); }
.gb-link circle { fill: #8FE3B0; filter: drop-shadow(0 0 6px rgba(63, 181, 110, .95)); transition: opacity .3s ease; }
.gb-link.out { opacity: 0; transition: opacity .9s ease; }

@media (prefers-reduced-motion: reduce) {
  body.stones-on #home-view .stone.is-now::before, body.stones-on #stonesAuto.is-now::before { animation: none; }
  .gb-link { display: none; }
}

/* ---------- a step is not shown until it is unlocked (Kevin, 2026-10-29) ---------- */
body.stones-on #home-view .stone.is-later:not(#gb0):not(#gb1):not(#gb2):not(#gb3):not(#gb4):not(#gb5),
body.stones-on #home-view .stone.gb-hold:not(#gb0):not(#gb1):not(#gb2):not(#gb3):not(#gb4):not(#gb5) { display: none !important; }
body.stones-on #home-view .gb-wire:has(+ .stone.is-later),
body.stones-on #home-view .gb-wire:has(+ .stone.gb-hold) { display: none !important; }
body.stones-on #home-view .stone.gb-born { animation: gbBorn .8s cubic-bezier(.2, .8, .2, 1) both !important; }
@keyframes gbBorn { from { opacity: 0; transform: translateY(-10px) scale(.97); } to { opacity: 1; transform: none; } }

/* Run AUTOMATA's box turns green when the run is done, and stays green once signed */
body.stones-on #stonesAuto.is-run-done:not(#gb0) {
  border-color: #3FB56E !important;
  box-shadow: 0 0 0 1px rgba(63, 181, 110, .55), 0 0 18px rgba(63, 181, 110, .14) !important;
}

/* ---------- calm motion ---------- */
/* a box's contents fade in as it slides open, and out as it folds */
body.stones-on #home-view .stone .stone-inner { opacity: 0; transition: opacity .3s ease; }
body.stones-on #home-view .stone.is-open .stone-inner { opacity: 1; transition: opacity .45s ease .15s; }
/* a softer press: down, then a small settle (no spring) */
@keyframes gbBounce { 0% { transform: translateY(2px) scale(.99); } 60% { transform: translateY(-1.5px); } 100% { transform: translateY(-1px); } }
body.stones-on #home-view button.gb-bounce { animation: gbBounce .32s cubic-bezier(.25, .8, .35, 1) !important; }
/* the student's name fades in when they are picked */
body.stones-on #appBanner #bannerName.bn-in { animation: bnIn .6s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes bnIn { from { opacity: 0; transform: translateY(4px); filter: blur(2px); } to { opacity: 1; transform: none; filter: none; } }

/* ---------- smooth progress ---------- */
body.stones-on #home-view .status-job-fill, .gb-run-fill, .gb-stage-fill, .gb-sub-fill { transition: width .35s linear !important; }
.stones-ring-dial circle { transition: stroke-dashoffset .5s linear !important; }

/* ---------- finish moments ---------- */
/* Run AUTOMATA done: a green sweep across the whole screen */
.gb-sweep { position: fixed; inset: 0; z-index: 950; pointer-events: none; overflow: hidden; }
.gb-sweep::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 45vw;
  background: linear-gradient(100deg, transparent 0%, rgba(63, 181, 110, 0) 15%, rgba(63, 181, 110, .22) 45%, rgba(143, 227, 176, .35) 52%, rgba(63, 181, 110, .22) 60%, transparent 100%);
  transform: translateX(-50vw); animation: gbSweepAll 1.5s cubic-bezier(.45, .05, .25, 1) forwards;
}
.gb-sweep span {
  position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%); padding: 12px 22px; border-radius: 14px;
  background: #211F24; border: 1px solid #3FB56E; color: #EDE9EA; box-shadow: 0 0 30px rgba(63, 181, 110, .35);
  font: 800 18px/1.2 var(--al-head, Montserrat, sans-serif); letter-spacing: .02em; white-space: nowrap;
  animation: gbSweepWord 2.6s ease both;
}
.gb-sweep span b { color: #3FB56E; }
@keyframes gbSweepAll { to { transform: translateX(155vw); } }
@keyframes gbSweepWord { 0% { opacity: 0; transform: translate(-50%, -40%) scale(.96); } 18%, 75% { opacity: 1; transform: translate(-50%, -50%) scale(1); } 100% { opacity: 0; transform: translate(-50%, -56%); } }
@media (prefers-reduced-motion: reduce) {
  .gb-sweep, body.stones-on #home-view .stone.gb-born, body.stones-on #appBanner #bannerName.bn-in { animation: none !important; }
  .gb-sweep::before { display: none; }
}

/* Report Complete ring: a step still open stays dark (Kevin, 2026-10-30) */
.gb-complete-ring circle.gb-off, .gb-complete-ring circle.gb-off:not(#gb0) { animation: none !important; stroke: #3A363D !important; filter: none !important; }
