/**
 * Legal / info pages — hero, cards, and readable long-form content.
 */

.legal-page {
    padding: 18px 0 36px;
}

.legal-page__article {
    display: grid;
    gap: 16px;
}

.legal-page__hero {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 14px 16px;
    align-items: start;
    padding: 18px 18px 16px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background:
        radial-gradient(circle at top right, rgba(56, 189, 248, 0.14), transparent 42%),
        linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.92));
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
}

.legal-page__hero-icon {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
}

.legal-page__hero-icon svg {
    width: 24px;
    height: 24px;
}

.legal-page__eyebrow {
    margin: 0 0 6px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #7dd3fc;
}

.legal-page__title {
    margin: 0 0 8px;
    font-size: clamp(1.45rem, 4vw, 1.85rem);
    line-height: 1.2;
    font-weight: 800;
    color: #f8fafc;
}

.legal-page__subtitle {
    margin: 0 0 8px;
    font-size: 0.92rem;
    line-height: 1.55;
    color: #cbd5e1;
}

.spin-welcome .legal-contact-cards {
    margin-top: 16px;
}

.spin-welcome .legal-contact-card {
    background: #f3faf6;
    box-shadow: none;
}

.spin-welcome .legal-page__meta {
    margin-top: 14px;
}

.legal-contact-cards {
    display: grid;
    gap: 10px;
}

.legal-contact-card {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: #ffffff;
    color: inherit;
    text-decoration: none;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.legal-contact-card:hover,
.legal-contact-card:focus-visible {
    transform: translateY(-1px);
    border-color: rgba(56, 189, 248, 0.35);
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.1);
}

.legal-contact-card__icon {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.12), rgba(16, 185, 129, 0.12));
    color: var(--color-primary);
}

.legal-contact-card__body {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.legal-contact-card__label {
    font-size: 0.92rem;
    line-height: 1.3;
    color: #0f172a;
}

.legal-contact-card__text {
    font-size: 0.82rem;
    line-height: 1.45;
    color: #64748b;
}

.legal-page__card {
    padding: 20px 18px 22px;
    border-radius: 18px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: #ffffff;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.06);
}

.legal-page__content {
    color: #334155;
    font-size: 0.94rem;
    line-height: 1.75;
}

.legal-page__content > *:first-child {
    margin-top: 0;
}

.legal-page__content h2 {
    margin: 1.6em 0 0.65em;
    font-size: 1.08rem;
    line-height: 1.35;
    font-weight: 800;
    color: #0f172a;
}

.legal-page__content h3 {
    margin: 0 0 6px;
    font-size: 0.98rem;
    font-weight: 800;
    color: #0f172a;
}

.legal-page__content p,
.legal-page__content ul,
.legal-page__content ol {
    margin: 0 0 1em;
}

.legal-page__content ul,
.legal-page__content ol {
    padding-left: 1.2rem;
}

.legal-page__content li + li {
    margin-top: 0.35em;
}

.legal-page__content a {
    color: var(--color-primary);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.legal-callout {
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid rgba(37, 99, 235, 0.16);
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(14, 165, 233, 0.06));
}

.legal-callout--warning {
    border-color: rgba(245, 158, 11, 0.28);
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(251, 191, 36, 0.08));
}

.legal-callout p:last-child {
    margin-bottom: 0;
}

.legal-feature-grid {
    display: grid;
    gap: 12px;
    margin: 1.25em 0 1.5em;
}

.legal-feature-card {
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: #f8fafc;
}

.legal-feature-card p:last-child {
    margin-bottom: 0;
}

body.light-mode .legal-page__hero {
    border-color: rgba(15, 23, 42, 0.08);
    background:
        radial-gradient(circle at top right, rgba(56, 189, 248, 0.16), transparent 42%),
        linear-gradient(135deg, #ffffff, #f8fafc);
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.06);
}

body.light-mode .legal-page__title {
    color: #0f172a;
}

body.light-mode .legal-page__subtitle {
    color: #475569;
}

body.light-mode .legal-page__hero-icon {
    background: rgba(37, 99, 235, 0.08);
    color: var(--color-primary);
}

