:root {
  --bg: #10110e;
  --bg-2: #171910;
  --ink: #f4f1e8;
  --muted: #aaa496;
  --faint: #6f6a60;
  --line: rgba(244, 241, 232, 0.1);
  --lime: #d6f25c;
  --lime-ink: #172000;
  --coral: #ff6a45;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
  --serif: "Fraunces", "Iowan Old Style", Palatino, serif;
  --sans: "Outfit", "Avenir Next", "Segoe UI", sans-serif;
  --list: 380px;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(900px 420px at 80% -10%, rgba(214, 242, 92, 0.08), transparent 60%),
    var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 380;
  letter-spacing: 0.01em;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.top {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 14px 28px 0;
}
.top-copy {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex: 0 0 auto;
}
.eyebrow {
  margin: 0;
  color: var(--lime);
  font-size: 10px;
  font-weight: 640;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
h1 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 560;
  font-size: clamp(26px, 2.6vw, 34px);
  letter-spacing: -0.03em;
  line-height: 1;
}
.lede {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
  white-space: nowrap;
}
/* The one-line hint is the first thing to go when the header gets tight. */
@media (max-width: 1240px) {
  .lede { display: none; }
}
.search { flex: 0 0 min(340px, 32vw); }
.search input {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 999px;
  padding: 12px 16px;
  outline: none;
}
.search input:focus { border-color: rgba(214, 242, 92, 0.7); }

.filters {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 12px 28px 6px;
  scrollbar-width: none;
}
.filters::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 13px;
}
.chip[aria-pressed="true"] {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}

.vote-bar {
  display: flex;
  gap: 12px;
  align-items: center;
  margin: 0 18px 14px;
  padding: 6px 6px 6px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #171910;
}
.vote-bar input {
  width: min(240px, 34vw);
  border: 0;
  background: transparent;
  outline: none;
  padding: 8px 0;
}
.vote-bar input:focus { color: var(--ink); }
.ballot-status {
  flex: 1;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  text-align: right;
}
.ballot-status a { color: var(--lime); }
.vote-bar .btn { padding: 10px 16px; }
.vote-box { margin-top: 16px; }
.vote-box h3 {
  margin: 0 0 8px;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
}
.points { display: flex; gap: 8px; }
.point {
  min-width: 58px;
  height: 46px;
  padding: 0 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: transparent;
  font-weight: 640;
  font-size: 15px;
}
.point[aria-pressed="true"] {
  background: var(--lime);
  color: var(--lime-ink);
  border-color: var(--lime);
}
.point:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }
.vote-hint { margin: 8px 0 0; color: var(--faint); font-size: 13px; }
.vote-note {
  width: 100%;
  margin-top: 10px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  padding: 10px 12px;
  resize: vertical;
  outline: none;
}
.vote-note:focus { border-color: rgba(214, 242, 92, 0.7); }

.shell {
  display: grid;
  grid-template-columns: var(--list) 1fr;
  gap: 18px;
  flex: 1;
  min-height: 0;
  padding: 8px 18px 18px;
}
.list-wrap, .stage {
  min-height: 0;
  border: 1px solid var(--line);
  background: rgba(23, 25, 16, 0.86);
  border-radius: 22px;
}
.list-wrap { display: flex; flex-direction: column; }
.count {
  margin: 0;
  padding: 14px 16px 8px;
  color: var(--faint);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.list { overflow: auto; padding: 0 8px 10px; }
.group-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin: 18px 10px 8px;
}
.group-head:first-child { margin-top: 6px; }
.group-label {
  margin: 0;
  color: var(--lime);
  font-size: 11px;
  font-weight: 640;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.group-state {
  color: var(--faint);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.group-state.done { color: var(--muted); }
.group-set {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.group-set:hover { border-color: rgba(214, 242, 92, 0.6); color: var(--ink); }

.app-card {
  display: grid;
  grid-template-columns: 26px 16px 46px 1fr;
  gap: 10px;
  align-items: center;
  width: 100%;
  margin-bottom: 8px;
  padding: 9px 14px 9px 6px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
  touch-action: pan-y;
  user-select: none;
}
.app-card:hover { border-color: rgba(244, 241, 232, 0.24); }
.app-card[aria-selected="true"] {
  border-color: var(--lime);
  background: rgba(214, 242, 92, 0.1);
}
.app-card:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }
.app-card.dragging {
  position: relative;
  z-index: 3;
  border-color: var(--lime);
  background: #22250f;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.55);
  cursor: grabbing;
}
.grip {
  justify-self: stretch;
  align-self: stretch;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: var(--faint);
  font-size: 15px;
  line-height: 1;
  touch-action: none;
  cursor: grab;
}
.app-card:hover .grip { color: var(--ink); background: rgba(255, 255, 255, 0.07); }
.app-card.dragging .grip { color: var(--lime); background: transparent; cursor: grabbing; }
.place {
  justify-self: center;
  color: var(--faint);
  font-size: 13px;
  font-weight: 640;
}
.app-card.ranked .place { color: var(--lime); }
.row-copy { min-width: 0; }
.mark {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 16px;
  color: #1a1914;
}
.mark.icon {
  overflow: hidden;
  background: #1c1e15;
  box-shadow: inset 0 0 0 1px rgba(244, 241, 232, 0.08);
}
.mark.icon.light { background: #f4f1e8; }
.mark.icon img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.mark.big {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  font-size: 24px;
  flex: 0 0 auto;
}
.row-name {
  display: block;
  font-weight: 640;
  letter-spacing: -0.02em;
}
.row-pitch {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.stage { overflow: auto; }
.stage-inner { padding: 18px; }
.media {
  position: relative;
  background: #070806;
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  box-shadow: var(--shadow);
}
.media.plain { aspect-ratio: auto; box-shadow: none; }
.media-fallback { min-height: 148px; }
.media iframe, .media video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: #000;
}
.media video { object-fit: contain; }
.media-fallback {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 22px;
  background:
    linear-gradient(160deg, rgba(214, 242, 92, 0.16), transparent 42%),
    #14160f;
}
.media-fallback strong {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 560;
}
.media-fallback span { color: var(--muted); margin-top: 6px; }

.stage-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}
.stage-title {
  display: flex;
  gap: 16px;
  align-items: center;
  min-width: 0;
}
.media { margin-top: 18px; }
.stage h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(36px, 4vw, 56px);
  font-weight: 560;
  letter-spacing: -0.035em;
  line-height: 0.92;
}
.byline { margin: 8px 0 0; color: var(--muted); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border-radius: 999px;
  padding: 12px 16px;
  border: 1px solid transparent;
  font-weight: 640;
  white-space: nowrap;
}
.btn.primary { background: var(--lime); color: var(--lime-ink); }
.btn:disabled { opacity: 0.35; cursor: default; }
.btn.primary:hover { filter: brightness(1.05); }
.btn.ghost { border-color: var(--line); background: transparent; color: var(--ink); }
.btn:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; }

