@import url('./cards.css?v=card-hover');
@import url('./match.css');
@import url('./decks.css');
@import url('./economy.css');
@import url('./social.css?v=trade-card-details');

.qx-ranking tbody th {
  color: var(--text);
  text-transform: none;
  letter-spacing: normal;
}
.qx-ranking tbody a {
  text-decoration: none;
}
.qx-ranking tbody a:hover {
  text-decoration: underline;
}
.qx-ranking-place {
  display: inline-grid;
  place-items: center;
  min-width: 2rem;
  padding: .2rem .4rem;
  border-radius: .45rem;
  background: var(--bg);
  font-variant-numeric: tabular-nums;
}
.qx-ranking tbody tr:nth-child(-n + 3) .qx-ranking-place,
.qx-ranking-elo {
  color: var(--accent);
  font-weight: 700;
}
.qx-ranking .qx-ranking-own > * {
  background: #bb96ff1c;
}
.qx-ranking .qx-ranking-own > :first-child {
  box-shadow: inset 3px 0 var(--accent);
}
.qx-ranking-own .tag {
  margin-inline-start: .35rem;
  color: var(--accent);
}
.qx-completed-matches {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
  gap: .85rem;
}
.qx-completed-match {
  display: block;
  margin: 0 0 .85rem;
  text-decoration: none;
}
.qx-completed-matches .qx-completed-match {
  margin: 0;
}
a.qx-completed-match:hover {
  border-color: var(--accent);
}
.qx-match-meta {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .25rem .75rem;
  color: var(--soft);
  font-size: .9rem;
}
.qx-match-score {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: .65rem;
  margin-block: .8rem .35rem;
  text-align: center;
  overflow-wrap: anywhere;
  font-weight: 700;
}
.qx-match-score strong {
  padding: .25rem .65rem;
  border-radius: .5rem;
  background: var(--bg);
  color: var(--accent);
  font: 700 1.65rem var(--display);
}
.qx-match-outcome {
  color: var(--soft);
  text-align: center;
}
.qx-match-details-label {
  display: flex;
  justify-content: end;
  align-items: center;
  gap: .3rem;
  margin-top: .65rem;
  color: var(--accent);
}
@font-face {
  font-family: Barlow;
  src: url(fonts/Barlow-Regular.ttf) format('truetype');
  font-display: swap;
}
@font-face {
  font-family: 'Barlow Condensed';
  src: url(fonts/BarlowCondensed-Bold.ttf) format('truetype');
  font-weight: 700;
  font-display: swap;
}
:root {
  color-scheme: dark;
  --bg: #101117;
  --panel: #191a23;
  --line: #30313c;
  --soft: #aeb0c2;
  --text: #f4f3fc;
  --accent: #bb96ff;
  --violet: #8453e2;
  --green: #73e8b3;
  --display: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  font-family: Barlow, 'Segoe UI', sans-serif;
  font-size: 16px;
  background: var(--bg);
  color: var(--text);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
a {
  color: inherit;
  text-underline-offset: 0.2em;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.52;
  cursor: default;
}
img {
  max-width: 100%;
  display: block;
}
button {
  color: inherit;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid #d5b9ff;
  outline-offset: 3px;
}
input,
select,
textarea {
  width: 100%;
  border: 1px solid #4d4d60;
  background: #14151d;
  color: var(--text);
  border-radius: 8px;
  padding: 0.7rem;
  min-height: 44px;
}
input[type='checkbox'],
input[type='radio'] {
  width: 19px;
  height: 19px;
  min-height: 0;
  accent-color: #ba96ff;
  flex: none;
}
textarea {
  resize: vertical;
}
label {
  display: grid;
  gap: 0.45rem;
  color: #d6d6e5;
  font-size: 0.95rem;
}
label.check {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  line-height: 1.55;
}
.skip {
  position: fixed;
  left: 1rem;
  top: -100px;
  z-index: 20;
  background: #fff;
  color: #111;
  padding: 1rem;
}
.skip:focus {
  top: 0;
}
.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 224px minmax(0, 1fr);
}
aside.side {
  position: sticky;
  top: 0;
  height: 100dvh;
  background: #15151d;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  padding: 30px 18px 19px;
  z-index: 7;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font: 700 2.12rem/0.85 var(--display);
  letter-spacing: -0.03em;
  text-decoration: none;
}
.brand span span {
  color: var(--accent);
}
.brand img {
  width: 37px;
}
.side .brand {
  margin: 0 6px 45px;
}
.navgroup {
  display: grid;
  gap: 5px;
  margin-bottom: 28px;
}
.navlabel {
  margin: 0 12px 8px;
  color: #9e9dad;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  font-weight: 700;
  font-size: 0.7rem;
}
.navlink {
  display: flex;
  align-items: center;
  gap: 0.84rem;
  text-decoration: none;
  padding: 11px 12px;
  min-height: 44px;
  color: #c3c2d0;
  border-radius: 7px;
  line-height: 1.2;
}
.navlink.active {
  background: #30253e;
  color: #d5b5ff;
  font-weight: 700;
}
.navlink.active svg {
  color: #c8a4ff;
}
.navlink:hover,
.iconbtn:hover,
.btn:hover,
.filter:hover,
.pill:hover {
  background: #343142;
}
.sidefoot {
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}
.mainwrap {
  min-width: 0;
}
.topbar {
  height: 74px;
  padding: 0 clamp(20px, 4vw, 70px);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 12px;
  background: #14141c;
}
.topbar .spacer,
.row .spacer {
  flex: 1;
}
.crumb {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #deddea;
  font-size: 0.98rem;
}
.crumb svg {
  color: var(--accent);
}
.iconbtn,
.btn,
.pill,
.filter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  border: 1px solid #424150;
  border-radius: 7px;
  background: #24232e;
  text-decoration: none;
  font-weight: 600;
  line-height: 1.15;
  min-height: 42px;
  padding: 0.64rem 1rem;
}
.iconbtn {
  padding: 0.52rem;
  color: #dddaea;
  min-width: 42px;
  background: transparent;
}
.btn.primary {
  background: #c2a3ff;
  color: #211034;
  border-color: #c2a3ff;
}
.btn.primary:hover {
  background: #d3bbff;
}
.btn.subtle {
  background: transparent;
  color: #d8d5e5;
}
.btn.danger {
  background: #542530;
  color: #ffdce3;
}
.lang {
  background: transparent;
  border-color: transparent;
}
.mobilebrand,
.menu {
  display: none;
}
.account {
  background: #24232e;
}
.stage {
  max-width: 1530px;
  margin: auto;
  padding: 30px clamp(20px, 4vw, 70px) 25px;
}
.topintro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 18px;
  gap: 15px;
}
.topintro h1,
.pagehead h1,
.sectionhead h2,
.modalhead h2,
.panel h2,
.panel h3,
.hero h2,
.backface strong,
.pack strong,
.number,
.statbig {
  font-family: var(--display);
  font-weight: 700;
}
.topintro h1,
.pagehead h1 {
  font-size: clamp(2.1rem, 3.8vw, 3.5rem);
  line-height: 1;
  margin: 0;
  letter-spacing: -0.025em;
}
.pagehead p {
  color: var(--soft);
  max-width: 800px;
}
.pagehead {
  margin-bottom: 22px;
}
.eyeline,
.tag {
  font-weight: bold;
  font-size: 0.73rem;
  text-transform: uppercase;
  letter-spacing: 0.115em;
}
.eyeline {
  color: #c4abcf;
}
.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.38rem 0.55rem;
  border-radius: 5px;
  background: #382c56;
  color: #d8c0ff;
}
.hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid #554073;
  border-radius: 15px;
  min-height: 338px;
  background: #1a1529;
}
.hero:before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(ellipse at 53% 102%, #673a905e, transparent 58%),
    linear-gradient(100deg, #18141f 5%, #30213c 72%, #151426);
}
.heroart {
  position: absolute;
  inset: 0 0 0 38%;
  z-index: -1;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 38%);
  mask-image: linear-gradient(to right, transparent, #000 38%);
}
.heroart img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 56%;
  filter: saturate(0.88) brightness(0.77);
}
.heroart:after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, #17111fcc, transparent 40%),
    linear-gradient(108deg, #24162b66, transparent 55%);
}
.herocopy {
  width: 57%;
  padding: clamp(24px, 3.6vw, 51px);
  display: flex;
  align-items: flex-start;
  flex-direction: column;
}
.herocopy .tag {
  background: #30243e;
  color: #dcc1ff;
  border: 1px solid #80619a;
  line-height: 1.1;
}
.hero h2 {
  font-size: clamp(2.9rem, 5.6vw, 6.1rem);
  letter-spacing: -0.028em;
  line-height: 0.89;
  text-transform: uppercase;
  margin: 17px 0 14px;
}
.hero h2 em {
  font-style: normal;
  color: #c39bff;
}
.hero p {
  margin: 0 0 22px;
  max-width: 320px;
  color: #e3dee9;
  line-height: 1.45;
}
.herocredit {
  position: absolute;
  right: 13px;
  bottom: 13px;
  background: #18141dd9;
  border: 1px solid #ffffff35;
  padding: 0.42rem 0.65rem;
  font-size: 0.78rem;
  color: #f6eeff;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.sectionhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 27px 0 14px;
}
.sectionhead h2,
.panel h2,
.modalhead h2 {
  font-size: clamp(1.6rem, 2.4vw, 2.05rem);
  margin: 0;
  line-height: 1.08;
  letter-spacing: -0.015em;
}
.sectionhead a,
.textbtn {
  font-size: 0.92rem;
  color: #ccb0ff;
  text-decoration: none;
}
.catgrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr));
  gap: 14px;
}
.catpick {
  border-radius: 11px;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  text-align: left;
  padding: 0;
  text-decoration: none;
  transition:
    transform 0.2s,
    border-color 0.2s;
  display: block;
}
.catpick:hover,
.cardtile:hover {
  border-color: #8467a8;
  transform: translateY(-2px);
}
.catimage {
  aspect-ratio: 1.95;
  overflow: hidden;
  position: relative;
  background: #282c39;
}
.catimage img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 55%;
  filter: saturate(0.85);
}
.catimage:after {
  content: '';
  position: absolute;
  inset: 45% 0 0;
  background: linear-gradient(transparent, #12121b8c);
}
.catbody {
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.catbody strong {
  font: 700 clamp(1.2rem, 1.7vw, 1.5rem) var(--display);
  display: block;
}
.catbody small {
  color: var(--soft);
  font-size: 0.85rem;
}
.caticon {
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: 8px;
  background: #342b47;
  color: #ceb0ff;
  display: grid;
  place-items: center;
}
.caticon.B {
  color: #83d6ea;
  background: #203641;
}
.caticon.C {
  color: #a7c7ff;
  background: #26344a;
}
.caticon.D {
  color: #f3be7d;
  background: #3c3128;
}
.caticon.E {
  color: #8edec3;
  background: #213a34;
}
.duogrid,
.detailgrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.strip,
.panel {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  padding: clamp(16px, 2.2vw, 30px);
}
.strip {
  display: flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
}
.strip > .caticon {
  width: 46px;
  height: 46px;
}
.strip strong {
  display: block;
  font: 700 1.45rem var(--display);
}
.strip small,
.muted,
.empty,
.help,
.credits p,
dl dt {
  color: var(--soft);
}
.strip > svg:last-child {
  margin-left: auto;
  color: var(--soft);
}
.footer {
  margin-top: 42px;
  border-top: 1px solid var(--line);
  padding: 16px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  font-size: 0.84rem;
  color: var(--soft);
}
.footer > a:last-child {
  margin-left: auto;
}
.sectionhead:first-child {
  margin-top: 0;
}
.row,
.filters,
.toolbar,
.actions,
.pills {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  flex-wrap: wrap;
}
.filters,
.toolbar,
.actions,
.pills {
  margin: 12px 0;
}
.filter,
.pill {
  min-height: 37px;
  padding: 0.48rem 0.85rem;
  font-size: 0.91rem;
  background: transparent;
}
.filter.active,
.pill.active,
.btn[aria-pressed='true'] {
  color: #e0cfff;
  border-color: #9f80c2;
  background: #352743;
}
.searchfield {
  max-width: 400px;
}
.collection-controls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr));
  gap: 12px;
  margin-bottom: 12px;
}
.collection-controls label {
  margin: 0;
}
.gridcards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(224px, 100%), 1fr));
  gap: 14px;
}
dialog {
  background: #1b1b25;
  color: var(--text);
  border: 1px solid #5b556c;
  border-radius: 14px;
  width: min(760px, 94vw);
  max-height: 90dvh;
  padding: clamp(16px, 2vw, 26px);
  box-shadow: 0 22px 100px #000b;
}
dialog::backdrop {
  background: #05050bd1;
}
.modalhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 12px;
}
.detailgrid {
  align-items: start;
}
.credits h3 {
  font-size: 1rem;
  margin: 16px 0 5px;
}
.credits h3:first-child {
  margin-top: 0;
}
.credits p,
.credits li {
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.credits p,
.credits ul {
  margin: 0.45rem 0;
}
.credits a,
.panel a:not(.btn),
form a {
  color: #d0acff;
}
.credits ul {
  padding-left: 20px;
}
dl {
  margin: 12px 0;
}
dl dt {
  font-size: 0.85rem;
}
dl dd {
  margin: 1px 0 8px;
}
.form {
  display: grid;
  gap: 14px;
  max-width: 620px;
}
.form.compact {
  max-width: 460px;
}
.form .actions {
  margin: 0;
}
.panel + .panel,
.panel + .duogrid,
.duogrid + .panel {
  margin-top: 15px;
}
.panel h2,
.panel h3 {
  margin: 0 0 12px;
}
.panel h3 {
  font-size: 1.45rem;
}
.list {
  display: grid;
  gap: 9px;
}
.listitem {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
  border: 1px solid var(--line);
  padding: 12px;
  border-radius: 8px;
}
.listitem .grow,
.row .grow {
  flex: 1;
}
.listitem small {
  display: block;
  margin-top: 0.25rem;
  color: var(--soft);
}
.empty {
  padding: 15px;
  margin: 0;
  border: 1px dashed #454251;
  border-radius: 8px;
}
.help {
  font-size: 0.9rem;
  line-height: 1.5;
}
.tablewrap {
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-variant-numeric: tabular-nums;
}
th,
td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
}
th {
  font-size: 0.86rem;
  color: var(--soft);
}
details {
  border: 1px solid var(--line);
  padding: 10px;
  border-radius: 8px;
  margin: 0.6rem 0;
}
summary {
  cursor: pointer;
  font-weight: 600;
}
.loader {
  margin: 30px;
  color: var(--soft);
}
#notice {
  position: fixed;
  z-index: 15;
  bottom: 22px;
  left: 50%;
  transform: translate(-50%, 20px);
  padding: 12px 18px;
  border: 1px solid #5e596a;
  background: #272731;
  color: white;
  border-radius: 9px;
  box-shadow: 0 6px 28px #0008;
  opacity: 0;
  pointer-events: none;
  transition: 0.2s;
  max-width: 94vw;
}
#notice.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
#notice.bad {
  border-color: #de8892;
}
.banner {
  border-left: 3px solid var(--accent);
  padding: 10px 14px;
  background: #2c2437;
  margin-bottom: 15px;
}
.pick {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  border: 0;
  border-top: 1px solid var(--line);
  padding: 0.7rem 0.8rem;
  background: #22212c;
}
.pick[aria-pressed='true'] {
  background: #433157;
  color: #ead6ff;
}
.stickyactions {
  position: sticky;
  bottom: 10px;
  margin-top: 16px;
  padding: 10px 14px;
  background: #24222ff0;
  border: 1px solid #61556f;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  z-index: 2;
}
.matchboard {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(10px, 2vw, 26px);
  align-items: start;
  max-width: 900px;
  margin: auto;
}
.backface {
  width: 100%;
  max-width: 395px;
  aspect-ratio: 0.72;
  border: 1px solid #716294;
  border-radius: 18px;
  background: repeating-linear-gradient(130deg, #ffffff06 0 2px, transparent 2px 12px),
    radial-gradient(ellipse at 50% 45%, #4b3270, #181c38 70%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8px;
  color: #dac6f5;
  margin: auto;
}
.backface img {
  width: 60px;
}
.backface strong {
  font-size: 1.8rem;
}
.score {
  display: flex;
  justify-content: center;
  gap: 14px;
  align-items: center;
  margin: 15px 0;
  text-align: center;
}
.score b {
  font: 700 2.2rem var(--display);
  white-space: nowrap;
}
.die {
  display: inline-grid;
  place-items: center;
  background: #f4edff;
  color: #3e2855;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  margin: 2px;
  font-weight: bold;
}
.motion .deal {
  animation: deal 0.7s ease-out both;
}
.motion .won {
  animation: deal 0.85s ease-out;
}
.motion .lost {
  animation: loss 0.45s ease-out;
}
.motion .dice .die {
  animation: roll 0.48s ease both;
}
@keyframes deal {
  from {
    transform: translateX(-22px) rotate(-4deg);
    opacity: 0.2;
  }
}
@keyframes loss {
  from {
    transform: translateX(22px);
    opacity: 0.2;
  }
}
@keyframes roll {
  from {
    transform: rotate(-100deg) scale(0.8);
  }
}
@media (min-width: 1450px) {
  .hero {
    min-height: 410px;
  }
  .catimage {
    aspect-ratio: 2.05;
  }
  .herocopy {
    padding: 48px;
  }
}
@media (max-width: 1100px) {
  .shell {
    grid-template-columns: 185px minmax(0, 1fr);
  }
  aside.side {
    padding: 25px 10px;
  }
  .stage,
  .topbar {
    padding-left: 24px;
    padding-right: 24px;
  }
  .catgrid {
    gap: 9px;
  }
  .catbody {
    padding: 10px;
    gap: 7px;
  }
  .caticon {
    width: 30px;
    height: 30px;
  }
  .herocopy {
    padding: 28px;
  }
  .hero {
    min-height: 305px;
  }
}
@media (max-width: 820px) {
  .shell {
    display: block;
  }
  aside.side {
    position: fixed;
    left: 0;
    top: 0;
    width: 245px;
    transform: translateX(-105%);
    transition: transform 0.15s;
    height: 100dvh;
    overflow-y: auto;
  }
  .navopen aside.side {
    transform: translateX(0);
  }
  .shade {
    display: none;
  }
  .navopen .shade {
    display: block;
    position: fixed;
    z-index: 6;
    inset: 0;
    border: 0;
    background: #0009;
  }
  .topbar {
    height: 62px;
    padding: 0 16px;
    gap: 7px;
  }
  .menu,
  .mobilebrand {
    display: flex;
  }
  .mobilebrand {
    font-size: 1.65rem;
    gap: 4px;
  }
  .mobilebrand img {
    width: 28px;
  }
  .menu,
  .lang {
    border: 0;
    background: transparent;
  }
  .crumb {
    display: none;
  }
  .stage {
    padding: 21px 16px;
  }
  .hero {
    min-height: 280px;
  }
  .catbody .caticon {
    display: none;
  }
  .topintro h1,
  .pagehead h1 {
    font-size: 2.45rem;
  }
}
@media (max-width: 590px) {
  .stage {
    padding: 18px 13px;
  }
  .topbar {
    padding: 0 9px;
  }
  .topbar .btn {
    padding: 0.58rem 0.65rem;
  }
  .topintro {
    margin-bottom: 12px;
  }
  .hero {
    display: flex;
    align-items: flex-end;
    min-height: 360px;
  }
  .heroart {
    inset: 0 0 20% 5%;
    -webkit-mask-image: linear-gradient(0deg, transparent, #000 56%);
    mask-image: linear-gradient(0deg, transparent, #000 56%);
  }
  .heroart img {
    object-position: center 51%;
    filter: brightness(0.7);
  }
  .herocopy {
    padding: 18px;
    width: 100%;
    align-items: start;
  }
  .hero h2 {
    font-size: 3.3rem;
    line-height: 0.91;
    margin: 10px 0;
  }
  .hero p {
    margin-bottom: 15px;
    max-width: 260px;
    text-shadow: 0 1px 5px #1a132a;
  }
  .herocredit {
    top: 9px;
    bottom: auto;
    right: 9px;
  }
  .catgrid {
    grid-template-columns: 1fr 1fr;
  }
  .catbody .caticon {
    display: grid;
  }
  .catimage {
    aspect-ratio: 2.1;
  }
  .catbody strong {
    font-size: 1.4rem;
  }
  .duogrid,
  .detailgrid {
    grid-template-columns: 1fr;
  }
  .sectionhead {
    margin-top: 23px;
  }
  .gridcards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }
  .footer > a:last-child {
    margin-left: 0;
  }
  .matchboard {
    grid-template-columns: minmax(0, 1fr);
  }
  .matchboard .backface {
    aspect-ratio: auto;
    min-height: 75px;
    flex-direction: row;
    gap: 12px;
  }
  .backface img {
    width: 32px;
  }
  .backface strong {
    font-size: 1.3rem;
  }
  .score {
    gap: 8px;
  }
  .stickyactions {
    bottom: 4px;
    font-size: 0.9rem;
  }
}
body:not(.motion) *,
body:not(.motion) *::before,
body:not(.motion) *::after {
  animation-duration: 0.01ms !important;
  transition-duration: 0.01ms !important;
}
.reveal {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr;
  gap: 12px;
  background: #282135;
  border: 1px solid #544260;
  border-radius: 10px;
  padding: 12px 15px;
  margin-bottom: 12px;
}
.reveal > div {
  display: grid;
  align-content: center;
  gap: 3px;
  min-width: 0;
}
.reveal small {
  font-size: 0.84rem;
  color: var(--soft);
}
.reveal strong {
  color: #d8b7ff;
}
.reveal b,
.reveal span {
  font-size: 0.93rem;
}
.rules li {
  line-height: 1.55;
  margin: 0.6rem 0;
}
.credits,
.form {
  min-width: 0;
}
fieldset {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
}
pre {
  max-width: 100%;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.json {
  font-family: monospace;
}
.submissionimg {
  max-width: min(100%, 500px);
  max-height: 340px;
  object-fit: contain;
}
.listitem p {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.listitem .grow {
  min-width: 0;
  overflow-wrap: anywhere;
}
.heroart img {
  object-position: center 55%;
}
@media (max-width: 820px) {
  aside.side {
    visibility: hidden;
  }
  .navopen aside.side {
    visibility: visible;
  }
}
@media (max-width: 590px) {
  .reveal {
    grid-template-columns: 1fr 1fr;
  }
  .reveal > div:first-child {
    grid-column: 1/-1;
  }
}

/* Transient match presentations. Stable faces and readable results are the default. */
.qx-dice-overlay {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 24;
  display: grid;
  align-items: center;
  align-items: safe center;
  justify-items: center;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  border: 0;
  border-radius: 0;
  padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right))
    max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  overflow: auto;
  overscroll-behavior: contain;
  background: transparent;
  box-shadow: none;
  color: var(--text);
}
.qx-dice-overlay::backdrop {
  background: #080910dc;
}
.qx-dice-overlay:not([open]) {
  display: none;
}
.qx-roll-panel,
.qx-result-reveal {
  --event-ink: #d3b6ff;
  --event-line: #625078;
  position: relative;
  isolation: isolate;
  width: min(100%, 36rem);
  min-width: 0;
  padding: clamp(17px, 3vw, 32px);
  border: 1px solid var(--event-line);
  border-radius: 20px;
  background: radial-gradient(ellipse at 50% 0, #3c2b54 0, transparent 63%),
    linear-gradient(160deg, #211c2c, #161622 78%);
  box-shadow: inset 0 1px #ffffff20, 0 24px 75px #0008;
  text-align: center;
  overflow-wrap: anywhere;
}
.qx-roll-panel h2,
.qx-result-reveal h2 {
  margin: 0;
  color: var(--text);
  font: 700 clamp(1.8rem, 3.8vw, 2.65rem) / 1.04 var(--display);
}
.qx-roll-panel p,
.qx-result-reveal p {
  margin: 0.6em 0;
  line-height: 1.4;
}
.qx-roll-grid,
.qx-reveal-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(8px, 2.1vw, 18px);
  margin-block: clamp(14px, 2.5vw, 24px);
}
.qx-roll-player {
  --die-size: clamp(43px, 11vw, 72px);
  --die-light: #faf4ff;
  --die-mid: #d9c2ff;
  --die-shadow: #9f82c2;
  --pip-ink: #38264c;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 5px;
  padding: 10px 6px;
  min-width: 0;
  border: 1px solid #ffffff1b;
  border-radius: 13px;
  background: radial-gradient(ellipse at 50% 65%, #a67ec71a, transparent 68%), #100f1b85;
}
.qx-dice-overlay[data-side="1"] .qx-roll-player {
  --die-light: #ecf8ff;
  --die-mid: #b7daf4;
  --die-shadow: #739cbe;
  --pip-ink: #17364b;
}
.qx-dice-overlay .qx-roll-player {
  margin: 16px auto;
  width: min(100%, 25rem);
}
.panel.qx-roll-panel {
  margin: 14px auto;
}
.qx-dice-stage {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: calc(var(--die-size) * 1.95);
  perspective: 470px;
}
.qx-dice-stage::before {
  content: '';
  position: absolute;
  top: 76%;
  width: calc(var(--die-size) * 1.55);
  height: calc(var(--die-size) * 0.35);
  border-radius: 50%;
  background: radial-gradient(ellipse, #030306b0, transparent 68%);
}
.qx-die {
  --face-x: 0deg;
  --face-y: 0deg;
  --view-x: -14deg;
  --view-y: -18deg;
  --view: rotateX(var(--view-x)) rotateY(var(--view-y));
  --show-value: rotateX(var(--face-x)) rotateY(var(--face-y));
  position: relative;
  width: var(--die-size);
  height: var(--die-size);
  transform-style: preserve-3d;
  transform: var(--view) var(--show-value);
}
.qx-dice-overlay[data-side="1"] .qx-die {
  --view-y: 17deg;
}
.qx-die.value-2 { --face-y: -90deg; }
.qx-die.value-3 { --face-x: -90deg; }
.qx-die.value-4 { --face-x: 90deg; }
.qx-die.value-5 { --face-y: 90deg; }
.qx-die.value-6 { --face-y: 180deg; }
.qx-die-face {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  grid-template: repeat(3, 1fr) / repeat(3, 1fr);
  place-items: center;
  padding: 12%;
  border: 1px solid var(--die-shadow);
  border-radius: 10%;
  background: linear-gradient(140deg, var(--die-light), var(--die-mid) 74%, var(--die-shadow));
  box-shadow: inset 1px 1px 1px #fff9, inset -1px -1px 2px #30244045;
  backface-visibility: hidden;
}
.qx-die-face::before {
  content: '';
  position: absolute;
  top: 4%;
  right: 4%;
  bottom: 4%;
  left: 4%;
  border: 1px solid #ffffff46;
  border-radius: 8%;
}
.qx-die-face.face-1 { transform: translateZ(calc(var(--die-size) / 2)); }
.qx-die-face.face-2 { transform: rotateY(90deg) translateZ(calc(var(--die-size) / 2)); }
.qx-die-face.face-3 { transform: rotateX(90deg) translateZ(calc(var(--die-size) / 2)); }
.qx-die-face.face-4 { transform: rotateX(-90deg) translateZ(calc(var(--die-size) / 2)); }
.qx-die-face.face-5 { transform: rotateY(-90deg) translateZ(calc(var(--die-size) / 2)); }
.qx-die-face.face-6 { transform: rotateY(180deg) translateZ(calc(var(--die-size) / 2)); }
.qx-die-face .pip {
  grid-area: 1 / 1;
  width: 78%;
  height: 78%;
  border-radius: 50%;
  background: var(--pip-ink);
  box-shadow: inset 0 1px 2px #010309a0, 0 1px 0 #fffc;
}
.qx-die-face.face-1 .pip,
.qx-die-face.face-3 .pip:nth-child(2),
.qx-die-face.face-5 .pip:nth-child(5) { grid-area: 2 / 2; }
.qx-die-face.face-2 .pip:nth-child(2),
.qx-die-face.face-3 .pip:nth-child(3),
.qx-die-face.face-4 .pip:nth-child(4),
.qx-die-face.face-5 .pip:nth-child(4),
.qx-die-face.face-6 .pip:nth-child(6) { grid-area: 3 / 3; }
.qx-die-face.face-4 .pip:nth-child(2),
.qx-die-face.face-5 .pip:nth-child(2),
.qx-die-face.face-6 .pip:nth-child(2) { grid-area: 1 / 3; }
.qx-die-face.face-4 .pip:nth-child(3),
.qx-die-face.face-5 .pip:nth-child(3),
.qx-die-face.face-6 .pip:nth-child(5) { grid-area: 3 / 1; }
.qx-die-face.face-6 .pip:nth-child(3) { grid-area: 2 / 1; }
.qx-die-face.face-6 .pip:nth-child(4) { grid-area: 2 / 3; }
.qx-dice-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}
.qx-dice-actions button {
  min-height: 44px;
  max-width: 100%;
  white-space: normal;
}
.qx-result-reveal {
  width: min(100%, 42rem);
  border-top: 3px solid var(--event-ink);
  margin: 14px auto;
}
.qx-result-reveal.win {
  --event-ink: #91edc2;
  --event-line: #446958;
  background: radial-gradient(ellipse at 50% 0, #294a40, transparent 64%), #171c20;
}
.qx-result-reveal.loss {
  --event-ink: #ffb4bc;
  --event-line: #784b58;
  background: radial-gradient(ellipse at 50% 0, #492c39, transparent 64%), #201921;
}
.qx-result-reveal.tie {
  --event-ink: #f9d69b;
  --event-line: #7d653e;
  background: radial-gradient(ellipse at 50% 0, #494030, transparent 61%), #211e20;
}
.qx-result-reveal h2 {
  color: var(--event-ink);
}
.qx-reveal-side {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}
.qx-reveal-side > .fullcard {
  margin: auto auto 0;
  border: 1px solid #53689a;
}
.qx-reveal-side > .backface {
  position: relative;
  margin: auto auto 0;
  aspect-ratio: auto;
  min-height: 0;
  padding: 38% 4px;
}
.qx-reveal-side > .backface img {
  position: absolute;
  width: 18%;
  top: 21%;
}
.qx-reveal-side > .backface strong {
  position: absolute;
  bottom: 12%;
  font-size: clamp(0.9rem, 3vw, 1.4rem);
}
.qx-result-reveal.win .qx-reveal-side:first-child .fullcard,
.qx-result-reveal.loss .qx-reveal-side:nth-child(2) .fullcard {
  border-color: var(--green);
}
.qx-result-reveal.tie .qx-reveal-side .fullcard {
  border-color: var(--event-ink);
}
.qx-reveal-value {
  display: block;
  margin-block: 0.25em;
  color: var(--soft);
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
}
.qx-reveal-value b {
  display: block;
  margin: 4px 0;
  color: var(--text);
  font: 700 clamp(1.2rem, 3.1vw, 1.95rem) / 1.08 var(--display);
}
.qx-reveal-value > span {
  font-weight: 700;
  color: #ffbcc6;
}
.qx-result-reveal.win .qx-reveal-side:first-child .qx-reveal-value > span,
.qx-result-reveal.loss .qx-reveal-side:nth-child(2) .qx-reveal-value > span {
  color: var(--green);
}
.qx-result-reveal > .actions {
  justify-content: center;
}
.qx-reveal-cards .fullcard,
.qx-reveal-cards .backface {
  border-radius: 12px;
}
/* The live comparison shows the complete faces so the selected rows stay visible. */
.qx-result-reveal .qx-tie {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  color: var(--event-ink);
}
.qx-result-reveal .qx-tie::before,
.qx-result-reveal .qx-tie::after {
  content: '';
  width: clamp(14px, 6vw, 42px);
  flex-shrink: 0;
  height: 5px;
  border-block: 1px solid currentColor;
}
@media (max-width: 420px) {
  .qx-roll-panel,
  .qx-result-reveal {
    padding: 14px 10px;
    border-radius: 14px;
  }
}
@media (forced-colors: active) {
  .qx-die-face {
    forced-color-adjust: none;
    background: Canvas;
    border-color: CanvasText;
    box-shadow: none;
  }
  .qx-die-face .pip {
    background: CanvasText;
    box-shadow: none;
  }
  .qx-dice-overlay {
    background: Canvas;
  }
}
.motion .qx-die.rolling {
  animation: qx-tumble var(--qx-roll-duration, 880ms) cubic-bezier(0.23, 0.08, 0.24, 1) both;
}
.motion .qx-dice-stage.rolling::before {
  animation: qx-roll-shadow var(--qx-roll-duration, 880ms) ease-out both;
}
.motion .qx-result-reveal {
  animation: qx-reveal-in 260ms ease-out both;
}
.motion .qx-result-reveal .qx-reveal-side {
  --entry: -44px;
  animation: qx-card-in 780ms ease-out both;
}
.motion .qx-result-reveal .qx-reveal-side:nth-child(2) {
  --entry: 44px;
  animation-delay: 50ms;
}
.motion .qx-result-reveal.tie .qx-tie::before,
.motion .qx-result-reveal.tie .qx-tie::after {
  animation: qx-tie-lines 480ms ease-out both;
}
@keyframes qx-tumble {
  0% { transform: translateY(3%) rotateX(165deg) rotateY(-35deg) var(--show-value); }
  38% { transform: translateY(-20%) rotateX(-130deg) rotateY(136deg) var(--show-value); }
  77% { transform: translateY(3%) rotateX(-354deg) rotateY(328deg) var(--show-value); }
  89% { transform: translateY(-3%) rotateX(-380deg) rotateY(349deg) var(--show-value); }
  100% { transform: translateY(0) rotateX(calc(-360deg + var(--view-x))) rotateY(calc(360deg + var(--view-y))) var(--show-value); }
}
@keyframes qx-roll-shadow {
  38% { transform: scale(0.7); opacity: 0.6; }
  77% { transform: scale(1.05); }
}
@keyframes qx-reveal-in {
  from { opacity: 0.15; transform: translateY(8px); }
}
@keyframes qx-card-in {
  from { opacity: 0.3; transform: translateX(var(--entry)); }
}
.qx-match-draw {
  display: flex;
  justify-content: center;
  align-items: center;
  color: #f9d69b;
  text-align: center;
}
.qx-match-draw::before,
.qx-match-draw::after {
  content: '';
  width: clamp(18px, 8vw, 58px);
  height: 6px;
  flex: 0 1 auto;
  margin: 0 0.55em;
  border-top: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
}
.qx-match-draw::before { transform-origin: right center; }
.qx-match-draw::after { transform-origin: left center; }
.motion .qx-match-draw::before,
.motion .qx-match-draw::after {
  animation: qx-draw-finish 530ms cubic-bezier(0.18, 0.65, 0.32, 1) both;
}
@keyframes qx-draw-finish {
  from { opacity: 0.2; transform: scaleX(0.15); }
  70% { opacity: 1; transform: scaleX(1.05); }
  to { transform: scaleX(1); }
}
@keyframes qx-tie-lines {
  from { transform: scaleX(0.1); }
}

.qx-trick-progress {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .6rem 1rem;
  margin-block: .6rem;
}
.qx-trick-progress ol {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  list-style: none;
  padding: 0;
  margin: 0;
}
.qx-trick-progress li {
  display: grid;
  place-items: center;
  min-width: 1.65rem;
  min-height: 1.65rem;
  border: 1px solid currentColor;
  border-radius: .35rem;
}
.qx-trick-progress .qx-trick-win { color: #b8f5d2; background: #185e48; }
.qx-trick-progress .qx-trick-loss { color: #ffd2d4; background: #783143; }
.qx-trick-progress .qx-trick-tie { color: #ffe4a0; background: #584521; }
.qx-trick-progress .qx-trick-open, .qx-trick-progress .qx-trick-unused { opacity: .7; }

.qx-notifications { position: relative; flex: none; }
.qx-bell { position: relative; }
#qx-notification-count {
  position: absolute;
  inset: -.35rem -.35rem auto auto;
  min-width: 1.15rem;
  padding-inline: .2rem;
  border-radius: 1rem;
  background: #d83b4f;
  color: #fff;
  font-size: .72rem;
  line-height: 1.15rem;
}
.qx-notification-list, .qx-invite-popup {
  position: fixed;
  inset: 4.25rem 1rem auto auto;
  z-index: 20;
  width: min(23rem, calc(100vw - 2rem));
  max-height: min(72vh, 36rem);
  overflow: auto;
  margin: 0;
  box-shadow: 0 10px 35px #0008;
}
.qx-notifications [hidden] { display: none; }
.qx-notification-dismiss { display: flex; justify-content: flex-end; }
.qx-invite { padding-block: .65rem; overflow-wrap: anywhere; }
.qx-invite + .qx-invite { border-top: 1px solid currentColor; }
.qx-invite p { margin-block: .3rem; }
[data-friend-thread]:empty { display: none; }

.qx-presence {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: .82rem;
}
.qx-presence > span {
  width: .5rem;
  height: .5rem;
  border-radius: 50%;
  background: currentColor;
  opacity: .6;
}
.qx-presence-online > span { background: #39ce8c; opacity: 1; }