@media (min-width: 640px) {
    .legal-contact-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .legal-feature-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .legal-page__card {
        padding: 24px 26px 28px;
    }
}

body.directory-legal,
body.directory-legal.light-mode.atlas-mobile-first,
body.directory-legal .site-app-shell,
body.directory-legal .site-main.legal-page {
    background: #e7f2ea;
    color: #12261c;
}

body.directory-legal .site-app-shell {
    width: 100%;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
}

body.directory-legal .site-header,
body.directory-legal .hero-top-nav {
    display: none !important;
}

body.directory-legal .legal-page {
    padding: 8px 0 32px;
}

.legal-top {
    display: flex;
    align-items: center;
    min-height: 64px;
}

.legal-top__brand {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    color: #12261c;
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    text-decoration: none;
}

.legal-top__brand img {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    object-fit: cover;
}

.legal-nav {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
    gap: 4px;
    margin-bottom: 14px;
    padding: 8px;
    border: 1px solid #9fb8a8;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 8px 18px rgba(18, 48, 32, 0.05);
}

.legal-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-height: 62px;
    padding: 6px 2px;
    border-radius: 14px;
    color: #111827;
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1.15;
    text-align: center;
    text-decoration: none;
}

.legal-nav a.is-active {
    background: #e8f6ee;
    color: #198754;
}

.legal-nav svg {
    width: 20px;
    height: 20px;
}

body.directory-legal.light-mode .legal-page__hero,
body.directory-legal .legal-page__hero {
    border: 1px solid #9fb8a8;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 8px 18px rgba(18, 48, 32, 0.05);
}

body.directory-legal.light-mode .legal-page__title,
body.directory-legal .legal-page__title {
    color: #198754;
}

body.directory-legal.light-mode .legal-page__subtitle,
body.directory-legal .legal-page__subtitle,
body.directory-legal .legal-page__meta {
    color: #4b5563;
}

body.directory-legal .legal-page__eyebrow {
    color: #1b6b3a;
}

body.directory-legal.light-mode .legal-page__hero-icon,
body.directory-legal .legal-page__hero-icon {
    background: #e8f6ee;
    color: #1b6b3a;
}

body.directory-legal .legal-page__card,
body.directory-legal .legal-contact-card {
    border: 1px solid #9fb8a8;
    border-radius: 22px;
    box-shadow: 0 8px 18px rgba(18, 48, 32, 0.05);
}

body.directory-legal .legal-page__content,
body.directory-legal .legal-contact-card__text {
    color: #4b5563;
}

body.directory-legal .legal-page__content h2,
body.directory-legal .legal-page__content h3,
body.directory-legal .legal-contact-card__label {
    color: #111827;
}

body.directory-legal .legal-page__content a {
    color: #1b6b3a;
}

body.directory-legal .legal-feature-card {
    border: 1px solid #c5d9cc;
    border-radius: 16px;
    background: #f3faf6;
}

body.directory-legal .legal-callout--warning {
    border: 0;
    border-radius: 16px;
    background: #fff8e8;
    color: #3f3f46;
}

body.directory-legal .legal-contact-card__icon {
    background: #e8f6ee;
    color: #1b6b3a;
}

@media (min-width: 960px) {
    body.directory-legal,
    body.directory-legal.light-mode.atlas-mobile-first,
    body.directory-legal .site-app-shell,
    body.directory-legal .site-main.legal-page {
        background: #e7f2ea;
        color: #12261c;
    }

    body.directory-legal .site-app-shell {
        width: min(100%, 1120px);
        margin: 0 auto;
        border-radius: 0;
        box-shadow: none;
        min-height: 100dvh;
    }

    .legal-top__brand {
        color: #111111;
        font-size: 1.7rem;
    }

    body.directory-legal .legal-nav,
    body.directory-legal .legal-page__card,
    body.directory-legal .legal-contact-card,
    body.directory-legal .legal-app {
        border: 1px solid #9fb8a8;
        box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
    }
}

.legal-crumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 14px;
    color: #4d6156;
    font-size: 0.85rem;
    font-weight: 700;
}

.legal-crumb a {
    color: #145c38;
    text-decoration: none;
}

.legal-page__hero:not(:has(.legal-page__hero-icon)) {
    grid-template-columns: minmax(0, 1fr);
}