.password {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 106, 69, 0.12);
  border: 1px solid rgba(255, 106, 69, 0.35);
}
.password b { color: var(--coral); letter-spacing: 0.04em; }

.pitch {
  font-family: var(--serif);
  font-weight: 560;
  font-size: 22px;
  line-height: 1.35;
  letter-spacing: -0.02em;
  margin: 18px 0 0;
}
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.tag {
  font-size: 12px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 8px;
}
.section { margin-top: 26px; }
.section h3 {
  margin: 0 0 10px;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
}
.features { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.features li {
  padding-left: 14px;
  position: relative;
  line-height: 1.45;
  color: #e7e2d6;
}
.features li::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 99px;
  background: var(--lime);
  position: absolute;
  left: 0;
  top: 0.55em;
}
.notes, .arch {
  margin: 0;
  white-space: pre-wrap;
  line-height: 1.5;
  color: #e7e2d6;
}
details.fold {
  margin-top: 18px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}
details.fold summary {
  cursor: pointer;
  color: var(--muted);
  font-weight: 640;
}
.back {
  display: none;
  margin-bottom: 12px;
  border: 0;
  background: transparent;
  color: var(--lime);
  padding: 0;
  font-weight: 640;
}
.pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.pager-btn {
  min-width: 0;
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 14px;
  padding: 12px 14px;
  text-align: left;
}
.pager-btn.next { text-align: right; }
.pager-btn:hover { border-color: rgba(214, 242, 92, 0.6); }
.pager-btn:disabled { opacity: 0.35; cursor: default; }
.pager-kicker {
  display: block;
  color: var(--faint);
  font-size: 11px;
  font-weight: 640;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.pager-btn b {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 640;
}
.empty {
  padding: 28px 16px;
  color: var(--muted);
}
.top a { color: var(--lime); }
.mark.num {
  background: transparent;
  color: var(--lime);
  border: 1px solid var(--line);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 640;
  letter-spacing: 0.04em;
}
.organizer {
  margin-top: 16px;
  padding: 14px 16px 6px;
  border-radius: 16px;
  background: rgba(214, 242, 92, 0.08);
  border: 1px solid rgba(214, 242, 92, 0.28);
}
.organizer h3 { color: var(--lime); }
.note-who {
  margin: 12px 0 4px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 640;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

@media (max-width: 900px) {
  body { height: auto; overflow: auto; display: block; }
  .top { flex-wrap: wrap; gap: 10px; padding: 14px 16px 0; }
  .top-copy { width: 100%; }
  .lede { display: none; }
  .search { flex: 1 1 100%; }
  .filters { padding: 10px 16px; }
  .vote-bar {
    position: sticky;
    bottom: 8px;
    margin: 8px 12px 12px;
    border-radius: 18px;
    z-index: 4;
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.6);
  }
  .vote-bar input { width: 120px; }
  .app-card { grid-template-columns: 34px 16px 46px 1fr; }
  .grip { font-size: 17px; }
  .ballot-status { text-align: left; }
  .shell {
    display: block;
    height: auto;
    min-height: 0;
    padding: 0 12px 76px;
  }
  .list-wrap, .stage { border-radius: 18px; }
  .stage { display: none; margin-top: 12px; }
  body.show-detail .list-wrap { display: none; }
  body.show-detail .stage { display: block; }
  body.show-detail .top,
  body.show-detail .filters { display: none; }
  .back { display: inline-flex; }
  .stage-head { flex-direction: column; }
  .actions { justify-content: flex-start; }
  .pitch { font-size: 18px; }
}
