/* ═══════════════════════════════════════════════════════════════════════════
   Customer club in the store (/account/club), played like a game.
   A colourful layer on the redesign: tier colours (bronze, silver, gold, platinum) run the player card and the
   map; a candy palette (violet, pink, amber, cyan, lime) gives chests, missions and badges their own colour.
   Scoped to .cq; motion stops under prefers-reduced-motion.
   ═══════════════════════════════════════════════════════════════════════════ */

.cq {
    --cq-violet: #7c3aed;
    --cq-pink: #ec4899;
    --cq-amber: #f59e0b;
    --cq-cyan: #06b6d4;
    --cq-lime: #65a30d;
    --cq-orange: #f97316;
    --cq-night: #120b24;
    --cq-text: var(--rb-text, #18211d);
    --cq-muted: var(--rb-muted, #67736d);
    --cq-line: var(--rb-line, #e1e6e2);
    --cq-r: 22px;
    --cq-bold: font-bold, tahoma, serif;
    --cq-black: font-extra-bold, tahoma, serif;
    --cq-pop: cubic-bezier(.34, 1.56, .64, 1);
    display: grid;
    gap: 1.6rem;
    padding-bottom: 2rem;
    color: var(--cq-text);
}

/* Tier colours: a deep and a light shade, plus the gradient the card and medals use. */
.cq .tier-bronze, .cq-hero.tier-bronze { --t1: #7c2d12; --t2: #ea580c; --t3: #fdba74; }
.cq .tier-silver, .cq-hero.tier-silver { --t1: #1e293b; --t2: #64748b; --t3: #e2e8f0; }
.cq .tier-gold, .cq-hero.tier-gold { --t1: #78350f; --t2: #d97706; --t3: #fde68a; }
.cq .tier-platinum, .cq-hero.tier-platinum { --t1: #312e81; --t2: #7c3aed; --t3: #67e8f9; }
.cq [class*="tier-"] { --t-grad: linear-gradient(135deg, var(--t1, #14532d), var(--t2, #16a34a) 55%, var(--t3, #bbf7d0)); }

/* ── Buttons ── */
.cq-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
    min-height: 46px; padding: .7rem 1.4rem; border: 0; border-radius: 999px;
    font-family: var(--cq-bold); font-size: .95rem; line-height: 1; color: #fff; text-decoration: none; cursor: pointer;
    background: linear-gradient(135deg, var(--cq-violet), var(--cq-pink));
    box-shadow: 0 10px 24px -10px color-mix(in srgb, var(--cq-pink) 70%, transparent);
    transition: transform .2s var(--cq-pop), box-shadow .2s, filter .2s;
}
.cq-btn:hover { color: #fff; transform: translateY(-2px) scale(1.02); filter: saturate(1.15); }
.cq-btn:active { transform: translateY(0) scale(.97); }
.cq-btn:focus-visible { outline: 3px solid color-mix(in srgb, var(--cq-violet) 45%, #fff); outline-offset: 3px; }
.cq-btn-lg { min-height: 56px; padding: .9rem 1.8rem; font-size: 1.05rem; }
.cq-btn-sm { min-height: 36px; padding: .45rem 1rem; font-size: .85rem; }
.cq-btn-ghost { color: var(--cq-text); background: #f1edf9; box-shadow: none; }
.cq-btn-ghost:hover { color: var(--cq-text); }
.cq-btn-glow { background: linear-gradient(135deg, #f59e0b, #f97316 50%, #ec4899); animation: cq-pulse 1.8s ease-in-out infinite; }
@keyframes cq-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(249, 115, 22, .55); } 60% { box-shadow: 0 0 0 10px rgba(249, 115, 22, 0); } }

/* ── Section frame ── */
.cq-sec { display: grid; gap: 1rem; }
.cq-sec-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .25rem 1rem; }
.cq-sec-head h2 { display: flex; align-items: center; gap: .5rem; margin: 0; font-family: var(--cq-black); font-size: 1.3rem; }
.cq-sec-head h2 .ti {
    display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; font-size: 1.25rem; color: #fff;
    background: linear-gradient(135deg, var(--cq-violet), var(--cq-cyan));
    box-shadow: 0 8px 18px -8px var(--cq-violet);
}
.cq-sec-head p { margin: 0; color: var(--cq-muted); font-size: .9rem; }
.cq-more { margin: 0; text-align: center; }
.cq-more a { display: inline-flex; align-items: center; gap: .35rem; font-family: var(--cq-bold); color: var(--cq-violet); }
.cq-empty { display: grid; justify-items: center; gap: .4rem; padding: 1.6rem; border: 2px dashed var(--cq-line); border-radius: var(--cq-r); color: var(--cq-muted); text-align: center; }
.cq-empty .ti { font-size: 2rem; color: var(--cq-violet); }
.cq-empty p { margin: 0; }

/* ══ Player card ══ */
.cq-hero {
    position: relative; isolation: isolate; overflow: hidden;
    display: grid; grid-template-columns: 1.3fr 1fr; grid-template-areas: "player score" "xp xp" "wallets wallets";
    gap: 1.4rem 2rem; padding: 2rem;
    border-radius: 28px; color: #fff;
    background: radial-gradient(120% 140% at 100% 0%, color-mix(in srgb, var(--t2) 55%, var(--cq-night)) 0%, var(--cq-night) 60%);
    box-shadow: 0 30px 60px -30px color-mix(in srgb, var(--t2) 70%, #000);
}
.cq-hero-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.cq-hero-bg span { position: absolute; border-radius: 50%; filter: blur(48px); opacity: .55; animation: cq-drift 14s ease-in-out infinite alternate; }
.cq-hero-bg span:nth-child(1) { width: 320px; height: 320px; top: -120px; left: -60px; background: var(--cq-pink); }
.cq-hero-bg span:nth-child(2) { width: 260px; height: 260px; bottom: -120px; left: 35%; background: var(--cq-cyan); animation-delay: -5s; }
.cq-hero-bg span:nth-child(3) { width: 240px; height: 240px; top: -80px; right: 20%; background: var(--t2); animation-delay: -9s; }
@keyframes cq-drift { to { transform: translate(40px, 30px) scale(1.15); } }
.cq-hero::after { /* fine sparkle grid */
    content: ""; position: absolute; inset: 0; z-index: -1; opacity: .18;
    background-image: radial-gradient(rgba(255, 255, 255, .7) 1px, transparent 1.5px); background-size: 22px 22px;
    mask-image: linear-gradient(to bottom, #000, transparent 85%);
}

.cq-player { grid-area: player; display: flex; align-items: center; gap: 1.2rem; min-width: 0; }
.cq-avatar { position: relative; flex: none; width: 104px; height: 104px; }
.cq-avatar svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.cq-avatar circle { fill: none; stroke-width: 7; }
.cq-avatar .trk { stroke: rgba(255, 255, 255, .14); }
.cq-avatar .val { stroke: var(--t3); stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: calc(100 - var(--p, 0)); filter: drop-shadow(0 0 6px var(--t3)); transition: stroke-dashoffset 1.4s ease-out; }
.cq-avatar-in {
    position: absolute; inset: 13px; display: grid; place-items: center; border-radius: 50%;
    font-family: var(--cq-black); font-size: 1.8rem; color: var(--t1); background: var(--t-grad, linear-gradient(135deg, var(--t2), var(--t3)));
    box-shadow: inset 0 2px 8px rgba(255, 255, 255, .5), 0 8px 20px -6px rgba(0, 0, 0, .5);
}
.cq-hero .cq-avatar-in { background: linear-gradient(135deg, var(--t3), var(--t2)); color: var(--t1); }
.cq-lv {
    position: absolute; bottom: -4px; left: 50%; translate: -50% 0;
    min-width: 34px; padding: .2rem .5rem; border-radius: 999px; border: 3px solid var(--cq-night);
    font-family: var(--cq-black); font-size: .85rem; text-align: center; color: var(--cq-night);
    background: linear-gradient(135deg, #fde047, #f59e0b);
}
.cq-lv::before { content: "LV "; font-size: .62rem; }
.cq-player-id { display: grid; gap: .35rem; min-width: 0; }
.cq-player-id small { color: rgba(255, 255, 255, .75); font-size: .95rem; }
.cq-hero h1 { display: flex; align-items: center; gap: .5rem; margin: 0; color: #fff; font-family: var(--cq-black); font-size: clamp(1.5rem, 3vw, 2.1rem); }
.cq-hero h1 .ti { color: var(--t3); filter: drop-shadow(0 0 10px var(--t3)); }
.cq-chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.cq-chip { display: inline-flex; align-items: center; gap: .3rem; padding: .3rem .7rem; border-radius: 999px; font-size: .8rem; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .16); backdrop-filter: blur(6px); }

.cq-score { grid-area: score; align-self: center; justify-self: end; display: grid; justify-items: end; gap: .1rem; text-align: end; }
.cq-score small { color: rgba(255, 255, 255, .75); }
.cq-score strong {
    font-family: var(--cq-black); font-size: clamp(2.6rem, 6vw, 3.8rem); line-height: 1.05; font-variant-numeric: tabular-nums;
    background: linear-gradient(180deg, #fff 20%, var(--t3)); -webkit-background-clip: text; background-clip: text; color: transparent;
    filter: drop-shadow(0 4px 18px color-mix(in srgb, var(--t3) 60%, transparent));
}
.cq-score strong::after { content: " ★"; font-size: .45em; vertical-align: super; color: #fde047; -webkit-text-fill-color: #fde047; }
.cq-score span { color: rgba(255, 255, 255, .65); font-size: .82rem; }

.cq-xp { grid-area: xp; display: grid; gap: .5rem; }
.cq-xp-label { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; }
.cq-xp-label b { font-family: var(--cq-bold); }
.cq-xp-label span { color: rgba(255, 255, 255, .8); font-size: .9rem; }
.cq-xp-bar { position: relative; height: 20px; padding: 3px; border-radius: 999px; background: rgba(0, 0, 0, .35); box-shadow: inset 0 2px 6px rgba(0, 0, 0, .4); }
.cq-xp-fill {
    position: relative; display: block; height: 100%; width: calc(var(--p, 0) * 1%); min-width: 14px; border-radius: inherit; overflow: hidden;
    background: linear-gradient(90deg, var(--cq-cyan), var(--cq-violet) 45%, var(--cq-pink) 75%, #fde047);
    background-size: 200% 100%; animation: cq-flow 4s linear infinite;
    transition: width 1.4s cubic-bezier(.2, .8, .2, 1);
}
.cq-xp-fill::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(-45deg, rgba(255, 255, 255, .22) 0 8px, transparent 8px 16px); animation: cq-stripes 1s linear infinite; }
.cq-xp-fill i { position: absolute; inset-inline-end: 0; top: 50%; width: 14px; height: 14px; translate: 30% -50%; border-radius: 50%; background: #fff; box-shadow: 0 0 12px 4px #fff; }
@keyframes cq-flow { to { background-position: -200% 0; } }
@keyframes cq-stripes { to { background-position: 22px 0; } }
.cq-xp-foot { display: flex; justify-content: space-between; font-size: .78rem; color: rgba(255, 255, 255, .6); }
.cq-xp-foot span:nth-child(2) { font-family: var(--cq-bold); color: #fff; }

.cq-wallets { grid-area: wallets; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; }
.cq-wallet {
    position: relative; display: grid; grid-template-columns: auto 1fr; grid-template-areas: "i s" "i v"; align-items: center; gap: 0 .7rem;
    padding: .8rem 1rem; border-radius: 18px; color: #fff; text-decoration: none;
    background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .12); backdrop-filter: blur(8px);
    transition: transform .2s var(--cq-pop), background .2s;
}
a.cq-wallet:hover { color: #fff; transform: translateY(-3px); background: rgba(255, 255, 255, .14); }
.cq-wallet .ti { grid-area: i; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; font-size: 1.3rem; }
.cq-wallet span { grid-area: s; font-size: .78rem; color: rgba(255, 255, 255, .7); }
.cq-wallet strong { grid-area: v; font-family: var(--cq-black); font-size: 1.05rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cq-wallet.w1 .ti { background: linear-gradient(135deg, #f97316, #ec4899); }
.cq-wallet.w2 .ti { background: linear-gradient(135deg, #8b5cf6, #06b6d4); }
.cq-wallet.w3 .ti { background: linear-gradient(135deg, #16a34a, #a3e635); }
.cq-wallet.w4 .ti { background: linear-gradient(135deg, #f59e0b, #fde047); color: #713f12; }

/* Expiry warning */
.cq-alert {
    display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; padding: .9rem 1.1rem; border-radius: 18px;
    color: #7c2d12; background: linear-gradient(135deg, #fff7ed, #ffe4e6); border: 1px solid #fed7aa;
}
.cq-alert > .ti { font-size: 1.6rem; color: #ea580c; animation: cq-tick 1.2s steps(2) infinite; }
.cq-alert > span { flex: 1 1 220px; }
@keyframes cq-tick { 50% { transform: rotate(12deg); } }

/* ══ Level map ══ */
.cq-map {
    /* --n: number of stops, --done: 0–1 of the path lit (set by the page) */
    position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 1rem;
    margin: 0; padding: 1.4rem 0 0; list-style: none;
}
.cq-map::before, .cq-map::after { /* the path between the first and last medal; ::after is the lit part */
    content: ""; position: absolute; top: calc(1.4rem + 44px); height: 8px; border-radius: 99px;
    inset-inline-start: calc(50% / var(--n, 4));
}
.cq-map::before { inset-inline-end: calc(50% / var(--n, 4)); background: repeating-linear-gradient(90deg, #ddd6fe 0 14px, transparent 14px 22px); }
.cq-map::after {
    width: calc((100% - 100% / var(--n, 4)) * var(--done, 0));
    background: linear-gradient(270deg, var(--cq-cyan), var(--cq-violet), var(--cq-pink));
    box-shadow: 0 0 14px color-mix(in srgb, var(--cq-violet) 60%, transparent);
    transition: width 1.6s cubic-bezier(.2, .8, .2, 1);
}
.cq-js .cq-sec:not(.cq-in) .cq-map::after { width: 0; }
.cq-node {
    position: relative; z-index: 1; display: grid; justify-items: center; align-content: start; gap: .35rem;
    padding: 0 .5rem 1rem; text-align: center;
}
.cq-medal {
    position: relative; display: grid; place-items: center; width: 96px; height: 96px; margin-bottom: .3rem;
    border-radius: 30px; rotate: 45deg; font-size: 2.2rem; color: #fff;
    background: var(--t-grad); border: 4px solid #fff;
    box-shadow: 0 14px 28px -12px var(--t2), inset 0 2px 10px rgba(255, 255, 255, .45);
    transition: transform .3s var(--cq-pop);
}
.cq-medal > .ti { rotate: -45deg; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .3)); }
.cq-node:hover .cq-medal { transform: scale(1.06) translateY(-3px); }
.cq-node b { font-family: var(--cq-black); font-size: 1.1rem; }
.cq-node small { color: var(--cq-muted); font-size: .8rem; }
.cq-mult { padding: .2rem .65rem; border-radius: 999px; font-family: var(--cq-bold); font-size: .78rem; color: var(--t1); background: color-mix(in srgb, var(--t3) 55%, #fff); }
.cq-perks { max-width: 22ch; color: var(--cq-muted); font-size: .78rem; line-height: 1.6; }
.cq-node.is-locked .cq-medal { color: #a8a2b9; background: #f1eff6; border-color: #e7e3f0; box-shadow: none; }
.cq-node.is-locked b { color: #8b8698; }
.cq-node.is-current .cq-medal { animation: cq-bob 2.6s ease-in-out infinite; box-shadow: 0 0 0 8px color-mix(in srgb, var(--t3) 45%, transparent), 0 18px 34px -12px var(--t2); }
.cq-node.is-passed .cq-medal::after { content: "✓"; position: absolute; top: -8px; right: -8px; rotate: -45deg; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; font-size: .9rem; color: #fff; background: #16a34a; border: 3px solid #fff; }
.cq-you { /* inside the rotated medal: turned back upright and lifted above it */
    position: absolute; top: 50%; left: 50%; rotate: -45deg; translate: -50% -50%; transform: translateY(-80px);
    padding: .2rem .6rem; border-radius: 8px; font-family: var(--cq-bold); font-size: .72rem; white-space: nowrap; color: #fff;
    background: linear-gradient(135deg, var(--cq-pink), var(--cq-violet));
}
@keyframes cq-bob { 50% { transform: translateY(-6px); } }

/* ══ Reward chests ══ */
.cq-chests { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1rem; }
.cq-chest {
    --c1: #7c3aed; --c2: #ec4899;
    position: relative; overflow: hidden; isolation: isolate;
    display: grid; align-content: start; gap: .45rem; padding: 1.2rem 1.2rem 1.1rem; margin: 0;
    border-radius: var(--cq-r); color: #fff;
    background: linear-gradient(150deg, var(--c1), var(--c2));
    box-shadow: 0 18px 34px -18px var(--c1);
    transition: transform .25s var(--cq-pop), box-shadow .25s;
}
.cq-chest.v1 { --c1: #0891b2; --c2: #6366f1; }
.cq-chest.v2 { --c1: #ea580c; --c2: #facc15; }
.cq-chest.v3 { --c1: #16a34a; --c2: #06b6d4; }
.cq-chest::before { /* ribbon of light */
    content: ""; position: absolute; inset: -40% auto -40% -30%; z-index: -1; width: 45%; rotate: 20deg;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .25), transparent);
    animation: cq-shine 3.8s ease-in-out infinite;
}
.cq-chest::after { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .2; background-image: radial-gradient(#fff 1px, transparent 1.6px); background-size: 16px 16px; }
@keyframes cq-shine { 0%, 55% { translate: -120% 0; } 100% { translate: 420% 0; } }
.cq-chest:hover { transform: translateY(-5px) rotate(-.6deg); }
.cq-chest-lid {
    position: absolute; top: 1rem; inset-inline-end: 1rem; display: grid; place-items: center; width: 40px; height: 40px;
    border-radius: 13px; font-size: 1.3rem; background: rgba(255, 255, 255, .2); backdrop-filter: blur(4px);
}
.cq-chest.is-open .cq-chest-lid { color: #713f12; background: #fde047; animation: cq-wiggle 2.4s ease-in-out infinite; }
@keyframes cq-wiggle { 0%, 70%, 100% { rotate: 0; } 76% { rotate: -14deg; } 84% { rotate: 12deg; } 92% { rotate: -6deg; } }
.cq-chest-amount { display: grid; }
.cq-chest-amount strong { font-family: var(--cq-black); font-size: 2rem; line-height: 1.1; text-shadow: 0 3px 12px rgba(0, 0, 0, .25); }
.cq-chest-amount small { font-size: .8rem; opacity: .85; }
.cq-chest h3 { margin: .1rem 0 0; color: #fff; font-family: var(--cq-bold); font-size: 1rem; }
.cq-chest-terms { font-size: .76rem; opacity: .85; }
.cq-chest-bar { display: block; height: 10px; margin-top: .3rem; border-radius: 99px; background: rgba(0, 0, 0, .22); overflow: hidden; }
.cq-chest-bar i { display: block; height: 100%; width: calc(var(--p, 0) * 1%); border-radius: inherit; background: linear-gradient(90deg, #fff, #fde047); transition: width 1.2s ease-out; }
.cq-chest-foot { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-top: .3rem; }
.cq-chest-cost { display: inline-flex; align-items: center; gap: .3rem; font-family: var(--cq-black); }
.cq-chest-cost .ti { color: #fde047; }
.cq-need { padding: .3rem .7rem; border-radius: 999px; font-size: .78rem; background: rgba(0, 0, 0, .2); }
.cq-chest.is-locked { filter: saturate(.75); }
.cq-chest.is-locked:hover { filter: none; }
.cq-join ~ .cq-sec .cq-chest { filter: none; }

/* ══ Missions ══ */
.cq-missions { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: .8rem; }
.cq-mission {
    display: flex; align-items: center; gap: .9rem; padding: .95rem 1rem; border-radius: 18px;
    color: var(--cq-text); text-decoration: none; background: #fff; border: 2px solid transparent;
    box-shadow: 0 1px 2px rgba(18, 11, 36, .05), 0 10px 24px -16px rgba(18, 11, 36, .35);
    transition: transform .2s var(--cq-pop), border-color .2s;
}
a.cq-mission:hover { color: var(--cq-text); transform: translateY(-3px); border-color: #ddd6fe; }
.cq-mission-icon { flex: none; display: grid; place-items: center; width: 50px; height: 50px; border-radius: 16px; font-size: 1.5rem; color: #fff; background: linear-gradient(135deg, var(--cq-cyan), var(--cq-violet)); }
.cq-mission:nth-child(4n+2) .cq-mission-icon { background: linear-gradient(135deg, #f97316, #ec4899); }
.cq-mission:nth-child(4n+3) .cq-mission-icon { background: linear-gradient(135deg, #f59e0b, #facc15); color: #713f12; }
.cq-mission:nth-child(4n) .cq-mission-icon { background: linear-gradient(135deg, #16a34a, #a3e635); }
.cq-mission-body { display: grid; gap: .15rem; flex: 1; min-width: 0; }
.cq-mission-body b { font-family: var(--cq-bold); }
.cq-mission-body small { color: var(--cq-muted); font-size: .8rem; line-height: 1.6; }
.cq-xp-chip { flex: none; padding: .35rem .7rem; border-radius: 999px; font-family: var(--cq-black); font-size: .8rem; color: #5b21b6; background: #ede9fe; white-space: nowrap; }
.cq-mission.is-main { background: linear-gradient(135deg, #faf5ff, #ecfeff); border-color: #e9d5ff; }
.cq-mission.is-done { opacity: .75; }
.cq-mission.is-done .cq-mission-icon { background: #16a34a; }
.cq-mission.is-done .cq-xp-chip { color: #166534; background: #dcfce7; }
.cq-join ~ .cq-sec .cq-mission { cursor: default; }

/* ══ Badges ══ */
.cq-badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .8rem; }
.cq-badge {
    --b1: #7c3aed; --b2: #ec4899;
    display: grid; justify-items: center; align-content: start; gap: .3rem; padding: 1rem .7rem; border-radius: 20px;
    text-align: center; background: #fff; border: 1px solid var(--cq-line);
    transition: transform .25s var(--cq-pop);
}
.cq-badge.c1 { --b1: #0891b2; --b2: #22d3ee; }
.cq-badge.c2 { --b1: #ea580c; --b2: #fbbf24; }
.cq-badge.c3 { --b1: #16a34a; --b2: #a3e635; }
.cq-badge.c4 { --b1: #db2777; --b2: #f9a8d4; }
.cq-badge.c5 { --b1: #4f46e5; --b2: #a5b4fc; }
.cq-badge:hover { transform: translateY(-4px) rotate(-1.5deg); }
.cq-badge-art {
    position: relative; display: grid; place-items: center; width: 70px; height: 70px; margin-bottom: .2rem;
    clip-path: polygon(50% 0, 93% 25%, 93% 75%, 50% 100%, 7% 75%, 7% 25%);
    font-size: 1.9rem; color: #fff; background: linear-gradient(135deg, var(--b1), var(--b2));
}
.cq-badge.is-won .cq-badge-art { filter: drop-shadow(0 8px 12px color-mix(in srgb, var(--b1) 50%, transparent)); }
.cq-badge b { font-family: var(--cq-bold); font-size: .92rem; }
.cq-badge small { color: var(--cq-muted); font-size: .74rem; line-height: 1.5; }
.cq-badge.is-locked { background: #faf9fc; border-style: dashed; }
.cq-badge.is-locked .cq-badge-art { color: #b4aec4; background: #ece9f3; }
.cq-badge.is-locked b { color: #8b8698; }
.cq-badge-bar { display: block; width: 80%; height: 6px; margin-top: .2rem; border-radius: 99px; background: #ece9f3; overflow: hidden; }
.cq-badge-bar i { display: block; height: 100%; width: calc(var(--p, 0) * 1%); background: linear-gradient(90deg, var(--b1), var(--b2)); }

/* ══ Codes and log ══ */
.cq-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1.6rem; align-items: start; }
.cq-ticket {
    position: relative; display: flex; align-items: stretch; margin-bottom: .7rem; border-radius: 18px; overflow: hidden; color: #fff;
    background: linear-gradient(135deg, #7c3aed, #ec4899);
    /* punched notches where the stub (the code, 38% wide, on the left in RTL) tears off */
    -webkit-mask: radial-gradient(circle 11px at 38% 0, transparent 98%, #000) top / 100% 51% no-repeat,
                  radial-gradient(circle 11px at 38% 100%, transparent 98%, #000) bottom / 100% 51% no-repeat;
            mask: radial-gradient(circle 11px at 38% 0, transparent 98%, #000) top / 100% 51% no-repeat,
                  radial-gradient(circle 11px at 38% 100%, transparent 98%, #000) bottom / 100% 51% no-repeat;
}
.cq-ticket:nth-of-type(3n+2) { background: linear-gradient(135deg, #0891b2, #6366f1); }
.cq-ticket:nth-of-type(3n) { background: linear-gradient(135deg, #ea580c, #f59e0b); }
.cq-ticket-main { flex: 1; display: grid; align-content: center; gap: .2rem; padding: 1rem 1.1rem; }
.cq-ticket-main strong { font-family: var(--cq-black); font-size: 1.2rem; }
.cq-ticket-main small { font-size: .78rem; opacity: .85; }
.cq-ticket-code {
    flex: 0 0 38%; display: grid; place-content: center; justify-items: center; gap: .2rem; padding: .8rem; border: 0;
    border-inline-start: 2px dashed rgba(255, 255, 255, .5); color: #fff; background: rgba(0, 0, 0, .14); cursor: pointer;
}
.cq-ticket-code span { font-family: var(--cq-black); font-size: 1rem; letter-spacing: .08em; }
.cq-ticket-code small { font-size: .74rem; opacity: .85; }
button.cq-ticket-code:hover { background: rgba(0, 0, 0, .24); }
.cq-ticket.is-off { background: #c9c4d4 !important; }
.cq-ticket.is-off .cq-ticket-code { cursor: default; }

.cq-log { display: grid; gap: .5rem; margin: 0; padding: 0; list-style: none; }
.cq-log li { display: flex; align-items: center; gap: .8rem; padding: .7rem .9rem; border-radius: 16px; background: #fff; border: 1px solid var(--cq-line); }
.cq-log-dot { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; font-size: 1.1rem; }
.cq-log .up .cq-log-dot { color: #166534; background: #dcfce7; }
.cq-log .down .cq-log-dot { color: #9f1239; background: #ffe4e6; }
.cq-log-body { flex: 1; display: grid; min-width: 0; }
.cq-log-body b { font-family: var(--cq-bold); font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cq-log-body small { color: var(--cq-muted); font-size: .76rem; }
.cq-log li > strong { font-family: var(--cq-black); white-space: nowrap; }
.cq-log .up > strong { color: #16a34a; }
.cq-log .down > strong { color: #e11d48; }

/* ══ Join (not a member yet) ══ */
.cq-join {
    position: relative; isolation: isolate; overflow: hidden;
    display: grid; grid-template-columns: 1.2fr 1fr; align-items: center; gap: 2rem; padding: 2.6rem;
    border-radius: 30px; color: #fff;
    background: radial-gradient(90% 120% at 0% 100%, #db2777 0%, transparent 55%), radial-gradient(80% 120% at 100% 0%, #0891b2 0%, transparent 55%), var(--cq-night);
}
.cq-join-copy { display: grid; justify-items: start; gap: 1rem; }
.cq-kicker { display: inline-flex; align-items: center; gap: .4rem; padding: .35rem .85rem; border-radius: 999px; font-family: var(--cq-bold); font-size: .82rem; color: #fde047; background: rgba(253, 224, 71, .12); border: 1px solid rgba(253, 224, 71, .3); }
.cq-join h1 { margin: 0; color: #fff; font-family: var(--cq-black); font-size: clamp(1.8rem, 4.4vw, 3rem); line-height: 1.35; }
.cq-join h1 em { font-style: normal; background: linear-gradient(90deg, #fde047, #f472b6, #67e8f9); -webkit-background-clip: text; background-clip: text; color: transparent; }
.cq-join p { margin: 0; max-width: 52ch; color: rgba(255, 255, 255, .8); line-height: 1.9; }
.cq-join-note { color: rgba(255, 255, 255, .6); }
.cq-join-card { position: relative; display: grid; place-items: center; min-height: 260px; }
.cq-card-mock {
    position: relative; overflow: hidden; display: grid; grid-template-rows: auto 1fr auto; width: min(100%, 340px); aspect-ratio: 1.6; padding: 1.2rem 1.3rem;
    border-radius: 22px; color: var(--t1); background: linear-gradient(135deg, var(--t3), var(--t2));
    box-shadow: 0 30px 50px -20px rgba(0, 0, 0, .6); rotate: -8deg; animation: cq-float 6s ease-in-out infinite;
}
.cq-card-shine { position: absolute; inset: 0; background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, .55) 45%, transparent 60%); background-size: 250% 100%; animation: cq-sweep 3.5s ease-in-out infinite; }
@keyframes cq-sweep { 0% { background-position: 130% 0; } 60%, 100% { background-position: -130% 0; } }
.cq-card-top { display: flex; justify-content: space-between; align-items: center; font-family: var(--cq-black); }
.cq-card-top .ti { font-size: 1.6rem; }
.cq-card-lv { align-self: center; font-family: var(--cq-black); font-size: 1.5rem; letter-spacing: .12em; direction: ltr; text-align: left; }
.cq-card-pts { display: flex; justify-content: space-between; align-items: end; }
.cq-card-pts strong { font-family: var(--cq-black); font-size: 1.8rem; }
@keyframes cq-float { 50% { transform: translateY(-12px); } }
.cq-float { position: absolute; display: grid; place-items: center; width: 54px; height: 54px; border-radius: 18px; font-size: 1.6rem; animation: cq-float 5s ease-in-out infinite; }
.cq-float.f1 { top: 4%; right: 6%; color: #713f12; background: #fde047; rotate: 12deg; }
.cq-float.f2 { bottom: 6%; right: 14%; color: #fff; background: #ec4899; rotate: -10deg; animation-delay: -1.5s; }
.cq-float.f3 { top: 18%; left: 4%; color: #fff; background: #06b6d4; rotate: -6deg; animation-delay: -3s; }
.cq-confetti-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.cq-confetti-bg i {
    position: absolute; top: -10%; left: calc(var(--i) * 7.3%); width: 8px; height: 14px; border-radius: 2px; opacity: .7;
    background: hsl(calc(var(--i) * 47) 90% 62%); animation: cq-fall calc(7s + var(--i) * .45s) linear infinite; animation-delay: calc(var(--i) * -.8s);
}
@keyframes cq-fall { to { transform: translateY(560px) rotate(720deg); } }

.cq-how { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .8rem; }
.cq-how-step { display: grid; gap: .3rem; padding: 1.1rem; border-radius: 20px; color: #fff; }
.cq-how-step .ti { font-size: 1.8rem; }
.cq-how-step b { font-family: var(--cq-black); font-size: 1.05rem; }
.cq-how-step span { font-size: .84rem; opacity: .9; }
.cq-how-step.c1 { background: linear-gradient(135deg, #7c3aed, #a855f7); }
.cq-how-step.c2 { background: linear-gradient(135deg, #ea580c, #f59e0b); }
.cq-how-step.c3 { background: linear-gradient(135deg, #0891b2, #22d3ee); }
.cq-how-step.c4 { background: linear-gradient(135deg, #db2777, #f472b6); }

.cq-state { display: grid; justify-items: center; gap: .8rem; padding: 3rem 1rem; text-align: center; border-radius: 28px; background: #fff; border: 1px solid var(--cq-line); }
.cq-state-icon { display: grid; place-items: center; width: 80px; height: 80px; border-radius: 26px; font-size: 2.4rem; color: #fff; background: linear-gradient(135deg, var(--cq-violet), var(--cq-cyan)); }
.cq-state h1 { margin: 0; font-family: var(--cq-black); font-size: 1.5rem; }
.cq-state p { margin: 0; color: var(--cq-muted); }

/* ══ Confirm sheet and win screen ══ */
.cq-sheet, .cq-win { border: 0; padding: 0; background: transparent; max-width: min(92vw, 420px); width: 100%; }
/* No backdrop-filter here: Chromium draws the blurred page mirrored behind a modal in RTL documents. */
.cq-sheet::backdrop, .cq-win::backdrop { background: rgba(18, 11, 36, .68); }
.cq-sheet form { display: grid; justify-items: center; gap: .7rem; padding: 1.6rem; border-radius: 26px; text-align: center; background: #fff; }
.cq-sheet[open] form, .cq-win[open] .cq-win-body { animation: cq-pop .45s var(--cq-pop); }
@keyframes cq-pop { from { opacity: 0; transform: scale(.8) translateY(20px); } }
.cq-sheet-icon { display: grid; place-items: center; width: 72px; height: 72px; border-radius: 24px; font-size: 2.2rem; color: #fff; background: linear-gradient(135deg, #f59e0b, #ec4899); animation: cq-wiggle 2s ease-in-out infinite; }
.cq-sheet h2 { margin: 0; font-family: var(--cq-black); font-size: 1.25rem; }
.cq-sheet p { margin: 0; color: var(--cq-muted); font-size: .88rem; }
.cq-sheet dl { display: grid; width: 100%; gap: .4rem; margin: .3rem 0; padding: .9rem 1rem; border-radius: 16px; background: #f7f5fb; }
.cq-sheet dl div { display: flex; justify-content: space-between; }
.cq-sheet dt { font-weight: normal; color: var(--cq-muted); }
.cq-sheet dd { margin: 0; font-family: var(--cq-black); direction: ltr; } /* keeps the sign of −10 in front */
.cq-sheet dl .after { padding-top: .4rem; border-top: 1px dashed #ddd6fe; }
.cq-sheet dl .after dd { color: var(--cq-violet); }
.cq-sheet-actions { display: grid; width: 100%; gap: .5rem; }

.cq-win[open] { display: grid; }
.cq-win canvas { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; }
.cq-win-body { position: relative; display: grid; justify-items: center; gap: .6rem; padding: 2rem 1.6rem 1.6rem; border-radius: 28px; text-align: center; color: #fff; background: linear-gradient(160deg, #7c3aed, #db2777 60%, #f97316); box-shadow: 0 40px 80px -30px rgba(124, 58, 237, .8); }
.cq-win-mark { display: grid; place-items: center; width: 88px; height: 88px; border-radius: 50%; font-size: 2.8rem; color: #713f12; background: #fde047; box-shadow: 0 0 0 10px rgba(253, 224, 71, .25); animation: cq-bob 1.6s ease-in-out infinite; }
.cq-win h2 { margin: .3rem 0 0; color: #fff; font-family: var(--cq-black); font-size: 1.6rem; }
.cq-win p { margin: 0; opacity: .9; }
.cq-win-code { display: grid; gap: .2rem; width: 100%; padding: 1rem; border: 2px dashed rgba(255, 255, 255, .7); border-radius: 18px; color: #fff; background: rgba(255, 255, 255, .14); cursor: pointer; }
.cq-win-code span { font-family: var(--cq-black); font-size: 1.5rem; letter-spacing: .12em; }
.cq-win-code small { opacity: .85; }
.cq-win form { width: 100%; }
.cq-win .cq-btn { width: 100%; color: var(--cq-violet); background: #fff; }

.cq-toast {
    position: fixed; bottom: calc(1.5rem + env(safe-area-inset-bottom)); left: 50%; z-index: 1100; translate: -50% 160%;
    padding: .65rem 1.2rem; border-radius: 999px; font-family: var(--cq-bold); color: #fff; background: var(--cq-night);
    box-shadow: 0 12px 30px -10px rgba(0, 0, 0, .5); transition: translate .35s var(--cq-pop);
}
.cq-toast.show { translate: -50% 0; }

/* Reveal on scroll (club-play.js adds .cq-in); without the script everything just shows. */
.cq-js .cq-sec { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.cq-js .cq-sec.cq-in { opacity: 1; transform: none; }
.cq-js .cq-sec:not(.cq-in) .cq-chest-bar i, .cq-js .cq-sec:not(.cq-in) .cq-badge-bar i { width: 0; }
.cq-js .cq-hero:not(.cq-in) .cq-xp-fill { width: 14px; }
.cq-js .cq-hero:not(.cq-in) .cq-avatar .val { stroke-dashoffset: 100; }

/* ══ Side menu (members) ══
   A sticky column beside the club (on the right in RTL) under the store header; under 992px it becomes a sticky
   chip bar above the sections. club-play.js marks the section on screen. */
.cq-shell { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 1.6rem; align-items: start; }
.cq-main { display: grid; gap: 1.6rem; min-width: 0; }
.cq-main [id^="cq-"] { scroll-margin-top: calc(var(--st-header-h, 130px) + 1rem); }
.cq-side {
    position: sticky; top: calc(var(--st-header-h, 130px) + 1rem); z-index: 5;
    display: grid; gap: .9rem; max-height: calc(100vh - var(--st-header-h, 130px) - 2rem); overflow-y: auto; scrollbar-width: thin;
    padding: 1rem; border-radius: 24px; background: #fff; border: 1px solid var(--cq-line);
    box-shadow: 0 1px 2px rgba(18, 11, 36, .05), 0 18px 36px -22px rgba(18, 11, 36, .4);
}
.cq-side-me {
    position: relative; overflow: hidden; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .3rem .7rem;
    padding: .9rem; border-radius: 18px; color: #fff;
    background: radial-gradient(120% 140% at 100% 0%, color-mix(in srgb, var(--t2) 70%, var(--cq-night)), var(--cq-night) 75%);
}
.cq-side-medal { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; font-size: 1.3rem; color: var(--t1); background: linear-gradient(135deg, var(--t3), var(--t2)); }
.cq-side-who { display: grid; line-height: 1.3; }
.cq-side-who small { color: rgba(255, 255, 255, .65); font-size: .72rem; }
.cq-side-who b { font-family: var(--cq-black); }
.cq-side-pts { display: grid; justify-items: end; line-height: 1.2; }
.cq-side-pts strong { font-family: var(--cq-black); font-size: 1.2rem; color: #fde047; }
.cq-side-pts small { color: rgba(255, 255, 255, .65); font-size: .7rem; }
.cq-side-bar { grid-column: 1 / -1; display: block; height: 7px; margin-top: .3rem; border-radius: 99px; background: rgba(255, 255, 255, .15); overflow: hidden; }
.cq-side-bar i { display: block; height: 100%; width: calc(var(--p, 0) * 1%); min-width: 7px; border-radius: inherit; background: linear-gradient(90deg, var(--cq-cyan), var(--cq-violet), var(--cq-pink)); }
.cq-side-nav { display: grid; gap: .2rem; }
.cq-side-nav a {
    position: relative; display: flex; align-items: center; gap: .65rem; padding: .6rem .7rem; border-radius: 14px;
    color: var(--cq-text); text-decoration: none; font-family: var(--cq-bold); font-size: .92rem;
    transition: background .2s, color .2s, transform .2s var(--cq-pop);
}
.cq-side-nav a > .ti { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 11px; font-size: 1.15rem; color: var(--cq-violet); background: #f3efff; transition: inherit; }
.cq-side-nav a:nth-child(7n+2) > .ti { color: #0891b2; background: #e0f7fb; }
.cq-side-nav a:nth-child(7n+3) > .ti { color: #db2777; background: #fde7f1; }
.cq-side-nav a:nth-child(7n+4) > .ti { color: #ea580c; background: #ffedd5; }
.cq-side-nav a:nth-child(7n+5) > .ti { color: #ca8a04; background: #fef9c3; }
.cq-side-nav a:nth-child(7n+6) > .ti { color: #4f46e5; background: #e0e7ff; }
.cq-side-nav a:nth-child(7n+7) > .ti { color: #16a34a; background: #dcfce7; }
.cq-side-nav a > span { flex: 1; }
.cq-side-nav em { padding: .1rem .5rem; border-radius: 999px; font-style: normal; font-family: var(--cq-black); font-size: .74rem; color: #5b21b6; background: #ede9fe; }
.cq-side-nav em.hot { color: #fff; background: linear-gradient(135deg, #f97316, #ec4899); animation: cq-pulse 1.8s ease-in-out infinite; }
.cq-side-nav a:hover { color: var(--cq-text); background: #f7f5fb; transform: translateX(-3px); }
.cq-side-nav a.is-active { color: #fff; background: linear-gradient(135deg, var(--cq-violet), var(--cq-pink)); box-shadow: 0 10px 22px -12px var(--cq-pink); }
.cq-side-nav a.is-active > .ti { color: #fff; background: rgba(255, 255, 255, .2); }
.cq-side-nav a.is-active em { color: var(--cq-violet); background: #fff; }
.cq-side-links { display: grid; gap: .3rem; padding-top: .7rem; border-top: 1px dashed var(--cq-line); }
.cq-side-links a { display: flex; align-items: center; gap: .45rem; padding: .3rem .5rem; color: var(--cq-muted); font-size: .84rem; text-decoration: none; }
.cq-side-links a:hover { color: var(--cq-violet); }

@media (max-width: 991.98px) {
    .cq-shell { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
    .cq-side {
        top: var(--st-header-h, 130px); margin-inline: -.25rem; padding: .5rem; max-height: none; overflow: visible;
        border-radius: 18px; background: rgba(255, 255, 255, .92); backdrop-filter: blur(10px);
    }
    .cq-side-me, .cq-side-links { display: none; }
    .cq-side-nav { display: flex; gap: .35rem; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; }
    .cq-side-nav::-webkit-scrollbar { display: none; }
    .cq-side-nav a { flex: none; padding: .35rem .7rem .35rem .45rem; font-size: .84rem; white-space: nowrap; scroll-snap-align: start; }
    .cq-side-nav a > .ti { width: 28px; height: 28px; font-size: 1rem; }
    .cq-side-nav a:hover { transform: none; }
    .cq-main [id^="cq-"] { scroll-margin-top: calc(var(--st-header-h, 130px) + 5rem); }
}

/* ══ Responsive ══ */
@media (max-width: 991.98px) {
    .cq-hero { grid-template-columns: 1fr; grid-template-areas: "player" "score" "xp" "wallets"; }
    .cq-score { justify-self: start; justify-items: start; text-align: start; }
    .cq-wallets { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cq-cols { grid-template-columns: 1fr; }
    .cq-join { grid-template-columns: 1fr; padding: 2rem 1.4rem; }
    .cq-how { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767.98px) {
    /* The map turns vertical: a winding path down the page. */
    .cq-map { grid-auto-flow: row; grid-auto-columns: auto; gap: 0; }
    .cq-map::before, .cq-map::after { display: none; }
    .cq-node {
        grid-template-columns: auto 1fr; grid-template-areas: "m b" "m s" "m x" "m p"; justify-items: start; align-items: center;
        gap: .15rem 1.1rem; padding: 1rem 0 1.4rem; text-align: start; border-inline-start: 0;
    }
    .cq-node:not(:last-child)::after { content: ""; position: absolute; top: 92px; bottom: -4px; inset-inline-start: 49px; width: 6px; border-radius: 9px; background: repeating-linear-gradient(180deg, #ddd6fe 0 10px, transparent 10px 16px); }
    .cq-node.is-passed:not(:last-child)::after { background: linear-gradient(180deg, var(--cq-cyan), var(--cq-violet)); }
    .cq-medal { grid-area: m; width: 72px; height: 72px; margin: 0 16px; border-radius: 22px; font-size: 1.7rem; } /* the margin holds the turned corners */
    .cq-node b { grid-area: b; }
    .cq-node small { grid-area: s; }
    .cq-mult { grid-area: x; }
    .cq-perks { grid-area: p; max-width: none; }
    .cq-you { transform: translate(0, -58px); }
    .cq-hero { padding: 1.4rem 1.2rem; border-radius: 24px; }
    .cq-avatar { width: 84px; height: 84px; }
    .cq-avatar-in { inset: 11px; font-size: 1.4rem; }
    .cq-chests { grid-template-columns: 1fr; }
    .cq-badges { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; }
    .cq-badge { padding: .8rem .4rem; }
    .cq-badge-art { width: 56px; height: 56px; font-size: 1.5rem; }
    .cq-badge small { display: none; }
    .cq-how { grid-template-columns: 1fr 1fr; }
    .cq-join-card { min-height: 210px; }
}
@media (max-width: 575.98px) {
    .cq { gap: 1.2rem; padding-bottom: calc(5.5rem + env(safe-area-inset-bottom)); } /* clear of the store's bottom tab bar */
    .cq-main { gap: 1.3rem; }
    .cq-sec { gap: .75rem; }
    .cq-sec-head h2 { font-size: 1.12rem; }
    .cq-sec-head h2 .ti { width: 32px; height: 32px; border-radius: 10px; font-size: 1.05rem; }
    .cq-sec-head p { font-size: .82rem; }

    /* Player card: tighter, the score beside its label */
    .cq-hero { gap: 1rem; padding: 1.1rem 1rem 1rem; }
    .cq-player { gap: .85rem; }
    .cq-avatar { width: 72px; height: 72px; }
    .cq-avatar-in { inset: 9px; font-size: 1.2rem; }
    .cq-lv { font-size: .75rem; padding: .1rem .4rem; border-width: 2px; }
    .cq-hero h1 { font-size: 1.35rem; }
    .cq-chip { padding: .22rem .55rem; font-size: .72rem; }
    .cq-score { grid-template-columns: 1fr auto; grid-template-areas: "l n" "t n"; align-items: center; justify-self: stretch; padding: .7rem .9rem; border-radius: 16px; background: rgba(255, 255, 255, .07); }
    .cq-score small { grid-area: l; }
    .cq-score span { grid-area: t; }
    .cq-score strong { grid-area: n; font-size: 2.4rem; }
    .cq-wallets { gap: .5rem; }
    .cq-wallet { grid-template-columns: auto 1fr; grid-template-areas: "i s" "i v"; gap: 0 .55rem; padding: .6rem .65rem; border-radius: 14px; }
    .cq-wallet .ti { width: 34px; height: 34px; border-radius: 11px; font-size: 1.05rem; }
    .cq-wallet strong { font-size: .92rem; }

    /* Chests: a swipeable row with the next one peeking in, instead of a screen-high stack */
    .cq-chests {
        display: grid; grid-auto-flow: column; grid-auto-columns: 78%; grid-template-columns: none; gap: .75rem;
        margin-inline: -1rem; padding: .3rem 1rem 1rem; overflow-x: auto; overscroll-behavior-x: contain;
        scroll-snap-type: x mandatory; scroll-padding-inline: 1rem; scrollbar-width: none;
    }
    .cq-chests::-webkit-scrollbar { display: none; }
    .cq-chest { scroll-snap-align: start; padding: 1rem; }
    .cq-chest-amount strong { font-size: 1.65rem; }
    .cq-chest:hover { transform: none; }

    .cq-mission { padding: .75rem .8rem; gap: .7rem; }
    .cq-mission-icon { width: 42px; height: 42px; border-radius: 13px; font-size: 1.25rem; }

    /* Tickets: a wider stub so a code stays on one line */
    .cq-ticket-main { padding: .85rem .9rem; }
    .cq-ticket-main strong { font-size: 1.05rem; }
    .cq-ticket-code { flex-basis: 44%; padding: .6rem .5rem; }
    .cq-ticket-code span { font-size: .86rem; letter-spacing: .02em; white-space: nowrap; }
    .cq-ticket { /* notches moved to the wider stub's edge */
        -webkit-mask-image: radial-gradient(circle 10px at 44% 0, transparent 98%, #000), radial-gradient(circle 10px at 44% 100%, transparent 98%, #000);
                mask-image: radial-gradient(circle 10px at 44% 0, transparent 98%, #000), radial-gradient(circle 10px at 44% 100%, transparent 98%, #000);
    }
    .cq-log li { padding: .6rem .7rem; gap: .6rem; }

    /* The confirm sheet comes up from the bottom, like a phone sheet */
    .cq-sheet { width: 100%; max-width: 100%; margin: auto 0 0; }
    .cq-sheet form { padding: 1.2rem 1.2rem calc(1.2rem + env(safe-area-inset-bottom)); border-radius: 26px 26px 0 0; }
    .cq-sheet form::before { content: ""; width: 44px; height: 5px; margin-bottom: .2rem; border-radius: 9px; background: #ddd6fe; }
    .cq-sheet[open] form { animation: cq-rise .35s cubic-bezier(.2, .9, .3, 1); }
    .cq-sheet-icon { width: 60px; height: 60px; font-size: 1.8rem; }
    .cq-win-body { padding: 1.6rem 1.2rem 1.2rem; }
    .cq-win-code span { font-size: 1.25rem; letter-spacing: .06em; }

    /* Not a member yet */
    .cq-join { gap: 1.2rem; padding: 1.6rem 1.1rem; border-radius: 24px; }
    .cq-join p { font-size: .92rem; line-height: 1.8; }
    .cq-join .cq-btn-lg { width: 100%; }
    .cq-join-card { min-height: 190px; }
    .cq-card-mock { width: min(86%, 300px); }
    .cq-how { gap: .5rem; }
    .cq-how-step { padding: .85rem; border-radius: 16px; }
    .cq-how-step .ti { font-size: 1.5rem; }
    .cq-how-step b { font-size: .95rem; }
    .cq-how-step span { font-size: .78rem; }
}
@keyframes cq-rise { from { transform: translateY(100%); } }
@media (max-width: 340px) {
    .cq-wallets { grid-template-columns: 1fr; }
    .cq-badges { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
    .cq *, .cq *::before, .cq *::after { animation: none !important; transition: none !important; }
    .cq-js .cq-sec { opacity: 1; transform: none; }
}
