.gs-dex {
    width: min(1540px, calc(100% - 24px));
    margin: 0 auto;
    padding: 24px 0 40px;
}

.gs-dex-hero {
    position: relative;
    isolation: isolate;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 28px;
    overflow: hidden;
    padding: 30px 34px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background:
        radial-gradient(circle at 84% 20%, rgba(194, 208, 226, .14), transparent 22%),
        radial-gradient(circle at 12% 0%, rgba(232, 188, 58, .18), transparent 32%),
        linear-gradient(135deg, rgba(200, 74, 56, .08), transparent 42%),
        var(--panel-alpha);
    box-shadow: var(--shadow);
}

.gs-dex-hero::after {
    content: "251";
    position: absolute;
    right: 190px;
    bottom: -50px;
    z-index: -1;
    color: rgba(255, 255, 255, .025);
    font-size: clamp(130px, 18vw, 260px);
    font-weight: 950;
    line-height: .8;
    letter-spacing: -.08em;
}

.gs-eyebrow {
    margin: 0 0 6px;
    color: var(--gold);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .14em;
}

.gs-dex-hero h1 {
    max-width: 820px;
    margin: 0;
    color: #fff8df;
    font-size: clamp(32px, 4vw, 58px);
    line-height: 1;
    letter-spacing: -.04em;
}

.gs-dex-hero-copy > p:not(.gs-eyebrow) {
    max-width: 800px;
    margin: 16px 0 0;
    color: var(--muted);
    font-size: 16px;
}

.gs-dex-hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 22px;
}

.gs-dex-hero-badges span {
    padding: 7px 10px;
    border: 1px solid rgba(232, 188, 58, .24);
    border-radius: 999px;
    background: rgba(18, 14, 7, .6);
    color: var(--muted);
    font-size: 12px;
}

.gs-dex-hero-badges strong {
    color: var(--text);
}

.gs-dex-hero-emblems {
    display: flex;
    align-items: center;
    gap: 12px;
}

.gs-dex-hero-emblems div {
    display: grid;
    place-items: center;
    width: 96px;
    height: 118px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(18, 14, 7, .72);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 16px 24px rgba(0, 0, 0, .28);
}

.gs-dex-hero-emblems span {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    font-family: Georgia, serif;
    font-size: 29px;
    font-weight: 900;
}

