:root {
  --rbt-emotion-ink: #16243a;
  --rbt-emotion-muted: #596a80;
  --rbt-emotion-blue: #15489b;
  --rbt-emotion-blue-dark: #0d3478;
  --rbt-emotion-blue-soft: #eaf4ff;
  --rbt-emotion-sky: #d9efff;
  --rbt-emotion-yellow: #ffd84d;
  --rbt-emotion-yellow-dark: #8a6200;
  --rbt-emotion-green: #277a50;
  --rbt-emotion-green-soft: #e9f8ef;
  --rbt-emotion-amber: #96620a;
  --rbt-emotion-amber-soft: #fff5d8;
  --rbt-emotion-red: #a63b3b;
  --rbt-emotion-red-soft: #fff0ef;
  --rbt-emotion-white: #ffffff;
  --rbt-emotion-page: #f6fbff;
  --rbt-emotion-border: #bcd7ee;
  --rbt-emotion-radius-sm: 0.8rem;
  --rbt-emotion-radius-md: 1.25rem;
  --rbt-emotion-radius-lg: 1.75rem;
  --rbt-emotion-shadow: 0 12px 28px rgba(16, 61, 118, 0.11);
  --rbt-emotion-font: "Trebuchet MS", "Arial Rounded MT Bold", Arial, sans-serif;
  --rbt-emotion-focus: #8a2be2;
  --rbt-emotion-group-surface: #edf7ff;
}

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

html {
  min-width: 320px;
  min-height: 100%;
  background: var(--rbt-emotion-page);
  color-scheme: light;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--rbt-emotion-ink);
  background:
    radial-gradient(circle at 7% 12%, rgba(255, 216, 77, 0.18) 0 0.45rem, transparent 0.48rem),
    radial-gradient(circle at 94% 17%, rgba(55, 171, 226, 0.15) 0 0.38rem, transparent 0.41rem),
    linear-gradient(180deg, #ffffff 0, var(--rbt-emotion-page) 20rem);
  font-family: var(--rbt-emotion-font);
  -webkit-font-smoothing: antialiased;
}

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

button,
input,
select,
textarea {
  font: inherit;
}

button {
  touch-action: manipulation;
}

[hidden] {
  display: none !important;
}

.rbt-emotion-skip-link {
  position: fixed;
  z-index: 100;
  top: 0.6rem;
  left: 0.6rem;
  padding: 0.75rem 1rem;
  transform: translateY(-160%);
  border: 3px solid var(--rbt-emotion-focus);
  border-radius: var(--rbt-emotion-radius-sm);
  color: var(--rbt-emotion-white);
  background: var(--rbt-emotion-blue-dark);
  font-weight: 800;
  text-decoration: none;
}

.rbt-emotion-skip-link:focus {
  transform: translateY(0);
}

.rbt-emotion-app {
  width: min(100%, 78rem);
  min-height: 100vh;
  margin: 0 auto;
  padding: 0.75rem;
}

.rbt-emotion-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 0.25rem 1rem;
}

.rbt-emotion-home {
  display: inline-flex;
  min-height: 2.9rem;
  align-items: center;
  gap: 0.45rem;
  padding: 0.6rem 0.75rem;
  border-radius: 999px;
  color: var(--rbt-emotion-blue-dark);
  background: var(--rbt-emotion-white);
  box-shadow: 0 4px 12px rgba(19, 61, 113, 0.08);
  font-size: 0.84rem;
  font-weight: 800;
  text-decoration: none;
}

.rbt-emotion-home span:first-child {
  font-size: 1.2em;
}

.rbt-emotion-brand {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  text-align: center;
}

.rbt-emotion-brand-mark {
  display: none;
  width: 4.1rem;
  height: 3.1rem;
  align-items: end;
  justify-content: center;
  gap: 0.15rem;
}

.rbt-emotion-face {
  display: grid;
  width: 1.35rem;
  height: 1.35rem;
  place-items: center;
  border: 2px solid var(--rbt-emotion-blue);
  border-radius: 50%;
  color: var(--rbt-emotion-blue);
  background: var(--rbt-emotion-yellow);
  font-size: 0.8rem;
  font-weight: 900;
  line-height: 1;
}

.rbt-emotion-face--calm {
  align-self: start;
  background: #93ddcf;
}

.rbt-emotion-face--surprised {
  background: #ffb8a8;
}

