/* ELN Studio — Bench mode.
 *
 * One step in focus, controls big enough for a gloved thumb (56px), the same
 * calm navy as the rest of the notebook. State is said in words and shapes
 * (✓ ○ ◌ !), never by colour alone. Class names avoid the substrings the
 * app-colour theme layer repaints; tests/eln-plan-css.test.mjs keeps it so.
 */

.eln-studio-root .eln-bn {
  --bn-line: var(--eln-line, #e2e8f0);
  --bn-text: var(--eln-text, #0f172a);
  --bn-muted: var(--eln-muted, #64748b);
  --bn-surface: var(--eln-surface, #fff);
  --bn-subtle: var(--eln-surface-subtle, #f8fafc);
  --bn-accent: var(--eln-blue, #00376e);
  --bn-warn: var(--eln-amber, #b45309);
  max-width: 640px; margin: 0 auto; padding: 12px 14px 40px; color: var(--bn-text);
  display: flex; flex-direction: column; gap: 14px;
}
.eln-studio-root .eln-bn-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.eln-studio-root .eln-bn-head h2 { margin: 0; font-size: 18px; flex: 1 1 160px; min-width: 0; overflow-wrap: anywhere; }
.eln-studio-root .eln-bn-back {
  min-height: 44px; padding: 0 14px; border: 1px solid var(--bn-line); border-radius: 10px;
  background: var(--bn-surface); color: var(--bn-text); font-size: 15px; cursor: pointer;
}
.eln-studio-root .eln-bn-sync { font-size: 12.5px; color: var(--bn-muted); display: inline-flex; gap: 6px; align-items: center; }
.eln-studio-root .eln-bn-sync::before { content: "✓"; font-weight: 700; }
.eln-studio-root .eln-bn-sync.is-waiting::before { content: "◌"; }
.eln-studio-root .eln-bn-sync.is-failed { color: var(--bn-warn); font-weight: 600; }
.eln-studio-root .eln-bn-sync.is-failed::before { content: "!"; }

.eln-studio-root .eln-bn-body { display: flex; flex-direction: column; gap: 14px; }

.eln-studio-root .eln-bn-progress {
  position: relative; height: 30px; border: 1px solid var(--bn-line); border-radius: 999px; overflow: hidden;
  background: var(--bn-subtle);
}
.eln-studio-root .eln-bn-progress > span {
  position: absolute; inset: 0 auto 0 0; background: color-mix(in srgb, var(--bn-accent) 22%, transparent); transition: width .25s ease;
}
.eln-studio-root .eln-bn-progress > b { position: relative; display: block; text-align: center; line-height: 28px; font-size: 13px; font-weight: 600; }

.eln-studio-root .eln-bn-focus {
  padding: 18px 16px; border: 2px solid var(--bn-accent); border-radius: 14px; background: var(--bn-surface);
  display: flex; flex-direction: column; gap: 12px;
}
.eln-studio-root .eln-bn-focus.is-finished { border-style: dashed; }
.eln-studio-root .eln-bn-focus h3 { margin: 0; font-size: 22px; line-height: 1.25; overflow-wrap: anywhere; }
.eln-studio-root .eln-bn-count { margin: 0; font-size: 12.5px; letter-spacing: .04em; text-transform: uppercase; color: var(--bn-muted); }
.eln-studio-root .eln-bn-say { margin: 0; font-size: 17px; line-height: 1.5; overflow-wrap: anywhere; white-space: pre-wrap; }
.eln-studio-root .eln-bn-timer { margin: 0; display: flex; align-items: center; gap: 12px; font-size: 28px; font-variant-numeric: tabular-nums; font-weight: 600; }
.eln-studio-root .eln-bn-warn { margin: 0; padding: 10px 12px; border-left: 4px solid var(--bn-warn); background: var(--bn-subtle); border-radius: 0 8px 8px 0; font-size: 14px; }

.eln-studio-root .eln-bn-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.eln-studio-root .eln-bn-action {
  min-height: 56px; padding: 0 20px; border-radius: 12px; border: 1px solid var(--bn-line); background: var(--bn-surface);
  color: var(--bn-text); font-size: 17px; font-weight: 600; cursor: pointer; flex: 1 1 140px; touch-action: manipulation;
}
.eln-studio-root .eln-bn-action:focus-visible, .eln-studio-root .eln-bn-back:focus-visible, .eln-studio-root .eln-bn-undo:focus-visible { outline: 3px solid color-mix(in srgb, var(--bn-accent) 55%, transparent); outline-offset: 2px; }
.eln-studio-root .eln-bn-go { background: var(--bn-accent); border-color: var(--bn-accent); color: #fff; }
.eln-studio-root .eln-bn-quiet { font-weight: 500; flex: 0 1 auto; }
.eln-studio-root .eln-bn-diff { display: flex; flex-direction: column; gap: 10px; }
.eln-studio-root .eln-bn-diff textarea, .eln-studio-root .eln-bn-drawer textarea, .eln-studio-root .eln-bn-drawer input[type="text"] {
  width: 100%; box-sizing: border-box; padding: 12px; font-size: 16px; border: 1px solid var(--bn-line); border-radius: 10px;
  background: var(--bn-surface); color: var(--bn-text); font-family: inherit;
}

.eln-studio-root .eln-bn-steps { list-style: none; margin: 0; padding: 0; border: 1px solid var(--bn-line); border-radius: 12px; overflow: hidden; }
.eln-studio-root .eln-bn-step { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 6px 14px; border-top: 1px solid var(--bn-line); font-size: 15px; }
.eln-studio-root .eln-bn-step:first-child { border-top: 0; }
.eln-studio-root .eln-bn-step.is-done .eln-bn-name { color: var(--bn-muted); text-decoration: line-through; text-decoration-thickness: 1px; }
.eln-studio-root .eln-bn-mark { width: 20px; text-align: center; font-weight: 700; color: var(--bn-accent); }
.eln-studio-root .eln-bn-name { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.eln-studio-root .eln-bn-name small { color: var(--bn-muted); font-variant-numeric: tabular-nums; }
.eln-studio-root .eln-bn-undo { min-height: 40px; padding: 0 12px; border: 1px solid var(--bn-line); border-radius: 8px; background: transparent; color: var(--bn-text); font-size: 14px; cursor: pointer; }

.eln-studio-root .eln-bn-quick { display: flex; gap: 10px; flex-wrap: wrap; }
.eln-studio-root .eln-bn-drawer { flex: 1 1 100%; display: flex; flex-direction: column; gap: 10px; padding: 12px; border: 1px solid var(--bn-line); border-radius: 12px; background: var(--bn-subtle); }
.eln-studio-root .eln-bn-camera { width: 100%; max-height: 260px; border-radius: 10px; background: #000; }
.eln-studio-root .eln-bn-tiny { color: var(--bn-muted); font-size: 12.5px; }

.eln-studio-root .eln-bn-phone { border: 1px solid var(--bn-line); border-radius: 12px; padding: 4px 14px; }
.eln-studio-root .eln-bn-phone summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; font-size: 14px; }
.eln-studio-root .eln-bn-phone[open] { padding-bottom: 14px; }
.eln-studio-root .eln-bn-phone small { display: block; margin-top: 8px; color: var(--bn-muted); }

@media (max-width: 520px) {
  .eln-studio-root .eln-bn { padding: 8px 12px 32px; }
  .eln-studio-root .eln-bn-focus h3 { font-size: 20px; }
}
@media (prefers-reduced-motion: reduce) { .eln-studio-root .eln-bn-progress > span { transition: none; } }
