/* ═══════════════════════════════════════════════════════════
   RULETA DIARIA — Feature 9
═══════════════════════════════════════════════════════════ */
.rl-modal {
  max-width: 360px;
  padding: 24px 20px 18px;
  overflow-y: auto;
  max-height: 85vh;
  -webkit-overflow-scrolling: touch;
}
.rl-streak-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: var(--text2);
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 20px;
  padding: 4px 12px;
  margin-bottom: 16px;
  letter-spacing: .02em;
}
.rl-wheel-wrap {
  position: relative;
  width: 220px;
  margin: 0 auto 16px;
}
@media(max-height:700px) {
  .rl-wheel-wrap { width: 160px; }
  #rl-wheel-svg  { width: 160px; height: 160px; }
}
.rl-pointer {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 22px;
  color: #fff;
  z-index: 10;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.6));
  pointer-events: none;
}
#rl-wheel-container {
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 0 30px rgba(0,0,0,.5), 0 0 0 3px rgba(255,255,255,.08);
}
#rl-wheel-svg {
  display: block;
}
#rl-prize-reveal {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 14px;
  padding: 14px 20px;
  margin-bottom: 12px;
  animation: dr-pop .5s cubic-bezier(.34,1.56,.64,1) both;
}
.rl-prize-icon {
  font-size: 40px;
  line-height: 1;
}
.rl-prize-label {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 20px;
}

/* ═══════════════════════════════════════════════════════════
   DEBT TRACKER
═══════════════════════════════════════════════════════════ */
.debt-empty {
  text-align: center;
  padding: 32px 16px;
  background: rgba(255,255,255,.03);
  border: 1px dashed var(--border2);
  border-radius: 16px;
  margin-bottom: 16px;
}
.debt-summary-card {
  background: rgba(239,68,68,.05);
  border: 1px solid rgba(239,68,68,.2);
  border-radius: 16px;
  padding: 16px;
}
.debt-sum-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.debt-sum-item { text-align: center; }
.debt-sum-val {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 18px;
  color: var(--text1);
  margin-bottom: 2px;
}
.debt-sum-val.danger { color: var(--danger); }
.debt-sum-val.warn   { color: #f59e0b; }
.debt-sum-label {
  font-size: 10px;
  color: var(--text3);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
}

/* Individual debt card */
.debt-card {
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border2);
  border-radius: 14px;
  padding: 14px;
  transition: border-color .2s;
}
.debt-card:hover { border-color: var(--border); }
.debt-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
}
.debt-card-name {
  font-weight: 700;
  font-size: 14px;
  color: var(--text1);
  margin-bottom: 3px;
}
.debt-card-rate {
  font-size: 11px;
  color: var(--text2);
  font-weight: 600;
}
.debt-card-rate.high { color: var(--danger); }
.debt-card-balance {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 16px;
  color: var(--danger);
  text-align: right;
  margin-bottom: 2px;
}
.debt-card-interest {
  font-size: 10px;
  color: #f59e0b;
  text-align: right;
}
.debt-rate-bar {
  height: 4px;
  background: rgba(255,255,255,.08);
  border-radius: 2px;
  margin-bottom: 10px;
  overflow: hidden;
}
.debt-rate-fill {
  height: 100%;
  background: var(--accent2);
  border-radius: 2px;
  transition: width .4s;
}
.debt-rate-fill.danger { background: var(--danger); }
.debt-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Plan comparison */
.debt-plan-card {
  background: rgba(255,255,255,.03);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
}
.debt-plan-title {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 4px;
}
.debt-plan-note {
  font-size: 11px;
  color: var(--text3);
  margin-bottom: 14px;
}
.debt-plan-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}
.debt-plan-col {
  border-radius: 12px;
  padding: 12px;
  border: 1px solid var(--border2);
}
.debt-plan-col.avalanche {
  background: rgba(0,229,160,.05);
  border-color: rgba(0,229,160,.25);
}
.debt-plan-col.snowball {
  background: rgba(99,179,237,.05);
  border-color: rgba(99,179,237,.2);
}
.dp-badge {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 4px;
  color: var(--text1);
}
.dp-subtitle {
  font-size: 10px;
  color: var(--text3);
  margin-bottom: 10px;
  line-height: 1.3;
}
.dp-stat {
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin-bottom: 6px;
}
.dp-val {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 15px;
  color: var(--text1);
}
.dp-val.warn { color: #f59e0b; }
.dp-lab { font-size: 10px; color: var(--text3); }
.debt-plan-insight {
  font-size: 12px;
  color: var(--text2);
  background: rgba(255,255,255,.03);
  border-radius: 8px;
  padding: 8px 10px;
  line-height: 1.4;
}

/* Form helper */
.form-row { display: flex; flex-direction: column; gap: 6px; }
.form-label { font-size: 12px; font-weight: 600; color: var(--text2); }

/* ═══════════════════════════════════════════════════════════
   ONBOARDING STEP 4 — Grid layout + health score preview
═══════════════════════════════════════════════════════════ */
.fin-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}
.fin-row-2 .fin-field { margin-bottom: 0; min-width: 0; overflow: hidden; }
.fin-row-2 .fin-input-row { min-width: 0; }
.fin-row-2 .fin-num { min-width: 0; width: 100%; }

@media (max-width: 480px) {
  .fin-row-2 { grid-template-columns: 1fr; gap: 0; }
  .fin-prefix { padding: 10px 12px; font-size: 14px; }
  .fin-num    { font-size: 15px; padding: 10px 12px; }
}

.fp-health-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.fp-health-score {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 32px;
  color: var(--accent);
  line-height: 1;
  min-width: 70px;
}
.fp-health-label {
  font-size: 12px;
  color: var(--text2);
  font-weight: 600;
  line-height: 1.3;
}
.fp-divider {
  height: 1px;
  background: var(--border2);
  margin-bottom: 10px;
}
.fp-insight {
  margin-top: 8px;
  font-size: 12px;
  color: var(--accent);
  font-style: italic;
  line-height: 1.4;
  min-height: 18px;
}

