:root {
  --bg: #13111b;
  --bg-2: #1b1826;
  --card: #211d2f;
  --card-hi: #2a2540;
  --line: rgba(255, 255, 255, 0.08);
  --text: #f3eee6;
  --muted: #a39cb5;
  --accent: #f5b544;
  --accent-ink: #2b1d00;
  --teal: #5fd4b4;
  --danger: #ff7a7a;
  --gold: linear-gradient(160deg, #ffe08a, #e0a52c);
  --silver: linear-gradient(160deg, #eef1f6, #a8b0bf);
  --bronze: linear-gradient(160deg, #f2b98a, #b06a3a);
  --radius: 18px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font: 15px/1.5 "Inter", system-ui, sans-serif;
  color: var(--text);
  background:
    radial-gradient(900px 500px at 10% -10%, rgba(245, 181, 68, 0.14), transparent 60%),
    radial-gradient(800px 500px at 100% 0%, rgba(95, 212, 180, 0.10), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  min-height: 100vh;
  padding-bottom: 190px;
}

a { color: inherit; }

h1, h2, .section-title, .podium-name {
  font-family: "Fraunces", Georgia, serif;
  letter-spacing: -0.01em;
}

/* ------------------------------------------------------------------ hero */

.hero {
  max-width: 820px;
  margin: 0 auto;
  padding: 64px 20px 28px;
  text-align: center;
}
.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}
.hero h1 {
  margin: 0;
  font-size: clamp(40px, 7vw, 68px);
  font-weight: 800;
  line-height: 1.05;
}
.lead { color: var(--muted); max-width: 620px; margin: 18px auto 20px; }
.results-link {
  display: inline-block;
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  text-decoration: none;
  color: var(--muted);
  transition: color .2s, border-color .2s;
}
.results-link:hover { color: var(--text); border-color: var(--accent); }

main { max-width: 1280px; margin: 0 auto; padding: 0 20px; }

.hero-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.section-lead { text-align: center; color: var(--muted); max-width: 640px; margin: -16px auto 28px; }
#games-title { margin-top: 80px; scroll-margin-top: 20px; }

/* ------------------------------------------------------------------ evening poll */

:root { --yes: #5fd4a0; --maybe: #f5b544; --really: #ff9a5c; --no: #ff7a7a; }

.when { max-width: 980px; margin: 24px auto 0; scroll-margin-top: 20px; }
.days { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

.day {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px 18px 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color .2s, box-shadow .2s;
}
.day.best { border-color: var(--yes); box-shadow: 0 0 0 1px var(--yes), 0 14px 34px rgba(95, 212, 160, .15); }
.best-tag {
  position: absolute;
  top: -11px;
  right: 16px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--yes);
  color: #032019;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  display: none;
}
.day.best .best-tag { display: block; }
.day header { text-align: center; }
.day-name { margin: 0; font: 600 28px "Fraunces", serif; text-transform: capitalize; }
.day-date { margin: 0; color: var(--muted); }

.answers { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.answer {
  padding: 10px 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, .04);
  color: var(--text);
  font: 600 13.5px "Inter", sans-serif;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s, transform .1s;
}
.answer { line-height: 1.2; }
.answer:hover { border-color: rgba(255, 255, 255, .25); }
.answer:active { transform: scale(.97); }
.answer.yes.on { background: var(--yes); border-color: var(--yes); color: #032019; }
.answer.maybe.on { background: var(--maybe); border-color: var(--maybe); color: var(--accent-ink); }
.answer.really.on { background: var(--really); border-color: var(--really); color: #2b1100; }
.answer.no.on { background: var(--no); border-color: var(--no); color: #2a0505; }

.tally { border-top: 1px solid var(--line); padding-top: 12px; }
.counts { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 12px; font-size: 13px; color: var(--muted); }
.counts b { font-size: 17px; margin-right: 2px; }
.counts .yes b { color: var(--yes); }
.counts .maybe b { color: var(--maybe); }
.counts .really b { color: var(--really); }
.counts .no b { color: var(--no); }
.names { display: flex; flex-wrap: wrap; justify-content: center; gap: 5px; margin-top: 10px; font-size: 12.5px; }
.who { padding: 2px 9px; border-radius: 999px; border: 1px solid; }
.who.yes { color: var(--yes); border-color: rgba(95, 212, 160, .4); background: rgba(95, 212, 160, .08); }
.who.maybe { color: var(--maybe); border-color: rgba(245, 181, 68, .4); background: rgba(245, 181, 68, .08); }
.who.really { color: var(--really); border-color: rgba(255, 154, 92, .4); background: rgba(255, 154, 92, .08); border-style: dashed; }
.who.no { color: var(--no); border-color: rgba(255, 122, 122, .35); text-decoration: line-through; opacity: .8; }

.when-form { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.when-form button {
  padding: 10px 20px;
  border: 0;
  border-radius: 12px;
  background: var(--yes);
  color: #032019;
  font: 600 15px "Inter", sans-serif;
  cursor: pointer;
  transition: opacity .15s, filter .15s;
}
.when-form button:hover:not(:disabled) { filter: brightness(1.08); }
.when-form button:disabled { opacity: .35; cursor: not-allowed; }
.when-status { min-width: 150px; font-size: 13px; color: var(--muted); }
.when-status.ok { color: var(--yes); }

/* ------------------------------------------------------------------ cards */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 20px;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  user-select: none;
  outline: none;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, opacity .18s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); background: var(--card-hi); }
.card:focus-visible { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(95, 212, 180, .35); }
.card:active { transform: translateY(-1px) scale(.99); }
.card.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent), 0 14px 34px rgba(245, 181, 68, .22);
  background: var(--card-hi);
}
.card.full { opacity: .55; }

.cover {
  position: relative;
  aspect-ratio: 4 / 3;
  background: #0d0c13;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.cover img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 12px;
  transition: transform .3s ease;
}
.cover::before {          /* soft spotlight behind the box art */
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 40%, rgba(255,255,255,.07), transparent 70%);
}
.card:hover .cover img { transform: scale(1.04); }
.cover-fallback {
  font: 800 64px "Fraunces", serif;
  color: var(--accent);
  opacity: .6;
}

.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  font: 800 20px "Fraunces", serif;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .4);
  transform: scale(0);
  transition: transform .22s cubic-bezier(.34, 1.56, .64, 1);
}
.card.selected .rank-badge { transform: scale(1); }
.card:not(.selected):not(.full):hover .rank-badge {
  transform: scale(1);
  background: rgba(255, 255, 255, .14);
  color: var(--text);
  backdrop-filter: blur(6px);
}
.card:not(.selected):not(.full):hover .rank-badge::after { content: "+"; }

.card-body { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px 16px; flex: 1; }
.card-body h2 { margin: 0; font-size: 19px; font-weight: 600; line-height: 1.2; }
.alias { margin: -4px 0 0; color: var(--muted); font-size: 13px; font-style: italic; }

.facts { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 0; padding: 0; list-style: none; }
.facts li {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .06);
  font-size: 12.5px;
  font-weight: 500;
  white-space: nowrap;
}
.facts li span { opacity: .75; font-size: 12px; }
.ico {
  width: 13px;
  height: 13px;
  background: currentColor;
  opacity: .75;
  -webkit-mask: var(--icon) center / contain no-repeat;
  mask: var(--icon) center / contain no-repeat;
}
.ico-time { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E"); }
.ico-players { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Ccircle cx='8' cy='7' r='3.5'/%3E%3Ccircle cx='17' cy='8.5' r='2.8'/%3E%3Cpath d='M1.5 20c0-4 3-6.5 6.5-6.5s6.5 2.5 6.5 6.5z'/%3E%3Cpath d='M15.5 20c0-2.2-.6-4-1.8-5.3 1-.6 2-.9 3.3-.9 3 0 5.5 2.2 5.5 6.2z'/%3E%3C/svg%3E"); }
.ico-weight { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Ccircle cx='12' cy='5' r='2.5'/%3E%3Cpath d='M7 9h10l4 12H3z'/%3E%3C/svg%3E"); }
.facts li.best { background: rgba(95, 212, 180, .14); color: var(--teal); }

.summary {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.bgg {
  margin-top: auto;
  padding-top: 6px;
  align-self: flex-start;
  color: var(--muted);
  font-size: 12.5px;
  text-decoration: none;
  border-bottom: 1px dashed transparent;
}
.bgg:hover { color: var(--accent); border-bottom-color: var(--accent); }

/* ------------------------------------------------------------------ weeks menu */

.menu-button {
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 30;
  width: 44px;
  height: 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(27, 24, 38, .85);
  backdrop-filter: blur(10px);
  cursor: pointer;
}
.menu-button span { width: 18px; height: 2px; border-radius: 2px; background: var(--text); transition: transform .2s, opacity .2s; }
.menu-open .menu-button span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-open .menu-button span:nth-child(2) { opacity: 0; }
.menu-open .menu-button span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.menu-backdrop { position: fixed; inset: 0; z-index: 20; background: rgba(8, 7, 12, .55); backdrop-filter: blur(2px); }
.menu {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 25;
  width: min(320px, 86vw);
  padding: 76px 14px 20px;
  overflow-y: auto;
  background: var(--bg-2);
  border-right: 1px solid var(--line);
  box-shadow: 20px 0 50px rgba(0, 0, 0, .45);
  animation: slide-in .2s ease;
}
@keyframes slide-in { from { transform: translateX(-100%); } }
.menu header { display: flex; align-items: center; justify-content: space-between; padding: 0 6px 12px; }
.menu h2 { margin: 0; font: 600 22px "Fraunces", serif; }
.new-session {
  display: none;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  font: 500 22px/1 "Inter", sans-serif;
  cursor: pointer;
}
body.admin .new-session { display: block; }
.site-lock {
  display: none;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
  margin: 0 0 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, .03);
  cursor: pointer;
}
body.admin .site-lock { display: grid; }
.site-lock input { position: absolute; opacity: 0; pointer-events: none; }
.site-lock .switch {
  position: relative;
  width: 40px;
  height: 22px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .15);
  transition: background .2s;
}
.site-lock .switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  transition: transform .2s;
}
.site-lock input:checked + .switch { background: var(--accent); }
.site-lock input:checked + .switch::after { transform: translateX(18px); }
.site-lock input:focus-visible + .switch { box-shadow: 0 0 0 3px rgba(95, 212, 180, .4); }
.site-lock b { display: block; font-weight: 600; }
.site-lock small { display: block; color: var(--muted); font-size: 12px; line-height: 1.35; }
.menu ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.menu a {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 8px;
  padding: 10px 12px;
  border-radius: 12px;
  text-decoration: none;
  border: 1px solid transparent;
}
.menu a:hover { background: rgba(255, 255, 255, .05); }
.menu a.current { border-color: rgba(245, 181, 68, .5); background: rgba(245, 181, 68, .08); }
.menu a b { font-weight: 600; }
.menu a span { grid-column: 1; color: var(--muted); font-size: 13px; }
.menu a em {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  padding: 2px 9px;
  border-radius: 999px;
  font-style: normal;
  font-size: 11.5px;
  font-weight: 600;
}
.menu a em.open { background: rgba(95, 212, 160, .15); color: var(--yes); }
.menu a em.closed { background: rgba(255, 255, 255, .07); color: var(--muted); }

/* a locked (past) week: read-only */
.locked-banner {
  display: inline-block;
  margin: 16px auto 18px;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .06);
  color: var(--muted);
}
body.locked .tray, body.locked .add-tile, body.locked .remove-game, body.locked .when-form { display: none !important; }
body.locked .card { cursor: default; }
body.locked .card .rank-badge { display: none; }
body.locked .card:hover { transform: none; }
body.locked .answer { cursor: default; }
body.locked .answer:not(.on) { opacity: .45; }
body.locked { padding-bottom: 60px; }

