/* Lady Jin Diesel top bar — the ONE copy. Every LJD page links this file and
   carries the same markup (stamped by ../nav.mjs): search box (left) ·
   "Lady Jin Diesel" (centred) · By room / By trade + ☰ menu (right).
   Do not restyle the bar per page; change it here. */
.ljd-nav {
  --bg: #FAF7F1;
  --ink: #1F1A17;
  --ink-faint: rgba(31, 26, 23, 0.13);
  --accent: #6C2B4D;
  --body: 'Work Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
  --box-h: 2.1rem;
  position: sticky; top: 0; z-index: 50;
  margin: 0; padding: 0; border: 0;
  background: rgba(250, 247, 241, 0.92);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  color: var(--ink);
}
.ljd-nav a { color: inherit; text-decoration: none; }
.ljd-nav .nav-inner {
  max-width: 1560px; margin: 0 auto;
  padding: 0.75rem 1.6rem;
  display: grid; grid-template-columns: 1fr auto 1fr;
  grid-template-areas: "search brand right";
  align-items: center; gap: 1.6rem;
}

/* Search — searches the build. On the manifest it filters in place; on every
   other page it submits to the manifest (?q=). */
.ljd-nav .ljd-search {
  grid-area: search; justify-self: start;
  width: min(320px, 100%); box-sizing: border-box; margin: 0;
  display: flex; align-items: center; gap: 1rem;
  height: var(--box-h);
  border: 1px solid var(--ink-faint);
  padding: 0 0.85rem;
}
.ljd-nav .ljd-search:focus-within { border-color: var(--ink); }
.ljd-nav .ljd-search::after { content: "\21B3"; opacity: 0.45; font-size: 0.8rem; }
.ljd-nav .ljd-search input {
  flex: 1; min-width: 0; padding: 0; margin: 0;
  border: none; background: transparent; outline: none;
  font-family: var(--mono); font-size: 0.66rem;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink);
  -webkit-appearance: none; appearance: none;
}
.ljd-nav .ljd-search input::placeholder { color: var(--ink); opacity: 0.8; }
.ljd-nav .ljd-search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.ljd-nav .brand {
  grid-area: brand; justify-self: center; white-space: nowrap;
  font-family: var(--body); font-weight: 500; font-size: 0.78rem;
  text-transform: uppercase; letter-spacing: 0; line-height: 1;
  padding-bottom: 0.1em;
}
.ljd-nav .brand:hover { opacity: 0.6; }

.ljd-nav .nav-right { grid-area: right; justify-self: end; display: flex; align-items: center; gap: 0.5rem; }

/* By room / By trade — buttons on the manifest, links everywhere else. */
.ljd-nav .mode { display: flex; flex: none; }
.ljd-nav .mode > * {
  display: inline-flex; align-items: center; justify-content: space-between;
  gap: 1rem; height: var(--box-h); box-sizing: border-box; margin: 0;
  font-family: var(--mono); font-size: 0.66rem; font-weight: 400;
  letter-spacing: 0.14em; text-transform: uppercase; line-height: 1;
  padding: 0 0.85rem;
  background: transparent; color: var(--ink);
  border: 1px solid var(--ink-faint); border-radius: 0;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.ljd-nav .mode > * + * { border-left: none; }
.ljd-nav .mode > *::after { content: "\21B3"; opacity: 0.45; font-size: 0.8rem; }
.ljd-nav .mode > *:hover { border-color: var(--ink); }
.ljd-nav .mode > *:hover + * { border-left: none; }
.ljd-nav .mode > [aria-pressed="true"] { background: var(--accent); color: #fff; border-color: var(--accent); }
.ljd-nav .mode > [aria-pressed="true"]::after { opacity: 0.7; }

/* Hamburger */
.ljd-nav .menu { position: relative; flex: none; }
.ljd-nav .menu summary {
  list-style: none; cursor: pointer; box-sizing: border-box;
  display: inline-flex; align-items: center; justify-content: center;
  width: var(--box-h); height: var(--box-h);
  border: 1px solid var(--ink-faint);
  font-size: 0.85rem; line-height: 1;
}
.ljd-nav .menu summary::-webkit-details-marker { display: none; }
.ljd-nav .menu summary:hover, .ljd-nav .menu[open] summary { border-color: var(--ink); }
.ljd-nav .menu-panel {
  position: absolute; right: 0; top: calc(100% + 0.4rem);
  min-width: 11rem;
  display: flex; flex-direction: column;
  background: var(--bg);
  border: 1px solid var(--ink);
}
.ljd-nav .menu-panel a {
  padding: 0.6rem 0.85rem;
  font-family: var(--mono); font-size: 0.66rem;
  letter-spacing: 0.14em; text-transform: uppercase;
  border-bottom: 1px solid var(--ink-faint);
}
.ljd-nav .menu-panel a:last-child { border-bottom: none; }
.ljd-nav .menu-panel a:hover,
.ljd-nav .menu-panel a[aria-current="page"] { background: var(--accent); color: #fff; }

@media (max-width: 720px) {
  .ljd-nav .nav-inner { padding: 0.85rem 1.1rem; }
}
/* Phones: name centred on its own line, search + controls beneath it. */
@media (max-width: 760px) {
  .ljd-nav .nav-inner {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "brand brand" "search right";
    gap: 0.6rem 0.5rem;
  }
  .ljd-nav .ljd-search { width: 100%; }
}
:root { --nav-h: 3.6rem; }
@media (max-width: 760px) { :root { --nav-h: 5.6rem; } }
@media (max-width: 560px) {
  .ljd-nav .mode > * { gap: 0.5rem; padding: 0 0.55rem; font-size: 0.6rem; letter-spacing: 0.08em; }
  .ljd-nav .ljd-search { gap: 0.5rem; padding: 0 0.55rem; }
  .ljd-nav .ljd-search::after { display: none; }
  .ljd-nav .ljd-search input { font-size: 0.6rem; letter-spacing: 0.06em; }
  .ljd-nav .brand { font-size: 0.72rem; letter-spacing: 0.1em; }
}
