:root {
  --c-base: #ffffff;
  --c-paper: #ffffff;
  --c-main: #000000;
  --c-muted: #555555;
  --c-line: rgba(0, 0, 0, 0.16);
  --c-blue: #000000;
  --c-cyan: #000000;
  --c-orange: #000000;
  --shadow: none;
}

* {
  box-sizing: border-box;
  border-radius: 0 !important;
}

html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--c-base);
  color: var(--c-main);
  font-family: "Noto Sans JP", "Inter", sans-serif;
}

button {
  font: inherit;
}

.slide-stage {
  width: 100vw;
  height: 100vh;
  display: grid;
  place-items: center;
  padding: 64px 0;
  background: var(--c-base);
}

.slide {
  width: min(100vw, calc((100vh - 128px) * 16 / 9));
  height: auto;
  aspect-ratio: 16 / 9;
  max-width: 100vw;
  max-height: calc(100vh - 128px);
  margin: auto;
  position: absolute;
  inset: 0;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 180ms ease;
  background: var(--c-paper);
  box-shadow: var(--shadow);
  container-type: inline-size;
}

.slide.active {
  position: relative;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.slide-art {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.copy-prompt {
  position: absolute;
  right: 28px;
  top: 28px;
  z-index: 8;
  border: 1px solid rgba(17, 24, 39, 0.16);
  background: #ffffff;
  color: #111111;
  font-family: "Inter", "Noto Sans JP", sans-serif;
  font-size: 13px;
  font-weight: 600;
  padding: 10px 16px;
  cursor: pointer;
}

.section-nav {
  position: fixed;
  top: 18px;
  left: 22px;
  z-index: 40;
  display: flex;
  gap: 14px;
  align-items: center;
  max-width: calc(100vw - 110px);
  padding: 8px 12px;
  font-family: "Inter", sans-serif;
  font-weight: 400;
  border: 1px solid rgba(17, 24, 39, 0.08);
  background: #ffffff;
}

.section-nav button {
  border: 0;
  background: transparent;
  color: #c4c4c4;
  font-size: 12px;
  font-family: "Inter", sans-serif;
  font-weight: 400;
  letter-spacing: 0.03em;
  cursor: pointer;
  white-space: nowrap;
}

.section-nav button.active {
  color: var(--c-main);
}

.sidebar-toggle {
  position: fixed;
  top: 18px;
  right: 22px;
  z-index: 65;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(17, 24, 39, 0.1);
  background: #ffffff;
  color: var(--c-main);
  font-family: "Inter", sans-serif;
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
  box-shadow: none;
}

.sidebar-backdrop {
  position: fixed;
  inset: 0;
  z-index: 58;
  background: rgba(17, 24, 39, 0.32);
  opacity: 0;
  visibility: hidden;
  transition: opacity 160ms ease, visibility 160ms ease;
}

.sidebar-backdrop.open {
  opacity: 1;
  visibility: visible;
}

.sidebar {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 60;
  width: min(420px, 92vw);
  height: 100vh;
  transform: translateX(100%);
  transition: transform 180ms ease;
  background: #ffffff;
  font-family: "Inter", sans-serif;
  font-weight: 400;
  border-left: 1px solid var(--c-line);
  box-shadow: none;
  padding: 22px;
  display: flex;
  flex-direction: column;
}

.sidebar.open {
  transform: translateX(0);
}

.sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--c-line);
}