/* ------------------------------------------------------------------ add / remove games */

.added-by { margin: -4px 0 0; color: var(--teal); font-size: 12px; font-weight: 500; }

.add-tile {
  min-height: 280px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1.5px dashed rgba(255, 255, 255, .18);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .02);
  color: var(--muted);
  font: 600 16px "Inter", sans-serif;
  cursor: pointer;
  transition: border-color .2s, color .2s, background .2s, transform .18s;
}
.add-tile:hover { border-color: var(--accent); color: var(--text); background: rgba(245, 181, 68, .05); transform: translateY(-4px); }
.add-tile .plus {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: rgba(245, 181, 68, .12);
  color: var(--accent);
  font: 400 34px/1 "Inter", sans-serif;
}
.add-tile small { font-weight: 400; font-size: 12.5px; }

.remove-game {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 1;
  display: none;
  padding: 5px 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(20, 8, 8, .75);
  color: var(--danger);
  font: 600 12px "Inter", sans-serif;
  cursor: pointer;
  backdrop-filter: blur(4px);
}
.remove-game:hover { background: var(--danger); color: #2a0505; }
body.admin .remove-game { display: block; }

.card.just-added { animation: added 2.4s ease; }
@keyframes added {
  0%, 60% { box-shadow: 0 0 0 3px var(--teal), 0 14px 34px rgba(95, 212, 180, .3); }
  100% { box-shadow: none; }
}

.add-dialog {
  width: min(600px, calc(100% - 32px));
  max-height: calc(100% - 48px);
  padding: 28px 24px 24px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--bg-2);
  color: var(--text);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .6);
}
.add-dialog::backdrop { background: rgba(8, 7, 12, .7); backdrop-filter: blur(4px); }
.add-dialog h2 { margin: 0 0 6px; font: 600 28px "Fraunces", serif; }
.add-dialog > .muted { margin: 0 0 16px; font-size: 13.5px; overflow-wrap: anywhere; }
.dialog-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .06);
  color: var(--muted);
  font-size: 20px;
  cursor: pointer;
}
.dialog-close:hover { color: var(--text); background: rgba(255, 255, 255, .12); }
.add-search { display: flex; gap: 8px; }
.add-search input {
  flex: 1;
  min-width: 0;
  padding: 11px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, .25);
  color: var(--text);
  font: inherit;
  outline: none;
}
.add-search input:focus { border-color: var(--teal); }
.add-search button, #add-confirm {
  padding: 10px 18px;
  border: 0;
  border-radius: 12px;
  background: var(--accent);
  color: var(--accent-ink);
  font: 600 14.5px "Inter", sans-serif;
  cursor: pointer;
}
.add-search button:hover, #add-confirm:hover:not(:disabled) { filter: brightness(1.08); }
#add-confirm { margin-top: 12px; }
#add-confirm:disabled { opacity: .5; cursor: wait; }
#add-body { margin-top: 16px; }
.add-error { color: var(--danger); font-weight: 500; margin: 8px 0 0; }
.add-results { list-style: none; margin: 0; padding: 0; max-height: 45vh; overflow-y: auto; }
.add-results button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  font: 500 14.5px "Inter", sans-serif;
  text-align: left;
  cursor: pointer;
}
.add-results button:hover, .add-results button.active { background: rgba(255, 255, 255, .07); }
.add-results button.active { box-shadow: inset 0 0 0 1px var(--accent); }
.add-results img, .add-results .noimg {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
  background: #0d0c13;
}
.sugg-name { flex: 1; min-width: 0; }
.sugg-name em { font-style: normal; color: var(--muted); font-weight: 400; margin-left: 4px; }
.sugg-meta { flex: none; color: var(--muted); font-size: 12.5px; }
.sugg-meta b { color: var(--danger); font-weight: 500; }
.searching { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; color: var(--muted); margin: 6px 0; }
.searching small { width: 100%; padding-left: 28px; font-size: 12px; opacity: .8; }
.spinner {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .15);
  border-top-color: var(--accent);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.add-results button.loading { opacity: .5; }
