.demo {
  --forest: #2e493b;
  --forest-dark: #203a2e;
  --canvas: #f5f4e9;
  --honey: #e7bf6d;
  background: var(--canvas);
  color: #293d32;
}
.diamond-icon {
  grid-row: span 2;
  font-size: 28px;
  color: #608aac;
  text-shadow: 1px 1px #dae9ef;
}
#owned-count {
  margin-left: 5px;
  font-size: 10px;
  padding: 2px 5px;
  border-radius: 3px;
  background: #d7deca;
}
.demo main {
  max-width: 1536px;
  padding-bottom: 25px;
}
.demo .page-heading {
  padding: 30px 0 24px;
}
.demo h1 {
  font-size: clamp(27px, 3vw, 40px);
  letter-spacing: -1.4px;
}
.demo h2 {
  font-size: 21px;
}
.demo p {
  max-width: 75ch;
}
.demo button,
.demo select,
.demo input {
  border-radius: 4px;
}
.demo button:not(.collectible):not(.empty-display-place) {
  min-height: 38px;
}
.demo button:not([class]),
.demo select {
  border: 1px solid #bdc8af;
  background: #fffef5;
  padding: 9px 12px;
  color: #354b3a;
}
.demo .primary-button {
  background: var(--forest);
  color: #fff9e5;
  border: 1px solid var(--forest);
}
.demo .quiet-button {
  background: #f5f6e9;
  border: 1px solid #c5ceb5;
}
.demo .danger-button {
  background: #fff1e5;
  border: 1px solid #bfa17e;
  color: #8e412f;
  padding: 9px 14px;
}
.demo .button-row {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  align-items: center;
}
.demo .muted {
  color: #6c7964;
  font-size: 12px;
}
.demo .section-heading {
  margin-bottom: 18px;
}
.demo .section-heading p {
  color: #6c7964;
  font-size: 12px;
  margin-top: 5px;
}
.shop-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 295px;
  gap: 24px;
  align-items: start;
}
.demo .cabinet {
  flex: 0 0 230px;
  padding: 12px 10px 5px;
  border: 5px solid #af8458;
  background: #233e34;
  box-shadow:
    inset 0 0 0 1px #dbb77b,
    4px 6px 0 #1d35275c;
}
.demo .cabinet .display-places {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px 2px;
}
.demo .cabinet .display-piece {
  padding: 7px;
}
.demo .cabinet .display-place {
  padding-bottom: 16px;
}
.demo .cabinet .empty-display-place {
  width: 72px;
  height: 100px;
}
.demo .cabinet .collectible {
  --card-w: 72px;
  --card-h: 100px;
}
.tutorial-note,
.offline-note {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 17px 20px;
  margin-bottom: 22px;
  border: 1px solid #cbb375;
  background: #f5e8bf;
}
.tutorial-note > div,
.offline-note > div {
  flex: 1;
}
.tutorial-note p,
.offline-note p {
  font-size: 12px;
  color: #6b6749;
  margin-top: 4px;
}
.request {
  padding: 15px 0;
  border-bottom: 1px dashed #bac6a9;
}
.request:last-child {
  padding-bottom: 0;
  border: 0;
}
.request strong {
  display: block;
  font-size: 13px;
}
.request p {
  font-size: 11px;
  color: #6c7964;
  margin: 5px 0 9px;
}
.request .quiet-button {
  width: 100%;
  text-align: left;
  font-size: 12px;
}
.pack-shelf {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}
.pack-product {
  display: grid;
  grid-template-columns: 125px minmax(0, 1fr);
  gap: 25px;
  align-items: center;
  background: #ecefdf;
  border: 1px solid #c6cfb6;
  padding: 30px;
}
.pack-product > img {
  width: 105px;
  height: 160px;
  object-fit: contain;
  filter: drop-shadow(4px 7px 0 #57644920);
}
.pack-product p {
  margin: 10px 0 18px;
  font-size: 13px;
  color: #69765d;
}
.pack-product .price {
  display: block;
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 12px;
}
.odds-panel {
  margin-top: 25px;
  padding: 22px;
  background: #fffdf2;
  border: 1px solid #d3d4bd;
}
.odds-panel summary {
  font-weight: bold;
  cursor: pointer;
}
.odds-panel table {
  width: 100%;
  border-collapse: collapse;
  margin: 15px 0;
}
.odds-panel th,
.odds-panel td {
  text-align: left;
  padding: 9px 6px;
  border-bottom: 1px solid #dfe1d1;
  font-size: 12px;
}
.odds-panel p {
  font-size: 12px;
  margin-top: 10px;
  color: #63715c;
}
.demo .collection-tools {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  align-items: end;
}
.demo label {
  font-size: 11px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.demo .checkbox-label {
  display: flex;
  flex-direction: row;
  align-items: center;
  font-size: 12px;
}
.collection-tools .button-row {
  margin-left: auto;
}
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 15px;
}
.owned-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 19px 10px 12px;
  background: #e9edde;
  border: 1px solid #d0d6bf;
  min-width: 0;
}
.owned-card .card-meta {
  width: 100%;
  margin-top: 12px;
  text-align: center;
  font-size: 11px;
}
.card-meta strong {
  display: block;
  font-size: 12px;
}
.card-meta small {
  display: block;
  color: #6a775e;
  margin-top: 3px;
}
.card-tags {
  min-height: 22px;
  display: flex;
  gap: 4px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 7px;
}
.card-tags span {
  font-size: 9px;
  padding: 2px 5px;
  background: #d4ddc5;
  border-radius: 2px;
}
.card-check {
  position: absolute;
  top: 7px;
  left: 7px;
  z-index: 10;
}
.card-check input {
  width: 16px;
  height: 16px;
}
.empty-state {
  padding: 50px 25px;
  text-align: center;
  background: #e9edde;
  border: 1px dashed #b7c2a6;
}
.empty-state p {
  margin: 10px auto 20px;
  color: #6a775e;
}
.team-board {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  background: #365842;
  padding: 25px;
  border: 6px solid #ae895f;
  position: relative;
  margin-bottom: 28px;
}
.team-board::before {
  content: '';
  position: absolute;
  inset: 18px;
  border: 1px solid #c6d0a551;
  pointer-events: none;
}
.lineup-row {
  display: flex;
  gap: 25px;
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
}
.lineup-slot {
  text-align: center;
  color: #f2e8c3;
}
.lineup-slot > button:not(.collectible):first-child {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 7px;
  background: #213b2e;
  color: #ccd8b9;
  border: 1px dashed #92a77f;
  width: 110px;
  height: 152px;
}
.lineup-slot .collectible {
  margin-bottom: 8px;
}
.lineup-slot > small {
  display: block;
  font-size: 10px;
}
.lineup-slot .quiet-button {
  min-height: 28px !important;
  font-size: 10px;
  padding: 4px 8px;
  margin-top: 5px;
}
.team-strength {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  gap: 15px;
}
.team-strength strong {
  font-size: 26px;
}
.campaign-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
}
.campaign-level {
  border: 1px solid #c4cdb3;
  background: #e8eddd;
  padding: 18px;
}
.campaign-level h3 {
  font-size: 16px;
  margin-bottom: 12px;
}
.game-list {
  display: flex;
  gap: 7px;
}
.game-list button {
  flex: 1;
  min-width: 0;
  padding: 10px 4px;
  border: 1px solid #bac7a9;
  background: #fbfcf1;
  font-size: 11px;
}
.game-list button.done {
  background: #d2dfbc;
}
.game-list button.next {
  background: #2e493b;
  color: #fff9e5;
  border-color: #2e493b;
}
.game-list small {
  display: block;
  margin-top: 4px;
  font-size: 9px;
}
.upgrade-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}
.upgrade {
  border: 1px solid #c4cdb3;
  background: #e8eddd;
  padding: 25px;
}
.upgrade p {
  margin: 12px 0;
  color: #68765e;
}
.upgrade img {
  width: 80px;
  height: 80px;
  object-fit: contain;
  float: right;
}
.upgrade .level-pips {
  display: flex;
  gap: 6px;
  margin: 20px 0;
}
.level-pips i {
  width: 35px;
  height: 9px;
  background: #c8d1b7;
}
.level-pips i.filled {
  background: #678454;
}
.decoration-note {
  margin-top: 22px;
  padding: 18px;
  background: #e7e6d6;
  color: #7a7b64;
  font-size: 13px;
}
.demo dialog {
  border: 1px solid #9fab8b;
  background: #f8f7eb;
  box-shadow: 0 20px 70px #15281d60;
  border-radius: 7px;
  max-width: 900px;
  width: calc(100% - 32px);
  padding: 24px;
  max-height: 90dvh;
  overflow: auto;
}
.demo dialog::backdrop {
  background: #182b246b;
}
.dialog-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin-bottom: 22px;
}
.dialog-top h2 {
  font-size: 23px;
}
.detail-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 30px;
}
.detail-art {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 20px;
  padding: 28px;
  background: #dce3cc;
}
.detail-art .collectible {
  --card-w: 162px !important;
  --card-h: 225px !important;
}
.detail-info p {
  margin: 10px 0;
  color: #68765e;
  font-size: 13px;
}
.detail-info dl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 18px 0;
}
.detail-info dt {
  font-size: 12px;
  color: #6b785f;
}
.detail-info dd {
  margin: 0;
  font-weight: bold;
  text-align: right;
}
.detail-controls {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 15px 0;
  align-items: end;
}
.detail-controls select {
  max-width: 220px;
}
.pack-reveal {
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 25px 0;
}
.pack-back {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 12px;
  width: 108px;
  height: 150px;
  background: repeating-linear-gradient(45deg, #304d3c 0 9px, #3b5b46 9px 18px);
  color: #ecd59a;
  border: 4px double #c8b573;
  box-shadow: 3px 4px #1e382a20;
}
.pack-back img {
  width: 35px;
  height: 35px;
}
.pack-revealed {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.pack-revealed small {
  font-size: 10px;
}
.pack-revealed .collectible {
  animation: demo-reveal 0.35s ease-out;
}
.confirm-list {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  max-height: 330px;
  overflow: auto;
  margin: 20px 0;
}
.scoreboard {
  background: #233b30;
  color: #f3eacb;
  text-align: center;
  padding: 28px;
  margin: 20px 0;
}
.scoreboard .score {
  font-size: 54px;
  letter-spacing: 5px;
  font-variant-numeric: tabular-nums;
}
.scoreboard p {
  margin: auto;
  font-size: 12px;
  color: #b6c8a8;
}
.match-court {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 2px solid #cab487;
  background: repeating-linear-gradient(90deg, #cba56d 0 45px, #d1af78 45px 90px);
  padding: 18px;
  margin-top: 15px;
}
.match-ball {
  width: 22px;
  height: 22px;
  background: #c17d37;
  border: 2px solid #6f4b28;
  border-radius: 50%;
}
.match-running .match-ball {
  animation: demo-ball 1.2s ease-in-out infinite alternate;
}
.opponent-lineup {
  display: flex;
  gap: 10px;
  overflow: auto;
  padding: 15px 0;
}
.opponent-lineup > div {
  flex: 1;
  text-align: center;
  font-size: 10px;
}
.opponent-lineup small {
  display: block;
  margin-top: 7px;
}
.developer-panel {
  margin-top: 45px;
  border-top: 1px dashed #b8c4a7;
  padding-top: 15px;
  color: #68765e;
}
.developer-panel summary {
  cursor: pointer;
  font-size: 12px;
}
.developer-panel p {
  margin: 12px 0;
  font-size: 12px;
}
.developer-panel .button-row {
  margin: 15px 0;
}
.dev-form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: end;
}
.demo-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 4%;
  font-size: 10px;
  color: #7a826e;
  border-top: 1px solid #d4dac6;
}
#game-toast {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  background: #263f31;
  color: #fff7db;
  padding: 13px 22px;
  border: 1px solid #829672;
  box-shadow: 0 4px 20px #1a332c33;
  max-width: calc(100% - 30px);
  font-size: 13px;
}
.demo .card-rating {
  width: calc(32% * var(--rating-columns, 7) / 7);
}
.demo .collectible .prizm-frame::after,
.demo .collectible .card-sparkles::before,
.demo .collectible .card-sparkles::after,
.demo .collectible .card-paper::after {
  animation: none;
}
.demo .collectible:not(.is-playing) .card-sparkles {
  opacity: 0.25;
}
@keyframes demo-reveal {
  from {
    opacity: 0;
    transform: rotateY(65deg) translateY(7px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes demo-ball {
  from {
    transform: translate(-30px, -5px);
  }
  to {
    transform: translate(30px, 12px);
  }
}
@media (min-width: 1200px) {
}
@media (max-width: 900px) {
  .shop-layout {
    grid-template-columns: 1fr;
  }
  .pack-product {
    grid-template-columns: 70px 1fr;
    padding: 20px;
    gap: 15px;
  }
  .pack-product > img {
    width: 70px;
  }
}
@media (max-width: 600px) {
  .demo main {
    padding: 0 5% 20px;
  }
  .demo .page-heading {
    align-items: flex-start;
  }
  .demo .page-heading > div {
    min-width: 0;
  }
  .demo .page-heading .button-row {
    justify-content: flex-end;
  }
  .demo .page-heading p {
    font-size: 12px;
  }
  .shop-sidebar,
  .pack-shelf,
  .campaign-grid,
  .upgrade-grid {
    grid-template-columns: 1fr;
  }
  .collection-tools label {
    flex: 1 0 40%;
  }
  .collection-tools .button-row {
    margin-left: 0;
  }
  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .lineup-row {
    gap: 12px;
  }
  .team-board {
    padding: 20px 8px;
    gap: 20px;
  }
  .lineup-slot > button:not(.collectible):first-child {
    width: 85px;
    height: 125px;
  }
  .lineup-slot .collectible {
    --card-w: 85px !important;
    --card-h: 118px !important;
  }
  .detail-layout {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .detail-art {
    padding: 20px;
  }
  .demo dialog {
    padding: 18px;
    width: calc(100% - 20px);
  }
  .demo-footer {
    flex-direction: column;
    gap: 7px;
  }
  .offline-note {
    flex-wrap: wrap;
  }
  .opponent-lineup .collectible {
    --card-w: 60px !important;
    --card-h: 84px !important;
  }
  .opponent-lineup {
    gap: 5px;
  }
  .lineup-slot > small {
    font-size: 9px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .demo *,
  .demo *::before,
  .demo *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
.demo .effect-gloss.is-playing .card-paper::after {
  opacity: 1;
  animation: gloss-pass 1s ease-in-out;
}
.demo .effect-ribbon.is-playing .prizm-frame::after {
  opacity: 1;
  animation: ribbon-pass 1s ease-in-out;
}
.demo .effect-trace.is-playing .motion-trace rect {
  animation: edge-trace 1s ease-in-out;
}
.demo .collectible.is-playing:not(.effect-gloss) .card-paper::after,
.demo .collectible.is-playing:not(.effect-ribbon) .prizm-frame::after {
  animation: none;
  opacity: 0;
}
@media (max-width: 600px) {
  .lineup-slot {
    flex: 0 0 90px;
  }
  .lineup-slot .quiet-button {
    font-size: 9px;
    padding: 3px 5px;
  }
}

.live-game.design-preview dialog.pixel-match-dialog {
  width: min(560px, calc(100% - 24px));
  max-width: 560px;
  padding: 20px;
}
.pixel-match-dialog .dialog-top {
  margin-bottom: 12px;
}
.pixel-match {
  overflow: hidden;
  border-radius: 6px;
}
.pixel-match-board {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  padding: 16px 20px;
  background: #19243a;
  color: #f4f7ff;
}
.pixel-match-team {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 3px 9px;
  align-items: center;
  font-size: 11px;
}
.pixel-match-team strong {
  grid-column: 2;
  font-size: 32px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.pixel-match-jersey {
  display: grid;
  place-items: center;
  grid-row: span 2;
  height: 30px;
  color: #fff;
  background: #4b8fe8;
  font-size: 10px;
  font-weight: 700;
  clip-path: polygon(
    20% 0,
    38% 0,
    42% 14%,
    58% 14%,
    62% 0,
    80% 0,
    100% 22%,
    82% 36%,
    78% 30%,
    78% 100%,
    22% 100%,
    22% 30%,
    18% 36%,
    0 22%
  );
}
.pixel-match-away {
  justify-self: end;
}
.pixel-match-away .pixel-match-jersey {
  background: #ed6a5a;
}
.pixel-match-period {
  color: #d0d9ea;
  font-size: 12px;
}
.pixel-match-quarters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 10px 0;
  background: #26344d;
  color: #f4f7ff;
}
.pixel-match-quarters > div {
  display: grid;
  gap: 4px;
  text-align: center;
}
.pixel-match-quarters span {
  color: #b2bfd4;
  font-size: 9px;
}
.pixel-match-quarters strong {
  font-size: 11px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.pixel-match canvas {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 12 / 7;
  background: #19243a;
  image-rendering: pixelated;
}
.live-game .pixel-match-status {
  margin: 16px 0 4px;
  font-size: 18px;
  font-weight: 650;
  text-align: center;
}
.live-game .pixel-match-note {
  margin: 0;
  color: var(--t-muted, #6e766d);
  font-size: 12px;
  text-align: center;
}
.pixel-match .button-row {
  justify-content: center;
  margin-top: 16px;
}
.pixel-match .button-row:has([hidden] + [hidden]) {
  display: none;
}
.pixel-match [hidden] {
  display: none !important;
}
@media (max-width: 480px) {
  .live-game.design-preview dialog.pixel-match-dialog {
    padding: 14px;
  }
  .pixel-match-board {
    padding: 14px 12px;
    gap: 10px;
  }
  .pixel-match-team {
    font-size: 10px;
    gap: 3px 6px;
  }
  .pixel-match-team strong {
    font-size: 28px;
  }
  .pixel-match-quarters strong {
    font-size: 10px;
  }
}
