/* Site shell chrome only. Node styling for the Sheaf-rendered
   surface itself lives in ./sheaf-public/synth-browser.css (verbatim Sheaf
   stylesheet, loaded before this file so these rules can layer on top of
   it without overriding any `#synth-root [data-synth-node-kind=...]` rule).

   Narrow/mobile layout (see index.html's header comment for the full
   trace): this file stacks the shell's OWN chrome -- title above,
   #synth-root, links below -- in plain document flow, which is
   above/below by construction and never beside. That covers everything
   this shell controls; the surface's own internal narrow-vs-wide topology
   is `synth_froggers::FroggersUiSurface`'s own concern
   (app/FroggersUiSurface.hpp, a `synth::ui::SelfSizedSurface`) -- this
   file's rules never need to reflow it, since the surface already builds
   the right tree for whatever width ./viewport-width.mjs reports. */

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.site-header {
  padding: 12px 16px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.site-logo {
  width: 24px;
  height: 24px;
  flex: none;
}

.site-title {
  margin: 0;
  font: 600 15px/1.2 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #e5e7eb;
  letter-spacing: 0.02em;
}

#synth-root {
  flex: 0 0 auto;
  max-width: 960px;
  margin: 8px auto;
}

/* Encoder knobs are Draw nodes (canvas). On mobile, the browser treats a
   finger-drag on a knob as a scroll/pan gesture unless we claim it here.
   Without `touch-action: none`, the pointer stream is cancelled after one or
   two moves and the knob never receives a real drag. Container rows and
   non-canvas areas keep the default `touch-action: auto`, so the page still
   scrolls by dragging on buttons, gaps, the header, and the footer. */
#synth-root [data-synth-node-kind="draw"] {
  touch-action: none;
}

/* Shown only when site-boot.mjs's `fail()` replaces the surface: a blank
   frame tells a visitor nothing, and told the operator nothing either. */
.boot-error {
  max-width: 720px;
  margin: 48px auto;
  padding: 20px 24px;
  border: 1px solid #7a2f2f;
  border-radius: 6px;
  background: #1c1212;
  color: #f2dede;
  font: 13px/1.5 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.boot-error-heading {
  margin: 0 0 8px;
  font-weight: 600;
}

.boot-error-detail {
  margin: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  overflow-wrap: anywhere;
}

.site-links {
  flex: 1 0 auto;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 8px;
  padding: 16px 16px 24px;
  font: 12px/1.4 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #aeb8c2;
}

.site-links a {
  color: #7dd3fc;
  text-decoration: none;
}

.site-links a:hover,
.site-links a:focus-visible {
  text-decoration: underline;
}

.site-links span {
  color: #52606b;
}
