/* Guías para nuevos jugadores (js/app-guided-tours.js): crear un mazo y unirse a un torneo.
   La burbuja y el foco reutilizan las clases tut-* de css/tutorial.css. */

.guide-tour-root .tut-bubble { width: 410px; }
.guide-tour-root .tut-head .guide-minimize { margin-left: auto; }
.guide-tour-root .tut-head .guide-minimize + .tut-close { margin-left: 0; }
.guide-dots { display: flex; gap: 4px; margin: 2px 0 8px; }
.guide-dots i { flex: 1; height: 4px; border-radius: 999px; background: rgba(148, 163, 184, .25); }
.guide-dots i.done { background: rgba(134, 239, 172, .75); }
.guide-dots i.current { background: linear-gradient(90deg, #fbbf24, #f97316); }
.guide-live:empty, .guide-extra:empty { display: none; }
.guide-live { margin: 4px 0 8px; }
.guide-extra-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 10px; }

/* Lista de control del mazo */
.gt-checklist { padding: 10px 12px; border-radius: 12px; border: 1px solid rgba(148, 163, 184, .25); background: rgba(2, 6, 23, .5); }
.gt-progress { height: 6px; border-radius: 999px; background: rgba(148, 163, 184, .2); overflow: hidden; margin-bottom: 8px; }
.gt-progress span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #f59e0b, #22c55e); transition: width .35s ease; }
.gt-checklist ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.gt-checklist.compact ul { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 10px; }
.gt-checklist li { display: flex; align-items: center; gap: 7px; font-size: .84rem; color: #cbd5e1; margin: 0; }
.gt-checklist li small { color: #94a3b8; }
.gt-check {
    display: grid;
    place-items: center;
    flex: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid rgba(148, 163, 184, .5);
    font-size: .68rem;
    font-weight: 900;
    color: #052e16;
}
.gt-checklist li.ok { color: #dcfce7; }
.gt-checklist li.ok .gt-check { border-color: #22c55e; background: #22c55e; }
.gt-checklist li.warn { color: #fed7aa; }
.gt-checklist li.warn .gt-check { border-color: #f97316; background: #f97316; color: #431407; }

/* Píldora de la guía minimizada */
.guide-pill {
    position: fixed;
    left: 50%;
    bottom: 18px;
    transform: translateX(-50%);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    max-width: calc(100vw - 24px);
    padding: 9px 14px;
    border-radius: 999px;
    border: 1px solid rgba(244, 199, 106, .7);
    background: rgba(9, 13, 26, .97);
    box-shadow: 0 12px 30px rgba(0, 0, 0, .55);
    color: #f8fafc;
    pointer-events: auto;
    font-size: .86rem;
}
.guide-pill.hidden { display: none; }
.guide-pill-dot { width: 9px; height: 9px; border-radius: 50%; background: #fbbf24; box-shadow: 0 0 10px #fbbf24; animation: guidePulse 1.8s ease-in-out infinite; }
.guide-pill-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.guide-pill-open { padding: 3px 10px; border-radius: 999px; background: linear-gradient(135deg, #f59e0b, #ef4444); font-weight: 800; font-size: .76rem; white-space: nowrap; }

/* Ilustraciones dentro de la burbuja */
.gt-anatomy { margin: 6px 0 10px; }
.gt-anatomy-bar { display: flex; height: 26px; border-radius: 8px; overflow: hidden; font-size: .72rem; font-weight: 800; }
.gt-anatomy-bar span { display: grid; place-items: center; white-space: nowrap; }
.gt-anatomy-bar .cards { background: linear-gradient(135deg, #b45309, #f59e0b); color: #fff7ed; }
.gt-anatomy-bar .res { flex: 1; background: linear-gradient(135deg, #0e7490, #22d3ee); color: #ecfeff; padding: 0 6px; }
.gt-anatomy-extra { display: flex; gap: 6px; margin-top: 6px; }
.gt-anatomy-extra span { flex: 1; text-align: center; padding: 4px; border-radius: 8px; font-size: .74rem; font-weight: 800; background: rgba(148, 163, 184, .16); border: 1px solid rgba(148, 163, 184, .3); }

.gt-types { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 6px 0 10px; }
.gt-type { display: grid; gap: 4px; padding: 10px; border-radius: 12px; font-size: .8rem; }
.gt-type small { color: #cbd5e1; line-height: 1.35; }
.gt-type.official { border: 1px solid rgba(251, 191, 36, .6); background: linear-gradient(160deg, rgba(49, 46, 129, .85), rgba(2, 6, 23, .7)); }
.gt-type.official strong { color: #fde68a; }
.gt-type.free { border: 1px solid rgba(34, 211, 238, .55); background: linear-gradient(160deg, rgba(8, 47, 73, .85), rgba(2, 6, 23, .7)); }
.gt-type.free strong { color: #a5f3fc; }

.gt-vs { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: center; margin: 6px 0 10px; }
.gt-vs-plate { display: grid; gap: 2px; padding: 8px; border-radius: 12px; text-align: center; background: rgba(2, 6, 23, .55); border: 1px solid rgba(148, 163, 184, .3); }
.gt-vs-plate.self { border-color: rgba(34, 197, 94, .7); }
.gt-vs-plate.self small { color: #86efac; }
.gt-vs-plate small { color: #94a3b8; font-size: .72rem; }
.gt-vs-score { display: grid; justify-items: center; }
.gt-vs-score span { font-weight: 900; color: #fbbf24; letter-spacing: .1em; }
.gt-vs-score b { font-size: 1.3rem; }
.gt-vs-score small { color: #94a3b8; font-size: .68rem; }

.gt-bracket { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin: 6px 0 10px; font-size: .74rem; }
.gt-bracket .col { display: flex; flex-direction: column; justify-content: space-around; gap: 4px; }
.gt-bracket i { font-style: normal; padding: 4px 6px; border-radius: 6px; background: rgba(71, 85, 105, .55); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gt-bracket i.win { background: linear-gradient(135deg, rgba(251, 191, 36, .4), rgba(239, 68, 68, .2)); font-weight: 800; }
.gt-bracket .mid i { border: 1px solid rgba(56, 189, 248, .6); }
.gt-bracket i.crown { text-align: center; color: #fde68a; font-weight: 900; border: 1px solid rgba(251, 191, 36, .7); background: rgba(251, 191, 36, .14); }

/* Ofrecimiento automático a jugadores nuevos */
.guide-offer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin: 0 0 14px;
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid rgba(251, 191, 36, .55);
    background: linear-gradient(135deg, rgba(120, 53, 15, .45), rgba(15, 23, 42, .9));
    box-shadow: 0 10px 26px rgba(0, 0, 0, .3);
}
.guide-offer-icon { font-size: 1.6rem; }
.guide-offer-text { flex: 1 1 260px; }

/* Tarjetas de Inicio */
.home-guides { margin-top: 16px; }
.home-guides-head h3 { margin: 2px 0 10px; }
.home-guides-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.home-guide-card {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 12px;
    align-items: center;
    text-align: left;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, .25);
    background: linear-gradient(135deg, rgba(30, 41, 59, .9), rgba(2, 6, 23, .7));
    transition: transform .15s ease, border-color .15s ease;
}
.home-guide-card:hover, .home-guide-card:focus-visible { transform: translateY(-2px); border-color: rgba(251, 191, 36, .6); }
.home-guide-card strong { display: block; font-size: 1rem; }
.home-guide-card small { display: block; color: var(--muted, #aeb8c8); font-weight: 600; margin-top: 2px; }
.home-guide-icon { font-size: 1.9rem; }
.home-guide-go { padding: 6px 12px; border-radius: 999px; background: linear-gradient(135deg, #f59e0b, #ef4444); color: #fff7ed; font-size: .78rem; font-weight: 800; }
.home-guide-card.guide-tournament { border-color: rgba(251, 191, 36, .35); }
.deck-guide-button { white-space: normal; }

@keyframes guidePulse { 0%, 100% { opacity: 1; } 50% { opacity: .4; } }
@media (prefers-reduced-motion: reduce) {
    .guide-pill-dot { animation: none; }
    .home-guide-card { transition: none; }
}
@media (max-width: 520px) {
    .gt-checklist.compact ul { grid-template-columns: 1fr; }
    .gt-types { grid-template-columns: 1fr; }
    .home-guide-card { grid-template-columns: auto 1fr; }
    .home-guide-go { grid-column: 1 / -1; justify-self: start; }
}
