@import url("footer.css");

:root {
  color-scheme: light;
  --bg: #f6f0e8;
  --ink: #1b1530;
  --muted: #655d73;
  --coral: #f27b62;
  --line: #1b1530;
  --paper: #fffdf9;
  --peach: #fde4d4;
  --sky: #d7eefc;
  --lilac: #e7e0f8;
  --mint: #dcf3df;
  --ready: #d9f5c8;
  font-family: Outfit, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--ink);
  background-color: var(--bg);
  background-image:
    radial-gradient(rgba(27, 21, 48, 0.16) 1.1px, transparent 1.2px),
    linear-gradient(115deg, rgba(246, 240, 232, 0.2), rgba(214, 228, 244, 0.85));
  background-size: 22px 22px, 100% 100%;
}

a { color: inherit; }

.nav, .hero, .stats, .shelf, .waiting, .legal {
  width: min(1080px, calc(100% - 32px));
  margin-inline: auto;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 22px;
  padding: 22px 0 8px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
  text-decoration: none;
}

.brand strong {
  font-size: 1.2rem;
  letter-spacing: -0.03em;
}

.section-head p, .lede, .muted, .hint {
  color: var(--muted);
}

.mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background:
    linear-gradient(var(--paper), var(--paper)) 9px 9px / 10px 10px no-repeat,
    linear-gradient(var(--paper), var(--paper)) 23px 9px / 10px 10px no-repeat,
    linear-gradient(var(--paper), var(--paper)) 9px 23px / 10px 10px no-repeat,
    linear-gradient(var(--coral), var(--coral)) 23px 23px / 10px 10px no-repeat,
    var(--ink);
}

.nav-pill, .nav-note {
  margin: 0;
}

.nav-pill, .chip, .search button, .back, .open-tab, .go, .wait, .status {
  border: 2px solid var(--line);
  border-radius: 999px;
}

.nav-pill {
  background: var(--ink);
  color: white;
  text-decoration: none;
  padding: 8px 16px;
  font-weight: 600;
}

.hero { padding: 28px 0 8px; }

.live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  padding: 6px 12px 6px 10px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  font-weight: 600;
  font-size: 0.92rem;
}

.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #3aaa5a;
}

h1, h2, .player-bar h1, .waiting h2 {
  font-family: Fraunces, Georgia, serif;
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 0.95;
}

h1 {
  margin: 0;
  max-width: 14ch;
  font-size: clamp(3.4rem, 8vw, 6.2rem);
}

h1 em, h2 em {
  font-style: italic;
  font-weight: 620;
  color: var(--coral);
}

.lede {
  max-width: 36rem;
  margin: 18px 0 0;
  font-size: 1.08rem;
  line-height: 1.5;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin-top: 32px;
  padding: 18px 8px;
  background: var(--ink);
  color: white;
  border-radius: 28px;
}

.stats p {
  margin: 0;
  padding: 8px 0;
  text-align: center;
}

.stats p + p { border-left: 1px solid rgba(255, 255, 255, 0.16); }

.stats strong {
  display: block;
  color: var(--coral);
  font-family: Fraunces, Georgia, serif;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.04em;
}

.stats span {
  display: block;
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.shelf { padding-top: 42px; }

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 16px;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3rem);
}

.section-head p { margin: 0; }

.search {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 18px 0 14px;
}

.search label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.search input {
  flex: 1 1 240px;
  border: 2.5px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  border-radius: 999px;
  padding: 14px 18px;
  font: inherit;
  font-size: 1rem;
}

