*,
*::before,
*::after {
    box-sizing: border-box;
}

:root {
    --bg: #f4f8fc;
    --surface: #ffffff;
    --surface-soft: #eef5fb;
    --surface-tint: #f8fbff;
    --text: #173252;
    --muted: #61758d;
    --border: #d6e3ef;
    --primary: #3579b8;
    --primary-dark: #1d4c7d;
    --accent: #7db5e5;
    --shadow: 0 22px 48px rgba(20, 47, 78, 0.10);
    --radius-xl: 28px;
    --radius-lg: 22px;
    --radius-md: 16px;
    --container: 1240px;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: linear-gradient(180deg, #f8fbff 0%, #eef4fa 100%);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

[hidden] {
    display: none !important;
}

.container {
    width: min(var(--container), calc(100% - 2rem));
    margin: 0 auto;
}

h1,
h2,
h3,
h4 {
    margin-top: 0;
    line-height: 1.12;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4.7rem);
    margin-bottom: 1rem;
    letter-spacing: -0.04em;
}

h2 {
    font-size: clamp(1.8rem, 3vw, 3rem);
    margin-bottom: 0.85rem;
    letter-spacing: -0.03em;
}

h3 {
    font-size: 1.1rem;
    margin-bottom: 0.35rem;
}

p {
    margin: 0 0 1rem;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 300;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(214, 227, 239, 0.95);
}

.site-header-inner {
    min-height: 74px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.site-brand {
    display: inline-flex;
    align-items: center;
    min-width: 0;
}

.site-logo-image {
    height: 50px;
    width: auto;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    min-width: 0;
}

.site-nav a,
.mobile-menu a {
    padding: 0.85rem 1rem;
    border-radius: 999px;
    color: var(--muted);
    font-weight: 700;
}

.site-nav a:hover,
.mobile-menu a:hover {
    background: var(--surface-soft);
    color: var(--primary-dark);
}

.account-nav {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
    justify-content: flex-end;
    margin-left: auto;
}

.account-header-tools {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1rem;
    flex-wrap: nowrap;
}

.account-identity-top {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    flex-wrap: nowrap;
    justify-content: flex-end;
    white-space: nowrap;
}

.account-name {
    color: var(--primary-dark);
    font-weight: 700;
    font-size: 0.98rem;
}

.active-child-pill {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 0.55rem 1rem;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(206, 223, 241, 0.92), rgba(229, 239, 249, 0.98));
    color: var(--primary-dark);
    font-weight: 800;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

.play-as-form {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.7rem 0.95rem;
    border-radius: 999px;
    border: 1px solid rgba(180, 205, 229, 0.82);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(243, 249, 255, 0.96));
    box-shadow: 0 12px 24px rgba(24, 54, 90, 0.08);
}

.play-as-label {
    color: var(--primary-dark);
    font-weight: 900;
    font-size: 0.98rem;
    white-space: nowrap;
}

.play-as-control {
    position: relative;
    min-width: 250px;
}

.play-as-control::after {
    content: '';
    position: absolute;
    right: 1.1rem;
    top: 50%;
    width: 10px;
    height: 10px;
    border-right: 2px solid var(--primary-dark);
    border-bottom: 2px solid var(--primary-dark);
    transform: translateY(-65%) rotate(45deg);
    pointer-events: none;
}

.play-as-select {
    width: 100%;
    min-height: 54px;
    padding: 0.8rem 3rem 0.8rem 1.15rem;
    border-radius: 999px;
    border: 1px solid rgba(180, 205, 229, 0.82);
    background: #fff;
    color: var(--primary-dark);
    font-size: 1rem;
    font-weight: 700;
    appearance: none;
    -webkit-appearance: none;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.play-as-select:focus {
    outline: 3px solid rgba(77, 149, 205, 0.2);
    border-color: rgba(77, 149, 205, 0.8);
}

.site-account-rail {
    position: sticky;
    top: 75px;
    z-index: 290;
    /*background: rgba(255, 255, 255, 0.96);*/
    padding: 0;
    /*backdrop-filter: blur(10px); */
}

.site-account-rail-inner {
    position: relative;
    min-height: 0;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    padding-top: 0;
}

.account-identity-top {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    flex-wrap: nowrap;
    justify-content: flex-end;
    white-space: nowrap;
}

.play-as-form {
    flex-shrink: 0;
}

.account-tab-links {
    position: relative;
    display: flex;
    gap: 0.9rem;
    align-items: flex-start;
    justify-content: flex-end;
    width: 100%;
    padding-top: 0;
}

.account-tab-links::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    border-top: 1px solid rgba(190, 210, 230, 0.95);
}

.account-tab-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    padding: 0.9rem 1.55rem 0.75rem;
    color: var(--primary-dark);
    font-weight: 900;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(245, 249, 255, 0.98));
    border-left: 1px solid rgba(190, 210, 230, 0.95);
    border-right: 1px solid rgba(190, 210, 230, 0.95);
    border-bottom: 1px solid rgba(190, 210, 230, 0.95);
    border-top: 0;
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 16px;
    margin-top: 1px;
    box-shadow: 0 14px 22px rgba(24, 54, 90, 0.08);
    transition: transform 0.18s ease, color 0.18s ease, background 0.18s ease;
}