.add-preview { display: flex; gap: 16px; align-items: flex-start; }
.add-preview img { width: 120px; height: 120px; object-fit: contain; border-radius: 12px; background: #0d0c13; flex: none; }
.add-preview h3 { margin: 0; font: 600 20px "Fraunces", serif; }
.add-preview h3 span { color: var(--muted); font-weight: 400; }
.add-preview .muted { margin: 4px 0; font-size: 13.5px; }
.add-preview .summary { -webkit-line-clamp: 3; margin: 6px 0; }
.add-preview .bgg { display: inline-block; margin-top: 2px; }

/* ------------------------------------------------------------------ tray */

.tray {
  position: fixed;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  width: min(1100px, calc(100% - 24px));
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  background: rgba(27, 24, 38, .9);
  backdrop-filter: blur(14px);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .5);
  z-index: 10;
  transition: border-color .2s;
}
.tray.active { border-color: rgba(245, 181, 68, .45); }
.tray.saved { border-color: rgba(95, 212, 180, .45); }

.tray-bar { display: flex; align-items: center; gap: 14px; }
.tray-count { color: var(--muted); font-size: 13px; white-space: nowrap; }
.tray-count b { color: var(--accent); font-size: 18px; }
.tray-count small { display: block; font-size: 11px; line-height: 1.2; color: var(--muted); }
.tray-count small.ok { color: var(--teal); }
.tray-hint { flex: 1; color: var(--muted); font-size: 13px; font-style: italic; }

