/* ============ Fuentes ============ */
@font-face {
  font-family: "EMprint";
  src: url("../assets/fonts/EMprint-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "EMprint";
  src: url("../assets/fonts/EMprint-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}
/* Respaldo solo para signos de apertura ? (U+00BF) y ? (U+00A1),
   que la fuente EMprint no incluye. Se toman de una fuente del sistema. */
@font-face {
  font-family: "EMprint";
  src: local("Arial"), local("Helvetica Neue"), local("Helvetica");
  font-weight: 400;
  unicode-range: U+00A1, U+00BF;
}
@font-face {
  font-family: "EMprint";
  src: local("Arial Bold"), local("Arial"), local("Helvetica Neue");
  font-weight: 700;
  unicode-range: U+00A1, U+00BF;
}

/* ============ Variables de marca Mobil ============ */
:root {
  --mobil-blue: #0a2a66;
  --rumbo-navy: #003876;
  --rumbo-cta: #004795;
  --rumbo-cta-border: #5eb3ff;
  --mobil-logo-blue: #003876;
  --mobil-logo-red: #e31b23;
  --mobil-blue-bright: #0047bb;
  --mobil-red: #e21836;
  --white: #ffffff;
  --ink: #0c1b3a;
  --muted: #5b6b8c;
  --line: #d7deeb;
  --bg-soft: #f2f5fb;
  --ok: #1f9d55;
  --radius: 18px;
  --shadow: 0 14px 40px rgba(10, 42, 102, 0.22);
  --font: "EMprint", "Helvetica Neue", Arial, "Segoe UI", system-ui, sans-serif;
  /* Escala tipo mock en kiosco / tablet alta */
  --intro-logo-w: clamp(200px, 56vmin, 640px);
  --intro-title: clamp(44px, 11vmin, 104px);
  --intro-subtitle: clamp(24px, 5.8vmin, 56px);
  --cta-font: clamp(32px, 6vmin, 58px);
  --cta-min-h: clamp(64px, 10vmin, 108px);
  --cta-pad-x: clamp(40px, 10vmin, 80px);
  --cta-pad-y: clamp(18px, 3vmin, 28px);
  --header-logo-w: clamp(110px, 30vmin, 300px);
  --wheel-size: min(94vw, 94vmin, 72vh);
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

html, body {
  height: 100%;
  font-family: var(--font);
  color: var(--ink);
  background: var(--mobil-blue);
  overflow: hidden;
}

#app {
  position: relative;
  height: 100vh;
  height: 100dvh;
  width: 100%;
  max-width: 100%;
  margin: 0;
  overflow: hidden;
  background: #0a2a66;
}
/* Vista previa en escritorio horizontal: columna tipo móvil */
@media (orientation: landscape) and (min-width: 900px) {
  #app {
    max-width: 520px;
    margin: 0 auto;
    box-shadow: 0 0 0 1px rgba(0, 40, 85, 0.08), 0 12px 48px rgba(0, 0, 0, 0.18);
  }
}

/* ============ Pantallas ============ */
.screen {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(20px, 5vw, 48px);
  background-size: cover;
  background-position: center;
  animation: fade 0.45s ease;
}
.screen.is-active { display: flex; }

.screen--intro {
  background-image: url("../assets/img/fondo-ruleta.jpg");
  background-position: center top;
  justify-content: center;
  align-items: center;
  padding: clamp(12px, 3vh, 28px) clamp(16px, 4vw, 28px) clamp(20px, 5vh, 40px);
}
.screen--intro .screen__overlay {
  display: none;
}
.screen--spin {
  background-image: url("../assets/img/fondo-ruleta-2.jpg");
  background-position: center top;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
  padding: clamp(8px, 2vh, 16px) clamp(14px, 4vw, 22px) clamp(18px, 4vh, 28px);
  gap: clamp(6px, 1.5vh, 12px);
}
.screen--spin .screen__overlay {
  display: none;
}
.screen--result {
  background-image: url("../assets/img/fondo-ruleta-2.jpg");
  background-position: center top;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
  padding: clamp(8px, 2vh, 16px) clamp(14px, 4vw, 22px) clamp(18px, 4vh, 28px);
  gap: clamp(6px, 1.5vh, 12px);
}
.screen--result .screen__overlay {
  display: none;
}

.screen__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.35) 100%);
  pointer-events: none;
}
.screen__content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 560px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: clamp(14px, 3vh, 26px);
}