.account-tab-link:hover {
    transform: translateY(2px);
    background: linear-gradient(180deg, rgba(243, 248, 255, 0.98), rgba(232, 241, 251, 0.98));
}

@media (max-width: 1080px) {
    .account-header-tools {
        gap: 0.75rem;
    }

    .account-name {
        font-size: 0.92rem;
    }

    .play-as-form {
        padding: 0.55rem 0.75rem;
    }

    .play-as-control {
        min-width: 210px;
    }
}

.mobile-nav-toggle {
    display: none;
    border: 0;
    background: var(--primary);
    color: #fff;
    border-radius: 999px;
    padding: 0.8rem 1rem;
    font-weight: 800;
    cursor: pointer;
}

.mobile-menu {
    display: none;
    padding: 0 1rem 1rem;
    border-top: 1px solid var(--border);
    background: #fff;
}

.mobile-menu.is-open {
    display: grid;
    gap: 0.45rem;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    padding: 0.9rem 1.25rem;
    border-radius: 14px;
    border: 1px solid transparent;
    font-weight: 800;
    transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.button:hover {
    transform: translateY(-1px);
}

.button-primary {
    background: linear-gradient(135deg, #4d95cd, #377ab5);
    color: #fff;
}

.button-secondary {
    background: rgba(255, 255, 255, 0.78);
    color: var(--primary-dark);
    border-color: var(--border);
}

.button-small {
    min-height: 40px;
    padding: 0.68rem 1rem;
    border-radius: 999px;
    font-size: 0.94rem;
}

.button-block {
    width: 100%;
}

.portal-hero {
    position: relative;
    overflow: hidden;
    margin-top: -2px;
    padding: 1rem 0 0;
}

.hero-shell {
    position: relative;
    min-height: 560px;
    display: grid;
    grid-template-columns: 290px minmax(0, 1fr);
    gap: 2rem;
    align-items: start;
}

.hero-copy {
    position: relative;
    z-index: 2;
    padding: 2.25rem 0 0;
    width: min(100%, 462px);
    min-width: 0;
}

.plg {
    width: 350px;
    max-width: 100%;
    margin-bottom: 1.2rem;
}

.home-hero-title {
    margin: 0;
    white-space: nowrap;
    font-family: "Trebuchet MS", "Arial Rounded MT Bold", "Comic Sans MS", Arial, sans-serif;
    font-size: clamp(3rem, 5.7vw, 5.35rem);
    font-weight: 900;
    letter-spacing: -0.04em;
    line-height: 0.96;
    color: #2f6fb3;
    -webkit-text-stroke: 2px #ffffff;
    text-shadow:
        0 1px 0 rgba(255, 255, 255, 0.88),
        0 6px 18px rgba(44, 91, 150, 0.14),
        0 1px 0 rgba(27, 53, 100, 0.12);
}

.hero-text {
    max-width: 320px;
    color: var(--muted);
}

.hero-points {
    display: grid;
    gap: 0.55rem;
    padding: 0;
    margin: 0;
    list-style: none;
    max-width: 320px;
}

.hero-points li {
    position: relative;
    padding-left: 1.45rem;
    color: var(--primary-dark);
    font-weight: 600;
}

.hero-points li::before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 0;
    color: #4b94cc;
    font-weight: 800;
}

.hero-image-wrap {
    position: relative;
    min-height: auto;
    overflow: visible;
}

.home-hero-art::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(90deg, rgba(248, 251, 255, 1) 0%, rgba(248, 251, 255, 0.92) 16%, rgba(248, 251, 255, 0) 42%);
}

