/* Gamoo PlayStation Library — standalone iOS-inspired RTL interface.
 * Font is copied from the repository's existing Vazir/Vazirmatn asset.
 * No Tailwind preflight or third-party runtime stylesheet is required.
 */
@font-face {
    font-family: "Vazir";
    src: url("../fonts/vazirmatn-variable.woff2") format("woff2");
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
}
:root { color-scheme: light; -webkit-text-size-adjust: 100%; }
body.gamo-game-list-body {
    --gm-accent: #0a84ff;
    --gm-accent-dark: #0066d6;
    --gm-ink: #152238;
    --gm-muted: #778297;
    --gm-hairline: rgba(35, 48, 68, .09);
    --gm-surface: #fff;
    --gm-subtle: #f5f7fb;
    --gm-glass: rgba(255, 255, 255, .84);
    min-height: 100vh;
    margin: 0;
    color: var(--gm-ink);
    background: #f5f6fa;
    font: 400 13px/1.75 "Vazir", Tahoma, sans-serif;
    text-align: right;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
.gamo-game-list-body *,
.gamo-game-list-body *::before,
.gamo-game-list-body *::after { box-sizing: border-box; }
.gamo-game-list-body [hidden] { display: none !important; }
.gamo-game-list-body :is(input, select, button, textarea, dialog) {
    font-family: "Vazir", Tahoma, sans-serif;
}
.gamo-game-list-body button {
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
}
.gamo-game-list-body button:focus-visible,
.gamo-game-list-body select:focus-visible,
.gamo-game-list-body input:focus-visible {
    outline: 3px solid rgba(10, 132, 255, .42);
    outline-offset: 3px;
}
.gamo-game-list-body a { color: inherit; }
.gamo-game-list-body img { display: block; max-width: 100%; }
.gamo-games-sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0);
    white-space: nowrap; border: 0;
}
.gamo-games-page {
    width: min(100%, 1200px);
    margin-inline: auto;
    padding: 22px 20px 68px;
}
.gamo-games-intro,
.gamo-games-contact,
.gamo-games-catalog {
    border: 1px solid var(--gm-hairline);
    background: var(--gm-surface);
    border-radius: 23px;
    box-shadow: 0 8px 32px rgba(28, 43, 69, .035);
}
.gamo-games-intro {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 21px 24px;
    background:
        radial-gradient(ellipse 47% 170% at 4% -95%, rgba(10,132,255,.13), transparent 100%),
        linear-gradient(145deg, #fff 25%, #fbfcff);
}
.gamo-games-intro::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 3px;
    background: linear-gradient(90deg, #40b0ff, #087cf4, #83aefa);
}
.gamo-games-identity { display: flex; align-items: center; gap: 15px; min-width: 0; }
.gamo-games-symbol {
    width: 51px; height: 51px; flex: 0 0 51px;
    display: grid; place-items: center;
    background: linear-gradient(145deg, #f2f8ff, #e3efff);
    color: #1680e6; border-radius: 16px;
    box-shadow: inset 0 0 0 1px rgba(14,105,218,.08);
}
.gamo-games-symbol svg { width: 26px; height: 26px; }
.gamo-games-eyebrow {
    color: #7b9abd;
    direction: ltr; text-align: right;
    font: 600 10px/1.7 Arial, sans-serif;
    letter-spacing: 1.1px; margin: 0 0 2px;
}
.gamo-games-intro h1 {
    margin: 0; font-size: 23px; line-height: 1.42;
    letter-spacing: -.4px; font-weight: 850;
}
.gamo-games-intro-note { margin: 6px 0 0; color: var(--gm-muted); font-size: 11.5px; }
.gamo-games-total {
    flex: 0 0 auto;
    border-radius: 999px; padding: 8px 13px;
    background: rgba(10,132,255,.075);
    color: var(--gm-accent-dark);
    font-weight: 800; font-size: 11.5px;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.gamo-games-contact {
    display: flex; align-items: stretch; gap: 20px;
    margin-top: 12px; padding: 12px 20px;
    border-radius: 17px;
}
.gamo-games-contact-item { display: flex; align-items: center; gap: 10px; min-width: 0; }
.gamo-games-contact-item > div { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.gamo-games-contact-icon {
    width: 34px; height: 34px; flex: 0 0 34px;
    display: grid; place-items: center;
    border-radius: 11px; color: #6c859f; background: #f2f6fa;
}
.gamo-games-contact-icon svg { width: 18px; height: 18px; }
.gamo-games-contact-label { color: #9aa7b7; font-size: 10px; }
.gamo-games-contact a { font-size: 13px; text-decoration: none; font-weight: 750; }
.gamo-games-contact a:hover { color: var(--gm-accent-dark); }
.gamo-games-contact-divider { width: 1px; background: var(--gm-hairline); }
.gamo-games-address-text { font-size: 12px; font-weight: 600; color: #4c5d73; }
.gamo-games-address-detail { min-width: 0; }
.gamo-games-directions {
    display: inline-flex; align-items: center; align-self: flex-start; gap: 5px;
    width: fit-content; margin-top: 3px; padding: 3px 9px;
    border: 1px solid #d9eaff; border-radius: 9px;
    background: #eef6ff; color: #076dd5 !important;
    font-size: 10.5px !important; font-weight: 780;
    line-height: 1.7; white-space: nowrap; text-decoration: none;
    transition: background .15s ease, border-color .15s ease;
}
.gamo-games-directions svg { width: 14px; height: 14px; flex: 0 0 14px; }
.gamo-games-directions:hover { background: #e0efff; border-color: #a9d1ff; }
.gamo-games-directions:focus-visible { outline: 2px solid #0a84ff; outline-offset: 2px; }
.gamo-games-catalog { margin-top: 12px; overflow: hidden; padding-bottom: 2px; }
.gamo-games-toolbar {
    display: flex; align-items: end; flex-wrap: wrap; gap: 10px;
    background: rgba(255,255,255,.95);
    padding: 15px 17px;
    border-bottom: 1px solid var(--gm-hairline);
    scroll-margin-top: 16px;
}
.gamo-games-search { flex: 1 1 265px; min-width: 200px; position: relative; }
.gamo-games-search svg {
    pointer-events: none;
    position: absolute; top: 50%; right: 14px;
    transform: translateY(-50%);
    color: #91a1b5; width: 19px; height: 19px;
}
.gamo-games-search input {
    width: 100%; height: 47px;
    color: var(--gm-ink);
    background: #f3f5f9;
    border: 1px solid transparent;
    border-radius: 14px;
    padding: 0 43px 0 14px;
    font: 500 12px/1.8 "Vazir", Tahoma, sans-serif;
    transition: border-color .18s, box-shadow .18s, background .18s;
}
.gamo-games-search input::placeholder { color: #9ca7b6; }
.gamo-games-search input:focus {
    outline: 0;
    border-color: rgba(10,132,255,.33);
    box-shadow: 0 0 0 4px rgba(10,132,255,.08);
    background: white;
}
.gamo-ios-filter-group {
    flex: 0 0 auto;
    width: 165px; min-width: 0;
    display: flex; flex-direction: column; gap: 5px;
}
.gamo-ios-filter-caption {
    color: #8896a9; font-size: 10.5px;
    font-weight: 700; padding-inline-start: 3px;
}
.gamo-ios-filter-trigger {
    display: flex; align-items: center; justify-content: space-between;
    width: 100%; min-height: 47px;
    border: 1px solid rgba(31,53,82,.09);
    border-radius: 14px;
    color: #35465f; background: #f3f5f9;
    padding: 0 13px; gap: 7px;
    font-size: 12px; font-weight: 750;
    text-align: right;
    transition: background .15s, border-color .15s, box-shadow .15s;
}
.gamo-ios-filter-trigger:hover { background: #eaf2ff; border-color: #c9dcf8; }
.gamo-ios-filter-trigger:is(.is-active,[aria-expanded="true"]) {
    color: #0871df; background: #eaf3ff; border-color: #c6ddfc;
}
.gamo-ios-filter-trigger svg { flex: 0 0 16px; width: 16px; height: 16px; color: #8d9bb0; }
.gamo-ios-filter-selected { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gamo-games-native-filter {
    display: block;
    width: 100%; min-height: 47px;
    border: 1px solid #e1e6ee; border-radius: 13px;
    background: #f3f5f9; color: #35465f; padding: 0 9px;
    font: 600 12px "Vazir", Tahoma, sans-serif;
}
.gamo-games-page.is-enhanced .gamo-games-native-filter { display: none; }
.gamo-games-reset {
    flex: 0 0 auto;
    min-height: 47px;
    padding: 0 13px;
    border-radius: 14px; border: 0;
    color: #6b7688;
    font-size: 11px; font-weight: 700; background: #f0f2f6;
}
.gamo-games-reset:hover { background: #e5eaf1; color: #3b4a5f; }
.gamo-games-list-note {
    display: flex; justify-content: space-between; flex-wrap: wrap;
    gap: 6px 16px; padding: 13px 17px 0;
    color: #91a0b2; font-size: 10.5px;
}
.gamo-games-list-note strong { color: #586d87; font-weight: 750; }
.gamo-games-grid {
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 11px;
    padding: 15px 17px 20px;
}
.gamo-game-card {
    display: flex; align-items: stretch; gap: 12px;
    min-width: 0; min-height: 150px; padding: 10px;
    border: 1px solid rgba(37,53,79,.085);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 3px 14px rgba(34,45,65,.035);
    transition: transform .18s, box-shadow .18s, border-color .18s;
}
.gamo-game-card:hover {
    transform: translateY(-2px);
    border-color: rgba(10,132,255,.22);
    box-shadow: 0 10px 28px rgba(22,55,99,.075);
}
.gamo-game-poster-btn {
    position: relative;
    flex: 0 0 88px; width: 88px; min-height: 126px;
    padding: 0; border: 0; overflow: hidden;
    border-radius: 12px;
    align-self: stretch;
    background: linear-gradient(145deg, #1d3656, #314e70);
    color: white;
}
.gamo-game-poster-btn img {
    width: 100%; height: 100%; min-height: 126px;
    object-fit: cover;
}
.gamo-game-poster-overlay {
    position: absolute; inset: auto 0 0;
    display: block; padding: 5px; text-align: center;
    background: linear-gradient(transparent, rgba(5,16,36,.83));
    color: white; font-size: 10px; font-weight: 700;
    opacity: 0; transition: opacity .18s;
}
.gamo-game-poster-btn:hover .gamo-game-poster-overlay,
.gamo-game-poster-btn:focus-visible .gamo-game-poster-overlay { opacity: 1; }
.gamo-game-card-body {
    display: flex; flex-direction: column; align-items: flex-start;
    min-width: 0; flex: 1;
}
.gamo-game-kind {
    border-radius: 6px; background: #edf4ff;
    color: #4384ce; font-size: 9.7px;
    padding: 2px 7px; font-weight: 750; line-height: 1.6;
}
.gamo-game-open-title {
    display: block; max-width: 100%;
    border: 0; background: transparent;
    padding: 0; margin-top: 6px;
    font-size: 12.5px; line-height: 1.55;
    text-align: right; font-weight: 820; color: #20324b;
    overflow-wrap: anywhere; unicode-bidi: plaintext;
}
.gamo-game-open-title:hover { color: var(--gm-accent-dark); }
.gamo-game-persian {
    display: block; max-width: 100%; color: #7e8ea4;
    font-size: 10px; line-height: 1.5;
    overflow-wrap: anywhere;
}
.gamo-game-summary {
    margin: 6px 0 6px;
    color: #8390a1; font-size: 10.3px; line-height: 1.7;
    display: -webkit-box; -webkit-line-clamp: 2;
    -webkit-box-orient: vertical; overflow: hidden;
}
.gamo-game-card-foot {
    display: flex; align-items: end; justify-content: space-between;
    flex-wrap: wrap; gap: 5px;
    width: 100%; padding-top: 4px; margin-top: auto;
}
.gamo-game-tags { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; }
.gamo-game-genre-chip {
    background: #f2f5fa; color: #5c7798;
    border: 1px solid #e7edf5; border-radius: 999px;
    padding: 3px 8px; line-height: 1.4;
    font-size: 9.7px; font-weight: 700; white-space: nowrap;
}
.gamo-game-genre-chip:hover,
.gamo-game-genre-chip[aria-pressed="true"] {
    color: #0877e7; background: #e9f3ff; border-color: #c4e0ff;
}
.gamo-game-more {
    border: 0; background: transparent; padding: 4px 0;
    color: #0a80ed; font-size: 10px; font-weight: 750;
    white-space: nowrap;
}
.gamo-game-more:hover { color: var(--gm-accent-dark); }
.gamo-games-muted { color: #a3adbc; font-size: 10px; }
.gamo-games-empty {
    margin: 15px 18px 20px; padding: 28px 20px;
    border: 1px dashed #dfe6ef; border-radius: 15px;
    color: #718094; text-align: center; background: #fafbfe;
}

/* Shared iOS-style sheet foundations. */
.gamo-ios-filter-sheet,
.gamo-game-dialog {
    box-sizing: border-box;
    position: fixed;
    inset: 0;
    margin: auto;
    border: 1px solid rgba(255,255,255,.9);
    background: rgba(255,255,255,.97);
    color: #1c2c43;
    font-family: "Vazir", Tahoma, sans-serif;
    box-shadow: 0 28px 100px rgba(9,25,47,.23);
    -webkit-font-smoothing: antialiased;
}
.gamo-ios-filter-sheet:not([open]),
.gamo-game-dialog:not([open]) { display: none !important; }
.gamo-ios-filter-sheet::backdrop,
.gamo-game-dialog::backdrop {
    background: rgba(14,27,48,.44);
    -webkit-backdrop-filter: blur(9px);
    backdrop-filter: blur(9px);
}
.gamo-ios-filter-sheet {
    width: min(460px, calc(100% - 24px));
    max-width: none; max-height: min(78dvh, 720px);
    padding: 0; border-radius: 27px; overflow: hidden;
}
.gamo-ios-sheet-layout {
    display: flex; flex-direction: column; min-height: 0;
    max-height: min(78dvh, 720px);
}
.gamo-ios-sheet-grabber,
.gamo-dialog-grabber {
    display: block; flex: 0 0 auto;
    width: 37px; height: 5px;
    border-radius: 99px;
    background: #dce1e8;
    margin: 11px auto 3px;
}
.gamo-ios-sheet-heading {
    display: flex; align-items: start; justify-content: space-between;
    gap: 14px; padding: 15px 21px 16px;
}
.gamo-ios-sheet-kicker {
    color: #9ca8b8; font-size: 10px; font-weight: 650;
}
.gamo-ios-sheet-heading h2 {
    font-size: 18px; font-weight: 850;
    margin: 1px 0 0; line-height: 1.6;
}
.gamo-ios-sheet-heading p {
    color: #8290a3; font-size: 11px;
    margin: 3px 0 0;
}
.gamo-ios-sheet-done {
    flex: 0 0 auto;
    min-height: 36px; padding: 0 13px;
    border: 0; border-radius: 11px;
    color: #0079ed; font-size: 12px; font-weight: 750;
    background: #ecf5ff;
}
.gamo-ios-sheet-options {
    min-height: 0; overflow-y: auto;
    overscroll-behavior: contain;
    padding: 3px 13px 12px;
    scrollbar-width: thin;
}
.gamo-ios-option {
    display: flex; width: 100%;
    align-items: center; justify-content: space-between;
    gap: 12px; min-height: 54px;
    border: 0; border-bottom: 1px solid #eff1f5;
    padding: 9px 12px; text-align: right; background: transparent;
    color: #2a3d56;
    transition: background .14s ease;
}
.gamo-ios-option:first-child { border-radius: 13px 13px 0 0; }
.gamo-ios-option:last-child { border-bottom: 0; border-radius: 0 0 13px 13px; }
.gamo-ios-option:hover { background: #f3f7ff; }
.gamo-ios-option.is-selected {
    background: #ebf4ff; color: #086fe2;
    font-weight: 820; border-radius: 12px;
}
.gamo-ios-option-name { min-width: 0; flex: 1; font-size: 12.5px; }
.gamo-ios-option-count { font-size: 10.5px; color: #9ca9b8; font-weight: 650; }
.gamo-ios-option-check {
    width: 24px; height: 24px; flex: 0 0 24px;
    border-radius: 50%; display: grid; place-items: center;
    font-size: 15px; color: transparent;
    background: #f1f3f7; font-family: Arial,sans-serif;
}
.gamo-ios-option.is-selected .gamo-ios-option-check {
    color: white; background: #0a84ff;
}
.gamo-ios-sheet-footer {
    margin: 0; flex: 0 0 auto;
    padding: 10px 21px 15px;
    border-top: 1px solid #f0f2f5;
    font-size: 10px; color: #a0abb9; text-align: center;
}

/* Compact, content-first iOS game details. Close is in its own toolbar, never over art. */
.gamo-game-dialog {
    width: min(688px, calc(100% - 28px));
    max-width: none; max-height: min(82dvh, 800px);
    padding: 0; border-radius: 24px;
    overflow-y: auto; overscroll-behavior: contain;
}
.gamo-game-dialog-shell { position: relative; padding: 11px 21px 22px; }
.gamo-dialog-topbar {
    display: grid; grid-template-columns: 32px minmax(0, 1fr) 32px;
    align-items: center; min-height: 32px; margin-bottom: 11px;
    direction: rtl;
}
.gamo-dialog-topbar .gamo-dialog-grabber {
    width: 34px; height: 4px; margin: 0 auto;
}
.gamo-dialog-topbar-spacer { width: 32px; height: 32px; }
.gamo-dialog-close {
    position: static; z-index: auto;
    display: grid; place-items: center;
    width: 32px; height: 32px;
    padding: 0; border: 0; border-radius: 50%;
    color: #6e7b8c; background: #f0f3f7;
    transition: color .15s ease, background .15s ease;
}
.gamo-dialog-close svg { width: 15px; height: 15px; }
.gamo-dialog-close:hover { color: #253c5b; background: #e6edf7; }
.gamo-dialog-close:focus-visible { outline: 2px solid #0a84ff; outline-offset: 2px; }
.gamo-game-dialog-content {
    display: grid;
    grid-template-columns: 174px minmax(0, 1fr);
    grid-template-rows: auto 1fr;
    gap: 0 21px; direction: ltr; align-items: start;
}
.gamo-dialog-art { grid-column: 1; grid-row: 1 / 3; }
.gamo-dialog-info { grid-column: 2; grid-row: 1; }
.gamo-dialog-intro { grid-column: 2; grid-row: 2; direction: rtl; }
.gamo-dialog-art, .gamo-dialog-info { direction: rtl; min-width: 0; }
.gamo-dialog-art img {
    display: block; width: 100%; height: auto;
    aspect-ratio: 2 / 3; object-fit: cover;
    border-radius: 15px; background: #23364e;
    border: 1px solid #e8edf3;
    box-shadow: 0 8px 20px rgba(22,45,76,.09);
}
.gamo-dialog-cover-note {
    display: block; color: #8b98a9;
    font-size: 10px; padding-top: 6px; line-height: 1.7;
}
.gamo-dialog-info { padding-top: 1px; }
.gamo-dialog-type {
    display: inline-block; margin: 0 0 6px;
    border-radius: 999px; background: #eaf4ff;
    padding: 3px 9px; font-size: 10px;
    color: #0876e3; font-weight: 800;
}
.gamo-dialog-info h2 {
    margin: 2px 0 0;
    font-size: clamp(18px, 2.4vw, 23px);
    color: #1a2c44; line-height: 1.45; font-weight: 850;
    overflow-wrap: anywhere;
}
.gamo-dialog-persian { font-size: 12px; color: #8190a3; margin: 3px 0 9px; }
.gamo-dialog-meta {
    display: flex; align-items: center; flex-wrap: wrap;
    gap: 6px; padding-bottom: 12px;
    border-bottom: 1px solid #edf1f5;
}
.gamo-dialog-console {
    border-radius: 8px; background: #f3f5f9;
    padding: 3px 8px; color: #59718c; font-weight: 700; font-size: 10px;
}
.gamo-dialog-genres { display: flex; flex-wrap: wrap; gap: 5px; }
.gamo-dialog-intro { margin-top: 12px; }
.gamo-dialog-intro h3 { margin: 0 0 6px; font-size: 13px; font-weight: 850; }
.gamo-dialog-intro p {
    margin: 0; font-size: 11.5px; line-height: 2;
    color: #4e5d71; white-space: pre-line; overflow-wrap: anywhere;
}
@media (max-width: 1060px) {
    .gamo-games-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .gamo-games-search { flex-basis: 210px; }
}
@media (max-width: 700px) {
    .gamo-games-page { padding: 13px 12px 40px; }
    .gamo-games-intro { padding: 16px; border-radius: 20px; gap: 8px; }
    .gamo-games-identity { gap: 10px; }
    .gamo-games-symbol { width: 44px; height: 44px; flex-basis: 44px; border-radius: 13px; }
    .gamo-games-intro h1 { font-size: 18px; }
    .gamo-games-eyebrow { font-size: 9px; }
    .gamo-games-intro-note { font-size: 10px; line-height: 1.55; }
    .gamo-games-total { align-self: start; padding: 5px 9px; font-size: 10px; }
    .gamo-games-contact { flex-direction: column; gap: 8px; padding: 12px 15px; border-radius: 16px; }
    .gamo-games-contact-divider { height: 1px; width: 100%; }
    .gamo-games-catalog { border-radius: 20px; }
    .gamo-games-toolbar { padding: 12px; gap: 8px; }
    .gamo-games-search { flex: 1 1 100%; min-width: 0; }
    .gamo-ios-filter-group { flex: 1 1 0; width: auto; min-width: 0; }
    .gamo-ios-filter-trigger { width: 100%; padding-inline: 10px; }
    .gamo-games-reset { min-height: 39px; font-size: 10px; margin-inline-start: auto; }
    .gamo-games-list-note { padding: 10px 13px 0; }
    .gamo-games-grid { grid-template-columns: minmax(0, 1fr); gap: 9px; padding: 12px; }
    .gamo-game-card { min-height: 135px; padding: 9px; }
    .gamo-game-poster-btn { flex-basis: 81px; width: 81px; min-height: 116px; }
    .gamo-game-poster-btn img { min-height: 116px; }
    .gamo-game-open-title { font-size: 12px; }
    .gamo-game-summary { font-size: 10px; }
    .gamo-ios-filter-sheet[open],
    .gamo-game-dialog[open] {
        inset: auto 0 0;
        width: 100%; margin: 0;
        max-width: none; border-radius: 27px 27px 0 0;
        border-bottom: 0;
        box-shadow: 0 -10px 70px rgba(9,25,47,.18);
    }
    .gamo-ios-filter-sheet[open] { max-height: 84dvh; }
    .gamo-ios-sheet-layout { max-height: 84dvh; padding-bottom: env(safe-area-inset-bottom, 0px); }
    .gamo-ios-sheet-heading { padding: 12px 20px 13px; }
    .gamo-ios-sheet-options { max-height: 56dvh; }
    .gamo-games-directions { margin-top: 4px; }
    .gamo-game-dialog[open] { max-height: 88dvh; }
    .gamo-game-dialog-shell { padding: 9px 15px calc(19px + env(safe-area-inset-bottom, 0px)); }
    .gamo-dialog-topbar { margin-bottom: 9px; }
    .gamo-game-dialog-content {
        grid-template-columns: 88px minmax(0, 1fr);
        grid-template-rows: auto auto;
        gap: 10px 12px;
    }
    .gamo-dialog-art { grid-column: 1; grid-row: 1; }
    .gamo-dialog-art img { border-radius: 11px; }
    .gamo-dialog-info { grid-column: 2; grid-row: 1; padding-top: 1px; }
    .gamo-dialog-info h2 { font-size: 16px; line-height: 1.45; }
    .gamo-dialog-type { font-size: 9px; margin-bottom: 4px; }
    .gamo-dialog-meta { padding-bottom: 7px; gap: 4px; }
    .gamo-dialog-persian { font-size: 10.5px; margin-bottom: 7px; }
    .gamo-dialog-intro { grid-column: 1 / -1; grid-row: 2; margin-top: 1px; }
    .gamo-dialog-intro p { font-size: 11px; line-height: 1.9; }
}
@media (max-width: 365px) {
    .gamo-games-intro-note { display: none; }
    .gamo-games-intro h1 { font-size: 16px; }
    .gamo-game-card { gap: 8px; }
    .gamo-game-poster-btn { flex-basis: 73px; width: 73px; }
    .gamo-game-summary { -webkit-line-clamp: 1; }
    .gamo-ios-filter-trigger { font-size: 10.5px; }
}
@media (prefers-reduced-motion: reduce) {
    .gamo-game-card, .gamo-game-poster-overlay,
    .gamo-ios-option, .gamo-games-search input,
    .gamo-ios-filter-trigger { transition: none; }
    .gamo-game-card:hover { transform: none; }
}

/* The shared storefront header is fixed (80px); keep catalog below it. */
body.gamo-page.gamo-game-list-body {
    background: #f5f6fa;
    color: #152238;
    font-family: "Vazir", "Vazirmatn", Tahoma, sans-serif;
}
body.gamo-game-list-body > main.gamo-games-page {
    padding-top: calc(5rem + 24px);
    scroll-margin-top: 6rem;
}
/* Header, dialogs, and bottom navigation must not be clipped by the catalog. */
body.gamo-game-list-body > .gamo-header,
body.gamo-game-list-body > .gamo-footer {
    font-family: "Vazir", "Vazirmatn", Tahoma, sans-serif;
}
body.gamo-game-list-body .gamo-games-catalog {
    isolation: isolate;
}
@media (max-width: 700px) {
    body.gamo-game-list-body > main.gamo-games-page {
        padding-top: calc(5rem + 12px);
        padding-bottom: 40px;
    }
    body.gamo-game-list-body > .gamo-footer {
        padding-bottom: calc(5rem + env(safe-area-inset-bottom, 0px));
    }
}


/* Dark mode follows the site's existing html.dark / html.light classes.
 * No second theme toggle or storage key is introduced. These declarations
 * deliberately override the standalone catalog's hard-coded light surfaces. */
html.dark { color-scheme: dark; }
html.light { color-scheme: light; }
html.dark body.gamo-game-list-body {
    --gm-accent: #60a5fa;
    --gm-accent-dark: #93c5fd;
    --gm-ink: #e9f1fc;
    --gm-muted: #a4b5cd;
    --gm-hairline: rgba(164, 187, 218, .15);
    --gm-surface: rgba(22, 31, 47, .88);
    --gm-subtle: #1b283c;
    --gm-glass: rgba(24, 35, 53, .86);
}
html.dark body.gamo-page.gamo-game-list-body {
    background: #0d1421;
    color: var(--gm-ink);
}
html.dark .gamo-games-intro,
html.dark .gamo-games-contact,
html.dark .gamo-games-catalog {
    border-color: var(--gm-hairline);
    background: var(--gm-surface);
    box-shadow: 0 12px 38px rgba(0, 0, 0, .14);
}
html.dark .gamo-games-intro {
    background:
        radial-gradient(ellipse 55% 140% at 0% -75%, rgba(58, 134, 255, .17), transparent 100%),
        linear-gradient(145deg, rgba(30, 44, 66, .96), rgba(17, 27, 43, .96));
}
html.dark .gamo-games-intro h1 { color: #f2f6ff; }
html.dark .gamo-games-symbol {
    background: linear-gradient(145deg, #203b5e, #1a2c47);
    color: #88bcff;
    box-shadow: inset 0 0 0 1px rgba(125, 178, 249, .16);
}
html.dark .gamo-games-total { background: rgba(59, 130, 246, .16); color: #b0d2ff; }
html.dark .gamo-games-contact-icon {
    background: rgba(147, 174, 211, .11);
    color: #a5bedb;
}
html.dark .gamo-games-contact-label,
html.dark .gamo-games-list-note { color: #a2b2c7; }
html.dark .gamo-games-address-text { color: #d3e0f0; }
html.dark .gamo-games-contact a:not(.gamo-games-directions) { color: #e7f0ff; }
html.dark .gamo-games-directions {
    background: rgba(41, 118, 229, .15);
    border-color: rgba(102, 168, 255, .28);
    color: #a9d1ff !important;
}
html.dark .gamo-games-directions:hover { background: rgba(52, 128, 244, .24); border-color: rgba(124, 184, 255, .42); }
html.dark .gamo-games-toolbar {
    background: rgba(26, 38, 56, .84);
    border-bottom-color: var(--gm-hairline);
}
html.dark .gamo-games-search svg { color: #96acca; }
html.dark .gamo-games-search input,
html.dark .gamo-ios-filter-trigger,
html.dark .gamo-games-native-filter,
html.dark .gamo-games-reset {
    background: #25334a;
    border-color: rgba(145, 169, 202, .15);
    color: #e3edfb;
}
html.dark .gamo-games-search input::placeholder { color: #a0b0c8; opacity: 1; }
html.dark .gamo-games-search input:focus {
    background: #293b56;
    border-color: rgba(96, 165, 250, .58);
    box-shadow: 0 0 0 4px rgba(96, 165, 250, .14);
}
html.dark .gamo-ios-filter-caption { color: #aabbd2; }
html.dark .gamo-ios-filter-trigger svg { color: #b9c9df; }
html.dark .gamo-ios-filter-trigger:hover,
html.dark .gamo-games-reset:hover { background: #2f4463; border-color: rgba(125, 179, 248, .35); }
html.dark .gamo-ios-filter-trigger:is(.is-active,[aria-expanded="true"]) {
    background: #234467;
    color: #b6d7ff;
    border-color: rgba(125, 182, 255, .42);
}
html.dark .gamo-games-list-note strong { color: #d7e6fa; }
html.dark .gamo-game-card {
    background: rgba(30, 43, 63, .9);
    border-color: rgba(144, 169, 205, .16);
    box-shadow: 0 4px 15px rgba(0, 0, 0, .11);
}
html.dark .gamo-game-card:hover {
    border-color: rgba(103, 170, 255, .43);
    background: #243853;
    box-shadow: 0 12px 25px rgba(0, 0, 0, .19);
}
html.dark .gamo-game-kind {
    color: #a7d1ff;
    background: rgba(47, 121, 235, .18);
}
html.dark .gamo-game-open-title { color: #f2f6ff; }
html.dark .gamo-game-open-title:hover { color: #a8d1ff; }
html.dark .gamo-game-persian { color: #b3c4da; }
html.dark .gamo-game-summary { color: #afc0d6; }
html.dark .gamo-game-genre-chip {
    border-color: rgba(156, 180, 212, .17);
    background: rgba(132, 161, 202, .12);
    color: #c1d5ee;
}
html.dark .gamo-game-genre-chip:hover,
html.dark .gamo-game-genre-chip[aria-pressed="true"] {
    color: #c5e0ff;
    background: rgba(51, 128, 245, .23);
    border-color: rgba(105, 171, 251, .4);
}
html.dark .gamo-game-more { color: #9bcaff; }
html.dark .gamo-games-muted { color: #9aaec7; }
html.dark .gamo-games-empty {
    background: rgba(32, 47, 69, .75);
    color: #b7c8dd;
    border-color: rgba(148, 177, 214, .22);
}
/* Native dialogs are body siblings, not descendants of the games main. */
html.dark .gamo-ios-filter-sheet,
html.dark .gamo-game-dialog {
    color: #e7effb;
    border-color: rgba(182, 204, 233, .15);
    background: rgba(24, 34, 51, .97);
    box-shadow: 0 28px 90px rgba(0, 0, 0, .45);
}
html.dark .gamo-ios-filter-sheet::backdrop,
html.dark .gamo-game-dialog::backdrop { background: rgba(3, 8, 18, .72); }
html.dark .gamo-dialog-grabber,
html.dark .gamo-ios-sheet-grabber { background: #56667b; }
html.dark .gamo-ios-sheet-kicker,
html.dark .gamo-ios-sheet-heading p { color: #adbed3; }
html.dark .gamo-ios-sheet-heading h2 { color: #f0f5fd; }
html.dark .gamo-ios-sheet-done {
    color: #b8d8ff;
    background: rgba(49, 128, 244, .2);
}
html.dark .gamo-ios-sheet-done:hover { background: rgba(56, 139, 255, .32); }
html.dark .gamo-ios-option {
    color: #e6effb;
    border-bottom-color: rgba(141, 170, 208, .12);
}
html.dark .gamo-ios-option:hover { background: rgba(133, 167, 213, .09); }
html.dark .gamo-ios-option.is-selected {
    background: rgba(54, 127, 229, .2);
    color: #a9d2ff;
}
html.dark .gamo-ios-option-count { color: #a6b9d2; }
html.dark .gamo-ios-option-check { background: #33465f; }
html.dark .gamo-ios-option.is-selected .gamo-ios-option-check {
    color: white; background: #257bdf;
}
html.dark .gamo-ios-sheet-footer {
    color: #9bacbf;
    border-top-color: rgba(146, 171, 207, .14);
}
html.dark .gamo-dialog-close {
    color: #cad8e9;
    background: #33445b;
}
html.dark .gamo-dialog-close:hover {
    color: #ffffff;
    background: #465b77;
}
html.dark .gamo-dialog-art img { border-color: rgba(164, 189, 223, .22); }
html.dark .gamo-dialog-cover-note,
html.dark .gamo-dialog-persian { color: #a9bdd5; }
html.dark .gamo-dialog-type {
    background: rgba(50, 129, 241, .19);
    color: #b2d6ff;
}
html.dark .gamo-dialog-info h2,
html.dark .gamo-dialog-intro h3 { color: #f1f6ff; }
html.dark .gamo-dialog-meta { border-bottom-color: rgba(155, 180, 213, .17); }
html.dark .gamo-dialog-console {
    background: rgba(144, 166, 196, .13);
    color: #d1e0f3;
}
html.dark .gamo-dialog-intro p { color: #c0cfe1; }

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    html.dark .gamo-games-intro,
    html.dark .gamo-games-contact,
    html.dark .gamo-games-catalog,
    html.dark .gamo-ios-filter-sheet,
    html.dark .gamo-game-dialog { background: #19263a; }
}
