@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,500&display=swap');

:root {
    --violet: #7C3AED;
    --violet-light: #A78BFA;
    --pink: #EC4899;
    --orange: #FB923C;
    --yellow: #FACC15;
    --green: #22C55E;
    --blue: #3B82F6;
    --red: #E11D48;
    --dark: #0F0B1E;
    --dark-2: #1A1430;
    --dark-3: #251C42;
    --text: #F4F2FB;
    --text-muted: #A79FC7;
    --gradient-main: linear-gradient(135deg, #7C3AED 0%, #EC4899 50%, #FB923C 100%);
    --gradient-card: linear-gradient(160deg, #1A1430 0%, #251C42 100%);
    --radius: 20px;
    --shadow-glow: 0 8px 32px rgba(124, 58, 237, 0.25);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Poppins', sans-serif;
    background: var(--dark);
    background-image:
        radial-gradient(circle at 15% 10%, rgba(124,58,237,0.25), transparent 40%),
        radial-gradient(circle at 85% 30%, rgba(236,72,153,0.18), transparent 40%),
        radial-gradient(circle at 50% 90%, rgba(251,146,60,0.12), transparent 40%);
    color: var(--text);
    min-height: 100vh;
    padding-bottom: 60px;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button, input, select, textarea { font-family: 'Poppins', sans-serif; }

/* ---------- Topbar ---------- */
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 28px;
    background: rgba(15, 11, 30, 0.85);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(167, 143, 250, 0.15);
    flex-wrap: wrap;
}

.logo {
    font-weight: 800;
    font-size: 22px;
    background: var(--gradient-main);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

/* Botón hamburguesa: oculto en desktop, visible solo en pantallas chicas */
.mobile-menu-btn {
    display: none;
    width: 40px; height: 40px;
    align-items: center; justify-content: center;
    border-radius: 10px;
    border: 1.5px solid rgba(167,143,250,0.3);
    background: transparent;
    color: var(--text);
    font-size: 19px;
    cursor: pointer;
    flex-shrink: 0;
}

.badge {
    font-size: 11px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.badge-admin { background: rgba(225,29,72,0.2); color: #FB7185; border: 1px solid rgba(225,29,72,0.4); }
.badge-streamer { background: rgba(236,72,153,0.2); color: #F472B6; border: 1px solid rgba(236,72,153,0.4); }
.badge-vivante { background: rgba(59,130,246,0.2); color: #60A5FA; border: 1px solid rgba(59,130,246,0.4); }

.avatar {
    width: 38px; height: 38px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; color: white;
    font-size: 15px;
    flex-shrink: 0;
}

/* ---------- Layout ---------- */
.container { max-width: 1100px; margin: 0 auto; padding: 32px 20px; }
.page-title {
    font-size: 30px; font-weight: 800; margin-bottom: 6px;
}
.page-subtitle { color: var(--text-muted); margin-bottom: 28px; font-size: 15px; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px 24px;
    border-radius: 14px;
    font-weight: 600;
    font-size: 14px;
    border: none;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--gradient-main); color: white; box-shadow: var(--shadow-glow); }
.btn-primary:hover { box-shadow: 0 12px 36px rgba(236,72,153,0.35); transform: translateY(-1px); }
.btn-outline { background: transparent; border: 1.5px solid rgba(167,143,250,0.4); color: var(--text); }
.btn-outline:hover { border-color: var(--violet-light); background: rgba(124,58,237,0.1); }
.btn-success { background: linear-gradient(135deg,#22C55E,#4ADE80); color: #063014; }
.btn-danger { background: linear-gradient(135deg,#E11D48,#FB7185); color: white; }
.btn-sm { padding: 8px 16px; font-size: 13px; border-radius: 10px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---------- Cards ---------- */
.card {
    background: var(--gradient-card);
    border: 1px solid rgba(167,143,250,0.12);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.25);
}

.event-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
    gap: 20px;
}

.event-card {
    background: var(--gradient-card);
    border-radius: var(--radius);
    padding: 22px;
    border: 1px solid rgba(167,143,250,0.12);
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.event-card::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; height: 4px;
    background: var(--gradient-main);
}
.event-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-glow); }

.event-emoji { font-size: 40px; margin-bottom: 10px; display: block; }
.event-title { font-size: 18px; font-weight: 700; margin-bottom: 6px; }
.event-meta { color: var(--text-muted); font-size: 13px; margin-bottom: 4px; display: flex; align-items: center; gap: 6px; }
.event-desc { color: var(--text-muted); font-size: 13.5px; margin: 12px 0; line-height: 1.5; }

.status-pill {
    display: inline-block;
    font-size: 11px; font-weight: 700;
    padding: 4px 12px; border-radius: 20px;
    text-transform: uppercase;
}
.status-pendiente { background: rgba(250,204,21,0.15); color: var(--yellow); }
.status-aprobado { background: rgba(34,197,94,0.15); color: var(--green); }
.status-rechazado { background: rgba(225,29,72,0.15); color: #FB7185; }
.status-en_vivo { background: rgba(236,72,153,0.2); color: var(--pink); animation: pulse 1.5s infinite; }
.status-finalizado { background: rgba(59,130,246,0.15); color: var(--blue); }

@keyframes pulse { 0%,100%{opacity:1;} 50%{opacity:0.55;} }

/* ---------- Forms ---------- */
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 8px; color: var(--text-muted); }
.form-control {
    width: 100%;
    padding: 13px 16px;
    border-radius: 12px;
    border: 1.5px solid rgba(167,143,250,0.2);
    background: rgba(15,11,30,0.5);
    color: var(--text);
    font-size: 14.5px;
    outline: none;
    transition: border-color 0.15s ease;
}
.form-control:focus { border-color: var(--violet-light); }
textarea.form-control { resize: vertical; min-height: 90px; }

.auth-wrap {
    max-width: 420px; margin: 60px auto; padding: 20px;
}
.auth-card { padding: 36px 30px; }
.auth-title { font-size: 26px; font-weight: 800; margin-bottom: 6px; text-align: center; }
.auth-sub { text-align: center; color: var(--text-muted); font-size: 14px; margin-bottom: 28px; }
.auth-switch { text-align: center; margin-top: 20px; font-size: 14px; color: var(--text-muted); }
.auth-switch a { color: var(--violet-light); font-weight: 600; }

.role-picker { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.role-option {
    border: 1.5px solid rgba(167,143,250,0.2);
    border-radius: 12px; padding: 14px; text-align: center; cursor: pointer;
    transition: all 0.15s ease;
}
.role-option input { display: none; }
.role-option.selected { border-color: var(--violet-light); background: rgba(124,58,237,0.15); }
.role-option .emoji { font-size: 24px; display: block; margin-bottom: 4px; }
.role-option .label { font-weight: 600; font-size: 13px; }

/* ---------- Keyword game ---------- */
.timer-ring {
    width: 140px; height: 140px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 20px;
    background: conic-gradient(var(--pink) calc(var(--pct,100) * 1%), rgba(255,255,255,0.08) 0);
    position: relative;
}
.timer-ring::before {
    content: ''; position: absolute; inset: 8px; border-radius: 50%; background: var(--dark-2);
}
.timer-number { position: relative; font-size: 40px; font-weight: 800; z-index: 1; }

.keyword-box { text-align: center; padding: 20px 0; }
.chance-count {
    display: inline-flex; align-items: center; gap: 8px;
    background: rgba(250,204,21,0.15); color: var(--yellow);
    padding: 8px 18px; border-radius: 20px; font-weight: 700; font-size: 14px;
    margin-top: 12px;
}

.alert {
    padding: 14px 18px; border-radius: 12px; margin-bottom: 20px; font-size: 14px; font-weight: 500;
}
.alert-success { background: rgba(34,197,94,0.15); color: #4ADE80; border: 1px solid rgba(34,197,94,0.3); }
.alert-error { background: rgba(225,29,72,0.15); color: #FB7185; border: 1px solid rgba(225,29,72,0.3); }
.alert-info { background: rgba(59,130,246,0.15); color: #60A5FA; border: 1px solid rgba(59,130,246,0.3); }
.alert-warning { background: rgba(250,204,21,0.15); color: var(--yellow); border: 1px solid rgba(250,204,21,0.3); }

.section-title { font-size: 20px; font-weight: 700; margin: 30px 0 16px; display: flex; align-items: center; gap: 8px; }

.table-modern { width: 100%; border-collapse: collapse; }
.table-modern th {
    text-align: left; padding: 12px 14px; font-size: 12px; text-transform: uppercase;
    color: var(--text-muted); border-bottom: 1px solid rgba(167,143,250,0.15);
}
.table-modern td { padding: 14px; border-bottom: 1px solid rgba(167,143,250,0.08); font-size: 14px; }
.table-modern tr:hover { background: rgba(124,58,237,0.06); }

.empty-state { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.empty-state .emoji { font-size: 50px; display: block; margin-bottom: 14px; }

.kw-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.kw-index {
    width: 28px; height: 28px; border-radius: 50%; background: var(--gradient-main);
    display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; flex-shrink: 0;
}

.winner-card {
    background: linear-gradient(135deg, rgba(250,204,21,0.15), rgba(236,72,153,0.1));
    border: 1px solid rgba(250,204,21,0.3);
    border-radius: 16px;
    padding: 18px; text-align: center;
}
.winner-card .trophy { font-size: 34px; }

.tabs { display: flex; gap: 8px; margin-bottom: 24px; flex-wrap: wrap; }
.tab-link {
    padding: 10px 18px; border-radius: 12px; font-size: 13.5px; font-weight: 600;
    background: rgba(167,143,250,0.08); color: var(--text-muted);
    display: inline-flex; align-items: center; gap: 7px;
}
.tab-link.active { background: var(--gradient-main); color: white; }
.tab-count {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px;
    background: var(--red); color: white; font-size: 11px; font-weight: 800;
}
.tab-link.active .tab-count { background: rgba(255,255,255,0.3); }
.btn-badge {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
    background: var(--red); color: white; font-size: 10.5px; font-weight: 800;
    margin-left: 6px; vertical-align: middle;
}

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 700px) { .grid-2 { grid-template-columns: 1fr; } }

/* ---------- Hero banner (visitantes) ---------- */
.hero-banner {
    text-align: center;
    padding: 56px 24px;
    border-radius: 28px;
    background: var(--gradient-card);
    border: 1px solid rgba(167,143,250,0.15);
    position: relative;
    overflow: hidden;
    margin-bottom: 36px;
}
.hero-banner::before {
    content: '';
    position: absolute; inset: 0;
    background: radial-gradient(circle at 20% 20%, rgba(124,58,237,0.25), transparent 45%),
                radial-gradient(circle at 80% 30%, rgba(236,72,153,0.2), transparent 45%),
                radial-gradient(circle at 50% 100%, rgba(251,146,60,0.15), transparent 45%);
    pointer-events: none;
}
.hero-emoji { font-size: 48px; margin-bottom: 14px; position: relative; }
.hero-title {
    font-size: 32px; font-weight: 800; max-width: 640px; margin: 0 auto 14px;
    position: relative; line-height: 1.25;
    background: linear-gradient(135deg, #fff, #E9D5FF);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub { color: var(--text-muted); max-width: 520px; margin: 0 auto 28px; font-size: 15px; position: relative; }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; position: relative; }
@media (max-width: 600px) { .hero-title { font-size: 24px; } }

/* ---------- Demo interactiva ---------- */
.demo-banner {
    text-align: center; padding: 10px 16px; border-radius: 12px;
    background: rgba(250,204,21,0.12); border: 1px solid rgba(250,204,21,0.3);
    color: var(--yellow); font-size: 13px; font-weight: 600; margin-bottom: 24px;
}
.demo-section { margin: 56px 0; }
.demo-section-head { text-align: center; margin-bottom: 24px; }
.demo-section-title { font-size: 26px; font-weight: 800; margin-bottom: 8px; }
.demo-section-sub { color: var(--text-muted); font-size: 14.5px; max-width: 480px; margin: 0 auto; }
.demo-badge {
    display: inline-block; font-size: 11px; font-weight: 700; padding: 3px 10px;
    border-radius: 20px; background: rgba(59,130,246,0.15); color: #60A5FA; margin-bottom: 10px;
    text-transform: uppercase; letter-spacing: 0.5px;
}
.demo-toast, .app-toast {
    position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px);
    background: var(--gradient-card); border: 1px solid rgba(167,143,250,0.3);
    padding: 14px 24px; border-radius: 14px; font-weight: 600; font-size: 14px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.4); opacity: 0; pointer-events: none;
    transition: all 0.3s ease; z-index: 999; max-width: 90vw; text-align: center;
}
.demo-toast { white-space: nowrap; }
.demo-toast.show, .app-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.app-toast.error { border-color: rgba(225,29,72,0.4); background: linear-gradient(160deg, rgba(225,29,72,0.18), var(--dark-2)); }
.app-toast.success { border-color: rgba(34,197,94,0.4); background: linear-gradient(160deg, rgba(34,197,94,0.15), var(--dark-2)); }

/* ---------- Sorteo de números: hero del premio ---------- */
.raffle-hero {
    position: relative;
    text-align: center;
    padding: 40px 24px 32px;
    border-radius: 24px;
    background: var(--gradient-card);
    border: 1px solid rgba(167,143,250,0.15);
    overflow: hidden;
    margin-bottom: 22px;
}
.raffle-hero::before {
    content: '';
    position: absolute; inset: 0;
    background: radial-gradient(circle at 15% 20%, rgba(250,204,21,0.18), transparent 45%),
                radial-gradient(circle at 85% 15%, rgba(236,72,153,0.2), transparent 45%),
                radial-gradient(circle at 50% 100%, rgba(124,58,237,0.2), transparent 50%);
    pointer-events: none;
}
.raffle-hero-emoji {
    font-size: 52px; position: relative;
    display: inline-block; animation: raffleFloat 3s ease-in-out infinite;
}
@keyframes raffleFloat { 0%,100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-8px) rotate(3deg); } }
.raffle-hero-title { font-size: 26px; font-weight: 800; margin: 10px 0 4px; position: relative; }
.raffle-hero-meta { color: var(--text-muted); font-size: 13.5px; position: relative; }
.raffle-hero-stats {
    display: flex; justify-content: center; gap: 28px; margin-top: 20px; position: relative; flex-wrap: wrap;
}
.raffle-hero-stat { text-align: center; }
.raffle-hero-stat .num { font-size: 22px; font-weight: 800; }
.raffle-hero-stat .lbl { font-size: 10.5px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }

/* ---------- Barra de progreso de ventas ---------- */
.raffle-progress-wrap { margin: 18px 0 22px; }
.raffle-progress-labels { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-muted); margin-bottom: 6px; }
.raffle-progress-track {
    height: 14px; border-radius: 20px; background: rgba(255,255,255,0.06);
    overflow: hidden; position: relative; border: 1px solid rgba(167,143,250,0.15);
}
.raffle-progress-fill {
    height: 100%; border-radius: 20px;
    background: linear-gradient(90deg, #7C3AED, #EC4899, #FB923C);
    background-size: 200% 100%;
    animation: raffleShimmer 3s linear infinite;
    transition: width 0.6s cubic-bezier(0.4,0,0.2,1);
    position: relative;
}
@keyframes raffleShimmer { 0% { background-position: 0% 0; } 100% { background-position: 200% 0; } }

/* ---------- Grilla de números: celdas tipo "ticket" ---------- */
.number-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(58px, 100%), 1fr));
    gap: 10px;
}
.number-cell {
    position: relative;
    aspect-ratio: 1;
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 15px;
    border: 2px solid rgba(167,143,250,0.18);
    background: linear-gradient(160deg, rgba(37,28,66,0.6), rgba(15,11,30,0.6));
    color: var(--text);
    cursor: pointer;
    transition: transform 0.15s cubic-bezier(0.34,1.56,0.64,1), border-color 0.15s ease, box-shadow 0.15s ease;
    user-select: none;
    overflow: hidden;
}
.number-cell::after {
    content: '';
    position: absolute; inset: 0; border-radius: 12px;
    background: linear-gradient(160deg, rgba(255,255,255,0.08), transparent 60%);
    pointer-events: none;
}
.number-cell:hover:not(.taken):not(.mine):not(.confirmed-mine) {
    border-color: var(--violet-light);
    transform: translateY(-3px) scale(1.06);
    box-shadow: 0 8px 20px rgba(124,58,237,0.35);
}
.number-cell.taken {
    background: rgba(167,143,250,0.05); color: var(--text-muted);
    cursor: not-allowed; opacity: 0.45; border-style: dashed;
}
.number-cell.taken .cell-lock { font-size: 11px; position: absolute; bottom: 4px; opacity: 0.7; }
.number-cell.mine {
    background: linear-gradient(160deg, rgba(250,204,21,0.28), rgba(250,204,21,0.1));
    border-color: var(--yellow); color: var(--yellow);
    animation: cellPulse 1.4s ease-in-out infinite;
    box-shadow: 0 0 0 0 rgba(250,204,21,0.5);
}
@keyframes cellPulse {
    0%,100% { box-shadow: 0 0 0 0 rgba(250,204,21,0.35); }
    50% { box-shadow: 0 0 0 8px rgba(250,204,21,0); }
}
.number-cell.confirmed-mine {
    background: linear-gradient(160deg, rgba(34,197,94,0.3), rgba(34,197,94,0.12));
    border-color: var(--green); color: var(--green);
    animation: cellBounceIn 0.4s cubic-bezier(0.34,1.56,0.64,1);
}
.number-cell.confirmed-mine .cell-check {
    position: absolute; top: -6px; right: -6px; background: var(--green);
    color: #063014; width: 18px; height: 18px; border-radius: 50%;
    font-size: 11px; display: flex; align-items: center; justify-content: center; font-weight: 900;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}
@keyframes cellBounceIn { 0% { transform: scale(0.5); opacity: 0; } 60% { transform: scale(1.15); } 100% { transform: scale(1); opacity: 1; } }

.number-legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-muted); margin-bottom: 18px; }
.number-legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend-dot { width: 14px; height: 14px; border-radius: 5px; display: inline-block; }

/* ---------- Carrito flotante ---------- */
.raffle-cart-float {
    position: sticky; bottom: 16px; margin-top: 24px;
    padding: 18px 20px; border-radius: 18px;
    background: linear-gradient(135deg, rgba(250,204,21,0.18), rgba(236,72,153,0.12));
    border: 1.5px solid rgba(250,204,21,0.4);
    backdrop-filter: blur(12px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.4);
    animation: cartSlideUp 0.3s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes cartSlideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.raffle-cart-float .cart-icon { font-size: 26px; }

/* ---------- Confeti ---------- */
.confetti-piece {
    position: fixed; top: -20px; width: 10px; height: 10px; z-index: 9999;
    pointer-events: none; border-radius: 2px;
    animation: confettiFall linear forwards;
}
@keyframes confettiFall {
    to { transform: translateY(110vh) rotate(720deg); opacity: 0.3; }
}

/* ---------- Menú superior en móviles ---------- */
@media (max-width: 900px) {
    .table-modern { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }

    .topbar { padding: 12px 16px; }
    .logo { font-size: 18px; }

    .mobile-menu-btn { display: flex; }
    .topbar-actions { width: 100%; justify-content: space-between; }

    /* En desktop nav-user vive junto a la campanita en .topbar-actions.
       En mobile se convierte en un panel desplegable a todo el ancho.
       OJO: esto es solo para el menú de usuario logueado (#navUserMenu),
       que tiene botón hamburguesa para abrirlo. El de invitados (sin
       hamburguesa) se maneja aparte más abajo, si no quedaría oculto
       para siempre. */
    #navUserMenu {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        margin-top: 10px;
        padding-top: 10px;
        border-top: 1px solid rgba(167,143,250,0.15);
    }
    #navUserMenu.open { display: flex; }
    #navUserMenu .btn {
        width: 100%;
        justify-content: flex-start;
    }
    #navUserMenu .badge { align-self: flex-start; }
    #navUserMenu .avatar { align-self: flex-start; }

    /* Menú de invitados (sin login): no se oculta, pero debe poder usar
       todo el ancho disponible para que sus 3 botones envuelvan en vez
       de desbordar hacia la derecha. */
    .nav-user-guest {
        width: 100%;
        justify-content: flex-start;
    }

    /* La campanita y el botón hamburguesa quedan siempre visibles arriba */
    .topbar-right { flex-shrink: 0; }
}

/* Red de seguridad: ningún elemento de la página debería poder generar
   scroll horizontal, sea cual sea la causa. */
html, body { max-width: 100%; overflow-x: hidden; }

/* Pantallas muy angostas: achicar un poco más los botones sueltos (invitado) */
@media (max-width: 420px) {
    .topbar .btn-sm { padding: 8px 12px; font-size: 12.5px; }
}