.hero-art-card {
    position: relative;
    z-index: 0;
    overflow: hidden;
    border-radius: var(--radius-xl);
    border: 1px solid rgba(214, 227, 239, 0.95);
    background: rgba(255, 255, 255, 0.96);
}

.hero-art-card-wide {
    width: 100%;
}

.hero-showcase-image,
.hero-image {
    width: 100%;
    height: auto;
}

.hero-showcase-image-wide {
    min-height: 475px;
    max-height: 475px;
    object-fit: cover;
    object-position: center;
}

.eyebrow {
    display: inline-block;
    margin-bottom: 0.95rem;
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    background: #e7f0f8;
    color: var(--primary-dark);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-overlap {
    position: relative;
    margin-top: -80px;
    z-index: 10;
}

.hero-overlap-card {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.72fr);
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(214, 227, 239, 0.95);
    box-shadow: var(--shadow);
    border-radius: var(--radius-xl);
    overflow: hidden;
}

.topics-area,
.start-here-panel,
.auth-card,
.account-stat-card,
.account-panel,
.account-id-card,
.empty-state,
.badge-card,
.recent-game-card {
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(214, 227, 239, 0.95);
    border-radius: 18px;
    box-shadow: 0 10px 24px rgba(23, 38, 60, 0.05);
}

.topics-area,
.start-here-panel {
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
}

.topics-area {
    padding: 2.2rem;
    min-width: 0;
}

.start-here-panel {
    padding: 2.2rem;
    background: linear-gradient(180deg, #fbfdff 0%, #f4f8fc 100%);
    border-left: 1px solid var(--border);
}

.section-heading {
    max-width: 780px;
    margin-bottom: 1.5rem;
}

.section-heading.compact {
    margin-bottom: 1.5rem;
}

.hero-text,
.section-heading p,
.start-here-panel p,
.site-footer p,
.quick-link-text small,
.mini-content p,
.category-head p,
.auth-copy p,
.field small,
.auth-links span,
.account-id-text span,
.badge-copy span,
.recent-game-copy span,
.account-stat-card p,
.empty-state p {
    color: var(--muted);
}

.quick-links,
.game-category-stack,
.account-grid,
.badge-grid,
.recent-game-list,
.account-stats-grid {
    display: grid;
    gap: 1rem;
}

.game-category-stack {
    gap: 1.4rem;
}

.category-row-wrap {
    padding-bottom: 0.5rem;
}

.category-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.85rem;
}

.row-scroll-controls {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.row-scroll-button {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--primary-dark);
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
}

.category-row {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding: 0.1rem 0.15rem 0.6rem;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    touch-action: pan-x;
    scrollbar-width: thin;
    scrollbar-color: #c7d8e9 transparent;
}

.mini-card,
.quick-link-card {
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(214, 227, 239, 0.95);
    border-radius: 18px;
    box-shadow: 0 10px 24px rgba(23, 38, 60, 0.05);
}

.mini-card {
    flex: 0 0 min(320px, calc(100vw - 4.5rem));
    overflow: hidden;
    scroll-snap-align: start;
}

.mini-thumb {
    aspect-ratio: 16 / 9;
    background: #dce9f5;
}

.mini-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mini-content {
    padding: 1rem 1rem 1.15rem;
}

