/* ==========================================================
   HOST WCG - site styles
   ========================================================== */

:root {
    --bg: #0b0b0f;
    --bg-deep: #070709;
    --surface: #14141b;
    --surface-2: #1c1c25;
    --border: #2a2a36;
    --text: #ece8e1;
    --muted: #a29d96;
    --accent: #c4161c;
    --accent-hover: #e2262d;
    --accent-soft: rgba(196, 22, 28, 0.15);

    --font-display: 'alegreya_scbold', Georgia, 'Times New Roman', serif;
    --font-display-heavy: 'alegreya_scextrabold', Georgia, 'Times New Roman', serif;
    --font-body: 'alegreya_scregular', Georgia, 'Times New Roman', serif;
    /* The Host font draws the resource symbols (! £ & % $ #). Use it only on those symbols, via .res */
    --font-resource: 'hostregular', 'alegreya_scregular', Georgia, serif;

    --container: 1280px;
    --gutter: clamp(1rem, 3vw, 1.5rem);
    --header-h: 72px;
    --radius: 6px;
    --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

body.nav-open {
    overflow: hidden;
}

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

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

h1,
h2,
h3 {
    font-family: var(--font-display);
    font-weight: normal;
    line-height: 1.15;
    margin: 0 0 0.5em;
}

p {
    margin: 0 0 1em;
}

button {
    font: inherit;
    color: inherit;
}

:focus-visible {
    outline: 2px solid var(--accent-hover);
    outline-offset: 3px;
}

/* Alegreya SC has a separate file per weight, so bold text uses the bold family instead of faking it. */
strong,
b {
    font-family: var(--font-display);
    font-weight: normal;
}

/* Resource symbols (! £ & % $ #) in the Host font. Wrap only the symbols, never words or prices. */
.res {
    font-family: var(--font-resource);
    font-style: normal;
    font-weight: normal;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.skip-link {
    position: absolute;
    left: 1rem;
    top: -100px;
    z-index: 2000;
    padding: 0.6rem 1rem;
    background: var(--accent);
    color: #fff;
}

.skip-link:focus {
    top: 1rem;
}

.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

/* ---------- Shared UI ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 1.6rem;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 2px;
    color: var(--text);
    line-height: 1.2;
    text-align: center;
    font-family: var(--font-display);
    font-size: 1rem;
    letter-spacing: 0.06em;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s, color 0.2s, transform 0.2s;
}

.btn--small {
    padding: 0.5rem 1.1rem;
    font-size: 0.9rem;
}

.btn--primary {
    background: var(--accent);
    color: #fff;
}

.btn--primary:hover {
    background: var(--accent-hover);
}

.btn--ghost {
    border-color: rgba(236, 232, 225, 0.45);
    color: var(--text);
}

.btn--ghost:hover {
    border-color: var(--text);
    background: rgba(236, 232, 225, 0.08);
}

.btn:disabled,
.btn[aria-disabled="true"] {
    opacity: 0.45;
    cursor: not-allowed;
}

.btn--primary:disabled:hover {
    background: var(--accent);
}

.btn--ghost:disabled:hover {
    border-color: rgba(236, 232, 225, 0.45);
    background: transparent;
}

.btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.tag {
    display: inline-block;
    font-family: var(--font-display);
    font-size: 0.8rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent-hover);
}

.eyebrow {
    display: block;
    margin-bottom: 0.5rem;
    font-family: var(--font-display);
    font-size: 0.95rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--accent-hover);
}

.link-arrow {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-family: var(--font-display);
    letter-spacing: 0.05em;
    color: var(--text);
}

.link-arrow::after {
    content: '\2192';
    transition: transform 0.2s var(--ease);
}

.link-arrow:hover::after,
a:hover .link-arrow::after {
    transform: translateX(4px);
}

.muted {
    color: var(--muted);
    font-family: var(--font-display);
}

/* ---------- Header ---------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    height: var(--header-h);
    background: rgba(7, 7, 9, 0.92);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.site-header__inner {
    display: flex;
    align-items: center;
    height: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.site-logo img {
    height: 46px;
    width: auto;
}

.main-nav {
    display: flex;
    align-items: center;
    flex: 1;
    margin-left: 2.5rem;
}

.main-nav__list {
    display: flex;
    gap: 0.25rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.main-nav__item {
    position: relative;
}

.main-nav__link {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    height: var(--header-h);
    padding: 0 0.9rem;
    background: none;
    border: 0;
    font-family: var(--font-display);
    font-size: 1.05rem;
    letter-spacing: 0.04em;
    color: var(--text);
    cursor: pointer;
    position: relative;
}

.main-nav__link::after {
    content: '';
    position: absolute;
    left: 0.9rem;
    right: 0.9rem;
    bottom: 0;
    height: 3px;
    background: var(--accent);
    transform: scaleX(0);
    transition: transform 0.25s var(--ease);
}

.main-nav__item:hover>.main-nav__link::after,
.main-nav__item.is-open>.main-nav__link::after,
.main-nav__item.is-current>.main-nav__link::after {
    transform: scaleX(1);
}

.chevron {
    width: 7px;
    height: 7px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: translateY(-2px) rotate(45deg);
    transition: transform 0.2s;
}

.main-nav__item.is-open .chevron {
    transform: translateY(1px) rotate(-135deg);
}

.mega-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 340px;
    padding: 0.75rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-top: 0;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.6);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.2s, transform 0.2s var(--ease), visibility 0.2s;
}

.main-nav__item.is-open .mega-menu {
    opacity: 1;
    visibility: visible;
    transform: none;
}

@media (hover: hover) and (min-width: 1025px) {
    .main-nav__item:hover .mega-menu {
        opacity: 1;
        visibility: visible;
        transform: none;
    }
}

.mega-menu__list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.mega-menu__list a {
    display: block;
    padding: 0.7rem 0.9rem;
    border-left: 3px solid transparent;
    transition: background-color 0.15s, border-color 0.15s;
}

.mega-menu__list a:hover {
    background: var(--surface-2);
    border-left-color: var(--accent);
}

.mega-menu__title {
    display: block;
    font-family: var(--font-display);
    font-size: 1.05rem;
}

.mega-menu__desc {
    display: block;
    font-size: 0.85rem;
    color: var(--muted);
}

.main-nav__account {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-left: auto;
}

.main-nav__account .main-nav__link {
    padding: 0 0.5rem;
}

.main-nav__account .main-nav__link:hover::after {
    transform: scaleX(1);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    width: 44px;
    height: 44px;
    margin-left: auto;
    padding: 10px;
    background: none;
    border: 0;
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    height: 2px;
    background: var(--text);
    transition: transform 0.25s var(--ease), opacity 0.2s;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

@media (max-width: 1024px) {
    .nav-toggle {
        display: flex;
    }

    .main-nav {
        position: fixed;
        top: var(--header-h);
        right: 0;
        bottom: 0;
        width: min(380px, 100%);
        margin: 0;
        flex-direction: column;
        align-items: stretch;
        overflow-y: auto;
        background: var(--bg-deep);
        border-left: 1px solid var(--border);
        transform: translateX(100%);
        visibility: hidden;
        transition: transform 0.3s var(--ease), visibility 0.3s;
    }

    .main-nav.is-open {
        transform: none;
        visibility: visible;
    }

    .main-nav__list {
        flex-direction: column;
        gap: 0;
    }

    .main-nav__item {
        border-bottom: 1px solid var(--border);
    }

    .main-nav__link {
        width: 100%;
        height: 60px;
        justify-content: space-between;
        padding: 0 1.5rem;
        font-size: 1.2rem;
    }

    .main-nav__link::after {
        display: none;
    }

    .mega-menu {
        position: static;
        min-width: 0;
        padding: 0 0 0.75rem;
        border: 0;
        box-shadow: none;
        background: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        display: none;
    }

    .main-nav__item.is-open .mega-menu {
        display: block;
    }

    .mega-menu__list a {
        padding: 0.6rem 1.5rem 0.6rem 2rem;
    }

    .main-nav__account {
        flex-direction: column;
        align-items: stretch;
        margin: 0;
        padding: 1.5rem;
        gap: 1rem;
    }

    .main-nav__account .main-nav__link {
        height: auto;
        padding: 0;
        justify-content: flex-start;
    }
}

/* ---------- Hero ---------- */

.hero {
    background: var(--bg-deep);
}

.hero__slides {
    position: relative;
    width: 100%;
    aspect-ratio: 2650 / 1346;
    max-height: calc(100vh - var(--header-h) - 110px);
    min-height: 200px;
    overflow: hidden;
}

.hero__slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.9s var(--ease);
}

.hero__slide.is-active {
    opacity: 1;
    z-index: 1;
}

.hero__slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 85%;
    transform: scale(1.04);
    transition: transform 7s linear;
}

.hero__slide.is-active img {
    transform: scale(1);
}

.hero__tabs {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    max-width: 1440px;
    margin: 0 auto;
}

.hero__tab {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.1rem;
    padding: 1.1rem 1.5rem 1.2rem;
    background: none;
    border: 0;
    border-right: 1px solid var(--border);
    text-align: left;
    cursor: pointer;
    opacity: 0.55;
    transition: opacity 0.2s, background-color 0.2s;
}

.hero__tab:last-child {
    border-right: 0;
}

.hero__tab:hover,
.hero__tab.is-active {
    opacity: 1;
}

.hero__tab.is-active {
    background: var(--surface);
}

.hero__tab-tag {
    font-family: var(--font-display);
    font-size: 0.75rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent-hover);
}

.hero__tab-title {
    font-family: var(--font-display);
    font-size: 1.2rem;
    line-height: 1.2;
}

.hero__tab-sub {
    font-size: 0.85rem;
    color: var(--muted);
}

.hero__tab-progress {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--accent);
    transform-origin: left;
    transform: scaleX(0);
}

.hero__tab-progress {
    transition: transform 0.35s var(--ease);
}

.hero__tab.is-active .hero__tab-progress {
    transform: scaleX(1);
}

@media (max-width: 800px) {
    .hero__slides {
        max-height: none;
    }

    .hero__tabs {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
    }

    .hero__tabs::-webkit-scrollbar {
        display: none;
    }

    .hero__tab {
        flex: 0 0 auto;
        min-width: 45%;
        padding: 0.8rem 1rem;
        scroll-snap-align: start;
    }

    .hero__tab-sub {
        display: none;
    }

    .hero__tab-title {
        font-size: 1rem;
    }
}

/* ---------- Sections ---------- */

.section {
    padding: clamp(3rem, 7vw, 5.5rem) 0;
}

.section--dark {
    background: var(--bg-deep);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

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

.section-title {
    margin: 0;
    font-family: var(--font-display-heavy);
    font-size: clamp(1.8rem, 3.5vw, 2.6rem);
    letter-spacing: 0.02em;
}

/* ---------- News cards ---------- */

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 1.5rem;
}

.news-card {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 0.3s var(--ease), border-color 0.3s, box-shadow 0.3s;
}

.news-card.is-static:hover {
    transform: none;
    border-color: var(--border);
    box-shadow: none;
}

.news-card.is-static:hover .news-card__media img {
    transform: none;
}

.news-card:hover {
    transform: translateY(-4px);
    border-color: #3d3d4c;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
}

.news-card__media {
    aspect-ratio: 2650 / 1346;
    overflow: hidden;
    background: var(--surface-2);
}

.news-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--ease);
}

.news-card:hover .news-card__media img {
    transform: scale(1.06);
}

.news-card__body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 1.25rem 1.4rem 1.5rem;
}

.news-card__title {
    margin: 0.35rem 0 0.5rem;
    font-size: 1.35rem;
}

.news-card__desc {
    flex: 1;
    color: var(--muted);
    font-size: 0.95rem;
}

.news-card__more {
    font-family: var(--font-display);
    font-size: 0.95rem;
    color: var(--text);
}

.news-card__more::after {
    content: ' \2192';
}

