/*
 * Camino Ninja — Copero x Naruto visual system
 * This file is intentionally an override layer for the original inline styles.
 * It supports the legacy game markup and the new editorial/home components.
 */

:root {
  color-scheme: dark;

  /* Core palette */
  --ink: #050506;
  --ink-soft: #090a0d;
  --surface: #101116;
  --surface-raised: #161820;
  --surface-hover: #1d2029;
  --surface-tint: #20170f;
  --paper: #f7f7f2;
  --paper-pure: #ffffff;
  --muted: #9da1ad;
  --muted-strong: #bdc0c8;
  --line: #292c35;
  --line-strong: #3a3e49;

  /* Naruto-forward accents */
  --orange: #ff6a00;
  --orange-hot: #ff8127;
  --orange-deep: #9b3400;
  --red: #e43c35;
  --red-soft: #ff6862;
  --chakra: #48a7ff;
  --chakra-deep: #176fc8;
  --leaf: #35c978;
  --gold: #f5bd3a;

  /* Legacy aliases */
  --bg: var(--ink);
  --bg2: var(--surface);
  --bg3: var(--surface-raised);
  --txt: var(--paper);
  --txt2: var(--muted);
  --acc: var(--orange);
  --inf: var(--gold);
  --ok: var(--leaf);
  --err: var(--red-soft);
  --warn: var(--gold);
  --bdr: var(--line);

  /* Type */
  --font-display: "Barlow Condensed", "Arial Black", "Segoe UI Black", "Helvetica Neue", Arial, sans-serif;
  --font-sans: "Archivo", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "Cascadia Mono", "SFMono-Regular", Consolas, monospace;

  /* Shape + layout */
  --radius-xs: 8px;
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 26px;
  --radius-pill: 999px;
  --content-max: 1200px;
  --header-h: 70px;
  --shadow-card: 0 18px 55px rgb(0 0 0 / 0.28);
  --shadow-float: 0 18px 60px rgb(0 0 0 / 0.52);
  --focus-ring: 0 0 0 4px rgb(72 167 255 / 0.28);
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
}

html {
  background: var(--ink);
  scroll-behavior: smooth;
  scrollbar-color: var(--line-strong) var(--ink);
  scrollbar-width: thin;
}

body {
  min-width: 320px;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 14% -8%, rgb(255 106 0 / 0.12), transparent 29rem),
    radial-gradient(circle at 94% 24%, rgb(72 167 255 / 0.08), transparent 34rem),
    linear-gradient(180deg, #08090b 0, var(--ink) 34rem);
  color: var(--paper);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  opacity: 0.34;
  background-image:
    linear-gradient(rgb(255 255 255 / 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 255 255 / 0.018) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, black, transparent 78%);
}

::selection {
  background: var(--orange);
  color: var(--ink);
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
[role="button"],
.card-sel,
.path-card,
.inf-display,
.inf-fab {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible,
[role="button"]:focus-visible,
.card-sel:focus-visible,
.path-card:focus-visible {
  outline: 2px solid var(--chakra);
  outline-offset: 3px;
  box-shadow: var(--focus-ring);
}

button:disabled,
[aria-disabled="true"] {
  cursor: not-allowed;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration-color: rgb(255 255 255 / 0.35);
  text-underline-offset: 0.2em;
}

#app,
.app-shell {
  min-height: 100vh;
}

#main.home {
  width: min(calc(100% - 40px), var(--content-max));
}

.ticker-track {
  animation: none;
}

body.modal-open {
  overflow: hidden;
}

/* -------------------------------------------------------------------------- */
/* Editorial chrome: ticker + header                                           */
/* -------------------------------------------------------------------------- */

.ticker {
  position: relative;
  z-index: 50;
  min-height: 42px;
  overflow: hidden;
  border-bottom: 1px solid #22242b;
  background: #0c0d11;
  color: var(--paper);
}

.ticker::before,
.ticker::after {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 2;
  width: 48px;
  pointer-events: none;
  content: "";
}

.ticker::before {
  left: 0;
  background: linear-gradient(90deg, #0c0d11, transparent);
}

.ticker::after {
  right: 0;
  background: linear-gradient(-90deg, #0c0d11, transparent);
}

.ticker-track {
  display: flex;
  width: max-content;
  min-width: 100%;
  min-height: 42px;
  align-items: stretch;
  animation: ticker-drift 42s linear infinite;
}

.ticker:hover .ticker-track,
.ticker:focus-within .ticker-track {
  animation-play-state: paused;
}

.ticker-label,
.ticker-item {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  gap: 8px;
  padding: 0 18px;
  border-right: 1px solid #22242b;
  white-space: nowrap;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.ticker-label {
  position: sticky;
  left: 0;
  z-index: 3;
  background: var(--orange);
  color: #100803;
}

.ticker-kicker,
.ticker-rank,
.ticker-score {
  color: var(--orange-hot);
}

.ticker-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--leaf);
  box-shadow: 0 0 12px rgb(53 201 120 / 0.75);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 45;
  min-height: var(--header-h);
  border-bottom: 1px solid rgb(255 255 255 / 0.09);
  background: rgb(7 8 10 / 0.9);
  backdrop-filter: blur(18px) saturate(1.25);
  -webkit-backdrop-filter: blur(18px) saturate(1.25);
}

.site-header-inner {
  display: flex;
  width: min(calc(100% - 40px), var(--content-max));
  min-height: var(--header-h);
  margin-inline: auto;
  align-items: center;
  gap: 34px;
}

.site-brand,
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--paper-pure);
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 950;
  letter-spacing: -0.055em;
  line-height: 1;
  text-decoration: none;
}

.site-brand-mark,
.brand-mark {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 10px;
  background: var(--paper-pure);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 19px;
  box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.1);
}

.site-brand-accent,
.brand-accent {
  color: var(--orange);
}

.site-nav,
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.site-nav a,
.nav-link {
  position: relative;
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  padding: 0 13px;
  border-radius: var(--radius-pill);
  color: var(--muted-strong);
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
  transition: background 160ms ease, color 160ms ease;
}

.site-nav a:hover,
.nav-link:hover,
.site-nav a[aria-current="page"],
.nav-link.is-active {
  background: var(--surface-raised);
  color: var(--paper-pure);
}

.site-nav a[aria-current="page"]::after,
.nav-link.is-active::after {
  position: absolute;
  right: 14px;
  bottom: 5px;
  left: 14px;
  height: 2px;
  border-radius: var(--radius-pill);
  background: var(--orange);
  content: "";
}

.site-actions,
.nav-actions {
  display: flex;
  margin-left: auto;
  align-items: center;
  gap: 10px;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--paper);
}

/* -------------------------------------------------------------------------- */
/* Home / editorial landing                                                    */
/* -------------------------------------------------------------------------- */

.home,
.home-page {
  width: min(calc(100% - 40px), var(--content-max));
  margin-inline: auto;
  padding: clamp(34px, 5vw, 72px) 0 80px;
}

.section-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  color: var(--orange-hot);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.section-kicker::before,
.eyebrow::before {
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  content: "";
}

.home-section-title,
.display-title {
  max-width: 780px;
  margin: 0 0 22px;
  color: var(--paper-pure);
  font-family: var(--font-display);
  font-size: clamp(31px, 5vw, 56px);
  font-weight: 950;
  letter-spacing: -0.065em;
  line-height: 0.97;
  text-wrap: balance;
}

.home-hero {
  position: relative;
  display: grid;
  min-height: 460px;
  overflow: hidden;
  grid-template-columns: minmax(0, 1.03fr) minmax(300px, 0.97fr);
  border: 1px solid rgb(255 255 255 / 0.1);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(105deg, rgb(7 8 10 / 0.98) 0 47%, rgb(7 8 10 / 0.36) 76%),
    var(--hero-image, linear-gradient(135deg, #321308, #0e2e49));
  background-position: center;
  background-size: cover;
  box-shadow: var(--shadow-card);
  isolation: isolate;
}

.home-hero::after {
  position: absolute;
  inset: auto -8% -52% 36%;
  z-index: -1;
  height: 92%;
  border: 1px solid rgb(255 255 255 / 0.1);
  border-radius: 50%;
  background: radial-gradient(circle, rgb(255 106 0 / 0.28), transparent 65%);
  content: "";
}

.home-hero-content {
  display: flex;
  max-width: 680px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  padding: clamp(30px, 5vw, 64px);
}

.home-hero-title {
  max-width: 690px;
  margin: 0;
  color: var(--paper-pure);
  font-family: var(--font-display);
  font-size: clamp(42px, 6.7vw, 82px);
  font-weight: 950;
  letter-spacing: -0.075em;
  line-height: 0.88;
  text-wrap: balance;
}

.home-hero-title em {
  color: var(--orange);
  font-style: normal;
}

.home-hero-copy {
  max-width: 570px;
  margin-top: 20px;
  color: #d5d7dd;
  font-size: clamp(15px, 1.8vw, 18px);
  line-height: 1.55;
}

.home-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.home-hero-aside {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 28px;
}

.hero-score-chip {
  display: grid;
  min-width: 150px;
  padding: 18px;
  border: 1px solid rgb(255 255 255 / 0.16);
  border-radius: var(--radius-md);
  background: rgb(10 11 14 / 0.78);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(16px);
}

.hero-score-chip strong {
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 32px;
  letter-spacing: -0.05em;
}

.hero-score-chip span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.home-feature-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.45fr);
  gap: 18px;
}

.home-card {
  --card-accent: var(--orange);
  position: relative;
  display: flex;
  min-height: 330px;
  overflow: hidden;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  padding: clamp(24px, 4vw, 36px);
  border: 1px solid rgb(255 255 255 / 0.1);
  border-radius: var(--radius-md);
  background:
    linear-gradient(0deg, rgb(4 5 7 / 0.96) 0, rgb(4 5 7 / 0.2) 84%),
    var(--card-image, linear-gradient(135deg, #25374b, #171018));
  background-position: center;
  background-size: cover;
  box-shadow: var(--shadow-card);
  isolation: isolate;
  transition: transform 240ms var(--ease-out), border-color 240ms ease;
}

.home-card::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--card-accent), transparent 70%);
  content: "";
}

.home-card:hover {
  transform: translateY(-4px);
  border-color: rgb(255 255 255 / 0.22);
}

.home-card--chakra {
  --card-accent: var(--chakra);
}

.home-card--red {
  --card-accent: var(--red);
}

.home-card-kicker {
  margin-bottom: 9px;
  color: var(--card-accent);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.home-card-title {
  max-width: 560px;
  color: var(--paper-pure);
  font-family: var(--font-display);
  font-size: clamp(27px, 4vw, 42px);
  letter-spacing: -0.055em;
  line-height: 0.98;
  text-wrap: balance;
}

.home-card-copy {
  max-width: 560px;
  margin-top: 10px;
  color: #d0d2d9;
  font-size: 14px;
}

.home-card .btn {
  margin-top: 20px;
}

.quick-section {
  margin-top: 46px;
}

.quick-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  font-family: var(--font-display);
  font-size: 23px;
  letter-spacing: -0.045em;
}