.tag {
    display: inline-flex;
    padding: 0.42rem 0.7rem;
    border-radius: 999px;
    background: var(--surface-soft);
    color: var(--primary-dark);
    font-size: 0.82rem;
    font-weight: 800;
}

.card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    margin: 1rem 0 0;
}

.quick-link-card {
    display: grid;
    grid-template-columns: 50px 1fr;
    gap: 0.85rem;
    align-items: flex-start;
    padding: 1rem;
}

.quick-link-icon {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: #f8fbff;
    font-size: 1.3rem;
    box-shadow: inset 0 0 0 1px var(--border);
}

.quick-link-text strong {
    display: block;
    font-size: 1rem;
    margin-bottom: 0.15rem;
}

.auth-page,
.account-page,
.home-page {
    padding-bottom: 4rem;
}

.auth-section {
    padding: 3rem 0 1rem;
}

.auth-shell {
    max-width: 580px;
}

.auth-card {
    padding: 2rem;
}

.auth-brand {
    display: inline-flex;
    margin-bottom: 1.25rem;
}

.auth-brand img {
    height: 54px;
    width: auto;
}

.auth-form {
    display: grid;
    gap: 1rem;
    margin-top: 1.25rem;
}

.field {
    display: grid;
    gap: 0.45rem;
    font-weight: 700;
}

.field span {
    color: var(--primary-dark);
}

.field input {
    width: 100%;
    min-height: 52px;
    padding: 0.9rem 1rem;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #fff;
    color: var(--text);
    font: inherit;
}

.auth-links {
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.auth-links a {
    color: var(--primary);
    font-weight: 800;
}

.alert {
    margin-top: 1rem;
    padding: 0.95rem 1rem;
    border-radius: 14px;
    font-weight: 700;
}

.alert-error {
    background: #fff1f1;
    border: 1px solid #f1c7c7;
    color: #9c3333;
}

.alert-success {
    background: #eefaf1;
    border: 1px solid #c7e6d0;
    color: #23613b;
}

.account-hero-shell {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.6fr);
}

.account-id-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 660px;
}

.account-id-card {
    width: min(100%, 360px);
    padding: 1.5rem;
}

.account-avatar {
    width: 74px;
    height: 74px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #4e93c8, #3b78af);
    color: #fff;
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.account-id-text strong,
.badge-copy strong,
.recent-game-copy strong {
    display: block;
}

.account-stats-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 1.5rem;
}

.account-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.account-stat-card,
.account-panel {
    padding: 1.35rem;
}

.student-genogram-list,
.student-genogram-version-list {
    display: grid;
    gap: 1rem;
}

.student-genogram-card {
    display: grid;
    gap: 0.9rem;
    padding: 1rem;
    border: 1px solid rgba(214, 227, 239, 0.95);
    border-radius: 16px;
    background: rgba(248, 251, 255, 0.9);
}

.student-genogram-card-head {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 1rem;
}

.student-genogram-card-head strong,
.student-genogram-history h3 {
    display: block;
    color: var(--primary-dark);
}

.student-genogram-card-head span,
.student-genogram-description,
.student-genogram-version span {
    color: var(--muted);
}

.student-genogram-history {
    display: grid;
    gap: 0.75rem;
}

