/* ══════════════════════════════════════════════════════
   ALTOYSIGA — Premium Dark Design System
   Apple + Tesla inspired — static export
   ══════════════════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');
:root {
  --bg:        #080F18;
  --bg2:       #0C1520;
  --bg3:       #111C28;
  --card:      #111C2A;
  --card2:     #0D1822;
  --card-hi:   #162134;
  --ink:       #ffffff;
  --ink2:      rgba(255,255,255,0.52);
  --ink3:      rgba(255,255,255,0.26);
  --red:       #C62020;
  --orange:    #D95528;
  --yellow:    #C9A000;
  --green:     #178226;
  --green2:    #64B21C;
  --border:    rgba(255,255,255,0.09);
  --border-hi: rgba(255,255,255,0.14);
  --shadow:    0 4px 20px rgba(0,0,0,0.55);
  --shadow-lg: 0 8px 36px rgba(0,0,0,0.65);
}
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}
html, body {
  height: 100%;
  background: var(--bg);
  overflow: hidden;
}
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'SF Pro Display', 'Segoe UI', sans-serif;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
/* ── SCREEN SYSTEM ── */
.screen {
  display: none;
  position: fixed;
  inset: 0;
  overflow-y: auto;
  background: var(--bg);
  max-width: 520px;
  margin: 0 auto;
}
.screen.active {
  display: flex;
  flex-direction: column;
}
.screen.placeholder {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  text-align: center;
  padding: 40px 28px;
}
.screen.placeholder h2 {
  font-size: 28px;
  font-weight: 900;
}
.screen.placeholder p {
  font-size: 15px;
  color: var(--ink2);
  line-height: 1.6;
}
/* ── SPLASH ── */
#screen-splash {
  position: fixed;
  inset: 0;
  overflow: hidden;
}
.splash-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 28% 22%, rgba(198,32,32,0.22) 0%, transparent 52%),
    radial-gradient(ellipse at 78% 62%, rgba(23,130,38,0.14) 0%, transparent 48%),
    radial-gradient(ellipse at 55% 88%, rgba(217,85,40,0.13) 0%, transparent 44%);
  pointer-events: none;
}
.splash-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 64px 28px 52px;
}
.splash-top {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.splash-eyebrow {
  font-size: 10px;
  font-weight: 700;
  color: var(--ink3);
  letter-spacing: 4px;
  margin-bottom: 18px;
  text-transform: uppercase;
}
.splash-logo {
  font-size: 76px;
  font-weight: 900;
  color: var(--ink);
  letter-spacing: -4px;
  line-height: 0.9;
  margin-bottom: 18px;
}
.splash-bars {
  display: flex;
  gap: 5px;
  margin-bottom: 26px;
}
.splash-bar {
  height: 4px;
  border-radius: 3px;
}
.splash-desc {
  font-size: 16px;
  color: var(--ink2);
  line-height: 1.65;
  max-width: 290px;
}
.splash-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.splash-cta-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink3);
  letter-spacing: 0.5px;
}
.splash-go {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(140deg, #C62020, #D95528);
  border: none;
  cursor: pointer;
  color: #fff;
  font-size: 28px;
  font-weight: 700;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.10), 0 8px 28px rgba(198,32,32,0.50);
  transition: transform 0.12s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.splash-go:active { transform: scale(0.91); }
/* ── HOME HEADER ── */
.home-header {
  padding: 36px 22px 15px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, var(--bg2) 0%, var(--bg) 100%);
  flex-shrink: 0;
}
.home-header-glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 88% 35%, rgba(198,32,32,0.26) 0%, transparent 52%),
    radial-gradient(ellipse at 12% 75%, rgba(23,130,38,0.12) 0%, transparent 44%);
  pointer-events: none;
}
.home-header-inner { position: relative; z-index: 1; }
.home-eyebrow {
  font-size: 8.5px;
  font-weight: 700;
  color: var(--ink3);
  letter-spacing: 0.8px;
  margin-bottom: 6px;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.home-title {
  font-size: 32px;
  font-weight: 900;
  color: var(--ink);
  letter-spacing: -0.8px;
  line-height: 1.1;
  margin-bottom: 13px;
}
.home-bars { display: flex; gap: 4px; }
.home-bar { height: 3px; border-radius: 2px; }
/* ── HOME BODY ── */
.home-body {
  padding: 13px 16px 22px;
  flex: 1;
  overflow-y: auto;
}
/* TIP */
.tip-row {
  background: linear-gradient(135deg, var(--card-hi) 0%, var(--card) 100%);
  border-radius: 14px;
  padding: 11px 14px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--border-hi);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,0.06);
}
.tip-badge {
  background: var(--orange);
  color: #fff;
  font-size: 8px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 99px;
  letter-spacing: 1.5px;
  flex-shrink: 0;
}
.tip-div {
  width: 1px;
  height: 24px;
  background: var(--border);
  flex-shrink: 0;
}
.tip-kt { font-size: 14px; font-weight: 800; color: var(--ink); }
.tip-es { font-size: 10px; color: var(--ink3); margin-top: 2px; }
/* SECTION LABEL */
.sec-hdr {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 9px;
}
.sec-title { font-size: 17px; font-weight: 900; color: var(--ink); }
.sec-sub { font-size: 11px; font-weight: 600; color: var(--ink3); }
/* HERO CARD */
.hero-card {
  border-radius: 18px;
  padding: 15px 17px;
  margin-bottom: 9px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  min-height: 92px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: linear-gradient(160deg, var(--card-hi) 0%, var(--card2) 100%);
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255,255,255,0.07);
  border: 1px solid var(--border-hi);
  transition: transform 0.12s;
}
.hero-card:active { transform: scale(0.97); }
.hc-glow { position: absolute; inset: 0; pointer-events: none; }
.hc-inner { position: relative; z-index: 1; }
.hc-arrow-abs {
  position: absolute;
  top: 14px;
  right: 15px;
  z-index: 2;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255,255,255,0.07);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: var(--ink2);
}
.hc-name {
  font-size: 26px;
  font-weight: 900;
  line-height: 1.08;
  margin-bottom: 4px;
  color: var(--ink);
}
.hc-desc { font-size: 12px; line-height: 1.4; color: var(--ink3); }
/* MINI GRID */
.mini-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 9px;
}
.mini-card {
  border-radius: 14px;
  padding: 12px 11px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  min-height: 90px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: linear-gradient(160deg, var(--card-hi) 0%, var(--card) 100%);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,0.06);
  border: 1px solid var(--border-hi);
  transition: transform 0.12s;
}
.mini-card:not(.disabled):active { transform: scale(0.95); }
.mini-card.disabled { opacity: 0.52; cursor: default; }
.mc-glow { position: absolute; inset: 0; pointer-events: none; }
.mc-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  justify-content: flex-end;
}
.mc-name {
  font-size: 13px;
  font-weight: 900;
  color: var(--ink);
  margin-bottom: 3px;
  line-height: 1.2;
}
.mc-desc { font-size: 10px; color: var(--ink3); line-height: 1.35; }
.mc-arrow {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink3);
}
/* EXAM BAR */
.exam-bar {
  background: linear-gradient(135deg, var(--card-hi) 0%, var(--card2) 100%);
  border-radius: 16px;
  padding: 13px 15px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border-hi);
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255,255,255,0.07);
  transition: transform 0.12s;
}
.exam-bar:active { transform: scale(0.97); }
.eb-glow {
  position: absolute;
  right: -24px;
  top: -24px;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(198,32,32,0.30) 0%, transparent 70%);
  pointer-events: none;
}
.eb-inner {
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
  z-index: 1;
}
.eb-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  border: 1px solid var(--border);
}
.eb-eyebrow {
  font-size: 9px;
  font-weight: 700;
  color: var(--ink3);
  letter-spacing: 2px;
  margin-bottom: 3px;
  text-transform: uppercase;
}
.eb-name { font-size: 16px; font-weight: 900; color: var(--ink); }
.eb-sub { font-size: 10px; color: var(--ink3); margin-top: 2px; }
.eb-btn {
  margin-left: auto;
  background: linear-gradient(140deg, var(--red), var(--orange));
  border-radius: 11px;
  padding: 9px 14px;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(198,32,32,0.40);
}
.eb-btn-txt { font-size: 12px; font-weight: 800; color: #fff; white-space: nowrap; }
/* FOOTER */
.home-footer {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 16px;
  font-size: 10px;
  color: var(--ink3);
  letter-spacing: 1px;
  font-weight: 600;
}
/* BACK BUTTON */
.back-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--card-hi), var(--card));
  border: 1px solid var(--border-hi);
  cursor: pointer;
  font-size: 18px;
  color: var(--ink);
  box-shadow: var(--shadow);
  transition: transform 0.12s;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  flex-shrink: 0;
}
.back-btn.small { margin-bottom: 0; }
.back-btn:active { transform: scale(0.93); }


