#app.stsite.skytirmy-ingame { background: #100c20; }
#app.stsite.skytirmy-ingame::before {
    background:
        radial-gradient(ellipse at 78% 4%, #5949a940, transparent 55%),
        linear-gradient(#100c20e6, #100c20f7),
        var(--settings-background) center / cover;
}
#app.skytirmy-ingame .stsite-page-heading { display: none; }
#content .content-wrapper .st-game section { margin-inline: 0; }

.st-game,
.st-game-nav {
    --game-bg: #100c20;
    --game-surface: #191528;
    --game-row: #211a32;
    --game-row-alt: #181326;
    --game-border: #514565;
    --game-violet: #60308c;
    --game-gold: #ffd18c;
    --game-text: #f5f0ff;
    --game-muted: #c7bdd9;
}

.st-game {
    max-width: 72rem;
    margin: 0 auto 2rem;
    color: var(--game-text);
}

.st-game-hero {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
    min-height: 190px;
    padding: clamp(1.25rem, 4vw, 3rem);
    border: 1px solid var(--game-border);
    border-radius: 1.25rem;
    box-shadow: 0 16px 40px #08051150;
    background: linear-gradient(90deg, #101524f5, #10152496 50%, #10152420),
        linear-gradient(0deg, #101524f5, transparent 75%),
        var(--game-bg) url('../img/ingame/night.webp') center top / cover no-repeat;
}

.st-game-home .st-game-hero {
    min-height: clamp(230px, 29vw, 360px);
}

.st-game-hero h1 {
    margin: 0;
    color: var(--game-text);
    font-size: clamp(1.85rem, 4.8vw, 3.5rem);
    font-weight: 900;
    line-height: 1.08;
    letter-spacing: -.045em;
    text-shadow: 0 3px 16px #050818;
}

.st-game-hero p {
    margin: .45rem 0 0;
    color: var(--game-text);
    font-size: clamp(.95rem, 1.6vw, 1.22rem);
}

.st-game-hero img,
.st-game-card img,
.st-game-ribbon img {
    flex: none;
    object-fit: contain;
    image-rendering: pixelated;
}

.st-game-hero img {
    width: clamp(52px, 8vw, 92px);
    height: auto;
    filter: drop-shadow(0 4px 8px #0a0712);
}

.st-game a.st-game-back,
.st-game a.st-game-more,
.st-game-pages a,
.st-game-message a {
    color: var(--game-gold);
    font-weight: 700;
}

.st-game-back {
    display: inline-block;
    margin-bottom: .4rem;
}

.st-game-grid,
.st-game-panels {
    display: grid;
    gap: 1rem;
    margin-top: 1rem;
}

.st-game-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.st-game-panels { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }

.st-game-panel,
.st-game a.st-game-card {
    min-width: 0;
    border: 1px solid var(--game-border);
    border-radius: .9rem;
    background: var(--game-surface);
}

.st-game a.st-game-card {
    display: flex;
    align-items: center;
    gap: clamp(.8rem, 1.7vw, 1.35rem);
    padding: 1.15rem;
    background: linear-gradient(145deg, #302641, var(--game-surface) 78%);
    color: var(--game-text);
    text-decoration: none;
}

.st-game a.st-game-card:hover,
.st-game a.st-game-card:focus-visible {
    border-color: var(--game-gold);
    background: var(--game-row);
}

.st-game-card h2 {
    margin: 0;
    color: var(--game-text);
    font-size: clamp(1.05rem, 1.65vw, 1.4rem);
    font-weight: 800;
}

.st-game-card h2 span { color: var(--game-gold); }

.st-game-card p {
    margin: .25rem 0 0;
    color: var(--game-muted);
    font-size: .91rem;
    line-height: 1.45;
}

.st-game-nav,
.st-game-kinds {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
    margin: 1rem 0;
}

.st-game-nav {
    padding: .3rem;
    border: 1px solid var(--game-border);
    border-radius: .9rem;
    background: var(--game-surface);
}

.st-game-kinds { padding: 0 1rem; }

.st-game-nav a,
.st-game-kinds a {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: .4rem .85rem;
    color: var(--game-text);
    border: 1px solid transparent;
    border-radius: .6rem;
    font-weight: 700;
    text-decoration: none;
}

.st-game-nav a:hover,
.st-game-kinds a:hover {
    border-color: var(--game-border);
    background: #ffffff10;
    color: var(--game-text);
}

#app.stsite #content :is(.st-game-nav, .st-game-kinds) a[aria-current="page"] {
    border-color: var(--game-gold);
    background: var(--game-gold);
    color: #221529;
}

.st-game .st-game-ribbon {
    display: flex;
    align-items: center;
    gap: .65rem;
    min-height: 48px;
    padding: .65rem 1rem;
    margin: 0;
    border-bottom: 1px solid var(--game-border);
    border-radius: calc(.9rem - 1px) calc(.9rem - 1px) 0 0;
    background: linear-gradient(105deg, #2e2040, var(--game-violet));
    color: var(--game-text);
    font-size: 1.12rem;
    font-weight: 800;
}

.st-game-more { display: inline-block; padding: .7rem 1rem .85rem; }
.st-game-message { padding: 1rem; margin: 0; color: var(--game-muted); }
.st-game-hint { margin: .65rem 1rem .85rem; color: var(--game-muted); font-size: .83rem; }

.st-game-list { padding: 0; margin: 0; list-style: none; }
.st-game-list li {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: .7rem;
    padding: .7rem 1rem;
    background: var(--game-row-alt);
}

.st-game-list li:nth-child(odd) { background: var(--game-row); }
.st-game-list li > :last-child { text-align: right; }
.st-game-list small, .st-game-meta small { display: block; color: var(--game-muted); }
.st-game-list time { color: var(--game-gold); white-space: nowrap; }
.st-game-ranking { counter-reset: st-game-rank; }
.st-game-ranking li::before {
    counter-increment: st-game-rank;
    content: counter(st-game-rank);
    color: var(--game-gold);
    min-width: 1.25rem;
}
.st-game-ranking strong { flex: 1; overflow-wrap: anywhere; }
.st-game-player { display: inline-flex; align-items: center; gap: .5rem; overflow-wrap: anywhere; }
.st-game .st-top-head {
    position: relative;
    display: inline-grid;
    place-items: center;
    flex: 0 0 1.65rem;
    width: 1.65rem;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: .35rem;
    background: #382941;
    color: var(--game-gold);
}
.st-game .st-top-head::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--st-top-skin, none) center / cover no-repeat;
    image-rendering: pixelated;
}

.st-game-signal { color: #f6afba; white-space: nowrap; }
.st-game-signal.is-online { color: #8ae4a8; }
.st-game-signal::before {
    content: '';
    display: inline-block;
    width: .48em;
    height: .48em;
    margin-right: .45em;
    vertical-align: .13em;
    border-radius: 50%;
    background: currentColor;
}

.st-game-market-tools {
    display: flex;
    align-items: end;
    flex-wrap: wrap;
    justify-content: space-between;
}

.st-game-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: .65rem;
    padding: .85rem 1rem;
}

.st-game-filters label {
    display: grid;
    gap: .28rem;
    max-width: 100%;
    color: var(--game-muted);
    font-size: .85rem;
    font-weight: 700;
}

.st-game-filters select,
.st-game-filters button[type="submit"] {
    min-height: 42px;
    max-width: 100%;
    padding: .35rem .65rem;
    border: 1px solid var(--game-border);
    border-radius: .6rem;
    background: var(--game-bg);
    color: var(--game-text);
    font: inherit;
    font-size: .94rem;
    color-scheme: dark;
}

.st-game-filters button[type="submit"] {
    border-color: var(--game-gold);
    background: var(--game-gold);
    color: #24172c;
    font-weight: 750;
}

#app.stsite #content .st-game-filters .dropdown-menu {
    border-color: var(--game-border);
    background: var(--game-surface);
}

#app.stsite #content .st-game-filters .dropdown-item:is(:hover, :focus) {
    background-color: var(--game-row) !important;
}

#app.stsite #content .st-game-filters .dropdown-item.active {
    background-color: var(--game-gold) !important;
    color: #221529 !important;
}

.st-game-meta { margin: 0; padding: .85rem 1rem; color: var(--game-gold); }
.st-game-scroll { overflow: auto; padding: 0 .75rem .5rem; }
.st-game-table { width: 100%; min-width: 510px; border-collapse: separate; border-spacing: 0 .35rem; color: var(--game-text); }
.st-game-table.is-hdv { min-width: 820px; }
.st-game-table th, .st-game-table td { padding: .64rem .75rem; }
.st-game-table thead { text-align: left; color: var(--game-muted); font-size: .83rem; }
.st-game-table tbody tr > * {
    border-block: 1px solid #51456588;
    background: linear-gradient(0deg, #ffffff02, #ffffff05), var(--game-row);
}
.st-game-table tbody tr > :first-child { border-left: 1px solid #51456588; border-radius: .65rem 0 0 .65rem; }
.st-game-table tbody tr > :last-child { border-right: 1px solid #51456588; border-radius: 0 .65rem .65rem 0; }
.st-game-table tbody th { min-width: 8rem; text-align: left; overflow-wrap: anywhere; }
.st-game-table .st-game-index { color: var(--game-muted); }
.st-game-table .st-game-number { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.st-game-price { color: var(--game-gold); font-weight: 750; }
.st-game-up { color: #8ae4a8; }
.st-game-down { color: #f6afba; }
.st-game-table time { display: block; color: var(--game-muted); white-space: nowrap; }
.st-game-table meter {
    display: block;
    width: 5.5rem;
    height: .5rem;
    margin: .2rem 0 0 auto;
}
.st-game-table meter::-webkit-meter-bar { border: 0; background: var(--game-bg); }
.st-game-table meter::-webkit-meter-optimum-value { background: var(--game-gold); }
.st-game-table meter::-moz-meter-bar { background: var(--game-gold); }

.st-game-pages {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: .5rem 1rem;
    padding: .8rem 1rem;
    color: var(--game-muted);
}

.st-game :focus-visible,
.st-game-nav a:focus-visible {
    outline: 2px solid var(--game-gold);
    outline-offset: 2px;
}

@media (max-width: 950px) {
    .st-game-card img { width: 46px; height: 46px; }
    .st-game a.st-game-card { padding: .85rem; }
}

@media (max-width: 720px) {
    .st-game-grid, .st-game-panels { grid-template-columns: minmax(0, 1fr); }
    .st-game-hero { background-position: center, center, 60% top; }
    .st-game-home .st-game-hero { min-height: 215px; }
    .st-game-meta { padding-top: 0; }
}

@media (max-width: 580px) {
    .st-game-table,
    .st-game-table.is-hdv,
    .st-game-table tbody { display: block; min-width: 0; }
    .st-game-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip-path: inset(50%);
    }
    .st-game-table tbody tr {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: .65rem .9rem;
        padding: .85rem 1rem;
        margin-bottom: .5rem;
        border: 1px solid var(--game-border);
        border-radius: .65rem;
        background: var(--game-row);
    }
    .st-game-table tbody th { grid-column: 1 / -1; }
    .st-game-table tbody tr > *,
    .st-game-table tbody tr > :is(:first-child, :last-child) { padding: 0; border: 0; background: none; }
    .st-game-table .st-game-index { grid-column: 1 / -1; font-size: .75rem; }
    .st-game-table .st-game-index::before { content: '#'; }
    .st-game-table .st-game-number { text-align: left; white-space: normal; overflow-wrap: anywhere; }
    .st-game-table td[data-label]::before {
        display: block;
        content: attr(data-label);
        color: var(--game-muted);
        font-size: .75rem;
        font-weight: 600;
    }
    .st-game-table meter { margin-left: 0; }
}
