/* void_redesign.css -- Into the Void public redesign layer (2026-10-15, laptop-session,
   user-approved in chat: "complete redesign ... into the void public nip.io link").

   Loaded AFTER index.html's own <style> and /shared-theme.css, so it restyles the existing
   markup without touching void_app.js. It deliberately keeps three standing owner decisions
   recorded in index.html: shared colour tokens stay in shared-theme.css (that file is also
   read cross-origin by the private dashboard, so it is NOT edited here), the nav rail keeps
   the dashboard's rail pattern, and the TV/Guide circles stay fixed bottom-left.
   Light theme is opt-in (header toggle, remembered per browser); dark stays the brand default.
   Roll back: remove the <link> to this file in index.html. */

:root {
  color-scheme: dark;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 14px;
  --card: #0b110b;
  --card-hover: #0e160e;
  --line: #1a271a;
  --chip: #132013;
  --header-bg: rgba(7, 10, 7, 0.8);
  --skeleton: #122012;
  --skeleton-hi: #1b2c1b;
  --accent-ink: #050805;
  --focus: rgba(57, 255, 20, 0.4);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f5f7f4;
  --surface: #ffffff;
  --surface-2: #eef2ec;
  --panel: #ffffff;
  --border: #dde5da;
  --grid: #e7ece5;
  --text: #0f1a10;
  --text-dim: #566657;
  --muted: #687869;
  --accent: #127f07;
  --accent-glow: #2bd10f;
  --neon: #127f07;
  --like: #d0363a;
  --red: #d0363a;
  --cyan: #1d68c9;
  --blue: #1d68c9;
  --gold: #9a6c06;
  --yellow: #9a6c06;
  --teal: #0d877a;
  --pink: #b8307f;
  --card: #ffffff;
  --card-hover: #fbfcfa;
  --line: #e2e8df;
  --chip: #edf2eb;
  --header-bg: rgba(245, 247, 244, 0.86);
  --skeleton: #e8ede6;
  --skeleton-hi: #f3f6f1;
  --accent-ink: #ffffff;
  --focus: rgba(18, 127, 7, 0.3);
  --shadow: 0 10px 30px rgba(15, 26, 16, 0.12);
}

/* ---- base ---- */
body {
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  background: var(--bg);
}
:root:not([data-theme="light"]) body {
  background:
    radial-gradient(1100px 520px at 18% -8%, rgba(57, 255, 20, 0.07), transparent 60%),
    radial-gradient(900px 480px at 100% 110%, rgba(94, 179, 255, 0.05), transparent 60%),
    var(--bg);
}
.wrap { max-width: 640px; padding: 0 16px 120px; }
a { color: var(--cyan); }
::selection { background: color-mix(in srgb, var(--accent) 30%, transparent); }

/* Logged-out visitors never see the rail (void_app.js hides it), so don't reserve its gutter. */
body:has(#tab-nav.hidden) { padding-left: 0; }
body:has(#tab-nav.hidden) #hamburger-btn { display: none; }

/* Public visitors should not see the media debug strip; ?debug=1 brings it back. */
#media-debug { display: none !important; }
body.void-debug #media-debug { display: block !important; }

/* ---- header ---- */
header {
  margin: 0 -16px;
  padding: 12px 16px;
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}
.logo {
  font-family: var(--mono);
  font-size: 19px;
  letter-spacing: 0.4px;
  animation: none;
  text-shadow: 0 0 14px rgba(57, 255, 20, 0.35);
}
:root[data-theme="light"] .logo,
:root[data-theme="light"] .logo .cursor-blink { text-shadow: none; }
.live-badge {
  border-radius: 999px;
  font-family: var(--mono);
  letter-spacing: 0.08em;
  padding: 3px 9px;
}
.live-badge::before { content: "\25CF\00a0"; }
#auth-status { font-family: var(--sans); color: var(--text); font-weight: 600; }
.void-theme-btn {
  width: 36px; height: 36px; padding: 0; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--text);
}
.void-theme-btn:hover { filter: none; border-color: var(--accent); color: var(--accent); }

#omega-ticker {
  margin: 12px 0 2px;
  border-radius: 999px;
  border-color: var(--line);
  background: var(--surface);
}