.news-grid--feature {
    grid-template-columns: 1fr;
}

@media (min-width: 800px) {
    .news-grid--feature .news-card {
        flex-direction: row;
    }

    .news-grid--feature .news-card__media {
        flex: 0 0 62%;
    }

    .news-grid--feature .news-card__body {
        justify-content: center;
        padding: 2rem 2.5rem;
    }

    .news-grid--feature .news-card__title {
        font-size: 2rem;
    }

    .news-grid--feature .news-card__desc {
        flex: 0;
    }
}

/* ---------- Promo band ---------- */

.promo-band {
    position: relative;
    overflow: hidden;
    padding: clamp(4rem, 10vw, 7rem) 0;
    isolation: isolate;
}

.promo-band__bg {
    position: absolute;
    inset: 0;
    z-index: -1;
    background-size: cover;
    background-position: center 30%;
}

.promo-band__bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(11, 11, 15, 0.97) 0%, rgba(11, 11, 15, 0.88) 45%, rgba(11, 11, 15, 0.35) 100%);
}

.promo-band__inner {
    max-width: var(--container);
}

.promo-band__inner>* {
    max-width: 560px;
}

.promo-band__title {
    font-family: var(--font-display-heavy);
    font-size: clamp(2.2rem, 5vw, 3.6rem);
}

.promo-band p {
    color: #cfcac2;
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

/* ---------- Ways to play ---------- */

.play-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.play-card {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--border);
    border-top: 3px solid var(--accent);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 0.3s var(--ease), box-shadow 0.3s;
}

.play-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
}

.play-card__media {
    aspect-ratio: 2650 / 1346;
    overflow: hidden;
}

.play-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--ease);
}

.play-card:hover .play-card__media img {
    transform: scale(1.06);
}

.play-card__body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 1.4rem;
}

.play-card__body h3 {
    font-size: 1.5rem;
}

.play-card__body p {
    flex: 1;
    color: var(--muted);
    font-size: 0.95rem;
}

/* ---------- Featured cards ---------- */

.card-fan {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: clamp(1rem, 3vw, 2.5rem);
    perspective: 1000px;
}

.game-card {
    margin: 0;
    text-align: center;
}

.game-card img {
    width: 100%;
    border-radius: 4.5%;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.7);
    transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
    transition: transform 0.15s ease-out, box-shadow 0.3s;
    will-change: transform;
}

.game-card:hover img {
    box-shadow: 0 24px 50px rgba(0, 0, 0, 0.8), 0 0 30px var(--accent-soft);
}

.game-card figcaption,
.game-card__name {
    display: block;
    margin-top: 1rem;
    font-family: var(--font-display);
    font-size: 1.1rem;
    line-height: 1.25;
}

a.game-card {
    position: relative;
    display: block;
    color: var(--text);
}

a.game-card:hover .game-card__name {
    color: var(--accent-hover);
}

.game-card__new {
    position: absolute;
    top: -8px;
    left: -8px;
    z-index: 2;
    padding: 0.2rem 0.65rem;
    background: var(--accent);
    border: 2px solid var(--bg);
    border-radius: 999px;
    color: #fff;
    font-family: var(--font-display);
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

@media (max-width: 800px) {
    .card-fan {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ---------- Product scroller ---------- */

.scroller-controls {
    display: flex;
    gap: 0.5rem;
}

.scroller-btn {
    width: 44px;
    height: 44px;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--surface);
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    transition: border-color 0.2s, background-color 0.2s;
}

.scroller-btn:hover {
    border-color: var(--accent);
    background: var(--surface-2);
}

.product-scroller {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: max(var(--gutter), calc((100vw - var(--container)) / 2 + var(--gutter)));
    padding: 0 max(var(--gutter), calc((100vw - var(--container)) / 2 + var(--gutter))) 1rem;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}

.product-card {
    flex: 0 0 min(360px, 82vw);
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    scroll-snap-align: start;
}

.product-card__media {
    aspect-ratio: 2650 / 1346;
    overflow: hidden;
}

.product-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--ease);
}

.product-card__media:hover img {
    transform: scale(1.06);
}

.product-card__body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 1.25rem 1.4rem 1.5rem;
}

.product-card__body h3 {
    margin: 0.3rem 0 0.4rem;
    font-size: 1.4rem;
}

.product-card__body p {
    flex: 1;
    color: var(--muted);
    font-size: 0.95rem;
}

/* ---------- Community ---------- */

.community {
    background:
        radial-gradient(ellipse at 15% 50%, rgba(196, 22, 28, 0.18), transparent 60%),
        var(--bg-deep);
    border-top: 1px solid var(--border);
}

.community__inner {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 2.5rem;
    align-items: center;
}

.community__inner p {
    color: var(--muted);
    margin-top: 0.75rem;
}

.community__links {
    display: grid;
    gap: 1rem;
}

.social-card {
    display: flex;
    align-items: center;
    gap: 1.1rem;
    padding: 1.1rem 1.3rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: border-color 0.2s, transform 0.2s var(--ease);
}

.social-card:hover {
    border-color: var(--accent);
    transform: translateX(4px);
}

.social-card img {
    width: 40px;
    height: 40px;
}

.social-card span {
    color: var(--muted);
    font-size: 0.95rem;
}

.social-card strong {
    display: block;
    font-family: var(--font-display);
    font-weight: normal;
    font-size: 1.25rem;
    color: var(--text);
}

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

/* ---------- Inner page hero ---------- */

.page-hero {
    position: relative;
    overflow: hidden;
    padding: clamp(4rem, 10vw, 7rem) 0 clamp(3rem, 6vw, 4.5rem);
    border-bottom: 1px solid var(--border);
    isolation: isolate;
}

.page-hero__bg {
    position: absolute;
    inset: 0;
    z-index: -1;
    background-size: cover;
    background-position: center 30%;
}

.page-hero__bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(11, 11, 15, 0.55) 0%, rgba(11, 11, 15, 0.95) 100%),
        linear-gradient(90deg, rgba(11, 11, 15, 0.9) 0%, rgba(11, 11, 15, 0.3) 100%);
}

.page-hero__title {
    font-family: var(--font-display-heavy);
    font-size: clamp(2.6rem, 6vw, 4.2rem);
    margin-bottom: 0.25em;
}

.page-hero p {
    max-width: 560px;
    color: #cfcac2;
    font-size: 1.1rem;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 1.25rem;
    font-family: var(--font-display);
    color: var(--muted);
    transition: color 0.2s;
}

.back-link::before {
    content: '\2190';
    transition: transform 0.2s var(--ease);
}

.back-link:hover {
    color: var(--text);
}

.back-link:hover::before {
    transform: translateX(-4px);
}

/* ---------- Spoiler pages ---------- */

.spoiler-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: clamp(1.25rem, 3vw, 2.25rem);
    perspective: 1200px;
}

.spoiler-card {
    margin: 0;
    text-align: center;
}

.spoiler-card img {
    width: 100%;
    border-radius: 4.5%;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.65);
    transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
    transition: transform 0.15s ease-out, box-shadow 0.3s;
    will-change: transform;
}

.spoiler-card[data-tilt]:hover img {
    box-shadow: 0 22px 46px rgba(0, 0, 0, 0.8), 0 0 30px var(--card-glow, var(--accent-soft));
}

.spoiler-card figcaption {
    margin-top: 0.8rem;
    font-family: var(--font-display);
    font-size: 1rem;
    line-height: 1.3;
}

.spoiler-card.is-unspoiled img {
    opacity: 0.45;
    box-shadow: none;
}

.spoiler-card.is-unspoiled figcaption {
    color: var(--muted);
}

/* Two-deck starter sets, e.g. Divine vs Damned */

.deck-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(2rem, 5vw, 4.5rem);
    position: relative;
}

.deck-split::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 1px;
    background: linear-gradient(180deg, transparent, var(--border) 10%, var(--border) 90%, transparent);
}

.deck {
    min-width: 0;
    perspective: 1200px;
}

.deck__title {
    margin-bottom: 1.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--deck-color);
    color: var(--deck-color);
    font-family: var(--font-display-heavy);
    font-size: clamp(1.8rem, 3.5vw, 2.6rem);
    text-align: center;
}

.deck__host {
    width: calc(50% - 0.75rem);
    margin: 0 auto 2rem;
}

.deck__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.deck--divine {
    --deck-color: #f0d98a;
    --card-glow: rgba(240, 217, 138, 0.25);
}

.deck--damned {
    --deck-color: #d9464b;
    --card-glow: rgba(217, 70, 75, 0.25);
}

@media (max-width: 700px) {
    .deck-split {
        grid-template-columns: 1fr;
    }

    .deck-split::before {
        display: none;
    }

    .deck__grid {
        gap: 1rem;
    }

    .deck__host {
        width: calc(50% - 0.5rem);
    }

    .spoiler-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .spoiler-card figcaption {
        font-size: 0.85rem;
    }
}

/* ---------- Forms ---------- */

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

.field {
    display: grid;
    gap: 0.35rem;
}

.field span {
    font-family: var(--font-display);
    font-size: 0.95rem;
    letter-spacing: 0.04em;
    color: var(--muted);
}

.field input {
    width: 100%;
    padding: 0.8rem 0.9rem;
    background: var(--bg-deep);
    border: 1px solid var(--border);
    border-radius: 2px;
    color: var(--text);
    font: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.field input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.hp-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.btn--block {
    width: 100%;
    margin-top: 0.5rem;
}

.notice {
    margin-bottom: 1.25rem;
    padding: 0.75rem 1rem;
    border-left: 3px solid;
    font-size: 0.95rem;
}

.notice--error {
    border-color: var(--accent-hover);
    background: var(--accent-soft);
}

.notice--success {
    border-color: #4caf7a;
    background: rgba(76, 175, 122, 0.12);
}

/* ---------- Login ---------- */

.auth {
    position: relative;
    overflow: hidden;
    padding: clamp(3rem, 8vw, 6rem) 0;
    isolation: isolate;
}

.auth__bg {
    position: absolute;
    inset: 0;
    z-index: -1;
    background-size: cover;
    background-position: center 30%;
}

.auth__bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(11, 11, 15, 0.8), rgba(11, 11, 15, 0.97));
}

.auth__inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    max-width: 960px;
}

.auth__panel {
    padding: clamp(1.5rem, 4vw, 2.5rem);
    background: rgba(20, 20, 27, 0.92);
    border: 1px solid var(--border);
    border-top: 3px solid var(--accent);
    border-radius: var(--radius);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.auth__panel--alt {
    border-top-color: var(--border);
}

.auth__logo {
    width: 90px;
    margin-bottom: 1.25rem;
}

.auth__title {
    font-family: var(--font-display-heavy);
    font-size: 2rem;
    margin-bottom: 1.25rem;
}

.auth__intro {
    margin-top: -0.5rem;
    color: var(--muted);
}

.auth__aside {
    margin: 1.25rem 0 0;
    text-align: center;
    font-size: 0.95rem;
}

.auth__aside a {
    color: var(--muted);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.auth__aside a:hover {
    color: var(--text);
}

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

/* ---------- Profile ---------- */

.page-hero--compact {
    padding: clamp(3rem, 7vw, 4.5rem) 0 clamp(2rem, 5vw, 3rem);
}

.profile-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.5rem;
}

.profile-head p {
    margin: 0;
}

.deck-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.25rem;
}

.deck-tile {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 0.3s var(--ease), border-color 0.3s, box-shadow 0.3s;
}

.deck-tile:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.5);
}

.deck-tile img {
    width: 100%;
    aspect-ratio: 247 / 126;
    object-fit: cover;
    background: var(--surface-2);
}

.deck-tile__body {
    display: grid;
    gap: 0.2rem;
    padding: 1rem 1.2rem 1.2rem;
}

.deck-tile__name {
    font-family: var(--font-display);
    font-size: 1.2rem;
    line-height: 1.25;
}