@keyframes fade { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ============ Intro (home mock) ============ */
.intro__layout {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: min(92vw, 720px);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: clamp(28px, 6.5vmin, 72px);
  transform: translateY(clamp(-28px, -5vh, -8px));
}

.intro__layout .btn--cta {
  min-height: var(--cta-min-h);
  font-size: var(--cta-font);
}

.intro__logo-box {
  background: transparent;
  padding: 0;
  box-shadow: none;
  line-height: 0;
}
.intro__logo-img {
  display: block;
  width: var(--intro-logo-w);
  height: auto;
  object-fit: contain;
}
.intro__logo-blue { color: var(--mobil-logo-blue); }
.intro__logo-red { color: var(--mobil-logo-red); }

.screen__logo-img {
  display: block;
  width: var(--header-logo-w);
  height: auto;
  object-fit: contain;
  flex-shrink: 0;
}
.screen__logo-img--center {
  margin: 0 auto;
}

.intro__copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(16px, 4vmin, 36px);
  width: 100%;
}

.intro__welcome {
  color: var(--rumbo-navy);
  font-weight: 700;
  font-size: var(--intro-title);
  line-height: 1;
  letter-spacing: -0.02em;
}
.intro__subtitle {
  color: var(--rumbo-navy);
  font-size: var(--intro-subtitle);
  font-weight: 400;
  line-height: 1.22;
  max-width: 14em;
}

/* ============ Botones ============ */
.btn {
  font-family: var(--font);
  font-weight: 700;
  border: none;
  cursor: pointer;
  border-radius: 999px;
  padding: 16px 46px;
  font-size: clamp(17px, 4.5vw, 22px);
  transition: transform 0.12s ease, box-shadow 0.2s ease, opacity 0.2s;
  user-select: none;
}
.btn:active { transform: scale(0.96); }
.btn--primary {
  background: linear-gradient(180deg, var(--mobil-red) 0%, #b8122b 100%);
  color: var(--white);
  box-shadow: 0 10px 26px rgba(226, 24, 54, 0.4);
}
.btn--primary:hover { box-shadow: 0 12px 30px rgba(226, 24, 54, 0.55); }

/* Botón principal estilo mock (Comenzar / Girar / Jugar de nuevo) */
.btn--cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: clamp(14px, 2.8vmin, 26px);
  width: auto;
  max-width: min(92vw, 520px);
  min-height: var(--cta-min-h);
  padding: var(--cta-pad-y) var(--cta-pad-x);
  border-radius: clamp(14px, 2.2vmin, 20px);
  background: var(--rumbo-cta);
  color: var(--white);
  border: none;
  box-shadow: 0 4px 14px rgba(0, 40, 85, 0.26);
  font-size: var(--cta-font);
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.1;
}
.btn--cta:hover {
  box-shadow: 0 6px 18px rgba(0, 40, 85, 0.3);
}
.btn--cta:active {
  transform: scale(0.98);
  box-shadow: 0 2px 10px rgba(0, 40, 85, 0.22);
}
.btn__label {
  flex: 0 0 auto;
  text-align: center;
}
.btn__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: clamp(32px, 5vmin, 48px);
  height: clamp(32px, 5vmin, 48px);
  color: var(--white);
}
.btn__icon svg {
  width: clamp(28px, 4.5vmin, 44px);
  height: clamp(28px, 4.5vmin, 44px);
  display: block;
}

.btn--nav-home {
  position: absolute;
  top: clamp(12px, 3vh, 24px);
  left: clamp(12px, 3vw, 24px);
  z-index: 10;
  padding: 10px 20px;
  font-size: 15px;
  font-weight: 700;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--rumbo-navy);
  border: 2px solid var(--rumbo-navy);
  box-shadow: 0 4px 14px rgba(0, 40, 85, 0.12);
  cursor: pointer;
  font-family: var(--font);
}
.btn--nav-home:active { transform: scale(0.97); }