.legal-apps {
    display: grid;
    gap: 10px;
    margin-top: 8px;
}

.legal-app {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 12px;
    border-radius: 16px;
    border: 1px solid #c5d9cc;
    background: #f7faf8;
    color: #111827;
    text-decoration: none;
}

.legal-app__icon,
.legal-app__icon img {
    width: 56px;
    height: 56px;
    border-radius: 14px;
}

.legal-app__icon {
    display: grid;
    place-items: center;
    overflow: hidden;
    background: #e8f6ee;
    color: #1b6b3a;
    font-weight: 800;
}

.legal-app__icon img {
    object-fit: cover;
}

.legal-app__body {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.legal-app__name {
    font-size: 1rem;
    font-weight: 800;
}

.legal-app__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 10px;
    color: #4b5563;
    font-size: 0.82rem;
    font-weight: 700;
}

@media (min-width: 960px) {
    .legal-crumb,
    .legal-crumb a {
        color: #4b5563;
    }

    .legal-crumb a {
        color: #1b6b3a;
    }
}

@media (min-width: 769px) {
    .legal-page {
        padding: 24px 0 48px;
    }

    .legal-page__article {
        gap: 18px;
    }

    .legal-page__hero {
        grid-template-columns: 64px minmax(0, 1fr);
        padding: 22px 24px;
    }

    .legal-page__hero-icon {
        width: 64px;
        height: 64px;
    }
}

.games-hero .cmd-search {
    margin-top: 16px;
}

.games-hero h1 {
    margin: 0;
    color: #12261c;
    font-size: clamp(1.8rem, 6vw, 2.4rem);
    letter-spacing: -0.03em;
}

.games-hero p,
.games-panel__head p {
    margin: 8px 0 0;
    color: #3e5248;
    line-height: 1.5;
}

body.dark-mode .games-hero h1 {
    color: #f4fff8;
}

body.dark-mode .games-hero p {
    color: #d5eadc;
}

.games-panel,
.games-block,
.games-notice {
    margin-top: 14px;
    padding: 16px;
    border-radius: 22px;
    background: #ffffff;
    color: #111827;
}

.games-panel__head h2,
.games-block h2,
.games-notice h2,
.legal-feature-card h3 {
    margin: 0 0 8px;
    color: #111827;
    font-size: 1.15rem;
}

.games-panel__head p {
    color: #4b5563;
}

.games-block p,
.games-notice p,
.games-faq p,
.legal-feature-card p {
    margin: 0 0 10px;
    color: #4b5563;
    line-height: 1.6;
}

.games-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.games-filters button {
    min-height: 36px;
    padding: 0 12px;
    border: 1px solid #e6ebf0;
    border-radius: 999px;
    background: #f8faf9;
    color: #374151;
    font: inherit;
    font-size: 0.82rem;
    font-weight: 800;
    cursor: pointer;
}

.games-filters button.is-active {
    border-color: #198754;
    background: #198754;
    color: #ffffff;
}

.games-tools {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 14px 0;
}

.games-search,
.games-sort {
    display: flex;
    align-items: center;
    min-height: 44px;
    border: 1px solid #e6ebf0;
    border-radius: 14px;
    background: #f8faf9;
}

.games-search {
    flex: 1 1 auto;
    gap: 6px;
    min-width: 0;
    padding: 0 12px;
    color: #6b7280;
}

.games-search svg {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
}

.games-search input,
.games-sort select {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: none;
    background: transparent;
    color: #111827;
    font: inherit;
    font-weight: 700;
}

.games-sort {
    flex: 0 0 92px;
    width: 92px;
    padding: 0 8px;
}

.games-sort select {
    font-size: 0.86rem;
}

.games-list {
    display: grid;
    gap: 10px;
}

.games-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 10px;
    border-radius: 16px;
    background: #f3faf6;
}

.games-row[hidden],
.games-empty[hidden] {
    display: none !important;
}

.games-row__main {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    min-width: 0;
    color: inherit;
    text-decoration: none;
}

.games-row__icon,
.games-row__icon img {
    width: 72px;
    height: 72px;
    border-radius: 18px;
}

.games-row__icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
    background: #123524;
    color: #e4b15a;
    font-weight: 800;
}

