/* Ladder (사다리 타기) — name/result chips + ladder canvas only.
   The page shell, buttons, stepper, entry rows, overlay and switcher come
   from css/game.css, which is linked first. Shared by all 8 languages. */

.container {
  max-width: 640px;
}

.section-label {
  margin-bottom: 14px;
}

/* Setup screen: name | result, two equal columns. */
.entry-row {
  grid-template-columns: 1fr 1fr;
}

/* Larger primary CTA — "start" is the only action on the setup screen. */
.btn-primary {
  padding: 14px 32px;
  font-size: 1.05rem;
}

/* Ladder screen: label rows aligned to the canvas columns. Both rows span the
   same width as the canvas, so column i sits at fraction (i+0.5)/cols. */
.labels-row {
  display: flex;
  gap: 6px;
  width: 100%;
}

.name-chip,
.result-chip {
  flex: 1 1 0;
  min-width: 0;
  padding: 8px 4px;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: bold;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.name-chip {
  --chip-color: var(--accent);
  border: 2px solid var(--chip-color);
  background: #fff;
  color: var(--text);
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}

.name-chip:hover {
  background: var(--accent-tint);
  transform: translateY(-2px);
}

.name-chip.active {
  background: var(--chip-color);
  color: #fff;
}

.result-chip {
  border: 2px solid var(--line);
  background: var(--surface-alt);
  color: #666;
}

.result-chip.active {
  border-color: #ffb300;
  background: #fff7e0;
  color: var(--text);
}

.ladder-wrap {
  width: 100%;
  margin: 4px 0;
}

#ladder {
  display: block;
  width: 100%;
  height: 340px;
  touch-action: manipulation;
}
