/* Shared category archive pages. Built on the Top Games visual system. */
.category-page-head {
    padding-bottom: 16px;
}

.category-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(330px, .72fr);
    align-items: stretch;
    gap: 16px;
    margin-top: 18px;
    border-top: 1px solid #bccacd;
    padding-top: 15px;
}

.category-hero-copy {
    display: grid;
    align-content: center;
    min-height: 250px;
    padding: clamp(12px, 1.45vw, 22px) 0;
}

.category-hero-copy h1 {
    max-width: 12ch;
    margin: 6px 0 0;
    color: #101b20;
    font-size: clamp(2.85rem, 5.25vw, 5.9rem);
    font-weight: 650;
    letter-spacing: -.065em;
    line-height: .9;
    text-wrap: balance;
}

.category-hero-copy > p:not(.section-kicker) {
    max-width: 64ch;
    margin: 16px 0 0;
    color: #5c6f76;
    font-size: .94rem;
    line-height: 1.55;
}

.category-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 15px;
}

.category-hero-meta span {
    border: 1px solid #c3d0d3;
    border-radius: 2px;
    padding: 7px 9px;
    background: rgba(255,255,255,.68);
    color: #63757b;
    font-family: var(--font-mono);
    font-size: .57rem;
    font-weight: 600;
    letter-spacing: .07em;
}