/* ---- cards ---- */
.auth-box, .composer, .post {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 16px 10px;
  margin-top: 12px;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  animation: voidRise 0.28s ease-out both;
}
.auth-box, .composer { padding-bottom: 16px; }
.post { gap: 12px; }
.post:hover {
  border-color: color-mix(in srgb, var(--accent) 30%, var(--line));
  background: var(--card-hover);
  box-shadow: none;
}
.post .meta {
  font-family: var(--sans);
  font-size: 13.5px;
  color: var(--text-dim);
  gap: 10px;
  flex-wrap: wrap;
}
.post .meta b { color: var(--text); font-weight: 650; }
.post .body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  overflow-wrap: anywhere;
}
.post .body:empty { display: none; }
.post .body h3 { font-family: var(--sans); font-size: 19px !important; line-height: 1.3; }
.post .body a { text-decoration: underline; text-underline-offset: 2px; }
.post img, .post video {
  width: 100%;
  border-radius: 12px;
  margin-top: 0;
  border: 1px solid var(--line);
  background: var(--surface-2);
}
.post iframe { border-radius: 12px; }
.void-time { color: var(--text-dim); text-decoration: none; }
.void-time:hover { color: var(--text); text-decoration: underline; }
.post.void-target {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--focus);
}

/* ---- actions ---- */
.actions {
  gap: 2px;
  margin-top: 0;
  padding-top: 4px;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
  align-items: center;
}
.actions button, .actions .view-count {
  font-family: var(--sans);
  font-size: 13.5px;
  font-weight: 600;
  min-height: 40px;
  padding: 6px 12px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-dim);
}
.actions button:hover { background: var(--chip); color: var(--text); }
.actions button.liked { color: var(--like); }
.actions .view-count { margin-left: auto !important; font-size: 13px !important; }

/* ---- controls ---- */
button {
  font-family: var(--sans);
  border-radius: 999px;
  box-shadow: none;
  padding: 10px 18px;
  font-weight: 650;
  color: var(--accent-ink);
}
button:hover { box-shadow: none; filter: brightness(1.06); }
button.ghost { border-color: var(--line); color: var(--text-dim); }
button.ghost:hover { background: var(--chip); color: var(--text); border-color: var(--line); }
input, textarea, select {
  font-family: var(--sans);
  font-size: 15px;
  border-radius: 12px;
  background: var(--surface-2);
  border-color: var(--line);
  color: var(--text);
}
textarea { min-height: 88px; line-height: 1.5; }
input:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--focus); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
input:focus-visible, textarea:focus-visible { outline: none; }

.void-join h2 { margin: 0 0 4px; font-size: 20px; font-weight: 750; letter-spacing: -0.01em; }
.void-join p { margin: 0 0 6px; color: var(--text-dim); font-size: 14px; line-height: 1.5; }

.comment { font-family: var(--sans); font-size: 14px; line-height: 1.5; border-bottom-color: var(--line); }
.modal-sheet { border-radius: 18px 18px 0 0; border-color: var(--line); background: var(--surface); }

/* ---- states: skeleton, empty, error, new-post pill, toast ---- */
.void-skel { pointer-events: none; }
.void-skel .sk {
  border-radius: 8px;
  background: linear-gradient(90deg, var(--skeleton) 0%, var(--skeleton-hi) 50%, var(--skeleton) 100%);
  background-size: 200% 100%;
  animation: voidShimmer 1.3s ease-in-out infinite;
}
.void-skel .sk-row { display: flex; align-items: center; gap: 10px; }
.void-skel .sk-av { width: 28px; height: 28px; border-radius: 50%; flex: none; }
.void-state {
  text-align: center;
  padding: 44px 16px;
  color: var(--text-dim);
  font-family: var(--sans);
}
.void-state b { display: block; color: var(--text); font-size: 17px; margin-bottom: 6px; }
.void-state button { margin-top: 14px; }
.void-newpill {
  position: fixed; top: 72px; left: 50%; z-index: 40;
  transform: translateX(-50%);
  background: var(--accent); color: var(--accent-ink);
  border-radius: 999px; padding: 9px 18px;
  font-family: var(--sans); font-weight: 700; font-size: 14px;
  box-shadow: var(--shadow);
  animation: voidRise 0.22s ease-out both;
}
.void-toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 600;
  transform: translate(-50%, 16px);
  opacity: 0; pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--line); border-radius: 12px;
  padding: 10px 16px; font-family: var(--sans); font-size: 14px;
  box-shadow: var(--shadow);
}
.void-toast.show { opacity: 1; transform: translate(-50%, 0); }

@keyframes voidRise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes voidShimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }

@media (max-width: 480px) {
  .wrap { padding: 0 12px 120px; }
  header { margin: 0 -12px; padding: 10px 12px; }
  .auth-box, .composer, .post { padding: 14px 14px 8px; border-radius: 12px; }
  .post .body { font-size: 15.5px; }
  .actions button, .actions .view-count { padding: 6px 9px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  #omega-ticker-track { animation: none !important; }
}
