@font-face {
  font-family: "Geist Mono";
  src: url("./event-art/event-mono.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "Geist Mono";
  src: url("./event-art/event-mono-ext.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0100-02FF, U+1E00-1EFF, U+2020;
}

@font-face {
  font-family: "Lilita One";
  src: url("./lilita-one.woff2") format("woff2");
  font-display: swap;
}

:root {
  --ink: #151515;
  --lime: #d0ff00;
  --red: #fb3153;
  --paper: #ecebea;
  --mono: "Geist Mono", ui-monospace, monospace;
  --heavy: "Lilita One", "Arial Black", sans-serif;
  --outlined: -1px -1px #000, 1px -1px #000, -1px 1px #000, 1px 1px #000, 0 3px #000;
  font-family: var(--mono);
  color: var(--ink);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper) url("./event-art/paper-frame.webp"); }
main { overflow: clip; }
a { color: inherit; text-decoration: none; }
button, input, summary { font: inherit; }
button, summary { cursor: pointer; }
:focus-visible { outline: 3px solid #ffcc25; outline-offset: 4px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.game-button, .square, article button, form button, #room-status button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: .65rem 1rem;
  border: 2px solid #080808;
  border-radius: 2px;
  box-shadow: inset 0 2px #ffffff38, inset 0 -3px #0004, 0 3px 5px #0005;
  background: #303030;
  color: white;
  font-family: var(--mono);
  font-size: .95rem;
  font-weight: 800;
  line-height: 1.05;
  text-align: center;
  text-transform: uppercase;
}

.square { width: 48px; padding: 0; }
.lime, article button, form button, #room-status button { background: var(--lime); color: #111; }
.red, .close { background: var(--red); color: #fff; }
button:hover:not(:disabled), .game-button:hover, summary:hover { filter: brightness(1.12); }
button:disabled { opacity: .36; cursor: default; }

.site-header {
  position: absolute;
  z-index: 10;
  inset: 26px 0 auto;
  width: min(calc(100% - 3rem), 1424px);
  margin-inline: auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: .8rem;
}

.site-logo { display: inline-flex; max-width: 156px; min-width: 0; }
.site-logo img { width: 100%; height: auto; filter: drop-shadow(0 2px 1px #0009); }
.header-controls { display: flex; align-items: flex-start; gap: 8px; }
.account { width: auto; padding: 0 0 0 .55rem; gap: .5rem; max-width: min(44vw, 260px); }
.account span { overflow-wrap: anywhere; }
.account strong { display: grid; align-self: stretch; place-items: center; width: 34px; flex: none; background: var(--lime); color: #111; }
.menu { position: relative; }
.menu summary { list-style: none; }
.menu summary::-webkit-details-marker { display: none; }
.hamburger, .hamburger::before, .hamburger::after { width: 20px; height: 3px; border-radius: 2px; background: #fff; }
.hamburger { position: relative; }
.hamburger::before, .hamburger::after { position: absolute; left: 0; content: ""; }
.hamburger::before { top: -7px; }
.hamburger::after { top: 7px; }
.menu nav {
  position: absolute;
  top: calc(100% + .45rem);
  right: 0;
  min-width: 12rem;
  padding: .3rem;
  border: 2px solid #080808;
  border-radius: 3px;
  background: #272727;
  color: white;
  box-shadow: 0 5px 12px #0005;
}
.menu nav a { display: block; padding: .75rem; font-weight: 800; }
.menu nav a:hover { background: #484848; }

.reward-hero {
  position: relative;
  height: 380px;
  overflow: hidden;
  background:
    url("./event-art/reward-overlay.webp") center / cover no-repeat,
    url("./event-art/reward-skull.webp") -140px 30% / 100% no-repeat,
    url("./event-paper.jpg") center top / 400px 400px repeat,
    #245fc1;
  background-blend-mode: normal, normal, multiply;
}
.reward-decoration { position: absolute; inset: 0; pointer-events: none; }
.star { position: absolute; bottom: var(--bottom); left: var(--left, auto); right: var(--right, auto); width: var(--width); transform: rotate(var(--turn, 0deg)); }
.star-left { --width: 80px; --left: 11.75%; --bottom: 70px; --turn: -15deg; }
.star-left-small { --width: 44px; --left: 6.8%; --bottom: 118px; --turn: -11deg; }
.star-left-bottom { --width: 44px; --left: 10%; --bottom: 18px; --turn: 10deg; }
.star-left-tiny { --width: 38px; --left: 18%; --bottom: 20px; --turn: -6deg; }
.star-left-inner { --width: 73px; --left: 27%; --bottom: -4px; --turn: 9deg; }
.star-right { --width: 105px; --right: -1%; --bottom: 78px; --turn: 15deg; }
.star-right-bottom { --width: 83px; --right: 13.7%; --bottom: -3px; --turn: -15deg; }
.star-right-top { --width: 48px; --right: .6%; --bottom: 213px; --turn: -15deg; }
.star-right-small { --width: 44px; --right: 8.9%; --bottom: 87px; --turn: 7deg; }
.star-right-tiny { --width: 33px; --right: 1%; --bottom: 30px; --turn: -18deg; }
.chaos-left { --width: 109px; --left: .15%; --bottom: 13px; --turn: 15deg; }
.chaos-right { --width: 73px; --right: 4%; --bottom: 11px; --turn: 8deg; }

.reward-stage {
  position: relative;
  display: grid;
  grid-template-columns: minmax(215px, 255px) minmax(0, 1fr);
  width: min(calc(100% - 4rem), 852px);
  margin-inline: auto;
  color: #fff;
}

.reward-copy { margin-top: 137px; }
h1, h2 { margin: 0; text-transform: uppercase; }
.reward-copy h1 {
  width: max-content;
  margin: 0 0 34px;
  color: #fff;
  font-size: 56px;
  font-weight: 900;
  font-feature-settings: "ss04" on;
  letter-spacing: -.055em;
  line-height: 1.15;
  text-shadow: var(--outlined);
  transform: rotate(-4deg);
}
.reward-copy button { min-width: 100px; }
.reward-track { position: relative; min-width: 0; margin-top: 109px; margin-right: -28px; }
.reward-doodle, .reward-crown { position: absolute; z-index: 0; pointer-events: none; }
.reward-doodle { width: 194px; top: -48px; right: 104px; }
.reward-crown { width: 86px; top: -81px; right: -16px; }

.reward-milestones {
  --progress: 0%;
  position: relative;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr)) minmax(0, 1.25fr);
  align-items: end;
  margin: 0;
  padding: 0;
  list-style: none;
}

.reward-milestones::before {
  content: "";
  position: absolute;
  bottom: 20px;
  left: -6%;
  right: 8%;
  height: 9px;
  background: linear-gradient(to right, transparent, #d0ff0073 12%, var(--lime) var(--progress), #222 var(--progress), #222 89%, transparent);
}

.reward-milestones li { position: relative; display: grid; justify-items: center; gap: 5px; min-width: 0; }
.reward-card {
  display: grid;
  place-items: center;
  width: 86%;
  height: 95px;
  padding: 6px;
  border: 2px solid #080808;
  border-radius: 3px;
  box-shadow: inset 0 0 0 3px #fff, 0 2px 3px #0004;
  background: #dedddd url("./event-art/reward-paper.jpg") center / cover;
  transform: skewX(-6deg);
}
.reward-card img { display: block; width: 100%; height: 100%; min-width: 0; min-height: 0; object-fit: contain; transform: skewX(6deg); }
.final-prize .reward-card { height: 121px; width: 89%; }
.point-badge {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 48px;
  height: 48px;
  border: 1px solid #0f0f0f;
  border-radius: 50%;
  background: #2b2b2b;
  color: white;
  font: 1.05rem/1 var(--heavy);
  text-shadow: 1px 1px #000, 0 2px #000;
}
.current-points .point-badge { border: 0; border-radius: 39% 57% 32% 62%; background: var(--lime); box-shadow: 0 0 8px #dcff00; padding-inline: .3rem; }
.current-points .point-badge::before { content: ""; position: absolute; z-index: -1; inset: 2px -3px; background: inherit; transform: rotate(47deg); border-radius: inherit; }
.is-reached .point-badge { background: #415500; }

.event-carousel { position: relative; isolation: isolate; padding: 86px 0 40px; overflow: clip; overflow-clip-margin: 55px; }
.event-carousel::before {
  position: absolute;
  content: "";
  top: -33px;
  left: 0;
  right: 0;
  height: 84px;
  background: url("./event-art/torn-paper.png") center bottom / auto 84px repeat-x;
  pointer-events: none;
}
.event-carousel::after {
  content: "";
  position: absolute;
  z-index: -1;
  width: 340px;
  height: 310px;
  top: 53px;
  left: 66%;
  background: url("./event-art/star-outline.webp") center / contain no-repeat;
  pointer-events: none;
}
.carousel-stage {
  width: min(848px, calc(100% - 10rem));
  position: relative;
  margin-inline: auto;
  border: 12px solid transparent;
  aspect-ratio: 848 / 486;
}
.event-slide {
  position: absolute;
  inset: -12px;
  display: grid;
  margin: 0;
  background: #fff;
  border: 12px solid #fff;
  box-shadow: 0 6px 22px #0004;
  transition: transform .26s ease, opacity .26s ease;
}
.event-slide img { display: block; width: 100%; height: 100%; object-fit: cover; }
.event-slide figcaption {
  position: absolute;
  top: -27px;
  left: 50%;
  transform: translateX(-50%) rotate(1deg);
  min-width: 100px;
  padding: 8px 15px 14px;
  color: #111;
  background: url("./event-art/day-tape.png") center / 100% 100% no-repeat;
  font-weight: 900;
  text-transform: uppercase;
  text-align: center;
}
.event-slide[data-position="current"] { z-index: 2; }
.event-slide[data-position="previous"] { transform: translateX(-110%) scale(.89) rotate(-3deg); opacity: .35; }
.event-slide[data-position="next"] { transform: translateX(110%) scale(.89) rotate(3deg); opacity: .35; }
.event-slide[data-position="offscreen"] { visibility: hidden; opacity: 0; }

.carousel-arrow { position: absolute; z-index: 3; top: calc(50% - 19px); }
.carousel-arrow.previous { right: calc(100% + 40px); }
.carousel-arrow.next { left: calc(100% + 40px); }
.carousel-arrow::after { content: ""; border: 9px solid transparent; }
.carousel-arrow.previous::after { border-left: 0; border-right: 13px solid white; }
.carousel-arrow.next::after { border-right: 0; border-left: 13px solid white; }
.carousel-action {
  position: absolute;
  z-index: 3;
  top: 52%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 9px 12px;
  border: 3px solid #fff7;
  border-radius: 9px;
  background: url("./event-art/sticky-spray.png") center / cover no-repeat, #ad7e80;
  box-shadow: 0 5px 3px #0008, inset 0 0 0 2px #3f32327d;
  white-space: nowrap;
}
.carousel-action .game-button { min-width: 204px; }

.content { width: min(calc(100% - 3rem), 1120px); margin-inline: auto; padding: 0 0 2.5rem; }
.content section { padding: 2.2rem 0; border-top: 2px solid #27272752; scroll-margin-top: 1rem; }
.heading { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .8rem; }
h2 { font-size: clamp(1.65rem, 5vw, 2.75rem); line-height: 1.08; font-weight: 900; letter-spacing: -.045em; }
.content p, dialog p { line-height: 1.55; }
#event-status { margin: 0; padding: .55rem .75rem; background: var(--lime); border: 2px solid #111; font-weight: 800; overflow-wrap: anywhere; }
#notice:empty, #dialog-notice:empty, #reward-notice:empty, #reward-status:empty { display: none; }
#notice:not(:empty), #reward-notice:not(:empty), #dialog-notice:not(:empty) { padding: .75rem; border-left: 4px solid #194a96; background: #fafafa; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .85rem; }
.grid.rooms { grid-template-columns: repeat(4, minmax(0, 1fr)); }
article { padding: 1rem; border: 2px solid #222; background: #fff url("./event-art/paper-frame.webp"); box-shadow: 3px 4px #18181829; overflow-wrap: anywhere; }
article h3 { margin: 0 0 .65rem; font-size: 1.14rem; text-transform: uppercase; }
article p { margin: .5rem 0; }
article ul { padding-left: 1.1rem; }
article button { width: 100%; margin-top: .6rem; }
.fixture-teams { display: grid; gap: .35rem; margin: 0; padding: 0; list-style: none; }
.fixture-teams li { padding: .5rem .65rem; background: #fff9; border: 1px solid #0002; }
.fixture-teams .winner { background: var(--lime); font-weight: 900; }
.fixture-status { font-size: .9rem; font-weight: 750; }
.fixture-status.live { color: #9b1129; }
.rewards article { display: grid; gap: .3rem; }
.rewards strong { font: 2.2rem/1 var(--heavy); }

footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .8rem;
  padding: 1.5rem max(1.5rem, calc((100% - 1120px) / 2));
  background: #212121;
  color: white;
}
footer a:hover { text-decoration: underline; }

dialog {
  width: min(92vw, 470px);
  padding: 1.25rem;
  background: var(--paper) url("./event-art/paper-frame.webp");
  border: 6px solid #fff;
  box-shadow: 0 0 0 2px #161616, 0 15px 45px #0008;
  color: var(--ink);
}
dialog::backdrop { background: #000a; }
dialog h2 { font-size: 1.8rem; overflow-wrap: anywhere; }
dialog .close { width: 44px; min-height: 44px; font-size: 1.55rem; }
#reward-dialog { width: min(92vw, 730px); }
#claim { margin-top: .65rem; }
form { display: grid; gap: .75rem; margin-top: 1rem; }
form span { overflow-wrap: anywhere; line-height: 1.5; }
input { width: 100%; margin-top: .3rem; padding: .7rem; border: 2px solid #333; background: #fff; color: var(--ink); }

@media (max-width: 990px) {
  .reward-stage { grid-template-columns: 215px minmax(0, 1fr); }
  .reward-track { margin-right: 0; }
  .grid.rooms { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .site-header { top: 14px; width: calc(100% - 1.5rem); }
  .site-logo { max-width: 124px; }
  .reward-hero { height: 358px; background-position: center, 20%, center top; background-size: cover, auto 150%, 400px 400px; }
  .reward-stage { display: block; width: calc(100% - 2rem); }
  .reward-copy { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin-top: 91px; }
  .reward-copy h1 { margin: 0; font-size: clamp(2rem, 8vw, 2.8rem); }
  .reward-copy button { min-width: 84px; }
  .reward-track { margin-top: 42px; }
  .reward-doodle { display: none; }
  .reward-crown { width: 56px; top: -42px; right: -5px; }
  .reward-card { height: 69px; width: 89%; padding: 4px; }
  .final-prize .reward-card { height: 82px; }
  .point-badge { min-width: 33px; height: 33px; font-size: .83rem; }
  .reward-milestones::before { bottom: 13px; left: -2%; }
  .star { max-width: 60px; opacity: .85; }
  .star-left, .star-left-small, .star-right-top, .star-right-small, .star-left-inner { display: none; }
  .event-carousel { padding-block: 62px 30px; }
  .event-carousel::before { top: -24px; height: 66px; background-size: auto 66px; }
  .event-carousel::after { width: 180px; height: 170px; }
  .carousel-stage { width: calc(100% - 6.3rem); border-width: 7px; }
  .event-slide { inset: -7px; border-width: 7px; }
  .event-slide figcaption { top: -23px; min-width: 74px; padding: 5px 8px 10px; font-size: .83rem; }
  .carousel-arrow { width: 40px; min-height: 40px; top: calc(50% - 20px); }
  .carousel-arrow.previous { right: calc(100% + 9px); }
  .carousel-arrow.next { left: calc(100% + 9px); }
  .carousel-action { top: 62%; padding: 4px; border-width: 2px; }
  .carousel-action .game-button { min-width: 0; min-height: 39px; padding: .4rem .55rem; font-size: .76rem; }
}

@media (max-width: 540px) {
  .grid, .grid.rooms { grid-template-columns: minmax(0, 1fr); }
  .rewards article { grid-template-columns: 1fr auto; align-items: center; }
  .rewards article span:last-child { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .event-slide { transition: none; }
}