.deck-tile__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    color: var(--muted);
    font-size: 0.9rem;
}

.badge {
    padding: 0.1rem 0.5rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.empty-state {
    padding: 3rem 1.5rem;
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    text-align: center;
    color: var(--muted);
}

/* ---------- Shared page parts ---------- */

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.section--tight {
    padding-top: 2rem;
}

.section-intro {
    max-width: 680px;
    margin: 0.75rem 0 0;
    color: var(--muted);
}

.section-note {
    margin-top: 2rem;
    color: var(--muted);
    font-size: 0.95rem;
}

.section-note a,
.doc a {
    color: var(--text);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.btn-row--center {
    justify-content: center;
}

.chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.chip {
    display: inline-block;
    padding: 0.4rem 0.95rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 999px;
    font-family: var(--font-display);
    font-size: 0.95rem;
    color: var(--muted);
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s, background-color 0.2s;
}

.chip:hover {
    color: var(--text);
    border-color: #44445a;
}

.chip.is-active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.panel {
    padding: clamp(1.25rem, 3vw, 2rem);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.panel__title {
    font-size: 1.6rem;
    margin-bottom: 1rem;
}

.note {
    padding-left: 1rem;
    border-left: 3px solid var(--border);
    color: var(--muted);
    font-style: italic;
}

.check-list,
.notes {
    margin: 0 0 1em;
    padding: 0;
    list-style: none;
}

.check-list li,
.notes li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.6rem;
}

.check-list li::before {
    content: '';
    position: absolute;
    left: 0.2rem;
    top: 0.55em;
    width: 0.45rem;
    height: 0.45rem;
    background: var(--accent);
    transform: rotate(45deg);
}

.notes li {
    color: var(--muted);
    font-style: italic;
}

.notes li::before {
    content: '\2014';
    position: absolute;
    left: 0;
}

/* ---------- Card gallery ---------- */

.gallery-toolbar {
    position: sticky;
    top: var(--header-h);
    z-index: 10;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1.25rem;
    margin: 0 calc(var(--gutter) * -1) 1.75rem;
    padding: 1rem var(--gutter);
    background: rgba(11, 11, 15, 0.94);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.gallery-search {
    flex: 1 1 260px;
}

/* Card gallery filters */

.gallery-toolbar--filters {
    display: grid;
    gap: 0.9rem;
}

.gallery-toolbar__row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1rem;
}

.filter-toggle {
    gap: 0.5rem;
}

.filter-toggle::after {
    content: '';
    width: 7px;
    height: 7px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: translateY(-2px) rotate(45deg);
    transition: transform 0.2s;
}

.filter-toggle.is-open::after {
    transform: translateY(1px) rotate(-135deg);
}

.filter-toggle__count {
    display: inline-grid;
    place-items: center;
    min-width: 1.35rem;
    height: 1.35rem;
    padding: 0 0.35rem;
    background: var(--accent);
    border-radius: 999px;
    color: #fff;
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 700;
}

.filter-toggle__count[hidden] {
    display: none;
}

.filter-panel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem 2rem;
    max-height: 60vh;
    overflow-y: auto;
    padding: 1.25rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    animation: ev-in 0.2s var(--ease);
}

.filter-panel[hidden] {
    display: none;
}

.filter-group {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.filter-group legend,
.select-field--labelled>span {
    display: block;
    margin-bottom: 0.5rem;
    padding: 0;
    font-family: var(--font-display);
    font-size: 0.75rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--accent-hover);
}

.filter-group--selects {
    display: grid;
    gap: 1rem;
}

.select-field--labelled select {
    width: 100%;
}

.chip--round {
    min-width: 2.6rem;
    text-align: center;
}

.chip--faction {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.chip__symbol {
    display: inline-grid;
    place-items: center;
    width: 1.35rem;
    height: 1.35rem;
    background: var(--bg-deep);
    border-radius: 50%;
    font-family: var(--font-resource);
    font-weight: normal;
    font-size: 0.85rem;
    color: var(--text);
}

.chip.is-active .chip__symbol {
    background: rgba(0, 0, 0, 0.25);
    color: #fff;
}

.active-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
}

.active-filters[hidden] {
    display: none;
}

.active-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.25rem 0.4rem 0.25rem 0.75rem;
    background: var(--accent-soft);
    border: 1px solid rgba(196, 22, 28, 0.5);
    border-radius: 999px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background-color 0.15s;
}

.active-chip span {
    display: inline-grid;
    place-items: center;
    width: 1.1rem;
    height: 1.1rem;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.3);
    font-size: 0.85rem;
    line-height: 1;
}

.active-chip:hover {
    background: rgba(196, 22, 28, 0.3);
}

.active-filters__clear {
    padding: 0.25rem 0.5rem;
    background: none;
    border: 0;
    color: var(--muted);
    font-size: 0.85rem;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}

.active-filters__clear:hover {
    color: var(--text);
}

#cardNoResults {
    display: grid;
    justify-items: center;
    gap: 0.75rem;
}

#cardNoResults[hidden] {
    display: none;
}

#cardNoResults p {
    margin: 0;
}

@media (max-width: 700px) {
    .gallery-toolbar__row .gallery-search {
        flex-basis: 100%;
    }

    .gallery-toolbar__row .select-field {
        flex: 1;
    }

    .gallery-toolbar__row .select-field select {
        width: 100%;
    }

    .filter-panel {
        grid-template-columns: minmax(0, 1fr);
        max-height: 55vh;
    }
}

.gallery-search input {
    width: 100%;
    padding: 0.7rem 1rem;
    background: var(--bg-deep);
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--text);
    font: inherit;
}

.gallery-search input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.gallery-count {
    margin: 0 0 0 auto;
    color: var(--muted);
    font-size: 0.9rem;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: clamp(1rem, 2.5vw, 1.75rem);
}

.gallery-card {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    padding: 0;
    background: none;
    border: 0;
    text-align: center;
    cursor: pointer;
}

.gallery-card img {
    width: 100%;
    aspect-ratio: 5 / 7;
    object-fit: cover;
    border-radius: 4.5%;
    background: var(--surface);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.6);
    transition: transform 0.25s var(--ease), box-shadow 0.25s;
}

.gallery-card:hover img,
.gallery-card:focus-visible img {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.75), 0 0 24px var(--accent-soft);
}

.gallery-card span {
    font-family: var(--font-display);
    font-size: 0.95rem;
    line-height: 1.3;
}

.card-dialog {
    width: min(920px, calc(100% - 2rem));
    max-height: calc(100vh - 2rem);
    padding: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7);
}

.card-dialog::backdrop {
    background: rgba(4, 4, 6, 0.85);
    backdrop-filter: blur(4px);
}

.card-dialog__close {
    position: absolute;
    top: 0.5rem;
    right: 0.75rem;
    width: 40px;
    height: 40px;
    background: none;
    border: 0;
    font-size: 2rem;
    line-height: 1;
    color: var(--muted);
    cursor: pointer;
}

.card-dialog__close:hover {
    color: var(--text);
}

.card-dialog__inner {
    display: grid;
    grid-template-columns: minmax(0, 360px) 1fr;
    gap: 2rem;
    padding: clamp(1.25rem, 4vw, 2.25rem);
}

.card-dialog__image {
    width: 100%;
    border-radius: 4.5%;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.7);
}

.card-dialog__info h2 {
    margin: 0.3rem 0 1.25rem;
    font-size: clamp(1.6rem, 3vw, 2.2rem);
}

.card-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin: 0 0 1.25rem;
}

.card-stats div {
    padding: 0.7rem 0.9rem;
    background: var(--bg-deep);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.card-stats dt,
.card-effect h3 {
    margin: 0 0 0.2rem;
    font-family: var(--font-display);
    font-size: 0.75rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent-hover);
}

.card-stats dd {
    margin: 0;
}

.card-effect {
    padding: 1rem 1.1rem;
    background: var(--bg-deep);
    border-left: 3px solid var(--accent);
}

.card-effect p {
    margin: 0;
    white-space: pre-line;
}

@media (max-width: 700px) {
    .card-dialog__inner {
        grid-template-columns: 1fr;
    }

    .card-dialog__image {
        max-width: 280px;
        margin: 0 auto;
    }

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

    .gallery-count {
        margin-left: 0;
    }
}

/* ---------- How to Play ---------- */

.toc-bar {
    position: sticky;
    top: var(--header-h);
    z-index: 10;
    padding: 0.75rem 0;
    background: rgba(11, 11, 15, 0.94);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.toc-bar .chip-row {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
}

.toc-bar .chip-row::-webkit-scrollbar {
    display: none;
}

.toc-bar .chip {
    white-space: nowrap;
}

.prose-stack {
    display: grid;
    gap: clamp(2rem, 5vw, 3.5rem);
}

.prose-stack [id],
.doc [id] {
    scroll-margin-top: calc(var(--header-h) + 80px);
}

.tutorial-cta {
    display: flex;
    align-items: center;
    gap: clamp(1.25rem, 4vw, 2.5rem);
    padding: clamp(1.25rem, 4vw, 2.25rem);
    background:
        radial-gradient(ellipse at 0% 50%, rgba(196, 22, 28, 0.25), transparent 65%),
        var(--surface);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    border-radius: var(--radius);
    transition: transform 0.3s var(--ease), box-shadow 0.3s;
}

.tutorial-cta:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
}

.tutorial-cta img {
    flex: 0 0 auto;
    width: clamp(90px, 14vw, 140px);
    border-radius: 4.5%;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.6);
}

.tutorial-cta h2 {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
}

.tutorial-cta p {
    color: var(--muted);
    max-width: 560px;
}

.lesson-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.lesson-list a {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) 2fr auto;
    gap: 1rem;
    align-items: center;
    padding: 0.85rem 0.5rem;
    border-top: 1px solid var(--border);
    transition: background-color 0.15s;
}

.lesson-list a:hover {
    background: var(--surface-2);
}

.lesson-list__name {
    font-family: var(--font-display);
    font-size: 1.1rem;
}

.lesson-list__desc {
    color: var(--muted);
    font-size: 0.95rem;
}

.video-frame {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    aspect-ratio: 16 / 9;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg-deep);
}

.video-frame iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

.rule-section__title {
    padding-bottom: 0.6rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
    font-family: var(--font-display-heavy);
    font-size: clamp(1.7rem, 3.2vw, 2.3rem);
}

.rule-section__split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(1.5rem, 4vw, 3rem);
    align-items: start;
}

.rule-section__split>img {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    position: sticky;
    top: calc(var(--header-h) + 80px);
}

.rule-text {
    max-width: 760px;
}

.rule-text ul {
    padding-left: 1.2rem;
}

.rule-text li {
    margin-bottom: 0.5rem;
}

.steps {
    counter-reset: step;
    margin: 0 0 1.25rem;
    padding: 0;
    list-style: none;
}

.steps>li {
    counter-increment: step;
    position: relative;
    padding: 0 0 1.25rem 3rem;
    color: #cfcac2;
}

.steps>li::before {
    content: counter(step);
    position: absolute;
    left: 0;
    top: 0;
    display: grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    font-family: var(--font-display);
    font-size: 1rem;
}

.steps>li>strong {
    display: block;
    margin-bottom: 0.2rem;
    font-family: var(--font-display);
    font-weight: normal;
    font-size: 1.15rem;
    color: var(--text);
}

.steps em {
    color: var(--muted);
}

.steps--timeline>li::after {
    content: '';
    position: absolute;
    left: calc(1rem - 1px);
    top: 2.25rem;
    bottom: 0.25rem;
    width: 2px;
    background: var(--border);
}

.steps--timeline>li:last-child::after {
    display: none;
}

.type-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 1.5rem;
}

.type-card {
    margin: 0;
}

.type-card img {
    width: 100%;
    border-radius: 4.5%;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.6);
    margin-bottom: 0.9rem;
}

.type-card figcaption {
    color: var(--muted);
    font-size: 0.95rem;
}

