:root {
  color-scheme: light;
  --cream: #fffaf2;
  --cream-deep: #f7eadb;
  --paper: #fffefa;
  --paper-pink: #fff3f8;
  --ink: #35162d;
  --muted: #6f5868;
  --plum: #72164d;
  --plum-dark: #511039;
  --pink: #d93482;
  --pink-dark: #b71f68;
  --pink-soft: #ffe0ed;
  --teal: #12867f;
  --teal-dark: #096761;
  --teal-soft: #dff6ef;
  --gold: #f2b847;
  --gold-dark: #9b6610;
  --gold-soft: #fff0c7;
  --danger: #a93b55;
  --danger-soft: #fff0f2;
  --line: #e8d7df;
  --line-strong: #d9bfcb;
  --shadow-sm: 0 3px 0 rgba(81, 16, 57, 0.07);
  --shadow-md: 0 13px 34px rgba(81, 16, 57, 0.11);
  --shadow-lg: 0 24px 64px rgba(81, 16, 57, 0.16);
  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 30px;
  --radius-pill: 999px;
  --content: 1160px;
  --font-rounded: ui-rounded, "Avenir Next Rounded", "Arial Rounded MT Bold",
    "Nunito Sans", "Trebuchet MS", system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  --font-body: "Avenir Next", "Trebuchet MS", system-ui, -apple-system,
    BlinkMacSystemFont, "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  scroll-behavior: smooth;
  background: var(--cream);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 5% 4%, rgba(217, 52, 130, 0.1), transparent 25rem),
    radial-gradient(circle at 96% 22%, rgba(18, 134, 127, 0.1), transparent 30rem),
    linear-gradient(180deg, #fffdf8 0%, var(--cream) 52%, #fff7ed 100%);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  content: "";
  opacity: 0.3;
  background-image:
    linear-gradient(rgba(114, 22, 77, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(114, 22, 77, 0.035) 1px, transparent 1px);
  background-size: 38px 38px;
  mask-image: linear-gradient(to bottom, black, transparent 74%);
}

button,
input,
output {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

a {
  color: var(--plum);
}

img {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3,
strong {
  text-wrap: balance;
}

h1,
h2,
h3 {
  color: var(--ink);
  font-family: var(--font-rounded);
  line-height: 1.08;
  letter-spacing: -0.035em;
}

h1 {
  margin-bottom: 1rem;
  font-size: clamp(2.25rem, 5.2vw, 4.8rem);
}

h2 {
  margin-bottom: 0.75rem;
  font-size: clamp(1.65rem, 3.1vw, 2.65rem);
}

h3 {
  margin-bottom: 0.55rem;
  font-size: clamp(1.2rem, 2vw, 1.48rem);
}

p {
  color: var(--muted);
}

::selection {
  color: white;
  background: var(--plum);
}

:where(a, button, input):focus-visible {
  outline: 4px solid var(--gold);
  outline-offset: 3px;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
  filter: saturate(0.5);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  padding: 0.7rem 1rem;
  color: white;
  background: var(--plum-dark);
  border: 2px solid white;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-md);
  font-family: var(--font-rounded);
  font-weight: 800;
  text-decoration: none;
}

.app-shell {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
}

#main-content {
  flex: 1;
}

#main-content:focus {
  outline: none;
}

.page-shell {
  width: min(var(--content), calc(100% - 2.5rem));
  margin-inline: auto;
  padding-block: clamp(2rem, 5vw, 4.75rem);
}

.panel {
  background: rgba(255, 254, 250, 0.94);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.site-header {
  position: relative;
  z-index: 20;
  display: grid;
  width: min(var(--content), calc(100% - 2.5rem));
  min-height: 82px;
  align-items: center;
  gap: 1rem;
  grid-template-columns: minmax(0, 1fr) auto auto;
  margin: 1rem auto 0;
  padding: 0.75rem 0.9rem;
  background: rgba(255, 254, 250, 0.88);
  border: 1px solid rgba(217, 191, 203, 0.86);
  border-radius: 24px;
  box-shadow: 0 10px 28px rgba(81, 16, 57, 0.08);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  width: fit-content;
  min-height: 48px;
  align-items: center;
  gap: 0.75rem;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 50px;
  height: 50px;
  flex: 0 0 auto;
  place-items: center;
  color: white;
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.35), transparent 32%),
    linear-gradient(135deg, var(--pink), var(--plum));
  border: 3px solid white;
  border-radius: 16px 16px 16px 6px;
  box-shadow: 0 5px 0 var(--gold), 0 8px 18px rgba(114, 22, 77, 0.18);
  font-family: var(--font-rounded);
  font-size: 0.95rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  transform: rotate(-2deg);
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-family: var(--font-rounded);
  font-size: 1.02rem;
  line-height: 1.15;
}

.brand small {
  margin-top: 0.2rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.25rem;
  background: var(--paper-pink);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
}

.nav-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 0.9rem;
  color: var(--plum);
  border-radius: var(--radius-pill);
  font-family: var(--font-rounded);
  font-size: 0.88rem;
  font-weight: 800;
  text-decoration: none;
  transition: color 160ms ease, background 160ms ease, transform 160ms ease;
}

.nav-link:hover {
  color: white;
  background: var(--plum);
  transform: translateY(-1px);
}

.progress-pill,
.chip {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.35rem 0.72rem;
  color: var(--plum-dark);
  background: var(--gold-soft);
  border: 1px solid rgba(155, 102, 16, 0.25);
  border-radius: var(--radius-pill);
  font-family: var(--font-rounded);
  font-size: 0.77rem;
  font-weight: 900;
  letter-spacing: 0.015em;
  line-height: 1.15;
}

.progress-pill {
  min-height: 44px;
  padding-inline: 0.85rem;
  white-space: nowrap;
}

.progress-pill span {
  color: var(--gold-dark);
  font-size: 1.1rem;
}

.primary-button,
.secondary-button,
.text-button,
.filter-button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.72rem 1.15rem;
  border: 2px solid transparent;
  border-radius: var(--radius-pill);
  cursor: pointer;
  font-family: var(--font-rounded);
  font-weight: 900;
  line-height: 1.15;
  text-align: center;
  text-decoration: none;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    color 160ms ease,
    background 160ms ease,
    border-color 160ms ease;
}

.primary-button {
  color: white;
  background: linear-gradient(135deg, var(--pink), var(--plum));
  border-color: var(--plum);
  box-shadow: 0 5px 0 var(--plum-dark), 0 10px 24px rgba(114, 22, 77, 0.2);
}

.primary-button:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 7px 0 var(--plum-dark), 0 14px 28px rgba(114, 22, 77, 0.22);
}

.primary-button:active:not(:disabled) {
  transform: translateY(3px);
  box-shadow: 0 2px 0 var(--plum-dark);
}

.secondary-button {
  color: var(--plum);
  background: var(--paper);
  border-color: var(--plum);
  box-shadow: 0 4px 0 rgba(114, 22, 77, 0.18);
}

.secondary-button:hover:not(:disabled) {
  color: white;
  background: var(--plum);
  transform: translateY(-2px);
}

.text-button {
  min-height: 44px;
  padding-inline: 0.75rem;
  color: var(--plum);
  background: transparent;
  border-color: transparent;
  text-decoration: underline;
  text-decoration-color: rgba(114, 22, 77, 0.32);
  text-underline-offset: 0.25em;
}

.text-button:hover:not(:disabled) {
  color: var(--pink-dark);
  background: var(--pink-soft);
  text-decoration-color: currentColor;
}

.text-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 0.35rem;
  color: var(--plum);
  border-radius: 8px;
  font-family: var(--font-rounded);
  font-weight: 900;
  text-decoration: underline;
  text-decoration-color: rgba(114, 22, 77, 0.25);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.28em;
}

.text-link:hover {
  color: var(--pink-dark);
  text-decoration-color: currentColor;
}

.eyebrow {
  margin-bottom: 0.65rem;
  color: var(--pink-dark);
  font-family: var(--font-rounded);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.13em;
  line-height: 1.3;
  text-transform: uppercase;
}

.hero {
  display: grid;
  min-height: min(680px, calc(100vh - 98px));
  align-items: center;
  gap: clamp(2rem, 5vw, 5.5rem);
  grid-template-columns: minmax(0, 1.03fr) minmax(380px, 0.97fr);
  padding-top: clamp(2.75rem, 6vw, 6rem);
}

.hero-copy {
  position: relative;
  z-index: 2;
}

.hero-copy::before {
  position: absolute;
  z-index: -1;
  top: -1.4rem;
  left: -1.7rem;
  width: 82px;
  height: 82px;
  content: "";
  opacity: 0.75;
  background:
    radial-gradient(circle at center, var(--gold) 0 12%, transparent 13%),
    conic-gradient(
      from 0deg,
      transparent 0 9%,
      var(--gold) 10% 14%,
      transparent 15% 34%,
      var(--gold) 35% 39%,
      transparent 40% 59%,
      var(--gold) 60% 64%,
      transparent 65% 84%,
      var(--gold) 85% 89%,
      transparent 90%
    );
  border-radius: 50%;
}

.hero-title {
  max-width: 760px;
  margin-bottom: 1.15rem;
}

.hero-title em {
  position: relative;
  display: inline-block;
  color: var(--pink-dark);
  font-style: normal;
  white-space: nowrap;
}

.hero-title em::after {
  position: absolute;
  z-index: -1;
  right: -0.06em;
  bottom: 0.03em;
  left: -0.06em;
  height: 0.22em;
  content: "";
  background: var(--gold);
  border-radius: var(--radius-pill);
  transform: rotate(-1.5deg);
}

.hero-lede {
  max-width: 620px;
  margin-bottom: 1.6rem;
  color: #594252;
  font-size: clamp(1.05rem, 1.8vw, 1.25rem);
  line-height: 1.7;
}

.hero-actions,
.results-footer-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.8rem;
}

.privacy-note {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 1.25rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}

.privacy-note span {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  color: white;
  background: var(--teal);
  border-radius: 50%;
  font-size: 0.72rem;
}

.bridge-scene {
  position: relative;
  min-height: 430px;
  overflow: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 77% 15%, rgba(255, 255, 255, 0.7) 0 7%, transparent 7.4%),
    linear-gradient(180deg, #fce5ee 0 61%, #cbeee7 61% 100%);
  border: 2px solid var(--line-strong);
  border-radius: 42px 42px 24px 24px;
  box-shadow: var(--shadow-lg);
  isolation: isolate;
}

