/* グリコ固有のスタイル（共通部分は assets/css/game.css） */

.choices small { font-size: 0.75rem; color: var(--ink-soft); }

/* ---------- シーン（夕方の公園の石段） ---------- */
.scene {
  position: relative;
  height: min(78vh, 700px);
  min-height: 540px;
  overflow: hidden;
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: linear-gradient(#7fbbe8 0%, #bfe0f5 45%, #ffe2b8 78%, #ffd29a 100%);
  user-select: none;
}
.sky-deco .sun {
  position: absolute; left: 62%; top: 30%;
  width: 70px; height: 70px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff3b0, #ffb347 70%);
  box-shadow: 0 0 40px 10px rgba(255, 179, 71, 0.5);
}
.cloud { position: absolute; width: 120px; height: 68px; opacity: 0.95; animation: drift 40s linear infinite; }
.cloud.c1 { top: 6%; left: 30%; }
.cloud.c2 { top: 18%; left: 62%; width: 84px; height: 48px; animation-duration: 55s; }
@keyframes drift { from { translate: -20vw 0; } to { translate: 20vw 0; } }
.trees {
  position: absolute; left: 0; right: 0; top: 56%;
  display: flex; gap: 0; white-space: nowrap;
  opacity: 0.6; filter: saturate(0.75);
}

/* 石段（SVG は game.js が描く） */
.stairs { position: absolute; inset: 0; width: 100%; height: 100%; }
.stairs .ground { fill: #9fcf6b; }
.stairs .stone { fill: #d9d1c1; stroke: #6d6253; stroke-width: 2; vector-effect: non-scaling-stroke; }
.stairs .tread { fill: #eee7d9; }
.stairs .riser { stroke: #8f8472; stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.stairs .mark { fill: #6d6253; font-size: 15px; font-weight: 900; font-family: var(--font); }

.goal-flag {
  position: absolute;
  right: 3%; top: 4%;
  display: grid; justify-items: center;
  z-index: 1;
}
.trees .art { width: 64px; height: 80px; flex: none; margin-right: -14px; }
.goal-flag .flag { width: 54px; height: 54px; animation: wave 1.6s ease-in-out infinite; transform-origin: 20% 90%; }
.goal-flag .goal-label {
  background: var(--red); color: #fff; font-weight: 900;
  border: 2px solid var(--ink); border-radius: 6px;
  padding: 0 8px; font-size: 0.85rem;
}
@keyframes wave { 50% { rotate: -8deg; } }

/* ---------- こま ---------- */
.token {
  position: absolute;
  transform: translate(-50%, -100%);
  transition: left 0.17s ease-out, top 0.17s ease-out;
  text-align: center;
  z-index: 2;
}
.token .face {
  display: grid; place-items: center;
  width: 46px; height: 46px;
  margin: 0 auto;
  padding: 2px;
  background: #fff;
  border: 3px solid var(--ink);
  border-radius: 50%;
}
.token.me .face { border-color: var(--red); box-shadow: 0 0 0 3px rgba(217, 83, 79, 0.35); }
.token .tag {
  display: inline-block;
  margin-top: 2px;
  font-size: 0.7rem; font-weight: 900;
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 0 6px;
  white-space: nowrap;
}
.token.me .tag { background: var(--red); color: #fff; }
.token .speech { top: -40px; font-size: 1.3rem; }
.token .ready-badge { position: absolute; left: 50%; top: -24px; transform: translateX(-50%); }
.token.hop .face { animation: hop 0.17s ease-out; }
.token.winner .face { animation: hop 0.4s ease-in-out infinite; }
@keyframes hop {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -14px; }
}

/* ---------- 中央（空の左上） ---------- */
.center {
  position: absolute;
  left: 3%; top: 4%;
  width: min(52%, 460px);
  text-align: left;
  z-index: 3;
}
.stage-main.shout { font-size: clamp(1.8rem, 6.5vw, 3rem); }

/* ---------- 自分（手前） ---------- */
.me-area {
  position: absolute;
  left: 0; right: 0; bottom: 10px;
  display: grid; justify-items: center;
  z-index: 4;
  pointer-events: none;
}
.jk-buttons { display: flex; gap: 10px; pointer-events: auto; }
.jk-btn {
  display: grid; justify-items: center;
  width: 96px;
  padding: 6px 4px 8px;
  font-family: inherit;
  background: #fff;
  border: 3px solid var(--ink);
  border-radius: 16px;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.1s, background 0.15s;
}
.jk-btn:hover:not(:disabled) { background: var(--yellow); transform: translateY(-4px); }
.jk-btn:active:not(:disabled) { transform: translateY(2px); }
.jk-btn:disabled { opacity: 0.45; cursor: default; }
.jk-btn.chosen { background: var(--yellow); opacity: 1; }
.jk-emoji { width: 56px; height: 56px; }
.jk-label { font-weight: 900; font-size: 0.95rem; line-height: 1.1; }
.jk-label small { display: block; font-size: 0.7rem; color: var(--ink-soft); }

/* ぽんの瞬間に手前に出てくる自分の手 */
.my-big-hand {
  width: clamp(110px, 22vw, 170px);
  height: 0;
  overflow: visible;
  translate: 0 60px;
  opacity: 0;
  transition: translate 0.18s ease-out, opacity 0.18s;
  filter: drop-shadow(0 6px 0 rgba(59, 42, 30, 0.3));
}
.my-big-hand.show { translate: 0 -110px; opacity: 1; }
.my-big-hand.shake { animation: shakehand 0.25s ease-in-out infinite; }
@keyframes shakehand { 50% { rotate: -12deg; } }

/* ---------- 順位 ---------- */
.ranking {
  display: flex; flex-wrap: wrap; gap: 8px;
  list-style: none; padding: 0; margin: 12px 0 0;
}
.ranking li {
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 2px 12px;
  font-weight: 700;
  font-size: 0.9rem;
}
.ranking li.me { border-color: var(--red); }
.ranking b { color: var(--red); }
.ranking .art { width: 1.5em; height: 1.5em; vertical-align: middle; }
.hand-bubble { padding: 2px 6px; }
.hand-bubble .art { width: 34px; height: 34px; }

@media (max-width: 560px) {
  .token .face { width: 36px; height: 36px; }
  .token .tag { font-size: 0.6rem; }
  .jk-btn { width: 84px; }
  .jk-emoji { width: 44px; height: 44px; }
  .center { width: 62%; }
}
