:root {
  --bg-top: #fff8fb;
  --bg-bottom: #ffe6ef;
  --panel: rgba(255, 255, 255, 0.82);
  --body: #ffd2e1;
  --body-deep: #ff93b8;
  --body-shadow: #f5789e;
  --body-highlight: #fff1f7;
  --accent: #ff7cab;
  --line: #74445f;
  --slot: #21284c;
  --slot-edge: #ffb6d0;
  --status-bg: rgba(255, 249, 252, 0.9);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: start center;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 20px 16px 40px;
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.92), transparent 30%),
    radial-gradient(circle at 80% 18%, rgba(255, 183, 211, 0.34), transparent 24%),
    radial-gradient(circle at bottom right, rgba(255, 134, 177, 0.16), transparent 28%),
    linear-gradient(180deg, var(--bg-top), var(--bg-bottom));
  color: #3a2a22;
}

body::before,
body::after {
  content: "";
  position: fixed;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.32);
  filter: blur(4px);
  pointer-events: none;
}

body::before {
  width: 320px;
  height: 320px;
  top: -90px;
  left: -80px;
}

body::after {
  width: 460px;
  height: 460px;
  bottom: -160px;
  right: -120px;
}

.frame {
  width: min(920px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 40px 28px 52px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 36px;
  background: var(--panel);
  box-shadow:
    0 28px 50px rgba(187, 117, 150, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
}

.title {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 3.2rem);
  line-height: 1;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.subtitle {
  margin: 12px 0 0;
  font-size: clamp(0.95rem, 2vw, 1.1rem);
  color: rgba(58, 42, 34, 0.74);
}

.controls-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 28px;
}

.control-group {
  padding: 18px 20px;
  border-radius: 22px;
  background: rgba(255, 248, 239, 0.82);
  border: 1px solid rgba(255, 176, 130, 0.38);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.control-label {
  display: block;
  margin: 0 0 12px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(58, 42, 34, 0.58);
}

.radio-group {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.radio-card {
  position: relative;
  display: block;
  cursor: pointer;
}

.radio-card input {
  position: absolute;
  inset: 0;
  opacity: 0;
}

.radio-card span {
  display: grid;
  place-items: center;
  min-height: 56px;
  padding: 12px 10px;
  border-radius: 18px;
  border: 1px solid rgba(255, 176, 130, 0.55);
  background: rgba(255, 255, 255, 0.72);
  font-weight: 700;
  transition: transform 120ms ease, background-color 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}

.radio-card input:checked + span {
  background: linear-gradient(180deg, #ffd7bc 0%, #ffb58b 100%);
  border-color: rgba(240, 93, 50, 0.78);
  box-shadow: 0 10px 18px rgba(240, 93, 50, 0.12);
  transform: translateY(-2px);
}

.radio-card input:focus-visible + span {
  outline: 3px solid rgba(255, 139, 94, 0.28);
  outline-offset: 2px;
}

.volume-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
}

#volume-control {
  width: 100%;
  accent-color: #f05d32;
}

.volume-value {
  min-width: 48px;
  font-weight: 700;
  text-align: right;
}

.showcase {
  display: grid;
  place-items: center;
  margin-top: 36px;
  padding: 52px 0 0;
  overflow: visible;
}

.otamatone {
  position: relative;
  width: clamp(170px, 24vw, 230px);
  aspect-ratio: 0.44;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.note-head {
  order: 2;
  position: relative;
  width: 82%;
  margin-top: -18px;
  aspect-ratio: 1;
  border-radius: 48% 48% 44% 44% / 50% 50% 46% 46%;
  background:
    radial-gradient(circle at 34% 20%, rgba(255, 255, 255, 0.82) 0 14%, transparent 15%),
    radial-gradient(circle at 42% 10%, rgba(255, 255, 255, 0.5) 0 20%, transparent 21%),
    linear-gradient(180deg, #ffe4ef 0%, var(--body) 58%, var(--body-deep) 100%);
  border: none;
  box-shadow:
    inset -18px -22px 26px rgba(245, 120, 158, 0.32),
    inset 12px 16px 22px rgba(255, 255, 255, 0.44),
    0 18px 28px rgba(204, 122, 156, 0.2);
  z-index: 2;
}

.note-head::before {
  content: "";
  position: absolute;
  width: 18%;
  height: 22%;
  top: -10%;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 24px 24px 14px 14px;
  background: linear-gradient(180deg, #ffc8dc 0%, #ff9ebf 100%);
  box-shadow:
    inset 0 8px 12px rgba(255, 255, 255, 0.34),
    inset -8px 0 12px rgba(245, 120, 158, 0.24);
}

.note-head::after {
  content: "";
  position: absolute;
  inset: auto 10% 6% 10%;
  height: 24%;
  border-radius: 999px;
  background: radial-gradient(circle at 50% 0, rgba(255, 255, 255, 0.4), transparent 72%);
  filter: blur(10px);
  opacity: 0.85;
}

.face {
  position: absolute;
  inset: 0;
}

.face::before,
.face::after {
  content: "";
  position: absolute;
  bottom: 30%;
  width: 14%;
  height: 10%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 136, 193, 0.7) 0%, rgba(255, 136, 193, 0.38) 58%, transparent 72%);
}

.face::before {
  left: 16%;
}

.face::after {
  right: 16%;
}

.eye {
  position: absolute;
  top: 31%;
  width: 11%;
  height: 25%;
  background: linear-gradient(180deg, #71c0ff 0%, #4987ff 58%, #1f2f93 100%);
  border: 2px solid #555176;
  border-radius: 48% 48% 44% 44% / 34% 34% 66% 66%;
  box-shadow:
    inset -4px -8px 0 rgba(28, 47, 136, 0.35),
    inset 0 8px 10px rgba(255, 255, 255, 0.2);
}

.eye.left {
  left: 31%;
  transform: rotate(8deg);
}

.eye.right {
  right: 31%;
  transform: rotate(-8deg);
}

.eye::before {
  content: "";
  position: absolute;
  top: 8%;
  left: 18%;
  width: 40%;
  height: 28%;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
}

.eye::after {
  content: "";
  position: absolute;
  bottom: 10%;
  left: 12%;
  width: 76%;
  height: 42%;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(28, 47, 136, 0) 0%, rgba(22, 35, 109, 0.95) 100%);
}

.mouth {
  position: absolute;
  left: 50%;
  bottom: 24%;
  width: 78%;
  height: 12%;
  transform: translateX(-50%);
  background: transparent;
  border: none;
  border-bottom: 3px solid #7b4358;
  border-radius: 0 0 90px 90px;
  overflow: visible;
  box-shadow: none;
  transition: border-bottom-width 120ms ease, transform 120ms ease;
}

.mouth::before {
  content: "";
  position: absolute;
  right: -2%;
  bottom: -5px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff6c86;
}

.is-playing .mouth {
  border-bottom-width: 4px;
  transform: translateX(-50%) scaleY(1.08);
}

.stem {
  order: 1;
  position: relative;
  width: 20%;
  flex: 1;
  margin-bottom: -10px;
  border: none;
  border-radius: 28px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.48) 0 10%, transparent 10% 74%, rgba(245, 120, 158, 0.22) 74% 100%),
    linear-gradient(180deg, #ffcde0 0%, #ffa8c5 50%, #ff8fb7 100%);
  box-shadow:
    inset 10px 0 14px rgba(255, 255, 255, 0.34),
    inset -10px 0 16px rgba(245, 120, 158, 0.3),
    0 16px 26px rgba(204, 122, 156, 0.12);
  z-index: 1;
}

.stem::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: calc(100% - 4px);
  width: 248%;
  height: 118px;
  transform: translateX(-16%) rotate(1deg);
  border-radius: 56px 118px 96px 118px / 46px 88px 76px 94px;
  background:
    radial-gradient(circle at 34% 20%, rgba(255, 255, 255, 0.44) 0 16%, transparent 17%),
    linear-gradient(180deg, #ffb5d1 0%, #ff9fc0 38%, #ff7baa 100%);
  box-shadow:
    inset 10px 12px 16px rgba(255, 255, 255, 0.26),
    inset -12px -14px 18px rgba(245, 120, 158, 0.3),
    0 14px 22px rgba(208, 113, 154, 0.16);
}

.stem::after {
  content: "";
  position: absolute;
  top: -6px;
  left: 50%;
  width: 136%;
  height: 18px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.66), rgba(255, 155, 194, 0.92));
  box-shadow:
    inset 0 2px 3px rgba(255, 255, 255, 0.55),
    inset 0 -3px 4px rgba(245, 120, 158, 0.28);
}

