/* Generated by tools/build-assets.php. Edit resources/storefront/. */

/* shared/theme.css */
/* CSI brand blue, midnight, cyan and page gray are the starting palette. */

:root {
    color-scheme: light dark;
    --radius: 3px;
    --page: light-dark(#f0f2f5, #0d182a);
    --library: light-dark(#ffffff, #111f33);
    --surface: light-dark(#ffffff, #192a40);
    --hover: light-dark(#e9f2fb, #243b54);
    --ink: light-dark(#0d182a, #f2f6fc);
    --muted: light-dark(#44566d, #becde0);
    --line: light-dark(#8192a6, #758aa3);
    --accent: light-dark(#003d8f, #82ceff);
    --button-text: light-dark(#ffffff, #0d182a);
    --badge: light-dark(#dceeff, #233c58);
    --mast: #0d182a;
    --mast-text: #f6f8ff;
    --mast-accent: #8fdcff;
    --trim: #0e91bc;
    font-family: "Inter", "Segoe UI", Arial, sans-serif;
}

:root[data-theme="light"] {
    color-scheme: light;
}

:root[data-theme="dark"] {
    color-scheme: dark;
}

:root[data-theme="colorblind"] {
    color-scheme: light;
    --page: #fffaf0;
    --library: #ffffff;
    --surface: #ffffff;
    --hover: #e5f1ff;
    --ink: #101820;
    --muted: #344050;
    --line: #435468;
    --accent: #004478;
    --button-text: #ffffff;
    --badge: #ffdc87;
    --mast: #101820;
    --mast-text: #ffffff;
    --mast-accent: #ffdc87;
    --trim: #ffdc87;
}

/* shared/layout.css */
/* Page width and local sizing are independent so panels can use container queries. */
.container {
    width: min(1240px, 91%);
    margin-inline: auto;
}

.responsive-container {
    container: layout / inline-size;
}

.flex-row {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.flex-wrap {
    flex-wrap: wrap;
}

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

.grid {
    --grid-min: 17rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--grid-min)), 1fr));
    gap: 1.2rem;
}

/* shared/base.css */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--page);
    color: var(--ink);
}

a {
    color: inherit;
    text-underline-offset: .25em;
}

a:focus-visible, summary:focus-visible {
    outline: 3px solid currentColor;
    outline-offset: 4px;
}

h1, h2, p, figure {
    margin: 0;
}

h1, h2 {
    font-family: "DM Serif Text", Georgia, serif;
    font-weight: 500;
}

h1 {
    font-size: clamp(3.8rem, 7.5vw, 7.4rem);
    letter-spacing: -.065em;
    line-height: .94;
}

h1 em {
    color: var(--accent);
    font-weight: 400;
}

.skip {
    position: absolute;
    left: .5rem;
    top: -6rem;
    padding: .75rem;
    background: white;
    color: black;
    z-index: 8;
}

.skip:focus {
    top: .5rem;
}

.mast, footer {
    background: var(--mast);
    color: var(--mast-text);
}

nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: clamp(.85rem, 3vw, 2rem);
    font-size: .87rem;
}

nav a {
    text-decoration: none;
    padding-block: .6rem;
}

nav a:hover, .foot a:hover {
    color: var(--mast-accent);
}

.button {
    align-items: center;
    display: inline-flex;
    gap: 1.8rem;
    background: var(--accent);
    color: var(--button-text);
    border-radius: var(--radius);
    padding: .85rem 1.1rem;
    font-weight: 750;
    text-decoration: none;
}

.button:hover {
    text-decoration: underline;
}

.button:focus-visible {
    outline-color: var(--accent);
}

.library {
    background: var(--library);
    color: var(--ink);
    padding-block: clamp(2.4rem, 5vw, 4.5rem);
}

.section-title {
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 1.45rem;
}

.section-title h2 {
    font-size: clamp(2.4rem, 4vw, 4rem);
    letter-spacing: -.055em;
}

.section-title p {
    color: var(--muted);
    font-size: .92rem;
}

[hidden] {
    display: none !important;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.ui-icon {
    width: 1.25rem;
    height: 1.25rem;
    flex: none;
}

main [id] {
    scroll-margin-top: 6rem;
}

:root[data-theme="colorblind"] nav > a, :root[data-theme="colorblind"] .button {
    text-decoration: underline;
}

/* layout/header.css */
.mast {
    position: relative;
    z-index: 6;
}

.bar {
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(9rem, 40rem) auto;
    min-height: 72px;
    padding-block: .8rem;
}

.brand {
    gap: .45rem;
    font-weight: 900;
    font-size: 1.5rem;
    letter-spacing: -.045em;
    text-decoration: none;
}

.brand i {
    color: var(--mast-accent);
    font: 2.1rem/1 Georgia, serif;
}

.brand span {
    max-width: 5em;
    margin-left: .35rem;
    padding-left: .65rem;
    border-left: 1px solid var(--mast-accent);
    font-size: .65rem;
    letter-spacing: .09em;
    line-height: 1.15;
    text-transform: uppercase;
}

.shop-actions {
    gap: clamp(.5rem, 1.5vw, 1.3rem);
    justify-self: end;
}

.catalog-search {
    gap: .65rem;
    min-height: 44px;
    background: var(--surface);
    color: var(--muted);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: .4rem .8rem;
}

.catalog-search input {
    flex: 1;
    min-width: 0;
    width: 100%;
    border: 0;
    font: inherit;
    background: transparent;
    color: inherit;
}

.catalog-search input::placeholder {
    color: var(--muted);
    opacity: 1;
}

.catalog-search span {
    padding-left: .65rem;
    border-left: 1px solid var(--line);
    font-size: .75rem;
}

@media (max-width: 44rem) {
    .bar {
        grid-template-columns: 1fr auto;
    }

    .catalog-search {
        grid-row: 2;
        grid-column: 1 / -1;
    }

    .shop-actions {
        grid-column: 2;
        grid-row: 1;
    }
}

@media (max-width: 36rem) {
    .bar {
        gap: .2rem .7rem;
    }

    .brand span {
        display: none;
    }
}

@media (max-width: 23rem) {
    .shop-actions {
        gap: .3rem;
    }
}

/* layout/footer.css */
.foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem clamp(1rem, 3vw, 3rem);
    padding-block: 1.5rem;
}

.foot-brand {
    font-size: 1.15rem;
    font-weight: 750;
    text-decoration: none;
}

.foot nav {
    gap: .25rem 1.25rem;
}

.foot nav a, .foot-top {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    font-size: .9rem;
}

.foot-top {
    margin-inline-start: auto;
}

@media (max-width: 36rem) {
    .foot, .foot nav {
        flex-direction: column;
        align-items: flex-start;
    }

    .foot {
        gap: .45rem;
    }

    .foot nav {
        gap: 0;
    }

    .foot-top {
        margin-inline-start: 0;
    }
}

/* home/hero.css */
.shop-home {
    padding-block: clamp(1rem, 2.2vw, 2rem) 2rem;
    --home-gap: clamp(1rem, 2.5vw, 1.75rem);
}

.shop-home :is(h1, h2) {
    font-family: inherit;
    font-weight: 750;
    line-height: 1.15;
}

.finder-games {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .65rem;
}

.finder-tile {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
}

.finder-art {
    display: flex;
    align-items: end;
    min-height: clamp(5rem, 10vw, 8rem);
    padding: .8rem;
    color: white;
    text-decoration: none;
    background: repeating-conic-gradient(from 2deg at 96% 125%, #653f35 0 15deg, #b67c60 16deg 20deg);
}

[data-game="pkm"].finder-art, [data-game="pkm"].item-swatch {
    background: repeating-radial-gradient(ellipse at 102% 0, #234e63 0 15px, #57899b 16px 18px);
}

[data-game="op"].finder-art, [data-game="op"].item-swatch {
    background: repeating-linear-gradient(-43deg, #344f42 0 25px, #4e705e 26px 31px);
}

.finder-art strong {
    padding: .2rem .4rem;
    background: #11222ce8;
    border-radius: var(--radius);
    font-size: clamp(1rem, 1.8vw, 1.3rem);
}

.finder-formats {
    display: flex;
    flex-wrap: wrap;
    gap: .9rem;
    padding-inline: .8rem;
}

.finder-formats a, .shop-resources a, .shop-resources summary {
    color: var(--accent);
    font-weight: 650;
    text-decoration: none;
}

.finder-formats a {
    display: inline-flex;
    align-items: center;
    min-height: 2.4rem;
    font-size: .875rem;
}

.shop-home a:hover, .shop-home summary:hover {
    text-decoration: underline;
}

.finder-tile a:focus-visible {
    outline-offset: -3px;
}

.shop-merch, .shop-resources {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    gap: var(--home-gap);
    margin-top: var(--home-gap);
}

.shop-feature {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: flex;
    align-items: center;
    min-height: clamp(10.7rem, 19vw, 15rem);
    color: #fff;
    background: repeating-linear-gradient(126deg, transparent 0 67px, #76bbc31a 68px 70px),
        linear-gradient(100deg, #112c40, #16535d 70%, #508a85);
    border-radius: var(--radius);
}

.feature-copy {
    width: 60%;
    padding: clamp(.9rem, 2.1vw, 1.75rem);
    overflow-wrap: anywhere;
}

.feature-label {
    font-size: .7rem;
    font-weight: 750;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.shop-feature h2 {
    margin-block: .55rem .35rem;
    font-size: clamp(1.35rem, 3vw, 2.25rem);
    letter-spacing: -.035em;
}

.feature-price {
    color: #ffdb9a;
    font-weight: 700;
}

.deal-link {
    display: inline-block;
    margin-top: .6rem;
    padding: .55rem .8rem;
    background: #bef3fa;
    color: #0b2935;
    border-radius: var(--radius);
    font-size: .875rem;
    font-weight: 750;
    text-decoration: none;
}

/* The decorative packs scale together as the feature changes width. */
.booster-art {
    position: absolute;
    z-index: -1;
    inset: 0 2% 0 59%;
    pointer-events: none;
}

.booster-art i {
    position: absolute;
    top: 50%;
    left: 47%;
    width: 45%;
    max-width: 6rem;
    aspect-ratio: .65;
    transform: translate(-50%, -46%) rotate(8deg);
    border: 1px solid #edc095;
    box-shadow: 3px 7px 10px #08202680;
    background: repeating-linear-gradient(0deg, #dfbc9c 0 1px, transparent 1px 3px) top / 100% 6% no-repeat,
        repeating-linear-gradient(0deg, #dfbc9c 0 1px, transparent 1px 3px) bottom / 100% 6% no-repeat,
        radial-gradient(ellipse at 48% 54%, #ffd376 0 4%, transparent 5% 11%, #ffd376 12% 14%, transparent 15% 20%, #dea34a 21% 23%, transparent 24%),
        repeating-conic-gradient(from 34deg at 48% 54%, #362434 0 20deg, #a56944 21deg 40deg);
}

.booster-art i:first-child {
    left: 24%;
    transform: translate(-50%, -45%) rotate(-17deg);
}

.booster-art i:nth-child(2) {
    left: 70%;
    transform: translate(-50%, -49%) rotate(16deg);
}

.booster-art i::after {
    content: 'BOOSTER';
    position: absolute;
    inset: auto 4% 12%;
    padding: 3% 0;
    background: #14252c;
    color: white;
    font: 750 .52rem/1 system-ui, sans-serif;
    letter-spacing: .08em;
    text-align: center;
}

.hot-list h2 {
    display: flex;
    align-items: baseline;
    gap: .6rem;
    padding-bottom: .45rem;
    border-bottom: 1px solid var(--line);
    font-size: clamp(1.25rem, 2.3vw, 1.6rem);
}

.hot-list h2 small {
    color: var(--muted);
    font-size: .7rem;
    font-weight: 600;
}

.shop-home ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.hot-list li a {
    display: flex;
    align-items: center;
    gap: .65rem;
    min-height: 3.25rem;
    padding-block: .4rem;
    color: inherit;
    border-bottom: 1px solid var(--line);
    font-size: .9rem;
    font-weight: 700;
    text-decoration: none;
}

.hot-list a small {
    display: block;
    margin-top: .15rem;
    color: var(--muted);
    font-weight: 400;
}

.hot-list a b {
    margin-inline-start: auto;
    font-variant-numeric: tabular-nums;
}

.item-swatch {
    flex: 0 0 1.8rem;
    height: 2.1rem;
    border-radius: 2px;
}

.shop-resources {
    padding-top: 1rem;
    border-top: 1px solid var(--line);
}

.shop-resources h2 {
    margin-bottom: .4rem;
    font-size: 1.1rem;
}

.shop-resources li + li {
    margin-top: .5rem;
}

.shop-resources a, .shop-resources summary {
    font-size: .9rem;
}

.shop-preview {
    display: none;
    margin-top: 1rem;
    padding: 1rem;
    background: var(--surface);
    border-inline-start: 3px solid var(--trim);
}

.shop-preview:target {
    display: block;
}

.shop-preview p {
    margin-block: .65rem;
}

@media (max-width: 38rem) {
    .finder-games, .shop-merch, .shop-resources {
        grid-template-columns: 1fr;
    }

    .finder-tile {
        display: grid;
        grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    }

    .finder-art {
        min-height: 4.5rem;
    }

    .finder-formats {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
    }

    .finder-formats a {
        min-height: 44px;
    }

    .shop-resources a {
        display: inline-flex;
        align-items: center;
        min-height: 44px;
    }
}

/* games/directory.css */
.game-grid {
    display: flex;
    flex-wrap: wrap;
    align-items: start;
    gap: .4rem 1rem;
}

.game-grid summary {
    cursor: pointer;
    list-style: none;
}

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

.game-grid details[open] {
    flex-basis: 100%;
}

.game-grid details[open] summary {
    text-decoration: underline;
}

.game-grid details p {
    margin-block: .4rem;
    color: var(--muted);
    font-size: .92rem;
    line-height: 1.5;
}

@media (max-width: 38rem) {
    .game-grid {
        display: grid;
        gap: 0;
    }

    .game-grid summary {
        display: flex;
        align-items: center;
        min-height: 44px;
    }
}

/* shop/shop.css */
/* The buylist preview opens from the persistent Sell to Us navigation link. */
.sell-section:not(:target) {
    display: none;
}

.sell-section {
    border-top: 1px solid var(--line);
    padding-block: 2rem;
}

.sell-section p {
    color: var(--muted);
    line-height: 1.5;
    margin-block-start: .5rem;
}

/* articles/articles.css */
.article-grid h3 {
    margin: 0 0 .55rem;
}

.article-grid p, .reading p {
    color: var(--muted);
    line-height: 1.6;
}

.article-grid article {
    border-left: 3px solid var(--trim);
    padding: .3rem 1.1rem;
}

.article-grid h3 {
    font: 500 1.6rem/1.15 Georgia, serif;
}

.reading {
    max-width: 44rem;
    padding-block: 3rem;
}

.reading h1 {
    font-size: clamp(2.8rem, 7vw, 5rem);
    margin: 1.5rem 0 1rem;
}

.reading h2 {
    margin: 1.8rem 0 .6rem;
    font-size: 1.75rem;
}

.reading > a:last-child {
    display: inline-block;
    margin-top: 1.5rem;
}

/* account/panel.css */
.account-menu {
    justify-self: end;
}

.account-menu > summary {
    gap: .5rem;
    min-height: 44px;
    padding: .45rem .8rem;
    border: 1px solid var(--mast-accent);
    border-radius: var(--radius);
    cursor: pointer;
    list-style: none;
}

.account-menu > summary::-webkit-details-marker {
    display: none;
}

.account-menu > summary::after {
    content: '▾';
}

.account-menu[open] > summary::after {
    content: '▴';
}

.account-sheet {
    position: absolute;
    z-index: 4;
    right: 0;
    top: calc(100% - .2rem);
    width: min(29rem, 91vw);
    max-height: 75vh;
    overflow: auto;
    overscroll-behavior: contain;
    background: var(--surface);
    color: var(--ink);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 .8rem 2rem #0d182a33;
}

.account-sheet .panel-body {
    border: 0;
}

.panel-body {
    border-top: 1px solid var(--line);
}

.panel-nav {
    padding: .5rem 1rem;
    background: var(--library);
    gap: .25rem 1rem;
}

.panel-nav button {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
}

.panel-nav button[aria-current] {
    font-weight: 700;
    text-decoration: underline;
}

.panel-nav button {
    font: inherit;
    background: transparent;
    border: 0;
    color: inherit;
    cursor: pointer;
}

.account-sheet nav a:hover {
    color: var(--accent);
    text-decoration: underline;
}

.panel-content {
    padding: .625rem clamp(.75rem, 2vw, 1.25rem) 1rem;
}

.panel-content h2 {
    font-size: clamp(1.4rem, 6cqi, 1.65rem);
    line-height: 1.2;
}

.account-sheet .panel-nav {
    --grid-min: 3.6rem;
    gap: .2rem;
    padding: .45rem;
    background: #003d8f;
    color: white;
}

.panel-nav button {
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: .3rem;
    min-height: 3.6rem;
    padding: .3rem .1rem;
    border-radius: var(--radius);
    font-size: .78rem;
}

.account-sheet .panel-nav button:hover {
    color: white;
    background: #174f97;
}

.account-sheet .panel-nav button[aria-current] {
    background: white;
    color: #003477;
    text-decoration: underline;
    text-underline-offset: .2em;
}

:root[data-theme="colorblind"] .panel-nav {
    background: #101820;
}

:root[data-theme="colorblind"] .panel-nav button[aria-current] {
    background: #ffdc87;
    color: #101820;
}

.staff-settings {
    max-width: 24rem;
    margin-top: 1rem;
}

.staff-settings label {
    gap: .4rem;
}

.login-form input:not([type="hidden"]) {
    width: 100%;
    min-height: 44px;
    color: var(--ink);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: .6rem;
    font: inherit;
}

.staff-settings select {
    color: var(--ink);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: .6rem;
    font: inherit;
}

.staff-settings button {
    justify-self: start;
    font: inherit;
    cursor: pointer;
    border: none;
}

.staff-links li {
    padding-block: .4rem;
}

@media (max-width: 36rem) {
    /* Match the search row's gutters as the mobile header changes width. */
    .account-sheet {
        width: 100%;
    }

    .account-sheet .staff-settings {
        max-width: none;
    }

    .account-menu {
        grid-column: 2;
        grid-row: 1;
    }

    .shop-actions summary {
        gap: .3rem;
        padding-inline: .45rem;
    }
}

@media (max-width: 23rem) {
    .account-menu > summary::after {
        display: none;
    }
}

/* account/calendar.css */
.month-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: .5rem;
}

.month-header h2 {
    font-size: clamp(1.125rem, 5.6cqi, 1.5rem);
}

.month-header nav {
    flex-wrap: nowrap;
    gap: 0;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--library);
}

.month-header nav button {
    font: inherit;
    color: inherit;
    background: transparent;
    border: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    min-width: 44px;
    justify-content: center;
}

.month-header nav button + button {
    border-inline-start: 1px solid var(--line);
}

.month-header nav button:hover {
    background: var(--hover);
    color: var(--accent);
}

.month-header nav button:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: -3px;
}

/* The toolbar follows the account panel width, including on wide screens. */
@container layout (max-width: 15rem) {
    .month-header {
        grid-template-columns: 1fr;
        justify-items: start;
    }
}

.calendar {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    text-align: center;
    margin-top: .375rem;
}

.calendar th {
    color: var(--muted);
    font-size: .85rem;
    padding-block: .5rem;
}

.calendar td {
    border-top: 1px solid var(--line);
    height: 2.75rem;
}

.calendar [aria-current] {
    display: inline-block;
    border-radius: 50%;
    background: var(--accent);
    color: var(--button-text);
    font-weight: 750;
    padding: .25rem;
    min-width: 2rem;
}

.calendar-zone {
    margin-top: .75rem;
    color: var(--muted);
}

/* cart/cart.css */
.cart-trigger {
    font: inherit;
    color: inherit;
    background: transparent;
    border: 0;
    padding: 0;
    cursor: pointer;
    gap: .35rem;
    min-height: 44px;
    text-decoration: none;
    font-weight: 650;
}

.cart-count {
    background: var(--mast-accent);
    color: var(--mast);
    font: bold .72rem/1.4 monospace;
    min-width: 1.1rem;
    border-radius: 1rem;
    text-align: center;
}

.cart-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: .6rem;
    border-bottom: 1px solid var(--line);
    padding: 1rem 0;
}

.cart-row button {
    justify-self: end;
    font: inherit;
    color: var(--ink);
    border: 0;
    background: transparent;
    cursor: pointer;
    text-decoration: underline;
}

.panel-content [data-cart-empty] p, .panel-content [data-cart-total] {
    margin: 1rem 0;
}

@media (max-width: 23rem) {
    .cart-trigger > span:not(.cart-count) {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip-path: inset(50%);
    }

    .cart-trigger {
        min-width: 44px;
        justify-content: center;
        gap: .15rem;
    }
}

/* navigation/catalog-menu.css */
/* The catalog bar uses native disclosures so browsing also works without scripts. */

.store-nav {
    --menu-heading: color-mix(in srgb, var(--surface) 96%, var(--ink));
    position: sticky;
    top: 0;
    z-index: 5;
    display: block;
    background: var(--mast);
    color: var(--mast-text);
    border-top: 1px solid var(--line);
    border-bottom: 2px solid var(--trim);
}

.section-tabs {
    position: relative;
    align-items: stretch;
    gap: 0;
}

.section-options > summary, .sell-link {
    justify-content: center;
    gap: .65rem;
    min-height: 46px;
    padding: .45rem clamp(.55rem, 1.25vw, 1.1rem);
    font-weight: 650;
}

.section-options > summary {
    list-style: none;
    cursor: pointer;
}

.section-options > summary::-webkit-details-marker {
    display: none;
}

.nav-chevron {
    width: .43rem;
    height: .43rem;
    border: solid currentColor;
    border-width: 0 2px 2px 0;
    transform: translateY(-2px) rotate(45deg);
}

.section-options summary .nav-chevron {
    color: var(--mast-accent);
}

.section-options > summary:hover, .sell-link:hover {
    color: var(--mast-accent);
    text-decoration: underline;
}

.section-options[open] > summary {
    position: relative;
    z-index: 2;
    background: var(--menu-heading);
    border-radius: var(--radius) var(--radius) 0 0;
    color: var(--ink);
    text-decoration: none;
}

.section-options[open] .nav-chevron {
    color: var(--accent);
    transform: translateY(2px) rotate(225deg);
}

.sell-link {
    margin-inline-start: auto;
    padding-inline-end: 0;
    color: var(--mast-accent);
}

.sell-link .ui-icon {
    width: 1rem;
}

.store-nav :focus-visible {
    outline: 2px solid currentColor;
    outline-offset: -3px;
}

.section-flyout {
    position: absolute;
    z-index: 1;
    /* Keep the panel directly below its own tab when the navigation wraps. */
    left: 0;
    width: min(100%, 62rem);
    overflow-y: auto;
    overscroll-behavior: contain;
    max-height: min(36rem, 65vh);
    color: var(--ink);
    background: var(--surface);
    border: 1px solid var(--line);
    border-top: 0;
    border-radius: 0 0 var(--radius) var(--radius);
    box-shadow: 0 .8rem 1.8rem #07162833;
}

.catalog-heading {
    align-items: baseline;
    gap: .4rem 1.2rem;
    padding: 1rem 1.5rem;
    background: var(--menu-heading);
}

.catalog-heading h2 {
    font-size: 1.6rem;
}

.catalog-heading a {
    color: var(--accent);
    font-weight: 700;
}

.catalog-columns {
    --grid-min: 10rem;
    gap: 1.5rem;
    padding: 1.25rem 1.5rem;
}

.catalog-group {
    min-width: 0;
}

.catalog-group h3 {
    margin: 0 0 .35rem;
    padding-bottom: .45rem;
    border-bottom: 1px solid var(--line);
    font-size: .98rem;
}

.catalog-group ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.catalog-group a {
    display: block;
    padding: .55rem .15rem;
}

.catalog-group a .ui-icon {
    width: 1.1em;
    height: 1.1em;
    vertical-align: -.18em;
    color: var(--accent);
}

.catalog-group a span {
    color: var(--accent);
    font-size: .75rem;
}

.section-flyout a:hover {
    color: var(--accent);
    text-decoration: underline;
}

@media (max-width: 44rem) {
    .store-nav {
        position: relative;
    }

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

/* navigation/mobile-menu.css */
.mobile-menu-trigger, #mobile-menu:not([open]) {
    display: none;
}

/* The regular navigation stays available until JavaScript enables the dialog. */
@media (max-width: 36rem) {
    .mobile-menu-ready .mast {
        position: sticky;
        top: 0;
        border-bottom: 2px solid var(--trim);
    }

    .mobile-menu-ready .bar {
        grid-template-columns: auto 1fr auto;
        gap: .35rem;
        min-height: 60px;
        padding-block: .4rem;
    }

    .mobile-menu-ready .shop-actions {
        grid-column: 3;
    }

    .mobile-menu-ready .store-nav {
        display: none;
    }

    .mobile-menu-ready .mobile-menu-trigger {
        display: grid;
        place-items: center;
        align-content: center;
        gap: .1rem;
        width: 44px;
        height: 44px;
        font-family: inherit;
        font-size: .65rem;
        font-weight: 650;
        line-height: 1;
        color: var(--mast-accent);
        background: none;
        border: 1px solid currentColor;
        border-radius: var(--radius);
        cursor: pointer;
    }

    .mobile-menu-ready .brand {
        justify-self: start;
    }

    .mobile-menu-ready main [id] {
        scroll-margin-top: 8rem;
    }

    #mobile-menu[open] {
        display: flex;
        flex-direction: column;
        inset: 0 auto 0 0;
        margin: 0;
        width: min(23rem, 90vw);
        max-width: 100%;
        height: 100%;
        height: 100dvh;
        max-height: none;
        padding: 0;
        border: 0;
        color: var(--ink);
        background: var(--surface);
        box-shadow: .5rem 0 2rem #07162844;
    }

    #mobile-menu::backdrop {
        background: rgb(7 18 34 / 55%);
    }

    html:has(#mobile-menu[open]) {
        overflow: hidden;
    }

    .drawer-bar {
        gap: .35rem;
        padding: .5rem .75rem;
        padding-top: max(.5rem, env(safe-area-inset-top));
        background: var(--mast);
        color: var(--mast-text);
        border-bottom: 3px solid var(--trim);
    }

    .drawer-bar h2 {
        margin-inline: .35rem auto;
        font-size: 1.6rem;
    }

    #mobile-menu button {
        font: inherit;
        color: inherit;
        background: transparent;
        border: 0;
        cursor: pointer;
    }

    .drawer-bar button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: .5rem;
        min-height: 44px;
    }

    .drawer-close {
        width: 44px;
        margin-inline-start: auto;
    }

    .drawer-title {
        margin: .75rem .45rem 0;
        font-size: 1.5rem;
        line-height: 1.2;
    }

    .drawer-list {
        display: grid;
        align-content: start;
        flex: 1;
        min-height: 0;
        gap: 0;
        padding: .5rem .85rem max(1rem, env(safe-area-inset-bottom));
        overflow-y: auto;
        overscroll-behavior: contain;
    }

    .drawer-list a, #mobile-menu .drawer-list button {
        display: flex;
        align-items: center;
        gap: .75rem;
        min-height: 52px;
        padding: .6rem .45rem;
        border-bottom: 1px solid var(--line);
        font-size: 1rem;
        text-align: start;
    }

    .drawer-list .catalog-group {
        margin-block-start: 1.5rem;
    }

    .drawer-list .catalog-group h3 {
        margin: 0 0 .25rem;
        padding: 0 .45rem .45rem;
        font-size: 1rem;
    }

    .drawer-list .catalog-group a {
        min-height: 44px;
        border-bottom: 0;
    }

    .drawer-list .ui-icon, .drawer-overview {
        color: var(--accent);
    }

    .drawer-list .nav-chevron {
        margin-inline: auto .5rem;
        transform: rotate(-45deg);
    }

    .drawer-list button, .drawer-overview {
        font-weight: 700;
    }

    .drawer-list a:hover, #mobile-menu .drawer-list button:hover {
        color: var(--accent);
        background: var(--hover);
    }

    #mobile-menu :focus-visible, .mobile-menu-trigger:focus-visible {
        outline: 2px solid currentColor;
        outline-offset: -3px;
    }
}

@media (prefers-reduced-motion: no-preference) {
    #mobile-menu[open] {
        animation: drawer-in .18s ease-out;
    }

    #mobile-menu[data-direction="forward"] .drawer-list:not([hidden]) {
        animation: panel-in .16s ease-out;
    }

    #mobile-menu[data-direction="back"] .drawer-list:not([hidden]) {
        animation: panel-back .16s ease-out;
    }

    @keyframes drawer-in {
        from {
            transform: translateX(-100%);
        }
    }

    @keyframes panel-in {
        from {
            transform: translateX(1rem);
            opacity: .5;
        }
    }

    @keyframes panel-back {
        from {
            transform: translateX(-1rem);
            opacity: .5;
        }
    }
}