.rbt-emotion-eyebrow {
  margin: 0 0 0.1rem;
  color: var(--rbt-emotion-blue);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

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

.rbt-emotion-brand h1 {
  overflow: hidden;
  margin: 0;
  color: var(--rbt-emotion-blue);
  font-size: clamp(1.15rem, 5vw, 2.25rem);
  font-weight: 900;
  letter-spacing: -0.045em;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rbt-emotion-button {
  min-height: 3rem;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 900;
}

.rbt-emotion-button--quiet {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.65rem 0.8rem;
  border: 2px solid var(--rbt-emotion-border);
  color: var(--rbt-emotion-blue-dark);
  background: var(--rbt-emotion-white);
  font-size: 0.84rem;
}

.rbt-emotion-button--quiet span {
  font-size: 1.2rem;
}

.rbt-emotion-main {
  display: grid;
  gap: 0.8rem;
}

/* Activity chooser ------------------------------------------------------- */

.rbt-emotion-activity-nav {
  min-width: 0;
  padding: 0.8rem;
  border: 2px solid var(--rbt-emotion-border);
  border-radius: var(--rbt-emotion-radius-md);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 7px 18px rgba(24, 75, 130, 0.07);
}

.rbt-emotion-activity-group {
  display: grid;
  gap: 0.55rem;
}

.rbt-emotion-activity {
  display: grid;
  grid-template-columns: 2.65rem minmax(0, 1fr);
  min-width: 0;
  min-height: 3.75rem;
  align-items: center;
  gap: 0.7rem;
  padding: 0.55rem 0.7rem;
  border: 3px solid #c9deef;
  border-radius: 1rem;
  color: var(--rbt-emotion-blue-dark);
  background: var(--rbt-emotion-white);
  cursor: pointer;
  text-align: left;
  transition: border-color 120ms ease, box-shadow 120ms ease, transform 120ms ease;
}

.rbt-emotion-activity:hover {
  border-color: #6ca3d5;
  box-shadow: 0 5px 12px rgba(21, 72, 155, 0.1);
  transform: translateY(-1px);
}

.rbt-emotion-activity[aria-selected="true"] {
  border-color: var(--rbt-emotion-blue);
  background: linear-gradient(135deg, #f8fcff, var(--rbt-emotion-blue-soft));
  box-shadow: inset 0 0 0 2px rgba(21, 72, 155, 0.08), 0 5px 13px rgba(21, 72, 155, 0.12);
}

.rbt-emotion-activity-icon {
  display: grid;
  width: 2.55rem;
  height: 2.55rem;
  place-items: center;
  border: 2px solid #a9cae7;
  border-radius: 0.8rem;
  color: var(--rbt-emotion-blue-dark);
  background: var(--rbt-emotion-blue-soft);
  font-size: 1.45rem;
  font-weight: 900;
  line-height: 1;
}

.rbt-emotion-activity-icon--text {
  font-size: 1rem;
  letter-spacing: -0.06em;
}

.rbt-emotion-activity[aria-selected="true"] .rbt-emotion-activity-icon {
  border-color: var(--rbt-emotion-blue-dark);
  color: var(--rbt-emotion-white);
  background: var(--rbt-emotion-blue);
}

.rbt-emotion-activity strong,
.rbt-emotion-activity small {
  display: block;
  overflow-wrap: anywhere;
}

.rbt-emotion-activity strong {
  font-size: 0.96rem;
  line-height: 1.2;
}

.rbt-emotion-activity small {
  margin-top: 0.15rem;
  color: var(--rbt-emotion-muted);
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.25;
}

.rbt-emotion-toolbar {
  display: grid;
  gap: 0.75rem;
  padding: 0.85rem;
  border: 2px solid var(--rbt-emotion-border);
  border-radius: var(--rbt-emotion-radius-md);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 7px 18px rgba(24, 75, 130, 0.07);
}

.rbt-emotion-toolbar-label {
  margin-bottom: 0.4rem;
  color: var(--rbt-emotion-muted);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.rbt-emotion-mode-group {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.35rem;
  padding: 0.3rem;
  border-radius: 1rem;
  background: var(--rbt-emotion-blue-soft);
}

.rbt-emotion-mode {
  min-height: 2.9rem;
  padding: 0.55rem 0.35rem;
  border: 2px solid transparent;
  border-radius: 0.75rem;
  color: var(--rbt-emotion-blue-dark);
  background: transparent;
  cursor: pointer;
  font-size: clamp(0.74rem, 3vw, 0.94rem);
  font-weight: 900;
  line-height: 1.1;
}

.rbt-emotion-mode[aria-checked="true"] {
  border-color: var(--rbt-emotion-blue);
  color: var(--rbt-emotion-white);
  background: var(--rbt-emotion-blue);
  box-shadow: 0 4px 10px rgba(21, 72, 155, 0.18);
}

.rbt-emotion-score {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0.6rem 1rem;
  border: 2px solid #d7e7f4;
  border-radius: 1rem;
  background: #fbfdff;
}

.rbt-emotion-score-title {
  grid-column: 1 / -1;
  margin: 0 0 0.35rem;
  color: var(--rbt-emotion-blue-dark);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
}

.rbt-emotion-score-note {
  grid-column: 1 / -1;
  margin: 0;
  padding: 0.65rem 0.8rem;
  border-left: 4px solid var(--rbt-emotion-blue);
  border-radius: 0.7rem;
  color: var(--rbt-emotion-blue-dark);
  background: var(--rbt-emotion-blue-soft);
  font-size: 0.8rem;
  font-weight: 750;
  line-height: 1.4;
}

.rbt-emotion-score-note[hidden] {
  display: none;
}

#rbt-emotion-picture-modes[hidden] + .rbt-emotion-score {
  grid-column: 1 / -1;
}

.rbt-emotion-score-item {
  display: grid;
  justify-items: center;
  gap: 0.1rem;
}

.rbt-emotion-score-label {
  color: var(--rbt-emotion-muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.rbt-emotion-score strong {
  color: var(--rbt-emotion-blue-dark);
  font-size: 1.45rem;
  line-height: 1;
}

.rbt-emotion-score-divider {
  width: 2px;
  height: 2.3rem;
  background: #d7e7f4;
}

.rbt-emotion-board {
  overflow: hidden;
  padding: 0.85rem;
  border: 3px solid var(--rbt-emotion-blue);
  border-radius: var(--rbt-emotion-radius-lg);
  background: var(--rbt-emotion-white);
  box-shadow: var(--rbt-emotion-shadow);
}

.rbt-emotion-progress-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.45rem;
}

.rbt-emotion-progress-text,
.rbt-emotion-type-chip {
  color: var(--rbt-emotion-muted);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.rbt-emotion-type-chip {
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  color: var(--rbt-emotion-blue-dark);
  background: var(--rbt-emotion-blue-soft);
}

.rbt-emotion-progress-track {
  overflow: hidden;
  height: 0.55rem;
  margin-bottom: 0.85rem;
  border-radius: 999px;
  background: #e4eef7;
}

.rbt-emotion-progress-track span {
  display: block;
  width: 12.5%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--rbt-emotion-blue), #36a8df);
  transition: width 220ms ease;
}

.rbt-emotion-trial {
  display: grid;
  gap: 1rem;
}

.rbt-emotion-picture-card {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 1;
  border: 4px solid var(--rbt-emotion-blue);
  border-radius: 1.4rem;
  background:
    linear-gradient(135deg, rgba(217, 239, 255, 0.7), rgba(255, 245, 216, 0.7));
  box-shadow: inset 0 0 0 5px rgba(255, 255, 255, 0.8);
}

.rbt-emotion-picture-card::after {
  position: absolute;
  inset: auto -12% -18% auto;
  width: 55%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(255, 216, 77, 0.14);
  content: "";
  pointer-events: none;
}

.rbt-emotion-picture-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rbt-emotion-image-fallback {
  position: absolute;
  z-index: 1;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 0.35rem;
  padding: 1.5rem;
  color: var(--rbt-emotion-muted);
  text-align: center;
}

.rbt-emotion-image-fallback span {
  color: var(--rbt-emotion-blue);
  font-size: 4rem;
  line-height: 1;
}

.rbt-emotion-image-fallback strong {
  color: var(--rbt-emotion-blue-dark);
}

.rbt-emotion-question-panel {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  padding: 0.15rem;
}

.rbt-emotion-step-label {
  margin-bottom: 0.25rem;
  color: var(--rbt-emotion-blue);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.rbt-emotion-question-panel h2,
.rbt-emotion-summary h2,
.rbt-emotion-group-heading h2,
.rbt-emotion-language-card h2 {
  margin-bottom: 0.25rem;
  color: var(--rbt-emotion-ink);
  font-size: clamp(1.65rem, 7vw, 2.65rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1.05;
}

/* Feeling words and scenarios -------------------------------------------- */

.rbt-emotion-language-trial {
  min-width: 0;
}

.rbt-emotion-language-layout {
  display: grid;
  min-width: 0;
  gap: 1rem;
}

.rbt-emotion-language-card {
  position: relative;
  overflow: hidden;
  min-width: 0;
  padding: clamp(1rem, 4vw, 1.6rem);
  border: 3px solid var(--rbt-emotion-blue);
  border-radius: 1.35rem;
  background:
    radial-gradient(circle at 92% 8%, rgba(255, 216, 77, 0.42) 0 3.4rem, transparent 3.5rem),
    linear-gradient(145deg, #f8fcff, #e8f5ff 62%, #fff8df);
  box-shadow: inset 0 0 0 4px rgba(255, 255, 255, 0.7);
}

.rbt-emotion-language-card::after {
  position: absolute;
  right: -1rem;
  bottom: -2rem;
  color: rgba(21, 72, 155, 0.08);
  content: "?";
  font-size: 10rem;
  font-weight: 900;
  line-height: 1;
  pointer-events: none;
}

.rbt-emotion-language-card > * {
  position: relative;
  z-index: 1;
}

.rbt-emotion-language-card h2 {
  max-width: 44rem;
  margin-bottom: 0.55rem;
  font-size: clamp(1.55rem, 6vw, 2.45rem);
  overflow-wrap: anywhere;
}

.rbt-emotion-language-lead {
  max-width: 42rem;
  margin-bottom: 1rem;
  color: var(--rbt-emotion-muted);
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.5;
}

.rbt-emotion-word-clues {
  display: grid;
  gap: 0.75rem;
}

.rbt-emotion-clue-block {
  min-width: 0;
  padding: 0.9rem;
  border: 2px solid rgba(122, 166, 205, 0.62);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.9);
}

.rbt-emotion-clue-block h3 {
  margin: 0 0 0.35rem;
  color: var(--rbt-emotion-blue);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.rbt-emotion-clue-block p {
  margin: 0;
  color: var(--rbt-emotion-ink);
  font-size: clamp(1rem, 3.7vw, 1.18rem);
  font-weight: 800;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.rbt-emotion-scenario-copy {
  min-width: 0;
  padding: clamp(0.95rem, 4vw, 1.35rem);
  border: 2px solid rgba(122, 166, 205, 0.68);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.92);
}

.rbt-emotion-scenario-copy > p:first-child {
  margin-bottom: 0.85rem;
  color: var(--rbt-emotion-ink);
  font-size: clamp(1.08rem, 4vw, 1.35rem);
  font-weight: 900;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.rbt-emotion-possibility-note {
  margin: 0;
  padding: 0.7rem 0.8rem;
  border-left: 0.35rem solid var(--rbt-emotion-blue);
  border-radius: 0.25rem 0.75rem 0.75rem 0.25rem;
  color: var(--rbt-emotion-blue-dark);
  background: var(--rbt-emotion-blue-soft);
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.45;
}

.rbt-emotion-language-response {
  min-width: 0;
  padding: 0.15rem;
}

.rbt-emotion-not-sure {
  display: inline-flex;
  width: 100%;
  min-height: 3rem;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  margin-top: 0.6rem;
  padding: 0.55rem 0.8rem;
  border: 2px dashed #789cbc;
  border-radius: 0.9rem;
  color: var(--rbt-emotion-blue-dark);
  background: #f7fbff;
  cursor: pointer;
  font-size: 0.94rem;
  font-weight: 900;
}

.rbt-emotion-not-sure:hover:not(:disabled) {
  border-style: solid;
  background: var(--rbt-emotion-blue-soft);
}

.rbt-emotion-not-sure.is-used {
  border-style: solid;
  border-color: #789cbc;
  color: #314f6b;
  background: #edf4fa;
}

.rbt-emotion-not-sure:disabled {
  cursor: default;
  opacity: 1;
}

.rbt-emotion-explanation {
  margin-top: 0.75rem;
  padding: 0.8rem 0.9rem;
  border: 2px solid #c9ddec;
  border-radius: 1rem;
  color: var(--rbt-emotion-ink);
  background: #f8fbfd;
}

.rbt-emotion-explanation strong {
  display: block;
  margin-bottom: 0.3rem;
  color: var(--rbt-emotion-blue-dark);
  font-size: 0.84rem;
}

.rbt-emotion-explanation p {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.5;
}

.rbt-emotion-explanation p + p {
  margin-top: 0.45rem;
  color: var(--rbt-emotion-muted);
  font-weight: 800;
}

/* Group activities ------------------------------------------------------- */

.rbt-emotion-group-trial {
  min-width: 0;
}

.rbt-emotion-group-heading {
  max-width: 48rem;
  margin: 0 auto 0.85rem;
  text-align: center;
}

.rbt-emotion-group-heading h2 {
  margin-bottom: 0.3rem;
  overflow-wrap: anywhere;
}

.rbt-emotion-group-heading .rbt-emotion-instruction {
  margin-bottom: 0;
}

.rbt-emotion-group-layout {
  display: grid;
  min-width: 0;
  gap: 0.85rem;
}

.rbt-emotion-group-scene {
  display: grid;
  min-width: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
  padding: 0.6rem;
  border: 3px solid var(--rbt-emotion-blue);
  border-radius: 1.35rem;
  background:
    radial-gradient(circle at 88% 12%, rgba(255, 216, 77, 0.38) 0 2.1rem, transparent 2.15rem),
    linear-gradient(180deg, #f8fcff, var(--rbt-emotion-group-surface));
  box-shadow: inset 0 0 0 4px rgba(255, 255, 255, 0.72);
}

.rbt-emotion-child,
.rbt-emotion-child-card,
.rbt-emotion-child-button {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 2.75rem;
  grid-template-rows: minmax(0, 1fr) auto;
  overflow: hidden;
  padding: 0;
  border: 3px solid #9fc4e2;
  border-radius: 1rem;
  color: var(--rbt-emotion-blue-dark);
  background: var(--rbt-emotion-white);
  cursor: pointer;
  font-weight: 900;
  text-align: center;
  transition: border-color 120ms ease, box-shadow 120ms ease, transform 120ms ease;
}

.rbt-emotion-child:hover:not(:disabled),
.rbt-emotion-child-card:hover:not(:disabled),
.rbt-emotion-child-button:hover:not(:disabled) {
  border-color: var(--rbt-emotion-blue);
  box-shadow: 0 7px 14px rgba(21, 72, 155, 0.14);
  transform: translateY(-2px);
}

.rbt-emotion-child:disabled,
.rbt-emotion-child-card:disabled,
.rbt-emotion-child-button:disabled {
  cursor: default;
  opacity: 1;
}

.rbt-emotion-child img,
.rbt-emotion-child-card img,
.rbt-emotion-child-button img,
.rbt-emotion-child-image {
  display: block;
  width: 100%;
  height: auto;
  min-height: 0;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: linear-gradient(135deg, #dcefff, #fff6da);
}

.rbt-emotion-child-number {
  position: absolute;
  z-index: 2;
  top: 0.35rem;
  left: 0.35rem;
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border: 2px solid var(--rbt-emotion-white);
  border-radius: 50%;
  color: var(--rbt-emotion-white);
  background: var(--rbt-emotion-blue-dark);
  box-shadow: 0 2px 5px rgba(22, 36, 58, 0.3);
  font-size: 0.88rem;
  line-height: 1;
}

.rbt-emotion-child-reveal,
.rbt-emotion-child-label,
.rbt-emotion-child-badge {
  display: grid;
  min-height: 2.75rem;
  place-items: center;
  padding: 0.4rem 0.35rem;
  color: var(--rbt-emotion-muted);
  background: #f8fbfd;
  font-size: clamp(0.78rem, 3.5vw, 1rem);
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.rbt-emotion-child-reveal {
  visibility: hidden;
}

.rbt-emotion-child-reveal[hidden],
.rbt-emotion-child-label[hidden],
.rbt-emotion-child-badge[hidden] {
  display: none;
}

.rbt-emotion-child.is-selected,
.rbt-emotion-child-card.is-selected,
.rbt-emotion-child-button.is-selected {
  border-color: var(--rbt-emotion-blue);
  box-shadow: 0 0 0 4px rgba(21, 72, 155, 0.16);
}

.rbt-emotion-child.is-correct,
.rbt-emotion-child.is-revealed,
.rbt-emotion-child.is-matched,
.rbt-emotion-child-card.is-correct,
.rbt-emotion-child-card.is-revealed,
.rbt-emotion-child-card.is-matched,
.rbt-emotion-child-button.is-correct,
.rbt-emotion-child-button.is-revealed,
.rbt-emotion-child-button.is-matched {
  border-color: var(--rbt-emotion-green);
  box-shadow: 0 0 0 3px rgba(39, 122, 80, 0.13);
}

.rbt-emotion-child.is-correct .rbt-emotion-child-reveal,
.rbt-emotion-child.is-correct .rbt-emotion-child-label,
.rbt-emotion-child.is-correct .rbt-emotion-child-badge,
.rbt-emotion-child.is-revealed .rbt-emotion-child-reveal,
.rbt-emotion-child.is-revealed .rbt-emotion-child-label,
.rbt-emotion-child.is-revealed .rbt-emotion-child-badge,
.rbt-emotion-child.is-matched .rbt-emotion-child-reveal,
.rbt-emotion-child.is-matched .rbt-emotion-child-label,
.rbt-emotion-child.is-matched .rbt-emotion-child-badge,
.rbt-emotion-child-card.is-correct .rbt-emotion-child-reveal,
.rbt-emotion-child-card.is-matched .rbt-emotion-child-reveal,
.rbt-emotion-child-button.is-correct .rbt-emotion-child-reveal,
.rbt-emotion-child-button.is-matched .rbt-emotion-child-reveal {
  color: #174f36;
  background: var(--rbt-emotion-green-soft);
  visibility: visible;
}

.rbt-emotion-child.is-incorrect,
.rbt-emotion-child-card.is-incorrect,
.rbt-emotion-child-button.is-incorrect {
  border-color: var(--rbt-emotion-amber);
  box-shadow: 0 0 0 3px rgba(150, 98, 10, 0.13);
}

.rbt-emotion-child.is-incorrect .rbt-emotion-child-reveal,
.rbt-emotion-child.is-incorrect .rbt-emotion-child-label,
.rbt-emotion-child.is-incorrect .rbt-emotion-child-badge,
.rbt-emotion-child-card.is-incorrect .rbt-emotion-child-reveal,
.rbt-emotion-child-button.is-incorrect .rbt-emotion-child-reveal {
  color: #71490a;
  background: var(--rbt-emotion-amber-soft);
}

.rbt-emotion-child-image-fallback,
.rbt-emotion-group-image-fallback {
  display: grid;
  min-height: 7rem;
  place-items: center;
  padding: 0.7rem;
  color: var(--rbt-emotion-muted);
  background: linear-gradient(135deg, #e9f5ff, #fff8e4);
  font-size: 0.78rem;
  line-height: 1.25;
}

.rbt-emotion-match-panel {
  min-width: 0;
  padding: 0.85rem;
  border: 2px solid #c4ddef;
  border-radius: 1.2rem;
  background: #fbfdff;
}

.rbt-emotion-match-help {
  margin-bottom: 0.65rem;
  color: var(--rbt-emotion-muted);
  font-size: 0.88rem;
  line-height: 1.4;
}

.rbt-emotion-label-bank {
  display: grid;
  min-width: 0;
  gap: 0.55rem;
}

.rbt-emotion-label,
.rbt-emotion-match-label,
.rbt-emotion-label-button {
  display: inline-flex;
  min-width: 0;
  min-height: 3.25rem;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 0.65rem;
  border: 3px solid var(--rbt-emotion-blue);
  border-radius: 0.9rem;
  color: var(--rbt-emotion-blue-dark);
  background: var(--rbt-emotion-white);
  cursor: pointer;
  font-size: clamp(0.96rem, 4vw, 1.14rem);
  font-weight: 900;
  line-height: 1.15;
  overflow-wrap: anywhere;
  text-align: center;
  transition: border-color 120ms ease, box-shadow 120ms ease, transform 120ms ease;
}

.rbt-emotion-label:hover:not(:disabled),
.rbt-emotion-match-label:hover:not(:disabled),
.rbt-emotion-label-button:hover:not(:disabled) {
  background: #f5faff;
  box-shadow: 0 5px 11px rgba(21, 72, 155, 0.12);
  transform: translateY(-1px);
}

.rbt-emotion-label.is-selected,
.rbt-emotion-match-label.is-selected,
.rbt-emotion-label-button.is-selected,
.rbt-emotion-label[aria-pressed="true"],
.rbt-emotion-match-label[aria-pressed="true"],
.rbt-emotion-label-button[aria-pressed="true"] {
  border-color: var(--rbt-emotion-blue-dark);
  color: var(--rbt-emotion-white);
  background: var(--rbt-emotion-blue);
  box-shadow: 0 0 0 4px rgba(21, 72, 155, 0.17);
}

.rbt-emotion-label.is-correct,
.rbt-emotion-label.is-used,
.rbt-emotion-match-label.is-correct,
.rbt-emotion-match-label.is-used,
.rbt-emotion-label-button.is-correct,
.rbt-emotion-label-button.is-used {
  border-color: var(--rbt-emotion-green);
  color: #174f36;
  background: var(--rbt-emotion-green-soft);
}

.rbt-emotion-label.is-incorrect,
.rbt-emotion-match-label.is-incorrect,
.rbt-emotion-label-button.is-incorrect {
  border-color: var(--rbt-emotion-amber);
  color: #71490a;
  background: var(--rbt-emotion-amber-soft);
}

.rbt-emotion-label:disabled,
.rbt-emotion-match-label:disabled,
.rbt-emotion-label-button:disabled {
  cursor: default;
  opacity: 1;
}

.rbt-emotion-group-trial > .rbt-emotion-feedback {
  margin-top: 0.85rem;
}

.rbt-emotion-group-trial > .rbt-emotion-button--next {
  margin-inline: auto;
}

.rbt-emotion-instruction {
  margin-bottom: 0.85rem;
  color: var(--rbt-emotion-muted);
  font-size: 0.95rem;
}

.rbt-emotion-choices {
  display: grid;
  gap: 0.6rem;
}

.rbt-emotion-choice {
  display: grid;
  grid-template-columns: 2.45rem 1fr 1.6rem;
  min-height: 3.65rem;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.9rem;
  border: 3px solid var(--rbt-emotion-blue);
  border-radius: 1rem;
  color: var(--rbt-emotion-blue-dark);
  background: var(--rbt-emotion-white);
  cursor: pointer;
  font-size: clamp(1.08rem, 4vw, 1.3rem);
  font-weight: 900;
  text-align: left;
  transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease;
}

.rbt-emotion-choice:hover:not(:disabled) {
  transform: translateY(-2px);
  background: #f5faff;
  box-shadow: 0 6px 12px rgba(21, 72, 155, 0.12);
}

.rbt-emotion-choice:active:not(:disabled) {
  transform: translateY(0);
}

.rbt-emotion-choice-number {
  display: grid;
  width: 2.25rem;
  height: 2.25rem;
  place-items: center;
  border-radius: 0.65rem;
  color: var(--rbt-emotion-blue-dark);
  background: var(--rbt-emotion-blue-soft);
  font-size: 0.95rem;
}

.rbt-emotion-choice-symbol {
  color: transparent;
  font-size: 1.25rem;
  text-align: center;
}

.rbt-emotion-choice.is-correct {
  border-color: var(--rbt-emotion-green);
  color: #174f36;
  background: var(--rbt-emotion-green-soft);
}

.rbt-emotion-choice.is-correct .rbt-emotion-choice-number {
  color: var(--rbt-emotion-white);
  background: var(--rbt-emotion-green);
}

.rbt-emotion-choice.is-correct .rbt-emotion-choice-symbol {
  color: var(--rbt-emotion-green);
}

.rbt-emotion-choice.is-incorrect {
  border-color: var(--rbt-emotion-amber);
  color: #71490a;
  background: var(--rbt-emotion-amber-soft);
}

.rbt-emotion-choice.is-incorrect .rbt-emotion-choice-number {
  color: var(--rbt-emotion-white);
  background: var(--rbt-emotion-amber);
}

.rbt-emotion-choice.is-incorrect .rbt-emotion-choice-symbol {
  color: var(--rbt-emotion-amber);
}

.rbt-emotion-choice.is-discussion-choice {
  border-color: var(--rbt-emotion-blue);
  color: var(--rbt-emotion-blue-dark);
  background: var(--rbt-emotion-blue-soft);
}

.rbt-emotion-choice.is-discussion-choice .rbt-emotion-choice-number {
  color: var(--rbt-emotion-white);
  background: var(--rbt-emotion-blue);
}

.rbt-emotion-choice.is-discussion-choice .rbt-emotion-choice-symbol {
  color: var(--rbt-emotion-blue);
}

.rbt-emotion-choice:disabled {
  cursor: default;
  opacity: 1;
}

.rbt-emotion-feedback {
  display: flex;
  min-height: 3.4rem;
  align-items: center;
  gap: 0.65rem;
  margin-top: 0.75rem;
  padding: 0.65rem 0.8rem;
  border: 2px solid #dce8f2;
  border-radius: 1rem;
  color: var(--rbt-emotion-muted);
  background: #f8fbfd;
  font-size: 0.91rem;
  font-weight: 700;
  line-height: 1.35;
}

.rbt-emotion-feedback-icon {
  flex: 0 0 auto;
  color: #86a7c5;
  font-size: 0.9rem;
}

.rbt-emotion-feedback.is-positive {
  border-color: #add9bf;
  color: #174f36;
  background: var(--rbt-emotion-green-soft);
}

.rbt-emotion-feedback.is-positive .rbt-emotion-feedback-icon {
  color: var(--rbt-emotion-green);
}

.rbt-emotion-feedback.is-supportive {
  border-color: #efd18d;
  color: #70480a;
  background: var(--rbt-emotion-amber-soft);
}

.rbt-emotion-feedback.is-supportive .rbt-emotion-feedback-icon {
  color: var(--rbt-emotion-amber);
}

.rbt-emotion-feedback.is-discussion {
  border-color: #a9cae7;
  color: var(--rbt-emotion-blue-dark);
  background: var(--rbt-emotion-blue-soft);
}

.rbt-emotion-feedback.is-discussion .rbt-emotion-feedback-icon {
  color: var(--rbt-emotion-blue);
}

.rbt-emotion-button--next {
  display: inline-flex;
  width: 100%;
  min-height: 3.65rem;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  margin-top: 0.75rem;
  padding: 0.75rem 1.2rem;
  border: 3px solid #c19300;
  color: #382800;
  background: var(--rbt-emotion-yellow);
  box-shadow: 0 5px 0 #c19300;
  font-size: 1.08rem;
}

.rbt-emotion-button--next:active {
  transform: translateY(3px);
  box-shadow: 0 2px 0 #c19300;
}

.rbt-emotion-shortcuts {
  margin: 0.75rem 0 0;
  color: var(--rbt-emotion-muted);
  font-size: 0.74rem;
  line-height: 1.5;
  text-align: center;
}

kbd {
  display: inline-block;
  min-width: 1.45rem;
  padding: 0.05rem 0.28rem;
  border: 1px solid #b8cadb;
  border-bottom-width: 2px;
  border-radius: 0.3rem;
  color: var(--rbt-emotion-blue-dark);
  background: var(--rbt-emotion-white);
  font-family: inherit;
  font-weight: 900;
}

.rbt-emotion-summary {
  display: grid;
  min-height: 31rem;
  place-items: center;
  align-content: center;
  padding: 2rem 1rem;
  text-align: center;
}

.rbt-emotion-summary-badge {
  display: grid;
  width: 6.2rem;
  height: 6.2rem;
  margin-bottom: 1rem;
  place-items: center;
  border: 4px solid var(--rbt-emotion-blue);
  border-radius: 50%;
  color: #714d00;
  background: var(--rbt-emotion-yellow);
  box-shadow: 0 8px 0 rgba(21, 72, 155, 0.16);
  font-size: 3rem;
}

.rbt-emotion-summary-score {
  margin: 0.65rem 0 0.25rem;
  color: var(--rbt-emotion-blue-dark);
  font-size: clamp(1.2rem, 5vw, 1.65rem);
  font-weight: 900;
}

.rbt-emotion-summary-note {
  max-width: 29rem;
  margin-bottom: 0.7rem;
  color: var(--rbt-emotion-muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.rbt-emotion-summary .rbt-emotion-button--next {
  width: min(100%, 22rem);
}

.rbt-emotion-educator-note {
  border: 2px solid #c9ddec;
  border-radius: var(--rbt-emotion-radius-md);
  background: rgba(255, 255, 255, 0.88);
}

.rbt-emotion-educator-note summary {
  min-height: 3rem;
  padding: 0.8rem 1rem;
  color: var(--rbt-emotion-blue-dark);
  cursor: pointer;
  font-weight: 900;
}

.rbt-emotion-educator-note p {
  margin: 0;
  padding: 0 1rem 1rem;
  color: var(--rbt-emotion-muted);
  font-size: 0.88rem;
  line-height: 1.55;
}

.rbt-emotion-footer {
  display: grid;
  gap: 0.2rem;
  padding: 1rem 0.4rem 0.45rem;
  color: var(--rbt-emotion-muted);
  font-size: 0.72rem;
  line-height: 1.4;
  text-align: center;
}

.rbt-emotion-footer p {
  margin: 0;
}

.rbt-emotion-noscript {
  margin: 1rem;
  padding: 1rem;
  border: 2px solid var(--rbt-emotion-red);
  border-radius: 1rem;
  color: #782828;
  background: var(--rbt-emotion-red-soft);
  font-family: Arial, sans-serif;
  font-weight: 700;
}

:focus-visible {
  outline: 4px solid var(--rbt-emotion-focus);
  outline-offset: 3px;
}

@media (min-width: 38rem) {
  .rbt-emotion-app {
    padding: 1rem 1.25rem;
  }

  .rbt-emotion-brand-mark {
    display: flex;
  }

  .rbt-emotion-home,
  .rbt-emotion-button--quiet {
    padding-inline: 1rem;
    font-size: 0.9rem;
  }

  .rbt-emotion-toolbar {
    grid-template-columns: minmax(0, 1fr) 12rem;
    align-items: end;
    padding: 0.9rem 1rem;
  }

  .rbt-emotion-board {
    padding: 1.1rem;
  }

  .rbt-emotion-label-bank {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rbt-emotion-group-scene {
    gap: 0.75rem;
    padding: 0.8rem;
  }

  .rbt-emotion-trial {
    grid-template-columns: minmax(17rem, 0.92fr) minmax(18rem, 1.08fr);
    align-items: center;
    gap: 1.4rem;
  }

  .rbt-emotion-picture-card {
    max-height: 34rem;
  }

  .rbt-emotion-question-panel {
    padding: 0.5rem 0.5rem 0.5rem 0;
  }

  .rbt-emotion-word-clues {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rbt-emotion-footer {
    grid-template-columns: 1fr 1fr;
    text-align: left;
  }

  .rbt-emotion-footer p:last-child {
    text-align: right;
  }
}

@media (min-width: 52rem) {
  .rbt-emotion-activity-group {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .rbt-emotion-activity {
    min-height: 4.15rem;
  }

  .rbt-emotion-group-scene {
    width: min(100%, 44rem);
    margin-inline: auto;
  }
}

@media (min-width: 60rem) {
  .rbt-emotion-language-layout {
    grid-template-columns: minmax(0, 1.12fr) minmax(20rem, 0.88fr);
    align-items: center;
    gap: 1.4rem;
  }
}

@media (min-width: 70rem) {
  .rbt-emotion-activity-group {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .rbt-emotion-activity {
    grid-template-columns: 2.45rem minmax(0, 1fr);
    gap: 0.55rem;
    padding-inline: 0.55rem;
  }

  .rbt-emotion-activity-icon {
    width: 2.35rem;
    height: 2.35rem;
  }
}

@media (min-width: 58rem) {
  .rbt-emotion-group-layout:has(.rbt-emotion-match-panel:not([hidden])) {
    grid-template-columns: minmax(0, 1.3fr) minmax(18rem, 0.7fr);
    align-items: center;
    gap: 1.15rem;
  }

  .rbt-emotion-group-layout:has(.rbt-emotion-match-panel:not([hidden])) .rbt-emotion-group-scene {
    width: 100%;
  }

  .rbt-emotion-group-layout:has(.rbt-emotion-match-panel:not([hidden])) .rbt-emotion-label-bank {
    grid-template-columns: 1fr;
  }

  .rbt-emotion-group-trial > .rbt-emotion-button--next {
    width: min(100%, 24rem);
  }
}

@media (min-width: 64rem) {
  .rbt-emotion-app {
    padding: 1.15rem 1.5rem;
  }

  .rbt-emotion-header {
    padding-bottom: 1.15rem;
  }

  .rbt-emotion-main {
    gap: 1rem;
  }

  .rbt-emotion-toolbar {
    padding: 0.95rem 1.2rem;
  }

  .rbt-emotion-board {
    padding: 1.25rem;
  }

  .rbt-emotion-trial {
    grid-template-columns: minmax(22rem, 0.95fr) minmax(22rem, 1.05fr);
    gap: 2rem;
  }

  .rbt-emotion-question-panel {
    padding-right: 1rem;
  }
}

@media (max-width: 25rem) {
  .rbt-emotion-home span:last-child,
  .rbt-emotion-button--quiet span + * {
    display: none;
  }

  .rbt-emotion-home {
    width: 2.9rem;
    justify-content: center;
    padding-inline: 0;
  }

  .rbt-emotion-button--quiet {
    width: 3rem;
    justify-content: center;
    padding-inline: 0;
    font-size: 0;
  }

  .rbt-emotion-button--quiet span {
    font-size: 1.3rem;
  }

  .rbt-emotion-brand h1 {
    font-size: 1.05rem;
  }

  .rbt-emotion-activity-nav,
  .rbt-emotion-toolbar,
  .rbt-emotion-board {
    padding: 0.65rem;
  }

  .rbt-emotion-group-scene {
    gap: 0.4rem;
    padding: 0.45rem;
  }

  .rbt-emotion-child-number {
    top: 0.25rem;
    left: 0.25rem;
    width: 1.8rem;
    height: 1.8rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media print {
  body {
    background: white;
  }

  .rbt-emotion-header,
  .rbt-emotion-activity-nav,
  .rbt-emotion-toolbar,
  .rbt-emotion-feedback,
  .rbt-emotion-button,
  .rbt-emotion-shortcuts,
  .rbt-emotion-footer {
    display: none !important;
  }

  .rbt-emotion-board {
    border: 2px solid black;
    box-shadow: none;
  }

  .rbt-emotion-group-scene,
  .rbt-emotion-child,
  .rbt-emotion-child-card,
  .rbt-emotion-child-button {
    border-color: black;
    box-shadow: none;
  }
}

@media (forced-colors: active) {
  .rbt-emotion-activity[aria-selected="true"],
  .rbt-emotion-mode[aria-checked="true"],
  .rbt-emotion-label.is-selected,
  .rbt-emotion-match-label.is-selected,
  .rbt-emotion-label-button.is-selected,
  .rbt-emotion-label[aria-pressed="true"],
  .rbt-emotion-match-label[aria-pressed="true"],
  .rbt-emotion-label-button[aria-pressed="true"] {
    border-color: Highlight;
    color: HighlightText;
    background: Highlight;
  }

  :focus-visible {
    outline-color: Highlight;
  }
}
