/* Raichu Master's stylesheet: the Next.js site's app/public.css, as it was,
   after the faces of Inter Variable it imported from @fontsource-variable/inter
   5.3.0 (public/fonts, under the SIL Open Font License). */

/* inter-cyrillic-ext-wght-normal */
@font-face {
  font-family: 'Inter Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/static/fonts/inter-cyrillic-ext-wght-normal.ca157063339ac4ad.woff2) format('woff2-variations');
  unicode-range: U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F;
}

/* inter-cyrillic-wght-normal */
@font-face {
  font-family: 'Inter Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/static/fonts/inter-cyrillic-wght-normal.71d5ee93cc1e9f1d.woff2) format('woff2-variations');
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}

/* inter-greek-ext-wght-normal */
@font-face {
  font-family: 'Inter Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/static/fonts/inter-greek-ext-wght-normal.6e9e020a25f9b56d.woff2) format('woff2-variations');
  unicode-range: U+1F00-1FFF;
}

/* inter-greek-wght-normal */
@font-face {
  font-family: 'Inter Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/static/fonts/inter-greek-wght-normal.1be3448e292fbf05.woff2) format('woff2-variations');
  unicode-range: U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF;
}

/* inter-vietnamese-wght-normal */
@font-face {
  font-family: 'Inter Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/static/fonts/inter-vietnamese-wght-normal.5c66f9e07e90c6d4.woff2) format('woff2-variations');
  unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB;
}

