:root {
  font-size: 16px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  padding: 16px;
  color: #73ff87;
  font-family: "Courier New", Courier, monospace;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(0, 0, 0, 0.28)),
    radial-gradient(circle at 15% 12%, rgba(255, 255, 255, 0.22), transparent 48%),
    #000000 url("images/bliss.jpg") center / cover no-repeat fixed;
}

a {
  color: inherit;
}

.splash-card,
.keygen-titlebar,
.event-header,
.event-subtitle,
.section-tabs,
.section-tab,
.player-bar,
.winamp-controls,
.kgm-nowplaying,
.site-footer {
  -webkit-user-select: none;
  user-select: none;
}

.content-md,
.content-md * {
  -webkit-user-select: text;
  user-select: text;
}

.container {
  width: min(100%, 43rem);
  margin: 0 auto;
}

/* Splash */
.splash-page {
  display: grid;
  place-items: center;
  padding: 20px;
}

.splash-card {
  width: min(100%, 31rem);
  border: 2px solid #0a0a0a;
  background: linear-gradient(180deg, #d9d9d9 0%, #bdbdbd 58%, #a9a9a9 100%);
  box-shadow:
    0 0 0 2px #f3f3f3 inset,
    4px 4px 0 #00000055;
  text-align: center;
  padding: 0.9rem 1rem 1.1rem;
}

.splash-tag {
  margin: 0;
  padding: 0.28rem 0.4rem;
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0) 42%),
    linear-gradient(90deg, #001f6b, #0053a6 55%, #2b89d5);
}

.splash-title {
  margin: 0.78rem 0 0.35rem;
  color: #ffffff;
  text-shadow: 1px 1px 0 #000000;
  font-size: clamp(1.8rem, 7vw, 2.6rem);
  letter-spacing: 0.04em;
}

.splash-copy {
  margin: 0 0 0.65rem;
  color: #133022;
  font-weight: 700;
}

.splash-actions {
  display: flex;
  gap: 0.55rem;
  justify-content: center;
  flex-wrap: wrap;
}

.splash-btn {
  display: inline-block;
  min-width: 9.5rem;
  padding: 0.45rem 0.6rem;
  text-decoration: none;
  border: 1px solid #111111;
  border-top-color: #f2f2f2;
  border-left-color: #f2f2f2;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #ffffff;
  text-shadow: 1px 1px 0 #000000;
}