#picks {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
#picks li {
  position: relative;
  height: 58px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 28px 0 8px;
  border-radius: 12px;
  font-size: 13px;
}
#picks li.slot {
  justify-content: center;
  padding: 0;
  border: 1.5px dashed rgba(255, 255, 255, .14);
  color: rgba(255, 255, 255, .3);
  font-size: 12.5px;
}
#picks li.slot sup {
  font-size: .65em;
  line-height: 0;
  vertical-align: super;
  margin-left: .5px;
}
#picks li.pick {
  --cover: none;
  border: 1px solid rgba(255, 255, 255, .14);
  background-color: var(--card-hi);
  background-image:
    linear-gradient(90deg, rgba(14, 12, 20, .94) 0%, rgba(14, 12, 20, .78) 50%, rgba(14, 12, 20, .45) 100%),
    var(--cover);
  background-size: cover;
  background-position: center 35%;
  color: #fff;
  cursor: grab;
  touch-action: none;           /* let pointer events drive the drag on touch screens */
  user-select: none;
  outline: none;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s;
}
#picks li.pick:hover { border-color: rgba(245, 181, 68, .6); }

/* dragging a game card onto the tray */
.card { -webkit-touch-callout: none; }
.card img { -webkit-user-drag: none; }
.card.lifted { opacity: .45; transform: scale(.97); }
.tray.drop-ready { border-color: var(--accent); }
#picks li.drop-target {
  border: 1.5px solid var(--accent);
  box-shadow: 0 0 0 3px rgba(245, 181, 68, .3);
  color: var(--accent);
}
.drag-ghost {
  --cover: none;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  width: 140px;
  height: 58px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  border-radius: 12px;
  border: 1px solid var(--accent);
  background-color: var(--card-hi);
  background-image:
    linear-gradient(90deg, rgba(14, 12, 20, .9), rgba(14, 12, 20, .5)),
    var(--cover);
  background-size: cover;
  background-position: center 35%;
  color: #fff;
  font-weight: 600;
  font-size: 13px;
  line-height: 1.2;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .9);
  box-shadow: 0 16px 34px rgba(0, 0, 0, .6);
  pointer-events: none;
  rotate: -3deg;
}
#picks li.pick:focus-visible { border-color: var(--teal); box-shadow: 0 0 0 2px rgba(95, 212, 180, .4); }
#picks li.fresh { animation: pop .2s ease; }
#picks.sorting li.pick { cursor: grabbing; }
#picks li.dragging {
  z-index: 1;
  transform: scale(1.05);
  border-color: var(--accent);
  box-shadow: 0 12px 28px rgba(0, 0, 0, .55), 0 0 0 2px var(--accent);
}
#picks li.pick b {
  flex: none;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  font: 800 13px "Fraunces", serif;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .4);
}
#picks li.pick span {
  font-weight: 600;
  line-height: 1.2;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .9);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
