/* ══════════════════════════════════════════════════════════════════════════
   CENTRO DE MANDO UNIFICADO · Camino Samurai + SRS + Actividad
   Diseño Zen / Bento · Cero fricción · Soporte completo Claro / Oscuro
   ══════════════════════════════════════════════════════════════════════════ */

.home-camino-container,
.samurai-shell {
  --samurai-gold: var(--gold, #ffa022);
  --samurai-gold-bright: var(--gold-bright, #ffc24b);
  --samurai-line: var(--line, rgba(255, 160, 34, 0.16));
  --samurai-bg: var(--ink2, #141414);
  --samurai-well: var(--ink3, #1e1e1e);
  --samurai-text: var(--paper, #f5f5f2);
  --samurai-muted: var(--mist2, #b4b4ae);
  --samurai-sub: var(--mist3, #85857e);
  --samurai-green: var(--green-soft, #7fd08f);
  display: block;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin-bottom: 1.5rem;
}

/* ── Tarjeta Bento Unificada ("Centro de Mando") ────────────────────── */
.study-command-bento {
  position: relative;
  overflow: hidden;
  padding: clamp(16px, 2.5vw, 24px);
  border: 1px solid var(--samurai-line);
  border-radius: 22px;
  background:
    radial-gradient(circle at 90% 12%, rgba(255, 160, 34, 0.08), transparent 45%),
    linear-gradient(180deg, color-mix(in srgb, var(--samurai-bg) 96%, #000 4%), var(--samurai-bg));
  box-shadow: 0 4px 28px rgba(0, 0, 0, 0.35);
  box-sizing: border-box;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

/* ── 1. Cabecera Zen / Status ───────────────────────────────────────── */
.sc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--samurai-line);
}

.sc-header-left {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.sc-icon {
  font-size: 16px;
  color: var(--samurai-gold);
  line-height: 1;
}

.sc-title {
  font-weight: 850;
  font-size: 14.5px;
  color: var(--samurai-text);
  letter-spacing: -0.01em;
}

.sc-level-badge {
  display: inline-flex;
  align-items: center;
  padding: 1.5px 8px;
  border-radius: 999px;
  background: rgba(255, 160, 34, 0.12);
  border: 1px solid rgba(255, 160, 34, 0.3);
  color: var(--samurai-gold);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.04em;
}

.sc-pro-badge,
.sc-pro-locked-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.sc-pro-badge {
  background: rgba(255, 160, 34, 0.14);
  border: 1px solid rgba(255, 160, 34, 0.4);
  color: var(--samurai-gold);
}

.sc-pro-locked-badge {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--samurai-muted);
}

.sc-quote-pill {
  font-size: 11.5px;
  color: var(--samurai-sub);
  font-style: italic;
  margin-left: 2px;
}

.sc-header-right {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.sc-streak-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono, monospace);
  font-size: 12px;
  color: var(--samurai-muted);
  background: var(--samurai-well);
  border: 1px solid var(--samurai-line);
  padding: 3px 10px;
  border-radius: 999px;
}

.sc-streak-tag b {
  color: var(--samurai-text);
  font-weight: 800;
}

/* ── 2. Núcleo Bento: Decisión y Acción (Izquierda) + Momentum (Derecha) ── */
.sc-bento-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(240px, 0.75fr);
  gap: clamp(16px, 2.5vw, 24px);
  align-items: center;
  margin: 18px 0 16px;
}

/* Columna Izquierda: La Misión Principal Sin Fricción */
.sc-action-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
}

.sc-kicker {
  font-family: var(--font-mono, monospace);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--samurai-gold);
  font-weight: 800;
  margin-bottom: 4px;
}

.sc-title-main {
  font-size: clamp(1.25rem, 3.2vw, 1.85rem);
  font-weight: 900;
  line-height: 1.18;
  color: var(--samurai-text);
  letter-spacing: -0.025em;
  margin: 0 0 6px 0;
}

.sc-hero-count {
  color: var(--samurai-gold);
  font-weight: 950;
}

.sc-desc-main {
  font-size: 13.5px;
  color: var(--samurai-muted);
  line-height: 1.5;
  margin: 0 0 14px 0;
  max-width: 38rem;
}

.sc-actions-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Botón Principal (El Hero CTA definitivo) */
.sc-btn-primary {
  min-height: 44px;
  padding: 10px 20px;
  border-radius: 12px;
  font-family: var(--font-mono, system-ui, sans-serif);
  font-size: 13.5px;
  font-weight: 850;
  letter-spacing: 0.02em;
  border: 0;
  background: var(--samurai-gold);
  color: #14110b;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 2px 12px rgba(255, 160, 34, 0.28);
  transition: transform 0.14s ease, filter 0.14s ease, box-shadow 0.14s ease;
}

.sc-btn-primary:hover:not(:disabled) {
  filter: brightness(1.1);
  transform: translateY(-1px);
  box-shadow: 0 4px 18px rgba(255, 160, 34, 0.4);
}

.sc-btn-primary:active:not(:disabled) {
  transform: translateY(1px);
}

.sc-btn-primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.sc-btn-icon {
  font-size: 15px;
  line-height: 1;
}

.sc-btn-arrow {
  font-size: 15px;
  line-height: 1;
  transition: transform 0.14s ease;
}

.sc-btn-primary:hover .sc-btn-arrow {
  transform: translateX(2px);
}

/* Botón Secundario */
.sc-btn-secondary {
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 12px;
  font-family: var(--font-mono, system-ui, sans-serif);
  font-size: 13px;
  font-weight: 750;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--samurai-line);
  color: var(--samurai-text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background 0.14s ease, border-color 0.14s ease, color 0.14s ease;
}

.sc-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--samurai-gold);
  color: var(--samurai-text);
}

/* Nota de Backlog (tarjetas en Kioku sin estudiar) */
.sc-backlog-note {
  margin-top: 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--samurai-muted);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--samurai-line);
  padding: 6px 12px;
  border-radius: 10px;
  line-height: 1.4;
}

.sc-backlog-note b {
  color: var(--samurai-text);
  font-weight: 800;
}

.sc-backlog-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--samurai-gold);
  flex-shrink: 0;
}

