@font-face {
  font-family: Nunito;
  src: url('/assets/znacka/pisma/Nunito-Variable.woff2') format('woff2');
  font-weight: 200 1000;
  font-display: swap;
}

@font-face {
  font-family: Andika;
  src: url('/assets/znacka/pisma/Andika-Bold.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #f7efdd;
  --card: #f5ecd8;
  --ink: #242943;
  --orange: #e8893a;
  --sage: #4e8e70;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

.sound-page {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 700 1.125rem/1.4 Nunito, system-ui, sans-serif;
}

.sound-layout {
  display: flex;
  flex-direction: column;
  width: min(100%, 28rem);
  min-height: 100vh;
  min-height: 100svh;
  margin-inline: auto;
  padding: 22px clamp(14px, 5.13vw, 24px);
  text-align: center;
}

.sound-card {
  display: grid;
  justify-items: center;
  padding: 22px 16px 18px;
  border-radius: 22px;
  background: var(--card);
}

.sound-card-content {
  display: grid;
  justify-items: center;
  width: 100%;
}

.sound-number {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin: 0;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font: 800 1.5rem/1 Nunito, system-ui, sans-serif;
}

.sound-ear {
  display: grid;
  place-items: center;
  width: 120px;
  height: 120px;
  margin: 30px 0 4px;
}

.sound-illustration {
  display: block;
  width: 78%;
  height: clamp(170px, 67vw, 260px);
}

.sound-illustration img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.sound-name {
  margin: 6px 0 0;
  font: 700 clamp(2.25rem, 11.3vw, 2.75rem)/1.2 Andika, system-ui, sans-serif;
}

.sound-call, .sound-question {
  margin: 2px 0 0;
  font-size: 1.375rem;
  font-weight: 800;
}
.sound-call { color: var(--sage); }

.sound-layout audio { display: block; width: 100%; margin-top: 22px; }
.sound-layout audio:not([controls]) { display: none; }

.sound-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  min-height: 72px;
  padding: 10px 16px;
  border: 0;
  border-radius: 20px;
  background: var(--orange);
  color: var(--ink);
  font: 800 clamp(1.375rem, 6.67vw, 1.625rem)/1.15 Nunito, system-ui, sans-serif;
  cursor: pointer;
  touch-action: manipulation;
}

.sound-play, .sound-reveal { margin-top: 22px; }
.sound-guess { background: var(--ink); color: #fff; }
.sound-button:disabled { opacity: 0.65; cursor: wait; }

.sound-play[data-playing] img { display: none; }
.sound-play[data-playing]::before {
  content: '';
  width: 34px;
  height: 20px;
  background: linear-gradient(to right, transparent 8px, currentColor 8px 14px, transparent 14px 20px, currentColor 20px 26px, transparent 26px);
}

.sound-button:focus-visible, .sound-footer a:focus-visible, .sound-name:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 4px;
}

.sound-status { margin: 8px 0 0; }
.sound-status:empty { margin: 0; }
.sound-footer { margin-top: auto; padding-top: 20px; color: #5e6171; font-size: 0.75rem; }
.sound-footer a { color: inherit; }

@media (max-width: 350px) {
  .sound-button { min-height: 64px; }
}

@media (hover: hover) {
  .sound-play:hover:not(:disabled) { background: #f4a65f; }
  .sound-guess:hover:not(:disabled) { background: #373c55; }
}