#picks li.pick button {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, .45);
  color: rgba(255, 255, 255, .8);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
}
#picks li.pick button:hover { background: var(--danger); color: #2a0505; }

.tray-submit { display: flex; gap: 8px; }
.tray-submit input {
  width: 150px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, .25);
  color: var(--text);
  font: inherit;
  outline: none;
}
.tray-submit input:focus { border-color: var(--teal); }
.tray-submit input#voter {
  width: 120px;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: .25em;
  font-weight: 600;
}
.tray-submit input#voter::placeholder { letter-spacing: normal; text-transform: none; font-weight: 400; }
.tray-submit input#voter.missing { border-color: var(--danger); animation: shake .3s; }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.tray-submit button {
  padding: 10px 22px;
  border: 0;
  border-radius: 12px;
  background: var(--accent);
  color: var(--accent-ink);
  font: 600 15px "Inter", sans-serif;
  cursor: pointer;
  transition: transform .15s, filter .15s, opacity .15s;
}
.tray-submit button:hover:not(:disabled) { filter: brightness(1.08); transform: translateY(-1px); }
.tray-submit button:disabled { opacity: .35; cursor: not-allowed; }
.tray-submit button.ghost {
  padding: 10px 14px;
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
}
.tray-submit button.ghost:hover { color: var(--text); border-color: var(--muted); }
.tray-submit button[hidden] { display: none; }