/* Fila de colas SRS por tipo (chips) */
.sc-chips-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.sc-queue-chip {
  font-family: var(--font-mono, monospace);
  font-size: 11.5px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--samurai-line);
  background: transparent;
  color: var(--samurai-muted);
  cursor: pointer;
  transition: border-color 0.14s ease, color 0.14s ease;
}

.sc-queue-chip b {
  color: var(--samurai-gold);
  margin-left: 2px;
}

.sc-queue-chip:hover {
  border-color: var(--samurai-gold);
  color: var(--samurai-text);
}

/* Columna Derecha: Momentum, Anillo XP y Racha */
.sc-momentum-col {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 14px 16px;
  border-radius: 16px;
  background: color-mix(in srgb, var(--samurai-well) 80%, rgba(255, 255, 255, 0.02));
  border: 1px solid var(--samurai-line);
}

.sc-ring-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
}

.sc-xp-ring {
  width: 62px;
  height: 62px;
  flex-shrink: 0;
}

.sc-ring-bg {
  fill: none;
  stroke: var(--samurai-well);
  stroke-width: 5;
}

.sc-ring-fg {
  fill: none;
  stroke: var(--samurai-gold);
  stroke-width: 5;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.sc-ring-fg.is-done {
  stroke: var(--samurai-green);
}

.sc-ring-txt {
  fill: var(--samurai-text);
  font-size: 13.5px;
  font-weight: 850;
  font-family: var(--font-mono, monospace);
}

.sc-ring-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.sc-ring-kicker {
  font-family: var(--font-mono, monospace);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--samurai-gold);
  font-weight: 800;
}

.sc-ring-xp {
  font-size: 17px;
  line-height: 1.2;
  color: var(--samurai-text);
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.sc-ring-xp strong {
  font-weight: 900;
}

.sc-ring-xp span {
  font-family: var(--font-mono, monospace);
  font-size: 11.5px;
  color: var(--samurai-sub);
}

.sc-ring-status {
  font-size: 11.5px;
  color: var(--samurai-muted);
}

/* ── 3. Tira de Currículo JLPT N5 → N1 ──────────────────────────────── */
.sc-levels-section {
  border-top: 1px solid var(--samurai-line);
  padding-top: 12px;
  margin-top: 14px;
}

.sc-levels-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.sc-levels-header span {
  font-size: 10.5px;
  font-weight: 800;
  color: var(--samurai-sub);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.sc-levels-active-pill {
  font-size: 10px;
  font-weight: 850;
  color: var(--samurai-gold);
  background: rgba(255, 160, 34, 0.12);
  border: 1px solid rgba(255, 160, 34, 0.28);
  padding: 1px 8px;
  border-radius: 999px;
  letter-spacing: 0.04em;
}

.sc-levels-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
}

.sc-mini-level {
  padding: 7px 8px;
  border: 1px solid var(--samurai-line);
  border-radius: 10px;
  background: color-mix(in srgb, var(--samurai-bg) 88%, rgba(255, 255, 255, 0.03));
  box-sizing: border-box;
  text-align: center;
  transition: border-color 0.14s ease, transform 0.14s ease;
}

.sc-mini-level:hover {
  border-color: rgba(255, 160, 34, 0.35);
}

.sc-mini-level.is-locked {
  opacity: 0.42;
}

.sc-mini-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}

