/* 指スマ固有のスタイル（共通部分は assets/css/game.css） */
:root {
  --skin: #f7cfa4;
  --skin-shade: #ebb684;
  --sleeve: #ffffff;
  --sleeve-line: #3f7cac;
}

/* ---------- シーン（教室の床に円になって座る） ---------- */
.scene {
  position: relative;
  height: min(82vh, 780px);
  min-height: 600px;
  overflow: hidden;
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background:
    linear-gradient(to bottom, #f3ead7 0 16%, #b5864f 16% 17%, transparent 17%),
    repeating-linear-gradient(90deg, #d9ae78 0 46px, #cc9f69 46px 48px);
  user-select: none;
}
/* 床にチョークで描いた輪っか */
.ring {
  position: absolute;
  left: 50%; top: 42%;
  width: 84%; height: 58%;
  transform: translate(-50%, -50%);
  border: 5px dashed rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(255, 255, 255, 0.18), transparent 70%);
}

/* ---------- 手（SVG） ---------- */
.hand-svg { display: block; width: 100%; height: auto; overflow: visible; }
.hand-svg .fist, .hand-svg .thumb rect:first-child {
  fill: var(--skin);
  stroke: var(--ink);
  stroke-width: 5;
}
.hand-svg .arm { fill: var(--skin-shade); stroke: var(--ink); stroke-width: 5; stroke-linejoin: round; }
.hand-svg .sleeve { fill: var(--sleeve); stroke: var(--ink); stroke-width: 5; stroke-linejoin: round; }
.hand-svg .sleeve-line { stroke: var(--sleeve-line); stroke-width: 8; }
.hand-svg .line { fill: none; stroke: var(--ink); stroke-width: 4; stroke-linecap: round; opacity: 0.55; }
.hand-svg .nail { fill: #fde6d2; stroke: var(--ink); stroke-width: 2.5; }
.hand-svg .thumb {
  transform-box: view-box;
  transform-origin: 62px 88px;
  transform: rotate(90deg);
  transition: transform 0.16s cubic-bezier(0.3, 1.7, 0.5, 1);
}
.up .hand-svg .thumb { transform: rotate(0deg); }
.mirror .hand-svg { transform: scaleX(-1); }

/* ---------- 相手の席 ---------- */
.seat {
  position: absolute;
  width: 132px;
  text-align: center;
  transform: translate(-50%, -40%) scale(var(--s, 1));
  transition: filter 0.2s;
  z-index: 2;
}
.seat .avatar { width: 52px; height: 52px; margin: 0 auto 2px; }
.seat .name {
  display: inline-block;
  font-weight: 900;
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 0 10px;
  font-size: 0.9rem;
}
.seat .seat-hands { display: flex; justify-content: center; gap: 4px; margin-top: 4px; }
.seat .hand { width: 56px; transition: opacity 0.3s; }
.seat .hand.lost { opacity: 0.18; filter: grayscale(1); }
.seat .count { font-size: 0.75rem; font-weight: 700; color: var(--ink); min-height: 1.2em; }
.seat.caller .name { background: var(--yellow); box-shadow: 0 0 0 4px rgba(244, 197, 66, 0.5); }

/* ---------- 中央（掛け声・操作） ---------- */
.center {
  position: absolute;
  left: 50%; top: 33%;
  transform: translateX(-50%);
  width: min(60%, 500px);
  text-align: center;
  z-index: 3;
}
.call-area { margin-top: 4px; }
.picker-buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.pick {
  font-family: inherit;
  font-size: 1.2rem;
  font-weight: 900;
  width: 46px;
  height: 46px;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  box-shadow: 0 3px 0 rgba(59, 42, 30, 0.25);
}
.pick:hover:not(:disabled) { background: var(--yellow); }
.pick:disabled { opacity: 0.35; cursor: not-allowed; }
.go { margin-top: 4px; }

/* ---------- 自分（手前） ---------- */
.me {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 4;
  pointer-events: none;
}
.my-tag {
  position: absolute;
  left: 50%; bottom: 16px;
  transform: translateX(-50%);
  z-index: 1;
  white-space: nowrap;
  text-align: center;
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 0 10px;
}
.my-tag .art { width: 1.6em; height: 1.6em; vertical-align: middle; margin-right: 2px; }
.my-tag .speech { position: relative; left: auto; top: auto; transform: none; display: inline-block; margin: -14px -14px 0; }
.my-hands {
  display: flex;
  justify-content: center;
  gap: clamp(96px, 14vw, 170px);
  perspective: 700px;
  margin-bottom: -60px;
}
.my-hand {
  pointer-events: auto;
  width: clamp(130px, 26vw, 220px);
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  transform-origin: 50% 100%;
  transition: transform 0.15s, opacity 0.3s;
}
.my-hand.left { transform: rotateX(22deg) rotateZ(9deg); }
.my-hand.right { transform: rotateX(22deg) rotateZ(-9deg); }
.my-hand:hover:not(:disabled) { filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.9)); }
.my-hand:focus-visible { outline: none; filter: drop-shadow(0 0 0 4px var(--blue)) drop-shadow(0 0 8px var(--blue)); }
.my-hand:disabled { cursor: default; }
.my-hand.lost { opacity: 0.3; filter: grayscale(1); }
.my-hand.left.lost { transform: rotateX(22deg) rotateZ(9deg) translateY(55%); }
.my-hand.right.lost { transform: rotateX(22deg) rotateZ(-9deg) translateY(55%); }

/* 掛け声中は全員の手がゆれる */
.shake .hand-svg { animation: bob 0.32s ease-in-out infinite; }
.seat .hand.shake .hand-svg { animation-duration: 0.28s; }

@keyframes bob {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -10px; }
}

@media (max-width: 560px) {
  .seat { width: 104px; }
  .seat .hand { width: 42px; }
  .seat .avatar { width: 40px; height: 40px; }
  .center { width: 72%; top: 35%; }
  .pick { width: 40px; height: 40px; font-size: 1.05rem; }
  .my-hands { margin-bottom: -40px; }
}
