:root {
  color-scheme: dark;
  font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", "Segoe UI", sans-serif;
  background: #020904;
  color: #fff7d0;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  overflow: hidden;
}

button {
  font: inherit;
}

.game-shell {
  display: grid;
  place-items: center;
  width: 100vw;
  height: 100svh;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.92) 0 7%, transparent 19%),
    radial-gradient(circle at 50% 35%, rgba(53, 122, 50, 0.55), transparent 43%),
    #020904;
}

.match-frame {
  position: relative;
  width: min(100vw, 520px);
  height: 100svh;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 46%, rgba(72, 158, 60, 0.94), rgba(35, 111, 42, 0.97) 47%, #0d431f 74%, #06180d 100%),
    repeating-linear-gradient(35deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 7px);
  box-shadow: 0 0 70px rgba(0, 0, 0, 0.9);
}

.match-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 42%, transparent 0 43%, rgba(0, 0, 0, 0.28) 74%, rgba(0, 0, 0, 0.82) 100%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.45), transparent 12% 88%, rgba(0, 0, 0, 0.45));
}

.hud {
  position: absolute;
  z-index: 8;
  top: 10px;
  left: 14px;
  right: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  pointer-events: none;
}

.eyebrow {
  display: none;
}

h1 {
  width: 52px;
  height: 32px;
  margin: 0;
  overflow: hidden;
  border-radius: 6px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.16), transparent),
    rgba(0, 0, 0, 0.32);
  color: transparent;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

h1::after {
  content: "☷";
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: rgba(239, 231, 177, 0.88);
  font-size: 22px;
}

#new-hand {
  min-width: 86px;
  min-height: 42px;
  border: 1px solid #8d3c00;
  border-radius: 7px;
  background: linear-gradient(180deg, #ffb145 0%, #d65b06 48%, #8e2107 100%);
  color: #fff2bc;
  font-weight: 900;
  letter-spacing: 0;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.45);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.42),
    0 3px 0 #3a0d04,
    0 10px 18px rgba(0, 0, 0, 0.36);
  cursor: pointer;
  pointer-events: auto;
}

.table {
  position: absolute;
  inset: 54px 0 0;
}

.seat {
  position: absolute;
  z-index: 2;
}

.seat-info,
.avatar,
.status {
  position: absolute;
  overflow: hidden;
  width: 1px;
  height: 1px;
  clip: rect(0 0 0 0);
}

.seat-top {
  top: 86px;
  left: 50%;
  width: min(65vw, 320px);
  transform: translateX(-50%);
}

.seat-left {
  top: 158px;
  left: 8px;
  height: 47%;
}

.seat-right {
  top: 214px;
  right: 8px;
  height: 47%;
}

.seat-bottom {
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  grid-template-rows: auto auto;
  gap: 8px;
  padding: 0 10px 14px;
  background:
    linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.72) 28%, rgba(0, 0, 0, 0.92));
}

.player-row {
  display: flex;
  align-items: center;
  min-height: 44px;
}

