/* Posilovna řeči: gumová podlaha, křída a barevné kotouče na činku. */
:root {
  color-scheme: dark;
  --bg: #121110;
  --bg-raise: #1b1916;
  --bg-high: #24211d;
  --bg-sunk: #0b0a09;
  --line: #2d2a25;
  --line-strong: #45403a;
  --chalk: #efe9de;
  --chalk-2: #bcb4a6;
  --chalk-3: #7f786d;

  /* kotouče: 25 / 20 / 15 / 10 / 5 kg */
  --red: #e0362c;
  --blue: #2f6bd8;
  --yellow: #f0bf2a;
  --green: #36a85a;
  --white: #e6e2da;
  --steel: #6f767d;

  --f-display: 'Big Shoulders Display', 'Arial Narrow', sans-serif;
  --f-body: 'Instrument Sans', 'Helvetica Neue', sans-serif;
  --f-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', monospace;

  --radius: 16px;
  --radius-sm: 10px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  color: var(--chalk);
  font: 400 16px/1.5 var(--f-body);
  background:
    radial-gradient(120% 55% at 50% -12%, #2a2620 0, transparent 62%),
    radial-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1.6px) 0 0 / 7px 7px,
    radial-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1.6px) 3px 4px / 11px 11px,
    var(--bg);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 50;
  opacity: 0.08;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

.app {
  max-width: 580px;
  margin: 0 auto;
  padding: calc(14px + env(safe-area-inset-top)) 16px calc(40px + env(safe-area-inset-bottom));
}

.view > * + * {
  margin-top: 18px;
}

.view > * {
  animation: rise 0.55s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 55ms);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--f-display);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: 0.005em;
}

p {
  margin: 0;
}

p + p {
  margin-top: 8px;
}

a {
  color: inherit;
}

blockquote {
  margin: 0;
}

.kicker {
  font: 600 11px/1.3 var(--f-mono);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--chalk-3);
}

.label {
  display: inline-block;
  margin-right: 8px;
  font: 600 10px/1 var(--f-mono);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--chalk-3);
  vertical-align: 2px;
}

.muted {
  color: var(--chalk-3);
  font-size: 14px;
}

.lede {
  color: var(--chalk-2);
  font-size: 17px;
  max-width: 34ch;
}

.page-title {
  font-size: clamp(48px, 14vw, 72px);
  text-transform: uppercase;
}

.empty {
  padding: 40px 0;
  color: var(--chalk-2);
  text-align: center;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.icon {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

.icon-play path,
.icon-pause path,
.icon-stop path {
  fill: currentColor;
  stroke: none;
}

:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 2px;
}

/* tlačítka */
.btn,
.ghost-btn,
.icon-btn,
.voice-btn,
.play-btn {
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
  border: 0;
  color: inherit;
  text-decoration: none;
  transition: transform 0.15s var(--ease), background 0.2s, border-color 0.2s, opacity 0.2s;
}

.btn:active,
.ghost-btn:active,
.icon-btn:active,
.voice-btn:active,
.play-btn:active {
  transform: scale(0.97);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 12px 22px;
  border-radius: 12px;
  background: var(--red);
  color: #fff;
  font: 800 20px/1 var(--f-display);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.25) inset, 0 10px 24px -12px rgba(224, 54, 44, 0.8);
}

.btn.is-big {
  width: 100%;
  min-height: 62px;
  font-size: 24px;
}

.btn.is-small {
  min-height: 40px;
  padding: 8px 16px;
  font-size: 16px;
}

.btn:disabled {
  opacity: 0.5;
  cursor: default;
}

.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 10px 16px;
  border-radius: 12px;
  background: transparent;
  box-shadow: inset 0 0 0 1.5px var(--line-strong);
  font: 600 15px/1.2 var(--f-body);
}

.ghost-btn:hover {
  box-shadow: inset 0 0 0 1.5px var(--chalk-3);
}

.ghost-btn.is-small {
  min-height: 38px;
  padding: 6px 12px;
  font-size: 14px;
}

.ghost-btn.is-danger {
  color: #ff8a80;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-raise);
  box-shadow: inset 0 0 0 1px var(--line);
}

.icon-btn.is-ghost {
  visibility: hidden;
}

.is-loading {
  position: relative;
  pointer-events: none;
  opacity: 0.7;
}

.is-loading::after {
  content: '';
  width: 14px;
  height: 14px;
  margin-left: 6px;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-right-color: transparent;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.card {
  padding: 16px;
  border-radius: var(--radius);
  background: var(--bg-raise);
  box-shadow: inset 0 0 0 1px var(--line);
}

.card > * + * {
  margin-top: 12px;
}

.input {
  width: 100%;
  min-height: 52px;
  padding: 12px 14px;
  border: 0;
  border-radius: 12px;
  background: var(--bg-sunk);
  box-shadow: inset 0 0 0 1.5px var(--line-strong);
  color: var(--chalk);
  font: 500 17px/1.4 var(--f-body);
  resize: vertical;
}

.input:focus {
  outline: none;
  box-shadow: inset 0 0 0 2px var(--yellow);
}

.form-error {
  min-height: 20px;
  color: #ff8a80;
  font-size: 14px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  padding: 8px 12px;
  border: 0;
  border-radius: 999px;
  background: var(--bg-sunk);
  box-shadow: inset 0 0 0 1px var(--line-strong);
  color: var(--chalk-2);
  font: 600 13px/1 var(--f-body);
  cursor: pointer;
}

.chip.is-on {
  background: var(--chalk);
  color: var(--bg);
  box-shadow: none;
}

.tag {
  padding: 4px 8px;
  border-radius: 6px;
  background: var(--bg-high);
  color: var(--yellow);
  font: 600 10px/1 var(--f-mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.fold summary {
  cursor: pointer;
  list-style: none;
  font: 600 11px/1.3 var(--f-mono);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--chalk-2);
}

.fold summary::-webkit-details-marker {
  display: none;
}

.fold summary::before {
  content: '+ ';
  color: var(--yellow);
}

.fold[open] summary::before {
  content: '− ';
}

.fold[open] > summary {
  margin-bottom: 10px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(20px + env(safe-area-inset-bottom));
  z-index: 60;
  max-width: min(92vw, 460px);
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--chalk);
  color: var(--bg);
  font: 600 15px/1.35 var(--f-body);
  transform: translate(-50%, 140%);
  visibility: hidden;
  transition: transform 0.35s var(--ease), visibility 0s linear 0.35s;
  box-shadow: 0 16px 40px -12px rgba(0, 0, 0, 0.8);
}

.toast.is-on {
  transform: translate(-50%, 0);
  visibility: visible;
  transition: transform 0.35s var(--ease);
}

.toast[data-tone='error'] {
  background: var(--red);
  color: #fff;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
