/* ==== MovieLines — Hollywood modern theme ==== */
:root {
  --bg:        #08080d;
  --bg-elev:   #11111a;
  --bg-card:   #15151f;
  --bg-card-2: #1c1c2a;
  --line:      #2a2a3a;
  --ink:       #f5f5f7;
  --ink-mute:  #9a9aab;
  --ink-dim:   #65657a;
  --gold:      #f4c870;
  --gold-2:    #e0a83a;
  --red:       #e50914;
  --red-2:     #b00610;
  --green:     #4cc38a;
  --shadow-1:  0 6px 24px rgba(0,0,0,0.55);
  --shadow-2:  0 18px 60px rgba(0,0,0,0.7);
  --control-h: 44px;
  --radius:    10px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  background-image:
    radial-gradient(ellipse at 12% -10%, rgba(229,9,20,0.12), transparent 50%),
    radial-gradient(ellipse at 90% 10%, rgba(244,200,112,0.08), transparent 55%),
    radial-gradient(ellipse at 50% 100%, rgba(80,30,200,0.10), transparent 60%);
  background-attachment: fixed;
}
a { color: inherit; text-decoration: none; }
em { font-style: italic; color: var(--gold); }

/* ============ Topbar ============ */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: flex-start;
  gap: 1rem;
  padding: 0.85rem 1.5rem;
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  background: rgba(8,8,13,0.7);
  border-bottom: 1px solid var(--line);
}
@media (max-width: 480px) {
  .topbar { padding: 0.75rem 1rem; }
  .brand { font-size: 1.4rem; }
}
.brand {
  display: flex; align-items: center; gap: 0.6rem;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.6rem; letter-spacing: 0.08em;
}
.reel { font-size: 1.4rem; }
.brand-accent { color: var(--red); }

.tabs {
  display: flex; gap: 0.25rem;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.25rem;
}
.tab {
  border: 0; background: transparent; color: var(--ink-mute);
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  font: 600 0.85rem 'Inter', sans-serif;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: all 0.2s ease;
}
.tab:hover { color: var(--ink); }
.tab.active {
  background: linear-gradient(135deg, var(--red), var(--red-2));
  color: #fff;
  box-shadow: 0 6px 20px rgba(229,9,20,0.35);
}

/* ============ Layout ============ */
main { padding: 2rem 1.5rem 6rem; max-width: 1200px; margin: 0 auto; }
.view { display: none; animation: fade 0.35s ease; }
.view.active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ============ Hero ============ */
.hero { text-align: center; padding: 2.5rem 0 2rem; }
.hero-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  letter-spacing: 0.02em;
  line-height: 1;
  margin-bottom: 0.75rem;
}
.hero-sub { color: var(--ink-mute); font-size: 1.05rem; margin-bottom: 2rem; }

.search-wrap {
  position: relative; max-width: 640px; margin: 0 auto;
}
.search-wrap .search-icon {
  position: absolute; left: 1.1rem; top: 50%; transform: translateY(-50%);
  width: 20px; height: 20px;
  fill: none; stroke: var(--ink-dim); stroke-width: 2; stroke-linecap: round;
}
#search-input {
  width: 100%;
  height: 56px;
  padding: 0 3rem;
  font: 500 1.05rem 'Inter', sans-serif;
  color: var(--ink);
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: none;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-1);
}
#search-input::placeholder { color: var(--ink-dim); }
#search-input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(244,200,112,0.15), var(--shadow-1);
}
/* ============ Clapperboard loader ============ */
/* Used everywhere we need a "loading" hint. Two-piece SVG-ish CSS:
   a slate base + a hinged top stick that claps closed every 1.4s. */