.action-button {
  min-width: 106px;
  min-height: 42px;
  margin-left: 0;
  border: 1px solid rgba(238, 215, 142, 0.42);
  border-radius: 4px;
  background: linear-gradient(180deg, #151515, #050505);
  color: #d9c98a;
  font-size: 17px;
  font-weight: 900;
  letter-spacing: 0;
  text-shadow: 0 1px 0 #000;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.04),
    0 7px 12px rgba(0, 0, 0, 0.42);
  cursor: pointer;
}

.action-button::after {
  content: "›";
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 36px;
  margin-left: 12px;
  border-left: 1px solid rgba(255, 255, 255, 0.09);
  color: #f3e5a1;
  font-size: 38px;
  line-height: 0;
  vertical-align: middle;
}

.action-button.active {
  background: linear-gradient(180deg, #ffc257, #c85506);
  color: #fff7c0;
}

.action-button:disabled {
  opacity: 0.45;
  cursor: default;
}

.wall-row {
  display: flex;
  justify-content: center;
  gap: 0;
}

.wall-row.vertical {
  display: grid;
  grid-template-columns: 1fr;
  align-content: start;
  justify-items: center;
  gap: 0;
}

.hidden-tile {
  display: block;
  width: 30px;
  height: 39px;
  margin-left: -1px;
  border: 1px solid rgba(99, 64, 5, 0.72);
  border-radius: 4px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.84) 0 26%, #e9e0bf 27% 34%, transparent 35%),
    linear-gradient(180deg, #f2f0df 0 36%, #dca13c 37% 100%);
  box-shadow:
    2px 4px 0 #97620d,
    4px 7px 10px rgba(0, 0, 0, 0.2);
}

.wall-row.vertical .hidden-tile {
  width: 27px;
  height: 38px;
  margin: -1px 0 0;
  transform: rotate(90deg);
  transform-origin: center;
}

.pond {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 44%;
  display: grid;
  grid-template-columns: 68px 148px 68px;
  grid-template-rows: 68px 148px 68px;
  place-items: center;
  width: 284px;
  height: 284px;
  transform: translate(-50%, -50%);
}

.center-console {
  grid-column: 2;
  grid-row: 2;
  position: relative;
  display: grid;
  grid-template-rows: 26px 48px 28px;
  place-items: center;
  width: 132px;
  height: 132px;
  border: 4px solid #2b2b2b;
  border-radius: 9px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.16), transparent 28%),
    linear-gradient(180deg, #454545, #171717);
  box-shadow:
    inset 0 0 0 2px #0c0c0c,
    0 7px 13px rgba(0, 0, 0, 0.45);
  text-align: center;
}

.center-console::before,
.center-console::after {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(252, 205, 86, 0.22);
  border-radius: 6px;
  pointer-events: none;
}

.round {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 80px;
  height: 26px;
  background: #111;
  color: #f5f5f5;
  font-size: 17px;
  font-weight: 900;
}

.wall-count {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 88px;
  height: 46px;
  border: 2px solid #333;
  background: #050505;
  color: #ff595c;
  font-size: 39px;
  font-weight: 900;
  line-height: 1;
}

.wall-count::before {
  content: "";
}

.score-cross {
  position: absolute;
  inset: 0;
  color: #78ff54;
  font-family: "Consolas", monospace;
  font-size: 16px;
  font-weight: 900;
  pointer-events: none;
}

.score-cross span {
  position: absolute;
}

#mini-score-2 {
  top: 7px;
  left: 50%;
  transform: translateX(-50%);
}

#mini-score-0 {
  bottom: 7px;
  left: 50%;
  transform: translateX(-50%);
}

#mini-score-1 {
  top: 51px;
  left: -6px;
  transform: rotate(90deg);
}

#mini-score-3 {
  top: 51px;
  right: -6px;
  transform: rotate(90deg);
}

.message {
  position: absolute;
  left: 50%;
  bottom: -74px;
  width: 190px;
  transform: translateX(-50%);
  color: rgba(255, 248, 199, 0.96);
  font-size: 13px;
  font-weight: 900;
  text-shadow: 0 2px 4px #000;
}

.river {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  overflow: hidden;
}

.pond-river {
  width: 100%;
  height: 100%;
  padding: 2px;
  background: transparent;
}

.pond-top {
  grid-column: 2;
  grid-row: 1;
  align-content: end;
  justify-content: center;
}

.pond-left {
  grid-column: 1;
  grid-row: 2;
  align-content: center;
  justify-content: end;
}

.pond-right {
  grid-column: 3;
  grid-row: 2;
  align-content: center;
  justify-content: start;
}

.pond-bottom {
  grid-column: 2;
  grid-row: 3;
  align-content: start;
  justify-content: center;
}