.splash-btn-rich {
  background: linear-gradient(180deg, #286fc4 0%, #0f3f7d 100%);
}

.splash-btn-basic {
  background: linear-gradient(180deg, #2b7d3e 0%, #0f3f18 100%);
}

.splash-note {
  margin: 0.75rem 0 0;
  font-size: 0.73rem;
  color: #1f4a30;
}

/* Party */
.lan-shell {
  padding-top: 1rem;
  text-align: center;
}

.keygen-window {
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  min-height: clamp(34rem, 84vh, 45rem);
  border: 2px solid #0a0a0a;
  background: linear-gradient(180deg, #d9d9d9 0%, #bdbdbd 58%, #a9a9a9 100%);
  box-shadow:
    0 0 0 2px #f3f3f3 inset,
    0 1px 0 #ffffffcc inset,
    4px 4px 0 #00000055;
  text-align: left;
}

.keygen-titlebar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.28rem 0.52rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0) 42%),
    linear-gradient(90deg, #001f6b, #0053a6 55%, #2b89d5);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.keygen-close-btn {
  display: inline-grid;
  place-items: center;
  width: 1.2rem;
  height: 1.05rem;
  border: 1px solid #f0c7c7;
  border-radius: 2px;
  background: linear-gradient(180deg, #d96363 0%, #c34141 52%, #962121 100%);
  color: #ffffff;
  text-decoration: none;
  box-shadow:
    0 0 0 1px #8e1b1b inset,
    0 1px 0 #ffffff44 inset;
}

.keygen-close-btn i {
  font-size: 0.68rem;
  line-height: 1;
}

.keygen-close-btn:hover {
  background: linear-gradient(180deg, #e27676 0%, #cd4d4d 52%, #a62727 100%);
}

.keygen-close-btn:active {
  border-color: #8e1b1b;
  box-shadow:
    0 0 0 1px #f0c7c7 inset,
    0 1px 0 #00000022 inset;
}

.keygen-body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  padding: 0.6rem 0.7rem;
  background:
    linear-gradient(180deg, rgba(30, 76, 42, 0.32), rgba(0, 0, 0, 0) 22%),
    linear-gradient(180deg, #0b0f0c, #070a08 70%);
  color: #73ff87;
  border-top: 1px solid #1b1b1b;
}

.event-header {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 1fr);
  align-items: center;
  gap: 0.32rem;
  margin-bottom: 0.55rem;
}

.event-title-area {
  min-width: 0;
}

.event-title-picture {
  display: block;
}

.event-title-image {
  display: block;
  width: 100%;
  max-width: min(100%, 34rem);
  max-height: clamp(2.4rem, 9.8vw, 4.4rem);
  height: auto;
  object-fit: contain;
  object-position: left center;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.event-subtitle {
  margin: 0.24rem 0 0;
  color: #d9ffd8;
  font-size: clamp(0.82rem, 2.25vw, 1.02rem);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-shadow: 1px 1px 0 #000000;
}

.event-title-text {
  margin: 0;
  padding: 0.38rem 0.5rem;
  border: 1px solid #2a5f39;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0) 42%),
    #0f1f18;
  color: #d9ffd8;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.event-bell {
  width: clamp(2.9rem, 14vw, 5.6rem);
  max-width: none;
  height: auto;
  justify-self: end;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.mode-rich .event-bell {
  filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.25)) drop-shadow(0 0 6px rgba(255, 255, 120, 0.2));
}

.divider-image {
  display: block;
  width: 100%;
  max-height: 18px;
  object-fit: fill;
  margin: 0.2rem 0 0.55rem;
}

.divider-line {
  border: 0;
  border-top: 1px dashed #2f7f3d;
  margin: 0.2rem 0 0.55rem;
}

.event-copy p {
  margin: 0 0 0.42rem;
  color: #73ff87;
  font-size: 0.89rem;
  line-height: 1.35;
}

.event-copy p:first-child {
  color: #d9ffd8;
}

.section-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  border: 1px solid #24422d;
  border-bottom: 0;
  background: #09120f;
}

.section-tab {
  appearance: none;
  border: 0;
  border-right: 1px solid #24422d;
  background: linear-gradient(180deg, #e7e7e7 0%, #bcbcbc 54%, #9f9f9f 100%);
  color: #001408;
  font-family: "Courier New", Courier, monospace;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 0.28rem 0.48rem;
  cursor: pointer;
  box-shadow: 0 1px 0 #ffffffaa inset;
}

.section-tab:last-child {
  border-right: 0;
}

.section-tab.is-active {
  background: linear-gradient(180deg, #9dd09f 0%, #6bab74 60%, #4f8e5a 100%);
  color: #001408;
  box-shadow: 0 0 0 1px #224e2e inset;
}

.event-copy {
  position: relative;
  flex: 1 1 auto;
  min-height: 12rem;
  border: 1px solid #24422d;
  border-top: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0) 36%),
    #09120f;
  padding: 0.45rem 0.52rem;
  overflow-y: auto;
  margin: 0 0 0.55rem;
}

.event-visualizer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.22;
  pointer-events: none;
  z-index: 0;
}

.content-md {
  position: relative;
  z-index: 1;
}

.content-md h1,
.content-md h2,
.content-md h3 {
  margin: 0 0 0.44rem;
  color: #d9ffd8;
  font-size: 0.94rem;
}

.content-md p {
  margin: 0 0 0.4rem;
  color: #73ff87;
  font-size: 0.89rem;
  line-height: 1.35;
}

.content-md ul {
  margin: 0 0 0.46rem 1.1rem;
  padding: 0;
}

.content-md li {
  margin: 0 0 0.3rem;
  color: #73ff87;
  font-size: 0.88rem;
  line-height: 1.32;
}

.content-md a {
  color: #d9ffd8;
  text-decoration: underline;
}

.content-md .md-image {
  display: block;
  width: min(100%, 14rem);
  height: auto;
  margin: 0.32rem auto 0.56rem;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.content-md.is-gallery p {
  text-align: center;
}

.content-md.is-gallery p:last-of-type {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem;
  align-items: start;
  margin-top: 0.5rem;
}

.content-md.is-gallery p:last-of-type .md-image {
  width: 100%;
  max-width: 10.5rem;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  margin: 0 auto;
}

.content-md.is-contact p:first-of-type {
  margin-bottom: 0.55rem;
}

.content-md.is-contact a {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  border: 1px solid #f2f2f2;
  background: linear-gradient(180deg, #5f77f1 0%, #4a5dd1 58%, #2f3f96 100%);
  color: #ffffff;
  text-decoration: none;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.42) inset,
    0 1px 0 rgba(255, 255, 255, 0.24) inset;
}

.content-md.is-contact a::before {
  content: "\f392";
  font-family: "Font Awesome 6 Brands";
  font-size: 0.84rem;
  line-height: 1;
}

.content-md.is-contact a:hover {
  filter: brightness(1.08);
}

.content-md.is-attend p:last-of-type a {
  display: block;
  width: min(100%, 16rem);
  margin: 0.65rem auto 0;
  padding: 0.46rem 0.58rem;
  border: 1px solid #9ee39f;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0) 45%),
    linear-gradient(180deg, #18672a 0%, #0f3f18 100%);
  color: #d9ffd8;
  text-align: center;
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.2) inset;
}

.content-md.is-attend p:last-of-type a:hover {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0) 45%),
    linear-gradient(180deg, #1d7830 0%, #144f20 100%);
  color: #ffffff;
}

