/* Gravle Studio · Battle Maker. Oscuro y neutro: el color lo ponen los luchadores; un solo acento (amarillo) para la acción principal. */
:root {
  color-scheme: dark;
  --bg: #0b0d14; --s1: #141827; --s2: #1b2033; --line: #262c42; --line2: #1f2438;
  --text: #eef1f8; --muted: #9aa3bd; --gold: #ffd166; --gold-d: #c99a2e; --pink: #f72585;
  --display: 'Bricolage Grotesque', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 400 15px/1.4 Inter, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
[tabindex="-1"]:focus { outline: none; }
.app { max-width: 430px; margin: 0 auto; min-height: 100dvh; position: relative; }
.screen { min-height: 100dvh; display: flex; flex-direction: column; padding-bottom: 104px; }

.top { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 4px 12px; gap: 8px; min-height: 60px; }
.top.end { justify-content: flex-end; }
.logo { font-family: var(--display); font-weight: 800; font-size: 20px; letter-spacing: -0.02em; color: var(--text); text-decoration: none; padding-left: 8px; }
.logo b { color: var(--pink); } .logo span { color: var(--muted); font-weight: 700; }
.title { font-family: var(--display); font-weight: 800; font-size: 18px; }
.steps { display: flex; gap: 6px; align-items: center; padding-right: 4px; }
.steps i { width: 6px; height: 6px; border-radius: 3px; background: #2a3048; }
.steps i.on { background: var(--gold); } .steps i.wide { width: 22px; }
.icon-btn { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border: 0; background: none; border-radius: 12px; cursor: pointer; color: var(--text); flex-shrink: 0; }
.icon-btn.solid { background: var(--line); }
.intro { padding: 6px 20px 0; }
.intro h1, .result h1 { margin: 0; font-family: var(--display); font-weight: 800; font-size: 30px; line-height: 1.05; letter-spacing: -0.02em; }
.intro p { margin: 6px 0 0; color: var(--muted); font-size: 14px; }

/* versus */
.versus { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 16px 20px 0; }
.slot { position: relative; height: 210px; border-radius: 22px; border: 2px solid #2a3048; background: radial-gradient(120% 90% at 50% 30%, var(--glow, #3a4256) 0%, var(--s1) 70%); display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding: 0 10px 14px; cursor: pointer; overflow: hidden; transition: border-color .15s; }
.slot.active { border-color: var(--c, #fff); }
.slot canvas { width: 170px; height: 105px; margin-bottom: 6px; }
.slot b { font-family: var(--display); font-weight: 800; font-size: 26px; line-height: 1; color: var(--c); }
.slot small { font-size: 12px; color: #b4bbd4; margin-top: 4px; text-align: center; min-height: 2.6em; }
.slot .badge { position: absolute; top: 12px; left: 12px; font-size: 11px; font-weight: 800; letter-spacing: .08em; color: var(--bg); background: var(--c, #fff); padding: 3px 8px; border-radius: 99px; }
#slot1 .badge { left: auto; right: 12px; }
.vs { position: absolute; left: 50%; top: 95px; transform: translateX(-50%); width: 52px; height: 52px; border-radius: 50%; background: var(--gold); color: var(--bg); display: flex; align-items: center; justify-content: center; font-family: var(--display); font-weight: 800; font-size: 19px; border: 4px solid var(--bg); pointer-events: none; }

.row-head { display: flex; align-items: center; gap: 14px; padding: 18px 20px 8px; }
.row-head h2 { margin: 0; flex-grow: 1; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.text-btn { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; font-weight: 600; font-size: 14px; cursor: pointer; min-height: 44px; padding: 0; }
.text-btn.gold { color: var(--gold); font-weight: 700; font-size: 15px; }
.soon-chip { font-size: 12px; font-weight: 700; color: var(--muted); border: 1px dashed #3a4160; border-radius: 99px; padding: 4px 10px; }

.roster { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 0 20px; }
.tile { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 4px 9px; border-radius: 16px; background: var(--s1); border: 2px solid var(--line2); cursor: pointer; min-height: 88px; }
.tile canvas { width: 72px; height: 44px; }
.tile span { font-size: 12px; font-weight: 700; white-space: nowrap; }
.tile.sel { border-color: var(--c); box-shadow: 0 0 16px color-mix(in srgb, var(--c) 30%, transparent); }
.tile .badge { position: absolute; top: 5px; right: 5px; font-size: 9px; font-weight: 800; padding: 2px 5px; border-radius: 99px; color: var(--bg); background: var(--c); }
.tile .new { position: absolute; top: 5px; left: 5px; font-size: 9px; font-weight: 800; padding: 2px 5px; border-radius: 99px; color: var(--bg); background: var(--gold); }

/* barra inferior con la acción principal */
.cta-bar { position: fixed; left: 50%; bottom: 0; transform: translateX(-50%); width: 100%; max-width: 430px; padding: 18px 20px calc(22px + env(safe-area-inset-bottom)); background: linear-gradient(180deg, rgba(11,13,20,0) 0%, var(--bg) 35%); z-index: 5; }
.cta { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 58px; border-radius: 16px; border: 0; background: var(--gold); color: var(--bg); font-weight: 800; font-size: 17px; text-decoration: none; box-shadow: 0 6px 0 var(--gold-d); cursor: pointer; transition: transform .08s, box-shadow .08s; }
.cta:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--gold-d); }
.cta:disabled { opacity: .45; cursor: default; }

/* combate */
.pair-chip { display: flex; align-items: center; gap: 6px; background: var(--s1); border: 1px solid var(--line); border-radius: 99px; padding: 3px 12px 3px 4px; font-size: 13px; font-weight: 700; min-width: 0; }
.pair-chip canvas { width: 44px; height: 28px; }
.styles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 16px 20px 0; }
.styles button { text-align: left; padding: 12px; border-radius: 16px; background: var(--s1); border: 2px solid var(--line2); cursor: pointer; display: flex; flex-direction: column; }
.styles svg { width: 22px; height: 22px; fill: none; stroke: var(--muted); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.styles b { font-weight: 800; font-size: 15px; margin-top: 6px; }
.styles small { font-size: 12px; color: var(--muted); margin-top: 2px; }
.styles [aria-checked="true"], .results [aria-checked="true"] { background: #221d10; border-color: var(--gold); }
.styles [aria-checked="true"] svg { stroke: var(--gold); }
.styles [aria-checked="true"] small { color: #c7c0a8; }
.progress { margin: 0 20px 10px; height: 34px; border-radius: 12px; background: var(--s1); position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.progress span { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: #2a2410; transition: width .2s; }
.progress em { position: relative; font-style: normal; font-size: 13px; font-weight: 600; color: var(--muted); }
.results { display: flex; flex-direction: column; gap: 8px; padding: 0 20px; }
.fight { display: flex; align-items: center; gap: 12px; padding: 8px 12px 8px 8px; border-radius: 16px; background: var(--s1); border: 2px solid var(--line2); cursor: pointer; text-align: left; }
.fight canvas { width: 72px; height: 50px; flex-shrink: 0; border-radius: 10px; background: var(--bg); }
.fight .info { display: flex; flex-direction: column; gap: 5px; flex-grow: 1; }
.fight .who { font-weight: 800; font-size: 15px; }
.fight .tags { display: flex; gap: 6px; flex-wrap: wrap; }
.fight .tags span { font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 99px; background: var(--line); }
.fight .meta { font-size: 12px; color: var(--muted); }
.fight .dot { width: 20px; height: 20px; border-radius: 50%; border: 2px solid #3a4160; flex-shrink: 0; }
.fight[aria-checked="true"] .dot { border: 6px solid var(--gold); }
.empty { color: var(--muted); font-size: 14px; padding: 10px 0; }

/* personalizar */
.preview { display: flex; justify-content: center; padding: 4px 20px 0; }
.phone { position: relative; width: 162px; height: 288px; border-radius: 20px; overflow: hidden; border: 1px solid #2a3048; background: #000; box-shadow: 0 20px 60px rgba(255,209,102,.10); }
.phone iframe { width: 100%; height: 100%; border: 0; display: block; }
.play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 56px; height: 56px; border-radius: 50%; border: 0; background: rgba(11,13,20,.72); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.fields { padding: 14px 20px 0; display: flex; flex-direction: column; gap: 10px; }
.fields label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 700; color: var(--muted); }
.fields input { height: 46px; padding: 0 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--s1); color: var(--text); font: 600 15px Inter, sans-serif; }
.fields input:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
.opts { margin: 14px 20px 0; border-radius: 16px; background: var(--s1); border: 1px solid var(--line2); }
.opt { position: relative; display: flex; align-items: center; justify-content: space-between; min-height: 46px; padding: 0 14px; cursor: pointer; font-weight: 600; }
.opt + .opt { border-top: 1px solid var(--line2); }
.opt span { display: flex; align-items: center; gap: 8px; }
.opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.opt i { width: 44px; height: 26px; border-radius: 13px; background: #2a3048; position: relative; flex-shrink: 0; transition: background .15s; }
.opt i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--muted); transition: left .15s, background .15s; }
.opt input:checked + i { background: var(--gold); }
.opt input:checked + i::after { left: 21px; background: var(--bg); }
.opt input:focus-visible + i { outline: 2px solid var(--gold); outline-offset: 2px; }
.opt.off { cursor: default; color: var(--muted); }
.tag { font-style: normal; font-size: 10px; font-weight: 800; letter-spacing: .06em; padding: 2px 7px; border-radius: 99px; }
.tag.gold { background: var(--gold); color: var(--bg); } .tag.pink { background: var(--pink); color: #fff; }
.rendering { position: fixed; inset: 0; background: rgba(11,13,20,.82); display: flex; align-items: center; justify-content: center; z-index: 10; padding: 24px; }
.rendering .card { width: 100%; max-width: 360px; background: var(--s1); border: 1px solid var(--line); border-radius: 20px; padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.rendering b { font-family: var(--display); font-size: 20px; }
.rendering small { color: var(--muted); font-size: 13px; }
.bar { height: 10px; border-radius: 5px; background: var(--line); overflow: hidden; }
.bar span { display: block; height: 100%; width: 0; background: var(--gold); transition: width .25s; }

/* listo */
.done-head { display: none; }
.done { background: radial-gradient(90% 40% at 50% 14%, #2a2410 0%, var(--bg) 70%); padding-bottom: 24px; }
.result { display: flex; flex-direction: column; align-items: center; padding: 0 20px; text-align: center; }
.thumb { position: relative; width: 132px; height: 234px; margin-bottom: 22px; }
.thumb video { width: 100%; height: 100%; object-fit: cover; border-radius: 18px; border: 3px solid var(--gold); box-shadow: 0 0 40px rgba(255,209,102,.35); background: #000; }
.ok { position: absolute; right: -14px; bottom: -12px; width: 40px; height: 40px; border-radius: 50%; background: #06d6a0; border: 4px solid var(--bg); display: flex; align-items: center; justify-content: center; }
.result p { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.actions { padding: 18px 20px 0; display: flex; flex-direction: column; gap: 10px; }
.ghost { height: 48px; border-radius: 14px; border: 1px solid #2a3048; background: var(--s1); font-weight: 700; font-size: 14px; cursor: pointer; }
.caption-card { margin: 14px 20px 0; border-radius: 16px; background: var(--s1); border: 1px solid var(--line2); padding: 12px 14px; display: flex; gap: 10px; align-items: flex-start; }
.caption-card div { flex-grow: 1; }
.caption-card small { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.caption-card p { margin: 6px 0 0; font-size: 14px; }
.pro-card { margin: 12px 20px 0; border-radius: 18px; padding: 14px; background: linear-gradient(135deg, #2b1030 0%, var(--s1) 70%); border: 1px solid #5a1f5c; display: flex; gap: 12px; align-items: center; color: var(--text); text-decoration: none; }
.pro-card span { display: flex; flex-direction: column; gap: 2px; }
.pro-card b { font-size: 15px; } .pro-card small { font-size: 12px; color: #c9b8d6; }
.again { text-align: center; padding-top: 8px; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* modo, alineación, torneo y liga */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.modes { display: flex; gap: 4px; margin: 14px 20px 0; padding: 4px; border-radius: 14px; background: var(--s1); border: 1px solid var(--line2); }
.modes button { flex: 1; height: 40px; border: 0; border-radius: 10px; background: none; font-weight: 700; font-size: 14px; color: var(--muted); cursor: pointer; }
.modes [aria-selected="true"] { background: var(--text); color: var(--bg); }
.lineup { padding: 14px 20px 0; }
.lineup p { margin: 0 0 10px; color: var(--muted); font-size: 13px; }
.lineup ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; min-height: 36px; }
.lineup li { display: flex; align-items: center; gap: 6px; padding: 4px 10px 4px 4px; border-radius: 99px; background: var(--s1); border: 1px solid var(--line); font-size: 13px; font-weight: 700; }
.lineup li i { font-style: normal; width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 11px; color: var(--bg); background: var(--c); }
.name-edit input { width: 100%; background: none; border: 0; border-bottom: 2px dashed var(--line); color: var(--text); font: 800 30px/1.1 var(--display); letter-spacing: -0.02em; padding: 0 0 4px; }
.name-edit input:focus { outline: none; border-bottom-color: var(--gold); }
.event-run { padding: 14px 20px 0; display: flex; flex-direction: column; gap: 10px; }
.ghost.gold { border-color: var(--gold); color: var(--gold); height: 50px; font-size: 15px; }
.event-run .progress { margin: 0; }
.champion { margin: 14px 20px 0; display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 18px; background: linear-gradient(135deg, #3a2e0e 0%, var(--s1) 70%); border: 1px solid var(--gold); }
.champion canvas { width: 96px; height: 60px; }
.champion small { display: block; font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--gold); }
.champion b { display: block; font-family: var(--display); font-size: 26px; line-height: 1.05; }
.champion em { font-style: normal; font-size: 12px; color: var(--muted); }
.bracket { display: flex; gap: 12px; overflow-x: auto; padding: 16px 20px 4px; scroll-snap-type: x mandatory; }
.round { flex: 0 0 82%; max-width: 300px; display: flex; flex-direction: column; gap: 10px; justify-content: space-around; scroll-snap-align: start; }
.round h3 { margin: 0; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.match { border-radius: 14px; background: var(--s1); border: 1px solid var(--line2); padding: 6px; }
.side { display: flex; align-items: center; gap: 8px; padding: 4px 6px; border-radius: 10px; font-weight: 700; font-size: 14px; }
.side canvas { width: 48px; height: 30px; flex-shrink: 0; }
.side.win { background: #221d10; }
.side.win::after { content: '✓'; margin-left: auto; color: var(--gold); font-weight: 900; }
.side.lose { opacity: .4; }
.side.empty { color: var(--muted); font-weight: 600; font-style: italic; height: 38px; }
.match .mfoot { display: flex; align-items: center; justify-content: space-between; padding: 2px 6px 0; font-size: 12px; color: var(--muted); }
.vid-btn { border: 0; background: none; color: var(--gold); font-weight: 800; font-size: 13px; cursor: pointer; min-height: 36px; padding: 0 2px; }
.table-wrap { margin: 16px 20px 0; overflow-x: auto; border-radius: 16px; border: 1px solid var(--line2); background: var(--s1); }
.standings { width: 100%; border-collapse: collapse; font-size: 14px; }
.standings th { text-align: left; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 10px 8px; border-bottom: 1px solid var(--line2); }
.standings td { padding: 6px 8px; border-bottom: 1px solid var(--line2); font-weight: 700; }
.standings tr:last-child td { border-bottom: 0; }
.standings td.f { display: flex; align-items: center; gap: 8px; }
.standings td.f canvas { width: 40px; height: 25px; }
.standings tr.lead td { background: #221d10; }
.md { padding: 16px 20px 0; }
.md h3 { margin: 0 0 8px; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.md .match { margin-bottom: 8px; }

/* editor de luchadores */
.ed-preview { position: relative; margin: 6px 20px 0; border-radius: 22px; background: radial-gradient(70% 90% at 50% 40%, var(--glow, #3a4256) 0%, var(--s1) 75%); border: 1px solid #2a3048; overflow: hidden; }
.ed-preview canvas { display: block; width: 100%; height: auto; aspect-ratio: 720 / 460; }
.ed-tag { text-align: center; padding: 0 10px 12px; margin-top: -6px; }
.ed-tag b { display: block; font-family: var(--display); font-size: 24px; line-height: 1.05; color: var(--c, #fff); text-shadow: 0 2px 0 #0b0d14; }
.ed-tag span { font-size: 12px; color: #c9cfe0; }
.ed-body { padding: 0 20px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 700; color: var(--muted); margin-top: 14px; }
.field input { height: 46px; padding: 0 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--s1); color: var(--text); font: 700 16px Inter, sans-serif; }
.field input:focus, .mini input[type=text]:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
.ed-sec { margin-top: 18px; }
.ed-sec h2 { margin: 0 0 8px; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.color-row { display: flex; gap: 14px; align-items: center; }
#wheel { width: 150px; height: 150px; border-radius: 50%; touch-action: none; cursor: crosshair; flex-shrink: 0; }
#wheel:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.color-side { flex-grow: 1; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.mini { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 700; color: var(--muted); }
.mini input[type=range] { width: 100%; accent-color: var(--gold); height: 28px; }
.mini input[type=text] { height: 40px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--s1); color: var(--text); font: 700 14px ui-monospace, Menlo, monospace; text-transform: uppercase; }
.swatches { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; max-width: 260px; }
.swatches button { aspect-ratio: 1; border-radius: 50%; border: 2px solid #0b0d14; cursor: pointer; min-width: 0; }
.swatches button[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--text); }
.seg { display: flex; gap: 4px; padding: 4px; border-radius: 12px; background: var(--s1); border: 1px solid var(--line2); margin-bottom: 10px; }
.seg button { flex: 1; height: 38px; border: 0; border-radius: 9px; background: none; font-weight: 700; font-size: 13px; color: var(--muted); cursor: pointer; }
.seg [aria-selected="true"] { background: var(--text); color: var(--bg); }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.opt-tile { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 2px 7px; border-radius: 14px; background: var(--s1); border: 2px solid var(--line2); cursor: pointer; min-height: 76px; }
.opt-tile canvas { width: 64px; height: 42px; }
.opt-tile span { font-size: 11px; font-weight: 700; color: #b4bbd4; text-align: center; line-height: 1.15; }
.opt-tile[aria-checked="true"] { border-color: var(--gold); background: #221d10; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips button { height: 40px; padding: 0 14px; border-radius: 99px; background: var(--s1); border: 2px solid var(--line2); font-weight: 700; font-size: 13px; cursor: pointer; }
.chips [aria-checked="true"] { border-color: var(--gold); background: #221d10; color: var(--gold); }
.pad-wrap { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.pad { width: 240px; height: 240px; border-radius: 50%; border: 3px solid #0b0d14; box-shadow: 0 0 0 1px #2a3048; touch-action: none; cursor: crosshair; background: var(--ball, #888); }
#photoCanvas { cursor: grab; background: #1b2033; }
.tools { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.tools button { min-width: 40px; height: 40px; border-radius: 12px; border: 2px solid var(--line2); background: var(--s1); font-weight: 700; font-size: 12px; cursor: pointer; padding: 0 10px; }
.tools button.swatch { border-radius: 50%; padding: 0; width: 40px; }
.tools [aria-pressed="true"] { border-color: var(--gold); }
.upload { display: flex; align-items: center; gap: 8px; height: 46px; padding: 0 16px; border-radius: 14px; border: 1px dashed #3a4160; background: var(--s1); font-weight: 700; font-size: 14px; cursor: pointer; }
.upload input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.upload:focus-within { outline: 2px solid var(--gold); }
.pad-wrap .mini { width: 240px; }
.note { margin: 0; font-size: 12px; color: var(--muted); text-align: center; }
.check { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; min-height: 44px; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--gold); }
.sliders { display: flex; flex-direction: column; gap: 6px; }
.sliders label { display: grid; grid-template-columns: 70px 1fr 48px; align-items: center; gap: 10px; font-size: 13px; font-weight: 700; color: var(--muted); }
.sliders input { accent-color: var(--gold); height: 32px; }
.sliders output { text-align: right; color: var(--text); font-variant-numeric: tabular-nums; }
.meter { margin-top: 10px; padding: 12px 14px; border-radius: 16px; background: var(--s1); border: 1px solid var(--line2); }
.meter-top { display: flex; justify-content: space-between; font-size: 13px; font-weight: 700; color: var(--muted); }
.meter-top b { color: var(--text); font-size: 15px; }
.meter-bar { position: relative; height: 10px; border-radius: 5px; background: linear-gradient(90deg, #4cc9f0 0%, #06d6a0 40%, #06d6a0 60%, #ffd166 75%, #ef476f 100%); margin: 10px 0 6px; opacity: .9; }
.meter-bar span { position: absolute; top: -4px; width: 4px; height: 18px; border-radius: 2px; background: #fff; box-shadow: 0 0 0 2px #0b0d14; left: 50%; transform: translateX(-2px); transition: left .3s; }
.meter-bar i { position: absolute; left: 50%; top: 12px; width: 1px; height: 6px; background: var(--muted); }
.meter-foot { display: flex; justify-content: space-between; align-items: center; }
.meter-foot em { font-style: normal; font-size: 13px; font-weight: 700; }
.ed-danger { margin-top: 14px; text-align: center; }
.text-btn.danger { color: #ff6b81; font-weight: 700; }
.ed-err { margin: 8px 0 0; min-height: 1em; color: #ff6b81; font-size: 13px; font-weight: 700; text-align: center; }
.tile-wrap { position: relative; display: flex; }
.tile-wrap .tile { flex-grow: 1; }
.tile-edit { position: absolute; left: 3px; top: 3px; width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--bg); background: var(--pink); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.tile .you { position: absolute; top: 5px; left: 5px; font-size: 9px; font-weight: 800; padding: 2px 5px; border-radius: 99px; color: #fff; background: var(--pink); font-style: normal; }

/* ---------- Ordenador: más ancho, dos columnas y vista previa grande (el móvil no cambia) ---------- */
@media (min-width: 900px) {
  .app { max-width: 1080px; padding: 0 32px; }
  .screen { padding-bottom: 32px; }
  .top { padding: 20px 0 8px; }
  .intro { padding: 8px 0 0; }
  .intro h1, .result h1 { font-size: 40px; }
  .intro p { font-size: 16px; }
  .row-head { padding: 24px 0 10px; }
  .cta-bar { position: static; transform: none; width: auto; max-width: none; padding: 24px 0 0; background: none; display: flex; justify-content: flex-end; }
  .cta-bar .cta { max-width: 380px; }

  /* 1 · elegir */
  .versus { padding: 20px 0 0; gap: 16px; }
  .slot { height: 300px; }
  .slot canvas { width: 300px; height: 185px; }
  .slot b { font-size: 34px; }
  .slot small { font-size: 14px; min-height: 0; }
  .vs { top: 140px; width: 72px; height: 72px; font-size: 26px; }
  .roster { grid-template-columns: repeat(8, 1fr); padding: 0; gap: 10px; }
  .tile canvas { width: 96px; height: 58px; }
  .tile { min-height: 108px; }

  /* 2 · combate */
  .styles { grid-template-columns: repeat(4, 1fr); padding: 20px 0 0; gap: 12px; }
  .styles button { padding: 16px; }
  .progress { margin: 0 0 10px; }
  .results { display: grid; grid-template-columns: repeat(3, 1fr); padding: 0; gap: 12px; }
  .fight { flex-direction: column; align-items: flex-start; padding: 14px; position: relative; }
  .fight canvas { width: 100%; height: auto; aspect-ratio: 288 / 120; }
  .fight .dot { position: absolute; top: 14px; right: 14px; }

  /* 3 · personalizar: vista previa a la izquierda, ajustes a la derecha */
  #s-custom { display: grid; grid-template-columns: 420px 1fr; column-gap: 48px; align-content: start;
    grid-template-areas: "top top" "preview looks" "preview fields" "preview opts" "preview cta" "preview ."; }
  #s-custom > .looks { grid-area: looks; padding: 18px 0 4px; flex-wrap: wrap; overflow: visible; }
  #s-custom > .top { grid-area: top; }
  #s-custom > .preview { grid-area: preview; padding: 12px 0 0; }
  #s-custom > .fields { grid-area: fields; padding: 12px 0 0; }
  #s-custom > .opts { grid-area: opts; margin: 16px 0 0; }
  #s-custom > .cta-bar { grid-area: cta; }
  .phone { width: 360px; height: 640px; border-radius: 28px; }
  .play { width: 72px; height: 72px; }

  /* 4 · listo: vídeo a la izquierda, acciones a la derecha */
  .done { display: grid; grid-template-columns: 420px 1fr; column-gap: 48px; align-content: start; background: radial-gradient(60% 50% at 25% 30%, #2a2410 0%, var(--bg) 70%);
    grid-template-areas: "top top" "result head" "result actions" "result caption" "result pro" "result again" "result ."; }
  .done > .top { grid-area: top; }
  .done > .result { grid-area: result; }
  .done > .actions { grid-area: actions; padding: 16px 0 0; }
  .done > .caption-card { grid-area: caption; margin: 14px 0 0; }
  .done > .pro-card { grid-area: pro; margin: 12px 0 0; }
  .done > .again { grid-area: again; text-align: left; }
  .modes { margin: 18px 0 0; max-width: 420px; }
  .lineup, .event-run { padding-left: 0; padding-right: 0; }
  .event-run { flex-direction: row; align-items: center; }
  .event-run .ghost { width: 280px; }
  .event-run .progress { flex-grow: 1; }
  .champion { margin: 16px 0 0; max-width: 520px; }
  .bracket { padding: 20px 0 4px; overflow: visible; }
  .round { flex: 1; max-width: none; }
  .table-wrap, .md { margin-left: 0; margin-right: 0; padding-left: 0; padding-right: 0; }
  #league { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
  #league[hidden] { display: none; }
  .name-edit input { font-size: 40px; }
  .ed-layout { display: grid; grid-template-columns: 440px 1fr; gap: 40px; align-items: start; }
  .ed-preview { margin: 6px 0 0; position: sticky; top: 16px; }
  .ed-body { padding: 0; }
  #wheel { width: 190px; height: 190px; }
  .grid4 { grid-template-columns: repeat(5, 1fr); }
  #faceGrid.grid4, #weaponGrid.grid4 { grid-template-columns: repeat(8, 1fr); }
  .pad-wrap { flex-direction: row; flex-wrap: wrap; justify-content: flex-start; align-items: center; }
  .thumb { width: 324px; height: 576px; }
  .done > .result h1, .done > .result p { display: none; }
  .done-head { grid-area: head; display: block !important; padding-top: 8px; }
  .done-head h1 { margin: 0; font-family: var(--display); font-weight: 800; font-size: 40px; letter-spacing: -0.02em; }
  .done-head p { margin: 6px 0 0; color: var(--muted); }
}

/* estilo del vídeo (Neon, cuaderno, cómic, noche de combate, juguetes) */
.looks { display: flex; gap: 10px; overflow-x: auto; padding: 14px 20px 4px; scrollbar-width: none; }
.looks::-webkit-scrollbar { display: none; }
.look { flex: 0 0 auto; width: 84px; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 0; background: none; border: 0; color: var(--text); font: inherit; cursor: pointer; position: relative; }
.look b { font-size: 12px; font-weight: 700; line-height: 1.15; text-align: center; color: var(--muted); }
.look .tag { position: absolute; top: -6px; right: -4px; font-size: 9px; }
.look[aria-checked="true"] b { color: var(--text); }
.lk { width: 84px; height: 108px; border-radius: 14px; position: relative; overflow: hidden; border: 2px solid var(--line2); display: block; }
.look[aria-checked="true"] .lk { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold); }
.look:focus-visible .lk { outline: 2px solid var(--gold); outline-offset: 3px; }
.lk i { position: absolute; width: 26px; height: 26px; border-radius: 50%; }
.lk i:first-child { left: 14px; top: 58px; background: #4cc9f0; }
.lk i:last-child { right: 14px; top: 26px; background: #b388ff; }
.lk-neon { background: radial-gradient(circle at 50% 45%, #1b2033, #0b0d14); }
.lk-neon i { box-shadow: 0 0 14px currentColor; border: 2px solid #0b0d14; }
.lk-neon i:first-child { color: #4cc9f0; } .lk-neon i:last-child { color: #b388ff; }
.lk-lab { background-color: #f6f1e3; background-image: linear-gradient(#dde7ec 1px, transparent 1px), linear-gradient(90deg, #dde7ec 1px, transparent 1px); background-size: 9px 9px; }
.lk-lab::after { content: ''; position: absolute; left: 30px; top: 46px; width: 34px; height: 20px; border: 2px solid #e63946; border-radius: 50%; transform: rotate(-8deg); }
.lk-lab i { border: 2px solid #23324d; }
.lk-comic { background: #fff radial-gradient(#ffde00 32%, transparent 34%) 0 0 / 8px 8px; }
.lk-comic i { border: 3px solid #111; box-shadow: 3px 3px 0 #111; }
.lk-comic::after { content: 'BONK!'; position: absolute; left: 22px; top: 6px; font: 400 13px/1 Impact, sans-serif; color: #ff3b30; background: #ffde00; border: 2px solid #111; padding: 1px 3px; transform: rotate(-6deg); }
.lk-fight { background: radial-gradient(ellipse at 50% 20%, #3a3326, #0b0b0c 75%); }
.lk-fight::before { content: ''; position: absolute; inset: 14px 10px; border: 2px solid #f2b705; }
.lk-fight::after { content: 'K.O.'; position: absolute; left: 18px; bottom: 8px; font: 700 12px/1 Impact, sans-serif; color: #0b0b0c; background: #f2b705; padding: 2px 8px; transform: skewX(-10deg); }
.lk-fight i { border: 2px solid #0b0b0c; }
.lk-toy { background: #ffd9c7; }
.lk-toy::before { content: ''; position: absolute; inset: 10px; border-radius: 14px; background: #7fc8a9; }
.lk-toy i { border: 2px solid #4a2c5e; background-image: radial-gradient(circle at 35% 30%, rgba(255,255,255,.8) 0 3px, transparent 4px); }

/* ---------- dinamismo: animaciones al elegir, entrar y ganar ---------- */
.snd { margin-left: auto; color: var(--muted); }
.snd[aria-pressed="true"] { color: var(--gold); }
.snd .off, .snd[aria-pressed="false"] .on { display: none; }
.snd[aria-pressed="false"] .off { display: block; }
.tile { transition: transform .16s cubic-bezier(.3,1.6,.5,1), border-color .15s, box-shadow .2s; }
@media (hover: hover) { .tile:hover { transform: translateY(-4px) scale(1.04); border-color: var(--c); box-shadow: 0 10px 22px color-mix(in srgb, var(--c) 28%, transparent); } }
.tile:active { transform: scale(.94); }
.tile.flash { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold), 0 0 22px #ffd16677; transform: scale(1.06); }
.slot { transition: border-color .15s, transform .15s; }
.slot.active { animation: slotGlow 1.6s ease-in-out infinite; }
@keyframes slotGlow { 50% { box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 35%, transparent), 0 0 30px color-mix(in srgb, var(--c) 30%, transparent); } }
.pop { animation: pop .34s cubic-bezier(.3,1.7,.5,1); }
@keyframes pop { 0% { transform: scale(1); } 35% { transform: scale(1.12); } 100% { transform: scale(1); } }
.slam { animation: slam .42s cubic-bezier(.2,1.4,.4,1); }
@keyframes slam { 0% { transform: translateY(0) scale(1); } 18% { transform: translateY(6px) scale(.97, 1.02); } 40% { transform: translateY(-3px) rotate(-1deg); } 60% { transform: translateY(1px) rotate(.8deg); } 100% { transform: none; } }
.vs.vs-hit { animation: vsHit .5s cubic-bezier(.2,1.6,.4,1), vsIdle 2.4s ease-in-out .5s infinite; }
@keyframes vsHit { 0% { transform: translateX(-50%) scale(1); } 25% { transform: translateX(-50%) scale(1.45) rotate(-12deg); box-shadow: 0 0 0 6px #ffd16655, 0 0 40px #ffd166aa; } 55% { transform: translateX(-50%) scale(.92) rotate(6deg); } 100% { transform: translateX(-50%) scale(1); } }
.vs { animation: vsIdle 2.4s ease-in-out infinite; }
@keyframes vsIdle { 50% { box-shadow: 0 0 0 4px #ffd16622, 0 0 24px #ffd16655; } }
.shake { animation: shake .36s; }
@keyframes shake { 20% { transform: translateX(-6px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(3px); } }
.spin svg { animation: spin .55s cubic-bezier(.3,1.3,.5,1); }
@keyframes spin { to { transform: rotate(360deg); } }
.screen.enter { animation: enter .34s cubic-bezier(.2,.9,.3,1); }
@keyframes enter { from { opacity: 0; transform: translateY(14px); } }
.rise { animation: rise .42s cubic-bezier(.2,1.2,.4,1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(18px) scale(.97); } }
.lineup li.pop-in { animation: popIn .36s cubic-bezier(.3,1.7,.5,1); }
@keyframes popIn { from { transform: scale(.4); opacity: 0; } }
.match.just { animation: just .9s ease-out; }
@keyframes just { 0% { border-color: var(--gold); box-shadow: 0 0 0 3px #ffd16666, 0 0 26px #ffd16655; transform: scale(1.03); } 100% { box-shadow: none; transform: none; } }
.match .side.win { animation: winGlow 2.4s ease-in-out infinite; }
@keyframes winGlow { 50% { filter: brightness(1.15); } }
.champion.champ-in { animation: champIn .7s cubic-bezier(.2,1.5,.4,1); }
@keyframes champIn { 0% { transform: scale(.6) rotate(-3deg); opacity: 0; } 60% { transform: scale(1.06) rotate(1deg); opacity: 1; } 100% { transform: none; } }
.champion { position: relative; overflow: hidden; }
.champion::after { content: ''; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, #ffffff22 48%, transparent 66%); transform: translateX(-100%); animation: shine 2.8s ease-in-out infinite 1s; pointer-events: none; }
@keyframes shine { 60%, 100% { transform: translateX(100%); } }
.cta:not(:disabled) { position: relative; overflow: hidden; }
.cta:not(:disabled)::after { content: ''; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 35%, #ffffff55 50%, transparent 65%); transform: translateX(-100%); animation: shine 3.2s ease-in-out infinite 1.5s; pointer-events: none; }
.cta:active:not(:disabled), .text-btn:active, .modes button:active { transform: scale(.96); }
.fight { transition: transform .15s, border-color .15s; }
@media (hover: hover) { .fight:hover { transform: translateY(-2px); border-color: #4a5372; } }
@media (prefers-reduced-motion: reduce) { .pop, .slam, .vs, .vs.vs-hit, .shake, .spin svg, .screen.enter, .rise, .pop-in, .match.just, .side.win, .champ-in, .slot.active, .champion::after, .cta::after { animation: none !important; } .tile:hover { transform: none; } }

/* editor: escalera de poderes */
.ed-note { margin: -4px 0 12px; font-size: 13px; color: var(--muted); }
.pw-list { display: flex; flex-direction: column; gap: 10px; }
.pw-row { display: flex; gap: 10px; align-items: flex-start; padding: 10px; border-radius: 14px; background: var(--s1); border: 1px solid var(--line2); }
.pw-row > i { flex: 0 0 auto; width: 26px; height: 26px; margin-top: 7px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-style: normal; font-weight: 800; font-size: 13px; color: var(--bg); background: var(--gold); }
.pw-f { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.pw-f label { display: block; }
.pw-f select, .pw-f input { width: 100%; height: 40px; border-radius: 10px; border: 1px solid var(--line2); background: var(--bg); color: var(--text); font: inherit; font-size: 14px; padding: 0 10px; box-sizing: border-box; }
.pw-f select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 16px) 17px, calc(100% - 11px) 17px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 28px; font-weight: 700; }
.pw-f input::placeholder { color: #69718c; }
.pw-f select:focus-visible, .pw-f input:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }
.pw-f small { grid-column: 1 / -1; font-size: 12px; color: var(--muted); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
