/* ============================================================
   Prototype chrome shared by all three directions.

   Two things only:
     1. accessibility utilities every direction needs;
     2. the "Prototype" control (board state, simulated arrivals).

   The control is deliberately neutral and system-fonted so it is
   never read as part of a direction's design. It does not ship.
   ============================================================ */

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* The stretched "read this note" target the core adds to every note. */
.note { position: relative; }
.note-open {
  position: absolute; inset: 0; width: 100%; height: 100%;
  margin: 0; padding: 0; border: 0; background: none; color: inherit;
  cursor: pointer; border-radius: inherit; -webkit-tap-highlight-color: transparent;
}

.proto-bar {
  --pb-bg: #101418; --pb-fg: #eef1f4; --pb-dim: #a9b2bc; --pb-line: #2c343d; --pb-accent: #ffd166;
  position: fixed; z-index: 2147483000;
  left: max(10px, env(safe-area-inset-left)); bottom: max(10px, env(safe-area-inset-bottom));
  font: 500 13px/1.35 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--pb-fg);
  display: flex; flex-direction: column-reverse; align-items: flex-start; gap: 8px;
  max-width: min(300px, calc(100vw - 20px));
}
.proto-bar * { box-sizing: border-box; }
.proto-toggle {
  font: inherit; color: var(--pb-fg); background: var(--pb-bg);
  border: 1px solid var(--pb-line); border-radius: 6px;
  padding: 7px 11px; min-height: 36px; cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .28);
}
.proto-toggle::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--pb-accent); margin-right: 8px; vertical-align: 1px; }
.proto-toggle:focus-visible, .proto-panel :focus-visible { outline: 2px solid var(--pb-accent); outline-offset: 2px; }
.proto-panel {
  background: var(--pb-bg); border: 1px solid var(--pb-line); border-radius: 8px;
  padding: 12px; width: 100%; display: grid; gap: 10px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, .4);
}
.proto-panel[hidden] { display: none; }
.proto-title { margin: 0; font-weight: 700; }
.proto-title span { display: block; font-weight: 400; color: var(--pb-dim); margin-top: 2px; }
.proto-row { display: grid; gap: 4px; color: var(--pb-dim); }
.proto-row select, .proto-actions button {
  font: inherit; color: var(--pb-fg); background: #1a2027; border: 1px solid var(--pb-line);
  border-radius: 6px; padding: 7px 9px; min-height: 36px; width: 100%; cursor: pointer;
}
.proto-check { display: flex; grid-auto-flow: column; align-items: center; gap: 8px; color: var(--pb-fg); cursor: pointer; }
.proto-check input { width: 16px; height: 16px; accent-color: var(--pb-accent); }
.proto-actions { grid-template-columns: 1fr 1fr; gap: 6px; }
.proto-links { gap: 6px; }
.proto-links a { color: var(--pb-accent); text-underline-offset: 3px; }

/* The core's "add a note" button carries a visually hidden label; keep that label anchored to
   the button so it cannot widen a horizontal scroller. */
.trail-add { position: relative; }

/* "This is a preview. Nothing is saved." Shown on load and after every post. */
.proto-notice {
  position: fixed; z-index: 2147483001; left: 50%; top: max(10px, env(safe-area-inset-top));
  transform: translate(-50%, -140%); margin: 0;
  max-width: min(34rem, calc(100vw - 24px)); padding: 9px 14px;
  font: 600 13px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: #1c1503; background: #ffd166; border: 1px solid #7a5b00; border-radius: 6px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .3); text-align: center; pointer-events: none;
  transition: transform .35s cubic-bezier(.16, 1, .3, 1);
}
.proto-notice[data-show="true"] { transform: translate(-50%, 0); }
@media (prefers-reduced-motion: reduce) { .proto-notice { transition: none; } }

@media print { .proto-bar, .proto-notice { display: none !important; } }