.quick-heading::before {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: var(--surface);
  color: var(--orange);
  content: "忍";
  font-family: serif;
  font-size: 15px;
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.quick-card,
.quick-grid > a,
.quick-grid > button {
  position: relative;
  display: flex;
  min-height: 144px;
  overflow: hidden;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background:
    linear-gradient(0deg, rgb(7 8 10 / 0.96), transparent),
    var(--quick-image, linear-gradient(135deg, #20242c, #101116));
  background-position: center;
  background-size: cover;
  color: var(--paper);
  font-size: 13px;
  font-weight: 850;
  text-align: left;
  text-decoration: none;
  transition: border-color 180ms ease, transform 180ms var(--ease-out);
}

.quick-card:hover,
.quick-grid > a:hover,
.quick-grid > button:hover {
  transform: translateY(-3px);
  border-color: var(--orange);
}

.quick-card-meta {
  margin-bottom: 4px;
  color: var(--orange-hot);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* -------------------------------------------------------------------------- */
/* Legacy game layout                                                          */
/* -------------------------------------------------------------------------- */

#layout {
  display: grid;
  width: min(calc(100% - 40px), var(--content-max));
  min-height: auto;
  grid-template-columns: 288px minmax(0, 1fr);
  gap: clamp(22px, 4vw, 52px);
  margin: 0 auto;
  padding: clamp(24px, 4vw, 54px) 0 72px;
}

#sidebar {
  position: sticky;
  top: calc(var(--header-h) + 18px);
  width: 288px;
  min-width: 0;
  height: max-content;
  max-height: calc(100vh - var(--header-h) - 36px);
  overflow: auto;
  flex: none;
  padding: 0;
  border: 0;
  border-radius: var(--radius-md);
  background: transparent;
  scrollbar-gutter: stable;
}

#main {
  width: 100%;
  max-width: none;
  min-width: 0;
  overflow: visible;
  padding: 0;
  animation: content-in 360ms var(--ease-out) both;
}

.tarjeta {
  position: relative;
  display: flex;
  overflow: hidden;
  flex-direction: column;
  gap: 11px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background:
    linear-gradient(145deg, rgb(255 106 0 / 0.08), transparent 37%),
    var(--surface);
  box-shadow: var(--shadow-card);
}

.tarjeta::before {
  position: absolute;
  top: -52px;
  right: -46px;
  width: 140px;
  height: 140px;
  border: 18px solid rgb(255 106 0 / 0.075);
  border-radius: 50%;
  content: "";
}

.tarjeta::after {
  position: absolute;
  top: 16px;
  right: 16px;
  color: rgb(255 255 255 / 0.045);
  content: "忍";
  font-family: serif;
  font-size: 64px;
  line-height: 1;
}

.t-nombre {
  position: relative;
  z-index: 1;
  overflow: hidden;
  color: var(--paper-pure);
  font-family: var(--font-display);
  font-size: 25px;
  font-weight: 950;
  letter-spacing: -0.055em;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.t-rango {
  position: relative;
  z-index: 1;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.t-fac {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.badge-aldea,
.badge-clan,
.badge-evil,
.badge-ron,
.badge-herido {
  display: inline-flex;
  min-height: 25px;
  align-items: center;
  padding: 3px 9px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  background: var(--surface-raised);
  color: var(--muted-strong);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.035em;
}

.badge-aldea {
  border-color: rgb(72 167 255 / 0.34);
  background: rgb(72 167 255 / 0.1);
  color: #9ed0ff;
}

.badge-evil {
  border-color: rgb(228 60 53 / 0.45);
  background: rgb(228 60 53 / 0.11);
  color: #ff9994;
}

.badge-ron {
  border-color: #555b68;
  background: #22252b;
  color: #d4d5d9;
}

.badge-herido {
  border-color: rgb(245 189 58 / 0.43);
  background: rgb(245 189 58 / 0.1);
  color: #ffd878;
}

.attrs {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
  padding: 13px;
  border: 1px solid rgb(255 255 255 / 0.055);
  border-radius: var(--radius-sm);
  background: rgb(0 0 0 / 0.18);
}

.attr {
  display: grid;
  grid-template-columns: 33px minmax(0, 1fr) 25px;
  align-items: center;
  gap: 7px;
}

.ak {
  width: auto;
  color: #b5b8c0;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.06em;
}

.bar-bg {
  height: 6px;
  overflow: hidden;
  border-radius: var(--radius-pill);
  background: #282b33;
}

.bar-fg {
  min-width: 2px;
  height: 100%;
  border-radius: inherit;
  box-shadow: 0 0 12px currentColor;
  transition: width 360ms var(--ease-out);
}

.av {
  width: auto;
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  text-align: right;
}

.t-stats {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px 12px;
}

.stat-row {
  display: flex;
  min-width: 0;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid rgb(255 255 255 / 0.07);
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
}

.stat-row span:last-child {
  color: var(--paper);
  font-family: var(--font-mono);
  font-weight: 800;
}

.sos-row,
.sos-row span:last-child {
  color: var(--gold);
}

.inf-display {
  position: relative;
  z-index: 2;
  display: flex;
  min-height: 48px;
  align-items: center;
  gap: 9px;
  margin-top: 3px;
  padding: 9px 13px;
  border: 1px solid rgb(245 189 58 / 0.5);
  border-radius: var(--radius-sm);
  background: linear-gradient(110deg, rgb(245 189 58 / 0.16), rgb(245 189 58 / 0.04));
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms var(--ease-out);
}

.inf-display::after {
  margin-left: auto;
  color: #f8d985;
  content: "Mejorar →";
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.inf-display:hover {
  border-color: var(--gold);
  background: rgb(245 189 58 / 0.19);
  transform: translateY(-1px);
}

.inf-kan {
  color: var(--gold);
  font-family: serif;
  font-size: 21px;
  line-height: 1;
}

.inf-num {
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.inf-fab {
  position: fixed;
  right: max(18px, calc((100vw - var(--content-max)) / 2));
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 40;
  display: flex;
  width: 62px;
  height: 62px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid #f5c14f;
  border-radius: 50%;
  background: #241a08;
  box-shadow: 0 10px 34px rgb(0 0 0 / 0.55), 0 0 0 5px rgb(245 189 58 / 0.08);
  cursor: pointer;
  transition: transform 180ms var(--ease-out), background 180ms ease;
}

.inf-fab:hover {
  background: #35270e;
  transform: translateY(-3px) scale(1.04);
}

.inf-fab .inf-kan {
  font-size: 20px;
}

.fab-num {
  color: #ffdd86;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 850;
}

/* -------------------------------------------------------------------------- */
/* Shared cards, forms and calls to action                                     */
/* -------------------------------------------------------------------------- */

.card,
.mentor-card,
.path-card,
.opcion,
.btn-jutsu,
.cb-log {
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: 0 10px 28px rgb(0 0 0 / 0.14);
}

.card {
  padding: clamp(17px, 2.4vw, 24px);
  border-radius: var(--radius-md);
}

.card-hd {
  margin-bottom: 9px;
  color: var(--paper-pure);
  font-size: 16px;
  font-weight: 850;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr));
  gap: 14px;
}

.card-sel {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: transform 200ms var(--ease-out), border-color 200ms ease, background 200ms ease;
}

.card-sel::after {
  position: absolute;
  right: 17px;
  bottom: 16px;
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--surface-raised);
  color: var(--paper);
  content: "→";
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity 180ms ease, transform 180ms var(--ease-out);
}

.card-sel:hover {
  border-color: rgb(255 106 0 / 0.72);
  background: linear-gradient(145deg, rgb(255 106 0 / 0.08), var(--surface));
  transform: translateY(-4px);
}

.card-sel:hover::after {
  opacity: 1;
  transform: translateX(0);
}

.c-kan {
  margin-bottom: 8px;
  color: var(--orange);
  font-family: serif;
  font-size: 43px;
  line-height: 1;
}

.c-n {
  color: var(--paper-pure);
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 950;
  letter-spacing: -0.045em;
  line-height: 1.08;
}

.c-k {
  margin: 4px 0 9px;
  color: var(--orange-hot);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.c-desc,
.m-desc,
.path-desc {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.c-desc {
  margin-bottom: 9px;
}

.c-bonus {
  color: #8ee4b2;
  font-size: 11px;
  font-weight: 750;
}

.pasiva-tag {
  margin: 10px 0;
  padding: 7px 9px;
  border: 1px solid rgb(53 201 120 / 0.3);
  border-radius: var(--radius-xs);
  background: rgb(53 201 120 / 0.08);
  color: #91e2b4;
  font-size: 11px;
  line-height: 1.4;
}

.tec-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 4px;
}

.tec-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto auto;
  gap: 7px;
  align-items: center;
  min-height: 28px;
  padding: 3px 7px;
  border-radius: 7px;
  background: rgb(255 255 255 / 0.025);
  font-size: 10px;
}

.tec-row.locked {
  opacity: 0.42;
}

.tec-k {
  width: auto;
  color: var(--chakra);
  font-family: serif;
  font-size: 13px;
}

.tec-n {
  min-width: 0;
}

.tec-c {
  color: var(--gold);
  font-family: var(--font-mono);
  font-size: 9px;
}

.btn {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 20px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  background: var(--surface-raised);
  color: var(--paper-pure);
  font-size: 13px;
  font-weight: 820;
  line-height: 1;
  cursor: pointer;
  box-shadow: none;
  transition: transform 180ms var(--ease-out), background 180ms ease, border-color 180ms ease, color 180ms ease;
}

.btn:hover:not(:disabled) {
  border-color: #6a6e78;
  background: #242731;
  transform: translateY(-2px);
}

.btn:active:not(:disabled) {
  transform: translateY(0) scale(0.98);
}

.btn-p,
.btn-primary {
  border-color: var(--paper-pure);
  background: var(--paper-pure);
  color: #0b0c0f;
  box-shadow: 0 8px 24px rgb(255 255 255 / 0.08);
}

.btn-p:hover:not(:disabled),
.btn-primary:hover:not(:disabled) {
  border-color: var(--orange-hot);
  background: var(--orange-hot);
  color: #150902;
}

.btn-accent {
  border-color: var(--orange);
  background: var(--orange);
  color: #150902;
}

.btn-accent:hover:not(:disabled) {
  border-color: var(--orange-hot);
  background: var(--orange-hot);
}

.btn-ghost {
  background: transparent;
}

.btn-danger {
  border-color: rgb(228 60 53 / 0.65);
  background: rgb(228 60 53 / 0.12);
  color: #ffaba8;
}

.btn-xl {
  width: 100%;
  min-height: 54px;
  margin-top: 10px;
  padding: 14px 28px;
  font-size: 15px;
}

.btn-sm {
  min-height: 38px;
  margin-top: 7px;
  padding: 7px 14px;
  background: transparent;
  font-size: 12px;
}

.btn-k {
  margin-left: 5px;
  opacity: 0.7;
  transition: transform 180ms var(--ease-out);
}

.btn:hover .btn-k {
  transform: translateX(3px);
}

.inp {
  min-height: 50px;
  padding: 12px 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: #111319;
  color: var(--paper-pure);
  caret-color: var(--orange);
  font-size: 15px;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.inp::placeholder {
  color: #727681;
}

.inp:focus {
  border-color: var(--chakra);
  outline: none;
  box-shadow: var(--focus-ring);
}

.nombre-form {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

.sect-title {
  position: relative;
  margin-bottom: 22px;
  padding: 0 0 15px;
  border-bottom: 1px solid var(--line);
  color: var(--paper-pure);
  font-family: var(--font-display);
  font-size: clamp(26px, 4vw, 39px);
  font-weight: 950;
  letter-spacing: -0.06em;
  line-height: 1;
}

.sect-title::after {
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 62px;
  height: 3px;
  border-radius: var(--radius-pill);
  background: var(--orange);
  content: "";
}

/* -------------------------------------------------------------------------- */
/* Intro                                                                        */
/* -------------------------------------------------------------------------- */

.pantalla-intro {
  position: relative;
  display: flex;
  width: min(calc(100% - 40px), 980px);
  min-height: calc(100vh - 80px);
  max-width: none;
  overflow: hidden;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  margin: 40px auto;
  padding: clamp(32px, 7vw, 76px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 75% 28%, rgb(72 167 255 / 0.17), transparent 25%),
    linear-gradient(116deg, rgb(4 5 7 / 0.98) 8%, rgb(4 5 7 / 0.72) 57%, rgb(4 5 7 / 0.12)),
    linear-gradient(140deg, #3d1607, #0b1c2a 72%);
  box-shadow: var(--shadow-card);
  text-align: left;
  isolation: isolate;
}

.pantalla-intro::before {
  position: absolute;
  top: 9%;
  right: 5%;
  z-index: -1;
  color: rgb(255 255 255 / 0.05);
  content: "忍道";
  font-family: serif;
  font-size: clamp(140px, 23vw, 270px);
  font-weight: 900;
  letter-spacing: -0.16em;
  line-height: 0.75;
  writing-mode: vertical-rl;
}

.pantalla-intro::after {
  position: absolute;
  right: -12%;
  bottom: -35%;
  z-index: -1;
  width: min(70vw, 680px);
  height: min(70vw, 680px);
  border: clamp(18px, 3vw, 42px) solid rgb(255 106 0 / 0.11);
  border-radius: 50%;
  content: "";
}

.intro-title {
  color: var(--orange);
  font-family: serif;
  font-size: clamp(54px, 10vw, 110px);
  font-weight: 900;
  letter-spacing: -0.1em;
  line-height: 0.75;
  text-shadow: 0 0 48px rgb(255 106 0 / 0.28);
}

.intro-sub {
  max-width: 720px;
  margin: 22px 0 0;
  color: var(--paper-pure);
  font-family: var(--font-display);
  font-size: clamp(39px, 7vw, 76px);
  font-weight: 950;
  letter-spacing: -0.075em;
  line-height: 0.88;
}

.intro-desc {
  max-width: 560px;
  margin: 22px 0 30px;
  color: #c8cbd2;
  font-size: clamp(14px, 2vw, 17px);
  line-height: 1.55;
}

.pantalla-intro .btn {
  width: auto;
  min-width: 210px;
}

.pantalla-intro .btn-sm {
  margin-left: 7px;
}

/* -------------------------------------------------------------------------- */
/* Scene / story / progress                                                     */
/* -------------------------------------------------------------------------- */

.game-stage,
.scene-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(280px, 0.92fr);
  gap: 22px;
  align-items: start;
}

.scene-copy {
  min-width: 0;
}

.scene-media {
  position: relative;
  min-height: 260px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background:
    linear-gradient(0deg, rgb(4 5 7 / 0.78), transparent 66%),
    var(--scene-image, linear-gradient(140deg, #2d180f, #0d253a));
  background-position: center;
  background-size: cover;
  box-shadow: var(--shadow-card);
  isolation: isolate;
}

.scene-media::after {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, rgb(255 106 0 / 0.12), transparent 32%);
  content: "";
  mix-blend-mode: screen;
}

.scene-media > img,
.scene-media > picture,
.scene-media picture > img {
  width: 100%;
  height: 100%;
  min-height: inherit;
  object-fit: cover;
  object-position: var(--scene-position, center);
}

.resume-note {
  width: fit-content;
  max-width: 620px;
  margin: 17px 0 0;
  padding: 9px 12px;
  border: 1px solid rgb(72 167 255 / 0.3);
  border-radius: 10px;
  background: rgb(72 167 255 / 0.1);
  color: #dceeff;
  font-size: 12.5px;
}

.resume-note b {
  color: #8bc8ff;
}

.scene-media > img {
  transition: transform 700ms var(--ease-out);
}

.scene-media:hover > img {
  transform: scale(1.025);
}

.scene-caption {
  position: absolute;
  right: 16px;
  bottom: 14px;
  left: 16px;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  color: #dfe1e7;
  font-size: 11px;
  font-weight: 700;
}

.scene-media--portrait {
  min-height: 420px;
}

.scene-media--wide {
  aspect-ratio: 1672 / 941;
  min-height: 0;
}

.scene-media--wide > img,
.scene-media--wide picture,
.scene-media--wide picture > img {
  min-height: 0;
}

.scene-media--empty::before {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgb(255 255 255 / 0.08);
  content: "忍";
  font-family: serif;
  font-size: 120px;
}

.stage-progress {
  display: grid;
  grid-template-columns: auto minmax(100px, 1fr) auto;
  gap: 11px;
  align-items: center;
  margin-bottom: 18px;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: rgb(16 17 22 / 0.84);
}

.stage-progress-label,
.stage-progress-count {
  color: var(--muted-strong);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.stage-progress-track {
  height: 6px;
  overflow: hidden;
  border-radius: var(--radius-pill);
  background: #292c34;
}

.stage-progress-bar,
.stage-progress-fill {
  width: var(--progress, 0%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--orange), var(--orange-hot));
  box-shadow: 0 0 15px rgb(255 106 0 / 0.45);
  transition: width 400ms var(--ease-out);
}

.ev-header {
  position: relative;
  margin-bottom: 18px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--line);
}

.ev-header::after {
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 48px;
  height: 3px;
  border-radius: var(--radius-pill);
  background: var(--orange);
  content: "";
}

.ev-arco {
  margin-bottom: 8px;
  color: var(--orange-hot);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.ev-titulo {
  max-width: 760px;
  color: var(--paper-pure);
  font-family: var(--font-display);
  font-size: clamp(31px, 5vw, 53px);
  font-weight: 950;
  letter-spacing: -0.065em;
  line-height: 0.98;
  text-wrap: balance;
}

.ev-texto {
  max-width: 760px;
  margin-bottom: 22px;
  color: #d4d6dc;
  font-size: clamp(15px, 1.8vw, 17px);
  line-height: 1.65;
}

.npc-badge {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  gap: 5px;
  margin-bottom: 13px;
  padding: 5px 11px;
  border: 1px solid rgb(72 167 255 / 0.36);
  border-radius: var(--radius-pill);
  background: rgb(72 167 255 / 0.1);
  color: #9ed0ff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.035em;
}

.npc-sm {
  margin-right: 5px;
  color: #8dc9ff;
  font-size: 10px;
  font-weight: 750;
}

.opciones {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.opcion {
  position: relative;
  display: grid;
  min-height: 76px;
  align-items: center;
  padding: 15px 56px 15px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms var(--ease-out);
}

.opcion::after {
  position: absolute;
  right: 17px;
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--muted-strong);
  content: "→";
  transition: transform 180ms var(--ease-out), color 180ms ease, border-color 180ms ease;
}

.opcion:hover:not(.op-locked) {
  border-color: var(--orange);
  background: linear-gradient(100deg, rgb(255 106 0 / 0.12), var(--surface));
  transform: translateX(4px);
}

.opcion:hover:not(.op-locked)::after {
  border-color: var(--orange);
  color: var(--orange-hot);
  transform: translateX(3px);
}

.opcion.op-locked {
  opacity: 0.42;
  cursor: not-allowed;
  filter: saturate(0.45);
}

.opcion.op-locked::after {
  content: "×";
}

.op-top {
  display: flex;
  gap: 12px;
  align-items: center;
}

.op-k {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  border-radius: 10px;
  background: rgb(255 106 0 / 0.12);
  color: var(--orange);
  font-family: serif;
  font-size: 20px;
}

.op-txt {
  color: var(--paper-pure);
  font-size: 14px;
  font-weight: 720;
  line-height: 1.4;
}

.req-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 8px 0 0 46px;
}

.req-badge,
.ch,
.status-tag {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 3px 8px;
  border: 1px solid;
  border-radius: var(--radius-pill);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.req-ok,
.dp {
  border-color: rgb(53 201 120 / 0.32);
  background: rgb(53 201 120 / 0.1);
  color: #7de4a8;
}

.req-no,
.dn {
  border-color: rgb(228 60 53 / 0.34);
  background: rgb(228 60 53 / 0.1);
  color: #ff8b86;
}

/* Decision feedback */
.consequence-toast {
  position: fixed;
  right: 50%;
  bottom: max(24px, env(safe-area-inset-bottom));
  z-index: 1200;
  display: grid;
  width: min(calc(100% - 32px), 520px);
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: rgb(19 21 27 / 0.95);
  box-shadow: var(--shadow-float);
  opacity: 0;
  pointer-events: none;
  transform: translate(50%, 18px) scale(0.98);
  backdrop-filter: blur(18px);
  transition: opacity 220ms ease, transform 260ms var(--ease-out);
}

.consequence-toast.is-visible,
.consequence-toast[data-visible="true"] {
  opacity: 1;
  pointer-events: auto;
  transform: translate(50%, 0) scale(1);
}

.consequence-toast::before {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 11px;
  background: rgb(72 167 255 / 0.12);
  color: var(--chakra);
  content: "忍";
  font-family: serif;
  font-size: 18px;
}

.consequence-toast--good::before,
.consequence-toast.is-good::before {
  background: rgb(53 201 120 / 0.12);
  color: var(--leaf);
  content: "✓";
}

.consequence-toast--bad::before,
.consequence-toast.is-bad::before {
  background: rgb(228 60 53 / 0.12);
  color: var(--red-soft);
  content: "!";
}

.consequence-toast-title {
  color: var(--paper-pure);
  font-size: 13px;
  font-weight: 850;
}

.consequence-toast-copy {
  color: var(--muted);
  font-size: 11px;
}

.consequence-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  justify-content: flex-end;
}

/* -------------------------------------------------------------------------- */
/* Stage report                                                                */
/* -------------------------------------------------------------------------- */

.inf-item {
  position: relative;
  padding: 14px 4px 14px 20px;
  border-bottom: 1px solid var(--line);
}

.inf-item::before {
  position: absolute;
  top: 20px;
  left: 2px;
  width: 7px;
  height: 7px;
  border: 2px solid var(--orange);
  border-radius: 50%;
  background: var(--surface);
  content: "";
  box-shadow: 0 0 0 4px rgb(255 106 0 / 0.08);
}

.inf-item:last-child {
  border-bottom: 0;
}

.inf-ev {
  margin-bottom: 4px;
  color: var(--paper-pure);
  font-size: 13px;
  font-weight: 800;
}

.inf-msg {
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.ch-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

/* -------------------------------------------------------------------------- */
/* Combat                                                                       */
/* -------------------------------------------------------------------------- */

.cb-header {
  margin-bottom: 18px;
  padding: 0 0 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.cb-title {
  color: var(--paper-pure);
  font-family: var(--font-display);
  font-size: clamp(25px, 4vw, 38px);
  font-weight: 950;
  letter-spacing: -0.055em;
}

.cb-versus {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
  margin-bottom: 14px;
}

.cb-ent {
  min-width: 0;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.cb-player {
  background: linear-gradient(145deg, rgb(72 167 255 / 0.12), var(--surface) 52%);
}

.cb-enemy {
  background: linear-gradient(215deg, rgb(228 60 53 / 0.12), var(--surface) 52%);
}

.cb-vs-mid {
  display: grid;
  width: 44px;
  height: 44px;
  align-self: center;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--ink);
  color: var(--orange);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 950;
  box-shadow: 0 0 0 7px var(--ink);
}

.cb-name {
  overflow: hidden;
  margin-bottom: 12px;
  color: var(--paper-pure);
  font-size: 14px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cb-ek {
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
}

.cb-hp-row,
.cb-chk-row {
  display: grid;
  grid-template-columns: 27px minmax(0, 1fr) auto;
  gap: 7px;
  align-items: center;
  margin-bottom: 5px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
}

.hp-bar {
  height: 8px;
  overflow: hidden;
  border-radius: var(--radius-pill);
  background: #2a2d34;
}

.hp-fg {
  min-width: 2px;
  height: 100%;
  border-radius: inherit;
  transition: width 360ms var(--ease-out);
}

.status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.s-stun {
  border-color: rgb(72 167 255 / 0.4);
  background: rgb(72 167 255 / 0.1);
  color: #9dd0ff;
}

.s-dot {
  border-color: rgb(245 189 58 / 0.4);
  background: rgb(245 189 58 / 0.1);
  color: #ffda7d;
}

.s-guard {
  border-color: rgb(53 201 120 / 0.38);
  background: rgb(53 201 120 / 0.1);
  color: #8de7b3;
}

.s-charge {
  border-color: rgb(228 60 53 / 0.43);
  background: rgb(228 60 53 / 0.1);
  color: #ff9c97;
  animation: danger-pulse 1.1s ease-in-out infinite;
}

.cb-log {
  display: flex;
  min-height: 80px;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 14px;
  padding: 13px 15px;
  border-radius: var(--radius-sm);
  background: #0d0f13;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.45;
}

.lg-n {
  color: var(--muted);
}

.lg-g {
  color: #7ae3a6;
}

.lg-b {
  color: #ff8f8a;
}

.lg-warn {
  color: #ffd36d;
  font-weight: 800;
}

.jutsu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr));
  gap: 9px;
}

/* Acciones sin coste de chakra (taijutsu, guardia, kawarimi). Van separadas de
   los jutsus para que se lean como otro tipo de decisión y no como una técnica
   más de la lista. */
.accion-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr));
  gap: 9px;
  margin-top: 10px;
  padding-top: 12px;
  border-top: 1px dashed var(--bdr, rgba(255, 255, 255, 0.14));
}

.accion-grid .btn-jutsu {
  min-height: 0;
  opacity: 0.92;
}

.accion-grid .btn-jutsu:hover:not(:disabled) {
  opacity: 1;
}

.btn-jutsu {
  position: relative;
  width: 100%;
  min-height: 96px;
  padding: 13px 14px;
  border-radius: var(--radius-sm);
  color: var(--paper);
  text-align: left;
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms var(--ease-out);
}

.btn-jutsu.j-ok:hover {
  border-color: var(--chakra);
  background: linear-gradient(140deg, rgb(72 167 255 / 0.12), var(--surface));
  transform: translateY(-3px);
}

.btn-jutsu.j-dis {
  opacity: 0.38;
  cursor: not-allowed;
  filter: grayscale(0.45);
}

.j-k {
  display: block;
  margin-bottom: 5px;
  color: var(--chakra);
  font-family: serif;
  font-size: 21px;
  line-height: 1;
}

.j-n {
  display: block;
  margin-bottom: 5px;
  color: var(--paper-pure);
  font-size: 13px;
  font-weight: 800;
}

.j-stats {
  display: block;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9px;
}

.vic-banner,
.def-banner {
  position: relative;
  overflow: hidden;
  margin-bottom: 16px;
  padding: clamp(28px, 5vw, 52px);
  border: 1px solid;
  border-radius: var(--radius-md);
  text-align: center;
}

.vic-banner {
  border-color: rgb(53 201 120 / 0.42);
  background: radial-gradient(circle at 50% 0, rgb(53 201 120 / 0.22), transparent 58%), #0c1711;
}

.def-banner {
  border-color: rgb(228 60 53 / 0.42);
  background: radial-gradient(circle at 50% 0, rgb(228 60 53 / 0.22), transparent 58%), #190d0d;
}

/* -------------------------------------------------------------------------- */
/* Paths + mentors + shop                                                      */
/* -------------------------------------------------------------------------- */

.path-grid,
.mentor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr));
  gap: 12px;
}

