/* Marooned Movies: the look of the site. Colours are set once here. */
:root {
  /* Dark theme for everyone (Mark's choice, 17 Nov 2026). */
  --bg: #15130f;
  --surface: #1f1c17;
  --ink: #f1ebe0;
  --muted: #a99f90;
  --line: #34302a;
  --accent: #fb923c;
  --accent-soft: #3b2415;
  --island: #5ec8dc;
  --island-soft: #12313a;
  --dot-off: #3d3830;
  --shadow: none;
  --radius: 12px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: Georgia, "Times New Roman", serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.5 var(--font);
}
a { color: inherit; }
main { max-width: 1080px; margin: 0 auto; padding: 0 16px 48px; }

/* Header */
.top {
  display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: center; justify-content: space-between;
  max-width: 1080px; margin: 0 auto; padding: 16px;
}
.brand { font: 700 1.15rem/1 var(--display); text-decoration: none; letter-spacing: .01em; }
.brand-mark { color: var(--accent); }
.top nav { display: flex; gap: 4px; flex-wrap: wrap; }
.top nav a {
  text-decoration: none; padding: 6px 12px; border-radius: 999px; color: var(--muted); font-size: .95rem;
}
.top nav a:hover { color: var(--ink); background: var(--surface); }
.top nav a[aria-current="page"] { color: var(--ink); background: var(--surface); box-shadow: var(--shadow); }

/* Page headings */
.hero { padding: 32px 0 20px; }
.hero.small { padding-top: 20px; }
.hero h1 { font: 700 clamp(2.2rem, 6vw, 3.6rem)/1.05 var(--display); margin: 4px 0 12px; }
.eyebrow { margin: 0; color: var(--accent); font-weight: 600; font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; }
.eyebrow a { text-decoration: none; }
.eyebrow a::before { content: "← "; }
.lede { font-size: 1.1rem; max-width: 60ch; margin: 0 0 8px; }
.why { max-width: 60ch; margin: 0 0 8px; color: var(--muted); font-style: italic; }
.sub { color: var(--muted); margin: 0 0 16px; }
.section-title { font: 700 1.8rem/1.2 var(--display); margin: 40px 0 8px; }
.lists-intro p { color: var(--muted); max-width: 70ch; }

/* Film cards */
.films { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.film {
  position: relative; display: grid; grid-template-columns: 72px 1fr; gap: 14px; align-items: start;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px; box-shadow: var(--shadow);
}
.film h3 { margin: 0; font-size: 1.08rem; line-height: 1.3; }
.year { color: var(--muted); font-weight: 400; }
.by { margin: 2px 0 0; color: var(--muted); font-size: .9rem; }
.note { margin: 6px 0 0; color: var(--muted); font-size: .92rem; }
.poster { width: 72px; aspect-ratio: 2 / 3; height: auto; border-radius: 6px; object-fit: cover; display: block; background: var(--line); }
.poster.ph {
  display: grid; place-items: center;
  background: linear-gradient(160deg, var(--accent-soft), var(--line));
  color: var(--muted); font: 700 1.2rem var(--display);
}
.rank {
  position: absolute; left: -10px; top: -10px; z-index: 1;
  min-width: 30px; height: 30px; padding: 0 6px; border-radius: 999px;
  display: grid; place-items: center;
  background: var(--island); color: var(--surface); font-weight: 700; font-size: .95rem;
}

/* Rating */
.rating { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.dots { display: inline-flex; gap: 3px; }
.dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--dot-off); }
.dots i.on { background: var(--accent); }
.rating b { font-size: .95rem; }

