:root {
  --purple: #7300e6;
  --purple-2: #4d00a8;
  --yellow: #ffbf00;
  --cyan: #12b8ef;
  --ink: #171717;
  --muted: #6b7280;
  --paper: #ffffff;
  --soft: #f7f5fb;
  --line: #e7e3ef;
  --success: #0f9d6e;
  --danger: #d94b4b;
  --shadow: 0 16px 42px rgba(38, 15, 71, .12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(115,0,230,.04), rgba(18,184,239,.02)),
    #fff;
}
button, input, select { font: inherit; }
button { cursor: pointer; }

.app-shell { min-height: 100vh; }
.topbar {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 22px clamp(20px, 5vw, 72px);
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.92);
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(12px);
}
.brand-kicker { font-size: 12px; font-weight: 900; letter-spacing: .08em; color: var(--purple); }
.brand-block h1 { margin: 4px 0 0; font-size: clamp(25px, 3vw, 38px); line-height: 1; }
.brand-block p { margin: 6px 0 0; color: var(--muted); }
.author-credit { margin-top: 10px; display: grid; gap: 2px; }
.author-credit strong { font-size: 11px; letter-spacing: .055em; color: #2d1a3d; }
.author-credit span { font-size: 10px; color: var(--muted); font-weight: 750; letter-spacing: .02em; }
.score-legend { display: grid; grid-template-columns: repeat(2, auto); gap: 8px 14px; align-content: center; font-size: 13px; font-weight: 750; }
.score-legend span { background: var(--soft); border: 1px solid var(--line); border-radius: 999px; padding: 7px 10px; }

main { width: min(1180px, calc(100% - 36px)); margin: 0 auto; padding: 34px 0 70px; }
.screen { display: none; }
.screen.active { display: block; animation: appear .28s ease; }
@keyframes appear { from { opacity: 0; transform: translateY(6px);} to { opacity: 1; transform: translateY(0);} }

.hero-card, .toolbar-card, .round-header, .panel, .winner-card, .ranking-row, .detail-team {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
}
.hero-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 28px;
  padding: clamp(24px, 4vw, 40px);
  overflow: hidden;
  position: relative;
}
.hero-card::after {
  content: "";
  position: absolute;
  right: -60px;
  bottom: -80px;
  width: 260px;
  height: 180px;
  background: linear-gradient(135deg, var(--cyan), var(--purple), var(--yellow));
  transform: rotate(-10deg);
  opacity: .14;
}
.eyebrow { color: var(--purple); font-size: 12px; font-weight: 950; letter-spacing: .09em; }
h2 { margin: 8px 0 10px; font-size: clamp(28px, 4vw, 46px); line-height: 1.06; }
p { line-height: 1.5; }
.hero-card p, .round-header p, .results-hero p { max-width: 800px; color: var(--muted); margin: 0; }
.challenge-badge {
  width: 110px; height: 110px; min-width: 110px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--purple);
  color: #fff;
  font-size: 38px; font-weight: 950; line-height: .8;
  box-shadow: inset 0 -8px 0 rgba(0,0,0,.16);
  z-index: 1;
}
.challenge-badge small { font-size: 15px; }