/* ═══════════════════════════════════════════════════════════
   CAREER EVENT MODAL
═══════════════════════════════════════════════════════════ */
.career-event-modal {
  max-width: 380px;
  text-align: center;
  padding: 28px 20px 24px;
}
.cev-icon {
  font-size: 48px;
  margin-bottom: 10px;
  animation: ach-bounce 0.5s cubic-bezier(0.34,1.56,0.64,1) 0.2s both;
}
.cev-title {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 20px;
  color: var(--text1);
  margin-bottom: 8px;
}
.cev-desc {
  font-size: 13px;
  color: var(--text2);
  line-height: 1.5;
  margin-bottom: 18px;
}
.cev-choices {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
  text-align: left;
}
.career-choice-btn {
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border2);
  border-radius: 12px;
  padding: 12px 14px;
  cursor: pointer;
  transition: all .2s;
  text-align: left;
  width: 100%;
}
.career-choice-btn:hover { border-color: var(--border); background: rgba(255,255,255,.07); transform: translateY(-1px); }
.career-choice-btn.choice-positive:hover { border-color: var(--accent); background: rgba(0,229,160,.07); }
.career-choice-btn.choice-negative:hover { border-color: var(--danger); background: rgba(255,75,92,.07); }
.ccb-label {
  font-weight: 700;
  font-size: 13px;
  color: var(--text1);
  margin-bottom: 3px;
}
.ccb-desc {
  font-size: 11px;
  color: var(--text3);
  line-height: 1.4;
}
.cev-lesson {
  font-size: 11px;
  color: var(--accent);
  font-style: italic;
  line-height: 1.5;
  background: rgba(0,229,160,.06);
  border: 1px solid rgba(0,229,160,.15);
  border-radius: 8px;
  padding: 8px 12px;
}

/* ═══════════════════════════════════════════════════════════
   YEAR-END SUMMARY MODAL
═══════════════════════════════════════════════════════════ */
.year-end-modal {
  max-width: 380px;
  text-align: center;
  padding: 28px 20px 24px;
  position: relative;
  overflow: hidden;
}
.year-end-modal::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(240,180,41,.12) 0%, transparent 65%);
  pointer-events: none;
}
.ye-fireworks {
  font-size: 52px;
  line-height: 1;
  margin-bottom: 8px;
  animation: dr-pop 0.6s cubic-bezier(0.34,1.56,0.64,1) 0.1s both;
}
.ye-eyebrow {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .14em;
  color: #f0b429;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.ye-title {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 24px;
  color: var(--text1);
  margin-bottom: 16px;
}
.ye-patrimony {
  background: rgba(240,180,41,.07);
  border: 1px solid rgba(240,180,41,.25);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 16px;
  position: relative;
}
.ye-patrimony-label {
  font-size: 11px;
  color: var(--text3);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 4px;
}
.ye-patrimony-val {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 32px;
  color: #f0b429;
  line-height: 1.1;
}
.ye-pct {
  display: inline-block;
  margin-top: 6px;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 14px;
  padding: 3px 10px;
  border-radius: 20px;
}
.ye-pct.pos { background: rgba(0,229,160,.15); color: var(--accent); }
.ye-pct.neg { background: rgba(255,75,92,.15);  color: var(--danger); }

/* 4-stat row */
.ye-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}
.ye-stat {
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border2);
  border-radius: 10px;
  padding: 10px 4px;
}
.ye-stat-icon { font-size: 16px; margin-bottom: 4px; }
.ye-stat-val {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 13px;
  color: var(--text1);
  margin-bottom: 2px;
}
.ye-stat-lab { font-size: 9px; color: var(--text3); font-weight: 600; }

.ye-highlight {
  font-size: 13px;
  color: var(--text1);
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 10px;
  line-height: 1.5;
}
.ye-msg {
  font-size: 12px;
  color: var(--text2);
  font-style: italic;
  margin-bottom: 14px;
  line-height: 1.5;
}
.ye-next {
  background: rgba(0,229,160,.06);
  border: 1px solid rgba(0,229,160,.2);
  border-radius: 12px;
  padding: 12px;
}
.ye-next-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 4px;
}
.ye-next-val {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 22px;
  color: var(--accent);
}
.ye-next-sub {
  font-size: 11px;
  color: var(--text3);
  margin-top: 2px;
}
.modal-out {
  animation: modal-fade-out 0.3s ease forwards;
}
@keyframes modal-fade-out {
  to { opacity: 0; transform: scale(0.95); }
}

/* ═══════════════════════════════════════════════════════════
   MONEY POP — Floating money popup (salary, business, divs)
═══════════════════════════════════════════════════════════ */
.money-pop {
  position: fixed;
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 20px;
  color: #00e5a0;
  pointer-events: none;
  z-index: 9999;
  text-shadow: 0 2px 12px rgba(0,0,0,.6);
  animation: money-float 2.2s cubic-bezier(0.25,0.46,0.45,0.94) forwards;
  white-space: nowrap;
}
@keyframes money-float {
  0%   { transform: translateY(0) scale(0.6); opacity: 0; }
  15%  { transform: translateY(-10px) scale(1.1); opacity: 1; }
  70%  { transform: translateY(-60px) scale(1); opacity: 1; }
  100% { transform: translateY(-110px) scale(0.9); opacity: 0; }
}

/* ═══════════════════════════════════════════════════════════
   MUSIC BUTTON
═══════════════════════════════════════════════════════════ */
.music-btn {
  cursor: pointer;
  border: none;
  font-size: 10px;
  font-weight: 700;
  background: rgba(255,255,255,.06);
  color: var(--text3);
  padding: 4px 8px;
  border-radius: 20px;
  transition: all .2s;
  letter-spacing: .02em;
}
.music-btn:hover { background: rgba(255,255,255,.1); color: var(--text2); }
.music-btn.music-on {
  background: rgba(0,229,160,.12);
  color: var(--accent);
  box-shadow: 0 0 8px rgba(0,229,160,.25);
  animation: music-pulse 2s ease-in-out infinite;
}
@keyframes music-pulse {
  0%, 100% { box-shadow: 0 0 8px rgba(0,229,160,.25); }
  50%       { box-shadow: 0 0 16px rgba(0,229,160,.5); }
}

