/* ============================================
   IRIA · SCREENS · Estils específics
   ============================================ */

/* Background layer comú · difuminat premium (Figma 375×812) */
.bg-layer {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 88% 12%, rgba(181, 82, 58, .14), transparent 38%),
    radial-gradient(circle at 12% 88%, rgba(47, 79, 79, .12), transparent 38%),
    radial-gradient(ellipse 90% 55% at 50% -8%, rgba(227, 168, 87, .07), transparent 58%),
    linear-gradient(180deg, #F9F2E7 0%, #F4E9D8 52%, #EFE6D4 100%);
  z-index: 0;
}
.bg-layer::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

.screen-content {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  padding: 18px 20px 14px;
  gap: 12px;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.screen-inner {
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* ============================================
   00 · COVER
   ============================================ */

.cover-top {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 60px 28px 0;
  font-family: 'Bebas Neue';
}

.cover-top > div:first-child {
  font-size: 14px;
  letter-spacing: .16em;
  color: var(--muted);
}

.cover-top > div:last-child {
  font-size: 18px;
  color: var(--rust);
}

.cover-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 32px;
  position: relative;
  z-index: 1;
  min-height: 0;
  overflow-y: auto;
}

.cover-eyebrow {
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--rust);
  margin-bottom: 22px;
}

.screen .cover-main .cover-logo {
  display: block !important;
  width: min(250px, 58vw) !important;
  height: min(250px, 58vw) !important;
  max-width: 250px !important;
  max-height: 250px !important;
  min-width: 0 !important;
  min-height: 0 !important;
  object-fit: contain !important;
  flex: 0 0 auto !important;
  margin: 8px auto -28px !important;
  animation: cover-logo-float 7s ease-in-out infinite;
  position: relative;
  z-index: 1;
}

@keyframes cover-logo-float {
  0%   { transform: translateY(0) rotate(0deg); }
  25%  { transform: translateY(-10px) rotate(-1.4deg); }
  50%  { transform: translateY(-18px) rotate(0.6deg); }
  75%  { transform: translateY(-10px) rotate(1.6deg); }
  100% { transform: translateY(0) rotate(0deg); }
}

.cover-brand-name {
  font-family: 'Inter', sans-serif;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: .14em;
  color: var(--rust);
  text-align: center;
  margin-bottom: 18px;
  text-transform: uppercase;
  position: relative;
  z-index: 2;
}

.cover-tagline {
  font-family: 'Fraunces';
  font-size: 18px;
  font-weight: 480;
  line-height: 1.35;
  letter-spacing: -.02em;
  color: var(--ink);
  text-align: center;
  margin-bottom: 8px;
  max-width: 280px;
}

.cover-sub {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
  color: var(--muted);
  text-align: center;
  margin-bottom: 32px;
  max-width: 260px;
}

.lang-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: 999px;
  box-shadow: 4px 4px 0 rgba(30, 30, 30, .09);
  margin-bottom: 38px;
}

.lang-badge-text {
  font-family: 'Bebas Neue';
  font-size: 14px;
  letter-spacing: .06em;
  color: var(--ink);
}

.lang-arrow {
  width: 16px;
  height: 1.5px;
  background: var(--rust);
  position: relative;
}

.lang-arrow::after {
  content: "";
  position: absolute;
  right: -1px;
  top: -3px;
  width: 0;
  height: 0;
  border-left: 6px solid var(--rust);
  border-top: 3.5px solid transparent;
  border-bottom: 3.5px solid transparent;
}

.cover-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 28px;
  background: var(--rust);
  color: var(--cream);
  font-family: Inter;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -.01em;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  box-shadow: 5px 5px 0 rgba(30, 30, 30, .14);
  cursor: pointer;
  min-width: 240px;
  transition: transform var(--t-fast);
}

.cover-cta:hover { transform: translate(-1px, -1px); }

.cover-footer {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 22px 28px;
  border-top: 1px solid var(--divider);
  background: var(--glass-bottom);
  backdrop-filter: blur(12px) saturate(1.04);
  -webkit-backdrop-filter: blur(12px) saturate(1.04);
  box-shadow: 0 -1px 0 rgba(255, 249, 238, .55);
}

.cover-footer span {
  font-family: 'Bebas Neue';
  font-size: 12px;
  letter-spacing: .32em;
  color: var(--muted);
}

/* ============================================
   01 · BENVINGUDA · fidel a captura Figma
   ============================================ */

/* Topbar amb back + title + star */
.welcome-topbar {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  padding-top: 54px;
  padding-right: 18px;
  padding-bottom: 12px;
  padding-left: 18px;
  gap: 8px;
}

.welcome-back {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1.5px solid var(--line);
  background: var(--paper);
  display: grid;
  place-items: center;
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  box-shadow: 3px 3px 0 rgba(30, 30, 30, .09);
  cursor: pointer;
  transition: transform var(--t-fast);
}

.welcome-back:hover { transform: translate(-1px, -1px); }

.welcome-topbar-issue {
  font-family: 'Bebas Neue';
  font-size: 13px;
  letter-spacing: .18em;
  color: var(--muted);
  text-align: center;
}

.welcome-topbar-star {
  font-family: 'Bebas Neue';
  font-size: 18px;
  color: var(--rust);
  line-height: 1;
  text-align: right;
}

/* Main · 3 blocs distribuïts uniformement amb space-between */
.welcome-main {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 70px 28px 6px;
  min-height: 0;
}

.welcome-block-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: 100%;
}

.welcome-block-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  width: 100%;
  margin-top: -88px;
  transform: translateY(-22px);
}

.welcome-eyebrow {
  position: absolute;
  top: 112px;
  left: 0;
  right: 0;
  z-index: 3;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--rust);
  text-align: center;
  padding: 0 28px;
}

.welcome-greeting {
  font-family: 'Fraunces', serif;
  font-size: 44px;
  font-weight: 480;
  line-height: .98;
  letter-spacing: -.04em;
  color: var(--ink);
  text-align: center;
}

.welcome-greeting em {
  font-style: italic;
  color: var(--rust);
}

.welcome-world {
  flex: 0 0 auto;
  width: 260px;
  height: 260px;
  margin: -72px auto 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  position: relative;
  background: transparent;
  border-radius: 0;
  overflow: visible;
}

/* iOS / sense WebM: disc = mateix cream que la pantalla */
.welcome-world.welcome-world--mp4 {
  background: var(--cream);
  border-radius: 50%;
  overflow: hidden;
  isolation: isolate;
}

.welcome-world.welcome-world--mp4 .welcome-world-video {
  transform: scale(1.06);
  filter: drop-shadow(0 10px 20px rgba(30, 30, 30, .08));
}

/* iOS mòbil sense WebM: webp transparent (evita matte del MP4) */
.welcome-world-static {
  display: none;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  filter: drop-shadow(0 12px 24px rgba(30, 30, 30, .1));
}

.welcome-world.welcome-world--static .welcome-world-static {
  display: block;
}

.welcome-world.welcome-world--static .welcome-world-video {
  display: none !important;
}

.welcome-world-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 12px 24px rgba(30, 30, 30, .1));
}

/* Tap per desbloquejar so del vídeo (autoplay en incògnit) */
#screen-01.is-welcome-audio-locked .welcome-world {
  pointer-events: auto;
  cursor: pointer;
}

@media (prefers-reduced-motion: reduce) {
  .welcome-world-video {
    display: none;
  }

  .welcome-world::after {
    content: "";
    display: block;
    width: 250px;
    height: 250px;
    background: url("../assets/img/worldIria.webp") center / contain no-repeat;
  }
}

.welcome-tagline {
  font-family: Inter;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.55;
  color: var(--muted);
  text-align: center;
  max-width: 290px;
}

.welcome-features {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  justify-content: center;
  align-items: center;
  padding: 0 6px;
  width: 100%;
}

.welcome-features-row {
  display: contents;
}

.feature-pill--accent {
  flex-shrink: 0;
}

.feature-pill {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 14px;
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: 999px;
  box-shadow: 3px 3px 0 rgba(30, 30, 30, .10);
  white-space: nowrap;
  line-height: 1;
}

.feature-pill .fp-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  line-height: 1;
  flex-shrink: 0;
}

.feature-pill .fp-text {
  display: inline-flex;
  align-items: center;
  font-family: 'Bebas Neue';
  font-size: 11px;
  letter-spacing: .08em;
  color: var(--ink);
  line-height: 1;
  padding-top: 2px;
}

/* CTA area · sempre al peu */
.welcome-cta-area {
  position: relative;
  z-index: 1;
  padding: 8px 24px 22px;
  flex-shrink: 0;
}

.welcome-cta-area .cta {
  font-size: 15px;
  padding: 16px 28px;
}

.welcome-login {
  margin-top: 12px;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
}

