:root {
  --record-large: 216px;
  --record-small: 216px;
  --record-active-size: 256px;
  --center-unit-width: 449px;
  --center-unit-height: 474px;
  --bottom-actions-hover: #ff8a00;
  --focus-grey: #3a3a3a;
}

@font-face {
  font-family: "Advercase Demo";
  src: url("./indieground-advercasefont-demo/Advercase-Font-Demo-Italic.otf") format("opentype");
  font-style: italic;
  font-weight: 400;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  overflow: hidden;
  overscroll-behavior: none;
  background:
    radial-gradient(circle at 50% 34%, rgba(239, 235, 229, 0.94), transparent 42vw),
    linear-gradient(145deg, #efebe5 0%, #e6e0d7 48%, #dbd4ca 100%);
  color: #505158;
  font-family:
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Helvetica Neue",
    Helvetica,
    Arial,
    sans-serif;
}

#viewport {
  position: fixed;
  inset: 0;
  overflow: scroll;
  cursor: grab;
  scrollbar-width: none;
  touch-action: none;
  -ms-overflow-style: none;
  background:
    radial-gradient(circle at 50% 34%, rgba(239, 235, 229, 0.94), transparent 42vw),
    linear-gradient(145deg, #efebe5 0%, #e6e0d7 48%, #dbd4ca 100%);
}

#viewport::-webkit-scrollbar {
  display: none;
}

#viewport.is-dragging {
  cursor: grabbing;
}

#world {
  position: relative;
  width: 200000px;
  height: 200000px;
  transform-origin: var(--zoom-origin-x, 50%) var(--zoom-origin-y, 50%);
  transition: transform 220ms cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}

#viewport.is-holding-canvas #world {
  transform: scale(0.94);
}

#grid {
  position: absolute;
  inset: 0;
}

.bottom-actions {
  position: fixed;
  left: 50%;
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 4px;
  height: 52px;
  padding: 2px;
  border-radius: 24px;
  background: #25242b;
  transform: translateX(-50%) scale(0.9);
  transform-origin: center bottom;
}

.bottom-actions__button {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  margin: 0;
  border: 0;
  background: transparent;
  color: #ffffff;
  font-family: "Advercase Demo", serif;
  font-size: 16px;
  font-style: italic;
  font-weight: 400;
  line-height: 16.64px;
  letter-spacing: 0.32px;
  white-space: nowrap;
  appearance: none;
  cursor: pointer;
  transition: color 160ms ease;
}

.bottom-actions__button:first-child {
  padding: 8px 10px 8px 24px;
}

.bottom-actions__button:last-child {
  padding: 8px 24px 8px 10px;
}

.bottom-actions__icon {
  display: block;
  width: 24px;
  height: 24px;
  transition: filter 160ms ease;
}

.bottom-actions__button:hover {
  color: var(--bottom-actions-hover);
}

.bottom-actions__button:hover .bottom-actions__icon {
  filter: brightness(0) saturate(100%) invert(56%) sepia(91%) saturate(1847%) hue-rotate(3deg) brightness(103%) contrast(104%);
}

.bottom-actions__divider {
  display: block;
  width: 34px;
  height: 34px;
}

.vinyl {
  position: absolute;
  width: var(--record-size);
  height: var(--record-size);
  border: 0;
  border-radius: 50%;
  padding: 0;
  background: transparent;
  cursor: pointer;
  opacity: 0;
  overflow: visible;
  transform: translate(-50%, -50%) scale(0.86);
  transform-origin: center;
  transition:
    opacity 620ms ease,
    transform 680ms cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 300ms cubic-bezier(0.25, 0.8, 0.25, 1);
  transition-delay: var(--entry-delay), 0s, 0s;
  box-shadow:
    2px 3px 3px 2.5px rgba(42, 35, 27, 0.13),
    -1px -1px 1px rgba(255, 255, 255, 0.36);
}

