/* 牌的外觀與拖曳中的 ghost。 */

.tile {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--tile-w);
  height: var(--tile-h);
  flex: none;
  border-radius: 6px;
  background: linear-gradient(#fffefa, #f6f1e4);
  border: 1px solid #ddd6c4;
  box-shadow: inset 0 1px 0 #fff, 0 1px 1.5px rgba(43, 48, 56, .18);
  font-family: Georgia, "Times New Roman", serif;
  font-size: calc(var(--tile-w) * .62);
  font-weight: 700;
  line-height: 1;
  cursor: grab;
  /* 觸控時碰到牌一律不捲動頁面（§8.5），否則一拖就變成滑頁面。 */
  touch-action: none;
  user-select: none;
}

/* 牌面下緣的小圓點：真實拉密牌的辨識特徵，也讓玩家分得出正放/倒放。 */
.tile::after {
  content: "";
  position: absolute;
  bottom: 3px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
  opacity: .28;
}

.tile--black, .tile--c0 { color: #2b3038; }
.tile--red, .tile--c1 { color: #c92a2a; }
.tile--orange, .tile--c2 { color: #e8590c; }
.tile--blue, .tile--c3 { color: #1864ab; }

/* 拖起來的那幾張：原位留一個淡淡的空位，讓玩家看得出桌上剩什麼。 */
.tile--lifted { opacity: .22; filter: grayscale(1); }

/* ghost 跟著指標走。pointer-events:none 讓 elementFromPoint 打得到底下的落點。 */
.ghost {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 150;
  display: flex;
  gap: 3px;
  pointer-events: none;
  will-change: transform;
}
.ghost .tile {
  box-shadow: var(--shadow-lift);
  transform: scale(1.06);
  cursor: grabbing;
}
