@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700;800&display=swap");
/* Shared site chrome — jasonthenerd red theme (2026-10-09).
   Dark #0b0306 background, crimson accents, Montserrat, pill buttons, sticky blurred topbar.
   The old Spare Room token names (--canvas, --fg, --tape, …) are kept and remapped so every
   page that already uses them (blog, Film Finder, Gallery, /apps/*) picks up the new look.
   The --color-* names remap the Tailwind tokens used by DiscShelf and Knowledge Base. */
:root {
  --bg: #0b0306;
  --bg2: #1a0508;
  --red: #c8141e;
  --red2: #e0242c;
  --line: #7a0f15;
  --card: #160609;
  --ink: #f3e9e9;
  --mute: #b9a3a5;

  --canvas: #0b0306;
  --surface: #160609;
  --raised: #2a070b;
  --fg: #f3e9e9;
  --muted: #b9a3a5;
  --faint: #8f7779;
  --paper: #e0242c;
  --on-paper: #ffffff;
  --tape: #c8141e;
  --font-sans: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
  --max: 74rem;
  --radius: 10px;
  --border: 2px solid var(--line);
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  --shadow-sm: 0 4px 14px rgba(0, 0, 0, 0.45);
  --tape-shadow: 0 3px 12px rgba(200, 20, 30, 0.35);

  --color-canvas: #0b0306;
  --color-surface: #160609;
  --color-raised: #2a070b;
  --color-fg: #f3e9e9;
  --color-muted: #b9a3a5;
  --color-faint: #8f7779;
  --color-paper: #e0242c;
  --color-on-paper: #ffffff;
  --color-tape: #c8141e;
  --shadow-chunky: 0 6px 18px rgba(0, 0, 0, 0.45);
  --shadow-chunky-sm: 0 3px 10px rgba(0, 0, 0, 0.4);
  color-scheme: dark;
}

html { color-scheme: dark; }
body {
  font-family: var(--font-sans);
  color: var(--fg);
  background: linear-gradient(180deg, #0b0306 0%, #240509 35%, #3a070c 60%, #140306 100%) fixed;
  background-color: var(--canvas);
}
::selection { background: var(--red); color: #fff; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}
.sr-only:focus, .focus\:not-sr-only:focus {
  position: static; width: auto; height: auto;
  margin: 0; clip: auto; overflow: visible;
  white-space: normal;
}

.wrap {
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: 1.125rem;
}

/* Pill buttons (shared) */
.pill, .login-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, var(--red2), #9c0d15);
  color: #fff !important;
  text-decoration: none !important;
  border: 0;
  border-radius: 999px;
  padding: 10px 18px;
  font: 700 13px/1 var(--font-sans);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(200, 20, 30, 0.35);
}
.pill:hover, .login-pill:hover { filter: brightness(1.12); }
.pill.ghost { background: transparent; border: 1.5px solid var(--red2); box-shadow: none; }

/* Topbar */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(11, 3, 6, 0.88);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-bottom: 2px solid var(--line);
  color: var(--ink);
  font-family: var(--font-sans);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  min-height: 4.25rem;
  flex-wrap: wrap;
  padding-block: 0.5rem;
}
.site-header .brand,
.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--red2);
  font-family: var(--font-sans);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  line-height: 1;
}
.brand::before {
  content: "";
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: url("/shared/img/logo-mask.png?v=3") center / cover no-repeat;
  box-shadow: 0 0 0 1.5px var(--line);
  filter: drop-shadow(0 0 6px rgba(220, 30, 45, 0.45));
}
.brand span { opacity: 1; color: inherit; }
.brand:hover { text-decoration: none; filter: brightness(1.1); }