.clapper {
  display: inline-block; position: relative;
  width: 28px; height: 26px;
  flex-shrink: 0;
}
.clapper-base, .clapper-top {
  position: absolute; left: 0; right: 0;
  border-radius: 2px;
  background: #1a1a22;
  border: 1px solid var(--ink-dim);
  box-shadow: 0 2px 6px rgba(0,0,0,0.35);
}
.clapper-base {
  bottom: 0; height: 60%;
  background: #1c1c24;
}
.clapper-base::before {
  /* horizontal info lines on the slate */
  content: "";
  position: absolute; inset: 18% 12%;
  background:
    linear-gradient(to bottom,
      transparent 0 24%, var(--ink-dim) 24% 32%,
      transparent 32% 56%, var(--ink-dim) 56% 64%,
      transparent 64% 88%, var(--ink-dim) 88% 96%,
      transparent 96% 100%);
  opacity: 0.55;
}
.clapper-top {
  top: 0; height: 38%;
  transform-origin: 8% 100%;
  animation: clap 1.4s cubic-bezier(0.65, 0, 0.35, 1) infinite;
  background:
    repeating-linear-gradient(115deg,
      var(--ink) 0 5px, #1a1a22 5px 10px);
  border-color: var(--ink-mute);
}
@keyframes clap {
  0%   { transform: rotate(-22deg); }
  20%  { transform: rotate(-22deg); }
  38%  { transform: rotate(0deg); }      /* clap! */
  42%  { transform: rotate(2deg); }      /* tiny bounce */
  46%  { transform: rotate(0deg); }
  78%  { transform: rotate(0deg); }
  100% { transform: rotate(-22deg); }
}
/* Search input clapper sits at the right edge */
.clapper.in-search {
  position: absolute; right: 1.1rem; top: 50%;
  transform: translateY(-50%);
}
/* Larger size for full-page loaders */
.clapper.lg { width: 56px; height: 50px; }
.clapper.lg .clapper-base::before { background-size: 100% 100%; }

/* Center-card loader */
.clapper-center {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1rem; padding: 3rem 1rem; color: var(--ink-mute);
  font: 500 0.9rem 'Inter', sans-serif;
}

/* favicon fallback for /favicon.ico requests — SPA must NOT serve index.html for those */
/* (handled at nginx layer below; this is a marker comment) */

/* ============ Row head with action button ============ */
.row-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 1rem; margin-bottom: 1rem;
}
.row-head .section-title { margin-bottom: 0; }
.ghost-btn {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink-mute);
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  font: 600 0.82rem 'Inter', sans-serif;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
}
.ghost-btn:hover {
  color: var(--ink);
  border-color: var(--gold);
  background: rgba(244,200,112,0.06);
}

