.lesson-hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 22%, rgba(255,255,255,0.85) 0 44px, transparent 45px),
    radial-gradient(circle at 82% 28%, rgba(255,255,255,0.70) 0 36px, transparent 37px),
    linear-gradient(180deg, #8bd5ff 0%, #b9ead0 58%, #78c86a 100%);
  border: 2px solid rgba(45, 64, 23, 0.3);
  border-radius: 14px;
  padding: 22px;
  box-shadow: 0 16px 36px rgba(45, 64, 23, 0.14);
  text-align: center;
}
.lesson-hero h1 {
  font-family: "DotGothic16", sans-serif;
  font-size: 1.65rem;
  margin: 0 0 6px;
  color: #4a3520;
  text-shadow: 1px 1px 0 #fff;
}
.lesson-hero p {
  margin: 4px auto;
  max-width: 680px;
  color: #2d4017;
  font-weight: 700;
  line-height: 1.7;
}
.game-panel {
  margin-top: 20px;
  display: grid;
  gap: 14px;
}
.game-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.game-toolbar.start-toolbar {
  align-items: center;
  justify-content: center;
  gap: 16px 24px;
  padding: 16px;
  border: 2px solid rgba(45,64,23,0.16);
  border-radius: 12px;
  background: linear-gradient(180deg, #fffdf2, #f5fbf7);
}
.start-copy {
  flex: 1 1 240px;
  min-width: 0;
}
.game-toolbar h2 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0;
}
.start-copy p {
  margin: 3px 0 0;
  color: #54613f;
  font-size: 0.92rem;
  font-weight: 700;
}
.play-board {
  position: relative;
  min-height: 360px;
  overflow: hidden;
  border: 2px solid rgba(45, 64, 23, 0.32);
  border-radius: 14px;
  background:
    radial-gradient(circle at 16% 18%, rgba(255,255,255,0.8) 0 34px, transparent 35px),
    radial-gradient(circle at 75% 20%, rgba(255,255,255,0.65) 0 44px, transparent 45px),
    linear-gradient(180deg, #dff7ff 0%, #eaf8f0 62%, #d7f0c7 100%);
  box-shadow: inset 0 0 0 5px rgba(255,255,255,0.55), inset 0 -18px 36px rgba(57, 132, 71, 0.11);
  user-select: none;
  touch-action: none;
}
.play-board::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 52px;
  pointer-events: none;
  background:
    linear-gradient(135deg, rgba(73, 155, 79, 0.16) 25%, transparent 25%) 0 0 / 28px 28px,
    linear-gradient(225deg, rgba(73, 155, 79, 0.13) 25%, transparent 25%) 0 0 / 28px 28px;
}
.target-btn, .egg-btn, .balloon-btn {
  position: absolute;
  border: 2px solid rgba(45, 64, 23, 0.55);
  box-shadow: 0 8px 0 rgba(45, 64, 23, 0.22), 0 14px 26px rgba(45, 64, 23, 0.18);
  cursor: pointer;
  display: grid;
  place-items: center;
  font-family: "DotGothic16", sans-serif;
  transition: transform 0.08s ease, box-shadow 0.08s ease;
  z-index: 2;
}
.target-btn:hover, .egg-btn:hover, .balloon-btn:hover,
.duck-btn:hover, .precision-target:hover {
  transform: translateY(-2px) scale(1.04);
}
.target-btn:active, .egg-btn:active, .balloon-btn:active,
.duck-btn:active, .precision-target:active {
  transform: translateY(4px) scale(0.96);
  box-shadow: 0 3px 0 rgba(45, 64, 23, 0.28), 0 8px 14px rgba(45, 64, 23, 0.15);
}
.target-btn {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, #fff 0 9%, #ffdd4a 10% 25%, #fff 26% 39%, #ff6b6b 40% 61%, #c0392b 62% 100%);
  color: transparent;
}
.egg-btn {
  width: 78px;
  height: 94px;
  border-radius: 50% 50% 45% 45%;
  background: #fff7cf;
  font-size: 2.2rem;
}
.egg-btn.is-cracked { background: #ffe089; transform: rotate(-4deg); }
.balloon-btn {
  width: 62px;
  height: 78px;
  border-radius: 50% 50% 45% 45%;
  background: #ff6b6b;
  color: #fff;
  font-size: 1.4rem;
}
.drag-item {
  position: absolute;
  width: 66px;
  height: 66px;
  border: 2px solid rgba(45, 64, 23, 0.45);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 0 rgba(45, 64, 23, 0.18), 0 14px 26px rgba(45, 64, 23, 0.14);
  display: grid;
  place-items: center;
  font-size: 2.2rem;
  cursor: grab;
  touch-action: none;
  z-index: 4;
  transition: left 0.18s ease, top 0.18s ease, transform 0.08s ease, box-shadow 0.08s ease;
}
.drag-item.is-dragging { cursor: grabbing; z-index: 8; transform: scale(1.08); }
.drag-board {
  min-height: 470px;
  background:
    linear-gradient(90deg, rgba(26,188,156,0.12) 0 46%, rgba(255,255,255,0.5) 46% 54%, rgba(243,156,18,0.12) 54% 100%),
    radial-gradient(circle at 16% 18%, rgba(255,255,255,0.8) 0 34px, transparent 35px),
    linear-gradient(180deg, #e7fbff 0%, #edf8ef 100%);
}
.drag-label {
  position: absolute;
  top: 12px;
  z-index: 3;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.88);
  border: 1px solid rgba(45,64,23,0.18);
  color: #40502e;
  font-size: 0.82rem;
  font-weight: 900;
}
.drag-label-left { left: 8%; }
.drag-label-right { right: 8%; }
.drop-zone {
  position: absolute;
  width: 118px;
  height: 66px;
  border: 2px dashed rgba(45, 64, 23, 0.45);
  border-radius: 12px;
  background: rgba(255,255,255,0.7);
  display: grid;
  place-items: center;
  font-size: 2.65rem;
  z-index: 3;
}
.drop-zone::before {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 10px;
  background: rgba(255,255,255,0.38);
  pointer-events: none;
}
.drop-zone span {
  position: relative;
  z-index: 1;
}
.drop-zone.is-ok {
  background: #c8ffd8;
  border-style: solid;
  box-shadow: 0 0 0 4px rgba(39, 174, 96, 0.16);
}
.maze-board {
  background:
    linear-gradient(90deg, rgba(45,64,23,0.08) 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(0deg, rgba(45,64,23,0.08) 1px, transparent 1px) 0 0 / 28px 28px,
    radial-gradient(circle at 18% 24%, rgba(255,255,255,0.9), transparent 28%),
    #f6f0d8;
  cursor: none;
}
.maze-path {
  position: absolute;
  inset: 9% 6%;
  border-radius: 18px;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.34) 1px, transparent 1px) 0 0 / 22px 22px,
    linear-gradient(0deg, rgba(255,255,255,0.34) 1px, transparent 1px) 0 0 / 22px 22px,
    rgba(255, 252, 226, 0.72);
  box-shadow: inset 0 0 0 3px rgba(255,255,255,0.7), 0 10px 24px rgba(45,64,23,0.1);
}
.maze-wall {
  position: absolute;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.16) 0 16%, transparent 17% 100%),
    linear-gradient(180deg, #6c5136, #3f2e20);
  border: 2px solid rgba(39, 25, 15, 0.72);
  border-radius: 8px;
  box-shadow: inset 0 3px 0 rgba(255,255,255,0.18), 0 5px 0 rgba(48,31,18,0.22);
  z-index: 3;
}
.maze-start, .maze-goal {
  position: absolute;
  width: 104px;
  height: 84px;
  border: 2px solid rgba(45, 64, 23, 0.48);
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-weight: 900;
  gap: 2px;
  line-height: 1.1;
  z-index: 5;
  box-shadow: 0 9px 18px rgba(45,64,23,0.16);
}
.maze-start strong, .maze-goal strong { font-size: 1rem; }
.maze-start span, .maze-goal span { font-size: 0.72rem; }
.maze-start {
  left: 7%;
  top: 44%;
  background: linear-gradient(180deg, #fff9a8, #ffe46a);
}
.maze-goal {
  right: 7%;
  bottom: 14%;
  background: linear-gradient(180deg, #d9ffd7, #9cf0b0);
}
.maze-cursor {
  position: absolute;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff 0 12%, #ff6b6b 13% 62%, #c0392b 63% 100%);
  border: 2px solid rgba(85, 32, 24, 0.8);
  box-shadow: 0 0 0 6px rgba(231,76,60,0.14);
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 6;
}
.maze-trail {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}
.maze-trail span {
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(26, 188, 156, 0.42);
  transform: translate(-50%, -50%);
  animation: maze-trail-fade 2.8s ease forwards;
}
@keyframes maze-trail-fade {
  from { opacity: 0.8; }
  to { opacity: 0.18; }
}
.slider-list {
  display: grid;
  gap: 16px;
  padding: 18px;
}
.slider-task {
  background: rgba(255,255,255,0.85);
  border: 2px solid rgba(45, 64, 23, 0.25);
  border-radius: 10px;
  padding: 12px;
  box-shadow: 0 8px 18px rgba(45,64,23,0.08);
}
.slider-task label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-weight: 800;
}
.slider-task input {
  width: 100%;
  margin-top: 8px;
  accent-color: #1abc9c;
}
.message-box {
  min-height: 40px;
  display: flex;
  align-items: center;
  border-radius: 10px;
  background: #fffaf0;
  border: 1px solid rgba(45, 64, 23, 0.16);
  padding: 8px 12px;
  font-weight: 800;
  color: #4a3520;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}
.message-box.is-good {
  background: #e6f8ec;
  color: #1f7a3b;
  transform: translateY(-1px);
}
.message-box.is-bad {
  background: #fff0ee;
  color: #c0392b;
  transform: translateY(-1px);
}
.stat-value.is-bump {
  animation: stat-bump 0.24s ease;
}
.stat-value.is-warning {
  color: #e74c3c;
  animation: warning-pulse 0.5s ease infinite alternate;
}
@keyframes stat-bump {
  0% { transform: scale(1); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}
@keyframes warning-pulse {
  from { opacity: 1; }
  to { opacity: 0.62; }
}
.float-score {
  position: absolute;
  z-index: 20;
  transform: translate(-50%, -50%);
  pointer-events: none;
  font-weight: 900;
  font-size: 1.2rem;
  color: #1f7a3b;
  text-shadow: 0 2px 0 #fff;
  animation: float-score 0.8s ease-out forwards;
}
.float-score.is-bad { color: #c0392b; }
@keyframes float-score {
  0% { opacity: 0; transform: translate(-50%, 8px) scale(0.8); }
  18% { opacity: 1; transform: translate(-50%, -6px) scale(1.1); }
  100% { opacity: 0; transform: translate(-50%, -44px) scale(1); }
}
.hit-pop {
  position: absolute;
  z-index: 19;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  border: 4px solid #2ecc71;
  animation: hit-pop 0.5s ease-out forwards;
}
.hit-pop.is-bad { border-color: #e74c3c; }
@keyframes hit-pop {
  from { opacity: 0.95; width: 8px; height: 8px; }
  to { opacity: 0; width: 82px; height: 82px; }
}

/* ===== 共通演出（COMBO・キラキラ・揺れ） ===== */
.play-board-wrap {
  position: relative;
}
.play-board.is-shaking { animation: board-shake 0.36s ease-out; }
@keyframes board-shake {
  0%, 100% { transform: translate(0, 0); }
  20%      { transform: translate(-5px, 2px); }
  40%      { transform: translate(4px, -3px); }
  60%      { transform: translate(-3px, 4px); }
  80%      { transform: translate(3px, -1px); }
}

.mouse-spark {
  position: absolute;
  width: 9px;
  height: 9px;
  background: radial-gradient(circle, #fff 0%, #ffe066 55%, transparent 100%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 6;
  animation: mouse-spark-fly 0.55s ease-out forwards;
}
@keyframes mouse-spark-fly {
  0%   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(calc(-50% + var(--sx, 0)), calc(-50% + var(--sy, 0))) scale(0.4); }
}

.combo-display {
  position: absolute;
  top: 8px; right: 12px;
  z-index: 5;
  pointer-events: none;
  font-family: "DotGothic16", sans-serif;
  font-size: 0.85rem;
  color: #fff;
  text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.65);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.combo-display.is-active { opacity: 1; }
.combo-display .combo-num {
  display: inline-block;
  font-size: 1.5rem;
  margin: 0 4px;
  color: #ffe066;
  text-shadow: 2px 2px 0 #000, 0 0 10px rgba(255, 224, 102, 0.6);
}
.combo-display.is-fire .combo-num {
  color: #ff8c1a;
  text-shadow: 2px 2px 0 #000, 0 0 12px rgba(255, 90, 0, 0.85), 0 0 20px rgba(255, 50, 0, 0.55);
}
.combo-display.is-bump { animation: combo-bump-mouse 0.26s ease-out; }
@keyframes combo-bump-mouse {
  0%   { transform: scale(1); }
  45%  { transform: scale(1.35); }
  100% { transform: scale(1); }
}
/* ===== 追跡ゲーム ===== */
.track-fish {
  position: absolute;
  width: 48px;
  height: 48px;
  font-size: 2.45rem;
  display: grid;
  place-items: center;
  cursor: crosshair;
  user-select: none;
  filter: drop-shadow(0 8px 12px rgba(45,64,23,0.18)) drop-shadow(1px 1px 0 rgba(34,34,34,0.65));
  transition: filter 0.12s ease;
}
.track-fish::after {
  content: "";
  position: absolute;
  inset: -7px;
  border: 2px solid rgba(26, 188, 156, 0.24);
  border-radius: 50%;
  pointer-events: none;
}
.track-fish.is-tracked {
  filter: drop-shadow(0 0 10px #f39c12) drop-shadow(1px 1px 0 rgba(34,34,34,0.65));
}

/* ===== アヒル射撃 ===== */
.duck-btn {
  position: absolute;
  border: 2px solid rgba(45, 64, 23, 0.5);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 28%, #fffef0 0 18%, #fff8b3 19% 68%, #f6d96b 69% 100%);
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 0 rgba(45, 64, 23, 0.2), 0 13px 22px rgba(45, 64, 23, 0.16);
  font-family: "DotGothic16", sans-serif;
  outline: 10px solid rgba(255, 214, 74, 0.22);
  outline-offset: 3px;
}
.duck-btn::after {
  content: "";
  position: absolute;
  inset: -9px;
  border: 2px dashed rgba(243, 156, 18, 0.42);
  border-radius: 50%;
  pointer-events: none;
}
.duck-btn.is-shot {
  animation: duck-fall 0.4s ease-in forwards;
}
@keyframes duck-fall {
  0% { transform: scale(1) rotate(0); opacity: 1; }
  100% { transform: scale(0.5) translateY(80px) rotate(360deg); opacity: 0; }
}

/* ===== 精密クリック ===== */
.precision-target {
  position: absolute;
  border: 2px solid rgba(45, 64, 23, 0.55);
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #fff 0%, #ff6b6b 60%, #c0392b 100%);
  box-shadow: 0 8px 0 rgba(45, 64, 23, 0.2), 0 13px 22px rgba(45, 64, 23, 0.16);
  cursor: crosshair;
  padding: 0;
  animation: pulse 0.7s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

/* ===== 右クリック道場 ===== */
.rc-task {
  font-size: 1.1rem;
  font-weight: 900;
  background: #fff36a;
  border: 2px solid rgba(45, 64, 23, 0.35);
  border-radius: 8px;
  padding: 8px 14px;
  text-align: center;
  margin: 14px;
}
.rc-icon-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 30px 0;
}
.rc-icon {
  font-size: 5rem;
  cursor: context-menu;
  padding: 14px;
  border: 2px dashed rgba(45, 64, 23, 0.45);
  border-radius: 12px;
  background: #fff;
  user-select: none;
}
.rc-icon:hover { background: #fff8e1; }
.rc-hint { color: #666; font-weight: 800; margin: 0; }
.rc-counter {
  text-align: center;
  font-weight: 900;
  color: #1abc9c;
  margin: 14px;
}
.rc-menu {
  position: fixed;
  background: #fff;
  border: 2px solid rgba(45, 64, 23, 0.42);
  border-radius: 6px;
  box-shadow: 0 16px 32px rgba(45,64,23,0.22);
  z-index: 1000;
  min-width: 160px;
  overflow: hidden;
  font-family: "DotGothic16", sans-serif;
}
.rc-menu-item {
  display: block;
  width: 100%;
  text-align: left;
  background: #fff;
  border: none;
  border-bottom: 1px solid #ddd;
  padding: 10px 14px;
  font-size: 0.95rem;
  cursor: pointer;
  font-family: inherit;
}
.rc-menu-item:last-child { border-bottom: none; }
.rc-menu-item:hover { background: #fff36a; }

/* ===== スクロール道場 ===== */
.scroll-wrap {
  position: absolute;
  inset: 14px;
  border: 2px solid rgba(45, 64, 23, 0.42);
  border-radius: 8px;
  background: linear-gradient(180deg, #87ceeb, #b3d9b3);
  overflow-y: scroll;
  overflow-x: hidden;
}
.scroll-inner {
  position: relative;
  width: 100%;
  background:
    repeating-linear-gradient(0deg, transparent 0, transparent 38px, rgba(255,255,255,0.3) 38px, rgba(255,255,255,0.3) 40px);
}
.scroll-star {
  position: absolute;
  font-size: 2.4rem;
  background: transparent;
  border: 2px solid transparent;
  border-radius: 8px;
  padding: 6px;
  cursor: pointer;
  filter: drop-shadow(2px 2px 0 #222);
  transition: transform 0.15s ease;
}
.scroll-star:hover { transform: scale(1.2); border-color: #f39c12; }
.scroll-star.is-collected {
  animation: star-pop 0.4s ease-out forwards;
  pointer-events: none;
}
@keyframes star-pop {
  0% { transform: scale(1); opacity: 1; }
  60% { transform: scale(1.6) rotate(180deg); }
  100% { transform: scale(0); opacity: 0; }
}
.scroll-guide {
  position: absolute;
  top: 8px;
  right: 24px;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-weight: 900;
  font-size: 0.75rem;
  background: rgba(255,255,255,0.9);
  border: 2px solid rgba(45, 64, 23, 0.32);
  border-radius: 6px;
  padding: 4px 8px;
  pointer-events: none;
}
.scroll-guide span:first-child, .scroll-guide span:last-child { font-size: 1rem; color: #1abc9c; }

@media (max-width: 640px) {
  .play-board { min-height: 420px; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .drop-zone { width: 108px; height: 74px; }
}
