.voice-preview {
  position: relative;
  z-index: 5;
  background: #f8f6f0;
  border-top: 1px solid var(--line);
  padding: clamp(48px, 7vw, 100px) max(clamp(16px, 8vw, 132px), calc((100% - 1160px) / 2));
  scroll-margin-top: 82px;
}

.voice-preview-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid #e0dacf;
  border-radius: clamp(18px, 3vw, 34px);
  padding: clamp(22px, 4.2vw, 60px);
  background: radial-gradient(ellipse at 50% 0%, #fffefa, transparent 68%), #f1eee7;
}

.voice-preview-heading {
  margin-bottom: clamp(16px, 2.6vw, 30px);
  text-align: center;
}

.voice-preview-heading h2 {
  font-size: clamp(32px, 5vw, 66px);
  font-weight: 400;
  letter-spacing: -.068em;
  line-height: 1;
}

.voice-preview-heading p {
  margin-top: 11px;
  color: #615a52;
  font-size: clamp(14px, 1.4vw, 16px);
  line-height: 1.5;
}

.voice-preview-languages {
  display: flex;
  width: fit-content;
  max-width: 100%;
  gap: 3px;
  margin: 0 auto clamp(18px, 3vw, 36px);
  border: 1px solid #ded8ce;
  border-radius: 24px;
  padding: 3px;
  background: #ebe7de;
  scroll-margin-top: 96px;
}

.voice-preview-languages legend,
.voice-preview-languages input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.voice-preview-languages span {
  display: grid;
  min-width: clamp(60px, 24vw, 86px);
  min-height: 44px;
  place-items: center;
  border-radius: 20px;
  padding-inline: 12px;
  color: #544c43;
  font-size: 14px;
  cursor: pointer;
}

.voice-preview-languages input:checked + span {
  background: #fffdf8;
  box-shadow: 0 1px 3px #3a2b2322;
  color: #231d1b;
}

.voice-preview-languages input:focus-visible + span {
  outline: 2px solid #765248;
  outline-offset: -2px;
}

.voice-preview-gallery[hidden] { display: none; }