.search button, .back, .open-tab {
  padding: 12px 18px;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.search button, .back {
  background: var(--paper);
  color: var(--ink);
}

.clear { color: var(--muted); font-weight: 600; }

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.chip {
  background: var(--paper);
  padding: 7px 12px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
}

.chip.is-on {
  background: var(--coral);
  color: white;
}

.scatter {
  position: relative;
  min-height: 520px;
  margin: 10px 0 36px;
  padding: 18px 0 48px;
  list-style: none;
}

.card {
  position: absolute;
  z-index: 1;
  width: min(340px, calc(100% - 20px));
  margin: 0;
  padding: 0;
  border: 2.5px solid var(--line);
  border-radius: 28px;
  box-shadow: 8px 8px 0 var(--ink);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.card:hover,
.card:focus-within {
  z-index: 3;
  transform: translate(-3px, -3px) rotate(0deg) !important;
  box-shadow: 10px 10px 0 var(--ink);
}

.card-hit {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px 18px 16px;
  color: inherit;
  text-decoration: none;
}

.card-hit.is-soon {
  cursor: default;
}

.card-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
}

.card-copy strong {
  font-size: 1.45rem;
  letter-spacing: -0.035em;
  line-height: 1.1;
}

.tone-peach { background: var(--peach); }
.tone-sky { background: var(--sky); }
.tone-lilac { background: var(--lilac); }
.tone-mint { background: var(--mint); }

.glyph {
  display: grid;
  place-items: center;
  flex: none;
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: rgba(255, 253, 249, 0.62);
  color: var(--ink);
}

.glyph svg { width: 38px; height: 38px; }

.status, .go, .wait {
  display: inline-block;
  width: fit-content;
  margin: 0;
  padding: 6px 14px;
  border: 2px solid var(--line);
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.2;
}

.status { background: var(--paper); }

.status-ready, .go {
  background: var(--ready);
  color: var(--ink);
}

.go { text-decoration: none; }

.scatter .card:nth-child(1) { top: 4%; left: 0%; transform: rotate(-2.2deg); }
.scatter .card:nth-child(2) { top: 0%; left: 48%; transform: rotate(1.8deg); }
.scatter .card:nth-child(3) { top: 36%; left: 52%; transform: rotate(-1.4deg); }
.scatter .card:nth-child(4) { top: 44%; left: 2%; transform: rotate(2deg); }
.scatter .card:nth-child(5) { top: 68%; left: 34%; transform: rotate(-1.8deg); }

.scatter .card[data-slot="0"] { top: 4%; left: 0%; transform: rotate(-2.2deg); }
.scatter .card[data-slot="1"] { top: 0%; left: 48%; transform: rotate(1.8deg); }
.scatter .card[data-slot="2"] { top: 36%; left: 52%; transform: rotate(-1.4deg); }
.scatter .card[data-slot="3"] { top: 44%; left: 2%; transform: rotate(2deg); }
.scatter .card[data-slot="4"] { top: 68%; left: 34%; transform: rotate(-1.8deg); }
.scatter .card[data-slot="5"] { top: 20%; left: 26%; transform: rotate(1.2deg); }
.scatter .card[data-slot="6"] { top: 58%; left: 58%; transform: rotate(-2deg); }
.scatter .card[data-slot="7"] { top: 76%; left: 12%; transform: rotate(1.5deg); }

@media (max-width: 760px) {
  .scatter {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    min-height: 0;
    padding: 4px 0 20px;
  }

  .card {
    position: static;
    max-width: none;
    width: 100%;
    transform: none !important;
  }

  .card:hover,
  .card:focus-within {
    transform: translate(-3px, -3px) !important;
  }
}

.foot { margin: 26px 0 48px; line-height: 1.5; }

code {
  font-family: Consolas, monospace;
  font-size: 0.92em;
}

.empty, .waiting { padding-bottom: 56px; }

.waiting { padding-top: 28px; }

.waiting h2, .waiting h1 {
  margin: 12px 0;
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  max-width: 16ch;
}

.closed {
  flex: 1;
  width: min(720px, calc(100% - 48px));
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 36px;
  text-align: center;
  padding: 48px 0 72px;
}

.closed h1 {
  margin: 0;
  max-width: 11em;
  font-size: clamp(2.8rem, 6vw, 4.4rem);
  line-height: 1.05;
}

body > main { flex: 1; }

.legal { padding-top: 18px; padding-bottom: 24px; }

.legal h1 {
  margin: 0;
  max-width: 16ch;
  font-size: clamp(2.8rem, 6vw, 4.4rem);
}

.legal h2 {
  margin: 28px 0 8px;
  font-size: 1.7rem;
}

.legal p { max-width: 40rem; line-height: 1.55; }

.player-body {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto auto minmax(280px, 1fr) auto;
}

.player-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  align-items: center;
  width: min(1100px, calc(100% - 24px));
  margin: 18px auto 0;
}

.player-bar h1 {
  margin: 0;
  flex: 1;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
}

.open-tab { background: var(--ink); color: white; }

.hint {
  width: min(1100px, calc(100% - 24px));
  margin: 10px auto;
}

iframe {
  width: min(1100px, calc(100% - 24px));
  height: 100%;
  min-height: 280px;
  margin: 0 auto 16px;
  border: 2.5px solid var(--line);
  border-radius: 22px;
  background: white;
}

pre {
  overflow: auto;
  padding: 16px;
  background: var(--paper);
  border: 2.5px solid var(--line);
  border-radius: 16px;
  white-space: pre-wrap;
}

input:focus-visible, button:focus-visible, a:focus-visible {
  outline: 3px solid var(--coral);
  outline-offset: 3px;
}

@media (max-width: 720px) {
  .stats { grid-template-columns: 1fr 1fr; border-radius: 22px; }
  .stats p:nth-child(3) { border-left: 0; }
  .stats p:nth-child(odd) { border-left: 0; }
  .stats p:nth-child(even) { border-left: 1px solid rgba(255, 255, 255, 0.16); }
  .stats p:nth-child(n + 3) { border-top: 1px solid rgba(255, 255, 255, 0.16); }
}