/* ══════════════════════════════════════════════════════
   PREGUNTAS SCREEN
   ══════════════════════════════════════════════════════ */

/* Sub-screen system */
.pq-sub {
  display: none;
  flex-direction: column;
  min-height: 100%;
}
.pq-sub.active { display: flex; }

/* Shared header */
.pq-hdr {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 52px 20px 16px;
  flex-shrink: 0;
  background: linear-gradient(180deg, var(--bg2) 0%, var(--bg) 100%);
}
.pq-eyebrow {
  font-size: 9px;
  font-weight: 700;
  color: var(--ink3);
  letter-spacing: 2px;
  margin-bottom: 4px;
  text-transform: uppercase;
}
.pq-title {
  font-size: 26px;
  font-weight: 900;
  color: var(--ink);
  letter-spacing: -0.5px;
  line-height: 1.1;
}

/* Shared body scroll */
.pq-body {
  padding: 4px 16px 32px;
  flex: 1;
  overflow-y: auto;
}

/* ── LEVEL SELECTION ── */
.level-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}
.level-option {
  background: linear-gradient(135deg, var(--card-hi), var(--card));
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 800;
  color: var(--ink);
  transition: all 0.2s ease;
  line-height: 1.3;
}
.level-desc {
  font-size: 11px;
  font-weight: 500;
  color: var(--ink3);
  margin-top: 4px;
  line-height: 1.4;
}
#screen-preguntas .level-option:hover,
#screen-preguntas .level-option:focus {
  border-color: rgba(255,255,255,0.22);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.06), var(--shadow);
  outline: none;
}
#screen-preguntas .level-option.active {
  border-color: rgba(255,255,255,0.22);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.06), var(--shadow);
}

