@font-face {
  font-family: Lato;
  src: url('../assets/fonts/Lato-Regular.ttf') format('truetype');
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: Lato;
  src: url('../assets/fonts/Lato-Bold.ttf') format('truetype');
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: Lato;
  src: url('../assets/fonts/Lato-Black.ttf') format('truetype');
  font-style: normal;
  font-weight: 900;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #fff;
  --ink: #182331;
  --blue: #235fa8;
  --muted: #43546b;
  --line: #b9d8f8;
  --surround: var(--paper);
  --focus: #235fa8;
  --ease-reveal: cubic-bezier(.2, .7, .2, 1);
  font-family: Lato, Arial, sans-serif;
  color: var(--ink);
  background: var(--surround);
  -webkit-font-smoothing: antialiased;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-width: 280px; min-height: 100%; }
body { min-height: 100svh; }
button { font: inherit; }
button:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
button:disabled { opacity: .4; cursor: default; }
[hidden] { display: none !important; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.player-tools {
  position: fixed;
  z-index: 5;
  bottom: max(14px, env(safe-area-inset-bottom));
  left: 50%;
  transform: translate(-50%, 8px);
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px;
  max-width: calc(100vw - 24px);
  border: 1px solid #d9e2ec;
  border-radius: 14px;
  background: #ffffffed;
  box-shadow: 0 5px 24px #18233112;
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms, transform 160ms;
}
body.controls-visible .player-tools,
.player-tools:hover,
.player-tools:focus-within {
  opacity: 1;
  transform: translate(-50%, 0);
  pointer-events: auto;
}
.player-tools button {
  min-height: 40px;
  border: 0;
  padding: 8px 12px;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}
.player-tools button:hover:not(:disabled) { background: #edf4fc; }
.player-tools button:disabled { cursor: default; }
.player-tools button[aria-pressed='true'] { color: var(--blue); background: #edf4fc; }
.slide-count { padding: 0 10px; font-size: 14px; white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--muted); }
.tool-divider { height: 22px; width: 1px; background: #d9e2ec; margin: 0 4px; }
.player-message {
  position: fixed;
  z-index: 6;
  bottom: 82px;
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: calc(100vw - 32px);
  border-radius: 10px;
  padding: 14px 20px;
  margin: 0;
  background: var(--ink);
  color: white;
  font-size: 16px;
}
@media (max-width: 600px) {
  .player-tools { display: grid; grid-template-columns: 1fr 1fr 1fr; width: min(380px, calc(100vw - 24px)); gap: 2px; padding: 4px; }
  .player-tools button { padding: 8px; min-height: 44px; min-width: 0; font-size: 14px; }
  .slide-count { padding: 0 6px; font-size: 14px; text-align: center; }
  .tool-divider { display: none; }
  #toggle-motion { grid-column: 1 / span 2; }
  #toggle-fullscreen { grid-column: 3; white-space: normal; }
}