.voice-preview-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(12px, 2.1vw, 26px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.voice-preview-card {
  min-width: 0;
  border: 1px solid #ded8ce;
  border-radius: clamp(12px, 1.8vw, 22px);
  background: #fffdf8a8;
  transition: border-color .25s, background-color .25s;
}

.voice-preview-card:focus-within,
.voice-preview-card[data-state="playing"] {
  border-color: var(--voice-dark);
  background: #fffdf8;
}

.voice-preview-card[data-voice="heart"] {
  --voice-light: #ffd3a1; --voice-base: #f46b46; --voice-dark: #a83445; --voice-luster: #ffb7bb;
}
.voice-preview-card[data-voice="bella"] {
  --voice-light: #f8c6fa; --voice-base: #af7ae2; --voice-dark: #5e4dab; --voice-luster: #98c9ff;
}
.voice-preview-card[data-voice="michael"] {
  --voice-light: #baf3dd; --voice-base: #5ab5ab; --voice-dark: #255c82; --voice-luster: #b1eabd;
}
.voice-preview-card[data-voice="emma"] {
  --voice-light: #ffe8a5; --voice-base: #efad52; --voice-dark: #a44a40; --voice-luster: #f9b187;
}
.voice-preview-card[data-voice="george"] {
  --voice-light: #c0dffb; --voice-base: #679be7; --voice-dark: #394d9c; --voice-luster: #c9cbff;
}
.voice-preview-card[data-voice="fable"] {
  --voice-light: #ffd3e2; --voice-base: #ea80ad; --voice-dark: #9b3d73; --voice-luster: #fdbbad;
}

.voice-preview-card[data-voice="seoyeon"] {
  --voice-light: #ffe3be; --voice-base: #e99180; --voice-dark: #a94c72; --voice-luster: #fca5ae;
}
.voice-preview-card[data-voice="jiho"] {
  --voice-light: #d9f1b6; --voice-base: #80b96e; --voice-dark: #386c5c; --voice-luster: #bbead8;
}
.voice-preview-card[data-voice="yuna"] {
  --voice-light: #fbd3f8; --voice-base: #d989df; --voice-dark: #744497; --voice-luster: #ffe8c9;
}
.voice-preview-card[data-voice="minjun"] {
  --voice-light: #b3edf9; --voice-base: #579cbd; --voice-dark: #285274; --voice-luster: #a5d9e8;
}
.voice-preview-card[data-voice="haeun"] {
  --voice-light: #ffe7aa; --voice-base: #eaae64; --voice-dark: #955648; --voice-luster: #f7d49b;
}
.voice-preview-card[data-voice="dohyun"] {
  --voice-light: #ded5ff; --voice-base: #9a8ac9; --voice-dark: #4e4385; --voice-luster: #b7c4f2;
}

.voice-preview-card[data-voice="uz-lola"] {
  --voice-light: #ccf9e8; --voice-base: #44c9bd; --voice-dark: #186a79; --voice-luster: #a4ddff;
}
.voice-preview-card[data-voice="uz-mirza"] {
  --voice-light: #ffd8b9; --voice-base: #d77a57; --voice-dark: #8a4350; --voice-luster: #ffc3a1;
}
.voice-preview-card[data-voice="uz-nigi"] {
  --voice-light: #f0f9bd; --voice-base: #a0c364; --voice-dark: #4f6940; --voice-luster: #d7f2b4;
}
.voice-preview-card[data-voice="uz-sodiq-aka"] {
  --voice-light: #ffeab8; --voice-base: #dd9d40; --voice-dark: #885236; --voice-luster: #f3cc8a;
}
.voice-preview-card[data-voice="uz-dilya"] {
  --voice-light: #fbd7f4; --voice-base: #c684bf; --voice-dark: #6e4b99; --voice-luster: #f8aed5;
}
.voice-preview-card[data-voice="uz-farik"] {
  --voice-light: #cbecff; --voice-base: #689fdf; --voice-dark: #304c82; --voice-luster: #b7e9eb;
}

.voice-preview-play {
  display: grid;
  position: relative;
  width: 100%;
  place-items: center;
  border: 0;
  border-radius: inherit;
  padding: clamp(14px, 2.3vw, 31px) 6px clamp(12px, 1.8vw, 24px);
  color: #26201e;
  background: transparent;
  cursor: pointer;
}

.voice-preview-play:disabled { cursor: default; }
.voice-preview-play:focus-visible,
.voice-preview-download:focus-visible {
  outline: 2px solid var(--voice-dark);
  outline-offset: -4px;
}

.voice-preview-orb {
  grid-area: 1 / 1;
  position: relative;
  display: block;
  width: min(83%, 218px);
  aspect-ratio: 1;
  overflow: hidden;
  isolation: isolate;
  border-radius: 50%;
  background: var(--voice-base);
  box-shadow:
    0 16px 32px -14px color-mix(in srgb, var(--voice-dark) 60%, transparent),
    0 0 24px color-mix(in srgb, var(--voice-base) 23%, transparent);
  transform: scale(calc(1 + var(--voice-level, 0) * .065));
}

.voice-preview-orb::after {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 1px 1px #fff5, inset -9px -9px 24px #32113527;
  content: "";
}

.voice-preview-pigment {
  position: absolute;
  inset: -16%;
  background:
    radial-gradient(ellipse at 32% 26%, var(--voice-light) 6%, transparent 42%),
    radial-gradient(ellipse at 73% 48%, var(--voice-luster) 3%, transparent 34%),
    radial-gradient(ellipse at 32% 74%, var(--voice-dark) 8%, transparent 46%),
    conic-gradient(from 38deg, var(--voice-base), var(--voice-dark), var(--voice-base), var(--voice-light), var(--voice-base));
}

.voice-preview-card:nth-child(2n) .voice-preview-pigment { rotate: 30deg; }
.voice-preview-card:nth-child(3n) .voice-preview-pigment { rotate: -65deg; }

.voice-preview-play:not(:disabled):hover .voice-preview-pigment,
.voice-preview-card[data-state="playing"] .voice-preview-pigment {
  animation: voice-preview-drift 6s ease-in-out infinite alternate;
}

@keyframes voice-preview-drift {
  from { transform: rotate(0deg) scale(1.02); }
  to { transform: rotate(62deg) scale(1.16); }
}

.voice-preview-play-circle {
  grid-area: 1 / 1;
  z-index: 1;
  display: grid;
  width: clamp(39px, 4.5vw, 56px);
  aspect-ratio: 1;
  place-items: center;
  border-radius: 50%;
  background: #fffdf8;
  box-shadow: 0 2px 12px #45293324;
  transition: transform .2s;
}

.voice-preview-play:not(:disabled):hover .voice-preview-play-circle { transform: scale(1.09); }

.voice-preview-play-icon {
  margin-left: 3px;
  border-block: 6px solid transparent;
  border-left: 10px solid currentColor;
}

.voice-preview-card:is([data-state="playing"], [data-state="loading"]) .voice-preview-play-icon {
  width: 10px;
  height: 12px;
  margin-left: 0;
  border: solid currentColor;
  border-width: 0 3px;
}

.voice-preview-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2px;
  padding: 0 clamp(8px, 1.7vw, 23px) clamp(8px, 1.3vw, 17px);
}

.voice-preview-caption h3 {
  margin: 0;
  font-size: clamp(15px, 1.8vw, 22px);
  font-weight: 500;
  letter-spacing: -.035em;
  line-height: 1.12;
}

.voice-preview-caption p {
  margin: 4px 0 0;
  color: #615a52;
  font-size: clamp(11px, 1.1vw, 13px);
  line-height: 1.3;
}

.voice-preview-download {
  display: grid;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 50%;
  color: #514940;
  text-decoration: none;
}

.voice-preview-download span {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid #e0dacf;
  border-radius: 50%;
  font-size: 17px;
  line-height: 1;
}

.voice-preview-download:hover span { background: #eae5da; }

.voice-preview-status:not(:empty) {
  margin-top: 15px;
  color: #615a52;
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}

@media (max-width: 700px) {
  .voice-preview { padding-inline: clamp(12px, 3.5vw, 24px); }
  .voice-preview-shell { padding: 28px clamp(8px, 2.6vw, 16px) 18px; }
  .voice-preview-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .voice-preview-orb { width: min(82%, 175px); }
}

@media (prefers-reduced-motion: reduce) {
  .voice-preview-card, .voice-preview-play-circle { transition: none; }
  .voice-preview-orb, .voice-preview-play:not(:disabled):hover .voice-preview-play-circle { transform: none; }
  .voice-preview-play:not(:disabled):hover .voice-preview-pigment,
  .voice-preview-card[data-state="playing"] .voice-preview-pigment { animation: none; }
}