.type-card .tag {
    display: block;
    margin-bottom: 0.25rem;
    font-size: 1rem;
}

.feature-pair {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.feature-pair__item {
    display: flex;
    gap: 1.25rem;
    padding: 1.25rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.feature-pair__item img {
    flex: 0 0 auto;
    width: 120px;
    height: fit-content;
    border-radius: 4px;
}

.feature-pair__item h3 {
    font-size: 1.25rem;
}

.feature-pair__item p {
    color: var(--muted);
    font-size: 0.95rem;
}

.symbol-list,
.cost-list {
    display: grid;
    gap: 0.4rem;
    margin: 0.5rem 0 0;
}

.symbol-list div,
.cost-list div {
    display: flex;
    gap: 0.75rem;
    align-items: baseline;
}

.symbol-list dt {
    min-width: 1.5rem;
    font-family: var(--font-display);
    font-size: 1.1rem;
    color: var(--accent-hover);
}

.symbol-list dd,
.cost-list dd {
    margin: 0;
}

.cost-list {
    gap: 0.75rem;
    margin-top: 1rem;
}

.cost-list div {
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.8rem 1rem;
    background: var(--surface);
    border-left: 3px solid var(--accent);
}

.cost-list dt {
    font-family: var(--font-display);
    font-size: 1.1rem;
}

.cost-list dd {
    color: var(--muted);
}

.effect-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}

.effect-grid figure {
    margin: 0;
    padding: 1.25rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.effect-grid img {
    width: 100%;
    margin-bottom: 1rem;
    border-radius: 4px;
}

.effect-grid h3 {
    font-size: 1.25rem;
    margin-bottom: 0.4rem;
}

.effect-grid figcaption {
    color: var(--muted);
    font-size: 0.95rem;
}

.faq {
    display: grid;
    gap: 0.75rem;
    max-width: 860px;
}

.faq details {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.faq summary {
    position: relative;
    padding: 1rem 3rem 1rem 1.25rem;
    font-family: var(--font-display);
    font-size: 1.1rem;
    cursor: pointer;
    list-style: none;
}

.faq summary::-webkit-details-marker {
    display: none;
}

.faq summary::after {
    content: '+';
    position: absolute;
    right: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    color: var(--accent-hover);
}

.faq details[open] summary::after {
    content: '\2212';
}

.faq details p {
    margin: 0;
    padding: 0 1.25rem 1.1rem;
    color: var(--muted);
}

@media (max-width: 800px) {
    .tutorial-cta {
        flex-direction: column;
        align-items: flex-start;
    }

    .lesson-list a {
        grid-template-columns: 1fr auto;
    }

    .lesson-list__desc {
        grid-column: 1 / -1;
        grid-row: 2;
    }

    .rule-section__split {
        grid-template-columns: 1fr;
    }

    .rule-section__split>img {
        position: static;
    }
}

/* ---------- Keywords ---------- */

.keyword-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 1.25rem;
}

.keyword-card {
    display: flex;
    flex-direction: column;
    padding: 1.4rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-top: 3px solid var(--accent);
    border-radius: var(--radius);
}

.keyword-card h2 {
    font-size: 1.5rem;
    margin-bottom: 0.4rem;
}

.keyword-card p {
    flex: 1;
    color: var(--muted);
}

/* ---------- Downloads ---------- */

.download-list {
    display: grid;
    gap: 1rem;
    max-width: 900px;
}

.download {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 1.25rem;
    align-items: center;
    padding: 1.25rem 1.5rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: border-color 0.2s, transform 0.2s var(--ease);
}

.download:hover {
    border-color: var(--accent);
    transform: translateX(4px);
}

.download__format {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    border: 1px solid var(--accent);
    border-radius: var(--radius);
    font-family: var(--font-display);
    letter-spacing: 0.08em;
    color: var(--accent-hover);
}

.download__body {
    color: var(--muted);
    font-size: 0.95rem;
}

.download__body strong {
    display: block;
    margin-bottom: 0.2rem;
    font-family: var(--font-display);
    font-weight: normal;
    font-size: 1.25rem;
    color: var(--text);
}

@media (max-width: 600px) {
    .download {
        grid-template-columns: auto 1fr;
    }

    .download .link-arrow {
        grid-column: 2;
    }
}

/* ---------- Banlist ---------- */

.ban-list {
    display: grid;
    gap: 1.5rem;
}

.ban-category {
    padding: clamp(1.25rem, 3vw, 2rem);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.ban-category__head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.25rem 1rem;
    margin-bottom: 1.25rem;
}

.ban-category__head h2 {
    margin: 0;
    font-size: 1.6rem;
}

.ban-category__head p {
    margin: 0;
    color: var(--muted);
}

.ban-category>.muted {
    margin: 0;
}

.ban-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 210px));
    gap: 1.5rem;
    perspective: 1200px;
}

.ban-card__note {
    display: block;
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: var(--muted);
}

.choose-groups {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.choose-group {
    padding: 1rem 1.25rem 1.25rem;
    border: 1px dashed var(--border);
    border-radius: var(--radius);
}

.choose-group__label {
    display: block;
    margin-bottom: 0.75rem;
    font-family: var(--font-display);
    font-size: 0.8rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent-hover);
}

.errata {
    display: grid;
    grid-template-columns: minmax(0, 340px) 1fr;
    gap: clamp(1.25rem, 4vw, 2.5rem);
    align-items: center;
    padding: clamp(1.25rem, 3vw, 2rem);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.errata img {
    width: 100%;
    border-radius: 4px;
}

.errata h3 {
    font-size: 1.6rem;
}

.errata p {
    color: var(--muted);
}

.errata__change {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--bg-deep);
    border-radius: var(--radius);
}

.errata__change del {
    color: var(--muted);
}

.errata__change ins {
    text-decoration: none;
    color: var(--text);
}

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

    .ban-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

/* ---------- Long documents (Tournament Policy) ---------- */

.doc-layout {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: clamp(2rem, 5vw, 4rem);
    align-items: start;
}

.doc-toc {
    position: sticky;
    top: calc(var(--header-h) + 1.5rem);
}

.doc-toc h2 {
    font-size: 1rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
}

.doc-toc ol {
    margin: 0;
    padding-left: 1.4rem;
    color: var(--muted);
}

.doc-toc li {
    margin-bottom: 0.45rem;
}

.doc-toc a {
    color: var(--muted);
    transition: color 0.15s;
}

.doc-toc a:hover {
    color: var(--text);
}

.doc {
    max-width: 760px;
}

.doc section {
    padding-bottom: 2rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border);
}

.doc section:last-child {
    border-bottom: 0;
}

.doc h2 {
    font-family: var(--font-display-heavy);
    font-size: clamp(1.5rem, 2.8vw, 2rem);
    margin-bottom: 1rem;
}

.doc h3 {
    margin: 1.5rem 0 0.4rem;
    font-size: 1.2rem;
    color: var(--accent-hover);
}

.doc p,
.doc li {
    color: #cfcac2;
}

.doc ul {
    padding-left: 1.2rem;
}

.doc li {
    margin-bottom: 0.45rem;
}

@media (max-width: 900px) {
    .doc-layout {
        grid-template-columns: 1fr;
    }

    .doc-toc {
        position: static;
        padding: 1.25rem;
        background: var(--surface);
        border: 1px solid var(--border);
        border-radius: var(--radius);
    }
}

/* ---------- Set spotlights and product pages ---------- */

.spotlight-list {
    display: grid;
    gap: 2rem;
}

.spotlight {
    display: grid;
    grid-template-columns: minmax(0, auto) 1fr;
    gap: clamp(1.5rem, 4vw, 3rem);
    align-items: center;
    padding: clamp(1.25rem, 3vw, 2rem);
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    border-radius: var(--radius);
}

.spotlight__cards {
    display: flex;
    gap: 1rem;
    perspective: 1200px;
}

.spotlight__cards .spoiler-card {
    width: clamp(150px, 18vw, 220px);
}

.spotlight__text h2 {
    font-family: var(--font-display-heavy);
    font-size: clamp(1.7rem, 3vw, 2.3rem);
}

.spotlight__text p {
    max-width: 560px;
    color: #cfcac2;
}

.product-feature {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: clamp(1.5rem, 5vw, 3.5rem);
    align-items: center;
    margin-bottom: clamp(2rem, 5vw, 3.5rem);
}

.product-feature__image,
.product-feature__wide {
    width: 100%;
    border-radius: var(--radius);
}

.product-feature__text h2 {
    font-family: var(--font-display-heavy);
    font-size: clamp(1.6rem, 3vw, 2.2rem);
}

.product-feature__text h2:not(:first-child) {
    margin-top: 1.5rem;
}

.product-feature__text p,
.product-feature__text li {
    color: #cfcac2;
}

@media (max-width: 800px) {

    .spotlight,
    .product-feature {
        grid-template-columns: 1fr;
    }

    .spotlight__cards {
        justify-content: center;
    }
}

/* ---------- Event pages ---------- */

.auth__inner--single {
    grid-template-columns: minmax(0, 480px);
    justify-content: center;
}

.text-link {
    color: var(--text);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.text-link:hover {
    color: var(--accent-hover);
}

.lead {
    font-size: 1.15rem;
    color: var(--text);
}

.icon {
    width: 1.05em;
    height: 1.05em;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Hero with a stat strip overlapping its bottom edge */

.page-hero--event {
    padding-bottom: clamp(5rem, 10vw, 7rem);
}

.page-hero--event .page-hero__title {
    max-width: 820px;
}

.page-hero--event .btn-row {
    margin-top: 1.75rem;
}

.stat-strip {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    margin: calc(clamp(2.5rem, 5vw, 3.5rem) * -1) 0 0;
    background: rgba(20, 20, 27, 0.9);
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    overflow: hidden;
}

.stat-strip>div {
    display: grid;
    gap: 0.15rem;
    align-content: start;
    padding: 1.4rem 1.5rem;
    border-right: 1px solid var(--border);
}

.stat-strip>div:last-child {
    border-right: 0;
}

.stat-strip dt {
    font-family: var(--font-display);
    font-size: 0.75rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--accent-hover);
}

.stat-strip dd {
    margin: 0;
    font-family: var(--font-display-heavy);
    font-size: clamp(1.35rem, 2.4vw, 1.9rem);
    line-height: 1.15;
}

.stat-strip span {
    font-size: 0.85rem;
    color: var(--muted);
}

/* Event showcase: date picker + featured event */

.ev-showcase {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 1.5rem;
    align-items: start;
}

.ev-showcase.is-single {
    grid-template-columns: minmax(0, 1fr);
}

.ev-picker__list {
    display: grid;
    gap: 0.6rem;
}

.ev-pill {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    width: 100%;
    padding: 0.7rem 0.9rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.2s, background-color 0.2s, transform 0.2s var(--ease);
}

.ev-pill:hover {
    border-color: #44445a;
    transform: translateX(3px);
}

.ev-pill.is-active {
    background: linear-gradient(135deg, rgba(196, 22, 28, 0.22), rgba(196, 22, 28, 0.05)), var(--surface);
    border-color: var(--accent);
}

.ev-pill.is-past {
    opacity: 0.6;
}

.ev-pill__date {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 52px;
    height: 56px;
    background: var(--bg-deep);
    border: 1px solid var(--border);
    border-radius: 8px;
    line-height: 1;
}

.ev-pill.is-active .ev-pill__date {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.ev-pill__day {
    font-family: var(--font-display-heavy);
    font-size: 1.45rem;
}

.ev-pill__month {
    font-family: var(--font-display);
    font-size: 0.7rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.ev-pill__text {
    display: grid;
    gap: 0.3rem;
    justify-items: start;
}

.ev-pill__name {
    font-family: var(--font-display);
    font-size: 1.05rem;
}

.status {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    white-space: nowrap;
}

.status::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.status--open {
    color: #7fd1a0;
    background: rgba(76, 175, 122, 0.14);
}

.status--good {
    color: #f0d98a;
    background: rgba(240, 217, 138, 0.14);
}

.status--warn {
    color: #ff8a7a;
    background: rgba(226, 38, 45, 0.16);
}

.status--muted {
    color: var(--muted);
    background: rgba(162, 157, 150, 0.12);
}

.ev-feature {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    overflow: hidden;
    background:
        radial-gradient(ellipse at 100% 0%, rgba(196, 22, 28, 0.16), transparent 55%),
        var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
    animation: ev-in 0.35s var(--ease);
}

.ev-feature.is-past {
    filter: saturate(0.4);
}

@keyframes ev-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
}

.ev-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    padding: 1.5rem 0.75rem;
    background: linear-gradient(180deg, var(--accent) 0%, #7d0d12 100%);
    color: #fff;
    text-align: center;
}

.ev-date__month {
    font-family: var(--font-display);
    font-size: 0.95rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    opacity: 0.85;
}

.ev-date__day {
    font-family: var(--font-display-heavy);
    font-size: 4rem;
    line-height: 1;
}

.ev-date__weekday {
    font-size: 0.85rem;
    opacity: 0.85;
}

.ev-feature__body {
    display: grid;
    gap: 1.1rem;
    align-content: start;
    padding: clamp(1.4rem, 3vw, 2.25rem);
}

.ev-feature__top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem;
    min-height: 1.5rem;
}

.ev-countdown {
    font-family: var(--font-display);
    font-size: 0.85rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--accent-hover);
}