.welcome-login a {
  color: var(--rust);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

/* Compat · mini-badge */
.mini-badge {
  font-family: 'Bebas Neue';
  font-size: 10px;
  letter-spacing: .12em;
  padding: 4px 10px;
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
}

/* ============================================
   STEP HEADER · pantalles 02-05 (onboarding)
   ============================================ */

.step-header {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 54px;
  padding-right: 18px;
  padding-bottom: 12px;
  padding-left: 18px;
  border-bottom: 1px solid var(--divider);
  background: var(--glass-top);
  backdrop-filter: blur(12px) saturate(1.04);
  -webkit-backdrop-filter: blur(12px) saturate(1.04);
  box-shadow: 0 1px 0 rgba(255, 249, 238, .65);
  gap: 8px;
  flex-shrink: 0;
}

.step-back {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1.5px solid var(--line);
  background: var(--paper);
  display: grid;
  place-items: center;
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  box-shadow: 3px 3px 0 rgba(30, 30, 30, .09);
  cursor: pointer;
  flex-shrink: 0;
  transition: transform var(--t-fast);
}

.step-back:hover { transform: translate(-1px, -1px); }

.step-indicator {
  display: flex;
  gap: 5px;
  align-items: center;
}

.step-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #E5DBC8;
  border: 1.5px solid var(--line);
  transition: all var(--t-mid);
}

.step-dot.active {
  background: var(--rust);
  width: 18px;
  border-radius: 999px;
}

.step-dot.done {
  background: var(--green);
}

.step-label {
  font-family: 'Bebas Neue';
  font-size: 11px;
  letter-spacing: .16em;
  color: var(--muted);
  flex-shrink: 0;
}

/* Main central content for step screens */
.step-main {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  padding: 24px 22px 16px;
  gap: 16px;
  overflow-y: auto;
  min-height: 0;
}

.step-eyebrow {
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--rust);
}

.step-title {
  font-family: 'Fraunces', serif;
  font-size: 28px;
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -.035em;
  color: var(--ink);
}

.step-subtitle {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--muted);
  margin-top: -8px;
}

/* Bottom CTA area · pantalles 02-05 */
.step-bottom {
  position: relative;
  z-index: 1;
  padding: 14px 22px 22px;
  border-top: 1px solid var(--divider);
  background: var(--glass-bottom);
  backdrop-filter: blur(12px) saturate(1.04);
  -webkit-backdrop-filter: blur(12px) saturate(1.04);
  box-shadow: 0 -1px 0 rgba(255, 249, 238, .5);
  flex-shrink: 0;
}

/* ============================================
   02 · IDIOMA + ENFOCAMENT · lang pair + approach
   ============================================ */

.lang-pair-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 16px;
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: 18px;
  box-shadow: 5px 5px 0 rgba(30, 30, 30, .10);
  margin-top: 4px;
}

.lang-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  text-align: center;
}

.lang-flag {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  border: 1.5px solid var(--line);
  display: grid;
  place-items: center;
  font-size: 22px;
  line-height: 1;
  background: var(--cream);
  box-shadow: 2px 2px 0 rgba(30, 30, 30, .14);
}

.lang-flag.eng {
  background: var(--green);
  color: var(--cream);
  font-family: 'Bebas Neue';
  font-size: 18px;
}

.lang-name {
  font-family: 'Fraunces', serif;
  font-size: 18px;
  font-weight: 520;
  letter-spacing: -.02em;
  color: var(--ink);
  line-height: 1;
}

.lang-meta {
  font-family: 'Bebas Neue';
  font-size: 10px;
  letter-spacing: .12em;
  color: var(--muted);
  line-height: 1;
}

.lang-pair-arrow {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--rust);
  border: 1.5px solid var(--line);
  color: var(--cream);
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 800;
  flex-shrink: 0;
  box-shadow: 2px 2px 0 rgba(30, 30, 30, .18);
}

.approach-note {
  display: flex;
  gap: 11px;
  padding: 14px 16px;
  background: #181614;
  color: var(--cream);
  border: 1.5px solid var(--line);
  border-radius: 14px;
  align-items: flex-start;
}

.approach-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--mustard);
  border: 1.5px solid var(--line);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 14px;
}

.approach-content {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.approach-eyebrow {
  font-family: 'Bebas Neue';
  font-size: 10px;
  letter-spacing: .14em;
  color: var(--mustard);
  line-height: 1;
}

.approach-text {
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--cream);
}

.approach-text strong { font-weight: 700; }

.why-card {
  display: flex;
  gap: 11px;
  padding: 14px 16px;
  background: var(--cream-2);
  border: 1.5px solid var(--line);
  border-radius: 14px;
  align-items: flex-start;
  box-shadow: 3px 3px 0 rgba(30, 30, 30, .07);
}

.why-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--success);
  border: 1.5px solid var(--line);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 14px;
}

.why-content {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.why-title {
  font-family: 'Bebas Neue';
  font-size: 11px;
  letter-spacing: .12em;
  color: var(--ink);
  line-height: 1;
}

.why-text {
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted);
}

/* ============================================
   03 · PERFIL · nom + curs ESO + mode info
   ============================================ */

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-label {
  font-family: 'Bebas Neue';
  font-size: 11px;
  letter-spacing: .14em;
  color: var(--muted);
}

.form-input {
  width: 100%;
  padding: 14px 16px;
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: 14px;
  font-family: 'Fraunces', serif;
  font-size: 18px;
  font-weight: 500;
  color: var(--ink);
  box-shadow: 3px 3px 0 rgba(30, 30, 30, .08);
  transition: box-shadow var(--t-fast);
}

.form-input:focus {
  outline: none;
  box-shadow: 4px 4px 0 var(--rust);
  border-color: var(--rust);
}

.curs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.curs-option {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  box-shadow: 3px 3px 0 rgba(30, 30, 30, .08);
  cursor: pointer;
  transition: all var(--t-fast);
}

.curs-option:hover { transform: translate(-1px, -1px); }

.curs-option.selected {
  background: var(--rust);
  color: var(--cream);
  box-shadow: 4px 4px 0 rgba(30, 30, 30, .18);
}

.curs-num {
  font-family: 'Bebas Neue';
  font-size: 16px;
  letter-spacing: .06em;
}

.curs-label {
  font-size: 11px;
  font-weight: 600;
  opacity: .8;
}

.mode-info {
  display: flex;
  gap: 11px;
  padding: 14px 16px;
  background: var(--mustard);
  border: 1.5px solid var(--line);
  border-radius: 14px;
  align-items: center;
  box-shadow: 3px 3px 0 rgba(30, 30, 30, .12);
}

.mode-info-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--ink);
  color: var(--mustard);
  border: 1.5px solid var(--line);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 16px;
}

.mode-info-content {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.mode-info-eyebrow {
  font-family: 'Bebas Neue';
  font-size: 10px;
  letter-spacing: .14em;
  color: var(--ink);
  line-height: 1;
}

.mode-info-text {
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--ink);
}

.mode-info-text strong { font-weight: 700; }

/* ============================================
   02 · IDIOMA · PERFIL (legacy · pot ser tret)
   ============================================ */

.section-eyebrow {
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--rust);
}

.section-title-2 {
  font-family: 'Fraunces';
  font-size: 26px;
  font-weight: 480;
  line-height: 1.05;
  letter-spacing: -.025em;
  color: var(--ink);
  margin: 4px 0 14px;
}

.field-label {
  font-family: 'Bebas Neue';
  font-size: 11px;
  letter-spacing: .16em;
  color: var(--muted);
  margin-bottom: 6px;
}

.field-input {
  width: 100%;
  padding: 12px 14px;
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  box-shadow: 3px 3px 0 rgba(30, 30, 30, .08);
  transition: box-shadow var(--t-fast);
}

.field-input:focus {
  outline: none;
  box-shadow: 4px 4px 0 var(--rust);
  border-color: var(--rust);
}

.option-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.option-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  box-shadow: 3px 3px 0 rgba(30, 30, 30, .08);
  cursor: pointer;
  transition: all var(--t-fast);
}

.option-card:hover { transform: translate(-1px, -1px); }

.option-card.selected {
  background: var(--rust);
  color: var(--cream);
  border-color: var(--line);
  box-shadow: 4px 4px 0 rgba(30, 30, 30, .18);
}

.option-card .opt-label {
  font-family: 'Bebas Neue';
  font-size: 14px;
  letter-spacing: .08em;
}

.option-card .opt-sub {
  font-size: 11px;
  font-weight: 600;
  opacity: .75;
}

.info-callout {
  display: flex;
  gap: 10px;
  padding: 12px 14px;
  background: var(--mustard);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  box-shadow: 3px 3px 0 rgba(30, 30, 30, .12);
  align-items: flex-start;
}

.info-callout .ic {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--mustard);
  display: grid;
  place-items: center;
  font-family: 'Bebas Neue';
  font-size: 12px;
  flex-shrink: 0;
  border: 1.5px solid var(--line);
}

