body.ksft-page,
#screen-soundforge .ksft-shell,
.ksft-shell {
  color-scheme: light;
  --ksft-ink: #172557;
  --ksft-sky: #7be2ff;
  --ksft-mint: #47e68c;
  --ksft-lemon: #fff467;
  --ksft-coral: #ff6f99;
  --ksft-purple: #a855f7;
  --ksft-orange: #ff9c2b;
  --ksft-shadow: 0 10px 0 rgba(23, 37, 87, 0.22), 0 26px 44px rgba(23, 37, 87, 0.18);
  --ksft-font: "Comic Sans MS", "Chalkboard SE", "Comic Neue", system-ui, sans-serif;
}

body.ksft-page,
body.ksft-page *,
#screen-soundforge .ksft-shell,
#screen-soundforge .ksft-shell *,
.ksft-shell,
.ksft-shell * {
  box-sizing: border-box;
}

body.ksft-page {
  margin: 0;
  width: 100vw;
  height: 100dvh;
  min-height: 100svh;
  overflow: hidden;
  color: var(--ksft-ink);
  font-family: var(--ksft-font);
  background:
    radial-gradient(circle at 10% 12%, rgba(255, 111, 153, 0.8) 0 10%, transparent 11%),
    radial-gradient(circle at 86% 13%, rgba(255, 244, 103, 0.92) 0 11%, transparent 12%),
    radial-gradient(circle at 14% 86%, rgba(71, 230, 140, 0.82) 0 11%, transparent 12%),
    radial-gradient(circle at 90% 88%, rgba(168, 85, 247, 0.72) 0 13%, transparent 14%),
    linear-gradient(135deg, #73dcff 0%, #fff36c 40%, #ff8aca 73%, #b989ff 100%);
}

#screen-soundforge.screen.active {
  display: grid;
  align-items: stretch;
  justify-items: center;
  width: 100%;
  min-height: calc(100dvh - 182px);
  padding: 0 0 10px;
  overflow: hidden;
}

#screen-soundforge .ksft-shell {
  width: min(1180px, calc(100vw - 32px));
  height: min(760px, calc(100dvh - 188px));
  max-height: calc(100dvh - 188px);
  min-height: 0;
  margin: 0 auto;
}

.ksft-shell {
  width: min(1180px, calc(100vw - 16px));
  height: min(800px, calc(100dvh - 16px));
  max-height: calc(100dvh - 16px);
  margin: 8px auto;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 12px;
  border: 5px solid var(--ksft-ink);
  border-radius: 32px;
  background:
    radial-gradient(circle at 22% 16%, rgba(255, 255, 255, 0.72) 0 11%, transparent 12%),
    radial-gradient(circle at 83% 20%, rgba(255, 255, 255, 0.55) 0 9%, transparent 10%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(255, 253, 225, 0.92));
  box-shadow: var(--ksft-shadow);
  padding: 14px;
  overflow: hidden;
}

.ksft-topbar {
  display: grid;
  grid-template-columns: auto auto auto 1fr;
  align-items: center;
  gap: 12px;
}

.ksft-home-btn {
  justify-self: start;
  display: grid;
  place-items: center;
  width: 74px;
  aspect-ratio: 1;
  border: 5px solid var(--ksft-ink);
  border-radius: 24px;
  background: linear-gradient(180deg, #ffffff, var(--ksft-sky) 70%, #38bdf8);
  box-shadow: 0 7px 0 #177db7, 0 14px 24px rgba(23, 37, 87, 0.16);
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease, opacity 160ms ease;
  touch-action: manipulation;
}

.ksft-home-btn:hover,
.ksft-home-btn:focus-visible {
  outline: 5px solid rgba(255, 255, 255, 0.78);
  outline-offset: 4px;
  transform: translateY(-3px);
}

.ksft-home-btn:active {
  transform: translateY(3px);
  box-shadow: 0 4px 0 rgba(23, 37, 87, 0.24), 0 10px 18px rgba(23, 37, 87, 0.16);
}

.ksft-home-btn.is-active {
  background: linear-gradient(180deg, #fffef2, var(--ksft-lemon) 68%, var(--ksft-orange));
  box-shadow: 0 7px 0 #d96a00, 0 14px 24px rgba(23, 37, 87, 0.16);
}

.ksft-home-icon {
  position: relative;
  width: 38px;
  height: 31px;
  border: 5px solid var(--ksft-ink);
  border-top: 0;
  border-radius: 6px 6px 10px 10px;
  background: #fff8d8;
}

.ksft-home-icon::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -24px;
  width: 34px;
  aspect-ratio: 1;
  transform: translateX(-50%) rotate(45deg);
  border-left: 5px solid var(--ksft-ink);
  border-top: 5px solid var(--ksft-ink);
  border-radius: 5px 0 0;
  background: var(--ksft-coral);
}

.ksft-home-icon::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -5px;
  width: 12px;
  height: 18px;
  transform: translateX(-50%);
  border: 4px solid var(--ksft-ink);
  border-bottom: 0;
  border-radius: 9px 9px 0 0;
  background: var(--ksft-lemon);
}

.ksft-wordlab-home-btn,
.ksft-wordlab-home-link {
  border: 4px solid var(--ksft-ink);
  border-radius: 22px;
  background: linear-gradient(180deg, #ffffff, #fff7ae 68%, #ffd54a);
  color: var(--ksft-ink);
  box-shadow: 0 6px 0 #dc8a00, 0 12px 20px rgba(23, 37, 87, 0.14);
  cursor: pointer;
  font: inherit;
  font-weight: 900;
  line-height: 1;
  text-decoration: none;
  transition: transform 140ms ease, box-shadow 140ms ease, opacity 160ms ease;
  touch-action: manipulation;
}

.ksft-wordlab-home-btn {
  min-height: 62px;
  padding: 0 18px;
  font-size: clamp(1rem, 1.8vw, 1.35rem);
}

.ksft-wordlab-home-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 0 18px;
  font-size: clamp(1rem, 2vw, 1.25rem);
}

.ksft-wordlab-home-btn:hover,
.ksft-wordlab-home-btn:focus-visible,
.ksft-wordlab-home-link:hover,
.ksft-wordlab-home-link:focus-visible {
  outline: 4px solid rgba(255, 255, 255, 0.78);
  outline-offset: 3px;
  transform: translateY(-2px);
}

.ksft-wordlab-home-btn:active,
.ksft-wordlab-home-link:active {
  transform: translateY(2px);
  box-shadow: 0 3px 0 #dc8a00, 0 8px 14px rgba(23, 37, 87, 0.14);
}