/* ── SHARED ACTION BUTTON ── */
.pq-action-btn {
  width: 100%;
  padding: 16px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  border: none;
  transition: transform 0.1s;
  letter-spacing: 0.2px;
}
.pq-action-btn:active { transform: scale(0.97); }
.pq-action-btn.primary {
  background: linear-gradient(140deg, var(--red), var(--orange));
  color: #fff;
  box-shadow: 0 4px 18px rgba(198,32,32,0.42);
}
.pq-action-btn.secondary {
  background: linear-gradient(135deg, var(--card-hi), var(--card));
  color: var(--ink);
  border: 1px solid var(--border-hi);
  box-shadow: var(--shadow);
}

/* ── QUESTION UI ── */
.pq-qhdr {
  padding: 52px 20px 14px;
  flex-shrink: 0;
}
.pq-prog-wrap {
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  margin-bottom: 12px;
  overflow: hidden;
}
.pq-prog-bar {
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--red), var(--orange));
  transition: width 0.35s ease;
  width: 0%;
}
.pq-score-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.pq-score-item {
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 5px;
}
.pq-score-item.cor { color: var(--green2); }
.pq-score-item.wrg { color: var(--red); }
.pq-qnum {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink3);
  letter-spacing: 0.5px;
}

.pq-qbody {
  padding: 0 16px 28px;
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Question card */
.pq-q-card {
  background: linear-gradient(135deg, var(--card-hi), var(--card));
  border: 1px solid var(--border-hi);
  border-radius: 16px;
  padding: 18px;
  box-shadow: var(--shadow);
}
.pq-hint {
  font-size: 11px;
  color: var(--ink3);
  margin-bottom: 10px;
  line-height: 1.4;
}
.pq-qtxt {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.6;
}
/* ===== KEY TERM BASE (kt1 + kt2 — identical style) ===== */
.pq-qtxt .kt {
  color: rgba(255,255,255,0.55);
  cursor: pointer;
  text-decoration: none;
  border: none;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

/* kt1 and kt2 intentionally identical */
.pq-qtxt .kt1,
.pq-qtxt .kt2 {
  color: silver;
  text-decoration: none;
  border-bottom: none;
}

/* ===== TOOLTIP ===== */
.pq-qtxt .tb {
  display: none;
  background: rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.9);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 7px;
  margin-left: 6px;
  white-space: nowrap;
}

/* Answer options */
.pq-opts {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pq-opt {
  background: linear-gradient(135deg, var(--card-hi), var(--card));
  border: 1px solid var(--border);
  border-radius: 13px;
  padding: 14px 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink2);
  transition: border-color 0.15s, transform 0.1s;
  box-shadow: var(--shadow);
  line-height: 1.4;
}
.pq-opt:active { transform: scale(0.98); }
.pq-opt-dot {
  width: 18px;
  height: 18px;
  min-width: 18px;
  border-radius: 50%;
  border: 2px solid var(--border-hi);
  transition: background 0.15s, border-color 0.15s;
}
.pq-opt.cor {
  border-color: var(--green2);
  color: var(--ink);
}
.pq-opt.cor .pq-opt-dot {
  background: var(--green2);
  border-color: var(--green2);
}
.pq-opt.wrg {
  border-color: var(--red);
  opacity: 0.65;
}
.pq-opt.wrg .pq-opt-dot {
  background: var(--red);
  border-color: var(--red);
}

/* ── RESULTS ── */
.pq-res-card {
  background: linear-gradient(135deg, var(--card-hi), var(--card));
  border: 1px solid var(--border-hi);
  border-radius: 18px;
  padding: 26px 20px 22px;
  margin-bottom: 4px;
  box-shadow: var(--shadow-lg);
  text-align: center;
}
.pq-res-pct {
  font-size: 60px;
  font-weight: 900;
  letter-spacing: -3px;
  line-height: 1;
  margin-bottom: 8px;
  transition: color 0.3s;
}
.pq-res-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 6px;
}
.pq-res-sub {
  font-size: 13px;
  color: var(--ink2);
  line-height: 1.55;
  margin-bottom: 20px;
  max-width: 260px;
  margin-left: auto;
  margin-right: auto;
}
.pq-res-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
}
.pq-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}
.pq-stat span:first-child {
  font-size: 30px;
  font-weight: 900;
  line-height: 1;
}
.pq-stat span:last-child {
  font-size: 9px;
  font-weight: 700;
  color: var(--ink3);
  letter-spacing: 1.5px;
  text-transform: uppercase;
}
.pq-stat.cor span:first-child { color: var(--green2); }
.pq-stat.wrg span:first-child { color: var(--red); }
.pq-stat-div {
  width: 1px;
  height: 40px;
  background: var(--border);
}

