.memorama-sub {
    margin: 0 0 1rem;
    font-size: 0.88rem;
    color: #3c4043;
}

body.ps-hub.memorama-hub.dark-mode .memorama-sub {
    color: #9aa0a6;
}

body.ps-hub.memorama-hub.dark-mode .memorama-end {
    background: #292a2d;
}

body.ps-hub.memorama-hub.dark-mode .memorama-mode {
    background: #292a2d;
    border-color: #3c4043;
    color: #e8eaed;
}

body.ps-hub.memorama-hub.dark-mode .memorama-btn {
    background: #292a2d;
    border-color: #3c4043;
    color: #e8eaed;
}

.memorama-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-bottom: 0.75rem;
}

.memorama-mode {
    flex: 1;
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    border-radius: 999px;
    padding: 0.45rem 0.5rem;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
}

.memorama-mode.is-active {
    background: #0f766e;
    border-color: #0f766e;
    color: #fff;
}

a.memorama-mode--link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: inherit;
    text-align: center;
}

.memorama-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem 1rem;
    font-size: 0.82rem;
    font-weight: 700;
    margin-bottom: 0.65rem;
    color: #3c4043;
}

.memorama-mio-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

body.ps-hub.memorama-hub.memorama-mode-daily .memorama-turn-row,
body.ps-hub.memorama-hub.memorama-mode-daily #memoramaTurnRow {
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    visibility: hidden !important;
}

#memoramaTurnRow[hidden] {
    display: none !important;
}

.memorama-mio-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.memorama-mio-label {
    font-size: 0.82rem;
    font-weight: 800;
    color: #0f766e;
}

.memorama-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(72px, 1fr));
    gap: 0.45rem;
    width: 100%;
    max-width: 100%;
}

body.memorama-hub .memorama-card {
    display: block;
    width: 100%;
    aspect-ratio: 1;
    min-height: 72px;
    min-width: 0;
    border: 0;
    border-radius: 10px;
    padding: 0;
    margin: 0;
    cursor: pointer;
    background: transparent;
    position: relative;
    overflow: hidden;
    font: inherit;
    -webkit-appearance: none;
    appearance: none;
}

body.memorama-hub .memorama-card:disabled {
    cursor: default;
    opacity: 0.85;
}

body.memorama-hub .memorama-card__inner {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 72px;
    position: relative;
}

body.memorama-hub .memorama-card__face {
    position: absolute;
    inset: 0;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0.35rem 0.25rem;
    box-sizing: border-box;
}

body.memorama-hub .memorama-card__back {
    background: linear-gradient(145deg, #0f766e, #134e4a);
    color: #fff;
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1;
}

body.memorama-hub .memorama-card__front {
    display: none;
    background: #fff;
    border: 2px solid #99f6e4;
    color: #202124;
}

body.memorama-hub .memorama-card.is-flipped .memorama-card__back,
body.memorama-hub .memorama-card.is-matched .memorama-card__back {
    display: none;
}

body.memorama-hub .memorama-card.is-flipped .memorama-card__front,
body.memorama-hub .memorama-card.is-matched .memorama-card__front {
    display: flex;
}

body.memorama-hub.dark-mode .memorama-card__front {
    background: #292a2d;
    border-color: #0f766e;
    color: #e8eaed;
}

.memorama-card__word {
    font-size: clamp(0.62rem, 2.8vw, 0.82rem);
    font-weight: 800;
    line-height: 1.15;
    word-break: break-word;
    hyphens: auto;
}

.memorama-card__country {
    margin-top: 0.15rem;
    font-size: clamp(0.55rem, 2.4vw, 0.68rem);
    font-weight: 600;
    color: #64748b;
}

.memorama-card.is-matched .memorama-card__front {
    border-color: #22c55e;
    background: #ecfdf5;
}

.memorama-end {
    margin-top: 1rem;
    padding: 0.85rem;
    background: #f8fafc;
    border-radius: 12px;
    text-align: center;
}

.memorama-end h2 {
    margin: 0 0 0.35rem;
    font-size: 1.1rem;
}

.memorama-wa {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    margin: 0.65rem 0 0.45rem;
    padding: 0.55rem 1rem;
    border-radius: 999px;
    background: #25d366;
    color: #fff !important;
    font-weight: 700;
    font-size: 0.85rem;
    text-decoration: none !important;
}

.memorama-btn {
    display: block;
    width: 100%;
    margin-top: 0.35rem;
    padding: 0.5rem;
    border-radius: 999px;
    border: 1px solid #cbd5e1;
    background: #fff;
    font-weight: 700;
    cursor: pointer;
}

/* Cómo se juega — same collapsible pattern as billar.php */
body.ps-hub.memorama-hub .memorama-how.billar-how {
    margin: 0 0 0.75rem;
    max-width: 100%;
    width: 100%;
}

body.ps-hub.memorama-hub .billar-how--collapsible {
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #fff;
    overflow: hidden;
}

body.ps-hub.memorama-hub.dark-mode .billar-how--collapsible {
    background: #202124;
    border-color: #3c4043;
}

body.ps-hub.memorama-hub .billar-how--collapsible > .billar-how__box {
    border: 0 !important;
    border-radius: 0;
    border-top: 1px solid #e5e7eb !important;
    background: #f8f9fa;
}

body.ps-hub.memorama-hub.dark-mode .billar-how--collapsible > .billar-how__box {
    border-top-color: #3c4043;
    background: #292a2d;
}

body.ps-hub.memorama-hub .billar-how--collapsible > .billar-how__title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.85rem 1rem;
    cursor: pointer;
    list-style: none;
    user-select: none;
    margin: 0;
}

body.ps-hub.memorama-hub .billar-how--collapsible > .billar-how__title::-webkit-details-marker {
    display: none;
}

body.ps-hub.memorama-hub .billar-how--collapsible > .billar-how__title::after {
    content: '';
    flex-shrink: 0;
    width: 0.45rem;
    height: 0.45rem;
    border-right: 2px solid #3c4043;
    border-bottom: 2px solid #3c4043;
    transform: rotate(45deg);
    transition: transform 0.15s ease;
    margin-top: -0.15rem;
}

body.ps-hub.memorama-hub .billar-how--collapsible[open] > .billar-how__title::after {
    transform: rotate(-135deg);
    margin-top: 0.15rem;
}

body.ps-hub.memorama-hub .billar-how--collapsible > .billar-how__title:hover {
    background: color-mix(in srgb, #0f766e 6%, #fff);
}

body.ps-hub.memorama-hub.dark-mode .billar-how--collapsible > .billar-how__title:hover {
    background: color-mix(in srgb, #0f766e 12%, #202124);
}

body.ps-hub.memorama-hub .billar-how__num {
    background: color-mix(in srgb, #0f766e 14%, #fff) !important;
    color: #0f766e !important;
}

.memorama-yesterday {
    margin-top: 1.25rem;
    font-size: 0.82rem;
}

.memorama-yesterday h2 {
    font-size: 0.95rem;
    margin: 0 0 0.5rem;
}

.memorama-yesterday__list {
    margin: 0;
    padding-left: 1.1rem;
}

.memorama-yesterday__list li {
    margin-bottom: 0.35rem;
}