/* inter-latin-ext-wght-normal */
@font-face {
  font-family: 'Inter Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/static/fonts/inter-latin-ext-wght-normal.34b9c504cab7a73e.woff2) format('woff2-variations');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

/* inter-latin-wght-normal */
@font-face {
  font-family: 'Inter Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/static/fonts/inter-latin-wght-normal.3100e775e8616cd2.woff2) format('woff2-variations');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

/* Public site: collection gallery, card pages, contact page and dialogs. */

:root {
    --page: #f6f6f3;
    --panel: #ffffff;
    --text: #171916;
    --muted: #5f645d;
    --line: rgb(23 25 22 / 13%);
    --line-strong: rgb(23 25 22 / 24%);
    /* Form fields need a 3:1 boundary against the page. */
    --field-border: #807b71;
    --field: #ffffff;
    --yellow: #f4d228;
    --yellow-ink: #171916;
    --accent: #9a5000;
    --owned: #2f6f3d;
    --danger: #a63e2b;
    --shadow: 0 24px 64px rgb(40 34 20 / 16%);
    --card-shadow: 0 0.5rem 1.2rem rgb(23 25 22 / 16%);
    --backdrop: rgb(20 18 14 / 45%);
    --header-height: 3.5rem;
    --radius-sm: 0.375rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --gutter: clamp(1rem, 3vw, 2rem);

    color-scheme: light;
    font-family:
        "Inter Variable",
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        "Segoe UI",
        sans-serif;
    font-feature-settings: "cv11", "ss01";
    font-synthesis: none;
}

html[data-theme="dark"] {
    --page: #151716;
    --panel: #1d201e;
    --text: #f1f3ee;
    --muted: #a9b0a8;
    --line: rgb(241 243 238 / 12%);
    --line-strong: rgb(241 243 238 / 24%);
    --field-border: #7c807a;
    --field: #232624;
    --yellow: #e6c62a;
    --accent: #f0a32b;
    --owned: #8bc993;
    --danger: #e58a74;
    --shadow: 0 24px 64px rgb(0 0 0 / 45%);
    --card-shadow: 0 0.5rem 1.2rem rgb(0 0 0 / 40%);
    --backdrop: rgb(0 0 0 / 65%);

    color-scheme: dark;
}

/* ---------- Base ---------- */

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

html {
    scroll-padding-top: calc(var(--header-height) + 0.5rem);
    scrollbar-gutter: stable;
    -webkit-text-size-adjust: 100%;
}

/* An open dialog holds the page still underneath it. */
html:has(dialog[open]),
html.has-filter-drawer {
    overflow: hidden;
    overscroll-behavior: none;
}

body {
    min-width: 20rem;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    margin: 0;
    background: var(--page);
    color: var(--text);
    font-size: 1rem;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

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

button,
input,
select,
textarea {
    color: inherit;
    font: inherit;
}

button,
select {
    cursor: pointer;
}

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

img,
svg {
    display: block;
}

::selection {
    background: var(--yellow);
    color: var(--yellow-ink);
}

:focus:not(:focus-visible) {
    outline: none;
}

:focus-visible {
    outline: 2px solid var(--text);
    outline-offset: 2px;
}

.public-page {
    display: contents;
}

main {
    flex: 1 0 auto;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: fixed;
    top: 0.5rem;
    left: 0.5rem;
    z-index: 100;
    padding: 0.5rem 0.9rem;
    border-radius: var(--radius-sm);
    background: var(--text);
    color: var(--panel);
    font-size: 0.85rem;
    transform: translateY(-200%);
}

.skip-link:focus {
    transform: none;
}

.noscript-notice {
    padding: 0.6rem var(--gutter);
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.8rem;
    text-align: center;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.5rem;
    padding: 0 1.1rem;
    border: 1px solid var(--text);
    border-radius: var(--radius-sm);
    background: var(--text);
    color: var(--panel);
    font-size: 0.85rem;
    font-weight: 600;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 30;
    border-bottom: 1px solid var(--line-strong);
    /* Solid rather than blurred: a backdrop-filter would become the containing
       block for the fixed filter sheet inside the header. */
    background: var(--panel);
    transition: box-shadow 160ms ease;
}

.site-header.is-scrolled {
    box-shadow: 0 6px 20px rgb(0 0 0 / 7%);
}

.collection-topbar__inner {
    min-height: var(--header-height);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0 var(--gutter);
}

.collection-topbar__brand {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 0.65rem;
    margin-right: auto;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    white-space: nowrap;
}

.collection-topbar__mark {
    width: 1.75rem;
    height: 1.75rem;
    display: grid;
    place-items: center;
    border: 1px solid var(--yellow-ink);
    border-radius: 0.3rem;
    background: var(--yellow);
    color: var(--yellow-ink);
}

.collection-topbar__mark svg {
    width: 0.8rem;
    fill: currentcolor;
}

.theme-toggle {
    width: 2.25rem;
    height: 2.25rem;
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    padding: 0;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--muted);
}

.theme-toggle:hover {
    color: var(--text);
}

.theme-toggle svg {
    width: 1.1rem;
    fill: none;
    stroke: currentcolor;
    stroke-linecap: round;
    stroke-width: 1.6;
}

.theme-toggle__sun,
html[data-theme="dark"] .theme-toggle__moon {
    display: none;
}

html[data-theme="dark"] .theme-toggle__sun {
    display: block;
}

/* ---------- Collection filters ---------- */

.collection-filter-form {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
}

.collection-filter-form__count {
    color: var(--muted);
    white-space: nowrap;
}

.collection-filter-form__select,
.collection-filter-form__search {
    position: relative;
    display: flex;
    align-items: center;
    height: 2.1rem;
    border: 1px solid var(--field-border);
    border-radius: var(--radius-sm);
    background: var(--field);
}

.collection-filter-form__select select {
    width: 100%;
    height: 100%;
    padding: 0 1.7rem 0 0.6rem;
    border: 0;
    border-radius: inherit;
    background: transparent;
    appearance: none;
}

.collection-filter-form__select::after {
    position: absolute;
    right: 0.6rem;
    width: 0.4rem;
    height: 0.4rem;
    border-right: 1.5px solid var(--muted);
    border-bottom: 1.5px solid var(--muted);
    content: "";
    pointer-events: none;
    transform: translateY(-25%) rotate(45deg);
}

.collection-filter-form__search svg {
    width: 1rem;
    margin-left: 0.55rem;
    flex: 0 0 auto;
    fill: none;
    stroke: var(--muted);
    stroke-width: 1.8;
}

.collection-filter-form__search input {
    width: 100%;
    min-width: 0;
    height: 100%;
    padding: 0 0.5rem;
    border: 0;
    background: transparent;
    outline: none;
}

.collection-filter-form__search:focus-within {
    outline: 2px solid var(--text);
    outline-offset: 1px;
}

.collection-filter-form__search a {
    padding: 0 0.6rem;
    color: var(--muted);
    font-size: 1.1rem;
}

.collection-filter-form__segments {
    display: inline-flex;
    height: 2.1rem;
    margin: 0;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--field-border);
    border-radius: var(--radius-sm);
    background: var(--field);
}

.collection-filter-form__segments > label,
.collection-filter-form__segments > a {
    position: relative;
    display: flex;
    flex: 1 1 0;
    align-items: center;
    justify-content: center;
    padding: 0 0.7rem;
    color: var(--muted);
    white-space: nowrap;
    cursor: pointer;
}

.collection-filter-form__segments > * + * {
    border-left: 1px solid var(--line);
}

.collection-filter-form__segments input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.collection-filter-form__segments > label:has(input:checked),
.collection-filter-form__segments > a[aria-current] {
    background: var(--text);
    color: var(--panel);
    font-weight: 600;
}

.collection-filter-form__segments > label:has(input:focus-visible) {
    outline: 2px solid var(--text);
    outline-offset: -4px;
}

.collection-filter-form__reset {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    height: 2.1rem;
    padding: 0 0.7rem;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    font-weight: 600;
    white-space: nowrap;
}

.collection-filter-form__reset span,
.collection-topbar__mobile-trigger i {
    min-width: 1.1rem;
    height: 1.1rem;
    display: inline-grid;
    place-items: center;
    padding: 0 0.25rem;
    border-radius: 999px;
    background: var(--yellow);
    color: var(--yellow-ink);
    font-size: 0.68rem;
    font-style: normal;
    font-weight: 700;
}

.collection-filter-form__apply {
    height: 2.1rem;
    padding: 0 1rem;
    border: 1px solid var(--text);
    border-radius: var(--radius-sm);
    background: var(--text);
    color: var(--panel);
    font-weight: 600;
}

.collection-filter-form__language-fallback {
    display: flex;
    gap: 0.5rem;
}

.collection-filter-form__language-fallback a[aria-current] {
    font-weight: 700;
    text-decoration: underline;
}

.collection-filter-panel__header,
.collection-topbar__mobile-trigger,
.collection-filter-drawer__backdrop {
    display: none;
}

/* Desktop: the controls sit in the header bar. */
@media (min-width: 62rem) {
    .collection-filter-panel {
        min-width: 0;
    }

    .collection-filter-form__language {
        width: 4.6rem;
    }

    .collection-filter-form__search {
        width: clamp(9rem, 16vw, 15rem);
    }

    .collection-filter-form__order {
        width: 7.5rem;
    }

    .js .collection-filter-form__apply {
        display: none;
    }
}

@media (min-width: 62rem) and (max-width: 75rem) {
    .collection-filter-form__count {
        display: none;
    }
}

/* Mobile: a compact trigger opens the controls as a bottom sheet. */
@media (max-width: 61.99rem) {
    .collection-topbar__inner {
        flex-wrap: wrap;
    }

    html:not(.js) .collection-filter-panel {
        order: 5;
        width: 100%;
        padding-bottom: 0.75rem;
    }

    html:not(.js) .collection-filter-form {
        flex-wrap: wrap;
    }

    .js .collection-topbar__mobile-trigger {
        display: inline-flex;
        align-items: center;
        gap: 0.4rem;
        height: 2.25rem;
        padding: 0 0.8rem;
        border: 1px solid var(--line-strong);
        border-radius: var(--radius-sm);
        background: transparent;
        font-size: 0.8rem;
        white-space: nowrap;
    }

    .collection-topbar__mobile-trigger span {
        max-width: 7rem;
        display: none;
        overflow: hidden;
        color: var(--muted);
        text-overflow: ellipsis;
    }

    .collection-topbar__mobile-trigger strong {
        font-weight: 600;
    }

    @media (min-width: 30rem) {
        .collection-topbar__mobile-trigger span {
            display: inline;
        }
    }

    .js .collection-filter-panel {
        position: fixed;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 60;
        max-height: min(88dvh, 40rem);
        display: flex;
        flex-direction: column;
        border-top: 1px solid var(--line-strong);
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
        background: var(--panel);
        box-shadow: var(--shadow);
        transform: translateY(100%);
        transition:
            transform 220ms ease,
            visibility 0s linear 220ms;
        visibility: hidden;
    }

    .js .collection-filter-panel.is-open {
        transform: none;
        transition: transform 220ms ease;
        visibility: visible;
    }

    .js .collection-filter-panel__header {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 1rem;
        padding: 1.1rem 1.25rem 0.9rem;
        border-bottom: 1px solid var(--line);
    }

    .collection-filter-panel__header p {
        color: var(--muted);
        font-size: 0.7rem;
        font-weight: 600;
        letter-spacing: 0.1em;
        text-transform: uppercase;
    }

    .collection-filter-panel__header h2 {
        font-size: 1.15rem;
        line-height: 1.3;
    }

    .collection-filter-panel__header span {
        color: var(--muted);
        font-size: 0.8rem;
    }

    .collection-filter-panel__header button {
        width: 2.25rem;
        height: 2.25rem;
        display: grid;
        flex: 0 0 auto;
        place-items: center;
        border: 1px solid var(--line-strong);
        border-radius: 999px;
        background: transparent;
    }

    .js .collection-filter-panel__body {
        overflow-y: auto;
        padding: 1rem 1.25rem calc(1.25rem + env(safe-area-inset-bottom));
    }

    .js .collection-filter-form {
        flex-direction: column;
        align-items: stretch;
        gap: 0.7rem;
        font-size: 0.9rem;
    }

    .js .collection-filter-form__count {
        display: none;
    }

    .js .collection-filter-form__select,
    .js .collection-filter-form__search,
    .js .collection-filter-form__segments,
    .js .collection-filter-form__reset,
    .js .collection-filter-form__apply {
        height: 2.75rem;
    }

    .js .collection-filter-form__reset {
        justify-content: center;
    }

    .collection-filter-drawer__backdrop.is-open {
        position: fixed;
        inset: 0;
        z-index: 55;
        display: block;
        background: var(--backdrop);
    }
}

.collection-filter-panel__header svg {
    width: 1.1rem;
    fill: none;
    stroke: currentcolor;
    stroke-linecap: round;
    stroke-width: 1.6;
}

/* ---------- Gallery ---------- */

/* The gallery's white ground runs down to the footer, however few cards match. */
.page-collection main {
    background: var(--panel);
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(14.5rem, 1fr));
}