.player-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.34rem 0.52rem;
  border-top: 1px solid #1d2623;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0) 45%),
    linear-gradient(180deg, #101f1a, #0a1411);
}

.party-page #kgm-player {
  display: none !important;
}

.party-page.mode-rich #kgm-player {
  display: flex !important;
}

.kgm-nowplaying {
  --kgm-progress: 0%;
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
  border: 1px solid #223533;
  background:
    linear-gradient(
      90deg,
      rgba(84, 205, 112, 0.36) 0%,
      rgba(84, 205, 112, 0.36) var(--kgm-progress),
      rgba(0, 0, 0, 0) var(--kgm-progress),
      rgba(0, 0, 0, 0) 100%
    ),
    #09120f;
  color: #d9ffd8;
  font-size: 0.74rem;
  letter-spacing: 0.03em;
  white-space: nowrap;
  overflow: hidden;
  padding: 0.16rem 0.32rem;
  cursor: pointer;
}

.kgm-nowplaying-text {
  display: inline-block;
  transform: translateX(0);
  will-change: transform;
}

.kgm-nowplaying.scrolling .kgm-nowplaying-text {
  animation: nowplaying-bounce var(--scroll-duration, 6s) linear infinite alternate;
}

@keyframes nowplaying-bounce {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(calc(-1 * var(--scroll-shift, 0px)));
  }
}

.winamp-controls {
  display: flex;
  align-items: center;
  gap: 0.26rem;
  flex-wrap: nowrap;
}

.winamp-btn {
  appearance: none;
  border: 1px solid #111111;
  border-top-color: #f2f2f2;
  border-left-color: #f2f2f2;
  background: linear-gradient(180deg, #e7e7e7 0%, #bcbcbc 54%, #9f9f9f 100%);
  color: #000000;
  font-family: "Courier New", Courier, monospace;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 1px 0 #ffffffaa inset;
}

.winamp-btn:active {
  border-top-color: #111111;
  border-left-color: #111111;
  border-right-color: #f2f2f2;
  border-bottom-color: #f2f2f2;
}

.winamp-btn-icon {
  width: 1.45rem;
  height: 1.45rem;
  padding: 0;
  display: grid;
  place-items: center;
  line-height: 1;
}

.winamp-btn-icon i {
  font-size: 0.72rem;
  line-height: 1;
}

.winamp-btn-icon.is-disabled,
.winamp-btn-icon[aria-disabled="true"] {
  opacity: 0.56;
  pointer-events: none;
}

.winamp-volume {
  width: 4.3rem;
  accent-color: #48d06c;
}

.site-footer {
  margin-top: 0.36rem;
  text-align: center;
  color: #e8f6ff;
  text-shadow: 1px 1px 0 #000000;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
}

.site-footer-label {
  color: #e8f6ff;
}

.site-footer-counter-box {
  display: inline-block;
  margin: 0 0.34rem;
  padding: 0.05rem 0.24rem;
  border: 1px solid #2b2b2b;
  background: #000000;
  box-shadow: 0 0 0 1px #111111 inset;
}

.site-footer-count {
  display: inline-block;
  min-width: 6.3rem;
  color: #73ff87;
  font-family: "Courier New", Courier, monospace;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-shadow: 0 0 5px rgba(115, 255, 135, 0.45);
}

.mode-basic .rich-only {
  display: none !important;
}

.mode-rich .basic-only {
  display: none !important;
}

@media (max-width: 34.375rem) {
  body {
    padding: 6px;
  }

  .container {
    width: 100%;
  }

  .lan-shell {
    padding-top: 0;
  }

  .event-header {
    grid-template-columns: minmax(0, 4.5fr) minmax(0, 1fr);
    gap: 0.2rem;
  }

  .event-title-image {
    max-height: clamp(2.9rem, 13vw, 4.8rem);
  }

  .event-subtitle {
    font-size: clamp(0.78rem, 2.8vw, 0.96rem);
  }

  .event-bell {
    width: clamp(2.4rem, 13vw, 3.8rem);
  }

  .player-bar {
    flex-wrap: wrap;
  }

  .kgm-nowplaying {
    flex: 1 1 100%;
  }

  .winamp-volume {
    width: 4rem;
  }

  .keygen-window {
    min-height: min(40rem, calc(100vh - 4.8rem));
    min-height: min(40rem, calc(100dvh - 4.8rem));
  }

  .section-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .content-md p,
  .content-md li {
    font-size: 0.84rem;
  }

}