.student-genogram-version-list {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.student-genogram-version {
    display: grid;
    gap: 0.2rem;
    padding: 0.85rem 0.9rem;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #fff;
}

.family-dashboard-shell {
    grid-template-columns: minmax(320px, 380px) minmax(0, 1fr);
    align-items: start;
}

.family-sidebar,
.family-main {
    min-width: 0;
}

.family-sidebar {
    padding: 2rem;
    background: linear-gradient(180deg, #fbfdff 0%, #f4f8fc 100%);
    border-right: 1px solid var(--border);
}

.family-sidebar-stack,
.family-main {
    display: grid;
    gap: 1.25rem;
}

.family-main {
    padding: 2rem;
}

.family-stats-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
}

.family-stats-grid .account-stat-card {
    min-width: 0;
}

.family-detail-grid {
    grid-template-columns: 1fr;
}

.child-switcher-panel,
.add-child-panel,
.family-activity-panel {
    padding: 1.35rem;
}

.family-form-grid {
    display: grid;
    gap: 1rem;
}

.family-form-inline {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.child-switcher-panel p,
.add-child-panel p,
.family-activity-panel p {
    color: var(--muted);
}

.child-switcher-panel select,
.add-child-panel select,
.add-child-panel input,
.child-select {
    width: 100%;
    min-height: 52px;
    padding: 0.9rem 1rem;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #fff;
    color: var(--text);
    font: inherit;
}

.button-block {
    width: 100%;
    justify-content: center;
}

.activity-card {
    grid-template-columns: minmax(0, 1fr) auto;
}

.activity-chip {
    display: inline-flex;
    align-items: center;
    margin-left: 0.55rem;
    padding: 0.25rem 0.55rem;
    border-radius: 999px;
    background: var(--surface-soft);
    color: var(--primary-dark);
    font-size: 0.78rem;
    font-weight: 800;
    vertical-align: middle;
}

.activity-duration {
    white-space: nowrap;
}

@media (max-width: 1180px) {
    .family-dashboard-shell,
    .family-stats-grid {
        grid-template-columns: 1fr;
    }

    .family-sidebar {
        border-right: 0;
        border-bottom: 1px solid var(--border);
    }
}

@media (max-width: 760px) {
    .family-main,
    .family-sidebar {
        padding: 1.35rem;
    }

    .family-form-inline,
    .activity-card {
        grid-template-columns: 1fr;
    }
}

.stat-label {
    display: inline-block;
    margin-bottom: 0.4rem;
    color: var(--primary-dark);
    font-size: 0.88rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-value {
    display: block;
    font-size: clamp(2rem, 3vw, 2.8rem);
    letter-spacing: -0.04em;
    margin-bottom: 0.45rem;
}

.badge-card,
.recent-game-card {
    padding: 1rem;
    display: grid;
    gap: 0.85rem;
    align-items: center;
}

.badge-card {
    grid-template-columns: 56px 1fr;
}

.badge-icon {
    width: 56px;
    height: 56px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    background: var(--surface-soft);
    font-size: 1.4rem;
}

.recent-game-card {
    grid-template-columns: 1fr auto;
}

.recent-game-xp {
    color: var(--primary-dark);
    font-weight: 800;
}

.empty-state {
    padding: 1.5rem;
    text-align: center;
}

.empty-icon {
    font-size: 2rem;
    margin-bottom: 0.55rem;
}

.site-footer {
    margin-top: 4rem;
    padding: 2.5rem 0 1.35rem;
    background:
        radial-gradient(circle at top left, rgba(90, 145, 207, 0.18), transparent 28%),
        linear-gradient(180deg, #142132 0%, #0f1927 100%);
    color: #e8f0f8;
}

.footer-shell {
    padding: 1.5rem;
    border-radius: 28px;
    border: 1px solid rgba(146, 182, 219, 0.18);
    background: rgba(255, 255, 255, 0.04);
    box-shadow: 0 22px 38px rgba(4, 11, 20, 0.18);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.9fr 0.9fr 0.95fr;
    gap: 1.5rem;
}

.footer-brand {
    display: grid;
    gap: 1rem;
}

.footer-brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0.7rem 0.95rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 10px 24px rgba(6, 15, 28, 0.18);
}

.footer-logo-image {
    width: min(100%, 210px);
    height: auto;
}

.footer-brand-copy {
    margin: 0;
    max-width: 30ch;
    color: rgba(232, 240, 248, 0.84);
}

.footer-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.footer-badges span {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0.35rem 0.8rem;
    border-radius: 999px;
    border: 1px solid rgba(177, 205, 233, 0.25);
    background: rgba(255, 255, 255, 0.05);
    color: #eff6ff;
    font-size: 0.92rem;
    font-weight: 700;
}

.site-footer h3,
.site-footer h4 {
    margin-bottom: 0.8rem;
}

.footer-column h4 {
    color: #ffffff;
}

.site-footer a {
    color: #d8e7f7;
}

.site-footer ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-footer li {
    margin-bottom: 0.55rem;
}

.footer-bottom {
    margin-top: 1.35rem;
    padding-top: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border-top: 1px solid rgba(177, 205, 233, 0.16);
    color: rgba(232, 240, 248, 0.82);
    font-size: 0.95rem;
}

.footer-bottom p {
    margin: 0;
}

@media (max-width: 1180px) {
    .hero-shell,
    .hero-overlap-card,
    .footer-grid,
    .account-grid,
    .account-stats-grid,
    .account-hero-shell {
        grid-template-columns: 1fr;
    }

    .hero-copy {
        width: 100%;
        max-width: none;
        padding: 2rem 0 1rem;
    }

    .hero-image-wrap,
    .account-id-wrap {
        min-height: auto;
    }

    .hero-showcase-image-wide {
        min-height: 360px;
        max-height: 360px;
    }

    .hero-overlap {
        margin-top: 1rem;
    }

    .start-here-panel {
        border-left: 0;
        border-top: 1px solid var(--border);
    }
}

@media (max-width: 760px) {
    .site-nav,
    .account-nav,
    .site-account-rail {
        display: none;
    }

    .mobile-nav-toggle {
        display: inline-flex;
    }

    .site-logo-image {
        height: 42px;
    }

    .portal-hero {
        padding-top: 1rem;
    }

    .hero-shell {
        min-height: auto;
        gap: 1rem;
    }

    .hero-copy,
    .topics-area,
    .start-here-panel,
    .auth-card,
    .account-stat-card,
    .account-panel,
    .account-id-card {
        padding: 1.4rem;
    }

    .hero-copy {
        width: 100%;
        padding-left: 0;
        padding-right: 0;
    }

    .plg,
    .hero-text,
    .hero-points {
        max-width: 100%;
    }

    .hero-showcase-image-wide {
        min-height: 250px;
        max-height: 250px;
    }

    h1 {
        font-size: 2.4rem;
    }

    .site-header-inner {
        min-height: 70px;
    }

    .container {
        width: min(var(--container), calc(100% - 1rem));
    }

    .category-head {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .row-scroll-controls {
        width: 100%;
        justify-content: flex-start;
    }

    .category-row {
        gap: 0.85rem;
        padding-bottom: 0.7rem;
    }

    .mini-card {
        flex-basis: min(290px, calc(100vw - 2rem));
    }

    .card-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .card-actions .button {
        width: 100%;
    }

    .quick-link-card {
        grid-template-columns: 1fr;
    }

    .quick-link-icon {
        width: 42px;
        height: 42px;
    }

    .recent-game-card {
        grid-template-columns: 1fr;
    }
}

.hero-shell-simple {
    grid-template-columns: 1fr;
    min-height: auto;
}

.hero-copy-wide,
.hero-text-wide {
    width: 100%;
    max-width: 760px;
}

.hero-overlap-card-single {
    grid-template-columns: 1fr;
}

.module-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 1rem;
}

.module-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(214, 227, 239, 0.95);
    border-radius: 18px;
    box-shadow: 0 10px 24px rgba(23, 38, 60, 0.05);
    overflow: hidden;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.module-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 28px rgba(23, 38, 60, 0.08);
}

.module-card-media {
    aspect-ratio: 16 / 10;
    background: #dce9f5;
}

.module-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.module-card-body {
    display: grid;
    gap: 0.55rem;
    padding: 1rem;
    min-width: 0;
}

.module-card-body p {
    margin: 0;
    color: var(--muted);
}

.module-card-link {
    display: inline-flex;
    align-items: center;
    font-weight: 800;
    color: var(--primary-dark);
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.pagination-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    padding: 0.75rem 1rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.9);
    color: var(--primary-dark);
    font-weight: 800;
}

.pagination-link.is-active {
    background: linear-gradient(135deg, #4d95cd, #377ab5);
    border-color: transparent;
    color: #fff;
}

@media (max-width: 1180px) {
    .module-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .module-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 520px) {
    .module-grid {
        grid-template-columns: 1fr;
    }
}