.info-callout .txt {
  font-size: 12px;
  line-height: 1.5;
  color: var(--ink);
  font-weight: 500;
}

.info-callout .txt strong { font-weight: 700; }

/* ============================================
   04 · OBJECTIU · larger option cards
   ============================================ */

.objective-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.objective-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: 14px;
  box-shadow: 3px 3px 0 rgba(30, 30, 30, .10);
  cursor: pointer;
  transition: transform var(--t-fast);
}

.objective-card:hover { transform: translate(-1px, -1px); }

.objective-card.selected {
  background: var(--mustard);
  border-color: var(--line);
  box-shadow: 4px 4px 0 rgba(30, 30, 30, .15);
}

.objective-card.selected.green-style {
  background: var(--green);
  color: var(--cream);
}

.obj-ic {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--cream);
  border: 1.5px solid var(--line);
  display: grid;
  place-items: center;
  font-size: 20px;
  flex-shrink: 0;
}

.obj-body { flex: 1; }

.obj-title {
  font-family: 'Fraunces';
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -.01em;
  line-height: 1.15;
}

.obj-desc {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 2px;
  line-height: 1.4;
}

.objective-card.selected .obj-desc { color: rgba(30, 30, 30, .7); }
.objective-card.selected.green-style .obj-desc { color: #EBDDCB; }

.obj-check {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  display: grid;
  place-items: center;
  background: transparent;
  flex-shrink: 0;
}

.objective-card.selected .obj-check {
  background: var(--ink);
  color: var(--mustard);
}

.objective-card.selected .obj-check::after {
  content: "✓";
  font-size: 12px;
  font-weight: 800;
}

/* ============================================
   05 · NIVELL · pregunta amb opcions
   ============================================ */

.quiz-progress {
  display: flex;
  align-items: center;
  gap: 10px;
}

.quiz-progress-bar {
  flex: 1;
  height: 6px;
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
}

.quiz-progress-fill {
  height: 100%;
  background: var(--rust);
  border-right: 1.5px solid var(--line);
  transition: width var(--t-slow) var(--ease-out);
}

.quiz-progress-meta {
  font-family: 'Bebas Neue';
  font-size: 10px;
  letter-spacing: .14em;
  color: var(--muted);
}

.quiz-question {
  font-family: 'Fraunces';
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -.005em;
  color: var(--ink);
  line-height: 1.4;
  padding: 12px 14px;
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  box-shadow: 3px 3px 0 rgba(30, 30, 30, .08);
}

.quiz-question em {
  font-style: italic;
  color: var(--rust-dark);
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.quiz-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  box-shadow: 3px 3px 0 rgba(30, 30, 30, .08);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
  transition: transform var(--t-fast);
}

.quiz-option:hover { transform: translate(-1px, -1px); }

.quiz-option.selected {
  background: var(--green);
  color: var(--cream);
}

.quiz-option .letter {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: var(--cream);
  border: 1.5px solid var(--line);
  display: grid;
  place-items: center;
  font-family: 'Bebas Neue';
  font-size: 12px;
  color: var(--ink);
  flex-shrink: 0;
}

.quiz-option.selected .letter { background: var(--mustard); }

/* ============================================
   06b · CONVERSA AMB ESTATS IA
   ============================================ */

.avatar-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding-top: 6px;
}

.avatar-name {
  font-family: 'Bebas Neue';
  font-size: 14px;
  letter-spacing: .18em;
  color: var(--muted);
}

/* ============================================
   08b · CORRECCIÓ PATRÓ CATALÀ
   ============================================ */

.pattern-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--rust);
  color: var(--cream);
  border: 1.5px solid var(--line);
  border-radius: 14px;
  padding: 10px 14px;
  box-shadow: 4px 4px 0 rgba(30, 30, 30, .15);
  animation: bubble-in .5s var(--ease-out);
}

.pattern-banner .icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--cream);
  color: var(--rust);
  border: 1.5px solid var(--line);
  display: grid;
  place-items: center;
  font-family: 'Bebas Neue';
  font-size: 16px;
  flex-shrink: 0;
}

.pattern-banner .lab {
  font-family: 'Bebas Neue';
  font-size: 11px;
  letter-spacing: .18em;
}

.pattern-banner .title {
  font-family: 'Fraunces';
  font-size: 14px;
  font-weight: 480;
  letter-spacing: -.01em;
  line-height: 1.2;
}

.compare-card {
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 5px 5px 0 rgba(30, 30, 30, .12);
}

.compare-row {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-bottom: 1.5px solid var(--line);
}

.compare-row:last-child { border-bottom: none; }

.compare-row .row-lab {
  display: flex;
  align-items: center;
  gap: 8px;
}

.compare-row .pill {
  padding: 3px 8px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  font-family: 'Bebas Neue';
  font-size: 9px;
  letter-spacing: .14em;
}

.compare-row.error .pill { background: rgba(181, 82, 58, .12); color: var(--rust-dark); }
.compare-row.ok .pill { background: rgba(47, 79, 79, .12); color: var(--green); }

.compare-row .row-text {
  font-family: 'Fraunces';
  font-size: 17px;
  font-weight: 480;
  letter-spacing: -.015em;
  color: var(--ink);
  line-height: 1.25;
}

.compare-row.error del {
  text-decoration-color: var(--rust);
  text-decoration-thickness: 2px;
  text-underline-offset: 2px;
  font-style: italic;
  color: var(--rust-dark);
}

.compare-row.ok strong { color: var(--green); font-weight: 700; }

.phonetic {
  display: inline-block;
  font-family: 'Geist Mono', Inter, monospace;
  font-size: 12px;
  padding: 3px 9px;
  background: var(--green);
  color: var(--cream);
  border: 1.5px solid var(--line);
  border-radius: 8px;
  margin-left: 6px;
  font-weight: 600;
  letter-spacing: .04em;
}

.audio-row { display: flex; gap: 8px; }

.audio-btn {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 9px 12px;
  box-shadow: 3px 3px 0 rgba(30, 30, 30, .10);
  cursor: pointer;
  transition: transform var(--t-fast);
}

.audio-btn:hover { transform: translate(-1px, -1px); }

.audio-btn.is-playing {
  border-color: var(--green);
  box-shadow: 3px 3px 0 rgba(47, 79, 79, .22);
}

.audio-btn.is-playing .play {
  background: var(--rust);
  animation: dot-pulse 1s var(--ease-out) infinite;
}

.audio-btn.is-playing .sub {
  color: var(--green);
}

.audio-btn .play {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--green);
  color: var(--cream);
  border: 1.5px solid var(--line);
  display: grid;
  place-items: center;
  font-size: 10px;
}

.audio-btn .lab {
  font-family: 'Bebas Neue';
  font-size: 10px;
  letter-spacing: .14em;
  color: var(--muted);
  line-height: 1.2;
}

.audio-btn .sub {
  font-size: 11px;
  font-weight: 700;
  color: var(--ink);
}

/* ============================================
   12b · READING LIVE · text amb highlight
   ============================================ */

.reading-strip {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: 14px;
  padding: 8px 12px 8px 8px;
  box-shadow: 4px 4px 0 rgba(30, 30, 30, .10);
}

.reading-strip .info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.reading-strip .iria-lab {
  font-family: 'Bebas Neue';
  font-size: 10px;
  letter-spacing: .16em;
  color: var(--muted);
}

.reading-progress-num {
  font-family: 'Bebas Neue';
  font-size: 11px;
  letter-spacing: .10em;
  color: var(--ink);
  text-align: right;
  line-height: 1.05;
}

.reading-progress-num small {
  display: block;
  font-size: 8.5px;
  color: var(--muted);
  letter-spacing: .14em;
  margin-top: 1px;
}

.text-card {
  position: relative;
  flex: 1;
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: 18px;
  padding: 16px;
  box-shadow: 5px 5px 0 rgba(30, 30, 30, .12);
  overflow: hidden;
}

.text-eyebrow {
  font-family: 'Bebas Neue';
  font-size: 10px;
  letter-spacing: .18em;
  color: var(--muted);
  margin-bottom: 6px;
}

.text-title {
  font-family: 'Fraunces';
  font-size: 20px;
  font-weight: 480;
  letter-spacing: -.02em;
  color: var(--ink);
  margin-bottom: 12px;
}

.text-body {
  font-family: 'Fraunces';
  font-size: 15px;
  font-weight: 460;
  letter-spacing: -.005em;
  color: var(--ink);
  line-height: 1.65;
}

.w-done { color: #A89C8C; }

.w-current {
  position: relative;
  background: var(--mustard);
  padding: 2px 5px;
  border-radius: 6px;
  color: var(--ink);
  font-weight: 600;
  border: 1.5px solid var(--line);
  box-shadow: 2px 2px 0 rgba(30, 30, 30, .14);
  animation: cursor-pulse 1.2s var(--ease-out) infinite;
}

@keyframes cursor-pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: .85; }
}