.path-card,
.mentor-card {
  padding: 17px;
  border-radius: var(--radius-sm);
  transition: transform 180ms var(--ease-out), border-color 180ms ease, background 180ms ease;
}

.path-card {
  cursor: pointer;
}

.path-card:hover:not(.path-locked) {
  border-color: var(--orange);
  background: linear-gradient(140deg, rgb(255 106 0 / 0.09), var(--surface));
  transform: translateY(-3px);
}

.path-locked {
  opacity: 0.42;
  cursor: not-allowed;
  filter: saturate(0.5);
}

.path-top {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 2px 10px;
  align-items: center;
  margin-bottom: 8px;
}

.path-k {
  grid-row: 1 / span 2;
  font-family: serif;
  font-size: 31px;
  font-weight: 900;
}

.path-n {
  color: var(--paper-pure);
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.path-lock {
  margin-left: 0;
  color: var(--muted);
  font-size: 10px;
}

.mentor-card.disponible,
.disponible {
  border-color: rgb(53 201 120 / 0.38);
}

.mentor-card.ya-comprado,
.ya-comprado {
  border-color: var(--line);
  opacity: 0.56;
}

.mentor-card.no-puede,
.no-puede {
  opacity: 0.46;
}

.m-top {
  display: flex;
  gap: 9px;
  align-items: center;
  margin-bottom: 8px;
}

.m-n {
  flex: 1;
  color: var(--paper-pure);
  font-size: 14px;
  font-weight: 850;
}

.m-k {
  color: var(--chakra);
  font-family: serif;
  font-size: 21px;
}

.m-cost {
  padding: 3px 7px;
  border-radius: var(--radius-pill);
  background: rgb(255 255 255 / 0.05);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
}

.m-cost.ok,
.ok {
  color: var(--gold);
}

.m-cost.bad,
.bad {
  color: var(--red-soft);
}

.m-cost.ya,
.ya {
  color: var(--leaf);
}

.m-desc {
  margin-bottom: 10px;
}

.btn-mentor {
  min-height: 36px;
  padding: 7px 13px;
  border: 1px solid rgb(53 201 120 / 0.42);
  border-radius: var(--radius-pill);
  background: rgb(53 201 120 / 0.1);
  color: #8ce7b2;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  transition: background 160ms ease, transform 160ms var(--ease-out);
}

.btn-mentor:hover:not(:disabled) {
  background: rgb(53 201 120 / 0.18);
  transform: translateY(-1px);
}

.btn-mentor-dis {
  border-color: var(--line);
  background: var(--surface-raised);
  color: var(--muted);
  cursor: not-allowed;
}

.shop-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgb(0 0 0 / 0.78);
  backdrop-filter: blur(10px);
  animation: fade-in 180ms ease both;
}

