/* =========================================================
   SPIDERVERSES WATCH LOG: a comic collector's checklist.
   Newsprint, ink, caption boxes, rubber stamps. Same family as spiderverses.com.
   ========================================================= */
:root {
  --paper: #f3ecda; --paper2: #e9e0c8; --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,
    radial-gradient(ellipse 80% 60% at 50% -10%, #fff8 0, transparent 70%),
    var(--paper); }
a { color: var(--blue); }
button { font: inherit; cursor: pointer; color: inherit; }
::selection { background: var(--yellow); }

/* ---------- masthead ---------- */
.top { position: sticky; top: 0; z-index: 20; 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; }
.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; }
.who { flex: 1; min-width: 0; font-family: var(--mono); font-size: 12px; letter-spacing: .08em; color: #cfc6b0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-transform: uppercase; }
.who b { color: var(--paper); }
.who input { font: 400 15px var(--marker); color: var(--yellow); background: transparent; border: 0; border-bottom: 2px dashed #ffffff33; padding: 2px 4px; width: min(360px, 100%); letter-spacing: .02em; text-transform: none; }
.who input:focus { outline: none; border-bottom-color: var(--yellow); }

/* the price box / barcode in the corner, like a comic cover */
.box { display: flex; align-items: stretch; background: var(--paper); color: var(--ink); border: 3px solid var(--paper); box-shadow: 4px 4px 0 var(--red); }
.box > div { padding: 4px 10px 12px; display: flex; flex-direction: column; justify-content: center;
  background: repeating-linear-gradient(90deg, var(--ink) 0 2px, transparent 2px 4px, var(--ink) 4px 5px, transparent 5px 8px) bottom / 100% 7px no-repeat, var(--paper); }
.box .pct { font-family: var(--display); font-size: 28px; line-height: .9; color: var(--red); }
.box small { font-family: var(--mono); font-size: 9px; letter-spacing: .1em; font-weight: 700; }
.box .btn { box-shadow: none; border-width: 0 0 0 3px; }
.box .btn:hover { translate: none; box-shadow: none; filter: brightness(1.1); }

/* ---------- buttons: printed, offset shadow, never pills ---------- */
.btn { display: inline-flex; align-items: center; gap: 6px; border: 3px solid var(--ink); background: var(--paper); color: var(--ink);
  font-family: var(--display); font-size: 19px; 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.ghost { background: var(--paper); }
.btn.x { background: var(--ink); color: #fff; }

main { max-width: 1260px; margin: 0 auto; padding: 22px 22px 40px; }

/* ---------- hero: a splash page ---------- */
.hero { position: relative; margin: 14px 0 26px; padding: 26px 28px 24px; background: #fffaf0; border: 4px solid var(--ink); box-shadow: 9px 9px 0 var(--ink); rotate: -.4deg; }
.hero::before { content: "EARTH-1218 EDITION"; position: absolute; top: -15px; left: 18px; font-family: var(--mono); font-size: 11px; letter-spacing: .18em;
  background: var(--yellow); border: 3px solid var(--ink); padding: 4px 10px 3px; rotate: -2deg; box-shadow: 3px 3px 0 var(--ink); }
.hero h1 { margin: 6px 0 0; font-family: var(--display); font-weight: 400; font-size: clamp(42px, 7vw, 86px); line-height: .88; letter-spacing: .02em; color: var(--ink);
  text-shadow: -3px 0 var(--cyan), 3px 0 var(--red); overflow-wrap: anywhere; }
.hero p { margin: 12px 0 16px; max-width: 700px; font-size: 17px; }
.hero .links { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.hero .links > span { font-family: var(--mono); font-size: 12px; color: var(--mute) !important; }
.save { margin-top: 18px; padding: 12px 14px; background: var(--yellow); border: 3px dashed var(--ink); font-size: 15px; rotate: .3deg; }
.save code { display: block; margin-top: 4px; font-family: var(--mono); font-size: 12px; word-break: break-all; color: var(--ink); background: #fff8; padding: 3px 6px; }

/* ---------- filters: index tabs ---------- */
.filters { display: flex; flex-wrap: wrap; margin: 4px 0 6px; border-bottom: 4px solid var(--ink); }
.filters button { border: 3px solid var(--ink); border-bottom: 0; margin-right: -3px; background: var(--paper2); padding: 7px 14px 5px;
  font-family: var(--display); font-size: 18px; letter-spacing: .05em; line-height: 1; translate: 0 2px; }
.filters button:hover { background: #fffaf0; }
.filters button.on { background: var(--ink); color: var(--yellow); translate: 0 0; padding-bottom: 8px; }

/* ---------- the longbox ---------- */
.group h2 { display: flex; align-items: center; gap: 12px; margin: 34px 0 16px; font-family: var(--mono); font-size: 12px; letter-spacing: .14em; color: var(--mute); }
.group h2 span { font-family: var(--display); font-weight: 400; font-size: 26px; letter-spacing: .05em; line-height: 1; color: var(--ink); background: var(--yellow); border: 3px solid var(--ink);
  padding: 6px 14px 3px; box-shadow: 4px 4px 0 var(--ink); rotate: -1.2deg; }
.group:nth-of-type(2) h2 span { rotate: 1deg; background: #9be7f5; }
.group:nth-of-type(3) h2 span { background: #ffb0a8; rotate: -.6deg; }
.group:nth-of-type(4) h2 span { background: #c8f59b; rotate: .8deg; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(156px, 1fr)); gap: 26px 20px; }

.card { position: relative; background: none; border: 0; padding: 0; text-align: left; color: var(--ink); }
/* bagged & boarded: poster, a plastic sheen, an ink frame */
.poster { position: relative; aspect-ratio: 2 / 3; border: 3px solid var(--ink); background: var(--paper2); overflow: hidden; box-shadow: 5px 5px 0 var(--ink); transition: translate .1s, box-shadow .1s, rotate .1s; }
.poster::after { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, #ffffff38 0 12%, transparent 30% 70%, #ffffff1c 85%); pointer-events: none; }
.card:nth-child(4n+1) .poster { rotate: -.6deg; } .card:nth-child(4n+3) .poster { rotate: .7deg; }
.card:hover .poster { translate: -3px -3px; box-shadow: 8px 8px 0 var(--red); rotate: 0deg; }
.poster img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card.todo .poster img { filter: grayscale(.85) contrast(.9) brightness(1.05) sepia(.2); }
.card.soon .poster img { filter: grayscale(.4); }

/* the rubber stamp */
.badge { position: absolute; left: 50%; top: 46%; translate: -50% -50%; rotate: -14deg; z-index: 2; white-space: nowrap;
  font-family: var(--display); font-size: 24px; letter-spacing: .08em; line-height: 1; color: var(--red);
  border: 4px double var(--red); padding: 5px 10px 2px; background: #f3ecdad9; }
.badge.soon { color: var(--blue); border-color: var(--blue); rotate: 9deg; font-size: 18px; }

/* issue tab + progress strip */
.iss { position: absolute; top: 0; left: 0; z-index: 2; font-family: var(--mono); font-size: 10px; font-weight: 700; background: var(--ink); color: var(--yellow); padding: 2px 6px; }
.bar { position: absolute; left: 0; right: 0; bottom: 0; height: 8px; background: #141210b3; z-index: 2; }
.bar i { display: block; height: 100%; background: repeating-linear-gradient(-45deg, var(--red) 0 5px, #c01a22 5px 10px); }
.card.done .bar i { background: repeating-linear-gradient(-45deg, var(--ink) 0 5px, #3a342c 5px 10px); }
.card .t { margin-top: 10px; font-family: var(--display); font-weight: 400; font-size: 19px; letter-spacing: .03em; line-height: 1.02; }
.card .s { font-family: var(--mono); font-size: 11px; color: var(--mute); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.noposter { display: grid; place-items: center; height: 100%; padding: 10px; text-align: center; font-family: var(--display); font-size: 22px; }

/* ---------- detail: a comic page in a dialog ---------- */
dialog { padding: 0; border: 5px solid var(--ink); background: var(--paper); color: var(--ink); width: min(980px, 96vw); max-height: 92vh; box-shadow: 14px 14px 0 #000a; }
dialog::backdrop { background: #141210d9; backdrop-filter: blur(2px); }
.ph { position: relative; min-height: 240px; background: var(--ink) center / cover; display: flex; align-items: flex-end; border-bottom: 5px solid var(--ink); }
.ph::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle, #0003 1px, transparent 1.6px) 0 0 / 5px 5px, linear-gradient(transparent 30%, #141210dd); }
.ph .in { position: relative; z-index: 1; display: flex; gap: 20px; align-items: flex-end; padding: 20px; width: 100%; }
.ph img.pp { width: 124px; aspect-ratio: 2/3; object-fit: cover; border: 4px solid var(--paper); box-shadow: 6px 6px 0 var(--red); rotate: -2deg; }
.ph h3 { margin: 0; display: inline-block; font-family: var(--display); font-weight: 400; font-size: clamp(30px, 5vw, 50px); line-height: .95; letter-spacing: .02em;
  background: var(--yellow); color: var(--ink); border: 3px solid var(--ink); padding: 6px 14px 2px; box-shadow: 5px 5px 0 var(--ink); rotate: -1deg; }
.meta { font-family: var(--mono); font-size: 12px; color: var(--paper); margin-top: 12px; text-shadow: 1px 1px 0 #000; }
.pb .meta { color: var(--mute); text-shadow: none; margin-top: 4px; }
.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); }
.close:hover { background: var(--red); color: #fff; }
.pb { padding: 16px 22px 24px; }
.pb > p { font-size: 16px; max-width: 760px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.prog { height: 14px; background: #fffaf0; border: 3px solid var(--ink); margin: 10px 0 0; }
.prog i { display: block; height: 100%; background: repeating-linear-gradient(-45deg, var(--red) 0 6px, #c01a22 6px 12px); }

.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 16px 0 12px; }
.tabs button { border: 3px solid var(--ink); background: #fffaf0; padding: 6px 11px 3px; font-family: var(--display); font-size: 17px; letter-spacing: .04em; line-height: 1; box-shadow: 3px 3px 0 var(--ink); }
.tabs button.on { background: var(--ink); color: var(--yellow); }
.tabs button em { font: 700 11px var(--mono); font-style: normal; margin-left: 6px; color: var(--mute); }
.tabs button.on em { color: #fff; }

/* Spider-Noir: two-sided switch */
.version { display: inline-flex; border: 3px solid var(--ink); box-shadow: 3px 3px 0 var(--ink); }
.version button { border: 0; padding: 7px 14px 4px; font-family: var(--display); font-size: 17px; letter-spacing: .05em; line-height: 1; background: #fffaf0; }
.version button[data-ver="bw"].on { background: var(--ink); color: #fff; }
.version button[data-ver="color"].on { background: linear-gradient(90deg, var(--red), var(--yellow), var(--cyan)); color: var(--ink); }
.pb > .row .meta { margin: 0; }

/* episodes as panels */
.eps { display: grid; gap: 14px; }
.ep { position: relative; display: grid; grid-template-columns: 210px 1fr auto; gap: 16px; align-items: start; background: #fffaf0; border: 3px solid var(--ink); padding: 10px; box-shadow: 5px 5px 0 var(--ink); }
.ep:nth-child(odd) { rotate: -.25deg; } .ep:nth-child(even) { rotate: .2deg; }
.ep.w::after { content: "WATCHED"; position: absolute; right: 70px; top: 10px; font-family: var(--display); font-size: 17px; letter-spacing: .08em; color: var(--red);
  border: 3px double var(--red); padding: 2px 7px 0; rotate: -8deg; opacity: .85; pointer-events: none; }
.ep .th { aspect-ratio: 16/9; background: var(--ink); border: 2px solid var(--ink); overflow: hidden; }
.ep .th img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bw .ep .th img, .bw .ph { filter: grayscale(1) contrast(1.1); }
.ep h4 { margin: 0; font-family: var(--display); font-weight: 400; font-size: 22px; letter-spacing: .03em; line-height: 1.05; padding-right: 90px; }
.ep h4 small { display: inline-block; font: 700 11px var(--mono); background: var(--ink); color: var(--yellow); padding: 2px 6px; margin-right: 8px; translate: 0 -3px; }
.ep .m { font-family: var(--mono); font-size: 11px; color: var(--mute); margin: 4px 0 6px; }
.ep p { margin: 0; font-size: 14px; font-weight: 400; }
/* hand-inked checkbox */
.chk { width: 46px; height: 46px; border: 3px solid var(--ink); background: #fff; color: transparent; font: 400 34px/1 var(--marker); box-shadow: 3px 3px 0 var(--ink); }
.chk.on { color: var(--red); }
.chk:disabled { cursor: default; box-shadow: none; opacity: .75; }
.chk:not(:disabled):hover { background: var(--yellow); }
.big { display: inline-flex; align-items: center; gap: 10px; border: 3px solid var(--ink); background: #fffaf0; box-shadow: 4px 4px 0 var(--ink); padding: 10px 16px 7px; font-family: var(--display); font-size: 22px; letter-spacing: .05em; }
.big.on { background: var(--red); color: #fff; }

/* ---------- share ---------- */
#share { width: min(640px, 94vw); }
.sh { padding: 22px; }
.sh h3 { margin: 0 0 6px; display: inline-block; font-family: var(--display); font-weight: 400; font-size: 36px; letter-spacing: .04em; line-height: 1; background: var(--yellow); border: 3px solid var(--ink); padding: 6px 14px 2px; box-shadow: 4px 4px 0 var(--ink); rotate: -1deg; }
.sh .meta { color: var(--mute) !important; text-shadow: none; }
.sh img.card { width: 100%; display: block; margin: 12px 0; aspect-ratio: 1200/630; 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: 104px; font: 700 15px var(--body); color: var(--ink); background: #fffaf0; border: 3px solid var(--ink); padding: 10px; }
.sh .url { font-family: var(--mono); font-size: 12px; background: #fffaf0; border: 2px dashed var(--ink); padding: 8px; word-break: break-all; margin-top: 10px; }
.sh .row { margin-top: 14px; }

/* the trip to Earth-1218 while the share image renders */
.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; padding: 0 16px; color: #fff; }
.rt small { font-family: var(--mono); font-size: 11px; letter-spacing: .24em; color: #cfc6b0; }
.rt b { font-family: var(--display); font-weight: 400; font-size: clamp(26px, 5vw, 42px); line-height: 1; 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; } }
.dots i { font-style: normal; animation: blink 1.2s steps(1) infinite; } .dots i:nth-child(2) { animation-delay: .2s; } .dots i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 60% { opacity: 1; } 80%, 100% { opacity: 0; } }
.rbar { position: absolute; left: 0; right: 0; bottom: 0; height: 6px; background: #000; overflow: hidden; }
.rbar i { position: absolute; top: 0; bottom: 0; width: 35%; background: repeating-linear-gradient(90deg, var(--red) 0 12px, var(--cyan) 12px 24px); animation: rbar 1.4s steps(14) infinite; }
@keyframes rbar { from { left: -35%; } to { left: 100%; } }

#toast { position: fixed; left: 50%; bottom: 22px; translate: -50% 0; z-index: 50; display: none; font-family: var(--display); font-size: 19px; 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: 1260px; 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 { display: flex; gap: 12px; align-items: center; color: var(--mute); }
.loading { font-family: var(--display); font-size: 24px; letter-spacing: .04em; padding: 30px 0; }

@media (max-width: 720px) {
  .top { padding: 8px 12px; gap: 10px; } .brand span:last-child { display: none; }
  main { padding: 16px 14px 30px; } .hero { padding: 22px 16px 18px; }
  .grid { grid-template-columns: repeat(3, 1fr); gap: 18px 10px; } .card .t { font-size: 15px; } .badge { font-size: 15px; border-width: 3px; padding: 3px 6px 1px; }
  .ep { grid-template-columns: 1fr auto; } .ep .th { grid-column: 1 / -1; } .ep.w::after { right: 64px; top: auto; bottom: 12px; } .ep h4 { padding-right: 0; }
  .ph img.pp { width: 86px; } .filters button { font-size: 15px; padding: 6px 9px 4px; }
}
@media (prefers-reduced-motion: reduce) { .rings i, .rt b, .rbar i, .dots i { animation: none; } .rings i:first-child { opacity: .6; transform: scale(.8); } }