.w-pending { color: var(--ink); }

.w-detected {
  color: var(--rust-dark);
  font-style: italic;
  font-weight: 600;
  text-decoration: underline wavy var(--rust);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

/* Detection popup */
.detection-pop {
  position: absolute;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: var(--rust);
  color: var(--cream);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 8px 11px;
  box-shadow: 4px 4px 0 rgba(30, 30, 30, .18);
  max-width: 160px;
  z-index: 3;
  animation: bubble-in .5s var(--ease-out) 1.2s both;
}

.detection-pop .tag {
  font-family: 'Bebas Neue';
  font-size: 9px;
  letter-spacing: .18em;
  background: var(--cream);
  color: var(--rust);
  border: 1.5px solid var(--line);
  padding: 2px 6px;
  border-radius: 999px;
  align-self: flex-start;
}

.detection-pop .text {
  font-size: 10.5px;
  font-weight: 500;
  line-height: 1.35;
}

.detection-pop.is-hidden {
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity .35s var(--ease-out), visibility .35s, transform .35s var(--ease-out);
}

.detection-pop:not(.is-hidden) {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* ============================================
   14 · FEEDBACK READING · detall mètriques
   ============================================ */

.reading-detail-card {
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: 3px 3px 0 rgba(30, 30, 30, .08);
}

.reading-detail-title {
  font-family: 'Bebas Neue';
  font-size: 10px;
  letter-spacing: .14em;
  color: var(--muted);
  margin-bottom: 8px;
}

.reading-metric-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  margin-bottom: 4px;
}

.reading-metric-row:last-child { margin-bottom: 0; }

.reading-metric-label {
  width: 80px;
  color: var(--ink);
  flex-shrink: 0;
}

.reading-metric-track {
  flex: 1;
  height: 6px;
  background: rgba(42, 33, 25, .1);
  border: 1.5px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
}

.reading-metric-fill {
  width: 0%;
  height: 100%;
  background: var(--metric-color, var(--green));
  border-radius: inherit;
  transition: width 40ms linear;
}

.reading-metric-pct {
  font-family: 'Bebas Neue';
  min-width: 2.2em;
  text-align: right;
  color: var(--ink);
}

.reading-detail-card.is-animating .reading-metric-pct {
  color: var(--rust);
}

/* ============================================
   PROGRESS / DASHBOARD screens
   ============================================ */

.celebration-card {
  background: var(--green);
  color: var(--cream);
  border: 1.5px solid var(--line);
  border-radius: 18px;
  padding: 18px 20px;
  box-shadow: 5px 5px 0 rgba(30, 30, 30, .14);
  position: relative;
  overflow: hidden;
}

.celebration-card::before {
  content: "";
  position: absolute;
  inset: -30%;
  background: repeating-linear-gradient(45deg, transparent 0 16px, rgba(255, 255, 255, .04) 16px 18px);
  transform: rotate(-6deg);
}

.celebration-card > * { position: relative; z-index: 1; }

.celebration-card h3 {
  font-family: 'Fraunces';
  font-size: 22px;
  font-weight: 480;
  letter-spacing: -.02em;
  line-height: 1.1;
  color: var(--cream);
}

.celebration-card p {
  font-size: 12.5px;
  line-height: 1.5;
  color: #EBDDCB;
  margin-top: 6px;
}

.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.stat-block {
  padding: 12px 14px;
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  box-shadow: 3px 3px 0 rgba(30, 30, 30, .10);
}

.stat-block .lab {
  font-family: 'Bebas Neue';
  font-size: 10px;
  letter-spacing: .14em;
  color: var(--muted);
}

.stat-block .val {
  font-family: 'Bebas Neue';
  font-size: 26px;
  color: var(--ink);
  line-height: 1;
  margin-top: 4px;
  transition: color 0.2s ease;
}

#screen-14-stats.is-counting .stat-block .val {
  color: var(--rust);
}

.stat-block .delta {
  font-size: 11px;
  font-weight: 700;
  color: var(--green);
  margin-top: 2px;
}

.stat-block .delta.up::before { content: "↑ "; }
.stat-block .delta.down::before { content: "↓ "; color: var(--rust); }

/* ============================================
   18 · TANCAMENT
   ============================================ */

.closing-hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 8px 4px;
  gap: 14px;
}

.closing-eyebrow {
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--rust);
}

.closing-title {
  font-family: 'Fraunces';
  font-size: 30px;
  font-weight: 460;
  line-height: 1.05;
  letter-spacing: -.03em;
  color: var(--ink);
}

.closing-title em {
  font-style: italic;
  color: var(--rust);
}

.pillar {
  display: flex;
  gap: 10px;
  padding: 12px 14px;
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  box-shadow: 3px 3px 0 rgba(30, 30, 30, .10);
}

.pillar .num {
  font-family: 'Bebas Neue';
  font-size: 16px;
  color: var(--rust);
  flex-shrink: 0;
  line-height: 1;
}

.pillar .body { flex: 1; }

.pillar .title-p {
  font-family: 'Fraunces';
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: -.01em;
  color: var(--ink);
  line-height: 1.15;
}

.pillar .desc-p {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.45;
  margin-top: 3px;
}

.metrics-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 12px;
  background: var(--cream-2);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  box-shadow: 3px 3px 0 rgba(30, 30, 30, .10);
}

.metrics-bar .m {
  text-align: center;
}

.metrics-bar .m b {
  display: block;
  font-family: 'Bebas Neue';
  font-size: 16px;
  color: var(--ink);
  line-height: 1;
}

.metrics-bar .m span {
  display: block;
  font-size: 9px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-top: 3px;
}

/* 18 · fons pla = mostra del clip audio_master_iria.mp4 */
#screen-18 {
  background: var(--closing-bg);
}

#screen-18 .bg-layer {
  background: var(--closing-bg);
}

#screen-18 .bg-layer::after {
  opacity: 0;
}

#screen-18 .app-header {
  background: var(--closing-bg);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom: none;
  box-shadow: none;
}

#screen-18.is-closing-iria .app-header {
  border-bottom: none;
}

.closing-screen {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  gap: 10px;
}

.closing-footer {
  flex-shrink: 0;
  margin-top: auto;
  background: var(--rust);
  color: var(--cream);
  border: 1.5px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: 4px 4px 0 rgba(30, 30, 30, .15);
  text-align: center;
}

.closing-footer-title {
  font-family: 'Fraunces', serif;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
  margin-bottom: 10px;
}

.closing-pillars {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.closing-read {
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: opacity .45s ease, transform .45s ease, max-height .5s ease, margin .5s ease;
  transform-origin: top center;
}

.closing-iria {
  display: block;
  width: 100%;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  transition: opacity .45s ease;
}

.closing-iria-video {
  display: block;
  width: 100%;
  height: auto;
  margin: 0;
  padding: 0;
  border: 0;
  background-color: var(--closing-bg);
  object-fit: contain;
  object-position: bottom center;
}

#screen-18.is-closing-iria .closing-read {
  opacity: 0;
  transform: translateY(-10px) scale(.98);
  max-height: 0;
  margin: 0;
  overflow: hidden;
  pointer-events: none;
  visibility: hidden;
}

/* Fase clip: CTA a dalt, Iria enganxada a baix a tot l'ample */
#screen-18.is-closing-iria .screen-content.closing-screen {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  padding: 0 !important;
  gap: 0;
  overflow: hidden;
  background: var(--closing-bg);
}

#screen-18.is-closing-iria .closing-footer {
  position: relative;
  z-index: 3;
  flex: 0 0 auto;
  order: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 300px;
  margin: 8px auto 12px !important;
  margin-top: clamp(16vh, 20vh, 24vh) !important;
  padding: 12px 14px 13px;
  border-radius: 16px;
}

#screen-18.is-closing-iria .closing-footer-title {
  font-size: 13px;
  margin-bottom: 8px;
}

#screen-18.is-closing-iria .closing-footer .cta.cta-secondary {
  width: auto;
  min-width: 148px;
  padding: 9px 18px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .01em;
  border-radius: 999px;
  box-shadow: 2px 2px 0 rgba(30, 30, 30, .12);
}

#screen-18.is-closing-iria .closing-iria {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  display: block;
  width: 100%;
  max-height: none;
  opacity: 1;
  pointer-events: auto;
  overflow: visible;
  background: var(--closing-bg);
}

#screen-18.is-closing-iria .closing-iria.is-video-finished .closing-iria-video {
  opacity: 0;
  visibility: hidden;
}

#screen-18.is-closing-iria .closing-iria-video {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: 82vh;
  margin: 0;
  filter: none;
  object-fit: contain;
  object-position: bottom center;
}

