/* Regional Metagame: the button under the logo and the window with the commander ranking (js/regional-ui.js).
   The window reuses .card, .close and .scroll from style.css; the open/close animations are shared with the tournament popup. */

/* The main button: filled with the accent color and glowing, bigger than Recent and Featured. It pulses three times after the
   page loads to get noticed, then stays still. It sits just under the logo (the title block ends at 68px). Below 1400px the
   filter bar drops into that corner, so the copy inside #statsbar is shown instead. */
.regional-open { display: inline-flex; align-items: center; gap: 9px; padding: 9px 20px 9px 16px; font-size: 15px; font-weight: 700;
  color: var(--on-accent); background: var(--accent); border: 1px solid var(--accent); border-radius: 999px; cursor: pointer;
  box-shadow: 0 6px 22px rgba(var(--accent-rgb), .35); animation: rg-pulse 2.4s ease-out 1.2s 3;
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease; }
.regional-open svg { width: 19px; height: 19px; flex: none; }
.regional-open:hover { color: var(--on-accent); background: var(--accent); filter: brightness(1.1); transform: translateY(-1px);
  box-shadow: 0 0 26px rgba(var(--accent-rgb), .7); animation: none; }
.regional-open:active { transform: none; }
.regional-open:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
@keyframes rg-pulse {
  0%, 100% { box-shadow: 0 6px 22px rgba(var(--accent-rgb), .35), 0 0 0 0 rgba(var(--accent-rgb), .55); }
  70% { box-shadow: 0 6px 22px rgba(var(--accent-rgb), .35), 0 0 0 14px rgba(var(--accent-rgb), 0); }
}
@media (prefers-reduced-motion: reduce) { .regional-open { animation: none; transition: none; } }
#regional { position: fixed; top: 78px; left: 20px; z-index: 5; }
#regional-narrow { display: none; }
@media (max-width: 1400px) {
  #regional { display: none; }
  #regional-narrow { display: inline-flex; }
}

.rg-card { width: min(860px, 100%); }
.rg-head { flex: none; padding: 18px 56px 14px 20px; border-bottom: 1px solid var(--line); }
.rg-head h2 { margin: 0; font-size: 22px; }
.rg-titlebar { display: flex; align-items: center; gap: 10px; }
.rg-info { display: inline-flex; flex: none; width: 19px; height: 19px; margin-top: -3px; color: var(--dim); border-radius: 50%; transition: color .15s; }
.rg-info svg { width: 100%; height: 100%; }
.rg-info:hover, .rg-info:focus-visible { color: var(--accent); }
.rg-sub { margin: 2px 0 12px; color: var(--dim); font-size: 13px; }
.rg-controls, .rg-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.rg-controls { margin-bottom: 10px; }
.rg-controls label { display: flex; align-items: center; gap: 8px; color: var(--dim); font-size: 13px; }
.rg-head select, .rg-head input { font: inherit; font-size: 13px; color: var(--text); background: #161b22;
  border: 1px solid var(--line); border-radius: 8px; padding: 5px 8px; }