.gs-dex-hero-emblems small {
    color: var(--muted);
    font-size: 11px;
    font-weight: 850;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.gs-dex-hero-emblems .is-gold span {
    border: 2px solid #ffd76c;
    background: linear-gradient(145deg, #e8bc3a, #8a5511);
    color: #211300;
    box-shadow: 0 0 24px rgba(232, 188, 58, .3);
}

.gs-dex-hero-emblems .is-silver span {
    border: 2px solid #e8eef6;
    background: linear-gradient(145deg, #dce5f0, #607c9e);
    color: #142031;
    box-shadow: 0 0 24px rgba(106, 148, 196, .28);
}

.gs-dex-layout {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 16px;
    margin-top: 16px;
}

.gs-dex-controls {
    position: sticky;
    top: calc(var(--sticky-header-offset) + 10px);
    align-self: start;
    display: grid;
    gap: 12px;
}

.gs-control-panel,
.gs-dex-results {
    border: 1px solid var(--line);
    border-radius: 10px;
    background:
        linear-gradient(180deg, rgba(255, 215, 108, .035), transparent 26%),
        var(--panel-alpha);
    box-shadow: var(--shadow);
}

.gs-control-panel {
    padding: 14px;
}

.gs-control-heading {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.gs-control-heading .panel-glyph {
    width: 26px;
    height: 26px;
}

.gs-control-heading div {
    display: grid;
    min-width: 0;
}

.gs-control-heading strong {
    color: #fff;
    font-size: 13px;
}

.gs-control-heading small {
    color: var(--soft);
    font-size: 10px;
}

.gs-version-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px;
}

.gs-version-tabs button,
.gs-reset-button {
    min-height: 36px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--surface);
    color: var(--muted);
    cursor: pointer;
}

.gs-version-tabs button:hover,
.gs-reset-button:hover {
    border-color: var(--line-strong);
    color: #fff;
}

.gs-version-tabs button[data-version="gold"].is-active {
    border-color: #e8bc3a;
    background: rgba(232, 188, 58, .15);
    color: #ffd76c;
    box-shadow: inset 0 0 20px rgba(232, 188, 58, .06);
}

.gs-version-tabs button[data-version="silver"].is-active {
    border-color: #9eb4ce;
    background: rgba(106, 148, 196, .15);
    color: #dce8f6;
    box-shadow: inset 0 0 20px rgba(106, 148, 196, .07);
}

.gs-field {
    display: grid;
    gap: 5px;
    margin-bottom: 11px;
}

.gs-field > span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.gs-field input,
.gs-field select {
    width: 100%;
    min-height: 38px;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: 7px;
    outline: none;
    background: var(--surface);
    color: var(--text);
}

.gs-field input:focus,
.gs-field select:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.gs-reset-button {
    width: 100%;
}

.gs-time-key dl {
    display: grid;
    gap: 7px;
    margin: 0;
}

.gs-time-key dl div {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding-top: 7px;
    border-top: 1px solid rgba(92, 67, 22, .55);
}

.gs-time-key dt {
    color: var(--text);
    font-weight: 750;
}

.gs-time-key dd {
    margin: 0;
    color: var(--soft);
    font-size: 11px;
}

.gs-dex-results {
    min-width: 0;
    padding: 16px;
}

.gs-results-toolbar {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    padding: 2px 2px 14px;
    border-bottom: 1px solid var(--line);
}

.gs-results-toolbar h2 {
    margin: 0;
    color: #fff;
    font-size: 22px;
}

.gs-results-toolbar h2 small {
    color: var(--gold);
    font-size: 12px;
    font-weight: 750;
}

.gs-results-toolbar > p {
    max-width: 420px;
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    text-align: right;
}

.gs-dex-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 11px;
    margin-top: 14px;
}

.gs-dex-card {
    position: relative;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 10px;
    background:
        linear-gradient(160deg, rgba(255, 255, 255, .025), transparent 42%),
        var(--surface);
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.gs-dex-card:hover,
.gs-dex-card:focus-within {
    z-index: 1;
    border-color: var(--card-accent, var(--line-strong));
    transform: translateY(-3px);
    box-shadow: 0 16px 30px rgba(0, 0, 0, .34), 0 0 0 1px color-mix(in srgb, var(--card-accent, var(--gold)) 24%, transparent);
}

.gs-dex-card-main {
    display: block;
    min-height: 238px;
    padding: 11px 12px 12px;
}

.gs-card-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.gs-card-number {
    color: var(--soft);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .1em;
}

.gs-card-status {
    overflow: hidden;
    max-width: 118px;
    padding: 3px 6px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    font-size: 9px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gs-card-status.is-exclusive {
    border-color: rgba(232, 188, 58, .42);
    background: rgba(232, 188, 58, .1);
    color: var(--gold-2);
}

.gs-card-status.is-missing {
    border-color: rgba(212, 84, 72, .38);
    color: #e6a096;
}

.gs-card-media {
    position: relative;
    display: grid;
    place-items: center;
    height: 104px;
    margin: 4px 0 1px;
}

.gs-card-media::before {
    content: "";
    position: absolute;
    width: 86px;
    height: 86px;
    border-radius: 50%;
    background: radial-gradient(circle, color-mix(in srgb, var(--card-accent) 22%, transparent), transparent 70%);
}

.gs-card-media img {
    position: relative;
    width: 88px;
    height: 88px;
    object-fit: contain;
    image-rendering: pixelated;
    filter: drop-shadow(0 8px 9px rgba(0, 0, 0, .48));
    transition: transform .18s ease;
}

.gs-dex-card:hover .gs-card-media img {
    transform: translateY(-3px) scale(1.05);
}

.gs-dex-card h3 {
    margin: 0;
    overflow: hidden;
    color: #fff;
    font-size: 17px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gs-card-types {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    min-height: 22px;
    margin-top: 7px;
}

.gs-card-types span {
    padding: 3px 7px;
    border: 1px solid color-mix(in srgb, var(--type-color) 65%, #241b0c);
    border-radius: 999px;
    background: color-mix(in srgb, var(--type-color) 16%, transparent);
    color: #fff;
    font-size: 9px;
    font-weight: 850;
    text-transform: uppercase;
}

.gs-card-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
    margin-top: 10px;
}

.gs-card-metrics div {
    display: grid;
    gap: 1px;
    padding: 5px 4px;
    border: 1px solid rgba(92, 67, 22, .62);
    border-radius: 5px;
    background: rgba(255, 255, 255, .018);
    text-align: center;
}

.gs-card-metrics strong {
    color: var(--text);
    font-size: 11px;
}

.gs-card-metrics span {
    color: var(--soft);
    font-size: 8px;
    font-weight: 750;
    text-transform: uppercase;
}

.gs-card-footer {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    min-height: 47px;
    padding: 8px 11px;
    border-top: 1px solid var(--line);
    background: rgba(0, 0, 0, .16);
}

.gs-card-footer > div {
    display: grid;
    min-width: 0;
}

.gs-card-footer strong,
.gs-card-footer span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gs-card-footer strong {
    color: var(--muted);
    font-size: 10px;
}

.gs-card-footer span {
    color: var(--soft);
    font-size: 9px;
}

.gs-card-map-link {
    padding: 5px 7px;
    border: 1px solid var(--line);
    border-radius: 5px;
    color: var(--gold-2);
    font-size: 9px;
    font-weight: 850;
}

.gs-card-map-link:hover {
    border-color: var(--gold);
    background: var(--accent-soft);
}

.gs-empty-state {
    display: grid;
    place-items: center;
    gap: 5px;
    min-height: 220px;
    margin-top: 14px;
    border: 1px dashed var(--line);
    border-radius: 10px;
    color: var(--muted);
    text-align: center;
}

.gs-empty-state strong {
    color: #fff;
    font-size: 16px;
}

@media (max-width: 1320px) {
    .gs-dex-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 1020px) {
    .gs-dex-layout { grid-template-columns: 1fr; }
    .gs-dex-controls {
        position: static;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .gs-dex-controls .gs-control-panel:nth-child(2) { grid-column: span 2; }
    .gs-dex-controls .gs-time-key { grid-column: 1 / -1; }
    .gs-time-key dl { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 760px) {
    .gs-dex { width: calc(100% - 16px); padding-top: 14px; }
    .gs-dex-hero { grid-template-columns: 1fr; padding: 24px 20px; }
    .gs-dex-hero-emblems { display: none; }
    .gs-dex-controls { grid-template-columns: 1fr; }
    .gs-dex-controls .gs-control-panel:nth-child(2),
    .gs-dex-controls .gs-time-key { grid-column: auto; }
    .gs-time-key dl { grid-template-columns: 1fr; }
    .gs-results-toolbar { align-items: flex-start; flex-direction: column; }
    .gs-results-toolbar > p { text-align: left; }
    .gs-dex-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 470px) {
    .gs-dex-grid { grid-template-columns: 1fr; }
    .gs-dex-card-main { min-height: 220px; }
}