.play-strip {
  position: absolute;
  top: 10%;
  bottom: 9%;
  left: 50%;
  width: 46%;
  transform: translateX(-50%);
  border-radius: 999px;
  background: linear-gradient(180deg, #2b315c 0%, var(--slot) 100%);
  border: 3px solid var(--slot-edge);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.12),
    inset 0 8px 12px rgba(255, 255, 255, 0.06),
    0 0 0 3px rgba(255, 186, 213, 0.32);
  overflow: hidden;
  touch-action: none;
  cursor: ns-resize;
  outline: none;
}

.play-strip::before {
  content: "";
  position: absolute;
  top: 3%;
  bottom: 3%;
  left: 16%;
  width: 20%;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0));
  opacity: 0.5;
}

.play-strip::after {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: inset 0 -10px 18px rgba(0, 0, 0, 0.16);
}

.play-strip:focus-visible {
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.12),
    inset 0 8px 12px rgba(255, 255, 255, 0.06),
    0 0 0 3px rgba(255, 186, 213, 0.32),
    0 0 0 6px rgba(255, 120, 171, 0.2);
}

.play-indicator {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 160%;
  height: 10px;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 182, 208, 0), rgba(255, 219, 232, 0.95), rgba(255, 182, 208, 0));
  box-shadow: 0 0 12px rgba(255, 219, 232, 0.45);
  pointer-events: none;
}

.base-shadow {
  position: absolute;
  bottom: -20px;
  width: 52%;
  height: 26px;
  border-radius: 999px;
  background: rgba(211, 130, 161, 0.22);
  filter: blur(12px);
}

.status-panel {
  width: min(300px, 100%);
  margin: 28px auto 0;
  padding: 18px 20px;
  border-radius: 20px;
  background: var(--status-bg);
  border: 1px solid rgba(255, 176, 130, 0.45);
  text-align: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.status-label,
.status-value,
.status-frequency {
  margin: 0;
}

.status-label {
  font-size: 0.82rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(58, 42, 34, 0.55);
}

.status-value {
  margin-top: 10px;
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 700;
}

.status-frequency {
  margin-top: 4px;
  font-size: 1rem;
  color: rgba(58, 42, 34, 0.72);
}

.status-meta {
  margin: 10px 0 0;
  font-size: 0.92rem;
  color: rgba(58, 42, 34, 0.64);
}

@media (max-width: 640px) {
  body {
    padding: 12px 10px 28px;
  }

  .frame {
    padding: 28px 18px 36px;
    border-radius: 28px;
  }

  .controls-panel {
    grid-template-columns: 1fr;
  }

  .showcase {
    margin-top: 24px;
    padding-top: 42px;
  }

  .otamatone {
    width: min(190px, 52vw);
  }

  .mouth {
    border-bottom-width: 2px;
  }

  .status-panel {
    margin-top: 24px;
  }
}