.rg-head select:hover, .rg-head input:hover { border-color: var(--accent); }
.rg-pair { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
#rg-region, #rg-vs { max-width: 220px; }
#rg-swap { display: grid; place-items: center; width: 30px; height: 30px; padding: 0; color: var(--dim); cursor: pointer;
  background: #161b22; border: 1px solid var(--line); border-radius: 50%; }
#rg-swap:hover { color: var(--accent); border-color: var(--accent); }
#rg-swap svg { width: 16px; height: 16px; }

/* Color filter: the symbols in static/ (W U B R G C .svg), greyed out until picked, then in full color */
.rg-colorbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 10px; }
.rg-colorbar[hidden] { display: none; }
.rg-colorlabel { color: var(--dim); font-size: 13px; }
.rg-colors { display: flex; gap: 8px; }
.rg-colors button { width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%; background: transparent; cursor: pointer; line-height: 0;
  box-shadow: 0 0 0 2px #30363d; transition: box-shadow .15s; } /* the ring keeps dark symbols (black) visible when greyed out */
.rg-colors img { display: block; width: 100%; height: 100%; pointer-events: none; filter: grayscale(1) brightness(.7); opacity: .7;
  transition: filter .15s, opacity .15s; }
.rg-colors button:hover { box-shadow: 0 0 0 2px #6b7585; }
.rg-colors button:hover img { filter: grayscale(1) brightness(.95); opacity: .95; }
.rg-colors button[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--c-ring), 0 0 12px var(--c-glow); }
.rg-colors button[aria-pressed="true"] img { filter: none; opacity: 1; }
.rg-colors button:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.rg-colors [data-c="W"] { --c-ring: #fffbe6; --c-glow: rgba(255, 244, 190, .5); }
.rg-colors [data-c="U"] { --c-ring: #8cc7f0; --c-glow: rgba(70, 160, 230, .55); }
.rg-colors [data-c="B"] { --c-ring: #b9a7c5; --c-glow: rgba(185, 167, 197, .4); }
.rg-colors [data-c="R"] { --c-ring: #ff8a8f; --c-glow: rgba(255, 80, 90, .5); }
.rg-colors [data-c="G"] { --c-ring: #6fe0a4; --c-glow: rgba(60, 210, 130, .5); }
.rg-colors [data-c="5"] { --c-ring: #e6c76a; --c-glow: rgba(230, 199, 106, .5); }
.rg-colors [data-c="C"] { --c-ring: #e8e4e0; --c-glow: rgba(220, 215, 210, .4); }
.rg-colortext { color: var(--dim); font-size: 13px; }
#rg-colorclear { padding: 3px 10px; font: inherit; font-size: 12px; color: var(--dim); cursor: pointer; background: transparent; border: 1px solid var(--line); border-radius: 999px; }
#rg-colorclear:hover { color: var(--accent); border-color: var(--accent); }
#rg-colorclear[hidden] { display: none; }
#rg-search { flex: 1; min-width: 150px; }

.rg-tools label { display: flex; align-items: center; gap: 8px; color: var(--dim); font-size: 13px; }

.rg-stats { display: flex; flex-wrap: wrap; gap: 8px 26px; margin-top: 12px; color: var(--dim); font-size: 13px; }
.rg-stats small { display: block; font-size: 12px; color: #b9c5de; }
.rg-stats em { font-style: normal; font-weight: 600; }
.rg-stats .up { color: var(--accent); }
.rg-stats b { display: block; color: var(--text); font-size: 18px; line-height: 1.2; font-variant-numeric: tabular-nums; }
.rg-legend { margin: 8px 0 0; color: var(--dim); font-size: 12px; }
.rg-legend[hidden] { display: none; }
.rg-legend i { display: inline-block; width: 18px; height: 7px; margin: 0 6px 0 0; border-radius: 3px; vertical-align: 1px; }
.rg-legend i + span { margin-right: 14px; }
.rg-legend .a, .rg-bars .a { background: var(--accent); }
.rg-legend .w, .rg-bars .w { background: #8b949e; }

/* One row per commander: its art (both arts for partners) behind the text, like the standings in the tournament popup but taller */
#rg-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.rg-row { position: relative; isolation: isolate; display: flex; align-items: center; gap: 14px; min-height: 80px;
  padding: 12px 16px 12px 8px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #161b22; }
.rg-row::before { content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgba(13, 17, 23, .95) 0%, rgba(13, 17, 23, .75) 45%, rgba(13, 17, 23, .2) 100%); }
.rg-art { position: absolute; inset: 0; z-index: -2; display: flex; }
.rg-art img { flex: 1; min-width: 0; height: 100%; object-fit: cover; object-position: center 22%; }
.rg-rank { flex: none; width: 40px; text-align: center; font-size: 14px; font-weight: 700; color: var(--dim); }
.rg-who { flex: 1; min-width: 0; }
.rg-who b { display: block; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 1px 4px rgba(0, 0, 0, .9); }
.rg-bars { display: flex; flex-direction: column; gap: 3px; margin-top: 8px; max-width: 420px; }
.rg-bars i { display: block; height: 7px; border-radius: 3px; }
/* Conversion: between the name and the share; on phones it drops to a line of its own under them (see the media query) */
.rg-conv { flex: none; min-width: 108px; text-align: right; font-variant-numeric: tabular-nums; text-shadow: 0 1px 4px rgba(0, 0, 0, .9); }
.rg-conv i { display: block; font-style: normal; font-size: 10px; letter-spacing: .07em; text-transform: uppercase; color: #b9c5de; }
.rg-conv b { display: block; font-size: 18px; line-height: 1.2; }
.rg-conv small { display: block; max-width: 230px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: #b9c5de; }
.rg-conv em { font-style: normal; font-weight: 600; }
.rg-conv .up { color: var(--accent); }
.rg-conv.thin, .rg-conv.none { opacity: .6; }
.rg-num { flex: none; min-width: 96px; text-align: right; font-variant-numeric: tabular-nums; text-shadow: 0 1px 4px rgba(0, 0, 0, .9); }
.rg-num i { display: block; font-style: normal; font-size: 10px; letter-spacing: .07em; text-transform: uppercase; color: #b9c5de; }
.rg-num b { display: block; font-size: 18px; line-height: 1.2; }
.rg-num small { display: block; max-width: 230px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: #b9c5de; }
.rg-num em { font-style: normal; font-weight: 600; }
.rg-num .up { color: var(--accent); }

/* ---- Commander view (js/commander-ui.js): replaces the ranking while a row is open ---- */
.rg-row { cursor: pointer; transition: border-color .15s; }
.rg-row:hover, .rg-row:focus-visible { border-color: var(--accent); outline: none; }
#rg-detail { display: none; }
#rg-modal.detail #rg-detail { display: block; }
#rg-modal.detail .rg-colorbar, #rg-modal.detail .rg-tools, #rg-modal.detail #rg-stats, #rg-modal.detail #rg-legend,
#rg-modal.detail #rg-list, #rg-modal.detail #rg-more, #rg-modal.detail #rg-note { display: none; }
.rg-back { margin: 0 0 10px; padding: 5px 14px; font: inherit; font-size: 13px; color: var(--accent); cursor: pointer;
  background: rgba(13, 17, 23, .6); border: 1px solid var(--accent); border-radius: 999px; }
.rg-back:hover { background: var(--accent); color: var(--on-accent); }
.rg-banner { position: relative; isolation: isolate; display: flex; align-items: flex-end; min-height: 150px; padding: 18px 20px; overflow: hidden;
  border: 1px solid var(--line); border-radius: 12px; background: #161b22; }
.rg-banner::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(13, 17, 23, .1), rgba(13, 17, 23, .88)); }
.rg-banner-art { position: absolute; inset: 0; z-index: -2; display: flex; }
.rg-banner-art img { flex: 1; min-width: 0; height: 100%; object-fit: cover; object-position: center 22%; }
.rg-tune { display: flex; flex-direction: column; gap: 6px; margin: 8px 0 0; padding: 10px 12px; font-size: 12px; color: var(--dim); background: #161b22; border: 1px dashed var(--accent); border-radius: 10px; }
.rg-tune label { display: flex; align-items: center; gap: 10px; }
.rg-tune label span { flex: none; width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.rg-tune input { flex: 1; accent-color: var(--accent); }
.rg-tune code { white-space: pre-wrap; color: var(--accent); user-select: all; }
.rg-banner h3 { width: fit-content; max-width: 100%; margin: 0; font-size: 24px; text-shadow: 0 1px 8px rgba(0, 0, 0, .85); }
.rg-symbols { display: flex; gap: 5px; margin-top: 6px; }
.rg-symbols img { display: block; width: 22px; height: 22px; border-radius: 50%; box-shadow: 0 0 0 2px rgba(13, 17, 23, .6), 0 2px 8px rgba(0, 0, 0, .6); }
.rg-tabs { display: flex; gap: 4px; margin: 16px 0 0; box-shadow: inset 0 -1px 0 var(--line); overflow-x: auto; overflow-y: hidden; } /* the divider is a shadow so the buttons need no negative margin (which made the row scroll vertically) */
.rg-tabs button { flex: none; padding: 9px 16px; font: inherit; font-size: 14px; color: var(--dim); cursor: pointer; background: none;
  border: 0; border-bottom: 2px solid transparent; }
.rg-tabs button:hover { color: var(--text); }
.rg-tabs button[aria-selected="true"] { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
.rg-tabs button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
/* The window always takes the full height available, so neither searching the list nor switching tabs (which differ in length) resizes it */
#rg-modal .rg-card { height: 100%; } /* fixed height in the list too, so searching for a commander doesn't shrink the window */
.rg-panel { padding-top: 4px; }
.rg-soon { padding: 30px 0; text-align: center; font-size: 15px; }
/* Tournaments tab: one link per deck, best finish first */
.rg-tlist { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.rg-trow { display: flex; align-items: center; gap: 12px; padding: 10px 14px 10px 8px; color: var(--text); text-decoration: none;
  background: #161b22; border: 1px solid var(--line); border-radius: 10px; transition: border-color .15s; }
.rg-trow:hover, .rg-trow:focus-visible { border-color: var(--accent); outline: none; }
.rg-tplace { flex: none; width: 54px; text-align: center; font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.rg-tplace small { display: block; font-size: 11px; font-weight: 400; color: var(--dim); }
.rg-twho { flex: 1; min-width: 0; }
.rg-twho b { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rg-twho span { display: block; margin-top: 2px; font-size: 12px; color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rg-tplayer { flex: none; max-width: 36%; text-align: right; }
.rg-tplayer b { display: block; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rg-tplayer small { font-size: 12px; color: var(--dim); }
/* Top Pilots tab: a card per pilot, with their tournaments underneath */
.rg-pilots { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.rg-pilot { padding: 10px 12px 8px; background: #161b22; border: 1px solid var(--line); border-radius: 10px; }
.rg-phead { display: flex; align-items: center; gap: 12px; }
.rg-prank { flex: none; width: 34px; text-align: center; font-size: 15px; font-weight: 700; color: var(--dim); font-variant-numeric: tabular-nums; }
.rg-pwho { min-width: 0; }
.rg-pwho a { display: block; font-size: 15px; font-weight: 700; color: var(--text); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rg-pwho a:hover, .rg-pwho a:focus-visible { color: var(--accent); text-decoration: underline; outline: none; }
.rg-pwho small { display: block; margin-top: 1px; font-size: 12px; color: var(--dim); }
.rg-plist { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.rg-prow { display: flex; align-items: center; gap: 12px; padding: 6px 10px 6px 0; color: var(--text); text-decoration: none; border: 1px solid transparent; border-radius: 8px; transition: border-color .15s, background .15s; }
.rg-prow:hover, .rg-prow:focus-visible { border-color: var(--accent); background: #0d1117; outline: none; }
.rg-prec { flex: none; font-size: 12px; color: var(--dim); }
.rg-pmore { margin-top: 4px; }
.rg-pmore summary { cursor: pointer; font-size: 12px; color: var(--accent); padding: 4px 0; }
.rg-pmore .rg-plist { margin-top: 4px; }
/* Region performance tab: position, flag, country, conversion (+ gap), meta share */
.rg-clist { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.rg-crow { display: flex; align-items: center; gap: 12px; padding: 8px 14px 8px 4px; background: #161b22; border: 1px solid var(--line); border-radius: 10px; font-variant-numeric: tabular-nums; }
.rg-crow.thin { opacity: .65; }
.rg-cpos { flex: none; width: 38px; text-align: center; font-size: 15px; font-weight: 700; color: var(--dim); }
.rg-cflag { flex: none; display: grid; place-items: center; width: 34px; height: 22px; }
.rg-flag { display: block; width: 30px; height: 20px; object-fit: cover; border-radius: 3px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .12); }
.rg-flagcode { font-size: 12px; font-weight: 700; color: var(--dim); }
.rg-cname { flex: 1; min-width: 0; }
.rg-cname b { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rg-cname small, .rg-cshare small { display: block; font-size: 12px; color: var(--dim); }
.rg-cconv { flex: none; min-width: 130px; text-align: right; font-size: 13px; color: var(--dim); }
.rg-cconv b { font-size: 16px; color: var(--text); }
.rg-cconv .up { color: var(--accent); font-style: normal; font-weight: 600; }
.rg-cconv .down { font-style: normal; font-weight: 600; }
.rg-cshare { flex: none; min-width: 82px; text-align: right; }
.rg-cshare b { font-size: 15px; }
@media (max-width: 600px) { .rg-cconv { min-width: 0; margin-left: auto; } .rg-cshare { min-width: 0; } .rg-crow .rg-cname { display: none; } }
/* Spicy cards tab: the card on the left, its numbers and pilots on the right */
.rg-spicylist { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.rg-spicy { display: flex; gap: 16px; padding: 12px; background: #161b22; border: 1px solid var(--line); border-radius: 10px; }
.rg-scard { flex: none; display: block; width: 146px; height: 204px; border-radius: 9px; background: #0d1117; box-shadow: 0 2px 10px rgba(0, 0, 0, .5); }
/* The enlarged card shown while hovering a spicy card (commander-ui.js) */
.rg-bigcard { position: fixed; z-index: 20; width: 300px; height: 418px; border-radius: 16px; pointer-events: none; background: #0d1117; box-shadow: 0 8px 30px rgba(0, 0, 0, .7), 0 0 0 1px rgba(255, 255, 255, .08);
  opacity: 0; visibility: hidden; transition: opacity .18s ease, visibility 0s .18s; }
.rg-bigcard.on { opacity: 1; visibility: visible; transition: opacity .18s ease; }
@media (prefers-reduced-motion: reduce) { .rg-bigcard, .rg-bigcard.on { transition: none; } }
.rg-scard img { display: block; width: 100%; height: 100%; border-radius: 9px; object-fit: cover; }
.rg-sbody { flex: 1; min-width: 0; font-variant-numeric: tabular-nums; }
.rg-sbody h4 { margin: 2px 0 8px; font-size: 16px; }
.rg-sstat { margin: 0 0 8px; font-size: 14px; }
.rg-sstat i, .rg-spilots > i { display: block; font-style: normal; font-size: 10px; letter-spacing: .07em; text-transform: uppercase; color: #b9c5de; }
.rg-sstat b { font-size: 20px; }
.rg-sstat em { font-style: normal; font-weight: 600; }
.rg-sstat .up { color: var(--accent); }
.rg-sstat small, .rg-spilots small { display: block; font-size: 12px; color: var(--dim); }
.rg-spilots ul { list-style: none; margin: 2px 0 0; padding: 0; }
.rg-spilots li a { display: block; padding: 3px 0; color: var(--text); text-decoration: none; font-size: 13px; }
.rg-spilots li a span { color: var(--dim); }
.rg-spilots li a:hover b, .rg-spilots li a:focus-visible b { color: var(--accent); text-decoration: underline; }
@media (max-width: 600px) { .rg-spicy { flex-direction: column; align-items: center; } .rg-sbody { width: 100%; } }
.rg-tmore { display: block; margin: 12px auto 4px; padding: 7px 18px; font: inherit; font-size: 13px; color: var(--accent); cursor: pointer;
  border: 1px solid var(--accent); border-radius: 999px; background: rgba(13, 17, 23, .6); }
.rg-tmore:hover { background: var(--accent); color: var(--on-accent); }
.rg-tmore[hidden] { display: none; }
.rg-dtools { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 16px 0 6px; }
.rg-dtools label { display: flex; align-items: center; gap: 8px; color: var(--dim); font-size: 13px; }
.rg-dtools select { font: inherit; font-size: 13px; color: var(--text); background: #161b22; border: 1px solid var(--line); border-radius: 8px; padding: 5px 8px; }
.rg-dtools select:hover { border-color: var(--accent); }
#rg-detail .rg-legend { margin: 6px 2px 4px; color: var(--dim); font-size: 13px; }
.rg-legend .b, .sw.b { background: #f0a93b; }
.sw { display: inline-block; width: 10px; height: 10px; margin-right: 6px; border-radius: 2px; vertical-align: -1px; }
.sw.a { background: var(--accent); }
.rg-chart { position: relative; width: 100%; min-height: 230px; }
.rg-chart svg { display: block; width: 100%; height: auto; touch-action: pan-y; }
.ch-grid { stroke: #232a34; stroke-width: 1; }
.ch-grid.base { stroke: #3a4350; }
.ch-y, .ch-x { fill: var(--dim); font-size: 11px; }
.ch-line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.ch-dot { stroke: var(--panel); stroke-width: 2; }
.ch-event { stroke: #8b96a8; stroke-width: 1.5; stroke-dasharray: 6 5; opacity: .4; }
.ch-ev { max-width: 230px; margin-top: 6px; padding-top: 6px; border-top: 1px dashed var(--line); color: var(--dim); }
.ch-ev b { color: var(--text); font-weight: 600; }
.ch-cross { stroke: #6b7585; stroke-width: 1; stroke-dasharray: 3 3; }
.ch-tip { position: absolute; z-index: 3; min-width: 150px; padding: 8px 10px; font-size: 12px; line-height: 1.5; color: var(--text);
  background: #0d1117; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 6px 20px rgba(0, 0, 0, .5); pointer-events: none; }
.ch-tip[hidden], .ch-hover[hidden], .ch-dot[hidden] { display: none; }
.ch-tip small { color: var(--dim); }
.ch-tip small.ch-warn { color: #f0a93b; }
.rg-table { margin: 6px 2px 0; color: var(--dim); font-size: 13px; }
.rg-table summary { cursor: pointer; }
.rg-table table { margin-top: 8px; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.rg-table th, .rg-table td { padding: 3px 14px 3px 0; text-align: left; font-weight: 400; }
.rg-table tbody th { color: var(--text); }
.rg-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; margin: 4px 0 18px; }
.rg-card2 { padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: #161b22; font-variant-numeric: tabular-nums; }
.rg-card2 i { display: block; font-style: normal; font-size: 10px; letter-spacing: .07em; text-transform: uppercase; color: #b9c5de; }
.rg-card2 b { display: block; font-size: 22px; line-height: 1.25; }
.rg-card2 small { display: block; font-size: 12px; color: #b9c5de; }
.rg-card2 em, .rg-seat em { font-style: normal; font-weight: 600; }
.rg-card2 .up, .rg-seat .up { color: var(--accent); }
.rg-card2.thin { opacity: .7; }
.rg-dh { margin: 22px 0 8px; font-size: 15px; }
.rg-dnote { margin: 0; color: var(--dim); font-size: 13px; }
.rg-seat { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.rg-seat th, .rg-seat td { padding: 7px 12px 7px 0; text-align: left; border-bottom: 1px solid var(--line); vertical-align: baseline; }
.rg-seat thead th { color: var(--dim); font-size: 12px; font-weight: 400; }
.rg-seat tbody th { color: var(--dim); font-weight: 600; font-size: 13px; white-space: nowrap; }
.rg-seat td b { font-size: 15px; }
.rg-seat td small { margin-left: 8px; color: var(--dim); font-size: 12px; }
.rg-seat tr.tot td, .rg-seat tr.tot th { border-bottom: 0; }
#rg-detail .rg-note { margin: 14px 2px 0; }

#rg-more { display: block; margin: 12px auto 4px; padding: 7px 18px; font: inherit; font-size: 13px; color: var(--accent); cursor: pointer;
  border: 1px solid var(--accent); border-radius: 999px; background: rgba(13, 17, 23, .6); }
#rg-more:hover { background: var(--accent); color: var(--on-accent); }
#rg-more[hidden] { display: none; }
.rg-note { margin: 10px 4px 0; color: var(--dim); font-size: 12px; }
.rg-note:empty { display: none; }

@media (max-width: 600px) {
  .rg-card { display: block; overflow-y: auto; } /* the controls scroll away with the list instead of taking half the screen */
  .rg-card .scroll { overflow: visible; }
  .rg-colors button { width: 38px; height: 38px; }
  .rg-head { padding: 14px 48px 10px 14px; }
  .rg-rank { display: none; }
  .rg-row { padding-left: 14px; }
  .rg-num { min-width: 80px; order: 2; }
  .rg-who { order: 1; }
  .rg-row { flex-wrap: wrap; row-gap: 6px; }
  .rg-conv { order: 3; flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; min-width: 0; text-align: left; }
  .rg-num i { display: block; }
  .rg-conv i, .rg-conv b, .rg-conv small { display: inline; max-width: none; }
  .rg-conv b { font-size: 15px; }
  .rg-who b { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; } /* long partner names wrap instead of being cut */
  .rg-stats { gap: 18px; }
}

/* The commander's card(s) shown while hovering the banner of the commander view (commander-ui.js): fades in after a short pause */
.rg-bannercards { position: fixed; z-index: 20; display: flex; gap: 14px; pointer-events: none; opacity: 0; visibility: hidden; transition: opacity .18s ease, visibility 0s .18s; }
.rg-bannercards.on { opacity: 1; visibility: visible; transition: opacity .18s ease; }
.rg-bannercards img { display: block; width: var(--cw, 300px); height: var(--ch, 418px); border-radius: 16px; background: #0d1117; box-shadow: 0 8px 30px rgba(0, 0, 0, .7), 0 0 0 1px rgba(255, 255, 255, .08); }
@media (prefers-reduced-motion: reduce) { .rg-bannercards, .rg-bannercards.on { transition: none; } }

/* Find card tab: search box with suggestions, then the card's numbers and the decks that play it */
.rg-find { position: relative; margin: 14px 0 12px; }
.rg-find input { width: 100%; padding: 9px 12px; font: inherit; font-size: 14px; color: var(--text); background: #161b22; border: 1px solid var(--line); border-radius: 8px; }
.rg-find input:focus { outline: none; border-color: var(--accent); }
#rg-fsug { position: absolute; z-index: 5; left: 0; right: 0; top: calc(100% + 4px); margin: 0; padding: 4px; list-style: none; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 30px rgba(0, 0, 0, .5); }
#rg-fsug[hidden] { display: none; }
#rg-fsug li { display: flex; justify-content: space-between; gap: 12px; padding: 7px 10px; border-radius: 6px; font-size: 14px; cursor: pointer; }
#rg-fsug li:hover, #rg-fsug li.on { background: #161b22; color: var(--accent); }
#rg-fsug li small { color: var(--dim); flex: none; }
#rg-fsug li.none { color: var(--dim); cursor: default; }
#rg-fsug li.none:hover { background: none; color: var(--dim); }
.rg-fhead { margin-bottom: 12px; }