.btn--ghost {
  background: transparent;
  color: var(--mobil-blue);
  border: 2px solid var(--mobil-blue);
}
.btn--danger { background: var(--mobil-red); color: #fff; }
.btn--sm { padding: 11px 24px; font-size: 15px; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

/* ============ Vista ruleta (mock) ============ */
.spin__top {
  position: relative;
  z-index: 3;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 2px;
}

.spin__logo-word {
  display: inline-flex;
  align-items: flex-start;
  font-size: clamp(22px, 6.2vw, 30px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
}

.btn--nav-home--spin {
  position: static;
  padding: clamp(8px, 1.4vmin, 12px) clamp(16px, 2.8vmin, 24px);
  font-size: clamp(13px, 2.2vmin, 18px);
  box-shadow: none;
  flex-shrink: 0;
}

.spin__layout {
  position: relative;
  z-index: 2;
  flex: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(10px, 2.2vh, 18px);
  min-height: 0;
}

.spin__layout .btn--cta {
  min-height: var(--cta-min-h);
  font-size: var(--cta-font);
}

.spin__hint {
  color: #1c1c1c;
  font-weight: 400;
  font-size: clamp(16px, 2.6vmin, 28px);
  line-height: 1.35;
  text-align: center;
  max-width: 22em;
  margin-top: clamp(4px, 1vmin, 10px);
}

.wheel-wrap {
  position: relative;
  width: var(--wheel-size);
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.wheel__pointer {
  position: absolute;
  left: 50%;
  top: 0;
  width: 12%;
  /* Flecha fuera del marco, con separación visible */
  transform: translate(-50%, calc(-100% - clamp(6px, 1.8vw, 10px)));
  z-index: 6;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.35));
  pointer-events: none;
}
.wheel__stage {
  position: relative;
  width: 100%;
  height: 100%;
  /* Hueco interior del PNG ≈ 91.9% del diámetro exterior (medido en ruleta-borde.png) */
  --wheel-rotor-inset: 3.75%;
}
.wheel__rotor {
  position: absolute;
  inset: var(--wheel-rotor-inset);
  border-radius: 50%;
  overflow: hidden;
  filter: drop-shadow(0 4px 14px rgba(0, 40, 85, 0.18));
}
#wheel-canvas {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: block;
  transform: rotate(0deg);
}
.wheel__frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  /* Mismo cuadrado que el stage: contain desalineaba el borde (PNG 854×857) */
  object-fit: fill;
  pointer-events: none;
  z-index: 3;
}
.wheel__hub {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  container-type: inline-size;
}
.wheel__hub-plate {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.wheel__hub-logo {
  position: relative;
  z-index: 1;
  /* Centro de la ruleta — ajusta % del disco azul */
  width: 62%;
  height: auto;
  max-height: 38%;
  object-fit: contain;
  object-position: center;
  display: block;
  filter: drop-shadow(0 1px 2px rgba(0, 40, 85, 0.12));
}

.admin-gear--spin {
  background: rgba(0, 40, 85, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.35);
}

/* ============ Vista Ganaste (mock) ============ */
.result__top {
  position: relative;
  z-index: 3;
  width: 100%;
  padding: 0 2px;
}

.result__layout {
  position: relative;
  z-index: 2;
  flex: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(18px, 4vh, 28px);
  min-height: 0;
}

.result__card {
  width: min(100%, clamp(340px, 88vw, 620px));
  background: #ffffff;
  border: 2px solid var(--rumbo-navy);
  border-radius: 16px;
  padding: clamp(22px, 5vh, 32px) clamp(18px, 4.5vw, 26px);
  box-shadow: 0 10px 28px rgba(0, 40, 85, 0.14);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: clamp(10px, 2.2vh, 16px);
}

.result__title {
  color: var(--rumbo-navy);
  font-weight: 700;
  font-size: clamp(26px, 6.5vmin, 48px);
  line-height: 1.1;
  margin: 0;
}
.result__subtitle {
  color: var(--rumbo-navy);
  font-size: clamp(26px, 6.5vmin, 48px);
  font-weight: 700;
  line-height: 1.1;
  margin: 0;
}

.result__prize-frame {
  width: min(72vw, clamp(210px, 38vmin, 320px));
  aspect-ratio: 1;
  border: 4px solid var(--rumbo-navy);
  border-radius: 18px;
  padding: clamp(14px, 3.5vw, 18px);
  box-sizing: border-box;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  background: #fff;
  margin: clamp(4px, 1vh, 10px) 0;
  overflow: hidden;
  flex-shrink: 0;
}

.result__prize-media {
  flex: 1;
  min-width: 0;
  min-height: 0;
  width: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.result__prize-frame img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
  animation: result-prize-pop 0.5s cubic-bezier(.2, 1.4, .5, 1);
}

.result__card--lose .result__prize-name {
  display: none;
}

.result__thumbs {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.result__thumbs[hidden] {
  display: none !important;
}
.result__thumbs-svg {
  width: clamp(72px, 22vw, 96px);
  height: clamp(72px, 22vw, 96px);
  color: var(--rumbo-navy);
}

@keyframes result-prize-pop {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

.result__prize-name {
  color: var(--rumbo-navy);
  font-weight: 700;
  font-size: clamp(20px, 4.8vmin, 36px);
  line-height: 1.2;
  margin: 0;
}


/* ============ Engranaje admin ============ */
.admin-gear {
  position: absolute;
  bottom: 14px; right: 14px;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(10, 42, 102, 0.55);
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  z-index: 10;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s;
}
.admin-gear:hover { background: rgba(10, 42, 102, 0.9); }
.admin-gear--intro {
  background: rgba(0, 40, 85, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.35);
}
.admin-gear--intro:hover { background: rgba(0, 40, 85, 0.82); }

@media (min-aspect-ratio: 3/4) and (min-height: 700px) {
  .intro__layout {
    transform: translateY(clamp(-56px, -8vh, -24px));
  }
}

@media (min-height: 900px) {
  :root {
    --wheel-size: min(96vw, 96vmin, 74vh);
  }
  .spin__layout {
    gap: clamp(12px, 2.8vmin, 24px);
  }
}

/* ============ Modal ============ */
.modal {
  position: absolute; inset: 0;
  background: rgba(8, 20, 48, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 50;
  padding: 24px;
}
.modal.is-open { display: flex; }
.modal__box {
  background: #fff;
  border-radius: var(--radius);
  padding: 30px;
  width: 100%;
  max-width: 360px;
  box-shadow: var(--shadow);
  text-align: center;
}
.modal__box h3 { color: var(--mobil-blue); margin-bottom: 6px; }
.modal__hint { color: var(--muted); font-size: 14px; margin-bottom: 16px; }
.modal__input {
  width: 100%;
  padding: 14px;
  font-size: 22px;
  text-align: center;
  letter-spacing: 6px;
  border: 2px solid var(--line);
  border-radius: 12px;
  font-family: var(--font);
}
.modal__error { color: var(--mobil-red); font-size: 13px; min-height: 18px; margin: 8px 0; }
.modal__actions { display: flex; gap: 10px; justify-content: center; }

/* ============ Admin panel ============ */
.admin {
  position: absolute; inset: 0;
  background: var(--bg-soft);
  z-index: 40;
  display: none;
  flex-direction: column;
  overflow: hidden;
}
.admin.is-open { display: flex; }
.admin__header {
  background: var(--mobil-blue);
  color: #fff;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.admin__header h2 { font-size: clamp(18px, 4vw, 24px); }
.admin__header-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.btn--header-light {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.85);
}
.btn--header-light:hover { background: rgba(255, 255, 255, 0.12); }
.admin__tabs {
  display: flex;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.admin__tab {
  flex: 1;
  padding: 14px 8px;
  border: none;
  background: transparent;
  font-family: var(--font);
  font-weight: 700;
  font-size: 15px;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 3px solid transparent;
}
.admin__tab.is-active { color: var(--mobil-blue); border-bottom-color: var(--mobil-red); }
.admin__panel { display: none; padding: 20px; overflow-y: auto; flex: 1; }
.admin__panel.is-active { display: block; }
.admin__desc { color: var(--muted); font-size: 14px; margin-bottom: 16px; }
.admin__note { color: var(--mobil-blue); font-size: 14px; margin: 12px 0; font-weight: 700; }
.admin__row-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 8px 0 4px;
}
.field--check { margin-bottom: 12px; }
.field__check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 15px;
  line-height: 1.35;
  cursor: pointer;
}
.field__check input { width: 20px; height: 20px; margin-top: 2px; flex-shrink: 0; }
.field small code { font-size: 0.92em; }
.admin__hr { border: none; border-top: 1px solid var(--line); margin: 24px 0; }
.admin__danger p { font-weight: 700; color: var(--muted); margin-bottom: 10px; }
.admin__danger { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }

/* Tablas */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.admin__table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 720px; }
.admin__table th {
  background: var(--mobil-blue);
  color: #fff;
  padding: 10px 12px;
  text-align: left;
  font-size: 13px;
  white-space: nowrap;
}
.admin__table td { padding: 8px 12px; border-top: 1px solid var(--line); vertical-align: middle; }
.admin__table tr:nth-child(even) td { background: #fafbfe; }
.admin__table .prize-cell { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.admin__table .prize-cell img { width: 34px; height: 34px; object-fit: contain; }
.prize-img-edit { display: flex; flex-direction: column; gap: 8px; min-width: 160px; }
.prize-preview {
  width: 56px; height: 56px; object-fit: contain;
  border: 1px solid var(--line); border-radius: 8px; background: #fff;
}
.prize-preview--empty {
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; color: var(--muted); text-align: center; padding: 4px;
}
.prize-img-edit .inp-img { font-size: 12px; padding: 8px; }
.prize-img-upload {
  display: inline-block; font-size: 12px; font-weight: 700; color: var(--mobil-blue);
  cursor: pointer;
}
.prize-img-upload input { display: none; }
.prize-img-upload span {
  text-decoration: underline;
}
.admin__table input[type="number"] {
  width: 78px; padding: 7px; border: 1px solid var(--line); border-radius: 8px;
  font-family: var(--font); font-size: 14px; text-align: center;
}
.admin__table .cell-static { font-weight: 700; color: var(--mobil-blue); text-align: center; }

/* Inventario tactil (tarjetas) — 2 por fila */
.prob-toolbar {
  background: #f4f7fb;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 14px;
  max-width: 100%;
}
.prob-toolbar__row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.prob-toolbar__label {
  font-weight: 700;
  font-size: 14px;
  color: var(--ink);
  flex: 1 1 140px;
}
.prob-toolbar__row input[type="range"] {
  flex: 1 1 120px;
  min-width: 100px;
  accent-color: var(--rumbo-cta);
}
.prob-toolbar__val {
  font-size: 20px;
  color: var(--rumbo-navy);
  min-width: 3.2em;
  text-align: right;
}
.prob-toolbar__hint,
.prob-toolbar__sum {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.35;
  margin-top: 8px;
}
.prob-toolbar__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.inventory-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding-bottom: 8px;
}
@media (max-width: 420px) {
  .inventory-list {
    grid-template-columns: 1fr;
  }
}

.inv-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  box-shadow: 0 4px 16px rgba(10, 42, 102, 0.06);
  min-width: 0;
}

.inv-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.inv-card__head h3 {
  font-size: 15px;
  color: var(--rumbo-navy);
  font-weight: 700;
  margin: 0;
  line-height: 1.2;
}

.inv-toggle {
  flex-shrink: 0;
  min-height: 40px;
  min-width: 84px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 2px solid var(--line);
  background: #f4f6fa;
  color: var(--muted);
  font-family: var(--font);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
}
.inv-toggle.is-on {
  background: #e8f2ff;
  border-color: var(--rumbo-cta);
  color: var(--rumbo-navy);
}

.inv-card__media {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.inv-card__preview {
  width: 64px;
  height: 64px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fafbfe;
}
.inv-card__preview.prize-preview--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  padding: 8px;
}

.inv-img-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  width: 100%;
  max-width: 280px;
  padding: 12px 20px;
  border-radius: 12px;
  background: var(--rumbo-cta);
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  border: 2px solid var(--rumbo-cta-border);
}
.inv-img-btn input { display: none; }

.inv-card__fields {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.inv-field--pct .field__input {
  width: 100%;
  max-width: none;
  font-size: 22px;
  font-weight: 700;
  text-align: center;
  padding: 10px 8px;
}
.inv-pct-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.inv-pct-real {
  font-size: 12px;
  font-weight: 700;
  color: var(--rumbo-cta);
}

.inv-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.inv-field__label {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}
.inv-field--readonly {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
}
.inv-readonly {
  font-size: 22px;
  color: var(--rumbo-navy);
}

.inv-stepper {
  display: grid;
  grid-template-columns: 56px 1fr 56px;
  grid-template-rows: auto auto;
  gap: 8px 10px;
  align-items: center;
}
.inv-card .inv-stepper__btn {
  min-height: 44px;
  min-width: 44px;
  font-size: 24px;
}
.inv-stepper__btn {
  min-height: 52px;
  min-width: 52px;
  border-radius: 12px;
  border: 2px solid var(--rumbo-navy);
  background: #fff;
  color: var(--rumbo-navy);
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  font-family: var(--font);
}
.inv-stepper__btn:active {
  background: #e8f2ff;
  transform: scale(0.97);
}
.inv-card .inv-stepper__val {
  font-size: 24px;
  padding: 6px 2px;
}
.inv-stepper__val {
  grid-column: 2;
  grid-row: 1;
  text-align: center;
  font-size: 32px;
  font-weight: 700;
  color: var(--rumbo-navy);
  padding: 8px 4px;
  background: #f4f7fb;
  border-radius: 12px;
  border: 1px solid var(--line);
}
.inv-stepper__jumps {
  grid-column: 1 / -1;
  display: flex;
  gap: 10px;
  justify-content: center;
}
.inv-stepper__jump {
  flex: 1;
  max-width: 140px;
  min-height: 44px;
  border-radius: 10px;
  border: 2px solid var(--line);
  background: #fff;
  color: var(--rumbo-navy);
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  font-family: var(--font);
}

#tab-inventory {
  padding-bottom: 88px;
}

.btn--save-inv {
  position: sticky;
  bottom: 8px;
  width: 100%;
  min-height: 54px;
  margin-top: 16px;
  font-size: 18px;
  z-index: 6;
  box-shadow: 0 8px 24px rgba(0, 40, 85, 0.28);
}

.inv-card--meta .inv-card__fields {
  opacity: 0.95;
}

/* Campos */
.field { margin-bottom: 20px; max-width: 420px; }
.field label { display: block; font-weight: 700; margin-bottom: 6px; color: var(--ink); font-size: 15px; }
.field small { display: block; color: var(--muted); margin-top: 6px; font-size: 12.5px; line-height: 1.4; }
.field__input {
  width: 100%; padding: 12px; border: 2px solid var(--line); border-radius: 10px;
  font-family: var(--font); font-size: 16px;
}
.field--inline { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.field--inline .field__input { width: auto; }
.field--inline label { margin-bottom: 0; align-self: center; }

/* Reporte */
.report__summary {
  display: flex; flex-wrap: wrap; gap: 12px; margin: 16px 0;
}
.report__card {
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 18px; min-width: 120px;
}
.report__card b { display: block; font-size: 26px; color: var(--mobil-blue); }
.report__card span { font-size: 12.5px; color: var(--muted); }

/* Toast */
.toast {
  position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: #fff; padding: 12px 22px; border-radius: 999px;
  font-size: 14px; opacity: 0; pointer-events: none; transition: all 0.3s; z-index: 100;
}
.toast.is-show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Landscape / escritorio: ruleta m?s grande junto al contenido */
@media (orientation: landscape) and (min-width: 820px) {
  .screen__content { max-width: 680px; }
  :root { --wheel-size: min(72vh, 520px); }
}