@media (max-width: 40rem) {
    .card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.collection-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    padding: 0.8rem 0.8rem 0.75rem;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    scroll-margin-top: calc(var(--header-height) + 0.5rem);
}

.collection-card:focus {
    outline: none;
}

.collection-card__visual {
    --card-shine-x: 50%;
    --card-shine-y: 20%;

    position: relative;
    padding: 0.45rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: color-mix(in srgb, var(--page) 60%, var(--panel));
    transition: border-color 160ms ease;
}

.collection-card__visual:hover,
.collection-card:focus-within .collection-card__visual {
    border-color: var(--line-strong);
}

.collection-card.is-return-target .collection-card__visual {
    border-color: var(--yellow);
    box-shadow: 0 0 0 2px var(--yellow);
    transition: box-shadow 1.2s ease 0.6s;
}

.card-open {
    display: block;
    border-radius: 4.5% / 3.2%;
}

.card-open:focus-visible {
    outline-offset: 3px;
}

.card-art {
    position: relative;
    display: block;
    aspect-ratio: 63 / 88;
    overflow: hidden;
    border-radius: 4.5% / 3.2%;
    background: color-mix(in srgb, var(--text) 8%, var(--panel));
    box-shadow: var(--card-shadow);
    transition:
        transform 200ms ease,
        box-shadow 200ms ease;
}

