/* The Grand Emporium (templates/store.html): moved out of the template's <style> block (SESSION_COST_PLAN Phase 3). */
#em-root {
    --gold: #f5c451; --gold-hi: #fde9a8; --line: rgba(245, 196, 81, .2);
    position: relative; min-height: calc(100vh - 4rem); color: #f4f1ea;
    background:
        radial-gradient(ellipse 55% 38% at 50% 0%, rgba(233, 211, 160, .09), transparent 70%),
        repeating-linear-gradient(45deg, rgba(255,255,255,.012) 0 2px, transparent 2px 4px),
        repeating-linear-gradient(-45deg, rgba(0,0,0,.3) 0 2px, transparent 2px 4px),
        #090a0d;
}
.em-display { font-family: 'Cinzel', 'Playfair Display', serif; }
.em-mono { font-family: 'JetBrains Mono', ui-monospace, monospace; }
.em-kicker { font-family: 'JetBrains Mono', monospace; font-size: 10.5px; letter-spacing: .3em; text-transform: uppercase; color: var(--gold); }
.em-foil { background: linear-gradient(100deg, #fde68a, #f5c451 30%, #fff7d6 48%, #d99a2b 66%, #fde9a8); background-size: 220% 100%;
    -webkit-background-clip: text; background-clip: text; color: transparent; animation: emFoil 7s ease-in-out infinite; }
@keyframes emFoil { 50% { background-position: 100% 0; } }
.em-rule { height: 1px; background: linear-gradient(90deg, transparent, rgba(245,196,81,.45), transparent); }
.em-btn-gold { background: linear-gradient(to bottom, #fcd34d, #f59e0b 55%, #d97706); color: #0a0a0a; font-weight: 900;
    box-shadow: 0 0 18px rgba(245,158,11,.35), inset 0 1px 0 rgba(255,255,255,.55), inset 0 -2px 0 rgba(120,53,15,.45); transition: transform .15s, filter .2s, box-shadow .2s; }
.em-btn-gold:hover:not(:disabled) { transform: translateY(-1px) scale(1.02); filter: brightness(1.08); box-shadow: 0 0 28px rgba(245,158,11,.6), inset 0 1px 0 rgba(255,255,255,.6); }
.em-btn-gold:active:not(:disabled) { transform: scale(.97); }
.em-btn-gold:disabled { filter: grayscale(.7) brightness(.6); cursor: not-allowed; }
.em-btn-ghost { border: 1px solid rgba(245,196,81,.3); color: #e7e5e4; background: rgba(255,255,255,.02); transition: color .2s, border-color .2s, background .2s; }
.em-btn-ghost:hover { color: var(--gold-hi); border-color: rgba(245,196,81,.6); background: rgba(245,196,81,.06); }
.em-link { color: #fcd34d; font-weight: 700; }
.em-link:hover { text-decoration: underline; }

/* ---- the store bar: the five places, the search and the wallet, always in reach ---- */
.em-bar { position: sticky; top: 4rem; z-index: 40; background: rgba(9,10,13,.92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(245,196,81,.16); }
.em-bar-in { max-width: 80rem; margin: 0 auto; padding: .55rem 1rem; display: flex; align-items: center; gap: .75rem; }
.em-brand { display: flex; flex-direction: column; line-height: 1; flex: none; }
.em-brand b { font-family: 'Cinzel', serif; font-weight: 900; font-size: 15px; letter-spacing: .04em; color: #fde68a; }
.em-brand span { font-family: 'JetBrains Mono', monospace; font-size: 8.5px; letter-spacing: .28em; color: #78716c; margin-top: 3px; }
.em-views { display: flex; gap: .2rem; overflow-x: auto; scrollbar-width: none; min-width: 0; }
.em-views::-webkit-scrollbar { display: none; }
.em-views a { font-size: 12.5px; font-weight: 700; padding: .5rem .8rem; border-radius: .7rem; color: #d6d3d1; white-space: nowrap; border: 1px solid transparent; transition: color .2s, background .2s, border-color .2s; }
.em-views a:hover { color: var(--gold-hi); border-color: rgba(245,196,81,.3); }
.em-views a.on { color: #1a1004; background: linear-gradient(180deg, #fde68a, #f5c451); }
.em-views a .em-count { font-family: 'JetBrains Mono', monospace; font-size: 10px; margin-left: .25rem; opacity: .8; }
.em-search { position: relative; flex: 1; min-width: 140px; max-width: 340px; margin-left: auto; }
.em-search input { width: 100%; height: 36px; border-radius: .7rem; padding: 0 2rem 0 2.1rem; font-size: 13px; color: #f4f1ea; background: #050506;
    border: 1px solid #2a2a31; outline: none; }
.em-search input:focus { border-color: rgba(245,196,81,.7); box-shadow: 0 0 0 3px rgba(245,196,81,.12); }
.em-search svg { position: absolute; left: .65rem; top: 50%; width: 15px; height: 15px; transform: translateY(-50%); color: #78716c; pointer-events: none; }
.em-search button { position: absolute; right: .35rem; top: 50%; transform: translateY(-50%); width: 26px; height: 26px; border-radius: 50%; color: #a8a29e; }
.em-search button:hover { color: #fff; background: rgba(255,255,255,.06); }
.em-purse { display: flex; align-items: center; gap: .55rem; flex: none; font-family: 'JetBrains Mono', monospace; font-size: 12.5px; font-weight: 700; }
.em-purse > span { display: inline-flex; align-items: center; gap: .35rem; }
.em-purse .em-add { height: 30px; padding: 0 .7rem; border-radius: .6rem; font-size: 11px; font-weight: 900; letter-spacing: .06em; }
@media (max-width: 1023px) {
    .em-bar-in { flex-wrap: wrap; row-gap: .45rem; }
    .em-brand { display: none; }
    .em-views { order: 3; flex-basis: 100%; }
    .em-search { margin-left: 0; max-width: none; }
}
/* A phone: the top bar and the bottom bar already hold ~16% of the height, so the store bar scrolls with the page
   (search and all) instead of sticking, and its chips balance (the top bar's) goes: only the Bullion stays
   (MOBILE_CLEANUP_PLAN.md phase 2: the fixed chrome takes at most 18%). */
@media (max-width: 767px) {
    .em-bar { position: static; backdrop-filter: none; -webkit-backdrop-filter: none; }
    .em-purse > span[title="Chips"] { display: none; }
}
/* A phone on its side (844 x 340) is wider than 767 px: there the sticky bar took half the screen (launch audit). */
@media (max-height: 500px) {
    .em-bar { position: static; backdrop-filter: none; -webkit-backdrop-filter: none; }
}

/* ---- views: one place on screen at a time ---- */
.em-view[hidden] { display: none !important; }
.em-sec { margin-top: 3.5rem; }
.em-sec-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: .5rem 1rem; margin-bottom: 1.1rem; }
.em-sec-head h2 { font-family: 'Cinzel', serif; font-weight: 900; font-size: clamp(1.25rem, 2.4vw, 1.7rem); line-height: 1.1; margin-top: .3rem; }
.em-sec-head p { color: #a8a29e; font-size: 13px; margin-top: .3rem; max-width: 48rem; }
.em-crumb { display: inline-flex; align-items: center; gap: .35rem; font-size: 12px; font-weight: 700; color: #a8a29e; }
.em-crumb:hover { color: var(--gold-hi); }

/* ---- Bullion packs ---- */
.em-plaque { background: linear-gradient(180deg, rgba(24,24,30,.92), rgba(9,9,12,.95)); border: 1px solid rgba(245,196,81,.3);
    box-shadow: 0 20px 40px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.05); }
.em-pack { position: relative; border-radius: 1rem; padding: 1.5rem 1.25rem 1.25rem; display: flex; flex-direction: column; align-items: center; justify-content: space-between;
    text-align: center; background: linear-gradient(to bottom, #18181b, #09090b 60%, #000); border: 1px solid rgba(245,158,11,.2);
    box-shadow: 0 20px 36px rgba(0,0,0,.5); transition: transform .3s, border-color .3s, box-shadow .3s; }
.em-pack:hover { transform: translateY(-6px); border-color: rgba(251,191,36,.6); box-shadow: 0 30px 50px rgba(0,0,0,.6), 0 0 30px rgba(245,158,11,.12); }
.em-pack.popular { border-color: rgba(251,191,36,.55); box-shadow: 0 20px 40px rgba(0,0,0,.5), 0 0 34px rgba(245,158,11,.22); }
.em-pack.best { border-color: #fbbf24; box-shadow: 0 0 0 2px rgba(251,191,36,.3), 0 24px 48px rgba(0,0,0,.6), 0 0 48px rgba(245,158,11,.3);
    background: linear-gradient(to bottom, rgba(245,158,11,.12), #09090b 55%, #000); }
.em-ribbon { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); white-space: nowrap; font-size: 10px; font-weight: 900; letter-spacing: .08em;
    padding: .3rem .8rem; border-radius: 999px; color: #1a1004; background: linear-gradient(180deg, #fde68a, #f59e0b); box-shadow: 0 4px 14px rgba(245,158,11,.5); }
.em-pack-art { width: 100%; height: 118px; display: grid; place-items: center; }
.em-pack-art svg { height: 110px; width: auto; filter: drop-shadow(0 14px 16px rgba(0,0,0,.65)); transition: transform .4s cubic-bezier(.2,.8,.2,1); }
.em-pack:hover .em-pack-art svg { transform: translateY(-4px) scale(1.05); }
/* Billing off (the beta, app/services/billing.py): the packs stay on show as planned pricing, greyed out. */
.em-pack.planned { filter: grayscale(.8) brightness(.78); border-color: rgba(168,162,158,.2); box-shadow: 0 16px 30px rgba(0,0,0,.45); }
.em-pack.planned:hover { transform: none; border-color: rgba(168,162,158,.3); box-shadow: 0 16px 30px rgba(0,0,0,.45); }
.em-pack.planned:hover .em-pack-art svg { transform: none; }
.em-pack.planned .em-ribbon { background: linear-gradient(180deg, #d6d3d1, #a8a29e); box-shadow: none; }
.em-planned-tag { font-family: 'JetBrains Mono', monospace; font-size: 9.5px; font-weight: 800; letter-spacing: .14em; color: #a8a29e; }
.em-soon { width: 100%; border-radius: .75rem; padding: .75rem; font-size: 12px; font-weight: 800; letter-spacing: .1em; color: #a8a29e;
    border: 1px dashed rgba(168,162,158,.35); background: rgba(0,0,0,.35); cursor: not-allowed; }
.em-beta { border: 1px solid rgba(245,196,81,.28); background: linear-gradient(90deg, rgba(245,158,11,.10), rgba(0,0,0,.25)); }
.em-bonus { font-family: 'JetBrains Mono', monospace; font-size: 10.5px; font-weight: 700; color: #6ee7b7; background: rgba(16,185,129,.1);
    border: 1px solid rgba(16,185,129,.3); border-radius: 999px; padding: .2rem .6rem; }

/* ---- the Teller ---- */
.em-tier-pill { display: inline-flex; align-items: center; height: 22px; padding: 0 10px; border-radius: 999px; font-size: 10.5px; font-weight: 800; letter-spacing: .08em; color: #052e16; background: linear-gradient(180deg, #6ee7b7, #10b981); }
.em-teller-ladder { display: grid; gap: 4px; font-size: 11px; }
.em-teller-ladder div { display: flex; justify-content: space-between; gap: 12px; padding: 4px 10px; border-radius: 8px; color: #78716c; border: 1px solid transparent; }
.em-teller-ladder div.on { color: #fde68a; border-color: rgba(245,158,11,.35); background: rgba(245,158,11,.08); }
.em-teller { background: #09090b; border: 1px solid rgba(245,158,11,.3); box-shadow: 0 30px 60px rgba(0,0,0,.6), inset 0 0 40px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.04); }
.em-window { background: linear-gradient(180deg, #050506, #0d0d10); border: 1px solid rgba(255,255,255,.06); box-shadow: inset 0 8px 24px rgba(0,0,0,.8); }
.em-bars { background: repeating-linear-gradient(90deg, rgba(245,196,81,.12) 0 2px, transparent 2px 26px); }
.em-preset { font-family: 'JetBrains Mono', monospace; font-size: 12px; font-weight: 700; padding: .5rem .85rem; border-radius: .7rem; border: 1px solid rgba(245,196,81,.25);
    color: #e7e5e4; background: rgba(255,255,255,.02); transition: .15s; }
.em-preset:hover:not(:disabled) { border-color: rgba(245,196,81,.6); color: var(--gold-hi); }
.em-preset.on { background: rgba(245,196,81,.14); border-color: #f5c451; color: #fde68a; box-shadow: 0 0 14px rgba(245,196,81,.2); }
.em-preset:disabled { opacity: .35; cursor: not-allowed; }
.em-range { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: 3px; background: linear-gradient(90deg, #f5c451 var(--p, 0%), #27272a var(--p, 0%)); outline: none; }
.em-range::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff4c9, #f5c451 50%, #a36d16); box-shadow: 0 0 0 3px #1a1004, 0 0 12px rgba(245,196,81,.6); cursor: pointer; }
.em-range::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; border: 0; background: #f5c451; box-shadow: 0 0 0 3px #1a1004; cursor: pointer; }
.em-arrow { color: #fbbf24; filter: drop-shadow(0 0 8px rgba(251,191,36,.6)); }
.em-input { background: #050506; border: 1px solid #2a2a31; border-radius: .7rem; padding: .55rem .8rem; color: #fff; font-family: 'JetBrains Mono', monospace; font-weight: 700; outline: none; width: 100%; }
.em-input:focus { border-color: rgba(245,196,81,.7); box-shadow: 0 0 0 3px rgba(245,196,81,.12); }

/* ---- item cards: the preview, the name, the price; everything else is in the detail sheet ---- */
.em-tab { font-size: 12px; font-weight: 700; padding: .45rem .85rem; border-radius: 999px; border: 1px solid rgba(255,255,255,.08); color: #a8a29e; white-space: nowrap; transition: .2s; }
.em-tab:hover { color: #fff; border-color: rgba(245,196,81,.35); }
.em-tab.on { color: #1a1004; background: linear-gradient(180deg, #fde68a, #f5c451); border-color: transparent; }
.em-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); gap: .9rem; }
.em-grid.few { grid-template-columns: repeat(auto-fill, minmax(196px, 240px)); }
.em-item { --rc: #3f3f46; position: relative; border-radius: .9rem; background: rgba(9,9,11,.85); border: 1px solid #27272a; padding: .6rem .6rem .75rem; display: flex; flex-direction: column;
    gap: .6rem; overflow: hidden; transition: border-color .25s, box-shadow .25s, transform .25s; }
.em-item:hover { border-color: color-mix(in srgb, var(--rc) 70%, #f59e0b); box-shadow: 0 0 22px color-mix(in srgb, var(--rc) 22%, transparent); transform: translateY(-2px); }
.em-item.r-rare { --rc: #60a5fa; } .em-item.r-epic { --rc: #c084fc; } .em-item.r-legendary { --rc: #fbbf24; } .em-item.r-mythic { --rc: #fb7185; } .em-item.r-common { --rc: #94a3b8; }
.em-item.own { background: rgba(9,9,11,.7); }
.em-item .em-stage { height: 128px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.05), inset 0 -2px 0 color-mix(in srgb, var(--rc) 55%, transparent), inset 0 10px 30px rgba(0,0,0,.6); }
.em-item .em-rar { position: absolute; left: 6px; top: 6px; z-index: 2; }
.em-item-name { font-weight: 700; color: #f5f5f4; font-size: 13.5px; line-height: 1.25; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; max-width: 100%; }
.em-item-name:hover { color: #fde68a; }
.em-item-meta { display: flex; align-items: center; gap: .35rem; flex-wrap: wrap; font-size: 11px; color: #78716c; min-height: 18px; }
.em-owned-tag { font-size: 10px; font-weight: 900; letter-spacing: .06em; color: #6ee7b7; }
.em-stage { position: relative; height: 110px; border-radius: .7rem; overflow: hidden; display: grid; place-items: center;
    background: radial-gradient(ellipse at 50% 20%, rgba(255,255,255,.05), transparent 70%), #050506; box-shadow: inset 0 0 0 1px rgba(255,255,255,.05), inset 0 10px 30px rgba(0,0,0,.6); }
.em-rar { font-size: 9.5px; font-weight: 900; letter-spacing: .1em; padding: .15rem .5rem; border-radius: 999px;
    box-shadow: 0 0 0 1px rgba(0,0,0,.6), 0 1px 4px rgba(0,0,0,.45); text-shadow: 0 1px 1px rgba(0,0,0,.45); }
/* Near-solid grounds with a dark outline: the chip sits on the item's art, and pale art must not swallow it (11.3). */
.em-rar.common { color: #e2e8f0; background: rgba(51,65,85,.9); }
.em-rar.rare { color: #dbeafe; background: rgba(30,64,175,.88); }
.em-rar.epic { color: #f3e8ff; background: rgba(107,33,168,.88); }
.em-rar.legendary { color: #fde68a; background: rgba(120,53,15,.9); }
.em-rar.mythic { color: #fff1f2; background: linear-gradient(90deg, #be123c, #f59e0b, #be123c); background-size: 200% 100%; animation: emShimmer 3s linear infinite; }
.em-rar.founder { color: #fef3c7; background: rgba(120,53,15,.9); }
@keyframes emShimmer { to { background-position: 200% 0; } }
.em-price { font-family: 'JetBrains Mono', monospace; font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; gap: .3rem; }
.em-price.chips { color: #fde68a; } .em-price.bullion { color: #fcd34d; }
.em-coin { width: 13px; height: 13px; border-radius: 50%; display: inline-block; flex: none; }
.em-coin.chips { background: repeating-conic-gradient(#dc2626 0 20deg, #f5f5f4 20deg 45deg); box-shadow: inset 0 0 0 3px #f5f5f4; }
.em-coin.bullion { border-radius: 2px; width: 15px; height: 9px; clip-path: polygon(15% 0, 85% 0, 100% 100%, 0 100%); background: linear-gradient(180deg, #fff1b0, #e2b44a 50%, #8a5a12); }
.em-cta { width: 100%; font-size: 11px; font-weight: 900; letter-spacing: .04em; padding: .55rem .5rem; border-radius: .6rem; transition: .15s; }
.em-cta.owned { background: #18181b; color: #71717a; border: 1px solid #27272a; cursor: default; }
.em-cta.need { background: rgba(255,255,255,.03); color: #a8a29e; border: 1px dashed rgba(245,196,81,.3); }
.em-cta.need:hover { color: #fde68a; border-color: rgba(245,196,81,.6); }
.em-felt { position: absolute; inset: 10px; border-radius: 50% / 60%; box-shadow: 0 0 0 4px #2b1a0a, 0 0 0 5px #c9a15a; }
.em-se-demo { display: inline-flex; max-width: 100%; min-width: 0; padding: 6px 10px; border-radius: 12px; background: linear-gradient(180deg, #1c1c22, #0e0e12);
    border: 1px solid rgba(245,158,11,.3); box-shadow: 0 6px 16px rgba(0,0,0,.5); cursor: pointer; }
.em-se-hint { position: absolute; bottom: 6px; left: 0; right: 0; text-align: center; font-size: 9.5px; font-weight: 800;
    letter-spacing: .1em; color: #a8a29e; text-transform: uppercase; pointer-events: none; }
/* Card protector: resting on a pair of hole cards. Win celebration: plays over a sample plate. */
.em-cp-demo { position: relative; display: flex; align-items: center; justify-content: center; }
.em-cp-demo .cc-card + .cc-card { margin-left: -26px; }
.em-cp-demo .cp-slot { top: 64%; }
/* A plate in a preview is capped as at the tables (.seat-plate > .np), so a long name ends in an ellipsis (11.4). */
.em-se-demo > .np { max-width: 160px; }
/* Title previews are enlarged, but never past their stage: the pill's text ends in an ellipsis instead (11.4). */
/* (A percentage would resolve against the stage's auto grid track, which the pill itself sizes: the stage is the container.) */
.em-stage:has(> .em-tprev) { container-type: inline-size; }
.em-tprev { --s: 1.2; display: flex; flex-direction: column; align-items: center; gap: .5rem; max-width: calc(100cqw / var(--s) - 12px); transform: scale(var(--s)); }
.em-tprev.big { --s: 1.4; } .em-tprev.pl { --s: 1.25; } .em-tprev.pl.big { --s: 1.5; }
.em-tprev .ins-title { max-width: 100%; }
.em-tprev .ins-title > b { min-width: 0; overflow-x: clip; overflow-y: visible; text-overflow: ellipsis; white-space: nowrap; }
.em-name-prev { font-size: 22px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 .5rem; }

/* ---- overlays ---- */
/* The detail sheet replays seat entrances and win celebrations over its scene: their fixed layers (seat_entrance.js
   .se-fx, win_celebration.js #wc-canvas) sit above the sheet here, not under it as at a table. */
.se-fx, #wc-canvas { z-index: 85 !important; }
.em-overlay { position: fixed; inset: 0; z-index: 80; display: none; align-items: center; justify-content: center; padding: 16px; background: rgba(4,4,6,.78); }
.em-overlay.open { display: flex; }
.em-sheet { width: 100%; max-width: 440px; max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow-y: auto; border-radius: 1.2rem; position: relative;
    background: linear-gradient(180deg, #16171d, #0b0b0e); border: 1px solid rgba(245,196,81,.35);
    box-shadow: 0 40px 80px rgba(0,0,0,.7), 0 0 50px rgba(245,196,81,.1); animation: emIn .35s cubic-bezier(.2,1.2,.3,1); }
@keyframes emIn { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }
.em-row { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: .45rem 0; font-size: .85rem; }
.em-row span:last-child { font-family: 'JetBrains Mono', monospace; font-weight: 700; }
.em-x { position: absolute; top: .7rem; right: .7rem; width: 32px; height: 32px; border-radius: 50%; color: #a8a29e; display: grid; place-items: center; }
.em-x:hover { background: rgba(255,255,255,.06); color: #fff; }
#em-toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); opacity: 0; z-index: 90; transition: .3s; pointer-events: none;
    background: #111114; border: 1px solid rgba(245,196,81,.4); color: #fde68a; padding: .7rem 1.1rem; border-radius: .8rem; font-size: 13px; font-weight: 600; box-shadow: 0 20px 40px rgba(0,0,0,.6); max-width: calc(100vw - 32px); }
#em-toast.show { opacity: 1; transform: translateX(-50%); }
#em-toast.bad { color: #fda4af; border-color: rgba(244,63,94,.45); }

/* ---- seen-by, wishlist, Collections tags ---- */
.em-seen { display: inline-flex; align-items: center; gap: 4px; font-size: 10.5px; color: #a8a29e; }
.em-worn-at { font-size: 10.5px; color: #d6c29a; }
.em-seen i { font-style: normal; opacity: .8; }
.em-heart { position: absolute; top: 1rem; right: 1rem; z-index: 3; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
    font-size: 14px; line-height: 1; color: #d6d3d1; background: rgba(0,0,0,.78); border: 1px solid rgba(255,255,255,.14); box-shadow: 0 1px 4px rgba(0,0,0,.45); transition: color .15s, transform .15s, border-color .15s; }
.em-heart:hover { color: #fda4af; border-color: rgba(253,164,175,.5); transform: scale(1.08); }
.em-heart.on { color: #fb7185; border-color: rgba(251,113,133,.55); background: rgba(76,5,25,.6); }
.em-open { cursor: zoom-in; }
.em-col-tag { font-size: 10px; font-weight: 800; letter-spacing: .04em; color: var(--acc, #fde68a); border: 1px solid color-mix(in srgb, var(--acc, #fde68a) 45%, transparent);
    border-radius: 999px; padding: .05rem .45rem; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
button.em-col-tag:hover { background: color-mix(in srgb, var(--acc, #fde68a) 14%, transparent); }
.em-meter { height: 6px; border-radius: 999px; background: #1c1c22; overflow: hidden; }
.em-meter > i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, color-mix(in srgb, var(--acc) 60%, #000), var(--acc)); }
.em-tier { font-size: 9.5px; font-weight: 900; letter-spacing: .14em; padding: .2rem .55rem; border-radius: 999px; text-transform: uppercase; background: rgba(0,0,0,.55); border: 1px solid rgba(255,255,255,.14); }
.em-tier.rare { color: #bfdbfe; } .em-tier.epic { color: #e9d5ff; } .em-tier.legendary { color: #fde68a; }

/* ---- the Front Hall (home) ---- */
.em-hero { position: relative; overflow: hidden; border-radius: 1.4rem; min-height: 340px; border: 1px solid color-mix(in srgb, var(--acc) 40%, transparent);
    background: #07070a; box-shadow: 0 30px 60px rgba(0,0,0,.5); }
.em-hero-art { position: absolute; inset: 0; z-index: 0; }
.em-hero-art::after { content: ''; position: absolute; inset: 0; z-index: 31;
    background: linear-gradient(90deg, rgba(7,7,10,.96) 0%, rgba(7,7,10,.86) 38%, rgba(7,7,10,.25) 75%, rgba(7,7,10,.1)),
                linear-gradient(0deg, rgba(7,7,10,.8), transparent 45%); }
.em-hero-in { position: relative; z-index: 2; padding: clamp(1.25rem, 3vw, 2.5rem); max-width: 40rem; display: flex; flex-direction: column; gap: .9rem; }
.em-hero h1 { font-family: 'Cinzel', serif; font-weight: 900; font-size: clamp(2rem, 5vw, 3.6rem); line-height: .95; text-shadow: 0 4px 24px rgba(0,0,0,.6); }
.em-minis { display: flex; gap: .45rem; flex-wrap: wrap; }
.em-mini { position: relative; width: 64px; flex: none; display: flex; flex-direction: column; gap: 3px; border-radius: .6rem; padding: 3px; border: 1px solid #27272a; background: rgba(0,0,0,.45); transition: border-color .2s, transform .2s; }
.em-mini:hover { border-color: color-mix(in srgb, var(--acc, #f5c451) 60%, transparent); transform: translateY(-1px); }
.em-mini.own { border-color: color-mix(in srgb, var(--acc, #f5c451) 55%, transparent); }
.em-mini.own::after { content: '✓'; position: absolute; top: 5px; right: 5px; width: 15px; height: 15px; border-radius: 50%; display: grid; place-items: center;
    font-size: 9px; font-weight: 900; color: #052e16; background: #6ee7b7; z-index: 3; }
.em-mini .em-stage { height: 52px; border-radius: .45rem; }
.em-mini .em-stage > :not(.absolute):not(span) { transform: scale(.5); }
.em-mini-more { display: grid; place-items: center; width: 64px; height: 60px; border-radius: .6rem; border: 1px dashed #3f3f46; color: #a8a29e; font-size: 12px; font-weight: 800; }
.em-mini-more:hover { color: var(--gold-hi); border-color: rgba(245,196,81,.5); }
.em-cats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .9rem; }
.em-cat { position: relative; overflow: hidden; border-radius: 1rem; border: 1px solid #27272a; background: linear-gradient(180deg, #121217, #09090b); text-align: left;
    display: flex; flex-direction: column; transition: border-color .25s, transform .25s; }
.em-cat:hover { border-color: rgba(245,196,81,.5); transform: translateY(-2px); }
.em-cat .em-stage { height: 120px; border-radius: 0; box-shadow: inset 0 -1px 0 rgba(255,255,255,.06); }
.em-cat-b { padding: .75rem .9rem .9rem; }
.em-cat-b b { display: block; font-family: 'Cinzel', serif; font-weight: 900; font-size: 15px; color: #fde68a; }
.em-cat-b span { display: block; font-size: 11.5px; color: #a8a29e; margin-top: .2rem; }
.em-cat-b i { display: block; font-style: normal; font-family: 'JetBrains Mono', monospace; font-size: 10.5px; color: #78716c; margin-top: .45rem; }
.em-go { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1rem; }
.em-goal { position: relative; border-radius: 1rem; padding: 1rem; display: flex; flex-direction: column; gap: .7rem;
    border: 1px solid color-mix(in srgb, var(--acc) 35%, #27272a);
    background: radial-gradient(ellipse 90% 80% at 100% 0%, color-mix(in srgb, var(--acc) 13%, transparent), transparent 70%), linear-gradient(180deg, #121217, #09090b); }
.em-wallet-strip { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; border-radius: 1rem; padding: 1rem 1.25rem;
    border: 1px solid rgba(245,196,81,.25); background: linear-gradient(90deg, rgba(245,158,11,.08), rgba(0,0,0,.25)); }

/* ---- Collections & Bundles ---- */
.em-sets { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1rem; }
.em-col { position: relative; overflow: hidden; border-radius: 1.1rem; display: flex; flex-direction: column;
    border: 1px solid color-mix(in srgb, var(--acc) 35%, #27272a);
    background: radial-gradient(ellipse 90% 70% at 100% 0%, color-mix(in srgb, var(--acc) 14%, transparent), transparent 70%), linear-gradient(180deg, #121217, #09090b); }
.em-col.done { box-shadow: 0 0 0 1px color-mix(in srgb, var(--acc) 50%, transparent), 0 0 30px color-mix(in srgb, var(--acc) 18%, transparent); }
.em-set { transition: transform .25s, border-color .25s; }
.em-set:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--acc) 65%, transparent); }
.em-set-art { position: relative; display: block; width: 100%; height: 150px; overflow: hidden; background: #07070a; text-align: left; }
.em-set-art::after { content: ''; position: absolute; inset: 0; z-index: 31; background: linear-gradient(0deg, rgba(9,9,11,.97), rgba(9,9,11,.2) 65%, rgba(9,9,11,.35)); }
.em-set-art > .em-set-head { position: absolute; left: 0; right: 0; bottom: 0; z-index: 32; padding: .8rem 1rem; display: flex; align-items: flex-end; gap: .7rem; }
.em-set-art > .em-tier { position: absolute; left: .75rem; top: .7rem; z-index: 32; }
.em-set-art > .em-set-n { position: absolute; right: .75rem; top: .7rem; z-index: 32; font-family: 'JetBrains Mono', monospace; font-size: 11px; font-weight: 700; color: #e7e5e4;
    background: rgba(0,0,0,.55); border-radius: 999px; padding: .15rem .55rem; }
.em-col-icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-size: 20px; flex: none;
    color: var(--acc); background: color-mix(in srgb, var(--acc) 16%, #0a0a0c); border: 1px solid color-mix(in srgb, var(--acc) 45%, transparent); }
.em-set-b { padding: .85rem 1rem 1rem; display: flex; flex-direction: column; gap: .65rem; flex: 1; }
.em-pieces { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: .5rem; }
.em-piece { position: relative; display: flex; flex-direction: column; gap: 4px; text-align: left; border-radius: .7rem; padding: 4px; border: 1px solid #27272a; background: rgba(0,0,0,.35); transition: border-color .2s, transform .2s; }
.em-piece:hover { border-color: color-mix(in srgb, var(--acc) 60%, transparent); transform: translateY(-1px); }
.em-piece.own { border-color: color-mix(in srgb, var(--acc) 55%, transparent); }
.em-piece.own::after { content: '✓'; position: absolute; top: 6px; right: 6px; width: 17px; height: 17px; border-radius: 50%; display: grid; place-items: center;
    font-size: 10px; font-weight: 900; color: #052e16; background: #6ee7b7; }
.em-piece-name { font-size: 10px; font-weight: 700; color: #d6d3d1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 2px 2px; }
.em-stage.mini { height: 70px; border-radius: .55rem; }
.em-stage.mini > :not(.absolute):not(span) { transform: scale(.62); }
.em-reward { display: flex; align-items: center; gap: .9rem; padding: .7rem; border-radius: .9rem; border: 1px solid color-mix(in srgb, var(--acc) 30%, transparent); background: rgba(0,0,0,.35); }
.em-reward .em-stage { width: 96px; flex: none; }
.em-reward.locked .em-stage { filter: grayscale(.55) brightness(.7); }
/* Emotes: a square the emote plays in (static/js/emotes/kit.js sizes it by its width; a span, so the mini tiles don't
   scale it), the packs (Jokers Wild spans both columns, its 33 pieces as small thumbnails). */
.em-emo { position: relative; display: grid; place-items: center; width: 92px; height: 92px; }
.em-emo > img { width: 100%; height: 100%; pointer-events: none; }
.em-emo.big { width: 128px; height: 128px; }
.em-emo.sm { width: 58px; height: 58px; }
.em-packs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 1rem; }
.em-packs-grid .em-col { padding: 1.25rem; gap: 1rem; }
.em-col.wide { grid-column: 1 / -1; }
.em-pieces.tight { grid-template-columns: repeat(auto-fill, minmax(54px, 1fr)); gap: .35rem; }
.em-pieces.tight .em-piece-name { display: none; }
.em-pieces.tight .em-stage.mini { height: 50px; }
.em-pieces.tight .em-emo.sm { width: 44px; height: 44px; }
.em-off { font-size: 10px; font-weight: 900; letter-spacing: .08em; color: #052e16; background: var(--acc); border-radius: 999px; padding: .1rem .5rem; white-space: nowrap; }
.em-subnav { display: flex; gap: .4rem; flex-wrap: wrap; }
.em-subnav a { font-size: 12px; font-weight: 700; padding: .4rem .8rem; border-radius: 999px; border: 1px solid rgba(255,255,255,.1); color: #d6d3d1; }
.em-subnav a:hover { color: var(--gold-hi); border-color: rgba(245,196,81,.4); }

/* ---- a Collection's own page ---- */
.em-cp-hero { position: relative; overflow: hidden; border-radius: 1.4rem; border: 1px solid color-mix(in srgb, var(--acc) 40%, transparent); background: #07070a; }
.em-cp-hero .em-hero-art::after { background: linear-gradient(90deg, rgba(7,7,10,.95), rgba(7,7,10,.7) 50%, rgba(7,7,10,.35)), linear-gradient(0deg, rgba(7,7,10,.85), transparent 50%); }
.em-cp-in { position: relative; z-index: 2; display: grid; gap: 1.25rem; padding: clamp(1.25rem, 3vw, 2.25rem); grid-template-columns: minmax(0, 1fr) minmax(0, 360px); align-items: end; }
.em-reward-panel { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 1.5rem; padding: 1rem; border-radius: 1.2rem;
    border: 1px solid color-mix(in srgb, var(--acc) 35%, #27272a); background: radial-gradient(ellipse 80% 90% at 100% 0%, color-mix(in srgb, var(--acc) 12%, transparent), transparent 70%), #0b0b0f; }
.em-reward-panel > .em-stage { height: 280px; width: 100%; }
@media (max-width: 860px) { .em-reward-panel { grid-template-columns: 1fr; } .em-reward-panel > .em-stage { height: 200px; } }
.em-buybox { border-radius: 1.1rem; padding: 1.1rem; display: flex; flex-direction: column; gap: .7rem; background: rgba(9,9,12,.88); border: 1px solid color-mix(in srgb, var(--acc) 40%, transparent);
    box-shadow: 0 20px 40px rgba(0,0,0,.5); }
@media (max-width: 860px) { .em-cp-in { grid-template-columns: 1fr; } }

/* ---- Browse: the aisles down the side, the filters over the grid ---- */
.em-browse { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 1.75rem; align-items: start; }
.em-side { position: sticky; top: 8.5rem; max-height: calc(100vh - 9.5rem); max-height: calc(100dvh - 9.5rem); overflow-y: auto; display: flex; flex-direction: column; gap: 2px; padding-right: .25rem; }
.em-side button { display: flex; align-items: center; justify-content: space-between; gap: .5rem; width: 100%; text-align: left; padding: .4rem .6rem; border-radius: .55rem;
    font-size: 12.5px; color: #a8a29e; transition: color .15s, background .15s; }
.em-side button:hover { color: #fff; background: rgba(255,255,255,.04); }
.em-side button.on { color: #1a1004; background: linear-gradient(180deg, #fde68a, #f5c451); font-weight: 800; }
.em-side button.on i { color: #3b2a06; }
.em-side button i { font-style: normal; font-family: 'JetBrains Mono', monospace; font-size: 10.5px; color: #57534e; }
.em-side .em-aisle-b { font-weight: 800; color: #e7e5e4; margin-top: .6rem; }
.em-side .em-slot-b { padding-left: 1.1rem; }
.em-side hr { border: 0; border-top: 1px solid #27272a; margin: .6rem 0; }
.em-mob { display: none; }
.em-rowscroll { display: flex; gap: .4rem; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.em-rowscroll::-webkit-scrollbar { display: none; }
.em-rowscroll .em-tab { font-size: 11.5px; }
.em-rowscroll .em-tab i { font-style: normal; font-family: 'JetBrains Mono', monospace; font-size: 10px; opacity: .7; margin-left: .2rem; }
@media (max-width: 1023px) {
    .em-browse { grid-template-columns: 1fr; gap: 1rem; }
    .em-side { display: none; }
    .em-mob { display: flex; flex-direction: column; gap: .5rem; }
}
.em-tools { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; padding: .6rem; border-radius: .9rem; border: 1px solid #1f1f24; background: rgba(0,0,0,.3); }
.em-select { height: 32px; border-radius: .6rem; padding: 0 .6rem; font-size: 12px; font-weight: 700; color: #e7e5e4; background: #0b0b0e; border: 1px solid #2a2a31; outline: none; max-width: 100%; }
.em-select:focus { border-color: rgba(245,196,81,.6); }
.em-chip { height: 30px; padding: 0 .65rem; border-radius: 999px; font-size: 11px; font-weight: 800; letter-spacing: .04em; color: #a8a29e; border: 1px solid #2a2a31; transition: .15s; }
.em-chip:hover { color: #fff; border-color: rgba(245,196,81,.35); }
.em-chip.on { color: #1a1004; background: #fde68a; border-color: #fde68a; }
.em-chip.r-rare.on { background: #93c5fd; border-color: #93c5fd; } .em-chip.r-epic.on { background: #d8b4fe; border-color: #d8b4fe; }
.em-chip.r-legendary.on { background: #fcd34d; border-color: #fcd34d; } .em-chip.r-mythic.on { background: #fda4af; border-color: #fda4af; }
/* Phones: the sort and a Filters button; the rest folds open under it. */
.em-ftoggle { display: none; }
@media (max-width: 1023px) {
    .em-ftoggle { display: inline-block; }
    .em-tools:not(.open) > :not(#em-sort):not(.em-ftoggle) { display: none; }
}
.em-check { display: inline-flex; align-items: center; gap: .4rem; font-size: 12px; color: #a8a29e; cursor: pointer; user-select: none; white-space: nowrap; }
.em-tools-sep { width: 1px; height: 22px; background: #27272a; }
.em-aisle-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .5rem 1rem; margin: 2rem 0 .9rem; }
.em-aisle-head:first-child { margin-top: 0; }
.em-strip { display: flex; gap: .75rem; overflow-x: auto; scrollbar-width: thin; padding-bottom: 4px; }
.em-bundle-chip { flex: none; width: 250px; border-radius: .9rem; padding: .8rem; display: flex; flex-direction: column; gap: .5rem;
    border: 1px solid color-mix(in srgb, var(--acc) 40%, #27272a); background: radial-gradient(ellipse 90% 90% at 100% 0%, color-mix(in srgb, var(--acc) 14%, transparent), transparent 70%), #0d0d11; }
.em-note { border-radius: .9rem; padding: .75rem 1rem; font-size: 12.5px; color: #d6d3d1; border: 1px solid rgba(245,196,81,.2); background: rgba(245,158,11,.05); }
.em-reach { border: 1px dashed rgba(251,113,133,.35); background: rgba(76,5,25,.18); }

/* Detail sheet + scenes */
.em-sheet.wide { max-width: 960px; }
.em-dt { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); }
.em-scene { position: relative; min-height: 380px; overflow: hidden; border-radius: 1.2rem 0 0 1.2rem; background: #050506; }
.em-scene .em-pb-card { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); width: 72%; z-index: 2; padding: 14px 18px 18px;
    border-radius: 14px 14px 0 0; background: linear-gradient(180deg, #121217, #0b0b0f); border: 1px solid rgba(212,175,55,.25); border-bottom: 0; }
.em-scene .em-pb-states { position: absolute; right: 10px; top: 8px; z-index: 3; display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.em-scene .em-pb-states button { height: 22px; padding: 0 8px; border-radius: 999px; font-size: 10px; font-weight: 700; color: #e7e5e4;
    background: rgba(0,0,0,.55); border: 1px solid rgba(255,255,255,.18); }
.em-scene .em-pb-states button[aria-pressed="true"] { color: #1a1206; background: #f2cf6b; border-color: #f2cf6b; }
.em-scene .em-lbl { position: absolute; left: 12px; top: 10px; z-index: 3; font-family: 'JetBrains Mono', monospace; font-size: 9.5px; letter-spacing: .2em; color: rgba(253,230,138,.75); text-transform: uppercase; }
.em-scene .em-replay { position: absolute; right: 12px; bottom: 12px; z-index: 4; font-size: 11px; font-weight: 800; letter-spacing: .08em; padding: .4rem .75rem; border-radius: 999px;
    color: #fde68a; background: rgba(0,0,0,.6); border: 1px solid rgba(245,196,81,.35); }
.em-scene .em-replay:hover { border-color: rgba(245,196,81,.7); }
/* the card back as Video Poker's screen shows it (the discards, face down, before the draw turns them) */
.em-scene .em-vp { position: absolute; left: 12px; bottom: 12px; z-index: 4; display: flex; flex-direction: column; gap: 4px; padding: 6px 8px 8px;
    border-radius: 8px; background: radial-gradient(130% 120% at 50% 30%, #1530c4, #0d22a8 55%, #040b52); box-shadow: 0 0 0 2px #c3cad8, 0 8px 18px rgba(0,0,0,.5); }
.em-scene .em-vp > span { font-family: 'JetBrains Mono', monospace; font-size: 8.5px; letter-spacing: .18em; text-transform: uppercase; color: #ffe838; }
.em-scene .em-vp > div { display: flex; gap: 4px; }
/* House Hold'em's board (the card back as played there): five down on the felt, in the other corner */
.em-scene .em-vp.em-hh { left: auto; right: 12px; background: radial-gradient(130% 120% at 50% 30%, #1b6b4a, #0f4a33 55%, #062618);
    box-shadow: 0 0 0 2px rgba(168,116,28,.75), 0 8px 18px rgba(0,0,0,.5); }
.em-scene .em-vp.em-hh > div { gap: 3px; }
.em-dice3d { position: absolute; inset: 0 0 28%; pointer-events: none; }
.em-tbl { position: absolute; inset: 0; display: grid; grid-template-rows: 1fr auto; place-items: center; padding: 30px 16px 18px; }
.em-dealer { display: flex; gap: 6px; }
.em-mine { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.em-mine-row { display: flex; align-items: flex-end; gap: 18px; }
.em-spot-ring { width: 74px; height: 74px; border-radius: 50%; display: grid; place-items: center; border: 2px dashed color-mix(in srgb, var(--trim, #f59e0b) 60%, transparent);
    box-shadow: inset 0 6px 16px rgba(0,0,0,.45), 0 0 0 4px rgba(0,0,0,.18); }
.em-pile { position: relative; width: 42px; height: 56px; }
.em-pile > .cch-chip { position: absolute; left: 0; }
.em-hole { position: relative; display: flex; }
.em-hole .cc-card + .cc-card { margin-left: -24px; }
.em-hole .cp-slot { top: 62%; }
.em-rows { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; gap: 14px; padding: 34px 22px 22px;
    background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(245,196,81,.08), transparent 70%), linear-gradient(180deg, #111116, #060608); }
.em-row-lbl { font-family: 'JetBrains Mono', monospace; font-size: 9px; letter-spacing: .2em; color: #78716c; text-transform: uppercase; margin-bottom: 5px; }
.em-felt-strip { border-radius: 14px; padding: 10px 12px; display: flex; justify-content: center; border: 1px solid rgba(255,255,255,.06); }
.em-chat { border-radius: 12px; padding: 8px 10px; background: #0c0d12; border: 1px solid rgba(245,196,81,.15); }
.em-chat { min-width: 0; }
.em-chat .em-chat-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.em-chat .em-chat-head > .np { max-width: min(100%, 220px); }
.em-chat p { margin: 4px 0 0 28px; font-size: 12.5px; color: #d6d3d1; }
.em-bubbles { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; max-width: 280px; }
.em-toggle { display: flex; align-items: center; justify-content: space-between; gap: .75rem; width: 100%; padding: .65rem .8rem; border-radius: .8rem;
    border: 1px solid rgba(255,255,255,.08); background: rgba(255,255,255,.02); font-size: 12.5px; font-weight: 700; color: #e7e5e4; text-align: left; }
.em-toggle:hover { border-color: rgba(245,196,81,.4); }
.em-toggle .sw { flex: none; width: 34px; height: 20px; border-radius: 999px; background: #27272a; position: relative; transition: background .2s; }
.em-toggle .sw::after { content: ''; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: #a8a29e; transition: transform .2s, background .2s; }
.em-toggle[aria-pressed="true"] { border-color: rgba(245,196,81,.5); background: rgba(245,196,81,.07); }
.em-toggle[aria-pressed="true"] .sw { background: #b45309; }
.em-toggle[aria-pressed="true"] .sw::after { transform: translateX(14px); background: #fde68a; }
.em-toggle.wish[aria-pressed="true"] { border-color: rgba(251,113,133,.5); background: rgba(76,5,25,.25); }
.em-toggle.wish[aria-pressed="true"] .sw { background: #be123c; }
.em-look-set { border-radius: .9rem; padding: .8rem; border: 1px solid color-mix(in srgb, var(--acc) 35%, transparent); background: rgba(0,0,0,.3); display: flex; flex-direction: column; gap: .55rem; }
/* The fitting room: what you are trying on, until you leave the store. */
#em-fit { position: fixed; right: 16px; bottom: 16px; z-index: 70; display: none; align-items: center; gap: .5rem; padding: .45rem .5rem .45rem .9rem; border-radius: 999px;
    background: #111114; border: 1px solid rgba(245,196,81,.45); box-shadow: 0 20px 40px rgba(0,0,0,.6), 0 0 24px rgba(245,196,81,.15); font-size: 12px; color: #fde68a; max-width: calc(100vw - 32px); }
#em-fit.show { display: flex; }
#em-fit button { font-size: 11px; font-weight: 800; letter-spacing: .06em; padding: .4rem .75rem; border-radius: 999px; white-space: nowrap; }
.em-tried { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .45rem .6rem; border-radius: .7rem; border: 1px solid #27272a; font-size: 12px; }
@media (max-width: 767px) {
    .em-dt { grid-template-columns: 1fr; }
    .em-scene { min-height: 290px; border-radius: 1.2rem 1.2rem 0 0; }
    .em-scene .em-replay { bottom: auto; top: 34px; }
    /* Where a name shows: the rows fill the scene, so the replay sits on the label's line, clear of the seat plate (11.4). */
    .em-scene > .em-rows ~ .em-replay { top: 6px; }
    .em-scene:has(> .em-rows) { min-height: 350px; }
    #em-fit { left: 16px; right: 16px; justify-content: space-between; }
    .em-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
    .em-grid.few { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .em-item .em-stage { height: 112px; }
    .em-sets, .em-packs-grid, .em-go { grid-template-columns: 1fr; }
    .em-cats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
    .em-cat .em-stage { height: 92px; }
    .em-hero { min-height: 0; }
}

html.calm-motion .em-foil, html.calm-motion .em-rar.mythic { animation: none; }
html.calm-motion .em-pack, html.calm-motion .em-item, html.calm-motion .em-pack-art svg, html.calm-motion .em-piece, html.calm-motion .em-heart,
    html.calm-motion .em-set, html.calm-motion .em-cat, html.calm-motion .em-mini { transition: none; }

/* Out of view (COMFORT_AND_PERFORMANCE_PLAN.md phase 3 step 5): a long view is hundreds of cards, each previewing its
   cosmetic with its own loops. A card or collection out of view is not rendered (content-visibility; it holds its
   height, remembered once seen; never a width, which would widen a one-column grid; both already clip, so nothing
   on screen changes) and every loop in a card out of view holds still (.em-held, set by holdOffscreen()), so only
   what is on screen animates. Only the view on screen is in the page at all (render()). */
.em-item { content-visibility: auto; contain-intrinsic-block-size: auto 250px; }
.em-col { content-visibility: auto; contain-intrinsic-block-size: auto 420px; }
.em-held, .em-held::before, .em-held::after, .em-held *, .em-held *::before, .em-held *::after { animation-play-state: paused !important; }
/* Low graphics (COMFORT_AND_PERFORMANCE_PLAN.md 7; SceneLoop holds the infinite loops on their first frame): the big
   soft shadows become one small one and the glow filters go; the highlight rings and borders that mark a state stay. */
html.gfx-low .em-plaque, html.gfx-low .em-pack, html.gfx-low .em-pack:hover, html.gfx-low .em-pack.popular, html.gfx-low .em-teller,
    html.gfx-low .em-hero, html.gfx-low .em-buybox { box-shadow: 0 2px 6px rgba(0,0,0,.5); }
html.gfx-low .em-pack.best { box-shadow: 0 0 0 2px rgba(251,191,36,.3), 0 2px 6px rgba(0,0,0,.5); }
html.gfx-low .em-pack:hover, html.gfx-low .em-pack:hover .em-pack-art svg, html.gfx-low .em-item:hover, html.gfx-low .em-set:hover, html.gfx-low .em-cat:hover { transform: none; }
html.gfx-low .em-item:hover { box-shadow: none; }
html.gfx-low .em-pack-art svg, html.gfx-low .em-arrow { filter: none; }
html.gfx-low .em-bar { backdrop-filter: none; -webkit-backdrop-filter: none; background: #0a0b0e; }