.shop-modal {
  display: flex;
  width: min(100%, 650px);
  max-width: none;
  max-height: min(82vh, 760px);
  overflow-y: auto;
  flex-direction: column;
  gap: 13px;
  padding: clamp(20px, 4vw, 30px);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: #12141a;
  box-shadow: var(--shadow-float);
  animation: modal-in 240ms var(--ease-out) both;
}

.shop-hd {
  color: var(--paper-pure);
  font-family: var(--font-display);
  font-size: 23px;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.shop-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

/* -------------------------------------------------------------------------- */
/* Results + share card + leaderboard                                          */
/* -------------------------------------------------------------------------- */

.resultado,
.result-card {
  position: relative;
  width: min(calc(100% - 32px), 720px);
  max-width: none;
  overflow: hidden;
  margin: clamp(26px, 6vw, 64px) auto;
  padding: clamp(28px, 6vw, 62px);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 50% -12%, rgb(255 106 0 / 0.25), transparent 42%),
    linear-gradient(160deg, #15171d, #0c0d10 65%);
  box-shadow: var(--shadow-float);
  text-align: center;
  isolation: isolate;
}

.resultado::before,
.result-card::before {
  position: absolute;
  top: -90px;
  right: -70px;
  z-index: -1;
  width: 260px;
  height: 260px;
  border: 28px solid rgb(255 106 0 / 0.08);
  border-radius: 50%;
  content: "";
}

.resultado::after,
.result-card::after {
  position: absolute;
  bottom: 16px;
  left: 24px;
  z-index: -1;
  color: rgb(255 255 255 / 0.035);
  content: "火の意志";
  font-family: serif;
  font-size: clamp(38px, 9vw, 84px);
  font-weight: 900;
  letter-spacing: -0.12em;
}

.res-titulo,
.result-title {
  margin-bottom: 9px;
  color: var(--paper-pure);
  font-family: var(--font-display);
  font-size: clamp(31px, 6vw, 52px);
  font-weight: 950;
  letter-spacing: -0.065em;
  line-height: 0.98;
  text-wrap: balance;
}

.res-nombre,
.result-identity {
  margin-bottom: 12px;
  color: var(--muted-strong);
  font-size: 14px;
  font-weight: 650;
}

.res-score,
.result-score {
  margin: 12px 0;
  color: var(--gold);
  font-family: var(--font-display);
  font-size: clamp(58px, 12vw, 96px);
  font-weight: 950;
  letter-spacing: -0.075em;
  line-height: 1;
  text-shadow: 0 0 35px rgb(245 189 58 / 0.16);
}

.res-sub,
.result-meta {
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.res-attrs,
.result-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
  margin: 18px 0;
}

.res-attr,
.result-stat {
  min-width: 0;
  padding: 10px 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgb(255 255 255 / 0.035);
  text-align: center;
}

.res-attr span,
.result-stat span {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-overflow: ellipsis;
  text-transform: uppercase;
}

.res-attr b,
.result-stat b {
  color: var(--paper-pure);
  font-family: var(--font-display);
  font-size: 20px;
}

.res-btns,
.result-actions {
  display: flex;
  flex-flow: row wrap;
  justify-content: center;
  gap: 9px;
  margin-top: 23px;
}

.save-ok {
  display: inline-flex;
  min-height: 29px;
  align-items: center;
  margin-top: 9px;
  padding: 4px 10px;
  border: 1px solid rgb(53 201 120 / 0.32);
  border-radius: var(--radius-pill);
  background: rgb(53 201 120 / 0.08);
  color: #86e5ae;
  font-size: 10px;
  font-weight: 750;
}

.share-card {
  position: relative;
  width: min(100%, 720px);
  aspect-ratio: 1.91 / 1;
  overflow: hidden;
  padding: clamp(22px, 5vw, 42px);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background:
    radial-gradient(circle at 83% 24%, rgb(72 167 255 / 0.25), transparent 30%),
    radial-gradient(circle at 20% 110%, rgb(255 106 0 / 0.28), transparent 42%),
    #0c0e13;
  color: var(--paper-pure);
  isolation: isolate;
}

.share-card::after {
  position: absolute;
  right: -3%;
  bottom: -27%;
  z-index: -1;
  color: rgb(255 255 255 / 0.05);
  content: "忍";
  font-family: serif;
  font-size: min(36vw, 280px);
  font-weight: 900;
  line-height: 1;
}

.share-card-brand {
  color: var(--orange);
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.share-card-title {
  max-width: 72%;
  margin-top: 15px;
  font-family: var(--font-display);
  font-size: clamp(25px, 5vw, 50px);
  letter-spacing: -0.065em;
  line-height: 0.95;
}

.share-card-score {
  position: absolute;
  right: clamp(20px, 5vw, 40px);
  bottom: clamp(18px, 4vw, 34px);
  color: var(--gold);
  font-family: var(--font-display);
  font-size: clamp(36px, 8vw, 72px);
  letter-spacing: -0.06em;
}

.rank-row {
  display: grid;
  min-height: 72px;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 11px 4px;
  border-bottom: 1px solid var(--line);
}

.rank-row:first-child {
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  background: linear-gradient(90deg, rgb(245 189 58 / 0.1), transparent);
}

.rank-pos {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface-raised);
  color: var(--paper-pure);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 900;
}

.rank-info {
  min-width: 0;
}

.rank-info > b {
  color: var(--paper-pure);
  font-size: 13px;
  font-weight: 850;
}

.rank-tit {
  margin-left: 6px;
  color: var(--muted);
  font-size: 10px;
}

.rank-det {
  overflow: hidden;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-sc {
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 950;
  letter-spacing: -0.04em;
}

/* -------------------------------------------------------------------------- */
/* Motion                                                                       */
/* -------------------------------------------------------------------------- */

@keyframes content-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes danger-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.62; }
}