.tile {
  position: relative;
  display: inline-grid;
  grid-template-rows: 1fr auto;
  place-items: center;
  width: 32px;
  height: 44px;
  border: 1px solid #d8d6c9;
  border-radius: 5px;
  background:
    linear-gradient(180deg, #ffffff 0%, #f6f6ee 62%, #e2ddc8 100%);
  color: #151515;
  font-weight: 900;
  line-height: 0.9;
  text-shadow: 0 1px 0 #fff;
  box-shadow:
    0 4px 0 #c98924,
    0 6px 8px rgba(0, 0, 0, 0.28);
  cursor: pointer;
  transform: translateZ(0);
}

.tile::after {
  content: "";
  position: absolute;
  left: 1px;
  right: 1px;
  bottom: -4px;
  height: 6px;
  border-radius: 0 0 4px 4px;
  background: linear-gradient(90deg, #e7b246, #a96a10);
  z-index: -1;
}

.tile:disabled {
  cursor: default;
  opacity: 1;
}

.tile-top {
  display: block;
  padding-top: 4px;
  font-size: 17px;
  letter-spacing: 0;
  writing-mode: horizontal-tb;
}

.tile-bottom {
  display: block;
  min-height: 15px;
  padding-bottom: 3px;
  font-size: 14px;
}

.tile.man {
  color: #a80f18;
}

.tile.pin {
  color: #1a1a1a;
}

.tile.pin .tile-top,
.tile.pin .tile-bottom {
  color: #242424;
  text-shadow:
    0 -1px 0 #b0161e,
    0 1px 0 #2f8a59;
}

.tile.sou {
  color: #14723d;
}

.tile.honor {
  color: #111;
}

.tile.honor .tile-top {
  color: #111;
  font-size: 22px;
}

.pond-river .tile {
  width: 24px;
  height: 32px;
  border-radius: 4px;
  box-shadow: 0 2px 0 #bb7d1b;
}

.pond-river .tile::after {
  bottom: -2px;
  height: 4px;
}

.pond-river .tile-top {
  padding-top: 3px;
  font-size: 12px;
}

.pond-river .tile-bottom {
  min-height: 10px;
  padding-bottom: 2px;
  font-size: 10px;
}

.hand-rack {
  display: flex;
  gap: 4px;
  min-height: 102px;
  padding: 8px 6px 12px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 10%),
    rgba(0, 0, 0, 0.38);
  border-top: 1px solid rgba(236, 223, 160, 0.18);
}

.hand-rack::-webkit-scrollbar {
  display: none;
}

.hand-rack .tile {
  flex: 0 0 auto;
  width: 58px;
  height: 78px;
  border-radius: 7px;
  box-shadow:
    0 6px 0 #c98924,
    0 10px 14px rgba(0, 0, 0, 0.38);
  transition: transform 120ms ease, filter 120ms ease;
}

.hand-rack .tile::after {
  bottom: -6px;
  height: 8px;
}

.hand-rack .tile-top {
  padding-top: 7px;
  font-size: 31px;
}

.hand-rack .tile-bottom {
  min-height: 25px;
  padding-bottom: 6px;
  font-size: 24px;
}

.hand-rack .tile:hover:not(:disabled),
.hand-rack .tile:focus-visible:not(:disabled) {
  transform: translateY(-9px);
  filter: brightness(1.06);
}

.result-banner {
  position: absolute;
  z-index: 9;
  left: 50%;
  top: 45%;
  width: min(82vw, 360px);
  transform: translate(-50%, -50%);
  border: 2px solid #f0c866;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(98, 29, 21, 0.96), rgba(20, 11, 7, 0.98));
  padding: 18px 14px;
  color: #fff2b5;
  text-align: center;
  font-size: 30px;
  font-weight: 900;
  text-shadow: 0 3px 0 #000;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.58);
}

.result-banner small {
  display: block;
  margin-top: 8px;
  color: #f4d77b;
  font-size: 14px;
  line-height: 1.35;
}

@media (min-width: 721px) {
  .match-frame {
    width: min(100vw, 620px);
  }

  .table {
    top: 56px;
  }

  .pond {
    top: 45%;
    grid-template-columns: 86px 178px 86px;
    grid-template-rows: 86px 178px 86px;
    width: 350px;
    height: 350px;
  }

  .center-console {
    width: 158px;
    height: 158px;
  }

  .wall-count {
    width: 98px;
    height: 52px;
    font-size: 43px;
  }

  .seat-left {
    left: 26px;
  }

  .seat-right {
    right: 26px;
  }
}

@media (max-width: 420px) {
  .table {
    top: 50px;
  }

  .seat-top {
    top: 84px;
    width: 306px;
  }

  .hidden-tile {
    width: 27px;
    height: 36px;
  }

  .wall-row.vertical .hidden-tile {
    width: 24px;
    height: 35px;
  }

  .seat-left {
    top: 150px;
    left: 4px;
  }

  .seat-right {
    top: 210px;
    right: 4px;
  }

  .pond {
    top: 43.5%;
    grid-template-columns: 58px 136px 58px;
    grid-template-rows: 58px 136px 58px;
    width: 252px;
    height: 252px;
  }

  .center-console {
    width: 122px;
    height: 122px;
  }

  .round {
    width: 74px;
    font-size: 15px;
  }

  .wall-count {
    width: 78px;
    height: 40px;
    font-size: 34px;
  }

  .score-cross {
    font-size: 14px;
  }

  .pond-river .tile {
    width: 22px;
    height: 30px;
  }

  .hand-rack .tile {
    width: 54px;
    height: 74px;
  }

  .hand-rack .tile-top {
    font-size: 29px;
  }

  .hand-rack .tile-bottom {
    font-size: 22px;
  }
}

.tile {
  isolation: isolate;
  grid-template-rows: 1fr;
  padding: 4px 4px 6px;
  border: 1px solid #fffdf0;
  border-radius: 6px;
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.96) 0 22%, transparent 23%),
    linear-gradient(180deg, #fffff7 0%, #faf6df 52%, #e8ddbd 100%);
  box-shadow:
    inset 2px 2px 0 rgba(255, 255, 255, 0.9),
    inset -2px -2px 0 rgba(180, 154, 88, 0.22),
    0 4px 0 #b87919,
    0 7px 9px rgba(0, 0, 0, 0.32);
}