.card-art > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: filter 240ms ease;
}

/* A soft sheen that follows the pointer on devices that have one. */
.card-art::after {
    position: absolute;
    inset: 0;
    background: radial-gradient(
        circle at var(--card-shine-x) var(--card-shine-y),
        rgb(255 255 255 / 22%),
        transparent 45%
    );
    content: "";
    opacity: 0;
    pointer-events: none;
    transition: opacity 200ms ease;
}

@media (hover: hover) and (pointer: fine) {
    .collection-card__visual:hover .card-art {
        box-shadow: 0 0.8rem 1.8rem rgb(23 25 22 / 22%);
        transform: translateY(-2px);
    }

    .collection-card__visual:hover .card-art::after {
        opacity: 1;
    }
}

/* Cards not yet in the collection show in greyscale until pointed at. */
.is-missing .card-art > img {
    filter: saturate(0.08) brightness(0.97);
}

.is-missing .collection-card__visual:hover .card-art > img,
.is-missing .card-open:focus-visible .card-art > img {
    filter: none;
}

/* Marks stock images that will be replaced with the collector's own photos. */
.placeholder-watermark {
    position: absolute;
    right: 5%;
    bottom: 3.5%;
    z-index: 2;
    padding: 0.2em 0.55em;
    border-radius: 999px;
    background: rgb(15 14 12 / 62%);
    color: rgb(255 255 255 / 92%);
    font-size: clamp(0.5rem, 0.62vw, 0.6rem);
    font-weight: 600;
    letter-spacing: 0.12em;
    line-height: 1.4;
    pointer-events: none;
    user-select: none;
    backdrop-filter: blur(4px);
}