.tray-msg {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  transform: translate(-50%, 6px);
  margin: 0;
  padding: 8px 14px;
  border-radius: 10px;
  background: var(--danger);
  color: #2a0505;
  font-weight: 600;
  font-size: 13px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
}
.tray-msg.ok { background: var(--teal); color: #032019; }
.tray-msg.show { opacity: 1; transform: translate(-50%, 0); }

@keyframes pop { from { transform: scale(.8); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ------------------------------------------------------------------ results */

.results { margin: 80px auto 0; max-width: 860px; scroll-margin-top: 20px; }
.section-title { text-align: center; font-size: 38px; margin: 0 0 28px; }
.muted { color: var(--muted); }
.center { text-align: center; }

.waiting {
  text-align: center;
  padding: 36px 24px;
  background: var(--bg-2);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}
.dice { font-size: 42px; animation: roll 2.4s ease-in-out infinite; display: inline-block; }
@keyframes roll { 0%, 70%, 100% { transform: rotate(0); } 80% { transform: rotate(-20deg); } 90% { transform: rotate(200deg); } }
.progress { height: 10px; max-width: 320px; margin: 16px auto 8px; border-radius: 999px; background: rgba(255,255,255,.08); overflow: hidden; }
.progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--teal), var(--accent)); border-radius: inherit; transition: width .6s ease; }

.voters { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; }
.voters span { padding: 2px 10px; border-radius: 999px; background: rgba(255,255,255,.06); color: var(--text); }