.category-hero-art {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 260px;
    overflow: hidden;
    border: 1px solid #b8c7cb;
    border-radius: 2px;
    background:
        radial-gradient(circle at 72% 18%, rgba(76,211,229,.22), transparent 33%),
        linear-gradient(135deg, #0d171c, #10272f 70%, #12343d);
}

.category-art-grid {
    position: absolute;
    inset: 0;
    opacity: .35;
    background:
        linear-gradient(rgba(126,223,235,.10) 1px, transparent 1px),
        linear-gradient(90deg, rgba(126,223,235,.10) 1px, transparent 1px);
    background-size: 24px 24px;
    mask-image: linear-gradient(to bottom, #000, transparent 90%);
}

.category-hero-art::after {
    content: "";
    position: absolute;
    inset: 12px;
    border: 1px solid rgba(176,235,243,.14);
    pointer-events: none;
}

.category-hero-art img {
    position: relative;
    z-index: 1;
    width: min(94%, 560px);
    max-height: 295px;
    object-fit: contain;
    filter: drop-shadow(0 20px 28px rgba(0,0,0,.34));
}

.category-hero-art > b {
    position: absolute;
    z-index: 2;
    right: 14px;
    bottom: 11px;
    max-width: calc(100% - 28px);
    color: rgba(209,246,250,.55);
    font-family: var(--font-mono);
    font-size: .56rem;
    font-weight: 600;
    letter-spacing: .11em;
    text-align: right;
}

.category-switcher {
    display: flex;
    gap: 5px;
    margin-top: 12px;
    overflow-x: auto;
    padding: 0 0 5px;
    scrollbar-width: thin;
}

.category-switcher a {
    flex: 0 0 auto;
    border: 1px solid #c3d0d3;
    border-radius: 2px;
    padding: 8px 10px;
    background: rgba(255,255,255,.78);
    color: #61737a;
    font-family: var(--font-mono);
    font-size: .58rem;
    font-weight: 600;
    letter-spacing: .055em;
    transition: border-color .2s ease, background-color .2s ease, color .2s ease;
}

.category-switcher a:hover {
    border-color: #35b85d;
    color: #238f4a;
}

.category-switcher a[aria-current="page"] {
    border-color: #0f232b;
    background: #0f232b;
    color: #effcff;
}

.category-archive {
    margin-top: 3px;
}

.category-game-card .archive-game-media {
    aspect-ratio: 16 / 10;
}

.category-game-media--art {
    display: grid;
    place-items: center;
    background:
        radial-gradient(circle at 65% 30%, rgba(64,199,218,.24), transparent 31%),
        linear-gradient(145deg, #0a1318, #102731);
}

.category-game-media--art::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: .28;
    background:
        linear-gradient(rgba(124,220,234,.09) 1px, transparent 1px),
        linear-gradient(90deg, rgba(124,220,234,.09) 1px, transparent 1px);
    background-size: 18px 18px;
}

.category-game-media--art img {
    width: 91%;
    height: 91%;
    object-fit: contain;
    filter: drop-shadow(0 14px 16px rgba(0,0,0,.4));
}

.category-game-media--art:hover img {
    transform: scale(1.035);
}

.category-art-label {
    position: absolute;
    right: 8px;
    bottom: 7px;
    border: 1px solid rgba(223,249,252,.22);
    border-radius: 2px;
    padding: 4px 6px;
    background: rgba(7,17,21,.76);
    color: rgba(220,249,252,.72);
    font-family: var(--font-mono);
    font-size: .49rem;
    font-weight: 600;
    letter-spacing: .08em;
}

.category-game-body {
    grid-template-rows: auto minmax(2.25em, auto) 1fr auto;
    min-height: 158px;
}

.category-game-route {
    align-self: end;
    color: #88979c;
    font-family: var(--font-mono);
    font-size: .56rem;
    font-weight: 600;
    letter-spacing: .06em;
}

.category-end-cta p {
    max-width: 72ch;
}

@media (max-width: 940px) {
    .category-hero {
        grid-template-columns: 1fr;
    }
    .category-hero-copy {
        min-height: 0;
    }
    .category-hero-art {
        min-height: 280px;
    }
    .category-hero-copy h1 {
        max-width: 14ch;
    }
}

@media (max-width: 600px) {
    .category-page-head {
        width: calc(100% - 20px);
        padding-top: 24px;
    }
    .category-hero {
        gap: 10px;
        margin-top: 23px;
        padding-top: 14px;
    }
    .category-hero-copy {
        padding: 11px 0 7px;
        text-align: center;
    }
    .category-hero-copy .section-kicker {
        justify-content: center;
    }
    .category-hero-copy h1 {
        max-width: 100%;
        font-size: clamp(2.5rem, 13vw, 4.15rem);
        line-height: .92;
    }
    .category-hero-copy > p:not(.section-kicker) {
        margin: 15px auto 0;
        font-size: .86rem;
    }
    .category-hero-meta {
        justify-content: center;
        margin-top: 15px;
    }
    .category-hero-meta span {
        padding: 6px 7px;
        font-size: .5rem;
    }
    .category-hero-art {
        min-height: 215px;
    }
    .category-hero-art img {
        width: min(92%, 440px);
        max-height: 205px;
    }
    .category-switcher {
        margin-top: 8px;
    }
    .category-switcher a {
        padding: 7px 8px;
        font-size: .52rem;
    }
    .category-game-body {
        min-height: 132px;
        padding: 8px;
    }
    .category-game-route {
        font-size: .49rem;
    }
    .category-art-label {
        font-size: .43rem;
    }
}

/* v1.1: Every category card now uses the game's own locally stored Y8 thumbnail
   and carries readable game copy instead of recycling the category hero artwork. */
.category-game-card .archive-game-media {
    aspect-ratio: 4 / 3;
    background: #0c1519;
}

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

.category-game-body {
    grid-template-rows: auto auto minmax(4.8em, 1fr) auto auto;
    min-height: 248px;
}

.category-game-description {
    display: -webkit-box;
    overflow: hidden;
    margin: 0;
    color: #66787e;
    font-size: .78rem;
    line-height: 1.48;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
}

.category-game-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-self: end;
    min-height: 23px;
}

.category-game-tags span {
    max-width: 100%;
    overflow: hidden;
    border: 1px solid #d2dcde;
    border-radius: 2px;
    padding: 3px 5px;
    color: #7c8b90;
    font-family: var(--font-mono);
    font-size: .45rem;
    font-weight: 600;
    letter-spacing: .045em;
    line-height: 1;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 600px) {
    .category-game-body {
        min-height: 218px;
    }

    .category-game-description {
        font-size: .69rem;
        line-height: 1.42;
        -webkit-line-clamp: 4;
    }

    .category-game-tags span {
        font-size: .4rem;
    }
}

.category-game-description.is-syncing {
    position: relative;
}

.category-game-description.is-syncing::after {
    content: "";
    display: inline-block;
    width: 1.8em;
    height: 1px;
    margin-left: .55em;
    vertical-align: middle;
    background: currentColor;
    opacity: .35;
    animation: ant-category-sync 1.1s ease-in-out infinite;
}

@keyframes ant-category-sync {
    0%, 100% { transform: scaleX(.35); transform-origin: left; opacity: .2; }
    50% { transform: scaleX(1); transform-origin: left; opacity: .55; }
}

/* ============================================================
   CATEGORY MAST v2 — animated ANT.com brand + telemetry + runner
   ============================================================ */
.category-page-head {
    padding-top: 22px;
}

.category-mast {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(260px, 1fr) auto;
    align-items: center;
    gap: clamp(20px, 3.8vw, 54px);
    min-height: 112px;
    overflow: hidden;
    border: 1px solid #bdc9cc;
    border-top: 2px solid #16252c;
    border-radius: 2px;
    padding: 14px 18px 24px;
    background:
        radial-gradient(circle at 88% 12%, rgba(67, 205, 224, .12), transparent 28%),
        linear-gradient(90deg, rgba(255,255,255,.92), rgba(244,249,250,.92));
}

.category-mast::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: .42;
    pointer-events: none;
    background:
        linear-gradient(rgba(76, 121, 134, .055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(76, 121, 134, .055) 1px, transparent 1px);
    background-size: 24px 24px;
    mask-image: linear-gradient(90deg, #000 0 74%, transparent 100%);
}

.category-mast::after {
    content: "";
    position: absolute;
    top: -2px;
    left: 0;
    width: min(240px, 28%);
    height: 2px;
    background: linear-gradient(90deg, #6ee56f, #57c9ff);
}

.category-mast > * {
    position: relative;
    z-index: 2;
}

.category-mast-brand {
    display: block;
    color: inherit;
    text-decoration: none;
}

.category-mast .category-mast-logo {
    gap: 12px;
    margin: 0;
}

.category-mast .category-mast-logo .ant-logo-mark {
    width: 54px;
}

.category-mast .category-mast-logo .ant-logo-mark b {
    /* The shared logo glyph is absolutely anchored to the full octagon.
       Keep it full-size here too; fixed pixel dimensions combined with
       inset:0 pinned the animated A/N/T to the top-left on mobile. */
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    margin: 0;
    padding: 0;
    font-size: 1.72rem;
    line-height: 1;
    text-align: center;
}

.category-mast .category-mast-logo .ant-logo-type {
    gap: 4px;
}

/* Category mast logo alignment is self-contained so cached homepage CSS cannot
   displace the animated glyphs at narrow breakpoints. */
.category-mast .category-mast-logo .ant-logo-mark > .ant-logo-glyph {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    width: 100%;
    height: 100%;
    place-items: center;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    line-height: 1;
    text-align: center;
}

.category-mast .category-mast-logo .ant-logo-glyph-state {
    position: absolute;
    inset: 0;
    display: grid;
    width: 100%;
    height: 100%;
    place-items: center;
    margin: 0;
    padding: 0 0 .055em;
    box-sizing: border-box;
    line-height: 1;
    text-align: center;
    transform-origin: 50% 50%;
}

.category-mast .category-mast-logo .ant-logo-type strong {
    font-size: clamp(2.25rem, 3.4vw, 3.6rem);
}

.category-mast .category-mast-logo .ant-logo-type b {
    font-size: clamp(1rem, 1.45vw, 1.55rem);
    letter-spacing: .01em;
}

.category-mast .category-mast-logo .ant-logo-type small {
    font-size: .51rem;
    letter-spacing: .11em;
}

.category-mast-copy {
    min-width: 0;
    padding-left: clamp(16px, 2.6vw, 34px);
    border-left: 1px solid #ced9dc;
}

.category-mast-kicker {
    display: block;
    color: #71838a;
    font-family: var(--font-mono);
    font-size: .55rem;
    font-weight: 600;
    letter-spacing: .105em;
}

.category-mast-copy > strong {
    display: block;
    overflow: hidden;
    margin-top: 6px;
    color: #15232a;
    font-size: clamp(1.2rem, 2.15vw, 2rem);
    font-weight: 650;
    letter-spacing: -.035em;
    line-height: 1;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.category-mast-labels {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 11px;
}

.category-mast-labels span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border: 1px solid #c8d4d7;
    border-radius: 2px;
    padding: 5px 7px;
    background: rgba(255,255,255,.68);
    color: #718188;
    font-family: var(--font-mono);
    font-size: .45rem;
    font-weight: 600;
    letter-spacing: .075em;
}

.category-mast-labels i {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #3bc8d9;
    box-shadow: 0 0 0 3px rgba(59,200,217,.12);
}

.category-mast-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(74px, 1fr));
    border: 1px solid #c5d0d3;
    background: rgba(255,255,255,.72);
}

.category-mast-actions a {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 10px;
    min-height: 46px;
    padding: 0 10px;
    color: #31434a;
    font-family: var(--font-mono);
    font-size: .51rem;
    font-weight: 600;
    letter-spacing: .07em;
    text-decoration: none;
}

.category-mast-actions a + a { border-left: 1px solid #d4dfe1; }
.category-mast-actions a:hover { background: #102027; color: #effcff; }
.category-mast-actions b { color: #1593a9; font-size: .9rem; }

.category-ant-runway {
    position: absolute;
    z-index: 4;
    right: 18px;
    bottom: 6px;
    left: 18px;
    height: 24px;
    pointer-events: none;
    --ant-track: #b6c6ca;
}

.category-ant-path {
    position: absolute;
    right: 0;
    bottom: 5px;
    left: 0;
    height: 1px;
    opacity: .92;
    background: linear-gradient(90deg, transparent, var(--ant-track) 5%, var(--ant-track) 95%, transparent);
}

.category-ant-dots {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.category-ant-dots i {
    position: absolute;
    bottom: 3px;
    width: 5px;
    height: 5px;
    border: 1px solid rgba(12, 58, 67, .15);
    border-radius: 50%;
    background: #53cbdc;
    box-shadow: 0 0 0 2px rgba(83, 203, 220, .08);
    transition: opacity .18s ease, transform .18s ease;
}

.category-ant-dots i:nth-child(1) { left: 7%; }
.category-ant-dots i:nth-child(2) { left: 18%; background: #6ee56f; }
.category-ant-dots i:nth-child(3) { left: 31%; }
.category-ant-dots i:nth-child(4) { left: 43%; background: #6ee56f; }
.category-ant-dots i:nth-child(5) { left: 57%; }
.category-ant-dots i:nth-child(6) { left: 69%; background: #6ee56f; }
.category-ant-dots i:nth-child(7) { left: 82%; }
.category-ant-dots i:nth-child(8) { left: 93%; background: #6ee56f; }

.category-ant-dots i.is-collected {
    opacity: 0;
    transform: translateY(-5px) scale(.2);
}

.category-ant-hint {
    position: absolute;
    right: 2px;
    top: -7px;
    color: #788a90;
    font-family: var(--font-mono);
    font-size: .34rem;
    font-weight: 700;
    letter-spacing: .12em;
    opacity: .7;
}

.category-mini-ant {
    --ant-x: 0px;
    --ant-facing: 1;
    position: absolute;
    bottom: 1px;
    left: 0;
    width: 52px;
    height: 21px;
    margin: 0;
    padding: 0;
    border: 0;
    appearance: none;
    background: transparent;
    cursor: pointer;
    pointer-events: auto;
    touch-action: manipulation;
    transform: translate3d(var(--ant-x), 0, 0) scaleX(var(--ant-facing));
    transform-origin: 50% 100%;
    filter: drop-shadow(0 2px 2px rgba(9,21,26,.16));
    will-change: transform;
}

.category-mini-ant:focus-visible {
    outline: 1px dashed #1593a9;
    outline-offset: 2px;
}

.mini-ant-body {
    position: absolute;
    inset: 0;
    display: block;
    transform-origin: 11px 16px;
    transition: transform .18s ease;
}

.category-mini-ant i,
.category-mini-ant b,
.category-mini-ant em {
    position: absolute;
    display: block;
}

.mini-ant-head,
.mini-ant-thorax,
.mini-ant-abdomen {
    top: 7px;
    border-radius: 50%;
    background: linear-gradient(145deg, #4a2b22, #17100e 68%, #080808);
}

.mini-ant-head { left: 32px; width: 10px; height: 9px; }
.mini-ant-thorax { left: 22px; width: 11px; height: 10px; }
.mini-ant-abdomen { left: 5px; top: 5px; width: 19px; height: 13px; transform: rotate(-7deg); }

.mini-ant-leg {
    left: 23px;
    top: 13px;
    width: 15px;
    height: 1px;
    border-radius: 99px;
    background: #251713;
    transform-origin: 0 50%;
    animation: category-ant-leg .34s ease-in-out infinite alternate;
}

.mini-ant-leg-1 { transform: rotate(30deg); }
.mini-ant-leg-2 { top: 10px; transform: rotate(-17deg); animation-delay: -.17s; }
.mini-ant-leg-3 { left: 20px; transform: rotate(155deg); animation-delay: -.08s; }
.mini-ant-leg-4 { left: 20px; top: 10px; transform: rotate(205deg); animation-delay: -.25s; }
.mini-ant-leg-5 { left: 29px; transform: rotate(55deg); animation-delay: -.12s; }
.mini-ant-leg-6 { left: 28px; top: 10px; transform: rotate(325deg); animation-delay: -.29s; }

.mini-ant-antenna {
    left: 39px;
    top: 7px;
    width: 10px;
    height: 1px;
    border-radius: 99px;
    background: #251713;
    transform-origin: 0 50%;
}
.mini-ant-antenna-1 { transform: rotate(-27deg); }
.mini-ant-antenna-2 { top: 10px; transform: rotate(23deg); }

.category-mini-ant.is-paused .mini-ant-leg {
    animation-play-state: paused;
}

.category-mini-ant.is-standing .mini-ant-body {
    transform: translateY(-5px) rotate(-54deg);
}

.category-mini-ant.is-standing .mini-ant-antenna-1 { transform: rotate(-62deg); }
.category-mini-ant.is-standing .mini-ant-antenna-2 { transform: rotate(-12deg); }

.category-mini-ant.is-picking .mini-ant-body {
    animation: category-ant-pick .26s ease both;
}

.category-mini-ant.is-boosted .mini-ant-leg {
    animation-duration: .16s;
}

.category-mini-ant.is-boosted {
    filter: drop-shadow(0 2px 2px rgba(9,21,26,.16)) drop-shadow(-7px 0 5px rgba(83,203,220,.12));
}

html:not(.category-ant-js) .category-mini-ant {
    animation: category-ant-travel 13s linear infinite;
}

@keyframes category-ant-travel {
    0% { left: 0; transform: translateX(0) scaleX(1); }
    46% { left: calc(100% - 52px); transform: translateX(0) scaleX(1); }
    49% { left: calc(100% - 52px); transform: translateX(0) scaleX(-1); }
    96% { left: 0; transform: translateX(0) scaleX(-1); }
    100% { left: 0; transform: translateX(0) scaleX(1); }
}

@keyframes category-ant-leg {
    from { margin-top: -1px; }
    to { margin-top: 2px; }
}

@keyframes category-ant-pick {
    0%, 100% { transform: translateY(0) rotate(0); }
    45% { transform: translateY(2px) rotate(7deg); }
}

.category-hero {
    margin-top: 14px;
}

.category-hero-copy h1 {
    font-size: clamp(2.85rem, 5.25vw, 5.9rem);
}

@media (max-width: 1180px) {
    .category-mast {
        grid-template-columns: auto minmax(0, 1fr);
        gap: 12px 20px;
        padding-bottom: 25px;
    }
    .category-mast-actions {
        grid-column: 1 / -1;
        justify-self: end;
        width: min(100%, 280px);
    }
}

@media (max-width: 640px) {
    .category-page-head { padding-top: 12px; }
    .category-mast {
        grid-template-columns: 1fr;
        gap: 12px;
        min-height: 0;
        padding: 14px 12px 25px;
        text-align: center;
    }
    .category-mast-brand { justify-self: center; }
    .category-mast .category-mast-logo { gap: 9px; }
    .category-mast .category-mast-logo .ant-logo-mark { width: 44px; }
    .category-mast .category-mast-logo .ant-logo-mark b {
        width: 100%;
        height: 100%;
        font-size: 1.4rem;
    }
    .category-mast .category-mast-logo .ant-logo-type strong { font-size: 2.15rem; }
    .category-mast .category-mast-logo .ant-logo-type b { font-size: .98rem; }
    .category-mast .category-mast-logo .ant-logo-type small { font-size: .42rem; }
    .category-mast-copy { padding: 11px 0 0; border-top: 1px solid #d1dcde; border-left: 0; }
    .category-mast-copy > strong { white-space: normal; font-size: 1.08rem; line-height: 1.08; }
    .category-mast-labels { justify-content: center; }
    .category-mast-labels span { font-size: .4rem; }
    .category-mast-actions { grid-column: auto; justify-self: center; width: 100%; max-width: 320px; }
    .category-ant-runway { right: 10px; left: 10px; }
    .category-mini-ant { width: 46px; transform-origin: bottom left; }
    .mini-ant-body { transform: scale(.88); transform-origin: 8px 17px; }
    .category-mini-ant.is-standing .mini-ant-body { transform: translateY(-4px) rotate(-54deg) scale(.88); }
    .category-ant-hint { font-size: .31rem; }
    .category-hero { margin-top: 7px; }
}

@media (prefers-reduced-motion: reduce) {
    .category-mini-ant,
    .mini-ant-leg,
    .category-mini-ant.is-picking .mini-ant-body { animation: none !important; }
    .category-ant-dots i { transition: none; }
}

/* ============================================================
   CATEGORY TRIVIA v1.3 — fills the wide hero's dead center space
   ============================================================ */
@media (min-width: 1281px) {
    .category-hero {
        grid-template-columns: minmax(0, .98fr) minmax(260px, .48fr) minmax(390px, .82fr);
        gap: 14px;
    }
}

.category-trivia-card {
    position: relative;
    display: grid;
    grid-template-rows: auto 1fr auto;
    align-self: stretch;
    min-width: 0;
    min-height: 260px;
    overflow: hidden;
    border: 1px solid #bbc9cc;
    border-top: 2px solid #17272e;
    border-radius: 2px;
    padding: 15px 16px 17px;
    background:
        radial-gradient(circle at 84% 17%, rgba(70, 204, 224, .13), transparent 27%),
        linear-gradient(145deg, rgba(255,255,255,.95), rgba(238,247,249,.96));
    color: #122128;
    cursor: pointer;
    isolation: isolate;
}

.category-trivia-card::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    opacity: .48;
    pointer-events: none;
    background:
        radial-gradient(circle at 9% 18%, rgba(255,121,53,.55) 0 1px, transparent 1.5px),
        radial-gradient(circle at 77% 71%, rgba(48,184,205,.55) 0 1px, transparent 1.5px),
        linear-gradient(rgba(65,106,119,.055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(65,106,119,.055) 1px, transparent 1px);
    background-size: 73px 71px, 91px 89px, 22px 22px, 22px 22px;
}

.category-trivia-card::after {
    content: "";
    position: absolute;
    top: -2px;
    left: 0;
    width: 41%;
    height: 2px;
    background: linear-gradient(90deg, #6ee56f, #57c9ff);
}

.category-trivia-card:focus-visible {
    outline: 2px solid #1ba7bd;
    outline-offset: 3px;
}

.category-trivia-head,
.category-trivia-foot {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-family: var(--font-mono);
    font-weight: 600;
    letter-spacing: .08em;
}

.category-trivia-head {
    padding-bottom: 12px;
    border-bottom: 1px solid #d3dee0;
    color: #52676f;
    font-size: .5rem;
}

.category-trivia-head > span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #0d7f96;
}

.category-trivia-head i {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #6ee56f;
    box-shadow: 0 0 0 3px rgba(255,121,53,.1);
}

.category-trivia-head small,
.category-trivia-foot small {
    color: #84949a;
    font: inherit;
    white-space: nowrap;
}

.category-trivia-head b {
    color: #283b42;
    font: inherit;
}

.category-trivia-copy {
    display: grid;
    align-content: center;
    gap: 11px;
    min-height: 0;
    padding: 17px 0 15px;
    transition: opacity .17s ease, transform .17s ease;
}

.category-trivia-copy > span {
    color: #14242b;
    font-family: var(--font-mono);
    font-size: clamp(.66rem, .78vw, .88rem);
    font-weight: 700;
    letter-spacing: .085em;
    line-height: 1.25;
}

.category-trivia-copy p {
    margin: 0;
    color: #5b7078;
    font-size: clamp(.78rem, .87vw, .97rem);
    line-height: 1.6;
}

.category-trivia-card.is-changing .category-trivia-copy {
    opacity: 0;
    transform: translateY(4px);
}

.category-trivia-foot {
    padding-top: 10px;
    border-top: 1px solid #d3dee0;
    color: #74888f;
    font-size: .46rem;
}

.category-trivia-foot > span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.category-trivia-progress {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 2px;
    overflow: hidden;
    background: rgba(16,36,43,.08);
}

.category-trivia-progress i {
    display: block;
    width: 100%;
    height: 100%;
    transform: scaleX(0);
    transform-origin: left center;
    background: linear-gradient(90deg, #6ee56f, #57c9ff);
}

@keyframes categoryTriviaProgress {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
}

@media (min-width: 941px) and (max-width: 1280px) {
    .category-hero {
        grid-template-columns: minmax(0, 1fr) minmax(360px, .88fr);
        grid-template-rows: auto auto;
        gap: 12px 14px;
    }

    .category-hero-copy {
        grid-column: 1;
        grid-row: 1;
    }

    .category-trivia-card {
        grid-column: 1;
        grid-row: 2;
        min-height: 165px;
    }

    .category-hero-art {
        grid-column: 2;
        grid-row: 1 / span 2;
        min-height: 100%;
    }
}

@media (max-width: 940px) {
    .category-trivia-card {
        min-height: 190px;
        padding: 14px 15px 16px;
    }

    .category-hero-art {
        grid-column: auto;
        grid-row: auto;
    }

    .category-trivia-copy {
        padding: 14px 0 12px;
    }
}

@media (max-width: 600px) {
    .category-trivia-card {
        min-height: 170px;
        text-align: left;
    }

    .category-trivia-head {
        font-size: .43rem;
    }

    .category-trivia-copy > span {
        font-size: .62rem;
    }

    .category-trivia-copy p {
        font-size: .75rem;
        line-height: 1.5;
    }

    .category-trivia-foot {
        font-size: .4rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .category-trivia-copy {
        transition: none;
    }

    .category-trivia-progress i {
        animation: none !important;
    }
}


/* ============================================================
   CATEGORY TITLE / RHYTHM NORMALIZATION v1.4
   The mast keeps the official category name; the hero uses a shorter
   game-oriented title. Medium widths wrap the mast controls before
   they can squeeze or overflow the content column.
   ============================================================ */
.category-page-head,
.category-mast,
.category-hero,
.category-switcher,
.category-archive {
    min-width: 0;
}

.category-mast-copy,
.category-hero-copy,
.category-trivia-card,
.category-hero-art {
    min-width: 0;
}

.category-hero-copy h1 {
    overflow-wrap: normal;
    word-break: normal;
}

@media (min-width: 1181px) and (max-width: 1380px) {
    .category-mast {
        grid-template-columns: auto minmax(220px, 1fr) auto;
        gap: 16px 24px;
    }
    .category-mast .category-mast-logo .ant-logo-type strong {
        font-size: clamp(2.2rem, 2.8vw, 3rem);
    }
    .category-mast-copy > strong {
        font-size: clamp(1.1rem, 1.8vw, 1.65rem);
    }
    .category-mast-labels span {
        padding: 4px 6px;
        font-size: .42rem;
    }
    .category-mast-actions {
        grid-template-columns: repeat(2, minmax(66px, 1fr));
    }
}

@media (min-width: 941px) and (max-width: 1280px) {
    .category-hero-copy {
        min-height: 220px;
        padding: 10px 0 6px;
    }
    .category-hero-copy h1 {
        max-width: 10.5ch;
        font-size: clamp(3rem, 6vw, 5.2rem);
    }
    .category-hero-art {
        min-height: 100%;
    }
}

@media (max-width: 940px) {
    .category-page-head {
        padding-bottom: 10px;
    }
    .category-hero {
        margin-top: 10px;
        padding-top: 11px;
    }
    .category-hero-copy h1 {
        max-width: 100%;
        text-align: center;
    }
}

@media (max-width: 640px) {
    .category-mast-actions {
        justify-self: center;
    }
    .category-hero-copy > p:not(.section-kicker) {
        margin-top: 12px;
    }
    .category-hero-meta {
        margin-top: 12px;
    }
}

/* ============================================================
   GROMBI CATEGORY BRAND v1
   ============================================================ */
.category-mast {
    background:
        radial-gradient(circle at 88% 12%, rgba(112,233,120,.12), transparent 28%),
        radial-gradient(circle at 72% 90%, rgba(87,201,255,.08), transparent 24%),
        linear-gradient(90deg, rgba(255,255,255,.94), rgba(242,249,244,.94));
}

.category-mast-labels i {
    background: #5cda73;
    box-shadow: 0 0 0 3px rgba(92,218,115,.12);
}

.category-mast-actions a:hover {
    background: #123120;
    color: #effff1;
}

.category-mast-actions b { color: #2eaa57; }

.category-mast .category-mast-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.category-mast .category-mast-logo .grombi-logo-mark { width: 54px; }
.category-mast .category-mast-logo .grombi-logo-mark > b { font-size: 1.85rem; }
.category-mast .category-mast-logo .grombi-logo-eye { width: 13px; top: -6px; box-shadow: inset 0 0 0 3px #57c9ff, inset 0 0 0 5px #0c2920; }
.category-mast .category-mast-logo .grombi-logo-eye--one { left: 9px; }
.category-mast .category-mast-logo .grombi-logo-eye--two { right: 8px; }
.category-mast .category-mast-logo .grombi-logo-type { gap: 4px; }
.category-mast .category-mast-logo .grombi-logo-type strong { font-size: clamp(2.1rem, 3.1vw, 3.35rem); }
.category-mast .category-mast-logo .grombi-logo-type b { font-size: clamp(.96rem, 1.35vw, 1.42rem); }
.category-mast .category-mast-logo .grombi-logo-type small { font-size: .49rem; letter-spacing: .1em; }

.category-grombi-runway {
    position: absolute;
    z-index: 4;
    right: 18px;
    bottom: 6px;
    left: 18px;
    height: 24px;
    pointer-events: none;
    --grombi-track: #b8cbc0;
}

.category-grombi-path {
    position: absolute;
    right: 0;
    bottom: 5px;
    left: 0;
    height: 1px;
    opacity: .92;
    background: linear-gradient(90deg, transparent, var(--grombi-track) 5%, var(--grombi-track) 95%, transparent);
}

.category-grombi-dots { position: absolute; inset: 0; pointer-events: none; }
.category-grombi-dots i {
    position: absolute;
    bottom: 3px;
    width: 5px;
    height: 5px;
    border: 1px solid rgba(18,78,42,.15);
    border-radius: 50%;
    background: #57c9ff;
    box-shadow: 0 0 0 2px rgba(87,201,255,.08);
    transition: opacity .18s ease, transform .18s ease;
}
.category-grombi-dots i:nth-child(1) { left: 7%; }
.category-grombi-dots i:nth-child(2) { left: 18%; background: #70e978; }
.category-grombi-dots i:nth-child(3) { left: 31%; }
.category-grombi-dots i:nth-child(4) { left: 43%; background: #70e978; }
.category-grombi-dots i:nth-child(5) { left: 57%; }
.category-grombi-dots i:nth-child(6) { left: 69%; background: #70e978; }
.category-grombi-dots i:nth-child(7) { left: 82%; }
.category-grombi-dots i:nth-child(8) { left: 93%; background: #70e978; }
.category-grombi-dots i.is-collected { opacity: 0; transform: translateY(-5px) scale(.2); }

.category-grombi-hint {
    position: absolute;
    right: 2px;
    top: -7px;
    color: #70857a;
    font-family: var(--font-mono);
    font-size: .34rem;
    font-weight: 700;
    letter-spacing: .12em;
    opacity: .7;
}

.category-mini-grombi {
    --grombi-x: 0px;
    --grombi-facing: 1;
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 52px;
    height: 24px;
    margin: 0;
    padding: 0;
    border: 0;
    appearance: none;
    background: transparent;
    cursor: pointer;
    pointer-events: auto;
    touch-action: manipulation;
    transform: translate3d(var(--grombi-x),0,0) scaleX(var(--grombi-facing));
    transform-origin: 50% 100%;
    filter: drop-shadow(0 3px 2px rgba(13,70,42,.17));
    will-change: transform;
}

.category-mini-grombi:focus-visible { outline: 1px dashed #36b760; outline-offset: 2px; }

.mini-grombi-body {
    position: absolute;
    left: 6px;
    bottom: 2px;
    width: 38px;
    height: 20px;
    border: 1px solid #1e653c;
    border-radius: 52% 48% 47% 53% / 58% 55% 45% 42%;
    background: linear-gradient(145deg,#8af08a,#4fd36c 52%,#279d50);
    box-shadow: inset 0 -4px 7px rgba(14,90,48,.18);
    transform-origin: 50% 100%;
    animation: category-grombi-bob .48s ease-in-out infinite alternate;
}

.mini-grombi-eye {
    position: absolute;
    top: -5px;
    width: 10px;
    height: 10px;
    border: 1px solid #285842;
    border-radius: 50%;
    background: #fff;
    box-shadow: inset 0 0 0 3px #57c9ff, inset 0 0 0 4px #142a21;
}
.mini-grombi-eye--one { left: 7px; }
.mini-grombi-eye--two { right: 6px; }
.mini-grombi-mouth {
    position: absolute;
    right: 6px;
    bottom: 4px;
    width: 10px;
    height: 4px;
    border-bottom: 1px solid #17462d;
    border-radius: 50%;
    transform: rotate(-7deg);
}
.mini-grombi-spark {
    position: absolute;
    left: -6px;
    top: 8px;
    width: 8px;
    height: 2px;
    border-radius: 999px;
    background: #57c9ff;
    opacity: 0;
}

.category-mini-grombi.is-paused .mini-grombi-body { animation-play-state: paused; }
.category-mini-grombi.is-picking .mini-grombi-body { animation: category-grombi-pick .28s ease both; }
.category-mini-grombi.is-boosted .mini-grombi-body { animation-duration: .2s; }
.category-mini-grombi.is-boosted .mini-grombi-spark { animation: category-grombi-spark .32s linear infinite; }

html:not(.category-grombi-js) .category-mini-grombi { animation: category-grombi-travel 12s linear infinite; }

@keyframes category-grombi-bob { from { transform: translateY(0) scaleY(1); } to { transform: translateY(-2px) scaleY(.94); } }
@keyframes category-grombi-pick { 0%,100% { transform: translateY(0) rotate(0); } 45% { transform: translateY(3px) rotate(8deg) scale(.96,1.04); } }
@keyframes category-grombi-spark { from { transform: translateX(0); opacity: .7; } to { transform: translateX(-9px); opacity: 0; } }
@keyframes category-grombi-travel {
    0% { left: 0; transform: translateX(0) scaleX(1); }
    46% { left: calc(100% - 52px); transform: translateX(0) scaleX(1); }
    49% { left: calc(100% - 52px); transform: translateX(0) scaleX(-1); }
    96% { left: 0; transform: translateX(0) scaleX(-1); }
    100% { left: 0; transform: translateX(0) scaleX(1); }
}

.category-trivia-card {
    background:
        radial-gradient(circle at 84% 17%, rgba(112,233,120,.12), transparent 27%),
        linear-gradient(145deg, rgba(255,255,255,.96), rgba(240,249,242,.97));
}
.category-trivia-card::before {
    background:
        radial-gradient(circle at 9% 18%, rgba(112,233,120,.55) 0 1px, transparent 1.5px),
        radial-gradient(circle at 77% 71%, rgba(87,201,255,.52) 0 1px, transparent 1.5px),
        linear-gradient(rgba(55,112,76,.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(55,112,76,.05) 1px, transparent 1px);
    background-size: 73px 71px,91px 89px,22px 22px,22px 22px;
}
.category-trivia-head > span { color: #248f4c; }
.category-trivia-head i { background: #70e978; box-shadow: 0 0 0 3px rgba(112,233,120,.11); }
.category-trivia-card:focus-visible { outline-color: #35b85d; }
.category-switcher a:hover { border-color: #49cc6b; color: #238f4a; }
.category-switcher a[aria-current="page"] { border-color: #123120; background: #123120; color: #effff1; }

@media (max-width: 640px) {
    .category-mast .category-mast-logo { gap: 8px; }
    .category-mast .category-mast-logo .grombi-logo-mark { width: 44px; }
    .category-mast .category-mast-logo .grombi-logo-mark > b { font-size: 1.5rem; }
    .category-mast .category-mast-logo .grombi-logo-eye { width: 10px; top: -5px; box-shadow: inset 0 0 0 2px #57c9ff, inset 0 0 0 4px #0c2920; }
    .category-mast .category-mast-logo .grombi-logo-eye--one { left: 7px; }
    .category-mast .category-mast-logo .grombi-logo-eye--two { right: 6px; }
    .category-mast .category-mast-logo .grombi-logo-type strong { font-size: 2rem; }
    .category-mast .category-mast-logo .grombi-logo-type b { font-size: .88rem; }
    .category-mast .category-mast-logo .grombi-logo-type small { font-size: .39rem; }
    .category-grombi-runway { right: 10px; left: 10px; }
    .category-mini-grombi { width: 46px; }
    .category-grombi-hint { font-size: .3rem; }
}

@media (prefers-reduced-motion: reduce) {
    .category-mini-grombi,
    .mini-grombi-body,
    .category-mini-grombi.is-picking .mini-grombi-body,
    .category-mini-grombi.is-boosted .mini-grombi-spark { animation: none !important; }
    .category-grombi-dots i { transition: none; }
}

/* ============================================================
   GROMBI CATEGORY INTERLINKS v2.1
   Replace the horizontal scroller with a responsive, wrapping
   directory grid. No visible scrollbar at any viewport width.
   ============================================================ */
.category-switcher {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
    gap: 7px;
    overflow: visible;
    margin-top: 13px;
    padding: 0;
    scrollbar-width: none;
}

.category-switcher::-webkit-scrollbar {
    display: none;
}

.category-switcher a {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
    min-height: 39px;
    overflow: hidden;
    border: 1px solid rgba(44, 101, 68, .22);
    border-radius: 13px 5px 13px 5px;
    padding: 8px 10px 8px 11px;
    background:
        radial-gradient(circle at 92% 20%, rgba(87, 201, 255, .12), transparent 32%),
        linear-gradient(145deg, rgba(255,255,255,.96), rgba(240,249,242,.96));
    color: #395b49;
    box-shadow: 0 4px 12px rgba(20, 72, 43, .045);
    font-size: .55rem;
    line-height: 1.18;
    letter-spacing: .045em;
    white-space: normal;
    text-wrap: balance;
    transition: transform .18s ease, border-color .18s ease, background-color .18s ease, color .18s ease, box-shadow .18s ease;
}

.category-switcher a::after {
    content: "↗";
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 18px;
    height: 18px;
    border: 1px solid rgba(46, 126, 75, .22);
    border-radius: 7px 3px 7px 3px;
    color: #2b9b52;
    font-family: var(--font-mono);
    font-size: .56rem;
    line-height: 1;
}

.category-switcher a:hover {
    transform: translateY(-1px);
    border-color: #49cc6b;
    background:
        radial-gradient(circle at 92% 20%, rgba(87, 201, 255, .16), transparent 34%),
        linear-gradient(145deg, #ffffff, #eefbf1);
    color: #197a3d;
    box-shadow: 0 7px 16px rgba(29, 124, 62, .08);
}

.category-switcher a[aria-current="page"] {
    border-color: #123120;
    background:
        radial-gradient(circle at 90% 16%, rgba(87, 201, 255, .19), transparent 34%),
        linear-gradient(145deg, #173d29, #0d2a20 72%);
    color: #f3fff5;
    box-shadow: 0 8px 18px rgba(13, 70, 39, .13);
}

.category-switcher a[aria-current="page"]::after {
    border-color: rgba(239,255,242,.2);
    background: linear-gradient(145deg, #69eb7c, #42bde9);
    color: #082117;
}

@media (max-width: 700px) {
    .category-switcher {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px;
        margin-top: 9px;
    }

    .category-switcher a {
        min-height: 42px;
        padding: 7px 8px 7px 9px;
        border-radius: 11px 4px 11px 4px;
        font-size: .49rem;
        letter-spacing: .025em;
    }

    .category-switcher a::after {
        width: 17px;
        height: 17px;
        font-size: .5rem;
    }
}


/* ============================================================
   GROMBI CATEGORY INTERLINKS v2.2
   Fixed 2 x 7 matrix: one directory title + 13 compact routes.
   ============================================================ */
.category-switcher {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(34px, auto));
    gap: 6px;
    width: 100%;
    margin-top: 12px;
    padding: 0;
    overflow: visible;
}

.category-switcher-title,
.category-switcher a {
    min-width: 0;
    min-height: 34px;
    box-sizing: border-box;
    border-radius: 10px 3px 10px 3px;
}

.category-switcher-title {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 1px;
    padding: 6px 9px;
    border: 1px solid #173d29;
    background:
        radial-gradient(circle at 90% 15%, rgba(87, 201, 255, .22), transparent 36%),
        linear-gradient(145deg, #173d29, #0c2b1f 72%);
    color: #effff2;
    line-height: 1;
    overflow: hidden;
}

.category-switcher-title b {
    color: #6fe985;
    font-family: var(--font-mono);
    font-size: .42rem;
    font-weight: 700;
    letter-spacing: .16em;
}

.category-switcher-title strong {
    max-width: 100%;
    color: #ffffff;
    font-family: var(--font-mono);
    font-size: .52rem;
    font-weight: 800;
    letter-spacing: .05em;
    white-space: nowrap;
}

.category-switcher a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 6px 5px;
    border: 1px solid rgba(44, 101, 68, .22);
    background:
        radial-gradient(circle at 92% 18%, rgba(87, 201, 255, .1), transparent 34%),
        linear-gradient(145deg, rgba(255,255,255,.97), rgba(240,249,242,.97));
    color: #355946;
    box-shadow: none;
    font-family: var(--font-mono);
    font-size: .53rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: .035em;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.category-switcher a::after {
    content: none;
    display: none;
}

.category-switcher a:hover {
    transform: translateY(-1px);
    border-color: #48c968;
    background: linear-gradient(145deg, #ffffff, #ecfaef);
    color: #197a3d;
    box-shadow: 0 5px 12px rgba(29, 124, 62, .07);
}

.category-switcher a[aria-current="page"] {
    border-color: #173d29;
    background:
        radial-gradient(circle at 88% 14%, rgba(87, 201, 255, .18), transparent 36%),
        linear-gradient(145deg, #1c5133, #103422 76%);
    color: #ffffff;
    box-shadow: inset 0 -2px 0 #66e17b;
}

@media (max-width: 700px) {
    .category-switcher {
        grid-template-columns: repeat(7, minmax(0, 1fr));
        grid-template-rows: repeat(2, 32px);
        gap: 4px;
        margin-top: 8px;
    }

    .category-switcher-title,
    .category-switcher a {
        min-height: 32px;
        border-radius: 8px 2px 8px 2px;
    }

    .category-switcher-title {
        padding: 4px 4px;
    }

    .category-switcher-title b {
        font-size: .34rem;
        letter-spacing: .08em;
    }

    .category-switcher-title strong {
        font-size: .38rem;
        letter-spacing: 0;
    }

    .category-switcher a {
        min-height: 32px;
        padding: 4px 2px;
        font-size: clamp(.35rem, 1.55vw, .46rem);
        letter-spacing: 0;
    }
}
