/* 사다리타기 전용 (.ld-) */
.ld [hidden] { display: none !important; } /* .btn·grid 의 display 가 hidden 을 이기지 않게 */
.ld { display: grid; gap: 16px; padding: 18px; border-radius: var(--radius-card); background: var(--canvas-blue); }
@media (min-width: 600px) { .ld { padding: 24px; } }
.ld-setup { display: grid; gap: 14px; }
.ld-count { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.ld-count .label { font-size: 14px; font-weight: 700; color: var(--ink-muted); }
.ld-step { display: flex; align-items: center; gap: 6px; }
.ld-step .btn { width: 44px; padding: 0; font-size: 20px; background: var(--surface); border: 0; }
.ld-step .input { width: 64px; min-height: 44px; text-align: center; background: var(--surface); padding: 0 6px; }
.ld-cols { display: grid; gap: 12px; }
@media (min-width: 720px) { .ld-cols { grid-template-columns: 1fr 1fr; } }
.ld-box { margin: 0; padding: 14px; border: 0; border-radius: var(--radius-card); background: var(--surface); min-width: 0; }
.ld-box legend { float: left; width: 100%; margin-bottom: 8px; font-size: 14px; font-weight: 800; color: var(--ink-rd); }
.ld-list { clear: both; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.ld-in { display: flex; align-items: center; gap: 6px; min-width: 0; }
.ld-num { flex: none; width: 20px; font-size: 12px; font-weight: 800; color: var(--ink-muted); text-align: right; font-variant-numeric: tabular-nums; }
.ld-in .input { min-height: 44px; font-size: 15px; font-weight: 600; padding: 0 10px; }

.ld-play { display: grid; gap: 12px; }
.ld-status { font-weight: 700; color: var(--ink-rd); }
.ld-board { width: 100%; margin: 0 auto; padding: 12px 0; border-radius: var(--radius-card); background: var(--surface); }
.ld-row { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); }
.ld-who, .ld-res {
  display: block; min-width: 0; margin: 0 2px; padding: 6px 2px; border-radius: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  text-align: center; font-size: 13px; font-weight: 800; color: var(--ink-rd);
}
.ld-who { min-height: 40px; border: 0; background: var(--tile-yellow); cursor: pointer; box-shadow: inset 0 -3px 0 var(--c); }
.ld-who:hover { background: var(--tile-yellow-light); }
.ld-who[aria-pressed="true"] { background: var(--surface-muted); color: var(--ink-muted); cursor: default; }
.ld-res { background: var(--surface-muted); box-shadow: inset 0 3px 0 var(--c); }
.ld-res.is-hidden { color: var(--ink-muted); }
.ld-svg { display: block; width: 100%; height: auto; margin: 4px 0; }
.ld-pole { stroke: #B4BEC6; stroke-width: 3; stroke-linecap: round; }
.ld-rung { stroke: #B4BEC6; stroke-width: 3; stroke-linecap: round; }
.ld-path { fill: none; stroke: var(--c); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset .7s ease-in-out; }
.ld-path.go { stroke-dashoffset: 0; }
.ld-results { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
@media (min-width: 720px) { .ld-results { grid-template-columns: repeat(3, 1fr); } }
.ld-results li { padding: 10px 14px; border-radius: var(--radius-card); background: var(--surface); box-shadow: inset 4px 0 0 var(--c); font-size: 15px; }
.ld-results b { font-weight: 800; }
