.ld-controls { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between; }
.ld-controls .stepper-wrap { gap: 12px; }
.ld-presets { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ld-presets .field-label { margin-right: 4px; }
.ld-scroll { overflow-x: auto; margin: 0 -4px; padding: 2px 0 6px; -webkit-overflow-scrolling: touch; }
.ld-grid {
  display: grid; grid-template-columns: repeat(var(--n), minmax(62px, 1fr));
  min-width: calc(var(--n) * 62px); padding: 0 4px; row-gap: 0;
}
.ld-cell { padding: 0 3px; display: flex; justify-content: center; align-items: stretch; }
.ld-top { padding-bottom: 0; }
.ld-svg-wrap { grid-column: 1 / -1; position: relative; }
.ld-svg { display: block; width: 100%; overflow: visible; }
.ld-rail { stroke: var(--border-strong); stroke-width: 5; stroke-linecap: round; }
.ld-rung { stroke: var(--text-2); stroke-width: 5; stroke-linecap: round; transition: opacity .3s ease; }
.ld-rung.is-hidden { opacity: 0; }
.ld-path { fill: none; stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; opacity: .92; }
.ld-head { stroke: #fff; stroke-width: 3; filter: drop-shadow(0 2px 3px rgba(0,0,0,.35)); }
.ld-hidden-text { fill: var(--text-3); font-size: 15px; font-weight: 700; }
.ld-input { text-align: center; font-weight: 700; padding: 0 4px; border-width: 2px; }
.ld-name-btn {
  --c: var(--primary);
  width: 100%; min-height: 46px; border-radius: 12px; border: 2.5px solid var(--c); background: var(--surface);
  color: var(--text); font-weight: 800; font-size: 14px; cursor: pointer; padding: 0 4px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transition: background .2s, transform .1s;
}
.ld-name-btn:hover:not(:disabled) { background: color-mix(in srgb, var(--c) 14%, var(--surface)); transform: translateY(-1px); }
.ld-name-btn:disabled { cursor: default; }
.ld-name-btn.is-running { animation: bb-pulse .8s ease-in-out infinite; }
.ld-name-btn.is-done { background: var(--c); }
.ld-result {
  --c: var(--border-strong);
  width: 100%; min-height: 58px; border-radius: 12px; border: 2px dashed var(--border-strong);
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  font-weight: 800; font-size: 14px; padding: 4px 2px; background: var(--surface-2); line-height: 1.25; color: var(--text-3);
}
.ld-result .ld-res-text { color: var(--text); word-break: break-all; }
.ld-result.is-revealed { border-style: solid; border-color: var(--c); background: var(--surface); animation: bb-pop .4s cubic-bezier(.2, 1.4, .4, 1); }
.ld-result .ld-who { display: block; font-size: 11.5px; color: var(--c); font-weight: 800; margin-top: 2px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ld-result.is-hit { background: var(--c); }
.ld-result.is-hit .ld-res-text, .ld-result.is-hit .ld-who { color: inherit; }
.ld-guide { font-weight: 700; color: var(--text-2); margin: 0; }