/* Comments rail-card variants */
.comment-body-text {
  font-size: 0.9rem; line-height: 1.4; color: var(--ink);
  margin-bottom: 0.4rem;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.comment-author { font-size: 0.74rem; color: var(--ink-mute); margin-bottom: 0.2rem; }
.comment-author strong { color: var(--gold); font-weight: 600; }
.comment-quote-ref {
  font-size: 0.78rem; font-style: italic; color: var(--ink-dim);
  margin-bottom: 0.4rem;
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
  padding-left: 0.6rem; border-left: 2px solid var(--line);
}
#comments-section .recent-card { grid-template-columns: 60px 1fr; }
#comments-section .recent-thumb { width: 60px; }

/* ============ Modal (All Quotes) ============ */
.modal { position: fixed; inset: 0; z-index: 200; }
.modal-shade {
  position: absolute; inset: 0;
  background: rgba(8,8,13,0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: fade 0.25s ease;
}
.modal-panel {
  position: absolute; inset: 4vh 4vw;
  background: linear-gradient(180deg, var(--bg-card), var(--bg));
  border: 1px solid var(--line);
  border-radius: 18px;
  display: flex; flex-direction: column;
  box-shadow: var(--shadow-2);
  overflow: hidden;
  animation: panel-in 0.3s cubic-bezier(0.16,1,0.3,1);
}
@keyframes panel-in {
  from { opacity: 0; transform: translateY(20px) scale(0.98); }
  to   { opacity: 1; transform: none; }
}
@media (max-width: 720px) {
  .modal-panel { inset: 0; border-radius: 0; }
}
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.modal-sub { color: var(--ink-mute); font-size: 0.85rem; margin-top: 0.25rem; }
.modal-close {
  background: transparent; border: 1px solid var(--line);
  color: var(--ink-mute);
  width: 38px; height: 38px;
  border-radius: 50%;
  font-size: 1.4rem; line-height: 1; cursor: pointer;
  display: grid; place-items: center;
  transition: all 0.15s ease;
}
.modal-close:hover { color: var(--ink); border-color: var(--gold); }
.modal-body { flex: 1; overflow-y: auto; padding: 1.5rem; }
.modal-foot { display: flex; justify-content: center; padding: 1.5rem 0 0.5rem; }

.all-quotes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 1rem;
}
@media (max-width: 600px) {
  .all-quotes-grid { grid-template-columns: 1fr; }
}
.aq-card {
  display: grid; grid-template-columns: 90px 1fr;
  gap: 1rem; padding: 1rem;
  background: var(--bg-card-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  text-decoration: none; color: inherit;
  transition: all 0.2s ease;
}
.aq-card:hover {
  transform: translateY(-3px);
  border-color: var(--gold);
  box-shadow: var(--shadow-1);
}
.aq-thumb {
  width: 90px; aspect-ratio: 2/3;
  background: var(--bg-card) center/cover no-repeat;
  border-radius: 8px; border: 1px solid var(--line);
}
.aq-thumb.no-img {
  display: grid; place-items: center;
  font-family: 'Bebas Neue', sans-serif; font-size: 0.78rem;
  color: var(--ink-dim); text-align: center; padding: 0.4rem;
}
.aq-body { display: flex; flex-direction: column; gap: 0.5rem; min-width: 0; }
.aq-quote {
  font-style: italic; font-size: 0.95rem; line-height: 1.4;
  color: var(--ink);
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}
.aq-meta {
  font-size: 0.82rem; color: var(--ink-mute);
  display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap;
}
.aq-meta strong { color: var(--gold); font-weight: 600; }
.aq-foot {
  margin-top: auto;
  display: flex; gap: 0.4rem; align-items: center; flex-wrap: wrap;
  font-size: 0.72rem;
}
.aq-votes { color: var(--ink-mute); font-weight: 600; margin-right: 0.3rem; }

/* ============ Recently Added strip ============ */
.recent-section { margin: 1rem 0 2.5rem; }
.recent-section {
  position: relative;
}
.recent-section::after {
  content: ""; position: absolute; right: 0; top: 3.5rem; bottom: 1rem;
  width: 48px;
  background: linear-gradient(270deg, var(--bg) 0%, transparent 100%);
  pointer-events: none; border-radius: 0 14px 14px 0;
}
.recent-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 280px;
  gap: 1rem;
  overflow-x: auto;
  padding: 0.25rem 0.25rem 1rem;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}
@media (max-width: 480px) {
  .recent-rail { grid-auto-columns: 86vw; }
}
.recent-rail::-webkit-scrollbar { height: 8px; }
.recent-rail::-webkit-scrollbar-thumb { background: var(--line); border-radius: 4px; }
.recent-card {
  scroll-snap-align: start;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.85rem;
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  color: inherit;
}
.recent-card:hover {
  transform: translateY(-3px);
  border-color: var(--gold);
  box-shadow: var(--shadow-1);
}
.recent-thumb {
  width: 70px; aspect-ratio: 2/3;
  background: var(--bg-card-2) center/cover no-repeat;
  border-radius: 8px;
  border: 1px solid var(--line);
}
.recent-thumb.no-img {
  display: grid; place-items: center;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 0.75rem;
  color: var(--ink-dim);
  text-align: center;
  padding: 0.3rem;
}
.recent-body { display: flex; flex-direction: column; min-width: 0; }
.recent-quote {
  font-style: italic;
  font-size: 0.9rem;
  line-height: 1.35;
  color: var(--ink);
  margin-bottom: 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.recent-movie {
  font-size: 0.78rem;
  color: var(--ink-mute);
  margin-bottom: 0.35rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.recent-movie strong { color: var(--gold); font-weight: 600; }
.recent-scores { display: flex; gap: 0.3rem; flex-wrap: wrap; margin-top: auto; }
.recent-scores .score { font-size: 0.68rem; padding: 0.12rem 0.4rem; }

/* ============ Quote-match cards (smart search) ============ */
.quote-matches {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 0.85rem;
  margin-bottom: 2.5rem;
}
.qm-card {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 0.85rem;
  padding: 0.85rem;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 12px;
  text-decoration: none; color: inherit;
  transition: all 0.2s ease;
}
.qm-card:hover {
  transform: translateY(-2px);
  border-color: var(--gold);
  box-shadow: var(--shadow-1);
}
.qm-thumb {
  width: 80px; aspect-ratio: 2/3;
  background: var(--bg-card-2) center/cover no-repeat;
  border-radius: 8px;
  border: 1px solid var(--line);
}
.qm-thumb.no-img {
  display: grid; place-items: center;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 0.7rem; padding: 0.3rem;
  color: var(--ink-dim); text-align: center;
}
.qm-body { display: flex; flex-direction: column; min-width: 0; gap: 0.4rem; }
.qm-quote {
  font-style: italic; font-size: 0.92rem; line-height: 1.4;
  color: var(--ink);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.qm-quote mark {
  background: rgba(244,200,112,0.25);
  color: var(--gold);
  padding: 0 0.12em; border-radius: 3px;
}
.qm-movie {
  font-size: 0.78rem; color: var(--ink-mute);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.qm-movie strong { color: var(--gold); font-weight: 600; }
.qm-foot {
  display: flex; gap: 0.4rem; align-items: center; flex-wrap: wrap;
  margin-top: auto;
  font-size: 0.72rem; color: var(--ink-dim);
}
.qm-votes { color: var(--ink-mute); font-weight: 600; }

/* ============ Generic poster rail (Recent Searches, New in Theaters) ============ */
.movie-row { margin: 0 0 2.5rem; position: relative; }
.movie-row::after {
  content: ""; position: absolute; right: 0; top: 3.5rem; bottom: 1rem;
  width: 48px;
  background: linear-gradient(270deg, var(--bg) 0%, transparent 100%);
  pointer-events: none;
}
.poster-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 150px;
  gap: 0.85rem;
  overflow-x: auto;
  padding: 0.25rem 0.25rem 1rem;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}
.poster-rail::-webkit-scrollbar { height: 8px; }
.poster-rail::-webkit-scrollbar-thumb { background: var(--line); border-radius: 4px; }
.rail-card {
  scroll-snap-align: start;
  text-decoration: none; color: inherit;
  display: flex; flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  transition: all 0.2s ease;
}
.rail-card:hover {
  transform: translateY(-3px);
  border-color: var(--gold);
  box-shadow: var(--shadow-1);
}
.rail-poster {
  aspect-ratio: 2/3;
  background: var(--bg-card-2) center/cover no-repeat;
}
.rail-poster.no-img {
  display: grid; place-items: center;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 0.9rem;
  color: var(--ink-dim);
  text-align: center; padding: 0.5rem;
}
.rail-meta {
  padding: 0.55rem 0.6rem 0.65rem;
  display: flex; flex-direction: column; gap: 0.2rem;
}
.rail-title {
  font-size: 0.8rem; font-weight: 700; line-height: 1.2;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.rail-year { font-size: 0.7rem; color: var(--ink-mute); }
.rail-scores { display: flex; gap: 0.25rem; flex-wrap: wrap; margin-top: 0.2rem; }
.rail-scores .score { font-size: 0.62rem; padding: 0.08rem 0.32rem; }

@media (max-width: 480px) {
  .poster-rail { grid-auto-columns: 130px; }
}

/* ============ Grid of results ============ */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1.4rem;
  padding: 1rem 0;
}
@media (max-width: 600px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.85rem;
  }
  .poster-meta { padding: 0.65rem; gap: 0.3rem; }
  .poster-title { font-size: 0.85rem; }
  .poster-year { font-size: 0.72rem; }
  .score-row { gap: 0.3rem; }
  .score { font-size: 0.66rem; padding: 0.12rem 0.4rem; }
}
.empty { text-align: center; color: var(--ink-dim); padding: 2.5rem 0; }

.poster-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
  display: flex; flex-direction: column;
}
.poster-card:hover {
  transform: translateY(-4px);
  border-color: var(--gold);
  box-shadow: var(--shadow-2);
}
.poster {
  aspect-ratio: 2/3;
  background: var(--bg-card-2) center/cover no-repeat;
  position: relative;
}
.poster.no-img {
  background: linear-gradient(135deg, #1a1a28, #2a1a2a);
  display: grid; place-items: center;
  color: var(--ink-dim);
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.5rem;
  text-align: center; padding: 1rem;
}
.poster-meta { padding: 0.85rem; flex: 1; display: flex; flex-direction: column; gap: 0.4rem; }
.poster-title { font-weight: 700; font-size: 0.95rem; line-height: 1.25; }
.poster-year { color: var(--ink-mute); font-size: 0.8rem; }
.score-row { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-top: 0.25rem; }
.score {
  font-size: 0.72rem; font-weight: 600;
  padding: 0.18rem 0.5rem;
  border-radius: 6px;
  background: var(--bg-card-2);
  color: var(--ink-mute);
  border: 1px solid var(--line);
}
.score.imdb { color: var(--gold); border-color: rgba(244,200,112,0.3); }
.score.rt   { color: var(--red); border-color: rgba(229,9,20,0.3); }
.score.empty-score { opacity: 0.5; }

/* ============ Movie detail ============ */
.back {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink-mute);
  padding: 0.5rem 1rem;
  border-radius: 999px;
  font: 500 0.85rem 'Inter', sans-serif;
  cursor: pointer;
  margin-bottom: 1.5rem;
  transition: all 0.2s ease;
}
.back:hover { color: var(--ink); border-color: var(--gold); }

.movie-hero {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  min-height: 360px;
  margin-bottom: 2rem;
  background: var(--bg-card-2);
}
.movie-hero::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(8,8,13,0.2) 0%, rgba(8,8,13,0.95) 90%);
}
.movie-hero-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  filter: blur(0px) brightness(0.7);
}
.movie-hero-inner {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: 220px 1fr; gap: 2rem;
  padding: 2rem; align-items: end; min-height: 360px;
}
@media (max-width: 720px) {
  .movie-hero-inner { grid-template-columns: 1fr; }
}
.movie-poster-lg {
  width: 220px; aspect-ratio: 2/3;
  background-size: cover; background-position: center;
  border-radius: 12px;
  box-shadow: var(--shadow-2);
  border: 1px solid var(--line);
}
.movie-info h1 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(2rem, 5vw, 3.2rem);
  letter-spacing: 0.02em;
  line-height: 1; margin-bottom: 0.5rem;
}
.tagline {
  color: var(--gold); font-style: italic; font-size: 1.05rem;
  margin-bottom: 1rem;
}
.meta-row { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; margin-bottom: 1rem; }
.chip {
  font-size: 0.78rem; padding: 0.3rem 0.7rem;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12);
  border-radius: 999px; color: var(--ink-mute);
}
.score-pill {
  font-size: 0.85rem; font-weight: 700;
  padding: 0.35rem 0.75rem; border-radius: 8px;
  background: var(--bg-card-2); border: 1px solid var(--line);
}
.score-pill.imdb { color: var(--gold); border-color: rgba(244,200,112,0.4); }
.score-pill.rt   { color: var(--red); border-color: rgba(229,9,20,0.4); }
.synopsis { color: var(--ink-mute); line-height: 1.65; max-width: 720px; }

