.notes-panel,
.overview-panel {
  position: absolute;
  z-index: 30;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 300ms var(--ease-out), transform 500ms var(--ease-out), visibility 0ms linear 500ms;
}

.notes-panel {
  top: 92px;
  bottom: 78px;
  left: 30px;
  width: min(420px, 34%);
  padding: 25px;
  border: 1px solid rgba(34, 211, 238, 0.3);
  border-radius: 20px;
  background: rgba(8, 13, 31, 0.94);
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.45);
  transform: translateX(-18px);
}

.notes-panel.is-open,
.overview-panel.is-open {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  transform: translate(0);
  transition-delay: 0ms;
}

.notes-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.notes-header h2,
.overview-header h2 {
  margin-top: 8px;
  color: var(--text);
  font-size: 22px;
}

.close-notes,
.close-overview {
  flex: 0 0 auto;
  width: 31px;
  height: 31px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--text-muted);
  font-size: 22px;
  line-height: 1;
}

#notesBody {
  margin-top: 22px;
  color: var(--text-soft);
  font-size: 14px;
  line-height: 2;
}

.notes-tip {
  gap: 9px;
  margin-top: 26px;
  padding-top: 15px;
  border-top: 1px solid var(--line);
  color: var(--text-muted);
  font-size: 11px;
}

.tip-key {
  display: inline-grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border: 1px solid rgba(34, 211, 238, 0.3);
  border-radius: 6px;
  color: var(--cyan);
  font: 600 10px var(--font-mono);
}

.overview-panel {
  inset: 58px 24px 58px;
  padding: 25px 28px;
  border: 1px solid rgba(34, 211, 238, 0.25);
  border-radius: 22px;
  background: rgba(5, 8, 22, 0.97);
  box-shadow: 0 25px 75px rgba(0, 0, 0, 0.52);
  transform: translateY(14px);
}

.overview-header {
  justify-content: space-between;
  padding-bottom: 19px;
  border-bottom: 1px solid var(--line);
}

.overview-grid {
  display: grid;
  max-height: calc(100% - 87px);
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 11px;
  overflow: auto;
  padding: 20px 3px 3px;
}

.overview-item {
  position: relative;
  display: grid;
  min-height: 92px;
  align-content: space-between;
  gap: 12px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(15, 23, 42, 0.58);
  cursor: pointer;
  text-align: right;
  transition: border-color 220ms var(--ease-out), transform 220ms var(--ease-out), background 220ms var(--ease-out);
}

.overview-item:hover,
.overview-item.is-current {
  border-color: var(--line-strong);
  background: rgba(34, 211, 238, 0.1);
  transform: translateY(-3px);
}

.overview-index {
  color: var(--cyan);
  font: 600 10px var(--font-mono);
  direction: ltr;
  text-align: left;
}

.overview-title {
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.6;
}

.toast {
  position: fixed;
  z-index: 100;
  right: 50%;
  bottom: 26px;
  max-width: min(90vw, 430px);
  padding: 12px 18px;
  border: 1px solid rgba(34, 211, 238, 0.3);
  border-radius: 12px;
  background: rgba(8, 13, 31, 0.94);
  color: var(--text-soft);
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transform: translate(50%, 12px);
  transition: opacity 250ms ease, transform 350ms var(--ease-out);
}

.toast.is-visible {
  opacity: 1;
  transform: translate(50%, 0);
}

.noscript-message {
  position: fixed;
  z-index: 200;
  inset: 20px;
  display: grid;
  place-items: center;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-strong);
  color: var(--text);
  font-size: 20px;
  text-align: center;
}

@media (max-width: 1180px) {
  .deck-stage { width: 96vw; }
  .topbar,.deck-footer { padding-inline: 34px; }
  .slide { padding-inline: 74px; }
  .hero-visual { transform: scale(0.88); transform-origin: center; }
  .formula-piece { min-width: 150px; }
  .overview-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 850px) {
  body { overflow: auto; }
  .presentation { min-height: 100vh; padding: 12px; }
  .deck-stage { width: 100%; min-height: calc(100vh - 24px); aspect-ratio: auto; border-radius: 22px; }
  .slides { position: relative; inset: auto; min-height: calc(100vh - 132px); margin-top: 74px; margin-bottom: 58px; }
  .slide { position: relative; display: none; min-height: calc(100vh - 132px); padding: 32px 28px 40px; }
  .slide.is-active { display: block; }
  .slide-inner { min-height: calc(100vh - 210px); }
  .hero-layout,.two-column,.landscape-layout,.agent-board,.prompt-layout,.server-layout,.terminal-layout,.mcp-layout,.automation-layout,.case-layout,.voice-layout,.closing-layout { grid-template-columns: 1fr; gap: 25px; }
  .hero-copy .slide-title { font-size: clamp(39px, 9vw, 66px); }
  .hero-visual { min-height: 300px; transform: scale(0.75); }
  .slide-header { margin-bottom: 24px; }
  .slide-title { font-size: clamp(30px, 7vw, 48px); }
  .lead { font-size: 16px; }
  .formula { flex-wrap: wrap; }
  .formula-piece { min-width: 132px; flex: 1 1 160px; }
  .formula-plus { display: none; }
  .chart-layout { grid-template-columns: 1fr; }
  .model-cards,.hook-grid { grid-template-columns: 1fr; }
  .tool-wheel { min-height: 300px; transform: scale(0.78); }
  .closing-visual { min-height: 280px; }
  .footer-hint,.footer-brand,.footer-divider { display: none; }
  .footer-side { min-width: auto; }
  .footer-progress { width: 68%; }
  .edge-control { top: auto; bottom: 75px; width: 31px; height: 42px; }
  .edge-control-prev { right: 20px; }
  .edge-control-next { left: 20px; }
  .notes-panel { top: 86px; right: 18px; bottom: 75px; left: 18px; width: auto; }
  .overview-panel { inset: 80px 14px 70px; padding: 20px; }
  .overview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-height: 700px) and (min-width: 851px) {
  .topbar { height: 60px; }
  .slides { inset-block-start: 60px; inset-block-end: 49px; }
  .deck-footer { height: 49px; }
  .slide { padding-block: 23px; }
  .hero-visual { min-height: 320px; transform: scale(0.78); }
  .slide-header { margin-bottom: 19px; }
  .lead { margin-top: 12px; }
  .notes-panel { top: 74px; bottom: 62px; }
}

@media print {
  body { overflow: visible; background: white; }
  .presentation { display: block; min-height: auto; background: white; }
  .ambient,.noise-layer,.topbar,.deck-footer,.edge-control,.notes-panel,.overview-panel,.toast { display: none !important; }
  .deck-stage { display: block; width: 100vw; max-width: none; aspect-ratio: auto; overflow: visible; border: 0; border-radius: 0; box-shadow: none; background: white; }
  .slides { position: static; }
  .slide,.slide.is-active { position: relative; display: block; width: 100vw; height: 56.25vw; min-height: 0; padding: 6vw; visibility: visible; opacity: 1; page-break-after: always; color: #111827; transform: none; }
}
