/* ============================================================================
   BFL Hub — UI V2 · Club Management (#/clubs, see clubs.js)

   A workspace, so it is quieter than the league's pages: one column of calm
   cards on the night background, the competition's colour used as a thin
   accent (a chip, an edge, the club sheet's glow) and never as a fill, and
   every control the site's own (v2-btn, v2-seg, v2-input). Nothing here leans
   or glows on hover beyond a lifted edge — it is a desk, not a poster.
   ========================================================================= */

.cm-page { width: 100%; max-width: 1240px; margin: 0 auto; padding-bottom: 80px; }
.cm-page .v2-phead { margin-bottom: 18px; }
.cm-mark { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 18px; background: var(--v2-card); box-shadow: var(--v2-card-edge); color: #fff; }
.cm-body { display: flex; flex-direction: column; gap: 18px; }
.cm-faint { color: var(--v2-text-3); }
.cm-spin { width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .14); border-top-color: #fff; animation: cm-spin .8s linear infinite; flex: none; }
@keyframes cm-spin { to { transform: rotate(360deg); } }
.cm-loading { display: flex; align-items: center; gap: 12px; padding: 48px 4px; color: var(--v2-text-2); }

/* ------------------------------------------------------------ the sections */
.cm-nav {
  position: sticky; top: calc(var(--v2-top, 64px) + 8px); z-index: 5;
  display: flex; gap: 4px; margin: 0 0 22px; padding: 5px;
  border-radius: 999px; background: rgba(12, 14, 17, .78); box-shadow: var(--v2-card-edge), var(--v2-depth-1);
  -webkit-backdrop-filter: var(--v2-blur); backdrop-filter: var(--v2-blur);
  overflow-x: auto; scrollbar-width: none;
}
.cm-nav::-webkit-scrollbar { display: none; }
.cm-nav-i {
  display: inline-flex; align-items: center; gap: 8px; flex: 1 0 auto; justify-content: center;
  min-height: 40px; padding: 0 18px; border-radius: 999px;
  color: var(--v2-text-2); font: 700 .8125rem/1 var(--v2-font); text-decoration: none; white-space: nowrap;
  transition: color var(--v2-t-fast), background var(--v2-t-fast);
}
.cm-nav-i:hover { color: #fff; background: rgba(255, 255, 255, .05); }
.cm-nav-i.is-on { color: #050608; background: #fff; }
.cm-nav-i em { font-style: normal; font-size: .6875rem; font-variant-numeric: tabular-nums; padding: 2px 7px; border-radius: 999px; background: rgba(255, 255, 255, .1); }
.cm-nav-i.is-on em { background: rgba(0, 0, 0, .1); }

/* ------------------------------------------------------------ cards */
.cm-card {
  display: flex; flex-direction: column; gap: 14px; min-width: 0;
  padding: 20px 22px; border-radius: var(--v2-r-lg);
  background: var(--v2-card); box-shadow: var(--v2-card-edge);
}
.cm-card-h { display: flex; align-items: center; gap: 10px; min-height: 28px; }
.cm-card-h h3 { margin: 0; color: #fff; font: 800 .9375rem/1.2 var(--v2-font); letter-spacing: -.005em; }
.cm-card-meta { color: var(--v2-text-3); font-size: .8125rem; }
.cm-card.is-form { box-shadow: var(--v2-card-edge-hi); }
.cm-fold > summary { list-style: none; cursor: pointer; }
.cm-fold > summary::-webkit-details-marker { display: none; }
.cm-fold .cm-fold-i { color: var(--v2-text-3); transition: transform var(--v2-t) var(--v2-ease-out); }
.cm-fold[open] .cm-fold-i { transform: rotate(180deg); }
.cm-fold:not([open]) { gap: 0; }
.cm-sub { display: flex; flex-direction: column; gap: 10px; }
.cm-sub + .cm-sub { padding-top: 16px; border-top: 1px solid var(--v2-line); }
.cm-val { margin: 0; color: #fff; font-weight: 600; }
.cm-big { margin: 0; color: #fff; font: 800 1.35rem/1.1 var(--v2-font); font-variant-numeric: tabular-nums; }
.cm-note { margin: 0; color: var(--v2-text-3); font-size: .8125rem; line-height: 1.45; }
.cm-err { margin: 0; color: var(--v2-loss); font-size: .875rem; }
.cm-lock { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--v2-text-3); font-size: .8125rem; }
.cm-btns { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.cm-preview { color: var(--v2-text-2); font-size: .875rem; }
.cm-preview b { color: #fff; font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------ fields */
.cm-in {
  appearance: none; width: 100%; min-width: 0; min-height: 40px; padding: 0 14px;
  border-radius: 12px; border: 1px solid var(--v2-edge); background: rgba(0, 0, 0, .32);
  color: #fff; font: 500 .875rem/1.2 var(--v2-font);
  transition: border-color var(--v2-t-fast), box-shadow var(--v2-t-fast);
}
.cm-in::placeholder { color: var(--v2-text-3); }
.cm-in:focus { outline: none; border-color: rgba(255, 255, 255, .35); box-shadow: 0 0 0 4px rgba(255, 255, 255, .06); }
.cm-in[readonly] { opacity: .6; }
.cm-in.is-num { font-variant-numeric: tabular-nums; }
select.cm-in { padding-right: 34px; background-image: linear-gradient(45deg, transparent 50%, rgba(255, 255, 255, .5) 50%), linear-gradient(135deg, rgba(255, 255, 255, .5) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
select.cm-in option { background: #15181c; color: #fff; }
.cm-area { min-height: 120px; padding: 12px 14px; line-height: 1.5; resize: vertical; }
.cm-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.cm-form.is-stack { grid-template-columns: 1fr; }
.cm-f { position: relative; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.cm-f > span { color: var(--v2-text-3); font-size: .6875rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.cm-f.is-wide { grid-column: 1 / -1; }
.cm-count { position: absolute; right: 12px; bottom: 10px; color: var(--v2-text-3); font-size: .6875rem; font-style: normal; pointer-events: none; }
.cm-inline { display: flex; align-items: center; gap: 8px; }
.cm-inline .cm-in { flex: 1; }
.cm-unit { color: var(--v2-text-3); font-size: .8125rem; white-space: nowrap; }
.cm-kind { align-self: flex-start; }

/* ------------------------------------------------------------ chips and pills */
.cm-div { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; min-height: 24px; padding: 0 10px 0 6px; border-radius: 999px; background: color-mix(in srgb, var(--cm-c, #888) 16%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--cm-c, #888) 40%, transparent); color: #fff; font: 700 .6875rem/1 var(--v2-font); letter-spacing: .04em; }
.cm-div img { width: 16px; height: 16px; object-fit: contain; }
.cm-pill { display: inline-flex; align-items: center; min-height: 24px; padding: 0 10px; border-radius: 999px; background: rgba(255, 255, 255, .06); color: var(--v2-text-2); font: 600 .75rem/1 var(--v2-font); white-space: nowrap; font-variant-numeric: tabular-nums; }
.cm-pill.is-warn { background: rgba(245, 184, 75, .12); color: var(--v2-warn); }
.cm-pill.is-bad { background: rgba(255, 107, 107, .12); color: var(--v2-loss); }
.cm-pill.is-ok { background: rgba(52, 211, 153, .12); color: var(--v2-win); }

/* ------------------------------------------------------------ crests */
.cm-crest { flex: none; width: 32px; height: 32px; object-fit: contain; }
.cm-crest.is-xs { width: 20px; height: 20px; }
.cm-crest.is-sm { width: 28px; height: 28px; }
.cm-crest.is-md { width: 44px; height: 44px; }
.cm-crest.is-xl { width: 96px; height: 96px; }
.cm-crest.is-ph, .cm-crest.ph { display: inline-grid; place-items: center; border-radius: 50%; background: rgba(255, 255, 255, .08); color: var(--v2-text-2); font-weight: 800; font-size: .75rem; }
.cm-crest.is-ph.is-xl, .cm-crest.ph.is-xl { font-size: 2rem; }

/* ============================================================ CLUBS */
.cm-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.cm-search { position: relative; flex: 1 1 280px; display: flex; align-items: center; }
.cm-search .v2-ic { position: absolute; left: 16px; color: var(--v2-text-3); pointer-events: none; }
.cm-search .v2-input { padding-left: 44px; }
.cm-search.is-sm .v2-input { min-height: 38px; }
.cm-group { display: flex; flex-direction: column; gap: 12px; }
.cm-group + .cm-group { margin-top: 12px; }
.cm-group-h { display: flex; align-items: center; gap: 10px; padding: 0 2px; }
.cm-group-h img { width: 24px; height: 24px; object-fit: contain; }
.cm-group-h b { color: #fff; font: 800 1rem/1 var(--v2-font); }
.cm-group-h span { color: var(--v2-text-3); font-size: .8125rem; }
.cm-clubs { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.cm-club {
  position: relative; display: flex; flex-direction: column; gap: 16px; padding: 16px 18px;
  border-radius: var(--v2-r); background: radial-gradient(120% 90% at 0% 0%, color-mix(in srgb, var(--cm-c, #888) 13%, transparent), transparent 58%), var(--v2-card); box-shadow: var(--v2-card-edge);
  color: #fff; text-decoration: none; overflow: hidden;
  transition: box-shadow var(--v2-t-fast), transform var(--v2-t) var(--v2-ease-out);
}
.cm-club:hover { box-shadow: var(--v2-card-edge-hi), var(--v2-card-lift); transform: translateY(-2px); }
.cm-club-top { display: flex; align-items: center; gap: 12px; min-width: 0; }
.cm-club-id { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.cm-club-id b { font-size: .9375rem; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cm-club-id span { color: var(--v2-text-3); font-size: .8125rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cm-go { color: var(--v2-text-3); transition: transform var(--v2-t) var(--v2-ease-out), color var(--v2-t-fast); }
.cm-club:hover .cm-go { color: #fff; transform: translateX(3px); }
.cm-club-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding-top: 12px; border-top: 1px solid var(--v2-line); }
.cm-club-facts span { display: flex; flex-direction: column; gap: 3px; color: var(--v2-text-3); font-size: .6875rem; font-weight: 600; letter-spacing: .04em; }
.cm-club-facts b { color: #fff; font-size: .875rem; font-weight: 800; letter-spacing: 0; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ------------------------------------------------------ one club */
.cm-hero {
  position: relative; display: flex; flex-direction: column; gap: 22px; padding: 22px 26px 24px;
  border-radius: var(--v2-r-xl); overflow: hidden; isolation: isolate;
  background: radial-gradient(90% 140% at 0% 0%, color-mix(in srgb, var(--cm-c, #888) 22%, transparent), transparent 60%), var(--v2-card);
  box-shadow: var(--v2-card-edge-hi);
}
.cm-hero-mark { position: absolute; right: -30px; top: -30px; z-index: -1; width: 240px; height: 240px; object-fit: contain; opacity: .06; filter: grayscale(.2); }
.cm-back { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; color: var(--v2-text-2); font-size: .8125rem; font-weight: 700; text-decoration: none; }
.cm-back:hover { color: #fff; }
.cm-hero-main { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.cm-hero-crest { position: relative; flex: none; }
.cm-badge-btn { position: absolute; right: -4px; bottom: -4px; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: #fff; color: #050608; cursor: pointer; box-shadow: 0 6px 16px rgba(0, 0, 0, .5); }
.cm-hero-id { display: flex; flex-direction: column; gap: 8px; flex: 1; min-width: 220px; }
.cm-hero-name { margin: 0; color: #fff; font: 800 clamp(1.6rem, 1.2rem + 1.6vw, 2.4rem)/1.05 var(--v2-display); letter-spacing: -.01em; }
.cm-hero-sub { margin: 0; color: var(--v2-text-2); font-size: .875rem; }
.cm-hero-sub b { color: #fff; }
.cm-hero-act { display: flex; gap: 8px; }
.cm-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; border-radius: var(--v2-r); overflow: hidden; background: var(--v2-line); }
.cm-stats span { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; background: rgba(8, 10, 12, .72); color: var(--v2-text-3); font-size: .6875rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.cm-stats b { color: #fff; font: 800 1.125rem/1.1 var(--v2-font); letter-spacing: 0; text-transform: none; font-variant-numeric: tabular-nums; }
.cm-cols { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.cm-col { display: flex; flex-direction: column; gap: 18px; min-width: 0; }

.cm-rows { display: flex; flex-direction: column; margin: 0 -10px; padding: 0; list-style: none; }
.cm-row { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 6px 10px; border-radius: 12px; }
.cm-row + .cm-row { box-shadow: 0 -1px 0 var(--v2-line); }
.cm-row:hover { background: rgba(255, 255, 255, .025); }
.cm-row-who { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.cm-row-who .v2-av { width: 32px; height: 32px; flex: none; }
.cm-row-who > span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cm-row-who b { color: #fff; font-size: .875rem; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cm-row-who em { color: var(--v2-text-3); font-size: .75rem; font-style: normal; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.cm-owners { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }
.cm-owners li { display: grid; grid-template-columns: minmax(0, 1fr) 84px auto auto; align-items: center; gap: 8px; }
.cm-owners li > b { color: #fff; font-size: .875rem; }
.cm-owners li > .cm-faint { font-size: .8125rem; grid-column: 2 / -1; }
.cm-share { position: relative; display: flex; align-items: center; }
.cm-share .cm-in { padding-right: 24px; }
.cm-share span { position: absolute; right: 10px; color: var(--v2-text-3); font-size: .75rem; pointer-events: none; }
.cm-tog { display: inline-flex; align-items: center; gap: 6px; padding: 0 4px; color: var(--v2-text-2); font-size: .75rem; font-weight: 700; cursor: pointer; user-select: none; }
.cm-tog input { width: 16px; height: 16px; accent-color: #fff; }

.cm-record { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; list-style: none; }
.cm-record li { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; align-items: baseline; color: var(--v2-text-2); font-size: .8125rem; }
.cm-record li em { display: block; margin-top: 2px; color: var(--v2-text-3); font-size: .75rem; font-style: normal; }
.cm-record li.is-off { opacity: .5; }
.cm-record li.is-off .cm-amt { text-decoration: line-through; }
.cm-amt { color: var(--v2-loss); font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }
.cm-amt.is-pts { color: var(--v2-warn); }
.cm-record .cm-amt { text-align: left; }

/* ============================================================ LEDGERS */
.cm-ledger { display: flex; flex-direction: column; margin: 0 -10px; padding: 0; list-style: none; }
.cm-ledger li { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto 110px 92px; align-items: center; gap: 14px; min-height: 58px; padding: 8px 10px; border-radius: 12px; }
.cm-ledger li + li { box-shadow: 0 -1px 0 var(--v2-line); }
.cm-ledger li:hover { background: rgba(255, 255, 255, .025); }
.cm-ledger li.is-off .cm-led-id, .cm-ledger li.is-off .cm-amt { opacity: .45; }
.cm-ledger li.is-off .cm-amt { text-decoration: line-through; }
.cm-ledger li > .v2-btn, .cm-ledger li > .cm-pill { justify-self: end; }
.cm-led-id { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cm-led-id b { color: #fff; font-size: .875rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cm-led-id span { color: var(--v2-text-2); font-size: .8125rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cm-led-meta { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 4px 8px; color: var(--v2-text-3); font-size: .75rem; text-align: right; }
.cm-led-meta em { font-style: normal; }
.cm-group .cm-ledger { padding: 6px 10px; margin: 0; border-radius: var(--v2-r-lg); background: var(--v2-card); box-shadow: var(--v2-card-edge); }

.cm-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.cm-tile { display: flex; flex-direction: column; gap: 8px; padding: 16px 18px; border-radius: var(--v2-r); background: var(--v2-card); box-shadow: var(--v2-card-edge); }
.cm-tile span { color: var(--v2-text-3); font-size: .6875rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.cm-tile b { color: #fff; font: 800 1.35rem/1 var(--v2-font); font-variant-numeric: tabular-nums; }

/* ============================================================ MESSAGES */
.cm-msg { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 440px); gap: 18px; align-items: start; }
.cm-sticky { position: sticky; top: calc(var(--v2-top, 64px) + 76px); display: flex; flex-direction: column; gap: 12px; }
.cm-send { width: 100%; }
.cm-send[disabled] { opacity: .4; pointer-events: none; }

.cm-divs { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.cm-divbtn {
  appearance: none; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 14px; border: 0; border-radius: var(--v2-r);
  background: rgba(255, 255, 255, .03); box-shadow: inset 0 0 0 1px var(--v2-edge); color: #fff; font: inherit; text-align: left; cursor: pointer;
  transition: box-shadow var(--v2-t-fast), background var(--v2-t-fast);
}
.cm-divbtn img { width: 34px; height: 34px; object-fit: contain; }
.cm-divbtn b { font-size: .875rem; font-weight: 800; }
.cm-divbtn span { color: var(--v2-text-3); font-size: .75rem; }
.cm-divbtn:hover { background: rgba(255, 255, 255, .055); }
.cm-divbtn.is-on { background: color-mix(in srgb, var(--cm-c, #888) 14%, transparent); box-shadow: inset 0 0 0 2px var(--cm-c, #fff); }

.cm-pick { display: flex; flex-direction: column; gap: 10px; }
.cm-pick-bar { display: flex; align-items: center; gap: 10px; }
.cm-pick-bar .cm-faint { font-size: .8125rem; white-space: nowrap; }
.cm-chips { display: flex; flex-wrap: wrap; gap: 6px; max-height: 260px; overflow: auto; padding: 2px; }
.cm-chip {
  appearance: none; display: inline-flex; align-items: center; gap: 7px; min-height: 34px; padding: 0 12px 0 7px; border: 0; border-radius: 999px;
  background: rgba(255, 255, 255, .04); box-shadow: inset 0 0 0 1px var(--v2-edge); color: var(--v2-text-2); font: 600 .8125rem/1 var(--v2-font); cursor: pointer;
  transition: background var(--v2-t-fast), box-shadow var(--v2-t-fast), color var(--v2-t-fast);
}
.cm-chip:hover { color: #fff; background: rgba(255, 255, 255, .07); }
.cm-chip.is-on { color: #fff; background: color-mix(in srgb, var(--cm-c, #888) 18%, transparent); box-shadow: inset 0 0 0 1.5px var(--cm-c, #fff); }

.cm-pic { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 14px; background: rgba(0, 0, 0, .3); box-shadow: inset 0 0 0 1px var(--v2-edge); }
.cm-pic img { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; }
.cm-pic span { flex: 1; min-width: 0; color: var(--v2-text-2); font-size: .8125rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.cm-who { display: flex; flex-direction: column; gap: 12px; padding: 16px 18px; border-radius: var(--v2-r-lg); background: var(--v2-card); box-shadow: var(--v2-card-edge); }
.cm-who.is-idle p, .cm-who.is-busy p { margin: 0; color: var(--v2-text-3); font-size: .875rem; }
.cm-who.is-busy { flex-direction: row; align-items: center; }
.cm-who header { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; }
.cm-who header b { color: #fff; font: 800 1.05rem/1 var(--v2-font); }
.cm-who header > span:not(.cm-pill) { color: var(--v2-text-3); font-size: .8125rem; }
.cm-who header .cm-pill { margin-left: auto; }
.cm-people { display: flex; flex-direction: column; gap: 2px; max-height: 300px; overflow: auto; margin: 0 -6px; padding: 0; list-style: none; }
.cm-people li { display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: 10px; }
.cm-people li > span:nth-child(2) { display: flex; flex-direction: column; gap: 1px; flex: 1; min-width: 0; }
.cm-people b { color: #fff; font-size: .8125rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cm-people em { color: var(--v2-text-3); font-size: .75rem; font-style: normal; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cm-av-l { display: grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 50%; background: rgba(255, 255, 255, .08); color: var(--v2-text-2); font-size: .75rem; font-weight: 800; }
.cm-via { flex: none; padding: 3px 8px; border-radius: 999px; background: rgba(52, 211, 153, .1); color: var(--v2-win); font-size: .6875rem; font-weight: 700; }
.cm-via.is-soft { background: rgba(255, 255, 255, .06); color: var(--v2-text-2); }
.cm-gone { display: flex; flex-direction: column; gap: 8px; padding-top: 12px; border-top: 1px solid var(--v2-line); }
.cm-gone ul { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }
.cm-gone li { display: grid; grid-template-columns: auto 1fr; gap: 0 8px; font-size: .8125rem; }
.cm-gone li b { color: #fff; }
.cm-gone li span { color: var(--v2-text-3); }
.cm-gone li em { grid-column: 1 / -1; color: var(--v2-warn); font-style: normal; font-size: .75rem; }

.cm-result { gap: 12px; }
.cm-result.is-ok { box-shadow: inset 0 0 0 1px rgba(52, 211, 153, .35); }
.cm-result.is-bad { box-shadow: inset 0 0 0 1px rgba(255, 107, 107, .35); }
.cm-result-h { display: flex; align-items: center; gap: 14px; }
.cm-result-h > div { display: flex; flex-direction: column; gap: 3px; }
.cm-result-h b { color: #fff; font: 800 1.05rem/1.1 var(--v2-font); }
.cm-result-h > div span { color: var(--v2-text-3); font-size: .8125rem; }
.cm-result-ic { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: rgba(52, 211, 153, .14); color: var(--v2-win); }
.cm-result.is-bad .cm-result-ic { background: rgba(255, 107, 107, .14); color: var(--v2-loss); }

/* ------------------------------------------------------------ the Discord preview
   Discord's own dark theme, so the preview reads as the DM it will be. */
.cm-dc { padding: 16px 16px 18px 12px; border-radius: var(--v2-r-lg); background: #313338; box-shadow: var(--v2-card-edge), var(--v2-depth-1); font-family: "gg sans", "Noto Sans", "Helvetica Neue", Helvetica, Arial, sans-serif; color: #dbdee1; }
.cm-dc-msg { display: flex; gap: 14px; }
.cm-dc-av { flex: none; width: 40px; height: 40px; border-radius: 50%; background: #1e1f22; object-fit: contain; }
.cm-dc-body { flex: 1; min-width: 0; }
.cm-dc-name { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.cm-dc-name b { color: #f2f3f5; font-size: .9375rem; font-weight: 600; }
.cm-dc-app { padding: 1px 5px; border-radius: 4px; background: #5865f2; color: #fff; font-size: .6875rem; font-weight: 700; line-height: 1.3; }
.cm-dc-time { color: #949ba4; font-size: .75rem; }
.cm-dc-embed { display: flex; gap: 16px; max-width: 432px; padding: 10px 16px 14px 16px; border-radius: 4px; background: #2b2d31; box-shadow: inset 4px 0 0 var(--cm-e, #d9b26a); }
.cm-dc-main { display: flex; flex-direction: column; gap: 8px; flex: 1; min-width: 0; }
.cm-dc-author { display: flex; align-items: center; gap: 8px; margin-top: 4px; color: #f2f3f5; font-size: .875rem; font-weight: 600; }
.cm-dc-author .cm-crest { width: 24px; height: 24px; border-radius: 50%; }
.cm-dc-title { color: #f2f3f5; font-size: 1rem; font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
.cm-dc-desc { color: #dbdee1; font-size: .875rem; line-height: 1.35; overflow-wrap: anywhere; }
.cm-dc-desc a { color: #00a8fc; }
.cm-dc-desc code { padding: 1px 4px; border-radius: 4px; background: #1e1f22; font-size: .8125rem; }
.cm-dc-q { display: block; padding-left: 12px; box-shadow: inset 4px 0 0 #4e5058; }
.cm-dc-ghost { color: #6d6f78; font-style: italic; }
.cm-dc-img { display: block; max-width: 100%; max-height: 300px; margin-top: 8px; border-radius: 4px; object-fit: contain; }
.cm-dc-thumb { flex: none; width: 80px; height: 80px; margin-top: 8px; border-radius: 4px; object-fit: contain; }
.cm-dc-foot { margin-top: 4px; color: #b5bac1; font-size: .75rem; }

/* ============================================================ phones */
@media (max-width: 1023px) {
  .cm-cols, .cm-msg { grid-template-columns: minmax(0, 1fr); }
  .cm-sticky { position: static; }
}
@media (max-width: 899px) {
  .cm-nav { top: 8px; margin-bottom: 16px; }
  .cm-nav-i { padding: 0 14px; }
  .cm-card { padding: 16px; }
  .cm-hero { padding: 18px; }
  .cm-crest.is-xl { width: 72px; height: 72px; }
  .cm-stats, .cm-tiles { grid-template-columns: repeat(2, 1fr); }
  .cm-ledger li { grid-template-columns: 28px minmax(0, 1fr) auto; grid-template-areas: "c i a" "c m b"; row-gap: 6px; }
  .cm-ledger li > .cm-crest { grid-area: c; align-self: start; }
  .cm-ledger li > .cm-led-id { grid-area: i; }
  .cm-ledger li > .cm-amt { grid-area: a; }
  .cm-ledger li > .cm-led-meta { grid-area: m; justify-content: flex-start; text-align: left; }
  .cm-ledger li > :last-child { grid-area: b; }
  .cm-owners li { grid-template-columns: minmax(0, 1fr) 76px auto; }
  .cm-owners li > .v2-btn { grid-column: 3; }
  .cm-owners li > .cm-tog { grid-column: 1 / 3; }
  .cm-dc-thumb { width: 56px; height: 56px; }
}