/* ═══════════════════════════════════════════════════════════
   SPEED BUTTON active states
═══════════════════════════════════════════════════════════ */
#game-speed-btn {
  transition: color .2s, background .2s;
  cursor: pointer;
}
#game-speed-btn:hover { background: rgba(255,255,255,.1) !important; }

/* ═══════════════════════════════════════════════════════════
   LIVE PRICE TICKER
═══════════════════════════════════════════════════════════ */
.price-ticker-wrap {
  width: 100%;
  overflow: hidden;
  background: rgba(255,255,255,.03);
  border-bottom: 1px solid rgba(255,255,255,.06);
  height: 28px;
  display: flex;
  align-items: center;
  position: relative;
  z-index: 2;
}
.price-ticker {
  display: flex;
  align-items: center;
  gap: 0;
  white-space: nowrap;
  animation: ticker-scroll 40s linear infinite;
  will-change: transform;
}
.price-ticker:hover { animation-play-state: paused; }
@keyframes ticker-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.pt-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0 14px;
}
.pt-name {
  font-size: 10px;
  font-weight: 700;
  color: var(--text2);
  font-family: 'DM Mono', monospace;
  letter-spacing: .04em;
}
.pt-price {
  font-size: 10px;
  font-family: 'DM Mono', monospace;
  font-weight: 600;
}
.pt-chg {
  font-size: 9px;
  font-family: 'DM Mono', monospace;
  opacity: 0.8;
}
.pt-sep {
  color: rgba(255,255,255,.15);
  font-size: 10px;
  padding: 0 4px;
}

/* ═══════════════════════════════════════════════════════════
   SPLASH SCREEN
═══════════════════════════════════════════════════════════ */
.app-splash {
  position: fixed;
  inset: 0;
  background: #060810;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  transition: opacity .6s ease, transform .6s ease;
  cursor: pointer;
}
.app-splash.splash-out {
  opacity: 0;
  transform: scale(1.04);
  pointer-events: none;
  display: none;
}
.splash-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 40px 20px;
  text-align: center;
}
.splash-logo-wrap {
  position: relative;
  width: 100px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}
.splash-orb {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0,229,160,.3) 0%, transparent 70%);
  animation: splash-orb-pulse 2s ease-in-out infinite;
}
@keyframes splash-orb-pulse {
  0%, 100% { transform: scale(1); opacity: .7; }
  50%       { transform: scale(1.2); opacity: 1; }
}
.splash-icon {
  font-size: 56px;
  position: relative;
  z-index: 1;
  animation: dr-pop .6s cubic-bezier(.34,1.56,.64,1) .1s both;
}
.splash-name {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 36px;
  color: var(--text1);
  letter-spacing: .02em;
}
.splash-tagline {
  font-size: 14px;
  color: var(--text3);
  margin-top: -6px;
}
.splash-bar-wrap {
  width: 200px;
  height: 3px;
  background: rgba(255,255,255,.08);
  border-radius: 99px;
  overflow: hidden;
  margin-top: 12px;
}
.splash-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  border-radius: 99px;
  transition: width .25s ease;
}
.splash-hint {
  font-size: 11px;
  color: var(--text3);
  margin-top: 4px;
  min-height: 16px;
}

/* ═══════════════════════════════════════════════════════════
   INTERACTIVE TUTORIAL
═══════════════════════════════════════════════════════════ */
#tutorial-overlay {
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: all;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 20px;
}
.tut-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.72);
  backdrop-filter: blur(4px);
}
.tut-card {
  position: relative;
  z-index: 10;
  width: min(360px, 100%);
  max-height: calc(100dvh - 48px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 24px 20px 20px;
  box-shadow: 0 24px 60px rgba(0,0,0,.5);
  animation: dr-pop .3s cubic-bezier(.34,1.56,.64,1) both;
}
.tut-step-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-bottom: 14px;
}
.tut-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,.2);
  transition: all .2s;
}
.tut-dot.active {
  background: var(--accent);
  width: 18px;
  border-radius: 3px;
}
.tut-icon {
  font-size: 40px;
  text-align: center;
  margin-bottom: 10px;
}
.tut-title {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 18px;
  color: var(--text1);
  text-align: center;
  margin-bottom: 8px;
}
.tut-desc {
  font-size: 13px;
  color: var(--text2);
  text-align: center;
  line-height: 1.6;
  margin-bottom: 18px;
}
.tut-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.tut-highlight {
  position: absolute;
  border: 2px solid var(--accent);
  border-radius: 10px;
  box-shadow: 0 0 0 4000px rgba(0,0,0,.55);
  pointer-events: none;
  z-index: 5;
  animation: tut-pulse 1.5s ease-in-out infinite;
}
@keyframes tut-pulse {
  0%, 100% { box-shadow: 0 0 0 4000px rgba(0,0,0,.55), 0 0 0 4px rgba(0,229,160,.3); }
  50%       { box-shadow: 0 0 0 4000px rgba(0,0,0,.55), 0 0 0 8px rgba(0,229,160,.5); }
}
.tut-arrow {
  position: absolute;
  font-size: 22px;
  color: var(--accent);
  z-index: 11;
  transform: translateX(-50%);
  text-shadow: 0 2px 8px rgba(0,0,0,.5);
  animation: tut-bounce .8s ease-in-out infinite alternate;
}
@keyframes tut-bounce {
  from { transform: translateX(-50%) translateY(0); }
  to   { transform: translateX(-50%) translateY(-6px); }
}
@media (max-width: 480px) {
  #tutorial-overlay { padding: 16px 12px; }
  .tut-card {
    width: 100%;
    padding: 18px 16px 16px;
    max-height: calc(100dvh - 32px);
  }
  .tut-icon  { font-size: 32px; margin-bottom: 8px; }
  .tut-title { font-size: 16px; margin-bottom: 6px; }
  .tut-desc  { font-size: 13px; margin-bottom: 12px; line-height: 1.55; }
  .tut-step-dots { margin-bottom: 10px; }
  .tut-actions { gap: 8px; }
  .tut-actions .btn { flex: 1; text-align: center; justify-content: center; }
}