/* Wrong terms list */
.pq-wrong-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.pq-wrong-item {
  background: linear-gradient(135deg, var(--card-hi), var(--card));
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.pq-wi-en {
  font-size: 13px;
  font-weight: 800;
  color: #FFD020;
}
.pq-wi-es {
  font-size: 11px;
  color: var(--ink3);
  text-align: right;
}

.pq-res-btns {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
}

.pq-review-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 8px;
}
.pq-review-item {
  background: linear-gradient(135deg, var(--card-hi), var(--card));
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.pq-ri-num {
  font-size: 11px;
  font-weight: 800;
  color: var(--green2);
  min-width: 20px;
  padding-top: 2px;
  flex-shrink: 0;
}
.pq-ri-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}
.pq-ri-q {
  font-size: 13px;
  color: var(--ink);
  line-height: 1.4;
}
.pq-ri-ans {
  font-size: 12px;
  font-weight: 700;
  color: var(--green2);
}

/* ══════════════════════════════════════════════════════
   ASOCIAR MODULE
   ══════════════════════════════════════════════════════ */

/* Sub-screen pattern — mirrors .pq-sub */
.as-sub          { display: none; flex-direction: column; width: 100%; min-height: 100%; }
.as-sub.active   { display: flex; }

/* ── Shared header ── */
.as-hdr {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.as-hdr-title {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ink);
}

