:root {
  --slide-width: 1600;
  --slide-height: 900;
  --slide-bg: #fff;
  --slide-text: #050505;
  --slide-muted: #5d5d5d;
  --slide-rule: #0a0a0a;
  --slide-soft: #efefef;
  --highlight-blue: #006bff;
  --content-image-width: 1408;
  --content-image-height: 440;
  --content-image-ratio: var(--content-image-width) / var(--content-image-height);
  --font-mono: "DM Mono", "SFMono-Regular", "Menlo", "Monaco", "Consolas",
    "Liberation Mono", monospace;
  --font-title: "Helvetica Neue", "Hiragino Sans", "Yu Gothic Medium",
    "Yu Gothic", "Noto Sans JP", system-ui, sans-serif;
  --font-ja: "Hiragino Sans", "Yu Gothic", "YuGothic", "Noto Sans JP",
    system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

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

body {
  background: #111;
  color: var(--slide-text);
  font-family: var(--font-ja);
}

button {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  padding: 0;
}

button:disabled {
  cursor: default;
  opacity: 0.28;
}

.viewer {
  align-items: center;
  display: grid;
  gap: 14px;
  grid-template-rows: minmax(0, 1fr) auto;
  height: 100vh;
  justify-items: center;
  overflow: hidden;
  padding: 18px;
  width: 100vw;
}

.slide-stage {
  aspect-ratio: 16 / 9;
  background: var(--slide-bg);
  box-shadow: 0 22px 80px rgb(0 0 0 / 32%);
  container-type: inline-size;
  cursor: pointer;
  max-height: calc(100vh - 78px);
  max-width: calc((100vh - 78px) * 16 / 9);
  overflow: hidden;
  position: relative;
  width: min(100%, calc((100vh - 78px) * 16 / 9));
}

.slide-chrome {
  background: var(--slide-bg);
  height: 100%;
  overflow: hidden;
  position: relative;
  width: 100%;
}

.eyebrow,
.slide-footer,
.controls,
.page-number {
  font-family: var(--font-mono);
}

.page-number {
  color: #e3e3e3;
  display: none;
  font-size: 10cqw;
  font-weight: 700;
  line-height: 0.8;
  position: absolute;
  right: 7.5%;
  top: 6.2%;
  z-index: 0;
}

.slide-copy {
  left: 5.8%;
  position: absolute;
  right: 5.8%;
  top: 6.7%;
  z-index: 1;
}

.eyebrow {
  color: var(--slide-muted);
  display: none;
  font-size: 0.78cqw;
  letter-spacing: 0.16em;
  margin: 0 0 1.8%;
  text-transform: uppercase;
}

h1 {
  font-family: var(--font-title);
  font-size: 2.75cqw;
  font-weight: 600;
  letter-spacing: 0;
  line-break: strict;
  line-height: 1.16;
  margin: 0;
  max-width: 78%;
  overflow-wrap: anywhere;
}

.subtitle {
  color: #555;
  font-family: var(--font-title);
  font-size: 2.15cqw;
  font-weight: 400;
  line-height: 1.32;
  margin: 1.4cqw 0 0;
  max-width: none;
  width: 100%;
}

.subtitle[hidden] {
  display: none;
}

.content-frame {
  bottom: 10.4%;
  left: 5.8%;
  position: absolute;
  right: 5.8%;
  top: 22.8%;
  z-index: 1;
}

.content-frame[hidden] {
  display: none;
}

.content-frame img {
  display: block;
  height: 100%;
  object-fit: contain;
  object-position: top center;
  transform-origin: center;
  width: 100%;
}

.cover-copy {
  color: #555;
  font-family: var(--font-title);
  font-size: 3.15cqw;
  font-weight: 400;
  left: 18%;
  letter-spacing: 0;
  line-height: 1.55;
  position: absolute;
  right: 16%;
  top: 42%;
  white-space: pre-line;
  z-index: 1;
}

.cover-copy[hidden] {
  display: none;
}

.agenda-list {
  display: grid;
  gap: 1.75cqw;
  left: 14.5%;
  position: absolute;
  right: 11%;
  top: 32%;
  z-index: 1;
}

.agenda-list[hidden] {
  display: none;
}

.agenda-item {
  align-items: baseline;
  display: grid;
  gap: 3.2cqw;
  grid-template-columns: 4.4cqw minmax(0, 1fr);
}

.agenda-number {
  color: #0b0b0b;
  font-family: var(--font-mono);
  font-size: 2.25cqw;
  font-weight: 600;
  line-height: 1;
}

.agenda-label {
  color: var(--slide-text);
  font-family: var(--font-title);
  font-size: 2cqw;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.2;
}

.slide-footer {
  bottom: 6.7%;
  color: #555;
  display: block;
  font-size: 1.38cqw;
  left: 5.8%;
  letter-spacing: 0.06em;
  line-height: 1;
  position: absolute;
  z-index: 2;
}

.slide-pagination {
  bottom: 6.7%;
  color: #555;
  font-family: var(--font-mono);
  font-size: 1.38cqw;
  letter-spacing: 0.06em;
  position: absolute;
  right: 5.8%;
  z-index: 2;
}

.controls {
  align-items: center;
  background: rgb(255 255 255 / 7%);
  border: 1px solid rgb(255 255 255 / 13%);
  border-radius: 999px;
  box-shadow: 0 14px 42px rgb(0 0 0 / 22%);
  color: #f6f6f6;
  display: flex;
  gap: 10px;
  justify-content: center;
  padding: 7px 10px;
  display: none;
}

[data-counter] {
  color: rgb(255 255 255 / 82%);
  font-size: 13px;
  letter-spacing: 0.06em;
  min-width: 68px;
  text-align: center;
}

.nav-button {
  align-items: center;
  background: rgb(255 255 255 / 9%);
  border: 1px solid rgb(255 255 255 / 16%);
  border-radius: 999px;
  display: inline-flex;
  height: 34px;
  justify-content: center;
  transition:
    background-color 140ms ease,
    border-color 140ms ease,
    transform 140ms ease;
  width: 34px;
}

.nav-button::before {
  border-color: currentColor;
  border-style: solid;
  border-width: 0 2px 2px 0;
  content: "";
  height: 8px;
  opacity: 0.9;
  width: 8px;
}

.nav-button-prev::before {
  transform: translateX(2px) rotate(135deg);
}

.nav-button-next::before {
  transform: translateX(-2px) rotate(-45deg);
}

.nav-button:not(:disabled):hover {
  background: rgb(255 255 255 / 17%);
  border-color: rgb(255 255 255 / 28%);
  transform: translateY(-1px);
}

@media (max-width: 720px) {
  .viewer {
    padding: 10px;
  }

  .slide-stage {
    max-height: calc(100vh - 70px);
    max-width: calc((100vh - 70px) * 16 / 9);
    width: min(100%, calc((100vh - 70px) * 16 / 9));
  }
}
