/* One header and footer presentation for Next.js and PHP routes. */
html[data-theme] .ls-header { background: var(--bg); color: var(--text); }
.ls-container { width: min(100% - 96px, 1344px); margin-inline: auto; }
.ls-header { height: var(--header-height); position: sticky; top: 0; z-index: 70; border-bottom: 1px solid var(--line); background: var(--bg); }
.ls-header-inner { max-width: 1600px; height: 100%; padding-inline: 36px; margin-inline: auto; display: flex; align-items: center; gap: 38px; }
.ls-brand { display: flex; flex: 0 0 auto; align-items: center; }
.ls-brand img { width: 122px; height: 40px; object-fit: contain; }
.ls-main-nav { display: flex; gap: 24px; align-items: center; }
.ls-main-nav a { color: var(--muted); font-size: 13px; font-weight: 500; white-space: nowrap; padding-block: 24px; position: relative; }
.ls-main-nav a:hover, .ls-main-nav a[aria-current] { color: var(--text); }
.ls-main-nav a[aria-current]::after { content: ''; position: absolute; bottom: 0; height: 2px; background: var(--accent); left: 0; right: 0; }
.ls-header-tools { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.ls-search-trigger { display: flex; align-items: center; gap: 10px; color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-radius: 7px; padding: 8px 10px; font-size: 12px; height: 36px; min-width: 216px; }
.ls-search-trigger svg, .ls-command-input svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; flex-shrink: 0; }
.ls-search-trigger kbd { margin-left: auto; }
.ls-icon-button { width: 40px; height: 40px; display: inline-flex; justify-content: center; align-items: center; padding: 8px; border: 1px solid transparent; background: transparent; color: var(--muted); border-radius: 6px; flex-shrink: 0; }
.ls-icon-button:hover { background: var(--surface); border-color: var(--line); color: var(--text); }
.ls-icon-button svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.ls-portal-link { font-size: 12px; color: var(--text); border-left: 1px solid var(--line); padding-left: 20px; white-space: nowrap; }
.ls-portal-link span { color: var(--muted); margin-left: 6px; }
.ls-menu-toggle, .ls-mobile-portal { display: none !important; }
.ls-footer { display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: 48px; padding-block: 64px; border-top: 1px solid var(--line); margin-top: 96px; }
.ls-wordmark { color: var(--text); font-size: 24px; font-weight: 650; letter-spacing: -.05em; }
.ls-wordmark span { color: var(--accent-text); margin-left: 6px; }
.ls-footer p, .ls-footer small { color: var(--muted); font-size: 12px; }
.ls-footer nav { display: flex; flex-direction: column; gap: 10px; }
.ls-footer nav strong { font-size: 12px; color: var(--text); font-weight: 500; margin-bottom: 6px; }
.ls-footer nav a { color: var(--muted); font-size: 12px; }
.ls-footer nav a:hover { color: var(--accent-text); }
.ls-social-links { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-block: 20px; font-size: 11px; }
.ls-social-links a { color: var(--muted); }
.ls-header, .ls-footer { font-family: var(--font-body); font-size: 16px; line-height: 1.65; color: var(--text); }
.ls-header *, .ls-footer * { box-sizing: border-box; }
.ls-header a, .ls-footer a { text-decoration: none; }
.ls-header button { font-family: var(--font-body); cursor: pointer; }
.ls-icon-button [data-theme-icon] { display: flex; }
.ls-search-trigger kbd { padding: 1px 4px; border: 1px solid var(--line); border-radius: 3px; color: var(--muted); background: transparent; font: 10px var(--font-mono); }
.ls-footer p { margin: 12px 0; }
.ls-footer a:focus-visible, .ls-header :focus-visible { outline: 2px solid var(--accent-text); outline-offset: 4px; }
@media (max-width: 1199px) {
  .ls-header-inner { gap: 24px; padding-inline: 24px; }
  .ls-main-nav { gap: 16px; }
  .ls-search-trigger { min-width: 40px; width: 40px; height: 40px; justify-content: center; }
  .ls-search-trigger span, .ls-search-trigger kbd { display: none; }
}
@media (max-width: 800px) {
  .ls-container { width: calc(100% - 40px); }
  .ls-header-inner { padding-inline: 20px; gap: 16px; }
  .ls-header-tools { gap: 4px; }
  .ls-portal-link { display: none; }
  .ls-menu-toggle { display: inline-flex !important; }
  .ls-main-nav { display: none; position: absolute; top: 71px; left: 0; right: 0; padding: 16px 20px 24px; background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: 0 20px 30px #0003; }
  .ls-main-nav.is-open { display: flex; flex-direction: column; align-items: stretch; gap: 0; }
  .ls-main-nav a { padding: 12px; min-height: 44px; border-radius: 4px; font-size: 15px; }
  .ls-main-nav a[aria-current] { background: var(--surface); }
  .ls-main-nav a[aria-current]::after { display: none; }
  .ls-mobile-portal { display: block !important; color: var(--accent-text) !important; }
  .ls-footer { grid-template-columns: repeat(2, 1fr); gap: 40px 24px; margin-top: 64px; padding-block: 48px; }
  .ls-footer > div { grid-column: 1 / -1; }
}
@media (max-width: 800px) { .ls-header.menu-open .ls-main-nav { display: flex; flex-direction: column; align-items: stretch; gap: 0; } }