.ksft-family-badge {
  justify-self: center;
  display: grid;
  place-items: center;
  min-width: 132px;
  min-height: 74px;
  border: 5px solid var(--ksft-ink);
  border-radius: 28px;
  background: linear-gradient(180deg, #ffffff, var(--ksft-lemon) 68%, var(--ksft-orange));
  box-shadow: 0 8px 0 #d96a00, 0 0 0 10px rgba(255, 255, 255, 0.34);
}

.ksft-family-badge span {
  display: block;
  color: var(--ksft-ink);
  font-size: clamp(3.4rem, 6vw, 5.2rem);
  font-weight: 900;
  line-height: 0.85;
  text-transform: lowercase;
}

.ksft-family-badge.is-test-badge {
  min-width: 118px;
  min-height: 64px;
  background: linear-gradient(180deg, #ffffff, #dff8ff 70%, var(--ksft-sky));
  box-shadow: 0 8px 0 #177db7, 0 0 0 10px rgba(255, 255, 255, 0.34);
}

.ksft-family-badge.is-test-badge span {
  font-size: clamp(1.55rem, 3vw, 2.25rem);
  letter-spacing: 0;
  text-transform: none;
}

.ksft-round-dots {
  display: flex;
  gap: 8px;
  justify-content: end;
}

.ksft-progress-pill {
  display: inline-grid;
  place-items: center;
  min-width: 116px;
  min-height: 54px;
  border: 4px solid var(--ksft-ink);
  border-radius: 999px;
  background: linear-gradient(180deg, #ffffff, #dff8ff);
  box-shadow: 0 6px 0 rgba(23, 37, 87, 0.18);
  color: var(--ksft-ink);
  font-size: clamp(1.35rem, 2.4vw, 2rem);
  font-weight: 900;
  line-height: 1;
}

.ksft-level-switcher {
  justify-self: center;
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 6px;
  border: 4px solid var(--ksft-ink);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 6px 0 rgba(23, 37, 87, 0.16);
}

.ksft-level-switch {
  display: grid;
  place-items: center;
  width: 58px;
  aspect-ratio: 1;
  border: 4px solid var(--ksft-ink);
  border-radius: 22px;
  background: linear-gradient(180deg, #ffffff, #dff8ff);
  color: var(--ksft-ink);
  cursor: pointer;
  font: inherit;
  font-size: clamp(1.5rem, 2.4vw, 2.2rem);
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 5px 0 rgba(23, 37, 87, 0.22);
  transition: transform 140ms ease, box-shadow 140ms ease;
  touch-action: manipulation;
}

.ksft-level-switch.is-active {
  background: linear-gradient(180deg, #fffef2, var(--ksft-lemon) 68%, var(--ksft-orange));
  box-shadow: 0 5px 0 #d96a00;
}

.ksft-level-switch:hover,
.ksft-level-switch:focus-visible {
  outline: 4px solid rgba(255, 255, 255, 0.78);
  outline-offset: 3px;
  transform: translateY(-2px);
}

.ksft-home-screen {
  min-height: 0;
  display: grid;
  place-items: center;
  border: 4px solid var(--ksft-ink);
  border-radius: 28px;
  background:
    radial-gradient(circle at 20% 18%, rgba(255, 244, 103, 0.55) 0 18%, transparent 19%),
    radial-gradient(circle at 82% 72%, rgba(255, 111, 153, 0.36) 0 20%, transparent 21%),
    linear-gradient(180deg, #ffffff, #dff8ff 70%, #dbffc9);
  box-shadow: 0 7px 0 rgba(23, 37, 87, 0.17);
  padding: 18px;
}

.ksft-home-card {
  width: min(100%, 860px);
  display: grid;
  gap: 16px;
  justify-items: center;
}

.ksft-home-title {
  justify-self: center;
  color: var(--ksft-ink);
  font-size: clamp(2.4rem, 5vw, 4.8rem);
  font-weight: 900;
  line-height: 0.95;
  text-shadow: 3px 4px 0 var(--ksft-lemon);
}

.ksft-parent-view-link {
  color: var(--ksft-ink);
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-weight: 900;
  text-decoration-thickness: 3px;
  text-underline-offset: 5px;
}

.ksft-home-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.ksft-home-family,
.ksft-home-level,
.ksft-home-words {
  border: 4px solid var(--ksft-ink);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 7px 0 rgba(23, 37, 87, 0.15);
  padding: 14px;
}

.ksft-home-current {
  display: grid;
  gap: 12px;
  justify-items: center;
}

.ksft-family-badge.is-home-family {
  min-width: 176px;
  min-height: 100px;
}

.ksft-home-progress {
  min-width: min(100%, 360px);
  border: 4px solid var(--ksft-ink);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 6px 0 rgba(23, 37, 87, 0.16);
  padding: 10px 22px;
  text-align: center;
  color: var(--ksft-ink);
  font-size: clamp(2rem, 4vw, 3.4rem);
  font-weight: 900;
  line-height: 1;
  text-transform: lowercase;
}

.ksft-home-play {
  min-width: min(100%, 320px);
  min-height: 108px;
  border: 6px solid var(--ksft-ink);
  border-radius: 38px;
  background: linear-gradient(180deg, #ffffff, #a7f77f 68%, #45c65c);
  color: var(--ksft-ink);
  cursor: pointer;
  font: inherit;
  font-size: clamp(2.4rem, 5vw, 4.2rem);
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 10px 0 #238842, 0 20px 30px rgba(23, 37, 87, 0.18);
  transition: transform 160ms ease, box-shadow 160ms ease, opacity 180ms ease;
  touch-action: manipulation;
}

.ksft-home-play:hover,
.ksft-home-play:focus-visible {
  outline: 5px solid rgba(255, 255, 255, 0.78);
  outline-offset: 4px;
  transform: translateY(-4px) scale(1.02);
}

.ksft-home-label {
  margin-bottom: 10px;
  color: var(--ksft-ink);
  font-size: clamp(1.2rem, 2vw, 1.6rem);
  font-weight: 900;
  text-align: center;
}

.ksft-family-grid,
.ksft-level-grid,
.ksft-word-grid {
  display: grid;
  gap: 12px;
}

.ksft-family-grid {
  grid-template-columns: repeat(4, minmax(92px, 1fr));
}

.ksft-level-grid {
  grid-template-columns: repeat(3, minmax(120px, 1fr));
}

.ksft-word-grid {
  grid-template-columns: repeat(3, minmax(120px, 1fr));
}

.ksft-family-btn,
.ksft-level-btn,
.ksft-word-btn {
  border: 4px solid var(--ksft-ink);
  border-radius: 22px;
  background: linear-gradient(180deg, #ffffff, #dff8ff);
  color: var(--ksft-ink);
  cursor: pointer;
  font: inherit;
  font-weight: 900;
  box-shadow: 0 5px 0 rgba(23, 37, 87, 0.22);
  transition: transform 140ms ease, box-shadow 140ms ease, opacity 160ms ease;
  touch-action: manipulation;
}

.ksft-family-btn {
  min-height: 76px;
  padding: 2px 10px;
  font-size: clamp(2.2rem, 4.6vw, 4rem);
  line-height: 1;
  text-transform: lowercase;
}

.ksft-level-btn {
  min-height: 76px;
  padding: 4px 10px;
  font-size: clamp(1.35rem, 2.6vw, 2.2rem);
}

.ksft-word-btn {
  min-height: 74px;
  padding: 4px 10px;
  font-size: clamp(1.8rem, 3.8vw, 3.2rem);
  line-height: 1;
  text-transform: lowercase;
}

.ksft-level-btn.is-active,
.ksft-family-btn.is-active,
.ksft-word-btn.is-active {
  background: linear-gradient(180deg, #fffef2, var(--ksft-lemon) 68%, var(--ksft-orange));
  box-shadow: 0 5px 0 #d96a00;
}

.ksft-level-btn:hover,
.ksft-level-btn:focus-visible,
.ksft-family-btn:hover,
.ksft-family-btn:focus-visible,
.ksft-word-btn:hover,
.ksft-word-btn:focus-visible {
  outline: 4px solid rgba(255, 255, 255, 0.75);
  outline-offset: 3px;
  transform: translateY(-2px);
}

.ksft-level-btn:disabled,
.ksft-family-btn:disabled,
.ksft-word-btn:disabled {
  cursor: default;
  opacity: 0.56;
  transform: none;
}

.ksft-dot {
  width: 18px;
  aspect-ratio: 1;
  border: 3px solid var(--ksft-ink);
  border-radius: 50%;
  background: white;
}

.ksft-dot.is-done {
  background: var(--ksft-mint);
}

.ksft-dot.is-current {
  background: var(--ksft-lemon);
  transform: scale(1.22);
}

.ksft-scene {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(240px, 0.92fr) minmax(420px, 1.35fr);
  gap: 18px;
  align-items: stretch;
}

.ksft-shell.is-final-word .ksft-scene {
  grid-template-columns: 1fr;
}

.ksft-shell.is-final-word .ksft-friend-zone {
  display: none;
}

.ksft-shell.is-final-word .ksft-build-zone {
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  padding: clamp(16px, 2.4vw, 28px);
}

.ksft-friend-zone,
.ksft-build-zone {
  position: relative;
  min-height: 0;
  border: 4px solid var(--ksft-ink);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 7px 0 rgba(23, 37, 87, 0.17);
  overflow: hidden;
}

.ksft-friend-zone {
  display: grid;
  place-items: end center;
  padding: 20px 12px 12px;
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 244, 103, 0.78) 0 28%, transparent 29%),
    linear-gradient(180deg, #c9f8ff, #fff3b8);
}

.ksft-build-zone {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  padding: 14px;
  background:
    radial-gradient(circle at 78% 24%, rgba(255, 111, 153, 0.24) 0 17%, transparent 18%),
    linear-gradient(180deg, #ffffff, #dff8ff 70%, #dbffc9);
}

.ksft-soundsmith {
  position: relative;
  width: min(100%, 300px);
  height: 350px;
  animation: ksft-breathe 2.6s ease-in-out infinite;
}

.ksft-ear {
  position: absolute;
  top: 70px;
  width: 72px;
  height: 92px;
  border: 5px solid var(--ksft-ink);
  border-radius: 56% 44% 56% 44%;
  background: linear-gradient(145deg, #8af2bd, #36bd83);
}

.ksft-ear.left {
  left: 37px;
  transform: rotate(-24deg);
}

.ksft-ear.right {
  right: 37px;
  transform: rotate(24deg) scaleX(-1);
}

.ksft-body {
  position: absolute;
  left: 50%;
  bottom: 18px;
  width: 210px;
  height: 236px;
  transform: translateX(-50%);
  border: 6px solid var(--ksft-ink);
  border-radius: 48% 48% 42% 42%;
  background:
    radial-gradient(circle at 35% 25%, rgba(255, 255, 255, 0.9) 0 9%, transparent 10%),
    linear-gradient(145deg, #8ff2bd, #41c488 55%, #2a9d73);
  box-shadow: inset 0 -24px 34px rgba(23, 74, 71, 0.22), 0 14px 20px rgba(23, 37, 87, 0.16);
}

.ksft-face {
  position: absolute;
  left: 50%;
  top: 40px;
  width: 148px;
  height: 112px;
  transform: translateX(-50%);
  border: 5px solid var(--ksft-ink);
  border-radius: 48% 48% 42% 42%;
  background: #fff8d8;
}

.ksft-eye {
  position: absolute;
  top: 35px;
  width: 24px;
  height: 30px;
  border-radius: 50%;
  background: var(--ksft-ink);
  animation: ksft-blink 4.4s infinite;
}

.ksft-eye.left {
  left: 33px;
}

.ksft-eye.right {
  right: 33px;
}

.ksft-smile {
  position: absolute;
  left: 50%;
  top: 73px;
  width: 54px;
  height: 24px;
  transform: translateX(-50%);
  border-bottom: 6px solid var(--ksft-ink);
  border-radius: 0 0 42px 42px;
}

.ksft-scarf {
  position: absolute;
  left: 50%;
  top: 146px;
  width: 136px;
  height: 32px;
  transform: translateX(-50%) rotate(-3deg);
  border: 5px solid var(--ksft-ink);
  border-radius: 999px;
  background: linear-gradient(90deg, var(--ksft-coral), var(--ksft-orange));
}

.ksft-hand {
  position: absolute;
  top: 168px;
  width: 60px;
  height: 58px;
  border: 5px solid var(--ksft-ink);
  border-radius: 50%;
  background: #fff8d8;
}

.ksft-hand.left {
  left: 33px;
}

.ksft-hand.right {
  right: 18px;
  animation: ksft-wave 2.8s ease-in-out infinite;
  transform-origin: 20% 80%;
}

.ksft-wand {
  position: absolute;
  right: -2px;
  top: 132px;
  width: 100px;
  height: 16px;
  border: 4px solid var(--ksft-ink);
  border-radius: 999px;
  background: #ffd775;
  transform: rotate(-34deg);
  transform-origin: left center;
}

.ksft-wand::after {
  content: "";
  position: absolute;
  right: -19px;
  top: 50%;
  width: 34px;
  aspect-ratio: 1;
  transform: translateY(-50%);
  border: 4px solid var(--ksft-ink);
  border-radius: 50%;
  background: var(--ksft-lemon);
  box-shadow: 0 0 0 9px rgba(255, 244, 103, 0.38);
}

.ksft-sparkles {
  position: absolute;
  inset: 10px 0 auto;
  height: 140px;
  pointer-events: none;
}

.ksft-sparkles span {
  position: absolute;
  width: 18px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--ksft-lemon);
  opacity: 0;
}

.ksft-sparkles span:nth-child(1) {
  left: 18%;
  top: 24px;
}

.ksft-sparkles span:nth-child(2) {
  right: 18%;
  top: 14px;
  background: var(--ksft-coral);
}

.ksft-sparkles span:nth-child(3) {
  left: 50%;
  top: 2px;
  background: var(--ksft-sky);
}

.ksft-message {
  position: absolute;
  left: 50%;
  bottom: 18px;
  min-width: 100px;
  transform: translateX(-50%);
  border: 4px solid var(--ksft-ink);
  border-radius: 999px;
  background: white;
  padding: 8px 14px;
  text-align: center;
  font-size: clamp(1.2rem, 2vw, 1.6rem);
  font-weight: 900;
  opacity: 0;
  transition: opacity 180ms ease, transform 180ms ease;
}

.ksft-message.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(-8px);
}

.ksft-family-chip {
  justify-self: center;
  display: grid;
  place-items: center;
  min-width: 156px;
  min-height: 92px;
  border: 5px solid var(--ksft-ink);
  border-radius: 30px;
  background: linear-gradient(180deg, var(--ksft-lemon), var(--ksft-orange));
  box-shadow: 0 8px 0 #d96a00, 0 0 0 11px rgba(255, 255, 255, 0.34);
  color: var(--ksft-ink);
  font-size: clamp(4rem, 8vw, 6rem);
  font-weight: 900;
  line-height: 1;
  text-transform: lowercase;
}

.ksft-word-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 0;
  padding-bottom: 94px;
}

.ksft-word-stage.is-picture,
.ksft-word-stage.is-celebrate,
.ksft-word-stage.is-complete {
  align-items: stretch;
  padding-bottom: 94px;
}

.ksft-shell.is-final-word .ksft-word-stage {
  width: 100%;
  grid-template-rows: minmax(0, 1fr) auto;
  align-items: stretch;
  gap: clamp(12px, 2vh, 18px);
  padding-bottom: 0;
}

.ksft-build {
  position: relative;
  width: min(100%, 520px);
  min-height: 210px;
  display: grid;
  place-items: center;
}

.ksft-level2-ready-cue {
  position: absolute;
  left: 50%;
  top: 38px;
  display: none;
  align-items: center;
  justify-content: center;
  gap: clamp(12px, 2vw, 20px);
  transform: translateX(-50%);
  pointer-events: none;
}

.ksft-level2-ready-cue span {
  width: clamp(112px, 17vw, 146px);
  min-height: clamp(96px, 15vh, 126px);
  border: 6px dashed rgba(23, 37, 87, 0.45);
  border-radius: 34px;
  background:
    radial-gradient(circle at 28% 22%, rgba(255, 255, 255, 0.86) 0 18%, transparent 19%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(223, 248, 255, 0.62));
  box-shadow: inset 0 0 0 6px rgba(255, 255, 255, 0.42), 0 8px 0 rgba(23, 37, 87, 0.1);
}

.ksft-level2-ready-cue b {
  width: clamp(28px, 4vw, 42px);
  height: 10px;
  border-radius: 999px;
  background: var(--ksft-ink);
  box-shadow:
    0 -18px 0 -2px rgba(255, 244, 103, 0.86),
    0 18px 0 -2px rgba(71, 230, 140, 0.6);
}

.ksft-shell.is-lesson-mode .ksft-word-stage.is-ready .ksft-level2-ready-cue {
  display: flex;
  animation: ksft-ready-cue-in 360ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.ksft-shell.is-lesson-mode .ksft-choices:not(.is-demo-complete) {
  align-items: center;
  padding-inline: clamp(4px, 2vw, 20px);
}

.ksft-shell.is-lesson-mode .ksft-choices:not(.is-demo-complete) .ksft-choice {
  min-height: clamp(92px, 12vh, 120px);
  border-radius: clamp(28px, 4vw, 42px);
}

.ksft-shell.is-final-word .ksft-word-stage .ksft-build {
  width: 100%;
  min-height: clamp(300px, 45vh, 390px);
  grid-template-columns: minmax(0, 1.22fr) minmax(220px, 0.78fr);
  gap: clamp(18px, 3vw, 38px);
  align-items: center;
  justify-items: stretch;
  padding: clamp(16px, 2.4vw, 28px);
  border: 6px solid rgba(23, 37, 87, 0.88);
  border-radius: 42px;
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.9) 0 16%, transparent 17%),
    radial-gradient(circle at 86% 24%, rgba(255, 111, 153, 0.26) 0 18%, transparent 19%),
    linear-gradient(180deg, #ffffff, #fef9d8 58%, #dff8ff);
  box-shadow: 0 12px 0 rgba(23, 37, 87, 0.18), inset 0 0 0 8px rgba(255, 255, 255, 0.42);
}

.ksft-demo-letter-row,
.ksft-demo-chunk-row {
  position: absolute;
  left: 50%;
  top: 36px;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 12px;
  align-items: center;
  justify-content: center;
  transform: translateX(-50%);
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
  writing-mode: horizontal-tb;
}

.ksft-demo-letter-row span,
.ksft-demo-chunk-row span {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  place-items: center;
  width: 96px;
  min-height: 104px;
  border: 6px solid var(--ksft-ink);
  border-radius: 30px;
  color: var(--ksft-ink);
  font-size: clamp(3.1rem, 6vw, 5rem);
  font-weight: 900;
  line-height: 1;
  text-transform: lowercase;
  opacity: 0;
  transform: translateY(18px) scale(0.78);
  box-shadow: 0 9px 0 rgba(23, 37, 87, 0.22), 0 16px 24px rgba(23, 37, 87, 0.16);
}

.ksft-demo-letter-row span {
  background: linear-gradient(180deg, #ffffff, var(--ksft-sky));
}

.ksft-demo-chunk-row span {
  background: linear-gradient(180deg, #fffdf2, var(--ksft-lemon));
}

.ksft-word-stage.is-demo-letter .ksft-demo-letter-row,
.ksft-word-stage.is-demo-chunk .ksft-demo-chunk-row {
  opacity: 1;
}

.ksft-word-stage.is-demo-letter .ksft-demo-letter-row span.is-visible,
.ksft-word-stage.is-demo-chunk .ksft-demo-chunk-row span.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  transition: opacity 190ms ease, transform 290ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.ksft-word-stage.is-demo-letter .ksft-demo-letter-row span.is-current,
.ksft-word-stage.is-demo-chunk .ksft-demo-chunk-row span.is-current {
  transform: translateY(-8px) scale(1.08);
  outline: 7px solid rgba(255, 244, 103, 0.76);
  outline-offset: 3px;
}

.ksft-start-bubble,
.ksft-chunk-target,
.ksft-word-badge {
  display: grid;
  place-items: center;
  width: 150px;
  min-width: 150px;
  min-height: 128px;
  border: 6px solid var(--ksft-ink);
  border-radius: 36px;
  color: var(--ksft-ink);
  font-weight: 900;
  line-height: 1;
  text-transform: lowercase;
  box-shadow: 0 10px 0 rgba(23, 37, 87, 0.22), 0 18px 26px rgba(23, 37, 87, 0.16);
}

.ksft-chunk-target,
.ksft-test-picked,
.ksft-chunk-choice {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 0.02em;
  white-space: nowrap;
  writing-mode: horizontal-tb;
}

.ksft-chunk-letter {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  place-items: center;
  min-width: 0.55em;
  border-radius: 0.18em;
  padding: 0 0.015em;
  transition: transform 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

.ksft-chunk-letter.is-lit {
  transform: translateY(-0.07em) scale(1.15);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 0 0 0.09em rgba(255, 244, 103, 0.78), 0 0.08em 0.14em rgba(23, 37, 87, 0.16);
}

.ksft-start-bubble {
  position: absolute;
  left: calc(50% - 178px);
  top: 38px;
  background: linear-gradient(180deg, #ffffff, var(--ksft-sky));
  font-size: clamp(4.2rem, 9vw, 7rem);
  opacity: 0;
  transform: translate(-190px, 60px) scale(0.7);
}

.ksft-chunk-target {
  position: absolute;
  left: calc(50% + 28px);
  top: 38px;
  background: linear-gradient(180deg, #fffdf2, var(--ksft-lemon));
  font-size: clamp(4rem, 8vw, 6.4rem);
  opacity: 0;
  transform: translateX(0) scale(1);
}

.ksft-word-badge {
  background: linear-gradient(180deg, #fffdf2, #ffe85c);
  font-size: clamp(4.2rem, 8vw, 6.6rem);
  min-width: min(92%, 440px);
  opacity: 0;
  transform: scale(0.88);
}

.ksft-image-pop {
  position: absolute;
  right: 10px;
  bottom: 2px;
  width: min(36%, 190px);
  min-width: 128px;
  opacity: 0;
  transform: translateY(16px) scale(0.82);
}

.ksft-shell.is-final-word .ksft-word-stage .ksft-word-badge {
  position: relative;
  justify-self: stretch;
  min-width: 0;
  width: 100%;
  min-height: clamp(210px, 32vh, 310px);
  border-width: 8px;
  border-radius: 48px;
  background:
    radial-gradient(circle at 17% 17%, rgba(255, 255, 255, 0.92) 0 13%, transparent 14%),
    linear-gradient(180deg, #fffdf2, #fff467 56%, #ffcf45);
  font-size: clamp(6rem, 14vw, 12rem);
  letter-spacing: 0;
  box-shadow: 0 15px 0 #d96a00, 0 28px 42px rgba(23, 37, 87, 0.2);
}

.ksft-shell.is-final-word .ksft-word-stage .ksft-image-pop {
  position: relative;
  right: auto;
  bottom: auto;
  justify-self: stretch;
  display: grid;
  place-items: center;
  width: 100%;
  min-width: 0;
  min-height: clamp(200px, 32vh, 310px);
  border: 7px solid var(--ksft-ink);
  border-radius: 48px;
  background:
    radial-gradient(circle at 30% 22%, rgba(255, 255, 255, 0.92) 0 16%, transparent 17%),
    linear-gradient(180deg, #ffffff, #dff8ff 72%, #dbffc9);
  box-shadow: 0 14px 0 rgba(23, 37, 87, 0.2), 0 24px 34px rgba(23, 37, 87, 0.15);
  padding: clamp(8px, 1.8vw, 18px);
}

.ksft-image-pop svg {
  display: block;
  width: min(100%, 340px);
  height: auto;
  filter: drop-shadow(0 10px 10px rgba(23, 37, 87, 0.16));
}

.ksft-word-stage.is-letter .ksft-start-bubble {
  opacity: 1;
  transform: translate(0, 0) scale(1);
  transition: transform 440ms cubic-bezier(0.2, 0.8, 0.2, 1), opacity 220ms ease;
}

.ksft-word-stage.is-chunk .ksft-start-bubble {
  opacity: 1;
  transform: translate(0, 0) scale(1.03);
  transition: transform 620ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.ksft-word-stage.is-chunk .ksft-chunk-target {
  opacity: 1;
  transform: translateX(0) scale(1.03);
  transition: transform 620ms cubic-bezier(0.2, 0.8, 0.2, 1), opacity 180ms ease;
}

.ksft-word-stage.is-word .ksft-start-bubble {
  opacity: 0;
}

.ksft-word-stage.is-word .ksft-chunk-target,
.ksft-word-stage.is-picture .ksft-chunk-target,
.ksft-word-stage.is-celebrate .ksft-chunk-target,
.ksft-word-stage.is-complete .ksft-chunk-target {
  opacity: 0;
}

.ksft-word-stage.is-word .ksft-word-badge {
  opacity: 1;
  transform: scale(1);
  transition: transform 380ms cubic-bezier(0.2, 0.8, 0.2, 1), opacity 220ms ease;
}

.ksft-word-stage.is-picture .ksft-word-badge,
.ksft-word-stage.is-celebrate .ksft-word-badge,
.ksft-word-stage.is-complete .ksft-word-badge {
  opacity: 1;
  transform: scale(1);
}

.ksft-word-stage.is-picture .ksft-image-pop,
.ksft-word-stage.is-celebrate .ksft-image-pop,
.ksft-word-stage.is-complete .ksft-image-pop {
  opacity: 1;
  transform: translateY(0) scale(1);
  transition: transform 420ms cubic-bezier(0.2, 0.8, 0.2, 1), opacity 220ms ease;
}

.ksft-word-stage.is-celebrate .ksft-word-badge {
  animation: ksft-word-party 640ms ease both;
}

@keyframes ksft-ready-cue-in {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(14px) scale(0.92);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
  }
}

.ksft-replay-controls {
  position: absolute;
  left: 50%;
  bottom: 4px;
  display: flex;
  gap: 18px;
  transform: translateX(-50%);
}

.ksft-shell.is-final-word .ksft-replay-controls {
  position: relative;
  left: auto;
  bottom: auto;
  justify-self: center;
  display: flex;
  gap: 12px;
  transform: none;
  padding: 6px 10px 10px;
  border: 4px solid rgba(23, 37, 87, 0.9);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 8px 0 rgba(23, 37, 87, 0.16);
}

.ksft-replay {
  display: grid;
  place-items: center;
  width: 76px;
  aspect-ratio: 1;
  border: 5px solid var(--ksft-ink);
  border-radius: 23px;
  background: linear-gradient(180deg, #ffffff, var(--ksft-sky) 72%, #38bdf8);
  box-shadow: 0 8px 0 #177db7, 0 16px 22px rgba(23, 37, 87, 0.16);
  cursor: pointer;
  transition: transform 150ms ease, box-shadow 150ms ease, opacity 180ms ease;
}

.ksft-replay.is-slow {
  background: linear-gradient(180deg, #ffffff, #a7f77f 72%, #45c65c);
  box-shadow: 0 9px 0 #238842, 0 18px 26px rgba(23, 37, 87, 0.17);
}

.ksft-replay:hover,
.ksft-replay:focus-visible {
  outline: 5px solid rgba(255, 255, 255, 0.78);
  outline-offset: 4px;
  transform: translateY(-4px) scale(1.03);
}

.ksft-replay:active {
  transform: translateY(4px) scale(0.98);
  box-shadow: 0 5px 0 rgba(23, 37, 87, 0.24), 0 12px 20px rgba(23, 37, 87, 0.16);
}

.ksft-replay:disabled {
  cursor: default;
  opacity: 0.58;
  transform: none;
}

.ksft-play-icon {
  width: 0;
  height: 0;
  margin-left: 7px;
  border-top: 18px solid transparent;
  border-bottom: 18px solid transparent;
  border-left: 29px solid var(--ksft-ink);
}

.ksft-slow-icon {
  position: relative;
  width: 48px;
  height: 34px;
  border: 5px solid var(--ksft-ink);
  border-radius: 52% 48% 44% 48%;
  background: #6ce480;
}

.ksft-slow-icon::before {
  content: "";
  position: absolute;
  right: -20px;
  top: 7px;
  width: 22px;
  aspect-ratio: 1;
  border: 5px solid var(--ksft-ink);
  border-radius: 50%;
  background: #93f2a0;
}

.ksft-slow-icon::after {
  content: "";
  position: absolute;
  left: 9px;
  bottom: -13px;
  width: 38px;
  height: 14px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 7px 7px, var(--ksft-ink) 0 6px, transparent 7px),
    radial-gradient(circle at 31px 7px, var(--ksft-ink) 0 6px, transparent 7px);
}

.ksft-slow-icon span {
  position: absolute;
  left: 10px;
  top: 8px;
  width: 15px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.72);
}

.ksft-test-stage {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 8px;
  min-height: 0;
}

.ksft-test-listen {
  display: flex;
  justify-content: center;
}

.ksft-hear-test {
  width: clamp(58px, 8vw, 76px);
  border-radius: 28px;
}

.ksft-test-build {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(12px, 3vw, 30px);
  min-height: clamp(170px, 28vh, 250px);
  padding: 8px;
}

.ksft-shell.is-test-mode:not(.is-final-word) .ksft-build-zone {
  grid-template-rows: minmax(0, 1fr);
  padding: clamp(8px, 1.5vw, 12px);
}

.ksft-shell.is-test-mode:not(.is-final-word) .ksft-test-stage {
  height: 100%;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: clamp(4px, 1vw, 8px);
  overflow: hidden;
}

.ksft-shell.is-test-mode:not(.is-final-word) .ksft-test-build {
  min-height: 0;
  height: 100%;
  padding: 2px 4px;
}

.ksft-shell.is-test-mode:not(.is-final-word) .ksft-hear-test {
  width: clamp(50px, 7.2vw, 64px);
  border-width: 4px;
  border-radius: 22px;
  box-shadow: 0 5px 0 #177db7, 0 10px 16px rgba(23, 37, 87, 0.14);
}

.ksft-shell.is-test-mode:not(.is-final-word) .ksft-hear-test .ksft-play-icon {
  margin-left: 5px;
  border-top-width: 14px;
  border-bottom-width: 14px;
  border-left-width: 23px;
}

.ksft-shell.is-final-word .ksft-test-stage {
  min-height: 0;
}

.ksft-shell.is-final-word .ksft-test-listen,
.ksft-shell.is-final-word .ksft-correction {
  display: none;
}

.ksft-shell.is-final-word .ksft-test-build {
  min-height: clamp(360px, 58vh, 590px);
  grid-template-columns: minmax(0, 1.2fr) minmax(220px, 0.8fr);
  gap: clamp(16px, 3vw, 34px);
  align-items: center;
  justify-items: stretch;
  padding: clamp(10px, 2vw, 22px);
}

.ksft-test-letter,
.ksft-test-picked,
.ksft-test-word {
  display: grid;
  place-items: center;
  border: 6px solid var(--ksft-ink);
  color: var(--ksft-ink);
  font-weight: 900;
  line-height: 1;
  text-transform: lowercase;
  box-shadow: 0 10px 0 rgba(23, 37, 87, 0.22), 0 18px 26px rgba(23, 37, 87, 0.16);
}

.ksft-test-letter {
  width: clamp(104px, 17vw, 150px);
  min-height: clamp(92px, 15vw, 128px);
  border-radius: clamp(26px, 4vw, 36px);
  background: linear-gradient(180deg, #ffffff, var(--ksft-sky));
  font-size: clamp(3.3rem, 8vw, 6.6rem);
}

.ksft-test-picked {
  width: clamp(124px, 20vw, 168px);
  min-height: clamp(92px, 15vw, 128px);
  border-radius: clamp(26px, 4vw, 36px);
  background: linear-gradient(180deg, #fffdf2, var(--ksft-lemon));
  font-size: clamp(3.1rem, 7.4vw, 6rem);
  opacity: 0;
  transform: translateX(10px) scale(0.92);
  pointer-events: none;
}

.ksft-test-picked.is-visible {
  opacity: 1;
  transform: translateX(0) scale(1.03);
  transition: transform 300ms ease, opacity 180ms ease;
}

.ksft-test-word {
  min-width: min(92%, 440px);
  min-height: clamp(100px, 16vw, 128px);
  border-radius: clamp(28px, 4vw, 36px);
  background: linear-gradient(180deg, #fffdf2, #ffe85c);
  font-size: clamp(3.4rem, 7.4vw, 6.4rem);
  opacity: 0;
  transform: scale(0.88);
}

.ksft-test-stage.is-test-word .ksft-test-letter,
.ksft-test-stage.is-test-word .ksft-test-picked,
.ksft-test-stage.is-test-celebrate .ksft-test-letter,
.ksft-test-stage.is-test-celebrate .ksft-test-picked,
.ksft-test-stage.is-test-complete .ksft-test-letter,
.ksft-test-stage.is-test-complete .ksft-test-picked {
  display: none;
}

.ksft-test-word.is-visible {
  opacity: 1;
  transform: scale(1);
  transition: transform 360ms cubic-bezier(0.2, 0.8, 0.2, 1), opacity 180ms ease;
}

.ksft-shell.is-test-mode:not(.is-final-word) .ksft-test-letter,
.ksft-shell.is-test-mode:not(.is-final-word) .ksft-test-picked,
.ksft-shell.is-test-mode:not(.is-final-word) .ksft-test-word {
  flex: 0 0 auto;
  border-width: 5px;
  box-shadow: 0 7px 0 rgba(23, 37, 87, 0.2), 0 12px 20px rgba(23, 37, 87, 0.14);
}

.ksft-shell.is-test-mode:not(.is-final-word) .ksft-test-letter {
  width: clamp(82px, 14vw, 116px);
  min-height: clamp(70px, 12vw, 94px);
  font-size: clamp(2.8rem, 6.6vw, 5rem);
}

.ksft-shell.is-test-mode:not(.is-final-word) .ksft-test-picked {
  width: clamp(104px, 17vw, 138px);
  min-height: clamp(70px, 12vw, 94px);
  font-size: clamp(2.7rem, 6.2vw, 4.8rem);
}

.ksft-shell.is-test-mode:not(.is-final-word) .ksft-test-word {
  min-height: clamp(78px, 13vw, 104px);
  font-size: clamp(3rem, 6.7vw, 5.2rem);
}

.ksft-shell.is-test-mode:not(.is-final-word) .ksft-test-picked:not(.is-visible),
.ksft-shell.is-test-mode:not(.is-final-word) .ksft-test-word:not(.is-visible),
.ksft-shell.is-test-mode:not(.is-final-word) .ksft-test-image:not(.is-visible) {
  display: none;
}

.ksft-test-image {
  position: absolute;
  right: 10px;
  bottom: 2px;
  width: min(36%, 190px);
  min-width: 128px;
  opacity: 0;
  transform: translateY(16px) scale(0.82);
}

.ksft-test-image svg {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 10px 10px rgba(23, 37, 87, 0.16));
}

.ksft-test-image.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  transition: transform 420ms cubic-bezier(0.2, 0.8, 0.2, 1), opacity 220ms ease;
}

.ksft-shell.is-final-word .ksft-test-letter,
.ksft-shell.is-final-word .ksft-test-picked {
  display: none;
}

.ksft-shell.is-final-word .ksft-test-word.is-visible {
  position: relative;
  justify-self: stretch;
  min-width: 0;
  width: 100%;
  min-height: clamp(240px, 46vh, 430px);
  border-width: 8px;
  border-radius: 48px;
  font-size: clamp(6rem, 15vw, 13.5rem);
  box-shadow: 0 14px 0 rgba(23, 37, 87, 0.24), 0 24px 36px rgba(23, 37, 87, 0.18);
}

.ksft-shell.is-final-word .ksft-test-image.is-visible {
  position: relative;
  right: auto;
  bottom: auto;
  justify-self: stretch;
  display: grid;
  place-items: center;
  width: 100%;
  min-width: 0;
  min-height: clamp(220px, 42vh, 400px);
  border: 7px solid var(--ksft-ink);
  border-radius: 48px;
  background:
    radial-gradient(circle at 30% 22%, rgba(255, 255, 255, 0.92) 0 16%, transparent 17%),
    linear-gradient(180deg, #ffffff, #dff8ff 72%, #dbffc9);
  box-shadow: 0 14px 0 rgba(23, 37, 87, 0.2), 0 24px 34px rgba(23, 37, 87, 0.15);
  padding: clamp(8px, 1.8vw, 18px);
}

.ksft-shell.is-final-word .ksft-test-image svg {
  width: min(100%, 340px);
}

.ksft-correction {
  align-self: end;
  min-height: 66px;
  border: 4px solid var(--ksft-ink);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.9);
  padding: 10px 14px;
  text-align: center;
  font-size: clamp(1.15rem, 2vw, 1.55rem);
  font-weight: 900;
  line-height: 1.25;
  box-shadow: 0 6px 0 rgba(23, 37, 87, 0.14);
}

.ksft-correction span {
  border-radius: 12px;
  padding: 0 4px;
}

.ksft-correction span.is-lit {
  background: var(--ksft-lemon);
  box-shadow: 0 0 0 4px rgba(255, 244, 103, 0.44);
}

.ksft-choices {
  display: grid;
  grid-template-columns: repeat(3, minmax(104px, 1fr));
  gap: clamp(10px, 1.7vw, 16px);
  align-items: stretch;
}

.ksft-choices.is-test-options {
  grid-template-columns: repeat(3, minmax(104px, 1fr));
}

.ksft-choices.is-test-complete {
  display: flex;
  grid-template-columns: none;
  gap: 10px;
  justify-content: center;
  align-items: center;
}

.ksft-choices.is-demo-complete {
  display: flex;
  grid-template-columns: none;
  gap: 10px;
  justify-content: center;
  align-items: center;
}

.ksft-choices.is-demo-watching {
  min-height: 0;
}

.ksft-choice {
  min-height: clamp(86px, 14vh, 116px);
  border: clamp(4px, 0.7vw, 6px) solid var(--ksft-ink);
  border-radius: clamp(26px, 4vw, 38px);
  background: linear-gradient(180deg, #ffffff, #ffe85c 70%, #ffb33b);
  color: var(--ksft-ink);
  cursor: pointer;
  font: inherit;
  font-size: clamp(3.15rem, 7vw, 6rem);
  font-weight: 900;
  line-height: 1;
  text-transform: lowercase;
  box-shadow: 0 10px 0 #d96a00, 0 20px 30px rgba(23, 37, 87, 0.18);
  transition: transform 160ms ease, box-shadow 160ms ease, opacity 180ms ease;
  touch-action: manipulation;
}

.ksft-choice:nth-child(2) {
  background: linear-gradient(180deg, #ffffff, #8ff2bd 70%, #47e68c);
  box-shadow: 0 10px 0 #13a958, 0 20px 30px rgba(23, 37, 87, 0.18);
}

.ksft-choice:nth-child(3) {
  background: linear-gradient(180deg, #ffffff, #ff9ecd 70%, #ff6f99);
  box-shadow: 0 10px 0 #d94172, 0 20px 30px rgba(23, 37, 87, 0.18);
}

.ksft-choice:hover,
.ksft-choice:focus-visible {
  outline: 5px solid rgba(255, 255, 255, 0.78);
  outline-offset: 4px;
  transform: translateY(-4px) scale(1.02);
}

.ksft-choice:active {
  transform: translateY(5px) scale(0.98);
  box-shadow: 0 5px 0 rgba(23, 37, 87, 0.25), 0 12px 20px rgba(23, 37, 87, 0.16);
}

.ksft-choice:disabled {
  cursor: default;
  opacity: 0.54;
  transform: none;
}

.ksft-chunk-choice {
  text-transform: lowercase;
}

.ksft-chunk-choice.is-hint {
  outline: 8px solid var(--ksft-lemon);
  outline-offset: 4px;
  transform: translateY(-5px) scale(1.03);
}

.ksft-next-test {
  display: grid;
  place-items: center;
  width: clamp(68px, 9vw, 82px);
  min-width: clamp(68px, 9vw, 82px);
  min-height: 0;
  aspect-ratio: 1;
  border: 5px solid var(--ksft-ink);
  border-radius: 26px;
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.94) 0 18%, transparent 19%),
    linear-gradient(180deg, #ffffff, #a7f77f 68%, #45c65c);
  color: var(--ksft-ink);
  cursor: pointer;
  font: inherit;
  font-size: clamp(0.95rem, 1.6vw, 1.22rem);
  font-weight: 900;
  line-height: 1;
  text-transform: lowercase;
  box-shadow: 0 8px 0 #238842, 0 16px 22px rgba(23, 37, 87, 0.16);
  transition: transform 160ms ease, box-shadow 160ms ease, opacity 180ms ease;
  touch-action: manipulation;
}

.ksft-next-test:nth-child(1) {
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.94) 0 18%, transparent 19%),
    linear-gradient(180deg, #ffffff, #dff8ff 68%, #7be2ff);
  box-shadow: 0 8px 0 #177db7, 0 16px 22px rgba(23, 37, 87, 0.16);
}

.ksft-next-test:nth-child(2) {
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.94) 0 18%, transparent 19%),
    linear-gradient(180deg, #ffffff, #fff467 68%, #ff9c2b);
  box-shadow: 0 8px 0 #d96a00, 0 16px 22px rgba(23, 37, 87, 0.16);
}

.ksft-next-test:hover,
.ksft-next-test:focus-visible {
  outline: 5px solid rgba(255, 255, 255, 0.78);
  outline-offset: 4px;
  transform: translateY(-4px) scale(1.02);
}

.ksft-next-test:disabled {
  cursor: default;
  opacity: 0.58;
  transform: none;
}

.ksft-shell.is-celebrating .ksft-soundsmith {
  animation: ksft-celebrate 720ms ease both;
}

.ksft-shell.is-celebrating .ksft-hand.left {
  animation: ksft-clap-left 360ms ease-in-out 2;
}

.ksft-shell.is-celebrating .ksft-hand.right {
  animation: ksft-clap-right 360ms ease-in-out 2;
}

.ksft-shell.is-celebrating .ksft-sparkles span {
  animation: ksft-spark 720ms ease both;
}

.ksft-shell.is-thinking .ksft-soundsmith {
  animation: ksft-think 700ms ease both;
}

.ksft-shell.is-thinking .ksft-start-bubble {
  animation: ksft-soft-return 680ms ease both;
}

@keyframes ksft-breathe {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-6px) scale(1.018);
  }
}

@media (max-width: 720px) {
  #screen-soundforge.screen.active {
    min-height: calc(100dvh - 172px);
    padding-bottom: 8px;
  }

  #screen-soundforge .ksft-shell {
    width: min(100%, calc(100vw - 16px));
    height: calc(100dvh - 178px);
    max-height: calc(100dvh - 178px);
    min-height: 0;
    margin: 8px auto;
  }
}

@keyframes ksft-blink {
  0%,
  92%,
  100% {
    transform: scaleY(1);
  }
  95% {
    transform: scaleY(0.12);
  }
}

@keyframes ksft-wave {
  0%,
  100% {
    transform: rotate(0deg);
  }
  45% {
    transform: rotate(-14deg);
  }
}

@keyframes ksft-celebrate {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  42% {
    transform: translateY(-30px) scale(1.06);
  }
}

@keyframes ksft-clap-left {
  50% {
    transform: translate(34px, -10px) rotate(18deg);
  }
}

@keyframes ksft-clap-right {
  50% {
    transform: translate(-34px, -10px) rotate(-18deg);
  }
}

@keyframes ksft-spark {
  0% {
    opacity: 0;
    transform: translateY(16px) scale(0.5);
  }
  45% {
    opacity: 1;
    transform: translateY(-18px) scale(1.25);
  }
  100% {
    opacity: 0;
    transform: translateY(-45px) scale(0.7);
  }
}

@keyframes ksft-think {
  0%,
  100% {
    transform: rotate(0deg);
  }
  40% {
    transform: rotate(-5deg);
  }
  70% {
    transform: rotate(4deg);
  }
}

@keyframes ksft-soft-return {
  0% {
    opacity: 1;
    transform: translate(140px, -8px) scale(0.8);
  }
  100% {
    opacity: 0;
    transform: translate(-190px, 60px) scale(0.7);
  }
}

@keyframes ksft-word-party {
  0%,
  100% {
    transform: rotate(0deg) scale(1);
  }
  25% {
    transform: rotate(-3deg) scale(1.06);
  }
  55% {
    transform: rotate(3deg) scale(1.04);
  }
}

@media (max-width: 760px) {
  body.ksft-page {
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
  }

  .ksft-shell {
    width: calc(100vw - 16px);
    height: calc(100dvh - 16px);
    max-height: calc(100dvh - 16px);
    min-height: 0;
    margin: 8px auto;
  }

  .ksft-topbar {
    grid-template-columns: auto auto 1fr auto;
  }

  .ksft-family-badge {
    min-width: 104px;
    min-height: 64px;
  }

  .ksft-level-switcher {
    grid-column: 1 / -1;
    justify-self: center;
  }

  .ksft-round-dots {
    justify-content: end;
  }

  .ksft-scene {
    grid-template-columns: 1fr;
  }

  .ksft-soundsmith {
    height: 280px;
  }

  .ksft-choices {
    grid-template-columns: 1fr;
  }
}
