/* "Mis juegos": estilo Windows XP, pensado para el iPhone. Hecho por Claude. */
:root {
  --azul1: #2a6ef2; --azul2: #0a3fc4; --fondo: #ece9d8; --borde: #0b3ea8; --texto: #1b1b1b; --suave: #5b5b5b;
  --sel: #316ac5; --verde: #3a9a2f; --cielo1: #3f86e0; --cielo2: #8cc3f5; --pasto: #4f9b32;
}
@media (prefers-color-scheme: dark) {
  :root { --fondo: #2b2f3a; --texto: #eceff4; --suave: #a8b0c0; --cielo1: #0f2a5a; --cielo2: #1d4a8a; --pasto: #1e4a16; }
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font: 15px/1.35 Tahoma, "Segoe UI", system-ui, sans-serif; color: var(--texto);
  background: linear-gradient(var(--cielo1), var(--cielo2) 60%, var(--pasto) 60%) fixed;
  padding: env(safe-area-inset-top) 10px calc(70px + env(safe-area-inset-bottom));
}
.oculto { display: none !important; }
.ventana { background: var(--fondo); border: 2px solid var(--borde); border-radius: 8px 8px 4px 4px; margin: 12px 0; overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,.25); }
.titulo { background: linear-gradient(var(--azul1), var(--azul2)); color: #fff; font-weight: bold; padding: 7px 10px;
  display: flex; justify-content: space-between; align-items: center; text-shadow: 1px 1px #0a246a; }
.cuerpo { padding: 12px; }
.chico { color: var(--suave); font-size: 13px; }
.grande { font-size: 30px; font-weight: bold; }
.error { color: #c0392b; min-height: 1em; }
label { display: block; margin: 8px 0; }
input, textarea { width: 100%; font: inherit; padding: 8px; border: 1px solid #7f9db9; border-radius: 3px; background: #fff; color: #111; margin-top: 4px; }
.boton { font: inherit; padding: 8px 18px; border: 1px solid #003c74; border-radius: 4px; background: linear-gradient(#fff, #e3e3db);
  color: #111; margin-top: 10px; }
.boton:active { background: #dcdcd0; }
.x { background: #e0431a; border: 1px solid #fff; color: #fff; border-radius: 4px; width: 28px; height: 26px; font-weight: bold; }

#barra { position: fixed; left: 0; right: 0; bottom: 0; display: flex; background: linear-gradient(#3168d5, #1941a5);
  padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); border-top: 2px solid #5a8cf0; }
#barra button { flex: 1; background: none; border: 0; color: #dfe8ff; font: 12px Tahoma, sans-serif; padding: 4px; border-radius: 6px; }
#barra button span { display: block; font-size: 20px; }
#barra button.activo { background: rgba(255,255,255,.18); color: #fff; font-weight: bold; }

.fila { display: flex; gap: 10px; align-items: center; padding: 9px 4px; border-bottom: 1px solid rgba(0,0,0,.08); }
.fila:last-child { border-bottom: 0; }
.fila .crece { flex: 1; min-width: 0; }
.fila .nombre { font-weight: bold; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tag { font-size: 11px; background: var(--sel); color: #fff; padding: 1px 6px; border-radius: 9px; white-space: nowrap; }
.tag.terminado { background: var(--verde); } .tag.abandonado { background: #8a8a8a; } .tag.pendiente { background: #c58a16; }
.estrellas { color: #e0a800; letter-spacing: 1px; }
.estrellas.grandes { font-size: 32px; margin: 8px 0; }
.estrellas.grandes button { background: none; border: 0; font-size: 32px; color: #e0a800; padding: 0 3px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.chips button { font: inherit; padding: 5px 11px; border-radius: 14px; border: 1px solid #7f9db9; background: #fff; color: #222; }
.chips button.si { background: var(--sel); color: #fff; border-color: var(--sel); }
.barras { display: flex; align-items: flex-end; gap: 6px; height: 120px; margin: 8px 0 4px; }
.barras div { flex: 1; background: linear-gradient(var(--azul1), var(--azul2)); border-radius: 3px 3px 0 0; min-height: 2px; }
.ejes { display: flex; gap: 6px; } .ejes span { flex: 1; text-align: center; font-size: 11px; color: var(--suave); }
.progreso { height: 10px; background: #fff; border: 1px solid #7f9db9; border-radius: 2px; overflow: hidden; margin-top: 4px; }
.progreso div { height: 100%; background: repeating-linear-gradient(90deg, #3fb33a 0 9px, transparent 9px 11px); }
img.icono { width: 42px; height: 42px; border-radius: 4px; flex: none; background: #ddd; }
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.45); padding: 40px 10px; overflow: auto; z-index: 5; }
.vacio { text-align: center; color: var(--suave); padding: 18px; }
.ahora { background: #fffbe0; border: 1px solid #e0c64b; border-radius: 4px; padding: 8px; margin-bottom: 8px; color: #333; }
