.mahjong-face {
  --tile-blue: #203a45;
  --tile-green: #246149;
  --tile-red: #ae3737;
  --tile-gold: #8f521d;
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  color: var(--tile-blue);
  line-height: 1;
  container-type: inline-size;
  pointer-events: none;
  user-select: none;
}

.mahjong-corner {
  position: absolute;
  top: 7%;
  left: 10%;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 17cqw;
  font-weight: 750;
  line-height: 0.95;
  letter-spacing: -0.06em;
  color: var(--tile-blue);
}

.mahjong-corner--bamboo,
.mahjong-corner--season {
  color: var(--tile-green);
}

.mahjong-corner--character,
.mahjong-corner--flower {
  color: var(--tile-red);
}

.mahjong-art {
  position: absolute;
  inset: 21% 10% 9%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.mahjong-face--large .mahjong-art {
  inset: 20% 9% 8%;
}

.mahjong-ink--blue { color: var(--tile-blue); }
.mahjong-ink--green { color: var(--tile-green); }
.mahjong-ink--red { color: var(--tile-red); }
.mahjong-ink--gold { color: var(--tile-gold); }

.mahjong-glyph {
  display: block;
  font-family: 'Noto Serif CJK TC', 'Songti TC', SimSun, 'Noto Sans CJK TC', serif;
  font-size: 59cqw;
  font-weight: 700;
  line-height: 1;
}

.mahjong-art--characters {
  gap: 0;
}

.mahjong-glyph--number {
  font-size: 41cqw;
  color: var(--tile-blue);
}

.mahjong-glyph--ten-thousand {
  font-size: 43cqw;
  color: var(--tile-red);
}

.mahjong-glyph--season {
  font-size: 57cqw;
}

.mahjong-dragon-frame {
  position: relative;
  width: 45cqw;
  height: 56cqw;
  box-sizing: border-box;
  border: 4cqw solid var(--tile-blue);
  border-radius: 7cqw;
}

.mahjong-dragon-frame::before {
  position: absolute;
  inset: 3cqw;
  border: 1.5cqw solid var(--tile-blue);
  border-radius: 2cqw;
  content: '';
}

.mahjong-dragon-frame::after {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 7cqw;
  height: 7cqw;
  border: 1.5cqw solid var(--tile-blue);
  transform: translate(-50%, -50%) rotate(45deg);
  content: '';
}

.mahjong-art--spots {
  --circle-size: 16cqw;
  --bamboo-height: 20cqw;
  --bamboo-width: 8cqw;
}

.mahjong-art--count-1 { --circle-size: 50cqw; }
.mahjong-art--count-2 { --circle-size: 29cqw; --bamboo-height: 30cqw; --bamboo-width: 10cqw; }
.mahjong-art--count-3 { --circle-size: 22cqw; --bamboo-height: 26cqw; --bamboo-width: 9cqw; }
.mahjong-art--count-4 { --circle-size: 23cqw; --bamboo-height: 27cqw; --bamboo-width: 10cqw; }
.mahjong-art--count-5 { --circle-size: 20cqw; }
.mahjong-art--count-6 { --circle-size: 19cqw; }
.mahjong-art--count-8 { --bamboo-height: 17cqw; }

.mahjong-circle-mark,
.mahjong-bamboo-mark {
  position: absolute;
  left: var(--mark-x);
  top: var(--mark-y);
  transform: translate(-50%, -50%);
}

.mahjong-circle-mark {
  width: var(--circle-size);
  height: var(--circle-size);
  border-radius: 50%;
  background: radial-gradient(circle, currentColor 0 21%, transparent 24% 40%, currentColor 43% 69%, transparent 72%);
}

.mahjong-art--count-1 .mahjong-circle-mark {
  background: radial-gradient(circle, currentColor 0 16%, transparent 18% 26%, currentColor 28% 33%, transparent 34% 42%, currentColor 44% 50%, transparent 52% 58%, currentColor 60% 69%, transparent 72%);
}

.mahjong-bamboo-mark {
  width: var(--bamboo-width);
  height: var(--bamboo-height);
  border-radius: 42% / 12%;
  background: linear-gradient(to bottom, currentColor 0 29%, transparent 29% 37%, currentColor 37% 63%, transparent 63% 71%, currentColor 71%);
}

.mahjong-bamboo-mark::after {
  position: absolute;
  inset: 8% 34%;
  border-left: 1px solid currentColor;
  content: '';
}

.mahjong-bird {
  position: relative;
  width: 42cqw;
  height: 33cqw;
  border-radius: 18% 60% 43% 56%;
  background: var(--tile-green);
  transform: translateY(6%) rotate(-17deg);
}

.mahjong-bird::before {
  position: absolute;
  right: -7cqw;
  top: -11cqw;
  width: 20cqw;
  height: 19cqw;
  border-radius: 55% 53% 50% 8%;
  background: var(--tile-green);
  content: '';
}

.mahjong-bird::after {
  position: absolute;
  right: -13cqw;
  top: -5cqw;
  width: 0;
  height: 0;
  border-top: 4cqw solid transparent;
  border-bottom: 4cqw solid transparent;
  border-left: 7cqw solid var(--tile-red);
  content: '';
}

.mahjong-bird-eye {
  position: absolute;
  z-index: 1;
  right: -2cqw;
  top: -5cqw;
  width: 3.8cqw;
  height: 3.8cqw;
  border-radius: 50%;
  background: #fff5df;
}

.mahjong-bird-wing {
  position: absolute;
  top: 21%;
  left: 14%;
  width: 59%;
  height: 48%;
  border-radius: 85% 20% 65% 35%;
  border-bottom: 2cqw solid #fff0ce;
  background: #163e31;
}

.mahjong-flower-stem {
  position: absolute;
  top: 41%;
  left: 47%;
  width: 14%;
  height: 45%;
  border-left: 2.1cqw solid var(--tile-green);
  border-radius: 47%;
  transform: rotate(19deg);
}

.mahjong-flower-stem::after {
  position: absolute;
  top: 39%;
  right: 63%;
  width: 15cqw;
  height: 8cqw;
  border-radius: 93% 14% 80% 8%;
  background: var(--tile-green);
  transform: rotate(26deg);
  content: '';
}

.mahjong-blossom {
  position: absolute;
  top: 10%;
  left: 27%;
  width: 46%;
  aspect-ratio: 1;
}

.mahjong-petal {
  position: absolute;
  top: 5%;
  left: 34%;
  width: 32%;
  height: 48%;
  border-radius: 62% 62% 42% 42%;
  background: currentColor;
  transform: rotate(var(--petal-angle));
  transform-origin: 50% 94%;
}

.mahjong-blossom-center {
  position: absolute;
  inset: 39%;
  box-sizing: border-box;
  border: 1.3cqw solid currentColor;
  border-radius: 50%;
  background: #f3cf82;
}