.eyebrow {
  margin: 0;
  color: var(--c-blue);
  font-size: 12px;
  font-family: "Inter", sans-serif;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sidebar-close {
  border: 0;
  background: transparent;
  font-size: 28px;
  font-family: "Inter", sans-serif;
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
}

.sidebar-list {
  overflow: auto;
  padding: 14px 0 30px;
}

.sidebar-item {
  width: 100%;
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 10px;
  align-items: start;
  border: 0;
  border-bottom: 1px solid rgba(17, 24, 39, 0.08);
  background: transparent;
  color: var(--c-main);
  text-align: left;
  padding: 13px 4px;
  cursor: pointer;
}

.sidebar-item span:first-child {
  color: var(--c-muted);
  font-family: "Inter", sans-serif;
  font-weight: 400;
}

.sidebar-item strong {
  display: block;
  font-size: 14px;
  font-family: "Inter", sans-serif;
  font-weight: 400;
  line-height: 1.45;
}

.sidebar-item small {
  display: block;
  margin-top: 3px;
  color: var(--c-muted);
  font-size: 11px;
  font-family: "Inter", sans-serif;
  font-weight: 400;
}

.sidebar-item.active strong {
  color: var(--c-blue);
}

.export-bar {
  position: fixed;
  left: 22px;
  bottom: 18px;
  z-index: 45;
  display: flex;
  gap: 8px;
}

.export-bar button {
  border: 1px solid rgba(17, 24, 39, 0.1);
  background: #ffffff;
  color: var(--c-main);
  font-size: 12px;
  font-family: "Inter", sans-serif;
  font-weight: 400;
  padding: 10px 14px;
  cursor: pointer;
  box-shadow: none;
}

.status-bar {
  position: fixed;
  right: 22px;
  bottom: 18px;
  z-index: 45;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  max-width: min(520px, 48vw);
  padding: 9px 12px;
  background: #ffffff;
  border: 1px solid rgba(17, 24, 39, 0.08);
  color: var(--c-muted);
  font-size: 12px;
  font-family: "Inter", sans-serif;
  font-weight: 400;
}

#slideTitle {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

#slideCounter {
  text-align: right;
  white-space: nowrap;
}

.export-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  background: rgba(17, 24, 39, 0.42);
  font-family: "Inter", sans-serif;
  font-weight: 400;
  opacity: 0;
  visibility: hidden;
}

.export-overlay.open {
  opacity: 1;
  visibility: visible;
}

.export-dialog {
  width: min(460px, 88vw);
  padding: 26px;
  background: var(--c-paper);
  box-shadow: var(--shadow);
}

.export-dialog p {
  margin: 0 0 14px;
  font-weight: 400;
}

.progress {
  height: 8px;
  overflow: hidden;
  background: rgba(17, 24, 39, 0.1);
}

.progress span {
  display: block;
  width: 0%;
  height: 100%;
  background: #000000;
  transition: width 120ms ease;
}

#export-stage {
  position: fixed;
  top: -99999px;
  left: 0;
  width: 1920px;
  height: 1080px;
  background: var(--c-base);
  pointer-events: none;
  z-index: -1;
}

#export-stage .slide {
  position: relative !important;
  top: 0 !important;
  left: 0 !important;
  transform: none !important;
  width: 1920px !important;
  height: 1080px !important;
  max-width: none !important;
  max-height: none !important;
  opacity: 1 !important;
  visibility: visible !important;
  display: block !important;
  box-shadow: none !important;
  container-type: inline-size;
}

@media (max-width: 760px) {
  .section-nav {
    max-width: calc(100vw - 86px);
    overflow-x: auto;
    gap: 8px;
  }

  .section-nav button,
  .status-bar,
  .export-bar button {
    font-size: 11px;
  }

  .status-bar {
    display: none;
  }
}

@media print {
  @page {
    size: 13.333in 7.5in;
    margin: 0;
  }

  html,
  body {
    margin: 0;
    background: #fff;
    overflow: visible;
  }

  .section-nav,
  .sidebar-toggle,
  .sidebar,
  .sidebar-backdrop,
  .status-bar,
  .export-bar,
  .export-overlay,
  #export-stage {
    display: none !important;
  }

  .slide-stage {
    width: 13.333in;
    height: auto;
    display: block;
    position: static;
    padding: 0;
    background: #fff;
  }

  .slide {
    position: relative !important;
    inset: auto !important;
    transform: none !important;
    width: 13.333in !important;
    height: 7.5in !important;
    max-width: none !important;
    max-height: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
    page-break-after: always;
    break-after: page;
    page-break-inside: avoid;
    break-inside: avoid;
    overflow: hidden;
    box-shadow: none !important;
  }

  .slide:last-child {
    page-break-after: auto;
  }

  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
}
