/* ── Set-page card gallery (gallery v3, .claude/gallery-v3/README.md) ─────
   The cards are the page: scans in a grid with a two-line caption, one slim toolbar, filters folded away.
   A second view (price table) and a detail drawer carry everything else.
   Uses the set page's tokens (--bg-*, --text-*, --accent-*, --border-color, --set-accent).
   Every class is prefixed g3 so it can sit beside the v2 .ct styles during a rollout. */
/* --g3-yellow and --g3-green are fixed rather than borrowed from the page: Delta Reign rethemes its electric accent
   green, and the hand-built pages define no --accent-green at all, which made the "In your binder" button and the
   owned outline transparent (the button "disappeared" when tapped). Prices yellow, owned green, on every page. */
.g3, .g3-grid, .g3-table-wrap, .g3-empty, .g3d, .g3z { --g3-yellow: #ffe14d; --g3-green: #4ac97e; --g3-accent: var(--set-accent, #9b6dff); --g3-gap: 1rem; --g3-radius: 10px; --g3-up: #4ac97e; --g3-down: #ff6b7d; --g3-cm: #8fb3ff; }
/* The section only groups the toolbar and status line. display: contents lets the sticky toolbar stick across
   the whole card list: on a set page the card chunks are its siblings in <main>, not its children. */
.g3 { display: contents; font-family: 'DM Sans', system-ui, sans-serif; color: var(--text-primary); }
.g3-status, .g3-tools { font-family: 'DM Sans', system-ui, sans-serif; }
.g3.g3-nodata .g3-tools { display: none; }   /* the card data did not load: the tiles still show, the tools would not work */
.g3 *, .g3-grid *, .g3-table-wrap *, .g3d * { box-sizing: border-box; }
.g3 .num, .g3d .num { font-variant-numeric: tabular-nums; }
.g3 :focus-visible, .g3-grid :focus-visible, .g3-table-wrap :focus-visible, .g3d :focus-visible { outline: 2px solid var(--g3-yellow); outline-offset: 2px; }

/* ── Toolbar: one row; filters open beneath it ───────────────────────── */
.g3-tools { position: sticky; top: calc(var(--anchor-offset, 4.5rem) - 16px); z-index: 20; background: rgba(10,10,15,0.94);
            backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid var(--border-color); border-radius: var(--g3-radius);
            padding: 0.45rem; margin: 0 0 0.4rem; }
.g3-tools { transition: opacity 0.2s, visibility 0.2s; }
.g3-tools.is-past { opacity: 0; visibility: hidden; pointer-events: none; }   /* past the list: off the Prices/FAQ sections */
.g3-row { display: flex; gap: 0.4rem; align-items: center; }
.g3-search { flex: 1 1 auto; position: relative; min-width: 0; }
.g3-search input { width: 100%; font: 500 0.9rem 'DM Sans', sans-serif; color: #fff; background: var(--bg-tertiary); border: 1px solid var(--border-color);
                   border-radius: 7px; padding: 0.5rem 2rem 0.5rem 0.75rem; outline: none; min-height: 36px; }
.g3-search input:focus { border-color: var(--g3-accent); }
.g3-search input::placeholder { color: var(--text-muted); }
.g3-search button { position: absolute; right: 2px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--text-muted); font-size: 1.1rem; cursor: pointer; padding: 0.25rem 0.5rem; }
.g3-ftoggle, .g3-select, .g3-seg { flex-shrink: 0; min-height: 36px; font: 700 0.78rem 'DM Sans', sans-serif; color: var(--text-secondary);
                                   background: var(--bg-tertiary); border: 1px solid var(--border-color); border-radius: 7px; }
