/* =====================================================================
   styles.css
   ---------------------------------------------------------------------
   Qué hace este archivo:
   - Todo el estilo visual de Clevank World: colores, tipografías,
     el fondo de la pantalla de bienvenida, las tarjetas, los botones
     "3D", las pastillas de estado, etc.
   - Está organizado por bloques (mira los comentarios de cada sección
     con ===== ).
   ===================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@500;600;700;800;900&family=Nunito:wght@400;600;700;800;900&display=swap');

/* ---- Paleta de colores y variables reutilizadas en todo el CSS ---- */
:root {
  --bg-a: #FFF3E0;
  --bg-b: #E3F6FF;
  --paper-card: #FFFFFF;
  --ink: #3A3358;
  --ink-soft: #8A84A6;
  --primary: #FF6F91;
  --primary-dark: #E8496A;
  --secondary: #2FC9A8;
  --accent-yellow: #FFC145;
  --accent-blue: #4EA8DE;
  --accent-purple: #A78BFA;
  --line: #F0DFF0;
}

* { box-sizing: border-box; }

/* ---- Contenedor general de la app ya logueada (fondo, tipografía base) ----
   Usa la misma familia de "cielo + colinas" que la pantalla de bienvenida,
   para que se sienta que sigues dentro del mismo mundo de juego. */