@media (max-width: 26rem) {
    .mobile-menu-ready .bar {
        width: calc(100% - 1rem);
    }

    .mobile-menu-ready .brand {
        font-size: 1.25rem;
    }

    .mobile-menu-ready .brand i {
        display: none;
    }
}

/* notifications/toast.css */
.toast-stack {
    --toast-inset: .85rem;
    position: fixed;
    z-index: 12;
    display: grid;
    gap: .5rem;
    width: min(23rem, calc(100% - 2 * var(--toast-inset)));
    max-height: 65dvh;
    overflow-y: auto;
    pointer-events: none;
}

.toast-stack[data-position^="bottom"] {
    bottom: max(var(--toast-inset), env(safe-area-inset-bottom));
}

.toast-stack[data-position^="top"] {
    top: max(var(--toast-inset), env(safe-area-inset-top));
}

.toast-stack[data-position$="right"] {
    right: max(var(--toast-inset), env(safe-area-inset-right));
}

.toast-stack[data-position$="left"] {
    left: max(var(--toast-inset), env(safe-area-inset-left));
}

.toast-stack[data-position$="center"] {
    left: 50%;
    transform: translateX(-50%);
}

.toast-stack[data-position="top-long"] {
    inset-inline: var(--toast-inset);
    width: auto;
}