/* ═══════════════════════════════════════════════════════════
   MARKET CRISIS MODAL
═══════════════════════════════════════════════════════════ */
.crisis-modal {
  max-width: 380px;
  text-align: center;
  padding: 28px 20px 24px;
}
.crisis-icon {
  font-size: 52px;
  margin-bottom: 6px;
  animation: dr-pop .5s cubic-bezier(.34,1.56,.64,1) both;
}
.crisis-eyebrow {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.crisis-title {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 22px;
  color: var(--text1);
  margin-bottom: 10px;
}
.crisis-desc {
  font-size: 13px;
  color: var(--text2);
  line-height: 1.6;
  margin-bottom: 16px;
}


/* ═══════════════════════════════════════════════════════════
   FEATURE 11: CRISIS MODAL — Countdown + Summary
═══════════════════════════════════════════════════════════ */
.mc-modal {
  max-width: 380px;
  text-align: center;
  padding: 22px 18px 20px;
  transition: border-color .3s;
}
.mc-modal.mc-warn   { border-color: rgba(240,180,41,.5) !important; }
.mc-modal.mc-urgent {
  border-color: rgba(239,68,68,.6) !important;
  box-shadow: 0 8px 40px rgba(239,68,68,.2), 0 0 0 1px rgba(239,68,68,.15) !important;
}
.mc-alert-bar {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 6px;
  display: inline-block;
  margin-bottom: 10px;
}
.mc-countdown-wrap {
  position: relative;
  width: 72px;
  height: 72px;
  margin: 12px auto 16px;
}
.mc-countdown-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.mc-countdown-val {
  font-family: 'DM Mono', monospace;
  font-size: 20px;
  font-weight: 700;
  color: var(--text1);
  line-height: 1;
}
.mc-countdown-label { font-size: 9px; color: var(--text3); }
.mc-decisions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}
.mc-decision-btn {
  width: 100%;
  padding: 12px 14px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 10px;
  color: var(--text1);
  text-align: left;
  cursor: pointer;
  transition: background .2s, border-color .2s, transform .15s;
  font-size: 13px;
  font-weight: 600;
}
.mc-decision-btn:hover { background: rgba(255,255,255,.07); transform: translateX(3px); }
.mc-decision-btn.choice-positive { border-color: rgba(0,229,160,.25); }
.mc-decision-btn.choice-positive:hover { border-color: rgba(0,229,160,.5); }
.mc-decision-btn.choice-negative { border-color: rgba(239,68,68,.25); }
.mc-decision-btn.choice-negative:hover { border-color: rgba(239,68,68,.4); }

/* Summary */
.mc-summary { text-align: left; }
.mc-sum-header { margin-bottom: 14px; text-align: center; }
.mc-sum-icon { font-size: 36px; margin-bottom: 4px; }
.mc-sum-title { font-family: 'Syne', sans-serif; font-weight: 800; font-size: 18px; color: var(--text1); }
.mc-sum-result {
  font-size: 13px;
  color: var(--text2);
  background: rgba(255,255,255,.04);
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 12px;
  line-height: 1.5;
}
.mc-sum-result.t-success { background: rgba(0,229,160,.08); color: #00e5a0; }
.mc-sum-result.t-danger  { background: rgba(239,68,68,.08);  color: #ef4444; }
.mc-patrimony-delta {
  text-align: center;
  margin-bottom: 12px;
}
.mc-pd-label { font-size: 11px; color: var(--text3); text-transform: uppercase; letter-spacing: .06em; }
.mc-pd-val   { font-family: 'Syne', sans-serif; font-weight: 800; font-size: 26px; }
.mc-alternatives { padding: 12px 14px !important; }
.mc-alts-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 10px;
}
.mc-alt-row {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding: 7px 0;
  border-bottom: 1px solid rgba(255,255,255,.04);
  font-size: 12px;
  color: var(--text2);
  line-height: 1.4;
}
.mc-alt-row:last-child { border-bottom: none; }
.mc-alt-row.mc-alt-chosen { color: var(--text1); font-weight: 600; }
.mc-alt-icon { font-size: 16px; flex-shrink: 0; }
.mc-lesson-box {
  background: rgba(99,102,241,.07);
  border: 1px solid rgba(99,102,241,.2);
  border-radius: 10px;
  padding: 12px 14px;
  margin-top: 10px;
  font-size: 12px;
  color: var(--text2);
  line-height: 1.5;
}

/* ═══════════════════════════════════════════════════════════
   MARKET SHAKE ANIMATION
═══════════════════════════════════════════════════════════ */
.market-shake {
  animation: mkt-shake .6s cubic-bezier(.36,.07,.19,.97) both;
}
@keyframes mkt-shake {
  10%, 90%  { transform: translateX(-2px); }
  20%, 80%  { transform: translateX(4px); }
  30%, 50%, 70% { transform: translateX(-6px); }
  40%, 60%  { transform: translateX(6px); }
  100%      { transform: translateX(0); }
}

/* ═══════════════════════════════════════════════════════════
   NEWS BANNER — Noticias de mercado flotantes
═══════════════════════════════════════════════════════════ */
.news-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 4000;
  padding: 10px 16px;
  font-size: 12px;
  font-weight: 700;
  font-family: 'DM Mono', monospace;
  letter-spacing: .02em;
  text-align: center;
  transition: opacity .5s ease, transform .5s ease;
  opacity: 0;
  transform: translateY(-20px);
  pointer-events: none;
}
.news-banner.news-positive {
  background: linear-gradient(90deg, rgba(0,229,160,.18), rgba(0,229,160,.08));
  color: #00e5a0;
  border-bottom: 1px solid rgba(0,229,160,.25);
}
.news-banner.news-negative {
  background: linear-gradient(90deg, rgba(255,75,92,.18), rgba(255,75,92,.08));
  color: #ff4b5c;
  border-bottom: 1px solid rgba(255,75,92,.25);
}