@media (prefers-reduced-motion: reduce) {
  .closing-read,
  .closing-iria {
    transition: none;
  }

  #screen-18.is-closing-iria .closing-iria-video {
    display: none;
  }
}

/* ============================================
   16 · ERRORS RECURRENTS · patrons detectats
   ============================================ */

.streak-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  background: var(--mustard);
  border: 1.5px solid var(--line);
  border-radius: 999px;
  font-family: 'Bebas Neue';
  font-size: 12px;
  letter-spacing: .08em;
  color: var(--ink);
  box-shadow: 2px 2px 0 rgba(30, 30, 30, .14);
}

.intro-card {
  display: flex;
  gap: 12px;
  padding: 14px;
  background: var(--green);
  color: var(--cream);
  border: 1.5px solid var(--line);
  border-radius: 16px;
  box-shadow: 4px 4px 0 rgba(30, 30, 30, .12);
  align-items: flex-start;
}

.intro-ic {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: var(--mustard);
  border: 1.5px solid var(--line);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 18px;
}

.intro-body { display: flex; flex-direction: column; gap: 4px; }
.intro-eyebrow {
  font-family: 'Bebas Neue';
  font-size: 10px;
  letter-spacing: .16em;
  color: var(--mustard);
}
.intro-title {
  font-family: 'Fraunces';
  font-size: 19px;
  font-weight: 520;
  letter-spacing: -.025em;
  line-height: 1.1;
}
.intro-text {
  font-size: 11.5px;
  color: #EBDDCB;
  line-height: 1.4;
}

.errors-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0 2px;
}
.errors-title {
  font-family: 'Bebas Neue';
  font-size: 11.5px;
  letter-spacing: .14em;
  color: var(--ink);
}
.errors-meta {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
}

.errors-list { display: flex; flex-direction: column; gap: 8px; }

.error-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  box-shadow: 3px 3px 0 rgba(30, 30, 30, .08);
}

.error-rank {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--rust);
  color: var(--cream);
  border: 1.5px solid var(--line);
  display: grid;
  place-items: center;
  font-family: 'Bebas Neue';
  font-size: 14px;
  flex-shrink: 0;
}

.error-body { flex: 1; min-width: 0; }
.error-eyebrow {
  font-family: 'Bebas Neue';
  font-size: 9px;
  letter-spacing: .14em;
  color: var(--rust);
  margin-bottom: 2px;
}
.error-pair {
  font-family: 'Fraunces';
  font-size: 12.5px;
  line-height: 1.2;
  color: var(--ink);
  margin-bottom: 2px;
}
.error-wrong {
  color: var(--rust-dark);
  text-decoration: line-through;
  text-decoration-color: var(--rust);
  font-style: italic;
}
.error-arrow { margin: 0 4px; color: var(--muted); font-weight: 700; }
.error-right { color: var(--green); font-weight: 700; }
.error-meta {
  font-size: 10.5px;
  color: var(--muted);
  line-height: 1.35;
}

.error-freq {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  padding-left: 6px;
  border-left: 1.5px dashed rgba(42, 33, 25, .25);
}
.error-freq b {
  font-family: 'Bebas Neue';
  font-size: 18px;
  color: var(--ink);
}
.error-freq span {
  font-size: 9px;
  color: var(--muted);
  font-weight: 700;
  letter-spacing: .08em;
}

.recommend {
  display: flex;
  gap: 10px;
  padding: 12px 14px;
  background: var(--mustard);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  box-shadow: 3px 3px 0 rgba(30, 30, 30, .12);
  align-items: flex-start;
}
.recommend-ic {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--ink);
  color: var(--mustard);
  border: 1.5px solid var(--line);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 14px;
}
.recommend-body { display: flex; flex-direction: column; gap: 3px; }
.recommend-eyebrow {
  font-family: 'Bebas Neue';
  font-size: 10px;
  letter-spacing: .14em;
  color: var(--ink);
}
.recommend-text {
  font-size: 12px;
  line-height: 1.45;
  color: var(--ink);
  font-weight: 500;
}
.recommend-text em { font-style: italic; color: var(--rust-dark); font-weight: 700; }

/* ============================================
   17 · VISTA ACADÈMIA · header/footer fosc, cos ocre
   ============================================ */

.academy-screen {
  background: var(--cream) !important;
  color: var(--ink);
}
.academy-screen .bg-layer {
  background:
    radial-gradient(circle at 92% 8%, rgba(107, 140, 163, .12), transparent 38%),
    radial-gradient(circle at 8% 92%, rgba(181, 82, 58, .08), transparent 34%),
    linear-gradient(180deg, var(--cream-2) 0%, var(--cream) 55%, #EFE6D4 100%);
}

.academy-header {
  background: rgba(24, 22, 20, .88) !important;
  backdrop-filter: blur(14px) saturate(1.05);
  -webkit-backdrop-filter: blur(14px) saturate(1.05);
  border-bottom: 1px solid rgba(244, 233, 216, .18) !important;
  box-shadow: 0 1px 0 rgba(255, 249, 238, .06);
}
.back-btn-dark {
  background: rgba(244, 233, 216, .08) !important;
  color: var(--cream) !important;
  border-color: rgba(244, 233, 216, .3) !important;
}

.mode-badge {
  padding: 6px 11px;
  background: var(--rust);
  color: var(--cream);
  border: 1.5px solid var(--cream);
  border-radius: 999px;
  font-family: 'Bebas Neue';
  font-size: 11px;
  letter-spacing: .14em;
  box-shadow: 2px 2px 0 rgba(244, 233, 216, .15);
}

.academy-content {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px 16px 12px;
  overflow-y: auto;
  min-height: 0;
}

.academy-screen .stats-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 13px 14px;
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: 14px;
  box-shadow: 3px 3px 0 rgba(30, 30, 30, .08);
}
.stat-block-row { display: flex; flex-direction: column; align-items: center; gap: 2px; flex: 1; text-align: center; }
.stat-block-row .stat-value {
  font-family: 'Bebas Neue';
  font-size: 22px;
  color: var(--ink);
  line-height: 1;
}
.stat-block-row .stat-label {
  font-size: 9.5px;
  font-weight: 850;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
}
.stat-divider {
  width: 1.5px;
  height: 32px;
  background: rgba(42, 33, 25, .2);
  flex-shrink: 0;
}

.chip-row {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}
.chip-row::-webkit-scrollbar { display: none; }
.academy-screen .chip {
  padding: 5px 11px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  font-family: 'Bebas Neue';
  font-size: 11px;
  letter-spacing: .1em;
  color: var(--ink);
  background: var(--paper);
  flex-shrink: 0;
  cursor: pointer;
}
.academy-screen .chip.active {
  background: var(--ink);
  color: var(--cream);
  box-shadow: 2px 2px 0 rgba(30, 30, 30, .18);
}

.academy-section-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0 2px;
}
.academy-screen .section-title-bn {
  font-family: 'Bebas Neue';
  font-size: 11.5px;
  letter-spacing: .14em;
  color: var(--ink);
}
.academy-screen .section-meta-sm {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--muted);
}

.student-list { display: flex; flex-direction: column; gap: 6px; }
.academy-screen .student-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: 13px;
  box-shadow: 2px 2px 0 rgba(30, 30, 30, .08);
}
.student-avatar {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: var(--green);
  border: 1.5px solid var(--line);
  display: grid;
  place-items: center;
  color: var(--cream);
  font-family: 'Bebas Neue';
  font-size: 12px;
  flex-shrink: 0;
}
.student-avatar.warning { background: var(--red-soft); }
.student-avatar.medium { background: var(--mustard); color: var(--ink); }
.student-avatar.success { background: var(--success); }
.student-info { flex: 1; min-width: 0; }
.student-name {
  font-family: 'Fraunces';
  font-size: 14px;
  font-weight: 520;
  color: var(--ink);
  line-height: 1.1;
}
.student-meta {
  font-size: 10.5px;
  color: var(--muted);
  line-height: 1.35;
  margin-top: 2px;
}
.student-progress {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  flex-shrink: 0;
}
.student-pct {
  font-family: 'Bebas Neue';
  font-size: 14px;
  color: var(--green);
}
.student-pct.warning { color: var(--red-soft); }
.student-bar {
  width: 50px;
  height: 4px;
  background: rgba(42, 33, 25, .15);
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
}
.student-bar-fill { height: 100%; background: var(--green); }
.student-bar-fill.medium { background: var(--mustard); }
.student-bar-fill.warning { background: var(--red-soft); }