.g3-ftoggle { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0 0.65rem; cursor: pointer; }
.g3-ftoggle svg { width: 15px; height: 15px; }
.g3-ftoggle:hover, .g3-ftoggle[aria-expanded="true"] { color: #fff; border-color: var(--text-muted); }
.g3-fcount { font-style: normal; min-width: 18px; height: 18px; border-radius: 9px; padding: 0 5px; display: inline-grid; place-items: center;
             background: var(--g3-yellow); color: #0a0a0f; font-size: 0.7rem; font-weight: 800; }
.g3-select { padding: 0 0.5rem; max-width: 11rem; }
.g3-fcount[hidden] { display: none; }
.g3-seg { display: inline-flex; padding: 2px; }
.g3-seg button { font: inherit; color: inherit; background: none; border: 0; border-radius: 5px; padding: 0 0.55rem; min-width: 30px;
                 cursor: pointer; display: inline-grid; place-items: center; }
.g3-seg button[aria-pressed="true"] { background: var(--g3-accent); color: #0a0a0f; }
.g3-seg svg { width: 14px; height: 14px; }
.g3-filters { display: flex; flex-wrap: wrap; gap: 0.45rem 1rem; align-items: center; padding: 0.6rem 0.2rem 0.2rem; }
.g3-filters[hidden] { display: none; }
.g3-fgroup { display: flex; flex-wrap: wrap; gap: 0.3rem; align-items: center; }
.g3-fgroup > span { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); margin-right: 0.15rem; }
.g3-chip, .g3-rk { display: inline-flex; align-items: center; gap: 0.3rem; font: 600 0.75rem 'DM Sans', sans-serif; color: var(--text-secondary);
                   background: none; border: 1px solid var(--border-color); border-radius: 99px; padding: 0.26rem 0.6rem; cursor: pointer; white-space: nowrap; }
.g3-chip:hover, .g3-rk:hover { color: #fff; border-color: var(--text-muted); }
.g3-chip[aria-pressed="true"] { color: #0a0a0f; background: var(--g3-yellow); border-color: var(--g3-yellow); }
.g3-rk[aria-pressed="true"] { border-color: var(--rk); color: #fff; box-shadow: inset 0 0 0 1px var(--rk); }
.g3-rk b { color: var(--rk); display: inline-flex; }
.g3-rk svg { height: 10px; width: auto; fill: currentColor; }
.g3-rk i { font-style: normal; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.g3-status { display: flex; justify-content: space-between; gap: 1rem; margin: 0 0.15rem 0.9rem; font-size: 0.75rem; color: var(--text-muted); }
.g3-status b { color: var(--text-secondary); font-weight: 700; }
.g3-status button { font: inherit; color: var(--g3-accent); background: none; border: 0; cursor: pointer; padding: 0; }
.g3-empty { border: 1px dashed var(--border-color); border-radius: var(--g3-radius); padding: 1.5rem; text-align: center; color: var(--text-muted); font-size: 0.85rem; }

/* ── Grid view: the card, then a two-line caption ────────────────────── */
.g3-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 1.25rem var(--g3-gap); margin: 0 0 1.25rem; }
.g3-grid[hidden], .g3c[hidden] { display: none; }
.g3c { min-width: 0; }
.g3c-art { position: relative; aspect-ratio: 400 / 557; border-radius: 4.5% / 3.3%; overflow: hidden; background: var(--bg-tertiary);
           box-shadow: 0 1px 2px rgba(0,0,0,0.5), 0 6px 18px rgba(0,0,0,0.35); transition: transform 0.18s ease, box-shadow 0.18s ease; }
.g3c:hover .g3c-art { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(0,0,0,0.5), 0 12px 28px rgba(0,0,0,0.5); }
.g3c-open { display: block; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: pointer; }
.g3c-open img { display: block; width: 100%; height: 100%; object-fit: cover; }
.g3c-none { display: grid; place-content: center; text-align: center; color: var(--text-muted); font: 0.8rem 'DM Sans', sans-serif; }
.g3c-none b { font-size: 1.3rem; color: var(--text-secondary); }
/* the binder tick: on the name line, off the card art (on the scan it covered the card's HP and energy symbol).
   Green in both states: a thin ring with a faint tick, then solid green once the card is in the binder. */
.g3c-top { display: flex; align-items: center; gap: 0.35rem; min-width: 0; }
.g3c-top .g3c-name { flex: 1; min-width: 0; }
.g3c-own { position: relative; flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
           padding: 0; background: rgba(74,201,126,0.08); border: 1.5px solid rgba(74,201,126,0.55); color: rgba(74,201,126,0.6);
           transition: background 0.15s, border-color 0.15s, color 0.15s; }
.g3c-own::after { content: ""; position: absolute; inset: -9px; }   /* a 40px tap target around the 22px ring */
.g3c-own svg { width: 12px; height: 12px; }
.g3c-own:hover { border-color: var(--g3-green); color: var(--g3-green); background: rgba(74,201,126,0.16); }
.g3c-own[aria-pressed="true"] { background: var(--g3-green); border-color: var(--g3-green); color: #0a0a0f; }
.g3c.is-owned .g3c-art { box-shadow: 0 0 0 2px var(--g3-green), 0 6px 18px rgba(0,0,0,0.35); }
.g3c-cap { padding: 0.5rem 0.1rem 0; cursor: pointer; }
.g3c-cap .g3c-own { cursor: pointer; }
.g3c-name { margin: 0; font: 700 0.86rem/1.3 'DM Sans', sans-serif; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g3c-line { display: flex; align-items: center; gap: 0.35rem; margin-top: 0.1rem; font-size: 0.75rem; color: var(--text-muted); }
.g3c-no { font-variant-numeric: tabular-nums; }
.g3c-line .rar { padding: 0; background: none; }
.g3c-p { margin-left: auto; font-size: 0.9rem; font-weight: 800; color: var(--g3-yellow); font-variant-numeric: tabular-nums; }
.g3c-p.none { color: var(--text-muted); font-weight: 600; }
/* a thin market (few copies listed or sold): same figure, dotted underline, explained in the drawer */
.g3c-p.thin, .g3-table td.lead.thin { text-decoration: underline dotted rgba(255,225,77,0.55); text-underline-offset: 3px; }

/* rarity tag: the printed rarity symbol (+ a word in the table and drawer), coloured by tier */
.rar { --rk: var(--text-secondary); display: inline-flex; align-items: center; gap: 0.25rem; flex-shrink: 0; font: 800 0.72rem 'DM Sans', sans-serif;
       letter-spacing: 0.02em; color: var(--rk); background: color-mix(in srgb, var(--rk) 14%, transparent); border-radius: 4px; padding: 0.1rem 0.38rem; white-space: nowrap; }
.rar svg { height: 10px; width: auto; fill: currentColor; }
/* Stars are yellow at every tier; only Mega Attack Rare differs (purple and green stars, set on the SVG paths). */
.tier-0 { --rk: #b9bccb; } .tier-1 { --rk: #9fc6ff; }
.tier-2, .tier-3, .tier-4, .tier-5, .tier-6, .tier-7, .tier-8 { --rk: #ffe14d; }
.tier-mar { --rk: #c77dff; }
.chg { font: 800 0.72rem 'DM Sans', sans-serif; border-radius: 4px; padding: 0.12rem 0.32rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.chg.up { color: var(--g3-up); background: rgba(74,201,126,0.13); }
.chg.down { color: var(--g3-down); background: rgba(255,107,125,0.13); }
.chg.flat { color: var(--text-muted); background: rgba(255,255,255,0.06); }
.g3d-buy svg { width: 11px; height: 11px; }

/* ── List view: the price table ──────────────────────────────────────── */
.g3-table-wrap { overflow-x: auto; border: 1px solid var(--border-color); border-radius: var(--g3-radius); background: var(--bg-secondary); margin: 0 0 1rem; }
.g3-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 0.82rem; min-width: 620px; }
.g3-table th, .g3-table td { padding: 0.45rem 0.5rem; border-bottom: 1px solid var(--border-color); text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.g3-table thead th { position: sticky; top: 0; background: var(--bg-tertiary); z-index: 2; font: 700 0.7rem 'DM Sans', sans-serif; letter-spacing: 0.07em;
                     text-transform: uppercase; color: var(--text-muted); }
.g3-table thead th button { all: unset; cursor: pointer; display: inline-flex; gap: 0.25rem; align-items: center; }
.g3-table thead th button:focus-visible { outline: 2px solid var(--g3-yellow); }
.g3-table thead th[aria-sort="ascending"] button::after { content: "▲"; font-size: 0.6rem; color: var(--g3-accent); }
.g3-table thead th[aria-sort="descending"] button::after { content: "▼"; font-size: 0.6rem; color: var(--g3-accent); }
.g3-table th:first-child, .g3-table td:first-child { text-align: left; position: sticky; left: 0; background: var(--bg-secondary); z-index: 1; }
.g3-table thead th:first-child { background: var(--bg-tertiary); z-index: 3; }
.g3-table tbody tr:hover td { background: var(--bg-tertiary); }
.g3-table tbody tr.is-owned td:first-child { box-shadow: inset 3px 0 0 var(--g3-green); }
.g3-table .c-card { display: flex; align-items: center; gap: 0.5rem; min-width: 200px; max-width: 250px; }
.g3-table .c-card button[data-open] { all: unset; cursor: pointer; display: flex; align-items: center; gap: 0.55rem; min-width: 0; }
.g3-table .c-card img { width: 34px; height: 47px; object-fit: cover; border-radius: 3px; background: #000; flex-shrink: 0; }
.g3-table .c-card button > span { display: flex; flex-direction: column; min-width: 0; }
.g3-table .c-card b { color: #fff; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g3-table .c-card small { color: var(--text-muted); font-size: 0.72rem; }
.g3-table td.c-rar { text-align: left; }
.g3-table td.lead { color: var(--g3-yellow); font-weight: 700; }
.g3-table td.dim { color: rgba(158,158,184,0.45); }
.g3-table td.cm { color: var(--g3-cm); }
.g3-table .t-own { all: unset; flex-shrink: 0; cursor: pointer; width: 26px; height: 26px; border-radius: 50%; display: inline-grid; place-items: center; border: 1.5px solid rgba(158,158,184,0.5); color: var(--text-muted); }
.g3-table .t-own svg { width: 13px; height: 13px; }
.g3-table .t-own[aria-pressed="true"] { background: var(--g3-green); border-color: var(--g3-green); color: #0a0a0f; }
.g3-table a.t-tcg { color: var(--g3-yellow); text-decoration: none; font-weight: 700; font-size: 0.75rem; }
.g3-table a.t-tcg:hover { text-decoration: underline; }

/* ── Detail drawer ───────────────────────────────────────────────────── */
.g3d-scrim { position: fixed; inset: 0; background: rgba(5,5,10,0.6); z-index: 1000; opacity: 0; transition: opacity 0.2s; }
.g3d-scrim.on { opacity: 1; }
.g3d-scrim:not(.on) { pointer-events: none; }   /* while fading out, taps reach the cards underneath */
.g3d { position: fixed; top: 0; right: 0; bottom: 0; width: min(460px, 100vw); z-index: 1001; background: var(--bg-secondary); border-left: 1px solid var(--border-color);
       display: flex; flex-direction: column; transform: translateX(100%); transition: transform 0.25s ease; font-family: 'DM Sans', system-ui, sans-serif; color: var(--text-primary); }
.g3d.on { transform: none; }
.g3d[hidden], .g3d-scrim[hidden] { display: none; }
.g3d-bar { display: flex; align-items: center; gap: 0.4rem; padding: 0.6rem 0.75rem; padding-top: calc(0.6rem + env(safe-area-inset-top, 0px));
           border-bottom: 1px solid var(--border-color); background: var(--bg-secondary); }
.g3d-bar .g3d-pos { flex: 1; font-size: 0.75rem; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.g3d-btn { width: 36px; height: 36px; border-radius: 8px; display: grid; place-items: center; background: var(--bg-tertiary); border: 1px solid var(--border-color);
           color: var(--text-secondary); cursor: pointer; padding: 0; }
.g3d-btn:hover { color: #fff; border-color: var(--text-muted); }
.g3d-btn svg { width: 16px; height: 16px; }
.g3d-body { flex: 1; overflow-y: auto; padding: 1rem 1rem calc(2rem + env(safe-area-inset-bottom, 0px)); overscroll-behavior: contain; }
.g3d-top { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 0.9rem; align-items: start; }
.g3d-img { display: block; width: 100%; aspect-ratio: 400 / 557; border-radius: 8px; overflow: hidden; background: #000; border: 0; padding: 0; cursor: zoom-in; }
.g3d-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.g3d .g3d-title { margin: 0; padding: 0; border: 0; border-image: none; font: 800 1.25rem/1.2 'DM Sans', sans-serif; color: #fff; text-wrap: balance; }
.g3d h3 { border: 0; border-image: none; padding: 0; }   /* set pages style h2/h3 with a gradient underline */
.g3d-id { margin: 0.35rem 0 0; font-size: 0.8rem; color: var(--text-muted); display: flex; flex-wrap: wrap; gap: 0.35rem; align-items: center; }
.g3d-hero-price { margin-top: 0.75rem; }
.g3d-hero-price b { display: block; font-size: 1.6rem; font-weight: 800; color: var(--g3-yellow); line-height: 1.1; font-variant-numeric: tabular-nums; }
.g3d-hero-price small { font-size: 0.75rem; color: var(--text-muted); }
.g3d-own { margin-top: 0.7rem; display: inline-flex; align-items: center; gap: 0.4rem; font: 700 0.75rem 'DM Sans', sans-serif; letter-spacing: 0.04em; text-transform: uppercase;
           color: var(--text-secondary); background: none; border: 1px solid var(--border-color); border-radius: 99px; padding: 0.4rem 0.75rem; cursor: pointer; }
.g3d-own svg { width: 13px; height: 13px; }
.g3d-own[aria-pressed="true"] { background: var(--g3-green); border-color: var(--g3-green); color: #0a0a0f; }
.g3d h3 { margin: 1.4rem 0 0.55rem; font: 700 0.72rem 'DM Sans', sans-serif; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); }
.g3d-pt { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.g3d-pt th, .g3d-pt td { padding: 0.42rem 0 0.42rem 0.75rem; border-bottom: 1px solid var(--border-color); text-align: right; font-variant-numeric: tabular-nums; }
.g3d-pt th:first-child, .g3d-pt td:first-child { padding-left: 0; }
.g3d-pt th:first-child, .g3d-pt td:first-child { text-align: left; }
.g3d-pt thead th { font-size: 0.7rem; font-weight: 700; color: var(--text-muted); letter-spacing: 0.06em; text-transform: uppercase; }
.g3d-pt tbody th { font-weight: 600; color: var(--text-secondary); }
.g3d-pt td { color: #fff; }
.g3d-pt tr.is-lead td:nth-child(2) { color: var(--g3-yellow); font-weight: 700; }
.g3d-pt tr.cm th, .g3d-pt tr.cm td { color: var(--g3-cm); }
.g3d-pt td small { color: var(--text-muted); font-size: 0.72rem; margin-left: 0.25rem; }
.g3d-warn { font-size: 0.78rem; line-height: 1.5; color: var(--text-secondary); background: rgba(255,225,77,0.07); border-left: 2px solid var(--g3-yellow);
            border-radius: 0 6px 6px 0; padding: 0.45rem 0.6rem; margin: 0.7rem 0 0; }
.g3d-src { font-size: 0.72rem; color: var(--text-muted); margin: 0.45rem 0 0; line-height: 1.5; }
.g3d-trend { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.3rem 0.8rem; align-items: center; background: var(--bg-tertiary);
             border: 1px solid var(--border-color); border-radius: 8px; padding: 0.6rem 0.7rem; margin-top: 0.7rem; }
.g3d-trend svg { width: 100%; height: 44px; display: block; grid-column: 1 / -1; }
.g3d-trend .lbl { font-size: 0.75rem; color: var(--text-muted); }
.g3d-buy-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.4rem; }
.g3d-buy { display: flex; flex-direction: column; align-items: flex-start; gap: 0.1rem; text-decoration: none; background: var(--bg-tertiary);
           border: 1px solid var(--border-color); border-radius: 8px; padding: 0.55rem 0.6rem; min-width: 0; }
.g3d-buy b { font-size: 0.82rem; color: #fff; display: inline-flex; gap: 0.25rem; align-items: center; }
.g3d-buy small { font-size: 0.72rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.g3d-buy:hover { border-color: var(--g3-yellow); }
.g3d-buy.tcg b { color: var(--g3-yellow); }
.g3d-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; margin: 0; border-top: 1px solid var(--border-color); }
.g3d-facts div { padding: 0.45rem 0; border-bottom: 1px solid var(--border-color); min-width: 0; }
.g3d-facts div:nth-child(odd) { padding-right: 0.6rem; }
.g3d-facts dt { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700; }
.g3d-facts dd { margin: 0.1rem 0 0; font-size: 0.85rem; color: #fff; }
.g3d-facts a, .g3d-links a { color: var(--g3-accent); text-decoration: none; }
.g3d-facts a:hover, .g3d-links a:hover { text-decoration: underline; }
.g3d-move { border-bottom: 1px solid var(--border-color); padding: 0.6rem 0; }
.g3d-move-head { display: flex; align-items: center; gap: 0.5rem; }
.g3d-move-head b { flex: 1; color: #fff; font-size: 0.9rem; }
.g3d-move-head em { font-style: normal; font-weight: 800; color: #fff; font-variant-numeric: tabular-nums; }
.g3d-move-kind { font-size: 0.68rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: #0a0a0f; background: var(--accent-fire); border-radius: 4px; padding: 0.08rem 0.35rem; }
.g3d-move p { margin: 0.3rem 0 0; font: 0.84rem/1.55 'DM Sans', system-ui, sans-serif; color: var(--text-secondary); }
.g3d-cost { display: inline-flex; gap: 2px; }
.g3d-cost i { width: 16px; height: 16px; border-radius: 50%; display: inline-grid; place-items: center; font: 800 0.6rem 'DM Sans', sans-serif; font-style: normal; color: #0a0a0f; background: #dfe3ea; }
.g3d-flavor { font: italic 0.84rem/1.6 'DM Sans', system-ui, sans-serif; color: var(--text-muted); margin: 0.8rem 0 0; }
.g3d-links { display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; font-size: 0.82rem; margin-top: 0.6rem; }
.g3d-disc { font-size: 0.72rem; color: var(--text-muted); margin: 0.45rem 0 0; }

/* energy colours (the v2 .tdot palette, reused for cost pips) */
.tdot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; background: #888; }
.t-grass { background: #4ac97e; } .t-fire { background: #ff6b35; } .t-water { background: #4ecdc4; } .t-lightning { background: #ffd93d; }
.t-psychic { background: #c77dff; } .t-fighting { background: #d98a4b; } .t-darkness { background: #6f5aa8; } .t-metal { background: #a9b4c2; }
.t-colourless, .t-colorless { background: #dfe3ea; } .t-dragon { background: #7a9cff; } .t-fairy { background: #ff9ad5; }

/* zoom */
.g3z { position: fixed; inset: 0; z-index: 1002; background: rgba(5,5,10,0.92); display: grid; place-items: center; padding: 1rem; cursor: zoom-out; }
.g3z[hidden] { display: none; }
.g3z img { max-width: min(92vw, 520px); max-height: 88vh; width: auto; height: auto; border-radius: 14px; }

@media (max-width: 768px) {
    .g3-tools { position: static; }
    .g3-row { flex-wrap: wrap; }
    .g3-search { flex-basis: 100%; }
    .g3-select { flex: 1 1 0; min-width: 0; max-width: none; }
    .g3-seg button { padding: 0 0.45rem; min-width: 28px; }
    .g3-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 0.75rem; }
    .g3d { width: 100vw; top: auto; height: 92vh; height: 92dvh; border-left: 0; border-top: 1px solid var(--border-color); border-radius: 16px 16px 0 0;
           transform: translateY(100%); }
    .g3d-top { grid-template-columns: 120px minmax(0, 1fr); }
    .g3d-hero-price b { font-size: 1.35rem; }
}
@media (max-width: 600px) {
    .g3-table { min-width: 0; font-size: 0.8rem; }
    .g3-table .c-rar { display: none; }
    .g3-table .c-card { min-width: 0; max-width: 150px; }
    .g3-table .c-card img { width: 28px; height: 39px; }
    .g3-table .c-card small .art { display: none; }
}
@media (max-width: 380px) {
    .g3-ftoggle span { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    .g3c-art, .g3d, .g3d-scrim { transition: none; }
    .g3c:hover .g3c-art { transform: none; }
}