.ev-countdown.is-past {
    color: var(--muted);
}

.ev-feature__title {
    margin: 0;
    font-family: var(--font-display-heavy);
    font-size: clamp(1.7rem, 3.4vw, 2.5rem);
}

.ev-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.ev-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.4rem 0.8rem;
    background: var(--bg-deep);
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 0.9rem;
}

.ev-chip .icon {
    color: var(--accent-hover);
}

.ev-chip a {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.ev-feature__desc {
    color: #cfcac2;
    line-height: 1.7;
}

.ev-feature__desc a {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.ev-capacity {
    display: grid;
    gap: 0.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.ev-capacity__head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    font-size: 0.9rem;
}

.ev-capacity__label {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-family: var(--font-display);
    font-size: 1rem;
}

.ev-capacity__left {
    color: var(--muted);
}

.ev-capacity__bar {
    height: 6px;
    background: var(--bg-deep);
    border-radius: 999px;
    overflow: hidden;
}

.ev-capacity__bar span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--accent), #ff6a4a);
    border-radius: inherit;
    transition: width 0.6s var(--ease);
}

.ev-people__list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.ev-person {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.25rem 0.75rem 0.25rem 0.25rem;
    background: var(--bg-deep);
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 0.9rem;
}

.avatar {
    position: relative;
    overflow: hidden;
}

.avatar img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Profile pictures next to player names */
.avatar-img {
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--surface-2);
    box-shadow: 0 0 0 2px rgba(236, 232, 225, 0.15);
}

.avatar-img--small {
    width: 22px;
    height: 22px;
}

.avatar-img--large {
    width: clamp(64px, 12vw, 96px);
    height: clamp(64px, 12vw, 96px);
    box-shadow: 0 0 0 3px var(--accent), 0 12px 30px rgba(0, 0, 0, 0.5);
}

.creator {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.profile-name {
    display: flex;
    align-items: center;
    gap: clamp(0.85rem, 3vw, 1.25rem);
}

.profile-name span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.avatar.has-image {
    background: var(--surface-2);
    color: transparent;
}

.ev-person.is-you {
    border-color: #a8975a;
    background: rgba(240, 217, 138, 0.08);
}

.ev-people__none {
    margin: 0;
    color: var(--muted);
    font-style: italic;
}

.avatar {
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: hsl(var(--hue, 0), 45%, 32%);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.ev-feature__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1rem;
    padding-top: 0.25rem;
}

.ev-message {
    margin: 0;
    font-size: 0.95rem;
}

.ev-message.is-success {
    color: #7fd1a0;
}

.ev-message.is-error {
    color: #ff8a7a;
}

.ev-empty {
    margin: 0;
    padding: 2.5rem 1.5rem;
    background: var(--surface);
    border: 1px dashed var(--border);
    border-radius: 12px;
    text-align: center;
    color: var(--muted);
}

.ev-skeleton {
    height: 320px;
    border-radius: 12px;
    background: linear-gradient(100deg, var(--surface) 30%, var(--surface-2) 50%, var(--surface) 70%);
    background-size: 200% 100%;
    animation: ev-shimmer 1.4s linear infinite;
}

.ev-skeleton--short {
    height: 200px;
}

@keyframes ev-shimmer {
    to {
        background-position: -200% 0;
    }
}

/* Standings */

.standings-section {
    margin-top: clamp(3rem, 7vw, 5rem);
}

.segmented {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    padding: 0.25rem;
    background: var(--bg-deep);
    border: 1px solid var(--border);
    border-radius: 999px;
}

.segmented button {
    padding: 0.4rem 0.95rem;
    background: none;
    border: 0;
    border-radius: 999px;
    font-family: var(--font-display);
    font-size: 0.95rem;
    color: var(--muted);
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
}

.segmented button:hover {
    color: var(--text);
}

.segmented button.is-active {
    background: var(--accent);
    color: #fff;
}

.standings-month {
    font-family: var(--font-display);
    color: var(--muted);
}

.standings {
    display: grid;
    gap: 1.25rem;
}

.podium {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    align-items: end;
    gap: 1rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.podium__place {
    --medal: #c9ccd6;
    position: relative;
    display: grid;
    justify-items: center;
    gap: 0.35rem;
    padding: 1.75rem 1rem 1.4rem;
    background: var(--surface);
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--medal) 16%, transparent), transparent 70%),
        var(--surface);
    border: 1px solid var(--border);
    border-top: 3px solid var(--medal);
    border-radius: 12px;
    text-align: center;
}

.podium__place--1 {
    --medal: #e4c06b;
    order: 2;
    padding-top: 2.5rem;
    padding-bottom: 2rem;
    box-shadow: 0 20px 50px rgba(228, 192, 107, 0.12);
}

.podium__place--2 {
    order: 1;
}

.podium__place--3 {
    --medal: #c98a5a;
    order: 3;
}

.podium__place.is-you {
    outline: 2px solid rgba(240, 217, 138, 0.5);
    outline-offset: 2px;
}

.podium__rank {
    position: absolute;
    top: -1px;
    left: 50%;
    transform: translate(-50%, -50%);
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--medal);
    color: #15151c;
    font-family: var(--font-display-heavy);
    font-size: 1.05rem;
}

.podium .avatar {
    width: 52px;
    height: 52px;
    font-size: 1.05rem;
    margin-bottom: 0.25rem;
}

.podium__place--1 .avatar {
    width: 64px;
    height: 64px;
    font-size: 1.25rem;
    box-shadow: 0 0 0 3px rgba(228, 192, 107, 0.45);
}

.podium__name {
    font-family: var(--font-display);
    font-size: 1.15rem;
    line-height: 1.2;
    word-break: break-word;
}

.podium__score {
    color: var(--muted);
    font-size: 0.9rem;
}

.podium__score strong {
    font-family: var(--font-display-heavy);
    font-size: 1.6rem;
    font-weight: normal;
    color: var(--text);
}

.podium__extra {
    font-size: 0.8rem;
    letter-spacing: 0.04em;
    color: var(--muted);
}

.board-wrap {
    overflow-x: auto;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.board {
    width: 100%;
    border-collapse: collapse;
}

.board th {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--border);
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: normal;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    text-align: left;
    color: var(--muted);
}

.board td {
    padding: 0.7rem 1rem;
    border-bottom: 1px solid rgba(42, 42, 54, 0.6);
}

.board tbody tr:last-child td {
    border-bottom: 0;
}

.board tbody tr:hover {
    background: var(--surface-2);
}

.board tr.is-you {
    background: rgba(240, 217, 138, 0.06);
}

.board__rank {
    width: 3rem;
    text-align: center !important;
    font-family: var(--font-display);
    color: var(--muted);
}

.board__player {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.board__num {
    width: 1%;
    white-space: nowrap;
    text-align: center !important;
}

.board__score {
    font-family: var(--font-display-heavy);
    font-size: 1.1rem;
}

/* Info sections */

.info-split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    gap: clamp(2rem, 6vw, 4.5rem);
    align-items: start;
}

.info-split--intro {
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    align-items: center;
}

.info-split .section-title {
    margin-bottom: 1rem;
}

.info-split p {
    color: #cfcac2;
}

.info-split .lead {
    color: var(--text);
}

.info-split__subtitle {
    margin-bottom: 1rem;
    font-size: 1.3rem;
    color: var(--muted);
}

.rule-cards {
    counter-reset: rule;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.rule-cards li {
    counter-increment: rule;
    position: relative;
    padding: 2.6rem 1.1rem 1.1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 0.95rem;
    color: #cfcac2;
}

.rule-cards li::before {
    content: counter(rule, decimal-leading-zero);
    position: absolute;
    top: 0.85rem;
    left: 1.1rem;
    font-family: var(--font-display-heavy);
    font-size: 1.1rem;
    color: var(--accent-hover);
}

.prize-card {
    position: relative;
    padding: clamp(1.75rem, 4vw, 2.5rem);
    background:
        radial-gradient(ellipse at 50% 0%, rgba(228, 192, 107, 0.22), transparent 65%),
        linear-gradient(160deg, #1f1a12, var(--surface) 60%);
    border: 1px solid rgba(228, 192, 107, 0.35);
    border-radius: 14px;
    text-align: center;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.5);
}

.prize-card .eyebrow {
    color: #e4c06b;
}

.prize-card__total {
    margin: 0;
    font-family: var(--font-display-heavy);
    font-size: clamp(4rem, 9vw, 5.5rem);
    line-height: 1;
    background: linear-gradient(180deg, #fff3c9, #e4c06b 60%, #a77d2e);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.prize-card__note {
    margin: 0.75rem auto 1.5rem;
    max-width: 280px;
    color: var(--muted) !important;
    font-size: 0.95rem;
}

.prize-card__places {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.prize-card__places li {
    display: grid;
    gap: 0.15rem;
    padding: 0.9rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    border-radius: 10px;
}

.prize-card__places li.is-first {
    border-color: rgba(228, 192, 107, 0.5);
}

.prize-card__places span {
    font-family: var(--font-display);
    font-size: 0.8rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
}

.prize-card__places strong {
    font-family: var(--font-display-heavy);
    font-size: 1.8rem;
    font-weight: normal;
}

.detail-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 1rem;
    margin: 0;
}

.detail-cards>div {
    padding: 1.25rem 1.35rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
}

.detail-cards dt {
    margin-bottom: 0.35rem;
    font-family: var(--font-display);
    font-size: 0.75rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--accent-hover);
}

.detail-cards dd {
    margin: 0;
    font-size: 1.05rem;
}

.points-ladder {
    display: grid;
    gap: 0.6rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.points-ladder li {
    display: grid;
    grid-template-columns: minmax(130px, 0.9fr) 2fr auto;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
}

.points-ladder__place {
    font-family: var(--font-display);
}

.points-ladder__bar {
    position: relative;
    height: 8px;
    background: var(--bg-deep);
    border-radius: 999px;
    overflow: hidden;
}

.points-ladder__bar::after {
    content: '';
    position: absolute;
    inset: 0 auto 0 0;
    width: var(--share);
    background: linear-gradient(90deg, var(--accent), #ff6a4a);
    border-radius: inherit;
}

.points-ladder__points {
    min-width: 4.5rem;
    text-align: right;
    font-family: var(--font-display-heavy);
    font-size: 1.3rem;
    font-weight: normal;
}

.points-ladder__points span {
    font-family: var(--font-body);
    font-size: 0.8rem;
    color: var(--muted);
}

.finals-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 16px;
    isolation: isolate;
}

.finals-card__bg {
    position: absolute;
    inset: 0;
    z-index: -1;
    background-size: cover;
    background-position: center;
}

.finals-card__bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(11, 11, 15, 0.97) 0%, rgba(11, 11, 15, 0.9) 50%, rgba(11, 11, 15, 0.55) 100%);
}