.academy-screen .insights-card {
  display: flex;
  gap: 10px;
  padding: 12px 14px;
  background: linear-gradient(135deg, var(--rust) 0%, var(--rust-dark) 100%);
  border: 1.5px solid var(--line);
  border-radius: 13px;
  box-shadow: 4px 4px 0 rgba(30, 30, 30, .12);
  align-items: flex-start;
}
.insights-ic {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--mustard);
  border: 1.5px solid var(--line);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 15px;
}
.insights-body { display: flex; flex-direction: column; gap: 4px; }
.insights-eyebrow {
  font-family: 'Bebas Neue';
  font-size: 10px;
  letter-spacing: .16em;
  color: var(--mustard);
  line-height: 1;
}
.insights-title {
  font-family: 'Fraunces';
  font-size: 15px;
  font-weight: 520;
  letter-spacing: -.02em;
  color: var(--cream);
  line-height: 1.25;
}
.insights-action {
  font-size: 11px;
  font-weight: 500;
  color: #F9E8D6;
  line-height: 1.4;
}
.insights-action em { font-style: italic; color: var(--mustard); }

.academy-bottom {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 8px;
  padding: 12px 16px 18px;
  background: rgba(24, 22, 20, .88);
  backdrop-filter: blur(14px) saturate(1.05);
  -webkit-backdrop-filter: blur(14px) saturate(1.05);
  border-top: 1px solid rgba(244, 233, 216, .18);
  box-shadow: 0 -1px 0 rgba(255, 249, 238, .05);
  flex-shrink: 0;
}
.cta-secondary-sm {
  flex-shrink: 0;
  padding: 13px 14px;
  background: var(--paper);
  color: var(--ink);
  border: 1.5px solid var(--line);
  border-radius: 13px;
  box-shadow: 3px 3px 0 rgba(0, 0, 0, .25);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}
.cta-primary-dark {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 14px;
  background: var(--green);
  color: var(--cream);
  border: 1.5px solid var(--line);
  border-radius: 13px;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, .3);
  cursor: pointer;
}
.cta-text { display: flex; flex-direction: column; gap: 2px; align-items: flex-start; }
.cta-eyebrow-sm {
  font-family: 'Bebas Neue';
  font-size: 10px;
  letter-spacing: .14em;
  color: var(--mustard);
  line-height: 1;
}
.cta-title-sm {
  font-size: 14px;
  font-weight: 800;
  color: var(--cream);
  line-height: 1.1;
}
.cta-arrow-wrap {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--rust);
  border: 1.5px solid var(--line);
  display: grid;
  place-items: center;
  color: var(--cream);
  flex-shrink: 0;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, .25);
}

/* ============================================
   17b · VISTA FAMÍLIA · B2C càlid
   ============================================ */

.role-badge {
  padding: 6px 11px;
  background: var(--mustard);
  color: var(--ink);
  border: 1.5px solid var(--line);
  border-radius: 999px;
  font-family: 'Bebas Neue';
  font-size: 11px;
  letter-spacing: .14em;
  box-shadow: 2px 2px 0 rgba(30, 30, 30, .12);
}

.family-content { gap: 12px; }

.family-greeting { padding: 0 2px; }
.family-greet-eyebrow {
  font-family: 'Bebas Neue';
  font-size: 11px;
  letter-spacing: .16em;
  color: var(--rust);
  margin-bottom: 4px;
}
.family-greet-text {
  font-family: 'Fraunces';
  font-size: 22px;
  font-weight: 520;
  letter-spacing: -.025em;
  color: var(--ink);
  line-height: 1.05;
}

.child-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: 14px;
  box-shadow: 3px 3px 0 rgba(30, 30, 30, .10);
}
.child-avatar {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--rust);
  color: var(--cream);
  border: 1.5px solid var(--line);
  display: grid;
  place-items: center;
  font-family: 'Bebas Neue';
  font-size: 16px;
  flex-shrink: 0;
}
.child-info { flex: 1; }
.child-name {
  font-family: 'Fraunces';
  font-size: 17px;
  font-weight: 520;
  color: var(--ink);
  line-height: 1;
}
.child-meta {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 3px;
}
.child-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: 'Bebas Neue';
  font-size: 10px;
  letter-spacing: .14em;
  color: var(--green);
  margin-top: 5px;
}
.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  border: 1.5px solid var(--line);
  animation: dot-pulse 1.4s var(--ease-out) infinite;
}

.week-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  background: var(--ink);
  color: var(--cream);
  border: 1.5px solid var(--line);
  border-radius: 14px;
  box-shadow: 3px 3px 0 rgba(30, 30, 30, .12);
}
.week-stat { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.week-stat b {
  font-family: 'Bebas Neue';
  font-size: 22px;
  color: var(--mustard);
  line-height: 1;
}
.week-stat span {
  font-size: 10px;
  font-weight: 700;
  color: #EBDDCB;
  letter-spacing: .06em;
}
.week-divider {
  width: 1.5px;
  height: 28px;
  background: rgba(244, 233, 216, .25);
  flex-shrink: 0;
}

.family-insight {
  display: flex;
  gap: 11px;
  padding: 12px 14px;
  background: rgba(107, 140, 163, .18);
  border: 1.5px solid var(--line);
  border-radius: 14px;
  align-items: flex-start;
}
.family-insight-ic {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: var(--blue-soft);
  color: var(--cream);
  border: 1.5px solid var(--line);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 16px;
}
.family-insight-body { display: flex; flex-direction: column; gap: 3px; }
.family-insight-eyebrow {
  font-family: 'Bebas Neue';
  font-size: 10px;
  letter-spacing: .14em;
  color: var(--blue-soft);
}
.family-insight-title {
  font-family: 'Fraunces';
  font-size: 15px;
  font-weight: 520;
  letter-spacing: -.015em;
  color: var(--ink);
  line-height: 1.2;
}
.family-insight-text {
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.4;
}

.mini-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.mini-metric {
  padding: 10px 8px;
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  text-align: center;
  box-shadow: 2px 2px 0 rgba(30, 30, 30, .08);
}
.mini-metric .mini-ic { font-size: 18px; line-height: 1; margin-bottom: 4px; }
.mini-metric .mini-lab {
  font-family: 'Bebas Neue';
  font-size: 10px;
  letter-spacing: .1em;
  color: var(--muted);
}
.mini-metric .mini-val {
  font-family: 'Bebas Neue';
  font-size: 20px;
  color: var(--ink);
  margin-top: 2px;
}
.mini-metric .mini-trend {
  font-size: 10px;
  font-weight: 700;
  color: var(--green);
  margin-top: 2px;
}

.encouragement {
  display: flex;
  gap: 11px;
  padding: 12px 14px;
  background: var(--rust);
  color: var(--cream);
  border: 1.5px solid var(--line);
  border-radius: 14px;
  box-shadow: 4px 4px 0 rgba(30, 30, 30, .14);
  align-items: center;
}
.encouragement-ic {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: var(--cream);
  border: 1.5px solid var(--line);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 17px;
}
.encouragement-body { display: flex; flex-direction: column; gap: 2px; }
.encouragement-title {
  font-family: 'Fraunces';
  font-size: 14px;
  font-weight: 600;
  color: var(--cream);
  line-height: 1.15;
}
.encouragement-text {
  font-size: 11px;
  color: #EBDDCB;
  line-height: 1.4;
}

/* ============================================
   11 · FITA DESBLOQUEJADA · targeta clicable
   ============================================ */

.milestone-card {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 14px;
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: 14px;
  box-shadow: 3px 3px 0 rgba(30, 30, 30, .10);
  cursor: pointer;
  text-align: left;
  transition: transform var(--t-fast), box-shadow var(--t-fast);
  font: inherit;
  color: inherit;
}
.milestone-card:hover {
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 rgba(30, 30, 30, .12);
}
.milestone-card:active {
  transform: translate(1px, 1px);
  box-shadow: 2px 2px 0 rgba(30, 30, 30, .08);
}
.milestone-ic {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--rust);
  color: var(--cream);
  border: 1.5px solid var(--line);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 16px;
}
.milestone-body { flex: 1; min-width: 0; }
.milestone-eyebrow {
  font-family: 'Bebas Neue';
  font-size: 10px;
  letter-spacing: .14em;
  color: var(--rust);
  line-height: 1;
}
.milestone-title {
  font-family: 'Fraunces';
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.2;
  margin-top: 2px;
}
.milestone-desc {
  font-size: 10.5px;
  color: var(--muted);
  line-height: 1.35;
  margin-top: 2px;
}
.milestone-badge {
  padding: 4px 8px;
  background: var(--mustard);
  border: 1.5px solid var(--line);
  border-radius: 999px;
  font-family: 'Bebas Neue';
  font-size: 9px;
  letter-spacing: .1em;
  color: var(--ink);
  flex-shrink: 0;
}
.milestone-arrow {
  font-size: 16px;
  font-weight: 800;
  color: var(--green);
  flex-shrink: 0;
}

/* ============================================
   19 · ROLEPLAY
   ============================================ */

