/* Tokens compartidos por las tres superficies.
   Todo lo que puede cambiar por marca vive en variables CSS que se inyectan en runtime. */

:root {
  --brand-primary: #ff4d3d;
  --brand-secondary: #1b2a4a;
  --brand-accent: #ffd23f;
  --bg: #0b1220;
  --text: #f6f8ff;

  --surface: color-mix(in srgb, var(--bg) 82%, #ffffff);
  --surface-2: color-mix(in srgb, var(--bg) 90%, #ffffff);
  --line: color-mix(in srgb, var(--text) 16%, transparent);
  --muted: color-mix(in srgb, var(--text) 62%, transparent);
  --shadow: 0 18px 50px -20px rgb(0 0 0 / 0.7);

  --radius: 18px;
  --radius-sm: 10px;
  --gap: clamp(0.6rem, 1.2vw, 1.4rem);

  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    sans-serif;
  --font-display: "Bebas Neue", "Archivo Black", var(--font);
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-text-size-adjust: 100%;
}

body {
  overscroll-behavior: none;
}

h1,
h2,
h3,
p {
  margin: 0;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

a {
  color: var(--brand-accent);
}

.hidden {
  display: none !important;
}

.muted {
  color: var(--muted);
}

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.tnum {
  font-variant-numeric: tabular-nums;
}

/* Arte del corredor (imagen, GIF o cuadro de sprite sheet) allí donde antes iba un
   emoji. Se dimensiona en em para heredar el tamaño del hueco que lo contiene. */
.char-art {
  display: inline-block;
  width: 1.15em;
  height: 1.15em;
  object-fit: contain;
  vertical-align: -0.2em;
}

.char-art-sheet {
  background-position: left center;
  background-repeat: no-repeat;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  padding: 0.25em 0.7em;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  font-size: 0.85em;
  line-height: 1.5;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  padding: 0.7em 1.1em;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-weight: 600;
  transition: transform 0.08s ease, filter 0.15s ease, background 0.15s ease;
}

.btn:hover:not(:disabled) {
  filter: brightness(1.15);
}

.btn:active:not(:disabled) {
  transform: translateY(1px);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--brand-primary);
  border-color: transparent;
  color: #fff;
}

.btn-accent {
  background: var(--brand-accent);
  border-color: transparent;
  color: #14181f;
}

.btn-ghost {
  background: transparent;
}

.btn-danger {
  background: transparent;
  border-color: color-mix(in srgb, #ff5252 60%, transparent);
  color: #ff8b8b;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

input,
select,
textarea {
  font: inherit;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.6em 0.7em;
  width: 100%;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible,
button:focus-visible {
  outline: 2px solid var(--brand-accent);
  outline-offset: 2px;
}

input[type='color'] {
  padding: 0.2em;
  height: 2.6em;
}

input[type='checkbox'] {
  width: auto;
  accent-color: var(--brand-primary);
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: 999px;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}
