/* Teachess para navegador: la misma paleta que la app de Unity (Ui.cs). */
:root {
  --bg: #0f171f; --panel: #1a2633; --soft: #243647; --gold: #edb847; --blue: #4599ed; --red: #e6544d; --green: #54c26e;
  --ink: #f0f2f5; --dim: #a8b8c7; --light-sq: #ecdcb8; --dark-sq: #a8754c; --r: 16px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; color: var(--ink); overscroll-behavior: none;
  background: linear-gradient(rgba(6,10,16,.80), rgba(6,10,16,.88)), url(arte/fondo_vertical.webp) center / cover fixed, var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", Inter, "Segoe UI", Roboto, system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; border: 0; cursor: pointer; }
#app { height: 100dvh; max-width: 560px; margin: 0 auto; display: flex; flex-direction: column; }
.loading { margin: auto; color: var(--dim); }

/* ---------- pantallas de lista ---------- */
.screen { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 14px 14px calc(14px + env(safe-area-inset-bottom)); gap: 12px; overflow-y: auto; }
.head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.head h1 { margin: 0; font-size: 28px; font-weight: 800; letter-spacing: -.03em; color: var(--gold); line-height: 1.1; }
.head p { margin: 6px 0 0; color: var(--dim); font-size: 14px; line-height: 1.35; }
.pillbtn { flex: none; background: var(--soft); border-radius: 12px; padding: 10px 16px; font-weight: 700; font-size: 14px; }
.card { background: var(--panel); border-radius: var(--r); padding: 14px 16px; }
.row { display: block; width: 100%; text-align: left; background: var(--panel); border-radius: var(--r); padding: 12px 16px; position: relative;
  transition: transform .12s ease; }
.row:active { transform: scale(.985); }
.row .k { font-size: 11px; font-weight: 800; letter-spacing: .04em; color: var(--dim); text-transform: uppercase; }
.row .k.cls { color: var(--blue); }
.row .n { font-size: 18px; font-weight: 700; margin-top: 3px; padding-right: 96px; letter-spacing: -.01em; }
.row .d { font-size: 12.5px; color: var(--dim); margin-top: 4px; line-height: 1.35; }
.row .e { position: absolute; right: 16px; top: 14px; font-size: 13px; color: var(--dim); }
.row.done { background: #213d33; } .row.done .e { color: var(--green); font-weight: 700; }
.row.next { background: var(--gold); color: #1a1710; } .row.next .k, .row.next .d, .row.next .e { color: #47381a; }
.list { display: flex; flex-direction: column; gap: 8px; }

/* ---------- menú ---------- */
.menu-top { text-align: center; padding-top: 4px; }
.menu-top h1 { margin: 0; font-size: 46px; font-weight: 800; letter-spacing: -.04em; color: var(--gold); line-height: 1; }
.menu-top p { margin: 6px 0 0; color: var(--ink); font-size: 16px; }
.menu-board { width: min(74%, 42dvh); margin: 4px auto 0; }
.big { display: block; width: 100%; text-align: left; background: var(--soft); border-radius: var(--r); padding: 13px 18px; transition: transform .12s ease; }
.big:active { transform: scale(.985); }
.big b { display: block; font-size: 19px; font-weight: 800; letter-spacing: -.01em; }
.big span { display: block; font-size: 13px; color: var(--dim); margin-top: 2px; }
.big.gold { background: var(--gold); color: #1a1710; } .big.gold span { color: #47381a; }
.portal { align-self: center; color: var(--dim); font-size: 13px; text-decoration: none; padding: 4px 10px; }

/* ---------- barras de experiencia ---------- */
.xp { display: flex; flex-direction: column; gap: 10px; }
.xp .lab { display: flex; justify-content: space-between; font-size: 14px; color: var(--dim); }
.xp .lab b { color: var(--ink); font-weight: 700; }
.bar { height: 10px; border-radius: 99px; background: rgba(0,0,0,.45); overflow: hidden; margin-top: 5px; }
.bar i { display: block; height: 100%; border-radius: 99px; min-width: 3%; transition: width .6s ease; }
.xp.mini { gap: 3px; width: 44%; } .xp.mini .lab { font-size: 10.5px; } .xp.mini .bar { height: 5px; margin-top: 2px; }

/* ---------- pantalla de tablero ---------- */
.play { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 12px; min-height: 50px; }
.top h2 { margin: 0; font-size: 16px; font-weight: 800; color: var(--gold); line-height: 1.15; letter-spacing: -.01em; }
.board-wrap { width: min(100%, 100dvh - 310px); margin: 0 auto; flex: none; }
/* Carlos, 29/11: «en la partida sigue con ese margen, así que el tablero se ve más pequeño… haz que ese margen sea mínimo».
   En el móvil de pie (con las barras del navegador quedan ~620-700 px de alto) el tope de arriba encogía el tablero y dejaba
   10-30 px a cada lado: ahora va a todo el ancho mientras queden ≥240 px para la cabecera y la profesora (que se desplaza). */
/* Test rápido (y «Tus errores»): todo en una pantalla sin desplazar (Carlos, 29/11). El tablero se queda con lo que dejan el
   título, la frase (2 líneas), las 3 opciones compactas y los botones (~320 px); fitQuiz encoge más si aún sobra algo. */
.screen.quiz { gap: 8px; }
.screen.quiz .head h1 { font-size: 26px; }
.screen.quiz .menu-board.quiz-board { width: min(100%, 100dvh - 322px); margin: 0 auto; }
.screen.quiz .speech { font-size: 15px; line-height: 1.3; }
.screen.quiz .list { gap: 6px; }
.screen.quiz .opt { font-size: 18px; padding: 10px; border-radius: 14px; line-height: 1.2; }
.screen.quiz .btns button { min-height: 48px; }
@media (max-aspect-ratio: 3/4) {
  .board-wrap { width: min(100%, 100dvh - 240px); }
  .play .board-wrap .tablero3d { margin: 3px 0; }
  .board-wrap .tablero-sitio > .board { width: calc(100% - 8px); margin: 4px auto; box-shadow: 0 0 0 3px #3b2416, 0 0 0 4px #6b4a2e, 0 10px 26px rgba(0,0,0,.6) !important; }
}
.side { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); gap: 8px; }
.teacher { flex: 1; min-height: 0; background: var(--panel); border-radius: var(--r); padding: 12px 14px; overflow-y: auto; position: relative; }
.line { position: absolute; left: 14px; right: 14px; top: 6px; height: 4px; border-radius: 99px; background: rgba(255,255,255,.12); display: none; }
.line i { display: block; height: 100%; width: 0; border-radius: 99px; background: var(--gold); }
.teacher.in-class .line { display: block; }
.who { display: flex; align-items: center; gap: 10px; margin: 4px 0 8px; }
.avatar { width: 56px; height: 56px; border-radius: 50%; background: #38546f; border: 3px solid var(--gold); overflow: hidden; flex: none; }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar.big { width: 72px; height: 72px; }
.top { background: rgba(10,16,22,.55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.teacher { background: rgba(26,38,51,.94) !important; }
.who b { color: var(--gold); font-size: 13px; }
.speech { font-size: clamp(15px, 4.1vw, 18px); line-height: 1.4; }
/* 02/12: el «Más» del panel del profesor (mas.js) */
.speech button.mas { font: inherit; font-size: .85em; font-weight: 700; color: #fff; background: #2e8b4d; border: 0; border-radius: 999px;
  padding: .1em .8em; margin-left: .2em; cursor: pointer; vertical-align: baseline; }
.speech button.mas.abierto { background: #5b6675; }
.speech .mas-texto { white-space: pre-line; margin-top: .6em; padding-top: .5em; border-top: 1px solid rgba(127,127,127,.35); color: var(--ink, inherit); }
.speech.red { color: var(--red); } .speech.green { color: var(--green); } .speech.blue { color: var(--blue); }
.extra { margin-top: 10px; color: var(--gold); font-weight: 700; font-size: clamp(14px, 3.8vw, 16px); line-height: 1.35; }
.btns { display: flex; gap: 8px; flex: none; flex-wrap: wrap; }
.btns button { min-width: 28%; }
.btns button { flex: 1; min-height: 54px; border-radius: 14px; background: var(--soft); font-weight: 700; font-size: 15px; padding: 6px 4px; transition: transform .1s ease, opacity .2s; }
.btns button:active { transform: scale(.96); }
.btns button:disabled { opacity: .35; }
.btns .gold { background: var(--gold); color: #1a1710; } .btns .blue { background: var(--blue); } .btns .red { background: var(--red); } .btns .green { background: var(--green); color: #0f1f14; }

/* ---------- tablero ---------- */
.board { position: relative; width: 100%; aspect-ratio: 1; border-radius: 6px; overflow: hidden; touch-action: none; user-select: none;
  box-shadow: 0 0 0 5px #3a2418, 0 10px 30px rgba(0,0,0,.5); margin: 5px 0; }
.squares { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(8, 1fr); grid-template-rows: repeat(8, 1fr); }
.squares div { position: relative; background: var(--light-sq) var(--tex-claro, url(arte/texturas/casilla_clara.webp)) var(--bx) var(--by) / 320%; }
.squares div.dk { background: var(--dark-sq) var(--tex-oscuro, url(arte/texturas/casilla_oscura.webp)) var(--bx) var(--by) / 320%; }
.squares div.rot { background-size: 320% 280%; }
.board { box-shadow: 0 0 0 6px #3b2416, 0 0 0 7px #6b4a2e, 0 14px 34px rgba(0,0,0,.6) !important; }
.squares div.last::after, .squares div.sel::after { content: ""; position: absolute; inset: 0; background: rgba(237,184,71,.5); }
.squares div.sel::after { background: rgba(69,153,237,.5); }
.squares span { position: absolute; font-size: clamp(7px, 1.8vw, 10px); font-weight: 700; opacity: .55; color: #3a2418; pointer-events: none; }
.squares span.f { right: 2px; bottom: 0; } .squares span.r { left: 2px; top: 0; }
.pieces, .draw { position: absolute; inset: 0; pointer-events: none; }
.piece { position: absolute; left: 0; top: 0; width: 12.5%; height: 12.5%; will-change: transform; }
.piece img { width: 100%; height: 100%; display: block; transform: scale(1.1); transform-origin: 50% 92%;
  filter: drop-shadow(0 3px 2px rgba(0,0,0,.45)); pointer-events: none; user-select: none; -webkit-user-drag: none; }
.piece.gone { opacity: 0; transition: opacity .18s ease .12s; }

/* ---------- tutoría y trofeos ---------- */
.report { white-space: pre-wrap; font-size: 15px; line-height: 1.45; }
.report b { color: var(--ink); }
.trophy { display: flex; align-items: center; gap: 14px; background: var(--panel); border-radius: var(--r); padding: 12px 14px; }
.trophy img { width: 64px; height: 64px; flex: none; filter: grayscale(1) brightness(.55); opacity: .65; }
.trophy.have { background: #332b14; } .trophy.have img { filter: drop-shadow(0 3px 4px rgba(0,0,0,.5)); opacity: 1; }
.trophy b { display: block; font-size: 16px; } .trophy.have b { color: var(--gold); }
.trophy span { font-size: 12.5px; color: var(--dim); }
.foot { display: flex; gap: 8px; margin-top: auto; }
.foot button { flex: 1; min-height: 52px; border-radius: 14px; background: var(--soft); font-weight: 700; }
.foot .gold { background: var(--gold); color: #1a1710; }

/* ---------- pantallas anchas: tablero a la izquierda, profesor a la derecha ---------- */
@media (min-aspect-ratio: 1/1) {
  html, body { background: linear-gradient(rgba(6,10,16,.80), rgba(6,10,16,.88)), url(arte/fondo_horizontal.webp) center / cover fixed, var(--bg); }
}
.menu-board .board { box-shadow: 0 0 0 6px #3b2416, 0 18px 40px rgba(0,0,0,.7) !important; }
@media (min-width: 900px) and (min-aspect-ratio: 5/4) {
  #app.wide { max-width: 1180px; }
  #app.wide .play { display: grid; grid-template-columns: min(92dvh - 20px, 58vw) 1fr; grid-template-rows: auto 1fr; column-gap: 18px; padding: 10px 16px; }
  #app.wide .top { grid-column: 2; padding: 4px 0; }
  #app.wide .board-wrap { grid-column: 1; grid-row: 1 / 3; width: 100%; align-self: center; }
  #app.wide .side { grid-column: 2; padding: 0 0 8px; }
  #app.wide .speech { font-size: 19px; } #app.wide .extra { font-size: 17px; }
}

/* ---------- letra (Nunito para el texto, Playfair Display para los títulos; OFL, dentro de la app) ---------- */
@font-face { font-family: "Nunito"; font-weight: 600; font-display: swap; src: url(arte/fuentes/Nunito-SemiBold.woff2) format("woff2"); }
@font-face { font-family: "Nunito"; font-weight: 800; font-display: swap; src: url(arte/fuentes/Nunito-ExtraBold.woff2) format("woff2"); }
@font-face { font-family: "Playfair"; font-weight: 700; font-display: swap; src: url(arte/fuentes/Playfair-Bold.woff2) format("woff2"); }
@font-face { font-family: "Playfair"; font-weight: 700; font-style: italic; font-display: swap; src: url(arte/fuentes/Playfair-BoldItalic.woff2) format("woff2"); }
html, body { font-family: "Nunito", -apple-system, "Segoe UI", system-ui, sans-serif; }
h1, .menu-top h1, .top h2, .trophy b { font-family: "Playfair", Georgia, serif; letter-spacing: -.01em; }
b, strong { font-weight: 800; }

/* ---------- el texto del profesor: jugadas, casillas, piezas y palabras clave destacan ---------- */
.mv { display: inline-flex; align-items: center; gap: 2px; padding: 0 7px 0 3px; margin: 0 1px; border-radius: 999px; background: rgba(143,211,255,.16);
  color: #9fdcff; font-weight: 800; white-space: nowrap; line-height: 1.35; }
.mv img { width: 1.25em; height: 1.25em; margin: -.1em 0; }
.sq { color: #f2c14e; font-weight: 800; border-bottom: 2px solid rgba(242,193,78,.45); }
.pz { font-weight: 800; color: #fff; }
.hot { font-family: "Playfair", Georgia, serif; font-style: italic; color: #ff9b74; }
.speech { animation: entra .45s ease both; }
.speech.red .hot, .speech.red .pz { color: inherit; }
@keyframes entra { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- el bocadillo del profesor ---------- */
.teacher { border: 1px solid rgba(255,255,255,.06); box-shadow: 0 10px 30px rgba(0,0,0,.35); }
.teacher::before { content: ""; position: absolute; left: 34px; top: -9px; width: 18px; height: 18px; background: inherit; transform: rotate(45deg);
  border-left: 1px solid rgba(255,255,255,.06); border-top: 1px solid rgba(255,255,255,.06); }
.avatar.pop { animation: pop .45s cubic-bezier(.3,1.6,.5,1); }
.avatar.shake { animation: shake .45s ease; }
@keyframes pop { 0% { transform: scale(1); } 45% { transform: scale(1.22) rotate(-6deg); } 100% { transform: scale(1); } }
@keyframes shake { 0%, 100% { transform: none; } 20% { transform: translateX(-7px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(3px); } }
.who .avatar { width: 64px; height: 64px; }
.confeti { position: fixed; inset: 0; pointer-events: none; z-index: 50; }

/* ---------- la clase como un tren: parada 1, 2, 3… ---------- */
.train { position: relative; height: 34px; margin: 2px 6px 6px; }
.train .via { position: absolute; left: 12px; right: 12px; top: 15px; height: 4px; border-radius: 99px; background: rgba(255,255,255,.14); }
.train .via i { display: block; height: 100%; width: 0; border-radius: 99px; background: var(--gold); transition: width .3s linear; }
.train .st { position: absolute; top: 5px; width: 24px; height: 24px; margin-left: -12px; border-radius: 50%; background: rgba(255,255,255,.22);
  color: #1a1710; font-size: 12px; font-weight: 800; display: grid; place-items: center; transition: background .3s, transform .3s; }
.train .st.done { background: var(--gold); }
.train .st.now { background: #ffe9a8; transform: scale(1.18); box-shadow: 0 0 0 4px rgba(242,193,78,.25); }
.train .loco { position: absolute; top: -3px; width: 40px; height: 40px; margin-left: -20px; border-radius: 50%; background: var(--gold); color: #1a1710;
  display: grid; place-items: center; font-weight: 800; box-shadow: 0 4px 14px rgba(0,0,0,.4); transition: left .25s linear; animation: late 1s ease-in-out infinite; }
.train .loco img { width: 30px; height: 30px; }
@keyframes late { 50% { transform: scale(1.08); } }
.teacher.in-class .line { display: none; }

/* ---------- retos ---------- */
.big.chest { background: linear-gradient(135deg, #4d3c10, #7a5c14); }
.reto { display: flex; gap: 12px; align-items: center; background: var(--panel); border-radius: var(--r); padding: 12px 14px; }
.reto.col { flex-direction: column; align-items: stretch; }
.reto.listo { background: linear-gradient(135deg, #3d3010, #5a4512); box-shadow: 0 0 0 2px rgba(237,184,71,.5); }
.reto h3 { margin: 0 0 4px; font-family: "Playfair", Georgia, serif; color: var(--gold); font-size: 19px; }
.reto p { margin: 0; color: var(--dim); font-size: 13.5px; line-height: 1.35; flex: 1; }
.reto > button { flex: none; min-width: 92px; min-height: 52px; border-radius: 14px; background: var(--soft); font-weight: 800; }
.reto > button.gold { background: var(--gold); color: #1a1710; } .reto > button.blue { background: var(--blue); }
.reto > button:disabled { opacity: .5; }
.liga { margin: 4px 0 8px; padding-left: 22px; font-size: 14px; }
.liga li { padding: 2px 0; } .liga li span { float: right; color: var(--dim); }
.liga li.sube::marker { color: var(--green); } .liga li.tu { color: var(--gold); font-weight: 800; }
.jefes { display: flex; gap: 8px; } .jefes button { flex: 1; min-height: 56px; border-radius: 14px; background: #6b2e27; font-weight: 800; padding: 6px; }
.jefes button span { display: block; font-size: 12px; opacity: .75; font-weight: 600; } .jefes button.won { background: #213d33; }
.album { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.cromo { background: var(--panel); border-radius: 14px; padding: 8px; text-align: center; }
.cromo .marco { aspect-ratio: 1; border-radius: 12px; display: grid; place-items: center; background: rgba(255,255,255,.06); margin-bottom: 6px; }
.cromo .marco img { width: 78%; height: 78%; object-fit: contain; filter: grayscale(1) brightness(.5); }
.cromo b { display: block; font-size: 12.5px; line-height: 1.2; } .cromo span { font-size: 11.5px; color: var(--dim); }
.cromo.l1 .marco { background: linear-gradient(135deg, #8a5a32, #c48a55); } .cromo.l2 .marco { background: linear-gradient(135deg, #8d96a3, #dfe5ec); }
.cromo.l3 .marco { background: linear-gradient(135deg, #b7862b, #ffe08a); } .cromo.l1 img, .cromo.l2 img, .cromo.l3 img { filter: drop-shadow(0 3px 4px rgba(0,0,0,.4)); }

/* ---------- acabado premium (Carlos, 22/11): botones con degradado, brillo y sombra; letra más grande ---------- */
.btns button, .big, .row, .pillbtn, .opt, .tier {
  background-image: linear-gradient(180deg, rgba(255,255,255,.16), rgba(255,255,255,0) 55%, rgba(0,0,0,.14));
  box-shadow: 0 8px 22px rgba(0,0,0,.38), inset 0 1px 0 rgba(255,255,255,.35), inset 0 0 0 1px rgba(255,255,255,.08);
}
.btns button, .pillbtn { background-color: #eef1f6; color: #14203a; }
.btns button { font-size: 17px; border-radius: 18px; min-height: 58px; }
.btns .gold, .big.gold, .row.next { background-color: #ffcc57; color: #1b1505; }
.btns .blue { background-color: #3f86ea; color: #fff; } .btns .red { background-color: #e5534c; color: #fff; } .btns .green { background-color: #3fb86a; color: #fff; }
.big { border-radius: 22px; padding: 14px 18px 14px 84px; position: relative; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.3); min-height: 74px; }
.big b { font-size: 21px; } .big span { color: rgba(255,255,255,.88); font-size: 14px; }
.big::before { content: ""; position: absolute; left: 14px; top: 50%; width: 56px; height: 56px; margin-top: -28px; border-radius: 50%;
  background: rgba(255,255,255,.22) var(--ico) center / 70% no-repeat; }
.big::after { content: "›"; position: absolute; right: 18px; top: 50%; transform: translateY(-52%); font-size: 34px; opacity: .85; }
.big.c-carrera { background-color: #f5b338; --ico: url(arte/piezas/wK.webp); }
.big.c-control { background-color: #e55c5c; --ico: url(arte/piezas/wQ.webp); }
.big.c-retos { background-color: #8f61e6; --ico: url(arte/piezas/wN.webp); }
.big.c-libre { background-color: #29a89e; --ico: url(arte/piezas/wP.webp); }
.big.c-tutor { background-color: #4085eb; --ico: url(arte/piezas/wB.webp); }
.big.c-trofeos { background-color: #c78047; --ico: url(arte/piezas/wR.webp); }
.big.gold span { color: #3d2e0b; }
.row { border-radius: 20px; padding: 16px 18px; background-color: #2f4361; }
.row .n { font-size: 21px; } .row .d { font-size: 15px; color: rgba(255,255,255,.82); } .row .k { font-size: 13px; color: rgba(255,255,255,.78); }
.row.cls { background-color: #3b6fd0; } .row.done { background-color: #2e8c66; } .row.done .e { color: #fff; }
.row .e { font-size: 16px; font-weight: 800; color: #fff; }
.head h1 { font-family: "Playfair Display", Georgia, serif; font-size: 34px; }
.head p { font-size: 17px; color: var(--ink); }
.speech { font-size: clamp(18px, 4.8vw, 21px); line-height: 1.45; }
.extra { font-size: clamp(16px, 4.3vw, 18px); }
.tabs { display: flex; gap: 8px; } .tabs .pillbtn { flex: 1; font-size: 16px; padding: 12px; }
.tabs .pillbtn.on { background-color: #ffcc57; }
.speed { display: flex; gap: 6px; margin-left: auto; } .speed button { background: #eef1f6; color: #14203a; border-radius: 99px; padding: 4px 10px; font-weight: 800; font-size: 13px; }
.speed button.on { background: #ffcc57; }
/* bienvenida */
.steps { display: flex; gap: 8px; justify-content: center; } .steps i { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,.25); } .steps i.on { background: var(--gold); }
.namebox { width: 100%; font: inherit; font-size: 24px; font-weight: 800; padding: 18px 20px; border-radius: 20px; border: 0; background: #eef1f6; color: #14203a; outline: none; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tier, .opt { display: block; margin: 0 auto; border-radius: 18px; color: #fff; font-weight: 800; font-size: 17px; padding: 14px 10px; text-shadow: 0 1px 2px rgba(0,0,0,.3); text-align: center; }
.pyramid { display: flex; flex-direction: column-reverse; gap: 8px; }
.tier.sel { background-color: #fff !important; color: #14203a; text-shadow: none; outline: 3px solid var(--gold); }
.opt { width: 100%; font-size: 26px; padding: 16px; }
.opt.ok { background-color: #3fb86a !important; } .opt.bad { background-color: #e5534c !important; } .opt.dim { opacity: .45; }
.levelcard { text-align: center; padding: 22px; } .levelcard b { display: block; font-family: "Playfair Display", Georgia, serif; color: var(--gold); font-size: 40px; margin: 6px 0; }
/* rótulos de premio y mate */
.rotulo { position: fixed; left: 50%; top: 34%; transform: translate(-50%, -50%) scale(1); z-index: 50; pointer-events: none; white-space: nowrap;
  font-family: "Playfair Display", Georgia, serif; font-weight: 800; font-size: clamp(34px, 11vw, 64px); color: var(--gold);
  padding: 14px 30px; border-radius: 26px; background: rgba(0,0,0,.62); box-shadow: 0 0 60px rgba(0,0,0,.6); text-shadow: 0 3px 0 rgba(0,0,0,.5);
  animation: bannerIn 1.4s ease forwards; }
.rotulo.white { color: #fff; font-size: clamp(26px, 8vw, 44px); }
@keyframes bannerIn { 0% { transform: translate(-50%,-50%) scale(2.2); opacity: 0; } 18% { transform: translate(-50%,-50%) scale(1); opacity: 1; }
  80% { opacity: 1; } 100% { transform: translate(-50%,-50%) scale(1.04); opacity: 0; } }
.piece.fall img { transition: transform .6s cubic-bezier(.55,0,1,.45), opacity .5s ease .75s, filter .3s ease .6s; transform: rotate(88deg) translate(18%, -10%); opacity: 0; filter: brightness(1.6) blur(2px); }
/* el retrato grande no es un botón del menú */
.avatar.big { padding: 0; min-height: 0; border-radius: 50%; background: #38546f; box-shadow: 0 6px 18px rgba(0,0,0,.4); text-shadow: none; }
.avatar.big::before, .avatar.big::after { content: none; }

/* anuncios (beta: tarjeta de aviso) */
.avisofondo { position: fixed; inset: 0; z-index: 60; background: rgba(3,5,9,.94); display: flex; align-items: center; justify-content: center; padding: 20px; }
.avisotarjeta { width: min(92%, 460px); background: #1f2d42; border-radius: 26px; padding: 26px 22px; text-align: center; box-shadow: 0 20px 60px rgba(0,0,0,.6); }
.avisotarjeta h2 { margin: 0 0 12px; font-family: "Playfair Display", Georgia, serif; color: var(--gold); font-size: 32px; }
.avisotarjeta p { font-size: 19px; line-height: 1.45; margin: 0 0 16px; }
.avisotarjeta .count { color: var(--dim); font-weight: 800; min-height: 58px; }
.adblocks { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; } .adblocks i { height: 18px; border-radius: 9px; background: rgba(255,255,255,.15); } .adblocks i.on { background: var(--gold); }

/* coger la pieza con la mano, y el salto del rey en jaque */
.piece.lifted img { transform: scale(1.45); filter: drop-shadow(0 14px 10px rgba(0,0,0,.55)); }
.hand { position: absolute; z-index: 25; font-size: clamp(26px, 8vw, 44px); transform: translate(-30%, -10%); pointer-events: none; filter: drop-shadow(0 4px 4px rgba(0,0,0,.4)); }
.piece.check-jump img { animation: checkJump .9s ease; }
@keyframes checkJump { 0%,100% { transform: scale(1.1) translateY(0); filter: none; } 20% { transform: scale(1.25) translateY(-22%); filter: drop-shadow(0 0 10px #ff3b30); }
  45% { transform: scale(1.1) translateY(0); } 65% { transform: scale(1.2) translateY(-12%); filter: drop-shadow(0 0 10px #ff3b30); } }

/* perfil: la evolución, una barra por partida de control y la línea de tu nivel de ahora */
.chart { position: relative; height: 130px; display: flex; align-items: flex-end; gap: 6px; margin-top: 8px; }
.chart i { flex: 1; border-radius: 8px 8px 3px 3px; position: relative; min-width: 10px; }
.chart i b { position: absolute; top: 3px; left: 0; right: 0; text-align: center; font-size: 12px; color: #14203a; }
.chart u { position: absolute; left: 0; right: 0; height: 3px; background: rgba(255,255,255,.75); border-radius: 2px; }
/* las negras, más claras y con contorno de luz para distinguir rey, dama y torre */
.piece.b img { filter: brightness(1.32) contrast(1.08) drop-shadow(0 0 1.5px rgba(255,236,200,.75)); }

/* menú: cuadrícula de baldosas cuadradas, 3 × 2 (Carlos, 23/11) */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.big.tile { aspect-ratio: 1; padding: 8px 6px 10px; text-align: center; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; min-height: 0; border-radius: 24px; }
.big.tile::before { left: 50%; top: 10%; width: 54%; height: 54%; margin: 0 0 0 -27%; background-size: 72%; }
.big.tile::after { content: none; }
.big.tile b { font-size: clamp(15px, 4.4vw, 20px); margin-top: 4px; } .big.tile span { font-size: clamp(11px, 3vw, 13px); line-height: 1.2; }
.big.glow { animation: breathe 1.6s ease-in-out infinite; }
@keyframes breathe { 0%,100% { transform: scale(1); } 50% { transform: scale(1.035); } }
.menu-board { width: min(66%, 36dvh); }

/* cartas como cromos (Carlos, 23/11) */
.cartas { display: grid; gap: 10px; } .cartas.c1 { grid-template-columns: 1fr; } .cartas.c2 { grid-template-columns: repeat(2, 1fr); } .cartas.c3 { grid-template-columns: repeat(3, 1fr); }
.carta { position: relative; overflow: hidden; aspect-ratio: 1; border-radius: 24px; padding: 8px 6px 10px; color: #fff; text-align: center;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end; background-color: var(--c);
  background-image: linear-gradient(180deg, rgba(255,255,255,.18), rgba(255,255,255,0) 55%, rgba(0,0,0,.18));
  box-shadow: 0 8px 22px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.35); text-shadow: 0 1px 2px rgba(0,0,0,.35); transition: transform .12s ease; }
.cartas.c1 .carta { aspect-ratio: 2.4; }
.carta:active { transform: scale(.97); }
.carta .halo { position: absolute; left: 14%; right: 14%; top: 4%; aspect-ratio: 1; border-radius: 50%; background: rgba(255,255,255,.2); }
.cartas.c1 .carta .halo { left: 36%; right: 36%; }
.carta img { position: absolute; left: 50%; top: 6%; width: 60%; height: 56%; object-fit: contain; transform: translateX(-50%); animation: flota 3.2s ease-in-out infinite; filter: drop-shadow(0 6px 8px rgba(0,0,0,.35)); }
.cartas.c1 .carta img { width: 26%; height: 60%; }
.carta:nth-child(2n) img { animation-duration: 3.8s; } .carta:nth-child(3n) img { animation-duration: 2.9s; animation-delay: -1s; }
@keyframes flota { 0%,100% { transform: translateX(-50%) translateY(0) rotate(-2deg); } 50% { transform: translateX(-50%) translateY(-7%) rotate(2deg); } }
.carta b { position: relative; font-size: clamp(16px, 4.6vw, 22px); line-height: 1.1; } .carta span { position: relative; font-size: clamp(12px, 3.4vw, 15px); opacity: .92; margin-top: 2px; }
.cartas.c3 .carta b { font-size: clamp(13px, 3.6vw, 17px); } .cartas.c3 .carta span { font-size: clamp(11px, 2.9vw, 13px); }
.carta.locked img:not(.lock) { filter: grayscale(1) brightness(.45); animation: none; } .carta.locked { color: #d9dde6; }
.carta img.lock { left: auto; right: 6%; top: 5%; width: 30%; height: 30%; transform: none; animation: none; }
.carta.glow { animation: breathe 1.6s ease-in-out infinite; }
.carta.shine::after { content: ""; position: absolute; top: -20%; bottom: -20%; width: 18%; left: -30%; background: rgba(255,255,255,.28); transform: rotate(18deg); animation: barre 4s ease-in-out infinite; }
@keyframes barre { 0%, 70% { left: -30%; } 100% { left: 130%; } }
.cinta { border-radius: 14px; padding: 10px; text-align: center; font-weight: 800; font-size: clamp(15px, 4.4vw, 19px); color: #fff; background: var(--c); text-shadow: 0 1px 2px rgba(0,0,0,.3); }
.pop-icon { width: 38%; display: block; margin: 0 auto 8px; animation: flota2 3s ease-in-out infinite; }
@keyframes flota2 { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6%); } }
.liga2 { display: flex; flex-direction: column; gap: 8px; } .liga2 div { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 18px; background: #3c4f6b; font-size: 20px; font-weight: 800; }
.liga2 b { width: 44px; font-size: 24px; } .liga2 span { flex: 1; } .liga2 em { font-style: normal; } .liga2 .tu { background: #ffcc57; color: #1b1505; } .liga2 .sube { background: #3e9b5c; } .liga2 .baja { background: #7a3a40; } .liga2 .fantasma span { font-style: italic; opacity: .8; }

.top [data-gear] { padding: 8px 10px; font-size: 13px; flex: none; }

/* carrera: filtros por tipo y nivel */
.tabs.filtros { margin-top: 6px; } .tabs.filtros .pillbtn { font-size: 15px; padding: 10px; background-color: #2a3646; color: #fff; }
.tabs.filtros .pillbtn.sel { background-color: #4085eb; }
.avisotarjeta.elegir .opciones { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.avisotarjeta.elegir .opciones button { font-size: 16px; padding: 14px 8px; }
/* 29/11: sin fondo propio salían con el gris claro del navegador y el texto claro encima (no se leían) */
.avisotarjeta.elegir .opciones button { background: #33445c; color: #fff; border-radius: 12px; border: 1px solid rgba(255,255,255,.18); }
.avisotarjeta.elegir .opciones button.gold { background: var(--gold); color: #1a1710; }

/* insignias */
h1 .insignia { height: 1.3em; vertical-align: middle; margin-left: 10px; animation: flota 2.4s ease-in-out infinite; }
.insignia-mini { height: 1.4em; vertical-align: middle; margin-right: 6px; }
@keyframes flota { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-4px) rotate(3deg); } }

/* la sala de trofeos */
.sala { background: linear-gradient(#4a2f33, #2c1c1f 70%, #6b4a33 70%, #4a3222); border-radius: 18px; padding: 16px; perspective: 900px; }
.sala .corcho { background: #b88d5c; border: 8px solid #7a5234; border-radius: 6px; display: flex; flex-wrap: wrap; gap: 6px; padding: 10px; min-height: 80px; justify-content: center; box-shadow: inset 0 0 18px rgba(0,0,0,.35); }
.sala .corcho p { color: #4a2f20; margin: 18px 0; }
.sala .pin { background: none; border: 0; padding: 0; width: 52px; height: 52px; } .sala .pin img { width: 100%; filter: drop-shadow(0 3px 2px rgba(0,0,0,.5)); }
.sala .estante { display: flex; justify-content: center; gap: 8px; min-height: 70px; align-items: flex-end; border-bottom: 12px solid #9c6b45; margin-top: 14px; box-shadow: 0 10px 10px -6px rgba(0,0,0,.5); }
.sala .copa { background: none; border: 0; padding: 0; width: 62px; } .sala .copa img { width: 100%; filter: drop-shadow(0 4px 3px rgba(0,0,0,.6)); }
.sala .pedestales { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; margin-top: 22px; }
.sala .estatua { background: none; border: 0; padding: 0; display: flex; flex-direction: column; align-items: center; }
.sala .estatua span { font-size: 64px; line-height: 1; color: #ffcc4d; text-shadow: 0 2px 0 #b8860b, 0 6px 10px rgba(0,0,0,.6); animation: flota 3s ease-in-out infinite; }
.sala .estatua i { display: block; width: 70px; height: 46px; background: linear-gradient(#f2efe8, #c9c4ba); border-radius: 4px; box-shadow: 0 6px 8px rgba(0,0,0,.5); }

/* repeticiones: clima y hora del día (capas encima de todo, sin tapar los toques) */
body.lluvia::before, body.nieve::before, body.hojas::before, body.atardecer::after, body.noche::after { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 50; }
body.lluvia::before { background-image: repeating-linear-gradient(105deg, rgba(180,200,255,.0) 0 18px, rgba(180,200,255,.35) 18px 19px); background-size: 60px 60px; animation: lluvia .35s linear infinite; }
body.nieve::before { background-image: radial-gradient(circle, rgba(255,255,255,.9) 0 2px, transparent 3px), radial-gradient(circle, rgba(255,255,255,.7) 0 1.5px, transparent 2.5px); background-size: 70px 70px, 45px 45px; animation: nieve 6s linear infinite; }
body.hojas::before { background-image: radial-gradient(ellipse 5px 3px, rgba(214,120,40,.85) 60%, transparent 70%), radial-gradient(ellipse 4px 2px, rgba(190,150,40,.8) 60%, transparent 70%); background-size: 140px 120px, 110px 160px; animation: hojas 9s linear infinite; }
body.atardecer::after { background: linear-gradient(rgba(255,120,40,.18), rgba(120,40,90,.22)); mix-blend-mode: multiply; }
body.noche::after { background: radial-gradient(circle at 50% 45%, rgba(20,30,70,.15), rgba(5,8,30,.55)); }
@keyframes lluvia { to { background-position: -20px 60px; } }
@keyframes nieve { to { background-position: 20px 70px, -15px 45px; } }
@keyframes hojas { to { background-position: 140px 120px, -110px 160px; } }

/* la vasija del tiempo sin anuncios */
.vasija { position: relative; display: inline-block; aspect-ratio: 256 / 320; vertical-align: middle; margin-right: 6px; flex: none; }
.vasija img, .vasija .liq { position: absolute; inset: 0; width: 100%; height: 100%; }
.vasija .liq { background: linear-gradient(to bottom, #fff09a 0, #ffd23c 4%, #e8a020 100%); -webkit-mask: url(arte/vasija/vasija_hueco.webp) center / 100% 100% no-repeat; mask: url(arte/vasija/vasija_hueco.webp) center / 100% 100% no-repeat; }
.pillbtn .vasija { margin: -6px 6px -6px -4px; }

/* el botón de silencio junto al profesor */
.teacher .who .mute { flex: none; margin-left: 4px; padding: 4px 10px; border-radius: 10px; font-size: 12px; font-weight: 700; background: #eef1f6; color: #14203a; }
.teacher .who .mute.off { background: #993338; color: #fff; }

/* el informe de la partida de control, grande y con colores (Carlos, 23/11) */
.rep { display: flex; flex-direction: column; gap: 12px; padding-bottom: 8px; }
.rep-top { display: flex; align-items: center; gap: 14px; }
.rep-top .nota { flex: none; width: 92px; height: 92px; border-radius: 50%; border: 5px solid var(--c); display: flex; flex-direction: column; align-items: center; justify-content: center; background: rgba(0,0,0,.35); }
.rep-top .nota b { font-size: 44px; line-height: 1; color: var(--c); font-family: var(--serif, inherit); }
.rep-top .nota small { font-size: 13px; color: var(--dim); text-transform: uppercase; letter-spacing: .08em; }
.rep-tit h1 { font-size: 34px; margin: 0; }
.rep-tit p { font-size: 19px; margin: 4px 0 0; }
.rep-card { background: rgba(20, 30, 48, .92); border-radius: 18px; padding: 16px 18px; border: 1px solid rgba(255,255,255,.08); }
.rep-card h3 { margin: 0 0 8px; font-size: 15px; text-transform: uppercase; letter-spacing: .1em; color: var(--gold); }
.rep-card p { font-size: 18px; line-height: 1.4; margin: 8px 0 0; }
.rep .big-row { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.rep .rnum { font-size: 56px; font-weight: 800; line-height: 1; color: #fff; }
.rep .pts { font-size: 20px; color: var(--dim); }
.rep .delta { font-size: 30px; font-weight: 800; padding: 4px 14px; border-radius: 14px; margin-left: auto; }
.rep .delta.up { color: #fff; background: #2e9d52; } .rep .delta.down { color: #fff; background: #b8323a; } .rep .delta.same { color: #14203a; background: #d8dee8; }
.rep .next { font-size: 26px; font-weight: 800; padding: 10px 14px; border-radius: 14px; display: inline-block; }
.rep .next b { font-size: 32px; }
.rep .next.up { background: rgba(46,157,82,.22); color: #7fe39f; } .rep .next.down { background: rgba(184,50,58,.25); color: #ff8f96; } .rep .next.same { background: rgba(255,200,60,.18); color: var(--gold); }
.rep .acc { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; } .rep .acc span:last-child { font-size: 20px; color: var(--dim); }
.rep .fase { display: grid; grid-template-columns: 120px 1fr 64px; align-items: center; gap: 10px; font-size: 17px; margin: 6px 0; }
.rep .fase i { height: 14px; border-radius: 7px; background: rgba(255,255,255,.12); overflow: hidden; } .rep .fase i b { display: block; height: 100%; border-radius: 7px; }
.rep .fase em { font-style: normal; font-weight: 700; text-align: right; }
.rep .chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.rep .chip { font-size: 17px; padding: 8px 14px; border-radius: 12px; color: #fff; } .rep .chip b { font-size: 24px; }
.rep .chip.grave { background: #b8323a; } .rep .chip.error { background: #d9772b; } .rep .chip.impre { background: #c9a227; color: #1d1a10; } .rep .chip.mate { background: #7b4fd6; }
.rep .chip.cero { opacity: .45; }
.rep .momento { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; background: rgba(255,255,255,.06); border-radius: 14px; padding: 12px 14px; margin: 8px 0 0; color: #fff; }
.rep .momento .num { flex: none; width: 46px; height: 46px; border-radius: 50%; background: var(--gold); color: #1a1408; font-weight: 800; font-size: 20px; display: flex; align-items: center; justify-content: center; }
.rep .momento .txt { font-size: 19px; flex: 1; } .rep .momento small { display: block; font-size: 16px; color: var(--dim); margin-top: 3px; }
.rep .momento .ir { font-size: 30px; color: var(--gold); }
.rep .pista { font-size: 15px; color: var(--dim); } .rep .bien { color: #7fe39f; font-size: 20px; }

/* avisos de logros: 3 segundos, con X */
.aviso { position: fixed; top: 14px; left: 50%; transform: translateX(-50%); z-index: 70; width: min(92vw, 460px); display: flex; align-items: center; gap: 12px;
  background: rgba(14, 22, 36, .97); border: 1px solid rgba(255,255,255,.14); border-radius: 18px; padding: 12px 14px; box-shadow: 0 10px 30px rgba(0,0,0,.5); animation: avisoEntra .22s ease-out; }
.aviso img { width: 56px; height: 56px; object-fit: contain; flex: none; }
.aviso div { flex: 1; } .aviso small { display: block; color: var(--gold); font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.aviso b { display: block; color: #fff; font-size: 20px; margin-top: 2px; }
.aviso button { flex: none; width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,.12); color: #fff; font-size: 18px; }
.aviso.fuera { opacity: 0; transition: opacity .2s; }
@keyframes avisoEntra { from { opacity: 0; transform: translate(-50%, -10px) scale(.96); } to { opacity: 1; transform: translate(-50%, 0) scale(1); } }

/* TRAYECTORIA */
.trayectoria-btn { display: block; width: 100%; margin-top: 10px; padding: 16px; border-radius: 16px; background: #33507a; color: #fff; font-size: 17px; }
.trayectoria-btn b { font-size: 19px; letter-spacing: .06em; }
.tr-lista { display: flex; flex-direction: column; gap: 8px; padding-bottom: 12px; }
.tr-dia { margin: 14px 0 2px; color: var(--gold); font-size: 20px; text-transform: capitalize; }
.tr-control { background: rgba(70, 55, 20, .9); border-radius: 12px; padding: 12px 14px; font-size: 17px; color: var(--gold); } .tr-control.mal { color: #ff9b9b; }
.tr-partida { display: flex; align-items: center; gap: 12px; text-align: left; width: 100%; padding: 12px 14px; border-radius: 14px; background: rgba(255,255,255,.07); color: #fff; border-left: 6px solid #6f7fa3; }
.tr-partida.gana { border-left-color: #4cb86b; } .tr-partida.pierde { border-left-color: #c0474d; } .tr-partida.sel { background: rgba(184,50,58,.45); }
.tr-partida span { flex: 1; } .tr-partida b { font-size: 18px; } .tr-partida small { display: block; color: var(--dim); font-size: 15px; margin-top: 3px; }
.tr-partida i { font-style: normal; font-size: 26px; color: var(--gold); }
.tr-control.sube { color: #8ee6a4; } .tr-control.trofeo { display: flex; align-items: center; gap: 10px; } .tr-control.trofeo img { width: 34px; height: 34px; object-fit: contain; }

/* la ventana de los momentos clave */
.avisotarjeta.momentos { width: min(94vw, 560px); max-height: 86vh; display: flex; flex-direction: column; }
.avisotarjeta.momentos .lista { overflow-y: auto; display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }
.avisotarjeta.momentos .lista button { text-align: left; padding: 14px 16px; border-radius: 12px; font-size: 17px; background: #33445c; color: #fff; }
.avisotarjeta.momentos .lista button.mal { background: #7a2a30; } .avisotarjeta.momentos .lista button.rival { background: #2c5591; } .avisotarjeta.momentos .lista button.bien { background: #2e7a45; }
.speech { white-space: pre-line; }
/* las jugadas que nombra la profesora se tocan y el tablero las señala (Carlos, 27/11) */
.speech .mv.tap { cursor: pointer; text-decoration: underline dotted rgba(255,255,255,.55); text-underline-offset: 3px; }
/* los momentos clave dentro del panel de la profesora (Carlos, 27/11: el tablero sigue a la vista) */
.momentos-panel .chips { display: flex; gap: 5px; margin-bottom: 8px; }
.momentos-panel .chips button { flex: 1; padding: 6px 2px; border-radius: 10px; font-size: 12px; font-weight: 700; color: #fff; opacity: .5; background: #6b5a2a; }
.momentos-panel .chips button.on { opacity: 1; }
.momentos-panel .lista { display: flex; flex-direction: column; gap: 6px; }
.momentos-panel .lista button { display: flex; align-items: stretch; text-align: left; padding: 0; border-radius: 10px; overflow: hidden; background: #26334a; color: #fff; }
.momentos-panel .lista button > i { flex: none; width: 52px; display: flex; flex-direction: column; align-items: center; justify-content: center; font-style: normal; font-size: 10px; color: rgba(255,255,255,.85); background: #5b4f80; }
.momentos-panel .lista button > i b { font-size: 20px; color: #fff; line-height: 1; }
.momentos-panel .lista button > span { flex: 1; display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; padding: 7px 10px; }
.momentos-panel .lista button > span b { font-size: 14px; } .momentos-panel .lista button > span em { font-style: normal; font-size: 11px; font-weight: 700; opacity: .85; align-self: center; }
.momentos-panel .lista button > span small { grid-column: 1 / -1; font-size: 13px; line-height: 1.3; color: #dfe6f0; }
.momentos-panel .k-graves { --k: #b8333b; } .momentos-panel .k-medios { --k: #e0802b; } .momentos-panel .k-rival { --k: #3873d1; } .momentos-panel .k-aciertos { --k: #339952; } .momentos-panel .k-todos { --k: #edb847; } .momentos-panel .k-otros { --k: #5b4f80; }
.momentos-panel .chips button[class*="k-"] { background: var(--k); } .momentos-panel .chips button.k-todos { color: #14203a; }
.momentos-panel .lista button[class*="k-"] > i { background: var(--k); }
.momentos-panel .lista button[class*="k-"] > span b, .momentos-panel .lista button[class*="k-"] > span em { color: color-mix(in srgb, var(--k) 65%, #fff); }
.momentos-panel .nada { color: var(--dim); text-align: center; margin: 18px 0; }

/* la tienda */
.menu-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; } .tienda-btn { background: #8a6420; }
.tienda { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.tienda-item { display: flex; flex-direction: column; gap: 6px; padding: 10px; border-radius: 14px; background: rgba(120, 85, 25, .85); color: #fff; text-align: left; }
.tienda-item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; }
.tienda-item b { font-size: 17px; } .tienda-item span { font-size: 14px; opacity: .9; }
.tienda-item.tuyo { background: rgba(60, 75, 110, .9); } .tienda-item.puesto { background: rgba(46, 125, 72, .95); }
/* 28/11: lo bloqueado (por nivel, por un hito o de la Academia) se ve en gris, con candado y su condición */
.tienda-item { position: relative; }
.tienda-item.bloqueado { background: rgba(70, 76, 90, .9); }
.tienda-item.bloqueado img:first-child { filter: grayscale(.85) brightness(.55); }
.tienda-item img.candado { position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; aspect-ratio: 1; object-fit: contain; border-radius: 0; filter: drop-shadow(0 2px 3px rgba(0,0,0,.6)); }
.tienda-item.bloqueado span { font-size: 13px; opacity: .85; }
/* 29/11: la ✓ verde de lo puesto (Tu aula, la tienda, Tus trofeos en el aula) */
.tienda-item .puesto-tick { position: absolute; top: 12px; left: 12px; width: 34px; height: 34px; filter: drop-shadow(0 2px 3px rgba(0,0,0,.5)); }
/* 29/11: «Tus trofeos en el aula»: la pared (2 filas de 4 cuadros) y la repisa (6 copas) como en el aula */
.trofeos-aula { width: min(96%, 720px); max-height: 94dvh; display: flex; flex-direction: column; }
.trofeos-aula > p { margin: 4px 0 6px; }
.trofeos-aula .huecos-scroll { overflow: auto; flex: 1; min-height: 0; }
.trofeos-aula h4 { margin: 6px 2px 4px; font-size: 14px; color: #e8eef3; text-align: left; }
.pared-huecos, .repisa-huecos { display: grid; gap: 6px; padding: 8px; border-radius: 12px; background: #dbbd8c; }
.pared-huecos { grid-template-columns: repeat(4, 1fr); max-width: 360px; margin: 0 auto; }
.repisa-huecos { grid-template-columns: repeat(6, 1fr); border-bottom: 8px solid #734726; max-width: 480px; margin: 0 auto; }
.hueco { aspect-ratio: 1; padding: 4px; border-radius: 8px; background: #734726; border: 3px solid transparent; display: flex; align-items: center; justify-content: center; min-width: 0; }
.hueco img { width: 100%; height: 100%; object-fit: contain; }
.hueco.vacio { background: rgba(80, 60, 40, .45); }
.hueco.vacio span { font-size: 12px; color: rgba(255,255,255,.8); }
.hueco.elegido { border-color: #f5c242; background-color: #c99a2e; box-shadow: 0 0 0 2px #fff3; }
.hueco-pista { margin: 12px 4px; opacity: .8; }
.hueco-cual { margin: 10px 2px 6px; text-align: left; }
.hueco-btns { display: flex; gap: 6px; margin-bottom: 8px; }
.hueco-btns button { flex: 1; padding: 8px 4px; background: #3a8ee8; color: #fff; border-radius: 10px; }
.hueco-btns button.rojo { background: #c8453f; color: #fff; }
.hueco-btns button:disabled { opacity: .4; }
.hueco-lista { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; }
.hueco-lista .tienda-item { padding: 6px; gap: 3px; }
.hueco-lista .tienda-item img:first-child { height: 58px; aspect-ratio: auto; object-fit: contain; }
.hueco-lista .tienda-item .puesto-tick { top: 4px; left: 4px; width: 24px; height: 24px; }
.hueco-lista .tienda-item b { font-size: 14px; } .hueco-lista .tienda-item span { font-size: 12px; }
.tienda.acad .tienda-item img:first-child { object-fit: contain; background: rgba(0,0,0,.18); }
.tienda-nota { color: var(--dim); margin: -4px 0 10px; font-size: 14px; }

/* fallos recurrentes */
.rec-btn { background: #8e2b31; margin: 10px 0; }
.rec-lista { display: flex; flex-direction: column; gap: 10px; padding-bottom: 12px; }
.rec { text-align: left; padding: 14px 16px; border-radius: 16px; color: #fff; background: #7a2a30; }
.rec.ok { background: #2e6640; } .rec.vuelve { background: #8a5a1a; }
.rec-top { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; } .rec-top b { font-size: 21px; } .rec-top span { color: var(--gold); font-weight: 700; font-size: 15px; }
.rec small { display: block; font-size: 15px; opacity: .9; margin-top: 4px; } .rec p { margin: 8px 0 0; font-size: 16px; color: #dbe6ff; }

/* los colores de la historia del profesor */
.speech .h-r { color: #ff6b6b; font-weight: 800; } .speech .h-a { color: #ffd23c; font-weight: 800; } .speech .h-v { color: #6ee08a; font-weight: 800; } .speech .h-p { color: #ff8fd1; font-weight: 800; }
.speech .h-r *, .speech .h-a *, .speech .h-v *, .speech .h-p * { color: inherit; }
.speech.orange { color: #ffa04a; }
/* el cambio de opciones en la revisión, como cuando ganas experiencia */
.pctrotulo { position: fixed; right: 6%; top: 14%; z-index: 60; font: 900 64px/1 system-ui, sans-serif; pointer-events: none;
  text-shadow: 0 4px 0 rgba(0,0,0,.55), 0 0 18px rgba(0,0,0,.5); animation: pctup 1.9s ease-out forwards; }
.pctrotulo.up { color: #6ee08a; } .pctrotulo.down { color: #ff6b6b; }
@keyframes pctup { 0% { transform: translateY(20px) scale(.4); opacity: 0; } 15% { transform: translateY(0) scale(1.15); opacity: 1; }
  30% { transform: scale(1); } 65% { opacity: 1; } 100% { transform: translateY(-70px); opacity: 0; } }
/* 24/11: el texto de los botones nunca se parte a mitad de palabra; si no cabe, app.js (fitButton) baja la letra */
button { overflow-wrap: normal; word-break: normal; hyphens: manual; }

/* ================================================================================================================
   24/11 (Carlos: «hazlo un poco más premium, tiene aspecto de página antigua»): una capa de acabado encima de lo de arriba.
   Cristal oscuro con borde fino, luz de color suave bajo cada mosaico, título en oro degradado, menos brillo «plástico».
   ================================================================================================================ */
:root { --glass: rgba(16, 22, 34, .62); --glass-hi: rgba(28, 38, 56, .72); --edge: rgba(255, 255, 255, .11); --edge-hi: rgba(255, 255, 255, .22); }
/* nada más ancho que la pantalla (los mosaicos salían cortados a la izquierda en una ventana estrecha) */
html, body { overflow-x: hidden; }
.screen { overflow-x: hidden; }
.screen > * { min-width: 0; max-width: 100%; }

/* el título y el saludo */
.menu-top h1 { font-size: clamp(44px, 12vw, 58px); letter-spacing: -.01em; color: #f6c453;
  background: linear-gradient(180deg, #fff0bf 0%, #f7cd60 42%, #d99a2b 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 3px 10px rgba(0, 0, 0, .55)); }
.menu-top p { color: rgba(240, 242, 245, .74); font-size: 15px; letter-spacing: .01em; }

/* píldoras de cristal (Tu perfil, Sin anuncios, pestañas…) */
.pillbtn { background: var(--glass) !important; background-image: linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,0)) !important;
  color: #eef2f8; border: 1px solid var(--edge); border-radius: 999px; padding: 9px 18px; font-weight: 700; letter-spacing: .01em;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .07); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  transition: transform .15s ease, border-color .15s ease, background-color .15s ease; }
.pillbtn:active { transform: scale(.97); }
@media (hover: hover) { .pillbtn:hover { border-color: var(--edge-hi); } }
.tabs .pillbtn.on { background: linear-gradient(180deg, #ffdb7a, #f0b23a) !important; color: #1b1505; border-color: rgba(255, 220, 130, .7); }
.tabs.filtros .pillbtn.sel { background: linear-gradient(180deg, #5a9cf2, #3a78dc) !important; color: #fff; border-color: rgba(140, 190, 255, .6); }

/* paneles */
.card { background: var(--glass); border: 1px solid var(--edge); box-shadow: 0 12px 32px rgba(0, 0, 0, .35); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.menu-board { filter: drop-shadow(0 18px 30px rgba(0, 0, 0, .55)); }

/* los seis mosaicos: color a dos tonos, borde de luz fino, medallón de cristal y un halo de su color */
.tiles { gap: 12px; }
.big.tile { border: 1px solid rgba(255, 255, 255, .18); border-radius: 26px; overflow: hidden;
  background-image: radial-gradient(120% 80% at 50% 0%, rgba(255, 255, 255, .26), rgba(255, 255, 255, 0) 60%), linear-gradient(180deg, rgba(0, 0, 0, 0) 45%, rgba(0, 0, 0, .28) 100%);
  box-shadow: 0 16px 30px -10px var(--glow, rgba(0, 0, 0, .5)), 0 2px 6px rgba(0, 0, 0, .25), inset 0 1px 0 rgba(255, 255, 255, .38);
  transition: transform .18s ease, box-shadow .18s ease; text-shadow: 0 1px 3px rgba(0, 0, 0, .35); }
.big.tile:active { transform: scale(.97); }
@media (hover: hover) { .big.tile:hover { transform: translateY(-3px); box-shadow: 0 22px 38px -10px var(--glow, rgba(0, 0, 0, .5)), 0 2px 6px rgba(0, 0, 0, .25), inset 0 1px 0 rgba(255, 255, 255, .45); } }
.big.tile::before { background-color: rgba(255, 255, 255, .18); background-size: 66%;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .28), inset 0 -10px 18px rgba(0, 0, 0, .10), 0 8px 18px rgba(0, 0, 0, .18); }
.big.tile b { font-weight: 900; letter-spacing: .07em; }
.big.tile span { opacity: .92; }
.big.c-carrera { background-color: #eaa52c; --glow: rgba(234, 165, 44, .55); }
.big.c-control { background-color: #dc4f55; --glow: rgba(220, 79, 85, .55); }
.big.c-retos   { background-color: #7f55dc; --glow: rgba(127, 85, 220, .55); }
.big.c-libre   { background-color: #1f9c92; --glow: rgba(31, 156, 146, .55); }
.big.c-tutor   { background-color: #3478e0; --glow: rgba(52, 120, 224, .55); }
.big.c-trofeos { background-color: #bb7340; --glow: rgba(187, 115, 64, .55); }

/* Trayectoria y Tienda */
.menu-2 { gap: 12px; }
.trayectoria-btn { background: var(--glass-hi); border: 1px solid var(--edge); border-radius: 20px; letter-spacing: .02em;
  box-shadow: 0 12px 28px rgba(0, 0, 0, .4), inset 0 1px 0 rgba(255, 255, 255, .08); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); transition: transform .15s ease, border-color .15s ease; }
.trayectoria-btn:active { transform: scale(.98); }
@media (hover: hover) { .trayectoria-btn:hover { border-color: var(--edge-hi); } }
.trayectoria-btn.tienda-btn { background: linear-gradient(180deg, #f4c55a, #c98d22); color: #1d1404; border-color: rgba(255, 226, 150, .55);
  box-shadow: 0 14px 30px -8px rgba(233, 170, 50, .5), inset 0 1px 0 rgba(255, 255, 255, .45); }

/* el pie: «← CF Games · v0.9.32» */
.pie { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 2px 0 6px; color: rgba(240, 242, 245, .5); font-size: 13px; }
.pie .portal { padding: 4px 6px; color: rgba(240, 242, 245, .62); }
.pie .version { background: none; padding: 4px 6px; color: rgba(240, 242, 245, .5); font-size: 13px; font-weight: 600; letter-spacing: .02em; }
@media (hover: hover) { .pie .portal:hover, .pie .version:hover { color: #f7cd60; } }

/* los botones de abajo de cada tablero: más sobrios; los neutros de cristal, los de color con su halo */
.btns button { background: var(--glass-hi) !important; color: #eef2f8; border: 1px solid var(--edge); border-radius: 18px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .08); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.btns .gold { background: linear-gradient(180deg, #ffd56e, #e9a632) !important; color: #1b1505; border-color: rgba(255, 226, 150, .6); box-shadow: 0 12px 26px -8px rgba(233, 166, 50, .55), inset 0 1px 0 rgba(255,255,255,.5); }
.btns .blue { background: linear-gradient(180deg, #5c9ff3, #3474db) !important; color: #fff; border-color: rgba(150, 195, 255, .5); box-shadow: 0 12px 26px -8px rgba(52, 116, 219, .55), inset 0 1px 0 rgba(255,255,255,.35); }
.btns .red { background: linear-gradient(180deg, #ef6a63, #cf3f3a) !important; color: #fff; border-color: rgba(255, 160, 150, .5); box-shadow: 0 12px 26px -8px rgba(207, 63, 58, .55), inset 0 1px 0 rgba(255,255,255,.3); }
.btns .green { background: linear-gradient(180deg, #55c97c, #2f9e58) !important; color: #fff; border-color: rgba(150, 235, 180, .5); box-shadow: 0 12px 26px -8px rgba(47, 158, 88, .55), inset 0 1px 0 rgba(255,255,255,.3); }
.btns button:disabled { opacity: .4; }

/* 24/11: el aula 3D del menú (aula.js) en lugar de la partida en el tablero */
.menu-board.aula { flex: none; width: 100%; max-width: 680px; aspect-ratio: 16 / 10; max-height: 46dvh; margin: 6px auto 0; border-radius: 20px; overflow: hidden;
  background: #2a1d14; border: 1px solid rgba(255, 255, 255, .12); box-shadow: 0 18px 40px rgba(0, 0, 0, .55); filter: none; }
.menu-board.aula canvas { display: block; width: 100%; height: 100%; }

/* la racha arriba en el menú (Carlos, 25/11, «como en Duolingo») */
.menu-top .racha { display: inline-flex; align-items: center; gap: 8px; margin-top: 8px; padding: 6px 14px 6px 8px; border-radius: 999px;
  background: rgba(255, 255, 255, .10); color: #fff; font-weight: 800; border: 1px solid rgba(255, 255, 255, .14); }
.menu-top .racha img { width: 26px; height: 26px; filter: grayscale(.85) opacity(.7); }
.menu-top .racha span { font-size: 12px; letter-spacing: .08em; opacity: .8; }
.menu-top .racha b { font-size: 17px; }
.menu-top .racha.hoy { background: linear-gradient(135deg, #f07b2f, #d8452b); border-color: transparent; }
.menu-top .racha.hoy img { filter: none; }
.avisotarjeta p.dim { color: var(--dim, #a7b0bf); font-size: 14px; margin-top: 10px; }
/* el morado de la vasija (anuncios de recompensa): la regla de .btns button con !important lo tapaba */
.btns .violet { background: linear-gradient(180deg, #a47cf0, #7c4fd8) !important; color: #fff; border-color: rgba(200, 170, 255, .6); }
.btns .violet.full { background: linear-gradient(180deg, #7d68b0, #5d4a8e) !important; }
.pillbtn .pocion { display: inline-flex; flex-direction: column; align-items: flex-start; line-height: 1.1; text-align: left; }
.pillbtn .pocion b { font-size: 12px; font-weight: 800; }
.pillbtn .pocion small { font-size: 12px; opacity: .85; }

/* ---------- la Academia (27/11): colegios, pasos, mapa, aprobado; Lecciones y Campeonato en el menú ---------- */
.big.c-lecciones  { background-color: #2f9e5b; --glow: rgba(47, 158, 91, .55); --ico: url(arte/iconos/libro_magico.webp); }
.big.c-campeonato { background-color: #d9772b; --glow: rgba(217, 119, 43, .55); --ico: url(arte/iconos/copa_oro.webp); }
.big.c-tienda     { background-color: #c79a2e; --glow: rgba(199, 154, 46, .55); --ico: url(arte/iconos/cofre.webp); }
/* el sello de lección completada (verde) o sin errores (dorado) */
.sello { display: inline-block; font-style: normal; font-weight: 900; font-size: 11px; letter-spacing: .08em; line-height: 1; padding: 4px 7px; border-radius: 8px;
  color: #7fe39f; border: 2px solid #7fe39f; background: rgba(8, 24, 14, .72); transform: rotate(-5deg); text-shadow: none; white-space: nowrap; }
.sello.oro { color: #ffd45e; border-color: #ffd45e; background: rgba(36, 26, 4, .78); }
.sello.enlinea { margin-right: 8px; transform: rotate(-3deg); vertical-align: middle; }
.carta .sello { position: absolute; left: 5%; top: 5%; z-index: 2; font-size: clamp(8px, 2.4vw, 11px); padding: 3px 5px; }
.row.fallo { background-color: #a85f24; } .row.fallo .e { color: #ffe3b8; }
.row.mas { background-color: #3567c4; }
.cole-cab { position: relative; flex: none; border-radius: 22px; overflow: hidden; background: linear-gradient(135deg, #2a527a, #182a42); border: 1px solid var(--edge); box-shadow: 0 12px 32px rgba(0, 0, 0, .35); }
.cole-cab .foto, .cole-viaje .foto { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cole-cab::after, .cole-viaje::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8, 12, 20, .30), rgba(8, 12, 20, .86)); }
.cole-cab-txt { position: relative; z-index: 1; padding: 16px 18px; }
.cole-cab-txt small { display: block; text-transform: uppercase; letter-spacing: .12em; color: var(--gold); font-weight: 800; font-size: 13px; }
.cole-cab-txt h1 { margin: 2px 0 4px; font-family: "Playfair Display", Georgia, serif; font-size: clamp(24px, 6.6vw, 32px); line-height: 1.1; color: #fff; }
.cole-cab-txt p { margin: 0 0 10px; color: #dfe6ee; font-size: 15px; font-style: italic; }
.cole-cab-txt .who { margin: 0; } .cole-cab-txt .who b { font-size: 16px; }
.cole-curso .lab { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.cole-curso .lab b { font-size: 18px; } .cole-curso .lab span { color: var(--dim); font-size: 13px; }
.cole-barra { height: 10px; border-radius: 6px; background: rgba(255, 255, 255, .12); margin-top: 8px; overflow: hidden; }
.cole-barra i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, #ffdb7a, #f0b23a); }
.cole-sig { flex: none; display: block; width: 100%; text-align: left; border-radius: 20px; padding: 14px 18px; color: #1b1505;
  background: linear-gradient(180deg, #ffdb7a, #f0b23a); box-shadow: 0 10px 26px rgba(240, 178, 58, .35), inset 0 1px 0 rgba(255, 255, 255, .5); }
.cole-sig:active { transform: scale(.98); }
.cole-sig small { display: block; text-transform: uppercase; letter-spacing: .1em; font-weight: 800; font-size: 12px; opacity: .75; }
.cole-sig b { display: block; font-size: clamp(18px, 5vw, 22px); line-height: 1.2; }
.row.paso .n { padding-right: 34px; } .row.paso.done .n { padding-right: 124px; } .row.paso .d { padding-right: 0; }
.row.paso.cerrado { opacity: .62; } .row.paso .cand { width: 28px; height: 28px; display: block; }
.cole-comp small { display: block; color: var(--dim); font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 6px; }
.cole-comp > div { display: flex; gap: 8px; }
.cole-comp button { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px; border-radius: 16px;
  background: var(--glass); border: 1px solid var(--edge); }
.cole-comp img { width: 40px; height: 40px; object-fit: contain; } .cole-comp b { font-size: 14px; }
.cole-hola .avatar.big { width: 96px; height: 96px; margin: 0 auto 8px; }
.cole-hola small { display: block; text-transform: uppercase; letter-spacing: .12em; color: var(--dim); font-weight: 800; font-size: 13px; margin-bottom: 4px; }
.cole-hola .btns { flex-direction: column; }
/* el bocadillo del compañero: debajo de los avisos de logros, para no apilarse con ellos */
.aviso.dice { top: 86px; border-color: rgba(255, 219, 122, .55); }
.aviso.dice b { font-size: 17px; font-weight: 600; line-height: 1.25; }
.cole-fin { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.cole-fin .avatar.big { width: 104px; height: 104px; }
.cole-fin h1 { margin: 4px 0 0; font-family: "Playfair Display", Georgia, serif; font-size: clamp(34px, 10vw, 46px); color: var(--gold); }
.cole-fin .speech { margin: 0; }
.cole-nota { width: 92px; height: 92px; border-radius: 50%; border: 5px solid var(--c); display: flex; flex-direction: column; align-items: center; justify-content: center; background: rgba(0, 0, 0, .35); }
.cole-nota b { font-size: 44px; line-height: 1; color: var(--c); } .cole-nota small { font-size: 13px; color: var(--dim); text-transform: uppercase; letter-spacing: .08em; }
.cole-premios { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.cole-premios span { padding: 8px 14px; border-radius: 12px; background: rgba(255, 219, 122, .16); border: 1px solid rgba(255, 219, 122, .4); color: #ffe7a3; font-weight: 800; font-size: 16px; }
.card.cole-viaje { position: relative; overflow: hidden; padding: 0; flex: none; }
.mapa { display: flex; flex-direction: column; gap: 10px; }
.mapa-ciudad { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 10px; border-radius: 20px; background: var(--glass); border: 1px solid var(--edge); color: #fff; }
.mapa-ciudad:active { transform: scale(.985); }
.mapa-foto { position: relative; flex: none; width: 78px; height: 104px; border-radius: 14px; overflow: hidden; background: linear-gradient(135deg, #2d587f, #1b2e47); }
.mapa-foto .foto { width: 100%; height: 100%; object-fit: cover; display: block; }
.mapa-foto .cand { position: absolute; inset: 0; margin: auto; width: 44px; height: 44px; }
.mapa-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mapa-txt small { text-transform: uppercase; letter-spacing: .1em; color: var(--gold); font-weight: 800; font-size: 12px; }
.mapa-txt b { font-size: clamp(17px, 4.8vw, 20px); line-height: 1.15; } .mapa-txt em { font-style: normal; color: var(--dim); font-size: 14px; }
.mapa-txt i { font-style: normal; font-size: 14px; font-weight: 700; }
.mapa-ciudad.aqui { border-color: rgba(255, 219, 122, .8); box-shadow: 0 0 0 2px rgba(255, 219, 122, .25); } .mapa-ciudad.aqui i { color: var(--gold); }
.mapa-ciudad.hecha i { color: #7fe39f; }
.mapa-ciudad.cerrada { opacity: .7; } .mapa-ciudad.cerrada .foto { filter: grayscale(1) brightness(.5); }
/* «¡Lección superada!»: letra más grande y «Tu progreso» visual (lo que falta, en dorado; el rango, con su pieza) */
.card.superada .speech { font-size: clamp(19px, 5.2vw, 23px); }
.progreso { white-space: normal; margin-top: 4px; }
.progreso .pr { display: flex; align-items: center; gap: 10px; margin-top: 8px; padding: 8px 10px; border-radius: 14px; background: rgba(255, 255, 255, .07); }
.progreso .pr img { flex: none; width: 46px; height: 46px; object-fit: contain; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .4)); }
.progreso .falta { color: var(--gold); font-weight: 900; }
/* optativas, insignia del cuatrimestre y la tarjeta del compañero antes de jugar */
.cole-opt > small { display: block; color: var(--dim); font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 6px; }
.cole-opt .row.paso { background-color: #36506f; } .cole-opt .row.paso.done { background-color: #2e8c66; }
.cole-curso .lab { align-items: center; } .cuatri { flex: none; width: 46px; height: 46px; object-fit: contain; }
.cole-fin .cuatri { width: 84px; height: 84px; }
.cole-comp img { border-radius: 50%; }
.comp-carta small { display: block; text-transform: uppercase; letter-spacing: .1em; color: var(--dim); font-weight: 800; font-size: 13px; }
.comp-foto { display: block; width: min(56vw, 210px); height: min(56vw, 210px); object-fit: contain; margin: 8px auto 4px; filter: drop-shadow(0 10px 18px rgba(0, 0, 0, .45)); }
.comp-carta h2 { margin-bottom: 8px; }
.comp-dice { position: relative; background: #f4f6fa; color: #14203a; border-radius: 18px; padding: 12px 14px; font-size: 18px; line-height: 1.35; margin: 12px 0 10px; }
.comp-dice::before { content: ""; position: absolute; left: 50%; top: -9px; margin-left: -9px; border: 9px solid transparent; border-top: 0; border-bottom-color: #f4f6fa; }
.aviso.dice img { border-radius: 50%; }
.big.tile.c-campeonato b { font-size: clamp(11px, 3.4vw, 17px); letter-spacing: .01em; }
.card.superada .speech { white-space: normal; } .card.superada .speech p { margin: 0 0 12px; }
.nota-privacidad { margin: 0; text-align: center; color: var(--dim); font-size: 14px; line-height: 1.35; } .nota-privacidad a { color: var(--gold); }

/* ---------- tablero 3D (tablero3d.js): el de la app; el plano de arriba queda de reserva ---------- */
.tablero-sitio { position: relative; width: 100%; }
.tablero3d { position: relative; width: 100%; aspect-ratio: 1; margin: 5px 0; border-radius: 12px; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
  background: #1c1510; box-shadow: 0 0 0 1px rgba(107,74,46,.8), 0 14px 34px rgba(0,0,0,.6); }
.tablero3d canvas { display: block; width: 100%; height: 100%; touch-action: none; outline: none; -webkit-tap-highlight-color: transparent; }
.t3-incl { position: absolute; right: 4px; top: 7%; width: 24px; height: 24%; cursor: ns-resize; opacity: .5; transition: opacity .2s; touch-action: none; display: none; }
.t3-incl::before { content: ""; position: absolute; left: 10px; top: 0; bottom: 0; width: 4px; border-radius: 2px; background: rgba(255,255,255,.6); }
.t3-incl i { position: absolute; left: 4px; width: 16px; height: 16px; margin-top: -8px; border-radius: 50%; background: var(--gold); box-shadow: 0 2px 6px rgba(0,0,0,.5); }
.t3-incl:hover { opacity: 1; }
@media (hover: hover) and (pointer: fine) { .t3-incl { display: block; } }
.t3-todo { position: absolute; left: 8px; top: 8px; display: none; padding: 6px 12px; border-radius: 99px; font-size: 13px; font-weight: 800; color: #fff; background: rgba(0,0,0,.55); }
.t3-todo.ver { display: block; }
.t3-pista, .t3-nota { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); width: max-content; max-width: 92%; padding: 7px 12px; border-radius: 12px; font-size: 13px; font-weight: 700; line-height: 1.3;
  text-align: center; color: #fff; background: rgba(0,0,0,.66); pointer-events: none; }
.t3-pista { opacity: 0; transition: opacity .5s; } .t3-pista.ver { opacity: 1; }
.t3-nota { z-index: 5; }
/* Carlos, 29/11: el aviso de los gestos al pasar al 3D con el botón, más grande y en dos líneas */
.t3-pista.grande { bottom: 14px; max-width: 94%; padding: 10px 14px; font-size: 14.5px; line-height: 1.4; background: rgba(0,0,0,.78); box-shadow: 0 6px 18px rgba(0,0,0,.45); }
.t3-pista b { color: var(--gold); }
/* el botón «3D»/«2D» de la barra de arriba de las pantallas de tablero, junto a «Menú» (fuera del tablero) */
.top .vista-btn { min-width: 46px; padding: 10px 10px; font-weight: 900; letter-spacing: .02em; margin-left: -4px; }
.top .vista-btn { color: var(--gold); }
.top:has(.vista-btn) h2 { flex: 1; min-width: 0; }

/* Carlos, 27/11: «Ver la buena» parpadea para que no parezca un botón más */
.btns button.parpadea { animation: parpadea 1.05s ease-in-out infinite; }
@keyframes parpadea { 0%, 100% { transform: scale(1); filter: brightness(1); } 50% { transform: scale(1.05); filter: brightness(1.45); } }

/* Carlos, 27/11: el menú con 4 baldosas grandes (2 × 2) y la tarjeta de JUGAR / MI PROGRESO */
.tiles.cuatro { grid-template-columns: repeat(2, 1fr); }
.tiles.cuatro .big.tile { aspect-ratio: 1.25; }
.tiles.cuatro .big.tile b { font-size: clamp(18px, 5.4vw, 26px); } .tiles.cuatro .big.tile span { font-size: clamp(12px, 3.4vw, 15px); }
.avisotarjeta.elegir-menu { width: min(94vw, 520px); }
.elegir-menu .filas { display: flex; flex-direction: column; gap: 10px; margin: 6px 0 14px; }
.elegir-menu .fila { display: flex; align-items: center; gap: 14px; text-align: left; padding: 12px 14px; border-radius: 18px; color: #fff; background: #33445c; border: 1px solid rgba(255,255,255,.18); }
.elegir-menu .fila img { width: 56px; height: 56px; object-fit: contain; background: rgba(255,255,255,.2); border-radius: 50%; padding: 6px; flex: none; }
.elegir-menu .fila b { display: block; font-size: 20px; } .elegir-menu .fila small { display: block; font-size: 14px; opacity: .92; margin-top: 2px; }
.elegir-menu .fila.c-libre { background: #29a89e; } .elegir-menu .fila.c-control { background: #e55c5c; } .elegir-menu .fila.c-campeonato { background: #d95aa6; }
.elegir-menu .fila.c-camp-facil { background: #4d9e5c; } .elegir-menu .fila.c-camp-dificil { background: #e58033; } .elegir-menu .fila.c-camp-muydificil { background: #bf4047; }
.elegir-menu .fila.c-tutor { background: #408ceb; } .elegir-menu .fila.c-trayectoria { background: #33507a; } .elegir-menu .fila.c-trofeos { background: #c78047; } .elegir-menu .fila.c-perfil { background: #6b6f86; }
.elegir-menu .fila.glow { animation: parpadea 1.05s ease-in-out infinite; }

/* Carlos, 28/11: el premio del cofre con los peones dibujados */
.cofre-premio .peones-premio { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; max-width: 330px; margin: 4px auto 6px; }
.cofre-premio .peones-premio img { width: 44px; height: 44px; object-fit: contain; transform: scale(0); animation: peonsale .35s ease-out forwards; }
@keyframes peonsale { 0% { transform: scale(0); } 65% { transform: scale(1.25); } 100% { transform: scale(1); } }
.cofre-premio .peones-num { font-size: 40px; font-weight: 900; color: var(--gold); margin: 2px 0 6px; }

/* Carlos, 28/11: «Estás jugando la Defensa Siciliana», encima de la cabecera (título y barras, no el botón «Menú») */
.top { position: relative; }
.apertura-cartel { position: absolute; left: 74px; right: 6px; top: 5px; bottom: 5px; display: flex; align-items: center; justify-content: center; z-index: 5;
  border-radius: 12px; background: rgba(9, 14, 24, .94); border: 1px solid rgba(255, 219, 122, .45); color: var(--gold); font-weight: 800;
  font-size: clamp(13px, 3.8vw, 17px); text-align: center; padding: 0 10px; line-height: 1.15; pointer-events: none; opacity: 0; transition: opacity .25s; }
.apertura-cartel.on { opacity: 1; }
/* «La has jugado 3 veces» en las lecciones de apertura que ya usas */
.carta .jugada { position: absolute; left: 6%; right: 6%; top: 5px; z-index: 2; border-radius: 10px; background: rgba(9, 14, 24, .8); color: var(--gold);
  font-style: normal; font-weight: 800; font-size: clamp(10px, 2.9vw, 13px); padding: 3px 4px; line-height: 1.1; }
.cinta.oro { color: #141c2e; text-shadow: none; }
/* 28/11: la gráfica de la partida en la cabecera de la revisión y la tabla de los dos jugadores (AppRepeticion.cs) */
.xp.grafica { flex-direction: row; align-items: stretch; gap: 4px; min-height: 42px; width: 54%; flex: 0 0 54%; }
.grafica .g { position: relative; flex: 1; min-height: 42px; background: rgba(0,0,0,.35); border-radius: 8px; overflow: hidden; cursor: pointer; }
.grafica svg { position: absolute; inset: 3px; width: calc(100% - 6px); height: calc(100% - 6px); }
.grafica .g i { position: absolute; width: 8px; height: 8px; border-radius: 50%; transform: translate(-50%, -50%); box-shadow: 0 0 0 1.5px rgba(0,0,0,.75); pointer-events: none; }
.grafica .g .aqui { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--gold); pointer-events: none; }
.grafica .g span { position: absolute; left: 5px; font-size: 10px; font-weight: 800; line-height: 1; pointer-events: none; text-shadow: 0 1px 2px #000; }
.grafica .g .tu { top: 3px; color: #c4ffd0; } .grafica .g .riv { bottom: 3px; color: #ffc4bd; opacity: .85; }
.grafica .x { flex: none; width: 22px; padding: 0; border-radius: 8px; background: var(--soft); color: #fff; font-size: 15px; font-weight: 800; }
.avisotarjeta.tabla { width: min(94vw, 480px); max-height: 92vh; overflow-y: auto; padding: 20px 18px; }
.avisotarjeta.tabla h2 { margin-bottom: 8px; }
.avisotarjeta.tabla .fz { font-size: 19px; margin: 0 0 4px; } .avisotarjeta.tabla .fz b { color: var(--gold); }
.avisotarjeta.tabla .fz2 { font-size: 16px; color: var(--dim); margin: 0 0 12px; } .avisotarjeta.tabla .fz2 b { color: #fff; }
.avisotarjeta.tabla table { width: 100%; border-collapse: collapse; font-size: 16px; margin-bottom: 8px; }
.avisotarjeta.tabla th { color: var(--gold); font-weight: 800; padding: 4px 6px; width: 22%; }
.avisotarjeta.tabla td { padding: 6px; font-weight: 800; font-size: 18px; }
.avisotarjeta.tabla td:first-child { text-align: left; font-weight: 700; font-size: 15px; color: #fff; white-space: nowrap; }
.avisotarjeta.tabla td i { display: inline-block; width: 11px; height: 11px; border-radius: 50%; margin-right: 8px; vertical-align: -1px; }
.avisotarjeta.tabla tbody tr:nth-child(odd) { background: rgba(255,255,255,.05); }
.avisotarjeta.tabla td.cero { color: rgba(255,255,255,.3); }
.avisotarjeta.tabla .nota { font-size: 12.5px; color: var(--dim); margin: 6px 0 12px; }
/* anuncios propios de CF Games (propios.js): en el hueco de un anuncio corto, con la misma tarjeta */
.avisotarjeta.propio { padding: 18px 18px 20px; max-height: 94dvh; overflow-y: auto; }
.avisotarjeta.propio .propio-de { display: block; color: var(--dim); font-size: 12.5px; font-weight: 700; letter-spacing: .02em; margin-bottom: 10px; }
.avisotarjeta.propio .propio-img { display: block; border-radius: 16px; overflow: hidden; aspect-ratio: 16 / 9; background: #0d1520; box-shadow: 0 6px 20px rgba(0,0,0,.45); }
.avisotarjeta.propio .propio-img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.avisotarjeta.propio .propio-img.icono { display: flex; align-items: center; justify-content: center; padding: 14px; background: radial-gradient(circle at 50% 40%, #33506e, #121c28 75%); }
.avisotarjeta.propio .propio-img.icono img { width: auto; height: 100%; aspect-ratio: 1; border-radius: 22%; box-shadow: 0 4px 16px rgba(0,0,0,.5); }
.avisotarjeta.propio .propio-sello { display: inline-block; margin: 12px 0 0; padding: 3px 10px; border-radius: 99px; background: rgba(84,194,110,.16); color: var(--green); font-size: 12.5px; font-weight: 800; }
.avisotarjeta.propio h2 { font-size: clamp(22px, 6.4vw, 28px); margin: 8px 0 8px; line-height: 1.15; }
.avisotarjeta.propio p { font-size: 17px; margin: 0 0 14px; }
.avisotarjeta.propio .propio-ir { flex: 1; display: flex; align-items: center; justify-content: center; min-height: 54px; border-radius: 14px; background: var(--gold); color: #1a1710; font-weight: 800; font-size: 16px; text-decoration: none; }
.avisotarjeta.propio .propio-ir:active { transform: scale(.96); }
.avisotarjeta.propio .count { min-height: 40px; margin-top: 8px; }
.mas-juegos { text-align: center; margin: 4px 0 0; font-size: 13.5px; }
.mas-juegos a { color: var(--dim); text-decoration: none; border-bottom: 1px dotted rgba(168,184,199,.5); }
/* 29/11: los casos de la revisión en dos tableros, arriba lo que se hizo y abajo la alternativa (como AppComparar.cs en la app) */
.speech.gold { color: var(--gold); }
.comparar { position: absolute; inset: 0; z-index: 25; display: grid; grid-template-rows: 1fr 1fr; gap: 6px; padding: 4px; border-radius: 6px; background: #0b121b; }
.comparar .cmp-half { display: flex; gap: 8px; min-height: 0; align-items: stretch; }
.comparar .cmp-board { flex: none; height: 100%; aspect-ratio: 1; }
.comparar .cmp-board .board { width: 100%; box-shadow: 0 0 0 3px #3b2416 !important; }
.comparar .cmp-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; padding: 4px 2px; overflow: hidden; }
.comparar .cmp-info b { font-size: 13px; line-height: 1.2; text-transform: uppercase; letter-spacing: .02em; }
.comparar .arriba b { color: #ff8c80; } .comparar .abajo b { color: #80f29a; }
.comparar .cmp-info .pct { font-size: 24px; font-weight: 800; color: var(--ink); line-height: 1; }
.comparar .cmp-info p { margin: 0; font-size: 13px; line-height: 1.3; color: #dfe6f0; }
#app.wide .comparar .cmp-info b { font-size: 15px; } #app.wide .comparar .cmp-info .pct { font-size: 32px; } #app.wide .comparar .cmp-info p { font-size: 16px; }
.momentos-panel .lista button > span u.ver { grid-column: 1 / -1; justify-self: end; text-decoration: none; font-size: 12.5px; font-weight: 800; color: #fff; background: #339952; border-radius: 8px; padding: 4px 9px; margin-top: 2px; }

/* 29/11: el lápiz del aula del menú (arriba a la derecha de la tarjeta; la vasija y su cartel van a la izquierda) */
.menu-board.aula { position: relative; }
.menu-board .aula-lapiz { position: absolute; top: 10px; right: 10px; z-index: 6; width: 46px; height: 46px; padding: 0; border: 0; border-radius: 50%;
  background: transparent; cursor: pointer; filter: drop-shadow(0 3px 6px rgba(0, 0, 0, .5)); transition: transform .15s; animation: lapizEntra .4s ease-out; }
.menu-board .aula-lapiz svg { display: block; width: 100%; height: 100%; }
.menu-board .aula-lapiz:hover { transform: scale(1.08) rotate(-6deg); }
.menu-board .aula-lapiz:active { transform: scale(.94); }
@keyframes lapizEntra { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* 29/11: con el tablero a todo el ancho en un móvil bajo (barras del navegador), la profesora se compacta: foto más pequeña
   y menos relleno, para que se lean 2-3 líneas sin desplazar */
@media (max-aspect-ratio: 3/4) and (max-height: 720px) {
  .play .side { padding-top: 4px; gap: 6px; }
  .play .teacher { padding: 8px 12px; }
  .play .teacher::before { display: none; }
  .play .who { margin: 0 0 4px; } .play .who .avatar { width: 40px; height: 40px; }
  .play .speech { font-size: 16px; line-height: 1.35; }
  .play .btns button { min-height: 46px; }
}

/* 29/11: la banderita del idioma en la esquina del menú y la lista de idiomas (Docs/IDIOMAS.md) */
.menu-top { position: relative; }
.bandera-btn { position: absolute; left: 2px; top: 2px; width: 40px; height: 30px; padding: 4px; border-radius: 8px; background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .16); display: flex; align-items: center; justify-content: center; z-index: 2; }
.bandera-btn svg { width: 100%; height: 100%; border-radius: 3px; display: block; }
.opciones.idiomas button { display: flex; align-items: center; gap: 12px; justify-content: flex-start; }
.opciones.idiomas .bandera { display: inline-flex; width: 36px; height: 24px; flex: none; }
.opciones.idiomas .bandera svg { width: 100%; height: 100%; border-radius: 3px; }
/* 03/12: la barra de arriba con «‹ Inicio» (app.js, navShow) */
#nav { display: none; height: 40px; padding: 0 12px; align-items: center; justify-content: space-between; background: rgba(5, 7, 10, .94); border-bottom: 1px solid rgba(255, 255, 255, .06); }
body.connav #nav { display: flex; }
body.connav #app { height: calc(100dvh - 40px); }
#nav .navhome { background: rgba(255, 255, 255, .06); color: var(--ink, #eee); border: 0; border-radius: 10px; padding: 7px 14px; font: inherit; font-size: 15px; cursor: pointer; }
#nav .navhome:hover { background: rgba(255, 255, 255, .12); }
#nav .navbrand { color: rgba(217, 184, 107, .9); letter-spacing: .18em; font-size: 13px; }
/* 03/12: la portada del menú (app.js, portadaHtml) y el tono sobrio de las portadas nuevas */
.portada { position: relative; min-height: min(36dvh, 300px); border-radius: 18px; background-size: cover; background-position: center; display: flex; flex-direction: column; justify-content: flex-end; padding: 18px; box-shadow: 0 14px 34px rgba(0, 0, 0, .55); border: 1px solid rgba(217, 184, 107, .18); }
.portada .pt-txt span { display: block; color: rgba(217, 184, 107, .95); font-size: 12px; letter-spacing: .16em; text-transform: uppercase; }
.portada .pt-txt b { display: block; font-family: "Playfair", Georgia, serif; font-size: 26px; line-height: 1.15; margin-top: 4px; }
.portada .pt-btns { display: flex; gap: 10px; margin-top: 14px; }
.portada .pt-btns button { flex: 1; padding: 12px; border-radius: 12px; background: rgba(255, 255, 255, .10); font-weight: 700; }
.portada .pt-btns button.gold { background: var(--gold); color: #1b1408; }
.menu-board.tablero-vivo { width: min(70%, 38dvh); }
body.sobrio .menu-top h1 { font-size: 38px; letter-spacing: .02em; }
body.sobrio .big { background-color: #172331 !important; border: 1px solid rgba(217, 184, 107, .22); box-shadow: none; }
body.sobrio .big b { color: #f3e6c6; letter-spacing: .06em; }
body.sobrio .big span { color: var(--dim); }
body.sobrio .big.glow, body.sobrio .carta.glow { animation: none; border-color: rgba(237, 184, 71, .75); }
body.sobrio .racha { filter: saturate(.55); }
/* 03/12: con la barra «‹ Inicio» arriba, los «Menú» de las cabeceras sobran */
body.connav .head [data-menu] { display: none; }

/* 04/12: barra fija abajo con cinco pestañas (Inicio · Aprender · Jugar · Entrenar · Perfil) en las pantallas de lista */
#tabs { display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; max-width: 560px; margin: 0 auto;
  background: rgba(5, 7, 10, .97); border-top: 1px solid rgba(255, 255, 255, .07); padding-bottom: env(safe-area-inset-bottom); }
body.contabs #tabs { display: flex; }
#tabs button { flex: 1; background: none; border: 0; color: rgba(200, 205, 215, .8); font: inherit; font-size: 12px; padding: 6px 0 5px;
  display: flex; flex-direction: column; align-items: center; gap: 2px; cursor: pointer; position: relative; }
#tabs button img { width: 26px; height: 26px; object-fit: contain; opacity: .45; }
#tabs button.on { color: #d9b86b; font-weight: 700; }
#tabs button.on img { opacity: 1; }
#tabs button.on::before { content: ""; position: absolute; top: 0; left: 30%; right: 30%; height: 2px; background: #d9b86b; border-radius: 2px; }
body.contabs #app { height: calc(100dvh - 58px - env(safe-area-inset-bottom)); }
body.contabs.connav #app { height: calc(100dvh - 98px - env(safe-area-inset-bottom)); }
