/* Sapphire and gold frame shared by game sheets. */
dialog {
  border: 2px solid #69d9f1;
  border-radius: 26px;
  background:
    radial-gradient(ellipse at 50% 0, #2955a7aa, transparent 55%),
    linear-gradient(145deg, #122958, #0a173f);
  box-shadow:
    inset 0 0 0 3px #183c81,
    inset 0 0 0 5px #dcb65a65,
    0 18px 70px #000c,
    0 0 20px #2dc5ff26;
  padding: 22px;
}
dialog::backdrop {
  background: #020b25c9;
  backdrop-filter: blur(7px);
}
dialog .sheet-head {
  gap: 10px;
  position: relative;
  z-index: 2;
  flex-shrink: 0;
}
dialog .sheet-head h2 {
  font-size: 24px;
  line-height: 1.15;
}
dialog.ornate-sheet[open] {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.sheet-scroll {
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  min-height: 0;
  padding: 2px 2px 8px;
}
.wallet-ribbon {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 0 0 12px;
}
.wallet-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  border: 0;
  box-shadow:
    inset 0 1px 0 #c9eaff25,
    0 4px 14px #020a2b35;
  border-radius: 17px;
  padding: 5px 9px;
  background: linear-gradient(145deg, #203d7b, #112652);
  box-shadow: inset 0 1px #c5deff26;
  min-width: 0;
  min-height: 42px;
}
.wallet-pill img {
  width: 32px;
  height: 30px;
  object-fit: contain;
}
.wallet-pill b {
  font-size: 16px;
  flex: 1;
  text-align: left;
}
.wallet-plus {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 8px;
  color: #132654;
  background: linear-gradient(#95f3ff, #39bce3);
  font-size: 20px;
  font-weight: 900;
}
.home-visual .home-hero {
  width: 100%;
  margin: 0;
  max-height: none;
  height: clamp(155px, 44vw, 220px);
  aspect-ratio: auto;
  overflow: visible;
}
.home-visual .home-hero img {
  object-fit: contain;
}
.home-cards .image-card {
  padding: 8px 8px 12px;
  overflow: hidden;
  min-height: 158px;
  border-radius: 24px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
}
.home-cards .image-card > .art {
  width: 100%;
  height: 106px;
  position: relative;
  margin: 0;
  inset: auto;
  overflow: visible;
  flex-shrink: 0;
}
.home-cards .image-card > .art img {
  position: static;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.home-cards .image-card > b {
  position: static;
  font-size: 20px;
  margin: 0 0 0 5px;
  z-index: 1;
}
.home-cards .circle-arrow {
  width: 28px;
  height: 28px;
  right: 10px;
  bottom: 13px;
  font-size: 28px;
}
.sticker-store-banner {
  display: grid;
  grid-template-columns: 55px 1fr 16px;
  grid-template-rows: auto auto;
  gap: 3px 10px;
  padding: 10px 14px;
  width: 100%;
  text-align: left;
  margin: 12px 0;
}
.sticker-store-banner img {
  width: 55px;
  height: 57px;
  object-fit: contain;
  grid-row: 1 / 3;
}
.sticker-store-banner b {
  font-size: 17px;
  align-self: end;
}
.sticker-store-banner small {
  grid-column: 2;
  font-size: 11px;
  color: #bad4fa;
}
.sticker-store-banner > span {
  grid-column: 3;
  grid-row: 1 / 3;
  align-self: center;
  font-size: 24px;
}
.shop-tabs {
  margin-bottom: 12px;
}
.shop-balances {
  display: flex;
  gap: 25px;
  align-items: center;
  margin: 12px 0 18px;
}
.shop-balances span {
  display: flex;
  gap: 7px;
  align-items: center;
}
.shop-balances img {
  width: 35px;
  height: 35px;
  object-fit: contain;
}
.shop-balances b {
  font-size: 19px;
}
.sticker-shop-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.sticker-pack-card {
  padding: 12px 8px;
  background: linear-gradient(145deg, #254783a8, #112755);
  border: 0;
  box-shadow:
    inset 0 1px 0 #c9eaff25,
    0 4px 14px #020a2b35;
  border-radius: 21px;
  text-align: center;
  min-width: 0;
}
.sticker-pack-card h3 {
  min-height: 32px;
  font-size: 13px;
  line-height: 1.25;
}
.sticker-pack-preview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2px;
  margin: 10px 0;
}
.sticker-pack-preview img {
  width: 100%;
  height: 54px;
  object-fit: contain;
}
.sticker-pack-card > small {
  font-size: 10px;
  color: #aac9ef;
}
.sticker-pack-card > button {
  width: 100%;
  font-size: 11px;
  padding: 9px 4px;
  min-height: 36px;
  margin-top: 8px;
}
.exchange-heading {
  font-size: 17px;
  margin: 18px 0 10px;
}
.exchange-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #28487770;
  padding: 10px;
  border: 0;
  box-shadow:
    inset 0 1px 0 #c9eaff25,
    0 4px 14px #020a2b35;
  border-radius: 17px;
  margin: 9px 0;
}
.exchange-row > div {
  display: flex;
  gap: 10px;
  align-items: center;
}
.exchange-row img {
  width: 43px;
  height: 43px;
  object-fit: contain;
}
.exchange-row b {
  font-size: 21px;
}
.exchange-row button {
  padding: 10px 14px;
  font-size: 12px;
  min-height: 38px;
}
.achievement-gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.achievement-gallery .achievement {
  padding: 12px 8px;
  border-radius: 20px;
  border: 0;
  box-shadow:
    inset 0 1px 0 #c9eaff25,
    0 4px 14px #020a2b35;
  background: #21427c6e;
  display: flex;
  align-items: center;
  flex-direction: column;
  text-align: center;
}
.achievement img {
  width: 100%;
  height: 100px;
  object-fit: contain;
}
.achievement-gallery b {
  font-size: 13px;
  min-height: 32px;
  line-height: 1.3;
}
.achievement-gallery progress {
  margin-top: 9px;
}
.achievement-gallery small {
  font-size: 10px;
  color: #bbd5ff;
  margin: 7px 0;
}
.achievement-gallery button {
  font-size: 10px;
  padding: 7px 5px;
  width: 100%;
  min-height: 37px;
}
.achievement.compact {
  padding: 7px 4px;
  cursor: pointer;
}
.achievement.compact img {
  height: 74px;
}
.achievement.compact b {
  font-size: 11px;
}
.achievement.compact progress {
  height: 4px;
  margin: 7px 0 3px;
}
.achievement.compact small {
  font-size: 9px;
}
.skin-showcase-art {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.skin-card-art {
  display: block;
  width: 100%;
  height: 145px;
  object-fit: contain;
  margin: 0 auto;
}
#collectionDots {
  flex-wrap: wrap;
  max-width: 190px;
  margin-left: auto;
  margin-right: auto;
}
.game-actions {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr) 38px 38px;
  gap: 6px;
}
.game-actions > .blue,
.game-actions > .coral {
  font-size: 11px;
  padding: 9px 5px;
}
.game-actions .round {
  width: 38px;
  height: 43px;
}
.sticker-trigger {
  background: transparent;
  border: 0;
  box-shadow: none;
  overflow: visible;
  padding: 0;
}
.sticker-trigger img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  max-width: none;
}
.sticker-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0;
}
.sticker-choice {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
}
.sticker-choice img {
  width: 100%;
  height: 100px;
  object-fit: contain;
}
.sticker-choice:active {
  transform: scale(0.9);
}
.sticker-pack-tabs {
  display: flex;
  overflow: auto;
  gap: 7px;
  padding: 5px;
}
.sticker-pack-tabs button {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  padding: 3px;
  border-radius: 14px;
  border: 0;
  box-shadow:
    inset 0 1px 0 #c9eaff25,
    0 4px 14px #020a2b35;
  background: #173366;
}
.sticker-pack-tabs button.chosen {
  border-color: #68e7ff;
  background: #2861a7;
}
.sticker-pack-tabs img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.sticker-layer {
  position: absolute;
  inset: 0;
  z-index: 14;
  pointer-events: none;
  overflow: hidden;
}
.table-sticker {
  position: absolute;
  width: 76px;
  height: 76px;
  background: transparent;
  border: 0;
  box-shadow: none;
  animation: sticker-pop 0.35s cubic-bezier(0.17, 0.89, 0.25, 1.4) both;
}
.table-sticker img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
@keyframes sticker-pop {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.3);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.album-stage {
  text-align: center;
  padding: 8px 0 15px;
}
.album-mascot {
  width: 140px;
  height: 145px;
  object-fit: contain;
}
.album-stage h2 {
  margin: 3px 0 10px;
  font-size: 25px;
}
.album-stage > p {
  font-size: 17px;
  margin: 5px 0;
}
.album-stage > small {
  display: block;
  font-size: 11px;
  color: #a8caee;
}
.album-piece-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin: 16px 0;
}
.album-piece {
  position: relative;
  padding: 7px;
  border-radius: 18px;
  border: 0;
  box-shadow:
    inset 0 1px 0 #c9eaff25,
    0 4px 14px #020a2b35;
  background: #102d57;
}
.album-piece img {
  width: 100%;
  height: 83px;
  object-fit: contain;
  opacity: 0.15;
  filter: grayscale(1);
}
.album-piece.collected {
  background: #245d8980;
  border-color: #65dcff9e;
}
.album-piece.collected img {
  opacity: 1;
  filter: none;
}
.album-piece small {
  display: block;
  color: #91bee4;
  font-size: 10px;
}
.album-stage .fine {
  font-size: 11px;
  line-height: 1.6;
  margin: 14px 0;
}
.album-prize {
  display: block;
  font-size: 13px;
  color: #ffda8f;
  line-height: 1.7;
}
.album-heading {
  font-size: 20px;
  margin: 14px 0;
}
.album-catalog {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.album-collection {
  padding: 10px 6px;
  background: linear-gradient(140deg, #27477f, #10294e);
  border: 0;
  box-shadow:
    inset 0 1px 0 #c9eaff25,
    0 4px 14px #020a2b35;
  border-radius: 20px;
  min-width: 0;
}
.album-collection.selected {
  border-color: #69e2f7;
  box-shadow: inset 0 0 18px #208ebf3d;
}
.album-collection img {
  width: 100%;
  height: 110px;
  object-fit: contain;
}
.album-collection b {
  display: block;
  font-size: 13px;
  min-height: 31px;
}
.album-collection small {
  display: block;
  font-size: 10px;
  color: #9ac7ee;
}
.chest-stage {
  isolation: isolate;
}
.chest-stage img {
  position: relative;
  z-index: 1;
}
.chest-stage::after {
  content: '';
  position: absolute;
  z-index: 0;
  inset: 20% 15% 5%;
  border-radius: 50%;
  background: radial-gradient(ellipse, #ffe57a88, #e4a92933 45%, transparent 70%);
  filter: blur(13px);
  animation: treasure-breathe 2.6s ease-in-out infinite;
  pointer-events: none;
}
@keyframes treasure-breathe {
  50% {
    opacity: 0.45;
    transform: scale(0.84);
  }
}
.celebration {
  width: min(410px, 94vw);
}
.celebration .sheet-head {
  justify-content: flex-end;
  margin-bottom: -30px;
  z-index: 5;
}
.celebration .sheet-head h2 {
  display: none;
}
.celebration .sheet-scroll {
  text-align: center;
  overflow: hidden;
}
.reward-stage {
  position: relative;
  height: 280px;
  width: 100%;
  display: grid;
  place-items: center;
  isolation: isolate;
}
.reward-stage > img {
  position: absolute;
  width: 100%;
  height: 92%;
  object-fit: contain;
  z-index: 2;
}
.reward-open {
  opacity: 0;
}
.reward-rays {
  position: absolute;
  inset: 13% 0 0;
  border-radius: 50%;
  background: repeating-conic-gradient(from 0deg, #ffda6b29 0deg 12deg, transparent 12deg 30deg);
  mask-image: radial-gradient(circle, #000, transparent 70%);
  z-index: 0;
  opacity: 0;
}
.play .reward-closed {
  animation: chest-unlock 1.15s ease-in both;
}
.play .reward-open {
  animation: chest-reveal 1.5s cubic-bezier(0.1, 0.8, 0.3, 1.2) both;
}
.play .reward-rays {
  animation:
    ray-reveal 1.5s both,
    ray-spin 15s 1.2s linear infinite;
}
.play .reward-centerpiece {
  animation: chest-reveal 0.9s cubic-bezier(0.1, 0.8, 0.3, 1.2) both;
}
.reward-totals {
  display: grid;
  gap: 7px;
  margin: 15px 0 22px;
}
.reward-totals > b {
  font-size: 38px;
  color: #ffe6a0;
  text-shadow:
    0 2px 0 #80562a,
    0 0 20px #f1b43d50;
}
.reward-totals small {
  font-size: 15px;
  display: block;
  color: #c9d9f3;
}
.reward-totals .gem-total {
  color: #7deaff;
  font-size: 27px;
}
.gem-total img {
  width: 33px;
  height: 33px;
  object-fit: contain;
  vertical-align: middle;
  margin-right: 7px;
}
.reward-particles {
  position: absolute;
  inset: 50%;
  z-index: 3;
}
.reward-particles i {
  position: absolute;
  width: 8px;
  height: 10px;
  border-radius: 3px;
  background: linear-gradient(#fff3ab, #f5b136);
  opacity: 0;
}
.play .reward-particles i {
  animation: treasure-particle 1.8s calc(0.6s + var(--i) * 0.035s) ease-out both;
}
.ready-chest {
  display: block;
  width: 210px;
  height: 210px;
  object-fit: contain;
  margin: 0 auto;
}
#rewardReadyDialog .sheet-scroll {
  text-align: center;
}
@keyframes chest-unlock {
  20%,
  40% {
    transform: rotate(-5deg);
  }
  30%,
  50% {
    transform: rotate(5deg);
  }
  65% {
    opacity: 1;
    transform: scale(1.05);
  }
  100% {
    opacity: 0;
    transform: scale(0.85);
  }
}
@keyframes chest-reveal {
  0%,
  45% {
    opacity: 0;
    transform: translateY(25px) scale(0.75);
  }
  80% {
    opacity: 1;
    transform: translateY(-4px) scale(1.06);
  }
  100% {
    opacity: 1;
    transform: none;
  }
}
@keyframes ray-reveal {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes ray-spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes treasure-particle {
  15% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(var(--x), var(--y)) rotate(190deg);
  }
}
.still .reward-closed {
  display: none;
}
.still .reward-open,
.still .reward-centerpiece {
  opacity: 1;
  animation: none;
}
.still .reward-particles {
  display: none;
}
@media (max-height: 720px) {
  .reward-stage {
    height: 210px;
  }
  .celebration .reward-totals {
    margin: 8px 0 14px;
  }
  .celebration h2 {
    font-size: 24px;
  }
}
@media (max-width: 370px) {
  dialog {
    padding: 18px;
  }
  dialog .sheet-head h2 {
    font-size: 22px;
  }
  .sticker-shop-grid {
    gap: 7px;
  }
  .sticker-pack-preview img {
    height: 46px;
  }
  .sticker-pack-card h3 {
    font-size: 12px;
  }
  .skin-card-art {
    height: 120px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .reward-stage *,
  .chest-stage::after,
  .table-sticker {
    animation: none !important;
  }
  .reward-closed {
    display: none;
  }
  .reward-open {
    opacity: 1;
  }
}
.game-actions {
  display: grid;
}
dialog {
  border-image-source: url('./assets/ui-v11/popup-frame.webp');
  border-image-slice: 105;
  border-image-width: 18px;
  border-image-repeat: stretch;
}
.wallet-ribbon {
  margin: 0 16px 12px;
}
.home-cards .image-card > b {
  font-size: 17px;
  max-width: calc(100% - 30px);
}
.home-cards .circle-arrow {
  width: 25px;
  height: 25px;
  font-size: 24px;
}
.sticker-trigger img {
  width: 38px;
  height: 42px;
  max-width: 100%;
}
.table-sticker {
  width: 68px;
  height: 68px;
}
.achievement-gallery .achievement > small {
  display: block;
}

#walletRibbon .wallet-pill {
  align-items: center;
  overflow: hidden;
}
#walletRibbon .wallet-plus {
  flex: 0 0 26px;
  width: 26px;
  height: 26px;
  min-width: 26px;
  padding: 0;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  align-self: center;
  transform: none;
  position: static;
  margin: 0;
  font-family: system-ui;
  font-size: 22px;
  font-weight: 700;
  box-shadow: inset 0 1px 0 #d0fbff80;
}
#walletRibbon .wallet-pill b {
  min-width: 0;
  font-variant-numeric: tabular-nums;
}

.portrait.has-avatar-frame {
  position: relative;
  overflow: visible;
}
.portrait.has-avatar-frame::after {
  content: '';
  position: absolute;
  inset: -17%;
  background: var(--avatar-frame) center/contain no-repeat;
  pointer-events: none;
  z-index: 2;
}
.frame-shop-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}
.frame-shop-card {
  background: linear-gradient(145deg, #1d3974, #142956);
  border: 0;
  box-shadow:
    inset 0 1px 0 #c9eaff25,
    0 4px 14px #020a2b35;
  border-radius: 20px;
  padding: 12px;
  min-width: 0;
  text-align: center;
}
.frame-shop-card.selected {
  border-color: #4ce2ff;
  box-shadow: inset 0 0 20px #29b6ff20;
}
.frame-preview {
  height: 126px;
  display: grid;
  place-items: center;
}
.frame-preview .portrait {
  width: 90px;
  height: 90px;
}
.frame-shop-card h3 {
  font-size: 15px;
  line-height: 1.3;
  min-height: 38px;
  margin: 8px 0;
}
.frame-shop-card > small {
  color: #a7c2ee;
  font-size: 12px;
}
.frame-shop-card > button {
  width: 100%;
  font-size: 12px;
  line-height: 1.35;
  min-height: 40px;
  margin-top: 9px;
  padding: 9px 7px;
}
.frame-duration {
  color: #6cdef2;
  font-size: 12px;
  margin: 7px 0;
}
#profileFramesOpen {
  margin: 16px 0;
}
.opponent-backs {
  display: flex;
  align-items: center;
  height: 23px;
  gap: 0;
  margin-top: 3px;
  justify-content: center;
}
.opponent-backs .domino-back {
  display: block;
  width: 13px;
  height: 23px;
  object-fit: contain;
  filter: drop-shadow(0 2px 1px #00153b80);
}
.opponent-backs .domino-back + .domino-back {
  margin-left: -4px;
}
#opponentHand > .domino-back {
  height: 38px;
  width: 21px;
  object-fit: contain;
}
.player .portrait.has-avatar-frame {
  margin: 5px;
}
.album-explanation {
  font-size: 13px;
  color: #bdd5ff;
  line-height: 1.5;
}
.album-pack-owned {
  color: #6edff5 !important;
  font-size: 10px !important;
}
@media (max-width: 370px) {
  .frame-shop-card {
    padding: 9px;
  }
  .frame-preview {
    height: 110px;
  }
  .frame-preview .portrait {
    width: 76px;
    height: 76px;
  }
}

.member-row.self .portrait.has-avatar-frame::after {
  width: auto;
  height: auto;
  border: 0;
  border-radius: 0;
  right: -17%;
  bottom: -17%;
  background: var(--avatar-frame) center/contain no-repeat;
}

.mini-domino[data-skin] {
  background: linear-gradient(135deg, #ffffff32, transparent), var(--tile-body);
  border-color: var(--tile-edge);
  box-shadow: 0 3px 0 var(--tile-edge);
}
.mini-domino[data-skin] .pip-half i {
  background: var(--tile-pip);
}
.mini-domino[data-skin] .pip-half:first-child {
  border-color: var(--tile-edge);
}
.reward-extras {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  color: #bce9ff;
  font-size: 13px;
  line-height: 1.4;
}
.reward-extras img {
  width: 64px;
  height: 64px;
  object-fit: contain;
}