/* ── SETUP sub-screen ── */
.as-setup-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 36px 24px 40px;
}
.as-setup-icon    { font-size: 48px; margin-bottom: 20px; }
.as-setup-heading {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 12px;
  text-align: center;
}
.as-setup-desc {
  font-size: 13px;
  color: rgba(255,255,255,0.55);
  text-align: center;
  line-height: 1.6;
  margin-bottom: 28px;
  max-width: 280px;
}
.as-setup-rules {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 36px;
  align-self: stretch;
  max-width: 260px;
}
.as-rule {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: rgba(255,255,255,0.7);
}
.as-rule-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.as-start-btn {
  background: var(--green2);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 15px 36px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: opacity 0.15s;
  width: 100%;
  max-width: 280px;
}
.as-start-btn:active { opacity: 0.75; }

/* ── BOARD sub-screen ── */
.as-board-hdr {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  gap: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.as-back-mini {
  background: rgba(255,255,255,0.08);
  border: none;
  border-radius: 8px;
  color: var(--ink);
  font-size: 16px;
  width: 34px;
  height: 34px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.as-progress {
  font-size: 18px;
  font-weight: 800;
  color: var(--ink);
  flex: 1;
}
.as-prog-sep   { color: rgba(255,255,255,0.35); }
.as-prog-label { font-size: 12px; font-weight: 500; color: rgba(255,255,255,0.4); }
.as-attempts-badge {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.45);
  text-align: right;
}

/* ── Grid ── */
.as-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 16px 14px 24px;
}

/* ── Cards ── */
.as-card {
  background: var(--card);
  border: 1.5px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 14px 10px;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  color: rgba(255,255,255,0.85);
  line-height: 1.35;
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s, background 0.15s, opacity 0.35s, transform 0.15s;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  word-break: break-word;
}
/* English cards inherit kt/kt2 silver tone */
.as-card-en {
  color: silver;
  border-color: rgba(192,192,192,0.15);
}
.as-card-es {
  color: rgba(255,255,255,0.9);
  border-color: rgba(255,255,255,0.08);
}

/* States */
.as-card.as-selected {
  border-color: #64B21C;
  background: rgba(100,178,28,0.12);
  color: #fff;
  transform: scale(1.04);
}
.as-card.as-correct {
  border-color: #64B21C;
  background: rgba(100,178,28,0.22);
  color: #64B21C;
}
.as-card.as-wrong {
  border-color: #C62020;
  background: rgba(198,32,32,0.15);
  color: #ff6b6b;
  animation: as-shake 0.4s ease;
}
.as-card.as-matched-done {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.85);
  border-color: transparent;
  background: transparent;
  cursor: default;
}

@keyframes as-shake {
  0%   { transform: translateX(0); }
  20%  { transform: translateX(-6px); }
  40%  { transform: translateX(6px); }
  60%  { transform: translateX(-4px); }
  80%  { transform: translateX(4px); }
  100% { transform: translateX(0); }
}

/* ── RESULTS sub-screen ── */
.as-results-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 36px 24px 40px;
}
.as-result-icon    { font-size: 52px; margin-bottom: 16px; }
.as-result-heading {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 12px;
}
.as-result-stat {
  font-size: 15px;
  color: rgba(255,255,255,0.55);
  margin-bottom: 8px;
}
.as-result-acc {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 36px;
}
.as-home-btn {
  background: transparent;
  border: 1.5px solid rgba(255,255,255,0.18);
  border-radius: 12px;
  padding: 13px 36px;
  font-size: 14px;
  font-weight: 600;
  color: rgba(255,255,255,0.6);
  cursor: pointer;
  margin-top: 12px;
  width: 100%;
  max-width: 280px;
  transition: opacity 0.15s;
}
.as-home-btn:active { opacity: 0.7; }

/* ══════════════════════════════════════════════════════
   FLASHCARDS MODULE
   ══════════════════════════════════════════════════════ */

/* Sub-screen pattern — mirrors .pq-sub / .as-sub */
.fc-sub          { display: none; flex-direction: column; width: 100%; min-height: 100%; }
.fc-sub.active   { display: flex; }

