/* Notation lab of /ratgeber/zauberwuerfel-notation/ (site/assets/js/notation-lab.js). Light card in the site colors,
   buttons at least 44 px, one column up to 760 px, cube left + controls right above that. */
.nlab { position: relative; margin: 1.2em 0 1.6em; padding: 14px; background: var(--bg2); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); font-size: 1rem; }
.nlab .btn { min-height: 44px; min-width: 44px; }
.nlab-sizes { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.nlab-sizes .btn { flex: 1 1 0; max-width: 120px; }
.nlab-sizes .btn[aria-pressed="true"] { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.nlab-label { display: block; font-weight: 700; margin: 2px 0 6px; }
.nlab-input { display: block; width: 100%; min-height: 64px; resize: vertical; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--text);
  font: 16px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; overflow-wrap: anywhere; }
.nlab-input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.nlab-input[aria-invalid="true"] { border-color: var(--bad); }
.nlab-echo { margin: 8px 0 0; padding: 8px 10px; border-radius: 8px; background: var(--bg3); font: .95rem/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.nlab-echo mark { background: color-mix(in srgb, var(--bad) 22%, transparent); color: inherit; border-bottom: 2px solid var(--bad); border-radius: 3px; padding: 0 1px; }
.nlab-err { margin: 8px 0 0; padding: 8px 12px 8px 28px; border-radius: 8px; border: 1px solid color-mix(in srgb, var(--bad) 40%, var(--line)); background: color-mix(in srgb, var(--bad) 7%, var(--bg2)); color: var(--text); font-size: .95rem; }
.nlab-err li { margin: 2px 0; overflow-wrap: anywhere; } .nlab-err b { color: var(--bad); }
.nlab-ex { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 4px; }
.nlab-ex .btn { white-space: normal; text-align: center; }
.nlab-main { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px 16px; align-items: start; margin-top: 6px; }
.nlab-cube { min-width: 0; display: flex; justify-content: center; }
.nlab-cube .cv-scene { margin: 0 auto; }
.nlab-ctrl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.nlab-ctrl .btn { white-space: normal; text-align: center; padding: 8px 6px; }
.nlab-ctrl #nlab-play { grid-column: span 3; }
.nlab-status { margin: 10px 0 8px; min-height: 3em; padding: 8px 10px; border-radius: 8px; background: var(--bg3); font-size: .95rem; overflow-wrap: anywhere; }
.nlab-status.ok { background: color-mix(in srgb, var(--ok) 12%, var(--bg2)); }
.nlab-status.bad { background: color-mix(in srgb, var(--bad) 9%, var(--bg2)); }
.nlab-moves { position: relative; display: flex; flex-wrap: wrap; gap: 4px; max-height: 128px; overflow: auto; padding: 2px; }
.nlab-chip { display: inline-block; min-width: 2.2em; padding: 3px 7px; border: 1px solid var(--line); border-radius: 7px; background: var(--bg); text-align: center; font: .92rem/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.nlab-chip.done { color: var(--muted); background: var(--bg3); }
.nlab-chip.next { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 35%, transparent); color: var(--accent); font-weight: 700; }
.nlab-inv { margin: 10px 0 0; font-size: .95rem; overflow-wrap: anywhere; } .nlab-inv code { font-weight: 600; }
.nlab-legend { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.nlab-leg { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--text); font: inherit; font-size: .9rem; text-align: left; cursor: pointer; }
.nlab-leg code { flex: 0 0 auto; min-width: 2.6em; padding: 2px 6px; border-radius: 6px; background: var(--bg3); font-weight: 700; text-align: center; }
.nlab-leg:hover, .nlab-leg[aria-pressed="true"] { border-color: var(--accent); }
.nlab-leg[aria-pressed="true"] code { background: var(--accent); color: var(--accent-text); }
.nlab .cv-sticker.nv-hl { filter: brightness(1.12) saturate(1.1); box-shadow: inset 0 0 0 3px var(--accent), inset 0 0 0 6px rgba(255,255,255,.55) !important; }
.nlab:not(.ready) .nlab-ctrl, .nlab:not(.ready) .nlab-legend { display: none; }
@media (min-width: 760px) {
  .nlab { padding: 18px; }
  .nlab-main { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