/* ═══════════════════════════════════════════════════════════
   LIFE EVENT MODAL — Eventos de vida aleatorios
═══════════════════════════════════════════════════════════ */
.le-modal {
  max-width: 380px;
  text-align: center;
  padding: 28px 20px 24px;
}
.le-icon {
  font-size: 52px;
  margin-bottom: 8px;
  animation: dr-pop .4s cubic-bezier(.34,1.56,.64,1) both;
}
.le-type {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.le-title {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 20px;
  color: var(--text1);
  margin-bottom: 8px;
}
.le-desc {
  font-size: 13px;
  color: var(--text2);
  line-height: 1.6;
  margin-bottom: 12px;
}
.le-amount {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 40px;
  margin-bottom: 8px;
  animation: dr-pop .5s cubic-bezier(.34,1.56,.64,1) .1s both;
}
.le-fund-status {
  font-size: 12px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 8px;
  background: rgba(255,255,255,.05);
  margin-bottom: 10px;
  display: inline-block;
}
.le-lesson {
  font-size: 11px;
  color: var(--text3);
  background: rgba(255,255,255,.04);
  border-radius: 10px;
  padding: 10px 12px;
  line-height: 1.5;
  text-align: left;
  border-left: 2px solid var(--accent);
}

/* ═══════════════════════════════════════════════════════════
   PATRIMONY CHART WRAP
═══════════════════════════════════════════════════════════ */
.patr-chart-wrap {
  background: var(--card);
  border-radius: 16px;
  padding: 16px;
  border: 1px solid var(--border);
}

/* ═══════════════════════════════════════════════════════════
   MORTGAGE SYSTEM
═══════════════════════════════════════════════════════════ */
.mort-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 12px;
}
.mort-card.mort-paid {
  opacity: 0.6;
  border-color: var(--accent);
}
.mort-empty {
  text-align: center;
  padding: 24px 16px;
  color: var(--text2);
  font-size: 13px;
}
.mort-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.mort-prop {
  font-weight: 700;
  font-size: 14px;
  color: var(--text1);
}
.mort-type-tag {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 20px;
}
.mort-type-tag.fixed    { background: rgba(0,229,160,.15); color: var(--accent); }
.mort-type-tag.variable { background: rgba(240,180,41,.15); color: #f0b429; }
.mort-big {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 32px;
  color: var(--text1);
  margin: 8px 0 2px;
}
.mort-big span {
  font-size: 14px;
  color: var(--text3);
  font-weight: 400;
}
.mort-rate {
  font-size: 11px;
  color: var(--text3);
  margin-bottom: 6px;
}
.mort-status {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
}
.mort-preview {
  background: rgba(255,255,255,.04);
  border-radius: 12px;
  padding: 14px;
  margin-top: 12px;
}
.mort-preview.mort-warning {
  border: 1px solid rgba(255,75,92,.3);
}
.mort-preview-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text2);
  padding: 4px 0;
  border-bottom: 1px solid rgba(255,255,255,.04);
}
.mort-preview-row.big {
  font-size: 15px;
  font-weight: 700;
  color: var(--text1);
  padding: 8px 0;
}
.mort-warning-msg {
  font-size: 11px;
  color: #f0b429;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(240,180,41,.2);
}
.mort-lesson {
  font-size: 11px;
  color: var(--text3);
  background: rgba(0,229,160,.06);
  border-left: 2px solid var(--accent);
  padding: 10px 12px;
  border-radius: 0 8px 8px 0;
  margin-top: 16px;
  line-height: 1.5;
}

/* Amortization table */
.amort-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}
.amort-table th {
  color: var(--text3);
  font-weight: 600;
  padding: 6px 8px;
  border-bottom: 1px solid var(--border);
  text-align: right;
}
.amort-table th:first-child { text-align: left; }
.amort-table td {
  padding: 5px 8px;
  text-align: right;
  border-bottom: 1px solid rgba(255,255,255,.04);
  color: var(--text2);
}
.amort-table td:first-child { text-align: left; color: var(--text3); }

/* ═══════════════════════════════════════════════════════════
   SCENARIO CHALLENGES
═══════════════════════════════════════════════════════════ */
.scenario-card {
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: all .2s;
}
.scenario-card:hover {
  background: rgba(255,255,255,.07);
  border-color: var(--accent);
  transform: translateY(-1px);
}
.sc-header {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 8px;
}
.sc-icon {
  font-size: 26px;
  flex-shrink: 0;
  line-height: 1.2;
}
.sc-header > div:not(.sc-xp) {
  flex: 1;
  min-width: 0;
}
.sc-header .sc-name {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 14px;
  color: var(--text1);
  word-break: break-word;
  line-height: 1.3;
}
.stock-card .sc-name {
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sc-diff {
  font-size: 10px;
  color: var(--text3);
  margin-top: 2px;
}
.sc-xp {
  flex-shrink: 0;
  align-self: flex-start;
  font-size: 11px;
  font-weight: 800;
  color: var(--accent);
  background: rgba(0,229,160,.1);
  padding: 4px 8px;
  border-radius: 20px;
  white-space: nowrap;
}
.sc-tagline {
  font-size: 12px;
  color: var(--text2);
  line-height: 1.5;
  margin-bottom: 8px;
  word-break: break-word;
}
.sc-obj {
  font-size: 11px;
  color: #f0b429;
  font-weight: 600;
}

/* Scenario active banner */
.scenario-banner {
  position: fixed;
  bottom: 72px;
  left: 0; right: 0;
  background: linear-gradient(135deg, rgba(110,86,255,.9), rgba(0,229,160,.7));
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  z-index: 3000;
  backdrop-filter: blur(8px);
  box-shadow: 0 -4px 20px rgba(0,0,0,.3);
}

/* ═══════════════════════════════════════════════════════════
   MODAL OVERLAY + BOX — usados por modales dinámicos
   (crisis, hipoteca, eventos de vida, escenarios)
═══════════════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 8000;
  padding: 20px;
}
.modal-overlay[style*="flex"] {
  display: flex !important;
}
.modal-box {
  position: relative;
  background: var(--bg2, #0d1420);
  border: 1px solid var(--border2, rgba(255,255,255,.12));
  border-radius: 24px;
  padding: 28px 20px 24px;
  width: 100%;
  max-width: 400px;
  max-height: 88vh;
  overflow-y: auto;
  animation: modalUp .3s cubic-bezier(.34,1.56,.64,1) both;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.1) transparent;
}

/* ═══════════════════════════════════════════════════════════
   RETOS BUTTON — Marco rojo, texto amarillo, rayo
═══════════════════════════════════════════════════════════ */
.retos-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 14px 18px;
  background: rgba(255, 60, 60, 0.08);
  border: 1.5px solid rgba(255, 60, 60, 0.6);
  border-radius: 14px;
  cursor: pointer;
  margin-bottom: 16px;
  text-align: left;
  transition: all .2s;
  color: inherit;
}
.retos-btn:hover {
  background: rgba(255, 60, 60, 0.14);
  border-color: rgba(255, 60, 60, 0.9);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(255, 60, 60, 0.2);
}
.retos-btn:active {
  transform: translateY(0);
}
.retos-icon {
  font-size: 28px;
  flex-shrink: 0;
  animation: retos-zap 1.8s ease-in-out infinite;
}
@keyframes retos-zap {
  0%, 90%, 100% { transform: scale(1) rotate(0deg); opacity: 1; }
  95% { transform: scale(1.3) rotate(-10deg); opacity: .8; }
}
.retos-text-wrap {
  flex: 1;
}
.retos-title {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 15px;
  color: #ffd93d;
  letter-spacing: .01em;
}
.retos-sub {
  font-size: 11px;
  color: rgba(255, 60, 60, 0.8);
  margin-top: 2px;
}
.retos-arrow {
  font-size: 18px;
  color: #ffd93d;
  opacity: 0.7;
}

