* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  background: radial-gradient(ellipse at center, #f8f1fb, #e3d4ef);
  color: #634587;
  font-family: system-ui, sans-serif;
}

.card {
  position: relative;
  isolation: isolate;
  container-type: inline-size;
  width: min(100%, 850px, 89svh);
}

@media (max-width: 600px) {
  .card { width: 100%; }
}

.art {
  display: block;
  width: 100%;
  height: auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.player > button {
  position: absolute;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.player > button:focus-visible, input:focus-visible {
  outline: 2px solid #6d4b97;
  outline-offset: 2px;
}

.play {
  left: 21.15%;
  top: 65.85%;
  width: 13.3%;
  height: 12.6%;
  border-radius: 50%;
}

.play-face {
  display: grid;
  place-items: center;
  width: 45%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #fffaff;
  color: #9273b5;
}

.play-face::before {
  content: "";
  width: 42%;
  height: 45%;
  margin-inline-start: 7%;
  background: currentColor;
  clip-path: polygon(7% 0, 100% 50%, 7% 100%);
  border-radius: 20%;
}

.play.is-playing .play-face::before {
  margin-inline-start: 0;
  clip-path: polygon(0 0, 34% 0, 34% 100%, 0 100%, 0 0, 66% 0, 100% 0, 100% 100%, 66% 100%, 66% 0);
  border-radius: 0;
}

.timeline {
  position: absolute;
  left: 36.95%;
  top: 75.35%;
  width: 36.55%;
  height: 3.7%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 0.5cqw;
  background: #f5effa;
  box-shadow: 0 0 0.65cqw 0.5cqw #f5effa;
  border-radius: 0.6cqw;
}

.timeline input {
  --progress: 0%;
  appearance: none;
  display: block;
  width: 100%;
  height: max(9px, 1.55cqw);
  margin: 0;
  background: transparent;
  color: #a183c1;
  cursor: pointer;
}

.timeline input::-webkit-slider-runnable-track {
  height: max(2px, 0.46cqw);
  border-radius: 20px;
  background: linear-gradient(to right, #a183c1 var(--progress), #d4c6e3 var(--progress));
}

.timeline input::-moz-range-track {
  height: max(2px, 0.46cqw);
  border-radius: 20px;
  background: linear-gradient(to right, #a183c1 var(--progress), #d4c6e3 var(--progress));
}

.timeline input::-webkit-slider-thumb {
  appearance: none;
  width: max(6px, 1.1cqw);
  height: max(6px, 1.1cqw);
  margin-top: min(-2px, -0.32cqw);
  border-radius: 50%;
  background: #a183c1;
}

.timeline input::-moz-range-thumb {
  width: max(6px, 1.1cqw);
  height: max(6px, 1.1cqw);
  border: 0;
  border-radius: 50%;
  background: #a183c1;
}

.times {
  display: flex;
  justify-content: space-between;
  font-size: clamp(9px, 1.46cqw, 14px);
  line-height: 1;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  color: #775694;
}

.sound {
  left: 74.7%;
  top: 75.15%;
  width: 5%;
  height: 3.65%;
  min-width: 24px;
  min-height: 24px;
  transform: translate(-8%, -7%);
  border-radius: 20%;
}

.sound[aria-pressed="true"] .mute-mark {
  width: 47%;
  height: 2px;
  border-radius: 2px;
  background: #775694;
  transform: rotate(-45deg) translate(-13%, -22%);
}

.status {
  position: absolute;
  left: 37%;
  top: 70.2%;
  width: 37%;
  margin: 0;
  border-radius: 0.6em;
  background: #f9f3fc;
  font-size: clamp(11px, 2cqw, 17px);
  text-align: center;
}

.status:empty { display: none; }

@font-face {
  font-family: "Ma Shan Zheng";
  src: url("assets/ma-shan-zheng-birthday.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

.greeting {
  position: absolute;
  top: 80.9%;
  left: 21.8%;
  width: 54.5%;
  height: 7.6%;
  display: grid;
  place-items: center;
}

.greeting::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(#eadcf3, #eee4f7 31%, #f1e9f8 65%, #f3ebf9);
  mask-image: linear-gradient(to right, transparent, #000 3%, #000 97%, transparent),
              linear-gradient(to bottom, transparent, #000 13%, #000 86%, transparent);
  mask-composite: intersect;
}

.greeting p {
  position: relative;
  margin: 0;
  color: #75449c;
  font: 400 8.4cqw/1 "Ma Shan Zheng", "Kaiti SC", KaiTi, STKaiti, serif;
  letter-spacing: 0.06em;
  text-indent: 0.06em;
  white-space: nowrap;
  text-shadow: 0 0.045em 0 #fff9ff, 0 0 0.16em #fff;
}