/* image strip */
.image-strip-wrap { position: relative; margin-bottom: 2.5rem; }
.image-strip-wrap::after {
  content: ""; position: absolute; right: 0; top: 0; bottom: 0.5rem;
  width: 60px;
  background: linear-gradient(270deg, var(--bg) 0%, transparent 100%);
  pointer-events: none;
}
.image-strip {
  display: flex; gap: 0.75rem; overflow-x: auto; padding-bottom: 0.5rem;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin; scrollbar-color: var(--line) transparent;
}
.image-strip img {
  height: 160px; border-radius: 10px;
  scroll-snap-align: start;
  border: 1px solid var(--line);
  object-fit: cover;
}

/* ============ Quotes ============ */
.section-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.6rem; letter-spacing: 0.05em;
  margin-bottom: 1.25rem;
  display: flex; align-items: center; gap: 0.5rem;
}
.section-title::before {
  content: ""; display: inline-block;
  width: 3px; height: 1.4rem;
  background: linear-gradient(180deg, var(--gold), var(--red));
  border-radius: 2px;
}

.quote-form {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}
.quote-form textarea {
  width: 100%;
  min-height: 96px; resize: vertical;
  background: var(--bg-elev); color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 0.9rem 1rem; font: 500 1rem 'Inter', sans-serif;
  line-height: 1.5;
  outline: none; transition: border 0.2s, box-shadow 0.2s;
}
.quote-form textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(244,200,112,0.12);
}
.quote-form .row {
  display: flex; gap: 0.75rem; margin-top: 0.85rem;
  align-items: stretch; flex-wrap: wrap;
}
.quote-form input[type=text] {
  flex: 1 1 200px; min-width: 0;
  height: var(--control-h);
  background: var(--bg-elev); color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 0 1rem; font: 500 0.92rem 'Inter', sans-serif;
  outline: none; transition: border 0.2s, box-shadow 0.2s;
}
.quote-form input[type=text]:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(244,200,112,0.12);
}
.quote-form .row .btn { margin-left: auto; }