.tile::before {
  content: "";
  position: absolute;
  inset: 3px 3px 6px;
  border-radius: 4px;
  background:
    radial-gradient(circle at 22% 16%, rgba(255, 255, 255, 0.78), transparent 18%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.36), rgba(255, 255, 255, 0));
  pointer-events: none;
  z-index: 0;
}

.tile::after {
  background:
    linear-gradient(90deg, #f0c15b 0%, #c98c25 22%, #8d520c 100%);
  box-shadow: inset 0 -1px 0 rgba(50, 24, 0, 0.35);
}

.tile-face {
  position: relative;
  z-index: 1;
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
}

.tile-number {
  position: absolute;
  top: 2%;
  color: #b61520;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 46%;
  font-weight: 900;
  line-height: 1;
}

.tile-kanji {
  color: #b61520;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: 74%;
  font-weight: 900;
  line-height: 1;
  transform: translateY(13%);
}

.tile-face-pin,
.tile-face-sou {
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 7%;
  padding: 11% 10% 13%;
}

.pip {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  border: 1px solid rgba(35, 48, 59, 0.32);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, #fff8da 0 18%, transparent 19%),
    radial-gradient(circle at 50% 50%, currentColor 0 48%, transparent 49%),
    radial-gradient(circle at 37% 34%, rgba(255, 255, 255, 0.75), transparent 22%),
    currentColor;
  box-shadow: inset -1px -1px 0 rgba(0, 0, 0, 0.18);
}

.pin .pip:nth-child(odd) {
  color: #ba1623;
}

.pin .pip:nth-child(even) {
  color: #1f7f55;
}

.tile-face-pin[data-count="1"] .pip-1,
.tile-face-sou[data-count="1"] .bamboo-1 { grid-column: 2; grid-row: 2; }
.tile-face-pin[data-count="2"] .pip-1,
.tile-face-sou[data-count="2"] .bamboo-1 { grid-column: 1; grid-row: 1; }
.tile-face-pin[data-count="2"] .pip-2,
.tile-face-sou[data-count="2"] .bamboo-2 { grid-column: 3; grid-row: 3; }
.tile-face-pin[data-count="3"] .pip-1,
.tile-face-sou[data-count="3"] .bamboo-1 { grid-column: 1; grid-row: 1; }
.tile-face-pin[data-count="3"] .pip-2,
.tile-face-sou[data-count="3"] .bamboo-2 { grid-column: 2; grid-row: 2; }
.tile-face-pin[data-count="3"] .pip-3,
.tile-face-sou[data-count="3"] .bamboo-3 { grid-column: 3; grid-row: 3; }
.tile-face-pin[data-count="4"] .pip-1,
.tile-face-sou[data-count="4"] .bamboo-1 { grid-column: 1; grid-row: 1; }
.tile-face-pin[data-count="4"] .pip-2,
.tile-face-sou[data-count="4"] .bamboo-2 { grid-column: 3; grid-row: 1; }
.tile-face-pin[data-count="4"] .pip-3,
.tile-face-sou[data-count="4"] .bamboo-3 { grid-column: 1; grid-row: 3; }
.tile-face-pin[data-count="4"] .pip-4,
.tile-face-sou[data-count="4"] .bamboo-4 { grid-column: 3; grid-row: 3; }
.tile-face-pin[data-count="5"] .pip-5,
.tile-face-sou[data-count="5"] .bamboo-5 { grid-column: 2; grid-row: 2; }
.tile-face-pin[data-count="6"] .pip:nth-child(1),
.tile-face-sou[data-count="6"] .bamboo:nth-child(1) { grid-column: 1; grid-row: 1; }
.tile-face-pin[data-count="6"] .pip:nth-child(2),
.tile-face-sou[data-count="6"] .bamboo:nth-child(2) { grid-column: 3; grid-row: 1; }
.tile-face-pin[data-count="6"] .pip:nth-child(3),
.tile-face-sou[data-count="6"] .bamboo:nth-child(3) { grid-column: 1; grid-row: 2; }
.tile-face-pin[data-count="6"] .pip:nth-child(4),
.tile-face-sou[data-count="6"] .bamboo:nth-child(4) { grid-column: 3; grid-row: 2; }
.tile-face-pin[data-count="6"] .pip:nth-child(5),
.tile-face-sou[data-count="6"] .bamboo:nth-child(5) { grid-column: 1; grid-row: 3; }
.tile-face-pin[data-count="6"] .pip:nth-child(6),
.tile-face-sou[data-count="6"] .bamboo:nth-child(6) { grid-column: 3; grid-row: 3; }
.tile-face-pin[data-count="7"] .pip-7,
.tile-face-sou[data-count="7"] .bamboo-7,
.tile-face-pin[data-count="9"] .pip-9,
.tile-face-sou[data-count="9"] .bamboo-9 { grid-column: 2; grid-row: 2; }

.tile-face-pin[data-count="5"] .pip-1,
.tile-face-pin[data-count="7"] .pip-1,
.tile-face-pin[data-count="8"] .pip-1,
.tile-face-pin[data-count="9"] .pip-1,
.tile-face-sou[data-count="5"] .bamboo-1,
.tile-face-sou[data-count="7"] .bamboo-1,
.tile-face-sou[data-count="8"] .bamboo-1,
.tile-face-sou[data-count="9"] .bamboo-1 { grid-column: 1; grid-row: 1; }
.tile-face-pin[data-count="5"] .pip-2,
.tile-face-pin[data-count="7"] .pip-2,
.tile-face-pin[data-count="8"] .pip-2,
.tile-face-pin[data-count="9"] .pip-2,
.tile-face-sou[data-count="5"] .bamboo-2,
.tile-face-sou[data-count="7"] .bamboo-2,
.tile-face-sou[data-count="8"] .bamboo-2,
.tile-face-sou[data-count="9"] .bamboo-2 { grid-column: 3; grid-row: 1; }
.tile-face-pin[data-count="5"] .pip-3,
.tile-face-pin[data-count="7"] .pip-3,
.tile-face-pin[data-count="8"] .pip-3,
.tile-face-pin[data-count="9"] .pip-3,
.tile-face-sou[data-count="5"] .bamboo-3,
.tile-face-sou[data-count="7"] .bamboo-3,
.tile-face-sou[data-count="8"] .bamboo-3,
.tile-face-sou[data-count="9"] .bamboo-3 { grid-column: 1; grid-row: 3; }
.tile-face-pin[data-count="5"] .pip-4,
.tile-face-pin[data-count="7"] .pip-4,
.tile-face-pin[data-count="8"] .pip-4,
.tile-face-pin[data-count="9"] .pip-4,
.tile-face-sou[data-count="5"] .bamboo-4,
.tile-face-sou[data-count="7"] .bamboo-4,
.tile-face-sou[data-count="8"] .bamboo-4,
.tile-face-sou[data-count="9"] .bamboo-4 { grid-column: 3; grid-row: 3; }
.tile-face-pin[data-count="7"] .pip-5,
.tile-face-pin[data-count="8"] .pip-5,
.tile-face-pin[data-count="9"] .pip-5,
.tile-face-sou[data-count="7"] .bamboo-5,
.tile-face-sou[data-count="8"] .bamboo-5,
.tile-face-sou[data-count="9"] .bamboo-5 { grid-column: 1; grid-row: 2; }
.tile-face-pin[data-count="7"] .pip-6,
.tile-face-pin[data-count="8"] .pip-6,
.tile-face-pin[data-count="9"] .pip-6,
.tile-face-sou[data-count="7"] .bamboo-6,
.tile-face-sou[data-count="8"] .bamboo-6,
.tile-face-sou[data-count="9"] .bamboo-6 { grid-column: 3; grid-row: 2; }
.tile-face-pin[data-count="8"] .pip-7,
.tile-face-sou[data-count="8"] .bamboo-7 { grid-column: 2; grid-row: 1; }
.tile-face-pin[data-count="8"] .pip-8,
.tile-face-sou[data-count="8"] .bamboo-8 { grid-column: 2; grid-row: 3; }
.tile-face-pin[data-count="9"] .pip-7,
.tile-face-sou[data-count="9"] .bamboo-7 { grid-column: 2; grid-row: 1; }
.tile-face-pin[data-count="9"] .pip-8,
.tile-face-sou[data-count="9"] .bamboo-8 { grid-column: 2; grid-row: 3; }

.bamboo {
  position: relative;
  display: block;
  width: 54%;
  height: 100%;
  justify-self: center;
  border-radius: 999px;
  background:
    linear-gradient(90deg, transparent 0 24%, rgba(255, 255, 255, 0.65) 25% 35%, transparent 36%),
    linear-gradient(180deg, #27a25d 0 44%, #166f3d 45% 55%, #27a25d 56% 100%);
  box-shadow:
    inset -1px 0 0 rgba(0, 0, 0, 0.2),
    0 0 0 1px rgba(17, 84, 44, 0.25);
}

.sou .bamboo:nth-child(3n) {
  background:
    linear-gradient(90deg, transparent 0 24%, rgba(255, 255, 255, 0.65) 25% 35%, transparent 36%),
    linear-gradient(180deg, #d03432 0 44%, #8c1e23 45% 55%, #d03432 56% 100%);
}

.tile-face-honor {
  padding: 5% 0 0;
}

.honor-glyph {
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: 78%;
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 1px 0 #fff4cf;
}

.tile.honor.black .honor-glyph { color: #171717; }
.tile.honor.green .honor-glyph { color: #15844f; }
.tile.honor.red .honor-glyph { color: #c21d2b; }
.tile.honor.white .honor-glyph {
  width: 62%;
  height: 48%;
  border: 2px solid #a8d8c0;
  border-radius: 3px;
  color: transparent;
  background: linear-gradient(180deg, rgba(255,255,255,0.28), rgba(168,216,192,0.18));
}

.pond-river .tile {
  padding: 3px 3px 4px;
}

.pond-river .tile-face-pin,
.pond-river .tile-face-sou {
  gap: 5%;
  padding: 10% 9% 12%;
}

.pond-river .tile-number {
  font-size: 44%;
}

.pond-river .tile-kanji,
.pond-river .honor-glyph {
  font-size: 72%;
}

.hand-rack .tile {
  padding: 6px 6px 9px;
}

h1::after {
  content: "\9EBB";
  color: rgba(239, 231, 177, 0.95);
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-weight: 900;
}

.action-button::after {
  content: ">";
  font-size: 28px;
}

.hidden-tile {
  border-color: rgba(255, 241, 186, 0.45);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.88) 0 18%, #f5edcf 19% 28%, transparent 29%),
    linear-gradient(180deg, #fff9df 0 27%, #dca13c 28% 73%, #a4630b 74% 100%);
  box-shadow:
    inset 1px 1px 0 rgba(255, 255, 255, 0.78),
    inset -1px -1px 0 rgba(81, 46, 8, 0.24),
    2px 4px 0 #8b5509,
    4px 7px 10px rgba(0, 0, 0, 0.24);
}

.pond-top .tile {
  transform: rotate(180deg);
}

.pond-left .tile {
  transform: rotate(90deg);
}

.pond-right .tile {
  transform: rotate(-90deg);
}

.hand-rack {
  position: relative;
  gap: 3px;
  min-height: 112px;
  padding: 10px 10px 15px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), transparent 12%),
    linear-gradient(180deg, rgba(57, 31, 10, 0.2), rgba(0, 0, 0, 0.56)),
    rgba(0, 0, 0, 0.44);
  border-top: 1px solid rgba(236, 223, 160, 0.28);
  box-shadow:
    inset 0 9px 18px rgba(255, 255, 255, 0.04),
    inset 0 -12px 18px rgba(0, 0, 0, 0.44);
}

.hand-rack::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 6px;
  height: 9px;
  background: linear-gradient(180deg, rgba(255, 213, 116, 0.36), rgba(106, 54, 13, 0.18));
  pointer-events: none;
}

.hand-rack .tile {
  width: 55px;
  height: 76px;
  margin-top: 4px;
}

.hand-rack .tile.tsumo-tile {
  margin-left: 12px;
  transform: translateY(-3px);
}

.hand-rack .tile.tsumo-tile:hover:not(:disabled),
.hand-rack .tile.tsumo-tile:focus-visible:not(:disabled) {
  transform: translateY(-11px);
}

.pond-bottom .tile {
  margin-top: 2px;
}
