/* =========================================================================
   Community & trading — trade binder, offers, leaderboards, levels, badge,
   notification channels. Loaded only by templates/community/*.

   The landing's materials, carried into the app: binder pockets with rings,
   iridescent price stickers, rainbow foil rims, card-shaped level badges.
   Motion animates transform/opacity only and stops for reduced motion.
   ========================================================================= */
:root {
  --cm-rainbow: linear-gradient(90deg, #ff9fc4, #ffe08a 20%, #8fe9a6 40%, #9fe3f5 60%, #cec6f6 80%, #ff9fc4);
  --cm-irid: linear-gradient(100deg, #f4fbff 0%, #bfe9ff 16%, #f2ccff 32%, #fff1b8 48%, #b6ffe4 64%, #d3eef8 80%, #f4fbff 100%);
  --cm-sticker: repeating-linear-gradient(128deg, rgba(255, 255, 255, 0.4) 0 1.5px, transparent 1.5px 4.5px),
                linear-gradient(112deg, #fbfdff 0%, #cdefff 18%, #f5d8ff 38%, #fff2c2 56%, #caffea 76%, #eef8ff 100%);
  --cm-card-r: 4.6% / 3.35%;
  --cm-pocket: rgba(211, 238, 248, 0.05);
}
.cm-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.cm-count {
  display: inline-grid; place-items: center; min-width: 1.5rem; height: 1.3rem; padding: 0 0.4rem; margin-left: 0.25rem;
  border-radius: 999px; font-size: 0.7rem; font-weight: 800; vertical-align: 0.15em;
  background: rgba(191, 232, 247, 0.12); color: var(--ice); letter-spacing: 0;
}
.cm-live { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.06em;
  text-transform: uppercase; padding: 0.2rem 0.6rem; border-radius: 999px; color: #101115; background: var(--cm-irid); }
.cm-live i { width: 6px; height: 6px; border-radius: 50%; background: #0c7a4f; box-shadow: 0 0 0 0 rgba(12, 122, 79, 0.5); animation: cm-ping 2.2s ease-out infinite; }
@keyframes cm-ping { 0% { box-shadow: 0 0 0 0 rgba(12, 122, 79, 0.5); } 80%, 100% { box-shadow: 0 0 0 7px rgba(12, 122, 79, 0); } }

/* ------------------------------------------------------------ level badge */
.cm-lvl {
  --lv-bg: linear-gradient(135deg, #e9edf3, #aab3c2 45%, #f4f6f9 70%, #9aa3b3);
  position: relative; display: inline-flex; align-items: center; gap: 0.45rem; overflow: hidden; isolation: isolate;
  padding: 0.18rem 0.6rem 0.18rem 0.22rem; border-radius: 999px; line-height: 1; white-space: nowrap;
  background: rgba(255, 255, 255, 0.06); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14); vertical-align: middle;
}
.cm-lvl-n {
  display: inline-flex; align-items: baseline; gap: 0.12rem; padding: 0.24rem 0.42rem; border-radius: 999px;
  font-weight: 900; font-size: 0.82rem; color: #101115; background: var(--lv-bg);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 2px 8px -3px rgba(0, 0, 0, 0.6); font-variant-numeric: tabular-nums;
}
.cm-lvl-n small { font-size: 0.56rem; letter-spacing: 0.06em; opacity: 0.75; }
.cm-lvl-t { font-size: 0.68rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-dim); }
.cm-lvl.cm-lvl-uncommon { --lv-bg: linear-gradient(135deg, #e6f7fd, #9fdcf2 45%, #f2fbff 70%, #8fd3ee); }
.cm-lvl.cm-lvl-rare { --lv-bg: linear-gradient(135deg, #f1edff, #cec6f6 40%, #bfe8f7 70%, #f6f3ff); }
.cm-lvl.cm-lvl-holo, .cm-lvl.cm-lvl-ultra, .cm-lvl.cm-lvl-secret { --lv-bg: var(--cm-irid); }
.cm-lvl.cm-lvl-holo { box-shadow: inset 0 0 0 1px rgba(191, 232, 247, 0.45); }
.cm-lvl.cm-lvl-ultra { box-shadow: inset 0 0 0 1px rgba(242, 204, 255, 0.55), 0 0 18px -6px rgba(242, 204, 255, 0.6); }
.cm-lvl.cm-lvl-secret { --lv-bg: linear-gradient(110deg, #fff6d2, #ffd76a 30%, #fff1b8 50%, #f2ccff 70%, #bfe9ff);
  box-shadow: inset 0 0 0 1px rgba(255, 215, 106, 0.6), 0 0 22px -6px rgba(255, 215, 106, 0.7); }
.cm-lvl-holo .cm-lvl-t, .cm-lvl-ultra .cm-lvl-t, .cm-lvl-secret .cm-lvl-t {
  background: var(--cm-irid); -webkit-background-clip: text; background-clip: text; color: transparent; }
/* a light sweep crosses the richer tiers, moved by transform only */
.cm-lvl.cm-lvl-ultra::after, .cm-lvl.cm-lvl-secret::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.35) 50%, transparent 65%);
  transform: translateX(-110%); animation: cm-sweep 4.2s ease-in-out infinite 1s;
}
@keyframes cm-sweep { 0% { transform: translateX(-110%); } 45%, 100% { transform: translateX(110%); } }
.cm-lvl.cm-lvl-sm .cm-lvl-n { font-size: 0.74rem; }
.cm-lvl.cm-lvl-xs { padding: 0; background: none; box-shadow: none; }
.cm-lvl.cm-lvl-xs .cm-lvl-n { font-size: 0.66rem; padding: 0.18rem 0.36rem; }
:root[data-theme="light"] .cm-lvl { background: rgba(20, 24, 28, 0.05); box-shadow: inset 0 0 0 1px rgba(20, 24, 28, 0.12); }

/* ---------------------------------------------------------------- stickers */
.cm-sticker {
  display: inline-block; padding: 0.14rem 0.46rem; border-radius: 6px; white-space: nowrap;
  font-weight: 900; font-size: 0.78rem; letter-spacing: -0.01em; font-variant-numeric: tabular-nums;
  color: #15161a; background: var(--cm-sticker); background-size: 220% 220%;
  box-shadow: 0 5px 12px -6px rgba(0, 0, 0, 0.85), inset 0 0 0 1px rgba(255, 255, 255, 0.7);
}
.cm-chips { display: inline-flex; flex-wrap: wrap; gap: 0.25rem; }
.cm-chip { font-size: 0.64rem; font-weight: 800; letter-spacing: 0.04em; padding: 0.1rem 0.38rem; border-radius: 5px;
  color: var(--ink-dim); background: rgba(255, 255, 255, 0.07); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1); }
.cm-chip-grade { color: #101115; background: linear-gradient(120deg, #f1edff, #cec6f6); box-shadow: none; }
:root[data-theme="light"] .cm-chip { background: rgba(20, 24, 28, 0.06); box-shadow: inset 0 0 0 1px rgba(20, 24, 28, 0.12); }
.cm-noart { display: grid; place-items: center; gap: 0.3rem; color: var(--muted); background: #16171b; }
.cm-noart svg { width: 1.3rem; height: 1.3rem; opacity: 0.6; }
.cm-noart small { font-size: 0.6rem; text-transform: uppercase; letter-spacing: 0.08em; }
.cm-thumb { width: 40px; height: 56px; flex: none; border-radius: 4px; object-fit: cover; background: #16171b;
  box-shadow: 0 6px 12px -8px rgba(0, 0, 0, 0.8); }

/* --------------------------------------------------------------- the hero */
.cm-page { position: relative; }
.cm-hero {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: clamp(1rem, 3vw, 2.4rem);
  align-items: center; padding: clamp(1.1rem, 3vw, 2rem); margin-bottom: 1.6rem; border-radius: 26px; overflow: hidden;
  background: radial-gradient(120% 140% at 100% 0%, rgba(191, 232, 247, 0.12), transparent 55%),
              radial-gradient(90% 120% at 0% 100%, rgba(206, 198, 246, 0.1), transparent 60%),
              linear-gradient(160deg, #23252c, #18191d 60%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08), 0 40px 70px -46px rgba(0, 0, 0, 0.9);
}
.cm-hero::before {  /* the rainbow hairline the landing puts between sections */
  content: ""; position: absolute; left: 8%; right: 8%; top: 0; height: 1.5px; background: var(--cm-rainbow);
  -webkit-mask: linear-gradient(90deg, transparent, #000 25%, #000 75%, transparent); mask: linear-gradient(90deg, transparent, #000 25%, #000 75%, transparent);
}
.cm-hero-id { display: flex; align-items: center; gap: 1rem; min-width: 0; }
.cm-hero-id .avatar.lg { box-shadow: 0 0 0 3px #1c1d22, 0 0 0 5px rgba(191, 232, 247, 0.45); }
.cm-hero-name { min-width: 0; }
.cm-hero-name .eyebrow { margin-bottom: 0.3rem; }
.cm-hero h1 { margin: 0; font-weight: 900; letter-spacing: -0.04em; font-size: clamp(1.7rem, 4.2vw, 2.7rem); line-height: 1; overflow-wrap: anywhere; }
.cm-hero-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.7rem; margin-top: 0.45rem; }
.cm-note {
  position: relative; margin: 1.1rem 0 0; padding: 0.7rem 0.95rem; max-width: 40rem; border-radius: 4px 16px 16px 16px;
  color: var(--ink); background: rgba(255, 255, 255, 0.06); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.09);
  overflow-wrap: anywhere;
}
.cm-stats { display: flex; flex-wrap: wrap; gap: 0.6rem 2rem; margin: 1.2rem 0 0; }
.cm-stats div { display: grid; gap: 0.1rem; }
.cm-stats dt { font-size: 0.66rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.cm-stats dd { margin: 0; font-size: 1.6rem; font-weight: 900; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.cm-actions { display: flex; flex-wrap: wrap; gap: 0.55rem; margin-top: 1.2rem; }
.cm-market { margin: 0.9rem 0 0; }
.cm-mk { display: inline-block; margin: 0 0 0 0.35rem; padding: 0.12rem 0.55rem; border-radius: 999px; color: var(--ink-dim);
  box-shadow: inset 0 0 0 1px var(--line-2); text-decoration: none; }
.cm-mk.on { color: #101115; background: var(--cm-irid); box-shadow: none; font-weight: 800; }

/* the QR sign on screen: a white card with a foil rim, like a sticker on a binder */
.cm-qrcard {
  position: relative; margin: 0; width: clamp(150px, 20vw, 210px); padding: 0.75rem 0.75rem 0.7rem; border-radius: 20px;
  background: #fff; color: #101115; text-align: center; transform: rotate(2deg);
  box-shadow: 0 30px 50px -26px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.6);
}
.cm-qrcard::before {
  content: ""; position: absolute; inset: -3px; z-index: -1; border-radius: 23px; background: var(--cm-rainbow);
  filter: blur(0.5px); opacity: 0.9;
}
.cm-qr svg { display: block; width: 100%; height: auto; border-radius: 8px; }
.cm-qrcard figcaption { display: grid; gap: 0.1rem; margin-top: 0.45rem; }
.cm-qrcard figcaption b { font-size: 0.86rem; font-weight: 900; letter-spacing: -0.01em; }
.cm-qrcard figcaption span { font-size: 0.6rem; color: #535a69; overflow-wrap: anywhere; }

/* --------------------------------------------------------------- sections */
.cm-sec { margin: 0 0 2rem; }
.cm-sec-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.7rem 1rem; margin-bottom: 1rem; }
.cm-sec-head h2 { margin: 0; display: flex; align-items: center; gap: 0.5rem; font-weight: 900; letter-spacing: -0.03em; font-size: 1.35rem; }
.cm-sec-head h2 svg { width: 1.2rem; height: 1.2rem; }
.cm-filter { position: relative; display: flex; align-items: center; min-width: min(100%, 15rem); }
.cm-filter svg { position: absolute; left: 0.75rem; width: 1rem; height: 1rem; color: var(--muted); pointer-events: none; }
.cm-filter input { padding-left: 2.2rem; border-radius: 999px; font-size: 0.86rem; padding-top: 0.45rem; padding-bottom: 0.45rem; }
.cm-foot { max-width: 52rem; }

/* -------------------------------------------------------------- the binder */
.cm-binder {
  position: relative; padding: clamp(0.8rem, 2vw, 1.3rem) clamp(0.8rem, 2vw, 1.3rem) clamp(0.9rem, 2vw, 1.4rem) clamp(2.3rem, 4vw, 3.2rem);
  border-radius: 14px 26px 26px 14px;
  background: linear-gradient(150deg, #262930, #181a1e 60%, #141518);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07), inset 16px 0 22px -14px rgba(0, 0, 0, 0.7), 0 44px 80px -44px rgba(0, 0, 0, 0.9);
}
.cm-rings { position: absolute; left: clamp(0.6rem, 1.2vw, 0.9rem); top: 1.2rem; bottom: 1.2rem; display: flex; flex-direction: column; justify-content: space-around; }
.cm-rings i { display: block; width: clamp(14px, 1.6vw, 19px); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffffff, #caced8 28%, #66728d 68%, #363a44); box-shadow: 0 3px 5px rgba(0, 0, 0, 0.6); }
.cm-pockets { list-style: none; margin: 0; padding: 0; display: grid; gap: clamp(0.6rem, 1.4vw, 1rem);
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.cm-pocket { position: relative; display: flex; flex-direction: column; gap: 0.55rem; padding: 0.55rem 0.55rem 0.7rem; border-radius: 8px;
  background: var(--cm-pocket); box-shadow: inset 0 0 0 1px rgba(211, 238, 248, 0.13); }
.cm-pocket::after {  /* the sleeve's sheen */
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(122deg, transparent 18%, rgba(255, 255, 255, 0.1) 30%, transparent 42%, transparent 62%, rgba(255, 255, 255, 0.05) 72%, transparent 82%);
}
.cm-pocket.is-wished { box-shadow: inset 0 0 0 1.5px rgba(255, 224, 138, 0.65), 0 0 26px -12px rgba(255, 224, 138, 0.6); }
.cm-pocket-card { position: relative; display: block; aspect-ratio: 63 / 88; border-radius: var(--cm-card-r); overflow: hidden;
  background: #16171b; box-shadow: 0 14px 24px -14px rgba(0, 0, 0, 0.9); transition: transform 0.35s var(--ease); }
.cm-pocket-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cm-pocket-card .cm-noart { position: absolute; inset: 0; }
.cm-pocket-card::after {  /* foil sweep on hover */
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; mix-blend-mode: color-dodge;
  background: linear-gradient(115deg, transparent 28%, rgba(255, 159, 196, 0.5) 38%, rgba(255, 224, 138, 0.5) 44%,
    rgba(143, 233, 166, 0.5) 50%, rgba(159, 227, 245, 0.55) 56%, rgba(206, 198, 246, 0.5) 62%, transparent 72%);
  transform: translateX(-70%); transition: transform 0.75s var(--ease), opacity 0.3s;
}
.cm-pocket:hover .cm-pocket-card { transform: translateY(-4px) rotate(-0.8deg); }
.cm-pocket:hover .cm-pocket-card::after { opacity: 1; transform: translateX(70%); }
.cm-pocket > .cm-sticker { position: absolute; z-index: 2; top: calc(0.55rem + 58%); right: 0.1rem; transform: rotate(-4deg); font-size: 0.8rem; }
.cm-qty { position: absolute; top: 6px; left: 6px; padding: 0.1rem 0.42rem; border-radius: 999px; font-size: 0.68rem; font-weight: 900;
  color: #101115; background: var(--cm-irid); }
.cm-flag { position: absolute; left: 6px; right: 6px; bottom: 6px; display: flex; align-items: center; justify-content: center; gap: 0.25rem;
  padding: 0.2rem 0.35rem; border-radius: 6px; font-size: 0.62rem; font-weight: 900; letter-spacing: 0.02em;
  color: #2a1f00; background: linear-gradient(100deg, #fff1b8, #ffe08a); box-shadow: 0 4px 10px -4px rgba(0, 0, 0, 0.8); }
.cm-flag svg { width: 0.8rem; height: 0.8rem; }
.cm-flag-have { color: #04311f; background: linear-gradient(100deg, #caffea, #8fe9a6); }
.cm-pocket-meta { position: relative; z-index: 1; display: grid; gap: 0.2rem; min-width: 0; }
.cm-pocket-meta b { font-size: 0.84rem; line-height: 1.2; overflow-wrap: anywhere; }
.cm-ask { display: inline-flex; align-items: center; gap: 0.3rem; justify-self: start; margin-top: 0.25rem; padding: 0.22rem 0.55rem;
  border-radius: 999px; font-size: 0.72rem; font-weight: 800; color: var(--ice); background: rgba(191, 232, 247, 0.08);
  box-shadow: inset 0 0 0 1px rgba(191, 232, 247, 0.28); text-decoration: none; }
.cm-ask:hover { background: rgba(191, 232, 247, 0.16); text-decoration: none; }
.cm-ask svg { width: 0.8rem; height: 0.8rem; }

.cm-wants { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.9rem; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); }
.cm-want { display: grid; gap: 0.25rem; align-content: start; min-width: 0; }
.cm-want-card { position: relative; display: block; aspect-ratio: 63 / 88; border-radius: var(--cm-card-r); overflow: hidden; background: #16171b;
  box-shadow: 0 10px 20px -12px rgba(0, 0, 0, 0.85); transition: transform 0.3s var(--ease); }
.cm-want-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cm-want-card .cm-noart { position: absolute; inset: 0; }
.cm-want-card:hover { transform: translateY(-3px); }
.cm-want { opacity: 0.92; }
.cm-want.is-have .cm-want-card { box-shadow: 0 0 0 2px rgba(143, 233, 166, 0.7), 0 10px 20px -12px rgba(0, 0, 0, 0.85); }
.cm-want-name { font-size: 0.8rem; font-weight: 700; line-height: 1.2; overflow-wrap: anywhere; }
.cm-want .cm-sticker { justify-self: start; font-size: 0.72rem; }

/* ----------------------------------------------------------- manage page */
.cm-manage { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 1.1rem; align-items: start; }
.cm-switch { display: flex; align-items: flex-start; gap: 0.8rem; cursor: pointer; }
.cm-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.cm-switch-ui { position: relative; flex: none; width: 46px; height: 27px; margin-top: 0.1rem; border-radius: 999px;
  background: rgba(255, 255, 255, 0.1); box-shadow: inset 0 0 0 1px var(--line-2); transition: background 0.2s; }
.cm-switch-ui::after { content: ""; position: absolute; top: 3px; left: 3px; width: 21px; height: 21px; border-radius: 50%;
  background: #cfd6e2; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5); transition: transform 0.25s var(--ease), background 0.2s; }
.cm-switch input:checked + .cm-switch-ui { background: var(--cm-irid); box-shadow: none; }
.cm-switch input:checked + .cm-switch-ui::after { transform: translateX(19px); background: #101115; }
.cm-switch input:focus-visible + .cm-switch-ui { outline: 2px solid var(--ice); outline-offset: 2px; }
.cm-switch input:disabled + .cm-switch-ui { opacity: 0.4; }
.cm-qrrow { display: flex; align-items: center; gap: 1.1rem; flex-wrap: wrap; }
.cm-qr-sm { width: 132px; padding: 0.5rem; border-radius: 16px; background: #fff; flex: none;
  box-shadow: 0 0 0 2px rgba(191, 232, 247, 0.4), 0 20px 34px -22px rgba(0, 0, 0, 0.9); }
.cm-qr-sm.is-off { opacity: 0.45; }
.cm-url { overflow-wrap: anywhere; color: var(--ink); }
.cm-list { list-style: none; margin: 0; padding: 0; }
.cm-li { display: flex; align-items: center; gap: 0.8rem; padding: 0.6rem 0; border-bottom: 1px solid var(--line); }
.cm-li:last-child { border-bottom: 0; }
.cm-li-main { display: grid; gap: 0.15rem; min-width: 0; flex: 1; }
.cm-li-main b { font-size: 0.9rem; overflow-wrap: anywhere; }
.cm-li-main a { color: var(--ink); }
.cm-li-val { font-weight: 900; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cm-li form { flex: none; }
.cm-li.is-problem { opacity: 0.75; }
.cm-warn { display: inline-flex; align-items: center; gap: 0.25rem; font-size: 0.74rem; font-weight: 700; color: var(--neg); }
.cm-warn svg { width: 0.85rem; height: 0.85rem; }

/* ------------------------------------------------------ the fairness meter */
.cm-meter {
  position: sticky; top: calc(var(--topbar-h, 60px) + 0.6rem); z-index: 5; display: grid; grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center; gap: 0.6rem 1.2rem; padding: 0.9rem 1.2rem; margin-bottom: 1.1rem; border-radius: 22px;
  background: linear-gradient(180deg, rgba(40, 43, 50, 0.94), rgba(26, 28, 33, 0.94)); backdrop-filter: blur(14px);
  box-shadow: inset 0 0 0 1px var(--line-2), 0 24px 40px -30px rgba(0, 0, 0, 0.95);
}
.cm-meter::after { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none; opacity: 0.55;
  background: var(--cm-rainbow);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); }
.cm-meter.cm-meter-static { position: relative; top: 0; }   /* the offer page: not sticky, never offset */
.cm-meter-side { display: grid; gap: 0.05rem; min-width: 7rem; }
.cm-meter-side small { font-size: 0.64rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.cm-meter-side b { font-size: 1.45rem; font-weight: 900; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.cm-meter-r { text-align: right; }
.cm-meter-mid { display: grid; gap: 0.45rem; justify-items: center; min-width: 0; }
.cm-meter-bar { position: relative; width: 100%; height: 10px; border-radius: 999px; overflow: hidden;
  background: linear-gradient(90deg, rgba(255, 159, 196, 0.35), rgba(206, 198, 246, 0.35)); }
.cm-meter-bar i { position: absolute; right: 0; top: 0; bottom: 0; width: 50%; border-radius: 999px 0 0 999px; background: var(--cm-irid);
  transition: width 0.45s var(--ease); }
.cm-meter-tick { position: absolute; left: 50%; top: -2px; bottom: -2px; width: 2px; background: rgba(255, 255, 255, 0.85); border-radius: 2px; }
.cm-verdict { font-size: 0.82rem; font-weight: 800; text-align: center; }
.cm-meter[data-state="fair"] .cm-verdict { color: var(--pos); }
.cm-meter[data-state="lean"] .cm-verdict { color: var(--ice); }
.cm-meter[data-state="warn"] .cm-verdict { color: var(--warn); }
.cm-meter-note { grid-column: 1 / -1; margin: 0; text-align: center; }
.cm-then { margin: -0.5rem 0 1.1rem; }

/* ------------------------------------------------------------- composer */
.cm-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem; align-items: start; margin-bottom: 1.1rem; }
.cm-col .panel-head { margin-bottom: 0.4rem; flex-wrap: wrap; }
.cm-col .panel-head h3 { display: flex; align-items: center; gap: 0.45rem; }
.cm-col-sub { margin: 0 0 0.8rem; }
.cm-picks { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.45rem; max-height: 34rem; overflow-y: auto; overscroll-behavior: contain;
  padding-right: 0.2rem; }
.cm-pick { display: flex; align-items: center; gap: 0.6rem; padding: 0.45rem 0.6rem 0.45rem 0.45rem; border-radius: 14px;
  background: rgba(255, 255, 255, 0.03); box-shadow: inset 0 0 0 1px var(--line); transition: background 0.18s, box-shadow 0.18s; }
.cm-pick.is-flag { box-shadow: inset 0 0 0 1px rgba(255, 224, 138, 0.35); }
.cm-pick.is-on { background: rgba(191, 232, 247, 0.09); box-shadow: inset 0 0 0 1.5px rgba(191, 232, 247, 0.55); }
.cm-pick-main { display: flex; align-items: center; gap: 0.6rem; flex: 1; min-width: 0; cursor: pointer; }
.cm-pick-main input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.cm-tick { flex: none; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 7px;
  box-shadow: inset 0 0 0 1.5px var(--line-2); color: transparent; transition: background 0.15s; }
.cm-tick svg { width: 14px; height: 14px; }
.cm-pick-main input:checked + .cm-tick { background: var(--cm-irid); color: #101115; box-shadow: none; }
.cm-pick-main input:focus-visible + .cm-tick { outline: 2px solid var(--ice); outline-offset: 2px; }
.cm-pick-text { display: grid; gap: 0.12rem; min-width: 0; }
.cm-pick-text b { font-size: 0.86rem; line-height: 1.2; overflow-wrap: anywhere; }
.cm-pick-tags { display: flex; flex-wrap: wrap; gap: 0.25rem; align-items: center; }
.cm-tag { display: inline-flex; align-items: center; gap: 0.2rem; font-size: 0.62rem; font-weight: 900; padding: 0.1rem 0.4rem; border-radius: 5px;
  color: #2a1f00; background: linear-gradient(100deg, #fff1b8, #ffe08a); }
.cm-tag svg { width: 0.72rem; height: 0.72rem; }
.cm-pick-side { display: grid; justify-items: end; gap: 0.2rem; flex: none; }
.cm-pick-val { font-weight: 900; font-size: 0.9rem; font-variant-numeric: tabular-nums; }
.cm-qtyin { display: inline-flex; align-items: center; gap: 0.2rem; font-size: 0.78rem; color: var(--muted); }
.cm-qtyin input { width: 3.6rem; padding: 0.2rem 0.35rem; border-radius: 8px; font-size: 0.82rem; text-align: center; }
.cm-sendbar { display: grid; gap: 1rem; }
.cm-send { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.cm-send .btn { flex: none; }
.cm-send p { flex: 1; min-width: 14rem; }
.cm-who-lg { display: inline-flex; align-items: center; gap: 0.55rem; font-weight: 800; }
.cm-who { display: inline-flex; align-items: center; gap: 0.4rem; }

/* ----------------------------------------------------------- offer detail */
.cm-status { display: inline-flex; align-items: center; padding: 0.18rem 0.6rem; border-radius: 999px; font-size: 0.7rem; font-weight: 800;
  letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-dim); box-shadow: inset 0 0 0 1px var(--line-2); white-space: nowrap; }
.cm-status-pending { color: #101115; background: var(--cm-irid); box-shadow: none; }
.cm-status-accepted { color: #04311f; background: linear-gradient(100deg, #caffea, #8fe9a6); box-shadow: none; }
.cm-status-declined, .cm-status-withdrawn { color: var(--neg); box-shadow: inset 0 0 0 1px rgba(224, 115, 106, 0.4); }
.cm-status-expired { color: var(--muted); }
.cm-status-countered { color: var(--lav); box-shadow: inset 0 0 0 1px rgba(206, 198, 246, 0.45); }
.cm-actbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.1rem; }
.cm-actbar > p, .cm-actbar > div { flex: 1; min-width: 16rem; }
.cm-actbar .row form { display: inline; }
:root:not([data-theme="light"]) .app .cm-actbar-done { background: linear-gradient(150deg, rgba(143, 233, 166, 0.1), rgba(23, 25, 29, 0.5)); }
.cm-quote { margin: 0 0 1.1rem; padding: 1rem 1.2rem; border-radius: 4px 20px 20px 20px; background: rgba(255, 255, 255, 0.05);
  box-shadow: inset 0 0 0 1px var(--line); }
.cm-quote blockquote { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 0.95rem; }
.cm-quote figcaption { margin-top: 0.4rem; font-size: 0.78rem; color: var(--muted); }
.cm-timeline { list-style: none; margin: 0; padding: 0 0 0 0.3rem; }
.cm-ev { position: relative; display: grid; grid-template-columns: auto 1fr auto; gap: 0.3rem 0.8rem; align-items: baseline; padding: 0.45rem 0 0.45rem 1.2rem; }
.cm-ev::before { content: ""; position: absolute; left: 0.28rem; top: 0; bottom: 0; width: 2px; background: var(--line-2); }
.cm-ev:first-child::before { top: 0.9rem; }
.cm-ev:last-child::before { bottom: calc(100% - 0.9rem); }
.cm-ev-dot { position: absolute; left: 0; top: 0.72rem; width: 0.62rem; height: 0.62rem; border-radius: 50%; background: var(--ice);
  box-shadow: 0 0 0 3px #1c1d22; }
.cm-ev-accepted .cm-ev-dot, .cm-ev-applied .cm-ev-dot { background: var(--pos); }
.cm-ev-declined .cm-ev-dot, .cm-ev-withdrawn .cm-ev-dot { background: var(--neg); }
.cm-ev-expired .cm-ev-dot, .cm-ev-next .cm-ev-dot { background: var(--muted); }
.cm-ev-countered .cm-ev-dot { background: var(--lav); }
.cm-ev > span:not(.cm-ev-dot) { grid-column: 1 / 3; }
.cm-ev time { white-space: nowrap; }
.cm-chain { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.4rem; }
.cm-chain li { display: flex; align-items: center; gap: 0.7rem; flex-wrap: wrap; padding: 0.45rem 0.7rem; border-radius: 12px; box-shadow: inset 0 0 0 1px var(--line); }
.cm-chain li.is-here { box-shadow: inset 0 0 0 1.5px rgba(191, 232, 247, 0.5); background: rgba(191, 232, 247, 0.06); }
.cm-chain a { font-weight: 900; }

/* --------------------------------------------------------------- the list */
.cm-offers { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.7rem; }
.cm-offer { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.4fr) auto; align-items: center; gap: 1rem;
  padding: 0.9rem 1.1rem; border-radius: 20px; color: var(--ink); text-decoration: none;
  background: linear-gradient(180deg, rgba(40, 43, 50, 0.62), rgba(23, 25, 29, 0.46)); box-shadow: inset 0 0 0 1px var(--line);
  transition: transform 0.2s var(--ease), box-shadow 0.2s; }
.cm-offer:hover { text-decoration: none; transform: translateY(-2px); box-shadow: inset 0 0 0 1px rgba(191, 232, 247, 0.4), 0 20px 36px -26px rgba(0, 0, 0, 0.9); }
:root[data-theme="light"] .cm-offer { background: var(--panel); }
.cm-offer-who { display: flex; align-items: center; gap: 0.7rem; min-width: 0; }
.cm-offer-who > span { display: grid; min-width: 0; }
.cm-offer-deal { display: flex; align-items: center; gap: 0.8rem; min-width: 0; }
.cm-offer-side { display: grid; justify-items: start; gap: 0.2rem; }
.cm-offer-side small { font-size: 0.6rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.cm-offer-arrow svg { width: 1.3rem; height: 1.3rem; color: var(--ice); }
.cm-offer-state { display: grid; justify-items: end; gap: 0.3rem; }
.cm-stack { display: flex; height: 50px; padding-left: 12px; }
.cm-stack img, .cm-stack .cm-noart { width: 36px; height: 50px; margin-left: -12px; border-radius: 4px; object-fit: cover;
  box-shadow: 0 0 0 2px #1c1d22, 0 6px 10px -6px rgba(0, 0, 0, 0.9); transform: rotate(calc((var(--i) - 1) * 4deg)); }
.cm-stack-none { color: var(--muted); align-self: center; margin-left: -6px; }

/* ----------------------------------------------------------- leaderboards */
.cm-boardhead { margin-bottom: 1.1rem; }
.cm-boardhead h1 { margin: 0.2rem 0 0.3rem; font-weight: 900; letter-spacing: -0.04em; font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1; }
.cm-boardtabs { display: flex; gap: 0.45rem; overflow-x: auto; padding-bottom: 0.4rem; margin-bottom: 1.2rem; scrollbar-width: thin; }
.cm-boardtabs .chip { flex: none; }
.cm-boardtabs .chip svg { width: 1rem; height: 1rem; }
.cm-board { position: relative; padding: clamp(1rem, 2.6vw, 1.8rem); border-radius: 26px; margin-bottom: 1.1rem;
  background: radial-gradient(90% 90% at 50% 0%, rgba(191, 232, 247, 0.09), transparent 60%), linear-gradient(170deg, #202228, #16171b 70%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08), 0 40px 70px -46px rgba(0, 0, 0, 0.9); }
:root[data-theme="light"] .cm-board { background: var(--panel); box-shadow: var(--shadow-sm); }
.cm-board-head h2 { display: flex; align-items: center; gap: 0.55rem; margin: 0 0 0.35rem; font-weight: 900; letter-spacing: -0.03em; }
.cm-board-head h2 svg { width: 1.35rem; height: 1.35rem; }
.cm-rule { max-width: 46rem; margin: 0 0 1.3rem; }
.cm-podium { list-style: none; margin: 0 0 1.2rem; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.9rem; align-items: end; }
.cm-podium li { position: relative; display: grid; justify-items: center; gap: 0.35rem; padding: 1.5rem 0.8rem 1.1rem; border-radius: 22px; text-align: center; min-width: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02)); box-shadow: inset 0 0 0 1px var(--line); }
.cm-podium .cm-podium-1 { order: 2; padding-top: 2.1rem; padding-bottom: 1.6rem; background: linear-gradient(180deg, rgba(191, 232, 247, 0.14), rgba(255, 255, 255, 0.02)); }
.cm-podium .cm-podium-2 { order: 1; }
.cm-podium .cm-podium-3 { order: 3; }
.cm-podium .cm-podium-1::after { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1.5px; pointer-events: none; background: var(--cm-rainbow);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); }
.cm-podium li.is-me { box-shadow: inset 0 0 0 2px rgba(191, 232, 247, 0.55); }
.cm-medal { position: absolute; top: -0.9rem; display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%;
  font-weight: 900; font-size: 0.95rem; color: #101115; background: var(--cm-irid); box-shadow: 0 6px 14px -6px rgba(0, 0, 0, 0.9), 0 0 0 3px #1b1c21; }
.cm-podium-1 .cm-medal { width: 2.4rem; height: 2.4rem; font-size: 1.1rem; background: linear-gradient(110deg, #fff6d2, #ffd76a 35%, #fff1b8 60%, #f2ccff); }
.cm-podium .avatar.lg { width: 64px; height: 64px; }
.cm-podium-1 .avatar.lg { width: 78px; height: 78px; box-shadow: 0 0 0 3px #1c1d22, 0 0 0 5px rgba(255, 215, 106, 0.6); }
.cm-podium-name { font-weight: 900; color: var(--ink); overflow-wrap: anywhere; line-height: 1.15; }
.cm-podium-metric { margin-top: 0.3rem; font-size: 1.15rem; font-weight: 900; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.cm-podium-1 .cm-podium-metric { font-size: 1.35rem; }
.cm-ranks { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.35rem; }
.cm-rank { display: grid; grid-template-columns: 2.4rem minmax(0, 1fr) auto; align-items: center; gap: 0.7rem; padding: 0.55rem 0.8rem; border-radius: 14px;
  background: rgba(255, 255, 255, 0.025); box-shadow: inset 0 0 0 1px var(--line); }
.cm-rank.is-me { box-shadow: inset 0 0 0 1.5px rgba(191, 232, 247, 0.55); background: rgba(191, 232, 247, 0.06); }
.cm-rank-n { font-weight: 900; color: var(--muted); font-variant-numeric: tabular-nums; text-align: center; }
.cm-rank-who { display: flex; align-items: center; gap: 0.6rem; min-width: 0; }
.cm-rank-name { display: grid; min-width: 0; color: var(--ink); text-decoration: none; }
.cm-rank-name b, .cm-rank-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cm-rank-m { font-weight: 900; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.cm-me { position: relative; display: flex; align-items: center; gap: 1rem; margin: 0 0 1.6rem; padding: 0.8rem 1rem;
  border-radius: 18px; background: rgba(30, 32, 38, 0.95); backdrop-filter: blur(14px); box-shadow: inset 0 0 0 1px rgba(191, 232, 247, 0.4), 0 20px 40px -24px rgba(0, 0, 0, 0.95); }
:root[data-theme="light"] .cm-me { background: rgba(255, 255, 255, 0.96); }
.cm-me-rank { flex: none; display: grid; place-items: center; min-width: 3.2rem; height: 3.2rem; padding: 0 0.5rem; border-radius: 14px;
  font-size: 1.15rem; font-weight: 900; color: #101115; background: var(--cm-irid); }
.cm-me-text { flex: 1; font-size: 0.86rem; min-width: 0; }
.cm-me-m { flex: none; font-weight: 900; font-variant-numeric: tabular-nums; text-align: right; }
.cm-me-sub { display: block; font-weight: 500; }
.cm-optout { display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; flex-wrap: wrap; }

/* ------------------------------------------------------------- level page */
.cm-levelhero { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(1.2rem, 4vw, 3rem); align-items: center; margin-bottom: 1.3rem;
  padding: clamp(1.1rem, 3vw, 2rem); border-radius: 26px;
  background: radial-gradient(110% 120% at 0% 0%, rgba(206, 198, 246, 0.12), transparent 55%), linear-gradient(160deg, #23252c, #18191d 60%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08); }
:root[data-theme="light"] .cm-levelhero { background: var(--panel); box-shadow: var(--shadow-sm); }
.cm-levelcard {
  position: relative; display: grid; align-content: space-between; justify-items: center; width: clamp(150px, 22vw, 200px); aspect-ratio: 63 / 88;
  padding: 1rem 0.8rem; border-radius: var(--cm-card-r); overflow: hidden; isolation: isolate; color: #101115; text-align: center;
  background: linear-gradient(135deg, #e9edf3, #aab3c2 45%, #f4f6f9 70%, #9aa3b3);
  box-shadow: 0 34px 60px -30px rgba(0, 0, 0, 0.95), inset 0 0 0 6px rgba(255, 255, 255, 0.35); transform: rotate(-3deg);
}
.cm-tier-uncommon .cm-levelcard { background: linear-gradient(135deg, #e6f7fd, #9fdcf2 45%, #f2fbff 70%, #8fd3ee); }
.cm-tier-rare .cm-levelcard { background: linear-gradient(135deg, #f1edff, #cec6f6 40%, #bfe8f7 70%, #f6f3ff); }
.cm-tier-holo .cm-levelcard, .cm-tier-ultra .cm-levelcard { background: var(--cm-irid); }
.cm-tier-secret .cm-levelcard { background: linear-gradient(110deg, #fff6d2, #ffd76a 30%, #fff1b8 50%, #f2ccff 70%, #bfe9ff); }
/* the foil bands are still (a moving blended layer leaked out of the rotated
   card in Chromium); the light moving across them is a plain sheen */
.cm-levelcard-foil { position: absolute; inset: 0; z-index: -1; pointer-events: none; mix-blend-mode: soft-light; opacity: 0.85;
  background: repeating-linear-gradient(112deg, hsl(350 95% 72%) 0%, hsl(40 100% 70%) 6%, hsl(80 95% 70%) 12%, hsl(165 95% 70%) 18%, hsl(200 100% 72%) 24%, hsl(265 95% 76%) 30%, hsl(350 95% 72%) 36%); }
.cm-levelcard::after { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, 0.55) 48%, transparent 66%);
  transform: translateX(-120%); animation: cm-sheen 5.5s ease-in-out infinite 0.8s; }
@keyframes cm-sheen { 0% { transform: translateX(-120%); } 55%, 100% { transform: translateX(120%); } }
.cm-levelcard > span:not(.cm-levelcard-foil) { position: relative; z-index: 1; }
.cm-tier-common .cm-levelcard-foil, .cm-tier-uncommon .cm-levelcard-foil { opacity: 0.35; }
.cm-levelcard-tier { font-size: 0.72rem; font-weight: 900; letter-spacing: 0.16em; text-transform: uppercase; }
.cm-levelcard-n { display: grid; font-size: clamp(3.6rem, 9vw, 4.8rem); font-weight: 900; letter-spacing: -0.06em; line-height: 0.85; }
.cm-levelcard-n small { font-size: 0.8rem; letter-spacing: 0.2em; text-transform: uppercase; font-weight: 800; }
.cm-levelcard-xp { font-size: 0.8rem; font-weight: 800; padding: 0.18rem 0.6rem; border-radius: 999px; background: rgba(16, 17, 21, 0.85); color: #f2f6fc; }
.cm-levelnext { margin: 0 0 0.6rem; font-size: 1.05rem; }
.cm-levelnext b { font-size: 1.4rem; font-weight: 900; letter-spacing: -0.02em; }
.cm-xpbar { height: 12px; border-radius: 999px; overflow: hidden; background: rgba(255, 255, 255, 0.08); box-shadow: inset 0 0 0 1px var(--line); }
.cm-xpbar span { display: block; height: 100%; border-radius: inherit; background: var(--cm-rainbow); }
.cm-ladder { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0.35rem; }
.cm-ladder li { display: grid; gap: 0.1rem; padding: 0.45rem 0.5rem; border-radius: 10px; box-shadow: inset 0 0 0 1px var(--line); opacity: 0.55; min-width: 0; }
.cm-ladder li b { font-size: 0.72rem; overflow-wrap: break-word; hyphens: auto; }
/* six rungs need room: three to a row once the level panel is narrower
   than that (a 1024px screen with the sidebar), so "Uncommon" isn't split
   mid-word */
.cm-levelinfo { container: cmlevel / inline-size; }
@container cmlevel (max-width: 560px) { .cm-ladder { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.cm-ladder li.is-done { opacity: 0.85; }
.cm-ladder li.is-here { opacity: 1; box-shadow: inset 0 0 0 1.5px rgba(191, 232, 247, 0.6); background: rgba(191, 232, 247, 0.08); }
.cm-xptable { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.cm-xptable th { font-size: 0.64rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); text-align: left; padding: 0 0.4rem 0.5rem; font-weight: 800; }
.cm-xptable td { padding: 0.55rem 0.4rem; border-top: 1px solid var(--line); }
.cm-xptable .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.cm-xptable tfoot td { font-weight: 900; border-top: 1px solid var(--line-2); }
.cm-achs { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.45rem; }
.cm-ach { display: flex; align-items: center; gap: 0.7rem; padding: 0.55rem 0.7rem; border-radius: 14px; box-shadow: inset 0 0 0 1px var(--line); opacity: 0.6; }
.cm-ach > span:nth-child(2) { display: grid; flex: 1; min-width: 0; }
.cm-ach.is-got { opacity: 1; background: rgba(191, 232, 247, 0.05); box-shadow: inset 0 0 0 1px rgba(191, 232, 247, 0.3); }
.cm-ach-ico { display: grid; place-items: center; width: 2.2rem; height: 2.2rem; border-radius: 50%; flex: none; background: rgba(255, 255, 255, 0.06); }
.cm-ach-ico svg { width: 1.15rem; height: 1.15rem; }
.cm-ach-lock svg { width: 1rem; height: 1rem; color: var(--muted); }

/* ------------------------------------------------------------ badge page */
.cm-badgeprev { display: grid; gap: 0.8rem; }
.cm-badgeprev > div { display: grid; place-items: center; padding: 1.1rem; border-radius: 16px; overflow: hidden; }
.cm-badgeprev img { max-width: 100%; height: auto; }
.cm-badgeprev-dark { background: #0d0e11; box-shadow: inset 0 0 0 1px var(--line); }
.cm-badgeprev-light { background: #eef0f4; }
.cm-code { border-radius: 14px; padding: 0.7rem 0.8rem; background: rgba(0, 0, 0, 0.25); box-shadow: inset 0 0 0 1px var(--line); min-width: 0; }
:root[data-theme="light"] .cm-code { background: rgba(20, 24, 28, 0.04); }
.cm-code-head { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; margin-bottom: 0.45rem; }
.cm-code code { display: block; font-family: var(--mono); font-size: 0.74rem; color: var(--ink-dim); overflow-wrap: anywhere; word-break: break-all; }

/* ---------------------------------------------------------- channel page */
.cm-channels { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr)); gap: 1.1rem; margin-bottom: 1.1rem; }
.cm-channel { display: grid; gap: 0.8rem; align-content: start; }
.cm-channel.is-off { opacity: 0.75; }
.cm-channel-head { display: flex; align-items: center; gap: 0.8rem; }
.cm-channel-head h3 { margin: 0 0 0.15rem; font-weight: 900; overflow-wrap: anywhere; }
.cm-channel-ico { display: grid; place-items: center; width: 2.6rem; height: 2.6rem; flex: none; border-radius: 14px; background: rgba(191, 232, 247, 0.1); }
.cm-channel-ico svg { width: 1.35rem; height: 1.35rem; }
.cm-masked { display: block; font-family: var(--mono); font-size: 0.74rem; color: var(--muted); overflow-wrap: anywhere; }
.cm-channel-stat { margin: 0; }
.cm-channel-stat svg { width: 0.85rem; height: 0.85rem; vertical-align: -0.12em; }
.cm-kinds { display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; margin: 0; padding: 0; border: 0; }
.cm-kinds legend { width: 100%; padding: 0; margin-bottom: 0.3rem; }
.cm-channel-form { display: grid; gap: 0.7rem; }
.cm-channel-form .row { align-items: flex-end; }
.cm-channel-acts form { display: inline; }
.cm-kindpick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.7rem; margin: 0; padding: 0; border: 0; }
.cm-kindopt { position: relative; cursor: pointer; }
.cm-kindopt input { position: absolute; opacity: 0; }
.cm-kindopt > span { display: grid; grid-template-columns: auto 1fr; column-gap: 0.6rem; align-items: center; padding: 0.8rem 0.9rem; border-radius: 16px;
  box-shadow: inset 0 0 0 1px var(--line-2); transition: box-shadow 0.18s, background 0.18s; }
.cm-kindopt svg { grid-row: span 2; width: 1.5rem; height: 1.5rem; }
.cm-kindopt small { color: var(--muted); font-size: 0.76rem; }
.cm-kindopt input:checked + span { background: rgba(191, 232, 247, 0.08); box-shadow: inset 0 0 0 1.5px rgba(191, 232, 247, 0.6); }
.cm-kindopt input:focus-visible + span { outline: 2px solid var(--ice); outline-offset: 2px; }
.cm-howto ol { margin: 0; padding-left: 1.2rem; display: grid; gap: 0.25rem; }
.cm-howto code { font-family: var(--mono); font-size: 0.85em; }

/* ------------------------------------------------------------- responsive */
@media (max-width: 900px) {
  .cm-manage, .cm-cols { grid-template-columns: minmax(0, 1fr); }
  .cm-offer { grid-template-columns: minmax(0, 1fr) auto; }
  .cm-offer-deal { grid-column: 1 / -1; order: 3; }
}
@media (max-width: 640px) {
  .cm-hero { grid-template-columns: minmax(0, 1fr); border-radius: 20px; }
  .cm-qrcard { justify-self: center; width: min(60vw, 210px); transform: rotate(0deg); }
  .cm-stats dd { font-size: 1.3rem; }
  .cm-pockets { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cm-binder { padding-left: 2rem; border-radius: 12px 20px 20px 12px; }
  .cm-wants { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.7rem; }
  .cm-meter { grid-template-columns: 1fr 1fr; top: calc(var(--topbar-h, 60px) + 0.3rem); padding: 0.75rem 0.9rem; border-radius: 18px; }
  .cm-meter-mid { grid-column: 1 / -1; grid-row: 2; }
  .cm-meter-side { min-width: 0; }
  .cm-meter-side b { font-size: 1.15rem; }
  .cm-picks { max-height: none; }
  .cm-pick-side { justify-items: end; }
  .cm-podium { grid-template-columns: minmax(0, 1fr); gap: 1.3rem; }
  .cm-podium li { order: 0 !important; grid-template-columns: auto minmax(0, 1fr); justify-items: start; text-align: left; padding: 1rem; column-gap: 0.8rem; }
  .cm-podium li .avatar { grid-row: span 3; }
  .cm-podium .avatar.lg, .cm-podium-1 .avatar.lg { width: 54px; height: 54px; }
  .cm-medal { top: -0.7rem; left: 0.6rem; }
  .cm-podium-metric { grid-column: 2; }
  .cm-levelhero { grid-template-columns: minmax(0, 1fr); justify-items: center; }
  .cm-levelinfo { width: 100%; }
  .cm-ladder { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cm-kindpick { grid-template-columns: minmax(0, 1fr); }
  .cm-me { flex-wrap: wrap; }
  .cm-offer { padding: 0.8rem; gap: 0.7rem; }
  .cm-offer-state { justify-items: end; }
  .cm-li { flex-wrap: wrap; }
  .cm-li-main { flex-basis: calc(100% - 60px); }
}

@media (prefers-reduced-motion: reduce) {
  .cm-lvl.cm-lvl-ultra::after, .cm-lvl.cm-lvl-secret::after, .cm-levelcard::after, .cm-live i { animation: none; }
  .cm-pocket-card, .cm-pocket-card::after, .cm-offer, .cm-want-card { transition: none; }
}

/* ------------------------------------------------------------------ print
   The trade binder prints as a sign to tape to a binder: a big QR code, the
   collector's name and link, then the lists as text. Nothing else. */
.cm-print { display: none; }
@media print {
  @page { margin: 12mm; }
  html, body { background: #fff !important; color: #000 !important; }
  body::before, body::after { display: none !important; }
  .sidebar, .topbar, .mobile-nav, .mkt-head, .mkt-foot, .toast-wrap, .skip, .cm-noprint, #cmd-overlay, #cmd-modal { display: none !important; }
  .app { display: block !important; }
  .appmain, .mkt-main { padding: 0 !important; max-width: none !important; width: auto !important; }
  .cm-print { display: block !important; color: #000; font-family: var(--font); }
  .cm-print-sign { display: flex; align-items: center; gap: 10mm; padding: 8mm; border: 1.2mm solid #000; border-radius: 6mm; break-inside: avoid; }
  .cm-print-qr { width: 70mm; flex: none; }
  .cm-print-qr svg { width: 100%; height: auto; display: block; }
  .cm-print-eyebrow { margin: 0 0 3mm; font-size: 9pt; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; }
  .cm-print-name { margin: 0; font-size: 26pt; font-weight: 900; line-height: 1.05; letter-spacing: -0.02em; }
  .cm-print-user { margin: 1mm 0 5mm; font-size: 13pt; }
  .cm-print-cta { margin: 0 0 3mm; font-size: 12pt; }
  .cm-print-url { margin: 0; font-size: 10pt; font-family: var(--mono); word-break: break-all; }
  .cm-print-h { margin: 8mm 0 2mm; font-size: 12pt; font-weight: 900; }
  .cm-print-list { margin: 0; padding-left: 6mm; columns: 2; column-gap: 8mm; font-size: 9.5pt; line-height: 1.45; }
  .cm-print-list li { break-inside: avoid; }
  .cm-print-list small { color: #444; }
}

/* trade matches (templates/social/trades.html): a row per collector with a
   "Propose" button that opens an offer with the matching cards picked */
.cm-match { gap: 0.7rem; flex-wrap: wrap; }
.cm-match-who { display: flex; align-items: center; gap: 0.7rem; flex: 1; min-width: 12rem; color: inherit; text-decoration: none; }
.cm-match-who:hover { text-decoration: none; }
.cm-match-who .grow { display: grid; min-width: 0; }

/* "Copy as" Reddit / Cardmarket / TCGplayer: a small segmented control */
.cm-copyas { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 0.3rem; padding: 0.22rem; border-radius: 999px;
  background: rgba(255, 255, 255, 0.04); box-shadow: inset 0 0 0 1px var(--line); }
.cm-copyas-label { display: inline-flex; align-items: center; gap: 0.3rem; padding: 0 0.35rem 0 0.5rem; font-size: 0.72rem;
  font-weight: 800; letter-spacing: 0.04em; color: var(--muted); }
.cm-copyas-label svg { width: 0.9rem; height: 0.9rem; }
.cm-copybtn { display: inline-flex; align-items: center; padding: 0.3rem 0.7rem; border-radius: 999px; font-size: 0.78rem; font-weight: 800;
  color: var(--ink); text-decoration: none; background: rgba(255, 255, 255, 0.06); transition: background 0.15s; }
.cm-copybtn:hover { background: rgba(191, 232, 247, 0.16); text-decoration: none; }
.cm-copybtn.is-done { color: #04311f; background: linear-gradient(100deg, #caffea, #8fe9a6); }
:root[data-theme="light"] .cm-copyas { background: rgba(20, 24, 28, 0.03); }
:root[data-theme="light"] .cm-copybtn { background: rgba(20, 24, 28, 0.06); }
.cm-privacy { margin-top: 0.1rem; }
@media (max-width: 640px) {
  .cm-copyas { display: flex; width: 100%; flex-wrap: nowrap; }
  .cm-copyas-label { padding: 0 0.2rem 0 0.4rem; font-size: 0; gap: 0; }
  .cm-copyas-label svg { width: 1rem; height: 1rem; }
  .cm-copybtn { flex: 1; justify-content: center; padding: 0.38rem 0.3rem; font-size: 0.74rem; }
  .cm-sec-head { gap: 0.6rem; }
}

/* Animated, blended foil layers must stay inside their card. overflow:hidden
   alone let the level card's moving soft-light layer paint over the whole
   page in Chromium (the card is rotated); paint containment always clips. */
.cm-levelcard, .cm-lvl, .cm-pocket-card, .cm-want-card { contain: paint; }
.cm-offer-side { min-width: 0; }
.cm-offer-what { max-width: 11rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cm-send .btn:disabled, .cm-actbar .btn:disabled { opacity: 0.45; cursor: not-allowed; filter: grayscale(0.7); box-shadow: none; }

/* trade matches: the two panels' headings are h2s under the page's h1, at
   the size panel heads have */
.cm-matches .panel-head h2 { font-size: 1.08rem; display: flex; align-items: center; gap: 0.45rem; }
/* the profile's panel headings: h2s under the page's h1, at panel-head size */
.cm-ph h2 { font-size: 1.08rem; }
