:root {
  --deck-scale: 1;
  --slide-width: 1280px;
  --slide-padding-x: 72px;
  --slide-padding-y: 50px;
}

html,
body.presentation-mode {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

body.presentation-mode {
  background:
    linear-gradient(180deg, rgba(226, 236, 243, 0.96), rgba(210, 224, 234, 0.96)),
    #dce5ee;
}

.deck-toolbar {
  position: fixed;
  z-index: 20;
  top: 12px;
  left: 50%;
  display: flex;
  width: min(100vw - 28px, 1280px);
  min-height: 42px;
  transform: translateX(-50%);
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 1px solid rgba(148, 163, 184, 0.42);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 16px 42px rgba(15, 23, 42, 0.14);
  backdrop-filter: blur(14px);
}

.deck-link,
.deck-button,
.deck-counter {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.deck-link {
  padding: 0 10px;
  color: #0f172a;
}

.deck-link:hover {
  background: #eef7f5;
}

.deck-button {
  min-width: 34px;
  border: 0;
  background: #0f172a;
  color: #ffffff;
  cursor: pointer;
}

.deck-button:hover {
  background: #0f8b7f;
}

.deck-notes-toggle {
  min-width: 58px;
  padding: 0 10px;
}

.deck-notes-toggle[aria-pressed="true"] {
  background: #d97706;
}

.deck-counter {
  min-width: 74px;
  color: #526174;
}

.deck-spacer {
  flex: 1;
}

.deck-progress {
  position: fixed;
  z-index: 19;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: rgba(15, 23, 42, 0.08);
}

.deck-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #0f8b7f, #2563eb);
  transition: width 220ms ease;
}

.deck-stage {
  display: grid;
  width: 100%;
  height: 100dvh;
  place-items: center;
  padding: 64px 20px 28px;
}

.presentation-deck {
  display: block;
  width: var(--slide-width);
  height: 720px;
  padding: 0;
  transform: scale(var(--deck-scale));
  transform-origin: center center;
}

.presentation-deck .slide {
  display: none;
  width: 100%;
  height: 720px;
  min-height: auto;
  margin: 0;
  opacity: 0;
  transform: translateY(10px) scale(0.992);
}

.presentation-deck .slide.is-active {
  display: flex;
  opacity: 1;
  transform: translateY(0) scale(1);
  transition:
    opacity 180ms ease,
    transform 240ms ease;
}

.presentation-deck .slide-footer span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.presentation-deck #D1-09 .work-layout {
  margin-top: -8px;
}

.presentation-deck #D1-09 .work-meta article {
  padding: 14px 22px;
}

.presentation-deck #D1-09 .work-question {
  padding: 24px 32px;
}

.presentation-deck #D1-09 .work-question .generated-icon {
  width: 68px;
  height: 68px;
  margin-bottom: 18px;
}

.presentation-deck #D1-09 .work-question p {
  font-size: 31px;
}

.presentation-deck #D1-45 .chapter-content h2,
.presentation-deck #D2-04 .chapter-content h2,
.presentation-deck #D2-18 .chapter-content h2 {
  margin-bottom: 22px;
  font-size: 54px;
}

.presentation-deck #D1-45 .chapter-time,
.presentation-deck #D2-04 .chapter-time,
.presentation-deck #D2-18 .chapter-time {
  margin-top: 16px;
}

.presentation-deck #D2-41 .repo-homework-flow {
  gap: 20px;
  margin-top: 14px;
}

.presentation-deck #D2-41 .repo-folder {
  min-height: 334px;
  padding: 32px;
}

.presentation-deck #D2-41 .repo-actions {
  gap: 12px;
}

.presentation-deck #D2-41 .repo-actions article {
  min-height: 102px;
  padding: 18px 26px;
}

.presentation-deck #D2-41 .repo-actions p {
  font-size: 27px;
}

.notes-drawer {
  position: fixed;
  z-index: 30;
  top: 68px;
  right: 18px;
  bottom: 24px;
  display: grid;
  width: min(520px, calc(100vw - 36px));
  grid-template-rows: auto 1fr;
  transform: translateX(calc(100% + 26px));
  border: 1px solid rgba(148, 163, 184, 0.46);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.24);
  transition: transform 220ms ease;
}

.show-notes .notes-drawer {
  transform: translateX(0);
}

.notes-drawer header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-bottom: 1px solid #d7e2eb;
}

.notes-content {
  min-height: 0;
  margin: 0;
  overflow: auto;
  padding: 18px;
  color: #182235;
  font: 15px/1.75 "Noto Sans JP", "Hiragino Sans", "Yu Gothic", Meiryo, sans-serif;
  white-space: pre-wrap;
}

.deck-meta {
  position: fixed;
  right: 22px;
  bottom: 10px;
  left: 22px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: rgba(82, 97, 116, 0.82);
  font-size: 12px;
  font-weight: 800;
  pointer-events: none;
}

@media (max-width: 760px) {
  :root {
    --slide-width: 1280px;
    --slide-padding-x: 72px;
    --slide-padding-y: 50px;
  }

  .deck-toolbar {
    top: 8px;
    width: calc(100vw - 16px);
    overflow-x: auto;
  }

  .deck-stage {
    padding: 74px 10px 30px;
  }

  .deck-link,
  .deck-button,
  .deck-counter {
    flex: 0 0 auto;
  }

  .deck-meta {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .presentation-deck .slide.is-active,
  .deck-progress span,
  .notes-drawer {
    transition: none;
  }
}

@media print {
  html,
  body.presentation-mode {
    height: auto;
    overflow: visible;
  }

  .deck-toolbar,
  .deck-progress,
  .notes-drawer,
  .deck-meta {
    display: none;
  }

  .deck-stage {
    display: block;
    height: auto;
    padding: 0;
  }

  .presentation-deck {
    width: auto;
  }

  .presentation-deck .slide,
  .presentation-deck .slide.is-active {
    display: flex;
    opacity: 1;
    transform: none;
  }
}