.finals-card__inner {
    max-width: 620px;
    padding: clamp(2rem, 6vw, 4rem);
}

.finals-card__inner .section-title {
    margin-bottom: 1rem;
}

.finals-card__inner p {
    color: #cfcac2;
}

.finals-card__note {
    margin: 0;
    font-size: 0.9rem;
    color: var(--muted) !important;
}

@media (max-width: 980px) {
    .ev-showcase {
        grid-template-columns: minmax(0, 1fr);
    }

    .ev-picker__list {
        display: flex;
        overflow-x: auto;
        padding-bottom: 0.25rem;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
    }

    .ev-picker__list::-webkit-scrollbar {
        display: none;
    }

    .ev-pill {
        flex: 0 0 auto;
        width: auto;
        scroll-snap-align: start;
    }

    .ev-pill:hover {
        transform: none;
    }

    .info-split,
    .info-split--intro {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 700px) {
    .stat-strip {
        grid-template-columns: repeat(2, 1fr);
    }

    .stat-strip>div:nth-child(2) {
        border-right: 0;
    }

    .stat-strip>div:nth-child(-n+2) {
        border-bottom: 1px solid var(--border);
    }

    .ev-feature {
        grid-template-columns: minmax(0, 1fr);
    }

    .ev-date {
        flex-direction: row;
        justify-content: flex-start;
        gap: 0.75rem;
        padding: 0.9rem 1.4rem;
    }

    .ev-date__day {
        font-size: 2.2rem;
    }

    .podium {
        grid-template-columns: minmax(0, 1fr);
        gap: 1.5rem;
    }

    .podium__place--1,
    .podium__place--2,
    .podium__place--3 {
        order: 0;
        padding: 1.6rem 1rem 1.2rem;
    }

    .rule-cards {
        grid-template-columns: minmax(0, 1fr);
    }

    .points-ladder li {
        grid-template-columns: 1fr auto;
    }

    .points-ladder__bar {
        grid-column: 1 / -1;
        grid-row: 2;
    }
}

/* ---------- Decks: shared ---------- */

.like-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.5rem 1rem;
    background: rgba(11, 11, 15, 0.6);
    border: 1px solid rgba(236, 232, 225, 0.3);
    border-radius: 999px;
    color: var(--text);
    font-family: var(--font-display);
    font-size: 1rem;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s, background-color 0.2s, transform 0.15s;
}

.like-btn svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    transition: fill 0.2s, transform 0.2s var(--ease);
}

.like-btn:hover {
    border-color: #ff5a6e;
    color: #ff8a98;
}

.like-btn:active {
    transform: scale(0.95);
}

.like-btn.is-liked {
    border-color: #ff4d62;
    background: rgba(255, 77, 98, 0.14);
    color: #ff8a98;
}

.like-btn.is-liked svg {
    fill: currentColor;
    transform: scale(1.1);
}

.like-btn:disabled {
    opacity: 0.6;
}

.like-btn--small {
    padding: 0.3rem 0.7rem;
    font-size: 0.9rem;
}

.like-btn--small svg {
    width: 15px;
    height: 15px;
}

.select-field select {
    padding: 0.7rem 2.25rem 0.7rem 1rem;
    background: var(--bg-deep) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23a29d96' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 0.9rem center / 11px;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--text);
    font: inherit;
    appearance: none;
    cursor: pointer;
}

.select-field select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.empty-state h1 {
    margin-bottom: 0.5rem;
}

/* ---------- Deck Lists ---------- */

.premade-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.25rem;
}

.premade-card {
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    transition: transform 0.3s var(--ease), border-color 0.3s, box-shadow 0.3s;
}

.premade-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
    box-shadow: 0 20px 44px rgba(0, 0, 0, 0.5);
}

.premade-card__media {
    aspect-ratio: 2650 / 1346;
    overflow: hidden;
}

.premade-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--ease);
}

.premade-card:hover .premade-card__media img {
    transform: scale(1.06);
}

.premade-card__body {
    display: grid;
    gap: 0.15rem;
    padding: 1rem 1.2rem 1.2rem;
}

.premade-card__title {
    font-family: var(--font-display);
    font-size: 1.3rem;
    line-height: 1.2;
}

.premade-card__meta {
    color: var(--muted);
    font-size: 0.9rem;
}

.deck-toolbar {
    background: rgba(7, 7, 9, 0.94);
}

.deck-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.25rem;
}

.community-deck {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    transition: transform 0.3s var(--ease), border-color 0.3s, box-shadow 0.3s;
}

.community-deck[hidden] {
    display: none;
}

.community-deck:hover {
    transform: translateY(-4px);
    border-color: #3d3d4c;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
}

.community-deck__link {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.community-deck__media {
    position: relative;
    aspect-ratio: 247 / 126;
    overflow: hidden;
    background: var(--surface-2);
}

.community-deck__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--ease);
}

.community-deck:hover .community-deck__media img {
    transform: scale(1.06);
}

.community-deck__body {
    display: grid;
    gap: 0.2rem;
    padding: 1rem 1.2rem 0.5rem;
}

.community-deck__name {
    font-family: var(--font-display);
    font-size: 1.2rem;
    line-height: 1.25;
    word-break: break-word;
}

.community-deck__meta {
    color: var(--muted);
    font-size: 0.9rem;
}

.community-deck__host {
    font-family: var(--font-display);
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent-hover);
}

.community-deck__foot {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    padding: 0.5rem 1.2rem 1rem;
}

.community-deck__foot .badge {
    margin-right: auto;
}

/* ---------- Deck page ---------- */

.deck-hero {
    padding-bottom: clamp(5rem, 9vw, 6.5rem);
}

.deck-hero__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    color: var(--muted);
}

.deck-hero__meta strong {
    font-weight: normal;
    color: var(--text);
}

.deck-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.menu-wrap {
    position: relative;
}

.menu-wrap__menu {
    position: absolute;
    top: calc(100% + 0.4rem);
    left: 0;
    z-index: 20;
    display: grid;
    min-width: 200px;
    padding: 0.35rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: opacity 0.15s, transform 0.15s, visibility 0.15s;
}

.menu-wrap.is-open .menu-wrap__menu {
    opacity: 1;
    visibility: visible;
    transform: none;
}

.menu-wrap__menu button {
    padding: 0.6rem 0.8rem;
    background: none;
    border: 0;
    border-radius: 6px;
    text-align: left;
    cursor: pointer;
}

.menu-wrap__menu button:hover {
    background: var(--surface-2);
}

.deck-summary {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
}

.deck-summary:empty {
    display: none;
}

.deck-legal.is-good dd {
    color: #7fd1a0;
}

.deck-legal.is-bad dd {
    color: #ff8a7a;
}

.deck-layout {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: clamp(1.5rem, 4vw, 3rem);
    align-items: start;
}

.deck-preview {
    position: sticky;
    top: calc(var(--header-h) + 1.5rem);
    display: grid;
    gap: 1rem;
    max-height: calc(100vh - var(--header-h) - 3rem);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}

.deck-preview>img {
    width: 100%;
    border-radius: 4.5%;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.65);
}

.deck-preview__name {
    margin-bottom: 0.75rem;
    font-size: 1.4rem;
}

.deck-preview .card-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.deck-preview .card-stats div {
    padding: 0.5rem 0.7rem;
}

.deck-issue {
    margin: 0.75rem 0 0;
    padding: 0.6rem 0.8rem;
    border-left: 3px solid var(--accent-hover);
    background: var(--accent-soft);
    font-size: 0.9rem;
}

.deck-sections {
    display: grid;
    gap: 2.25rem;
}

.deck-section__head {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid var(--border);
}

.deck-section__head h2 {
    margin: 0;
    font-family: var(--font-display-heavy);
    font-size: 1.6rem;
}

.deck-section__count {
    padding: 0.1rem 0.6rem;
    background: var(--surface-2);
    border-radius: 999px;
    font-family: var(--font-display);
    color: var(--muted);
}

.deck-section--side .deck-section__head {
    border-bottom-style: dashed;
}

.deck-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 1rem;
}

.deck-section--host .deck-grid {
    grid-template-columns: minmax(0, 180px);
}

.deck-card {
    display: grid;
    gap: 0.45rem;
    padding: 0;
    background: none;
    border: 0;
    text-align: center;
    cursor: pointer;
}

.deck-card__frame {
    position: relative;
    display: block;
}

.deck-card__frame img {
    width: 100%;
    aspect-ratio: 5 / 7;
    object-fit: cover;
    border-radius: 4.5%;
    background: var(--surface);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.55);
    transition: transform 0.2s var(--ease), box-shadow 0.2s;
}

.deck-card:hover .deck-card__frame img,
.deck-card:focus-visible .deck-card__frame img {
    transform: translateY(-4px);
    box-shadow: 0 18px 34px rgba(0, 0, 0, 0.7), 0 0 0 2px var(--accent);
}

.deck-card__count {
    position: absolute;
    right: -6px;
    top: -6px;
    display: grid;
    place-items: center;
    min-width: 2rem;
    height: 2rem;
    padding: 0 0.4rem;
    background: var(--accent);
    border: 2px solid var(--bg);
    border-radius: 999px;
    color: #fff;
    font-family: var(--font-display-heavy);
    font-size: 0.95rem;
}

.deck-card__flag {
    position: absolute;
    left: -6px;
    top: -6px;
    display: grid;
    place-items: center;
    width: 1.6rem;
    height: 1.6rem;
    background: #ffb020;
    border: 2px solid var(--bg);
    border-radius: 50%;
    color: #15151c;
    font-weight: 800;
    font-size: 0.85rem;
}

.deck-card.is-illegal .deck-card__frame img {
    box-shadow: 0 0 0 2px #ffb020, 0 10px 22px rgba(0, 0, 0, 0.55);
}

.deck-card__name {
    font-family: var(--font-display);
    font-size: 0.9rem;
    line-height: 1.25;
}

@media (max-width: 860px) {
    .deck-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .deck-preview {
        display: none;
    }

    .deck-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.75rem;
    }
}

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

/* ---------- Deck Builder ---------- */

.builder {
    --bar-h: 84px;
    padding-bottom: 3rem;
}

.builder-bar {
    position: sticky;
    top: var(--header-h);
    z-index: 30;
    margin-bottom: 1.25rem;
    background:
        linear-gradient(90deg, rgba(196, 22, 28, 0.12), transparent 40%),
        rgba(11, 11, 15, 0.94);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.builder-bar__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1.5rem;
    min-height: var(--bar-h);
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

.builder-bar__title {
    flex: 1 1 260px;
    min-width: 0;
}

.builder-bar__title .eyebrow {
    margin-bottom: 0.15rem;
    font-size: 0.75rem;
}

.builder-name input {
    width: 100%;
    padding: 0.15rem 0;
    background: none;
    border: 0;
    border-bottom: 1px dashed transparent;
    color: var(--text);
    font-family: var(--font-display-heavy);
    font-size: clamp(1.4rem, 2.6vw, 1.9rem);
    transition: border-color 0.2s;
}

.builder-name input::placeholder {
    color: #5d5a57;
}

.builder-name input:hover,
.builder-name input:focus {
    outline: none;
    border-bottom-color: var(--border);
}

.builder-name input:focus {
    border-bottom-color: var(--accent);
}

.builder-meters {
    display: flex;
    gap: 1.25rem;
    margin: 0;
}

.meter {
    display: grid;
    gap: 0.2rem;
    min-width: 110px;
}

.meter dt {
    font-family: var(--font-display);
    font-size: 0.7rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--muted);
}

