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

html,
body {
  height: 100%;
  margin: 0;
}

body {
  font-family: system-ui, sans-serif;
  background: #0a0a0b;
  color: #e8e8ea;
}

.app {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  gap: 1rem;
}

.stage {
  margin: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  max-width: min(100vw - 2rem, 1400px);
  min-height: 50vh;
}

.slide {
  max-width: 100%;
  max-height: min(78vh, 900px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

.caption {
  font-size: 0.875rem;
  opacity: 0.75;
  text-align: center;
  word-break: break-all;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem 1rem;
}

.btn {
  font: inherit;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  border: 1px solid #3a3a40;
  background: #18181c;
  color: inherit;
  cursor: pointer;
}

.btn:hover {
  background: #222228;
}

.btn:focus-visible {
  outline: 2px solid #6b8cff;
  outline-offset: 2px;
}

.counter {
  font-variant-numeric: tabular-nums;
  min-width: 6ch;
  text-align: center;
}

.autoplay {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.9rem;
  cursor: pointer;
  user-select: none;
}

.empty {
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  text-align: center;
  line-height: 1.6;
}

.empty code {
  font-size: 0.95em;
  padding: 0.1em 0.35em;
  border-radius: 4px;
  background: #18181c;
}