/* ═══════════════════════════════════════════════════════════
   FIRE CALCULATOR
═══════════════════════════════════════════════════════════ */
.fire-number-banner {
  background: linear-gradient(135deg, rgba(240,180,41,.1), rgba(0,229,160,.08));
  border: 1px solid rgba(240,180,41,.25);
  border-radius: 14px;
  padding: 16px;
  text-align: center;
  margin-bottom: 14px;
}
.fire-nb-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text3);
  margin-bottom: 4px;
}
.fire-nb-val {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 36px;
  color: #f0b429;
  margin-bottom: 4px;
}
.fire-nb-sub {
  font-size: 11px;
  color: var(--text2);
  line-height: 1.4;
}
.fire-result-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}
.fire-stat {
  background: rgba(255,255,255,.04);
  border-radius: 10px;
  padding: 10px 8px;
  text-align: center;
}
.fire-stat-val {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 15px;
  color: var(--text1);
  margin-bottom: 3px;
}
.fire-stat-lab {
  font-size: 9px;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: .05em;
}
.fire-tip {
  font-size: 11px;
  color: var(--accent);
  background: rgba(0,229,160,.07);
  border-radius: 8px;
  padding: 8px 12px;
  margin-top: 6px;
  text-align: center;
  font-weight: 600;
}

/* ═══════════════════════════════════════════════════════════
   WHAT IF SIMULATOR
═══════════════════════════════════════════════════════════ */
.wi-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}
.wi-stat {
  background: rgba(255,255,255,.04);
  border-radius: 10px;
  padding: 10px 12px;
}
.wi-stat.wi-stat-main {
  background: rgba(0,229,160,.06);
  border: 1px solid rgba(0,229,160,.15);
}
.wi-stat-lab {
  font-size: 10px;
  color: var(--text3);
  margin-bottom: 4px;
}
.wi-stat-val {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 18px;
  color: var(--text1);
}
.wi-stat-val.g    { color: var(--accent); }
.wi-stat-val.gold { color: #f0b429; }
.wi-stat-val.muted { color: rgba(150,150,170,.8); }
.wi-diff-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0,229,160,.06);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 14px;
}

/* ═══════════════════════════════════════════════════════════
   STREAMER MODE — oculta todos los valores €
═══════════════════════════════════════════════════════════ */
body.streamer-mode [id*="patr"],
body.streamer-mode [id*="cash"],
body.streamer-mode [id*="xp"],
body.streamer-mode [id*="invest"],
body.streamer-mode [id*="salary"],
body.streamer-mode [id*="balance"],
body.streamer-mode .money-pop,
body.streamer-mode .mort-big,
body.streamer-mode .le-amount,
body.streamer-mode .fire-nb-val,
body.streamer-mode .wi-stat-val {
  filter: blur(8px);
  user-select: none;
  transition: filter .3s;
}
body.streamer-mode [id*="patr"]:hover,
body.streamer-mode [id*="cash"]:hover,
body.streamer-mode .wi-stat-val:hover {
  filter: blur(0);
}
#streamer-btn.streamer-on {
  background: rgba(110,86,255,.2) !important;
  color: #a78bfa !important;
  border-color: rgba(110,86,255,.4) !important;
}

/* ═══════════════════════════════════════════════════════════
   SECRET ACHIEVEMENT PILL (badge especial en pantalla logros)
═══════════════════════════════════════════════════════════ */
.ach-secret-locked {
  opacity: 0.35;
  filter: grayscale(1);
}
.ach-secret-locked .ach-icon::after {
  content: '🔒';
  position: absolute;
  bottom: -4px;
  right: -4px;
  font-size: 12px;
}