.games-row__rank {
    position: absolute;
    top: -8px;
    left: -8px;
    z-index: 2;
    padding: 2px 7px;
    border-radius: 8px;
    background: var(--allyono-rank-badge, #e11d2e);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 800;
    line-height: 1.3;
}

.games-row__icon img {
    object-fit: cover;
}

.games-row__copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.games-row__copy strong {
    color: #111827;
    font-size: 0.98rem;
}

.games-row__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 8px;
    color: #6b7280;
    font-size: 0.75rem;
    font-weight: 700;
}

.games-row__bonus {
    color: #15803d;
    font-size: 0.78rem;
    font-weight: 800;
}

.games-row__min {
    color: #475569;
    font-size: 0.78rem;
    font-weight: 700;
}

.games-stars {
    position: relative;
    display: inline-block;
    width: max-content;
    margin-top: 2px;
    color: #e5e7eb;
    font-size: 0.78rem;
    letter-spacing: 1px;
    line-height: 1;
}

.games-stars__fill {
    position: absolute;
    top: 0;
    left: 0;
    width: var(--star-fill, 0%);
    overflow: hidden;
    color: #f5b400;
    white-space: nowrap;
}

.games-row__download {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0 12px;
    border-radius: 10px;
    background: #198754;
    color: #ffffff;
    font-size: 0.82rem;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
}

.games-empty {
    margin: 12px 0 0;
    color: #4b5563;
    font-weight: 700;
    text-align: center;
}

.games-steps {
    margin: 8px 0 0;
    padding: 0;
    list-style: none;
    counter-reset: games-step;
}

.games-steps li {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-top: 10px;
    color: #4b5563;
    line-height: 1.5;
}

.games-steps li::before {
    counter-increment: games-step;
    content: counter(games-step);
    display: inline-flex;
    flex: 0 0 24px;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 999px;
    background: #e8f6ee;
    color: #198754;
    font-size: 0.78rem;
    font-weight: 800;
}

.games-why {
    grid-template-columns: 1fr;
}

.games-faq {
    display: grid;
    gap: 8px;
    margin-top: 4px;
}

.games-faq details {
    border: 1px solid #e6ebf0;
    border-radius: 14px;
    background: #f8faf9;
}

.games-faq summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    color: #111827;
    font-weight: 800;
    line-height: 1.4;
    list-style: none;
    cursor: pointer;
}

.games-faq summary::-webkit-details-marker {
    display: none;
}

.games-faq summary::after {
    content: "";
    width: 8px;
    height: 8px;
    border-right: 2px solid #198754;
    border-bottom: 2px solid #198754;
    transform: rotate(45deg);
    flex: 0 0 auto;
}

.games-faq details[open] {
    background: #ffffff;
}

.games-faq details[open] summary::after {
    transform: rotate(-135deg);
}

.games-faq details p {
    margin: 0;
    padding: 0 16px 14px;
}

.games-notice {
    background: #fff8e8;
}

.games-notice h2 {
    color: #8a5a00;
}

.games-notice a {
    color: #8a6428;
    font-weight: 800;
}

.games-copy {
    margin: 14px 0 0;
    color: #3e5248;
    font-size: 0.82rem;
    font-weight: 700;
    text-align: center;
}

body.dark-mode .games-copy {
    color: #d5eadc;
}

@media (min-width: 720px) {
    .games-why {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 960px) {
    .games-hero h1 {
        color: #111827;
    }

    .games-hero p {
        color: #4b5563;
    }

    .games-panel,
    .games-block {
        border: 1px solid #eef1ef;
        box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
    }

    .games-notice {
        border: 1px solid #f0d48a;
    }

    .games-copy {
        color: #6b7280;
    }

    body.dark-mode .games-hero h1 {
        color: #f4fff8;
    }

    body.dark-mode .games-hero p,
    body.dark-mode .games-copy {
        color: #d5eadc;
    }

    .games-why {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}


/* allyono-games-count */
.games-empty {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.games-empty button {
    border: 1px solid #198754;
    border-radius: 999px;
    background: #ffffff;
    color: #146c43;
    min-height: 32px;
    padding: 0 12px;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}
