@font-face {
  font-family: Sofia;
  src: url("sofia-sans-latin-cyrillic.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
:root {
  --ink: #7d1649;
  --accent: #be216a;
  --pink: #f4d5e3;
  --control-radius: 18px;
  color: var(--ink);
  background: #fff;
  font: 1.125rem/1.45 Sofia, system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; }
main { max-width: 1480px; margin: auto; padding: 0 clamp(16px,5vw,80px) 12px; }
header { padding: clamp(10px,1.6vh,18px) 0; }
.brand { display: block; width: clamp(185px,20vw,275px); height: auto; }
.console { overflow: hidden; display: grid; grid-template-columns: 1fr 1fr; align-items: stretch; background: var(--pink); border-radius: 32px; }
.cover { grid-column: 2; grid-row: 1; width: 100%; height: 100%; min-height: 0; aspect-ratio: 1; object-fit: cover; }
.panel { container-type: inline-size; grid-column: 1; grid-row: 1; align-self: center; min-width: 0; padding: clamp(24px,3.3vw,52px); }
h1 { font-size: clamp(40px,18cqi,99px); line-height: .98; letter-spacing: -.055em; margin: 0 0 .48em; }
.schedule {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 3px 12px;
  width: fit-content;
  max-width: 100%;
  padding: 9px 16px;
  margin: 0 0 clamp(16px,2vw,28px);
  border: 1px solid #d4a0ba;
  border-radius: var(--control-radius);
  color: var(--ink);
  background: #faeaf2;
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
}
.schedule > time { font-weight: 750; }
.schedule span { white-space: nowrap; }
.actions { display: flex; flex-wrap: wrap; gap: 18px 26px; align-items: center; }
button,input { font: inherit; }
.play { white-space: nowrap; width: 10.25em; max-width: 100%; justify-content: center; min-height: 60px; padding: 14px 16px; border: 0; border-radius: var(--control-radius); background: var(--ink); color: white; font-size: 21px; font-weight: 700; display: inline-flex; gap: 13px; align-items: center; cursor: pointer; }
.play:hover { background: var(--accent); }
.symbol { width: 0; height: 0; border: solid transparent; border-width: 9px 0 9px 15px; border-left-color: currentColor; }
.play[data-active="true"] .symbol { width: 15px; height: 17px; border: solid currentColor; border-width: 0 5px; }
.volume {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  column-gap: 10px;
  width: 166px;
  max-width: 100%;
  min-height: 60px;
  padding: 6px 15px 2px;
  line-height: 1.2;
  border-radius: var(--control-radius);
  background: rgb(255 255 255 / 60%);
  font-weight: 650;
}
.volume-value { font-size: .85rem; font-variant-numeric: tabular-nums; }
.volume input {
  --track: linear-gradient(to right, var(--accent) 0 var(--level, 80%), #cba5b8 var(--level, 80%) 100%);
  grid-column: 1 / -1;
  appearance: none;
  width: 100%;
  height: 28px;
  margin: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.volume input::-webkit-slider-runnable-track { height: 6px; border-radius: 6px; background: var(--track); }
.volume input::-moz-range-track { height: 6px; border-radius: 6px; background: var(--track); }
.volume input::-webkit-slider-thumb {
  appearance: none;
  width: 18px;
  height: 18px;
  margin-top: -6px;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: white;
}
.volume input::-moz-range-thumb {
  box-sizing: border-box;
  width: 18px;
  height: 18px;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: white;
}
[hidden] { display: none; }
.status { min-height: 1.5em; margin: 12px 0 0; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 4px; }
/* Scale the square artwork to short desktop windows. */
@media(min-width: 901px) {
  main {
    width: calc(100% - clamp(32px,10vw,160px));
    max-width: clamp(740px,calc(200svh - 410px),1320px);
    padding-inline: 0;
  }
}
@media(min-width: 901px) and (max-height: 680px) {
  .panel { padding: 22px 24px; }
  .actions { gap: 10px; }
  .play { width: 9.5em; padding-inline: 10px; gap: 10px; font-size: 18px; }
  .volume { width: 150px; }
  .schedule { margin-bottom: 14px; }
  .status { margin-top: 6px; }
}
@media(max-width: 900px) {
  .actions { align-items: start; flex-direction: column; }
}
@media(max-width: 680px) {
  .console { display: flex; flex-direction: column; border-radius: 24px; }
  .cover { order: 2; width: 100%; height: auto; }
  .panel { align-self: stretch; padding: 28px clamp(22px,6vw,36px) 8px; }
  h1 { font-size: clamp(45px,12.5vw,76px); }
  .actions { flex-direction: row; align-items: center; }
}

.play {
  position: relative;
  --wave-color: var(--accent);
  --wave-opacity: .24;
  --wave-x: 1.06;
  --wave-y: 1.17;
  --wave-period: 3.6s;
}
.console[data-state="playing"] .play {
  --wave-opacity: .66;
  --wave-x: 1.13;
  --wave-y: 1.41;
  --wave-period: 2.1s;
}
.play:enabled::before, .play:enabled::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border: 1.5px solid var(--wave-color);
  border-radius: inherit;
  animation: broadcast-wave var(--wave-period) ease-out infinite;
}
.play:enabled::after { animation-delay: calc(var(--wave-period) * -.5); }
@keyframes broadcast-wave {
  from { transform: scale(1); opacity: var(--wave-opacity); }
  to { transform: scale(var(--wave-x),var(--wave-y)); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .play:enabled::before, .play:enabled::after { animation: none; opacity: 0; }
  .console[data-state="playing"] .play::before { opacity: .55; inset: -4px; }
}

html[data-theme="optics"] { background: #200d26; color: #f9effc; }
[data-theme="optics"] main {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 100svh;
  width: 100%;
  max-width: none;
  padding: 0 clamp(24px,7vw,150px);
}
[data-theme="optics"] header { padding-block: clamp(16px,2.5vh,28px); }
[data-theme="optics"] .console {
  display: flex;
  flex-direction: row;
  align-items: center;
  overflow: visible;
  border-radius: 0;
  background: transparent;
}
.backdrop {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}
.backdrop .cover { display: block; width: 100%; height: 100%; object-fit: cover; }
[data-theme="optics"] .panel {
  width: min(46vw,720px);
  padding: 0 0 clamp(20px,6vh,80px);
  align-self: auto;
}
[data-theme="optics"] h1 { font-size: clamp(46px,16cqi,116px); }
@media (orientation: portrait) {
  [data-theme="optics"] main {
    grid-template-rows: auto auto minmax(max(51svh,92vw),1fr);
    padding-inline: clamp(20px,6vw,70px);
  }
  [data-theme="optics"] .panel { width: 100%; padding: 12px 0 0; }
  [data-theme="optics"] h1 { font-size: clamp(45px,12vw,80px); }
  [data-theme="optics"] .actions { flex-direction: row; }
  .backdrop .cover { object-position: center bottom; }
}
@media (orientation: portrait) and (max-width: 680px) {
  [data-theme="optics"] .schedule { padding: 8px 12px; gap: 2px 8px; font-size: .9rem; }
}
@media (orientation: portrait) and (min-width: 681px) {
  [data-theme="optics"] h1 { font-size: clamp(54px,8vw,82px); }
  [data-theme="optics"] h1 br { display: none; }
}
[data-theme="optics"] .schedule { color: #edd3ff; border-color: #785880; background: #45274f; }
[data-theme="optics"] .play { color: #321b3b; background: #edd3ff; --wave-color: #e0a8ff; }
[data-theme="optics"] .play:hover { background: #fff1ff; }
[data-theme="optics"] .volume { color: #32193d; background: #e2cfe8; }
[data-theme="optics"] .play:focus-visible { outline-color: #fff; }
