:root {
  --v3-panel: rgba(14, 18, 39, .94);
  --v3-panel-soft: rgba(18, 23, 49, .82);
  --v3-line: rgba(137, 151, 200, .18);
  --v3-gold-glow: rgba(255, 213, 54, .22);
}

.app-shell { width: min(100%, 1180px); }
.v3-message { margin: 12px 0; padding: 11px 15px; border: 1px solid rgba(105, 235, 169, .28); border-radius: 13px; color: var(--green); background: rgba(105, 235, 169, .07); font-size: 13px; font-weight: 750; }
.v3-message.is-error { border-color: rgba(255, 107, 120, .4); color: #ffbdc3; background: rgba(255, 107, 120, .09); }
.v3-career-shell { isolation: isolate; }
.topbar--game-controls { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; }
.topbar--game-controls > .v3-guide-button { grid-column: 2; }
.topbar--game-controls > .v3-report-actions { display: flex; grid-column: 1; justify-content: flex-start; }
.topbar--game-controls > .v3-primary-actions { display: flex; grid-column: 3; justify-content: flex-end; }
.v3-new-game-button { min-height: 34px; padding: 0 14px; border-color: rgba(255, 228, 94, .34); color: #fff0a2; font-family: var(--font-body); font-size: 10px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.v3-new-game-button:hover, .v3-new-game-button:focus-visible { border-color: rgba(255, 228, 94, .82); color: #fffbe0; background: rgba(255, 228, 94, .16); outline: 0; transform: translateY(-1px); }
.v3-report-button { min-height: 34px; padding: 0 14px; border: 1px solid rgba(255, 107, 120, .52); border-radius: 999px; color: #ffd0d5; background: rgba(255, 107, 120, .09); box-shadow: 0 0 20px rgba(255, 107, 120, .08); cursor: pointer; font-family: var(--font-body); font-size: 10px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; transition: border-color .18s ease, background .18s ease, transform .18s ease; }
.v3-report-button:hover, .v3-report-button:focus-visible { border-color: rgba(255, 107, 120, .9); color: #fff; background: rgba(255, 107, 120, .18); outline: 0; transform: translateY(-1px); }
/* These two V3 cards put the art column on the left; object-position alone
   only crops inside the still-right-hand art container. */
.archetype-card--misterioso .archetype-card__copy,
.archetype-card--tranquilo .archetype-card__copy {
  padding-right: 0;
  padding-left: 42%;
}
.archetype-card--misterioso .archetype-glow,
.archetype-card--tranquilo .archetype-glow {
  right: auto;
  left: -12%;
}
.archetype-card--misterioso .archetype-art,
.archetype-card--tranquilo .archetype-art {
  right: auto;
  left: 0;
  object-position: left bottom;
}
@media (min-width: 1052px) {
  .archetype-card--misterioso .archetype-card__copy,
  .archetype-card--tranquilo .archetype-card__copy {
    box-sizing: border-box;
    width: 42%;
    margin-right: 0;
    margin-left: auto;
    padding: 0;
  }
  .archetype-card--misterioso .archetype-art,
  .archetype-card--tranquilo .archetype-art { width: 55%; }
}
@media (max-width: 800px) {
  .archetype-card--misterioso .archetype-card__copy,
  .archetype-card--tranquilo .archetype-card__copy {
    box-sizing: border-box;
    width: 46%;
    margin-right: 0;
    margin-left: auto;
    padding: 0;
  }
  .archetype-card--misterioso .archetype-art,
  .archetype-card--tranquilo .archetype-art { width: 52%; }
}

/* Character HUD */
.hud.v3-player-hud { position: relative; top: auto; z-index: 5; display: grid; grid-template-columns: minmax(235px, 1.35fr) minmax(150px, .72fr) minmax(150px, .8fr) minmax(110px, .55fr); gap: 0; overflow: hidden; margin-bottom: 14px; padding: 0; border: 1px solid rgb(var(--archetype-rgb) / .34); border-radius: 22px; background: radial-gradient(circle at 3% 0%, rgb(var(--archetype-rgb) / .17), transparent 31%), linear-gradient(120deg, rgba(23, 29, 60, .98), rgba(10, 13, 31, .98)); box-shadow: 0 18px 55px rgba(0, 0, 0, .3), inset 0 1px rgba(255, 255, 255, .04); backdrop-filter: none; }
.v3-player-identity, .v3-aura-display, .v3-career-rank, .v3-pressure { min-width: 0; border-right: 1px solid var(--v3-line); }
.v3-player-identity { display: flex; align-items: center; gap: 14px; padding: 13px 18px 12px 14px; }
.v3-player-avatar { position: relative; flex: none; overflow: hidden; width: 70px; height: 70px; border: 1px solid rgb(var(--archetype-rgb) / .6); border-radius: 19px; background: radial-gradient(circle at 50% 80%, rgb(var(--archetype-rgb) / .3), rgba(5, 7, 18, .85) 70%); box-shadow: 0 0 22px rgb(var(--archetype-rgb) / .18); }
.v3-player-avatar img { width: 100%; height: 100%; object-fit: contain; object-position: center bottom; }
.v3-player-copy { display: grid; min-width: 0; }
.v3-player-copy strong { overflow: hidden; color: #fff; font-family: var(--font-display); font-size: clamp(18px, 2.3vw, 25px); line-height: 1.15; text-overflow: ellipsis; white-space: nowrap; }
.v3-player-copy small { margin-top: 5px; color: #aeb7d6; font-size: 12px; }
.hud-label { color: #858fab; font-size: 9px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.v3-aura-display { --aura-card-1: #17203e; --aura-card-2: #090d22; --aura-card-line: rgba(88, 230, 255, .22); position: relative; isolation: isolate; display: flex; align-items: center; justify-content: center; gap: 8px; overflow: hidden; padding: 13px; color: var(--yellow); background: radial-gradient(circle at 50% 115%, color-mix(in srgb, var(--aura-card-1) 55%, transparent), transparent 56%), linear-gradient(135deg, var(--aura-card-1), var(--aura-card-2)); }
.v3-aura-display::before { position: absolute; z-index: 0; inset: 0; content: ""; opacity: .72; background: linear-gradient(121deg, transparent 0 47%, rgba(255, 218, 97, 0) 47.4% 48.2%, transparent 48.7% 100%), repeating-linear-gradient(136deg, transparent 0 13px, rgba(255, 255, 255, .035) 14px 15px, transparent 16px 29px); }
.v3-aura-display::after { position: absolute; z-index: 0; inset: 1px 0 auto; height: 42%; content: ""; opacity: .6; background: linear-gradient(105deg, rgba(255, 255, 255, .16), transparent 36% 68%, rgba(255, 255, 255, .04)); }
.v3-aura-display.is-prospect { --aura-card-1: #49301c; --aura-card-2: #171025; --aura-card-line: rgba(255, 177, 72, .34); }
.v3-aura-display.is-competitive { --aura-card-1: #143b51; --aura-card-2: #101a38; --aura-card-line: rgba(88, 230, 255, .42); }
.v3-aura-display.is-referent { --aura-card-1: #38255d; --aura-card-2: #121534; --aura-card-line: rgba(189, 118, 255, .46); }
.v3-aura-display.is-elite { --aura-card-1: #5a4112; --aura-card-2: #1a1731; --aura-card-line: rgba(255, 230, 94, .55); }
.v3-aura-display.is-legend { --aura-card-1: #54255e; --aura-card-2: #292057; --aura-card-line: rgba(255, 218, 97, .72); }
.v3-aura-display > span { position: relative; z-index: 1; }
.v3-aura-display > span:last-child { display: grid; justify-items: start; }
.v3-aura-display strong { font-family: var(--font-display); font-size: clamp(25px, 3.3vw, 38px); font-weight: 950; line-height: 1; text-shadow: 0 0 10px rgba(255, 228, 94, .42), 0 0 26px rgba(245, 183, 0, .18); }
.v3-aura-display small { margin-top: 4px; color: #ffe979; font-size: 9px; font-weight: 950; letter-spacing: .17em; text-transform: uppercase; }
.v3-aura-flame { position: relative; display: block; width: 24px; height: 34px; filter: drop-shadow(0 0 5px rgba(255, 170, 20, .9)) drop-shadow(0 0 13px rgba(255, 115, 25, .38)); transform: rotate(2deg); transform-origin: 50% 100%; animation: v3-flame-sway 1.15s ease-in-out infinite alternate; }
.v3-aura-flame::before, .v3-aura-flame::after, .v3-aura-flame i { position: absolute; content: ""; transform-origin: 50% 100%; }
.v3-aura-flame::before { inset: 2px 1px 0; border-radius: 52% 48% 48% 52% / 62% 62% 38% 38%; background: linear-gradient(135deg, #fff59d, #ffb30f 58%, #ff7426); box-shadow: 0 0 17px #ffb30f88; clip-path: polygon(53% 0, 88% 39%, 100% 68%, 79% 100%, 21% 100%, 0 68%, 24% 39%); animation: v3-flame-outer .72s ease-in-out infinite alternate; }
.v3-aura-flame::after { inset: 16px 7px 1px; border-radius: 55% 45% 45% 55%; background: #fffbd1; clip-path: polygon(55% 0, 100% 66%, 76% 100%, 18% 100%, 0 67%); animation: v3-flame-core .58s ease-in-out infinite alternate; }
.v3-aura-flame i { display: none; }
.v3-career-rank, .v3-pressure { display: grid; align-content: center; justify-items: center; gap: 8px; padding: 13px; text-align: center; }
.v3-circuit-badge { display: inline-flex; max-width: 100%; overflow: hidden; padding: 7px 10px; border: 1px solid rgba(88, 230, 255, .34); border-radius: 999px; color: var(--cyan); background: rgba(88, 230, 255, .08); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.v3-circuit-badge.is-international { border-color: rgba(255, 228, 94, .4); color: var(--yellow); background: rgba(255, 228, 94, .08); }
.v3-circuit-badge.is-national { border-color: rgba(154, 116, 255, .4); color: #c7b4ff; background: rgba(154, 116, 255, .1); }
.v3-ranking-trigger { font-size: 10px; }
.v3-hud-projection { max-width: 160px; color: #aeb7d6; font-size: 9px; line-height: 1.35; }
.v3-pressure { border-right: 0; }
.v3-pressure-dots { display: flex; gap: 7px; }
.v3-pressure-dots i { width: 13px; height: 13px; border: 2px solid #58617d; border-radius: 50%; background: rgba(5, 7, 18, .75); }
.v3-pressure-dots i.is-filled { border-color: #b28cff; background: var(--purple); box-shadow: 0 0 12px rgba(154, 116, 255, .64); }
.v3-pressure strong { color: #d8ccff; font-size: 10px; }
.v3-pressure.is-2 { background: radial-gradient(circle, rgba(255, 107, 120, .12), transparent 67%); }
.v3-energy-hud { grid-column: 1 / -1; padding: 10px 16px 14px; border-top: 1px solid var(--v3-line); }
.v3-energy-meta { display: flex; align-items: end; justify-content: space-between; margin-bottom: 7px; }
.v3-energy-meta > span { display: flex; align-items: baseline; gap: 8px; }
.v3-energy-meta b { font-size: 10px; letter-spacing: .11em; text-transform: uppercase; }
.v3-energy-meta small { color: var(--muted); font-size: 10px; }
.v3-energy-meta strong { font-size: 12px; }
.v3-energy-track { display: block; overflow: hidden; width: 100%; height: 8px; border: 1px solid rgba(255, 255, 255, .06); border-radius: 999px; background: rgba(2, 4, 14, .72); }
.v3-energy-track > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #44d99a, var(--cyan)); box-shadow: 0 0 12px rgba(88, 230, 255, .3); transition: width .35s ease; }
.v3-energy-hud.is-medium .v3-energy-track > span { background: linear-gradient(90deg, #f5b700, var(--yellow)); box-shadow: 0 0 12px rgba(255, 228, 94, .3); }
.v3-energy-hud.is-low .v3-energy-track > span { background: linear-gradient(90deg, #ff8a42, #ffbc58); }
.v3-energy-hud.is-critical { color: #ffbdc3; background: rgba(255, 72, 91, .06); }
.v3-energy-hud.is-critical .v3-energy-track { border-color: rgba(255, 107, 120, .3); box-shadow: 0 0 16px rgba(255, 107, 120, .1); }
.v3-energy-hud.is-critical .v3-energy-track > span { background: var(--red); }

/* Current-year timeline */
.v3-year-timeline { position: relative; overflow: hidden; padding: 14px 17px 13px; border-color: var(--v3-line); background: linear-gradient(180deg, rgba(17, 22, 46, .94), rgba(10, 13, 31, .9)); }
.timeline-head { margin-bottom: 13px; color: #8f99b9; font-size: 10px; letter-spacing: .06em; text-transform: uppercase; }
.timeline-head b { color: var(--cyan); }
.v3-month-track { position: relative; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); min-width: 0; gap: 4px; }
.v3-month-track::before { position: absolute; z-index: 0; top: 25px; right: 4%; left: 4%; height: 2px; content: ""; background: rgba(123, 137, 181, .18); }
.v3-career-month { position: relative; z-index: 1; display: grid; justify-items: center; gap: 7px; min-width: 0; min-height: 54px; padding: 4px 1px; border: 0; color: #707b9a; background: none; text-align: center; }
.v3-career-month strong { color: inherit; font-size: 9px; text-transform: uppercase; }
.v3-month-dot { width: 9px; height: 9px; border: 2px solid #3a4566; border-radius: 50%; background: #10152c; }
.v3-master-marker { color: var(--yellow); font-size: 11px; font-style: normal; line-height: 0; text-shadow: 0 0 10px rgba(255, 228, 94, .55); }
.v3-career-month.is-complete { color: #89afaa; }
.v3-career-month.is-complete .v3-month-dot { border-color: rgba(105, 235, 169, .55); background: var(--green); }
.v3-career-month.is-current { color: #fff3a2; }
.v3-career-month.is-current strong { color: var(--yellow); }
.v3-career-month.is-current .v3-month-dot { width: 14px; height: 14px; margin-top: -2px; border-color: #fff3a2; background: var(--yellow); box-shadow: 0 0 0 5px rgba(255, 228, 94, .1), 0 0 16px rgba(255, 228, 94, .48); }
.v3-year-progress { display: block; overflow: hidden; height: 3px; margin-top: 9px; border-radius: 99px; background: rgba(255, 255, 255, .08); }
.v3-year-progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--purple), var(--yellow)); }
.v3-mobile-month { display: none; }

/* Event and choices */
.game-grid { grid-template-columns: minmax(0, 1.75fr) minmax(270px, .65fr); gap: 16px; }
.game-grid .event-card { min-height: 0; height: auto; padding: clamp(25px, 4vw, 42px); border-color: rgba(88, 230, 255, .2); background: radial-gradient(circle at 96% 5%, rgba(88, 230, 255, .1), transparent 32%), linear-gradient(145deg, rgba(20, 25, 53, .98), rgba(10, 13, 30, .98)); }
.v3-event-cover { position: absolute; inset: 0; margin: 0; opacity: .17; pointer-events: none; }
.v3-event-cover::after { position: absolute; inset: 0; content: ""; background: linear-gradient(90deg, rgba(10, 13, 30, .98) 16%, rgba(10, 13, 30, .58), rgba(10, 13, 30, .9)); }
.v3-event-cover img { width: 100%; height: 100%; object-fit: cover; }
.event-card::before { position: absolute; inset: 0 auto 0 0; width: 3px; content: ""; background: var(--event-accent, var(--cyan)); box-shadow: 0 0 18px var(--event-accent, var(--cyan)); }
.event-card::after { top: 20px; right: 14px; color: rgba(255, 255, 255, .025); font-size: clamp(52px, 8vw, 86px); }
.v3-event--social { --event-accent: var(--cyan); }
.v3-event--competition { --event-accent: var(--yellow); }
.v3-event--training { --event-accent: var(--purple); }
.v3-event--recovery { --event-accent: var(--green); }
.game-grid .event-card.v3-event--danger { --event-accent: var(--red); border-color: rgba(255, 107, 120, .4); background: radial-gradient(circle at 90% 10%, rgba(154, 80, 255, .18), transparent 38%), linear-gradient(145deg, rgba(46, 20, 43, .97), rgba(16, 12, 29, .98)); }
.v3-event-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 23px; color: #8691af; font-size: 10px; font-weight: 800; text-transform: uppercase; }
.event-card h2 { max-width: 760px; margin: 0 0 15px; font-size: clamp(29px, 4vw, 45px); }
.event-description { max-width: 760px; color: #c6cce0; font-size: 16px; line-height: 1.58; }
.choices { grid-template-columns: 1fr; gap: 11px; margin-top: 28px; }
.choice-button { grid-template-columns: auto minmax(0, 1fr) auto; min-height: 86px; padding: 14px 15px; border-color: rgba(137, 151, 200, .18); border-radius: 17px; background: linear-gradient(120deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .018)); box-shadow: inset 0 1px rgba(255, 255, 255, .025); }
.v3-choice-icon { display: grid; place-items: center; width: 39px; height: 39px; border: 1px solid rgba(88, 230, 255, .25); border-radius: 12px; color: var(--cyan); background: rgba(88, 230, 255, .07); }
.v3-choice-icon .svg-icon { width: 19px; height: 19px; }
.choice-main strong { display: block; font-size: 14px; }
.choice-sub { margin-top: 4px; }
.v3-choice-meta { display: flex; flex-wrap: wrap; gap: 7px 13px; margin-top: 9px; color: #abb5d0; font-size: 10px; font-weight: 700; }
.v3-choice-chance { color: var(--yellow); }
.risk-chip { align-self: start; margin-top: 3px; font-size: 9px; text-transform: uppercase; }
@media (hover: hover) { .choice-button:hover { border-color: rgba(255, 228, 94, .45); background: linear-gradient(120deg, rgba(255, 228, 94, .07), rgba(154, 116, 255, .035)); box-shadow: 0 8px 24px rgba(0, 0, 0, .16), 0 0 18px rgba(255, 228, 94, .06); transform: translateY(-2px); } }

/* Sidebar */
.game-sidebar { gap: 12px; }
.side-card { padding: 17px; border-color: var(--v3-line); border-radius: 18px; background: linear-gradient(150deg, rgba(19, 24, 50, .94), rgba(11, 14, 32, .95)); box-shadow: 0 14px 36px rgba(0, 0, 0, .22); }
.side-title { margin-bottom: 11px; }
.side-title h3 { color: #f2f4ff; font-size: 13px; letter-spacing: .03em; text-transform: uppercase; }
.side-title > span { display: grid; place-items: center; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 8px; color: var(--cyan); background: rgba(88, 230, 255, .08); font-size: 11px; font-weight: 900; }
.mini-list { gap: 8px; margin-top: 0; }
.mini-list li.v3-opportunity-item { display: grid; gap: 10px; padding: 11px; border: 1px solid rgba(88, 230, 255, .14); border-radius: 13px; background: rgba(88, 230, 255, .035); }
.mini-list li.v3-opportunity-item.is-competitive { border-color: rgba(255, 228, 94, .22); background: rgba(255, 228, 94, .035); }
.v3-opportunity-item strong { font-size: 12px; }
.v3-opportunity-item em { display: inline-flex; margin-left: 7px; padding: 3px 5px; border-radius: 5px; color: #0d1020; background: var(--yellow); font-size: 7px; font-style: normal; font-weight: 950; letter-spacing: .08em; text-transform: uppercase; }
.v3-opportunity-item small { display: block; margin-top: 4px; color: #8791ad; font-size: 10px; line-height: 1.4; }
.v3-inline-actions { display: flex; flex-wrap: wrap; gap: 9px; }
.v3-inline-actions .link-button { margin: 0; }
.v3-energy-warning { margin: 0 0 12px; color: #ffd0d4; font-size: 11px; line-height: 1.45; }
.v3-rest-card { border-color: rgba(255, 178, 75, .25); }
.v3-rest-card .secondary-button { width: 100%; min-height: 42px; }
.game-grid.has-serious-blocker .game-sidebar { opacity: .72; }

/* Próximo Master */
.v3-master-card { position: relative; overflow: hidden; border-color: rgba(154, 116, 255, .4); background: radial-gradient(circle at 92% 0%, rgba(88, 230, 255, .13), transparent 33%), radial-gradient(circle at 0 100%, rgba(154, 116, 255, .18), transparent 43%), linear-gradient(145deg, #191b43, #090b20 72%); box-shadow: 0 16px 42px rgba(0, 0, 0, .3), 0 0 25px rgba(154, 116, 255, .11), inset 0 1px rgba(255, 255, 255, .06); }
.v3-master-card::before { position: absolute; top: -74px; right: -55px; width: 170px; height: 170px; border: 1px solid rgba(255, 228, 94, .18); border-radius: 50%; content: ""; box-shadow: 0 0 48px rgba(255, 228, 94, .09); }
.v3-master-card.is-active { border-color: rgba(255, 228, 94, .55); box-shadow: 0 16px 44px rgba(0, 0, 0, .34), 0 0 30px rgba(255, 228, 94, .14), 0 0 38px rgba(88, 230, 255, .1); }
.v3-master-card__glow { position: absolute; inset: auto -20% -58% 20%; height: 120px; border-radius: 50%; background: rgba(88, 230, 255, .11); filter: blur(26px); pointer-events: none; }
.v3-master-card__header { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.v3-master-kicker { color: #d7ccff; font-size: 10px; font-weight: 950; letter-spacing: .15em; text-transform: uppercase; }
.v3-master-nav { position: relative; z-index: 2; width: 28px; height: 28px; border: 1px solid rgba(88, 230, 255, .35); border-radius: 8px; color: var(--cyan); background: rgba(6, 11, 33, .65); font-weight: 950; cursor: pointer; }
.v3-master-nav:hover { border-color: var(--yellow); color: var(--yellow); box-shadow: 0 0 12px rgba(255, 228, 94, .22); }
.v3-master-focus { position: relative; z-index: 1; width: 100%; margin-top: 12px; font-size: 11px; }
.v3-master-star { display: grid; place-items: center; width: 26px; height: 26px; border: 1px solid rgba(255, 228, 94, .38); border-radius: 9px; color: var(--yellow); background: rgba(255, 228, 94, .09); font-size: 14px; text-shadow: 0 0 14px rgba(255, 228, 94, .6); }
.v3-master-card h3 { position: relative; z-index: 1; margin: 12px 0 4px; color: #fff5b4; font-family: var(--font-display); font-size: 23px; line-height: 1.05; text-shadow: 0 0 18px rgba(255, 228, 94, .22); }
.v3-master-date { position: relative; z-index: 1; margin: 0; color: #aeb9de; font-size: 11px; font-weight: 750; }
.v3-master-date span { padding-inline: 3px; color: var(--cyan); }
.v3-master-statuses { position: relative; z-index: 1; display: grid; gap: 7px; margin-top: 15px; }
.v3-master-status { display: flex; align-items: center; gap: 7px; min-width: 0; padding: 7px 8px; border: 1px solid rgba(137, 151, 200, .2); border-radius: 9px; color: #c4cce5; background: rgba(4, 7, 23, .38); font-size: 10px; font-weight: 850; letter-spacing: .025em; }
.v3-master-status i { flex: none; width: 7px; height: 7px; border-radius: 50%; background: #7c86a6; box-shadow: 0 0 8px currentColor; }
.v3-master-status.is-positive, .v3-master-status.is-confirmed { border-color: rgba(105, 235, 169, .32); color: #9af0c3; background: rgba(105, 235, 169, .08); }
.v3-master-status.is-positive i, .v3-master-status.is-confirmed i { background: #69eba9; }
.v3-master-status.is-negative, .v3-master-status.is-outside { border-color: rgba(255, 107, 120, .32); color: #ffb5bc; background: rgba(255, 107, 120, .075); }
.v3-master-status.is-negative i, .v3-master-status.is-outside i { background: #ff6b78; }
.v3-master-status.is-active { border-color: rgba(88, 230, 255, .32); color: #9eeeff; background: rgba(88, 230, 255, .075); }
.v3-master-status.is-active i { background: var(--cyan); }
.v3-master-status.is-elite { border-color: rgba(255, 228, 94, .38); color: #fff0a4; background: rgba(255, 228, 94, .08); }
.v3-master-status.is-elite i { background: var(--yellow); }
.v3-master-status.is-neutral { color: #bec7e0; }

/* Batalla V2 portada al Grand Master: selector visual sobre lifecycle V3. */
.v3-grand-selector { overflow: hidden; border-color: rgba(255, 228, 94, .5); background: radial-gradient(circle at 50% 0, rgba(255, 228, 94, .13), transparent 36%), linear-gradient(145deg, #171936, #090b1d 72%); }
.v3-grand-versus { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 16px; align-items: center; margin: 22px 0 8px; }
.v3-grand-versus > div { display: grid; gap: 4px; min-width: 0; }
.v3-grand-versus > div:last-child { text-align: right; }
.v3-grand-versus small { color: #8f9abb; font-size: 10px; font-weight: 900; letter-spacing: .14em; }
.v3-grand-versus strong { overflow: hidden; color: #fff; font-family: var(--font-display); font-size: clamp(16px, 2vw, 23px); text-overflow: ellipsis; white-space: nowrap; }
.v3-grand-versus > b { color: var(--yellow); font-family: var(--font-display); font-size: clamp(25px, 4vw, 40px); text-shadow: 0 0 24px rgba(255, 228, 94, .35); }
.v3-grand-round { margin: 0 0 24px; color: var(--cyan); font-size: 11px; font-weight: 950; letter-spacing: .12em; text-align: center; }
.v3-grand-game-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 20px 0; }
.v3-grand-game {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  min-height: 154px;
  padding: 18px;
  text-align: left;
  background: linear-gradient(145deg, rgba(35, 40, 78, .95), rgba(10, 13, 34, .96));
}
.v3-grand-game .choice-main { display: block; width: 100%; min-width: 0; }
.v3-grand-game .choice-main b { display: flex; align-items: center; gap: 8px; min-width: 0; }
.v3-grand-game .choice-main b .svg-icon { flex: none; margin: 0; }
.v3-grand-game .choice-sub { min-height: 32px; }
.v3-grand-game .choice-goal { margin-top: 10px; }
.v3-grand-game .risk-chip { align-self: flex-start; margin: 0; grid-column: auto; }
.v3-grand-game:not(:disabled):hover { border-color: var(--yellow); box-shadow: 0 0 24px rgba(255, 228, 94, .16); transform: translateY(-2px); }
.v3-grand-game.is-locked { cursor: not-allowed; opacity: .5; filter: saturate(.55); }
.v3-grand-game .choice-goal { color: var(--yellow); }

/* Bracket Master derivado del roster y de resultados reales. */
.v3-master-tournament { overflow: hidden; padding: clamp(20px, 3vw, 34px); border-color: rgba(255, 228, 94, .46); background: radial-gradient(circle at 72% 0, rgba(154, 116, 255, .2), transparent 34%), linear-gradient(150deg, #161936, #080a1a 74%); box-shadow: 0 24px 70px rgba(0, 0, 0, .42), 0 0 34px rgba(255, 228, 94, .1); }
.v3-master-tournament > header { margin-bottom: 18px; text-align: center; }
.v3-master-tournament > header h2 { margin: 12px 0 8px; font-size: clamp(24px, 4vw, 39px); }
.v3-master-tournament > header p { color: #b9c2dc; }
.v3-master-tournament > header strong { color: var(--yellow); }
.v3-bracket-scroll { max-width: 100%; padding: 12px 2px 22px; }
.v3-bracket { --bracket-gap: clamp(8px, 1.7vw, 24px); display: grid; grid-template-columns: 1.35fr 1.18fr 1fr 1fr .95fr; gap: var(--bracket-gap); align-items: stretch; width: 100%; min-width: 0; }
.v3-grand-master-bracket { margin-bottom: 16px; }
.v3-grand-master-bracket .v3-bracket { grid-template-columns: 1.25fr 1fr .9fr; max-width: 920px; margin: 0 auto; }
.v3-grand-master-bracket .v3-bracket-column > div { min-height: 150px; }
.v3-bracket-column { display: grid; grid-template-rows: auto 1fr; min-width: 0; }
.v3-bracket-column > h3 { margin: 0 0 13px; color: #9eeeff; font-size: 10px; letter-spacing: .12em; text-align: center; }
.v3-bracket-column > div { display: flex; flex-direction: column; min-height: 150px; justify-content: space-around; gap: 8px; }
.v3-bracket-column.is-semifinal > h3, .v3-bracket-column.is-final > h3, .v3-bracket-column.is-champion > h3 { color: #fff0a4; }
.v3-bracket-match { position: relative; display: grid; overflow: visible; border: 1px solid rgba(137, 151, 200, .22); border-radius: 11px; background: rgba(5, 8, 25, .78); box-shadow: 0 10px 24px rgba(0, 0, 0, .24); }
.v3-bracket-match::after { position: absolute; z-index: 2; top: 50%; left: calc(100% + 3px); width: var(--bracket-gap); content: "→"; color: #74e8ff; font-size: clamp(13px, 1.5vw, 19px); font-weight: 900; line-height: 1; text-align: center; text-shadow: 0 0 10px rgba(88, 230, 255, .55); transform: translateY(-50%); }
.v3-bracket-match:nth-child(odd)::before,
.v3-bracket-column.is-champion .v3-champion-card::before { display: none; }
.v3-bracket-entrant { position: relative; display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; gap: 4px; align-items: center; min-height: 29px; padding: 5px 6px; color: #aeb7d1; font-size: clamp(8px, .8vw, 10px); }
.v3-bracket-entrant + .v3-bracket-entrant { border-top: 1px solid rgba(137, 151, 200, .17); }
.v3-bracket-entrant i { color: #7783a5; font-style: normal; }
.v3-bracket-entrant b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v3-bracket-entrant em { color: var(--yellow); font-size: 8px; font-style: normal; font-weight: 950; }
.v3-bracket-entrant.is-player { color: #fff1a2; background: rgba(255, 228, 94, .08); }
.v3-bracket-entrant.is-winner { color: #9af0c3; text-shadow: 0 0 10px rgba(105, 235, 169, .28); }
.v3-bracket-entrant.is-winner::before { display: none; }
.v3-bracket-entrant.is-pending { opacity: .45; }
.v3-bracket-column.is-semifinal .v3-bracket-match { min-height: 86px; border-color: rgba(255, 228, 94, .32); box-shadow: 0 0 28px rgba(154, 116, 255, .13); }
.v3-bracket-column.is-semifinal .v3-bracket-entrant { min-height: 40px; font-size: clamp(9px, .9vw, 11px); }
.v3-bracket-column.is-final .v3-bracket-match { min-height: 108px; border-color: rgba(255, 228, 94, .52); background: radial-gradient(circle at 50% 50%, rgba(255, 228, 94, .1), transparent 70%), rgba(8, 10, 28, .9); box-shadow: 0 0 38px rgba(255, 228, 94, .13); }
.v3-bracket-column.is-final .v3-bracket-entrant { min-height: 51px; font-size: clamp(10px, 1vw, 12px); }
.v3-champion-card { position: relative; display: grid; place-items: center; align-self: center; min-height: 132px; padding: 14px 8px; border: 1px solid rgba(255, 228, 94, .55); border-radius: 16px; text-align: center; background: radial-gradient(circle, rgba(255, 228, 94, .2), transparent 68%), #10132b; box-shadow: 0 0 46px rgba(255, 228, 94, .16); }
.v3-champion-card > span { color: var(--yellow); font-size: 32px; text-shadow: 0 0 22px rgba(255, 228, 94, .6); }
.v3-champion-card strong { overflow-wrap: anywhere; color: #fff4ad; font-family: var(--font-display); font-size: clamp(12px, 1.25vw, 18px); }
.v3-champion-card small { color: #c7cfe5; }
.v3-champion-card.is-player { box-shadow: 0 0 55px rgba(255, 228, 94, .28), inset 0 0 30px rgba(88, 230, 255, .08); }
.v3-bracket-cta { display: block; margin: 4px auto 0; }
.v3-master-champion { position: relative; overflow: hidden; max-width: 820px; margin: 32px auto; padding: clamp(34px, 7vw, 72px); border-color: rgba(255, 228, 94, .62); text-align: center; background: radial-gradient(circle at 50% 22%, rgba(255, 228, 94, .24), transparent 38%), radial-gradient(circle at 20% 100%, rgba(154, 116, 255, .2), transparent 42%), #101329; box-shadow: 0 30px 90px rgba(0, 0, 0, .52), 0 0 55px rgba(255, 228, 94, .18); }
.v3-master-trophy { margin: 24px 0 8px; color: var(--yellow); font-size: 76px; line-height: 1; text-shadow: 0 0 32px rgba(255, 228, 94, .7); }
.v3-master-champion h2 { margin: 10px 0; color: #fff3a7; font-size: clamp(30px, 6vw, 58px); }
.v3-master-champion > strong { color: #fff; font-family: var(--font-display); font-size: clamp(18px, 3vw, 28px); }
.v3-master-champion > p { color: #b9c2dc; }
.v3-master-journey { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 24px 0; }
.v3-master-journey span { padding: 8px 11px; border: 1px solid rgba(105, 235, 169, .35); border-radius: 999px; color: #9af0c3; background: rgba(105, 235, 169, .08); font-size: 11px; font-weight: 900; }
@keyframes v3-bracket-path { from { transform: scaleX(0); transform-origin: left; } to { transform: scaleX(1); transform-origin: left; } }
@media (max-width: 700px) {
  .v3-master-tournament { padding: 20px 14px; }
  .v3-bracket-scroll { padding: 8px 0 18px; }
  .v3-bracket { grid-template-columns: 1fr; gap: 24px; }
  .v3-bracket-column > h3 { margin-bottom: 10px; }
  .v3-bracket-column > h3::after { display: block; margin-top: 5px; color: #7783a5; content: "↓"; font-size: 14px; line-height: 1; }
  .v3-bracket-column.is-champion > h3::after { display: none; }
  .v3-bracket-column > div { display: grid; min-height: 0; align-content: start; gap: 8px; }
  .v3-bracket-column.is-round-of-16 > div,
  .v3-bracket-column.is-quarterfinal > div,
  .v3-bracket-column.is-semifinal > div { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .v3-bracket-column.is-final > div { grid-template-columns: 1fr; }
  .v3-bracket-match::after { top: auto; bottom: -18px; left: 50%; width: auto; content: "↓"; color: #74e8ff; font-size: 17px; transform: translateX(-50%); }
  .v3-bracket-match:nth-child(odd)::before,
  .v3-bracket-column.is-champion .v3-champion-card::before { display: none; }
  .v3-bracket-entrant { min-height: 28px; padding: 5px; font-size: 9px; }
  .v3-bracket-column.is-semifinal .v3-bracket-match,
  .v3-bracket-column.is-final .v3-bracket-match { min-height: 0; }
  .v3-bracket-column.is-semifinal .v3-bracket-entrant,
  .v3-bracket-column.is-final .v3-bracket-entrant { min-height: 32px; font-size: 10px; }
  .v3-champion-card { min-height: 118px; }
}
@media (max-width: 420px) {
  .v3-bracket-column.is-round-of-16 > div,
  .v3-bracket-column.is-quarterfinal > div,
  .v3-bracket-column.is-semifinal > div { grid-template-columns: 1fr; }
}
@media (max-width: 720px) { .v3-grand-game-grid { grid-template-columns: 1fr; } .v3-grand-versus { gap: 8px; } }
@media (prefers-reduced-motion: reduce) { .v3-bracket-entrant.is-winner::before { animation: none; } }

/* Opportunity modal */
.v3-opportunity-backdrop { position: fixed; z-index: 80; inset: 0; display: grid; place-items: center; padding: 18px; background: rgba(3, 5, 15, .76); animation: v3-backdrop-in .18s ease-out both; backdrop-filter: blur(7px); }
.v3-opportunity-modal { position: relative; overflow: hidden; width: min(100%, 520px); padding: clamp(26px, 5vw, 38px); border-color: rgba(88, 230, 255, .42); background: radial-gradient(circle at 100% 0%, rgba(88, 230, 255, .14), transparent 40%), linear-gradient(145deg, #171d3c, #0a0d20); box-shadow: 0 28px 90px rgba(0, 0, 0, .58), 0 0 32px rgba(88, 230, 255, .1); animation: v3-modal-in .24s cubic-bezier(.2, .75, .3, 1) both; }
.v3-opportunity-modal.is-important { border-color: rgba(255, 228, 94, .48); background: radial-gradient(circle at 100% 0%, rgba(255, 228, 94, .14), transparent 42%), linear-gradient(145deg, #1e2140, #0b0d20); box-shadow: 0 28px 90px rgba(0, 0, 0, .58), 0 0 38px rgba(255, 213, 54, .13); }
.v3-opportunity-modal.is-important .league-chip { color: var(--yellow); border-color: rgba(255, 228, 94, .35); background: rgba(255, 228, 94, .08); }
.v3-opportunity-modal h2 { margin: 20px 0 13px; font-size: clamp(27px, 5vw, 39px); }
.v3-bug-report-modal { width: min(100%, 590px); max-height: min(720px, calc(100vh - 36px)); overflow-y: auto; }
.v3-bug-report-modal .event-description { margin: 0 0 24px; color: #d0d7eb; line-height: 1.55; }
.v3-bug-report-fields { display: grid; gap: 9px; }
.v3-bug-report-fields .v3-form-label { margin-top: 8px; color: #f0f3ff; font-size: 12px; font-weight: 850; }
.v3-bug-report-fields .v3-form-label:first-child { margin-top: 0; }
.v3-bug-report-fields .v3-form-label span { color: #99a4c2; font-weight: 650; }
.v3-bug-report-fields select, .v3-bug-report-fields textarea { box-sizing: border-box; width: 100%; border: 1px solid rgba(151, 165, 208, .36); border-radius: 10px; color: var(--text); background: rgba(4, 6, 15, .62); font: inherit; }
.v3-bug-report-fields select { min-height: 44px; padding: 0 12px; }
.v3-bug-report-fields textarea { min-height: 104px; max-height: 180px; padding: 11px 12px; line-height: 1.45; resize: vertical; }
.v3-bug-report-fields select:focus, .v3-bug-report-fields textarea:focus { border-color: rgba(255, 107, 120, .85); box-shadow: 0 0 0 3px rgba(255, 107, 120, .13); outline: 0; }
.v3-bug-report-modal .v3-inline-actions { margin-top: 26px; }
.v3-ranking-modal { width: min(100%, 570px); }
.v3-ranking-projection { margin: 0 0 15px; color: #c9d0e7; line-height: 1.5; }
.v3-ranking-list { display: grid; gap: 5px; margin: 0 0 20px; padding: 0; list-style: none; }
.v3-ranking-list li { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 9px 10px; border: 1px solid rgba(137, 151, 200, .16); border-radius: 10px; color: #c9d0e7; background: rgba(4, 7, 21, .38); font-size: 13px; }
.v3-ranking-list li.is-player { border-color: rgba(255, 228, 94, .5); color: #fff1a2; background: rgba(255, 228, 94, .1); }
.v3-ranking-list span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v3-modal-spark { position: absolute; top: 22px; right: 24px; color: var(--yellow); font-size: 26px; text-shadow: 0 0 18px rgba(255, 228, 94, .55); }

/* Guía del juego */
.v3-guide-entry { display: flex; justify-content: center; margin: 1px 0 12px; }
.v3-guide-button { min-height: 34px; padding: 0 14px; border: 1px solid rgba(88, 230, 255, .3); border-radius: 999px; color: #aef0ff; background: rgba(88, 230, 255, .055); box-shadow: 0 0 20px rgba(88, 230, 255, .06); cursor: pointer; font-family: var(--font-body); font-size: 10px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; transition: border-color .18s ease, background .18s ease, transform .18s ease; }
.v3-guide-button:hover, .v3-guide-button:focus-visible { border-color: rgba(88, 230, 255, .72); color: #e1faff; background: rgba(88, 230, 255, .14); outline: 0; transform: translateY(-1px); }
.v3-guide-modal { width: min(100%, 870px); max-height: min(820px, calc(100vh - 36px)); padding: 0; border-color: rgba(88, 230, 255, .45); background: radial-gradient(circle at 100% 0%, rgba(88, 230, 255, .14), transparent 35%), radial-gradient(circle at 0 100%, rgba(154, 116, 255, .15), transparent 40%), linear-gradient(145deg, #171d3c, #090b1e); }
.v3-guide-modal__header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: clamp(24px, 4vw, 38px) clamp(24px, 5vw, 48px) 20px; border-bottom: 1px solid var(--v3-line); }
.v3-guide-modal h2 { margin: 14px 0 7px; font-size: clamp(30px, 5vw, 46px); }
.v3-guide-modal__header p { margin: 0; color: #b8c2de; font-size: 14px; }
.v3-guide-close { display: grid; flex: none; place-items: center; width: 36px; height: 36px; border: 1px solid rgba(137, 151, 200, .28); border-radius: 50%; color: #e8edff; background: rgba(255, 255, 255, .045); cursor: pointer; font-size: 25px; line-height: 1; }
.v3-guide-close:hover, .v3-guide-close:focus-visible { border-color: rgba(255, 228, 94, .55); color: var(--yellow); outline: 0; }
.v3-guide-scroll { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; max-height: min(500px, calc(100vh - 270px)); overflow: auto; padding: 22px clamp(24px, 5vw, 48px); overscroll-behavior: contain; }
.v3-guide-section { padding: 15px; border: 1px solid rgba(137, 151, 200, .16); border-radius: 14px; background: rgba(3, 6, 20, .32); }
.v3-guide-section h3 { margin: 0 0 7px; color: #abf1ff; font-size: 13px; }
.v3-guide-section p { margin: 0; color: #c3cbe1; font-size: 12px; line-height: 1.55; }
.v3-guide-modal__footer { display: flex; justify-content: flex-end; padding: 16px clamp(24px, 5vw, 48px) clamp(24px, 4vw, 30px); border-top: 1px solid var(--v3-line); }
body.v3-modal-open { overflow: hidden; }
.v3-master-year-modal { width: min(100%, 700px); }
.v3-master-year-list { display: grid; gap: 9px; margin: 22px 0; }
.v3-master-year-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; padding: 12px; border: 1px solid rgba(154, 116, 255, .28); border-radius: 12px; background: rgba(154, 116, 255, .055); }
.v3-master-year-row b { color: #fff0a2; font-size: 13px; text-transform: uppercase; }
.v3-master-year-row > span { color: var(--cyan); font-size: 11px; font-weight: 850; text-transform: uppercase; }
.v3-master-year-row small { grid-column: 1 / -1; color: #c3cbe1; font-size: 11px; line-height: 1.5; }
.v3-master-year-row em { display: inline-block; padding: 2px 5px; border-radius: 5px; font-size: 8px; font-style: normal; font-weight: 950; letter-spacing: .08em; }
.v3-master-year-row em.is-yes { color: #9af0c3; background: rgba(105, 235, 169, .12); }
.v3-master-year-row em.is-no { color: #ffb5bc; background: rgba(255, 107, 120, .1); }

/* Career ending */
.v3-endgame-screen { display: grid; place-items: center; min-height: min(760px, calc(100vh - 80px)); padding: 28px 0; }
.v3-endgame-card { position: relative; overflow: hidden; width: min(100%, 920px); padding: clamp(26px, 5vw, 56px); border-color: rgba(255, 228, 94, .45); background: radial-gradient(circle at 50% 0%, rgba(255, 228, 94, .16), transparent 34%), radial-gradient(circle at 0 100%, rgba(154, 116, 255, .18), transparent 45%), #10142b; box-shadow: 0 30px 90px rgba(0, 0, 0, .5), 0 0 45px rgba(255, 228, 94, .1); }
.v3-endgame-card::before { position: absolute; top: -58px; right: -14px; color: rgba(255, 255, 255, .035); content: "AURA"; font-family: var(--font-display); font-size: clamp(100px, 20vw, 220px); font-weight: 900; pointer-events: none; }
.v3-endgame-hero { position: relative; text-align: center; }
.v3-endgame-hero > p { margin: 18px 0 0; color: #aab5d1; font-size: 13px; }
.v3-endgame-hero h1 { margin: 3px 0 4px; color: #fff5b4; font-size: clamp(38px, 7vw, 70px); line-height: 1; text-shadow: 0 0 28px rgba(255, 228, 94, .24); }
.v3-endgame-hero > strong { color: var(--cyan); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; }
.v3-endgame-primary { position: relative; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin: 34px 0 16px; }
.v3-end-stat { min-width: 0; padding: 14px 12px; border: 1px solid var(--v3-line); border-radius: 13px; background: rgba(4, 7, 21, .38); }
.v3-end-stat span { display: block; color: #8f9ab9; font-size: 9px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.v3-end-stat strong { display: block; overflow-wrap: anywhere; margin-top: 7px; color: #f1f4ff; font-family: var(--font-display); font-size: clamp(15px, 2vw, 22px); line-height: 1.05; }
.v3-end-stat.is-aura { border-color: rgba(255, 228, 94, .48); background: rgba(255, 228, 94, .09); }
.v3-end-stat.is-aura strong { color: var(--yellow); font-size: clamp(25px, 4vw, 38px); text-shadow: 0 0 20px rgba(255, 228, 94, .32); }
.v3-end-stat.is-ranking { border-color: rgba(88, 230, 255, .36); }
.v3-end-stat.is-ranking strong { color: #9df1ff; }
.v3-endgame-grid { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.v3-endgame-grid section { min-width: 0; padding: 18px; border: 1px solid rgba(137, 151, 200, .17); border-radius: 14px; background: rgba(6, 9, 26, .42); }
.v3-endgame-grid h2 { margin: 0 0 7px; color: #b5f5ff; font-size: 11px; letter-spacing: .09em; text-transform: uppercase; }
.v3-endgame-grid h2:not(:first-child) { margin-top: 18px; }
.v3-endgame-grid p { margin: 0; color: #d5dbed; font-size: 13px; line-height: 1.5; }
.v3-end-titles { display: grid; gap: 5px; margin: 10px 0 0; padding: 0; list-style: none; color: #fff0a2; font-size: 11px; line-height: 1.4; }
.v3-end-empty { margin-top: 8px !important; color: #8490ad !important; font-size: 11px !important; }
.v3-endgame-actions { position: relative; display: flex; justify-content: center; gap: 10px; margin-top: 28px; }

/* Results, battles and dev inspector */
.v3-outcome-card { position: relative; overflow: hidden; max-width: 760px; margin: 32px auto; border-color: rgba(105, 235, 169, .25); background: radial-gradient(circle at 50% 0%, rgba(105, 235, 169, .1), transparent 43%), var(--v3-panel); }
.v3-outcome-card.is-defeat { border-color: rgba(255, 107, 120, .32); background: radial-gradient(circle at 50% 0%, rgba(255, 107, 120, .1), transparent 43%), var(--v3-panel); }
.v3-outcome-card h2 { margin-top: 16px; }
.v3-aura-change { animation: v3-aura-rise .34s ease-out both; text-shadow: 0 0 24px currentColor; }
.v3-aura-change small { font-family: var(--font-body); font-size: 13px; letter-spacing: .1em; text-transform: uppercase; }
.result-breakdown { gap: 8px; }
.result-breakdown .metric { border: 1px solid var(--v3-line); background: rgba(255, 255, 255, .03); }
.battle-minigame-screen { border-color: rgba(255, 228, 94, .3); box-shadow: 0 20px 70px rgba(0, 0, 0, .45), 0 0 28px rgba(255, 228, 94, .06); }
.battle-minigame-heading { background: linear-gradient(90deg, rgba(255, 228, 94, .07), rgba(154, 116, 255, .05)); }
.hero-character-group.is-image-loading::after, .archetype-card.is-image-loading::after { position: absolute; z-index: 4; top: 50%; left: 50%; width: 20px; height: 20px; border: 2px solid rgba(255, 255, 255, .18); border-top-color: #82ffd7; border-right-color: #9673ff; border-radius: 50%; content: ""; transform: translate(-50%, -50%); animation: v3-image-spin .7s linear infinite; pointer-events: none; }
.hero-character-group img.is-image-loading, .archetype-card .archetype-art.is-image-loading { opacity: 0; }
.hero-character-group img.is-image-ready, .archetype-card .archetype-art.is-image-ready { opacity: 1; transition: opacity .18s ease; }
@keyframes v3-image-spin { to { transform: translate(-50%, -50%) rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .hero-character-group.is-image-loading::after, .archetype-card.is-image-loading::after { animation: none; } .hero-character-group img.is-image-ready, .archetype-card .archetype-art.is-image-ready { transition: none; } }
.v3-minigame-frame-wrap { position: relative; }
.v3-minigame-loader { position: absolute; z-index: 2; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; min-height: 580px; padding: 24px; color: #eef2ff; text-align: center; background: radial-gradient(circle at 50% 42%, rgba(154, 116, 255, .18), transparent 38%), #090b17; transition: opacity .2s ease, visibility .2s ease; }
.v3-minigame-loader.is-ready { visibility: hidden; opacity: 0; pointer-events: none; }
.v3-minigame-loader p { margin: 0 0 8px; color: #9ca6c4; }
.v3-minigame-spinner { width: 32px; height: 32px; border: 3px solid rgba(255, 255, 255, .16); border-top-color: #ffe45e; border-radius: 50%; animation: v3-minigame-spin .8s linear infinite; }
.v3-minigame-loader.is-error .v3-minigame-spinner { display: none; }
@keyframes v3-minigame-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .v3-minigame-spinner { animation: none; } }
.v3-inspector { margin-top: 18px; padding: 17px; border-color: rgba(154, 116, 255, .2); border-radius: 17px; background: rgba(11, 14, 30, .72); box-shadow: none; }
.v3-inspector summary { display: flex; justify-content: space-between; gap: 12px; color: #7e88a7; cursor: pointer; font-size: 11px; font-weight: 800; }
.v3-inspector-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 16px; }
.v3-inspector-grid section { min-width: 0; padding: 13px; border: 1px solid var(--v3-line); border-radius: 12px; background: rgba(7, 10, 25, .45); }
.v3-inspector-grid h3 { margin: 0 0 7px; color: var(--cyan); font-size: 10px; text-transform: uppercase; }
.v3-inspector-grid p, .v3-inspector-grid li { overflow-wrap: anywhere; color: var(--muted); font-size: 10px; line-height: 1.45; }
.v3-inspector-grid ul { margin: 0; padding-left: 16px; }
.v3-inspector-grid section:last-child { grid-column: 1 / -1; }
.v3-danger-button { min-height: 44px; padding: 0 15px; border: 1px solid rgba(255, 107, 120, .45); border-radius: 12px; color: #ffbdc3; background: rgba(255, 107, 120, .1); cursor: pointer; font-family: var(--font-body); font-weight: var(--button-weight); }

@keyframes v3-flame-sway { from { transform: rotate(-5deg) scale(.95, 1.04); } to { transform: rotate(5deg) scale(1.04, .96); } }
@keyframes v3-flame-outer { from { transform: skewX(-5deg) scale(.96, 1.03); } to { transform: skewX(6deg) scale(1.04, .96); } }
@keyframes v3-flame-core { from { opacity: .76; transform: translateX(-1px) scale(.84, 1.08); } to { opacity: 1; transform: translateX(1px) scale(1.08, .9); } }
@keyframes v3-flame-tip { from { opacity: .65; transform: translate(-1px, 2px) rotate(3deg) scale(.82, .88); } to { opacity: 1; transform: translate(1px, -1px) rotate(18deg) scale(1.08, 1.09); } }
@keyframes v3-aura-rise { from { opacity: 0; transform: translateY(10px) scale(.96); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes v3-backdrop-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes v3-modal-in { from { opacity: 0; transform: scale(.975) translateY(8px); } to { opacity: 1; transform: scale(1) translateY(0); } }

@media (max-width: 900px) {
  .hud.v3-player-hud { grid-template-columns: minmax(220px, 1.2fr) minmax(140px, .65fr) minmax(140px, .75fr) minmax(100px, .5fr); }
  .game-grid { grid-template-columns: 1fr; }
  .game-sidebar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .game-sidebar > :only-child, .v3-rest-card { grid-column: 1 / -1; }
}

@media (max-width: 680px) {
  .app-shell { padding-inline: 12px; }
  .topbar--game-controls { grid-template-columns: 1fr; justify-items: center; gap: 9px; align-items: center; }
  .topbar--game-controls > .v3-guide-button, .topbar--game-controls > .v3-report-actions, .topbar--game-controls > .v3-primary-actions { grid-column: 1; }
  .topbar--game-controls > .v3-report-actions, .topbar--game-controls > .v3-primary-actions { width: 100%; justify-content: center; }
  .topbar--game-controls > .v3-guide-button, .topbar--game-controls > .v3-report-actions > button, .topbar--game-controls > .v3-primary-actions > button { box-sizing: border-box; width: 100%; }
  .topbar .ghost-button { padding: 8px 10px; font-size: 11px; }
  .hud.v3-player-hud { grid-template-columns: minmax(0, 1.45fr) minmax(112px, .75fr); border-radius: 18px; }
  .v3-player-identity { gap: 10px; padding: 10px; }
  .v3-player-avatar { width: 56px; height: 56px; border-radius: 15px; }
  .v3-player-copy strong { font-size: 17px; }
  .v3-player-copy small { font-size: 10px; }
  .v3-aura-display { border-right: 0; padding: 9px; }
  .v3-aura-display strong { font-size: 25px; }
  .v3-aura-flame { width: 20px; height: 29px; }
  .v3-career-rank, .v3-pressure { min-height: 62px; border-top: 1px solid var(--v3-line); }
  .v3-career-rank { border-right: 1px solid var(--v3-line); }
  .v3-pressure { border-right: 0; }
  .v3-energy-hud { padding-inline: 12px; }
  .timeline-head { margin-bottom: 9px; }
  .v3-month-track { display: none; }
  .v3-mobile-month { display: grid; grid-template-columns: 1fr 1.4fr 1fr; align-items: center; gap: 8px; min-height: 46px; color: #77819e; font-size: 10px; text-transform: uppercase; }
  .v3-mobile-month span:last-child { text-align: right; }
  .v3-mobile-month strong { color: var(--yellow); font-family: var(--font-display); font-size: 14px; text-align: center; text-shadow: 0 0 14px rgba(255, 228, 94, .3); }
  .v3-event-heading { align-items: flex-start; flex-direction: column; margin-bottom: 18px; }
  .event-card h2 { font-size: 29px; }
  .event-description { font-size: 14px; }
  .choice-button { grid-template-columns: auto minmax(0, 1fr); min-height: 0; }
  .choice-button .risk-chip { grid-column: 2; justify-self: start; margin-top: 0; }
  .v3-choice-icon { width: 35px; height: 35px; }
  .game-sidebar { grid-template-columns: 1fr; }
  .game-sidebar > :only-child, .v3-rest-card { grid-column: auto; }
  .v3-inspector-grid { grid-template-columns: 1fr; }
  .v3-inspector-grid section:last-child { grid-column: auto; }
  .v3-opportunity-modal .v3-inline-actions { flex-direction: column; }
  .v3-opportunity-modal button { width: 100%; }
  .v3-bug-report-modal { max-height: calc(100vh - 24px); padding: 24px 20px; }
  .v3-bug-report-modal .event-description { margin-bottom: 20px; }
  .v3-bug-report-fields textarea { min-height: 96px; max-height: 140px; }
  .v3-guide-modal { width: 100%; max-height: calc(100vh - 24px); }
  .v3-guide-modal__header { position: relative; padding: 22px 68px 16px 20px; }
  .v3-guide-modal .v3-guide-close { position: absolute; top: 22px; right: 20px; }
  .v3-guide-modal .v3-guide-close { width: 36px; height: 36px; }
  .v3-guide-modal h2 { max-width: 250px; font-size: clamp(30px, 10vw, 40px); line-height: .95; }
  .v3-guide-scroll { grid-template-columns: 1fr; max-height: calc(100vh - 244px); padding: 16px 20px; }
  .v3-guide-modal__footer { padding: 14px 20px 20px; }
  .v3-guide-modal__footer .primary-button { width: 100%; }
  .v3-endgame-screen { min-height: 0; padding: 12px 0; }
  .v3-endgame-card { padding: 26px 17px; }
  .v3-endgame-primary { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 26px; }
  .v3-endgame-primary .v3-end-stat:last-child { grid-column: 1 / -1; }
  .v3-endgame-grid { grid-template-columns: 1fr; }
  .v3-endgame-actions { flex-direction: column; }
  .v3-endgame-actions button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .v3-aura-flame, .v3-aura-flame::before, .v3-aura-flame::after, .v3-aura-flame i, .v3-aura-change, .v3-opportunity-backdrop, .v3-opportunity-modal { animation: none !important; }
  .v3-guide-button { transition: none; }
}

/* El arte del home también se mantiene visible en mobile, debajo del copy. */
@media (max-width: 680px) {
  body:has(#app .hero) .hero { min-height: 700px; padding-bottom: 215px; }
  body:has(#app .hero) .hero-character-group {
    display: block;
    right: 50%;
    bottom: 18px;
    width: min(88vw, 360px);
    height: 185px;
    transform: translateX(50%);
  }
  body:has(#app .hero) .hero-character--misterioso { right:1%; bottom: 2%; width: 45%; }
  body:has(#app .hero) .hero-character--competitivo { left: 1%; bottom: 0; width: 49%; }
  body:has(#app .hero) .hero-character--impenetrable { left: 25%; bottom: -4px; width: 55%; }
}