/* ── SETUP screen ── */
.fc-setup-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px 24px 40px;
  gap: 0;
}
.fc-setup-icon    { font-size: 52px; margin-bottom: 18px; }
.fc-setup-heading {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 10px;
  text-align: center;
}
.fc-setup-desc {
  font-size: 13px;
  color: var(--ink2);
  text-align: center;
  line-height: 1.6;
  margin-bottom: 28px;
}
.fc-setup-rules {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 36px;
  align-self: stretch;
  max-width: 260px;
}
.fc-rule {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--ink2);
}
.fc-rule-key {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 6px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}
.fc-rule-sep { color: var(--ink3); }

/* ── VIEWER screen ── */
.fc-viewer-hdr {
  display: flex;
  align-items: center;
  padding: 12px 14px;
  gap: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}
.fc-hdr-center {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.fc-counter {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1;
}
.fc-progress-bar-wrap {
  height: 3px;
  background: rgba(255,255,255,0.08);
  border-radius: 2px;
  overflow: hidden;
}
.fc-progress-bar {
  height: 100%;
  background: var(--green2);
  border-radius: 2px;
  transition: width 0.3s ease;
}
.fc-flip-hint {
  font-size: 10px;
  font-weight: 500;
  color: var(--ink3);
  text-align: right;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── Card stage ── */
.fc-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 18px;
  overflow: hidden;
}
.fc-card-wrap {
  width: 100%;
  max-width: 360px;
  aspect-ratio: 3 / 2;
  perspective: 1000px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.fc-card-inner {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.42s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 20px;
}
.fc-card-inner.fc-flipped {
  transform: rotateY(180deg);
}
.fc-card-face {
  position: absolute;
  inset: 0;
  border-radius: 20px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px 28px;
  box-shadow: var(--shadow-lg);
}
.fc-card-front {
  background: linear-gradient(145deg, var(--card-hi) 0%, var(--card) 100%);
  border: 1px solid rgba(192,192,192,0.18);
}
.fc-card-back {
  background: linear-gradient(145deg, #0E1E10 0%, #081410 100%);
  border: 1px solid rgba(100,178,28,0.22);
  transform: rotateY(180deg);
}
.fc-side-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink3);
  position: absolute;
  top: 14px;
  left: 20px;
}
.fc-card-back .fc-side-label { color: rgba(100,178,28,0.55); }
.fc-term {
  font-size: clamp(18px, 5vw, 28px);
  font-weight: 800;
  color: var(--ink);
  text-align: center;
  line-height: 1.25;
  letter-spacing: -0.01em;
}
.fc-card-back .fc-term { color: #a8e088; }
.fc-card-hint {
  position: absolute;
  bottom: 12px;
  font-size: 10px;
  color: var(--ink3);
  font-weight: 500;
}

/* ── Navigation row ── */
.fc-nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px 24px;
  flex-shrink: 0;
}
.fc-nav-btn {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  color: var(--ink);
  font-size: 24px;
  width: 48px;
  height: 48px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.15s, background 0.15s;
  line-height: 1;
}
.fc-nav-btn:active { background: rgba(255,255,255,0.13); }
.fc-nav-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ── Slide animations (next/prev) ── */
@keyframes fcSlideOutLeft {
  from { transform: translateX(0); opacity: 1; }
  to   { transform: translateX(-36px); opacity: 0; }
}
@keyframes fcSlideOutRight {
  from { transform: translateX(0); opacity: 1; }
  to   { transform: translateX(36px); opacity: 0; }
}
@keyframes fcSlideInRight {
  from { transform: translateX(36px); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}
@keyframes fcSlideInLeft {
  from { transform: translateX(-36px); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}
.fc-slide-out-left  { animation: fcSlideOutLeft  0.18s ease forwards; }
.fc-slide-out-right { animation: fcSlideOutRight 0.18s ease forwards; }
.fc-slide-in-right  { animation: fcSlideInRight  0.28s ease forwards; }
.fc-slide-in-left   { animation: fcSlideInLeft   0.28s ease forwards; }

/* ── CHECKPOINT screen ── */
.fc-checkpoint-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  padding: 40px 24px;
  gap: 0;
}
.fc-chk-icon {
  font-size: 52px;
  margin-bottom: 20px;
}
.fc-chk-count {
  font-size: 22px;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}
.fc-chk-sub {
  font-size: 14px;
  color: var(--ink2);
  margin-bottom: 36px;
}

/* ══════════════════════════════════════════════════════
   SEÑALES MODULE v2
   ══════════════════════════════════════════════════════ */

/* ── Header ── */
.sn-hdr {
  display: flex;
  align-items: center;
  padding: 14px 16px 12px;
  gap: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}
.sn-lang-btn {
  margin-left: auto;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 20px;
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 5px 14px;
  cursor: pointer;
  transition: background 0.15s;
  flex-shrink: 0;
}
.sn-lang-btn:active { background: rgba(255,255,255,0.13); }

/* ── Instruction block ── */
.sn-instr {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 12px 16px 0;
  padding: 12px 14px;
  background: linear-gradient(135deg, var(--card-hi) 0%, var(--card) 100%);
  border: 1px solid var(--border-hi);
  border-radius: 14px;
  transition: opacity 0.4s ease, transform 0.4s ease;
  flex-shrink: 0;
}
.sn-instr-icon {
  width: 36px;
  height: 36px;
  object-fit: contain;
  flex-shrink: 0;
  opacity: 0.85;
  filter: invert(1) brightness(0.9);
}
.sn-instr-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.4;
}
.sn-instr-sub {
  font-size: 11px;
  color: var(--ink2);
  margin-top: 2px;
  line-height: 1.4;
}

/* ── Card shell ── */
.sn-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  padding: 16px 18px 10px;
  gap: 14px;
  min-height: 0;
}