.sc-mini-name {
  color: var(--samurai-text);
  font-size: 12px;
  font-weight: 850;
}

.sc-mini-pct {
  color: var(--samurai-gold);
  font-size: 10.5px;
  font-weight: 850;
}

.sc-mini-track {
  height: 4px;
  margin: 5px 0 4px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.sc-mini-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--samurai-gold), var(--samurai-green));
  transition: width 0.3s ease;
}

.sc-mini-sub {
  color: var(--samurai-sub);
  font-size: 9.5px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── 4. Actividad de Estudio (Últimos 60 días) Integrada ─────────────── */
.sc-heatmap-section {
  border-top: 1px solid var(--samurai-line);
  padding-top: 12px;
  margin-top: 14px;
}

.sc-heatmap-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  flex-wrap: wrap;
  gap: 6px;
}

.sc-heatmap-title {
  font-size: 12px;
  font-weight: 800;
  color: var(--samurai-text);
  display: flex;
  align-items: center;
  gap: 6px;
}

.sc-heatmap-stat {
  font-size: 11.5px;
  color: var(--samurai-sub);
  font-family: var(--font-mono, monospace);
}

.sc-heatmap-stat strong {
  color: var(--samurai-text);
}

.sc-heatmap-grid {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding-bottom: 4px;
}

/* Compatibilidad con días de heatmap existentes */
.sc-heatmap-grid .gh-heatmap-day {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  flex-shrink: 0;
  background: var(--samurai-well);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: transform 0.15s ease, background 0.2s ease;
  cursor: pointer;
}

.sc-heatmap-grid .gh-heatmap-day:hover {
  transform: scale(1.3);
  z-index: 5;
}

.sc-heatmap-grid .gh-heatmap-day.lvl-0 { background: var(--samurai-well); }
.sc-heatmap-grid .gh-heatmap-day.lvl-1 { background: rgba(255, 160, 34, 0.3); border-color: var(--samurai-gold); }
.sc-heatmap-grid .gh-heatmap-day.lvl-2 { background: rgba(255, 160, 34, 0.6); border-color: var(--samurai-gold); }
.sc-heatmap-grid .gh-heatmap-day.lvl-3 { background: var(--samurai-gold); border-color: var(--samurai-gold-bright); box-shadow: 0 0 6px rgba(255, 160, 34, 0.5); }

/* ── Modal de Felicitaciones ────────────────────────────────────────── */
.samurai-modal[hidden] { display: none !important; }
.samurai-modal {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: grid;
  place-items: center;
  padding: 18px;
  box-sizing: border-box;
}

.samurai-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(5px);
}