.meter dd {
    margin: 0;
    font-family: var(--font-display-heavy);
    font-size: 1.4rem;
    line-height: 1;
}

.meter__goal {
    font-family: var(--font-display);
    font-size: 0.95rem;
    color: var(--muted);
}

.meter__bar {
    display: block;
    height: 4px;
    background: var(--bg-deep);
    border-radius: 999px;
    overflow: hidden;
}

.meter__bar span {
    display: block;
    height: 100%;
    width: 0;
    background: var(--accent);
    border-radius: inherit;
    transition: width 0.3s var(--ease), background-color 0.3s;
}

.meter.is-good .meter__bar span {
    background: #4caf7a;
}

.meter.is-good dd {
    color: #7fd1a0;
}

.meter.is-over .meter__bar span {
    background: #ffb020;
}

.meter.is-over dd {
    color: #ffc04d;
}

.builder-check {
    padding: 0.45rem 0.9rem;
    border: 0;
    font-size: 0.78rem;
    cursor: pointer;
}

.builder-bar__actions {
    display: flex;
    gap: 0.5rem;
}

.builder-notice {
    margin: 0 0 1.25rem;
}

.builder-tabs {
    display: none;
}

.builder-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(340px, 420px);
    gap: 1.5rem;
    align-items: start;
}

/* Card browser */

.builder-search {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.builder-search .gallery-search {
    flex: 1 1 240px;
}

.builder-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.25rem;
    margin-bottom: 0.9rem;
    padding-bottom: 0.9rem;
    border-bottom: 1px solid var(--border);
}

.builder-filters .chip {
    padding: 0.3rem 0.75rem;
    font-size: 0.88rem;
}

.builder-filters .chip__symbol {
    width: 1.15rem;
    height: 1.15rem;
    font-size: 0.75rem;
}

.builder-browser__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.9rem;
}

.builder-browser__head .gallery-count {
    margin: 0;
}

.builder-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
}

.pick-card {
    position: relative;
    display: grid;
    gap: 0.4rem;
    align-content: start;
    cursor: grab;
}

.pick-card.is-dragging {
    opacity: 0.45;
}

.pick-card__art {
    position: relative;
    display: block;
    padding: 0;
    background: none;
    border: 0;
    cursor: zoom-in;
}

.pick-card__art img {
    width: 100%;
    aspect-ratio: 5 / 7;
    object-fit: cover;
    border-radius: 4.5%;
    background: var(--surface);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.55);
    transition: transform 0.2s var(--ease), box-shadow 0.2s, filter 0.2s;
}

.pick-card:hover .pick-card__art img {
    transform: translateY(-3px);
    box-shadow: 0 16px 30px rgba(0, 0, 0, 0.7);
}

.pick-card.is-in-deck .pick-card__art img {
    box-shadow: 0 0 0 2px var(--accent), 0 8px 20px rgba(0, 0, 0, 0.55);
}

.pick-card.is-banned .pick-card__art img {
    filter: grayscale(1) brightness(0.6);
}

.pick-card__count {
    position: absolute;
    top: -6px;
    right: -6px;
    padding: 0.15rem 0.5rem;
    background: var(--accent);
    border: 2px solid var(--bg);
    border-radius: 999px;
    color: #fff;
    font-family: var(--font-display-heavy);
    font-size: 0.85rem;
}

.pick-card__count[hidden] {
    display: none;
}

.pick-card__name {
    font-family: var(--font-display);
    font-size: 0.85rem;
    line-height: 1.25;
    text-align: center;
}

.pick-card__actions {
    display: flex;
    gap: 0.35rem;
}

.pick-btn {
    flex: 1;
    padding: 0.35rem 0.25rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    font-family: var(--font-display);
    font-size: 0.82rem;
    cursor: pointer;
    transition: background-color 0.15s, border-color 0.15s;
}

.pick-btn:hover:not(:disabled) {
    background: var(--accent);
    border-color: var(--accent);
}

.pick-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.pick-btn--host:not(:disabled) {
    border-color: rgba(240, 217, 138, 0.5);
    color: #f0d98a;
}

/* Deck panel */

.builder-deck {
    position: sticky;
    top: calc(var(--header-h) + var(--bar-h) + 1.25rem);
}

.builder-deck__scroll {
    display: grid;
    gap: 1rem;
    max-height: calc(100vh - var(--header-h) - var(--bar-h) - 2.5rem);
    overflow-y: auto;
    padding: 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}

.drop-zone {
    display: grid;
    gap: 0.75rem;
    padding: 0.5rem;
    border: 1px dashed transparent;
    border-radius: 10px;
    transition: border-color 0.2s, background-color 0.2s;
}

.builder.is-dragging-browser .drop-zone,
.builder.is-dragging-main .drop-zone--side,
.builder.is-dragging-side .drop-zone:not(.drop-zone--side) {
    border-color: var(--border);
    background: rgba(196, 22, 28, 0.04);
}

.drop-zone.is-over {
    border-color: var(--accent) !important;
    background: var(--accent-soft) !important;
}

.drop-zone__hint {
    margin: 0;
    padding: 1rem;
    border: 1px dashed var(--border);
    border-radius: 8px;
    color: var(--muted);
    font-size: 0.88rem;
    text-align: center;
}

.builder.has-main-cards .drop-zone:not(.drop-zone--side) .drop-zone__hint,
.builder.has-side-cards .drop-zone--side .drop-zone__hint {
    display: none;
}

.host-card {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 1rem;
    padding: 0.85rem;
    background:
        linear-gradient(135deg, rgba(240, 217, 138, 0.12), transparent 60%),
        var(--bg-deep);
    border: 1px solid rgba(240, 217, 138, 0.35);
    border-radius: 10px;
}

.host-card__art {
    padding: 0;
    background: none;
    border: 0;
    cursor: zoom-in;
}

.host-card__art img {
    width: 100%;
    border-radius: 4.5%;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.6);
}

.host-card__info {
    display: grid;
    gap: 0.3rem;
    align-content: start;
    justify-items: start;
}

.host-card__info .eyebrow {
    margin: 0;
    font-size: 0.72rem;
    color: #f0d98a;
}

.host-card__name {
    font-family: var(--font-display);
    font-weight: normal;
    font-size: 1.15rem;
    line-height: 1.2;
}

.host-card__effect {
    margin: 0 0 0.35rem;
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.host-card--empty {
    grid-template-columns: 1fr;
    justify-items: start;
    gap: 0.35rem;
    border-style: dashed;
}

.host-card--empty p {
    margin: 0 0 0.5rem;
    color: var(--muted);
    font-size: 0.9rem;
}

.deck-group {
    display: grid;
    gap: 0.35rem;
}

.deck-group__head {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.25rem 0.25rem 0.35rem;
    border-bottom: 1px solid var(--border);
}

.deck-group__head h3 {
    margin: 0;
    font-size: 1.05rem;
}

.deck-row {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 0.6rem;
    padding: 0.35rem 0.4rem;
    border-radius: 8px;
    cursor: grab;
    transition: background-color 0.15s;
}

.deck-row:hover {
    background: var(--surface-2);
}

.deck-row.is-dragging {
    opacity: 0.4;
}

.deck-row.is-illegal {
    background: rgba(255, 176, 32, 0.08);
    box-shadow: inset 3px 0 0 #ffb020;
}

.deck-row__thumb {
    width: 44px;
    height: 44px;
    padding: 0;
    overflow: hidden;
    background: var(--bg-deep);
    border: 0;
    border-radius: 6px;
    cursor: zoom-in;
}

.deck-row__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 22%;
    transform: scale(1.6);
}

.deck-row__info {
    display: grid;
    min-width: 0;
}

.deck-row__name {
    overflow: hidden;
    font-family: var(--font-display);
    font-size: 0.95rem;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.deck-row__meta {
    overflow: hidden;
    color: var(--muted);
    font-size: 0.75rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.stepper {
    display: inline-flex;
    align-items: center;
    background: var(--bg-deep);
    border: 1px solid var(--border);
    border-radius: 999px;
}

.stepper__btn {
    width: 28px;
    height: 28px;
    padding: 0;
    background: none;
    border: 0;
    border-radius: 50%;
    color: var(--text);
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.15s;
}

.stepper__btn:hover:not(:disabled) {
    background: var(--accent);
}

.stepper__btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.stepper__value {
    min-width: 1.4rem;
    font-family: var(--font-display-heavy);
    text-align: center;
}

.deck-row__move {
    padding: 0.25rem 0.5rem;
    background: none;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--muted);
    font-size: 0.72rem;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
}

.deck-row__move:hover {
    border-color: var(--text);
    color: var(--text);
}

.drop-zone--side {
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
}

.drop-zone--side .deck-group__head {
    border-bottom-style: dashed;
}

.builder-stats {
    padding: 0.9rem;
    background: var(--bg-deep);
    border-radius: 10px;
}

.builder-stats h3 {
    margin-bottom: 0.75rem;
    font-size: 0.8rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--muted);
}

.curve {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0.4rem;
    height: 110px;
    margin-bottom: 1rem;
}

.curve__col {
    display: grid;
    grid-template-rows: 1fr auto;
    gap: 0.3rem;
    align-items: end;
    text-align: center;
}

.curve__bar {
    position: relative;
    display: block;
    min-height: 3px;
    background: linear-gradient(180deg, #ff5a3c, var(--accent));
    border-radius: 4px 4px 2px 2px;
    transition: height 0.3s var(--ease);
}

.curve__n {
    position: absolute;
    top: -1.2rem;
    left: 0;
    right: 0;
    font-size: 0.75rem;
    color: var(--text);
}

.curve__label {
    font-family: var(--font-display);
    font-size: 0.8rem;
    color: var(--muted);
}

.type-breakdown {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
    gap: 0.5rem;
    margin: 0;
}

.type-breakdown div {
    padding: 0.4rem 0.5rem;
    background: var(--surface);
    border-radius: 6px;
    text-align: center;
}

.type-breakdown dt {
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

.type-breakdown dd {
    margin: 0;
    font-family: var(--font-display-heavy);
    font-size: 1.15rem;
}

/* Toast, dialogs */

.builder-toast {
    position: fixed;
    left: 50%;
    bottom: 1.5rem;
    z-index: 1500;
    max-width: calc(100% - 2rem);
    padding: 0.75rem 1.25rem;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-left: 3px solid #4caf7a;
    border-radius: 10px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
    font-size: 0.95rem;
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, 12px);
    transition: opacity 0.2s, transform 0.2s var(--ease);
}

.builder-toast.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

.builder-toast.is-error {
    border-left-color: #ffb020;
}

.builder-dialog {
    width: min(520px, calc(100% - 2rem));
}

.builder-dialog__inner {
    display: grid;
    gap: 1rem;
    padding: clamp(1.5rem, 4vw, 2.25rem);
}

.builder-dialog__inner h2 {
    margin: 0;
    font-family: var(--font-display-heavy);
}

.issue-list {
    display: grid;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.issue-list[hidden] {
    display: none;
}

.issue-list li {
    padding: 0.6rem 0.85rem;
    border-left: 3px solid #ffb020;
    background: rgba(255, 176, 32, 0.08);
    font-size: 0.92rem;
}

.issue-list li.is-good {
    border-left-color: #4caf7a;
    background: rgba(76, 175, 122, 0.1);
}

.check-field {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    cursor: pointer;
}

.check-field[hidden] {
    display: none;
}

.check-field input {
    width: 1.1rem;
    height: 1.1rem;
    margin-top: 0.2rem;
    accent-color: var(--accent);
}

.check-field small {
    display: block;
    color: var(--muted);
    font-size: 0.85rem;
}

#dialogActions {
    align-items: center;
    margin-top: 1.25rem;
}

/* Builder on tablets and phones: one panel at a time */

@media (max-width: 980px) {
    .builder {
        --bar-h: 0px;
    }

    .builder-bar {
        position: static;
    }

    .builder-tabs {
        position: sticky;
        top: var(--header-h);
        z-index: 25;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.25rem;
        margin-bottom: 1rem;
        padding-top: 0.5rem;
        padding-bottom: 0.5rem;
        background: var(--bg);
    }

    .builder-tabs button {
        padding: 0.65rem;
        background: var(--surface);
        border: 1px solid var(--border);
        border-radius: 999px;
        color: var(--muted);
        font-family: var(--font-display);
        cursor: pointer;
    }

    .builder-tabs button.is-active {
        background: var(--accent);
        border-color: var(--accent);
        color: #fff;
    }

    .builder-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .builder-layout[data-view="cards"] .builder-deck,
    .builder-layout[data-view="deck"] .builder-browser {
        display: none;
    }

    .builder-deck {
        position: static;
    }

    .builder-deck__scroll {
        max-height: none;
        overflow: visible;
    }

    .builder-cards {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    }
}

@media (max-width: 560px) {
    .builder-meters {
        width: 100%;
    }

    .meter {
        flex: 1;
    }

    .builder-bar__actions {
        flex: 1;
    }

    .builder-bar__actions .btn {
        flex: 1;
    }

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

/* ---------- Events ---------- */

.event-list {
    display: grid;
    gap: 1.5rem;
}

.event-card {
    display: grid;
    grid-template-columns: minmax(0, 45%) 1fr;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 0.3s var(--ease), border-color 0.3s, box-shadow 0.3s;
}

a.event-card:hover {
    transform: translateY(-4px);
    border-color: #3d3d4c;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
}

.event-card.is-disabled {
    opacity: 0.7;
}

.event-card__media {
    aspect-ratio: 2650 / 1346;
    overflow: hidden;
    background: var(--surface-2);
}

.event-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.event-card__placeholder {
    display: grid;
    place-items: center;
    height: 100%;
    background: radial-gradient(circle at center, var(--surface-2), var(--bg-deep));
}

.event-card__placeholder img {
    width: 40%;
    height: auto;
    opacity: 0.35;
}

.event-card__body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 1.75rem 2rem;
}

.event-card__body h2 {
    font-size: 1.8rem;
}

.event-card__body p {
    color: var(--muted);
}

.event-card__info {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 2rem;
    margin: 0 0 1.25rem;
}

.event-card__info dt {
    font-family: var(--font-display);
    font-size: 0.75rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent-hover);
}