.btn {
  border: 0; cursor: pointer;
  height: var(--control-h);
  padding: 0 1.5rem; border-radius: var(--radius);
  font: 700 0.9rem 'Inter', sans-serif; letter-spacing: 0.02em;
  transition: transform 0.15s ease, box-shadow 0.2s ease, opacity 0.2s;
  display: inline-flex; align-items: center; justify-content: center;
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, var(--red), var(--red-2));
  color: #fff;
  box-shadow: 0 6px 20px rgba(229,9,20,0.35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(229,9,20,0.45); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.form-msg {
  margin-top: 0.7rem; font-size: 0.85rem; min-height: 1.2em;
  display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap;
}
.form-msg.error { color: var(--red); }
.form-msg.success { color: var(--green); }
.form-msg.info { color: var(--ink-mute); }
.form-msg .hint { color: var(--ink-dim); font-size: 0.78rem; }
.form-msg.verifying {
  background: linear-gradient(90deg, rgba(244,200,112,0.06), rgba(229,9,20,0.06));
  border: 1px solid rgba(244,200,112,0.2);
  border-radius: 8px;
  padding: 0.55rem 0.8rem;
  color: var(--gold);
}
/* (replaced by .clapper for consistent visual language) */
.form-msg .clapper { width: 22px; height: 20px; }

.quotes-list { display: flex; flex-direction: column; gap: 1rem; }
.quote-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.4rem;
  transition: border 0.2s, transform 0.2s;
}
.quote-card:hover { border-color: rgba(244,200,112,0.35); }
.quote-card.flash { border-color: var(--gold); transform: scale(1.005); }
.quote-text {
  font-size: 1.15rem; line-height: 1.5;
  font-weight: 500; font-style: italic;
  margin-bottom: 0.85rem;
  position: relative; padding-left: 1.25rem;
}
.quote-text::before {
  content: "❝"; position: absolute; left: -0.1rem; top: -0.4rem;
  color: var(--gold); font-size: 1.6rem; line-height: 1;
}
.quote-meta {
  display: flex; align-items: center; gap: 0.85rem; flex-wrap: wrap;
  font-size: 0.82rem; color: var(--ink-dim);
}
.quote-actions { display: flex; gap: 0.4rem; margin-left: auto; }
.icon-btn {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  color: var(--ink-mute);
  height: 32px;
  padding: 0 0.7rem;
  border-radius: 8px;
  font: 600 0.82rem 'Inter', sans-serif;
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 0.35rem;
  transition: all 0.15s ease;
}
.icon-btn:hover { color: var(--ink); border-color: var(--ink-mute); }
.icon-btn.up.active   { background: rgba(76,195,138,0.15); border-color: var(--green); color: var(--green); }
.icon-btn.down.active { background: rgba(229,9,20,0.15);  border-color: var(--red);   color: var(--red); }