.eco-app {
  background:
    radial-gradient(circle at 15% 8%, rgba(255,255,255,0.5) 0%, rgba(255,255,255,0) 10%),
    radial-gradient(circle at 85% 6%, rgba(255,255,255,0.5) 0%, rgba(255,255,255,0) 12%),
    linear-gradient(180deg, #6FB8EC 0%, #A9DCF6 35%, #E9F6E5 70%, #E9F6E5 100%);
  color: var(--ink);
  font-family: 'Nunito', sans-serif;
  min-height: 100vh;
  padding: 1.25rem 1rem 3rem;
}

.loading-screen { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.75rem; min-height: 100vh; }
.spin { animation: spin 1s linear infinite; color: var(--primary); }
@keyframes spin { to { transform: rotate(360deg); } }

.eco-display { font-family: 'Fredoka', sans-serif; font-weight: 700; margin: 0; }
.eco-mono { font-family: 'Nunito', sans-serif; font-weight: 800; }

.eco-header {
  display: flex; flex-direction: column; gap: 0.6rem;
  max-width: 720px; margin: 0 auto 1rem; padding-bottom: 0.5rem;
}
.eco-header-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.5rem; }
.eco-header-text { padding-top: 0.5rem; flex: 1; min-width: 0; }
.eco-header-logo { flex-shrink: 0; margin: -0.5rem -0.4rem 0 0; }
.eyebrow { font-size: 0.65rem; letter-spacing: 0.1em; color: var(--ink-soft); margin: 0 0 0.15rem; font-weight: 800; text-shadow: 0 1px 0 rgba(255,255,255,0.6); }
.header-slogan { font-family: 'Fredoka', sans-serif; font-size: 0.9rem; letter-spacing: 0.03em; color: #D98E1F; margin: 0 0 0.15rem; font-weight: 800; text-shadow: 0 1px 0 rgba(255,255,255,0.85), 0 0 6px rgba(255,255,255,0.5); }
.brand { font-size: 2rem; font-weight: 800; color: var(--primary-dark); text-shadow: 0 2px 0 rgba(255,255,255,0.6); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }

.window-tabs { display: flex; gap: 0.5rem; }
.window-tab {
  position: relative; display: flex; align-items: center; gap: 0.4rem;
  font-family: 'Nunito', sans-serif; font-weight: 800; font-size: 0.72rem; letter-spacing: 0.01em;
  padding: 0.6rem 1rem; background: var(--paper-card); border: 3px solid var(--ink);
  border-radius: 999px; cursor: pointer; color: var(--ink); box-shadow: 3px 3px 0 var(--ink);
  transition: transform 0.12s ease;
}
.window-tab.active { background: linear-gradient(180deg, #6AC0FF 0%, #2275D7 100%); color: white; border-color: white; box-shadow: 3px 3px 0 #144FA4; }
.window-tab:hover { transform: translate(-1px, -1px); }
.badge { background: var(--primary-dark); color: white; border-radius: 50%; font-size: 0.62rem; min-width: 17px; height: 17px; display: inline-flex; align-items: center; justify-content: center; padding: 0 3px; }

.save-warning { max-width: 720px; margin: 0 auto 1rem; background: #FFE3E3; border: 3px solid var(--primary-dark); color: var(--primary-dark); font-weight: 700; font-size: 0.75rem; padding: 0.6rem 0.9rem; border-radius: 18px; }

.stack { max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; gap: 1rem; }

/* ---- Tarjetas genéricas (secciones del panel, tarjetas de saldo...) ---- */
.card { background: var(--paper-card); border: 3px solid var(--ink); border-radius: 24px; box-shadow: 5px 5px 0 var(--ink); padding: 1.1rem 1.2rem; }

.balance-card { display: flex; align-items: stretch; justify-content: space-between; gap: 0.5rem; flex-wrap: wrap; }
.balance-block { flex: 1; min-width: 110px; }
.balance-divider { width: 2px; background: var(--line); border-radius: 2px; }
.streak-value { display: inline-flex; align-items: center; gap: 0.25rem; color: var(--primary-dark) !important; }

.tax-card { display: flex; align-items: flex-start; gap: 0.75rem; border-color: var(--accent-blue); }
.tax-headline { margin: 0 0 0.2rem; font-weight: 800; font-size: 0.95rem; }

.money { font-weight: 800; }
.money.sm { font-size: 0.82rem; }
.money.lg { font-size: 1.55rem; }
.coin { color: var(--accent-yellow); font-size: 0.75em; -webkit-text-stroke: 0.3px var(--ink); }

.notif-stack { display: flex; flex-direction: column; gap: 0.5rem; max-width: 720px; margin: 0 auto; }
.notif-card { display: flex; align-items: center; gap: 0.5rem; background: #DFF7EE; border: 3px solid var(--secondary); color: #1D8A6F; border-radius: 18px; padding: 0.6rem 0.9rem; font-size: 0.82rem; font-weight: 700; }
.notif-card span { flex: 1; }

.icon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 0.75rem; }
.icon-tile {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 0.4rem;
  background: var(--paper-card); border: 3px solid var(--ink); border-radius: 22px;
  padding: 0.9rem 0.5rem; cursor: pointer; box-shadow: 4px 4px 0 var(--ink); transition: transform 0.12s ease;
}
.icon-tile:hover { transform: translate(-2px, -2px); }
.tile-icon { width: 44px; height: 44px; border-radius: 50%; background: var(--tile-color); display: flex; align-items: center; justify-content: center; color: white; }
.tile-label { font-weight: 800; font-size: 0.78rem; color: var(--ink); }
.tile-badge { position: absolute; top: -6px; right: -6px; background: var(--primary-dark); color: white; border-radius: 50%; min-width: 20px; height: 20px; display: flex; align-items: center; justify-content: center; font-size: 0.68rem; font-weight: 800; border: 2px solid white; }

.back-btn { align-self: flex-start; }

.section-head { display: flex; gap: 0.65rem; align-items: flex-start; margin-bottom: 0.6rem; }
.section-icon { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; border: 3px solid var(--ink); flex-shrink: 0; box-shadow: 2px 2px 0 var(--ink); }
.section-title { font-size: 1.15rem; font-weight: 700; }
.section-sub { margin: 0; font-size: 0.8rem; color: var(--ink-soft); font-weight: 600; }

/* Cabecera "suelta" de un submenú (sin caja alrededor) — usada cuando
   Section se llama sin contenido, para separarla visualmente de las
   tarjetas de contenido de debajo. El texto lleva un halo claro detrás
   para seguir leyéndose bien encima del fondo de cielo/colinas, esté
   donde esté el degradado en ese punto de la pantalla. */
.section-header-only {
  display: flex; padding: 0.8rem 0.9rem; margin-bottom: 0.2rem;
  background: rgba(255,255,255,0.55); border-radius: 18px;
}
.section-header-only .section-head { margin-bottom: 0; }
.section-header-only .section-title { font-size: 1.3rem; color: var(--ink); text-shadow: 0 2px 0 rgba(255,255,255,0.7), 0 0 10px rgba(255,255,255,0.5); }
.section-header-only .section-sub { color: #4E4770; text-shadow: 0 1px 0 rgba(255,255,255,0.7), 0 0 8px rgba(255,255,255,0.5); }
.subheading { font-family: 'Nunito', sans-serif; font-size: 0.7rem; letter-spacing: 0.06em; color: var(--ink-soft); margin: 0.9rem 0 0.4rem; text-transform: uppercase; font-weight: 800; }
.config-subhead { font-family: 'Fredoka', sans-serif; font-size: 0.85rem; color: var(--ink); margin: 0 0 0.5rem; font-weight: 400; }
.config-divider { border-top: 2px dashed var(--line); margin: 1rem 0; }
.card-title { font-family: 'Fredoka', sans-serif; font-size: 1rem; color: var(--ink); margin: 0 0 0.6rem; font-weight: 700; }
.empty-hint { font-size: 0.85rem; color: var(--ink-soft); font-weight: 600; }
.tiny-hint { font-size: 0.75rem; color: var(--ink-soft); margin-top: 0.5rem; font-weight: 600; }
.tiny-label { font-size: 0.72rem; color: var(--ink-soft); display: block; margin-bottom: 0.25rem; font-weight: 700; }
.text-link { background: none; border: none; color: var(--secondary); font-weight: 800; font-size: 0.72rem; text-decoration: underline; cursor: pointer; padding: 0; }

.task-list { display: flex; flex-direction: column; gap: 0.5rem; }
.streak-reward-card {
  background: linear-gradient(135deg, #FFE29A, #FFC629); border: 2.5px solid var(--ink); border-radius: 18px;
  box-shadow: 3px 3px 0 var(--ink); padding: 0.8rem 1rem; margin-bottom: 0.7rem;
}
.streak-reward-title { display: flex; align-items: center; gap: 0.4rem; font-family: 'Fredoka', sans-serif; font-size: 0.95rem; font-weight: 700; color: #5C3D00; margin: 0 0 0.25rem; }
.streak-reward-text { font-size: 0.8rem; color: #5C3D00; font-weight: 600; margin: 0; }
.streak-record-badge { display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.78rem; font-weight: 800; color: white; background: var(--primary); border: 2px solid var(--ink); border-radius: 999px; padding: 0.25rem 0.6rem; margin-top: 0.5rem; margin-bottom: 0.3rem; }
.streak-toggle { color: #5C3D00; margin-top: 0.7rem; font-size: 0.72rem; display: block; }
.streak-levels { margin-top: 0.6rem; padding-top: 0.6rem; border-top: 2px dashed rgba(92,61,0,0.3); display: flex; flex-direction: column; gap: 0.35rem; }
.streak-level-row { display: flex; align-items: center; gap: 0.5rem; font-size: 0.78rem; color: #5C3D00; font-weight: 700; }
.streak-level-icon { width: 18px; text-align: center; }
.streak-level-text { flex: 1; }
.task-emoji { font-size: 1.1rem; }
.calendar-card { margin-top: 0.7rem; }
.calendar-list { display: flex; flex-direction: column; gap: 0.4rem; margin-top: 0.6rem; max-height: 340px; overflow-y: auto; }
.calendar-day-row { display: flex; gap: 0.6rem; align-items: flex-start; padding: 0.4rem 0.5rem; border-radius: 12px; }
.calendar-day-row.cal-today { background: rgba(78,168,222,0.12); border: 1.5px solid var(--accent-blue); }
.calendar-day-label { font-family: 'Fredoka', sans-serif; font-weight: 700; font-size: 0.72rem; color: var(--ink-soft); width: 22px; flex-shrink: 0; padding-top: 0.2rem; }
.calendar-day-chips { display: flex; flex-wrap: wrap; gap: 0.3rem; flex: 1; }
.cal-task-chip { font-size: 0.68rem; font-weight: 700; padding: 0.2rem 0.5rem; border-radius: 999px; border: 1.5px solid var(--line); background: #FFFDF8; color: var(--ink); }
.cal-task-chip.done { background: var(--secondary); border-color: var(--secondary); color: white; }
.cal-task-chip.fail { background: var(--primary-dark); border-color: var(--primary-dark); color: white; }
.cal-task-chip.pending { background: #E5822E; border-color: #E5822E; color: white; }
.cal-task-chip.future { background: #FFFDF8; border-color: var(--line); color: var(--ink-soft); }
.cal-task-chip.clickable { cursor: pointer; font-family: 'Nunito', sans-serif; transition: transform 0.1s ease; }
.cal-task-chip.clickable:hover { transform: translateY(-1px); }
.weekday-row { display: flex; gap: 0.3rem; margin-top: 0.5rem; flex-wrap: wrap; }
.weekday-chip {
  width: 34px; height: 34px; border-radius: 10px; border: 2px solid var(--line); background: #FFFDFB;
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 0.78rem;
  color: var(--ink-soft); cursor: pointer; user-select: none;
}
.weekday-chip.active { background: var(--accent-blue); border-color: var(--ink); color: white; }
.weekday-chip.small { width: 26px; height: 26px; font-size: 0.68rem; }
.term-chip {
  width: auto; padding: 0 0.5rem; border-radius: 999px; border: 2px solid var(--line); background: #FFFDFB;
  display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 0.7rem;
  color: var(--ink-soft); cursor: pointer; user-select: none; height: 28px;
}
.term-chip.active { background: var(--secondary); border-color: var(--ink); color: white; }
.task-row { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; padding: 0.8rem 1rem; background: #FFFDF8; border: 2.5px solid var(--ink); border-radius: 18px; box-shadow: 3px 3px 0 var(--ink); font-size: 0.85rem; }
.task-title { font-weight: 800; flex: 1; min-width: 120px; }

.job-grid { display: flex; flex-direction: column; gap: 0.7rem; }
.market-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.7rem; }
.job-card {
  border: 2.5px solid var(--ink); border-radius: 18px; padding: 0.9rem 1rem;
  display: flex; flex-direction: column; gap: 0.6rem; background: #FFFDF8; box-shadow: 3px 3px 0 var(--ink);
}
@media (min-width: 480px) {
  .job-card { flex-direction: row; align-items: center; justify-content: space-between; flex-wrap: wrap; }
  .job-card-actions { flex-shrink: 0; }
}
.job-card-info { display: flex; flex-direction: column; gap: 0.35rem; }
.market-card { border: 2.5px solid var(--ink); border-radius: 18px; padding: 0.75rem; display: flex; flex-direction: column; gap: 0.45rem; background: #FFFDF8; box-shadow: 3px 3px 0 var(--ink); }
.job-title { font-weight: 800; font-size: 0.87rem; margin: 0; }
.market-emoji { font-size: 1.7rem; }
.nego-form { display: flex; flex-direction: column; gap: 0.35rem; }
.job-nego-row .nego-form { flex-basis: 100%; margin-top: 0.4rem; }
.reject-comment { flex-basis: 100%; margin: 0.3rem 0 0; font-size: 0.76rem; color: var(--primary-dark); font-weight: 600; }

.stamp { display: inline-block; color: white; border-radius: 999px; padding: 0.25rem 0.6rem; font-family: 'Fredoka', sans-serif; font-size: 0.62rem; font-weight: 700; letter-spacing: 0.04em; transform: rotate(-2deg); width: fit-content; border: 2px solid white; box-shadow: 0 2px 0 rgba(0,0,0,0.15); }

.chart-wrap { width: 100%; }
.chart-wrap.chart-clickable { cursor: pointer; }
.chart-svg { width: 100%; height: 110px; display: block; }
.chart-axis-label { font-size: 6px; fill: var(--ink-soft); font-family: 'Nunito', sans-serif; font-weight: 700; }
.chart-footer { display: flex; justify-content: space-between; margin-top: 0.2rem; }
.chart-cta { color: var(--secondary); font-weight: 800; }
.badge-tile { border: 2.5px solid var(--ink); border-radius: 18px; padding: 0.75rem; display: flex; flex-direction: column; align-items: center; gap: 0.3rem; text-align: center; background: #FFFDF8; box-shadow: 3px 3px 0 var(--ink); }
.badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 0.7rem; }
.badge-tile.locked { opacity: 0.4; filter: grayscale(1); box-shadow: 3px 3px 0 var(--line); }
.badge-tile.unlocked { box-shadow: 3px 3px 0 var(--ink), 0 0 14px 2px rgba(255,183,77,0.55); border-color: #FFB74D; }
.badge-emoji { font-size: 1.8rem; }
.badge-title { font-weight: 800; font-size: 0.82rem; margin: 0; }
.badge-desc { font-size: 0.68rem; color: var(--ink-soft); margin: 0; }
.goal-photo-img { width: 100%; max-height: 140px; object-fit: cover; border-radius: 14px; border: 2.5px solid var(--ink); margin-bottom: 0.5rem; }
.photo-upload-btn { display: inline-flex; align-items: center; gap: 0.3rem; cursor: pointer; }
.countdown-chip { display: inline-flex; align-items: center; gap: 0.25rem; font-family: 'Fredoka', sans-serif; font-weight: 700; font-size: 0.68rem; padding: 0.2rem 0.5rem; border-radius: 999px; background: #FFE8B0; color: #7A4E00; border: 1.5px solid #E5A93A; }
.countdown-chip.urgent { background: #FFD3D3; color: #9B2C2C; border-color: #E23B3B; }
.goal-block { border-bottom: 2px dashed var(--line); padding-bottom: 0.8rem; margin-bottom: 0.8rem; }
.goal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.35rem; }
.progress-track { width: 100%; height: 14px; background: #F2EDF9; border: 2px solid var(--ink); border-radius: 999px; overflow: hidden; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--secondary), var(--accent-blue)); transition: width 0.3s ease; border-radius: 999px; }

.bank-row { display: flex; gap: 1rem; flex-wrap: wrap; }
.bank-form { flex: 1; min-width: 160px; }
.input-row { display: flex; gap: 0.4rem; align-items: center; flex-wrap: wrap; }

.amount-input, .text-input, .emoji-input, .pin-input { font-family: 'Nunito', sans-serif; font-weight: 700; border: 2.5px solid var(--line); border-radius: 14px; padding: 0.5rem 0.65rem; background: #FFFDFB; color: var(--ink); font-size: 0.87rem; }
.amount-input:focus, .text-input:focus, .emoji-input:focus, .pin-input:focus { border-color: var(--accent-blue); outline: none; }
.amount-input { width: 104px; }
.small-input { width: 84px; }
.emoji-input { width: 58px; text-align: center; }

.emoji-picker-wrap { position: relative; display: inline-block; }
.emoji-picker-trigger {
  width: 42px; height: 42px; border-radius: 12px; border: 2.5px solid var(--line); background: #FFFDFB;
  font-size: 1.2rem; cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.emoji-picker-backdrop { position: fixed; inset: 0; z-index: 40; background: transparent; }
.emoji-picker-grid {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 41; width: 220px;
  background: #FFFDF8; border: 2.5px solid var(--ink); border-radius: 16px; box-shadow: 3px 3px 0 var(--ink);
  padding: 0.5rem; display: grid; grid-template-columns: repeat(6, 1fr); gap: 0.2rem;
}
.emoji-picker-option {
  background: none; border: none; font-size: 1.15rem; padding: 0.3rem; border-radius: 8px; cursor: pointer;
}
.emoji-picker-option:hover { background: var(--line); }

.info-tooltip-wrap { position: relative; display: inline-flex; vertical-align: middle; margin-left: 0.3rem; }
.info-tooltip-trigger {
  width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--ink); background: var(--accent-yellow);
  color: #3A2B12; font-family: 'Fredoka', sans-serif; font-weight: 800; font-size: 0.68rem; line-height: 1;
  cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0;
}
.info-tooltip-bubble {
  position: absolute; top: calc(100% + 8px); left: 50%; right: auto; transform: translateX(-50%);
  z-index: 41; width: 230px; max-width: 78vw;
  background: #FFFDF8; border: 2.5px solid var(--ink); border-radius: 16px; box-shadow: 3px 3px 0 var(--ink);
  padding: 0.7rem 0.85rem; font-size: 0.8rem; line-height: 1.45; color: var(--ink); font-weight: 600;
  text-align: left; white-space: normal;
}
.text-input { flex: 1; min-width: 140px; }
.pin-input { width: 100%; text-align: center; letter-spacing: 0.4em; font-size: 1.2rem; margin: 0.6rem 0; }

.form-row { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; margin-bottom: 0.5rem; }
.settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0.75rem; }
.checkbox-label { display: flex; align-items: center; gap: 0.3rem; font-size: 0.78rem; color: var(--ink-soft); font-weight: 700; }

/* ---- Botones de dentro de la app — mismo lenguaje "3D" que los de
   bienvenida/login (degradado + brillo arriba + sombra sólida de color
   + se hunden al pulsarlos). Los nombres de clase (btn, primary, ghost,
   danger, small) siguen siendo los mismos que usa app.jsx — solo cambió
   el estilo por debajo, así que no hizo falta tocar ese archivo. ---- */
.btn {
  font-family: 'Fredoka', sans-serif; font-weight: 700; border-radius: 999px; border: 2.5px solid #FFFFFF;
  padding: 0.6rem 1rem; cursor: pointer; display: inline-flex; align-items: center; gap: 0.3rem;
  color: white; position: relative; overflow: hidden;
  background: linear-gradient(180deg, #B7BFCB 0%, #8792A3 100%);
  box-shadow: 0 4px 0 #5C6779, 0 6px 10px rgba(0,0,0,0.18);
  text-shadow: 0 1px 0 rgba(0,0,0,0.2);
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}
.btn::before {
  content: ""; position: absolute; top: 2px; left: 10%; right: 10%; height: 35%;
  background: rgba(255,255,255,0.3); border-radius: 999px; pointer-events: none;
}
.btn:hover:not(:disabled) { transform: translateY(-1px); }
.btn:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 #5C6779, 0 2px 6px rgba(0,0,0,0.18); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; box-shadow: none; transform: none; }
.btn.small { font-size: 0.76rem; padding: 0.45rem 0.75rem; }
.btn.primary { background: linear-gradient(180deg, #6AC0FF 0%, #2275D7 100%); box-shadow: 0 4px 0 #144FA4, 0 6px 10px rgba(20,79,164,0.3); }
.btn.primary:active:not(:disabled) { box-shadow: 0 1px 0 #144FA4, 0 2px 6px rgba(20,79,164,0.3); }
.btn.danger { background: linear-gradient(180deg, #FF7B7B 0%, #E23B3B 100%); box-shadow: 0 4px 0 #A32222, 0 6px 10px rgba(163,34,34,0.3); }
.btn.danger:active:not(:disabled) { box-shadow: 0 1px 0 #A32222, 0 2px 6px rgba(163,34,34,0.3); }
.btn.ghost { background: linear-gradient(180deg, #FFFFFF 0%, #E6E9EF 100%); color: var(--ink); text-shadow: none; box-shadow: 0 4px 0 #B7BFCB, 0 6px 10px rgba(0,0,0,0.1); border-color: #D8DEE8; }
.btn.ghost:active:not(:disabled) { box-shadow: 0 1px 0 #B7BFCB, 0 2px 6px rgba(0,0,0,0.1); }
.btn:focus-visible, .icon-btn:focus-visible, .window-tab:focus-visible, input:focus-visible { outline: 3px solid var(--accent-blue); outline-offset: 2px; }

.row-buttons { display: flex; gap: 0.5rem; }
.row-buttons.tight { gap: 0.35rem; }

.icon-btn { background: none; border: none; cursor: pointer; color: var(--ink-soft); padding: 0.2rem; }
.icon-btn:hover { color: var(--primary-dark); }

/* ---- Tablas simples (listas de tareas, préstamos, mercado...) ---- */
.table { display: flex; flex-direction: column; gap: 0.3rem; }
.table-row { display: grid; grid-template-columns: 1fr auto auto auto; gap: 0.6rem; align-items: center; padding: 0.5rem 0.7rem; background: #FFFDF8; border: 2px solid var(--line); border-radius: 14px; font-size: 0.84rem; }
.loan-row { grid-template-columns: 1fr auto auto; }

.ledger { display: flex; flex-direction: column; gap: 0.3rem; }
.ledger-row { display: grid; grid-template-columns: 60px 1fr auto; gap: 0.6rem; padding: 0.45rem 0.7rem; background: #FFFDF8; border: 2px solid var(--line); border-radius: 14px; font-size: 0.84rem; align-items: center; }
.ledger-desc-col { display: flex; flex-direction: column; gap: 0.1rem; }
.ledger-debt-badge { font-size: 0.76rem; font-weight: 800; color: #8A6D00; background: #FFF3C4; border: 1.5px solid #E5C15C; border-radius: 999px; padding: 0.15rem 0.5rem; white-space: nowrap; }
.ledger-date { color: var(--ink-soft); font-size: 0.7rem; font-weight: 700; }
.ledger-desc { color: var(--ink); font-weight: 600; }

/* =====================================================================
   PANTALLAS DE BIENVENIDA / LOGIN / REGISTRO
   El fondo tipo "cielo" y la tarjeta con marco amarillo que ves en
   AuthGate y ChildSelector.
   ===================================================================== */
.game-background {
  min-height: 100vh; width: 100%; display: flex; align-items: center; justify-content: center;
  padding: 2.5rem 1rem; margin: -1.25rem -1rem -3rem;
  background:
    radial-gradient(circle at 15% 12%, rgba(255,255,255,0.8) 0%, rgba(255,255,255,0) 8%),
    radial-gradient(circle at 85% 18%, rgba(255,255,255,0.8) 0%, rgba(255,255,255,0) 10%),
    radial-gradient(ellipse at 30% 120%, #7AC143 0%, #7AC143 45%, transparent 46%),
    radial-gradient(ellipse at 75% 125%, #5BA627 0%, #5BA627 50%, transparent 51%),
    linear-gradient(180deg, #4AA0E6 0%, #72CEFB 60%, #BBE7FD 100%);
}
.game-card-frame {
  position: relative; max-width: 490px; width: 100%;
  background: #FFF9E6; border: 8px solid #FFC629; outline: 4px solid #E59F00;
  border-radius: 42px;
  box-shadow: 0 14px 0 #C48300, 0 22px 35px rgba(0,0,0,0.25);
  padding: 2.2rem 2rem; text-align: center;
}
.logo-img-container { margin: 0 auto 1rem auto; display: flex; justify-content: center; align-items: center; padding: 0.5rem; }
.main-logo-img { width: 260px; max-width: 100%; height: auto; }

.welcome-heading { font-family: 'Fredoka', sans-serif; font-size: 1.5rem; font-weight: 800; color: #1A365D; margin: 0.4rem 0 0.2rem; line-height: 1.3; }

.divider-dots { display: flex; align-items: center; justify-content: center; gap: 0.4rem; margin: 0.6rem 0 1.2rem; }
.divider-dots::before, .divider-dots::after { content: ""; flex: 1; border-bottom: 3px dotted #FFC629; }
.star-badge { color: #FFC629; font-size: 1.2rem; }

.intro-text-block { font-size: 1.05rem; color: #2D3748; font-weight: 700; line-height: 1.6; margin-bottom: 1.8rem; }
.hl-green { color: #2B9E49; font-weight: 900; }
.hl-blue { color: #1E75CA; font-weight: 900; }
.hl-purple { color: #8046D9; font-weight: 900; }
.hl-teal { color: #00A389; font-weight: 900; }

.badge-icon { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; vertical-align: middle; margin: 0 4px; box-shadow: 0 3px 0 rgba(0,0,0,0.15); border: 2px solid #FFF; }
.badge-icon svg { width: 18px; height: 18px; }
.bg-coin { background: #FFB800; }
.bg-piggy { background: #FF7096; }

.cta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem; width: 100%; }
.btn-game-3d {
  font-family: 'Fredoka', sans-serif; font-weight: 700; font-size: 1.02rem; padding: 0.85rem 0.5rem;
  border-radius: 999px; border: 3px solid #FFFFFF; cursor: pointer; display: inline-flex;
  align-items: center; justify-content: center; gap: 0.4rem; color: #FFFFFF;
  text-shadow: 0 2px 0 rgba(0,0,0,0.25); transition: transform 0.1s ease, box-shadow 0.1s ease;
  user-select: none; text-decoration: none;
}
.btn-game-3d svg { width: 18px; height: 18px; flex-shrink: 0; }
.btn-blue-3d { background: linear-gradient(180deg, #4EA8DE 0%, #2275D7 100%); box-shadow: 0 6px 0 #144FA4, 0 10px 15px rgba(0,0,0,0.2); }
.btn-blue-3d:active { transform: translateY(4px); box-shadow: 0 2px 0 #144FA4, 0 4px 8px rgba(0,0,0,0.2); }
.btn-green-3d { background: linear-gradient(180deg, #4CD964 0%, #28A745 100%); box-shadow: 0 6px 0 #19692C, 0 10px 15px rgba(0,0,0,0.2); }
.btn-green-3d:active { transform: translateY(4px); box-shadow: 0 2px 0 #19692C, 0 4px 8px rgba(0,0,0,0.2); }
.btn-game-3d:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-full { width: 100%; margin-top: 1rem; }

.form-group { text-align: left; margin-bottom: 1rem; }
.form-group label { display: block; font-weight: 800; font-size: 0.9rem; color: #2D3748; margin-bottom: 0.3rem; }
.form-control {
  width: 100%; padding: 0.75rem 1rem; border-radius: 12px; border: 2px solid #E2E8F0;
  font-family: 'Nunito', sans-serif; font-size: 1rem; font-weight: 700; outline: none;
  transition: border-color 0.2s; background: white; color: #2D3748;
}
.form-control:focus { border-color: #2275D7; }

.btn-secondary-link { background: transparent; border: none; color: #4A5568; font-family: 'Fredoka', sans-serif; font-weight: 600; font-size: 0.95rem; margin-top: 1rem; cursor: pointer; text-decoration: underline; }
.error-box { background: #FED7D7; color: #9B2C2C; padding: 0.6rem; border-radius: 10px; font-weight: 700; font-size: 0.9rem; margin-bottom: 1rem; }
.success-box { background: #C6F6D5; color: #22543D; padding: 0.8rem; border-radius: 12px; font-weight: 700; margin-bottom: 1rem; }
.info-box { background: #BEE3F8; color: #1A4E8A; padding: 0.6rem; border-radius: 10px; font-weight: 700; font-size: 0.9rem; margin-bottom: 1rem; }

.role-selector { display: flex; gap: 0.5rem; margin-bottom: 1rem; }
.role-btn { flex: 1; padding: 0.6rem; border-radius: 12px; border: 2px solid #CBD5E0; background: #EDF2F7; font-family: 'Fredoka', sans-serif; font-weight: 700; cursor: pointer; color: #2D3748; }
.role-btn.active { background: #FFC629; border-color: #E59F00; color: #1A365D; }

.code-reveal { font-family: 'Fredoka', sans-serif; font-weight: 800; font-size: 2rem; letter-spacing: 0.2em; margin: 0.5rem 0; color: #1A365D; }
.mailto-link { display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem; width: 100%; padding: 0.7rem; border-radius: 999px; border: 2px solid #CBD5E0; background: white; color: #2D3748; font-family: 'Fredoka', sans-serif; font-weight: 700; text-decoration: none; margin: 0.6rem 0; }

.eco-footer { max-width: 720px; margin: 1.5rem auto 0; font-size: 0.68rem; color: var(--ink-soft); text-align: center; font-weight: 600; }
.gate-card { max-width: 340px; margin: 2rem auto; text-align: center; display: flex; flex-direction: column; align-items: center; }
.pin-error { color: var(--primary-dark); font-weight: 700; font-size: 0.78rem; margin: -0.3rem 0 0.4rem; }

/* ---- Respeta a quien haya pedido "reducir movimiento" en su móvil ---- */
@media (prefers-reduced-motion: reduce) { .spin { animation: none; } .btn, .window-tab, .icon-tile { transition: none; } }
