@font-face {
  font-family: Plex;
  src: url('/plex-regular.ttf') format('truetype');
  font-display: swap;
}
@font-face {
  font-family: Plex;
  src: url('/plex-semibold.ttf') format('truetype');
  font-weight: 600 900;
  font-display: swap;
}
:root {
  color-scheme: dark;
  --ink: #f4e9d6;
  --quiet: #dbd0bf;
  --accent: #ff8a32;
  --line: #e3ccb957;
  font: 16px/1.4 Plex, system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: #15191d; color: var(--ink); }
button, input { font: inherit; }
#stage {
  position: relative;
  isolation: isolate;
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  justify-items: center;
  align-items: center;
  gap: clamp(1.15rem, 3vh, 2.4rem);
  padding: clamp(1.25rem, 3.4vh, 2.75rem) 1.25rem clamp(1.3rem, 5.7vh, 4.2rem);
}
.city, .weather { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.city {
  z-index: -3;
  background: #24292d url('/southside-night.jpg') center center / cover no-repeat;
}
.city::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 53%, #100f0ee8 0%, #101010a8 27%, #10111334 63%),
    linear-gradient(180deg, #10101124 45%, #10101277 100%);
}
.weather { z-index: -2; }
.launch {
  display: flex;
  align-items: center;
  gap: clamp(1.1rem, 3vw, 3rem);
  padding: .55rem clamp(1.8rem, 4vw, 3.5rem);
  background: #23211fe6;
  border-inline-start: .43rem solid #db7025;
  transform: skewX(-18deg);
}
.launch > * { transform: skewX(18deg); }
.launch time { white-space: nowrap; font-size: clamp(.9rem, 1.75vw, 1.35rem); font-weight: 600; }
.countdown {
  display: flex;
  justify-content: center;
  padding-inline-start: clamp(1rem, 3vw, 2.7rem);
  border-inline-start: 1px solid #df772e;
}
.countdown div { position: relative; display: grid; justify-items: center; min-width: clamp(2.6rem, 5vw, 4.5rem); }
.countdown div + div::before { content: ':'; position: absolute; left: -.2em; top: 0; font-size: 1.3rem; }
.countdown b { font-size: clamp(1.35rem, 2.4vw, 2.1rem); line-height: 1; font-variant-numeric: tabular-nums; }
.countdown span { font-size: .77rem; color: var(--quiet); }
.registration { width: min(100%, 45rem); text-align: center; margin-bottom: clamp(0rem, 4vh, 3rem); }
.logo { display: block; width: min(78%, 27rem); height: clamp(3.4rem, 12.8vh, 7.4rem); object-fit: contain; margin: auto; }
.game { margin: .3rem 0 clamp(.55rem, 2vh, 1.35rem); font-size: .79rem; letter-spacing: .28em; text-transform: uppercase; color: var(--quiet); }
h1 { margin: 0; font-size: clamp(1.8rem, 5.25vw, 4.25rem); line-height: 1.04; letter-spacing: -.045em; font-weight: 600; }
h1::after { content: ''; display: block; width: 3rem; height: .23rem; background: #e47626; margin: clamp(.7rem, 2vh, 1.2rem) auto clamp(1.5rem, 4vh, 2.65rem); }
form, .community { width: min(100%, clamp(24rem, 33vw, 34rem)); margin-inline: auto; }
form { text-align: left; }
.field { position: relative; margin-bottom: .66rem; }
.field label { position: absolute; top: .35rem; left: .95rem; color: var(--quiet); font-size: .76rem; pointer-events: none; }
input {
  display: block;
  width: 100%;
  min-height: 2.85rem;
  padding: .55rem .9rem;
  border: 1px solid var(--line);
  border-radius: .32rem;
  background: #3a3632ed;
  color: var(--ink);
}
.field input { min-height: clamp(2.85rem, 6vh, 3.4rem); padding: 1.1rem .9rem .28rem; }
input::placeholder { color: #c5b8a7; }
summary, a { color: var(--ink); text-decoration: underline; text-underline-offset: .2em; cursor: pointer; }
summary { width: fit-content; list-style: none; font-size: .93rem; }
summary::-webkit-details-marker { display: none; }
.lookup { display: flex; gap: .5rem; margin-top: .55rem; }
.lookup button { border: 1px solid var(--line); background: #2a2724; border-radius: .28rem; color: var(--ink); padding-inline: .9rem; cursor: pointer; }
.submit {
  display: block;
  width: 100%;
  min-height: clamp(3rem, 6.5vh, 3.9rem);
  margin-top: clamp(1.25rem, 3.4vh, 2.25rem);
  padding: .5rem 1rem;
  border: 0;
  border-radius: 0;
  clip-path: polygon(4% 0, 100% 0, 97% 89%, 96% 100%, 0 100%, 2.5% 12%);
  color: #18110b;
  background: var(--accent);
  font-size: clamp(1.12rem, 2.25vw, 1.6rem);
  font-weight: 600;
  cursor: pointer;
}
.submit:hover:enabled { background: #ffa258; }
.submit:disabled { opacity: .66; cursor: default; }
:focus-visible { outline: 2px solid #ffd298; outline-offset: 3px; }
.submit:focus-visible { outline-offset: -6px; }
#status, #lookupStatus { margin: .45rem 0 0; font-size: .88rem; }
#status:empty, #lookupStatus:empty { margin: 0; }
[data-error='true'] { color: #ffb89f; }
.community { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: .6rem 1.1rem; margin-top: clamp(.75rem, 2.5vh, 1.45rem); font-size: .94rem; }
.discord-link:not([hidden]) {
  display: inline-flex;
  align-items: center;
  justify-self: end;
  gap: .5rem;
  padding: .55rem .75rem;
  border: 1px solid var(--line);
  border-radius: .3rem;
  background: #211c18e8;
  color: var(--ink);
  font-size: .88rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.discord-link:hover { border-color: var(--accent); }
.discord-link svg { color: var(--accent); flex: none; }
.rewards { width: min(100%, 53rem); }
.rewards h2 { margin: 0 0 .72rem; color: var(--quiet); text-align: center; font-size: .95rem; font-weight: 600; }
.invite { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: .75rem 1.4rem; margin-top: 1rem; padding: .8rem 0 0; border-top: 1px solid var(--line); }
.invite p, .invited { margin: 0; color: var(--quiet); font-size: .88rem; }
.invite strong { display: block; color: var(--ink); margin-bottom: .16rem; font-size: 1rem; }
.invite button, .share button { padding: .48rem .8rem; border: 1px solid #dc783b; border-radius: .25rem; color: var(--ink); background: #211812; cursor: pointer; }
.invited { margin-top: .5rem; color: var(--accent); }
#inviteStatus { margin: .3rem 0 0; font-size: .85rem; }
#inviteStatus:empty { margin: 0; }
#inviteDialog { width: min(28rem, calc(100% - 2rem)); color: var(--ink); border: 1px solid var(--line); border-radius: .5rem; background: #211c18; }
#inviteDialog::backdrop { background: #080706b3; }
.share { width: 100%; }
.share input { margin-bottom: .65rem; }
.rewards ul { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: .75rem 1.45rem; margin: 0; padding: 0; list-style: none; }
.rewards li { display: flex; align-items: center; gap: .65rem; font-size: clamp(.92rem, 1.75vw, 1.4rem); line-height: 1.12; text-shadow: 0 2px 6px #000; }
.rewards li + li { padding-inline-start: 1.45rem; border-inline-start: 1px solid var(--line); }
.rewards strong span { display: block; font-size: .83em; margin-top: .18rem; }
.reward-art { display: block; flex: 0 0 auto; width: 3.35rem; height: 2.85rem; background-position: center; background-size: contain; background-repeat: no-repeat; }
.cash { background-image: url('/reward-cash.png'); }
.premium { background-image: url('/reward-premium.png'); }
.case { background-image: url('/reward-case.png'); }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 640px) {
  #stage { padding-inline: 1rem; }
  .city { background-position: 45% center; }
  .city::after { background: linear-gradient(#14131160, #141311b0 36%, #14131196); }
  .launch { gap: .55rem; padding-inline: 1.25rem; flex-wrap: wrap; justify-content: center; }
  .countdown { padding-inline-start: 0; border-inline-start: 0; }
  .countdown div { min-width: 2.85rem; }
  .logo { width: 75%; height: clamp(3.4rem, 9.5vh, 5.5rem); }
  .rewards { width: 100%; }
  .registration { margin-bottom: 0; }
  .invite { gap: .55rem; margin-top: .7rem; }
  .invite p { font-size: .79rem; }
  .invite button { font-size: .8rem; padding: .45rem .55rem; }
  .rewards ul { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; align-items: start; }
  .rewards li { flex-direction: column; font-size: .82rem; text-align: center; gap: .25rem; padding-inline: .25rem; }
  .rewards li + li { padding-inline: .25rem; }
  .reward-art { width: 2rem; height: 1.7rem; }
}
@media (max-height: 840px) {
  #stage { gap: .85rem; padding-block: .9rem 1rem; }
  .registration { margin-bottom: 0; }
  .logo { height: clamp(3.25rem, 9.5vh, 5.1rem); }
  .game { margin-bottom: .65rem; }
  h1::after { margin-block: .65rem 1.15rem; }
  .submit { margin-top: 1.05rem; }
  .community { margin-top: .7rem; }
  .invite { margin-top: .6rem; padding-top: .55rem; }
}
@media (min-width: 1200px) {
  .discord-link { position: absolute; right: 1.25rem; bottom: 1rem; }
}
@media (min-width: 641px) and (max-height: 840px) {
  #stage { gap: .6rem; padding-block: .75rem; }
  .logo { height: clamp(3.25rem, 8.2vh, 4.6rem); }
}
@media (prefers-reduced-motion: reduce) { .weather { display: none; } }
