:root {
  color-scheme: light;
  --bg: #f4f7f5;
  --ink: #172033;
  --muted: #5f6b7a;
  --panel: #ffffff;
  --line: #d8dee8;
  --accent: #0f766e;
  --accent-dark: #115e59;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
}

button {
  font: inherit;
}

.viewer {
  display: grid;
  gap: 18px;
  width: min(980px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0;
}

.viewer-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.eyebrow,
h1 {
  margin: 0;
}

.eyebrow {
  color: var(--accent-dark);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  font-size: 3.4rem;
  line-height: 1;
}

.next-button {
  min-height: 42px;
  padding: 0 18px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #ffffff;
  cursor: pointer;
  font-weight: 800;
}

.next-button:hover {
  background: var(--accent-dark);
}

.stage {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.stage img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: contain;
  background: #111827;
}

.stage-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  min-height: 42px;
  padding: 10px 12px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}

.thumbnail-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
}

.thumbnail-button {
  overflow: hidden;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 8px;
  background: var(--panel);
  cursor: pointer;
}

.thumbnail-button:hover,
.thumbnail-button-active {
  border-color: var(--accent);
}

.thumbnail-button img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

@media (max-width: 620px) {
  .viewer-header,
  .stage-meta {
    align-items: flex-start;
    flex-direction: column;
  }

  .next-button {
    width: 100%;
  }

  h1 {
    font-size: 2.3rem;
  }
}