/* ── Sign image area ── */
.sn-img-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 0;
}

/* White premium card around the sign */
.sn-img-card {
  background: #f5f5f5;
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.28), 0 1px 4px rgba(0,0,0,0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}
@media (hover: hover) {
  .sn-img-card:hover { transform: scale(1.02); }
}

/* Fade-in on load */
.sn-img {
  max-width: min(240px, 68vw);
  max-height: 220px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  opacity: 0;
  transition: opacity 0.25s ease;
  border-radius: 4px;
}
.sn-img.sn-img-loaded { opacity: 1; }

.sn-img-preload {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
  left: -9999px;
}

/* ── Options ── */
.sn-opts {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-shrink: 0;
}
.sn-opt {
  width: 100%;
  background: linear-gradient(135deg, var(--card-hi) 0%, var(--card) 100%);
  border: 1.5px solid var(--border-hi);
  border-radius: 14px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  padding: 15px 18px;
  cursor: pointer;
  text-align: left;
  line-height: 1.4;
  transition: background 0.12s, border-color 0.12s, transform 0.1s;
  -webkit-tap-highlight-color: transparent;
}
.sn-opt:not(:disabled):active { transform: scale(0.98); }
.sn-opt.sn-correct {
  background: rgba(23,130,38,0.22);
  border-color: var(--green2);
  color: #8fdd70;
}
.sn-opt.sn-wrong {
  background: rgba(198,32,32,0.22);
  border-color: var(--red);
  color: #ff8080;
}
.sn-opt:disabled { cursor: default; }

/* ── Footer / progress ── */
.sn-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 18px 20px;
  flex-shrink: 0;
}
.sn-prog {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink3);
  white-space: nowrap;
  flex-shrink: 0;
}
.sn-prog-bar-wrap {
  flex: 1;
  height: 3px;
  background: rgba(255,255,255,0.08);
  border-radius: 2px;
  overflow: hidden;
}
.sn-prog-bar {
  height: 100%;
  background: #4080dd;
  border-radius: 2px;
  transition: width 0.3s ease;
}

/* ── Checkpoint overlay ── */
.sn-checkpoint {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 10;
  background: rgba(8,15,24,0.92);
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(2px);
}
.sn-checkpoint.sn-cp-visible { display: flex; }
.sn-cp-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 36px 28px;
  gap: 0;
  text-align: center;
}
.sn-cp-icon {
  font-size: 52px;
  margin-bottom: 18px;
}
.sn-cp-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 10px;
  letter-spacing: -0.02em;
}
.sn-cp-sub {
  font-size: 14px;
  color: var(--ink2);
  margin-bottom: 32px;
  line-height: 1.5;
}
/* screen-senales must be position:relative for overlay to work */
#screen-senales { position: relative; }