.samurai-modal-card {
  position: relative;
  z-index: 1;
  width: min(420px, 92vw);
  max-width: 420px;
  box-sizing: border-box;
  padding: 24px 20px;
  border: 1px solid rgba(255, 160, 34, 0.36);
  border-radius: 20px;
  background: linear-gradient(180deg, #1d1d24, #15151a);
  color: #f1eee7;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  overflow-wrap: break-word;
}

.samurai-modal-mark {
  font-size: 32px;
  line-height: 1;
}

.samurai-modal-card h2 {
  margin: 10px 0 8px;
  font-size: 21px;
  font-weight: 850;
}

.samurai-modal-card p {
  color: #b8b4ae;
  font-size: 13px;
  line-height: 1.5;
  margin: 6px 0;
}

.samurai-modal-card .samurai-modal-encourage {
  color: #f1eee7;
  font-size: 15px;
  font-weight: 800;
  margin-top: 10px;
}

.samurai-modal-card .samurai-btn-add {
  margin-top: 12px;
  width: 100%;
}

body.samurai-modal-open { overflow: hidden; }

/* ── TEMA CLARO (html.light) ────────────────────────────────────────── */
html.light .study-command-bento {
  --samurai-gold: #8f0020;
  --samurai-gold-bright: #bc002d;
  --samurai-line: #eddad9;
  --samurai-bg: #ffffff;
  --samurai-well: #fff8f7;
  --samurai-text: #131010;
  --samurai-muted: #3a3131;
  --samurai-sub: #5f5250;
  --samurai-green: #175a2c;
  background: #ffffff;
  border: 1px solid rgba(143, 0, 32, 0.12);
  box-shadow: 0 4px 24px rgba(143, 0, 32, 0.06);
}

html.light .sc-header {
  border-bottom-color: #eddad9;
}

html.light .sc-level-badge,
html.light .sc-pro-badge {
  background: rgba(143, 0, 32, 0.08);
  border-color: rgba(143, 0, 32, 0.25);
  color: #8f0020;
}

html.light .sc-streak-tag {
  background: #fff8f7;
  border-color: #eddad9;
  color: #3a3131;
}

html.light .sc-btn-primary {
  background: #8f0020;
  color: #ffffff;
  box-shadow: 0 2px 12px rgba(143, 0, 32, 0.22);
}

html.light .sc-btn-primary:hover:not(:disabled) {
  filter: brightness(1.08);
  box-shadow: 0 4px 18px rgba(143, 0, 32, 0.32);
}

html.light .sc-btn-secondary {
  background: #fff8f7;
  border-color: #eddad9;
  color: #131010;
}

html.light .sc-btn-secondary:hover {
  background: #fdf0ee;
  border-color: #8f0020;
}

html.light .sc-backlog-note {
  background: #fff8f7;
  border-color: #eddad9;
  color: #3a3131;
}

html.light .sc-momentum-col {
  background: #fff8f7;
  border-color: #eddad9;
}

html.light .sc-ring-bg {
  stroke: #f1e4e3;
}

html.light .sc-ring-fg {
  stroke: #8f0020;
}

html.light .sc-ring-fg.is-done {
  stroke: #175a2c;
}

html.light .sc-ring-txt {
  fill: #131010;
}

html.light .sc-levels-section,
html.light .sc-heatmap-section {
  border-top-color: #eddad9;
}

html.light .sc-levels-active-pill {
  background: rgba(143, 0, 32, 0.08);
  border-color: rgba(143, 0, 32, 0.25);
  color: #8f0020;
}

html.light .sc-mini-level {
  background: #ffffff;
  border-color: #eddad9;
}

html.light .sc-mini-level:hover {
  border-color: rgba(143, 0, 32, 0.35);
}

html.light .sc-mini-track {
  background: #f1e4e3;
}

html.light .sc-mini-track i {
  background: linear-gradient(90deg, #8f0020, #2e8442);
}

html.light .sc-heatmap-grid .gh-heatmap-day.lvl-0 { background: #fbf0ef; border-color: #f1e4e3; }
html.light .sc-heatmap-grid .gh-heatmap-day.lvl-1 { background: rgba(143, 0, 32, 0.25); border-color: #8f0020; }
html.light .sc-heatmap-grid .gh-heatmap-day.lvl-2 { background: rgba(143, 0, 32, 0.6); border-color: #8f0020; }
html.light .sc-heatmap-grid .gh-heatmap-day.lvl-3 { background: #8f0020; border-color: #bc002d; box-shadow: 0 0 6px rgba(143, 0, 32, 0.4); }

/* ── Responsive Mobile ──────────────────────────────────────────────── */
@media (max-width: 768px) {
  .study-command-bento {
    padding: 14px 15px;
  }
  .sc-bento-hero {
    grid-template-columns: 1fr;
    gap: 14px;
    margin: 14px 0 12px;
  }
  .sc-actions-row {
    width: 100%;
  }
  .sc-btn-primary {
    width: 100%;
  }
  .sc-btn-secondary {
    width: 100%;
  }
  .sc-momentum-col {
    padding: 12px 14px;
  }
  .sc-levels-grid {
    gap: 5px;
  }
  .sc-mini-level {
    padding: 5px 4px;
  }
  .sc-mini-name {
    font-size: 11px;
  }
  .sc-mini-pct {
    font-size: 9.5px;
  }
  .sc-mini-sub {
    font-size: 8.5px;
  }
}

/* ── RPG Badge & Level ──────────────────────────────────────────────── */
.sc-rpg-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 10px 2px 6px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(255, 160, 34, 0.16), rgba(255, 160, 34, 0.06));
  border: 1px solid rgba(255, 160, 34, 0.35);
  font-size: 11.5px;
  color: var(--samurai-text);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}
.sc-rpg-icon { font-size: 13px; line-height: 1; }
.sc-rpg-level { font-weight: 850; color: var(--samurai-gold-bright, #ffd57b); }
.sc-rpg-name { color: var(--samurai-muted, #ccc); font-weight: 600; }
.sc-rpg-bar {
  width: 38px;
  height: 5px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  overflow: hidden;
  margin-left: 2px;
}
.sc-rpg-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--samurai-gold), #4caf50);
  border-radius: 999px;
  transition: width 0.4s ease;
}

/* ── Misiones Diarias & Cofre del Día ───────────────────────────────── */
.sc-quests-container {
  margin-top: 14px;
  padding: 16px;
  background: var(--samurai-well, #18181f);
  border: 1px solid var(--samurai-line);
  border-radius: 16px;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
}
.sc-quests-header {
  margin-bottom: 12px;
}
.sc-quests-title-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.sc-quests-badge {
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.05em;
  color: var(--samurai-gold);
}
.sc-quests-progress-pill {
  font-size: 11px;
  font-weight: 700;
  font-family: var(--font-mono);
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 160, 34, 0.12);
  border: 1px solid rgba(255, 160, 34, 0.25);
  color: var(--samurai-gold-bright);
}
.sc-quests-subtitle {
  font-size: 11.5px;
  color: var(--samurai-muted);
  margin-top: 2px;
}
.sc-quests-body {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
}
@media (max-width: 768px) {
  .sc-quests-body { grid-template-columns: minmax(0, 1fr); }
}
.sc-quests-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  max-width: 100%;
}
.sc-quest-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
.sc-quest-item:hover {
  border-color: rgba(255, 160, 34, 0.35);
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-1px);
}
.sc-quest-item.is-done {
  background: rgba(76, 175, 80, 0.06);
  border-color: rgba(76, 175, 80, 0.25);
}
.sc-quest-item.is-done:hover {
  border-color: rgba(76, 175, 80, 0.45);
}

/* Tooltip / Popup emergente al hacer hover o focus */
.sc-quest-tooltip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  width: 290px;
  max-width: 90vw;
  background: #1c1820;
  border: 1px solid rgba(255, 160, 34, 0.35);
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55), 0 0 15px rgba(255, 160, 34, 0.15);
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  z-index: 100;
  cursor: default;
}
.sc-quest-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 6px;
  border-style: solid;
  border-color: #1c1820 transparent transparent transparent;
}
.sc-quest-item:hover .sc-quest-tooltip,
.sc-quest-item:focus .sc-quest-tooltip,
.sc-quest-item:focus-within .sc-quest-tooltip {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}
.sc-quest-tooltip-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
  font-size: 11.5px;
  color: var(--samurai-text);
}
.sc-quest-tooltip-tag {
  font-size: 9.5px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(255, 160, 34, 0.15);
  color: var(--samurai-gold);
}
.sc-quest-item.is-done .sc-quest-tooltip-tag {
  background: rgba(76, 175, 80, 0.18);
  color: #4caf50;
}
.sc-quest-tooltip-body {
  font-size: 11px;
  line-height: 1.45;
  color: var(--samurai-sub);
  margin-bottom: 10px;
  text-align: left;
}
.sc-quest-tooltip-footer {
  display: flex;
  justify-content: flex-end;
}
.sc-quest-tooltip-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 160, 34, 0.15);
  color: var(--samurai-gold);
  border: 1px solid rgba(255, 160, 34, 0.3);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 10.5px;
  font-weight: 750;
  cursor: pointer;
  transition: all 0.15s ease;
}
.sc-quest-tooltip-btn:hover {
  background: var(--samurai-gold);
  color: #17140e;
}
html.light .sc-quest-tooltip {
  background: #ffffff;
  border-color: rgba(143, 0, 32, 0.25);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
}
html.light .sc-quest-tooltip::after {
  border-color: #ffffff transparent transparent transparent;
}
html.light .sc-quest-tooltip-btn {
  background: rgba(143, 0, 32, 0.08);
  color: #8f0020;
  border-color: rgba(143, 0, 32, 0.2);
}
html.light .sc-quest-tooltip-btn:hover {
  background: #8f0020;
  color: #ffffff;
}
.sc-quest-icon {
  font-size: 18px;
  line-height: 1;
  flex-shrink: 0;
}
.sc-quest-info {
  flex: 1;
  min-width: 0;
}
.sc-quest-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2px;
  gap: 8px;
  min-width: 0;
}
.sc-quest-title {
  font-size: 12px;
  font-weight: 750;
  color: var(--samurai-text);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sc-quest-reward {
  font-size: 10px;
  font-weight: 800;
  color: var(--samurai-gold);
  background: rgba(255, 160, 34, 0.12);
  padding: 1px 6px;
  border-radius: 999px;
  flex-shrink: 0;
  white-space: nowrap;
}
.sc-quest-desc {
  font-size: 10.5px;
  color: var(--samurai-sub);
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.sc-quest-progress-bar {
  height: 5px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
  width: 100%;
}
.sc-quest-progress-fill {
  height: 100%;
  background: var(--samurai-gold);
  border-radius: 999px;
  transition: width 0.4s ease;
}
.sc-quest-item.is-done .sc-quest-progress-fill {
  background: #4caf50;
}
.sc-quest-check {
  font-size: 11px;
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--samurai-sub);
  flex-shrink: 0;
  padding-left: 4px;
  white-space: nowrap;
}
.sc-quest-item.is-done .sc-quest-check {
  color: #4caf50;
  font-size: 14px;
  font-weight: 900;
}

/* ── Cofre del Día ──────────────────────────────────────────────────── */
.sc-chest-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 14px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px dashed rgba(255, 255, 255, 0.12);
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
.sc-chest-box.is-ready {
  background: linear-gradient(135deg, rgba(255, 160, 34, 0.18), rgba(255, 160, 34, 0.06));
  border: 1px solid rgba(255, 160, 34, 0.45);
  box-shadow: 0 0 20px rgba(255, 160, 34, 0.18);
  animation: scPulseReady 2s infinite ease-in-out;
}
@keyframes scPulseReady {
  0%, 100% { border-color: rgba(255, 160, 34, 0.4); box-shadow: 0 0 16px rgba(255, 160, 34, 0.15); }
  50% { border-color: rgba(255, 160, 34, 0.75); box-shadow: 0 0 28px rgba(255, 160, 34, 0.35); }
}
.sc-chest-box.is-claimed {
  background: rgba(76, 175, 80, 0.08);
  border: 1px solid rgba(76, 175, 80, 0.3);
}
.sc-chest-emoji {
  font-size: 32px;
  display: inline-block;
  line-height: 1;
  margin-bottom: 6px;
}
.sc-chest-box.is-ready .sc-chest-emoji {
  animation: scBounceChest 1.6s infinite ease-in-out;
}
@keyframes scBounceChest {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-4px) scale(1.1); }
}
.sc-chest-title {
  font-size: 12.5px;
  font-weight: 800;
  color: var(--samurai-text);
  margin-bottom: 2px;
}
.sc-chest-box.is-ready .sc-chest-title {
  color: var(--samurai-gold-bright);
}
.sc-chest-desc {
  font-size: 10.5px;
  color: var(--samurai-muted);
  line-height: 1.35;
  margin-bottom: 10px;
}
.sc-chest-claim-btn {
  width: 100%;
  max-width: 160px;
  min-height: 36px;
  border-radius: 999px;
  background: var(--samurai-gold);
  color: #17140e;
  font-size: 11.5px;
  font-weight: 850;
  border: 0;
  cursor: pointer;
  box-shadow: 0 2px 12px rgba(255, 160, 34, 0.4);
  transition: transform 0.15s ease, filter 0.15s ease;
  touch-action: manipulation;
}
.sc-chest-claim-btn:active { transform: scale(0.96); }
.sc-chest-claimed-tag {
  font-size: 11px;
  font-weight: 750;
  color: #4caf50;
}
.sc-chest-locked-tag {
  font-size: 11px;
  font-weight: 700;
  color: var(--samurai-sub);
}
