/* ═══════════════════════════════════════════════════════════
   Neon Patcher — embed page overrides (shell layer)
   Assumes style.css is loaded first with all shared synth styles.
   ═══════════════════════════════════════════════════════════ */

/* The synth's typeface, served from the site itself so that opening the page
   sends nothing to a third party. Regular and bold, Latin and Latin Extended,
   split by range so a page only fetches what it draws. OFL licence beside the
   files. */
@font-face {
  font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('/assets/fonts/ibm-plex-mono/ibm-plex-mono-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('/assets/fonts/ibm-plex-mono/ibm-plex-mono-400-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 700; font-display: swap;
  src: url('/assets/fonts/ibm-plex-mono/ibm-plex-mono-700-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 700; font-display: swap;
  src: url('/assets/fonts/ibm-plex-mono/ibm-plex-mono-700-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
}

body.embed-body {
  font-family: 'IBM Plex Mono', monospace;
  color: var(--text);
}

/* Patcher panel fills the whole viewport — no navbar offset, no transition.
   Overrides both the base (#patcher-panel) and open (.open) states from style.css. */
body.embed-body #patcher-panel,
body.embed-body #patcher-panel.open {
  position: fixed;
  inset: 0;
  height: 100vh;
  border: 0;
  transition: none;
  z-index: 1;
}

/* ── Embed footer branding (bottom-left) ── */
.embed-footer {
  position: fixed;
  bottom: 0.6rem;
  left: 0.6rem;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.25rem 0.6rem;
  background: rgba(0, 0, 0, 0.75);
  border: 1px solid var(--dim);
  border-radius: 2px;
  font-size: 0.5rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition: all 0.15s;
}
.embed-footer:hover {
  color: var(--text);
  border-color: var(--brbr);
  background: rgba(0, 0, 0, 0.95);
}
.embed-logo {
  width: 16px;
  height: 16px;
  display: block;
  flex-shrink: 0;
}
.embed-brand { white-space: nowrap; }
.embed-accent { color: var(--c); }

/* ── Patch watermark (top-right, shown only when meta.author is set) ── */
.embed-watermark {
  position: fixed;
  top: 0.6rem;
  right: 0.6rem;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.6rem;
  background: rgba(0, 0, 0, 0.75);
  border: 1px solid var(--dim);
  border-radius: 2px;
  font-size: 0.5rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  pointer-events: none;
}
.embed-watermark[hidden] { display: none; }
.embed-wm-label { opacity: 0.55; }
.embed-wm-author {
  color: var(--y);
  letter-spacing: 0.05em;
  text-transform: none;
}

/* ── Zoom hint (cooperative scroll mode) — centered, transient ── */
.nb-zoom-hint {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 200;
  padding: 0.5rem 1rem;
  background: rgba(0, 0, 0, 0.85);
  border: 1px solid var(--c);
  border-radius: 3px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--text);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
  white-space: nowrap;
}
.nb-zoom-hint.show { opacity: 1; }

/* ── Touch / unsupported device block ──
   Neon Patcher is a mouse-and-keyboard instrument (drag knobs, patch cables,
   right-click to add modules), so it needs a precise pointer. We block ONLY
   true touch input - width is NOT a gate, so mouse/trackpad devices run at any
   window size (a narrow patch is fit-to-view on load; pan/zoom to explore):
   - no hover (touch-only: phones, TVs, consoles)
   - coarse pointer (touchscreens, remote controls) */
.embed-mobile-block { display: none; }

@media (hover: none), (pointer: coarse) {
  body.embed-body #patcher-panel,
  body.embed-body #nb-ctx,
  body.embed-body .embed-footer,
  body.embed-body .embed-watermark,
  body.embed-body .nb-zoom-hint {
    display: none !important;
  }
  .embed-mobile-block {
    display: flex;
    position: fixed;
    inset: 0;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
    background: var(--bg);
    z-index: 1000;
  }
  .embed-mobile-block > div { max-width: 380px; }
  .embed-mobile-block h1 {
    color: var(--y);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 1rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin: 0 0 1rem 0;
  }
  .embed-mobile-block p {
    color: var(--muted);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    line-height: 1.6;
    margin: 0 0 1.2rem 0;
  }
  .embed-mobile-block a {
    color: var(--c);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-decoration: none;
    border-bottom: 1px solid var(--c);
    padding-bottom: 2px;
  }
}