.pending-pill {
  font-size: 0.7rem; padding: 0.18rem 0.5rem;
  border-radius: 999px; background: rgba(244,200,112,0.12);
  color: var(--gold); border: 1px solid rgba(244,200,112,0.3);
}

/* ============ Landed banner (after submit) ============ */
.landed-banner {
  display: flex; align-items: center; gap: 0.85rem;
  padding: 0.9rem 1rem;
  margin-bottom: 1rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg-card);
  position: relative;
  animation: banner-in 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.landed-banner.fading { opacity: 0; transform: translateY(-6px); }
@keyframes banner-in {
  from { opacity: 0; transform: translateY(-12px); }
  to   { opacity: 1; transform: none; }
}
.landed-banner.real {
  background: linear-gradient(135deg, rgba(76,195,138,0.12), rgba(76,195,138,0.04));
  border-color: rgba(76,195,138,0.5);
}
.landed-banner.unsure {
  background: linear-gradient(135deg, rgba(244,200,112,0.12), rgba(244,200,112,0.04));
  border-color: rgba(244,200,112,0.5);
}
.landed-banner.bs {
  background: linear-gradient(135deg, rgba(229,9,20,0.10), rgba(229,9,20,0.03));
  border-color: rgba(229,9,20,0.45);
}
.landed-banner.viral {
  background: linear-gradient(135deg, rgba(229,9,20,0.15), rgba(244,200,112,0.10));
  border-color: rgba(255,107,107,0.6);
  box-shadow: 0 0 24px rgba(229,9,20,0.18);
}
.landed-icon {
  font-size: 1.6rem; line-height: 1;
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: 10px;
  background: rgba(255,255,255,0.06);
  flex-shrink: 0;
}
.landed-banner.real   .landed-icon { color: var(--green); }
.landed-banner.unsure .landed-icon { color: var(--gold); }
.landed-banner.bs     .landed-icon { color: var(--red); }
.landed-body { flex: 1; min-width: 0; }
.landed-title {
  font: 700 0.98rem 'Inter', sans-serif;
  letter-spacing: 0.01em;
  margin-bottom: 0.15rem;
}
.landed-title strong {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.15rem;
  letter-spacing: 0.04em;
}
.landed-banner.real   .landed-title strong { color: var(--green); }
.landed-banner.unsure .landed-title strong { color: var(--gold); }
.landed-banner.bs     .landed-title strong { color: var(--red); }
.landed-banner.viral  .landed-title strong { color: #ff8a93; }
.landed-sub { color: var(--ink-mute); font-size: 0.82rem; }
.landed-close {
  background: transparent; border: 0;
  color: var(--ink-dim); cursor: pointer;
  font-size: 1.4rem; line-height: 1;
  padding: 0.25rem 0.5rem;
  transition: color 0.15s;
}
.landed-close:hover { color: var(--ink); }

/* ============ Sub-tabs (Real / Unsure / BS / Viral BS) ============ */
.subtabs {
  display: flex; gap: 0.3rem;
  margin-bottom: 1.25rem;
  padding: 0.3rem;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 12px;
  width: fit-content;
  max-width: 100%;
}
.subtab {
  border: 0; cursor: pointer;
  background: transparent;
  color: var(--ink-mute);
  padding: 0.55rem 0.95rem;
  border-radius: 9px;
  font: 600 0.85rem 'Inter', sans-serif;
  letter-spacing: 0.01em;
  display: inline-flex; align-items: center; justify-content: center;
  gap: 0.4rem;
  white-space: nowrap;
  transition: all 0.18s ease;
}
.subtab-label { display: inline-flex; align-items: center; }

@media (max-width: 640px) {
  .subtabs {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.2rem;
    padding: 0.25rem;
  }
  .subtab {
    padding: 0.55rem 0.4rem;
    font-size: 0.78rem;
    gap: 0.3rem;
    min-width: 0;
  }
  .long-only { display: none; }
  .subtab-count {
    font-size: 0.66rem;
    padding: 0.06rem 0.38rem;
  }
}
.subtab:hover { color: var(--ink); }
.subtab.active {
  color: var(--ink);
  background: var(--bg-card-2);
  box-shadow: inset 0 0 0 1px var(--line);
}
.subtab[data-bucket="real"].active   { color: var(--green); box-shadow: inset 0 0 0 1px rgba(76,195,138,0.4); }
.subtab[data-bucket="unsure"].active { color: var(--gold);  box-shadow: inset 0 0 0 1px rgba(244,200,112,0.45); }
.subtab[data-bucket="bs"].active     { color: var(--red);   box-shadow: inset 0 0 0 1px rgba(229,9,20,0.5); }
.subtab[data-bucket="viral"].active  { color: #ff6b6b;      box-shadow: inset 0 0 0 1px rgba(255,107,107,0.5); background: linear-gradient(135deg, rgba(229,9,20,0.08), rgba(244,200,112,0.05)); }
.subtab-count {
  font-size: 0.72rem; font-weight: 700;
  background: rgba(255,255,255,0.08);
  color: inherit;
  padding: 0.08rem 0.45rem;
  border-radius: 999px;
  min-width: 1.4rem;
  text-align: center;
}

.quotes-bucket { display: none; flex-direction: column; gap: 1rem; animation: fade 0.3s ease; }
.quotes-bucket.active { display: flex; }

/* ============ Quote badges ============ */
.badge {
  font-size: 0.7rem; font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  letter-spacing: 0.02em;
  white-space: nowrap;
  display: inline-flex; align-items: center; gap: 0.3rem;
}
.badge.crowd {
  background: linear-gradient(135deg, rgba(76,195,138,0.18), rgba(244,200,112,0.12));
  color: #aef0c8;
  border: 1px solid rgba(76,195,138,0.45);
  box-shadow: 0 0 12px rgba(76,195,138,0.2);
}
.badge.pending {
  background: rgba(244,200,112,0.12);
  color: var(--gold);
  border: 1px solid rgba(244,200,112,0.35);
}
.badge.bs {
  background: rgba(229,9,20,0.10);
  color: #ff8a93;
  border: 1px solid rgba(229,9,20,0.4);
}
.badge.viral {
  background: linear-gradient(135deg, rgba(229,9,20,0.18), rgba(244,200,112,0.18));
  color: #ffd2b3;
  border: 1px solid rgba(255,107,107,0.5);
  box-shadow: 0 0 14px rgba(229,9,20,0.25);
}

/* Quote-card variants: subtle styling per bucket */
.quote-card.unsure { border-color: rgba(244,200,112,0.25); }
.quote-card.bs     { border-color: rgba(229,9,20,0.22); opacity: 0.92; }
.quote-card.bs:hover { opacity: 1; }
.quote-card.viral  {
  border-color: rgba(255,107,107,0.45);
  background: linear-gradient(180deg, var(--bg-card), rgba(229,9,20,0.04));
}

.comments {
  margin-top: 1rem; padding-top: 1rem;
  border-top: 1px dashed var(--line);
  display: none;
}
.comments.open { display: block; }
.comment {
  padding: 0.75rem 0; border-bottom: 1px dashed var(--line);
  font-size: 0.92rem;
}
.comment:last-of-type { border-bottom: 0; }
.comment .author { color: var(--gold); font-weight: 600; margin-right: 0.5rem; }
.comment .ts { color: var(--ink-dim); font-size: 0.75rem; }
.comment-form { display: flex; gap: 0.5rem; margin-top: 0.85rem; flex-wrap: wrap; align-items: stretch; }
.comment-form input, .comment-form textarea {
  background: var(--bg-elev); color: var(--ink);
  border: 1px solid var(--line); border-radius: 8px;
  padding: 0.5rem 0.75rem;
  font: 500 0.88rem 'Inter', sans-serif;
  outline: none; transition: border 0.2s, box-shadow 0.2s;
}
.comment-form input:focus, .comment-form textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(244,200,112,0.10);
}
.comment-form input { width: 160px; height: 38px; }
.comment-form textarea {
  flex: 1; min-width: 220px;
  min-height: 38px; max-height: 200px; resize: vertical;
  line-height: 1.4;
}
.comment-form .btn {
  height: 38px; padding: 0 1.1rem; font-size: 0.82rem;
  margin-left: auto;
}

/* ============ AI / coming-soon ============ */
.coming-soon-card {
  text-align: center; padding: 4rem 2rem;
  background: var(--bg-card); border: 1px solid var(--line);
  border-radius: 20px; max-width: 640px; margin: 2rem auto;
}
.coming-soon-card h2 {
  font-family: 'Bebas Neue', sans-serif; font-size: 2.5rem;
  letter-spacing: 0.05em; margin-bottom: 0.75rem;
}
.coming-soon-card p { color: var(--ink-mute); line-height: 1.6; }

/* ============ Footer ============ */
.footer {
  text-align: center; padding: 2rem 1rem; color: var(--ink-dim);
  font-size: 0.82rem; border-top: 1px solid var(--line);
}
.footer a { color: var(--ink-mute); text-decoration: underline; }

/* Toast */
.toast {
  position: fixed; bottom: 1.25rem; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--bg-card); border: 1px solid var(--line);
  padding: 0.85rem 1.25rem; border-radius: 12px;
  box-shadow: var(--shadow-2);
  font-size: 0.9rem; opacity: 0; pointer-events: none;
  transition: all 0.3s ease;
  z-index: 100; max-width: 90%;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.error { border-color: var(--red); color: #ffd0d0; }
.toast.success { border-color: var(--green); color: #d0ffd0; }