/* Badges and chips */
.badge {
  display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: .78rem; font-weight: 600;
  border: 1px solid var(--line); color: var(--muted); background: var(--bg); white-space: nowrap;
}
.badge.prov { border-style: dashed; }
.badge.st-tbc, .badge.st-to_rewatch { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.badge.st-to_watch, .badge.st-to_find { color: var(--island); border-color: var(--island); background: var(--island-soft); }
.role { display: inline-block; margin-top: 6px; font-size: .85rem; font-style: italic; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chip {
  font-size: .8rem; text-decoration: none; padding: 2px 10px; border-radius: 999px;
  background: var(--bg); border: 1px solid var(--line); color: var(--muted);
}
.chip:hover { color: var(--ink); border-color: var(--muted); }
.chip.island { color: var(--island); border-color: var(--island); }
.chip.classic { color: var(--accent); border-color: var(--accent); }
.chip.current { color: var(--ink); border-color: var(--ink); font-weight: 600; }
.chip.island.current { color: var(--island); border-color: var(--island); background: var(--island-soft); }
.chip.classic.current { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }

/* Desert Island on the home page */
.island-list { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 18px; padding-left: 10px; }
.island-list .film { grid-template-columns: 96px 1fr; border-color: var(--island); }
.island-list .poster { width: 96px; }
.island-list .film:first-child { grid-column: 1 / -1; grid-template-columns: 130px 1fr; padding: 18px; background: var(--island-soft); }
.island-list .film:first-child .poster { width: 130px; }
.island-list .film:first-child h3 { font: 700 1.6rem/1.2 var(--display); }
.film.empty { border-style: dashed; background: transparent; box-shadow: none; opacity: .75; }
.film.empty .rank { background: var(--line); color: var(--muted); }

/* List tiles on the home page */
.group h2 { font-size: 1rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 28px 0 10px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 12px; }
.tile {
  display: block; text-decoration: none; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); transition: border-color .15s;
}
.tile:hover { border-color: var(--accent); }
.tile h3 { margin: 0; font: 700 1.2rem/1.25 var(--display); }
.tile .count { margin: 2px 0 6px; color: var(--accent); font-size: .85rem; font-weight: 600; }
.tile .top { margin: 0; color: var(--muted); font-size: .88rem; }

/* People */
.person { margin: 20px 0 28px; }
.person h3 { font: 700 1.3rem var(--display); margin: 0 0 10px; }
.films.compact { grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }

/* Master list filters */
.filters {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; align-items: end;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin-bottom: 14px;
  position: sticky; top: 0; z-index: 2; box-shadow: var(--shadow);
}
.filters label { display: grid; gap: 4px; font-size: .8rem; font-weight: 600; color: var(--muted); }
.filters input, .filters select, .filters button {
  font: inherit; font-size: .95rem; color: var(--ink); background: var(--bg);
  border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; width: 100%; min-height: 40px;
}
.filters button { cursor: pointer; font-weight: 600; }
.filters button:hover { border-color: var(--accent); }
.empty-msg { color: var(--muted); text-align: center; padding: 32px 0; }
.more { margin-top: 20px; }

/* Footer */
.foot { max-width: 1080px; margin: 0 auto; padding: 24px 16px 40px; border-top: 1px solid var(--line); color: var(--muted); font-size: .88rem; }
.foot p { margin: 4px 0; }
.tmdb-logo { display: inline-block; padding: 0 6px; border-radius: 4px; background: #0d253f; color: #01b4e4; font-weight: 700; font-size: .75rem; }

@media (min-width: 720px) {
  .films:not(.island-list):not(.compact) { grid-template-columns: repeat(2, 1fr); }
}
.film[hidden] { display: none; }

/* TMDB descriptions: three lines, then "More" opens the rest */
.overview {
  margin: 8px 0 0; font-size: .92rem;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden;
}
.overview.open { display: block; -webkit-line-clamp: unset; line-clamp: unset; }
.more-btn {
  font: inherit; font-size: .82rem; font-weight: 600; color: var(--accent);
  background: none; border: 0; padding: 2px 0; cursor: pointer;
}
.note-label { font-weight: 600; color: var(--ink); }
.film { grid-template-columns: 88px 1fr; }
.poster { width: 88px; }

/* Recommendation Wall */
.btn {
  font: inherit; font-size: .95rem; font-weight: 600; color: var(--bg); background: var(--accent);
  border: 0; border-radius: 8px; padding: 8px 16px; min-height: 40px; cursor: pointer; white-space: nowrap;
}
.btn:hover { filter: brightness(1.08); }
.btn:disabled { background: var(--line); color: var(--muted); cursor: default; filter: none; }
.link-btn { font: inherit; font-size: .82rem; color: var(--muted); background: none; border: 0; padding: 0; margin-top: 8px; cursor: pointer; text-decoration: underline; display: block; }
.link-btn:hover { color: var(--ink); }
.wall-tools { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.wall-tools .sub { margin: 0; }
.wall-add { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin-bottom: 20px; }
.wall-form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; }
.wall-form + .wall-form { margin-top: 10px; }
.wall-add[hidden], .wall-form[hidden] { display: none; }
.wall-form label { font-size: .8rem; font-weight: 600; color: var(--muted); }
.wall-form .row { display: flex; gap: 8px; }
.wall-form input {
  flex: 1; min-width: 0; font: inherit; color: var(--ink); background: var(--bg);
  border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; min-height: 40px;
}
.wall-form input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.wall-msg { margin: 10px 0 0; color: var(--muted); font-size: .92rem; }
.wall-msg:empty { display: none; }
.wall-msg.bad { color: var(--accent); }
.wall-results { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.wall-result { display: grid; grid-template-columns: 46px 1fr auto; gap: 12px; align-items: center; padding: 8px; border-radius: 8px; background: var(--bg); }
.wall-result .thumb { width: 46px; aspect-ratio: 2 / 3; border-radius: 4px; object-fit: cover; display: grid; place-items: center; background: var(--line); color: var(--muted); }
.wall-result h3 { margin: 0; font-size: 1rem; }
.wall-result .overview { -webkit-line-clamp: 2; line-clamp: 2; margin-top: 2px; color: var(--muted); font-size: .85rem; }
.wall { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 160px), 1fr)); }
.wall-film { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.wall-film.is-seen { opacity: .7; }
.wall-poster { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; display: grid; place-items: center; background: linear-gradient(160deg, var(--accent-soft), var(--line)); color: var(--muted); font: 700 2rem var(--display); }
.wall-info { padding: 10px 12px 12px; }
.wall-film h3 { margin: 0 0 4px; font-size: 1rem; line-height: 1.3; }
.wall-film .by { margin: 0 0 8px; font-size: .82rem; }
.badge.seen { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); text-decoration: none; }
@media (max-width: 480px) {
  .wall-result { grid-template-columns: 40px 1fr; }
  .wall-result .btn { grid-column: 1 / -1; }
}