@keyframes ticker-drift {
  to { transform: translateX(-33.333%); }
}

/* -------------------------------------------------------------------------- */
/* Tablet                                                                       */
/* -------------------------------------------------------------------------- */

@media (max-width: 980px) {
  :root {
    --header-h: 64px;
  }

  .site-header-inner {
    width: min(calc(100% - 28px), var(--content-max));
    gap: 14px;
  }

  .site-nav,
  .nav-links {
    gap: 0;
  }

  .site-nav a,
  .nav-link {
    padding-inline: 9px;
    font-size: 12px;
  }

  .home,
  .home-page,
  #layout {
    width: min(calc(100% - 28px), var(--content-max));
  }

  #layout {
    grid-template-columns: 252px minmax(0, 1fr);
    gap: 24px;
  }

  #sidebar {
    width: 252px;
  }

  .tarjeta {
    padding: 17px;
  }

  .home-hero {
    min-height: 420px;
    grid-template-columns: minmax(0, 1.2fr) minmax(220px, 0.8fr);
  }

  .quick-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .game-stage,
  .scene-layout {
    grid-template-columns: 1fr;
  }

  .scene-media {
    min-height: 230px;
  }

  .res-attrs,
  .result-stats {
    grid-template-columns: repeat(5, minmax(46px, 1fr));
  }
}

/* -------------------------------------------------------------------------- */
/* Mobile: character sheet becomes a compact game HUD                          */
/* -------------------------------------------------------------------------- */

