/* SPIDERVERSES RANK: tier lists printed like a comic page. Same family as track.spiderverses.com. */
:root {
  --paper: #f3ecda; --paper2: #e9e0c8; --card: #fffaf0; --ink: #141210; --red: #e3262f; --cyan: #1fb7d6; --yellow: #ffe14d; --blue: #2b59c3; --mute: #6d6556;
  --display: 'Bangers', Impact, sans-serif; --marker: 'Permanent Marker', cursive; --mono: 'Space Mono', monospace; --body: 'Comic Neue', 'Comic Sans MS', sans-serif;
}
* { box-sizing: border-box; }
html { background: var(--paper); }
body { margin: 0; color: var(--ink); font: 700 16px/1.45 var(--body);
  background: radial-gradient(circle, #0000001c 1px, transparent 1.6px) 0 0 / 6px 6px, var(--paper); }
a { color: var(--blue); }
button { font: inherit; cursor: pointer; color: inherit; }

/* masthead + category tabs */
.top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 18px; padding: 10px 22px; background: var(--ink); color: var(--paper); border-bottom: 5px solid var(--red); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--paper); text-decoration: none; flex-shrink: 0; }
.brand .mark { font-size: 28px; filter: drop-shadow(2px 2px 0 var(--red)); }
.brand span:last-child { font-family: var(--display); font-size: 30px; letter-spacing: .04em; line-height: 1; text-shadow: -2px 0 var(--cyan), 2px 0 var(--red); }
.brand b { font-family: var(--marker); font-weight: 400; font-size: 20px; color: var(--yellow); text-shadow: none; margin-left: 4px; rotate: -4deg; display: inline-block; }
.cats { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin-left: auto; }
.cats a { flex-shrink: 0; font-family: var(--display); font-size: 19px; letter-spacing: .05em; line-height: 1; padding: 7px 12px 5px; color: var(--paper); text-decoration: none; border: 2px solid transparent; }
.cats a:hover { border-color: #ffffff44; }
.cats a.on { background: var(--yellow); color: var(--ink); border-color: var(--yellow); box-shadow: 3px 3px 0 var(--red); }

main { max-width: 1180px; margin: 0 auto; padding: 22px 22px 40px; }
.loading { font-family: var(--display); font-size: 26px; padding: 40px 0; }

/* heading panel */
.head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 6px 0 20px; }
.kicker { display: inline-block; font-family: var(--mono); font-size: 11px; letter-spacing: .18em; background: var(--yellow); border: 3px solid var(--ink); padding: 4px 10px 3px; box-shadow: 3px 3px 0 var(--ink); rotate: -2deg; }
.title { display: block; margin-top: 10px; width: min(780px, 100%); font: 400 clamp(36px, 6vw, 68px)/.9 var(--display); letter-spacing: .02em; color: var(--ink); background: transparent; border: 0;
  border-bottom: 3px dashed transparent; padding: 0; text-shadow: -3px 0 var(--cyan), 3px 0 var(--red); }