/* ═══════════════════════════════════════════════════════════
   SCENARIO HUD — Barra flotante del minijuego activo
   Muestra progreso, countdown y botón de salida en tiempo real
═══════════════════════════════════════════════════════════ */
.scenario-banner {
  position: fixed;
  bottom: 72px;
  left: 0; right: 0;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  background: linear-gradient(135deg, rgba(14,8,30,.97), rgba(20,12,40,.97));
  border-top: 1px solid rgba(110,86,255,.4);
  border-bottom: 1px solid rgba(0,0,0,.3);
  z-index: 3500;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 -6px 30px rgba(110,86,255,.25);
}
.sc-hud-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  max-width: 38%;
}
.sc-hud-icon {
  font-size: 22px;
  flex-shrink: 0;
}
.sc-hud-name {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 12px;
  color: #fff;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sc-hud-obj {
  font-size: 9px;
  color: rgba(255,255,255,.4);
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sc-hud-center {
  flex: 1;
  min-width: 0;
  text-align: center;
}
.sc-hud-pct {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 18px;
  color: #a78bfa;
  line-height: 1;
  margin-bottom: 3px;
}
.sc-hud-bar-wrap {
  height: 5px;
  background: rgba(255,255,255,.1);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 3px;
}
.sc-hud-bar {
  height: 100%;
  background: linear-gradient(90deg, #6e56ff, #a78bfa);
  border-radius: 3px;
  transition: width .6s ease;
  min-width: 2px;
}
.sc-hud-time {
  font-size: 9px;
  color: rgba(255,255,255,.4);
}
.sc-hud-exit {
  background: rgba(255,75,92,.15);
  border: 1px solid rgba(255,75,92,.3);
  color: #ff4b5c;
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
  transition: background .2s;
}
.sc-hud-exit:hover {
  background: rgba(255,75,92,.25);
}

/* Body en modo escenario — frame sutil alrededor de la app */
body.scenario-active #app-root,
body.scenario-active .screens-wrap {
  outline: 2px solid rgba(110,86,255,.35);
  outline-offset: -2px;
}
body.scenario-active .top-nav {
  background: linear-gradient(90deg, rgba(110,86,255,.12), transparent);
  border-bottom-color: rgba(110,86,255,.3);
}
body.scenario-active #bn-home::after {
  content: '⚡';
  position: absolute;
  top: 2px; right: 2px;
  font-size: 8px;
}

/* ═══════════════════════════════════════════════════════════
   SCENARIO CARDS — pantalla de selección mejorada
═══════════════════════════════════════════════════════════ */
.scenario-card:active {
  transform: scale(0.98);
}
.scenario-card.sc-locked { opacity:.55; cursor:not-allowed; }
.scenario-card.sc-locked:hover { transform:none; border-color:var(--border); }
.scenario-card.sc-done { border-color:rgba(0,229,160,.3); }
.sc-done-badge { background:rgba(0,229,160,.15); color:var(--accent); font-size:10px; font-weight:800; padding:3px 8px; border-radius:20px; }
.sc-start-btn { width:100%; margin-top:10px; padding:10px; background:rgba(255,255,255,.06); border:1px solid var(--border); border-radius:10px; color:var(--text1); font-size:13px; font-weight:700; cursor:pointer; transition:all .2s; }
.sc-start-btn:hover { background:rgba(0,229,160,.12); border-color:var(--accent); color:var(--accent); }

/* ═══════════════════════════════════════════════════════════
   SCENARIO BRIEFING MODAL
═══════════════════════════════════════════════════════════ */
.scb-box { max-width:400px; max-height:88vh; overflow-y:auto; }
.scb-top { display:flex; align-items:center; gap:14px; margin-bottom:16px; }
.scb-big-icon { font-size:44px; line-height:1; flex-shrink:0; }
.scb-title { font-family:'Syne',sans-serif; font-weight:800; font-size:20px; color:var(--text1); line-height:1.2; }
.scb-diff  { font-size:12px; color:var(--text3); margin-top:4px; }
.scb-story { font-size:13px; color:var(--text2); line-height:1.6; margin-bottom:18px; padding:12px 14px; background:rgba(255,255,255,.04); border-radius:10px; border-left:3px solid rgba(110,86,255,.5); }
.scb-section-label { font-size:10px; font-weight:700; color:var(--text3); letter-spacing:.08em; font-family:'DM Mono',monospace; margin:16px 0 8px; }
.scb-conditions { background:rgba(255,255,255,.03); border-radius:10px; padding:4px 0; border:1px solid var(--border); overflow:hidden; }
.scb-cond-row { display:flex; align-items:center; gap:10px; padding:9px 14px; font-size:13px; color:var(--text2); border-bottom:1px solid rgba(255,255,255,.04); }
.scb-cond-row:last-child { border-bottom:none; }
.scb-cond-row strong { margin-left:auto; font-family:'DM Mono',monospace; font-size:12px; color:var(--text1); }
.scb-cond-icon { font-size:15px; flex-shrink:0; width:20px; text-align:center; }
.scb-cond-danger strong { color:var(--danger); }
.scb-obj-box { font-size:13px; font-weight:700; color:var(--accent); padding:10px 14px; background:rgba(0,229,160,.07); border:1px solid rgba(0,229,160,.2); border-radius:10px; }
.scb-lesson  { font-size:12px; color:var(--text2); line-height:1.6; padding:10px 14px; background:rgba(255,255,255,.03); border-radius:10px; font-style:italic; }
.scb-reward  { text-align:center; font-size:11px; color:var(--gold); font-family:'DM Mono',monospace; font-weight:700; margin:14px 0 12px; letter-spacing:.04em; }
.scb-start-btn { margin-top:0 !important; background:linear-gradient(135deg,#6e56ff,#a78bfa) !important; border-color:transparent !important; color:#fff !important; font-size:15px !important; padding:13px !important; }
.scb-start-btn:hover { opacity:.9; transform:translateY(-1px); }

@media (max-width: 480px) {
  .scb-box    { max-width:100%; border-radius:20px 20px 0 0; margin:auto 0 0; max-height:90vh; }
  .scb-title  { font-size:18px; }
}

/* ═══════════════════════════════════════════════════════════
   MUSIC WIDGET — botón toggle + slider de volumen inline
═══════════════════════════════════════════════════════════ */
.music-widget {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,.06);
  border-radius: 20px;
  padding: 3px 8px 3px 4px;
  transition: all .2s;
}
.music-toggle-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
  padding: 2px;
  border-radius: 50%;
  transition: transform .15s;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
}
.music-toggle-btn:active { transform: scale(0.85); }
.music-toggle-btn.music-on {
  animation: music-pulse 2s ease-in-out infinite;
}
@keyframes music-pulse {
  0%, 100% { filter: brightness(1); }
  50%       { filter: brightness(1.4) drop-shadow(0 0 4px rgba(0,229,160,.6)); }
}
.music-vol-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
}
.music-vol-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 60px;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent) var(--val, 70%), rgba(255,255,255,.15) var(--val, 70%));
  outline: none;
  cursor: pointer;
}
.music-vol-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  box-shadow: 0 0 4px rgba(0,229,160,.5);
  transition: transform .1s;
}
.music-vol-slider::-webkit-slider-thumb:active { transform: scale(1.3); }
.music-vol-pct {
  font-size: 9px;
  color: var(--text3);
  font-family: 'DM Mono', monospace;
  min-width: 26px;
  text-align: right;
}

