/* chrome.css — shared "looks like Bluesky" light theme for every voidshout
   page: white centered column, bordered on wide viewports, Bluesky-blue
   accent, pill buttons. One stylesheet per page; each page adds its own
   page-specific rules below its <link>. */

:root {
  --void-bg: #ffffff;
  --void-bg2: #f7f9fa;
  --panel: #ffffff;
  --panel-solid: #ffffff;
  --ink: #0f1419;
  --muted: #536471;
  --faint: #e1e8ed;
  --accent: #1185fe;
  --accent2: #0a7aff;
  --good: #00ba7c;
  --bad: #e0245e;
  --pin-glow: 0 0 4px #fff, 0 0 1px #fff;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", "Cascadia Code", monospace;
  --sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--void-bg);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); }
a:hover { color: var(--accent2); }

.wrap { max-width: 600px; margin: 0 auto; padding: 1.1rem 1.1rem 5rem; position: relative; z-index: 1; }
.wrap.wide { max-width: 900px; }

#chrome-header {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
  padding: 0.75rem 1.1rem;
  border-bottom: 1px solid var(--faint);
  background: #ffffffd9;
  backdrop-filter: blur(6px);
}
#chrome-header .brand {
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}
#chrome-header .brand .void { color: var(--accent); }
#chrome-header nav {
  display: flex;
  gap: 0.2rem;
  flex-wrap: nowrap;
  overflow-x: auto;
  font-size: 0.82rem;
  scrollbar-width: none;
}
#chrome-header nav::-webkit-scrollbar { display: none; }
#chrome-header nav a {
  color: var(--muted);
  text-decoration: none;
  padding: 0.4rem 0.65rem;
  border-radius: 999px;
  white-space: nowrap;
}
#chrome-header nav a:hover { color: var(--ink); background: var(--void-bg2); }
#chrome-header nav a.active { color: var(--accent); background: #e8f3ff; font-weight: 700; }
#chrome-header .spacer { flex: 1 1 auto; }
#chrome-session { display: flex; align-items: center; gap: 0.5rem; font-size: 0.82rem; }
#chrome-session .home-tag {
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}
#chrome-session .did-tag {
  color: var(--muted);
  font-size: 0.72rem;
  font-family: var(--mono);
}

button, .btn {
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
  background: var(--panel-solid);
  border: 1px solid var(--faint);
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: background-color 0.15s, border-color 0.15s, transform 0.1s;
}
button:hover, .btn:hover { background: var(--void-bg2); border-color: #c9d4dc; }
button:active, .btn:active { transform: scale(0.98); }
button.primary, .btn.primary {
  background: var(--accent);
  border-color: transparent;
  color: #ffffff;
  font-weight: 700;
}
button.primary:hover, .btn.primary:hover { background: var(--accent2); }
button:disabled { opacity: 0.5; cursor: not-allowed; }

input, textarea, select {
  font-family: var(--sans);
  font-size: 0.9rem;
  color: var(--ink);
  background: var(--panel-solid);
  border: 1px solid var(--faint);
  border-radius: 8px;
  padding: 0.5rem 0.7rem;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px #1185fe26;
}

.card {
  background: var(--panel);
  border: 1px solid var(--faint);
  border-radius: 14px;
  padding: 1rem;
  margin-bottom: 0.85rem;
}

.badge {
  display: inline-block;
  font-size: 0.68rem;
  font-family: var(--mono);
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  border: 1px solid var(--faint);
  color: var(--muted);
}
.badge.demo { border-color: var(--accent); color: var(--accent); background: #e8f3ff; }
.badge.hidden { border-color: var(--bad); color: var(--bad); background: #fdeaf0; }
.badge.reason { border-color: #d97706; color: #d97706; background: #fdf3e2; }

#demo-banner {
  display: none;
  position: relative;
  z-index: 1;
  text-align: center;
  font-size: 0.78rem;
  padding: 0.5rem 1rem;
  background: #e8f3ff;
  color: var(--accent2);
  border-bottom: 1px solid var(--faint);
}
#demo-banner.on { display: block; }
#demo-banner a { color: var(--accent); font-weight: 600; }

h1, h2, h3 { font-family: var(--sans); }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); }
.hr { border: none; border-top: 1px solid var(--faint); margin: 1rem 0; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

/* Mobile: #chrome-header is flex with the brand (nowrap text, can't shrink)
   fighting nav and the session widget for room on one line. nav's
   overflow-x:auto gives it an automatic min-width of 0 (new formatting
   context), so flexbox happily crushes it to a near-invisible sliver instead
   of wrapping — with scrollbar-width:none hiding the fact it's scrollable at
   all. Force nav onto its own full-width row below brand+session instead, and
   bump touch targets that are comfortable with a mouse but small for a
   thumb. */
@media (max-width: 640px) {
  #chrome-header nav { flex: 0 0 100%; order: 3; }
  #chrome-header nav a { padding: 0.55rem 0.7rem; }
  button, .btn { min-height: 2.6rem; padding: 0.55rem 1rem; }
}