.title:hover, .title:focus { outline: none; border-bottom-color: #14121044; }
.title[readonly] { cursor: default; border: 0; }
.blurb { margin: 6px 0 0; color: var(--mute); font-family: var(--mono); font-size: 13px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; gap: 6px; border: 3px solid var(--ink); background: var(--card); color: var(--ink); font-family: var(--display); font-size: 20px; letter-spacing: .05em; line-height: 1;
  padding: .45em .8em .35em; text-decoration: none; box-shadow: 4px 4px 0 var(--ink); transition: translate .08s, box-shadow .08s; }
.btn:hover { translate: -2px -2px; box-shadow: 6px 6px 0 var(--ink); }
.btn:active { translate: 2px 2px; box-shadow: 1px 1px 0 var(--ink); }
.btn.red { background: var(--red); color: #fff; } .btn.x { background: var(--ink); color: #fff; }
.btn:disabled { opacity: .55; cursor: wait; translate: none; }

/* the board */
.board { border: 4px solid var(--ink); background: var(--ink); display: grid; gap: 4px; box-shadow: 9px 9px 0 var(--ink); }
.tier { display: grid; grid-template-columns: 112px 1fr; min-height: 96px; background: var(--card); }
.tier.over .drop { background: #ffe14d55; }
.lab { position: relative; display: grid; place-items: center; border-right: 4px solid var(--ink); padding: 6px; }
.lab input { width: 100%; text-align: center; font: 400 44px/.9 var(--display); color: var(--ink); background: transparent; border: 0; padding: 0; }
.lab input:focus { outline: 2px dashed var(--ink); }
.lab input[readonly] { cursor: default; }
.lab input.mid { font-size: 30px; } .lab input.small { font-size: 19px; }
.static .drop:empty::after { content: none; }
.drop { display: flex; flex-wrap: wrap; align-content: flex-start; gap: 8px; padding: 8px; min-height: 92px; transition: background .1s; }
.drop:empty::after { content: "Drop here"; align-self: center; font-family: var(--mono); font-size: 12px; color: #14121044; padding-left: 6px; }

/* the unranked pile */
.pile { margin-top: 26px; border: 4px solid var(--ink); background: var(--card); box-shadow: 9px 9px 0 var(--ink); }
.pile h3 { margin: 0; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 12px 6px; background: var(--ink); color: var(--paper); font: 400 22px var(--display); letter-spacing: .05em; }
.pile h3 small { font: 700 11px var(--mono); letter-spacing: .1em; color: #cfc6b0; }
.pile .drop { min-height: 110px; }
.pile.over .drop { background: #1fb7d622; }
.hint { font-family: var(--mono); font-size: 12px; color: var(--mute); margin: 12px 2px 0; }

/* tiles */
.tile { position: relative; flex-shrink: 0; width: 132px; height: 76px; border: 3px solid var(--ink); background: #222; overflow: hidden; cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none;
  box-shadow: 3px 3px 0 var(--ink); transition: translate .08s, box-shadow .08s; }
.tile:hover { translate: -1px -1px; box-shadow: 4px 4px 0 var(--red); }
.tile.tall { width: 66px; height: 99px; }
.tile img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.tile .nm { position: absolute; left: 0; right: 0; bottom: 0; font: 700 10px/1.2 var(--mono); color: #fff; background: #141210cc; padding: 2px 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile.tall .nm { display: none; }
.tile.song { width: 146px; height: 76px; padding: 6px 7px; display: flex; flex-direction: column; justify-content: space-between; color: #fff; }
.tile.song.into { background: linear-gradient(135deg, var(--red), var(--blue)); } .tile.song.across { background: linear-gradient(135deg, #ff2bd6, var(--cyan)); }
.tile.song b { font: 400 19px/1 var(--display); letter-spacing: .02em; text-shadow: 2px 2px 0 #0006; }
.tile.song .nm { position: static; background: none; padding: 0; font-size: 9px; white-space: normal; max-height: 22px; overflow: hidden; }
.tile.sel { outline: 4px solid var(--yellow); outline-offset: 1px; box-shadow: 0 0 0 7px var(--ink); }
.tile.ghost { opacity: .3; }
.static .tile { cursor: default; }
#drag { position: fixed; left: 0; top: 0; z-index: 100; pointer-events: none; display: none; rotate: -4deg; filter: drop-shadow(8px 8px 0 #000a); }
#drag .tile { box-shadow: none; }

/* shared view */
.made { margin: 26px 0 0; padding: 14px 16px; background: var(--yellow); border: 3px dashed var(--ink); display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; font-size: 17px; }

/* share dialog (same as the tracker) */
dialog { padding: 0; border: 5px solid var(--ink); background: var(--paper); color: var(--ink); width: min(680px, 94vw); max-height: 92vh; box-shadow: 14px 14px 0 #000a; }
dialog::backdrop { background: #141210d9; }
.close { position: absolute; top: 12px; right: 12px; z-index: 3; width: 42px; height: 42px; border: 3px solid var(--ink); background: var(--paper); font: 400 20px var(--display); box-shadow: 3px 3px 0 var(--ink); }
.sh { padding: 22px; }
.sh h3 { margin: 0 0 6px; display: inline-block; font: 400 36px/1 var(--display); letter-spacing: .04em; background: var(--yellow); border: 3px solid var(--ink); padding: 6px 14px 2px; box-shadow: 4px 4px 0 var(--ink); rotate: -1deg; }
.sh .meta { font-family: var(--mono); font-size: 12px; color: var(--mute); margin-top: 6px; }
.sh img.card { width: 100%; display: block; margin: 12px 0; background: var(--ink); border: 4px solid var(--ink); box-shadow: 6px 6px 0 var(--ink); }
.sh img.card[hidden] { display: none; }
.sh textarea { width: 100%; min-height: 96px; font: 700 15px var(--body); color: var(--ink); background: var(--card); border: 3px solid var(--ink); padding: 10px; }
.sh .url { font-family: var(--mono); font-size: 12px; background: var(--card); border: 2px dashed var(--ink); padding: 8px; word-break: break-all; margin-top: 10px; }
.sh .row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.render { position: relative; aspect-ratio: 1200 / 630; margin: 12px 0; overflow: hidden; border: 4px solid var(--ink); box-shadow: 6px 6px 0 var(--ink);
  background: radial-gradient(circle, #ffffff14 1px, transparent 1.5px) 0 0 / 7px 7px, radial-gradient(ellipse at 50% 50%, #3a0b12, #141210 70%); display: grid; place-items: center; }
.rings { position: absolute; inset: 0; display: grid; place-items: center; }
.rings i { position: absolute; width: 60%; aspect-ratio: 1; border-radius: 50%; border: 3px solid var(--cyan); opacity: 0; box-shadow: 0 0 24px var(--cyan), inset 0 0 24px #e3262f88; animation: portal 2.4s steps(12) infinite; }
.rings i:nth-child(2) { border-color: var(--red); box-shadow: 0 0 24px var(--red); animation-delay: .8s; }
.rings i:nth-child(3) { border-color: var(--yellow); box-shadow: 0 0 24px var(--yellow); animation-delay: 1.6s; }
@keyframes portal { 0% { transform: scale(.15) rotate(0); opacity: 0; } 30% { opacity: .9; } 100% { transform: scale(1.5) rotate(90deg); opacity: 0; } }
.rt { position: relative; z-index: 1; text-align: center; display: flex; flex-direction: column; gap: 6px; color: #fff; padding: 0 16px; }
.rt small { font-family: var(--mono); font-size: 11px; letter-spacing: .24em; color: #cfc6b0; }
.rt b { font: 400 clamp(26px, 5vw, 42px)/1 var(--display); letter-spacing: .03em; text-shadow: -3px 0 var(--cyan), 3px 0 var(--red); animation: rglitch 1.2s steps(2) infinite; }
.rt span { font-family: var(--mono); font-size: 13px; letter-spacing: .1em; color: var(--yellow); }
@keyframes rglitch { 50% { text-shadow: 3px 0 var(--cyan), -3px 0 var(--red); translate: 1px 0; } }

#toast { position: fixed; left: 50%; bottom: 22px; translate: -50% 0; z-index: 120; display: none; font: 400 19px var(--display); letter-spacing: .04em;
  background: var(--yellow); border: 3px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); padding: 8px 16px 5px; }
.foot { max-width: 1180px; margin: 10px auto 0; padding: 18px 22px 30px; border-top: 4px solid var(--ink); font-size: 13px; font-weight: 400; }
.foot p { margin: 6px 0; } .foot .tmdb { color: var(--mute); }

@media (max-width: 720px) {
  .top { flex-wrap: wrap; padding: 8px 12px; gap: 8px; } .cats { width: 100%; margin: 0; } .cats a { font-size: 17px; padding: 6px 9px 4px; }
  main { padding: 16px 12px 30px; }
  .tier { grid-template-columns: 64px 1fr; min-height: 80px; } .lab input { font-size: 32px; } .lab input.mid { font-size: 19px; } .lab input.small { font-size: 13px; }
  .tile { width: 96px; height: 56px; } .tile.tall { width: 50px; height: 75px; } .tile.song { width: 116px; height: 64px; } .tile.song b { font-size: 16px; }
  .drop { gap: 6px; padding: 6px; }
}
@media (prefers-reduced-motion: reduce) { .rings i, .rt b { animation: none; } .rings i:first-child { opacity: .6; transform: scale(.8); } }

/* Every Spider-Man: image + name + who played them; the bottom stripe says where they're from */
.tile.card { width: 214px; height: 66px; display: flex; background: var(--card); }
.tile.card img { width: 88px; height: 100%; flex-shrink: 0; object-fit: cover; object-position: 50% 30%; border-right: 3px solid var(--ink); }
.tile.card > div { min-width: 0; padding: 5px 7px; display: flex; flex-direction: column; justify-content: center; }
.tile.card b { font: 400 17px/1 var(--display); letter-spacing: .02em; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile.card .nm { position: static; background: none; color: var(--mute); padding: 0; margin-top: 3px; font-size: 9px; white-space: normal; max-height: 22px; overflow: hidden; }
.tile.card.live { box-shadow: inset 0 -5px 0 var(--red), 3px 3px 0 var(--ink); }
.tile.card.toon { box-shadow: inset 0 -5px 0 var(--blue), 3px 3px 0 var(--ink); }
.tile.card.verse { box-shadow: inset 0 -5px 0 #ff2bd6, 3px 3px 0 var(--ink); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-family: var(--mono); font-size: 12px; color: var(--mute); margin: 10px 2px 0; }
.legend i { display: inline-block; width: 18px; height: 6px; vertical-align: middle; margin-right: 6px; }
@media (max-width: 720px) { .tile.card { width: 168px; height: 56px; } .tile.card img { width: 64px; } .tile.card b { font-size: 14px; } .tile.card .nm { font-size: 8px; } }