@media (max-width: 740px) {
  :root {
    --header-h: 58px;
  }

  body {
    background:
      radial-gradient(circle at 50% -8%, rgb(255 106 0 / 0.13), transparent 24rem),
      var(--ink);
  }

  body::before {
    opacity: 0.18;
  }

  .ticker,
  .ticker-track,
  .ticker-label,
  .ticker-item {
    min-height: 36px;
  }

  .ticker-label,
  .ticker-item {
    padding-inline: 12px;
    font-size: 9px;
  }

  .site-header-inner {
    width: calc(100% - 24px);
  }

  .site-brand,
  .brand {
    font-size: 18px;
  }

  .site-brand-mark,
  .brand-mark {
    width: 31px;
    height: 31px;
    border-radius: 9px;
    font-size: 16px;
  }

  .site-nav,
  .nav-links {
    display: none;
  }

  .site-actions .btn:not(.btn-p):not(.btn-primary),
  .nav-actions .btn:not(.btn-p):not(.btn-primary) {
    display: none;
  }

  .site-actions .btn,
  .nav-actions .btn {
    min-height: 38px;
    padding-inline: 14px;
    font-size: 11px;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .home,
  .home-page {
    width: calc(100% - 24px);
    padding: 24px 0 54px;
  }

  .home-hero {
    min-height: 500px;
    grid-template-columns: 1fr;
    background:
      linear-gradient(0deg, rgb(5 6 8 / 0.98) 0 36%, rgb(5 6 8 / 0.18) 80%),
      var(--hero-image, linear-gradient(145deg, #351406, #102b42));
  }

  .home-hero-content {
    align-self: end;
    padding: 26px 22px 30px;
  }

  .home-hero-title {
    font-size: clamp(42px, 14vw, 64px);
  }

  .home-hero-copy {
    margin-top: 14px;
    font-size: 14px;
  }

  .home-hero-actions {
    width: 100%;
    margin-top: 20px;
  }

  .home-hero-actions .btn {
    flex: 1 1 auto;
  }

  .home-hero-aside {
    display: none;
  }

  .home-feature-grid,
  .quick-grid {
    grid-template-columns: 1fr;
  }

  .home-card {
    min-height: 300px;
  }

  .quick-card,
  .quick-grid > a,
  .quick-grid > button {
    min-height: 112px;
  }

  #layout {
    display: flex;
    width: 100%;
    min-height: 100vh;
    flex-direction: column;
    gap: 0;
    padding: 0 0 70px;
  }

  #sidebar {
    position: sticky;
    top: 0;
    z-index: 38;
    width: 100%;
    max-width: none;
    height: auto;
    max-height: none;
    overflow: visible;
    padding: 8px 12px;
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    background: rgb(7 8 10 / 0.93);
    box-shadow: 0 12px 28px rgb(0 0 0 / 0.3);
    backdrop-filter: blur(16px) saturate(1.25);
    -webkit-backdrop-filter: blur(16px) saturate(1.25);
  }

  .site-header ~ #layout #sidebar,
  .app-shell .site-header ~ #layout #sidebar {
    top: var(--header-h);
  }

  #main {
    width: 100%;
    padding: 22px 12px 0;
  }

  .tarjeta {
    display: grid;
    min-height: 69px;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    gap: 3px 10px;
    align-items: center;
    padding: 9px 10px;
    border: 0;
    border-radius: var(--radius-sm);
    background: var(--surface);
    box-shadow: none;
  }

  .tarjeta::before,
  .tarjeta::after {
    display: none;
  }

  .t-nombre {
    grid-column: 1;
    grid-row: 1;
    font-size: 17px;
  }

  .t-rango {
    grid-column: 1;
    grid-row: 2;
    overflow: hidden;
    font-size: 9px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .t-fac {
    display: none;
  }

  .attrs,
  .t-stats {
    display: none;
  }

  .inf-display {
    min-width: 75px;
    min-height: 47px;
    grid-column: 2;
    grid-row: 1 / span 2;
    justify-content: center;
    gap: 6px;
    margin: 0;
    padding: 7px 10px;
    border-radius: 11px;
  }

  .inf-display::after {
    display: none;
  }

  .inf-display .inf-kan {
    font-size: 17px;
  }

  .inf-display .inf-num {
    font-size: 17px;
  }

  .inf-fab {
    right: 14px;
    bottom: max(14px, env(safe-area-inset-bottom));
    width: 52px;
    height: 52px;
  }

  .pantalla-intro {
    width: calc(100% - 24px);
    min-height: calc(100svh - 24px);
    margin: 12px auto;
    padding: 30px 23px;
    border-radius: var(--radius-md);
  }

  .pantalla-intro::before {
    top: 6%;
    right: -4%;
    font-size: 150px;
  }

  .intro-sub {
    font-size: clamp(41px, 14vw, 59px);
  }

  .intro-desc br {
    display: none;
  }

  .pantalla-intro .btn,
  .pantalla-intro .btn-sm {
    width: 100%;
    margin: 7px 0 0;
  }

  .sect-title {
    font-size: clamp(27px, 9vw, 37px);
  }

  .cards-grid {
    grid-template-columns: 1fr;
  }

  .card-sel::after {
    opacity: 1;
    transform: none;
  }

  .nombre-form {
    flex-direction: column;
  }

  .nombre-form .btn {
    width: 100%;
  }

  .game-stage,
  .scene-layout {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .scene-media,
  .scene-media--portrait {
    min-height: 208px;
    border-radius: var(--radius-sm);
  }

  .stage-progress {
    margin-bottom: 14px;
  }

  .ev-titulo {
    font-size: clamp(31px, 10vw, 43px);
  }

  .ev-texto {
    font-size: 15px;
    line-height: 1.57;
  }

  .opcion {
    min-height: 72px;
    padding: 13px 49px 13px 13px;
  }

  .opcion::after {
    right: 12px;
  }

  .op-k {
    width: 31px;
    height: 31px;
    flex-basis: 31px;
    font-size: 18px;
  }

  .op-txt {
    font-size: 13px;
  }

  .req-row {
    margin-left: 43px;
  }

  .cb-versus {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .cb-vs-mid {
    position: absolute;
    left: 50%;
    z-index: 2;
    width: 34px;
    height: 34px;
    font-size: 11px;
    transform: translate(-50%, 35px);
  }

  .cb-ent {
    padding: 13px 10px;
  }

  .cb-name {
    font-size: 12px;
  }

  .cb-hp-row,
  .cb-chk-row {
    grid-template-columns: 23px minmax(0, 1fr);
  }

  .cb-hp-row > :last-child,
  .cb-chk-row > :last-child {
    display: none;
  }

  .jutsu-grid,
  .accion-grid {
    grid-template-columns: 1fr 1fr;
  }

  .btn-jutsu {
    min-height: 92px;
    padding: 11px;
  }

  .path-grid,
  .mentor-grid {
    grid-template-columns: 1fr;
  }

  .resultado,
  .result-card {
    width: calc(100% - 24px);
    margin: 12px auto;
    padding: 34px 18px;
    border-radius: var(--radius-md);
  }

  .res-attrs,
  .result-stats {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 4px;
  }

  .res-attr,
  .result-stat {
    padding: 8px 3px;
  }

  .res-attr b,
  .result-stat b {
    font-size: 16px;
  }

  .res-btns,
  .result-actions {
    flex-direction: column;
  }

  .res-btns .btn,
  .result-actions .btn {
    width: 100%;
  }

  .share-card-title {
    max-width: 82%;
  }

  .rank-row {
    grid-template-columns: 36px minmax(0, 1fr) auto;
    gap: 8px;
  }

  .rank-tit {
    display: block;
    margin: 1px 0 0;
  }

  .rank-det {
    max-width: 52vw;
  }

  .shop-overlay {
    align-items: flex-end;
    padding: 0;
  }

  .shop-modal {
    width: 100%;
    max-height: 88svh;
    padding: 22px 14px max(18px, env(safe-area-inset-bottom));
    border-width: 1px 0 0;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
  }

  .consequence-toast {
    bottom: max(14px, env(safe-area-inset-bottom));
  }
}

@media (max-width: 420px) {
  .jutsu-grid {
    grid-template-columns: 1fr;
  }

  /* En móvil las tres acciones caben en una fila: son etiquetas cortas. */
  .accion-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .btn-jutsu {
    min-height: 78px;
  }

  .res-attrs,
  .result-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .consequence-toast {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .consequence-chips {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
}

/* Respect user settings and keep state changes instantaneous when requested. */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .ticker-track {
    transform: none !important;
  }
}

@media (prefers-contrast: more) {
  :root {
    --muted: #c5c7ce;
    --line: #50545f;
    --line-strong: #727782;
  }

  .btn,
  .card,
  .opcion,
  .path-card,
  .mentor-card,
  .btn-jutsu {
    border-width: 2px;
  }
}

/* -------------------------------------------------------------------------- */
/* Camino Ninja v2 markup additions                                            */
/* -------------------------------------------------------------------------- */

.header-mode {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted-strong);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.header-shop {
  margin: 0;
}

.home-hero-actions .btn,
.home-hero-actions .btn-xl {
  width: auto;
  min-width: 0;
  margin: 0;
}

.home-hero-title,
.home-card-title,
.home-section-title,
.display-title,
.ev-titulo,
.combat-visual h1,
.identity-card h2,
.name-panel label,
.empty-ranking h2 {
  letter-spacing: -0.04em;
  word-spacing: 0.08em;
}

.section-heading-row,
.setup-heading,
.ranking-heading,
.modal-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.leaderboard-preview {
  margin-top: 58px;
}

.leaderboard-preview .home-section-title {
  margin-bottom: 0;
  font-size: clamp(30px, 4vw, 46px);
}

.empty-copy {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.setup-main,
.ranking-main,
.result-main {
  width: min(calc(100% - 40px), var(--content-max));
  margin-inline: auto;
}

.setup-main,
.ranking-main {
  padding: clamp(32px, 5vw, 68px) 0 78px;
}

.setup-progress {
  display: grid;
  max-width: 610px;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  margin-bottom: clamp(32px, 5vw, 58px);
}

.setup-progress span {
  position: relative;
  display: flex;
  min-height: 48px;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
}

.setup-progress span:first-child {
  border-radius: var(--radius-pill) 0 0 var(--radius-pill);
}

.setup-progress span:last-child {
  border-radius: 0 var(--radius-pill) var(--radius-pill) 0;
}

.setup-progress span.is-done {
  border-color: rgb(255 106 0 / 0.46);
  background: rgb(255 106 0 / 0.1);
  color: var(--orange-hot);
}

.setup-progress b {
  color: var(--paper-pure);
  font-family: var(--font-sans);
  font-size: 11px;
}

.setup-heading {
  margin-bottom: 28px;
}

.setup-heading .display-title,
.ranking-heading .display-title {
  margin-bottom: 10px;
}

.setup-copy {
  max-width: 680px;
  color: var(--muted-strong);
  font-size: 15px;
  line-height: 1.6;
}

.setup-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.setup-choice {
  position: relative;
  display: grid;
  width: 100%;
  min-height: 184px;
  grid-template-columns: 84px minmax(0, 1fr) 34px;
  gap: 18px;
  align-items: center;
  overflow: hidden;
  color: var(--paper);
  text-align: left;
}

.setup-choice::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--choice-accent, var(--orange));
  content: "";
}

.choice-kan,
.clan-symbol {
  display: grid;
  width: 76px;
  height: 96px;
  place-items: center;
  border: 1px solid rgb(255 255 255 / 0.11);
  border-radius: var(--radius-sm);
  background:
    radial-gradient(circle at 50% 12%, rgb(255 255 255 / 0.09), transparent 50%),
    rgb(255 255 255 / 0.035);
  color: var(--choice-accent, var(--orange));
  font-family: serif;
  font-size: 40px;
  font-weight: 900;
}

.clan-symbol {
  color: var(--orange);
  font-size: 30px;
}

.choice-content {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
}

.setup-choice .c-n {
  margin: 2px 0 8px;
  color: var(--paper-pure);
  font-family: var(--font-display);
  font-size: 25px;
  letter-spacing: -0.05em;
}

.setup-choice .c-desc {
  margin: 0;
  line-height: 1.5;
}

.setup-choice .c-bonus {
  display: inline-flex;
  margin-top: 12px;
  padding: 4px 9px;
  border: 1px solid rgb(53 201 120 / 0.28);
  border-radius: var(--radius-pill);
  background: rgb(53 201 120 / 0.08);
  color: #7de4a8;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.choice-arrow {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--muted);
  transition: transform 180ms var(--ease-out), color 180ms ease, border-color 180ms ease;
}

.setup-choice:hover .choice-arrow {
  transform: translateX(3px);
  border-color: var(--orange);
  color: var(--orange);
}

.clan-choice {
  min-height: 250px;
  align-items: start;
}

.starter-techs {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 9px;
}

.starter-tech {
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  color: var(--muted-strong);
  font-size: 9px;
}

.starter-techs small {
  width: 100%;
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.identity-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(360px, 1.2fr);
  gap: 18px;
}

.identity-card,
.name-panel {
  position: relative;
  overflow: hidden;
  min-height: 330px;
  padding: clamp(26px, 4vw, 42px);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.identity-card {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background:
    radial-gradient(circle at 90% 10%, color-mix(in srgb, var(--identity-accent) 25%, transparent), transparent 38%),
    var(--surface);
}

.identity-mark {
  position: absolute;
  top: -28px;
  right: -8px;
  color: rgb(255 255 255 / 0.055);
  font-family: serif;
  font-size: 170px;
  font-weight: 900;
  line-height: 1;
}

.identity-card h2 {
  color: var(--paper-pure);
  font-family: var(--font-display);
  font-size: clamp(30px, 4vw, 45px);
  letter-spacing: -0.055em;
  line-height: 1;
}

.identity-card p,
.name-panel p {
  margin-top: 12px;
  color: var(--muted-strong);
}

.identity-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 18px;
}

.identity-tags span {
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  color: var(--muted-strong);
  font-size: 9px;
}

.name-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.name-panel label {
  color: var(--paper-pure);
  font-family: var(--font-display);
  font-size: clamp(31px, 4vw, 48px);
  font-weight: 950;
  letter-spacing: -0.06em;
  line-height: 1;
}

.name-panel small {
  margin-top: 8px;
  color: var(--muted);
}

.form-error {
  min-height: 22px;
  margin-top: 8px;
  color: var(--red-soft);
  font-size: 12px;
  font-weight: 700;
}

.player-heading {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 11px;
}

.player-heading > span:last-child {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.player-avatar {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  place-items: center;
  border: 1px solid rgb(255 106 0 / 0.38);
  border-radius: 12px;
  background: rgb(255 106 0 / 0.12);
  color: var(--orange);
  font-family: var(--font-display);
  font-size: 20px;
}

.inf-display {
  width: 100%;
  color: var(--paper);
  text-align: left;
}

.inf-display > span:nth-child(2) {
  display: flex;
  flex: 1;
  flex-direction: column;
}

.inf-display small {
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.campaign-strip {
  border-bottom: 1px solid var(--line);
  background: #0a0b0e;
}

.campaign-strip-inner {
  display: grid;
  width: min(calc(100% - 40px), var(--content-max));
  min-height: 46px;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  margin-inline: auto;
}

.campaign-node {
  position: relative;
  display: flex;
  align-items: center;
  gap: 7px;
  color: #5f626c;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.campaign-node::after {
  position: absolute;
  right: 9px;
  left: 18px;
  height: 1px;
  background: var(--line);
  content: "";
}

.campaign-node:last-child::after {
  display: none;
}

.campaign-node i {
  position: relative;
  z-index: 1;
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
  background: #3c3f48;
}

.campaign-node.is-done,
.campaign-node.is-active {
  color: var(--muted-strong);
}

.campaign-node.is-done i {
  background: var(--leaf);
}

.campaign-node.is-active {
  color: var(--orange-hot);
}

.campaign-node.is-active i {
  background: var(--orange);
  box-shadow: 0 0 12px rgb(255 106 0 / 0.75);
}

.decision-prompt {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin: 18px 0 10px;
}

/* ── Desenlace ──────────────────────────────────────────────────────────────
   El cierre narrativo de la partida. El tono se lee de un vistazo por el color
   del borde: luminoso, gris u oscuro. */
.final-card {
  overflow: hidden;
  margin: 22px 0 4px;
  padding: 20px 22px;
  border-radius: 14px;
  border: 1px solid var(--bdr, rgba(255, 255, 255, 0.14));
  border-left-width: 4px;
  background: rgba(255, 255, 255, 0.03);
  text-align: left;
}

.final-visual {
  position: relative;
  aspect-ratio: 1672 / 941;
  overflow: hidden;
  margin: -20px -22px 19px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  background: #111319;
}

.final-visual::after {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(0deg, rgba(5, 6, 8, 0.72), transparent 50%);
  content: "";
}

.final-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--final-position, center);
}

.final-visual figcaption {
  position: absolute;
  right: 16px;
  bottom: 12px;
  left: 16px;
  z-index: 1;
  color: #f1f2f5;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-shadow: 0 2px 10px #000;
}

.final-gris .final-visual img { filter: saturate(0.72) contrast(1.04); }
.final-oscuro .final-visual img { filter: saturate(0.88) contrast(1.08) brightness(0.8); }

.final-visual-death {
  margin: 20px 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.final-luminoso {
  border-left-color: #f5bd3a;
  background: linear-gradient(100deg, rgba(245, 189, 58, 0.09), rgba(255, 255, 255, 0.02) 60%);
}

.final-gris {
  border-left-color: #8b91a0;
  background: linear-gradient(100deg, rgba(139, 145, 160, 0.08), rgba(255, 255, 255, 0.02) 60%);
}

.final-oscuro {
  border-left-color: #b5473f;
  background: linear-gradient(100deg, rgba(181, 71, 63, 0.1), rgba(255, 255, 255, 0.02) 60%);
}

.final-tono {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
  opacity: 0.75;
  margin-bottom: 8px;
}

.final-luminoso .final-tono { color: #f5bd3a; }
.final-gris .final-tono { color: #a8aeba; }
.final-oscuro .final-tono { color: #e0736a; }

.final-titulo {
  font-family: 'Barlow Condensed', 'Archivo', sans-serif;
  font-size: clamp(22px, 3.4vw, 30px);
  font-weight: 800;
  line-height: 1.1;
  margin: 0 0 10px;
}

.final-texto {
  font-size: 14.5px;
  line-height: 1.65;
  margin: 0;
  opacity: 0.92;
}

.final-ecos-wrap {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed var(--bdr, rgba(255, 255, 255, 0.14));
}

.final-ecos-label {
  display: block;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  opacity: 0.6;
  margin-bottom: 9px;
}

.final-ecos {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.final-ecos li {
  font-size: 13.5px;
  line-height: 1.55;
  opacity: 0.85;
}

@media (max-width: 640px) {
  .final-card {
    padding: 16px 15px;
    margin: 18px 0 4px;
  }

  .final-visual {
    margin: -16px -15px 16px;
  }

  .final-visual img {
    object-position: var(--final-position-mobile, var(--final-position, center));
  }

  .final-visual-death {
    margin: 18px 0;
  }

  .final-texto { font-size: 14px; }
  .final-ecos li { font-size: 13px; }
}

/* Progreso de colección de finales: el gancho para volver a jugar. */
.final-coleccion {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed var(--bdr, rgba(255, 255, 255, 0.14));
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.final-nuevo {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #f5bd3a;
}

.final-repetido {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.55;
}

.final-progreso {
  font-size: 13.5px;
  font-weight: 700;
}

.final-barra {
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.09);
  overflow: hidden;
}

.final-barra > div {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, #f5bd3a, #e08a2e);
  transition: width 0.5s ease;
}

.final-coleccion small {
  font-size: 12.5px;
  opacity: 0.7;
}

/* ── Opening Zero ───────────────────────────────────────────────────────────
   El juego es promoción del podcast, así que la marca aparece en el header
   (discreta), en el home, dentro del HUD durante la partida y al terminar. */

.oz-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 15px;
  border-radius: 999px;
  border: 1px solid var(--bdr, rgba(255, 255, 255, 0.16));
  background: rgba(255, 255, 255, 0.04);
  color: inherit;
  text-decoration: none;
  font-weight: 700;
  font-size: 13.5px;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.oz-link:hover,
.oz-link:focus-visible {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.08);
}

.oz-yt:hover,
.oz-yt:focus-visible { border-color: #ff4b3e; color: #ff6a5e; }

.oz-ig:hover,
.oz-ig:focus-visible { border-color: #d6349a; color: #f05bb5; }

.oz-links {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 14px;
}

.oz-links-sm { margin-top: 0; }
.oz-links-sm .oz-link { padding: 6px 12px; font-size: 12.5px; }

/* Firma del header: la más chica, sin competir con la navegación. */
.oz-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--bdr, rgba(255, 255, 255, 0.16));
  color: var(--txt2, #a0a0a0);
  text-decoration: none;
  font-size: 11.5px;
  letter-spacing: 0.02em;
  white-space: nowrap;
  transition: color 0.18s ease, border-color 0.18s ease;
}

.oz-tag b { color: var(--acc, #ff6a00); font-weight: 800; }

.oz-tag:hover,
.oz-tag:focus-visible {
  color: var(--txt, #f0f0f0);
  border-color: var(--acc, #ff6a00);
}

/* CTA persistente del HUD: visible mientras se juega, sin tapar decisiones. */
.oz-playing {
  position: relative;
  z-index: 1;
  margin-top: 3px;
  padding: 11px;
  border: 1px solid rgb(255 106 0 / 0.34);
  border-radius: 12px;
  background:
    radial-gradient(120% 180% at 100% 0, rgb(255 106 0 / 0.15), transparent 58%),
    rgb(0 0 0 / 0.24);
}

.oz-playing-kicker {
  display: block;
  margin-bottom: 7px;
  color: #ffc28f;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.oz-playing a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--paper-pure);
  text-decoration: none;
}

.oz-playing a > span {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.oz-playing b {
  overflow: hidden;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 950;
  letter-spacing: -0.035em;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.oz-playing small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.oz-playing strong {
  flex: none;
  padding: 5px 7px;
  border-radius: 7px;
  background: var(--orange);
  color: #111;
  font-size: 9px;
  font-weight: 950;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.oz-playing a:hover strong,
.oz-playing a:focus-visible strong {
  background: var(--orange-hot);
}

.oz-kicker {
  display: block;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  opacity: 0.6;
  margin-bottom: 5px;
}

.oz-title {
  font-family: 'Barlow Condensed', 'Archivo', sans-serif;
  font-size: clamp(24px, 3.6vw, 32px);
  font-weight: 900;
  letter-spacing: 0.01em;
  line-height: 1;
  margin: 0 0 9px;
}

.oz-title-lg { font-size: clamp(30px, 5vw, 46px); }

.oz-copy {
  font-size: 14.5px;
  line-height: 1.6;
  margin: 0;
  opacity: 0.88;
  max-width: 56ch;
}

/* Llamada al terminar la partida. */
.oz-cta {
  margin: 20px auto 0;
  max-width: 720px;
  padding: 22px 24px;
  border-radius: 16px;
  border: 1px solid rgba(255, 106, 0, 0.32);
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(255, 106, 0, 0.14), transparent 62%),
    rgba(255, 255, 255, 0.03);
  text-align: left;
}

/* Bloque del home, con la marca en grande al costado. */
.oz-home {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 26px 28px;
  border-radius: 18px;
  border: 1px solid rgba(255, 106, 0, 0.28);
  background:
    radial-gradient(110% 150% at 100% 0%, rgba(255, 106, 0, 0.16), transparent 60%),
    rgba(255, 255, 255, 0.03);
}

.oz-home-mark {
  font-family: 'Barlow Condensed', 'Archivo', sans-serif;
  font-size: clamp(72px, 12vw, 132px);
  font-weight: 900;
  line-height: 0.8;
  color: transparent;
  -webkit-text-stroke: 2px rgba(255, 106, 0, 0.42);
  user-select: none;
}

.oz-footer {
  margin-top: 34px;
  padding: 22px 4px 8px;
  border-top: 1px solid var(--bdr, rgba(255, 255, 255, 0.14));
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: var(--txt2, #a0a0a0);
}

.oz-footer b { color: var(--acc, #ff6a00); }

.oz-footer small {
  flex-basis: 100%;
  font-size: 11.5px;
  opacity: 0.62;
}

@media (max-width: 760px) {
  /* En pantallas chicas la firma del header estorba; el CTA del HUD permanece. */
  .oz-tag { display: none; }

  .tarjeta .oz-playing {
    display: flex;
    min-width: 0;
    grid-column: 1 / -1;
    grid-row: 3;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 5px;
    padding: 7px 9px;
  }

  .oz-playing-kicker {
    margin: 0;
    font-size: 8px;
    white-space: nowrap;
  }

  .oz-playing a {
    min-width: 0;
    flex: 1;
  }

  .oz-playing b {
    font-size: 15px;
  }

  .oz-playing small {
    display: none;
  }

  .oz-playing strong {
    font-size: 8px;
  }

  .oz-home {
    grid-template-columns: 1fr;
    padding: 20px 18px;
  }

  .oz-home-mark { display: none; }

  .oz-cta {
    padding: 18px 16px;
    border-radius: 14px;
  }

  .oz-footer { justify-content: flex-start; }
}

.combat-prompt {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.decision-prompt span,
.combat-prompt strong {
  color: var(--paper-pure);
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: -0.04em;
}

.decision-prompt small,
.combat-prompt span {
  color: var(--muted);
  font-size: 10px;
}

button.opcion {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--paper);
  text-align: left;
}

.option-flavor {
  margin-left: auto;
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  color: var(--muted);
  font-size: 8px;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.option-flavor.is-good {
  border-color: rgb(53 201 120 / 0.3);
  color: #7de4a8;
}

.option-flavor.is-risk,
.option-flavor.is-danger {
  border-color: rgb(228 60 53 / 0.34);
  color: #ff8b86;
}

.chapter-report {
  display: grid;
  gap: 16px;
}

.report-hero {
  position: relative;
  min-height: 390px;
  overflow: hidden;
  padding: clamp(28px, 5vw, 56px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(90deg, rgb(5 6 8 / 0.97), rgb(5 6 8 / 0.76) 55%, rgb(5 6 8 / 0.22)),
    var(--report-image);
  background-position: var(--report-position, center);
  background-size: cover;
  box-shadow: var(--shadow-card);
}

.report-hero .display-title {
  max-width: 560px;
}

.report-hero > p {
  max-width: 520px;
  color: #d1d3da;
}

.report-totals {
  max-width: 540px;
  margin: 22px 0;
}

.report-details summary,
.score-breakdown summary {
  cursor: pointer;
  color: var(--paper-pure);
  font-weight: 800;
}

.combat-visual {
  min-height: 230px;
  margin-bottom: 16px;
  padding: clamp(26px, 5vw, 46px);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background:
    linear-gradient(90deg, rgb(5 6 8 / 0.94), rgb(5 6 8 / 0.24)),
    var(--combat-image);
  background-position: var(--combat-position, center);
  background-size: cover;
  box-shadow: var(--shadow-card);
}

.combat-visual h1 {
  max-width: 700px;
  color: var(--paper-pure);
  font-family: var(--font-display);
  font-size: clamp(34px, 6vw, 62px);
  letter-spacing: -0.065em;
  line-height: 0.95;
}

.combat-visual h1 i {
  color: var(--orange);
  font-style: normal;
}

.path-card {
  width: 100%;
  border-top: 1px solid var(--line);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--paper);
  text-align: left;
}

.path-lock.is-open {
  color: var(--leaf);
}

.modal-heading {
  align-items: flex-start;
}

.modal-close,
.toast-close {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--surface-raised);
  color: var(--paper);
  cursor: pointer;
  font-size: 20px;
}

.shop-intro {
  color: var(--muted);
  font-size: 12px;
}

.mentor-owned {
  color: var(--leaf);
  font-size: 10px;
  font-weight: 800;
}

.consequence-toast {
  grid-template-columns: auto minmax(0, 1fr) auto;
  pointer-events: none;
}

.consequence-toast::before {
  grid-column: 1;
  grid-row: 1 / 3;
}

.consequence-toast > div:first-of-type {
  min-width: 0;
  grid-column: 2;
  grid-row: 1;
}

.consequence-toast .consequence-chips {
  grid-column: 2;
  grid-row: 2;
  justify-content: flex-start;
}

.consequence-toast .toast-close {
  grid-column: 3;
  grid-row: 1;
  pointer-events: auto;
}

.consequence-toast.is-visible,
.consequence-toast[data-visible="true"] {
  pointer-events: none;
}

.result-main {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.9fr);
  gap: 22px;
  align-items: center;
  padding: clamp(28px, 5vw, 62px) 0 78px;
}

.result-main .result-card {
  width: 100%;
  margin: 0;
}

.result-main .result-title,
.result-main .share-card-title {
  letter-spacing: -0.025em;
  word-spacing: 0.06em;
  line-height: 1;
}

.result-main .result-stats {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.result-main .share-card {
  position: sticky;
  top: calc(var(--header-h) + 20px);
}

.result-score small {
  font-size: 18px;
  letter-spacing: 0;
}

.career-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin: 13px 0;
}

.career-summary span {
  padding: 8px 5px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xs);
  color: var(--muted);
  font-size: 8px;
  text-transform: uppercase;
}

.career-summary b {
  display: block;
  color: var(--paper-pure);
  font-family: var(--font-display);
  font-size: 20px;
}

.score-breakdown {
  margin-top: 14px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  text-align: left;
}

.score-breakdown > div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.score-part {
  padding: 5px 8px;
  border-radius: var(--radius-pill);
  background: var(--surface-raised);
  color: var(--muted);
  font-size: 9px;
  text-transform: capitalize;
}

.score-part b {
  color: var(--gold);
}

.ranking-heading {
  margin-bottom: 30px;
}

.leaderboard-card {
  padding: clamp(18px, 4vw, 30px);
}

.leaderboard-columns {
  display: flex;
  justify-content: space-between;
  padding: 0 4px 11px;
  border-bottom: 1px solid var(--line-strong);
  color: var(--muted);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.empty-ranking {
  display: flex;
  min-height: 320px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.empty-ranking > span {
  color: rgb(255 106 0 / 0.28);
  font-family: serif;
  font-size: 72px;
}

.empty-ranking h2 {
  color: var(--paper-pure);
  font-family: var(--font-display);
  font-size: 28px;
}

.empty-ranking p {
  margin: 6px 0 18px;
  color: var(--muted);
}

@media (max-width: 980px) {
  .setup-grid {
    grid-template-columns: 1fr;
  }

  .identity-layout,
  .result-main {
    grid-template-columns: 1fr;
  }

  .result-main .share-card {
    position: relative;
    top: auto;
    margin-inline: auto;
  }

  .campaign-node {
    font-size: 0;
  }

  .campaign-node i {
    width: 8px;
    height: 8px;
  }
}

@media (max-width: 700px) {
  .header-mode,
  .site-nav {
    display: none;
  }

  .site-header-inner,
  .setup-main,
  .ranking-main,
  .result-main,
  .campaign-strip-inner {
    width: min(calc(100% - 28px), var(--content-max));
  }

  .section-heading-row,
  .setup-heading,
  .ranking-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .setup-progress b {
    display: none;
  }

  .setup-progress span {
    justify-content: center;
  }

  .setup-choice {
    min-height: 154px;
    grid-template-columns: 62px minmax(0, 1fr) 28px;
    gap: 12px;
    padding: 14px;
  }

  .choice-kan,
  .clan-symbol {
    width: 58px;
    height: 76px;
    font-size: 29px;
  }

  .clan-choice {
    min-height: 230px;
  }

  .identity-card,
  .name-panel {
    min-height: 270px;
    padding: 24px;
  }

  .nombre-form {
    align-items: stretch;
    flex-direction: column;
  }

  .campaign-strip-inner {
    min-height: 36px;
  }

  .campaign-node::after {
    right: 4px;
    left: 13px;
  }

  .game-stage,
  .scene-layout {
    display: flex;
    flex-direction: column-reverse;
  }

  .scene-media {
    width: 100%;
    min-height: 210px;
  }

  .scene-media > img,
  .scene-media picture > img {
    object-position: var(--scene-position-mobile, var(--scene-position, center));
  }

  .option-flavor {
    display: none;
  }

  .decision-prompt,
  .combat-prompt {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }

  .report-hero {
    min-height: 430px;
    background:
      linear-gradient(0deg, rgb(5 6 8 / 0.98), rgb(5 6 8 / 0.48)),
      var(--report-image);
    background-position: var(--report-position-mobile, var(--report-position, center));
    background-size: cover;
  }

  .combat-visual {
    min-height: 190px;
    background-position: var(--combat-position-mobile, var(--combat-position, center));
  }

  .career-summary {
    grid-template-columns: repeat(2, 1fr);
  }

  .result-main .result-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .consequence-toast {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .consequence-toast .consequence-chips {
    grid-column: 2 / -1;
    grid-row: 2;
  }
}

@media (max-width: 430px) {
  .setup-choice {
    grid-template-columns: 52px minmax(0, 1fr);
  }

  .choice-kan,
  .clan-symbol {
    width: 48px;
    height: 64px;
    font-size: 24px;
  }

  .choice-arrow {
    display: none;
  }

  .setup-choice .c-n {
    font-size: 21px;
  }

  .starter-techs {
    display: none;
  }

  .clan-choice {
    min-height: 190px;
  }
}

/* -------------------------------------------------------------------------- */
/* V6 — inicio aleatorio, modo de resolución y desafíos                        */
/* -------------------------------------------------------------------------- */

/* La creación de personaje pasó de tres pasos a cuatro. */
.setup-progress {
  max-width: 720px;
  grid-template-columns: repeat(4, 1fr);
}

.setup-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.btn-azar {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-color: rgb(245 189 58 / 0.42);
  background: linear-gradient(140deg, rgb(245 189 58 / 0.13), var(--surface));
  color: var(--gold);
}

.btn-azar:hover {
  border-color: rgb(245 189 58 / 0.8);
  color: var(--paper-pure);
}

.azar-dado {
  font-family: serif;
  font-size: 17px;
  line-height: 1;
}

.modo-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
}

.modo-choice {
  min-height: 210px;
}

/* ── Pantalla de desafío ─────────────────────────────────────────────────── */

.desafio-stage {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(18px, 3vw, 34px);
  align-items: start;
}

.desafio-header {
  margin-bottom: 20px;
}

.desafio-eyebrow {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 8px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.desafio-modo {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  padding: 3px 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  background: var(--surface-raised);
  color: var(--chakra);
  letter-spacing: 0.08em;
}

.desafio-stage.is-alto .desafio-eyebrow {
  color: var(--gold);
}

.desafio-stage.is-alto .desafio-modo {
  border-color: rgb(245 189 58 / 0.5);
  color: var(--gold);
}

.desafio-cuerpo {
  display: grid;
  gap: 14px;
}

.desafio-prompt {
  color: var(--paper-pure);
  font-family: var(--font-display);
  font-size: clamp(19px, 2.4vw, 25px);
  font-weight: 700;
  line-height: 1.2;
  text-transform: uppercase;
}

.desafio-nota {
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.5;
}

.desafio-aviso {
  margin-top: 10px;
  padding: 9px 13px;
  border: 1px solid rgb(228 60 53 / 0.42);
  border-radius: var(--radius-sm);
  background: rgb(228 60 53 / 0.1);
  color: var(--red-soft);
  font-size: 13px;
}

.desafio-media {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.desafio-media > img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 420px;
  object-fit: cover;
  object-position: center 42%;
  filter: saturate(0.92) brightness(0.86);
}

/* Apuesta a ciegas (modo azar) */
.desafio-apuesta {
  display: grid;
  gap: 10px;
}

.desafio-puerta .op-k {
  font-family: serif;
  font-size: 20px;
}

/* Teoría ninja */
.desafio-marcador {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
}

.desafio-pregunta {
  color: var(--paper-pure);
  font-size: clamp(16px, 2vw, 19px);
  font-weight: 700;
  line-height: 1.45;
}

.desafio-respuestas {
  display: grid;
  gap: 9px;
}

/* Cadena de sellos */
.sellos-secuencia {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  padding: 18px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--surface-raised);
}

.sello-grande {
  display: grid;
  min-width: 68px;
  gap: 3px;
  padding: 10px 6px;
  border: 1px solid rgb(72 167 255 / 0.34);
  border-radius: var(--radius-sm);
  background: rgb(72 167 255 / 0.08);
  color: var(--chakra);
  font-family: serif;
  font-size: 32px;
  line-height: 1;
  text-align: center;
}

.sello-grande small {
  color: var(--muted-strong);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.sellos-cuenta {
  height: 4px;
  overflow: hidden;
  border-radius: var(--radius-pill);
  background: var(--line);
}

.sellos-cuenta > i {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--chakra), var(--orange));
  transform-origin: left center;
  animation: sellos-drena var(--sellos-ms, 3s) linear forwards;
}

@keyframes sellos-drena {
  from { transform: scaleX(1); }
  to { transform: scaleX(0); }
}

.sellos-progreso {
  display: flex;
  gap: 7px;
  justify-content: center;
}

.sellos-progreso > i {
  width: 26px;
  height: 5px;
  border-radius: var(--radius-pill);
  background: var(--line-strong);
  transition: background 160ms ease;
}

.sellos-progreso > i.is-done {
  background: var(--leaf);
}

.sellos-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.sello-btn {
  display: grid;
  gap: 2px;
  padding: 11px 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--paper);
  cursor: pointer;
  font-family: serif;
  font-size: 24px;
  line-height: 1;
  transition: border-color 140ms ease, background 140ms ease, transform 140ms var(--ease-out);
}

.sello-btn small {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.sello-btn:hover {
  border-color: rgb(72 167 255 / 0.7);
  background: rgb(72 167 255 / 0.1);
  transform: translateY(-2px);
}

/* Puntería */
.punteria-pista {
  position: relative;
  height: 54px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background:
    repeating-linear-gradient(90deg, rgb(255 255 255 / 0.05) 0 1px, transparent 1px 28px),
    var(--surface-raised);
}

.punteria-zona {
  position: absolute;
  top: 0;
  bottom: 0;
  border-inline: 1px solid rgb(53 201 120 / 0.8);
  background: linear-gradient(180deg, rgb(53 201 120 / 0.3), rgb(53 201 120 / 0.12));
}

.punteria-cursor {
  position: absolute;
  top: -4px;
  bottom: -4px;
  left: 0;
  width: 4px;
  border-radius: var(--radius-pill);
  background: var(--orange-hot);
  box-shadow: 0 0 14px rgb(255 129 39 / 0.85);
  transform: translateX(-2px);
}

.btn-punteria {
  justify-self: start;
  min-width: 190px;
}

/* Cierre */
.desafio-cierre {
  display: grid;
  gap: 12px;
  padding: clamp(16px, 2.4vw, 22px);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.desafio-cierre.is-win {
  border-color: rgb(53 201 120 / 0.5);
  background: linear-gradient(150deg, rgb(53 201 120 / 0.1), var(--surface));
}

.desafio-cierre.is-lose {
  border-color: rgb(228 60 53 / 0.5);
  background: linear-gradient(150deg, rgb(228 60 53 / 0.1), var(--surface));
}

.desafio-veredicto {
  font-family: var(--font-display);
  font-size: clamp(24px, 3.2vw, 34px);
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.desafio-cierre.is-win .desafio-veredicto {
  color: var(--leaf);
}

.desafio-cierre.is-lose .desafio-veredicto {
  color: var(--red-soft);
}

.desafio-detalle {
  color: var(--paper);
  font-size: 14px;
  line-height: 1.55;
}

.desafio-summary {
  color: var(--muted-strong);
  font-size: 14.5px;
  line-height: 1.65;
}

.desafio-revelado {
  display: flex;
  gap: 8px;
}

.desafio-revelado > span {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  font-family: serif;
  font-size: 19px;
}

.desafio-revelado > span.is-win {
  border-color: rgb(53 201 120 / 0.8);
  background: rgb(53 201 120 / 0.18);
  color: var(--leaf);
}

.desafio-revelado > span.is-lose {
  color: var(--muted);
}

.desafio-revelado > span.is-picked {
  outline: 2px solid var(--orange-hot);
  outline-offset: 2px;
}

@media (max-width: 900px) {
  .desafio-stage {
    grid-template-columns: minmax(0, 1fr);
  }

  .desafio-media {
    order: -1;
  }

  .desafio-media > img {
    max-height: 190px;
  }
}

@media (max-width: 720px) {
  .setup-progress {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
  }

  .setup-progress span,
  .setup-progress span:first-child,
  .setup-progress span:last-child {
    border-radius: var(--radius-sm);
  }

  .sellos-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .sello-grande {
    min-width: 56px;
    font-size: 26px;
  }

  .btn-punteria {
    justify-self: stretch;
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sellos-cuenta > i {
    animation: none;
    transform: scaleX(0.5);
  }
}
