/* ============================================================================ */
/* TurboPokemonManager - static\branding\brand.css */
/* Author: ZioTitanok (v. 2026.08.15) */
/* ============================================================================ */


:root {
    --red: #cc2636; --red-dark: #9f1827; --navy: #172642; --navy-2: #243858;
    --yellow: #f5c842; --cream: #f7f5ef; --paper: #fff; --muted: #667085;
    --line: #dddfe5; --green: #197a54; --orange: #b65f14; --danger: #b42318;
    --shadow: 0 12px 30px rgba(23,38,66,.09); --radius: 14px;

    /* Shared Turbo Manager tokens consumed by turbo-common.css. */
    --brand-color-primary: var(--red);
    --brand-color-primary-rgb: 204, 38, 54;
    --brand-color-primary-dark: var(--red-dark);
    --brand-color-secondary: #fff;
    --brand-accent: var(--yellow);
    --brand-accent-rgb: 245, 200, 66;
    --brand-deep: var(--navy);
    --brand-deep-soft: var(--navy-2);
    --brand-ink: var(--navy);
    --brand-muted: var(--muted);
    --brand-bg: var(--cream);
    --brand-surface: var(--paper);
    --brand-line: var(--line);
    --brand-shadow: var(--shadow);
    --brand-radius: var(--radius);

    --bs-primary: var(--brand-color-primary);
    --bs-primary-rgb: var(--brand-color-primary-rgb);
    --bs-body-bg: var(--brand-bg);
    --bs-body-color: var(--brand-ink);
    --bs-secondary-color: var(--brand-muted);
    --bs-border-color: var(--brand-line);
    --bs-border-radius: .5rem;
    --bs-border-radius-lg: var(--brand-radius);
    --bs-box-shadow-sm: var(--brand-shadow);
    --bs-link-color: var(--brand-color-primary-dark);
    --bs-link-hover-color: var(--brand-ink);
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--navy); background: var(--cream); font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; line-height: 1.5; }
a { color: var(--red-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
.page { min-height: calc(100vh - 150px); padding-block: 2rem 3rem; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -.025em; margin-top: 0; }
h1 { font-size: clamp(1.8rem, 4vw, 2.75rem); }
h2 { font-size: 1.35rem; }
.eyebrow { margin: 0 0 .35rem; color: var(--red); font-size: .78rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.muted { color: var(--muted); }
.lead { color: var(--muted); font-size: 1.08rem; max-width: 68ch; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.page-head h1, .page-head p { margin-bottom: 0; }
.page-title-actions { display: flex; flex: 0 1 auto; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: .35rem; margin-left: auto; }
.page-title-actions form { margin: 0; }
.actions { display: flex; align-items: center; gap: .55rem; flex-wrap: wrap; }
.button, button.button { appearance: none; display: inline-flex; align-items: center; justify-content: center; gap: .35rem; border: 1px solid var(--red); border-radius: 8px; background: var(--red); color: white; cursor: pointer; font: inherit; font-weight: 700; padding: .66rem .95rem; text-decoration: none; }
.button:hover { background: var(--red-dark); color: white; text-decoration: none; }
.button:disabled { cursor: not-allowed; opacity: .65; }
.button.secondary { color: var(--navy); background: white; border-color: var(--line); }
.button.secondary:hover { border-color: var(--navy); }
.button.success { background: var(--green); border-color: var(--green); }
.button.danger { background: transparent; border-color: #e0aaa6; color: var(--danger); }
.button.small { padding: .4rem .65rem; font-size: .85rem; }
.square-button { width: 42px; height: 42px; min-height: 42px; padding: 0; border-radius: 8px; }
.title-action-button { width: 40px; height: 40px; min-width: 40px; min-height: 40px; padding: 0; border-radius: 4px; }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.25rem; }
.grid { display: grid; gap: 1rem; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .85rem; margin-bottom: 1.5rem; }
.stat { background: white; border: 1px solid var(--line); border-top: 4px solid var(--red); border-radius: 10px; padding: 1rem; }
.stat:nth-child(even) { border-top-color: var(--yellow); }
.stat strong { display: block; color: var(--navy); font-size: 1.65rem; }
.stat span { color: var(--muted); font-size: .82rem; }
.hero { overflow: hidden; position: relative; display: grid; grid-template-columns: 1.55fr .75fr; gap: 2rem; margin-bottom: 1.5rem; padding: clamp(1.4rem, 5vw, 3rem); color: white; background: linear-gradient(125deg, var(--navy), var(--navy-2)); border-radius: 22px; box-shadow: var(--shadow); }
.hero::after { content: ""; position: absolute; width: 260px; height: 260px; right: -80px; bottom: -120px; border: 34px solid rgba(255,255,255,.07); border-radius: 50%; }
.hero h1 { margin-bottom: .7rem; }
.hero .lead { color: #dbe2ef; }
.hero-mark { align-self: center; justify-self: center; width: 150px; height: 150px; border: 14px solid rgba(255,255,255,.9); border-radius: 50%; background: linear-gradient(to bottom, var(--red) 0 45%, white 45% 55%, white 55%); position: relative; transform: rotate(-8deg); }
.hero-mark::after { content: ""; position: absolute; inset: 42px; border: 12px solid var(--navy); border-radius: 50%; background: white; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(175px, 1fr)); gap: 1rem; }
.card-tile { position: relative; min-width: 0; overflow: visible; background: white; border: 1px solid var(--line); border-radius: 12px; transition: transform .15s ease, box-shadow .15s ease; }
.card-tile > a { display: block; overflow: hidden; border-radius: inherit; }
.card-tile:hover, .card-tile:focus-within { z-index: 10; transform: translateY(-3px); box-shadow: var(--shadow); }
.card-tile a:hover { text-decoration: none; }
.card-image { position: relative; aspect-ratio: 245/342; display: grid; place-items: center; overflow: hidden; padding: .65rem; background: #eceef2; }
.card-image img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 5px 7px rgba(0,0,0,.18)); }
.card-language-watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 125%;
    padding: .42rem 0;
    overflow: hidden;
    color: rgba(255,255,255,.96);
    background: rgba(23,38,66,.38);
    border-block: 1px solid rgba(255,255,255,.62);
    box-shadow: 0 2px 8px rgba(0,0,0,.18);
    font-size: clamp(.72rem, 1.1vw, 1rem);
    font-weight: 900;
    letter-spacing: .16em;
    line-height: 1;
    text-align: center;
    text-overflow: ellipsis;
    text-shadow: 0 1px 3px rgba(0,0,0,.65);
    text-transform: uppercase;
    transform: translate(-50%, -50%) rotate(-24deg);
    white-space: nowrap;
    pointer-events: none;
}
.placeholder { width: 74px; height: 74px; border: 12px solid #c9cdd5; border-radius: 50%; }
.missing-card-image { display: grid; justify-items: center; gap: .7rem; color: var(--muted); text-align: center; }
.missing-card-image small { max-width: 130px; line-height: 1.25; }
.card-copy { padding: .8rem; }
.card-copy > strong, .card-copy > span, .card-name-row > strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-copy > span { color: var(--muted); font-size: .8rem; }
.card-name-row { display: flex; min-width: 0; align-items: center; gap: .5rem; }
.card-name-row > strong { flex: 1; min-width: 0; }
.card-variant-meta, .card-variant-languages { display: flex; flex-wrap: wrap; align-items: center; gap: .28rem; margin-top: .45rem; }
.card-variant-languages { margin-top: .35rem; }
.card-variant-meta .badge, .card-variant-languages .badge { padding: .1rem .35rem; font-size: .62rem; }
.card-variant-kind { color: var(--red); font-size: .68rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.card-variant-property { text-transform: uppercase; }
.card-variant-language-code { color: #8d1522; background: #fdebed; }
.card-image-fallback-note { color: var(--muted); font-size: .62rem; font-weight: 700; }
.card-image-preview-button {
    position: absolute;
    top: .55rem;
    left: .55rem;
    z-index: 9;
    display: inline-flex;
    width: 28px;
    height: 28px;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: var(--navy);
    background: rgba(255,255,255,.94);
    border: 1px solid var(--line);
    border-radius: 50%;
    box-shadow: 0 2px 7px rgba(23,38,66,.16);
    cursor: zoom-in;
    font: inherit;
    font-size: .68rem;
}
.card-image-preview-button:hover, .card-image-preview-button:focus-visible { color: white; background: var(--red); border-color: var(--red); outline: none; }
.card-source-popover { position: absolute; top: .55rem; right: .55rem; z-index: 8; }
.card-source-info { display: inline-flex; width: 28px; height: 28px; align-items: center; justify-content: center; padding: 0; color: var(--navy); background: rgba(255,255,255,.94); border: 1px solid var(--line); border-radius: 50%; box-shadow: 0 2px 7px rgba(23,38,66,.16); cursor: help; font: inherit; font-size: .72rem; }
.card-source-info:hover, .card-source-info:focus-visible { color: white; background: var(--navy); outline: none; }
.card-source-tooltip { position: absolute; top: calc(100% + .4rem); right: 0; display: none; width: 205px; max-width: calc(100vw - 2rem); gap: .3rem; padding: .65rem; color: var(--navy); background: white; border: 1px solid var(--line); border-radius: 9px; box-shadow: 0 10px 26px rgba(23,38,66,.22); }
.card-source-popover:hover .card-source-tooltip, .card-source-popover:focus-within .card-source-tooltip { display: grid; }
.card-source-tooltip > strong { margin-bottom: .15rem; font-size: .76rem; letter-spacing: .04em; text-transform: uppercase; }
.card-source-status { display: flex; align-items: center; justify-content: space-between; gap: .55rem; padding-top: .28rem; border-top: 1px solid #edf0f4; font-size: .72rem; }
.card-source-status small { display: inline-flex; align-items: center; gap: .22rem; color: var(--muted); white-space: nowrap; }
.card-source-status.is-found small { color: #0c7a50; }
.card-rarity-icon { display: inline-flex; flex: 0 0 24px; width: 24px; height: 24px; align-items: center; justify-content: center; overflow: visible; border: 1px solid var(--line); border-radius: 50%; background: #f5f6f8; }
.card-detail-rarity { width: 28px; height: 28px; flex-basis: 28px; }
.card-rarity-icon::before { content: ""; display: block; color: currentColor; }
.card-rarity-icon.rarity-common::before { width: 9px; height: 9px; background: currentColor; border-radius: 50%; }
.card-rarity-icon.rarity-uncommon::before { width: 9px; height: 9px; background: currentColor; border-radius: 1px; transform: rotate(45deg); }
.card-rarity-icon.rarity-rare::before { width: 15px; height: 15px; background: currentColor; clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 94%, 50% 72%, 21% 94%, 32% 57%, 2% 35%, 39% 35%); }
.card-rarity-icon.rarity-promo::before { width: 16px; height: 16px; background: currentColor; clip-path: polygon(50% 0%, 59% 24%, 79% 7%, 76% 32%, 100% 31%, 81% 50%, 100% 69%, 76% 68%, 79% 93%, 59% 76%, 50% 100%, 41% 76%, 21% 93%, 24% 68%, 0% 69%, 19% 50%, 0% 31%, 24% 32%, 21% 7%, 41% 24%); }
.card-rarity-icon.rarity-special::before { width: 11px; height: 11px; background: currentColor; border-radius: 1px; transform: rotate(45deg); }
.card-rarity-icon.rarity-none::before { width: 10px; height: 2px; background: currentColor; border-radius: 2px; }
.card-rarity-icon.rarity-common { color: #77808f; }
.card-rarity-icon.rarity-uncommon { color: #31516f; }
.card-rarity-icon.rarity-rare { color: #ba8500; background: #fff8dd; border-color: #ead28a; }
.card-rarity-icon.rarity-promo { color: var(--red); background: #fdebed; border-color: #f2bdc2; }
.card-rarity-icon.rarity-special { color: #6941a5; background: #f2eaff; border-color: #cbb4ee; }
.card-rarity-icon.rarity-none { color: #9aa1ad; }
.badge { display: inline-flex; align-items: center; padding: .18rem .48rem; border-radius: 999px; background: #eef1f5; color: var(--navy); font-size: .75rem; font-weight: 700; }
.badge.red { color: #8d1522; background: #fdebed; }
.badge.green { color: #0c5f40; background: #e5f6ee; }
.badge.yellow { color: #765600; background: #fff4c8; }
.filters { display: grid; grid-template-columns: 2fr repeat(3, 1fr) auto; gap: .6rem; margin-bottom: 1rem; }
.card-filters { display: grid; grid-template-columns: minmax(0, 2fr) minmax(180px, 1.2fr) minmax(150px, 1fr) 42px 42px; gap: .6rem; width: 100%; margin-bottom: 1rem; }
.compact-filters { display: grid; grid-template-columns: minmax(220px, 1fr) auto; gap: .6rem; margin-bottom: 1rem; }
.catalog-filters { display: grid; grid-template-columns: minmax(0, 1fr) 42px 42px; gap: .6rem; width: 100%; margin-bottom: 1rem; }
.catalog-update-status { display: flex; align-items: center; gap: .75rem; margin: -0.5rem 0 1rem; padding: .7rem .85rem; color: var(--navy); background: #eef1f5; border: 1px solid var(--line); border-radius: 8px; }
.catalog-update-status.is-hidden { display: none; }
.catalog-update-status > i { width: 1.2rem; color: var(--red); text-align: center; }
.catalog-update-status > div { display: flex; min-width: 0; align-items: baseline; gap: .55rem; }
.catalog-update-status span { overflow: hidden; color: var(--muted); font-size: .82rem; text-overflow: ellipsis; white-space: nowrap; }
.catalog-update-status.is-completed > i { color: var(--green); }
.catalog-update-status.is-failed > i { color: var(--danger); }
/* --- Pokedex: Filters --- */
.pokedex-filters { display: grid; grid-template-columns: minmax(0, 2fr) minmax(180px, 1fr) 42px 42px; gap: .6rem; width: 100%; margin-bottom: 1rem; }
.set-card-filters { display: grid; grid-template-columns: minmax(0, 2fr) minmax(180px, 1fr) 42px 42px; gap: .6rem; width: 100%; margin-bottom: 1rem; }
.filter-icon-button { width: 42px; height: 42px; min-height: 42px; padding: 0; border-radius: 8px; }
.filter-reset-button { width: 42px; height: 42px; min-height: 42px; padding: 0; border-radius: 8px; }
.collection-filters { display: grid; grid-template-columns: minmax(0, 2fr) minmax(150px, 1fr) auto; align-items: end; gap: .6rem; }
form p { margin: 0 0 1rem; }
label { display: block; font-weight: 700; font-size: .88rem; margin-bottom: .3rem; }
input, select, textarea { width: 100%; min-height: 42px; color: var(--navy); background: white; border: 1px solid #c9ced8; border-radius: 8px; font: inherit; padding: .58rem .7rem; }
input[type=checkbox] { width: auto; min-height: auto; }
textarea { min-height: 90px; resize: vertical; }
.helptext { display: block; color: var(--muted); font-size: .78rem; margin-top: .2rem; }
.errorlist { color: var(--danger); margin: .25rem 0; padding-left: 1.2rem; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: white; }
th, td { padding: .72rem .7rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
th { color: var(--muted); font-size: .75rem; letter-spacing: .04em; text-transform: uppercase; }
.thumb { width: 46px; height: 64px; object-fit: contain; vertical-align: middle; }
.set-logo { width: 110px; height: 55px; object-fit: contain; }
.set-symbol { width: 34px; height: 34px; object-fit: contain; }
.set-symbol-cell { width: 54px; }
.catalog-results-heading, .catalog-series-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.catalog-results-heading { margin: 1.5rem 0 .8rem; }
.catalog-results-heading h2, .catalog-series-heading h3 { margin-bottom: 0; }
.catalog-section-list, .catalog-series-list { display: grid; gap: 1rem; }
.catalog-section + .catalog-section { margin-top: 1.75rem; }
.catalog-section-heading { margin-bottom: .8rem; padding-left: .85rem; border-left: 4px solid var(--red); }
.catalog-section-heading h2 { margin-bottom: 0; }
.catalog-series { padding: 0; overflow: hidden; }
.catalog-series-heading { padding: 1rem 1.15rem; border-bottom: 1px solid var(--line); }
.catalog-set-table { min-width: 900px; table-layout: fixed; }
.catalog-set-table tbody tr:hover { background: #fbfaf6; }
.catalog-code-stack, .set-code-list { display: grid; justify-items: start; gap: .32rem; }
.catalog-col-logo { width: 13%; }
.catalog-col-name { width: 36%; }
.catalog-col-code { width: 12%; }
.catalog-col-dates { width: 27%; }
.catalog-col-cards { width: 12%; }
.catalog-localized-name { display: block; margin-top: .2rem; color: var(--muted); font-size: .9rem; }
.catalog-logo-cell { text-align: center; }
.catalog-set-logo { width: 100px; height: 52px; object-fit: contain; }
.catalog-set-symbol { width: 36px; height: 36px; object-fit: contain; }
.catalog-set-glyph, .set-detail-glyph { display: inline-block; font-family: CardSetSymbols; font-style: normal; line-height: 1; }
.catalog-set-glyph { color: #111827; font-size: 2.45rem; }
.set-detail-glyph { margin-top: .25rem; color: #111827; font-size: 5.25rem; }
.set-detail-symbol { display: block; width: 70px; height: 70px; margin-inline: auto; object-fit: contain; }
.card-copy > .catalog-expansion-type { display: inline-block; margin-top: .28rem; color: var(--muted); font-size: .68rem; font-weight: 800; letter-spacing: .09em; line-height: 1; text-transform: uppercase; }
.card-treatment-list { display: flex; flex-wrap: wrap; gap: .25rem; margin-top: .5rem; }
.card-treatment-list span { padding: .18rem .38rem; color: var(--muted); background: #f3f5f7; border-radius: 999px; font-size: .62rem; font-weight: 800; line-height: 1; text-transform: uppercase; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
/* --- Pokedex: List --- */
.pokemon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .8rem; }
.pokemon-empty { grid-column: 1 / -1; width: 100%; }
.pokemon-tile { text-align: center; padding: 1rem; background: white; border: 1px solid var(--line); border-radius: 12px; transition: transform .18s ease, box-shadow .18s ease; }
.pokemon-tile:hover { position: relative; z-index: 1; transform: scale(1.03); box-shadow: 0 14px 30px rgba(23,38,66,.14); text-decoration: none; }
.pokemon-tile img { width: 100px; height: 100px; object-fit: contain; }
.pokemon-tile span { display: block; color: var(--muted); font-size: .8rem; }
.infinite-loader { display: flex; min-height: 64px; align-items: center; justify-content: center; margin-top: 1rem; }
.infinite-loading-status { display: none; align-items: center; gap: .5rem; color: var(--muted); font-size: .88rem; }
.infinite-loader.is-auto .infinite-load-fallback { display: none; }
.infinite-loader.is-auto .infinite-loading-status { display: inline-flex; }
.infinite-loader:not(.is-loading) .infinite-loading-status { visibility: hidden; }
.infinite-loader.has-error { gap: .75rem; }
.infinite-loader.has-error .infinite-loading-status { display: inline-flex; visibility: visible; }
.detail-layout,
.set-detail-layout,
/* --- Shared Detail Layouts --- */
.pokemon-detail-layout { display: grid; grid-template-columns: minmax(300px, .72fr) minmax(0, 1.65fr); align-items: start; gap: 1.4rem; }
.detail-art { position: sticky; top: 92px; align-self: start; text-align: center; }
.detail-art img { max-height: 620px; filter: drop-shadow(0 14px 17px rgba(0,0,0,.19)); }
.card-profile-column { display: grid; align-self: start; gap: 1rem; }
.card-art-panel { position: relative; text-align: center; }
.card-art-panel img { width: 100%; max-height: 620px; object-fit: contain; filter: drop-shadow(0 14px 17px rgba(0,0,0,.19)); }
.card-detail-column { min-width: 0; display: grid; align-items: start; gap: 1rem; }
.set-profile-column { position: sticky; top: 92px; display: grid; align-self: start; gap: 1rem; }
.set-card-column { min-width: 0; }
.set-card-column .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card-group-divider { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: .5rem; padding: 1rem 0 .15rem; border-top: 2px solid var(--line); }
.card-group-divider > div { display: grid; gap: .18rem; }
.card-group-divider strong { color: var(--navy); font-size: 1.2rem; }
.card-group-kicker { color: var(--red); font-size: .68rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.set-product-panel { display: grid; gap: 1.15rem; }
.set-product-heading { text-align: center; }
.set-product-heading h1 { margin-bottom: .8rem; }
.set-detail-logo { display: block; width: min(220px, 80%); max-height: 88px; margin-inline: auto; object-fit: contain; }
.set-information-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .9rem; }
.set-information-heading .eyebrow { margin: 0; }
.set-definition { grid-template-columns: minmax(105px, .8fr) minmax(0, 1fr); }
.app-modal.set-products-dialog { width: min(920px, calc(100% - 2rem)); }
.set-products-dialog-body { padding: 1rem; }
.set-products-dialog-gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; }
.set-products-dialog-item { display: grid; min-width: 0; min-height: 360px; margin: 0; place-items: center; overflow: hidden; padding: 1rem; background: #f4f5f7; border: 1px solid var(--line); border-radius: 10px; }
.set-products-dialog-item a { display: grid; width: 100%; height: 100%; place-items: center; }
.set-products-dialog-item a:hover { text-decoration: none; }
.set-products-dialog-item img { display: block; width: auto; height: auto; max-width: 100%; max-height: min(64dvh, 620px); object-fit: contain; filter: drop-shadow(0 8px 12px rgba(0,0,0,.18)); transition: transform .18s ease; }
.set-products-dialog-item a:hover img { transform: scale(1.025); }
.set-source-panel > .eyebrow { margin-bottom: .8rem; }
.set-source-links { display: grid; overflow: hidden; border: 1px solid var(--line); border-radius: 9px; }
.set-source-link { display: grid; min-width: 0; min-height: 39px; grid-template-columns: minmax(0, 1fr) auto 12px; align-items: center; gap: .55rem; padding: .5rem .65rem; color: var(--navy); background: #f7f8fa; border-bottom: 1px solid var(--line); transition: color .15s ease, background .15s ease; }
.set-source-link:last-child { border-bottom: 0; }
.set-source-link strong { overflow: hidden; font-size: .78rem; line-height: 1.15; text-overflow: ellipsis; white-space: nowrap; }
.set-source-link small { overflow: hidden; max-width: 105px; color: var(--muted); font-size: .68rem; font-variant-numeric: tabular-nums; line-height: 1.15; text-overflow: ellipsis; white-space: nowrap; }
.set-source-link > i { color: var(--red); font-size: .62rem; text-align: right; }
.set-source-link:hover, .set-source-link:focus-visible { color: var(--red); background: white; outline: none; text-decoration: none; }
.card-identity-panel h1 { margin-bottom: .75rem; }
.card-definition { margin-top: 1rem; }
.card-printings-section { display: grid; gap: .85rem; }
.card-printings-section > .eyebrow { margin: 0; }
.card-release-gallery { display: grid; grid-template-columns: minmax(0, 1fr); gap: .85rem; }
.card-reprint-divider { display: flex; align-items: center; gap: .8rem; margin: .25rem 0 0; color: var(--red); font-size: .78rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.card-reprint-divider::before, .card-reprint-divider::after { content: ''; flex: 1 1 auto; height: 1px; background: var(--line); }
.card-reprint-divider::before { display: none; }
.card-reprint-divider span { flex: 0 0 auto; }
.card-release-printing { position: relative; display: grid; min-width: 0; grid-template-columns: minmax(190px, 230px) minmax(0, 1fr); overflow: hidden; background: #f6f7f9; border: 1px solid var(--line); border-radius: 10px; }
.card-release-tile-image { display: grid; width: 100%; min-height: 100%; aspect-ratio: 245/342; place-items: center; overflow: hidden; padding: .75rem; background: #e9ecf1; border-right: 1px solid var(--line); }
.card-release-tile-image img { display: block; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 5px 7px rgba(0,0,0,.16)); transition: transform .18s ease; }
a.card-release-tile-image:hover img { transform: scale(1.025); }
.card-release-tile-image .missing-card-image { min-height: 100%; }
.card-release-tile-copy { position: relative; display: grid; min-width: 0; align-content: start; gap: .65rem; padding: 1rem 1rem 4.25rem; }
.card-release-tile-heading { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: .5rem; }
.card-release-tile-heading > strong,
.card-release-tile-heading > a { min-width: 0; color: var(--red); font-size: 1rem; text-decoration: none; overflow-wrap: anywhere; }
.card-release-tile-heading > a:hover { color: var(--red-dark); text-decoration: none; }
.card-release-tile-copy > p { margin: -.25rem 0 0; color: var(--muted); font-size: .75rem; }
.card-release-kind { flex: 0 0 auto; }
.card-release-languages { display: flex; flex-wrap: wrap; gap: .3rem; }
.card-release-languages .badge { min-width: 32px; justify-content: center; }
.card-release-properties { display: flex; flex-wrap: wrap; gap: .35rem; }
.card-release-properties span { padding: .18rem .38rem; color: var(--muted); background: white; border: 1px solid var(--line); border-radius: 5px; font-size: .68rem; font-weight: 700; text-transform: uppercase; }
.card-release-sources { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .4rem; }
.card-release-source {
    display: grid;
    min-width: 0;
    min-height: 28px;
    grid-template-columns: minmax(0, 1fr) auto 10px;
    align-items: center;
    gap: .4rem;
    padding: .32rem .45rem;
    color: var(--navy);
    background: white;
    border: 1px solid var(--line);
    border-radius: 7px;
    font-size: .7rem;
    line-height: 1;
    text-decoration: none;
    transition: color .16s ease, background .16s ease;
}
a.card-release-source:hover {
    color: var(--red);
    background: #fff8f8;
    text-decoration: none;
}
.card-release-source-name { overflow: hidden; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.card-release-source-id { overflow: hidden; max-width: 100px; color: var(--muted); font-variant-numeric: tabular-nums; text-overflow: ellipsis; white-space: nowrap; }
.card-release-source i { font-size: .58rem; opacity: .7; text-align: right; }
.card-release-source.is-unavailable { cursor: not-allowed; color: var(--muted); background: #f3f4f6; opacity: .62; }
.card-release-tile-actions { position: absolute; right: .75rem; bottom: .75rem; display: flex; justify-content: flex-end; }
.card-release-price-guide { position: relative; display: grid; gap: .55rem; padding: .65rem 3.4rem .65rem .7rem; background: #fffaf0; border: 1px solid #eadfc8; border-radius: 8px; }
.card-release-price-guide > header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .4rem 1rem; color: var(--muted); font-size: .68rem; }
.card-release-price-guide > header > span { color: var(--navy); font-weight: 800; }
.card-release-price-summary { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .4rem; margin: 0; }
.card-release-price-summary > div { min-width: 0; padding-right: .4rem; border-right: 1px solid #eadfc8; }
.card-release-price-summary > div:last-child { padding-right: 0; border-right: 0; }
.card-release-price-summary dt { overflow: hidden; margin-bottom: .1rem; color: var(--muted); font-size: .63rem; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.card-release-price-summary dd { margin: 0; color: var(--navy); font-size: .78rem; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.card-release-price-button { position: absolute; top: .55rem; right: .55rem; width: 38px; min-width: 38px; height: 38px; min-height: 38px; }
.price-guide-dialog { width: min(760px, calc(100% - 2rem)); }
.price-guide-dialog-actions { display: flex; gap: .45rem; }
.price-guide-dialog .app-modal-body { display: grid; gap: 1rem; }
.price-guide-dialog .full-price-guide-table tbody tr:nth-child(odd) { background: #f7f8fa; }
.full-price-guide-table { table-layout: fixed; }
.full-price-guide-table th, .full-price-guide-table td { width: 50%; padding: .5rem .7rem; }
.full-price-guide-table th { color: var(--navy); font-size: .82rem; font-weight: 400; letter-spacing: 0; text-transform: none; }
.full-price-guide-table td { font-weight: 400; font-variant-numeric: tabular-nums; text-align: right; }
.full-price-guide-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1rem; color: var(--muted); font-size: .7rem; }
.price-history { border-top: 1px solid var(--line); }
.price-history summary { padding-top: .8rem; color: var(--navy); font-weight: 800; cursor: pointer; }
.price-history .table-wrap { margin-top: .65rem; }
.price-history th, .price-history td { padding: .45rem .6rem; font-size: .72rem; font-variant-numeric: tabular-nums; }
.price-history th:not(:first-child), .price-history td:not(:first-child) { text-align: right; }
.card-rules-panel > .eyebrow { margin-bottom: .85rem; }
.card-rules-panel > p:last-child { margin-bottom: 0; }
.rules-fallback-note { display: flex; align-items: flex-start; gap: .45rem; margin: 1rem 0 0; padding-top: .8rem; color: var(--muted); border-top: 1px solid var(--line); font-size: .75rem; }
.rules-fallback-note i { margin-top: .18rem; color: #b7791f; }
.related-cards-section { display: grid; gap: .85rem; }
.related-cards-section > .eyebrow { margin: 0; }
.related-card-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .7rem; }
.related-card { display: grid; gap: .35rem; min-width: 0; padding: .55rem; color: var(--navy); background: #f6f7f9; border: 1px solid var(--line); border-radius: 9px; text-decoration: none; transition: transform .16s ease, box-shadow .16s ease; }
.related-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); text-decoration: none; }
.related-card > div { display: grid; aspect-ratio: 245/342; place-items: center; overflow: hidden; }
.related-card img { width: 100%; height: 100%; object-fit: contain; }
.related-card strong, .related-card small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.related-card small { color: var(--muted); }
.card-rules-section { margin-top: 1.25rem; }
.card-rules-section > h2 { margin-bottom: .25rem; font-size: 1.05rem; }
.card-rule { padding: .8rem 0; border-top: 1px solid var(--line); }
.card-rule h3, .card-rule p { margin-bottom: .25rem; }
.card-rule-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.energy-costs { display: flex; align-items: center; gap: .3rem; margin: .45rem 0; }
.energy-symbol { display: inline-flex; width: 25px; height: 25px; flex: 0 0 25px; align-items: center; justify-content: center; color: white; background: #8c939e; border: 1px solid rgba(23,38,66,.18); border-radius: 50%; box-shadow: inset 0 1px 1px rgba(255,255,255,.4), 0 1px 2px rgba(23,38,66,.12); font-size: .72rem; }
.energy-colorless { color: var(--navy); background: #f0f1f3; }
.energy-grass { background: #4d9b4a; }
.energy-fire { background: #d84a32; }
.energy-water { background: #3c82c4; }
.energy-lightning { color: #5c4600; background: #f4cf38; }
.energy-psychic { background: #8b58a6; }
.energy-fighting { background: #b66c3b; }
.energy-darkness { background: #313946; }
.energy-metal { color: #344054; background: #c7cdd3; }
.energy-fairy { background: #d86fa2; }
.energy-dragon { color: #4e3a00; background: #d9b834; }
.set-detail-heading { align-items: flex-start; }
.set-detail-heading > :first-child { min-width: 0; }
.set-detail-heading-actions { display: flex; flex: 0 0 auto; align-items: center; gap: .75rem; margin-left: auto; }
.card-list-heading { align-items: flex-start; }
.card-list-heading > :first-child { min-width: 0; }
.card-list-heading-actions { display: flex; flex: 0 0 auto; align-items: center; gap: .75rem; margin-left: auto; }
/* --- Pokedex: Detail --- */
.pokemon-profile-column { position: sticky; top: 92px; display: grid; gap: 1rem; }
.pokemon-hero-panel { position: relative; display: grid; gap: 1.25rem; text-align: center; }
.pokemon-identity .eyebrow { margin-bottom: .35rem; }
.pokemon-identity h1 { margin: 0 0 .25rem; }
.pokemon-identity .muted { margin: 0; }
.pokemon-artwork img { width: 100%; max-height: 360px; object-fit: contain; filter: drop-shadow(0 14px 17px rgba(0,0,0,.16)); }
.pokemon-pokedex-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.pokemon-status-icons { display: flex; gap: .4rem; }
.pokemon-status-icon { width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; color: #aeb4bf; background: #f0f1f4; border: 1px solid var(--line); border-radius: 50%; }
.pokemon-status-icon.legendary.is-active { color: #735400; background: #fff1ad; border-color: #e5bd31; }
.pokemon-status-icon.mythical.is-active { color: #6941a5; background: #f2eaff; border-color: #cbb4ee; }
.pokemon-status-icon.generation { color: var(--navy); background: #e8eef7; border-color: #bdc9db; font-size: .72rem; font-weight: 800; letter-spacing: -.02em; }
.pokemon-types { justify-content: flex-end; margin: .85rem 0 0; }
.pokemon-pokedex-card > p { margin: .85rem 0 0; }
.pokemon-data-column { min-width: 0; display: grid; gap: 1rem; }
.evolution-panel { --evolution-node-size: 112px; overflow: hidden; }
.evolution-panel > h2 { margin-bottom: .8rem; }
.evolution-graph { display: flex; padding: .25rem 0 .45rem; }
.evolution-branch { display: flex; width: max-content; min-width: min-content; align-items: center; }
.evolution-node { display: grid; flex: 0 0 var(--evolution-node-size); width: var(--evolution-node-size); height: var(--evolution-node-size); place-items: center; align-content: center; gap: .22rem; padding: .55rem; color: var(--navy); background: #f7f8fa; border: 1px solid var(--line); border-radius: 14px; text-align: center; }
.evolution-node:hover { border-color: #aeb8c8; box-shadow: 0 5px 14px rgba(18,39,70,.1); }
.evolution-node.is-current { background: #fff8dd; border: 2px solid var(--yellow); box-shadow: 0 0 0 3px rgba(255,203,5,.16); }
.evolution-node img { width: 62px; height: 62px; object-fit: contain; }
.evolution-node strong { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .9rem; }
.evolution-node span { color: var(--muted); font-size: .75rem; }
.evolution-connector { display: inline-flex; width: 18px; flex: 0 0 18px; align-items: center; justify-content: center; color: var(--red); }
.evolution-connector::before { content: ""; width: 7px; height: 2px; background: #d7a8ae; }
.evolution-connector i { margin-left: -1px; font-size: .7rem; }
.evolution-children { display: flex; width: max-content; align-items: center; gap: .55rem; }
.evolution-branch.is-branching { display: flex; width: 100%; min-width: 0; align-items: flex-start; }
.evolution-branch.is-branching > .evolution-connector { margin-top: calc(var(--evolution-node-size) / 2 - 8px); }
.evolution-alternatives { flex: 1 1 auto; width: auto; min-width: 0; flex-wrap: wrap; align-items: stretch; gap: .7rem; }
.evolution-alternatives > .evolution-branch { flex: 0 0 auto; align-items: center; padding: .4rem; background: rgba(241, 244, 248, .72); border: 1px dashed #c8cfda; border-radius: 15px; }
.evolution-branch.has-stacked-branches { align-items: center; }
.evolution-branch.has-stacked-branches > .evolution-connector { margin-top: 0; }
.evolution-alternatives.is-stacked { flex: 0 1 auto; flex-direction: column; flex-wrap: nowrap; align-items: flex-start; }
.pokemon-linked-cards-panel { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.pokemon-linked-cards-panel > .eyebrow { margin: 0; }
.pokemon-linked-cards-actions { display: flex; align-items: center; gap: .75rem; }
.pokemon-catalog-button { width: 42px; }
.pokemon-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.pokemon-section-heading .eyebrow { margin: 0; }
.pokemon-heading-actions { display: flex; align-items: center; gap: .5rem; }
.translation-warning { display: inline-flex; width: 28px; height: 28px; flex: 0 0 28px; align-items: center; justify-content: center; color: var(--orange); background: #fff6e8; border: 1px solid #f0cf9e; border-radius: 50%; font-size: .78rem; cursor: help; }
.pokemon-status-icons .translation-warning { width: 34px; height: 34px; flex-basis: 34px; }
.pokemon-hero-panel > .translation-warning { position: absolute; top: 1rem; right: 1rem; }
.pokemon-stat-list { display: grid; gap: .7rem; }
.pokemon-stat-row { display: grid; grid-template-columns: minmax(92px, 135px) 34px minmax(100px, 1fr); align-items: center; gap: .75rem; }
.pokemon-stat-row > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.pokemon-stat-row > strong { text-align: right; }
.pokemon-stat-track { height: 9px; overflow: hidden; background: #e8ebf0; border-radius: 999px; }
.pokemon-stat-track > span { display: block; height: 100%; background: linear-gradient(90deg, var(--red), #ee6876); border-radius: inherit; }
.pokemon-abilities-panel > .eyebrow, .pokemon-facts-panel > .eyebrow, .pokemon-matchups-panel > .eyebrow { margin-bottom: .85rem; }
.pokemon-ability-list { display: grid; gap: .75rem; }
.pokemon-ability { padding: .9rem 0 0; border-top: 1px solid var(--line); }
.pokemon-ability:first-child { padding-top: 0; border-top: 0; }
.pokemon-ability > div { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.pokemon-ability h3 { margin: 0; font-size: 1rem; }
.pokemon-ability p { margin: .35rem 0 0; color: var(--muted); }
.pokemon-facts-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.pokemon-facts-list { margin: 0; }
.pokemon-facts-list > div { display: grid; grid-template-columns: minmax(115px, .8fr) minmax(0, 1fr); gap: .75rem; padding: .55rem 0; border-bottom: 1px solid var(--line); }
.pokemon-facts-list > div:last-child { border-bottom: 0; }
.pokemon-facts-list dt { color: var(--muted); font-weight: 700; }
.pokemon-facts-list dd { margin: 0; text-align: right; overflow-wrap: anywhere; }
.pokemon-matchup-groups { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.pokemon-matchup-groups h3 { margin-bottom: .55rem; font-size: 1rem; }
.pokemon-matchup-items { display: flex; flex-wrap: wrap; gap: .4rem; }
.badge.matchup-weak { color: #8b1722; background: #ffe7ea; }
.badge.matchup-resistant { color: #126544; background: #e4f6ee; }
.badge.matchup-immune { color: #445067; background: #e9edf3; }
.column-back-actions { display: flex; justify-content: flex-start; }
.button.column-back-button { width: 42px; min-height: 42px; padding: 0; box-shadow: none; }
.button.column-back-button:hover { color: var(--navy); background: #f0f2f5; border-color: #b9c0cb; }
.pokemon-back-actions,
.card-back-actions,
.set-back-actions { width: 100%; }
.button.column-back-button-wide { width: 100%; padding: .7rem 1rem; gap: .55rem; }
.definition { display: grid; grid-template-columns: 145px 1fr; gap: .45rem 1rem; }
.definition dt { color: var(--muted); }
.definition dd { margin: 0; }
.pagination { display: flex; justify-content: center; align-items: center; gap: .7rem; margin-top: 1.5rem; }
.messages { position: fixed; z-index: 30; left: 50%; top: 82px; transform: translateX(-50%); }
.message { margin-bottom: .45rem; padding: .75rem 1rem; color: white; background: var(--navy); border-radius: 9px; box-shadow: var(--shadow); }
.message.success { background: var(--green); } .message.warning { background: var(--orange); } .message.error { background: var(--danger); }
.missing-row { background: #fffaf0; }
.lot-score { display: grid; grid-template-columns: repeat(4, 1fr); gap: .7rem; }
.positive { color: var(--green); } .negative { color: var(--danger); }
.empty { text-align: center; color: var(--muted); padding: 2.5rem 1rem; }
/* --- Profiles: Authentication --- */
.app-auth-shell-wide { max-width: 1160px; width: min(calc(100% - 2rem), 1160px); }
.app-auth-shell a { text-decoration: underline; text-underline-offset: .18em; }
.app-auth-brand .eyebrow { margin: 0 0 .5rem; color: var(--yellow); font-size: .78rem; font-weight: 800; letter-spacing: .1em; }
.app-auth-brand a { color: var(--yellow); font-weight: 800; }
.app-auth-copy p { margin: 0; }
.app-auth-card-heading .eyebrow { margin: 0; font-size: .78rem; font-weight: 800; letter-spacing: .1em; }
.app-auth-field { margin-bottom: 1rem; }
.app-auth-field label { display: inline-block; margin-bottom: .5rem; color: var(--navy); font-size: .84rem; font-weight: 750; }
.app-auth-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1rem; }
.app-auth-actions-end { justify-content: flex-end; }
.app-auth-signup { display: block; margin: 1.5rem 0 0; padding-top: 1.25rem; border-top: 1px solid var(--line); font-weight: 700; text-align: left; }
.app-auth-help { margin: -.25rem 0 1rem; color: var(--muted); font-size: .88rem; line-height: 1.45; }
.app-auth-help ul { margin: .35rem 0 0; padding-left: 1.2rem; }
.auth-alert { margin-bottom: 1rem; padding: .85rem 1rem; color: var(--navy); background: #f1f4f8; border: 1px solid var(--line); border-radius: 10px; line-height: 1.5; }
.auth-alert.error { color: #801522; background: #fff0f2; border-color: #f2bdc2; }
.auth-alert.success { color: #126544; background: #e8f7f0; border-color: #bde5d2; }
.errorlist { margin: .4rem 0 0; padding: 0; color: var(--danger); list-style: none; font-size: .86rem; }
/* --- Profiles: Personal Profile --- */
.account-readonly-list { margin: 0; }
.account-readonly-list > div { display: grid; grid-template-columns: minmax(140px, .38fr) minmax(0, .62fr); gap: 1rem; padding: .75rem 0; border-bottom: 1px solid var(--line); }
.account-readonly-list > div:last-child { border-bottom: 0; }
.account-readonly-list dt { color: var(--muted); font-weight: 700; }
.account-readonly-list dd { min-width: 0; margin: 0; overflow-wrap: anywhere; }
.app-modal { width: min(640px, calc(100% - 2rem)); max-height: calc(100dvh - 2rem); padding: 0; overflow: hidden; color: var(--navy); background: white; border: 0; border-radius: var(--radius); box-shadow: 0 24px 70px rgba(14,27,50,.3); }
.app-modal::backdrop { background: rgba(14,27,50,.66); backdrop-filter: blur(3px); }
.app-modal-shell { display: grid; grid-template-rows: auto minmax(0, 1fr); max-height: calc(100dvh - 2rem); }
.app-modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: 1.1rem 1.25rem; border-bottom: 1px solid var(--line); }
.app-modal-header h2, .app-modal-header .eyebrow { margin-bottom: 0; }
.app-modal-body { min-height: 150px; overflow-y: auto; padding: 1.25rem; }
.app-modal-actions { position: sticky; bottom: -1.25rem; display: flex; justify-content: flex-end; gap: .6rem; margin: 1.25rem -1.25rem -1.25rem; padding: 1rem 1.25rem; background: rgba(255,255,255,.96); border-top: 1px solid var(--line); }
.app-modal-status { min-height: 180px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .8rem; text-align: center; }
.app-modal-status > i { color: var(--red); font-size: 2rem; }
.app-modal-status .fa-circle-check { color: var(--green); }
.app-modal-status p { max-width: 42ch; margin: 0; font-weight: 700; }
.card-image-viewer {
    width: min(96vw, 1600px);
    height: min(94dvh, 1200px);
    max-width: none;
    max-height: none;
    padding: 0;
    overflow: hidden;
    color: var(--navy);
    background: #111827;
    border: 0;
    border-radius: 16px;
    box-shadow: 0 28px 90px rgba(0,0,0,.48);
}
.card-image-viewer::backdrop { background: rgba(8,15,28,.82); backdrop-filter: blur(4px); }
.card-image-viewer-shell { display: grid; grid-template-rows: auto minmax(0, 1fr); width: 100%; height: 100%; }
.card-image-viewer-toolbar { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 1rem; padding: .65rem .75rem .65rem 1rem; background: white; border-bottom: 1px solid var(--line); }
.card-image-viewer-toolbar h2 { min-width: 0; margin: 0; overflow: hidden; font-size: 1rem; text-overflow: ellipsis; white-space: nowrap; }
.card-image-viewer-actions { display: flex; flex: 0 0 auto; align-items: center; gap: .4rem; }
.card-image-viewer-control { display: inline-flex; width: 38px; height: 38px; align-items: center; justify-content: center; padding: 0; color: var(--navy); background: white; border: 1px solid var(--line); border-radius: 7px; cursor: pointer; font: inherit; font-weight: 750; }
.card-image-viewer-control:hover, .card-image-viewer-control:focus-visible { color: white; background: var(--navy); border-color: var(--navy); outline: none; }
.card-image-viewer-control:disabled { cursor: default; opacity: .38; }
.card-image-viewer-reset { width: 60px; font-size: .75rem; }
.card-image-viewer-stage { min-width: 0; min-height: 0; overflow: auto; overscroll-behavior: contain; background: radial-gradient(circle at center, #2a3342 0, #111827 70%); }
.card-image-viewer-stage.is-zoomed { cursor: grab; }
.card-image-viewer-stage.is-dragging { cursor: grabbing; }
.card-image-viewer-canvas { display: grid; width: max-content; min-width: 100%; height: max-content; min-height: 100%; place-items: center; padding: 1rem; }
.card-image-viewer-image { display: block; max-width: none; max-height: none; object-fit: contain; user-select: none; filter: drop-shadow(0 14px 30px rgba(0,0,0,.5)); }
.collection-card-form-fields { display: grid; gap: 1rem; }
.collection-card-form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: .75rem; }
.collection-card-form-field { min-width: 0; }
.collection-card-form-field label { margin-bottom: .3rem; }
.collection-card-form-field .errorlist, .collection-card-form-check .errorlist { margin-top: 0; }
.lot-pricing-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: .75rem;
}
.lot-pricing-grid .collection-edit-field {
    margin-bottom: 0;
}
.collection-card-form-check { display: flex; min-height: 42px; align-items: center; padding: .65rem .75rem; background: #f7f8fa; border: 1px solid var(--line); border-radius: 8px; }
.collection-card-form-check label { display: flex; align-items: center; gap: .55rem; margin: 0; cursor: pointer; }
.collection-card-form-check input { width: 18px; height: 18px; margin: 0; }
.collection-list-section { display: grid; gap: 1rem; }
.collection-public-section { margin-top: 2.2rem; padding-top: 2.2rem; border-top: 1px solid var(--line); }
.collection-section-heading h2 { margin: 0; font-size: clamp(1.5rem, 2vw, 2rem); }
.collection-section-heading .eyebrow { margin-bottom: .25rem; }
.collection-summary-list { display: grid; gap: 1rem; }
.collection-summary-card { display: grid; grid-template-columns: minmax(0, 1fr) 160px; min-height: 184px; overflow: hidden; color: var(--navy); background: white; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease; }
.collection-summary-card:hover, .collection-summary-card:focus-visible { color: var(--navy); border-color: rgba(var(--brand-color-primary-rgb), .5); box-shadow: 0 14px 28px rgba(18,31,54,.12); text-decoration: none; transform: translateY(-2px); }
.collection-summary-copy { display: grid; align-content: center; min-width: 0; padding: 1.25rem 1.4rem; }
.collection-summary-badges { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .65rem; }
.collection-summary-copy h2 { margin: 0; font-size: clamp(1.3rem, 2.3vw, 1.85rem); }
.collection-summary-copy > p { margin: .28rem 0 1rem; color: var(--muted); }
.collection-summary-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; margin: 0; }
.collection-summary-metrics div { min-width: 0; }
.collection-summary-metrics dt { overflow: hidden; color: var(--muted); font-size: .69rem; font-weight: 700; letter-spacing: .04em; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.collection-summary-metrics dd { margin: .2rem 0 0; font-size: 1.05rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.collection-summary-cover { display: grid; min-width: 0; place-items: center; padding: .8rem; color: var(--muted); background: linear-gradient(145deg, #eef1f6, #dfe5ed); }
.collection-summary-cover img { display: block; width: 100%; max-width: 130px; max-height: 175px; object-fit: contain; filter: drop-shadow(0 7px 10px rgba(14,27,50,.22)); }
.collection-summary-cover i { font-size: 2rem; }
.collection-summary-cover span { margin-top: .4rem; font-size: .72rem; font-weight: 700; }
.collection-card-grid { align-items: start; }
.collection-card-grid > .empty { grid-column: 1 / -1; }
.archive-detail-summary { display: flex; flex-wrap: wrap; gap: .65rem; margin: 0 0 1rem; }
.archive-detail-summary > div { display: flex; align-items: baseline; gap: .45rem; padding: .55rem .75rem; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.archive-detail-summary span { color: var(--muted); font-size: .8rem; font-weight: 700; }
.archive-detail-summary strong { color: var(--navy); }
.collection-entry-card { position: relative; }
.collection-entry-card > a { display: block; }
.collection-entry-card .card-copy { padding-bottom: 3.65rem; }
.collection-card-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .45rem; margin-top: .65rem; }
.collection-card-metrics span { display: grid; gap: .1rem; min-width: 0; color: var(--navy); font-size: .75rem; font-variant-numeric: tabular-nums; }
.collection-card-metrics b { color: var(--muted); font-size: .62rem; letter-spacing: .04em; text-transform: uppercase; }
.collection-entry-actions { position: absolute; right: .6rem; bottom: .6rem; display: flex; gap: .4rem; }
.collection-entry-actions form { margin: 0; }
.collection-edit-dialog { width: min(620px, calc(100% - 2rem)); }
.collection-edit-field { margin-bottom: 1rem; }
.collection-edit-field:has(input[type=checkbox]) { display: flex; align-items: center; gap: .55rem; }
.collection-edit-field:has(input[type=checkbox]) label { order: 2; margin: 0; }
.collection-edit-field:has(input[type=checkbox]) input { flex: 0 0 auto; }
.collection-visibility-field { position: relative; display: block; margin: 1.2rem 0; }
.collection-visibility-field > input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.collection-visibility-toggle { display: inline-flex; align-items: center; gap: .65rem; margin: 0; color: var(--navy); font-weight: 800; cursor: pointer; }
.collection-visibility-switch { position: relative; display: inline-block; width: 46px; height: 26px; flex: 0 0 46px; background: #aeb7c5; border-radius: 999px; box-shadow: inset 0 1px 2px rgba(14,27,50,.2); transition: background .18s ease; }
.collection-visibility-switch span { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; background: white; border-radius: 50%; box-shadow: 0 1px 3px rgba(14,27,50,.28); transition: transform .18s ease; }
.collection-visibility-field > input:checked + .collection-visibility-toggle .collection-visibility-switch { background: var(--red); }
.collection-visibility-field > input:checked + .collection-visibility-toggle .collection-visibility-switch span { transform: translateX(20px); }
.collection-visibility-field > input:focus-visible + .collection-visibility-toggle { outline: 3px solid rgba(var(--brand-color-primary-rgb), .3); outline-offset: 4px; border-radius: 4px; }
.collection-edit-field select[multiple] { min-height: 156px; padding: .35rem; }
.collection-edit-field select[multiple] option { padding: .42rem .5rem; border-radius: 4px; }
/* --- Responsive Layout --- */
@media (min-width: 992px) {
    .container { padding-inline: 1.5rem; }
}
@media (max-width: 850px) {
    .stats, .lot-score { grid-template-columns: repeat(2, 1fr); }
    .grid.three { grid-template-columns: 1fr 1fr; }
    .filters { grid-template-columns: 1fr 1fr; }
    .card-filters { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 42px 42px; }
    .card-filters > :first-child { grid-column: 1 / -1; }
    .collection-filters { grid-template-columns: 1fr 1fr; }
    .collection-filters .button { grid-column: 1 / -1; }
    .filters > :first-child { grid-column: 1/-1; }
    .detail-layout { grid-template-columns: 1fr; }
    .set-detail-layout { grid-template-columns: 1fr; }
    .set-profile-column { position: static; }
    .detail-art { position: static; }
    .card-profile-column { position: static; }
    .pokemon-detail-layout { grid-template-columns: 1fr; }
    .pokemon-profile-column { position: static; }
    .hero { grid-template-columns: 1fr; }
    .hero-mark { display: none; }
}
@media (max-width: 680px) {
    .evolution-panel { --evolution-node-size: 96px; }
    .evolution-node img { width: 54px; height: 54px; }
    .page-head { align-items: flex-start; flex-direction: column; }
    .account-readonly-list > div { grid-template-columns: 1fr; gap: .25rem; }
    .pokedex-page-head { flex-direction: row; align-items: flex-end; }
    .catalog-page-head { flex-direction: row; align-items: flex-end; }
    .catalog-update-status > div { display: grid; gap: 0; }
    .set-detail-heading { flex-direction: row; }
    .card-list-heading { flex-direction: row; }
    .stats, .lot-score, .grid.two, .grid.three { grid-template-columns: 1fr; }
    .filters { grid-template-columns: 1fr; }
    .compact-filters { grid-template-columns: 1fr; }
    .card-filters { grid-template-columns: minmax(0, 1fr) 42px 42px; }
    .card-filters > input, .card-filters > select { grid-column: 1 / -1; }
    .card-filters > .card-filter-submit { grid-column: 2; }
    .card-filters > .card-filter-reset { grid-column: 3; }
    .collection-filters { grid-template-columns: 1fr; }
    .collection-filters .button { grid-column: auto; }
    .filters > :first-child { grid-column: auto; }
    .pokedex-filters, .set-card-filters { grid-template-columns: minmax(0, 1fr) minmax(110px, .65fr) 42px 42px; }
    .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; }
    .pokemon-facts-grid, .pokemon-matchup-groups { grid-template-columns: 1fr; }
    .pokemon-stat-row { grid-template-columns: minmax(82px, 110px) 30px minmax(80px, 1fr); gap: .5rem; }
    .set-card-column .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .card-copy { padding: .6rem; }
    .collection-summary-card { grid-template-columns: minmax(0, 1fr) 108px; min-height: 156px; }
    .collection-summary-copy { padding: 1rem; }
    .collection-summary-metrics { grid-template-columns: 1fr 1fr; gap: .65rem; }
    .collection-summary-metrics div:last-child { grid-column: 1 / -1; }
    .collection-summary-cover { padding: .45rem; }
    .collection-summary-cover img { max-width: 90px; max-height: 140px; }
    .definition { grid-template-columns: 1fr; gap: .1rem; }
    .definition dd { margin-bottom: .5rem; }
    .set-products-dialog-gallery { grid-template-columns: 1fr; }
    .set-products-dialog-item { min-height: 280px; }
    .card-release-gallery { grid-template-columns: minmax(0, 1fr); gap: .65rem; }
    .related-card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .card-release-printing { grid-template-columns: minmax(125px, 155px) minmax(0, 1fr); }
    .card-release-tile-image { padding: .5rem; }
    .card-release-tile-copy { padding: .6rem .6rem 4.1rem; }
    .card-release-tile-actions { right: .6rem; bottom: .6rem; }
    .card-release-sources { grid-template-columns: minmax(0, 1fr); }
    .card-release-price-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .card-release-price-summary > div, .card-release-price-summary > div:last-child { padding: .3rem 0; border-right: 0; border-bottom: 1px solid #eadfc8; }
    .card-release-price-summary > div:nth-last-child(-n+2) { border-bottom: 0; }
    .app-modal { width: calc(100% - 1rem); max-height: calc(100dvh - 1rem); }
    .app-modal.set-products-dialog { width: calc(100% - 1rem); }
    .app-modal-shell { max-height: calc(100dvh - 1rem); }
    .app-modal-actions { flex-direction: column-reverse; }
    .app-modal-actions .button { width: 100%; }
    .card-image-viewer { width: calc(100% - .5rem); height: calc(100dvh - .5rem); border-radius: 10px; }
    .card-image-viewer-toolbar { gap: .45rem; padding: .45rem; }
    .card-image-viewer-toolbar h2 { padding-left: .25rem; font-size: .88rem; }
    .card-image-viewer-actions { gap: .25rem; }
    .card-image-viewer-control { width: 36px; height: 36px; }
    .card-image-viewer-reset { width: 52px; }
    .app-auth-form-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
    .card-release-printing { grid-template-columns: minmax(105px, 118px) minmax(0, 1fr); }
    .card-release-tile-image { padding: .35rem; }
    .card-release-tile-copy { gap: .5rem; padding: .6rem .55rem 3.85rem; }
    .card-release-tile-heading { align-items: flex-start; }
    .card-release-price-guide { padding: .55rem 2.85rem .55rem .55rem; }
    .card-release-price-button { top: .45rem; right: .45rem; width: 34px; min-width: 34px; height: 34px; min-height: 34px; }
    .related-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .collection-card-form-row { grid-template-columns: 1fr; }
    .collection-card-form-check-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ========================================================================== */
/* Turbo Manager standard shell overrides                                    */
/* ========================================================================== */

/* --- Navigation --- */
.app-navbar {
    color: var(--brand-color-secondary);
    background: var(--brand-deep) !important;
    border-bottom: 3px solid var(--brand-accent);
    box-shadow: 0 8px 22px rgba(23, 38, 66, .12);
}
.app-navbar-logo { filter: drop-shadow(0 3px 5px rgba(0, 0, 0, .26)); }
.app-navbar-brand-text small { color: var(--brand-color-secondary); }
.app-navbar .app-brand,
.app-navbar .navbar-brand,
.app-navbar .navbar-toggler,
.app-navbar .nav-link { color: var(--brand-color-secondary) !important; }
.app-navbar .nav-link:hover,
.app-navbar .nav-link:focus,
.app-navbar .navbar-brand:hover,
.app-navbar .navbar-brand:focus { color: var(--brand-color-secondary) !important; text-decoration: none; opacity: .82; }
.app-navbar .square-btn {
    --bs-btn-color: var(--brand-color-secondary);
    --bs-btn-border-color: transparent;
    --bs-btn-hover-color: var(--brand-color-secondary);
    --bs-btn-hover-bg: rgba(255, 255, 255, .16);
    --bs-btn-hover-border-color: transparent;
    --bs-btn-active-color: var(--brand-color-secondary);
    --bs-btn-active-bg: rgba(255, 255, 255, .24);
    --bs-btn-active-border-color: transparent;
}
.app-nav .nav-link { display: flex; position: relative; min-height: 36px; align-items: center; font-size: .95rem; font-weight: 500; }
.app-nav .nav-link::after {
    position: absolute; bottom: -.45rem; left: 50%; width: 100%; height: 3px;
    content: ""; background: var(--brand-accent); border-radius: 999px; opacity: 0;
    transform: translateX(-50%) scaleX(.45); transition: opacity .16s ease, transform .16s ease;
}
.app-nav .nav-link:hover::after,
.app-nav .nav-link:focus-visible::after,
.app-nav .nav-link.active::after { opacity: 1; transform: translateX(-50%) scaleX(1); }
.app-mobile-nav .nav-link { padding: .75rem .85rem; color: var(--brand-color-primary) !important; border-radius: .5rem; font-size: 1rem; font-weight: 700; }
.app-mobile-nav .nav-link:hover,
.app-mobile-nav .nav-link:focus-visible,
.app-mobile-nav .nav-link.active { color: var(--brand-color-primary-dark) !important; background: #fdebed; opacity: 1; }
a.nav-link { height: 100%; text-decoration: none !important; }

/* --- Bootstrap theme --- */
.btn-primary {
    --bs-btn-color: var(--brand-color-secondary);
    --bs-btn-bg: var(--brand-color-primary);
    --bs-btn-border-color: var(--brand-color-primary);
    --bs-btn-hover-color: var(--brand-color-secondary);
    --bs-btn-hover-bg: var(--brand-color-primary-dark);
    --bs-btn-hover-border-color: var(--brand-color-primary-dark);
    --bs-btn-active-color: var(--brand-color-secondary);
    --bs-btn-active-bg: var(--brand-color-primary-dark);
    --bs-btn-active-border-color: var(--brand-color-primary-dark);
    --bs-btn-disabled-color: var(--brand-color-secondary);
    --bs-btn-disabled-bg: darkgrey;
    --bs-btn-disabled-border-color: darkgrey;
}
.btn.disabled, .btn:disabled { cursor: not-allowed; }
.form-control,
.form-select,
.input-group-text { min-height: 42px; color: var(--brand-ink); background-color: var(--brand-surface); border: 1px solid #c9ced8; border-radius: .5rem; }
.form-control:focus,
.form-select:focus { border-color: rgba(var(--brand-color-primary-rgb), .65); box-shadow: 0 0 0 .22rem rgba(var(--brand-color-primary-rgb), .12); }
.form-check-input:checked { background-color: var(--brand-color-primary); border-color: var(--brand-color-primary); }
.alert { border-radius: .65rem; box-shadow: var(--brand-shadow); }
.alert-htmx { bottom: 40px; z-index: 1055; }

/* --- Error pages --- */
.app-error-page { display: grid; min-height: calc(100vh - 10rem); padding: clamp(1rem, 4vw, 3rem) 0; place-items: center; }
.app-error-card {
    display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(280px, .9fr); width: 100%; max-width: 980px;
    min-height: 430px; overflow: hidden; background: var(--brand-surface); border: 1px solid var(--brand-line);
    border-radius: 1.375rem; box-shadow: var(--brand-shadow);
}
.app-error-copy { display: grid; align-content: center; padding: clamp(2rem, 6vw, 4.5rem); }
.app-error-eyebrow { margin: 0 0 .6rem; color: var(--brand-color-primary); font-size: .78rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.app-error-title { margin: 0; font-size: clamp(2.5rem, 6vw, 4.5rem); letter-spacing: -.055em; line-height: .98; }
.app-error-message { max-width: 34rem; margin: 1.15rem 0 1.75rem; color: var(--brand-muted); font-size: clamp(1rem, 2vw, 1.15rem); }
.app-error-actions { display: flex; gap: .5rem; }
.app-error-visual { display: grid; min-height: 260px; overflow: hidden; align-items: center; justify-items: center; background: var(--brand-deep); }
.app-error-image { display: block; width: 100%; height: 100%; object-fit: cover; }

/* --- Profile and account --- */
.app-profile-page { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 1rem; }
.app-profile-page > .app-page-head,
.app-profile-page > .app-page-divider { grid-column: 1 / -1; }
.app-profile-page > .app-page-divider { margin: 0 !important; }
.app-profile-photo { flex: 0 0 auto; margin-left: auto; }
.app-profile-photo .image-upload {
    width: 78px; height: 78px; margin: 0; overflow: hidden; background: #fdebed;
    border: 1px solid rgba(var(--brand-color-primary-rgb), .2); border-radius: 1rem; box-shadow: var(--brand-shadow);
}
.app-profile-photo .image-upload > img,
.app-profile-photo .image-upload > label { border-radius: 1rem !important; }
.app-profile-photo-add { cursor: pointer; }
.app-profile-card {
    grid-column: 1 / -1; min-width: 0; margin: 0 !important; padding: clamp(1.1rem, 2.5vw, 1.5rem);
    background: var(--brand-surface); border: 1px solid var(--brand-line); border-radius: var(--brand-radius); box-shadow: var(--brand-shadow);
}
.app-profile-card-title { margin: 0 0 1.1rem; color: var(--brand-ink); font-size: 1.15rem; font-weight: 750; letter-spacing: -.025em; }
.app-profile-card .table { --bs-table-bg: transparent; }
.app-profile-card .table > :not(caption) > * > * { padding: .75rem 0; border-bottom-color: var(--brand-line); }
.app-profile-card .table th { width: 38%; padding-right: 1rem; color: var(--brand-muted); font-size: .85rem; font-weight: 700; }
.app-profile-card .table td { overflow-wrap: anywhere; }
.app-profile-card label:not(.form-check-label) { display: inline-block; margin-bottom: .35rem; color: var(--brand-ink); font-size: .84rem; font-weight: 700; }
.app-profile-form-actions { margin-top: 1rem; }
.app-password-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, .8fr); gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
.app-password-requirements { align-self: start; padding: 1rem 1.1rem; color: var(--brand-ink); background: #fff8f8; border: 1px solid #f1d4d8; border-radius: .75rem; }
.app-password-requirements-heading { display: flex; align-items: center; gap: .65rem; margin-bottom: .75rem; }
.app-password-requirements-heading h3 { margin: 0; font-size: .95rem; font-weight: 750; }
.app-password-requirements-icon { display: inline-flex; flex: 0 0 32px; width: 32px; height: 32px; align-items: center; justify-content: center; color: var(--brand-color-primary); background: #fdebed; border-radius: .55rem; }
.app-password-requirements ul { display: grid; gap: .5rem; margin: 0; padding: 0; list-style: none; }
.app-password-requirements li { position: relative; padding-left: 1rem; color: var(--brand-muted); font-size: .88rem; line-height: 1.4; }
.app-password-requirements li::before { position: absolute; top: .45rem; left: 0; width: .38rem; height: .38rem; content: ""; background: var(--brand-color-primary); border-radius: 50%; }
.app-profile-danger-card { border-color: #e7c4c8; }
.app-profile-danger-card .app-profile-card-title { margin-bottom: .4rem; color: #a8232f; }
.app-profile-danger-copy { flex: 1 1 auto; min-width: 0; }
.app-profile-danger-copy p { margin: 0; color: var(--brand-muted); line-height: 1.55; }
.app-profile-danger-action,
.app-profile-danger-action:focus-visible { flex: 0 0 var(--app-control-size); color: #b42318; background: #fff; border: 1px solid #e5aeb5; }
.app-profile-danger-action:hover { color: #8f1d16; background: #fff5f5; border-color: #cf7c86; }

/* --- Authentication theme --- */
.app-auth-brand {
    color: #dbe2ef;
    background: radial-gradient(circle at 20% 15%, rgba(var(--brand-accent-rgb), .16), transparent 25%),
                linear-gradient(135deg, var(--brand-deep), var(--brand-deep-soft));
}
.app-auth-card-heading .app-eyebrow { color: var(--brand-color-primary); }
.app-auth-card-icon { color: var(--brand-color-primary); background: #fdebed; border: 1px solid rgba(var(--brand-color-primary-rgb), .18); }
.app-auth-actions .btn { display: inline-flex; align-items: center; gap: .55rem; padding: 0; }

@media (max-width: 991.98px) {
    #djDebug, #djDebugToolbar, #djDebugToolbarHandle { display: none !important; }
    .app-password-layout { grid-template-columns: 1fr; }
}
@media (max-width: 767.98px) {
    .app-error-page { min-height: auto; padding: 0; }
    .app-error-card { grid-template-columns: 1fr; min-height: 0; }
    .app-error-copy { padding: 2rem 1.5rem; }
    .app-error-visual { grid-row: 1; min-height: 170px; }
    .app-error-image { aspect-ratio: 16 / 9; }
}
@media (max-width: 576px) {
    .app-profile-page { gap: .75rem; }
    .app-profile-photo .image-upload { width: 68px; height: 68px; }
    .app-profile-card { padding: 1.1rem; }
}

/* --- Catalog expansion covers --- */
.catalog-set-cover {
    display: block;
    width: 56px;
    height: 56px;
    object-fit: cover;
    border: 1px solid var(--brand-line);
    border-radius: .5rem;
    box-shadow: 0 3px 9px rgba(23, 38, 66, .12);
}

/* Manual Association: Present catalog matches with an unambiguous visual preview. */
.manual-association-search { display: grid; grid-template-columns: 1fr; gap: .65rem; }
.manual-association-search input { width: 100%; }
.manual-association-search .button { justify-self: end; }
.manual-association-results { display: grid; gap: .75rem; margin-top: 1rem; }
.manual-association-result { display: grid; grid-template-columns: 78px minmax(0, 1fr) auto; align-items: center; overflow: hidden; background: white; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.manual-association-image { display: grid; min-height: 104px; place-items: center; overflow: hidden; background: var(--surface-muted); }
.manual-association-image img { display: block; width: 100%; height: 104px; object-fit: contain; }
.manual-association-image .missing-card-image { width: 100%; height: 100%; }
.manual-association-copy { display: grid; gap: .2rem; padding: .85rem 1rem; }
.manual-association-copy strong { color: var(--red); }
.manual-association-copy span { color: var(--muted); font-size: .9rem; }
.manual-association-action { padding: .85rem; }

@media (max-width: 540px) {
    .manual-association-result { grid-template-columns: 66px minmax(0, 1fr) auto; }
    .manual-association-image { min-height: 90px; }
    .manual-association-image img { height: 90px; }
    .manual-association-copy { padding: .7rem; }
    .manual-association-action { padding: .6rem; }
}
/* Home Carousel: Keep the catalog discovery area visual without dashboard counters. */
.home-card-showcase { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.3fr); gap: clamp(1.25rem, 3vw, 3rem); align-items: center; min-height: 370px; padding: clamp(1.5rem, 4vw, 3.4rem); color: white; background: linear-gradient(125deg, var(--navy), #294669); border-radius: var(--radius); box-shadow: 0 20px 42px rgba(14,27,50,.18); overflow: hidden; }
.home-card-showcase-copy { max-width: 33rem; }
.home-card-showcase-copy .eyebrow { color: var(--yellow); }
.home-card-showcase-copy h1 { margin-bottom: 1rem; color: white; }
.home-card-showcase-copy .lead { color: rgba(255,255,255,.82); }
.home-card-carousel-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(.55rem, 1.2vw, 1rem); align-items: center; }
.home-carousel-card { display: grid; min-width: 0; overflow: hidden; color: var(--navy); background: white; border-radius: 14px; box-shadow: 0 10px 24px rgba(0,0,0,.2); text-decoration: none; transition: transform .24s ease, opacity .18s ease; }
.home-carousel-card:nth-child(2) { transform: translateY(-1.25rem); }
.home-carousel-card:hover { color: var(--navy); transform: translateY(-.35rem) scale(1.025); }
.home-carousel-card:nth-child(2):hover { transform: translateY(-1.55rem) scale(1.025); }
.home-carousel-card.is-changing { opacity: .28; }
.home-carousel-card img { width: 100%; aspect-ratio: .7; object-fit: cover; background: var(--surface-muted); }
.home-carousel-card span { display: grid; gap: .15rem; padding: .65rem .7rem .75rem; }
.home-carousel-card strong { overflow: hidden; color: var(--red); font-size: .86rem; text-overflow: ellipsis; white-space: nowrap; }
.home-carousel-card small { overflow: hidden; color: var(--muted); font-size: .7rem; text-overflow: ellipsis; white-space: nowrap; }
.home-lower-grid { margin-top: 1.5rem; }
.home-catalog-panel { min-height: 100%; }
.home-catalog-panel-mark { display: grid; min-height: 150px; place-items: center; gap: .6rem; color: var(--muted); text-align: center; }
.home-catalog-panel-mark i { color: var(--yellow); font-size: 3.2rem; }
.home-catalog-panel-mark span { font-weight: 800; }

@media (max-width: 820px) {
    .home-card-showcase { grid-template-columns: 1fr; min-height: 0; }
    .home-card-showcase-copy { max-width: none; }
}

@media (max-width: 480px) {
    .home-card-showcase { padding: 1.2rem; }
    .home-card-carousel-grid { gap: .45rem; }
    .home-carousel-card:nth-child(2) { transform: translateY(-.65rem); }
    .home-carousel-card:nth-child(2):hover { transform: translateY(-.9rem) scale(1.025); }
    .home-carousel-card span { padding: .45rem; }
    .home-carousel-card strong { font-size: .72rem; }
    .home-carousel-card small { font-size: .6rem; }
}