.bridge-scene::before {
  position: absolute;
  right: -10%;
  bottom: -18%;
  left: -10%;
  height: 52%;
  content: "";
  background:
    radial-gradient(ellipse at 50% 0%, rgba(255, 255, 255, 0.72), transparent 57%),
    repeating-radial-gradient(ellipse at 50% 110%, #67bdb1 0 7px, #53aea4 8px 15px);
  border-radius: 50% 50% 0 0;
  transform: rotate(-1deg);
}

.bridge-scene::after {
  position: absolute;
  z-index: -1;
  right: 8%;
  bottom: 17%;
  left: 8%;
  height: 160px;
  content: "";
  border: 6px solid var(--plum);
  border-bottom: 0;
  border-radius: 50% 50% 0 0;
}

.bridge-scene > p {
  position: absolute;
  z-index: 7;
  bottom: 1.05rem;
  left: 50%;
  min-width: max-content;
  margin: 0;
  padding: 0.45rem 0.85rem;
  color: var(--plum-dark);
  background: rgba(255, 254, 250, 0.9);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  font-family: var(--font-rounded);
  font-size: 0.8rem;
  font-weight: 900;
  transform: translateX(-50%);
}

.bridge-sun {
  position: absolute;
  z-index: 3;
  top: 42px;
  right: 52px;
  display: grid;
  width: 74px;
  height: 74px;
  place-items: center;
  color: var(--gold-dark);
  background: var(--gold);
  border: 6px solid rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  box-shadow: 0 0 0 10px rgba(242, 184, 71, 0.18);
  font-size: 1.8rem;
  animation: gentle-float 5s ease-in-out infinite;
}

.bridge-cloud {
  position: absolute;
  z-index: 2;
  width: 92px;
  height: 28px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: var(--radius-pill);
}

.bridge-cloud::before,
.bridge-cloud::after {
  position: absolute;
  bottom: 0;
  content: "";
  background: inherit;
  border-radius: 50%;
}

.bridge-cloud::before {
  left: 15px;
  width: 38px;
  height: 38px;
}

.bridge-cloud::after {
  right: 17px;
  width: 48px;
  height: 48px;
}

.cloud-one {
  top: 93px;
  left: 36px;
}

.cloud-two {
  top: 164px;
  right: 22px;
  opacity: 0.72;
  transform: scale(0.7);
}

.bridge-deck {
  position: absolute;
  z-index: 6;
  right: 16%;
  bottom: 36%;
  left: 16%;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 5px;
  transform: perspective(300px) rotateX(7deg);
}

.bridge-deck::before,
.bridge-deck::after {
  position: absolute;
  right: -8%;
  left: -8%;
  height: 6px;
  content: "";
  background: var(--plum);
  border-radius: var(--radius-pill);
}

.bridge-deck::before {
  top: -17px;
  transform: rotate(1deg);
}

.bridge-deck::after {
  bottom: -16px;
  transform: rotate(-1deg);
}

.bridge-plank {
  position: relative;
  width: 12.5%;
  height: 53px;
  background: #dac8cc;
  border: 3px solid var(--plum);
  border-radius: 8px;
  box-shadow: inset 0 -7px 0 rgba(81, 16, 57, 0.09);
  transform: rotate(var(--tilt, -1deg));
}

.bridge-plank:nth-child(even) {
  --tilt: 1.5deg;
}

.bridge-plank.is-built {
  background: linear-gradient(180deg, var(--gold), #dfa02d);
}

.bridge-bank {
  position: absolute;
  z-index: 5;
  bottom: 21%;
  display: grid;
  width: 118px;
  height: 118px;
  place-items: center;
  color: white;
  background: var(--teal-dark);
  border: 5px solid rgba(255, 255, 255, 0.55);
  border-radius: 50% 50% 34% 40%;
  box-shadow: 0 9px 0 rgba(9, 103, 97, 0.25);
  font-family: var(--font-rounded);
  font-size: 0.67rem;
  font-weight: 900;
  letter-spacing: 0.09em;
}

.bank-left {
  left: -35px;
  transform: rotate(9deg);
}

.bank-right {
  right: -35px;
  transform: rotate(-9deg);
}

.stat-row {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stat-card {
  position: relative;
  overflow: hidden;
  padding: clamp(1.05rem, 2.5vw, 1.5rem);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.stat-card::after {
  position: absolute;
  right: -16px;
  bottom: -21px;
  width: 72px;
  height: 72px;
  content: "";
  background: var(--pink-soft);
  border-radius: 50%;
}

.stat-card:nth-child(2)::after {
  background: var(--teal-soft);
}

.stat-card:nth-child(3)::after {
  background: var(--gold-soft);
}

.stat-card strong,
.stat-card span {
  position: relative;
  z-index: 1;
  display: block;
}

.stat-card strong {
  color: var(--plum);
  font-family: var(--font-rounded);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  line-height: 1;
}

.stat-card span {
  margin-top: 0.45rem;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1.25rem;
  margin: clamp(2.8rem, 6vw, 5rem) 0 1.5rem;
}

.section-heading h2,
.section-heading p {
  margin-bottom: 0;
}

.career-grid,
.results-grid {
  display: grid;
  gap: 1.15rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.career-card,
.match-card {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 255px;
  flex-direction: column;
  padding: 1.2rem;
  overflow: hidden;
  background: rgba(255, 254, 250, 0.96);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.career-card::before {
  position: absolute;
  top: -38px;
  right: -30px;
  width: 112px;
  height: 112px;
  content: "";
  background: var(--pink-soft);
  border-radius: 42% 58% 52% 48%;
  transform: rotate(17deg);
}

.career-card:nth-child(3n + 2)::before {
  background: var(--teal-soft);
}

.career-card:nth-child(3n)::before {
  background: var(--gold-soft);
}

.career-card:hover,
.career-card:focus-within {
  z-index: 2;
  border-color: var(--pink);
  box-shadow: var(--shadow-md);
  transform: translateY(-5px);
}

.career-card:focus-within {
  outline: 4px solid var(--gold);
  outline-offset: 3px;
}

.career-card-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1.2rem;
}

.career-card-top .chip {
  max-width: calc(100% - 64px);
  text-align: left;
}

.icon-bubble,
.result-icon {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  background: var(--paper-pink);
  border: 2px solid rgba(217, 52, 130, 0.25);
  border-radius: 18px;
  box-shadow: inset 0 -4px 0 rgba(114, 22, 77, 0.06);
}

.icon-bubble {
  width: 52px;
  height: 52px;
  font-size: 1.55rem;
}

.result-icon {
  width: 78px;
  height: 78px;
  border-radius: 24px;
  font-size: 2.35rem;
}

.chip-new {
  color: white;
  background: var(--pink);
  border-color: var(--pink-dark);
}

.career-card h3 {
  position: relative;
  z-index: 1;
}

.career-card > p {
  position: relative;
  z-index: 1;
  margin-bottom: 1.15rem;
  font-size: 0.93rem;
  line-height: 1.55;
}

.career-card-meta {
  display: grid;
  gap: 0.35rem;
  margin-top: auto;
  padding-top: 0.9rem;
  color: var(--muted);
  border-top: 1px dashed var(--line-strong);
  font-size: 0.78rem;
  font-weight: 800;
}

.career-card-meta span:last-child {
  color: var(--teal-dark);
}

.card-link {
  position: absolute;
  z-index: 5;
  inset: 0;
  border-radius: inherit;
  text-decoration: none;
}

.card-link:focus-visible {
  outline: none;
}

.quiz-progress {
  display: grid;
  align-items: center;
  gap: 1rem;
  grid-template-columns: 1fr minmax(240px, 0.7fr);
  margin-bottom: 1rem;
}

.quiz-progress > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.quiz-progress > div:first-child > span {
  color: var(--muted);
  font-family: var(--font-rounded);
  font-size: 0.84rem;
  font-weight: 900;
}

.progress-track,
.score-meter {
  overflow: hidden;
  background: #eadde2;
  border-radius: var(--radius-pill);
}

.progress-track {
  height: 12px;
  border: 1px solid var(--line-strong);
}

.progress-track span,
.score-meter span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--pink), var(--gold));
  border-radius: inherit;
  transition: width 280ms ease;
}

.bridge-mini {
  display: grid;
  max-width: 820px;
  gap: 0.35rem;
  grid-template-columns: repeat(8, 1fr);
  margin: 0 auto -2px;
  padding-inline: 1.5rem;
}

.bridge-mini span {
  height: 15px;
  background: #e7d8dd;
  border: 2px solid var(--line-strong);
  border-radius: 5px 5px 1px 1px;
  transform: translateY(2px);
}

.bridge-mini span.is-done {
  background: var(--gold);
  border-color: var(--gold-dark);
}

.bridge-mini span.is-current {
  background: var(--pink);
  border-color: var(--plum);
  transform: translateY(-3px);
}

.quiz-card {
  max-width: 820px;
  margin-inline: auto;
  padding: clamp(1.35rem, 4vw, 3.25rem);
}

.quiz-card h1 {
  max-width: 720px;
  font-size: clamp(1.8rem, 4.5vw, 3.15rem);
}

.question-helper {
  max-width: 680px;
  margin: -0.2rem 0 1.5rem;
  font-size: 0.94rem;
}

.question-options,
.scenario-options {
  display: grid;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.option-button {
  position: relative;
  display: grid;
  width: 100%;
  min-height: 60px;
  align-items: center;
  gap: 0.8rem;
  grid-template-columns: auto 1fr auto;
  padding: 0.7rem 0.9rem;
  color: var(--ink);
  background: var(--paper);
  border: 2px solid var(--line);
  border-radius: 16px;
  cursor: pointer;
  font-weight: 800;
  line-height: 1.35;
  text-align: left;
  transition:
    transform 150ms ease,
    background 150ms ease,
    border-color 150ms ease,
    box-shadow 150ms ease;
}

.option-button:hover:not(:disabled) {
  background: var(--paper-pink);
  border-color: var(--pink);
  box-shadow: 0 5px 0 rgba(217, 52, 130, 0.12);
  transform: translateY(-2px);
}

.option-button.is-selected {
  background: var(--pink-soft);
  border-color: var(--pink-dark);
  box-shadow: inset 5px 0 0 var(--pink);
}

.option-button.is-correct {
  background: var(--teal-soft);
  border-color: var(--teal);
}

.option-button.is-wrong {
  background: var(--danger-soft);
  border-color: var(--danger);
}

.option-button.compact {
  width: auto;
  min-height: 50px;
  grid-template-columns: auto;
  padding-inline: 1rem;
}

.option-letter,
.option-check {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 10px;
  font-family: var(--font-rounded);
  font-size: 0.82rem;
  font-weight: 900;
}

.option-letter {
  color: var(--plum);
  background: var(--pink-soft);
  border: 1px solid rgba(217, 52, 130, 0.25);
}

.option-check {
  color: white;
  background: var(--teal);
}

.option-check:empty {
  visibility: hidden;
}

.quiz-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

.quiz-note {
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 0.86rem;
  text-align: center;
}

.empty-state {
  max-width: 720px;
  margin-inline: auto;
  padding: clamp(2rem, 6vw, 4.5rem);
  text-align: center;
}

.empty-state .icon-bubble {
  margin: 0 auto 1rem;
}

.empty-state h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
}

.empty-state p {
  max-width: 530px;
  margin: 0 auto 1.5rem;
}

.result-hero {
  position: relative;
  display: grid;
  align-items: center;
  gap: clamp(1.5rem, 5vw, 4rem);
  grid-template-columns: minmax(0, 1fr) auto;
  padding: clamp(1.5rem, 4vw, 3.2rem);
  overflow: hidden;
  background:
    linear-gradient(115deg, rgba(255, 254, 250, 0.97), rgba(255, 224, 237, 0.92)),
    var(--paper);
  border: 2px solid var(--pink);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.result-hero::after {
  position: absolute;
  right: -80px;
  bottom: -110px;
  width: 280px;
  height: 280px;
  content: "";
  opacity: 0.6;
  background:
    radial-gradient(circle, transparent 0 33%, var(--gold-soft) 34% 47%, transparent 48%),
    repeating-conic-gradient(var(--gold) 0 7deg, transparent 7deg 18deg);
  border-radius: 50%;
}

.result-hero > * {
  position: relative;
  z-index: 1;
}

.result-title-row,
.career-detail-heading,
.game-heading {
  display: flex;
  align-items: center;
  gap: 1.1rem;
}

.result-title-row h1,
.result-title-row p {
  margin-bottom: 0;
}

.result-title-row h1 {
  font-size: clamp(2rem, 5vw, 3.8rem);
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-block: 1.2rem;
}

.chip-row .chip {
  color: var(--teal-dark);
  background: var(--teal-soft);
  border-color: rgba(18, 134, 127, 0.25);
}

.result-copy {
  max-width: 680px;
  margin-bottom: 1.4rem;
}

.fit-orbit {
  position: relative;
  display: grid;
  width: clamp(145px, 18vw, 190px);
  aspect-ratio: 1;
  place-items: center;
  align-content: center;
  color: var(--plum);
  background:
    radial-gradient(circle, var(--paper) 0 54%, transparent 55%),
    conic-gradient(var(--pink) 0 var(--fit-angle), rgba(255, 255, 255, 0.72) var(--fit-angle) 100%);
  border: 8px solid white;
  border-radius: 50%;
  box-shadow: 0 11px 0 rgba(114, 22, 77, 0.1), var(--shadow-md);
  transform: rotate(3deg);
}

.fit-orbit::before,
.fit-orbit::after {
  position: absolute;
  content: "✦";
  color: var(--gold-dark);
  font-size: 1.35rem;
}

.fit-orbit::before {
  top: -18px;
  left: 12px;
}

.fit-orbit::after {
  right: -15px;
  bottom: 20px;
  font-size: 1rem;
}

.fit-orbit strong,
.fit-orbit span {
  display: block;
  text-align: center;
  transform: rotate(-3deg);
}

.fit-orbit strong {
  font-family: var(--font-rounded);
  font-size: clamp(2rem, 5vw, 3.25rem);
  line-height: 1;
}

.fit-orbit span {
  max-width: 80px;
  margin-top: 0.3rem;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 900;
  line-height: 1.2;
  text-transform: uppercase;
}

.result-disclaimer {
  margin: 0.8rem auto 0;
  padding: 0.75rem 1rem;
  color: var(--muted);
  background: var(--gold-soft);
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  text-align: center;
}

.results-grid {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.match-card {
  min-height: 285px;
}

.match-card.is-top {
  background: var(--paper-pink);
  border: 2px solid var(--pink);
}

.match-rank {
  position: absolute;
  top: 1rem;
  right: 1rem;
  color: var(--plum);
  font-family: var(--font-rounded);
  font-size: 0.9rem;
  font-weight: 900;
}

.match-card .icon-bubble {
  margin-bottom: 1rem;
}

.match-card .chip {
  width: fit-content;
}

.match-card h3 {
  margin-top: 0.9rem;
}

.match-percent {
  display: block;
  margin-top: auto;
  color: var(--plum);
  font-family: var(--font-rounded);
  font-size: 1rem;
}

.score-meter {
  height: 8px;
  margin: 0.45rem 0 0.6rem;
}

.match-card > p {
  margin-bottom: 0.6rem;
  font-size: 0.87rem;
}

.results-footer-actions {
  justify-content: space-between;
  margin-top: 1.5rem;
}

.library-intro {
  display: grid;
  align-items: end;
  gap: 2rem;
  grid-template-columns: 1fr auto;
  margin-bottom: 1.75rem;
}

.library-intro h1 {
  margin-bottom: 0.75rem;
  font-size: clamp(2.35rem, 6vw, 4.5rem);
}

.library-intro p:last-child {
  max-width: 680px;
  margin-bottom: 0;
}

.library-count {
  display: grid;
  width: 132px;
  height: 132px;
  place-items: center;
  align-content: center;
  color: white;
  background: var(--teal);
  border: 6px solid var(--teal-soft);
  border-radius: 43% 57% 51% 49%;
  box-shadow: 0 7px 0 var(--teal-dark);
  transform: rotate(3deg);
}

.library-count strong,
.library-count span {
  display: block;
  transform: rotate(-3deg);
}

.library-count strong {
  font-family: var(--font-rounded);
  font-size: 2.75rem;
  line-height: 1;
}

.library-count span {
  margin-top: 0.25rem;
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
}

.library-toolbar {
  position: relative;
  z-index: 2;
  margin-bottom: 1.5rem;
  padding: 0.85rem;
  background: rgba(255, 254, 250, 0.92);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.search-field {
  display: grid;
  align-items: center;
  grid-template-columns: auto 1fr;
  margin-bottom: 0.75rem;
  color: var(--plum);
  background: white;
  border: 2px solid var(--line-strong);
  border-radius: 14px;
}

.search-field:focus-within {
  border-color: var(--pink);
  box-shadow: 0 0 0 4px rgba(242, 184, 71, 0.45);
}

.search-field > span:not(.sr-only) {
  padding-left: 0.85rem;
  font-family: var(--font-rounded);
  font-size: 1.25rem;
  font-weight: 900;
}

.search-field input {
  width: 100%;
  min-height: 48px;
  padding: 0.65rem 0.85rem;
  color: var(--ink);
  background: transparent;
  border: 0;
  outline: none;
}

.search-field input::placeholder {
  color: #8c7584;
}

.filter-row,
.component-pool {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.filter-button {
  min-height: 44px;
  padding: 0.52rem 0.9rem;
  color: var(--plum);
  background: var(--paper-pink);
  border-color: var(--line);
  font-size: 0.78rem;
}

.filter-button:hover:not(:disabled),
.filter-button.is-active {
  color: white;
  background: var(--plum);
  border-color: var(--plum);
}

.career-detail {
  display: grid;
  align-items: start;
  gap: 1.35rem;
  grid-template-columns: minmax(0, 1.6fr) minmax(285px, 0.72fr);
  margin-top: 1.2rem;
}

.career-detail-main,
.game-teaser {
  background: rgba(255, 254, 250, 0.95);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.career-detail-main {
  padding: clamp(1.35rem, 4vw, 3rem);
}

.career-detail-heading {
  align-items: flex-start;
}

.career-detail-heading h1 {
  margin: 0.55rem 0 0.35rem;
  font-size: clamp(2rem, 5vw, 3.65rem);
}

.career-detail-heading p {
  margin-bottom: 0;
  font-size: 1.03rem;
}

.career-description {
  max-width: 780px;
  margin: 1.5rem 0 0.75rem;
  color: #56404f;
  font-size: 1.06rem;
  line-height: 1.75;
}

.fact-grid {
  display: grid;
  gap: 0.9rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 1.5rem;
}

.fact {
  padding: 1.1rem;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.fact span,
.fact strong,
.fact small {
  display: block;
}

.fact span {
  margin-bottom: 0.35rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.fact strong {
  color: var(--plum);
  font-family: var(--font-rounded);
  font-size: 1.15rem;
  line-height: 1.35;
}

.fact small {
  margin-top: 0.45rem;
  color: var(--muted);
  line-height: 1.45;
}

.source-note {
  margin-top: 1rem;
  padding: 1rem;
  background: var(--teal-soft);
  border-left: 5px solid var(--teal);
  border-radius: 6px var(--radius-sm) var(--radius-sm) 6px;
}

.source-note p {
  margin-bottom: 0.35rem;
  color: var(--teal-dark);
  font-size: 0.82rem;
}

.source-note .text-link {
  color: var(--teal-dark);
  font-size: 0.82rem;
}

.game-teaser {
  position: sticky;
  top: 1rem;
  padding: 1.35rem;
  overflow: hidden;
  background:
    radial-gradient(circle at 96% 0%, var(--gold-soft) 0 18%, transparent 18.5%),
    linear-gradient(145deg, var(--paper), var(--paper-pink));
  border: 2px solid rgba(217, 52, 130, 0.28);
}

.game-teaser-icon {
  display: grid;
  width: 70px;
  height: 70px;
  margin-bottom: 1.25rem;
  place-items: center;
  background: white;
  border: 2px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 6px 0 var(--gold);
  font-size: 2rem;
  transform: rotate(-3deg);
}

.game-teaser h2 {
  font-size: clamp(1.45rem, 3vw, 2.15rem);
}

.game-teaser .primary-button {
  width: 100%;
  margin-top: 0.35rem;
}

.game-shell {
  max-width: 980px;
}

.game-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.2rem;
}

.game-heading {
  align-items: flex-start;
  margin-bottom: 1.5rem;
}

.game-heading h1 {
  margin-bottom: 0.45rem;
  font-size: clamp(2rem, 5.5vw, 3.65rem);
}

.game-heading p:last-child {
  max-width: 720px;
  margin-bottom: 0;
}

.game-board {
  position: relative;
  padding: clamp(0.65rem, 2vw, 1rem);
  background:
    linear-gradient(135deg, var(--pink), var(--plum)) padding-box,
    linear-gradient(135deg, var(--pink), var(--gold), var(--teal)) border-box;
  border: 0 solid transparent;
  border-radius: 34px;
  box-shadow: var(--shadow-lg);
}

.game-board::before,
.game-board::after {
  position: absolute;
  z-index: 2;
  width: 16px;
  height: 16px;
  content: "";
  background: var(--gold);
  border: 4px solid var(--paper);
  border-radius: 50%;
}

.game-board::before {
  top: 11px;
  left: 11px;
}

.game-board::after {
  right: 11px;
  bottom: 11px;
  background: var(--teal);
}

.game-stage {
  position: relative;
  z-index: 1;
  min-height: 390px;
  padding: clamp(1.15rem, 4vw, 2.75rem);
  background:
    radial-gradient(circle at 100% 0%, rgba(255, 224, 237, 0.7), transparent 15rem),
    var(--paper);
  border-radius: 26px;
}

.game-stage > h2 {
  max-width: 760px;
  font-size: clamp(1.45rem, 3.5vw, 2.25rem);
}

.game-stage > p:not(.question-helper) {
  max-width: 720px;
}

.round-counter {
  display: flex;
  min-height: 46px;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  margin: -0.35rem 0 1.4rem;
  padding: 0.55rem 0.75rem;
  color: var(--plum);
  background: var(--gold-soft);
  border: 1px solid rgba(155, 102, 16, 0.25);
  border-radius: var(--radius-sm);
  font-family: var(--font-rounded);
  font-size: 0.8rem;
  font-weight: 800;
}

.round-counter strong {
  color: var(--gold-dark);
}

.scenario-detail,
.budget-brief {
  margin-bottom: 1.2rem;
  padding: 1rem;
  color: var(--teal-dark);
  background: var(--teal-soft);
  border: 1px solid rgba(18, 134, 127, 0.2);
  border-radius: var(--radius-sm);
}

.scenario-detail {
  font-weight: 800;
}

.budget-brief strong,
.budget-brief p {
  display: block;
}

.budget-brief strong {
  margin-bottom: 0.15rem;
  font-family: var(--font-rounded);
}

.budget-brief p {
  margin-bottom: 0;
  color: var(--teal-dark);
}

.feedback {
  margin: 1.1rem 0;
  padding: 1rem;
  color: var(--danger);
  background: var(--danger-soft);
  border: 1px solid rgba(169, 59, 85, 0.25);
  border-left: 5px solid var(--danger);
  border-radius: var(--radius-sm);
}

.feedback.is-success {
  color: var(--teal-dark);
  background: var(--teal-soft);
  border-color: rgba(18, 134, 127, 0.3);
  border-left-color: var(--teal);
}

.feedback strong,
.feedback p {
  display: block;
}

.feedback p {
  margin: 0.25rem 0 0;
  color: inherit;
}

.lab-vial {
  position: relative;
  display: grid;
  width: 148px;
  height: 190px;
  place-items: center;
  align-content: center;
  margin: 1rem auto 1.5rem;
  overflow: hidden;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78) 0 28%, transparent 28%),
    hsl(calc(var(--ph) * 17deg) 74% 66%);
  border: 5px solid var(--plum);
  border-top-width: 10px;
  border-radius: 18px 18px 55px 55px;
  box-shadow: inset 16px 0 0 rgba(255, 255, 255, 0.26), 0 10px 0 rgba(114, 22, 77, 0.12);
}

.lab-vial::after {
  position: absolute;
  top: -23px;
  left: 50%;
  width: 92px;
  height: 32px;
  content: "";
  background: var(--paper);
  border: 6px solid var(--plum);
  border-radius: 9px;
  transform: translateX(-50%);
}

.lab-vial span,
.lab-vial strong {
  position: relative;
  z-index: 1;
  display: block;
  text-shadow: 0 2px white;
}

.lab-vial span {
  font-family: var(--font-rounded);
  font-size: 0.8rem;
  font-weight: 900;
  text-transform: uppercase;
}

.lab-vial strong {
  font-family: var(--font-rounded);
  font-size: 3.7rem;
  line-height: 1;
}

.ph-scale {
  position: relative;
  height: 22px;
  margin-top: 1rem;
  background: linear-gradient(90deg, #f65e75, #f4bd48 34%, #77c878 50%, #3abfc0 68%, #6b5acc);
  border: 3px solid white;
  border-radius: var(--radius-pill);
  box-shadow: 0 0 0 2px var(--line-strong);
}

.ph-scale > span {
  position: absolute;
  top: 50%;
  width: 28px;
  height: 36px;
  background: white;
  border: 4px solid var(--plum);
  border-radius: 50% 50% 50% 3px;
  box-shadow: var(--shadow-sm);
  transform: translate(-50%, -50%) rotate(-45deg);
  transition: left 180ms ease;
}

.ph-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 0.55rem;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
}

.range-control {
  display: block;
  margin: 1rem 0;
  padding: 0.9rem 1rem;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.range-control > span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.55rem;
}

.range-control strong {
  color: var(--ink);
  font-size: 0.9rem;
}

.range-control output {
  min-width: 56px;
  padding: 0.2rem 0.5rem;
  color: white;
  background: var(--plum);
  border-radius: var(--radius-pill);
  font-family: var(--font-rounded);
  font-size: 0.8rem;
  font-weight: 900;
  text-align: center;
}

.range-control input[type="range"] {
  width: 100%;
  height: 32px;
  margin: 0;
  accent-color: var(--pink);
  cursor: pointer;
}

.range-control input[type="range"]::-webkit-slider-thumb {
  width: 26px;
  height: 26px;
}

.range-control input[type="range"]::-moz-range-thumb {
  width: 24px;
  height: 24px;
  background: var(--pink);
  border: 3px solid white;
  border-radius: 50%;
  box-shadow: 0 0 0 2px var(--plum);
}

.color-lab {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 1.25rem;
}

.color-lab > div {
  padding: 0.75rem;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.color-lab > div > span {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--muted);
  font-family: var(--font-rounded);
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
}

.color-swatch {
  min-height: 130px;
  border: 5px solid white;
  border-radius: 16px;
  box-shadow: 0 0 0 2px var(--line-strong), inset 0 -10px 24px rgba(53, 22, 45, 0.08);
}

.circuit-line {
  display: flex;
  min-height: 105px;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  margin-bottom: 1.25rem;
  padding: 1rem;
  overflow-x: auto;
  color: var(--plum);
  background:
    linear-gradient(90deg, transparent 49%, rgba(114, 22, 77, 0.09) 50% 51%, transparent 52%),
    var(--cream);
  background-size: 22px 22px;
  border: 2px dashed var(--line-strong);
  border-radius: var(--radius-md);
}

.circuit-line span {
  flex: 0 0 auto;
  padding: 0.7rem;
  background: white;
  border: 2px solid var(--pink);
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 0 rgba(217, 52, 130, 0.15);
  font-family: var(--font-rounded);
  font-size: 0.8rem;
  font-weight: 900;
}

.circuit-line b {
  color: var(--teal);
  font-size: 1.3rem;
}

.circuit-line em {
  color: var(--muted);
}

.component-pool {
  margin-block: 1rem;
}

.pipe-grid {
  display: grid;
  width: min(100%, 390px);
  aspect-ratio: 1;
  gap: 7px;
  grid-template-columns: repeat(3, 1fr);
  margin: 1.5rem auto;
  padding: 9px;
  background: var(--plum-dark);
  border: 5px solid var(--plum);
  border-radius: 23px;
  box-shadow: 0 8px 0 rgba(81, 16, 57, 0.2);
}

.pipe-tile {
  display: grid;
  min-width: 44px;
  min-height: 44px;
  place-items: center;
  color: var(--teal-dark);
  background:
    radial-gradient(circle at center, white, var(--teal-soft));
  border: 2px solid rgba(18, 134, 127, 0.35);
  border-radius: 12px;
  cursor: pointer;
  font-size: clamp(2rem, 9vw, 3.9rem);
  line-height: 1;
  transition:
    transform 120ms ease,
    background 120ms ease;
}

.pipe-tile:hover {
  background: var(--gold-soft);
  transform: scale(0.97);
}

.pipe-tile span {
  display: block;
  transition: transform 160ms ease;
}

.target-status {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 1.15rem 0;
}

.target-status span {
  padding: 0.45rem 0.75rem;
  color: var(--muted);
  background: #eee5e8;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  font-family: var(--font-rounded);
  font-size: 0.78rem;
  font-weight: 900;
}

.target-status span.is-ready {
  color: var(--teal-dark);
  background: var(--teal-soft);
  border-color: var(--teal);
}

.order-list {
  display: grid;
  gap: 0.65rem;
  padding: 0;
  list-style: none;
}

.order-item {
  display: grid;
  min-height: 66px;
  align-items: center;
  gap: 0.8rem;
  grid-template-columns: auto 1fr auto;
  padding: 0.65rem;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.order-number {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: white;
  background: var(--pink);
  border-radius: 12px;
  font-family: var(--font-rounded);
  font-weight: 900;
}

.order-item > span:nth-child(2) {
  font-weight: 700;
  line-height: 1.35;
}

.order-item > div {
  display: flex;
  gap: 0.35rem;
}

.order-item button {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  color: var(--plum);
  background: white;
  border: 2px solid var(--line-strong);
  border-radius: 12px;
  cursor: pointer;
  font-family: var(--font-rounded);
  font-weight: 900;
}

.order-item button:hover:not(:disabled) {
  color: white;
  background: var(--plum);
  border-color: var(--plum);
}

.plan-grid {
  display: grid;
  gap: 0.8rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 1.25rem 0;
}

.plan-card {
  display: flex;
  min-height: 270px;
  min-width: 0;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.85rem;
  color: var(--ink);
  background: var(--paper);
  border: 2px solid var(--line);
  border-radius: var(--radius-md);
  cursor: pointer;
  text-align: left;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.plan-card:hover,
.plan-card.is-selected {
  border-color: var(--pink);
  box-shadow: 0 6px 0 rgba(217, 52, 130, 0.15);
  transform: translateY(-3px);
}

.plan-card.is-selected {
  background: var(--paper-pink);
  box-shadow: inset 0 0 0 3px var(--pink-soft), 0 6px 0 rgba(217, 52, 130, 0.15);
}

.plan-card > strong {
  font-family: var(--font-rounded);
  font-size: 1.1rem;
}

.plan-card > span {
  color: var(--teal-dark);
  font-weight: 900;
}

.plan-card small {
  margin-top: auto;
  color: var(--muted);
  line-height: 1.4;
}

.floor-plan {
  display: grid;
  min-height: 135px;
  gap: 3px;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  padding: 6px;
  background: var(--plum-dark);
  border-radius: 10px;
}

.floor-plan i {
  display: grid;
  min-width: 0;
  place-items: center;
  padding: 0.35rem;
  overflow: hidden;
  color: var(--plum);
  background: var(--cream);
  border-radius: 5px;
  font-size: 0.62rem;
  font-style: normal;
  font-weight: 900;
  text-overflow: ellipsis;
}

.floor-plan i:first-child {
  grid-row: span 2;
}

.celebration {
  position: relative;
  max-width: 780px;
  margin-inline: auto;
  padding: clamp(2rem, 7vw, 5rem);
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 10%, var(--gold-soft), transparent 15rem),
    radial-gradient(circle at 90% 90%, var(--teal-soft), transparent 19rem),
    var(--paper);
  border: 3px solid var(--pink);
  border-radius: 42px;
  box-shadow: var(--shadow-lg);
  text-align: center;
}

.celebration::before,
.celebration::after {
  position: absolute;
  width: 100px;
  height: 100px;
  content: "";
  background: repeating-conic-gradient(var(--pink) 0 8deg, transparent 8deg 19deg);
  border-radius: 50%;
}

.celebration::before {
  top: -52px;
  left: -45px;
}

.celebration::after {
  right: -48px;
  bottom: -53px;
  background: repeating-conic-gradient(var(--teal) 0 8deg, transparent 8deg 19deg);
}

.confetti {
  position: absolute;
  top: 1rem;
  right: 1rem;
  left: 1rem;
  color: var(--pink);
  font-size: 1.2rem;
  letter-spacing: 0.5em;
  animation: confetti-wiggle 2.5s ease-in-out infinite;
}

.celebration-badge {
  position: relative;
  z-index: 1;
  display: grid;
  width: 110px;
  height: 110px;
  margin: 0 auto 1.5rem;
  place-items: center;
  background: var(--gold-soft);
  border: 5px solid var(--gold);
  border-radius: 50%;
  box-shadow: 0 8px 0 var(--gold-dark);
  font-size: 3.7rem;
  transform: rotate(-4deg);
}

.celebration h1 {
  font-size: clamp(2.2rem, 6vw, 4rem);
}

.celebration > p:not(.eyebrow):not(.completion-count) {
  max-width: 580px;
  margin-inline: auto;
  font-size: 1.05rem;
}

.celebration .hero-actions {
  justify-content: center;
  margin-top: 1.5rem;
}

.completion-count {
  width: fit-content;
  margin: 1.5rem auto 0;
  padding: 0.5rem 0.8rem;
  color: var(--teal-dark);
  background: var(--teal-soft);
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-weight: 900;
}

.footer {
  display: flex;
  width: min(var(--content), calc(100% - 2.5rem));
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin: auto auto 1.2rem;
  padding: 1.15rem 1.3rem;
  color: var(--muted);
  background: rgba(255, 254, 250, 0.82);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.footer p {
  margin-bottom: 0;
  font-size: 0.8rem;
}

.footer > div {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.footer a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 800;
}

.footer .text-button {
  font-size: 0.8rem;
}

.loading-note {
  width: min(680px, calc(100% - 2rem));
  margin: 3rem auto;
  padding: 2rem;
  color: var(--plum);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  font-family: var(--font-rounded);
  font-weight: 900;
  text-align: center;
}

@keyframes gentle-float {
  0%,
  100% {
    transform: translateY(0) rotate(0);
  }
  50% {
    transform: translateY(-7px) rotate(5deg);
  }
}

@keyframes confetti-wiggle {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(5px);
  }
}

@media (max-width: 980px) {
  .site-header {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .nav {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: stretch;
  }

  .nav-link {
    flex: 1;
  }

  .progress-pill {
    grid-column: 2;
    grid-row: 1;
  }

  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
  }

  .hero-copy {
    max-width: 760px;
  }

  .bridge-scene {
    width: min(100%, 660px);
    min-height: 400px;
    margin-inline: auto;
  }

  .career-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .career-detail {
    grid-template-columns: 1fr;
  }

  .game-teaser {
    position: static;
  }
}

@media (max-width: 760px) {
  .page-shell,
  .site-header,
  .footer {
    width: min(100% - 1.5rem, var(--content));
  }

  .page-shell {
    padding-block: 2.25rem;
  }

  .site-header {
    margin-top: 0.6rem;
    border-radius: 20px;
  }

  .brand small {
    display: none;
  }

  .stat-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .career-grid,
  .results-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .quiz-progress {
    grid-template-columns: 1fr;
  }

  .result-hero {
    grid-template-columns: 1fr;
  }

  .fit-orbit {
    width: 150px;
    grid-row: 1;
  }

  .library-intro {
    align-items: center;
  }

  .library-count {
    width: 104px;
    height: 104px;
  }

  .library-count strong {
    font-size: 2.2rem;
  }

  .fact-grid {
    grid-template-columns: 1fr;
  }

  .plan-grid {
    grid-template-columns: 1fr;
  }

  .plan-card {
    min-height: 235px;
  }

  .footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.4rem;
  }
}

@media (max-width: 600px) {
  body {
    font-size: 15px;
  }

  body::before {
    background-size: 28px 28px;
  }

  .site-header {
    min-height: 68px;
    gap: 0.55rem;
    padding: 0.55rem;
  }

  .brand {
    min-width: 0;
    gap: 0.55rem;
  }

  .brand-mark {
    width: 44px;
    height: 44px;
    border-radius: 14px 14px 14px 5px;
  }

  .brand strong {
    overflow: hidden;
    font-size: 0.88rem;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .progress-pill {
    min-height: 44px;
    padding-inline: 0.65rem;
    font-size: 0.72rem;
  }

  .nav {
    overflow-x: auto;
    scroll-snap-type: x proximity;
  }

  .nav-link {
    min-width: max-content;
    padding-inline: 0.7rem;
    scroll-snap-align: start;
  }

  h1 {
    font-size: clamp(2.1rem, 11vw, 3.2rem);
  }

  .hero {
    gap: 2.5rem;
    padding-top: 3rem;
  }

  .hero-copy::before {
    top: -1.2rem;
    left: -0.8rem;
    width: 60px;
    height: 60px;
  }

  .hero-title em {
    white-space: normal;
  }

  .hero-actions > :where(a, button) {
    width: 100%;
  }

  .bridge-scene {
    min-height: 340px;
    border-radius: 28px 28px 20px 20px;
  }

  .bridge-sun {
    top: 30px;
    right: 34px;
    width: 60px;
    height: 60px;
  }

  .bridge-cloud {
    transform: scale(0.78);
    transform-origin: left center;
  }

  .cloud-one {
    top: 70px;
    left: 17px;
  }

  .cloud-two {
    top: 130px;
    right: 5px;
    transform: scale(0.55);
    transform-origin: right center;
  }

  .bridge-deck {
    right: 11%;
    bottom: 38%;
    left: 11%;
    gap: 2px;
  }

  .bridge-plank {
    height: 44px;
    border-width: 2px;
  }

  .bridge-bank {
    bottom: 22%;
    width: 94px;
    height: 94px;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.4rem;
    margin-top: 3rem;
  }

  .career-grid,
  .results-grid {
    grid-template-columns: 1fr;
  }

  .career-card {
    min-height: 225px;
  }

  .career-card:hover,
  .career-card:focus-within {
    transform: none;
  }

  .quiz-card {
    border-radius: 22px;
  }

  .bridge-mini {
    gap: 0.2rem;
    padding-inline: 0.8rem;
  }

  .bridge-mini span {
    height: 12px;
    border-width: 1px;
  }

  .quiz-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .quiz-actions > * {
    width: 100%;
  }

  .result-title-row,
  .career-detail-heading,
  .game-heading {
    align-items: flex-start;
  }

  .result-icon {
    width: 64px;
    height: 64px;
    border-radius: 19px;
    font-size: 1.9rem;
  }

  .result-hero {
    border-radius: 24px;
  }

  .results-footer-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .library-intro {
    grid-template-columns: 1fr;
  }

  .library-count {
    display: flex;
    width: fit-content;
    height: auto;
    gap: 0.45rem;
    padding: 0.6rem 0.9rem;
    border-width: 3px;
    border-radius: var(--radius-pill);
    box-shadow: 0 4px 0 var(--teal-dark);
    transform: none;
  }

  .library-count strong,
  .library-count span {
    margin: 0;
    transform: none;
  }

  .library-count strong {
    font-size: 1.3rem;
  }

  .filter-row {
    flex-wrap: nowrap;
    margin-right: -0.85rem;
    margin-left: -0.85rem;
    padding: 0 0.85rem 0.2rem;
    overflow-x: auto;
    scroll-snap-type: x proximity;
  }

  .filter-button {
    min-width: max-content;
    scroll-snap-align: start;
  }

  .career-detail-heading,
  .game-heading {
    gap: 0.75rem;
  }

  .career-detail-main,
  .game-teaser {
    border-radius: 22px;
  }

  .game-topbar {
    align-items: flex-start;
  }

  .game-topbar .text-link {
    min-width: 0;
  }

  .game-board {
    margin-inline: -0.3rem;
    border-radius: 25px;
  }

  .game-stage {
    min-height: 350px;
    border-radius: 19px;
  }

  .round-counter {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.15rem;
  }

  .option-button {
    min-height: 58px;
    gap: 0.6rem;
    padding-inline: 0.7rem;
  }

  .option-letter,
  .option-check {
    width: 32px;
    height: 32px;
  }

  .component-pool .option-button {
    width: 100%;
  }

  .color-swatch {
    min-height: 105px;
  }

  .order-item {
    grid-template-columns: auto 1fr;
  }

  .order-item > div {
    grid-column: 2;
  }

  .pipe-grid {
    gap: 5px;
    padding: 7px;
    border-width: 4px;
  }

  .celebration {
    border-radius: 28px;
  }

  .celebration .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .footer > div {
    width: 100%;
    flex-wrap: wrap;
    justify-content: space-between;
  }
}

@media (max-width: 390px) {
  .page-shell,
  .site-header,
  .footer {
    width: calc(100% - 1rem);
  }

  .brand strong {
    max-width: 122px;
  }

  .progress-pill {
    padding-inline: 0.5rem;
  }

  .stat-card {
    padding: 0.9rem;
  }

  .stat-card strong {
    font-size: 1.7rem;
  }

  .result-title-row,
  .career-detail-heading,
  .game-heading {
    display: grid;
  }

  .game-topbar .chip {
    display: none;
  }

  .color-lab {
    grid-template-columns: 1fr;
  }

  .color-swatch {
    min-height: 82px;
  }

  .circuit-line {
    justify-content: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (prefers-contrast: more) {
  :root {
    --line: #9d788a;
    --line-strong: #735064;
    --muted: #56404f;
  }

  .career-card,
  .match-card,
  .panel,
  .career-detail-main,
  .game-teaser,
  .site-header {
    border-width: 2px;
  }
}

@media (forced-colors: active) {
  .primary-button,
  .secondary-button,
  .filter-button,
  .option-button,
  .pipe-tile,
  .plan-card {
    border: 2px solid ButtonText;
  }

  .card-link {
    border: 2px solid LinkText;
  }

  .progress-track span,
  .score-meter span,
  .ph-scale,
  .bridge-plank.is-built {
    background: Highlight;
  }
}

@media print {
  body {
    background: white;
  }

  .site-header,
  .footer,
  .hero-actions,
  .game-teaser {
    display: none;
  }

  .page-shell {
    width: 100%;
    padding: 1rem;
  }

  .career-card,
  .career-detail-main,
  .fact {
    box-shadow: none;
    break-inside: avoid;
  }
}

/* -------------------------------------------------------------------------- */
/* Player-facing pink visual system.                                           */
/* -------------------------------------------------------------------------- */

:root {
  --cream: #fff5f8;
  --cream-deep: #ffe7f1;
  --paper: #ffffff;
  --paper-pink: #fff5fb;
  --ink: #32051e;
  --muted: #6f3f5b;
  --plum: #8a1a9b;
  --plum-dark: #790d46;
  --pink: #ce009f;
  --pink-dark: #a6007e;
  --pink-soft: #ffe1f4;
  --teal: #2697a6;
  --teal-dark: #176674;
  --teal-soft: #e9f9fb;
  --gold: #e37263;
  --gold-dark: #97463c;
  --gold-soft: #ffe9e4;
  --line: #edc7dd;
  --line-strong: #d99aba;
  --shadow-sm: 0 2px 0 rgba(121, 13, 70, 0.06);
  --shadow-md: 0 10px 25px rgba(121, 13, 70, 0.09);
  --shadow-lg: 0 18px 44px rgba(121, 13, 70, 0.13);
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 24px;
  --content: 1080px;
  --font-rounded: "Trebuchet MS", ui-rounded, "Arial Rounded MT Bold",
    system-ui, sans-serif;
  --font-body: "Trebuchet MS", system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
}

html,
body {
  background: #fff5f8;
}

body {
  background:
    radial-gradient(circle at 7% 9%, rgba(206, 0, 159, 0.08), transparent 18rem),
    radial-gradient(circle at 94% 22%, rgba(138, 26, 155, 0.07), transparent 20rem),
    #fff5f8;
}

body::before {
  opacity: 0.16;
  background-image: radial-gradient(rgba(206, 0, 159, 0.22) 1.3px, transparent 1.3px);
  background-size: 25px 25px;
  mask-image: linear-gradient(to bottom, black, transparent 68%);
}

h1,
h2,
h3 {
  color: #790d46;
  letter-spacing: -0.025em;
}

.site-header {
  width: min(var(--content), calc(100% - 2rem));
  min-height: 74px;
  margin-top: 0.75rem;
  padding: 0.65rem 0.8rem;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid #edc7dd;
  border-radius: 16px;
  box-shadow: 0 5px 18px rgba(121, 13, 70, 0.07);
  backdrop-filter: blur(12px);
}

.brand {
  min-height: 44px;
}

.brand img {
  width: clamp(178px, 25vw, 250px);
  height: auto;
}

.nav {
  padding: 0;
  background: transparent;
  border: 0;
}

.nav-link {
  border: 1px solid transparent;
}

.nav-link:hover {
  color: #790d46;
  background: #ffe1f4;
  border-color: #edc7dd;
  transform: none;
}

.progress-pill {
  color: #790d46;
  background: #fff5fb;
  border-color: #edc7dd;
}

.progress-pill span {
  color: #ce009f;
}

.page-shell {
  width: min(var(--content), calc(100% - 2rem));
}

.primary-button {
  color: #fff;
  background: #ce009f;
  border-color: #a6007e;
  box-shadow: 0 4px 0 #790d46;
}

.primary-button:hover:not(:disabled) {
  background: #a6007e;
  box-shadow: 0 5px 0 #790d46;
  transform: translateY(-1px);
}

.primary-button:active:not(:disabled) {
  box-shadow: 0 1px 0 #790d46;
}

.secondary-button {
  color: #790d46;
  background: #fff;
  border-color: #ce009f;
  box-shadow: 0 3px 0 rgba(121, 13, 70, 0.15);
}

.secondary-button:hover:not(:disabled) {
  color: #790d46;
  background: #ffe1f4;
  transform: translateY(-1px);
}

.eyebrow {
  color: #a6007e;
}

.home-screen {
  display: grid;
  min-height: min(620px, calc(100vh - 100px));
  place-items: center;
  padding-block: clamp(2rem, 6vw, 4.5rem);
}

.home-card {
  position: relative;
  width: min(100%, 840px);
  padding: clamp(1.6rem, 5vw, 4rem);
  overflow: hidden;
  text-align: center;
  background: rgba(255, 255, 255, 0.96);
  border: 2px solid #edc7dd;
  border-radius: 28px;
  box-shadow: var(--shadow-lg);
}

.home-card::before,
.home-card::after {
  position: absolute;
  width: 150px;
  height: 150px;
  pointer-events: none;
  content: "";
  border: 24px solid rgba(206, 0, 159, 0.08);
  border-radius: 50%;
}

.home-card::before {
  top: -92px;
  left: -72px;
}

.home-card::after {
  right: -78px;
  bottom: -102px;
  border-color: rgba(138, 26, 155, 0.08);
}

.home-logo {
  width: min(330px, 74%);
  margin: 0 auto 1.6rem;
}

.home-card .hero-title {
  max-width: 730px;
  margin-inline: auto;
  color: #d63384;
  font-size: clamp(2.25rem, 7vw, 4.5rem);
}

.home-card .hero-lede {
  max-width: 690px;
  margin: 0 auto 1.6rem;
  color: #5d2d49;
  font-size: clamp(1rem, 2.1vw, 1.18rem);
}

.home-card .hero-actions {
  justify-content: center;
  margin-top: 1.5rem;
}

.home-card .privacy-note {
  justify-content: center;
  margin: 1.2rem auto 0;
}

.field-ribbon {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

.field-ribbon span {
  padding: 0.38rem 0.75rem;
  color: #790d46;
  background: #fff5fb;
  border: 1px solid #edc7dd;
  border-radius: 999px;
  font-family: var(--font-rounded);
  font-size: 0.78rem;
  font-weight: 900;
}

.home-progress {
  margin: 0.65rem 0 0;
  color: #8a1a9b;
  font-family: var(--font-rounded);
  font-size: 0.86rem;
  font-weight: 900;
}

.home-note {
  padding-top: 0;
  padding-bottom: 2.25rem;
  text-align: center;
}

.home-note p {
  margin: 0;
  font-size: 0.9rem;
}

.panel,
.career-card,
.match-card,
.career-detail-main,
.game-teaser,
.celebration {
  background: rgba(255, 255, 255, 0.96);
  border-color: #edc7dd;
}

.game-board {
  padding: 8px;
  background: #ce009f;
  border-radius: 25px;
  box-shadow: 0 12px 30px rgba(121, 13, 70, 0.15);
}

.game-board::before,
.game-board::after {
  display: none;
}

.game-stage {
  min-height: 360px;
  background: #fff;
  border-radius: 18px;
}

.round-counter {
  color: #790d46;
  background: #fff5fb;
  border-color: #edc7dd;
}

.round-counter strong {
  color: #790d46;
}

.money-positive {
  color: #176674;
}

.money-negative {
  color: #b62d54;
}

.stock-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-block: 1.25rem;
}

.stock-card {
  min-width: 0;
  padding: 1rem;
  background: #fff5fb;
  border: 1px solid #edc7dd;
  border-radius: 16px;
}

.stock-heading,
.stock-actions,
.stock-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.stock-heading h2,
.stock-heading strong,
.stock-card p {
  margin: 0;
}

.stock-heading h2 {
  font-size: 1.15rem;
}

.stock-heading > strong {
  color: #ce009f;
  font-size: 1.3rem;
}

.stock-chart {
  width: 100%;
  margin-block: 0.85rem;
  overflow: visible;
  background: #ffe3f2;
  border: 2px solid #d63384;
  border-radius: 8px;
}

.stock-chart line {
  stroke: rgba(121, 13, 70, 0.18);
  stroke-width: 1;
}

.stock-chart polyline {
  fill: none;
  stroke: #d63384;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 4;
}

.stock-actions {
  justify-content: flex-start;
  margin-bottom: 0.75rem;
}

.stock-actions :where(button) {
  min-height: 42px;
  padding: 0.55rem 0.85rem;
}

.stock-summary {
  justify-content: flex-start;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.stock-summary span {
  padding: 0.48rem 0.72rem;
  background: #fff5fb;
  border: 1px solid #edc7dd;
  border-radius: 999px;
}

.literary-game {
  text-align: center;
}

.literary-prompt {
  max-width: 720px;
  margin: 1.4rem auto;
  color: #32051e;
  font-size: clamp(1.25rem, 3vw, 1.65rem);
}

.literary-options {
  max-width: 620px;
  margin-inline: auto;
}

.web-builder {
  overflow: hidden;
}

.builder-toolbar {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.builder-toolbar label {
  display: grid;
  gap: 0.3rem;
  color: #790d46;
  font-size: 0.75rem;
  font-weight: 900;
}

.builder-toolbar :where(select, input[type="color"]) {
  min-height: 44px;
  padding: 0.4rem;
  background: white;
  border: 1px solid #d99aba;
  border-radius: 9px;
}

.builder-toolbar input[type="color"] {
  width: 58px;
}

.builder-canvas {
  position: relative;
  display: flex;
  min-height: 390px;
  gap: 10px;
  padding: 12px;
  margin: 1rem 0;
  overflow: hidden;
  background: var(--builder-bg);
  border: 2px solid #32051e;
  border-radius: 8px;
}

.builder-canvas.layout-free {
  display: block;
}

.builder-canvas.layout-box {
  display: grid;
  align-content: start;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.builder-canvas.layout-vertical {
  align-items: flex-start;
  flex-direction: column;
}

.builder-canvas.layout-horizontal {
  align-items: flex-start;
  flex-direction: row;
  flex-wrap: wrap;
}

.builder-empty {
  position: absolute;
  inset: 50% auto auto 50%;
  width: min(90%, 360px);
  margin: 0;
  color: #6f3f5b;
  text-align: center;
  transform: translate(-50%, -50%);
}

.builder-item {
  z-index: 1;
  display: flex;
  width: fit-content;
  max-width: 240px;
  align-items: center;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0.3rem;
  touch-action: none;
}

.layout-free .builder-item {
  position: absolute;
  top: 0;
  left: 0;
  cursor: grab;
  transform: translate(var(--item-x), var(--item-y));
}

.layout-free .builder-item.is-dragging {
  z-index: 3;
  cursor: grabbing;
}

.web-shape {
  width: 78px;
  height: 78px;
  flex: 0 0 auto;
  background: var(--shape-color);
}

.web-shape.shape-circle {
  border-radius: 50%;
}

.web-shape.shape-triangle {
  width: 0;
  height: 0;
  background: transparent;
  border-right: 40px solid transparent;
  border-bottom: 78px solid var(--shape-color);
  border-left: 40px solid transparent;
}

.builder-controls {
  display: flex;
  min-height: 34px;
  align-items: center;
  gap: 0.28rem;
  padding: 0.25rem;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid #edc7dd;
  border-radius: 7px;
  box-shadow: 0 3px 10px rgba(50, 5, 30, 0.1);
}

.builder-controls :where(select, input, button) {
  min-width: 32px;
  min-height: 32px;
  border: 1px solid #d99aba;
  border-radius: 5px;
}

.builder-controls input[type="color"] {
  width: 36px;
  padding: 2px;
}

.builder-controls input[type="number"] {
  width: 54px;
}

.builder-controls button {
  color: #fff;
  background: #a6007e;
  cursor: pointer;
  font-weight: 900;
}

.builder-text-input {
  width: 190px;
  max-width: 100%;
  padding: 0.4rem;
  background: rgba(255, 255, 255, 0.88);
  border: 1px dashed #6f3f5b;
}

/* Hands-on career puzzle system */

.career-puzzle {
  --puzzle-accent: #ce009f;
  display: grid;
  gap: 1rem;
}

.puzzle-layout {
  display: grid;
  align-items: stretch;
  gap: 1rem;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 280px);
}

.puzzle-brief {
  display: grid;
  align-content: start;
  gap: 0.7rem;
  padding: 1.1rem;
  color: #4e1236;
  background: #fff4fa;
  border: 2px solid #edc7dd;
  border-radius: 16px;
}

.puzzle-brief > :where(strong, p) {
  margin: 0;
}

.puzzle-brief > strong {
  color: #790d46;
  font-family: var(--font-rounded);
  font-size: 1.05rem;
}

.puzzle-brief ul {
  display: grid;
  gap: 0.55rem;
  margin: 0;
  padding-left: 1.2rem;
}

.career-puzzle :where(
  .bridge-bay,
  .ramp-toggle,
  .relay-card,
  .team-station,
  .evidence-card,
  .weld-design-picker button,
  .advanced-toggle,
  .email-hotspot,
  .sample-pin,
  .change-point button,
  .listening-toolbox button,
  .pitch-controls button,
  .activity-pool button,
  .training-slot button
) {
  min-height: 48px;
  touch-action: manipulation;
}

/* Literature: sentence-card arcade */

.literary-arcade {
  display: grid;
  min-height: 230px;
  place-items: center;
  padding: 1rem;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 18%, #fff 0 3px, transparent 4px),
    radial-gradient(circle at 82% 28%, #ffd66a 0 3px, transparent 4px),
    linear-gradient(145deg, #4e1236, #8a1a9b);
  border: 4px solid #790d46;
  border-radius: 20px;
}

.sentence-launcher {
  display: grid;
  width: min(100%, 690px);
  justify-items: center;
  gap: 0.55rem;
  padding: clamp(1rem, 4vw, 1.75rem);
  color: #4e1236;
  text-align: center;
  background:
    repeating-linear-gradient(#fffdf7 0 29px, #d5e4f1 30px),
    #fffdf7;
  border: 3px solid #e8c47a;
  border-radius: 14px;
  box-shadow: 0 10px 0 rgba(50, 5, 30, 0.38);
  transform: rotate(-1deg);
}

.sentence-launcher > span {
  font-size: 1.7rem;
}

.sentence-launcher .literary-prompt {
  margin: 0;
  font-size: clamp(1.2rem, 4vw, 1.8rem);
}

.sentence-launcher small {
  color: #790d46;
  font-weight: 900;
}

.literary-portals {
  display: grid;
  gap: 0.6rem;
  grid-template-columns: repeat(5, 1fr);
}

.literary-portal {
  display: grid;
  min-height: 112px;
  place-items: center;
  align-content: center;
  gap: 0.35rem;
  padding: 0.6rem;
  color: #790d46;
  background: #fff5fb;
  border: 3px solid #d99aba;
  border-radius: 50% 50% 14px 14px;
  box-shadow: inset 0 -9px 0 #ffe1f4, 0 4px 0 #a6007e;
  cursor: pointer;
}

.literary-portal span {
  font-size: 1.6rem;
}

.literary-portal strong {
  font-size: clamp(0.65rem, 1.7vw, 0.85rem);
}

.literary-portal:hover {
  color: #fff;
  background: #8a1a9b;
  border-color: #790d46;
  transform: translateY(-3px);
}

/* Mechanic: choose tools from the garage rack */

.garage-mission {
  display: grid;
  gap: 0.25rem;
  margin-bottom: 1rem;
  padding: 0.85rem 1rem;
  color: #26313a;
  background: #fff7d8;
  border: 2px solid #dbb84e;
  border-left-width: 9px;
  border-radius: 8px;
}

.garage-mission :where(p, small) {
  margin: 0;
}

.garage-mission small {
  color: #5b4a22;
}

.tool-rack {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(3, 1fr);
  margin-bottom: 1rem;
  padding: 1rem;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.08) 0 2px, transparent 2px 14px),
    #26313a;
  border: 4px solid #12191f;
  border-radius: 16px;
}

.tool-card {
  display: grid;
  min-height: 150px;
  place-items: center;
  align-content: center;
  gap: 0.45rem;
  padding: 0.75rem;
  color: #26313a;
  background: #eef3f6;
  border: 3px solid #9baab3;
  border-radius: 14px;
  box-shadow: 0 5px 0 #0d1217;
  cursor: pointer;
  text-align: center;
}

.tool-card > span {
  font-size: 2rem;
}

.tool-card small {
  color: #6c777e;
}

.tool-card:hover {
  color: #fff;
  background: #176674;
  border-color: #6cd4e6;
  transform: translateY(-2px);
}

/* Engineer: build and test */

.bridge-worksite {
  position: relative;
  min-height: 330px;
  overflow: hidden;
  background:
    linear-gradient(180deg, #dff7ff 0 57%, #d6b985 57% 73%, #65bfd3 73%);
  border: 3px solid #8a1a9b;
  border-radius: 18px;
}

.bridge-sky {
  position: absolute;
  top: 1rem;
  right: 1rem;
  left: 1rem;
  color: #fff;
  font-size: clamp(1.3rem, 4vw, 2.2rem);
  text-align: center;
  text-shadow: 0 2px 0 #98cce2;
}

.bridge-deck {
  position: absolute;
  top: 28%;
  right: 6%;
  left: 6%;
  display: grid;
  height: 148px;
  align-items: stretch;
  grid-template-columns: repeat(3, 1fr);
  background: linear-gradient(#737d85 0 13px, transparent 13px);
  border-right: 14px solid #4f5961;
  border-left: 14px solid #4f5961;
}

.bridge-bay {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 0.2rem;
  padding: 0.5rem;
  color: #273138;
  background: rgba(255, 255, 255, 0.2);
  border: 0;
  border-right: 2px dashed rgba(39, 49, 56, 0.28);
  cursor: pointer;
}

.bridge-bay:last-child {
  border-right: 0;
}

.bridge-bay span {
  display: grid;
  width: min(90%, 105px);
  height: 76px;
  place-items: center;
  color: #5b6670;
  font-family: var(--font-rounded);
  font-size: clamp(2.4rem, 8vw, 4.8rem);
  line-height: 1;
  transition: transform 160ms ease;
}

.bridge-bay:hover span {
  transform: scale(1.06);
}

.bridge-bay.support-triangle span {
  color: #cc009c;
  text-shadow: 0 3px 0 #790d46;
}

.bridge-bay.support-cable span {
  color: #176674;
  transform: rotate(90deg);
}

.bridge-bay.support-beam span {
  color: #e37263;
  text-shadow: 0 4px 0 #6f332d;
}

.bridge-bay small {
  padding: 0.22rem 0.45rem;
  background: rgba(255, 255, 255, 0.86);
  border-radius: 999px;
  font-weight: 900;
}

.bridge-ground {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  min-height: 75px;
  align-items: flex-end;
  justify-content: space-between;
  padding: 0.55rem 0.8rem;
}

.ramp-toggle {
  position: relative;
  z-index: 2;
  padding: 0.55rem 0.75rem;
  color: #790d46;
  background: #fff;
  border: 2px solid #cc009c;
  border-radius: 10px 10px 2px 2px;
  cursor: pointer;
  font-weight: 900;
  transform: skewX(-8deg);
}

.ramp-toggle.is-added {
  color: #fff;
  background: #176674;
  border-color: #0d4c56;
}

.bridge-river {
  color: #e8fbff;
  font-size: clamp(1rem, 4vw, 1.8rem);
  letter-spacing: 0.1em;
}

.target-status .is-warning {
  color: #8b2f24;
  background: #fff0ed;
  border-color: #e4a199;
}

/* Medicine: route the care-team relay */

.relay-board {
  display: grid;
  align-items: center;
  gap: 1rem;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 0.9fr);
  padding: clamp(0.75rem, 2vw, 1.2rem);
  background:
    radial-gradient(circle at 8% 12%, #fff 0 4px, transparent 5px),
    #f3fbff;
  border: 2px solid #bcdde9;
  border-radius: 18px;
}

.relay-tasks,
.relay-roles {
  display: grid;
  gap: 0.65rem;
}

.relay-tasks > strong,
.relay-roles > strong {
  color: #790d46;
  font-family: var(--font-rounded);
}

.relay-card,
.team-station {
  display: grid;
  align-items: center;
  gap: 0.45rem;
  padding: 0.75rem;
  text-align: left;
  background: #fff;
  border: 2px solid #c7dfe8;
  border-radius: 14px;
  cursor: pointer;
}

.relay-card {
  grid-template-columns: auto 1fr;
}

.relay-card > span,
.team-station > span:first-child {
  font-size: 1.55rem;
}

.relay-card small {
  grid-column: 2;
  color: #6f3f5b;
}

.relay-card.is-selected {
  border-color: #cc009c;
  box-shadow: 0 0 0 3px #ffe1f4;
  transform: translateX(4px);
}

.relay-card.is-routed {
  border-color: #54a393;
}

.team-station {
  grid-template-columns: auto 1fr;
  color: #176674;
  border-color: #8ed2c5;
  font-weight: 900;
}

.team-station:hover:not(:disabled) {
  color: #fff;
  background: #176674;
}

.relay-path {
  color: #cc009c;
  font-size: clamp(1.2rem, 4vw, 2rem);
  writing-mode: horizontal-tb;
}

/* Law: assemble the evidence board */

.case-file {
  display: grid;
  gap: 1rem;
  padding: clamp(0.75rem, 2vw, 1.25rem);
  background:
    linear-gradient(90deg, transparent 48px, #ef8a8a 49px 51px, transparent 52px),
    repeating-linear-gradient(#fffdf7 0 31px, #c8d8ea 32px);
  border: 2px solid #c9a875;
  border-radius: 8px 18px 18px 8px;
  box-shadow: 0 7px 0 #8c6a3e;
}

.case-file-tabs {
  display: grid;
  gap: 0.7rem;
  grid-template-columns: repeat(3, 1fr);
  padding-left: 2.5rem;
}

.case-slot {
  display: grid;
  min-height: 150px;
  align-content: start;
  gap: 0.35rem;
  padding: 0.8rem;
  background: rgba(255, 255, 255, 0.85);
  border: 2px dashed #ba8ca6;
  border-radius: 12px;
}

.case-slot.is-filled {
  border-style: solid;
  border-color: #8a1a9b;
  box-shadow: 0 3px 0 #edc7dd;
}

.case-slot > span {
  font-size: 1.5rem;
}

.case-slot small {
  color: #790d46;
  font-weight: 900;
  text-transform: uppercase;
}

.case-slot strong {
  font-size: 0.88rem;
  line-height: 1.45;
}

.evidence-tray {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(3, 1fr);
  padding-left: 2.5rem;
}

.evidence-group {
  display: grid;
  gap: 0.5rem;
  margin: 0;
  padding: 0.65rem;
  background: rgba(255, 245, 251, 0.92);
  border: 1px solid #edc7dd;
  border-radius: 12px;
}

.evidence-group legend {
  padding-inline: 0.35rem;
  color: #790d46;
  font-weight: 900;
}

.evidence-card {
  padding: 0.65rem;
  color: #4e1236;
  text-align: left;
  background: #fff;
  border: 2px solid #dfb7ce;
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1.4;
}

.evidence-card.is-selected {
  color: #fff;
  background: #8a1a9b;
  border-color: #790d46;
  box-shadow: 0 3px 0 #4e1236;
}

/* Welder: tap glowing seams, optionally tune advanced controls */

.weld-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.weld-design-picker {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.weld-design-picker button,
.advanced-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 0.8rem;
  color: #790d46;
  background: #fff;
  border: 2px solid #edc7dd;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 900;
}

.weld-design-picker button.is-selected {
  color: #fff;
  background: #8a1a9b;
  border-color: #790d46;
}

.advanced-toggle.is-on {
  color: #fff;
  background: #176674;
  border-color: #0d4c56;
}

.weld-board {
  position: relative;
  min-height: clamp(330px, 46vw, 430px);
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 115%, #ff7a35 0 4%, transparent 21%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.04) 0 1px, transparent 1px 9px),
    linear-gradient(145deg, #302934, #171419);
  border: 4px solid #790d46;
  border-radius: 18px;
  box-shadow: inset 0 0 35px rgba(0, 0, 0, 0.52);
  isolation: isolate;
}

.weld-board::before {
  position: absolute;
  right: 5%;
  bottom: 4%;
  left: 5%;
  height: 15px;
  content: "";
  background: #070607;
  border-radius: 50%;
  filter: blur(4px);
  opacity: 0.55;
}

.weld-piece {
  position: absolute;
  z-index: 1;
  background:
    linear-gradient(105deg, transparent 43%, rgba(255, 255, 255, 0.34) 49%, transparent 55%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 7px),
    linear-gradient(135deg, #66727b, #c6ced2 47%, #4c565f);
  border: 3px solid #20262b;
  box-shadow: inset 0 0 8px rgba(255, 255, 255, 0.22), 0 7px 8px rgba(0, 0, 0, 0.32);
}

.robot-head {
  top: 12%;
  left: 38%;
  width: 24%;
  height: 22%;
  border-radius: 18px 18px 10px 10px;
}

.robot-body {
  top: 34%;
  left: 33%;
  width: 34%;
  height: 34%;
  border-radius: 10px;
}

.robot-arm {
  top: 37%;
  width: 12%;
  height: 31%;
  border-radius: 8px;
}

.robot-arm.arm-left {
  left: 19%;
  transform: rotate(8deg);
}

.robot-arm.arm-right {
  right: 19%;
  transform: rotate(-8deg);
}

.robot-leg {
  top: 67%;
  width: 13%;
  height: 23%;
  border-radius: 7px;
}

.robot-leg.leg-left {
  left: 36%;
}

.robot-leg.leg-right {
  right: 36%;
}

.robot-face {
  position: absolute;
  z-index: 2;
  top: 18%;
  left: 43%;
  color: #253039;
  font-weight: 900;
  line-height: 1.2;
  text-align: center;
}

.rocket-body {
  top: 18%;
  left: 39%;
  width: 22%;
  height: 58%;
  border-radius: 45% 45% 16px 16px;
}

.rocket-nose {
  top: 8%;
  left: 42%;
  width: 16%;
  height: 24%;
  border-radius: 50% 50% 12% 12%;
  transform: rotate(45deg);
}

.rocket-fin {
  top: 59%;
  width: 18%;
  height: 24%;
  border-radius: 12px 50% 8px 8px;
}

.rocket-fin.fin-left {
  left: 27%;
  transform: rotate(-24deg);
}

.rocket-fin.fin-right {
  right: 27%;
  transform: scaleX(-1) rotate(-24deg);
}

.rocket-window {
  z-index: 2;
  top: 31%;
  left: 45%;
  width: 10%;
  aspect-ratio: 1;
  background: #6cd4e6;
  border: 5px solid #4c565f;
  border-radius: 50%;
}

.bridge-deck-piece {
  top: 55%;
  left: 10%;
  width: 80%;
  height: 16%;
  border-radius: 8px;
}

.bridge-tower {
  top: 20%;
  width: 10%;
  height: 52%;
  border-radius: 8px;
}

.bridge-tower.tower-left {
  left: 25%;
}

.bridge-tower.tower-right {
  right: 25%;
}

.bridge-brace {
  top: 31%;
  width: 11%;
  height: 39%;
  border-radius: 8px;
}

.bridge-brace.brace-left {
  left: 40%;
  transform: rotate(48deg);
}

.bridge-brace.brace-right {
  right: 40%;
  transform: rotate(-48deg);
}

.game-stage .weld-joint {
  position: absolute;
  z-index: 4;
  top: var(--joint-y);
  left: var(--joint-x);
  width: max(76px, var(--joint-length));
  height: 54px;
  padding: 0;
  background: transparent;
  border: 0;
  cursor: pointer;
  opacity: 1;
  touch-action: manipulation;
  transform: translate(-50%, -50%) rotate(var(--joint-r));
  transition: none;
}

.weld-joint:disabled {
  cursor: default;
  filter: none;
  opacity: 1;
}

.game-stage button.weld-joint:not(:disabled):active {
  transform: translate(-50%, -50%) rotate(var(--joint-r)) scale(0.98);
}

.weld-joint.is-welded {
  pointer-events: none;
}

.weld-joint-line {
  position: absolute;
  top: 50%;
  right: 0;
  left: 0;
  height: 9px;
  background: repeating-linear-gradient(90deg, #fff7ad 0 10px, transparent 10px 16px);
  border: 2px solid rgba(255, 190, 65, 0.36);
  border-radius: 999px;
  box-shadow: 0 0 12px #ff9b42;
  transform: translateY(-50%);
  animation: joint-pulse 950ms ease-in-out infinite alternate;
}

.weld-joint.is-welded .weld-joint-line {
  height: 13px;
  background:
    radial-gradient(circle at 6px 50%, #fff1b8 0 3px, transparent 4px) 0 0 / 14px 100% repeat-x,
    #df713c;
  border-color: #7b351d;
  box-shadow: 0 0 12px #ff7135;
  animation: none;
}

.weld-joint-sparks {
  position: absolute;
  top: 50%;
  left: 50%;
  color: #fff3a7;
  font-size: 1.7rem;
  font-weight: 900;
  opacity: 0;
  pointer-events: none;
  text-shadow: 0 0 9px #ff6c2f;
  transform: translate(-50%, -50%);
}

.weld-joint.is-sparking .weld-joint-sparks {
  animation: seam-spark 450ms ease-out;
}

.weld-legend {
  display: grid;
  gap: 0.55rem;
}

.weld-legend span {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.83rem;
  font-weight: 800;
}

.joint-dot {
  display: inline-block;
  width: 34px;
  height: 8px;
  background: repeating-linear-gradient(90deg, #d19b21 0 7px, transparent 7px 11px);
  border-radius: 999px;
}

.joint-dot.is-done {
  background: #df713c;
  box-shadow: 0 0 6px #ff7135;
}

.advanced-controls {
  display: grid;
  gap: 0.75rem;
  padding: 1rem;
  background: #fff9e7;
  border: 2px solid #e0bf68;
  border-radius: 16px;
}

@keyframes joint-pulse {
  from { opacity: 0.62; transform: translateY(-50%) scaleX(0.96); }
  to { opacity: 1; transform: translateY(-50%) scaleX(1.03); }
}

@keyframes seam-spark {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.4); }
  35% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -105%) scale(1.8); }
}

/* Cybersecurity: inspect a made-up inbox */

.cyber-console {
  display: grid;
  min-height: 360px;
  overflow: hidden;
  grid-template-columns: 190px 1fr;
  background: #f8fbff;
  border: 4px solid #263444;
  border-radius: 18px;
  box-shadow: 0 7px 0 #151d26;
}

.inbox-list {
  display: grid;
  align-content: start;
  gap: 0.4rem;
  padding: 1rem;
  color: #dcecff;
  background: #263444;
}

.inbox-list strong {
  margin-bottom: 0.6rem;
  font-size: 1.15rem;
}

.inbox-list span {
  padding: 0.6rem;
  border-radius: 8px;
}

.inbox-list span.is-active {
  color: #263444;
  background: #fff;
}

.mock-email {
  display: grid;
  align-content: start;
}

.email-line {
  display: grid;
  align-items: center;
  gap: 0.45rem;
  grid-template-columns: 64px 1fr;
  padding: 0.65rem 1rem;
  border-bottom: 1px solid #cad5e3;
}

.email-line small {
  color: #526170;
  font-weight: 900;
}

.email-body {
  display: grid;
  justify-items: start;
  gap: 0.9rem;
  padding: clamp(1rem, 4vw, 2rem);
}

.email-body p {
  margin: 0;
}

.email-hotspot {
  min-height: 42px;
  padding: 0.45rem 0.65rem;
  color: #253342;
  background: #fff;
  border: 2px dashed #8ba1b7;
  border-radius: 8px;
  cursor: crosshair;
  font: inherit;
  font-weight: 750;
  text-align: left;
}

.email-hotspot:hover:not(:disabled) {
  background: #eef7ff;
  border-color: #176674;
}

.email-hotspot.is-found {
  color: #8b2f24;
  background: #fff0ed;
  border-color: #e37263;
  border-style: solid;
  opacity: 1;
}

/* Environmental science: sample the stream map */

.stream-map {
  position: relative;
  min-height: 330px;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 20%, #8bc776 0 3%, transparent 3.5%),
    radial-gradient(circle at 82% 18%, #8bc776 0 4%, transparent 4.5%),
    linear-gradient(145deg, #cce8a9, #9fd084);
  border: 3px solid #448344;
  border-radius: 22px;
}

.stream-ribbon {
  position: absolute;
  top: 33%;
  left: -8%;
  width: 116%;
  height: 34%;
  background:
    repeating-linear-gradient(170deg, rgba(255, 255, 255, 0.35) 0 8px, transparent 8px 22px),
    #55b9d2;
  border: 8px solid rgba(27, 111, 137, 0.42);
  border-radius: 45%;
  transform: rotate(7deg);
}

.map-landmark {
  position: absolute;
  z-index: 2;
  padding: 0.3rem 0.5rem;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 900;
}

.landmark-park { top: 8%; left: 20%; }
.landmark-site { top: 10%; left: 48%; }
.landmark-wetland { right: 5%; bottom: 8%; }

.sample-pin {
  position: absolute;
  z-index: 3;
  top: var(--pin-y);
  left: var(--pin-x);
  display: grid;
  min-width: 60px;
  min-height: 60px;
  place-items: center;
  padding: 0.35rem;
  color: #fff;
  background: #cc009c;
  border: 3px solid #fff;
  border-radius: 50% 50% 50% 8px;
  box-shadow: 0 4px 0 #790d46;
  cursor: pointer;
  transform: translate(-50%, -50%) rotate(-45deg);
}

.sample-pin > * {
  transform: rotate(45deg);
}

.sample-pin span {
  max-width: 76px;
  font-size: 0.62rem;
  font-weight: 800;
}

.sample-pin.is-collected {
  color: #13343b;
  background: #dff8ff;
  border-color: #176674;
  box-shadow: 0 4px 0 #176674;
}

.sample-tray {
  display: flex;
  min-height: 96px;
  align-items: flex-end;
  gap: 0.7rem;
  padding: 0.75rem;
  overflow-x: auto;
  background: #eef7ef;
  border: 2px solid #a8c9aa;
  border-radius: 14px;
}

.sample-tray > p {
  margin: auto;
  color: #4b6d4f;
}

.sample-vial {
  display: grid;
  min-width: 70px;
  justify-items: center;
  gap: 0.2rem;
}

.vial-water {
  display: block;
  width: 42px;
  height: 58px;
  background:
    linear-gradient(to top, rgba(79, 109, 82, var(--cloudiness)) 0 70%, transparent 70%),
    #dff8ff;
  border: 3px solid #176674;
  border-top-width: 6px;
  border-radius: 4px 4px 12px 12px;
}

.sample-vial small {
  font-size: 0.65rem;
  white-space: nowrap;
}

.change-point {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0;
  padding: 0.75rem;
  flex-wrap: wrap;
  background: #f8fff5;
  border: 1px solid #a8c9aa;
  border-radius: 14px;
}

.change-point legend {
  width: 100%;
  padding-inline: 0.35rem;
  color: #315a37;
  font-weight: 900;
}

.change-point button {
  flex: 1 1 160px;
  padding: 0.55rem;
  background: #fff;
  border: 2px solid #a8c9aa;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 850;
}

.change-point button.is-selected {
  color: #fff;
  background: #448344;
  border-color: #315a37;
}

/* Counselor: build a supportive reply */

.conversation-stage {
  display: grid;
  align-items: start;
  gap: 0.75rem;
  grid-template-columns: auto minmax(0, 1fr);
  padding: clamp(1rem, 3vw, 1.5rem);
  background:
    radial-gradient(circle at 90% 15%, #fff 0 2%, transparent 2.5%),
    #eef7ef;
  border: 2px solid #a8c9aa;
  border-radius: 20px;
}

.friend-avatar {
  display: grid;
  width: 68px;
  height: 68px;
  place-items: center;
  background: #ffe5a8;
  border: 3px solid #d0a33c;
  border-radius: 50%;
  font-size: 2rem;
}

.friend-bubble,
.reply-bubble {
  position: relative;
  max-width: 760px;
  padding: 0.9rem 1rem;
  border-radius: 6px 18px 18px 18px;
  line-height: 1.55;
}

.friend-bubble {
  background: #fff;
  border: 2px solid #b7cdb9;
}

.reply-bubble {
  min-height: 66px;
  grid-column: 2;
  color: #6f3f5b;
  background: #fff5fb;
  border: 2px dashed #d99aba;
}

.reply-bubble.has-reply {
  color: #4e1236;
  border-style: solid;
}

.connection-meter,
.poster-fit {
  height: 13px;
  overflow: hidden;
  background: #eadce4;
  border-radius: 999px;
}

.connection-meter span,
.poster-fit span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #8a1a9b, #cc009c, #e37263);
  border-radius: inherit;
  transition: width 220ms ease;
}

.listening-toolbox,
.pitch-controls {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(3, 1fr);
}

.listening-toolbox fieldset,
.pitch-controls fieldset {
  display: grid;
  align-content: start;
  gap: 0.55rem;
  margin: 0;
  padding: 0.75rem;
  background: #fff;
  border: 1px solid #edc7dd;
  border-radius: 14px;
}

.listening-toolbox legend,
.pitch-controls legend {
  padding-inline: 0.35rem;
  color: #790d46;
  font-weight: 900;
}

.listening-toolbox button,
.pitch-controls button {
  padding: 0.65rem;
  color: #4e1236;
  text-align: left;
  background: #fff7fb;
  border: 2px solid #dfb7ce;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 800;
  line-height: 1.35;
}

.listening-toolbox button.is-selected,
.pitch-controls button.is-selected {
  color: #fff;
  background: #8a1a9b;
  border-color: #790d46;
}

/* Market research: survey-to-poster studio */

.pitch-studio {
  display: grid;
  align-items: stretch;
  gap: 1rem;
  grid-template-columns: minmax(230px, 0.8fr) minmax(0, 1.2fr);
}

.survey-card {
  display: grid;
  align-content: start;
  gap: 0.8rem;
  padding: 1rem;
  background: #fff9e9;
  border: 2px solid #e0bf68;
  border-radius: 16px;
}

.survey-card > p {
  margin: 0.25rem 0 0;
  font-size: 0.85rem;
}

.survey-bar {
  display: grid;
  gap: 0.3rem;
}

.survey-bar span {
  font-size: 0.75rem;
  font-weight: 850;
}

.survey-bar i {
  display: block;
  width: var(--bar);
  min-width: 52px;
  padding: 0.33rem 0.5rem;
  color: #fff;
  background: #cc009c;
  border-radius: 5px 999px 999px 5px;
  font-style: normal;
  font-weight: 900;
}

.poster-preview {
  position: relative;
  display: grid;
  min-height: 280px;
  align-content: center;
  justify-items: center;
  gap: 0.75rem;
  padding: clamp(1.2rem, 5vw, 2.2rem);
  color: #fff;
  text-align: center;
  background:
    radial-gradient(circle at 86% 18%, #ffd66a 0 8%, transparent 8.5%),
    linear-gradient(145deg, #cc009c, #8a1a9b);
  border: 7px solid #ffe1f4;
  border-radius: 18px;
  box-shadow: 0 7px 0 #790d46;
}

.poster-preview h2,
.poster-preview p {
  margin: 0;
  color: inherit;
}

.poster-sticker {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  padding: 0.35rem 0.55rem;
  color: #790d46;
  background: #ffd66a;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 950;
  transform: rotate(4deg);
}

.poster-preview .poster-fit {
  width: min(100%, 280px);
  background: rgba(255, 255, 255, 0.28);
}

.poster-preview .poster-fit span {
  background: #ffd66a;
}

/* Exercise physiology: build a safe plan */

.training-week {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(3, 1fr);
}

.training-slot {
  display: grid;
  min-height: 150px;
  align-content: start;
  gap: 0.5rem;
  padding: 0.75rem;
  background: #f4fbff;
  border: 2px dashed #8ab9ca;
  border-radius: 16px;
}

.training-slot > small {
  color: #176674;
  font-weight: 950;
  text-transform: uppercase;
}

.training-slot.is-filled {
  border-style: solid;
}

.training-slot button {
  display: grid;
  height: 100%;
  place-items: center;
  gap: 0.25rem;
  padding: 0.6rem;
  color: #174b55;
  background: #fff;
  border: 2px solid #8ed2c5;
  border-radius: 12px;
  cursor: pointer;
}

.training-slot button span {
  font-size: 1.8rem;
}

.training-slot button em {
  color: #6f7b80;
  font-size: 0.67rem;
}

.empty-block {
  display: grid;
  min-height: 92px;
  place-items: center;
  color: #6b8790;
  font-weight: 850;
}

.activity-pool {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.activity-pool button {
  display: inline-flex;
  flex: 1 1 150px;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.6rem;
  color: #4e1236;
  background: #fff;
  border: 2px solid #edc7dd;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 850;
}

.safety-signal {
  display: grid;
  align-items: center;
  gap: 0.75rem;
  grid-template-columns: auto 1fr auto;
  padding: 0.85rem;
  color: #7a3028;
  background: #fff0ed;
  border: 2px solid #e4a199;
  border-radius: 14px;
}

.safety-signal > span {
  font-size: 1.65rem;
}

.safety-signal :where(p, strong) {
  margin: 0;
}

.safety-signal p {
  margin-top: 0.15rem;
  font-size: 0.82rem;
}

.safety-signal.is-stopped {
  color: #176674;
  background: #e8faf5;
  border-color: #8ed2c5;
}

@media (max-width: 800px) {
  .puzzle-layout,
  .pitch-studio {
    grid-template-columns: 1fr;
  }

  .relay-board {
    grid-template-columns: 1fr;
  }

  .relay-path {
    justify-self: center;
    transform: rotate(90deg);
  }

  .case-file-tabs,
  .evidence-tray,
  .listening-toolbox,
  .pitch-controls {
    grid-template-columns: 1fr;
    padding-left: 0;
  }

  .case-slot {
    min-height: auto;
  }

  .literary-portals {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .bridge-worksite,
  .stream-map {
    min-height: 300px;
  }

  .bridge-deck {
    right: 2%;
    left: 2%;
    border-right-width: 8px;
    border-left-width: 8px;
  }

  .bridge-bay {
    padding-inline: 0.1rem;
  }

  .bridge-bay span {
    font-size: 2.4rem;
  }

  .cyber-console {
    grid-template-columns: 1fr;
  }

  .inbox-list {
    display: none;
  }

  .weld-board {
    min-height: 330px;
  }

  .training-week {
    grid-template-columns: 1fr;
  }

  .tool-rack {
    grid-template-columns: 1fr;
  }

  .training-slot {
    min-height: 116px;
  }

  .safety-signal {
    grid-template-columns: auto 1fr;
  }

  .safety-signal button {
    grid-column: 1 / -1;
  }

  .conversation-stage {
    grid-template-columns: 1fr;
  }

  .reply-bubble {
    grid-column: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .weld-joint-line,
  .weld-joint.is-sparking .weld-joint-sparks {
    animation: none;
  }
}

.weld-preview {
  margin: 1rem 0 1.25rem;
  padding: clamp(0.65rem, 2vw, 1rem);
  background: #2e2530;
  border: 4px solid #790d46;
  border-radius: 16px;
  box-shadow: inset 0 0 24px rgba(0, 0, 0, 0.35);
}

.metal-plate {
  position: relative;
  min-height: 180px;
  overflow: hidden;
  background:
    linear-gradient(105deg, transparent 48%, rgba(255, 255, 255, 0.27) 50%, transparent 52%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.07) 0 1px, transparent 1px 8px),
    linear-gradient(135deg, #77838d, #c5ccd0 45%, #59636d);
  border: 3px solid #20262b;
  border-radius: 10px;
}

.metal-plate::before,
.metal-plate::after {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 8px;
  content: "";
  background: rgba(255, 255, 255, 0.2);
}

.metal-plate::before {
  left: 18%;
}

.metal-plate::after {
  right: 18%;
}

.weld-seam {
  position: absolute;
  top: 50%;
  left: 8%;
  width: 84%;
  height: 19px;
  background:
    radial-gradient(circle at 8px 50%, #fff2cd 0 3px, transparent 4px) 0 0 / var(--weld-spacing) 100% repeat-x,
    hsl(var(--weld-hue) 76% 48%);
  border: 2px solid rgba(60, 27, 13, 0.5);
  border-radius: 999px;
  box-shadow: 0 0 12px rgba(255, 116, 54, 0.75);
  transform: translateY(-50%);
}

.weld-torch {
  position: absolute;
  top: 29%;
  left: 73%;
  color: #25212a;
  font-size: 3rem;
  line-height: 1;
  transform: rotate(var(--weld-angle));
  transform-origin: 50% 100%;
}

.weld-sparks {
  position: absolute;
  top: 43%;
  left: 70%;
  color: #fff3a7;
  font-size: 1.6rem;
  font-weight: 900;
  text-shadow: 0 0 8px #ff7b2f;
  animation: weld-sparkle 900ms ease-in-out infinite alternate;
}

@keyframes weld-sparkle {
  from {
    opacity: 0.45;
    transform: translateY(3px) scale(0.94);
  }
  to {
    opacity: 1;
    transform: translateY(-2px) scale(1.04);
  }
}

.diagnostic-layout {
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1.1fr) minmax(230px, 0.9fr);
  margin-bottom: 1.1rem;
}

.car-console {
  display: grid;
  min-height: 190px;
  align-content: center;
  gap: 0.75rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 1rem;
  color: #fff;
  background:
    radial-gradient(circle at 50% 115%, rgba(206, 0, 159, 0.5), transparent 48%),
    #29222d;
  border: 4px solid #790d46;
  border-radius: 20px;
  box-shadow: inset 0 0 24px rgba(0, 0, 0, 0.45);
}

.car-icon {
  grid-column: 1 / -1;
  font-size: 3.2rem;
  line-height: 1;
  text-align: center;
}

.car-console > div {
  display: grid;
  min-height: 66px;
  place-items: center;
  padding: 0.55rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
}

.car-console > div span {
  color: #f5cce9;
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.car-console > div strong {
  color: #fff;
  font-family: var(--font-rounded);
}

.diagnostic-log {
  padding: 1rem;
  background: #fff5fb;
  border: 1px solid #edc7dd;
  border-radius: 16px;
}

.diagnostic-log > strong {
  color: #790d46;
  font-family: var(--font-rounded);
}

.diagnostic-log ol {
  padding-left: 1.3rem;
  margin: 0.7rem 0 0;
}

.diagnostic-log li {
  margin-bottom: 0.5rem;
  color: #5d2d49;
  font-size: 0.88rem;
}

.pipe-grid {
  width: min(100%, 420px);
  gap: 4px;
  grid-template-columns: repeat(5, 1fr);
  padding: 7px;
  background: #790d46;
  border: 4px solid #8a1a9b;
  border-radius: 16px;
}

.pipe-tile {
  min-width: 0;
  min-height: 0;
  color: #176674;
  border-radius: 7px;
  font-size: clamp(1.6rem, 6vw, 3rem);
}

@media (max-width: 760px) {
  .site-header {
    width: calc(100% - 1rem);
  }

  .brand img {
    width: min(220px, 56vw);
  }

  .home-card {
    border-radius: 22px;
  }

  .stock-grid {
    grid-template-columns: 1fr;
  }

  .diagnostic-layout {
    grid-template-columns: 1fr;
  }

  .builder-canvas {
    min-height: 460px;
  }
}

@media (max-width: 520px) {
  .page-shell {
    width: calc(100% - 1rem);
  }

  .site-header {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .site-header .brand {
    grid-column: 1 / -1;
    grid-row: 1;
    justify-self: center;
  }

  .site-header .nav {
    width: 100%;
    min-width: 0;
    grid-column: 1;
    grid-row: 2;
  }

  .site-header .progress-pill {
    grid-column: 2;
    grid-row: 2;
  }

  .brand img {
    width: min(184px, 55vw);
  }

  .progress-pill {
    padding-inline: 0.55rem;
  }

  .home-screen {
    min-height: auto;
    padding-top: 1.25rem;
  }

  .home-card {
    padding: 1.35rem 1rem 1.5rem;
  }

  .home-logo {
    width: min(275px, 84%);
  }

  .home-card .hero-title {
    font-size: clamp(2rem, 11vw, 3rem);
  }

  .field-ribbon {
    gap: 0.35rem;
  }

  .field-ribbon span {
    padding-inline: 0.58rem;
  }

  .game-stage {
    padding: 1rem;
  }

  .pipe-grid {
    width: min(100%, 330px);
    gap: 3px;
    padding: 5px;
  }

  .pipe-tile {
    font-size: clamp(1.35rem, 9vw, 2.2rem);
  }

  .stock-heading,
  .stock-actions {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .builder-toolbar > :where(button) {
    flex: 1 1 150px;
  }

  .builder-canvas {
    min-height: 500px;
  }
}

@media print {
  html,
  body {
    background: white;
  }
}

/* ================================================================
   Game juice system
   Shared, calm reactions for all career challenges.
   ================================================================ */

.game-board {
  --game-accent: var(--pink);
  --game-accent-dark: var(--plum);
  --game-accent-soft: var(--pink-soft);
  --game-support: var(--teal);
  isolation: isolate;
  overflow: hidden;
  background:
    linear-gradient(145deg, var(--game-accent), var(--game-accent-dark)) padding-box,
    linear-gradient(145deg, var(--game-accent), var(--gold), var(--game-support)) border-box;
}

.game-theme-ph,
.game-theme-foodLab,
.game-theme-waterMap {
  --game-accent: #168e9c;
  --game-accent-dark: #0d5969;
  --game-accent-soft: #def8f8;
  --game-support: #71c78d;
}

.game-theme-stocks,
.game-theme-pitch {
  --game-accent: #8a1a9b;
  --game-accent-dark: #4e1236;
  --game-accent-soft: #f7e7ff;
  --game-support: #f2b847;
}

.game-theme-color,
.game-theme-literary,
.game-theme-caseBuilder,
.game-theme-architect {
  --game-accent: #d93482;
  --game-accent-dark: #72164d;
  --game-accent-soft: #fff0f7;
  --game-support: #f2b847;
}

.game-theme-webBuilder,
.game-theme-cyberScan,
.game-theme-circuit {
  --game-accent: #267ca1;
  --game-accent-dark: #203e64;
  --game-accent-soft: #e7f6ff;
  --game-support: #55c7b3;
}

.game-theme-bridge,
.game-theme-weld,
.game-theme-pipes,
.game-theme-diagnostic {
  --game-accent: #e37263;
  --game-accent-dark: #6f332d;
  --game-accent-soft: #fff0e9;
  --game-support: #35a6b7;
}

.game-theme-careRelay,
.game-theme-listening,
.game-theme-priority,
.game-theme-training {
  --game-accent: #12867f;
  --game-accent-dark: #096761;
  --game-accent-soft: #e4f8f1;
  --game-support: #d93482;
}

.game-board .game-stage {
  background:
    radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--game-accent-soft) 84%, white), transparent 15rem),
    #fff;
}

.game-juice {
  position: absolute;
  z-index: 3;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  border-radius: inherit;
}

.game-juice i {
  position: absolute;
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  color: #fff8bd;
  font-size: 0.75rem;
  font-style: normal;
  opacity: 0.88;
  text-shadow: 0 2px 7px rgba(53, 22, 45, 0.34);
  animation: game-juice-drift 5.8s ease-in-out infinite;
}

.game-juice i:nth-child(1) {
  top: 16px;
  left: 18px;
}

.game-juice i:nth-child(2) {
  top: 36%;
  right: 9px;
  color: #d8fbff;
  animation-delay: -1.2s;
}

.game-juice i:nth-child(3) {
  right: 19px;
  bottom: 17px;
  color: #ffe2f4;
  animation-delay: -2.7s;
}

.game-juice i:nth-child(4) {
  bottom: 31%;
  left: 8px;
  animation-delay: -4s;
}

.game-stage {
  isolation: isolate;
}

.game-stage :where(button, .plan-card, .stock-card, .sample-vial) {
  transition:
    transform 170ms ease,
    border-color 170ms ease,
    box-shadow 170ms ease,
    background-color 170ms ease;
}

.game-stage button:not(:disabled):active {
  transform: translateY(1px) scale(0.98);
}

.game-stage .feedback {
  animation: outcome-card-in 360ms cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 5px 16px rgba(81, 16, 57, 0.07);
}

.game-stage .feedback.is-success::before {
  display: inline-grid;
  width: 25px;
  height: 25px;
  margin-right: 0.45rem;
  place-items: center;
  content: "✓";
  color: #fff;
  background: var(--teal);
  border-radius: 50%;
  font-weight: 950;
}

.target-status span.is-ready {
  position: relative;
  overflow: hidden;
}

.target-status span.is-ready::after {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.75), transparent 65%);
  transform: translateX(-120%);
  animation: ready-chip-shine 750ms ease-out;
}

/* Career-specific celebration motif. */

.career-finale {
  --finale-accent: var(--pink);
  --finale-soft: var(--pink-soft);
  position: relative;
  display: grid;
  width: min(100%, 570px);
  min-height: 132px;
  place-items: center;
  align-content: center;
  gap: 0.5rem;
  margin: 1.2rem auto;
  padding: 1.2rem 1.5rem;
  overflow: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 18%, #fff 0 4px, transparent 5px),
    radial-gradient(circle at 88% 24%, #fff 0 3px, transparent 4px),
    linear-gradient(145deg, #fff, var(--finale-soft));
  border: 3px solid var(--finale-accent);
  border-radius: 22px;
  box-shadow: 0 8px 0 color-mix(in srgb, var(--finale-accent) 34%, transparent);
  transform: rotate(-0.6deg);
  animation: finale-card-in 560ms cubic-bezier(0.2, 1.35, 0.45, 1) both;
}

.career-finale::before,
.career-finale::after {
  position: absolute;
  width: 74px;
  height: 74px;
  content: "";
  background: repeating-conic-gradient(var(--finale-accent) 0 7deg, transparent 7deg 18deg);
  border-radius: 50%;
  opacity: 0.13;
}

.career-finale::before {
  top: -37px;
  left: -30px;
}

.career-finale::after {
  right: -30px;
  bottom: -37px;
}

.career-finale > span {
  position: relative;
  z-index: 1;
  font-size: clamp(1.8rem, 7vw, 3.25rem);
  line-height: 1.2;
  filter: drop-shadow(0 4px 0 rgba(81, 16, 57, 0.1));
  animation: finale-icons-pop 650ms 100ms cubic-bezier(0.2, 1.5, 0.45, 1) both;
}

.career-finale > strong {
  position: relative;
  z-index: 1;
  color: var(--finale-accent);
  font-family: var(--font-rounded);
  font-size: clamp(1rem, 3vw, 1.35rem);
  line-height: 1.25;
}

.finale-ph,
.finale-foodLab,
.finale-waterMap,
.finale-careRelay,
.finale-listening,
.finale-priority,
.finale-training {
  --finale-accent: var(--teal);
  --finale-soft: var(--teal-soft);
}

.finale-stocks,
.finale-pitch,
.finale-literary,
.finale-color,
.finale-caseBuilder,
.finale-architect {
  --finale-accent: var(--pink);
  --finale-soft: var(--pink-soft);
}

.finale-webBuilder,
.finale-cyberScan,
.finale-circuit {
  --finale-accent: #267ca1;
  --finale-soft: #e3f5ff;
}

.finale-bridge,
.finale-weld,
.finale-pipes,
.finale-diagnostic {
  --finale-accent: #d65b4d;
  --finale-soft: #fff0e9;
}

.confetti {
  animation: finale-confetti 900ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

/* Biology and chemistry: cartoon reaction laboratory. */

.ph-reaction-game {
  display: grid;
  gap: 1rem;
}

.ph-lab-scene {
  position: relative;
  display: grid;
  min-height: 390px;
  place-items: end center;
  padding: 5.4rem 1rem 1.35rem;
  overflow: hidden;
  background:
    linear-gradient(90deg, transparent 49.5%, rgba(20, 91, 109, 0.08) 50%, transparent 50.5%) 0 0 / 50px 50px,
    linear-gradient(rgba(20, 91, 109, 0.08) 1px, transparent 1px) 0 0 / 50px 50px,
    radial-gradient(circle at 50% 104%, rgba(108, 212, 230, 0.75), transparent 35%),
    linear-gradient(180deg, #e7fbff, #f4ffff 68%, #c9e5e9 68% 72%, #729aa3 72%);
  border: 4px solid #176674;
  border-radius: 24px;
  box-shadow: inset 0 0 35px rgba(23, 102, 116, 0.12);
  isolation: isolate;
}

.ph-lab-scene::before,
.ph-lab-scene::after {
  position: absolute;
  z-index: -1;
  content: "";
}

.ph-lab-scene::before {
  right: 5%;
  bottom: 22%;
  left: 5%;
  height: 14px;
  background: #3c6873;
  border-radius: 999px;
  box-shadow: 0 11px 0 rgba(13, 76, 86, 0.25);
}

.ph-lab-scene::after {
  top: 12%;
  right: 5%;
  width: 82px;
  height: 76px;
  background:
    radial-gradient(circle at 22px 24px, #d93482 0 10px, transparent 11px),
    radial-gradient(circle at 58px 46px, #f2b847 0 12px, transparent 13px),
    #fff;
  border: 3px solid #8abfca;
  border-radius: 14px;
  box-shadow: 0 5px 0 rgba(23, 102, 116, 0.18);
}

.lab-sign {
  position: absolute;
  z-index: 3;
  top: 1rem;
  left: 1rem;
  display: grid;
  max-width: min(64%, 290px);
  align-items: center;
  gap: 0 0.65rem;
  grid-template-columns: auto 1fr;
  padding: 0.65rem 0.8rem;
  color: #173f48;
  background: rgba(255, 255, 255, 0.92);
  border: 2px solid #8ec9d2;
  border-radius: 13px;
  box-shadow: 0 5px 0 rgba(23, 102, 116, 0.15);
}

.lab-sign > span {
  grid-row: 1 / 3;
  font-size: 1.8rem;
}

.lab-sign strong,
.lab-sign small {
  line-height: 1.2;
}

.lab-sign small {
  color: #55747c;
  font-size: 0.66rem;
  font-weight: 800;
  text-transform: uppercase;
}

.reaction-beaker {
  position: relative;
  z-index: 2;
  display: grid;
  width: clamp(155px, 29vw, 230px);
  height: clamp(210px, 34vw, 285px);
  place-items: center;
  align-content: center;
  margin-bottom: 0.25rem;
  overflow: hidden;
  color: #17343b;
  background: rgba(255, 255, 255, 0.43);
  border: 7px solid #176674;
  border-top-width: 11px;
  border-radius: 20px 20px 72px 72px;
  box-shadow:
    inset 18px 0 0 rgba(255, 255, 255, 0.34),
    inset -8px 0 0 rgba(23, 102, 116, 0.1),
    0 12px 0 rgba(13, 76, 86, 0.18);
}

.reaction-beaker::before {
  position: absolute;
  z-index: 4;
  top: -17px;
  left: 50%;
  width: 62%;
  height: 34px;
  content: "";
  background: #e8fbff;
  border: 7px solid #176674;
  border-radius: 10px;
  transform: translateX(-50%);
}

.beaker-liquid {
  position: absolute;
  z-index: -1;
  right: 0;
  bottom: 0;
  left: 0;
  height: 67%;
  background:
    radial-gradient(circle at 18% 28%, rgba(255, 255, 255, 0.48) 0 5px, transparent 6px),
    radial-gradient(circle at 70% 54%, rgba(255, 255, 255, 0.38) 0 7px, transparent 8px),
    hsl(calc(var(--ph) * 17deg) 72% 66%);
  border-top: 5px solid rgba(255, 255, 255, 0.55);
  transition:
    height 220ms ease,
    background-color 220ms ease;
}

.beaker-liquid::before {
  position: absolute;
  top: -11px;
  right: -8%;
  left: -8%;
  height: 24px;
  content: "";
  background: inherit;
  border: 4px solid rgba(255, 255, 255, 0.52);
  border-radius: 50%;
}

.reaction-beaker > strong,
.reaction-beaker > small {
  position: relative;
  z-index: 5;
  display: block;
  text-shadow: 0 2px rgba(255, 255, 255, 0.88);
}

.reaction-beaker > strong {
  font-family: var(--font-rounded);
  font-size: clamp(3.4rem, 10vw, 5.5rem);
  line-height: 0.95;
}

.reaction-beaker > small {
  margin-top: 0.25rem;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.beaker-bubbles {
  position: absolute;
  z-index: 3;
  right: 8%;
  bottom: 18%;
  left: 8%;
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(0.7rem, 3vw, 1.25rem);
  letter-spacing: 0.7em;
  text-shadow: 0 0 5px rgba(23, 102, 116, 0.25);
  animation: lab-bubbles-rise 2.8s ease-in-out infinite;
}

.lab-robot {
  position: absolute;
  z-index: 4;
  right: clamp(0.7rem, 5vw, 4rem);
  bottom: 1.2rem;
  display: grid;
  width: clamp(72px, 15vw, 112px);
  aspect-ratio: 1;
  place-items: center;
  background: #fff;
  border: 4px solid #d93482;
  border-radius: 42% 42% 48% 48%;
  box-shadow: 0 8px 0 #9b1e61;
  font-size: clamp(2rem, 6vw, 3.4rem);
  animation: lab-robot-bob 3.2s ease-in-out infinite;
}

.ph-reaction-game.reaction-acid .reaction-beaker,
.ph-reaction-game.reaction-base .reaction-beaker,
.ph-reaction-game.reaction-buffer .reaction-beaker {
  animation: beaker-react 430ms ease-out;
}

.ph-reaction-game.reaction-acid .beaker-bubbles,
.ph-reaction-game.reaction-base .beaker-bubbles,
.ph-reaction-game.reaction-buffer .beaker-bubbles {
  animation-duration: 680ms;
}

.foam-burst {
  position: absolute;
  z-index: 6;
  top: 30%;
  left: 50%;
  width: min(86%, 420px);
  height: 180px;
  pointer-events: none;
  transform: translateX(-50%);
}

.foam-burst > span {
  position: absolute;
  top: -1.7rem;
  left: 50%;
  padding: 0.4rem 0.75rem;
  color: #72164d;
  background: #fff4a6;
  border: 3px solid #d93482;
  border-radius: 999px;
  box-shadow: 0 5px 0 #9b1e61;
  font-family: var(--font-rounded);
  font-weight: 950;
  transform: translateX(-50%) rotate(-4deg);
  animation: foam-word-pop 520ms cubic-bezier(0.2, 1.5, 0.45, 1) both;
}

.foam-burst i {
  position: absolute;
  display: block;
  width: 92px;
  height: 70px;
  color: transparent;
  background:
    radial-gradient(circle at 20% 65%, #fff 0 20%, transparent 21%),
    radial-gradient(circle at 48% 33%, #f2fbff 0 27%, transparent 28%),
    radial-gradient(circle at 78% 62%, #fff 0 24%, transparent 25%);
  filter: drop-shadow(0 3px 0 #bde2ea);
  animation: foam-puff 650ms cubic-bezier(0.2, 1.2, 0.4, 1) both;
}

.foam-burst i:nth-of-type(1) { top: 20%; left: 4%; --foam-x: -24px; --foam-y: -18px; }
.foam-burst i:nth-of-type(2) { top: 2%; left: 29%; --foam-x: -8px; --foam-y: -35px; animation-delay: 45ms; }
.foam-burst i:nth-of-type(3) { top: 4%; right: 23%; --foam-x: 14px; --foam-y: -31px; animation-delay: 80ms; }
.foam-burst i:nth-of-type(4) { top: 24%; right: 2%; --foam-x: 27px; --foam-y: -12px; animation-delay: 110ms; }

.balance-beam {
  position: absolute;
  z-index: 6;
  top: 1.15rem;
  left: 50%;
  width: max-content;
  max-width: calc(100% - 2rem);
  padding: 0.55rem 0.85rem;
  color: #fff;
  background: #12867f;
  border: 3px solid #fff;
  border-radius: 999px;
  box-shadow: 0 0 0 3px #096761, 0 7px 0 rgba(9, 103, 97, 0.28);
  font-family: var(--font-rounded);
  font-size: clamp(0.7rem, 2.5vw, 0.95rem);
  font-weight: 950;
  text-align: center;
  transform: translateX(-50%);
  animation: balance-seal-in 620ms cubic-bezier(0.2, 1.45, 0.45, 1) both;
}

.ph-reaction-game.is-balanced .reaction-beaker {
  box-shadow:
    inset 18px 0 0 rgba(255, 255, 255, 0.34),
    0 0 0 8px rgba(18, 134, 127, 0.15),
    0 0 35px rgba(18, 134, 127, 0.55),
    0 12px 0 rgba(13, 76, 86, 0.18);
}

.fictional-safety-note {
  display: grid;
  align-items: center;
  gap: 0.7rem;
  grid-template-columns: auto 1fr;
  padding: 0.75rem 0.9rem;
  color: #5d4050;
  background: #fff8df;
  border: 2px solid #e7c567;
  border-radius: 14px;
}

.fictional-safety-note > span {
  font-size: 1.55rem;
}

.fictional-safety-note p {
  margin: 0;
  color: inherit;
  font-size: 0.78rem;
  line-height: 1.45;
}

.ingredient-shelf {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 0.85rem;
  background:
    linear-gradient(#78929a 0 7px, transparent 7px),
    #eaf6f7;
  border: 2px solid #a6cbd1;
  border-radius: 16px;
}

.ingredient-shelf button {
  display: grid;
  min-width: 0;
  min-height: 118px;
  place-items: center;
  align-content: center;
  gap: 0.3rem;
  padding: 0.75rem;
  color: #173f48;
  background: #fff;
  border: 3px solid #83bdc7;
  border-radius: 17px 17px 9px 9px;
  box-shadow: 0 6px 0 #4f7b84;
  cursor: pointer;
}

.ingredient-shelf button:hover {
  border-color: #d93482;
  transform: translateY(-3px) rotate(-1deg);
}

.ingredient-shelf button > span {
  font-size: 2rem;
}

.ingredient-shelf button small {
  color: #55747c;
  font-weight: 800;
}

/* Business: friendly fictional market floor. */

.market-floor {
  position: relative;
  display: grid;
  min-height: 210px;
  align-items: end;
  gap: 0.85rem;
  grid-template-columns: auto 1fr auto;
  margin-bottom: 1rem;
  padding: 4.5rem 1rem 1rem;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(circle at 84% 18%, rgba(242, 184, 71, 0.24), transparent 23%),
    linear-gradient(145deg, #39134a, #72164d 58%, #9a2b75);
  border: 4px solid #4e1236;
  border-radius: 21px;
  box-shadow: inset 0 0 30px rgba(255, 255, 255, 0.05);
}

.market-floor > p {
  align-self: center;
  margin: 0;
  color: #fff4fb;
  line-height: 1.45;
  text-align: center;
}

.market-ticker {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-around;
  gap: 1rem;
  padding: 0.65rem 1rem;
  overflow: hidden;
  color: #ffef99;
  background: #1b1520;
  border-bottom: 3px solid #b54c9a;
  font-family: var(--font-rounded);
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.market-ticker span {
  animation: ticker-glow 2.4s ease-in-out infinite;
}

.market-ticker span:nth-child(2) {
  animation-delay: -0.8s;
}

.market-ticker span:nth-child(3) {
  animation-delay: -1.6s;
}

.market-mascot,
.market-mood {
  display: grid;
  width: 86px;
  height: 86px;
  place-items: center;
  background: #fff8dd;
  border: 4px solid #f2b847;
  border-radius: 50% 50% 46% 46%;
  box-shadow: 0 7px 0 #9b6610;
  font-size: 2.55rem;
  animation: market-mascot-bob 3.3s ease-in-out infinite;
}

.coin-jar {
  position: relative;
  display: flex;
  width: 82px;
  height: 104px;
  align-items: flex-end;
  justify-content: center;
  gap: 0;
  padding: 0.45rem;
  overflow: hidden;
  background:
    linear-gradient(to top, rgba(242, 184, 71, 0.32) 0 var(--coin-level), transparent var(--coin-level)),
    rgba(255, 255, 255, 0.2);
  border: 4px solid #d8ebef;
  border-top-width: 8px;
  border-radius: 10px 10px 24px 24px;
}

.coin-jar::before {
  position: absolute;
  top: -3px;
  left: 50%;
  width: 54px;
  height: 10px;
  content: "";
  background: #e9f4f6;
  border: 3px solid #9cb3ba;
  border-radius: 999px;
  transform: translateX(-50%);
}

.coin-jar span {
  margin-inline: -0.2rem;
  font-size: 1.45rem;
}

.trade-token {
  position: absolute;
  z-index: 3;
  top: 3.65rem;
  left: 50%;
  padding: 0.5rem 0.8rem;
  color: #4e1236;
  background: #fff3a9;
  border: 3px solid #f2b847;
  border-radius: 999px;
  box-shadow: 0 6px 0 #9b6610;
  font-family: var(--font-rounded);
  font-size: 0.77rem;
  font-weight: 950;
  transform: translateX(-50%);
  animation: trade-token-pop 520ms cubic-bezier(0.2, 1.4, 0.45, 1) both;
}

.stock-card {
  position: relative;
  overflow: hidden;
}

.stock-card::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 5px;
  content: "";
  background: #9a8e96;
}

.stock-card.is-up::before {
  background: var(--teal);
}

.stock-card.is-down::before {
  background: #d45a69;
}

.stock-heading > span {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  color: #fff;
  background: #887981;
  border-radius: 50%;
  font-weight: 950;
}

.stock-card.is-up .stock-heading > span {
  background: var(--teal);
}

.stock-card.is-down .stock-heading > span {
  background: #bd425a;
}

.stock-chart polyline {
  stroke-dasharray: 760;
  stroke-dashoffset: 0;
  animation: stock-line-draw 650ms ease-out both;
}

/* Freelance art: live mural and paint station. */

.color-mural-game {
  --paint-red: #e14a62;
  --paint-green: #37a96b;
  --paint-blue: #3b7ed8;
}

.mural-stage {
  position: relative;
  min-height: 265px;
  margin-bottom: 1rem;
  overflow: hidden;
  background:
    linear-gradient(180deg, #f8d9aa 0 72%, #bb8061 72% 77%, #775041 77%);
  border: 4px solid #72164d;
  border-radius: 21px;
  box-shadow: inset 0 0 25px rgba(81, 16, 57, 0.1);
}

.gallery-curtain {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 11%;
  background: repeating-linear-gradient(90deg, #72164d 0 12px, #a92567 12px 24px);
  border-right: 4px solid #f2b847;
}

.mural-canvas {
  position: absolute;
  top: 13%;
  right: 19%;
  bottom: 18%;
  left: 16%;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(circle at 74% 28%, var(--target-color) 0 13%, transparent 13.5%),
    linear-gradient(155deg, color-mix(in srgb, var(--mix-color) 76%, white), var(--mix-color));
  border: 8px solid #fff8e7;
  border-radius: 7px;
  box-shadow: 0 8px 0 rgba(81, 16, 57, 0.32);
  transition: background 180ms ease;
}

.mural-canvas::before {
  position: absolute;
  inset: 0;
  content: "";
  background:
    radial-gradient(ellipse at 15% 82%, rgba(255, 255, 255, 0.34) 0 19%, transparent 19.5%),
    radial-gradient(ellipse at 48% 95%, rgba(255, 255, 255, 0.28) 0 26%, transparent 26.5%),
    radial-gradient(ellipse at 83% 86%, rgba(255, 255, 255, 0.3) 0 21%, transparent 21.5%);
}

.mural-canvas > strong {
  position: absolute;
  z-index: 2;
  top: 13%;
  left: 8%;
  max-width: 58%;
  color: #fff;
  font-family: var(--font-rounded);
  font-size: clamp(0.8rem, 3vw, 1.45rem);
  line-height: 1.05;
  text-shadow: 0 3px 0 rgba(53, 22, 45, 0.42);
  transform: rotate(-3deg);
}

.mural-sun {
  position: absolute;
  top: 17%;
  right: 12%;
  width: 46px;
  height: 46px;
  background: #ffe36a;
  border: 5px solid rgba(255, 255, 255, 0.72);
  border-radius: 50%;
}

.mural-wave {
  position: absolute;
  right: -10%;
  bottom: -16%;
  left: -10%;
  height: 52%;
  background:
    radial-gradient(ellipse at 20% 0, transparent 0 27%, rgba(255, 255, 255, 0.6) 28% 34%, transparent 35%),
    radial-gradient(ellipse at 67% 0, transparent 0 24%, rgba(255, 255, 255, 0.45) 25% 31%, transparent 32%);
}

.paint-can {
  position: absolute;
  right: 4%;
  bottom: 8%;
  display: flex;
  width: 92px;
  height: 95px;
  align-items: flex-end;
  justify-content: center;
  gap: 0.25rem;
  padding: 0.6rem 0.35rem;
  background: linear-gradient(90deg, #ccd7dc, #fff 48%, #a9bac1);
  border: 4px solid #4d5960;
  border-radius: 8px 8px 18px 18px;
  box-shadow: 0 7px 0 rgba(53, 22, 45, 0.26);
}

.paint-can > span {
  position: absolute;
  top: -7px;
  left: 50%;
  width: 90%;
  height: 20px;
  background: var(--mix-color);
  border: 4px solid #4d5960;
  border-radius: 50%;
  transform: translateX(-50%);
}

.paint-can i {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  color: #fff;
  border-radius: 50%;
  font-size: 0.65rem;
  font-style: normal;
  font-weight: 950;
}

.paint-can i:nth-of-type(1) { background: var(--paint-red); }
.paint-can i:nth-of-type(2) { background: var(--paint-green); }
.paint-can i:nth-of-type(3) { background: var(--paint-blue); }

.paint-drops {
  position: absolute;
  right: 8%;
  top: 25%;
  width: 58px;
  height: 88px;
}

.paint-drops i {
  position: absolute;
  width: 16px;
  height: 22px;
  background: var(--mix-color);
  border-radius: 50% 50% 55% 45%;
  transform: rotate(45deg);
  animation: paint-drop-fall 2.8s ease-in infinite;
}

.paint-drops i:nth-child(1) { top: 0; left: 5px; animation-delay: -0.4s; }
.paint-drops i:nth-child(2) { top: 9px; left: 28px; animation-delay: -1.4s; }
.paint-drops i:nth-child(3) { top: 31px; left: 14px; animation-delay: -2.25s; }

.color-mural-game .color-swatch {
  position: relative;
  overflow: hidden;
}

.color-mural-game .color-swatch::after {
  position: absolute;
  inset: -25%;
  content: "";
  background: linear-gradient(110deg, transparent 35%, rgba(255, 255, 255, 0.4), transparent 65%);
  transform: translateX(-65%) rotate(8deg);
  animation: swatch-shine 3.8s ease-in-out infinite;
}

/* Literature: streaks, launch feedback, and portal energy. */

.literary-game {
  position: relative;
}

.streak-display {
  display: inline-grid;
  min-width: 138px;
  align-items: center;
  gap: 0 0.45rem;
  grid-template-columns: auto 1fr;
  margin: 0 auto 0.85rem;
  padding: 0.55rem 0.75rem;
  color: #4e1236;
  background: #fff5c7;
  border: 2px solid #e4b73d;
  border-radius: 999px;
  box-shadow: 0 4px 0 #9b6610;
}

.streak-display > span {
  grid-row: 1 / 3;
  font-size: 1.35rem;
}

.streak-display strong,
.streak-display small {
  line-height: 1.08;
  text-align: left;
}

.streak-display small {
  color: #73541d;
  font-size: 0.66rem;
  font-weight: 850;
}

.literary-arcade {
  position: relative;
}

.sentence-launcher.is-correct {
  border-color: #6cd4a8;
  box-shadow: 0 10px 0 rgba(9, 103, 97, 0.48), 0 0 0 7px rgba(108, 212, 168, 0.24);
  animation: sentence-card-win 520ms cubic-bezier(0.2, 1.3, 0.45, 1);
}

.sentence-launcher.is-hint {
  border-color: #f2b847;
  box-shadow: 0 10px 0 rgba(155, 102, 16, 0.4);
  animation: sentence-card-hint 380ms ease-out;
}

.word-burst {
  position: absolute;
  z-index: 4;
  top: 0.8rem;
  right: 1rem;
  padding: 0.5rem 0.8rem;
  color: #4e1236;
  background: #ffea72;
  border: 3px solid #fff;
  border-radius: 8px 20px 8px 20px;
  box-shadow: 0 0 0 3px #d93482, 0 7px 0 rgba(50, 5, 30, 0.35);
  font-family: var(--font-rounded);
  font-size: clamp(0.65rem, 2.4vw, 0.9rem);
  font-weight: 950;
  transform: rotate(5deg);
  animation: word-burst-in 560ms cubic-bezier(0.2, 1.5, 0.45, 1) both;
}

.literary-portal {
  position: relative;
  overflow: hidden;
}

.literary-portal::before {
  position: absolute;
  inset: 8px;
  content: "";
  pointer-events: none;
  border: 2px dashed rgba(204, 0, 156, 0.25);
  border-radius: inherit;
}

.literary-portal.is-chosen {
  color: #fff;
  background: #8a1a9b;
  border-color: #ffdc62;
  box-shadow: inset 0 -9px 0 #5a1167, 0 0 0 5px rgba(255, 220, 98, 0.28);
  animation: portal-chosen 480ms cubic-bezier(0.2, 1.3, 0.45, 1);
}

.literary-portal.is-chosen::before {
  border-color: rgba(255, 255, 255, 0.58);
  animation: portal-ring 650ms ease-out;
}

/* Technology: user-test bot and polished canvas. */

.builder-canvas {
  background-image:
    linear-gradient(rgba(50, 5, 30, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(50, 5, 30, 0.055) 1px, transparent 1px);
  background-color: var(--builder-bg);
  background-size: 22px 22px;
  box-shadow: inset 0 0 0 5px rgba(255, 255, 255, 0.68);
}

.builder-item {
  animation: builder-item-in 300ms cubic-bezier(0.2, 1.3, 0.45, 1);
}

.builder-item:hover {
  filter: drop-shadow(0 6px 6px rgba(50, 5, 30, 0.16));
}

.user-test-panel {
  display: grid;
  align-items: center;
  gap: 0.8rem;
  grid-template-columns: auto minmax(0, 1fr) auto;
  margin: 1rem 0;
  padding: 0.85rem;
  color: #264557;
  background:
    radial-gradient(circle at 96% 8%, #fff 0 4px, transparent 5px),
    #eaf7ff;
  border: 2px solid #9bcce1;
  border-radius: 16px;
}

.test-bot {
  display: grid;
  width: 62px;
  height: 62px;
  place-items: center;
  background: #fff;
  border: 3px solid #267ca1;
  border-radius: 19px 19px 24px 24px;
  box-shadow: 0 5px 0 #1f5872;
  font-size: 1.85rem;
}

.user-test-panel.is-awake .test-bot {
  animation: test-bot-wake 560ms cubic-bezier(0.2, 1.35, 0.45, 1);
}

.user-test-panel :where(strong, p) {
  margin: 0;
}

.user-test-panel p {
  margin-top: 0.2rem;
  color: #4a6573;
  font-size: 0.8rem;
  line-height: 1.4;
}

.test-checks {
  display: flex;
  justify-content: flex-end;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.test-checks span {
  padding: 0.35rem 0.55rem;
  color: #607782;
  background: #fff;
  border: 1px solid #b7d5e2;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 900;
}

.test-checks span.is-ready {
  color: #096761;
  background: #dff6ef;
  border-color: #55ab9f;
}

.test-checks span.is-ready::before {
  margin-right: 0.2rem;
  content: "✓";
}

/* Electrician: practice-room current path. */

.circuit-room {
  position: relative;
  min-height: 265px;
  margin-bottom: 1rem;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 8%, rgba(255, 235, 135, 0.28), transparent 28%),
    linear-gradient(180deg, #dcecf5 0 72%, #b8865b 72%);
  border: 4px solid #203e64;
  border-radius: 21px;
}

.circuit-room::before {
  position: absolute;
  top: 14%;
  left: 8%;
  width: 66px;
  height: 86px;
  content: "";
  background: linear-gradient(90deg, #b9dff1 50%, #dff5ff 50%);
  border: 7px solid #fff;
  border-radius: 5px;
  box-shadow: 0 5px 0 rgba(32, 62, 100, 0.2);
}

.circuit-wire {
  position: absolute;
  z-index: 3;
  top: 31%;
  right: 22%;
  left: 18%;
  height: 13px;
  overflow: visible;
  background: #445a68;
  border: 3px solid #203e64;
  border-radius: 999px;
}

.circuit-wire > span {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--current);
  background: linear-gradient(90deg, #5dc7e2, #ffe064);
  border-radius: inherit;
  box-shadow: 0 0 13px rgba(255, 224, 100, 0.66);
  transition: width 260ms ease;
}

.current-pulse {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: clamp(0%, var(--current), 100%);
  width: 18px;
  height: 18px;
  background: #fff59c;
  border: 3px solid #dc9c14;
  border-radius: 50%;
  box-shadow: 0 0 18px #ffdf4d;
  opacity: 0;
  transform: translate(-50%, -50%);
}

.circuit-wire > span:not([style*="0%"]) + .current-pulse {
  opacity: 1;
  animation: current-dot-pulse 1.2s ease-in-out infinite;
}

.circuit-bulb {
  position: absolute;
  z-index: 3;
  top: 12%;
  right: 7%;
  display: grid;
  width: 108px;
  height: 108px;
  place-items: center;
  color: #5a6270;
  background: rgba(255, 255, 255, 0.52);
  border: 4px solid #6d7d8c;
  border-radius: 50%;
  font-size: 3.5rem;
  filter: grayscale(0.85);
  transition:
    filter 200ms ease,
    box-shadow 200ms ease,
    background 200ms ease;
}

.circuit-bulb.is-ready {
  background: #fffbd7;
  border-color: #e0a825;
  box-shadow:
    0 0 0 10px rgba(255, 223, 89, 0.18),
    0 0 38px rgba(255, 211, 40, 0.7);
  filter: none;
  animation: bulb-ready 760ms ease-out;
}

.room-scene {
  position: absolute;
  right: 16%;
  bottom: 8%;
  left: 12%;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  font-size: clamp(2.2rem, 6vw, 4rem);
  filter: saturate(0.9);
}

.breaker-card {
  position: absolute;
  z-index: 5;
  bottom: 0.8rem;
  left: 50%;
  display: grid;
  min-width: min(90%, 340px);
  gap: 0.1rem;
  padding: 0.6rem 0.85rem;
  color: #264557;
  background: rgba(255, 255, 255, 0.94);
  border: 2px solid #8bb4c8;
  border-radius: 12px;
  box-shadow: 0 5px 0 rgba(32, 62, 100, 0.2);
  text-align: center;
  transform: translateX(-50%);
}

.breaker-card small {
  color: #536d7a;
  line-height: 1.35;
}

.breaker-card.is-tripped {
  color: #7a3028;
  background: #fff4dc;
  border-color: #e2a73a;
  box-shadow: 0 5px 0 #a76a17;
  animation: breaker-click 420ms ease-out;
}

.circuit-game.has-tripped .current-pulse {
  display: none;
}

.circuit-line span {
  position: relative;
}

.circuit-line span::after {
  position: absolute;
  top: -7px;
  right: -7px;
  display: grid;
  width: 19px;
  height: 19px;
  place-items: center;
  content: "✓";
  color: #fff;
  background: var(--teal);
  border: 2px solid #fff;
  border-radius: 50%;
  font-size: 0.58rem;
}

/* Engineer: a readable, playful load-test beat. */

.bridge-test-cart {
  position: absolute;
  z-index: 7;
  top: 19%;
  left: 4%;
  display: grid;
  justify-items: center;
  color: #4e1236;
  font-size: clamp(1.65rem, 5vw, 2.5rem);
  filter: drop-shadow(0 4px 0 rgba(53, 22, 45, 0.18));
  animation: bridge-cart-cross 1.45s cubic-bezier(0.32, 0.72, 0.34, 1) both;
}

.bridge-test-cart span {
  padding: 0.15rem 0.36rem;
  color: #fff;
  background: #d93482;
  border: 2px solid #fff;
  border-radius: 999px;
  font-family: var(--font-rounded);
  font-size: 0.56rem;
  font-weight: 950;
  letter-spacing: 0.05em;
}

.bridge-stress-mark {
  position: absolute;
  z-index: 8;
  top: 46%;
  left: 50%;
  padding: 0.3rem 0.55rem;
  color: #7a3028;
  background: #fff5c7;
  border: 3px solid #e37263;
  border-radius: 999px;
  box-shadow: 0 4px 0 #9a463c;
  font-family: var(--font-rounded);
  font-weight: 950;
  transform: translate(-50%, -50%);
  animation: stress-mark-pop 520ms cubic-bezier(0.2, 1.4, 0.45, 1) both;
}

.bridge-game.test-strained .bridge-deck {
  animation: bridge-gentle-flex 620ms ease-in-out;
  transform-origin: center top;
}

.bridge-game.test-passed .bridge-worksite {
  box-shadow:
    inset 0 0 0 6px rgba(255, 255, 255, 0.52),
    0 0 0 5px rgba(18, 134, 127, 0.22);
}

.bridge-river {
  animation: river-shimmer 4.8s ease-in-out infinite;
}

/* Medicine: light the handoff path as tasks are routed. */

.relay-route-lights {
  position: relative;
  display: grid;
  min-height: 90px;
  align-items: center;
  gap: 0.45rem;
  grid-template-columns: auto 1fr auto 1fr auto;
  padding: 1rem 1.1rem;
  overflow: hidden;
  background:
    radial-gradient(circle at 10% 20%, #fff 0 3px, transparent 4px),
    #eefaff;
  border: 2px solid #b4d9e8;
  border-radius: 17px;
}

.relay-route-lights > span {
  position: relative;
  z-index: 2;
  display: grid;
  min-width: 64px;
  min-height: 42px;
  place-items: center;
  padding: 0.35rem;
  color: #6a7b84;
  background: #fff;
  border: 3px solid #c2d9e2;
  border-radius: 13px;
  font-family: var(--font-rounded);
  font-size: 0.68rem;
  font-weight: 950;
}

.relay-route-lights > span.is-lit {
  color: #fff;
  background: #12867f;
  border-color: #fff;
  box-shadow: 0 0 0 3px #12867f, 0 0 18px rgba(18, 134, 127, 0.4);
  animation: relay-light-on 480ms cubic-bezier(0.2, 1.35, 0.45, 1);
}

.relay-route-lights > i {
  height: 8px;
  background:
    repeating-linear-gradient(90deg, #8ed2c5 0 10px, transparent 10px 16px),
    #d7edf1;
  border-radius: 999px;
}

.relay-token {
  position: absolute;
  z-index: 4;
  top: 2px;
  left: clamp(52px, var(--route-progress), calc(100% - 52px));
  font-size: 1.45rem;
  filter: drop-shadow(0 3px 0 rgba(53, 22, 45, 0.14));
  transform: translateX(-50%) rotate(-4deg);
  transition: left 320ms cubic-bezier(0.2, 1, 0.4, 1);
}

.relay-card.is-routed::after {
  align-self: start;
  justify-self: end;
  grid-column: 2;
  grid-row: 1;
  content: "✓";
  color: #fff;
  background: var(--teal);
  border-radius: 50%;
  padding: 0.05rem 0.35rem;
  font-weight: 950;
}

/* Law: argument-balance display. */

.fairness-scale {
  display: grid;
  min-height: 145px;
  align-items: center;
  gap: 0.45rem 1rem;
  grid-template-columns: 1fr auto 1fr;
  padding: 1rem;
  color: #4e1236;
  background:
    repeating-linear-gradient(#fffdf7 0 25px, #dbe5ef 26px),
    #fffdf7;
  border: 3px solid #c39b57;
  border-radius: 18px;
  box-shadow: 0 6px 0 #8c6a3e;
}

.scale-post {
  font-size: clamp(2.8rem, 8vw, 4.8rem);
  filter: drop-shadow(0 5px 0 rgba(81, 16, 57, 0.14));
}

.scale-pan {
  display: grid;
  width: min(100%, 120px);
  aspect-ratio: 1.35;
  place-items: center;
  justify-self: center;
  background: #fff5c7;
  border: 4px solid #b8842f;
  border-radius: 8px 8px 50% 50%;
  box-shadow: 0 7px 0 rgba(140, 106, 62, 0.25);
  font-size: 2.2rem;
  transform-origin: center top;
  transition: transform 250ms ease;
}

.fairness-scale.fair-0 .pan-claim { transform: translateY(7px) rotate(-5deg); }
.fairness-scale.fair-0 .pan-proof { transform: translateY(-5px) rotate(5deg); }
.fairness-scale.fair-1 .pan-claim { transform: translateY(4px) rotate(-3deg); }
.fairness-scale.fair-1 .pan-proof { transform: translateY(-3px) rotate(3deg); }
.fairness-scale.fair-2 .pan-claim { transform: translateY(2px) rotate(-1deg); }
.fairness-scale.fair-2 .pan-proof { transform: translateY(-1px) rotate(1deg); }

.fairness-scale.fair-3 .scale-pan {
  border-color: #12867f;
  box-shadow: 0 7px 0 rgba(18, 134, 127, 0.2);
  animation: fair-pan-settle 520ms cubic-bezier(0.2, 1.3, 0.45, 1);
}

.fairness-scale > strong {
  grid-column: 1 / -1;
  color: #72164d;
  font-family: var(--font-rounded);
  text-align: center;
}

.case-slot.is-filled {
  animation: case-card-stamp 350ms cubic-bezier(0.2, 1.25, 0.45, 1);
}

/* Welder: Ocean Explorer build and automated pressure chamber. */

.weld-board.design-ocean {
  background:
    radial-gradient(circle at 52% 108%, #ff8a3d 0 4%, transparent 21%),
    radial-gradient(circle at 10% 18%, rgba(78, 203, 225, 0.12) 0 4px, transparent 5px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.04) 0 1px, transparent 1px 9px),
    linear-gradient(145deg, #183848, #11191f 70%);
}

.ocean-hull {
  z-index: 2;
  top: 35%;
  left: 21%;
  width: 58%;
  height: 31%;
  border-radius: 48% 55% 42% 45%;
}

.ocean-nose {
  z-index: 1;
  top: 39%;
  right: 12%;
  width: 25%;
  height: 22%;
  border-radius: 15% 80% 80% 15%;
  transform: rotate(-2deg);
}

.ocean-tail {
  top: 40%;
  left: 10%;
  width: 22%;
  height: 20%;
  border-radius: 70% 10% 10% 70%;
  clip-path: polygon(0 50%, 100% 0, 100% 100%);
}

.ocean-fin {
  z-index: 1;
  left: 45%;
  width: 24%;
  height: 20%;
  border-radius: 55% 12px 8px;
}

.ocean-fin.fin-top {
  top: 20%;
  transform: rotate(-8deg);
}

.ocean-fin.fin-bottom {
  top: 62%;
  transform: scaleY(-1) rotate(-8deg);
}

.ocean-window {
  z-index: 3;
  top: 42%;
  left: 55%;
  width: 13%;
  aspect-ratio: 1;
  background:
    radial-gradient(circle at 35% 30%, #fff 0 8%, transparent 9%),
    #4ac4de;
  border: 7px solid #4c565f;
  border-radius: 50%;
  box-shadow: inset 0 0 0 3px #b9f3ff, 0 3px 7px rgba(0, 0, 0, 0.28);
}

.ocean-drone-label {
  position: absolute;
  z-index: 5;
  top: 69%;
  left: 50%;
  padding: 0.3rem 0.55rem;
  color: #e7fbff;
  background: rgba(9, 34, 47, 0.88);
  border: 1px solid #65cde2;
  border-radius: 999px;
  font-size: clamp(0.5rem, 2vw, 0.7rem);
  font-weight: 950;
  letter-spacing: 0.09em;
  pointer-events: none;
  transform: translateX(-50%);
}

.weld-board.is-assembled .weld-piece {
  animation: metal-finish-shine 1s ease-out both;
}

.pressure-chamber {
  display: grid;
  overflow: hidden;
  grid-template-columns: minmax(0, 1.35fr) minmax(240px, 0.65fr);
  background: #eaf5f7;
  border: 4px solid #176674;
  border-radius: 22px;
  box-shadow: 0 8px 0 rgba(23, 102, 116, 0.2);
}

.pressure-water {
  position: relative;
  min-height: 330px;
  overflow: hidden;
  background:
    repeating-linear-gradient(170deg, rgba(255, 255, 255, 0.1) 0 8px, transparent 8px 27px),
    radial-gradient(circle at 50% 8%, #4ec6df, transparent 38%),
    linear-gradient(180deg, #248aa9, #123e64 68%, #0d263d);
  border-right: 4px solid #176674;
  isolation: isolate;
}

.pressure-water.is-workshop-test {
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.04) 0 1px, transparent 1px 10px),
    radial-gradient(circle at 50% 20%, rgba(255, 150, 74, 0.32), transparent 34%),
    linear-gradient(145deg, #34333c, #171419);
}

.pressure-water::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: "";
  background:
    radial-gradient(circle at 12% 78%, rgba(108, 212, 230, 0.25) 0 4px, transparent 5px),
    radial-gradient(circle at 82% 28%, rgba(108, 212, 230, 0.22) 0 5px, transparent 6px);
  animation: pressure-water-drift 7s ease-in-out infinite;
}

.depth-mark {
  position: absolute;
  z-index: 3;
  left: 0.7rem;
  padding: 0.18rem 0.4rem;
  color: #d9f8ff;
  background: rgba(8, 42, 61, 0.54);
  border-radius: 999px;
  font-size: 0.64rem;
  font-weight: 900;
}

.depth-mark::after {
  display: inline-block;
  width: 34px;
  height: 1px;
  margin-left: 0.35rem;
  content: "";
  vertical-align: middle;
  background: rgba(217, 248, 255, 0.48);
}

.depth-1 { top: 20%; }
.depth-2 { top: 49%; }
.depth-3 { top: 78%; }

.test-craft {
  position: absolute;
  z-index: 2;
  top: 45%;
  left: 54%;
  display: grid;
  justify-items: center;
  gap: 0.3rem;
  color: #e9fbff;
  transform: translate(-50%, -50%);
  animation: test-craft-hover 3.8s ease-in-out infinite;
}

.test-craft > span {
  display: grid;
  width: clamp(100px, 21vw, 150px);
  min-height: 82px;
  place-items: center;
  background: linear-gradient(145deg, #c4d0d5, #6a7780);
  border: 5px solid #27343d;
  border-radius: 55% 48% 48% 55%;
  box-shadow: 0 10px 0 rgba(4, 20, 31, 0.35), inset 0 0 0 5px rgba(255, 255, 255, 0.15);
  font-size: clamp(2.6rem, 8vw, 4.5rem);
}

.test-craft small {
  padding: 0.25rem 0.5rem;
  color: inherit;
  background: rgba(4, 28, 43, 0.78);
  border-radius: 999px;
  font-weight: 900;
}

.pressure-bubbles {
  position: absolute;
  right: 7%;
  bottom: 2%;
  color: rgba(225, 251, 255, 0.88);
  font-size: 1.2rem;
  line-height: 2.4;
  writing-mode: vertical-rl;
  animation: pressure-bubbles-rise 3.3s ease-in-out infinite;
}

.cartoon-leak {
  position: absolute;
  z-index: 5;
  top: 42%;
  left: 62%;
  padding: 0.4rem 0.6rem;
  color: #173f48;
  background: #d9f9ff;
  border: 3px solid #fff;
  border-radius: 50% 50% 50% 8px;
  box-shadow: 0 0 0 3px #e37263, 0 6px 0 rgba(11, 47, 65, 0.3);
  font-family: var(--font-rounded);
  font-size: 0.78rem;
  font-weight: 950;
  animation: cartoon-leak-puff 680ms cubic-bezier(0.2, 1.35, 0.45, 1) both;
}

.glowing-coral {
  position: absolute;
  z-index: 4;
  right: 4%;
  bottom: 3%;
  left: 4%;
  color: #fff;
  font-size: clamp(1.65rem, 5vw, 2.8rem);
  text-align: center;
  filter: drop-shadow(0 0 9px rgba(255, 220, 98, 0.78));
  animation: coral-celebrate 720ms cubic-bezier(0.2, 1.35, 0.45, 1) both;
}

.pressure-console {
  display: grid;
  align-content: center;
  gap: 0.85rem;
  padding: clamp(1rem, 3vw, 1.5rem);
  color: #173f48;
  background:
    radial-gradient(circle at 90% 8%, #fff 0 4px, transparent 5px),
    #edf8f8;
}

.pressure-console > strong {
  color: #0d5969;
  font-family: var(--font-rounded);
  font-size: 1.1rem;
}

.pressure-console p {
  margin: 0;
  color: #49656c;
  font-size: 0.84rem;
  line-height: 1.5;
}

.pressure-gauge {
  position: relative;
  height: 22px;
  overflow: hidden;
  background:
    repeating-linear-gradient(90deg, transparent 0 9%, rgba(23, 63, 72, 0.14) 9% 10%),
    #cddcdf;
  border: 3px solid #55747c;
  border-radius: 999px;
}

.pressure-gauge > span {
  display: block;
  width: var(--pressure);
  height: 100%;
  background: linear-gradient(90deg, #55c7b3, #f2b847);
  border-radius: inherit;
  box-shadow: 0 0 12px rgba(85, 199, 179, 0.62);
  transition: width 650ms ease;
}

.pressure-chamber.outcome-pass {
  border-color: #12867f;
  box-shadow: 0 8px 0 rgba(18, 134, 127, 0.25), 0 0 0 6px rgba(18, 134, 127, 0.12);
}

.pressure-chamber.outcome-pass .pressure-gauge > span {
  background: linear-gradient(90deg, #58bda6, #9bea9e);
}

.pressure-chamber.outcome-leak {
  border-color: #e37263;
  box-shadow: 0 8px 0 rgba(141, 59, 51, 0.22);
}

.pressure-chamber.outcome-leak .pressure-gauge > span {
  background: linear-gradient(90deg, #f2b847, #e37263);
}

/* Cybersecurity: charge a calm protective shield. */

.cyber-shield {
  display: grid;
  align-items: center;
  gap: 0.75rem;
  grid-template-columns: auto minmax(120px, 1fr) auto;
  padding: 0.75rem 0.9rem;
  color: #263444;
  background: #eaf6ff;
  border: 2px solid #9cc6e0;
  border-radius: 15px;
}

.cyber-shield > span {
  font-size: 2rem;
  filter: drop-shadow(0 3px 0 rgba(32, 62, 100, 0.15));
}

.cyber-shield > div {
  height: 16px;
  overflow: hidden;
  background: #cbd8e2;
  border: 2px solid #63798a;
  border-radius: 999px;
}

.cyber-shield i {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #267ca1, #55c7b3);
  border-radius: inherit;
  box-shadow: 0 0 11px rgba(85, 199, 179, 0.5);
  transition: width 260ms ease;
}

.cyber-shield > strong {
  color: #203e64;
  font-size: 0.8rem;
}

.email-hotspot.is-found {
  position: relative;
  animation: flag-found 380ms cubic-bezier(0.2, 1.3, 0.45, 1);
}

.email-hotspot.is-found::after {
  position: absolute;
  top: -9px;
  right: -8px;
  padding: 0.08rem 0.3rem;
  content: "FLAG";
  color: #fff;
  background: #b7354e;
  border: 2px solid #fff;
  border-radius: 5px;
  font-size: 0.48rem;
  font-weight: 950;
  letter-spacing: 0.05em;
}

/* Environmental science: flowing stream and field trend chart. */

.stream-ribbon {
  background-position: 0 0;
  animation: stream-flow 8s linear infinite;
}

.sample-pin.is-collected {
  animation: sample-pin-fill 420ms cubic-bezier(0.2, 1.35, 0.45, 1);
}

.vial-water {
  position: relative;
  overflow: hidden;
  animation: vial-fill 520ms ease-out both;
}

.vial-water::after {
  position: absolute;
  right: 5px;
  bottom: 8px;
  width: 7px;
  height: 7px;
  content: "";
  background: rgba(255, 255, 255, 0.72);
  border-radius: 50%;
  box-shadow: 9px -14px 0 rgba(255, 255, 255, 0.5), -2px -28px 0 rgba(255, 255, 255, 0.38);
  animation: vial-bubble 2.5s ease-in-out infinite;
}

.water-trend {
  display: grid;
  gap: 0.55rem;
  padding: 0.85rem;
  color: #315a37;
  background: #f4fff2;
  border: 2px solid #a8c9aa;
  border-radius: 15px;
}

.water-trend > div {
  display: flex;
  height: 118px;
  align-items: flex-end;
  justify-content: space-around;
  gap: 0.55rem;
  padding: 0.55rem 0.55rem 0;
  background:
    linear-gradient(rgba(49, 90, 55, 0.08) 1px, transparent 1px) 0 0 / 100% 25%,
    rgba(255, 255, 255, 0.72);
  border-radius: 10px;
}

.water-trend > div > span {
  display: grid;
  height: 100%;
  flex: 1;
  align-items: end;
  justify-items: center;
  gap: 0.2rem;
  opacity: 0.34;
}

.water-trend > div > span.is-collected {
  opacity: 1;
}

.water-trend i {
  display: block;
  width: min(100%, 42px);
  height: var(--trend);
  min-height: 8px;
  background: linear-gradient(#6cd4e6, #267ca1);
  border: 2px solid #176674;
  border-radius: 8px 8px 3px 3px;
  transform-origin: bottom;
}

.water-trend span.is-collected i {
  animation: trend-bar-grow 520ms cubic-bezier(0.2, 1, 0.4, 1) both;
}

.water-trend small {
  color: #315a37;
  font-weight: 900;
}

.water-trend p {
  margin: 0;
  color: #486c4d;
  font-size: 0.78rem;
}

/* Counselor: support choices grow a connection garden. */

.friend-avatar {
  transition:
    transform 220ms ease,
    background 220ms ease,
    box-shadow 220ms ease;
}

.friend-avatar.connection-1,
.friend-avatar.connection-2,
.friend-avatar.connection-3 {
  background: #fff0b8;
  box-shadow: 0 0 0 6px rgba(242, 184, 71, 0.15);
}

.friend-avatar.connection-3 {
  background: #dff6ef;
  border-color: #12867f;
  box-shadow: 0 0 0 7px rgba(18, 134, 127, 0.16);
  animation: friendly-face-pop 520ms cubic-bezier(0.2, 1.35, 0.45, 1);
}

.connection-garden {
  display: flex;
  min-height: 54px;
  align-items: flex-end;
  justify-content: center;
  gap: 0.7rem;
  grid-column: 1 / -1;
  padding: 0.35rem 1rem 0.15rem;
  background:
    radial-gradient(ellipse at 50% 100%, #8bc776 0 24%, transparent 25%),
    linear-gradient(transparent 75%, #b6d79d 75%);
  border-radius: 999px 999px 12px 12px;
}

.connection-garden span {
  min-width: 28px;
  font-size: 1.55rem;
  text-align: center;
}

.connection-garden.garden-1 span:first-child,
.connection-garden.garden-2 span,
.connection-garden.garden-3 span {
  animation: garden-grow 480ms cubic-bezier(0.2, 1.45, 0.45, 1);
  transform-origin: center bottom;
}

.reply-bubble.has-reply {
  animation: reply-build 380ms ease-out;
}

/* Market research: earn visible audience-fit stars. */

.fit-stars {
  display: flex;
  gap: 0.28rem;
  padding: 0.3rem 0.45rem;
  background: rgba(61, 11, 54, 0.28);
  border-radius: 999px;
}

.fit-stars span {
  color: rgba(255, 255, 255, 0.38);
  font-size: 1.25rem;
  line-height: 1;
  text-shadow: 0 2px rgba(78, 18, 54, 0.5);
}

.fit-stars span.is-earned {
  color: #ffe36a;
  animation: fit-star-pop 420ms cubic-bezier(0.2, 1.45, 0.45, 1);
}

.survey-bar i {
  transform-origin: left;
  animation: survey-bar-grow 620ms cubic-bezier(0.2, 1, 0.4, 1) both;
}

.poster-sticker {
  animation: poster-sticker-in 480ms cubic-bezier(0.2, 1.35, 0.45, 1) both;
}

/* Exercise physiology: calm coach track and safety pause. */

.coach-track {
  position: relative;
  display: grid;
  min-height: 128px;
  align-items: center;
  gap: 0.65rem;
  grid-template-columns: auto minmax(0, 1fr);
  padding: 1rem;
  overflow: hidden;
  color: #174b55;
  background:
    radial-gradient(circle at 90% 12%, #fff 0 3px, transparent 4px),
    #eaf9f5;
  border: 2px solid #8ed2c5;
  border-radius: 18px;
}

.track-line {
  position: absolute;
  top: 62%;
  right: 7%;
  left: 7%;
  height: 12px;
  overflow: hidden;
  background: #c6ddd8;
  border: 2px solid #66988e;
  border-radius: 999px;
}

.track-line > span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #55c7b3, #f2b847);
  border-radius: inherit;
  transition: width 260ms ease;
}

.coach-avatar {
  position: relative;
  z-index: 3;
  display: grid;
  width: 76px;
  height: 76px;
  place-items: center;
  background: #fff;
  border: 4px solid #12867f;
  border-radius: 50%;
  box-shadow: 0 6px 0 #096761;
  font-size: 2rem;
  transform: translateX(calc(var(--coach-step) * 3px));
}

.progress-footprints {
  position: relative;
  z-index: 2;
  min-height: 28px;
  align-self: end;
  color: #176674;
  font-size: 1rem;
  letter-spacing: 0.18em;
}

.coach-track > strong {
  position: relative;
  z-index: 2;
  align-self: start;
  font-size: 0.84rem;
  line-height: 1.4;
}

.coach-track.is-paused {
  background: #fff8df;
  border-color: #e2bd58;
}

.coach-track.is-paused .coach-avatar {
  border-color: #f2b847;
  box-shadow: 0 6px 0 #9b6610;
  animation: coach-shield-pop 520ms cubic-bezier(0.2, 1.35, 0.45, 1);
}

.training-slot.is-filled {
  animation: training-block-drop 340ms cubic-bezier(0.2, 1.25, 0.45, 1);
}

/* Mechanic: tool effect, gauge sweep, and fresh log entry. */

.car-console {
  position: relative;
  overflow: hidden;
}

.car-console > .garage-effect,
.car-console > .gauge-needle {
  position: absolute;
  z-index: 4;
  display: block;
  min-height: 0;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
}

.garage-effect {
  top: 14%;
  right: 8%;
  width: 58px;
  height: 58px;
  color: #fff3a7;
  font-size: 2.15rem;
  text-align: center;
  text-shadow: 0 0 10px #ff9a45;
  opacity: 0;
}

.garage-effect i {
  position: absolute;
  inset: 3px;
  border: 3px dashed rgba(255, 239, 135, 0.65);
  border-radius: 50%;
}

.diagnostic-game.has-tool-effect .garage-effect {
  opacity: 1;
  animation: garage-tool-run 620ms ease-out;
}

.gauge-needle {
  top: 16%;
  left: 8%;
  width: 76px;
  height: 42px;
  background: #13191f !important;
  border: 3px solid #6cd4e6 !important;
  border-radius: 76px 76px 8px 8px !important;
}

.gauge-needle::before {
  position: absolute;
  bottom: 7px;
  left: 50%;
  width: 5px;
  height: 26px;
  content: "";
  background: #ffdf5b;
  border-radius: 999px;
  transform: rotate(-54deg);
  transform-origin: center bottom;
}

.diagnostic-game.has-tool-effect .gauge-needle::before {
  animation: gauge-sweep 680ms ease-in-out;
}

.diagnostic-log li:last-child {
  padding: 0.25rem 0.4rem;
  color: #174b55;
  background: #e8faf5;
  border-radius: 6px;
  animation: log-line-in 360ms ease-out;
}

/* Plumber: pressure preview and flowing aligned tiles. */

.faucet-scene {
  display: grid;
  min-height: 122px;
  align-items: center;
  gap: 0.5rem 0.8rem;
  grid-template-columns: auto minmax(120px, 1fr) auto auto;
  padding: 0.9rem 1rem;
  color: #174b55;
  background:
    radial-gradient(circle at 94% 8%, #fff 0 3px, transparent 4px),
    #e7f8fb;
  border: 3px solid #6eb8c9;
  border-radius: 18px;
}

.source-tank,
.garden-faucet,
.garden-plant {
  font-size: clamp(1.8rem, 5vw, 2.8rem);
}

.flow-meter {
  height: 22px;
  overflow: hidden;
  background:
    repeating-linear-gradient(90deg, transparent 0 9%, rgba(23, 102, 116, 0.16) 9% 10%),
    #c7dce1;
  border: 3px solid #176674;
  border-radius: 999px;
}

.flow-meter i {
  display: block;
  width: 0;
  height: 100%;
  background:
    repeating-linear-gradient(115deg, rgba(255, 255, 255, 0.42) 0 8px, transparent 8px 16px),
    #48b8d0;
  border-radius: inherit;
  box-shadow: 0 0 12px rgba(72, 184, 208, 0.58);
  transition: width 220ms ease;
  animation: meter-water 1.8s linear infinite;
}

.faucet-scene > strong {
  grid-column: 1 / -1;
  font-size: 0.82rem;
  text-align: center;
}

.pipe-grid {
  position: relative;
  background:
    radial-gradient(circle at 50% 50%, rgba(108, 212, 230, 0.2), transparent 65%),
    #511039;
}

.pipe-tile {
  position: relative;
  overflow: hidden;
  touch-action: manipulation;
}

.game-stage button.pipe-tile:not(:disabled):active {
  transform: scale(0.98);
}

.pipe-water {
  position: absolute;
  z-index: 0;
  inset: 12%;
  background: rgba(94, 204, 226, 0.2);
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
}

.pipe-tile > span {
  position: relative;
  z-index: 1;
}

.pipe-tile.is-aligned {
  color: #0f788c;
  background: #dcf9ff;
  border-color: #58b9cf;
  box-shadow: inset 0 0 12px rgba(72, 184, 208, 0.2);
}

.pipe-tile.is-aligned .pipe-water {
  opacity: 1;
  animation: pipe-water-pulse 1.9s ease-in-out infinite;
}

.pipe-tile.is-last {
  animation: pipe-click-turn 260ms ease-out;
}

/* Food science: berry test kitchen. */

.food-lab-scene {
  position: relative;
  display: grid;
  min-height: 300px;
  align-items: end;
  gap: 1rem;
  grid-template-columns: minmax(160px, 0.8fr) auto minmax(190px, 1fr);
  padding: 3.8rem 1rem 1rem;
  overflow: hidden;
  background:
    linear-gradient(rgba(130, 53, 92, 0.06) 1px, transparent 1px) 0 0 / 38px 38px,
    radial-gradient(circle at 18% 14%, #fff 0 3px, transparent 4px),
    linear-gradient(180deg, #fff2f7 0 71%, #d3b08f 71% 76%, #866048 76%);
  border: 4px solid #8c2e63;
  border-radius: 22px;
}

.food-lab-scene::before {
  position: absolute;
  top: 0.9rem;
  left: 1rem;
  padding: 0.35rem 0.6rem;
  content: "BERRY TEST KITCHEN";
  color: #72164d;
  background: #fff;
  border: 2px solid #d99aba;
  border-radius: 999px;
  font-family: var(--font-rounded);
  font-size: 0.67rem;
  font-weight: 950;
  letter-spacing: 0.05em;
}

.food-beaker {
  position: relative;
  display: grid;
  width: clamp(150px, 24vw, 205px);
  height: 220px;
  justify-self: center;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.42);
  border: 7px solid #72164d;
  border-top-width: 11px;
  border-radius: 18px 18px 60px 60px;
  box-shadow: inset 16px 0 rgba(255, 255, 255, 0.28), 0 10px 0 rgba(81, 16, 57, 0.18);
}

.food-liquid {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: clamp(48%, var(--food-sweet), 76%);
  background:
    radial-gradient(circle at 25% 25%, rgba(255, 255, 255, 0.36) 0 5px, transparent 6px),
    linear-gradient(#ec6e9e, #a61f67);
  border-top: 5px solid #ffb2cf;
  transition: height 220ms ease;
}

.food-bubbles,
.food-steam,
.berry-particles {
  position: absolute;
  z-index: 2;
  pointer-events: none;
}

.food-bubbles {
  right: 8%;
  bottom: 19%;
  left: 8%;
  color: #ffe9f2;
  font-size: 0.9rem;
  animation: food-bubbles-rise 2.6s ease-in-out infinite;
}

.food-steam {
  top: 0.7rem;
  right: 8%;
  left: 8%;
  color: #fff;
  font-size: 1.25rem;
  text-align: center;
  text-shadow: 0 1px #8c2e63;
  animation: food-steam-rise 3s ease-in-out infinite;
}

.berry-particles {
  right: 10%;
  bottom: 9%;
  left: 10%;
  color: #5f1742;
  font-size: 0.72rem;
  animation: berry-swirl 3.4s ease-in-out infinite;
}

.test-kitchen-bot {
  display: grid;
  width: 86px;
  height: 96px;
  place-items: center;
  background: #fff;
  border: 4px solid #d93482;
  border-radius: 40% 40% 18px 18px;
  box-shadow: 0 7px 0 #8c2e63;
  font-size: 2.4rem;
}

.batch-gates {
  display: grid;
  align-self: center;
  gap: 0.55rem;
}

.batch-gates span {
  padding: 0.55rem 0.7rem;
  color: #765668;
  background: rgba(255, 255, 255, 0.92);
  border: 2px solid #dfb7ce;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 900;
}

.batch-gates span.is-ready {
  color: #096761;
  background: #e1f8f0;
  border-color: #55ab9f;
  animation: batch-gate-ready 420ms cubic-bezier(0.2, 1.35, 0.45, 1);
}

.batch-gates span.is-ready::before {
  margin-right: 0.3rem;
  content: "✓";
}

.food-game.outcome-pass .food-lab-scene {
  box-shadow: 0 0 0 6px rgba(18, 134, 127, 0.16);
}

/* Registered nurse: friendly clinic priority scene. */

.clinic-scene {
  display: grid;
  min-height: 156px;
  align-items: center;
  gap: 0.65rem 0.85rem;
  grid-template-columns: auto auto minmax(150px, 1fr);
  padding: 1rem;
  color: #174b55;
  background:
    radial-gradient(circle at 90% 12%, #fff 0 3px, transparent 4px),
    linear-gradient(145deg, #effaff, #e7f8f1);
  border: 3px solid #76bcb0;
  border-radius: 19px;
}

.call-light,
.clinic-helper {
  display: grid;
  width: 66px;
  height: 66px;
  place-items: center;
  background: #fff;
  border: 3px solid #a7cbd0;
  border-radius: 50%;
  font-size: 2rem;
}

.call-light {
  color: #8b2f24;
  background: #fff3dc;
  border-color: #e8b852;
  box-shadow: 0 0 0 6px rgba(242, 184, 71, 0.14);
  animation: call-light-calm 2.2s ease-in-out infinite;
}

.call-light.is-answered {
  color: #096761;
  background: #e2f8f0;
  border-color: #12867f;
  box-shadow: 0 0 0 6px rgba(18, 134, 127, 0.13);
  animation: call-light-answer 480ms cubic-bezier(0.2, 1.35, 0.45, 1);
}

.priority-progress {
  height: 20px;
  overflow: hidden;
  background: #cbdedd;
  border: 3px solid #5d8d87;
  border-radius: 999px;
}

.priority-progress i {
  display: block;
  width: 0;
  height: 100%;
  background:
    repeating-linear-gradient(115deg, rgba(255, 255, 255, 0.38) 0 8px, transparent 8px 16px),
    #55bda8;
  border-radius: inherit;
  transition: width 240ms ease;
}

.clinic-scene > strong {
  grid-column: 1 / -1;
  font-size: 0.82rem;
  text-align: center;
}

.priority-game .order-item {
  position: relative;
  border-left: 5px solid #bfcfd2;
}

.priority-game .order-item:first-child {
  border-left-color: #12867f;
}

.priority-game .order-item:first-child .order-number {
  background: #12867f;
}

/* Architect: accessible studio walkthrough. */

.architect-walkthrough {
  position: relative;
  display: grid;
  min-height: 270px;
  align-items: end;
  gap: 0.75rem;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 3.7rem 1rem 1rem;
  overflow: hidden;
  color: #244d5d;
  background:
    linear-gradient(rgba(37, 107, 134, 0.1) 1px, transparent 1px) 0 0 / 24px 24px,
    linear-gradient(90deg, rgba(37, 107, 134, 0.1) 1px, transparent 1px) 0 0 / 24px 24px,
    #eaf8ff;
  border: 4px solid #267ca1;
  border-radius: 21px;
}

.architect-walkthrough::before {
  position: absolute;
  top: 0.9rem;
  left: 1rem;
  padding: 0.35rem 0.6rem;
  content: "ACCESSIBLE STUDIO WALKTHROUGH";
  color: #203e64;
  background: #fff;
  border: 2px solid #9bcce1;
  border-radius: 999px;
  font-family: var(--font-rounded);
  font-size: 0.65rem;
  font-weight: 950;
}

.studio-sun {
  position: absolute;
  top: 0.8rem;
  right: 1rem;
  font-size: 2.2rem;
  filter: drop-shadow(0 0 10px rgba(242, 184, 71, 0.55));
}

.studio-shell {
  position: relative;
  min-height: 155px;
  background:
    linear-gradient(90deg, #fff 0 68%, #d9edf7 68%),
    #fff;
  border: 6px solid #203e64;
  border-bottom-width: 12px;
  border-radius: 8px 8px 2px 2px;
  box-shadow: 0 8px 0 rgba(32, 62, 100, 0.18);
}

.studio-shell > span {
  position: absolute;
  display: grid;
  place-items: center;
}

.studio-door {
  right: 7%;
  bottom: 0;
  width: 22%;
  height: 72%;
  color: #203e64;
  background: #cae9f6;
  border: 4px solid #267ca1;
  font-size: 2.3rem;
}

.studio-window {
  top: 15%;
  left: 12%;
  width: 34%;
  height: 39%;
  color: #d38d13;
  background: #dff7ff;
  border: 5px solid #267ca1;
  font-size: 1.55rem;
}

.studio-visitor {
  z-index: 3;
  bottom: 3%;
  left: 32%;
  font-size: 2.5rem;
}

.studio-easel {
  bottom: 5%;
  left: 62%;
  font-size: 2.4rem;
}

.rule-checks {
  display: grid;
  gap: 0.5rem;
  align-self: center;
}

.rule-checks span {
  padding: 0.48rem 0.65rem;
  color: #627581;
  background: rgba(255, 255, 255, 0.9);
  border: 2px solid #adcad8;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 900;
}

.rule-checks span.is-ready {
  color: #096761;
  background: #e2f8f0;
  border-color: #12867f;
  animation: rule-check-in 360ms cubic-bezier(0.2, 1.3, 0.45, 1);
}

.rule-checks span.is-ready::before {
  margin-right: 0.28rem;
  content: "✓";
}

.architect-walkthrough > strong {
  grid-column: 1 / -1;
  font-size: 0.82rem;
  text-align: center;
}

.architect-game.walkthrough-approved .architect-walkthrough {
  border-color: #12867f;
  box-shadow: 0 0 0 6px rgba(18, 134, 127, 0.15);
}

/* Game-juice motion vocabulary. */

@keyframes game-juice-drift {
  0%,
  100% { transform: translateY(0) rotate(0); opacity: 0.65; }
  50% { transform: translateY(-7px) rotate(12deg); opacity: 1; }
}

@keyframes outcome-card-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes ready-chip-shine {
  to { transform: translateX(120%); }
}

@keyframes finale-card-in {
  from { opacity: 0; transform: translateY(18px) rotate(-2deg) scale(0.94); }
  to { opacity: 1; transform: rotate(-0.6deg) scale(1); }
}

@keyframes finale-icons-pop {
  from { opacity: 0; transform: scale(0.45) rotate(-8deg); }
  to { opacity: 1; transform: scale(1) rotate(0); }
}

@keyframes finale-confetti {
  0% { opacity: 0; transform: translateY(-18px) scale(0.8); }
  55% { opacity: 1; }
  100% { opacity: 1; transform: translateY(4px) scale(1); }
}

@keyframes lab-bubbles-rise {
  0%,
  100% { transform: translateY(9px); opacity: 0.45; }
  50% { transform: translateY(-10px); opacity: 0.95; }
}

@keyframes lab-robot-bob {
  0%,
  100% { transform: translateY(0) rotate(0); }
  50% { transform: translateY(-5px) rotate(2deg); }
}

@keyframes beaker-react {
  0%,
  100% { transform: rotate(0); }
  28% { transform: rotate(-2deg) translateY(-2px); }
  62% { transform: rotate(2deg) translateY(1px); }
}

@keyframes foam-word-pop {
  from { opacity: 0; transform: translateX(-50%) scale(0.35) rotate(-12deg); }
  to { opacity: 1; transform: translateX(-50%) scale(1) rotate(-4deg); }
}

@keyframes foam-puff {
  from { opacity: 0; transform: translate(0, 24px) scale(0.25); }
  to { opacity: 1; transform: translate(var(--foam-x), var(--foam-y)) scale(1); }
}

@keyframes balance-seal-in {
  from { opacity: 0; transform: translateX(-50%) scale(0.45) rotate(-5deg); }
  to { opacity: 1; transform: translateX(-50%) scale(1) rotate(0); }
}

@keyframes ticker-glow {
  0%,
  100% { opacity: 0.72; }
  50% { opacity: 1; text-shadow: 0 0 8px rgba(255, 239, 153, 0.65); }
}

@keyframes market-mascot-bob {
  0%,
  100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-4px) rotate(2deg); }
}

@keyframes trade-token-pop {
  from { opacity: 0; transform: translateX(-50%) translateY(14px) scale(0.5); }
  to { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}

@keyframes stock-line-draw {
  from { stroke-dashoffset: 760; }
  to { stroke-dashoffset: 0; }
}

@keyframes paint-drop-fall {
  0% { opacity: 0; transform: translateY(-8px) rotate(45deg) scale(0.7); }
  24% { opacity: 0.8; }
  75% { opacity: 0.8; }
  100% { opacity: 0; transform: translateY(58px) rotate(45deg) scale(1); }
}

@keyframes swatch-shine {
  0%,
  70% { transform: translateX(-65%) rotate(8deg); }
  100% { transform: translateX(65%) rotate(8deg); }
}

@keyframes sentence-card-win {
  0%,
  100% { transform: rotate(-1deg) scale(1); }
  55% { transform: rotate(1deg) translateY(-5px) scale(1.015); }
}

@keyframes sentence-card-hint {
  0%,
  100% { transform: rotate(-1deg); }
  45% { transform: rotate(0.6deg) translateY(2px); }
}

@keyframes word-burst-in {
  from { opacity: 0; transform: rotate(10deg) scale(0.35); }
  to { opacity: 1; transform: rotate(5deg) scale(1); }
}

@keyframes portal-chosen {
  0%,
  100% { transform: translateY(0) scale(1); }
  45% { transform: translateY(-5px) scale(1.04); }
}

@keyframes portal-ring {
  from { opacity: 1; transform: scale(0.82); }
  to { opacity: 0.2; transform: scale(1.15); }
}

@keyframes builder-item-in {
  from { opacity: 0; scale: 0.78; }
  to { opacity: 1; scale: 1; }
}

@keyframes test-bot-wake {
  0%,
  100% { transform: rotate(0) scale(1); }
  45% { transform: rotate(-5deg) scale(1.06); }
}

@keyframes current-dot-pulse {
  0%,
  100% { box-shadow: 0 0 7px #ffdf4d; transform: translate(-50%, -50%) scale(0.85); }
  50% { box-shadow: 0 0 23px #ffdf4d; transform: translate(-50%, -50%) scale(1.08); }
}

@keyframes bulb-ready {
  0% { box-shadow: none; transform: scale(0.9); }
  55% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

@keyframes breaker-click {
  0%,
  100% { transform: translateX(-50%) scale(1); }
  50% { transform: translateX(-50%) scale(0.96); }
}

@keyframes bridge-cart-cross {
  0% { opacity: 0; left: 4%; transform: translateX(-15%) rotate(-3deg); }
  14% { opacity: 1; }
  86% { opacity: 1; }
  100% { opacity: 0; left: 88%; transform: translateX(-50%) rotate(2deg); }
}

@keyframes stress-mark-pop {
  from { opacity: 0; transform: translate(-50%, -50%) scale(0.4) rotate(-8deg); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(0); }
}

@keyframes bridge-gentle-flex {
  0%,
  100% { transform: scaleY(1); }
  45% { transform: scaleY(0.965) translateY(4px); }
}

@keyframes river-shimmer {
  0%,
  100% { opacity: 0.72; letter-spacing: 0.1em; }
  50% { opacity: 1; letter-spacing: 0.15em; }
}

@keyframes relay-light-on {
  from { transform: scale(0.78); }
  to { transform: scale(1); }
}

@keyframes fair-pan-settle {
  0% { transform: translateY(-6px) rotate(4deg); }
  65% { transform: translateY(2px) rotate(-1deg); }
  100% { transform: translateY(0) rotate(0); }
}

@keyframes case-card-stamp {
  from { transform: translateY(-5px) scale(0.96); }
  to { transform: translateY(0) scale(1); }
}

@keyframes metal-finish-shine {
  0% { filter: brightness(0.92); }
  45% { filter: brightness(1.35); }
  100% { filter: brightness(1); }
}

@keyframes pressure-water-drift {
  0%,
  100% { transform: translateX(0); }
  50% { transform: translateX(9px); }
}

@keyframes test-craft-hover {
  0%,
  100% { transform: translate(-50%, -50%) rotate(-1deg); }
  50% { transform: translate(-50%, calc(-50% - 6px)) rotate(1deg); }
}

@keyframes pressure-bubbles-rise {
  0% { opacity: 0.3; transform: translateY(18px); }
  50% { opacity: 0.95; }
  100% { opacity: 0.2; transform: translateY(-42px); }
}

@keyframes cartoon-leak-puff {
  from { opacity: 0; transform: translate(12px, 8px) scale(0.45); }
  to { opacity: 1; transform: translate(0) scale(1); }
}

@keyframes coral-celebrate {
  from { opacity: 0; transform: translateY(18px) scale(0.6); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes flag-found {
  from { transform: scale(0.92); }
  to { transform: scale(1); }
}

@keyframes stream-flow {
  to { background-position: 160px 0; }
}

@keyframes sample-pin-fill {
  0% { transform: translate(-50%, -50%) rotate(-45deg) scale(0.72); }
  100% { transform: translate(-50%, -50%) rotate(-45deg) scale(1); }
}

@keyframes vial-fill {
  from { clip-path: inset(100% 0 0); }
  to { clip-path: inset(0); }
}

@keyframes vial-bubble {
  0%,
  100% { transform: translateY(4px); opacity: 0.4; }
  50% { transform: translateY(-8px); opacity: 1; }
}

@keyframes trend-bar-grow {
  from { transform: scaleY(0.08); }
  to { transform: scaleY(1); }
}

@keyframes friendly-face-pop {
  0% { transform: scale(0.88); }
  65% { transform: scale(1.07); }
  100% { transform: scale(1); }
}

@keyframes garden-grow {
  from { opacity: 0; transform: scaleY(0.2) translateY(8px); }
  to { opacity: 1; transform: scaleY(1) translateY(0); }
}

@keyframes reply-build {
  from { opacity: 0.55; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fit-star-pop {
  from { transform: scale(0.35) rotate(-12deg); }
  to { transform: scale(1) rotate(0); }
}

@keyframes survey-bar-grow {
  from { transform: scaleX(0.05); }
  to { transform: scaleX(1); }
}

@keyframes poster-sticker-in {
  from { opacity: 0; transform: translateY(-10px) rotate(9deg) scale(0.75); }
  to { opacity: 1; transform: rotate(4deg) scale(1); }
}

@keyframes coach-shield-pop {
  from { transform: scale(0.75); }
  to { transform: scale(1); }
}

@keyframes training-block-drop {
  from { opacity: 0.5; transform: translateY(-7px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes garage-tool-run {
  0% { opacity: 0; transform: scale(0.5) rotate(-18deg); }
  45% { opacity: 1; }
  100% { opacity: 1; transform: scale(1) rotate(0); }
}

@keyframes gauge-sweep {
  0% { transform: rotate(-54deg); }
  55% { transform: rotate(47deg); }
  100% { transform: rotate(18deg); }
}

@keyframes log-line-in {
  from { opacity: 0; transform: translateX(-8px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes meter-water {
  to { background-position: 32px 0, 0 0; }
}

@keyframes pipe-water-pulse {
  0%,
  100% { transform: scale(0.85); opacity: 0.3; }
  50% { transform: scale(1.12); opacity: 0.68; }
}

@keyframes pipe-click-turn {
  0% { box-shadow: 0 0 0 0 rgba(72, 184, 208, 0.55); }
  100% { box-shadow: 0 0 0 9px rgba(72, 184, 208, 0); }
}

@keyframes food-bubbles-rise {
  0%,
  100% { transform: translateY(8px); opacity: 0.42; }
  50% { transform: translateY(-10px); opacity: 0.95; }
}

@keyframes food-steam-rise {
  0%,
  100% { transform: translateY(4px); opacity: 0.35; }
  50% { transform: translateY(-7px); opacity: 0.9; }
}

@keyframes berry-swirl {
  0%,
  100% { transform: translateX(-3px); }
  50% { transform: translateX(7px); }
}

@keyframes batch-gate-ready {
  from { transform: translateX(-5px) scale(0.96); }
  to { transform: translateX(0) scale(1); }
}

@keyframes call-light-calm {
  0%,
  100% { box-shadow: 0 0 0 5px rgba(242, 184, 71, 0.09); }
  50% { box-shadow: 0 0 0 9px rgba(242, 184, 71, 0.17); }
}

@keyframes call-light-answer {
  from { transform: scale(0.78); }
  to { transform: scale(1); }
}

@keyframes rule-check-in {
  from { transform: translateX(-6px); }
  to { transform: translateX(0); }
}

/* Responsive game scenes. */

@media (max-width: 800px) {
  .pressure-chamber {
    grid-template-columns: 1fr;
  }

  .pressure-water {
    min-height: 310px;
    border-right: 0;
    border-bottom: 4px solid #176674;
  }

  .food-lab-scene {
    grid-template-columns: minmax(150px, 1fr) auto;
  }

  .batch-gates {
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, 1fr);
  }

  .market-floor {
    grid-template-columns: auto 1fr auto;
  }

  .user-test-panel {
    grid-template-columns: auto 1fr;
  }

  .test-checks {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
}

@media (max-width: 620px) {
  .ph-lab-scene {
    min-height: 340px;
    padding-bottom: 1rem;
  }

  .lab-sign {
    max-width: calc(100% - 2rem);
  }

  .lab-robot {
    right: 0.6rem;
    width: 68px;
    font-size: 1.9rem;
  }

  .reaction-beaker {
    margin-right: 2.4rem;
  }

  .ingredient-shelf {
    grid-template-columns: 1fr;
  }

  .ingredient-shelf button {
    min-height: 86px;
    grid-template-columns: auto 1fr;
    justify-items: start;
    text-align: left;
  }

  .ingredient-shelf button > span {
    grid-row: 1 / 3;
  }

  .market-floor {
    grid-template-columns: auto auto;
    padding-top: 4.4rem;
  }

  .market-floor > p {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .market-mascot,
  .market-mood {
    width: 70px;
    height: 70px;
    font-size: 2rem;
  }

  .market-ticker {
    justify-content: flex-start;
    overflow-x: auto;
  }

  .mural-stage {
    min-height: 235px;
  }

  .mural-canvas {
    right: 23%;
  }

  .paint-can {
    right: 2%;
    width: 74px;
  }

  .circuit-room {
    min-height: 290px;
  }

  .circuit-bulb {
    width: 82px;
    height: 82px;
    font-size: 2.55rem;
  }

  .relay-route-lights {
    grid-template-columns: auto 1fr auto 1fr auto;
    padding-inline: 0.55rem;
  }

  .relay-route-lights > span {
    min-width: 48px;
    font-size: 0.56rem;
  }

  .fairness-scale {
    gap: 0.35rem;
    padding-inline: 0.55rem;
  }

  .pressure-water {
    min-height: 280px;
  }

  .cyber-shield {
    grid-template-columns: auto 1fr;
  }

  .cyber-shield > strong {
    grid-column: 1 / -1;
  }

  .water-trend > div {
    gap: 0.2rem;
  }

  .coach-track,
  .clinic-scene {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .faucet-scene {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .garden-plant {
    display: none;
  }

  .garden-faucet {
    display: inline;
  }

  .faucet-scene > strong,
  .clinic-scene > strong {
    grid-column: 1 / -1;
  }

  .food-lab-scene {
    grid-template-columns: 1fr auto;
    min-height: 275px;
  }

  .food-beaker {
    width: 140px;
    height: 190px;
  }

  .batch-gates {
    grid-template-columns: 1fr;
  }

  .architect-walkthrough {
    grid-template-columns: 1fr;
  }

  .rule-checks {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 420px) {
  .reaction-beaker {
    width: 140px;
    height: 205px;
    margin-right: 1.8rem;
  }

  .lab-robot {
    width: 58px;
    right: 0.3rem;
  }

  .market-floor {
    padding-inline: 0.6rem;
  }

  .coin-jar {
    width: 66px;
    height: 88px;
  }

  .mural-canvas {
    right: 25%;
    left: 13%;
  }

  .relay-route-lights > span {
    min-width: 42px;
    padding-inline: 0.15rem;
  }

  .relay-token {
    display: none;
  }

  .scale-pan {
    width: 74px;
    font-size: 1.75rem;
  }

  .test-craft > span {
    width: 94px;
    font-size: 2.5rem;
  }

  .faucet-scene {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

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

  .test-kitchen-bot {
    position: absolute;
    right: 0.55rem;
    bottom: 0.75rem;
    width: 66px;
    height: 74px;
    font-size: 1.85rem;
  }

  .rule-checks {
    grid-template-columns: 1fr;
  }

  .studio-shell {
    min-height: 135px;
  }
}

/* Explicitly preserve every visual outcome without motion. */

@media (prefers-reduced-motion: reduce) {
  .game-juice i,
  .game-stage .feedback,
  .target-status span.is-ready::after,
  .career-finale,
  .career-finale > span,
  .confetti,
  .beaker-bubbles,
  .lab-robot,
  .ph-reaction-game .reaction-beaker,
  .foam-burst > span,
  .foam-burst i,
  .balance-beam,
  .market-ticker span,
  .market-mascot,
  .market-mood,
  .trade-token,
  .stock-chart polyline,
  .paint-drops i,
  .color-mural-game .color-swatch::after,
  .sentence-launcher,
  .word-burst,
  .literary-portal,
  .literary-portal::before,
  .builder-item,
  .test-bot,
  .current-pulse,
  .circuit-bulb,
  .breaker-card,
  .bridge-test-cart,
  .bridge-stress-mark,
  .bridge-game .bridge-deck,
  .bridge-river,
  .relay-route-lights > span,
  .fairness-scale .scale-pan,
  .case-slot,
  .weld-joint-line,
  .weld-joint-sparks,
  .weld-board.is-assembled .weld-piece,
  .pressure-water::before,
  .test-craft,
  .pressure-bubbles,
  .cartoon-leak,
  .glowing-coral,
  .email-hotspot,
  .stream-ribbon,
  .sample-pin,
  .vial-water,
  .vial-water::after,
  .water-trend i,
  .friend-avatar,
  .connection-garden span,
  .reply-bubble,
  .fit-stars span,
  .survey-bar i,
  .poster-sticker,
  .coach-avatar,
  .training-slot,
  .garage-effect,
  .gauge-needle::before,
  .diagnostic-log li,
  .flow-meter i,
  .pipe-water,
  .pipe-tile,
  .food-bubbles,
  .food-steam,
  .berry-particles,
  .batch-gates span,
  .call-light,
  .rule-checks span {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }

  .game-juice i {
    opacity: 0.72;
  }

  .target-status span.is-ready::after,
  .current-pulse,
  .paint-drops {
    display: none;
  }

  .career-finale,
  .career-finale > span,
  .balance-beam,
  .trade-token,
  .word-burst,
  .cartoon-leak,
  .glowing-coral,
  .garage-effect {
    opacity: 1;
  }

  .career-finale {
    transform: none;
  }

  .balance-beam,
  .trade-token {
    transform: translateX(-50%);
  }

  .bridge-test-cart {
    left: 50%;
    opacity: 1;
    transform: translateX(-50%);
  }

  .test-craft {
    transform: translate(-50%, -50%);
  }

  .water-trend i,
  .survey-bar i,
  .connection-garden span {
    transform: none;
  }
}
