/* letslide.css — LetSlide 滑塊拼圖：只有「板面」（木塊、偷看、選圖列）。
   木框／教練／🌼／回家的路／折線圖／統計全部在 garden-kit.css（class gk-），這裡不要重寫。 */
.gk.ls { max-width: 520px; }

/* 縮圖與「家」都是這一盤拼好的圖 */
.ls-ref-img { background: var(--ls-img) center / cover no-repeat #fff; }
.ls .gk-road-home { background: var(--ls-img) center / cover no-repeat #fff; }
.ls-peek { user-select: none; -webkit-user-select: none; touch-action: manipulation; }

/* board */
.ls-board {
  position: relative; width: 100%; aspect-ratio: 1 / 1;
  background: #e2c48f; border-radius: 14px; overflow: hidden;
  box-shadow: inset 0 3px 10px rgba(90, 55, 10, .35);
  touch-action: none; outline: none; user-select: none; -webkit-user-select: none;
}
.ls-board:focus-visible { box-shadow: inset 0 3px 10px rgba(90,55,10,.35), 0 0 0 3px #86efac; }
.ls-tile {
  position: absolute; left: 0; top: 0;
  width: calc(100% / var(--n)); height: calc(100% / var(--n));
  transform: translate(calc(var(--c) * 100%), calc(var(--r) * 100%));
  transition: transform .17s cubic-bezier(.2,.8,.3,1);
  background-image: var(--ls-img);
  background-size: calc(var(--n) * 100%) calc(var(--n) * 100%);
  background-position: calc(var(--c0) / (var(--n) - 1) * 100%) calc(var(--r0) / (var(--n) - 1) * 100%);
  background-repeat: no-repeat;
  border-radius: 8px;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.78), inset 0 -3px 0 rgba(0,0,0,.08);
  cursor: pointer; will-change: transform;
}
.ls-tile--blank { visibility: hidden; }
.ls-tile-num {
  position: absolute; left: 5px; top: 5px; min-width: 22px; height: 22px; padding: 0 6px;
  border-radius: 999px; background: rgba(255,255,255,.92); color: #0f172a;
  font-size: 12.5px; font-weight: 800; display: none; align-items: center; justify-content: center;
  box-shadow: 0 1px 3px rgba(0,0,0,.18); pointer-events: none;
}
.ls-board--nums .ls-tile-num { display: inline-flex; }
.ls-board--won .ls-tile { box-shadow: none; border-radius: 0; cursor: default; }
.ls-board--won .ls-tile--blank { visibility: visible; }
.ls-board--won .ls-tile-num { display: none; }

/* peek overlay */
.ls-peekov {
  position: absolute; inset: 0; background: var(--ls-img) center / 100% 100% no-repeat;
  opacity: 0; transition: opacity .12s; pointer-events: none; z-index: 3;
}
.ls-board--peek .ls-peekov { opacity: .96; }

/* picker */
.ls-picker-label { font-size: 12.5px; color: var(--gd-muted); margin: 0 0 6px; text-align: center; }
.ls-picker { display: flex; gap: 8px; overflow-x: auto; padding: 6px 4px 10px; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; }
.ls-pick {
  flex: 0 0 auto; width: 58px; height: 58px; border-radius: 14px; border: 3px solid transparent;
  background: center / cover no-repeat #fff; cursor: pointer; scroll-snap-align: start; padding: 0;
  box-shadow: 0 2px 6px rgba(0,0,0,.10); transition: transform .12s, border-color .12s;
  -webkit-tap-highlight-color: transparent;
}
.ls-pick:hover { transform: scale(1.06); }
.ls-pick[aria-pressed="true"] { border-color: var(--gd-green); }
.ls-pick--custom { background: var(--gd-amber-bg); border: 3px dashed var(--gd-amber-bd); display: grid; place-items: center; font-size: 22px; color: #92400e; }
.ls-pick--custom.has-img { border-style: solid; font-size: 0; }
.ls-note { font-size: 12px; color: var(--gd-muted); text-align: center; margin: 4px 0 0; line-height: 1.5; }

/* 小手提示：整塊木塊發光，小手放右下角 */
.ls-tile.gk-glow { z-index: 2; animation: ls-glow 1s ease-in-out infinite; }
@keyframes ls-glow {
  0%, 100% { box-shadow: inset 0 0 0 3px #fde047, 0 0 0 0 rgba(250,204,21,.0); }
  50%      { box-shadow: inset 0 0 0 3px #facc15, 0 0 0 10px rgba(250,204,21,.45); }
}
.ls-tile .gk-hand { left: auto; right: 6px; top: auto; bottom: 4px; margin: 0; }

/* 顏色提示（只在新手）：綠／橘色盲區分度只有 ΔE≈8，所以一定搭配圖示 */
.ls-tile::after { content: ''; position: absolute; inset: 1px; border-radius: 8px; border: 3px solid transparent; pointer-events: none; }
.ls-board--hints .ls-tile.ls-hint-good::after { border-color: var(--gk-good); box-shadow: inset 0 0 0 3px var(--gk-good-soft); }
.ls-board--hints .ls-tile.ls-hint-bad::after  { border-color: var(--gk-bad); }
.ls-board--hints .ls-tile.ls-hint-same::after { border-color: var(--gk-same); }
.ls-board--won .ls-tile::after { display: none; }
.ls-tile-badge {
  position: absolute; top: 6%; right: 6%; width: clamp(15px, 30%, 24px); aspect-ratio: 1 / 1; border-radius: 50%;
  display: none; place-items: center; color: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.28); pointer-events: none;
}
.ls-tile-badge svg { width: 62%; height: 62%; display: block; }
.ls-board--hints .ls-hint-good .ls-tile-badge { display: grid; background: var(--gk-good); }
.ls-board--hints .ls-hint-bad .ls-tile-badge  { display: grid; background: var(--gk-bad); }
.ls-board--hints .ls-hint-same .ls-tile-badge { display: grid; background: var(--gk-same); }

@media (prefers-reduced-motion: reduce) { .ls-tile { transition: none; } .ls-tile.gk-glow { animation: none; } }