/* Header · títol centrat (columnes simètriques ‹ · títol · ⋯) */
.roleplay-screen .roleplay-app-header {
  display: grid;
  grid-template-columns: 38px 1fr 38px;
  align-items: center;
  gap: 8px;
}
.roleplay-screen .roleplay-app-header .back-btn {
  grid-column: 1;
  justify-self: start;
}
.roleplay-screen .roleplay-app-header .header-center {
  grid-column: 2;
  justify-self: center;
  text-align: center;
}
.roleplay-screen .roleplay-app-header .roleplay-header-actions {
  grid-column: 3;
  justify-self: end;
}

.scene-live-wrap {
  padding: 10px 16px 0;
  flex-shrink: 0;
  display: flex;
  justify-content: flex-end;
}
.scene-live-wrap .live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: var(--rust-dark);
  box-shadow: 3px 3px 0 rgba(30, 30, 30, .14);
}
.roleplay-screen .live-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--mustard);
  border: 1.5px solid var(--line);
  box-shadow: 0 0 0 2px rgba(227, 168, 87, .45);
  animation: dot-pulse 1.4s var(--ease-out) infinite;
}
.roleplay-screen .live-text {
  font-family: 'Bebas Neue';
  font-size: 11px;
  letter-spacing: .12em;
  color: var(--cream);
  line-height: 1;
  text-shadow: 0 1px 0 rgba(30, 30, 30, .25);
}

.roleplay-body {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 0 8px;
  min-height: 0;
  overflow: hidden;
}

.scene-card {
  position: relative;
  margin: 8px 16px 0;
  padding: 14px 16px;
  background: linear-gradient(135deg, var(--mustard) 0%, #C88E3F 100%);
  border: 1.5px solid var(--line);
  border-radius: 18px;
  box-shadow: 5px 5px 0 rgba(30, 30, 30, .14);
  display: flex;
  gap: 12px;
  align-items: center;
  overflow: hidden;
  flex-shrink: 0;
}
.scene-decoration {
  position: absolute;
  top: -15px;
  right: -10px;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(244, 233, 216, .25);
  pointer-events: none;
}
.scene-icon {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  background: var(--paper);
  border: 1.5px solid var(--line);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 24px;
  position: relative;
  z-index: 1;
  box-shadow: 3px 3px 0 rgba(30, 30, 30, .12);
}
.scene-content { display: flex; flex-direction: column; gap: 3px; flex: 1; position: relative; z-index: 1; }
.scene-eyebrow {
  font-family: 'Bebas Neue';
  font-size: 10px;
  letter-spacing: .16em;
  color: var(--rust-dark);
  line-height: 1;
}
.scene-title {
  font-family: 'Fraunces';
  font-size: 18px;
  font-weight: 520;
  letter-spacing: -.025em;
  color: var(--ink);
  line-height: 1.1;
}
.scene-goal {
  font-size: 11px;
  color: #5C3A2A;
  font-weight: 600;
  line-height: 1.35;
}
.scene-goal em { font-style: italic; color: var(--ink); }

.roles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  padding: 0 16px;
  flex-shrink: 0;
}
.role-card {
  padding: 10px 12px;
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  box-shadow: 2px 2px 0 rgba(30, 30, 30, .06);
  display: flex;
  gap: 8px;
  align-items: center;
}
.role-tag {
  font-family: 'Bebas Neue';
  font-size: 9px;
  letter-spacing: .08em;
  color: var(--muted);
  background: var(--cream);
  border: 1.5px solid var(--line);
  border-radius: 6px;
  padding: 2px 6px;
  flex-shrink: 0;
}
.role-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.2;
}

.roleplay-thread {
  flex: 1 1 auto;
  padding: 4px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  min-height: 0;
  scrollbar-width: none;
}
.roleplay-thread::-webkit-scrollbar { display: none; }

.bubble-row {
  display: flex;
  gap: 7px;
  align-items: flex-end;
  max-width: 92%;
}
.bubble-row.user {
  align-self: flex-end;
  flex-direction: row-reverse;
}
.bubble-row.ai { align-self: flex-start; }
.bubble-avatar {
  width: 26px;
  height: 26px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 11px;
  border: 1.5px solid var(--line);
  margin-bottom: 3px;
  box-shadow: 1.5px 1.5px 0 rgba(30, 30, 30, .12);
}
.bubble-avatar.barista { background: var(--mustard); }
.bubble-avatar.you {
  background: var(--green);
  color: var(--cream);
  font-family: 'Bebas Neue';
  letter-spacing: .04em;
}
.bubble {
  padding: 9px 12px;
  border: 1.5px solid var(--line);
  border-radius: 16px;
  font-size: 12.5px;
  line-height: 1.42;
  box-shadow: 2.5px 2.5px 0 rgba(30, 30, 30, .08);
}
.bubble.ai {
  background: var(--paper);
  color: var(--ink);
  border-bottom-left-radius: 5px;
}
.bubble.user {
  background: var(--green);
  color: var(--cream);
  border-bottom-right-radius: 5px;
}
.bubble em { font-style: italic; }

.hint-card {
  align-self: flex-start;
  margin-left: 33px;
  padding: 7px 10px;
  background: #D5E2EA;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  display: flex;
  gap: 6px;
  align-items: center;
  box-shadow: 2px 2px 0 rgba(30, 30, 30, .06);
  max-width: 88%;
}
.hint-icon { font-size: 11px; flex-shrink: 0; }
.hint-text {
  font-size: 10.5px;
  line-height: 1.3;
  color: #3A5A6F;
  font-weight: 600;
}
.hint-text strong { color: var(--ink); font-style: italic; }

.recording-strip {
  margin: 0 16px;
  padding: 11px 13px;
  background: #181614;
  color: var(--cream);
  border: 1.5px solid var(--line);
  border-radius: 13px;
  box-shadow: 3px 3px 0 rgba(30, 30, 30, .12);
  display: flex;
  align-items: center;
  gap: 11px;
  flex-shrink: 0;
}
.rec-pulse {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #E07070;
  box-shadow: 0 0 0 3px rgba(224, 112, 112, .35);
  flex-shrink: 0;
  animation: dot-pulse 1.4s var(--ease-out) infinite;
}
.rec-content { display: flex; flex-direction: column; gap: 1px; flex: 1; }
.rec-label {
  font-family: 'Bebas Neue';
  font-size: 10px;
  letter-spacing: .14em;
  color: var(--mustard);
  line-height: 1;
}
.rec-text { font-size: 11px; color: #DDE9DE; font-weight: 500; }
.rec-time {
  font-family: 'Bebas Neue';
  font-size: 15px;
  letter-spacing: .04em;
  color: var(--cream);
}

.roleplay-bottom {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 10px 16px;
  border-top: 1px solid var(--divider);
  background: var(--glass-bottom);
  backdrop-filter: blur(12px) saturate(1.04);
  -webkit-backdrop-filter: blur(12px) saturate(1.04);
  box-shadow: 0 -1px 0 rgba(255, 249, 238, .5);
  flex-shrink: 0;
}
.roleplay-screen .tool-btn {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: var(--paper);
  border: 1.5px solid var(--line);
  display: grid;
  place-items: center;
  font-size: 17px;
  box-shadow: 2px 2px 0 rgba(30, 30, 30, .09);
  cursor: pointer;
}
.roleplay-screen .mic-large {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px;
  background: var(--rust);
  color: var(--cream);
  font-size: 14px;
  font-weight: 800;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  box-shadow: 4px 4px 0 rgba(30, 30, 30, .14);
  cursor: pointer;
  transition: background var(--t-fast), transform var(--t-fast), box-shadow var(--t-fast);
}
.roleplay-screen .mic-large:hover {
  transform: translate(-1px, -1px);
  box-shadow: 5px 5px 0 rgba(30, 30, 30, .16);
}
.roleplay-screen .mic-large:active {
  transform: translate(1px, 1px);
  box-shadow: 3px 3px 0 rgba(30, 30, 30, .12);
}
.roleplay-screen.is-recording .mic-large {
  background: var(--green);
  animation: roleplay-mic-pulse 1.2s var(--ease-out) infinite;
}
.roleplay-screen.is-recording .recording-strip {
  border-color: var(--mustard);
  box-shadow: 0 0 0 2px rgba(227, 168, 87, .25), 3px 3px 0 rgba(30, 30, 30, .12);
}
.roleplay-screen.is-recording .rec-pulse {
  animation: dot-pulse .7s var(--ease-out) infinite;
}
.roleplay-screen.is-done .mic-large {
  background: var(--muted);
  cursor: default;
  pointer-events: none;
  opacity: .85;
}
.roleplay-screen .hint-card.is-hidden {
  display: none;
}
.roleplay-screen .tool-btn.is-active {
  background: var(--mustard);
  box-shadow: inset 2px 2px 0 rgba(30, 30, 30, .12);
}
@keyframes roleplay-mic-pulse {
  0%, 100% { box-shadow: 4px 4px 0 rgba(30, 30, 30, .14), 0 0 0 0 rgba(47, 79, 79, .35); }
  50% { box-shadow: 4px 4px 0 rgba(30, 30, 30, .14), 0 0 0 8px rgba(47, 79, 79, 0); }
}
.roleplay-screen .mic-icon { font-size: 17px; }

.roleplay-header-actions {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-shrink: 0;
}
.roleplay-screen .roleplay-menu-btn {
  width: 34px;
  height: 34px;
  font-size: 16px;
  padding: 0;
}
.roleplay-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 30;
  min-width: 200px;
  padding: 6px;
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  box-shadow: 6px 6px 0 rgba(30, 30, 30, .14);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.roleplay-menu[hidden] { display: none; }
.roleplay-menu-item {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid transparent;
  border-radius: 9px;
  background: transparent;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: background var(--t-fast);
}
.roleplay-menu-item:hover,
.roleplay-menu-item:focus {
  background: var(--cream);
  border-color: var(--line);
  outline: none;
}
.roleplay-menu-item:first-child {
  background: var(--green);
  color: var(--cream);
  border-color: var(--line);
}
.roleplay-menu-item:first-child:hover,
.roleplay-menu-item:first-child:focus {
  background: #3a6363;
}

/* ============================================
   DEMO POLISH · speaking 09, quiz, XP, toast
   ============================================ */

.speaking-rec-badge {
  margin: 14px 0 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--rust);
  color: var(--cream);
  padding: 6px 14px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  font-family: 'Bebas Neue';
  font-size: 11px;
  letter-spacing: .14em;
}