.event-card__info dd {
    margin: 0;
}

@media (max-width: 800px) {
    .event-card {
        grid-template-columns: 1fr;
    }

    .event-card__body {
        padding: 1.4rem;
    }
}

/* ---------- Footer ---------- */

.site-footer {
    background: var(--bg-deep);
    border-top: 1px solid var(--border);
    font-size: 0.95rem;
}

.site-footer__top {
    display: grid;
    grid-template-columns: 1.6fr repeat(4, 1fr);
    gap: 2rem;
    padding-top: 3.5rem;
    padding-bottom: 3rem;
}

.site-footer__logo {
    width: 110px;
    margin-bottom: 1rem;
}

.site-footer__brand p {
    max-width: 300px;
    color: var(--muted);
}

.site-footer h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

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

.site-footer__col li {
    margin-bottom: 0.5rem;
}

.site-footer__col a {
    color: var(--muted);
    transition: color 0.2s;
}

.site-footer__col a:hover {
    color: var(--text);
}

.social-links {
    display: flex;
    gap: 0.75rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.social-links a {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 1px solid var(--border);
    border-radius: 50%;
    transition: border-color 0.2s;
}

.social-links a:hover {
    border-color: var(--accent);
}

.social-links img {
    width: 22px;
    height: 22px;
}

.site-footer__bottom {
    border-top: 1px solid var(--border);
    padding: 1.25rem 0;
    color: var(--muted);
    font-size: 0.85rem;
}

.site-footer__bottom-inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.5rem 1.5rem;
}

.site-footer__bottom a:hover {
    color: var(--text);
}

@media (max-width: 1024px) {
    .site-footer__top {
        grid-template-columns: repeat(2, 1fr);
    }

    .site-footer__brand {
        grid-column: 1 / -1;
    }
}

/* ---------- Scroll reveal ---------- */

.js .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.js .reveal.is-visible {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }

    .js .reveal {
        opacity: 1;
        transform: none;
    }
}

/* ==========================================================
   Phones and tablets
   ========================================================== */

@media (max-width: 1024px) {

    /* Menu: a blurred header becomes the positioning box for the fixed menu,
       which squeezes the menu into the header bar. Use a solid header instead. */
    .site-header {
        background: var(--bg-deep);
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    .main-nav {
        bottom: auto;
        height: calc(100vh - var(--header-h));
        height: calc(100dvh - var(--header-h));
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
    }

    .main-nav.is-open {
        box-shadow: 0 0 0 100vmax rgba(4, 4, 6, 0.7);
    }

    .main-nav__link {
        min-height: 56px;
        height: auto;
    }

    .main-nav__item.is-current>.main-nav__link {
        color: var(--accent-hover);
    }

    .mega-menu__list a {
        padding-top: 0.75rem;
        padding-bottom: 0.75rem;
    }

    .main-nav__account .btn {
        justify-content: center;
        padding-top: 0.8rem;
        padding-bottom: 0.8rem;
    }

    /* Sticky bars use solid backgrounds so scrolling feels smooth */
    .toc-bar,
    .builder-bar {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        background: var(--bg-deep);
    }
}

@media (max-width: 800px) {
    :root {
        --header-h: 64px;
    }

    .site-logo img {
        height: 40px;
    }

    /* Banner art has its own text; darken it so it doesn't show through page headings */
    .page-hero__bg::after,
    .promo-band__bg::after {
        background: linear-gradient(180deg, rgba(11, 11, 15, 0.9) 0%, rgba(11, 11, 15, 0.98) 100%);
    }

    .page-hero {
        padding: 3rem 0 2.5rem;
    }

    .page-hero--event,
    .deck-hero {
        padding-bottom: 4.5rem;
    }

    .page-hero__title {
        font-size: clamp(2.1rem, 9vw, 2.8rem);
    }

    .page-hero p,
    .promo-band p {
        font-size: 1rem;
    }

    .section {
        padding: 2.75rem 0;
    }

    .section-title {
        font-size: clamp(1.6rem, 7vw, 2rem);
    }

    .section-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
        margin-bottom: 1.5rem;
    }

    .btn-row .btn {
        flex: 1 1 auto;
    }

    /* Card gallery and deck list toolbars: no sticky bar covering the screen */
    .gallery-toolbar {
        position: static;
        margin: 0 0 1.5rem;
        padding: 0;
        background: none;
        border: 0;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    .filter-panel {
        max-height: none;
        overflow: visible;
    }

    /* Segmented switches (league months, deck sort) scroll sideways instead of wrapping */
    .segmented {
        display: flex;
        flex-wrap: nowrap;
        max-width: 100%;
        overflow-x: auto;
        border-radius: 12px;
        scrollbar-width: none;
    }

    .segmented::-webkit-scrollbar {
        display: none;
    }

    .segmented button {
        flex: 0 0 auto;
        white-space: nowrap;
        border-radius: 9px;
    }

    #standingsTabs {
        width: 100%;
    }

    /* Tables fit the screen */
    .board th,
    .board td,
    .data-table th,
    .data-table td {
        padding: 0.6rem 0.45rem;
        font-size: 0.9rem;
    }

    .board th {
        font-size: 0.65rem;
        letter-spacing: 0.08em;
    }

    .board__rank {
        width: 2rem;
    }

    .board__player .status {
        display: none;
    }

    .board__player .avatar {
        width: 24px;
        height: 24px;
    }

    .board__player span {
        overflow-wrap: anywhere;
    }

    /* Footer */
    .site-footer__top {
        gap: 1.75rem 1.25rem;
        padding-top: 2.5rem;
        padding-bottom: 2rem;
    }

    .site-footer__bottom-inner {
        flex-direction: column;
    }
}

@media (max-width: 700px) {

    /* Stop phones zooming in when a form field is tapped (iOS zooms below 16px) */
    input:not([type="checkbox"]):not([type="radio"]),
    select,
    textarea {
        font-size: 16px;
    }

    .builder-name input {
        font-size: 1.5rem;
    }

    /* Community decks: two per row */
    .deck-tiles {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.75rem;
    }

    .community-deck {
        border-radius: 10px;
    }

    .community-deck__body {
        padding: 0.7rem 0.75rem 0.3rem;
    }

    .community-deck__name {
        font-size: 1rem;
    }

    .community-deck__meta {
        font-size: 0.8rem;
    }

    .community-deck__host {
        font-size: 0.62rem;
        letter-spacing: 0.08em;
    }

    .community-deck__foot {
        padding: 0.3rem 0.75rem 0.75rem;
    }

    .deck-toolbar .select-field,
    .deck-toolbar .select-field select {
        width: 100%;
    }

    /* Homepage */
    .news-grid,
    .play-grid {
        gap: 1rem;
    }

    .news-card__body,
    .play-card__body {
        padding: 1rem 1.1rem 1.2rem;
    }

    .news-card__title {
        font-size: 1.2rem;
    }

    .promo-band {
        padding: 3.5rem 0;
    }

    .community__links {
        gap: 0.75rem;
    }

    /* Cards with a lot of padding */
    .panel,
    .ban-category,
    .errata,
    .spotlight,
    .auth__panel {
        padding: 1.25rem;
    }

    .stat-strip>div {
        padding: 1rem 1.1rem;
    }

    .ev-feature__body {
        padding: 1.25rem;
    }

    .ev-feature__actions .btn {
        flex: 1 1 100%;
    }

    .prize-card {
        padding: 1.5rem 1.25rem;
    }

    .choose-group {
        padding: 0.85rem;
    }

    .choose-groups,
    .choose-group {
        width: 100%;
    }

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

    .tutorial-cta img {
        width: 80px;
    }

    .lesson-list a {
        padding: 0.8rem 0.25rem;
    }

    .download {
        padding: 1rem;
        gap: 0.9rem;
    }

    /* Card dialog fills the screen on phones */
    .card-dialog {
        width: calc(100% - 1rem);
        max-height: calc(100vh - 1rem);
        max-height: calc(100dvh - 1rem);
    }

    .card-dialog__inner {
        gap: 1.25rem;
        padding: 3rem 1.1rem 1.25rem;
    }

    .card-dialog__image {
        max-width: 230px;
    }

    .card-stats {
        gap: 0.5rem;
    }

    /* Deck Builder */
    .builder-bar__inner {
        gap: 0.75rem;
    }

    .builder-bar__title {
        flex-basis: 100%;
    }

    .host-card {
        grid-template-columns: 72px minmax(0, 1fr);
        gap: 0.75rem;
    }

    .deck-row {
        grid-template-columns: 40px minmax(0, 1fr) auto;
        gap: 0.5rem;
    }

    .deck-row__thumb {
        width: 40px;
        height: 40px;
    }

    .deck-row__move {
        grid-column: 2 / -1;
        justify-self: end;
    }

    .builder-toast {
        bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
    }
}

@media (max-width: 420px) {
    .deck-tiles {
        gap: 0.6rem;
    }

    .community-deck__name {
        font-size: 0.92rem;
    }

    .hero__tab {
        min-width: 62%;
    }

    .card-fan {
        gap: 1rem;
    }
}

/* Tablets: two-up layouts where a single column wastes space */
@media (min-width: 701px) and (max-width: 1024px) {
    .container {
        padding: 0 2rem;
    }

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

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

    .site-footer__top {
        grid-template-columns: repeat(4, 1fr);
    }

    .site-footer__brand {
        grid-column: 1 / -1;
    }

    .event-columns,
    .info-split {
        gap: 1.5rem;
    }
}

@media (max-width: 560px) {
    .main-nav {
        width: 100%;
        border-left: 0;
    }
}