.nav-desktop {
  display: none;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.15rem 0.35rem;
  max-width: 100%;
}
.nav-desktop a,
.nav-mobile a {
  display: inline-flex;
  align-items: center;
  height: 2.5rem;
  padding: 0 0.7rem;
  border-radius: 999px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
}
.nav-desktop a:hover,
.nav-mobile a:hover { color: #fff; background: rgba(200, 20, 30, 0.22); text-decoration: none; }
.nav-desktop a[aria-current="page"],
.nav-mobile a[aria-current="page"] { color: #fff; background: rgba(200, 20, 30, 0.32); }
.nav-desktop a.login-pill,
.nav-mobile a.login-pill {
  height: auto;
  padding: 9px 16px;
  margin-left: 0.25rem;
  color: #fff;
  background: linear-gradient(180deg, var(--red2), #9c0d15);
}
.nav-mobile a.login-pill { align-self: flex-start; margin: 0.4rem 0 0; }

.apps-menu { position: relative; }
.apps-menu summary {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  height: 2.5rem;
  padding: 0 0.7rem;
  border-radius: 999px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: inherit;
  cursor: pointer;
  list-style: none;
}
.apps-menu summary::-webkit-details-marker { display: none; }
.apps-menu summary::after {
  content: "▾";
  font-size: 0.85em;
  color: var(--red2);
  transition: transform 120ms ease;
}
.apps-menu[open] summary::after { transform: rotate(180deg); }
.apps-menu summary:hover,
.apps-menu[open] summary { background: rgba(200, 20, 30, 0.22); color: #fff; }
.apps-menu summary:focus-visible {
  outline: 2px solid var(--red2);
  outline-offset: 2px;
}
.apps-menu-panel {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  z-index: 2;
  display: grid;
  min-width: 12rem;
  gap: 0.2rem;
  padding: 0.5rem;
  border: 2px solid var(--line);
  border-radius: 12px;
  background: #0f0407;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.6);
}
.apps-menu-panel a {
  height: 2.4rem;
  padding: 0 0.75rem;
  border-radius: 8px;
  white-space: nowrap;
  text-decoration: none;
  text-transform: none;
  letter-spacing: 0.01em;
  font-size: 14px;
}
.apps-menu-panel a:hover,
.apps-menu-panel a:focus-visible { background: rgba(200, 20, 30, 0.28); color: #fff; }
.apps-menu-panel a[aria-current="page"] { background: rgba(200, 20, 30, 0.38); color: #fff; }

.nav-mobile .apps-menu { width: 100%; }
.nav-mobile .apps-menu summary { width: 100%; }
.nav-mobile .apps-menu-panel {
  position: static;
  min-width: 0;
  padding: 0.125rem 0 0.25rem 1rem;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}
.nav-mobile .apps-menu-panel a { width: 100%; }

.menu-btn {
  display: grid;
  place-items: center;
  width: 2.6rem; height: 2.6rem;
  border: 1.5px solid var(--line);
  background: transparent;
  border-radius: 10px;
  color: var(--ink);
  cursor: pointer;
}
.menu-btn:hover { border-color: var(--red2); }
.nav-mobile {
  display: none;
  border-top: 2px solid var(--line);
  background: #0f0407;
}
.nav-mobile.open { display: block; }
.nav-mobile .wrap {
  display: flex;
  flex-direction: column;
  padding-block: 0.5rem 0.9rem;
}

@media (min-width: 900px) {
  .nav-desktop { display: flex; }
  .menu-btn { display: none; }
  .nav-mobile, .nav-mobile.open { display: none !important; }
  .header-inner { padding-inline: 2rem; max-width: none; }
  .site-header .brand, .brand { font-size: 22px; }
  .brand::before { width: 44px; height: 44px; }
}

/* Cookie-gated Apps menu — hidden until site-nav.js confirms /apps session */
.apps-menu[data-apps-gated]:not([data-visible="1"]) {
  display: none !important;
}
.nav-desktop > .apps-menu[data-apps-gated][data-visible="1"] {
  display: block;
}
.nav-mobile .apps-menu[data-apps-gated][data-visible="1"] {
  display: block;
  width: 100%;
}

/* Watched ticker — sits right under the topbar */
.watched-ticker {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  background: linear-gradient(90deg, #1a0408, #2a070b 50%, #1a0408);
  border-bottom: 1px solid var(--line);
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  overflow: hidden;
  font-family: var(--font-sans);
  font-size: 13px;
  line-height: 1.3;
}
.watched-ticker[hidden] { display: none !important; }
.watched-ticker-kicker {
  flex: none;
  margin: 0;
  background: var(--red);
  color: #fff;
  font-weight: 800;
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 8px 12px;
  border-radius: 0 999px 999px 0;
  box-shadow: 4px 0 14px rgba(0, 0, 0, 0.5);
  position: relative;
  z-index: 1;
}
.watched-ticker-viewport {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 24px, #000 calc(100% - 24px), transparent);
  mask-image: linear-gradient(90deg, transparent, #000 24px, #000 calc(100% - 24px), transparent);
}
.watched-ticker-track {
  display: flex;
  width: max-content;
  animation: watched-ticker-scroll 38s linear infinite;
}
.watched-ticker:hover .watched-ticker-track { animation-play-state: paused; }
.watched-ticker-seq { display: flex; flex: 0 0 auto; }
.watched-ticker-item {
  white-space: nowrap;
  color: #f3dfe0;
  font-weight: 600;
  padding: 8px 22px 8px 18px;
  position: relative;
}
.watched-ticker-item::before {
  content: "";
  position: absolute;
  left: 4px; top: 50%;
  width: 6px; height: 6px;
  margin-top: -3px;
  border-radius: 50%;
  background: var(--red2);
  box-shadow: 0 0 8px var(--red2);
}
.watched-ticker-item b { color: #ffcc4d; font-weight: 700; }
@keyframes watched-ticker-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .watched-ticker-track { animation-duration: 90s; }
}

/* Tailwind apps (DiscShelf / Knowledge Base): darker borders and dark status chips */
.border-fg { border-color: var(--line); }
.bg-white { background-color: var(--surface); }
.bg-rose-100, .bg-rose-50 { background-color: #3a0a10; }
.bg-emerald-50, .bg-emerald-100 { background-color: #0e2a1a; }
.bg-amber-50, .bg-amber-100 { background-color: #33240a; }
.bg-fuchsia-100 { background-color: #3a0a33; }
.text-rose-700, .text-rose-800 { color: #ff8a90; }
.text-emerald-700, .text-emerald-800 { color: #6fe0a6; }
.text-amber-700, .text-amber-800, .text-amber-900 { color: #ffcf6b; }
.text-fuchsia-800 { color: #f5a3ec; }
.text-teal-800 { color: #7fe3d6; }

/* Jump-to-top buttons (shared + DiscShelf): red with a white arrow in every state */
button[aria-label="Jump to top"] { background: #c8141e !important; color: #fff !important; border-color: #7a0f15 !important; }
button[aria-label="Jump to top"]:hover,
button[aria-label="Jump to top"]:focus,
button[aria-label="Jump to top"]:focus-visible,
button[aria-label="Jump to top"]:active { background: #e0242c !important; color: #fff !important; }

/* Crisp half star (2026-10-21c): left half = the same solid ★ glyph as the full stars (clipped),
   right half = a clean thin outline of that glyph. No background-clip, no shadow, so no dark smudge.
   Same glyph, so same size and baseline as the full stars. */
.half-star {
  position: relative;
  display: inline-block;
  color: inherit;
  background: none !important;
  -webkit-background-clip: border-box;
  background-clip: border-box;
  -webkit-text-fill-color: transparent;
  -webkit-text-stroke: 0.06em currentColor;
  -webkit-text-stroke: 0.06em color-mix(in srgb, currentColor 70%, transparent);
  text-shadow: none !important;
  filter: none;
}
.half-star::before {
  content: '\2605';
  content: '\2605' / '';
  position: absolute;
  left: 0;
  top: 0;
  -webkit-text-fill-color: currentColor;
  -webkit-text-stroke: 0;
  text-shadow: none;
  clip-path: inset(0 50% 0 0);
  pointer-events: none;
}