.speaking-rec-badge.is-recording .rec-dot {
  animation: dot-pulse 1.2s var(--ease-out) infinite;
}

.speaking-rec-badge .rec-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cream);
}

.speaking-hint {
  font-size: 12px;
  color: var(--ink);
  margin-top: 8px;
  line-height: 1.4;
}

#speaking09-done:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

.xp-reward-val {
  font-family: 'Bebas Neue';
  font-size: 22px;
  color: var(--ink);
  min-width: 2.5em;
  text-align: right;
}

.session-progress-card {
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: 3px 3px 0 rgba(30, 30, 30, .08);
}

.session-progress-title {
  font-family: 'Bebas Neue';
  font-size: 10px;
  letter-spacing: .14em;
  color: var(--muted);
  margin-bottom: 8px;
}

.session-progress-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.session-progress-row:last-child { margin-bottom: 0; }

.session-progress-label {
  font-family: 'Bebas Neue';
  font-size: 10px;
  color: var(--ink);
  width: 48px;
  flex-shrink: 0;
}

.session-progress-track {
  flex: 1;
  height: 8px;
  background: rgba(42, 33, 25, .1);
  border-radius: 999px;
  overflow: hidden;
  border: 1.5px solid var(--line);
}

.session-progress-fill {
  width: 0%;
  height: 100%;
  background: var(--bar-color, var(--green));
  transition: width 40ms linear;
}

.session-progress-pct {
  font-family: 'Bebas Neue';
  font-size: 11px;
  color: var(--ink);
  min-width: 2em;
  text-align: right;
}

.reading-intro-play.is-playing {
  animation: dot-pulse 0.9s var(--ease-out) infinite;
  background: var(--green) !important;
}

.quiz-feedback {
  border-radius: 12px;
  border: 1.5px solid var(--line);
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.45;
  box-shadow: 3px 3px 0 rgba(30, 30, 30, .1);
}

/* 13 · confetti en encertar (vídeo alpha + burst CSS)
   Ajustos ràpids: edita les variables a #screen-13 */
#screen-13 {
  --confetti-fit: contain;       /* contain = clip sencer · cover = omple (retalla) */
  --confetti-position: center 18%; /* on centrar el vídeo */
  --confetti-scale: 1.12;        /* mida del clip (1 = 100%) */
  --confetti-fade-burst: 0;      /* 0 = amaga partícules CSS si hi ha vídeo */
  --confetti-overlay: 0.92;      /* opacitat del vídeo */
}

#screen-13 .quiz-confetti {
  position: absolute;
  inset: 0;
  z-index: 40;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s var(--ease-out), visibility 0.35s;
  overflow: hidden;
}

#screen-13.is-quiz-success .quiz-confetti {
  opacity: 1;
  visibility: visible;
}

.quiz-confetti-burst {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
}

.confetti-piece {
  position: absolute;
  top: -12px;
  width: 9px;
  height: 14px;
  border-radius: 2px;
  border: 1px solid rgba(30, 30, 30, .15);
  opacity: 0;
  animation: confetti-fall 2.4s var(--ease-out) forwards;
}

@keyframes confetti-fall {
  0% {
    opacity: 1;
    transform: translateY(0) rotate(0deg) scale(1);
  }
  100% {
    opacity: 0.9;
    transform: translateY(105vh) rotate(640deg) scale(0.85);
  }
}

.quiz-confetti-video {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: var(--confetti-fit);
  object-position: var(--confetti-position);
  transform: scale(var(--confetti-scale));
  transform-origin: var(--confetti-position);
  opacity: 0;
  transition: opacity 0.35s ease;
}

#screen-13.is-quiz-success .quiz-confetti-video.is-playing {
  opacity: var(--confetti-overlay);
}

#screen-13.is-quiz-success .quiz-confetti.has-video .quiz-confetti-burst {
  opacity: var(--confetti-fade-burst);
}

#screen-13.is-quiz-success .quiz-feedback.is-correct {
  animation: quiz-success-pop 0.55s var(--ease-out);
  position: relative;
  z-index: 45;
}

#screen-13.is-quiz-success .quiz-option.is-correct {
  animation: quiz-option-glow 1.2s var(--ease-out) infinite;
  position: relative;
  z-index: 42;
}

@keyframes quiz-success-pop {
  0%   { transform: scale(0.92); opacity: 0.6; }
  60%  { transform: scale(1.03); }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes quiz-option-glow {
  0%, 100% { box-shadow: 3px 3px 0 rgba(47, 79, 79, .15); }
  50%      { box-shadow: 0 0 0 2px var(--green), 4px 4px 0 rgba(47, 79, 79, .2); }
}

@media (prefers-reduced-motion: reduce) {
  #screen-13 .quiz-confetti-burst,
  .confetti-piece {
    display: none;
  }

  #screen-13.is-quiz-success .quiz-option.is-correct {
    animation: none;
  }
}

.quiz-feedback.is-correct {
  background: rgba(47, 79, 79, .12);
  color: var(--green);
}

.quiz-feedback.is-wrong {
  background: rgba(181, 82, 58, .1);
  color: var(--rust-dark);
}

.quiz-feedback.is-hint {
  background: var(--mustard);
  color: var(--ink);
}

.quiz-option.is-correct {
  border-color: var(--green);
  background: rgba(47, 79, 79, .08);
}

.quiz-option.is-correct .letter {
  background: var(--green);
  color: var(--cream);
}

.quiz-option.is-wrong {
  border-color: var(--rust);
  background: rgba(181, 82, 58, .08);
}

.quiz-option.is-wrong .letter {
  background: var(--rust);
  color: var(--cream);
}

.iria-thinking-toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  margin-bottom: 10px;
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  box-shadow: 3px 3px 0 rgba(30, 30, 30, .1);
  opacity: 0;
  transform: translateY(-6px);
  max-height: 0;
  overflow: hidden;
  margin-bottom: 0;
  padding-top: 0;
  padding-bottom: 0;
  border-width: 0;
  transition: opacity .35s ease, transform .35s ease, max-height .35s ease, margin .35s ease, padding .35s ease;
}

.iria-thinking-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
  max-height: 80px;
  margin-bottom: 10px;
  padding: 8px 12px;
  border-width: 1.5px;
}

.iria-thinking-toast .toast-avatar {
  font-family: 'Bebas Neue';
  font-size: 10px;
  letter-spacing: .12em;
  background: var(--green);
  color: var(--cream);
  padding: 4px 8px;
  border-radius: 8px;
  border: 1.5px solid var(--line);
}

.iria-thinking-toast .toast-text {
  font-size: 11px;
  color: var(--muted);
  flex: 1;
}

.student-row.is-active-student {
  border-color: var(--green);
  box-shadow: 4px 4px 0 rgba(47, 79, 79, .18);
  animation: student-highlight 2.5s var(--ease-out) infinite;
}

@keyframes student-highlight {
  0%, 100% { box-shadow: 4px 4px 0 rgba(47, 79, 79, .18); }
  50%      { box-shadow: 4px 4px 0 rgba(47, 79, 79, .32); }
}

.live-pulse {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  margin-right: 4px;
  vertical-align: middle;
  animation: dot-pulse 1.4s var(--ease-out) infinite;
}

#demo-jm {
  border-color: var(--line);
}