.collection-card__details {
    display: grid;
    gap: 0.1rem;
    min-width: 0;
    font-size: 0.8rem;
    line-height: 1.35;
}

.collection-card__headline,
.collection-card__release-row,
.collection-card__facts {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
}

.collection-card__identity {
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    gap: 0.35rem;
    min-width: 0;
}

.collection-card__name {
    overflow: hidden;
    font-size: 0.92rem;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.collection-card__language {
    flex: 0 0 auto;
    padding: 0 0.35rem;
    border: 1px solid var(--line-strong);
    border-radius: 0.25rem;
    color: var(--muted);
    font-size: 0.64rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    line-height: 1.5;
}

.info-button {
    width: 1.35rem;
    height: 1.35rem;
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 999px;
    color: var(--muted);
}

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

.info-button__icon {
    width: 1rem;
    fill: none;
    stroke: currentcolor;
    stroke-linecap: round;
    stroke-width: 1.3;
}

.collection-card__release,
.collection-card__treatment {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    color: var(--muted);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.collection-card__release {
    color: var(--text);
}

.collection-card__year,
.collection-card__reference {
    flex: 0 0 auto;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

.cameo-icon {
    display: inline-flex;
    flex: 0 0 auto;
    color: var(--accent);
}

.cameo-icon svg {
    width: 1.15em;
    fill: currentcolor;
    stroke: currentcolor;
    stroke-linecap: round;
    stroke-width: 0.8;
}

/* ---------- Card placeholder (no image yet, or it failed) ---------- */

.card-media-placeholder {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto auto auto;
    gap: 0.45em;
    padding: 12% 8% 7%;
    overflow: hidden;
    container-type: inline-size;
    background:
        radial-gradient(circle at 80% 30%, rgb(245 190 40 / 14%), transparent 40%),
        linear-gradient(155deg, #2a2620, #141311 75%);
    color: #b9b2a4;
    font-size: clamp(0.5rem, 5cqi, 0.8rem);
}

.card-media-placeholder[data-placeholder-language="ja"] {
    background:
        radial-gradient(circle at 80% 30%, rgb(220 91 67 / 16%), transparent 40%),
        linear-gradient(155deg, #2a2620, #141311 75%);
}

.card-media-placeholder__meta {
    display: flex;
    gap: 0.4em;
    padding-bottom: 0.6em;
    border-bottom: 1px solid rgb(255 255 255 / 12%);
    font-size: 0.8em;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.card-media-placeholder__meta > :first-child {
    margin-right: auto;
}

.card-media-placeholder__emblem {
    display: grid;
    place-items: center;
}

.card-media-placeholder__emblem svg {
    width: 26%;
    fill: #f4d228;
    opacity: 0.85;
}

.card-media-placeholder__identity {
    display: grid;
}

.card-media-placeholder__identity strong {
    color: #f4f1e8;
    font-size: 1.45em;
    line-height: 1.2;
}

.card-media-placeholder__facts {
    display: flex;
    gap: 0.4em;
    min-width: 0;
}

.card-media-placeholder__facts span {
    overflow: hidden;
    padding: 0.15em 0.6em;
    border: 1px solid rgb(255 255 255 / 16%);
    border-radius: 999px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.card-media-placeholder__status {
    display: flex;
    align-items: center;
    gap: 0.5em;
    font-size: 0.8em;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.card-media-placeholder__status i {
    width: 0.55em;
    height: 0.55em;
    border-radius: 50%;
    background: #f4d228;
}

/* ---------- Empty state ---------- */

.empty-state {
    display: grid;
    justify-items: center;
    gap: 0.6rem;
    padding: clamp(3rem, 12vh, 7rem) var(--gutter);
    text-align: center;
}

.empty-state__cards {
    display: flex;
    margin-bottom: 0.75rem;
}

.empty-state__cards span {
    width: 3rem;
    aspect-ratio: 63 / 88;
    border: 1px solid var(--line-strong);
    border-radius: 0.3rem;
    background: var(--page);
}

.empty-state__cards span:nth-child(1) {
    transform: rotate(-8deg) translateX(0.6rem);
}

.empty-state__cards span:nth-child(3) {
    transform: rotate(8deg) translateX(-0.6rem);
}

.empty-state .kicker {
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.empty-state h3 {
    font-size: 1.35rem;
}

.empty-state p {
    max-width: 30rem;
    color: var(--muted);
}

.empty-state .button {
    margin-top: 0.75rem;
}

/* ---------- Status badges ---------- */

.card-status-badge {
    display: inline-flex;
    align-items: stretch;
    overflow: hidden;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    background: var(--panel);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    line-height: 1;
}

.card-status-badge > span:not(.sr-only) {
    display: flex;
    align-items: center;
    padding: 0.45rem 0.6rem;
}

.card-status-badge__company {
    background: #2f3a4a;
    color: #fff;
}

.card-status-badge--psa .card-status-badge__company {
    background: #294a83;
}

.card-status-badge--cgc .card-status-badge__company {
    background: #147c73;
}

.card-status-badge--bgs .card-status-badge__company {
    background: #76581a;
}

.card-status-badge__grade {
    font-variant-numeric: tabular-nums;
}

/* ---------- Card record (full page and dialog) ---------- */

.card-record {
    position: relative;
    background: var(--panel);
}

.card-record__close {
    width: 2.5rem;
    height: 2.5rem;
    display: grid;
    place-items: center;
    padding: 0;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    background: var(--panel);
    color: var(--text);
}

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

.card-record__close svg {
    width: 1.1rem;
    fill: none;
    stroke: currentcolor;
    stroke-linecap: round;
    stroke-width: 1.6;
}

.card-record__header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem 1.5rem;
    /* Room on the right for the close button. */
    padding: clamp(1.5rem, 4vw, 2.75rem) clamp(4rem, 6vw, 5rem) clamp(1.25rem, 3vw, 2rem)
        clamp(1.25rem, 4vw, 2.75rem);
    border-bottom: 1px solid var(--line);
}

.card-record__identity {
    min-width: 0;
}

.card-record__set {
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.06em;
}

.card-record__identity h1,
.card-record__identity h2 {
    margin: 0.15rem 0 0.6rem;
    font-size: clamp(2.1rem, 6vw, 3.75rem);
    font-weight: 750;
    letter-spacing: -0.03em;
    line-height: 1.05;
    overflow-wrap: anywhere;
}

.card-record__title-tail {
    display: inline-flex;
    align-items: center;
    gap: 0.25em;
    white-space: nowrap;
}

.card-record__title-tail .cameo-icon svg {
    width: 0.6em;
}

/* Every item carries a left divider; the one starting each line is clipped. */
.card-record__summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0;
    margin-left: calc(-0.75rem - 1px);
    clip-path: inset(0 0 0 calc(0.75rem + 1px));
    color: var(--muted);
    font-size: 0.88rem;
}

.card-record__summary strong {
    color: var(--text);
}

.card-record__summary > * {
    padding: 0 0.75rem;
    border-left: 1px solid var(--line-strong);
}

.card-record__admin-link {
    display: inline-flex;
    gap: 0.3rem;
    margin-top: 0.75rem;
    color: var(--accent);
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 0.2em;
}

.card-record__status {
    flex: 0 0 auto;
}

.card-record__media {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 18rem));
    justify-content: center;
    gap: clamp(1rem, 3vw, 2rem);
    padding: clamp(1.5rem, 4vw, 2.75rem) clamp(1.25rem, 4vw, 2.75rem);
    border-bottom: 1px solid var(--line);
    background: color-mix(in srgb, var(--page) 55%, var(--panel));
}

.card-record__media--single {
    grid-template-columns: minmax(0, 20rem);
}

.card-record__figure {
    margin: 0;
}

.card-record__image-link {
    display: block;
    border-radius: 4.5% / 3.2%;
}

.card-record__image-frame {
    position: relative;
    aspect-ratio: 63 / 88;
    overflow: hidden;
    border-radius: 4.5% / 3.2%;
    background: color-mix(in srgb, var(--text) 8%, var(--panel));
    box-shadow: 0 1rem 2.2rem rgb(23 25 22 / 20%);
}

/* Slab photos are taller than a bare card, so the image sets its own shape. */
.card-record__image-frame:has(> img) {
    aspect-ratio: auto;
}

.card-record__image-frame > img {
    width: 100%;
    height: auto;
    max-height: min(62dvh, 38rem);
    object-fit: contain;
}

.card-record__information {
    display: grid;
    gap: 1.75rem;
    padding: clamp(1.5rem, 4vw, 2.75rem);
}

.card-record__about {
    display: grid;
    gap: 0.75rem;
    max-width: 44rem;
    color: var(--muted);
}

.card-record__about h2,
.card-record__about h3 {
    color: var(--text);
    font-size: 1.35rem;
    letter-spacing: -0.01em;
}

.card-record__about strong {
    color: var(--text);
}

.card-record__facts {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(9.5rem, 45%), 1fr));
    margin: 0;
    border-top: 1px solid var(--line);
    border-left: 1px solid var(--line);
}

.card-record__facts > div {
    padding: 0.8rem 1rem;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.card-record__facts dt {
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.card-record__facts dd {
    margin: 0.15rem 0 0;
    font-size: 0.92rem;
}

/* Full card page */

.card-detail-page {
    width: min(100% - 2 * var(--gutter), 62rem);
    margin: 0 auto;
    padding: 1.25rem 0 clamp(2rem, 6vw, 4rem);
}

.card-breadcrumbs ol {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 0 0 1rem;
    padding: 0;
    color: var(--muted);
    font-size: 0.8rem;
    list-style: none;
}

.card-breadcrumbs li + li::before {
    margin-right: 0.4rem;
    color: var(--line-strong);
    content: "/";
}

.card-breadcrumbs a:hover {
    color: var(--text);
    text-decoration: underline;
}

.card-breadcrumbs [aria-current] {
    color: var(--text);
}

.card-record--page {
    overflow: hidden;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.card-record--page > .card-record__close {
    position: absolute;
    top: clamp(0.9rem, 2.5vw, 1.4rem);
    right: clamp(0.9rem, 2.5vw, 1.4rem);
    z-index: 2;
}

@media (max-width: 40rem) {
    .card-detail-page {
        width: 100%;
        padding-top: 0.75rem;
    }

    .card-breadcrumbs ol {
        padding: 0 var(--gutter);
    }

    .card-record--page {
        border-right: 0;
        border-left: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .card-record__media {
        grid-template-columns: minmax(0, 17rem);
    }
}

.related-cards {
    margin-top: clamp(2rem, 5vw, 3rem);
}

.related-cards__heading p {
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.related-cards__heading h2 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
    letter-spacing: -0.01em;
}

.related-cards__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
    gap: 0.75rem;
}

.related-card {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.6rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--panel);
}

.related-card:hover {
    border-color: var(--line-strong);
}

.related-card__image {
    width: 3.4rem;
    flex: 0 0 auto;
    aspect-ratio: 63 / 88;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 0.25rem;
    background: var(--page);
    color: var(--muted);
    font-weight: 700;
}

.related-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-card__copy {
    display: grid;
    min-width: 0;
}

.related-card__copy strong {
    font-size: 0.9rem;
}

.related-card__copy small {
    overflow: hidden;
    color: var(--muted);
    font-size: 0.8rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 40rem) {
    .related-cards {
        padding: 0 var(--gutter);
    }
}

/* Card dialog over the gallery */

.card-record-dialog {
    width: min(100% - 2rem, 60rem);
    max-width: none;
    max-height: calc(100dvh - 3rem);
    margin: auto;
    padding: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-lg);
    background: var(--panel);
    color: var(--text);
    box-shadow: var(--shadow);
}

.card-record-dialog::backdrop,
.site-dialog::backdrop {
    background: var(--backdrop);
    backdrop-filter: blur(2px);
}

.card-record-dialog[open],
.site-dialog[open] {
    animation: dialog-in 160ms ease-out;
}

.card-record-dialog__close-bar {
    position: sticky;
    top: 0;
    z-index: 3;
    display: flex;
    justify-content: flex-end;
    height: 0;
    padding-right: clamp(0.9rem, 2.5vw, 1.4rem);
}

.card-record-dialog__close-bar .card-record__close {
    margin-top: clamp(0.9rem, 2.5vw, 1.4rem);
}

@media (max-width: 40rem) {
    .card-record-dialog {
        width: 100%;
        max-height: 100dvh;
        height: 100dvh;
        border: 0;
        border-radius: 0;
    }
}

@keyframes dialog-in {
    from {
        opacity: 0;
        transform: translateY(0.75rem);
    }
}

/* ---------- Footer and site dialogs ---------- */

.site-footer {
    border-top: 1px solid var(--line-strong);
    background: var(--panel);
}

.site-footer__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem 1.5rem;
    padding: 1.1rem var(--gutter);
    color: var(--muted);
    font-size: 0.82rem;
}

.site-footer__links {
    display: flex;
    gap: 1.25rem;
}

.site-footer__links button {
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
}

.site-footer__links button:hover {
    color: var(--text);
    text-decoration: underline;
    text-underline-offset: 0.2em;
}

.site-dialog {
    width: min(100% - 2rem, 34rem);
    max-height: calc(100dvh - 2rem);
    margin: auto;
    padding: 1.5rem;
    overflow-y: auto;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-lg);
    background: var(--panel);
    color: var(--text);
    box-shadow: var(--shadow);
}

.site-dialog__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.site-dialog__header h2 {
    font-size: 1.35rem;
    letter-spacing: -0.01em;
}

.site-dialog__header p,
.site-dialog--about > p {
    margin-top: 0.3rem;
    color: var(--muted);
}

.site-dialog__close {
    width: 2.25rem;
    height: 2.25rem;
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    padding: 0;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    background: transparent;
}

.site-dialog__close svg {
    width: 1.1rem;
    fill: none;
    stroke: currentcolor;
    stroke-linecap: round;
    stroke-width: 1.6;
}

/* ---------- Contact ---------- */

.contact-page {
    width: min(100% - 2 * var(--gutter), 34rem);
    margin: 0 auto;
    padding: clamp(2rem, 7vw, 4rem) 0;
}

.contact-page__title {
    font-size: clamp(1.9rem, 5vw, 2.5rem);
    letter-spacing: -0.02em;
}

.contact-page__lede {
    margin: 0.35rem 0 1.75rem;
    color: var(--muted);
}

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

.contact-form__trap {
    position: absolute;
    left: -10000px;
}

.contact-form__field {
    display: grid;
    gap: 0.35rem;
}

.contact-form__field > span,
.contact-form__verification > div > span {
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.contact-form__field input,
.contact-form__field textarea {
    width: 100%;
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--field-border);
    border-radius: var(--radius-sm);
    background: var(--field);
}

.contact-form__field textarea {
    min-height: 9rem;
    resize: vertical;
}

.contact-form__field [aria-invalid="true"] {
    border-color: var(--danger);
}

.contact-form__field small {
    color: var(--danger);
    font-size: 0.8rem;
}

.contact-form__verification {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 7.5rem;
    align-items: end;
    gap: 0.75rem 1rem;
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: color-mix(in srgb, var(--page) 60%, var(--panel));
}

.contact-form__verification p {
    margin-top: 0.25rem;
    font-weight: 600;
}

.contact-form__verification input:disabled {
    opacity: 0.55;
}

.contact-form__retry {
    grid-column: 1 / -1;
    justify-self: start;
    padding: 0;
    border: 0;
    background: none;
    font-size: 0.85rem;
    text-decoration: underline;
    text-underline-offset: 0.2em;
}

.contact-form__submit {
    height: 2.9rem;
    border: 1px solid var(--text);
    border-radius: var(--radius-sm);
    background: var(--text);
    color: var(--panel);
    font-size: 0.9rem;
    font-weight: 600;
}

.contact-form__submit:disabled {
    border-color: var(--line);
    background: var(--line);
    color: var(--muted);
    cursor: not-allowed;
}

.contact-form__notice {
    margin-bottom: 1rem;
    padding: 0.7rem 0.9rem;
    border: 1px solid currentcolor;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
}

.contact-form__notice--success {
    color: var(--owned);
}

.contact-form__notice--error {
    color: var(--danger);
}

/* ---------- Motion ---------- */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        transition-duration: 0s !important;
        animation-duration: 0s !important;
    }
}