.podium {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: end;
  gap: 14px;
  margin-bottom: 36px;
}
.step { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; min-width: 0; }
.podium-cover {
  width: 74%;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  margin-bottom: 10px;
  border-radius: 16px;
  background: #0d0c13;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .2s;
}
.podium-cover:hover { transform: translateY(-4px) rotate(-1deg); }
.podium-cover img { width: 100%; height: 100%; object-fit: contain; padding: 8px; }
.podium-name { margin: 0; font-size: 18px; font-weight: 600; line-height: 1.2; }
.podium-score { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.podium-players {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin: 6px 0 10px;
  padding: 2px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .06);
  font-size: 12.5px;
}
.step:not(:has(.podium-players)) .podium-score { margin-bottom: 10px; }
.players-summary {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 4px 6px;
  margin: -12px auto 28px;
  padding: 10px 16px;
  max-width: 720px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg-2);
  color: var(--muted);
  font-size: 13.5px;
  text-align: center;
}
.players-summary b { color: var(--text); font-weight: 600; }
.players-summary .ico { margin-right: 2px; }
.players-summary .sep { opacity: .5; }
.block {
  width: 100%;
  display: grid;
  place-items: start center;
  padding-top: 12px;
  border-radius: 14px 14px 4px 4px;
  font: 800 34px "Fraunces", serif;
  color: rgba(0, 0, 0, .55);
}
.place-1 .block { height: 150px; background: var(--gold); }
.place-2 .block { height: 110px; background: var(--silver); }
.place-3 .block { height: 80px; background: var(--bronze); }
.place-1 .podium-cover {
  position: relative;
  z-index: 1;
  width: 86%;
  box-shadow: 0 0 0 3px #f5c94f, var(--shadow);
  animation: winner-glow 2.6s ease-in-out infinite alternate;
}
.place-1 .podium-name { font-size: 21px; }
.place-1 .podium-name::before { content: "★ "; color: #f5c94f; }
.place-1 .block { position: relative; overflow: hidden; box-shadow: 0 0 40px rgba(245, 201, 79, .35); }
.place-1 .block::after {          /* light sweeping over the gold step */
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .55) 50%, transparent 65%);
  transform: translateX(-100%);
  animation: shimmer 3.2s ease-in-out infinite;
}
@keyframes winner-glow {
  from { box-shadow: 0 0 0 3px #f5c94f, 0 0 18px rgba(245, 201, 79, .35), var(--shadow); }
  to { box-shadow: 0 0 0 3px #ffe08a, 0 0 46px rgba(245, 201, 79, .75), var(--shadow); }
}
@keyframes shimmer { 0%, 35% { transform: translateX(-100%); } 75%, 100% { transform: translateX(100%); } }

/* fireworks around the winner */
.fireworks { position: absolute; inset: -30px -10px 40%; pointer-events: none; z-index: 2; }
.burst { position: absolute; width: 0; height: 0; }
.burst span {
  position: absolute;
  left: -2.5px;
  top: -2.5px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--c);
  box-shadow: 0 0 6px 1px var(--c);
  opacity: 0;
  animation: spark 3s cubic-bezier(.15, .7, .3, 1) infinite;
  animation-delay: var(--d);
}
@keyframes spark {
  0% { transform: rotate(var(--a)) translateX(0) scale(1.3); opacity: 0; }
  4% { opacity: 1; }
  45% { opacity: 1; }
  60%, 100% { transform: rotate(var(--a)) translateX(var(--r)) translateY(10px) scale(.2); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .fireworks { display: none; }
  .place-1 .podium-cover, .place-1 .block::after { animation: none; }
}

.ranking { width: 100%; border-collapse: collapse; font-size: 14px; }
.ranking th { text-align: left; color: var(--muted); font-weight: 500; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.ranking td { padding: 10px; border-bottom: 1px solid var(--line); }
.ranking tr:hover td { background: rgba(255,255,255,.03); }
.ranking td a { text-decoration: none; font-weight: 600; }
.ranking td a:hover { color: var(--accent); }
.ranking .pos { font: 800 18px "Fraunces", serif; color: var(--accent); width: 40px; }
.bar { position: relative; display: flex; align-items: center; gap: 8px; min-width: 120px; }
.bar span { height: 8px; border-radius: 999px; background: linear-gradient(90deg, var(--accent), #ff8f5a); }
.bar b { font-weight: 600; }

/* ------------------------------------------------------------------ mobile */

@media (max-width: 720px) {
  body { padding-bottom: 220px; }
  .hero { padding-top: 40px; }
  main { padding: 0 16px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(155px, 1fr)); gap: 12px; }
  .card-body { padding: 10px 12px 12px; }
  .card-body h2 { font-size: 16px; }
  .summary { display: none; }
  .tray { gap: 8px; padding: 10px; bottom: 8px; }
  #picks { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
  #picks li { grid-column: span 2; font-size: 12px; }
  #picks li:nth-child(4) { grid-column: 2 / span 2; }   /* 3 + 2 layout, second row centred */
  #picks li { height: 58px; }
  #picks li.pick { align-items: flex-end; padding: 0 6px 6px; }
  #picks li.pick b { position: absolute; top: 4px; left: 4px; width: 20px; height: 20px; font-size: 11px; }
  #picks li.pick button { top: 3px; right: 3px; width: 20px; height: 20px; font-size: 13px; }
  #picks li.pick span { font-size: 11.5px; }
  .tray-hint { display: none; }
  .tray-bar { gap: 10px; }
  .tray-submit { flex: 1; }
  .tray-submit input { flex: 1; width: auto; min-width: 0; }
  .podium { gap: 8px; }
  .podium-name { font-size: 14px; }
  .place-1 .block { height: 110px; } .place-2 .block { height: 80px; } .place-3 .block { height: 56px; }
  .hide-sm { display: none; }
  .add-tile { min-height: 200px; }
  .add-preview img { width: 80px; height: 80px; }
  .days { grid-template-columns: 1fr; }
  .when-status { min-width: 0; width: 100%; text-align: center; }
}