.toast {
    --toast-accent: var(--accent);
    position: relative;
    background: var(--surface);
    color: var(--ink);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    pointer-events: auto;
    overflow-wrap: anywhere;
}

.toast[data-type="success"] {
    --toast-accent: light-dark(#21613b, #86dda4);
}

.toast[data-type="warning"] {
    --toast-accent: light-dark(#805000, #ffcd70);
}

.toast[data-type="error"] {
    --toast-accent: light-dark(#9d2731, #ffa7ad);
}

:root[data-theme="colorblind"] .toast[data-type="success"] {
    --toast-accent: #005a8d;
}

:root[data-theme="colorblind"] .toast[data-type="error"] {
    --toast-accent: #8c3900;
}

.toast-header {
    gap: .55rem;
    min-height: 44px;
    padding: .45rem 3.1rem .45rem .85rem;
    background: color-mix(in srgb, var(--surface) 94%, var(--ink));
    border-bottom: 1px solid var(--line);
    line-height: 1.4;
}

.toast-icon {
    display: grid;
    place-items: center;
    flex: none;
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 50%;
    background: var(--toast-accent);
    color: var(--surface);
    font: bold .9rem/1 system-ui, sans-serif;
}

.toast-message {
    margin: 0;
    padding: .65rem .85rem .75rem;
    line-height: 1.45;
}

.toast button {
    position: absolute;
    inset-block-start: 0;
    inset-inline-end: 0;
    width: 44px;
    height: 44px;
    background: transparent;
    color: inherit;
    border: 0;
    font-size: 1.4rem;
    cursor: pointer;
}

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

.toast-progress {
    position: absolute;
    inset: auto 0 0;
    height: 2px;
    background: var(--toast-accent);
    transform-origin: left;
}

@media (prefers-reduced-motion: reduce) {
    .toast-progress {
        visibility: hidden;
    }
}