.toolbar-card {
  margin-top: 20px;
  padding: 18px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.toolbar-card p { margin: 3px 0 0; }
.muted { color: var(--muted); font-size: 14px; }
.stepper { display: inline-flex; gap: 14px; align-items: center; font-size: 24px; font-weight: 900; }
.icon-btn {
  border: 0; border-radius: 14px; width: 46px; height: 46px;
  background: var(--purple); color: white; font-size: 26px; font-weight: 900;
}

.team-setup-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; margin-top: 18px; }
.team-setup-card {
  display: grid; grid-template-columns: 86px 1fr; gap: 16px; align-items: center;
  background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 16px;
}
.mascot-button {
  width: 78px; height: 78px; border-radius: 20px; border: 2px solid transparent;
  font-size: 42px; background: linear-gradient(135deg, #f6edff, #fff2c8);
  display: grid; place-items: center;
}
.mascot-button:hover { border-color: var(--purple); }
.team-setup-card label { display: block; font-size: 12px; color: var(--muted); font-weight: 800; margin-bottom: 6px; }
.text-input, .inline-input, .select-input {
  width: 100%; border: 1px solid #cbc4d7; border-radius: 12px; padding: 11px 12px; background: white; outline: none;
}
.text-input:focus, .inline-input:focus, .select-input:focus { border-color: var(--purple); box-shadow: 0 0 0 3px rgba(115,0,230,.09); }
.team-number { font-size: 12px; color: var(--purple); font-weight: 950; margin-bottom: 6px; }

.footer-actions, .results-actions { display: flex; justify-content: space-between; gap: 14px; margin-top: 22px; }
.btn { border: 0; border-radius: 14px; padding: 13px 18px; font-weight: 900; }
.btn.primary { color: white; background: linear-gradient(135deg, var(--purple), var(--purple-2)); }
.btn.secondary { color: var(--purple); background: #efe4ff; }
.btn.ghost { color: var(--ink); background: #f1eef5; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

.round-header { padding: 24px 28px; display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; }
.round-progress { min-width: 220px; }
.round-progress > span { display: block; text-align: right; font-weight: 900; margin-bottom: 7px; }
.progress-track { height: 9px; border-radius: 999px; background: #eee7f6; overflow: hidden; }
.progress-bar { height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--purple), var(--cyan)); transition: width .25s ease; }

.team-tabs { display: flex; gap: 10px; flex-wrap: wrap; margin: 18px 0; }
.team-tab { border: 1px solid var(--line); background: white; border-radius: 999px; padding: 8px 12px; font-weight: 850; display: flex; align-items: center; gap: 7px; }
.team-tab.active { background: var(--purple); color: white; border-color: var(--purple); }
.team-tab .mini-avatar { font-size: 20px; }

.panel { padding: 26px; margin-top: 14px; }
.panel h3 { margin: 0 0 8px; font-size: 22px; }
.section-note { margin: 0 0 18px; color: var(--muted); }
.guided-sentence {
  font-size: clamp(18px, 2.6vw, 27px);
  line-height: 1.75;
  padding: 18px;
  border: 1px dashed #bba9d0;
  border-radius: 16px;
  background: linear-gradient(180deg, #fcfaff, #fff);
}
.inline-input { display: inline-block; width: auto; min-width: 150px; padding: 7px 10px; margin: 4px 5px; font-size: .75em; font-weight: 800; color: var(--purple-2); }
.generated-preview { margin-top: 14px; padding: 14px 16px; border-radius: 14px; background: #f7f3fb; border-left: 4px solid var(--purple); }
.generated-preview strong { color: var(--purple-2); }

.option-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; margin-top: 16px; }
.option-card {
  border: 1px solid var(--line); border-radius: 16px; padding: 16px; background: white; text-align: left;
  position: relative; transition: .15s ease;
}
.option-card:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(38,15,71,.08); }
.option-card.selected { border: 2px solid var(--purple); background: #faf6ff; }
.option-card h4 { margin: 0 0 6px; font-size: 17px; }
.option-card p { margin: 0; color: var(--muted); font-size: 14px; }
.option-card .meta { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.tag { border-radius: 999px; background: #f1edf5; padding: 5px 8px; font-size: 11px; font-weight: 850; }

.budget-card { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 16px; border-radius: 16px; background: #171717; color: white; margin-bottom: 14px; }
.budget-card .amount { font-size: 27px; font-weight: 950; }
.budget-card .remaining { color: #ffdf71; font-weight: 900; }

.event-banner { padding: 20px; border-radius: 18px; background: linear-gradient(135deg, #fff4cc, #fff); border: 1px solid #f5ce57; }
.event-banner .event-title { font-weight: 950; font-size: 22px; margin-bottom: 6px; }
.event-banner p { margin: 0; }
.event-controls { margin-top: 12px; display: flex; gap: 10px; flex-wrap: wrap; }

.indicator-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.check-card { border: 1px solid var(--line); border-radius: 15px; padding: 14px; background: white; }
.check-card label { display: flex; gap: 10px; align-items: flex-start; font-weight: 800; }
.check-card small { display: block; color: var(--muted); margin-top: 5px; padding-left: 28px; }

.sticky-actions { position: sticky; bottom: 12px; padding: 12px; border-radius: 18px; background: rgba(255,255,255,.92); border: 1px solid var(--line); backdrop-filter: blur(10px); box-shadow: var(--shadow); z-index: 10; }
.center-note { display: grid; place-items: center; color: var(--muted); font-size: 13px; text-align: center; }

.results-hero { text-align: center; max-width: 900px; margin: 0 auto 24px; }
.results-hero p { margin: 0 auto; }
.winner-card { padding: 26px; text-align: center; background: linear-gradient(135deg, #fff8db, #fff); border-color: #f4ca4d; }
.winner-avatar { font-size: 62px; }
.winner-score { font-size: 50px; line-height: 1; font-weight: 1000; color: var(--purple); margin: 8px 0; }
.winner-name { font-size: 26px; font-weight: 950; }
.winner-badge { display: inline-block; margin-top: 8px; border-radius: 999px; padding: 7px 12px; background: #171717; color: white; font-size: 12px; font-weight: 900; }

.ranking-list { display: grid; gap: 11px; margin-top: 18px; }
.ranking-row { display: grid; grid-template-columns: 52px 1fr auto; gap: 14px; align-items: center; padding: 14px 18px; }
.rank-num { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; background: #f3eef8; font-weight: 950; color: var(--purple); }
.rank-team { display: flex; gap: 10px; align-items: center; }
.rank-team .avatar { font-size: 30px; }
.rank-score { font-size: 25px; font-weight: 1000; }
.rank-sub { color: var(--muted); font-size: 13px; margin-top: 3px; }

.detail-panel { margin-top: 18px; display: grid; gap: 14px; }
.hidden { display: none !important; }
.detail-team { padding: 20px; }
.detail-head { display: flex; justify-content: space-between; gap: 15px; align-items: center; margin-bottom: 14px; }
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.metric { border-radius: 14px; background: var(--soft); padding: 12px; text-align: center; }
.metric strong { display: block; font-size: 24px; margin-top: 4px; }
.feedback { margin-top: 12px; padding: 13px 14px; border-radius: 12px; background: #fbf8ff; border-left: 4px solid var(--purple); }

.toast { position: fixed; right: 24px; bottom: 24px; background: #171717; color: white; border-radius: 12px; padding: 12px 16px; opacity: 0; transform: translateY(8px); pointer-events: none; transition: .18s ease; z-index: 100; }
.toast.show { opacity: 1; transform: translateY(0); }

@media (max-width: 820px) {
  .topbar { position: static; }
  .score-legend { display: none; }
  .team-setup-grid, .option-grid { grid-template-columns: 1fr; }
  .indicator-grid { grid-template-columns: 1fr 1fr; }
  .round-header { align-items: flex-start; flex-direction: column; }
  .round-progress { width: 100%; min-width: 0; }
  .round-progress > span { text-align: left; }
  .metrics { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  main { width: min(100% - 20px, 1180px); padding-top: 16px; }
  .topbar { padding: 16px; }
  .hero-card { align-items: flex-start; }
  .challenge-badge { width: 78px; min-width: 78px; height: 78px; font-size: 28px; }
  .toolbar-card { align-items: flex-start; flex-direction: column; }
  .team-setup-card { grid-template-columns: 70px 1fr; }
  .mascot-button { width: 64px; height: 64px; font-size: 36px; }
  .indicator-grid, .metrics { grid-template-columns: 1fr; }
  .footer-actions { flex-wrap: wrap; }
  .footer-actions .btn { flex: 1; }
}

/* ===== V2 GAMIFICATION + IMPACT ===== */
.score-legend { grid-template-columns: repeat(3, auto); }
.mascot-hint { display:block; margin-top:6px; color:var(--muted); font-size:11px; }
.round-mission { display:flex; align-items:center; gap:10px; margin-bottom:18px; padding:10px 12px; border-radius:14px; background:#f8f4ff; }
.round-mission > span { font-size:32px; }
.round-mission strong { display:block; }
.round-mission small { display:block; color:var(--muted); margin-top:2px; }
.inline-input.short { min-width:70px; width:90px; }
.tab-status { width:20px; height:20px; display:grid; place-items:center; border-radius:50%; background:#eee7f6; color:var(--purple); font-size:11px; font-weight:950; }
.team-tab.active .tab-status { background:rgba(255,255,255,.2); color:#fff; }
.team-tab .tab-status.done { background:#dff7eb; color:#08734f; }
.team-tab.active .tab-status.done { background:#fff; color:var(--success); }
.selected-flag { display:inline-block; margin-bottom:9px; padding:4px 8px; border-radius:999px; background:#e9ddff; color:var(--purple-2); font-size:10px; font-weight:950; letter-spacing:.04em; }
.strategy-lock { margin-top:16px; padding:14px 16px; background:linear-gradient(135deg,#f7f0ff,#fff9dc); border:1px solid #eadcf8; border-radius:14px; }

.budget-meter { height:10px; border-radius:999px; background:#eee8f4; overflow:hidden; margin:-4px 0 18px; }
.budget-meter > span { display:block; height:100%; border-radius:inherit; background:linear-gradient(90deg,var(--cyan),var(--purple),var(--yellow)); transition:width .25s ease; }

.decision-impact { margin-top:18px; padding:20px; border-radius:20px; background:linear-gradient(135deg,#fbf8ff,#fffdf2); border:1px solid #e9ddf6; box-shadow:0 10px 28px rgba(58,20,98,.08); }
.impact-copy h3 { margin:5px 0 6px; }
.impact-copy p { margin:0; color:var(--muted); }
.impact-deltas { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:9px; margin-top:16px; }
.impact-chip { border:1px solid var(--line); background:#fff; border-radius:14px; padding:11px; min-width:0; }
.impact-chip > span { font-size:20px; }
.impact-chip small { display:block; margin:5px 0 4px; color:var(--muted); font-size:11px; }
.impact-chip strong { display:block; font-size:14px; word-break:break-word; }

.impact-board { margin-top:16px; padding:20px; border-radius:20px; background:#171717; color:#fff; overflow:hidden; position:relative; }
.impact-board::after { content:""; position:absolute; width:180px; height:180px; border-radius:50%; right:-80px; bottom:-100px; background:linear-gradient(135deg,var(--purple),var(--cyan)); opacity:.28; }
.impact-head { display:flex; justify-content:space-between; align-items:flex-start; gap:18px; margin-bottom:14px; position:relative; z-index:1; }
.impact-head .eyebrow { color:#d6b5ff; }
.impact-head h3 { margin:4px 0 0; color:#fff; }
.game-level { flex:0 0 auto; padding:7px 10px; border-radius:999px; background:#2a2a2a; border:1px solid #444; font-size:11px; font-weight:950; letter-spacing:.04em; }
.business-kpis { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:10px; position:relative; z-index:1; }
.business-kpis > div { padding:12px; border-radius:14px; background:#242424; border:1px solid #353535; }
.business-kpis span { display:block; color:#d8d8d8; font-size:11px; }
.business-kpis strong { display:block; margin:5px 0 3px; font-size:18px; }
.business-kpis small { color:#9ee9c9; font-size:11px; }
.result-kpis { margin-bottom:14px; }
.result-kpis > div { background:#f7f4fa; border:1px solid var(--line); color:var(--ink); }
.result-kpis span { color:var(--muted); }
.result-kpis small { color:var(--success); }

.control-status { margin-top:18px; padding:16px 18px; border-radius:16px; background:#f8f4ff; border-left:5px solid var(--purple); }
.control-status strong { display:block; font-size:20px; margin:4px 0 6px; }
.control-status p { margin:0; color:var(--muted); font-size:13px; }
.check-card.checked { border-color:var(--purple); background:#fbf8ff; box-shadow:inset 0 0 0 1px var(--purple); }

.podium { display:flex; align-items:flex-end; justify-content:center; gap:12px; margin:30px auto 20px; min-height:200px; }
.podium-place { width:min(28%,240px); text-align:center; }
.podium-avatar { font-size:44px; margin-bottom:6px; }
.podium-place strong { display:block; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.podium-place > span { display:block; color:var(--muted); font-size:13px; margin:4px 0 8px; }
.podium-block { display:grid; place-items:center; border-radius:18px 18px 0 0; color:#fff; font-size:32px; font-weight:1000; box-shadow:var(--shadow); }
.place-1 .podium-block { height:120px; background:linear-gradient(180deg,#ffca2c,#e6a400); color:#332400; }
.place-2 .podium-block { height:88px; background:linear-gradient(180deg,#d7dce3,#9ca3af); }
.place-3 .podium-block { height:68px; background:linear-gradient(180deg,#d59665,#a55d2f); }
.place-1 .podium-avatar { font-size:58px; }

.winner-card { position:relative; overflow:hidden; }
.winner-ribbon { position:absolute; top:16px; left:16px; padding:6px 10px; border-radius:999px; background:#171717; color:#fff; font-size:10px; font-weight:950; letter-spacing:.08em; }
.winner-kpis { display:flex; justify-content:center; flex-wrap:wrap; gap:8px; margin:13px 0 7px; }
.winner-kpis span { padding:7px 10px; border-radius:999px; background:#fff6cc; border:1px solid #efd980; font-size:12px; font-weight:850; }

.metrics.five { grid-template-columns:repeat(5,1fr); }
.decision-trace { margin-top:12px; padding:12px 14px; border-radius:12px; background:#f4f1f8; color:#544a61; font-size:13px; }
.rank-reveal { opacity:0; animation:rankReveal .35s ease forwards; }
@keyframes rankReveal { from{opacity:0; transform:translateX(-8px)} to{opacity:1; transform:translateX(0)} }
@keyframes pulseIn { 0%{opacity:0; transform:scale(.985)} 55%{transform:scale(1.008)} 100%{opacity:1; transform:scale(1)} }
.pulse-in { animation:pulseIn .28s ease; }
@keyframes eventShake { 0%,100%{transform:translateX(0)} 30%{transform:translateX(-3px)} 60%{transform:translateX(3px)} }
.event-shake { animation:eventShake .35s ease; }

.confetti-layer { position:fixed; inset:0; pointer-events:none; overflow:hidden; z-index:999; }
.confetti-piece { position:absolute; top:-30px; font-size:16px; color:var(--purple); animation:confettiFall 2.4s linear forwards; }
.confetti-piece:nth-child(3n+1){ color:var(--yellow); }
.confetti-piece:nth-child(3n+2){ color:var(--cyan); }
@keyframes confettiFall { 0%{transform:translateY(-30px) rotate(0deg); opacity:1} 100%{transform:translateY(110vh) rotate(720deg); opacity:.25} }

@media (max-width: 980px) {
  .impact-deltas, .business-kpis { grid-template-columns:repeat(3,1fr); }
  .metrics.five { grid-template-columns:repeat(3,1fr); }
}
@media (max-width: 720px) {
  .impact-deltas, .business-kpis { grid-template-columns:repeat(2,1fr); }
  .podium-place { width:31%; }
  .score-legend { display:none; }
}


/* ===== V3 VISUAL PROJECTIONS + AUTHORSHIP ===== */
.impact-chip { position:relative; overflow:hidden; }
.impact-chip::after { content:""; position:absolute; inset:auto 0 0; height:4px; background:#d7d0df; }
.impact-chip.impact-good::after { background:linear-gradient(90deg,#1fc487,#56d8a8); }
.impact-chip.impact-bad::after { background:linear-gradient(90deg,#ff7b6b,#ffb14a); }
.impact-chip em { display:block; margin-top:6px; font-style:normal; font-size:9px; font-weight:900; letter-spacing:.03em; }
.impact-chip.impact-good em { color:#07855c; }
.impact-chip.impact-bad em { color:#b74435; }

.projection-visual { position:relative; z-index:1; margin-top:16px; padding:16px; border-radius:18px; background:linear-gradient(135deg,#202020,#161616); border:1px solid #343434; }
.projection-title { display:flex; align-items:center; gap:10px; margin-bottom:12px; }
.projection-title > span { font-size:26px; }
.projection-title strong { display:block; color:#fff; font-size:15px; }
.projection-title small { display:block; color:#aaa; margin-top:2px; font-size:11px; }
.projection-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.projection-card { padding:12px; border-radius:14px; background:#242424; border:1px solid #363636; }
.projection-card.good { box-shadow:inset 3px 0 0 #2bc990; }
.projection-card.bad { box-shadow:inset 3px 0 0 #ff8a6e; }
.projection-label { display:flex; justify-content:space-between; gap:12px; align-items:center; margin-bottom:9px; }
.projection-label span { color:#e3e3e3; font-size:11px; font-weight:850; }
.projection-label strong { color:#fff; font-size:15px; }
.compare-row { display:grid; grid-template-columns:40px 1fr 72px; align-items:center; gap:7px; margin:5px 0; }
.compare-row > span { color:#9f9f9f; font-size:9px; font-weight:850; text-transform:uppercase; }
.compare-row > b { color:#d8d8d8; font-size:9px; text-align:right; white-space:nowrap; }
.bar-track { height:8px; border-radius:999px; background:#343434; overflow:hidden; }
.bar-track i { display:block; height:100%; border-radius:inherit; transform-origin:left; animation:growBar .55s ease both; }
.bar-base { background:#707070; }
.bar-now.good { background:linear-gradient(90deg,#1fc487,#52d8ac); }
.bar-now.bad { background:linear-gradient(90deg,#ff7b6b,#ffb14a); }
.projection-message { margin-top:8px; font-size:9px; font-weight:850; color:#bdbdbd; }
.projection-card.good .projection-message { color:#7ce0bb; }
.projection-card.bad .projection-message { color:#ffb29f; }
@keyframes growBar { from{transform:scaleX(0)} to{transform:scaleX(1)} }

.score-bars { display:grid; gap:8px; margin-top:12px; padding:14px; border-radius:15px; background:#fbf9fe; border:1px solid var(--line); }
.score-bar-row { display:grid; grid-template-columns:125px 1fr 66px; gap:10px; align-items:center; }
.score-bar-row > span { font-size:11px; font-weight:850; color:#554b60; }
.score-bar-row > strong { text-align:right; font-size:11px; }
.score-bar-track { height:10px; border-radius:999px; background:#ebe5f0; overflow:hidden; }
.score-bar-track i { display:block; height:100%; border-radius:inherit; background:linear-gradient(90deg,var(--purple),var(--cyan),var(--yellow)); animation:growBar .7s ease both; }

@media (max-width: 760px) {
  .projection-grid { grid-template-columns:1fr; }
  .score-bar-row { grid-template-columns:110px 1fr 60px; }
}

/* ===== V4: NUEVO LOCAL + RESULTADOS PRELIMINARES ===== */
.objective-main-panel {
  background: linear-gradient(135deg, #fbf7ff 0%, #fffdf0 100%);
  border: 1px solid #eadcf8;
}
.fixed-objective {
  margin-top: 12px;
  padding: 18px 20px;
  border-radius: 16px;
  background: #171717;
  color: #fff;
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.35;
  font-weight: 900;
  box-shadow: 0 12px 28px rgba(35, 16, 54, .12);
}

.comparison-impact .impact-chip {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.impact-values {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px;
  padding-top: 7px;
  margin-top: 2px;
  border-top: 1px dashed #e6dfea;
}
.impact-values b {
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.impact-values strong { font-size: 13px; }
.impact-values.now strong { font-size: 16px; color: var(--ink); }

.projection-grid.five-projections {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.preliminary-panel { overflow: hidden; }
.preliminary-intro {
  display: grid;
  grid-template-columns: 1.35fr .9fr;
  gap: 18px;
  align-items: stretch;
  margin-bottom: 18px;
}
.preliminary-intro h3 { margin: 5px 0 7px; font-size: clamp(22px, 2.6vw, 34px); }
.preliminary-intro p { margin: 0; color: var(--muted); }
.base-company {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  padding: 18px;
  border-radius: 18px;
  background: linear-gradient(135deg, #171717, #2b1a3c);
  color: #fff;
}
.base-company span { font-size: 11px; font-weight: 950; letter-spacing: .08em; color: #e3c7ff; }
.base-company strong { line-height: 1.45; }

.provisional-ranking {
  margin: 18px 0 22px;
  padding: 18px;
  border-radius: 18px;
  background: linear-gradient(135deg, #fff8d8, #f7efff);
  border: 1px solid #eadab2;
}
.provisional-list { display: grid; gap: 8px; margin-top: 10px; }
.provisional-row {
  display: grid;
  grid-template-columns: 34px 34px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 12px;
  background: rgba(255,255,255,.86);
  border: 1px solid rgba(90,44,120,.10);
}
.provisional-position {
  width: 26px; height: 26px; display: grid; place-items: center;
  border-radius: 50%; background: var(--purple); color: white; font-weight: 950;
}
.provisional-avatar { font-size: 24px; }
.provisional-row b { color: var(--purple-2); font-size: 17px; }
.provisional-note { margin: 10px 0 0; color: #6a566f; font-size: 12px; font-weight: 750; }

.prelim-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 16px;
}
.prelim-team-card {
  padding: 16px;
  border-radius: 18px;
  border: 1px solid #e8e0ee;
  background: #fff;
  box-shadow: 0 8px 22px rgba(49, 20, 72, .07);
}
.prelim-team-head { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.prelim-team-name { display: flex; align-items: center; gap: 9px; min-width: 0; }
.prelim-team-name > span { font-size: 32px; }
.prelim-team-name strong { display: block; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prelim-team-name small { display: block; color: var(--muted); margin-top: 2px; }
.prelim-score { text-align: right; padding: 8px 10px; border-radius: 12px; background: #f7f0ff; min-width: 88px; }
.prelim-score b { display: block; font-size: 22px; color: var(--purple); }
.prelim-score span { font-size: 10px; color: var(--muted); font-weight: 800; }
.prelim-route { margin: 10px 0; padding: 8px 10px; border-radius: 10px; background: #faf8fc; color: #5f5268; font-size: 11px; }
.prelim-kpis.visual { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 7px; }
.prelim-kpi { min-width: 0; padding: 9px; border-radius: 12px; background: #fafafa; border: 1px solid #ece8ef; }
.prelim-kpi.good { box-shadow: inset 3px 0 0 #1fc487; }
.prelim-kpi.bad { box-shadow: inset 3px 0 0 #ff8a6e; }
.prelim-kpi-title { display: flex; flex-direction: column; gap: 3px; margin-bottom: 6px; }
.prelim-kpi-title span { font-size: 9px; color: #655a6b; font-weight: 850; }
.prelim-kpi-title strong { font-size: 12px; color: #241d29; white-space: nowrap; }
.mini-compare-row { display: grid; grid-template-columns: 31px 1fr; gap: 4px; align-items: center; margin: 3px 0; }
.mini-compare-row small { font-size: 7px; color: #908696; text-transform: uppercase; font-weight: 900; }
.mini-compare-row b { display: none; }
.mini-track { height: 5px; background: #e8e4ea; border-radius: 999px; overflow: hidden; }
.mini-track i { display: block; height: 100%; border-radius: inherit; }
.mini-base { background: #aaa2af; }
.mini-now.good { background: #22bb82; }
.mini-now.bad { background: #ff866e; }
.prelim-kpi em { display: block; margin-top: 5px; font-size: 8px; font-style: normal; font-weight: 900; color: #6f6475; }

@media (max-width: 1100px) {
  .projection-grid.five-projections { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .prelim-kpis.visual { grid-template-columns: repeat(3, minmax(0,1fr)); }
}
@media (max-width: 820px) {
  .preliminary-intro { grid-template-columns: 1fr; }
  .prelim-grid { grid-template-columns: 1fr; }
  .projection-grid.five-projections { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
.strategy-path {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 9px;
  margin-top: 14px;
}
.strategy-path > div {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid #eadff1;
  border-radius: 12px;
  background: rgba(255,255,255,.8);
  font-size: 11px;
  font-weight: 850;
  color: #5a4b63;
}
.strategy-path b {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  border-radius: 50%;
  background: var(--purple);
  color: white;
}
@media (max-width: 720px) {
  .strategy-path { grid-template-columns: repeat(2,minmax(0,1fr)); }
}


/* ===== V5: GRÁFICOS MÁS ESPACIOSOS Y COMPARACIÓN INICIO → RESULTADO ===== */
.spacious-projection {
  margin-top: 22px;
  padding: 24px;
  border-radius: 22px;
}
.spacious-projection .projection-title {
  margin-bottom: 20px;
  align-items: flex-start;
}
.spacious-projection .projection-title > span { font-size: 34px; }
.spacious-projection .projection-title strong { font-size: 20px; line-height: 1.2; }
.spacious-projection .projection-title small { margin-top: 6px; font-size: 13px; line-height: 1.45; max-width: 820px; }

.projection-grid.large-projections {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.projection-grid.large-projections .projection-card {
  padding: 20px;
  border-radius: 18px;
  min-height: 210px;
}
.projection-grid.large-projections .projection-card:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}
.projection-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 15px;
}
.projection-metric-name { display: flex; align-items: center; gap: 9px; min-width: 0; }
.projection-metric-name > span { font-size: 26px; }
.projection-metric-name > strong { color: #fff; font-size: 16px; }
.projection-status {
  flex: 0 0 auto;
  padding: 6px 9px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.projection-status.good { background: rgba(31,196,135,.15); color: #75e0b8; border: 1px solid rgba(31,196,135,.35); }
.projection-status.bad { background: rgba(255,138,110,.13); color: #ffb09d; border: 1px solid rgba(255,138,110,.35); }
.projection-values-big {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  align-items: center;
  margin: 4px 0 18px;
}
.projection-values-big > div {
  padding: 12px 14px;
  border-radius: 14px;
  background: #2c2c2c;
  border: 1px solid #3d3d3d;
}
.projection-values-big > div.now { background: #30263b; border-color: #554165; }
.projection-values-big small { display: block; color: #aaa; font-size: 10px; font-weight: 900; letter-spacing: .08em; }
.projection-values-big strong { display: block; color: #fff; font-size: clamp(20px, 2vw, 28px); margin-top: 3px; }
.projection-values-big .now strong { color: #fff2a8; }
.projection-arrow { color: #d8c1ef; font-size: 24px; font-weight: 1000; }
.compare-row.large {
  grid-template-columns: 58px 1fr 105px;
  gap: 10px;
  margin: 10px 0;
}
.compare-row.large > span { font-size: 10px; }
.compare-row.large > b { font-size: 11px; }
.compare-row.large .bar-track { height: 13px; }
.spacious-projection .projection-message { margin-top: 12px; font-size: 11px; }

/* Resultados preliminares: un equipo por fila, gráficos grandes y legibles */
.prelim-grid { grid-template-columns: 1fr; gap: 20px; }
.prelim-team-card { padding: 22px; }
.prelim-team-name > span { font-size: 40px; }
.prelim-team-name strong { font-size: 19px; }
.prelim-score { min-width: 110px; padding: 10px 13px; }
.prelim-score b { font-size: 26px; }
.prelim-route { margin: 14px 0 16px; padding: 10px 12px; font-size: 13px; }
.prelim-kpis.visual {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.prelim-kpis.visual .prelim-kpi:last-child:nth-child(odd) { grid-column: 1 / -1; }
.prelim-kpi { padding: 16px; border-radius: 15px; }
.prelim-kpi-title {
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.prelim-kpi-title span { font-size: 13px; }
.prelim-kpi-title em { margin: 0; font-size: 10px; }
.prelim-value-pair {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.prelim-value-pair > div {
  padding: 10px 12px;
  border-radius: 12px;
  background: #f3f0f6;
}
.prelim-value-pair > div.now { background: #efe5ff; }
.prelim-value-pair small { display: block; color: #7c7182; font-size: 9px; font-weight: 900; letter-spacing: .07em; }
.prelim-value-pair strong { display: block; margin-top: 2px; font-size: 19px; color: #241d29; }
.prelim-value-pair > span { font-size: 20px; font-weight: 1000; color: var(--purple); }
.mini-compare-row {
  grid-template-columns: 52px 1fr 100px;
  gap: 9px;
  margin: 8px 0;
}
.mini-compare-row small { font-size: 9px; }
.mini-compare-row b { display: block; font-size: 10px; text-align: right; color: #574e5c; white-space: nowrap; }
.mini-track { height: 10px; }

/* Resultado final: más aire entre bloques */
.detail-panel { gap: 22px; }
.detail-team { padding: 26px; }
.result-kpis { grid-template-columns: repeat(5, minmax(0,1fr)); gap: 12px; margin-bottom: 20px; }
.result-kpis > div { padding: 15px; }
.result-kpis strong { font-size: 20px; }
.detail-team .metrics.five { margin-top: 20px; gap: 12px; }
.winner-card .projection-visual { text-align: left; margin-top: 22px; }
.winner-card .projection-title strong { color: #fff; }

@media (max-width: 900px) {
  .projection-grid.large-projections,
  .prelim-kpis.visual { grid-template-columns: 1fr; }
  .projection-grid.large-projections .projection-card:last-child:nth-child(odd),
  .prelim-kpis.visual .prelim-kpi:last-child:nth-child(odd) { grid-column: auto; }
  .result-kpis { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 560px) {
  .spacious-projection { padding: 16px; }
  .projection-values-big { grid-template-columns: 1fr; gap: 8px; }
  .projection-arrow { transform: rotate(90deg); text-align: center; }
  .compare-row.large { grid-template-columns: 48px 1fr 84px; }
  .prelim-value-pair { grid-template-columns: 1fr; gap: 7px; }
  .prelim-value-pair > span { transform: rotate(90deg); text-align: center; }
  .mini-compare-row { grid-template-columns: 46px 1fr 84px; }
  .result-kpis { grid-template-columns: 1fr; }
}