/* ═══════════════════════════════════════════════════════════
   SPEED BUTTON — colores dinámicos según velocidad
═══════════════════════════════════════════════════════════ */
#game-speed-btn {
  transition: color .3s, border-color .3s, background .3s;
}

/* ═══════════════════════════════════════════════════════════
   AI COACH BUBBLE — aparece flotante en home
═══════════════════════════════════════════════════════════ */
.coach-bubble {
  position: fixed;
  bottom: 82px;
  left: 12px;
  right: 12px;
  background: linear-gradient(135deg, rgba(14,10,30,.97), rgba(20,14,40,.97));
  border: 1px solid rgba(110,86,255,.4);
  border-radius: 18px;
  padding: 14px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  z-index: 3800;
  backdrop-filter: blur(16px);
  box-shadow: 0 8px 32px rgba(110,86,255,.25);
  transform: translateY(120%) scale(0.95);
  opacity: 0;
  transition: transform .35s cubic-bezier(.34,1.56,.64,1), opacity .3s ease;
  pointer-events: none;
}
.coach-bubble.coach-visible {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: all;
}
.coach-avatar {
  font-size: 28px;
  flex-shrink: 0;
  margin-top: 2px;
  animation: coach-bob 2s ease-in-out infinite;
}
@keyframes coach-bob {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-3px); }
}
.coach-content { flex: 1; min-width: 0; }
.coach-label {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #a78bfa;
  margin-bottom: 4px;
}
.coach-text {
  font-size: 13px;
  color: rgba(255,255,255,.9);
  line-height: 1.55;
  margin-bottom: 8px;
}
.coach-ask-btn {
  background: rgba(110,86,255,.2);
  border: 1px solid rgba(110,86,255,.4);
  color: #a78bfa;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 20px;
  cursor: pointer;
  transition: background .2s;
}
.coach-ask-btn:hover { background: rgba(110,86,255,.35); }
.coach-close {
  background: none;
  border: none;
  color: rgba(255,255,255,.3);
  font-size: 14px;
  cursor: pointer;
  flex-shrink: 0;
  padding: 2px;
  line-height: 1;
}
.coach-close:hover { color: rgba(255,255,255,.7); }
.coach-q-btn {
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.1);
  color: var(--text2);
  font-size: 11px;
  padding: 6px 10px;
  border-radius: 20px;
  cursor: pointer;
  transition: all .15s;
  text-align: left;
}
.coach-q-btn:hover {
  background: rgba(110,86,255,.15);
  border-color: rgba(110,86,255,.4);
  color: #a78bfa;
}

/* Coach CTA button in home */
.coach-cta-btn {
  width: 100%;
  padding: 12px 16px;
  background: rgba(110,86,255,.07);
  border: 1px solid rgba(110,86,255,.3);
  border-radius: 12px;
  color: var(--text2);
  font-size: 13px;
  cursor: pointer;
  text-align: left;
  margin-bottom: 16px;
  transition: all .2s;
}
.coach-cta-btn:hover {
  background: rgba(110,86,255,.14);
  border-color: rgba(110,86,255,.6);
  color: var(--text1);
}

/* ═══════════════════════════════════════════════════════════
   PORTFOLIO DONUT
═══════════════════════════════════════════════════════════ */
.donut-leg-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
  border-bottom: 1px solid rgba(255,255,255,.04);
  font-size: 12px;
}
.donut-leg-row:last-child { border-bottom: none; }
.donut-leg-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.donut-leg-name { flex: 1; color: var(--text2); font-weight: 600; }
.donut-leg-pct  { font-weight: 800; font-size: 11px; min-width: 36px; text-align: right; }
.donut-leg-val  { color: var(--text3); font-size: 11px; min-width: 60px; text-align: right; }

/* ═══════════════════════════════════════════════════════════
   DUEL QUIZ
═══════════════════════════════════════════════════════════ */
.duel-box {
  padding: 0 !important;
  overflow: hidden;
  width: 100%;
  max-width: 420px;
  position: relative;
}
.duel-header {
  background: linear-gradient(135deg, rgba(110,86,255,.15), rgba(0,229,160,.08));
  padding: 16px 20px 12px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.duel-vs {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.duel-player {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.duel-avatar { font-size: 28px; }
.duel-pname  { font-size: 10px; color: var(--text3); }
.duel-pscore {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 28px;
  color: var(--accent);
  line-height: 1;
}
.duel-vstext {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 18px;
  color: rgba(255,255,255,.25);
}
.duel-q-num   { font-size: 10px; color: var(--text3); text-align: center; margin-bottom: 4px; }
.duel-timer-bar {
  height: 4px;
  background: rgba(255,255,255,.1);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 3px;
}
.duel-timer-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  transition: width 1s linear, background .3s;
}
.duel-timer-txt { font-size: 10px; color: var(--text3); text-align: center; }
.duel-question {
  font-size: 15px;
  font-weight: 700;
  color: var(--text1);
  padding: 18px 20px 10px;
  line-height: 1.4;
}
.duel-opts {
  padding: 0 20px 12px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.duel-opt {
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 10px;
  padding: 10px 14px;
  text-align: left;
  color: var(--text1);
  font-size: 13px;
  cursor: pointer;
  transition: all .15s;
}
.duel-opt:hover:not(:disabled) {
  background: rgba(110,86,255,.15);
  border-color: rgba(110,86,255,.5);
}
.duel-opt.duel-correct {
  background: rgba(0,229,160,.15) !important;
  border-color: var(--accent) !important;
  color: var(--accent) !important;
}
.duel-opt.duel-wrong {
  background: rgba(255,75,92,.15) !important;
  border-color: #ff4b5c !important;
  color: #ff4b5c !important;
}
.duel-feedback {
  min-height: 32px;
  padding: 4px 20px 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  font-size: 12px;
}
.fb-correct { color: var(--accent); font-weight: 700; }
.fb-wrong   { color: #ff4b5c; font-weight: 700; }
.fb-answer  { color: var(--text2); }
.fb-bot     { color: var(--text3); margin-left: auto; }