.vinyl::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: calc(var(--record-size) + 160px);
  height: calc(var(--record-size) + 160px);
  transform: translate(-50%, -50%);
}

.vinyl.is-visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.vinyl.is-visible .vinyl__surface {
  animation: vinyl-entry-appear 420ms ease-out;
}

.vinyl:hover,
.vinyl.is-playing {
  opacity: 1;
  transform: translate(-50%, -50%) scale(calc(var(--record-active-size) / var(--record-size)));
  box-shadow:
    2px 3px 3px 2.5px rgba(42, 35, 27, 0.16),
    -1px -1px 1px rgba(255, 255, 255, 0.4);
}

.vinyl:focus-visible {
  outline: none;
}

.vinyl__surface {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  overflow: hidden;
  transform-origin: center;
  transition: filter 280ms ease;
}

.vinyl.is-playing .vinyl__surface {
  animation: vinyl-spin 8s linear infinite;
}

.vinyl__skin {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
  background:
    var(--skin-overlay, none),
    var(--skin-image, none),
    var(--skin-base, #0b0b0b);
  background-position: center;
  background-size: auto, 112% 112%, 106% 106%;
  clip-path: circle(49.7% at 50% 50%);
  pointer-events: none;
  -webkit-mask-image: radial-gradient(circle at center, transparent 0 17.1%, #000 17.3% 100%);
  mask-image: radial-gradient(circle at center, transparent 0 17.1%, #000 17.3% 100%);
}

.vinyl__cover {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  width: 57.888%;
  height: 57.888%;
  border-radius: 50%;
  background: linear-gradient(135deg, #d7d0c5, #f1ede5) center / cover no-repeat;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.34),
    inset 0 0 18px rgba(71, 52, 33, 0.14),
    0 1px 3px rgba(0, 0, 0, 0.14);
  filter: saturate(0.94) contrast(0.98);
  overflow: hidden;
  transform: translate(-50%, -50%);
}

.vinyl__cover::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 11%;
  height: 11%;
  border-radius: 50%;
  background: #ffffff;
  box-shadow:
    0 0 0 1px rgba(42, 35, 27, 0.1),
    inset 0 0 2px rgba(42, 35, 27, 0.08);
  transform: translate(-50%, -50%);
}

.vinyl__surface::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    linear-gradient(118deg, rgba(255, 255, 255, 0.36), transparent 16% 53%, rgba(255, 255, 255, 0.16) 58%, transparent 76%),
    radial-gradient(circle at center, transparent 0 8%, rgba(255, 255, 255, 0.16) 8.5% 10%, transparent 10.5% 100%),
    repeating-radial-gradient(circle at center, rgba(255, 255, 255, 0.12) 0 1px, rgba(0, 0, 0, 0.1) 1px 2px, transparent 2px 12px),
    conic-gradient(
      from 18deg,
      transparent 0 8%,
      rgba(255, 255, 255, 0.1) 9% 10%,
      transparent 11% 24%,
      rgba(255, 255, 255, 0.08) 25% 26%,
      transparent 27% 44%,
      rgba(0, 0, 0, 0.08) 45% 47%,
      transparent 48% 69%,
      rgba(255, 255, 255, 0.09) 70% 72%,
      transparent 73% 100%
    ),
    radial-gradient(circle at center, transparent 0 62%, rgba(0, 0, 0, 0.18) 100%);
  mix-blend-mode: soft-light;
  pointer-events: none;
  z-index: 4;
  clip-path: circle(50% at 50% 50%);
  -webkit-mask-image: radial-gradient(circle at center, transparent 0 5%, #000 5.2% 100%);
  mask-image: radial-gradient(circle at center, transparent 0 5%, #000 5.2% 100%);
}

.vinyl::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background:
    radial-gradient(circle at 10% 22%, rgba(255, 255, 255, 0.42) 0 1px, transparent 1.8px),
    radial-gradient(circle at 13% 45%, rgba(0, 0, 0, 0.16) 0 1px, transparent 1.7px),
    radial-gradient(circle at 20% 88%, rgba(255, 255, 255, 0.24) 0 1px, transparent 1.7px),
    radial-gradient(circle at 38% 4%, rgba(255, 255, 255, 0.28) 0 1px, transparent 1.7px),
    radial-gradient(circle at 74% 96%, rgba(0, 0, 0, 0.16) 0 1px, transparent 1.7px),
    radial-gradient(circle at 96% 58%, rgba(255, 255, 255, 0.24) 0 1px, transparent 1.8px),
    conic-gradient(
      from 6deg,
      rgba(255, 255, 255, 0.22),
      transparent 8% 20%,
      rgba(0, 0, 0, 0.18) 22%,
      transparent 25% 41%,
      rgba(255, 255, 255, 0.2) 43%,
      transparent 46% 63%,
      rgba(0, 0, 0, 0.14) 66%,
      transparent 69% 84%,
      rgba(255, 255, 255, 0.2) 87%,
      transparent 90%
    );
  pointer-events: none;
  z-index: 5;
  -webkit-mask-image: radial-gradient(circle at center, transparent 0 94.8%, #000 95%);
  mask-image: radial-gradient(circle at center, transparent 0 94.8%, #000 95%);
}

.vinyl__caption {
  position: absolute;
  left: 50%;
  top: calc(100% + 14px);
  z-index: 6;
  display: flex;
  width: max-content;
  max-width: 255px;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: #505158;
  font-family: "Google Sans", Arial, sans-serif;
  font-size: 13.6px;
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: 0;
  opacity: 0;
  pointer-events: none;
  text-align: center;
  transform: translateX(-50%) translateY(-4px);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.vinyl:hover .vinyl__caption,
.vinyl.is-playing .vinyl__caption,
.vinyl.is-selected .vinyl__caption {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.vinyl__caption-title {
  font-weight: 400;
}

.vinyl__message-block {
  display: none;
  max-width: 220px;
  margin-top: 6px;
  color: #9a9aa5;
  font-family: "Google Sans", Arial, sans-serif;
  font-size: 13.2px;
  font-weight: 400;
  line-height: 1.45;
  letter-spacing: 0;
  text-align: center;
  white-space: normal;
  word-break: normal;
  overflow-wrap: break-word;
  transition:
    opacity 260ms ease,
    transform 260ms cubic-bezier(0.16, 1, 0.3, 1);
}

.vinyl__message {
  display: block;
  color: inherit;
}

.vinyl__message-name {
  display: block;
  margin-top: 4px;
  color: inherit;
  font-family: "Google Sans", Arial, sans-serif;
  font-size: 13.2px;
  font-weight: 400;
  line-height: 1.35;
}

.vinyl.is-selected .vinyl__message-block {
  display: block;
}

.vinyl__message-block.is-exiting-to-bottom {
  opacity: 0;
  transform: translateY(14px);
}

.vinyl__message-block.is-entering-from-top {
  animation: message-slide-in-from-top 260ms cubic-bezier(0.16, 1, 0.3, 1);
}

.center-intro {
  position: absolute;
  width: var(--center-unit-width);
  min-height: var(--center-unit-height);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
  padding: 44px 24px 24px;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.96);
  transition:
    opacity 620ms ease,
    transform 680ms cubic-bezier(0.16, 1, 0.3, 1);
}

.center-intro.is-visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.center-intro__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
}

.center-intro__title-art {
  position: relative;
  width: 353.682px;
  height: 226.116px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.center-intro__title-image {
  position: absolute;
  left: 50%;
  top: 50%;
  display: block;
  transform: translate(-50%, -50%);
  transition: opacity 220ms ease;
}

.center-intro__title-image--default {
  width: 353.682px;
  height: 226.116px;
  opacity: 1;
}

.center-intro__title-image--hover {
  width: 284.303px;
  height: 196.257px;
  opacity: 0;
}

.center-intro__title-art:hover .center-intro__title-image--default {
  opacity: 0;
}

.center-intro__title-art:hover .center-intro__title-image--hover {
  opacity: 1;
}

.center-intro__copy {
  width: 328px;
  margin: 0;
  color: #505158;
  font-family: "Google Sans", Arial, sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 25.28px;
  letter-spacing: 0;
  text-align: center;
  overflow-wrap: break-word;
}

.center-intro__drag-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 24px;
  background: #ebebeb;
  color: #505158;
  font-family: "Google Sans", Arial, sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 21.76px;
  letter-spacing: 0;
  text-align: center;
}

.center-intro__drag-icon {
  display: block;
  width: 18px;
  height: 18px;
  animation: center-drag-icon-swing 3.6s ease-in-out infinite;
  transform-origin: center;
}

.share-form-popup {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
  visibility: hidden;
}

.share-form-popup.is-open {
  pointer-events: auto;
  visibility: visible;
}

.share-form-popup__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.28);
  opacity: 0;
  transition: opacity 220ms ease;
}

.share-form-popup.is-open .share-form-popup__backdrop {
  opacity: 1;
}

.song-form-shell {
  position: relative;
  z-index: 1;
  display: flex;
  width: min(602px, calc(100vw - 32px));
  min-height: 680px;
  max-height: calc(100svh - 24px);
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  padding: 43px 32px 32px;
  border-radius: 16px 16px 0 0;
  background: #ffffff;
  color: #111111;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform 280ms ease;
}

.share-form-popup.is-open .song-form-shell {
  transform: translateY(0);
}

.song-form-main,
.song-form-header,
.song-form,
.field {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.song-form-main {
  position: relative;
  gap: 12px;
}

.song-form-header {
  gap: 10px;
}

.song-form-header__icon {
  display: block;
  width: 30px;
  height: 30px;
}

.song-form-shell h1 {
  width: 387px;
  height: 68px;
  margin: 0;
  color: #000000;
  font-family: "Advercase Demo", serif;
  font-size: 42px;
  font-style: italic;
  font-weight: 400;
  line-height: 49.92px;
  letter-spacing: -0.96px;
}

.song-form-close {
  position: absolute;
  top: 0;
  left: 493px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #000000;
  font-family: "Advercase Demo", serif;
  font-size: 13px;
  font-style: italic;
  line-height: 14px;
  letter-spacing: -0.2px;
  text-decoration: underline;
  cursor: pointer;
}

.song-form {
  width: 538px;
  gap: 24px;
}

.field {
  width: 100%;
  gap: 6px;
}

.field.has-error input,
.field.has-error textarea {
  border-color: #d92d20;
}

.field__label {
  color: #414651;
  font-family: "Google Sans", Arial, sans-serif;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
}

.field__label em {
  color: #7f56d9;
  font-style: normal;
}

.song-form input,
.song-form textarea {
  width: 100%;
  border: 1px solid #d5d7da;
  border-radius: 8px;
  color: #717680;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(10, 13, 18, 0.05);
  font-family: "Google Sans", Arial, sans-serif;
  font-size: 16px;
  line-height: 24px;
}

.song-form input:disabled {
  background: #f5f5f5;
  border-color: #e9eaeb;
  color: #c2c5cb;
  box-shadow: none;
  cursor: not-allowed;
}

.song-form input {
  height: 40px;
  padding: 8px 12px;
}

.song-form textarea {
  height: 152px;
  resize: none;
  padding: 12px 14px;
}

.field--textarea {
  min-height: 180px;
  margin-bottom: 10px;
}

.field__error {
  min-height: 16px;
  margin-top: -2px;
  color: #d92d20;
  font-family: "Google Sans", Arial, sans-serif;
  font-size: 12px;
  line-height: 16px;
}

.field--checkbox {
  flex-direction: row;
  align-items: center;
  gap: 8px;
  margin-top: -18px;
}

.field--checkbox input[type="checkbox"] {
  width: 16px;
  height: 16px;
  min-width: 16px;
  border: 1px solid #d5d7da;
  border-radius: 4px;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(10, 13, 18, 0.05);
  accent-color: #7f56d9;
  cursor: pointer;
}

.field__checkbox-label {
  color: #414651;
  font-family: "Google Sans", Arial, sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  cursor: pointer;
}

.field.is-hidden {
  display: none;
}

.textarea-wrap {
  position: relative;
  display: block;
  width: 100%;
}

.textarea-resize {
  position: absolute;
  right: 5px;
  bottom: 5px;
  width: 12px;
  height: 12px;
}

.submit-button {
  display: inline-flex;
  width: 193px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 24px 10px;
  border: 0;
  border-radius: 24px;
  background: #25242b;
  color: #ffffff;
  font-family: "Advercase Demo", serif;
  font-size: 14px;
  font-style: italic;
  cursor: pointer;
}

.submit-button img {
  width: 20px;
  height: 20px;
}

@media (max-width: 480px) {
  .center-intro {
    width: min(var(--center-unit-width), 100vw);
    padding: 16px;
  }

  .center-intro__title-art {
    width: min(353.682px, 100%);
    height: auto;
    aspect-ratio: 353.682 / 226.116;
  }

  .center-intro__title-image--default {
    width: 100%;
    height: 100%;
  }

  .center-intro__title-image--hover {
    width: min(284.303px, 80.3838%);
    height: auto;
  }

  .center-intro__copy {
    width: min(328px, 100%);
  }
}

@media (max-width: 760px) {
  .bottom-actions {
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  }

  .song-form-shell {
    width: min(642px, calc(100vw - 32px));
    min-height: auto;
    gap: 40px;
    padding: 28px 20px calc(24px + env(safe-area-inset-bottom, 0px));
  }

  .song-form-main {
    width: 100%;
    height: auto;
    gap: 32px;
  }

  .song-form-shell h1 {
    width: auto;
    height: auto;
    font-size: 36px;
    line-height: 40px;
  }

  .song-form-close {
    left: auto;
    right: 0;
  }

  .song-form {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .bottom-actions {
    transform: translateX(-50%) scale(1);
  }

  .bottom-actions__button:first-child {
    padding: 8px 8px 8px 16px;
  }

  .bottom-actions__button:last-child {
    padding: 8px 16px 8px 8px;
  }
}

@media (hover: none) {
  .bottom-actions__button:active {
    color: var(--bottom-actions-hover);
  }

  .bottom-actions__button:active .bottom-actions__icon {
    filter: brightness(0) saturate(100%) invert(56%) sepia(91%) saturate(1847%) hue-rotate(3deg) brightness(103%) contrast(104%);
  }
}


.char-counter {
  align-self: flex-end;
  color: #adb3bc;
  font-family: "Google Sans", Arial, sans-serif;
  font-size: 12px;
  line-height: 16px;
  transition: color 120ms ease;
}

.char-counter.is-over-limit {
  color: #d92d20;
  font-weight: 500;
}

.spotify-widget {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 2px;
  height: 2px;
  overflow: hidden;
  opacity: 0.01;
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: -1;
}

.spotify-widget iframe {
  width: 2px;
  height: 2px;
  border: 0;
}

@keyframes vinyl-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes vinyl-entry-appear {
  0% {
    opacity: 0;
    transform: scale(0.96);
  }

  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes center-drag-icon-swing {
  0%,
  100% {
    transform: rotate(0deg);
  }

  50% {
    transform: rotate(20deg);
  }
}

@keyframes message-slide-in-from-top {
  0% {
    opacity: 0;
    transform: translateY(-14px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}
