body.wc-presenting { overflow: hidden; }

dialog.wc-presentation {
  position: fixed; inset: 0; z-index: 2147483646;
  margin: 0; padding: 0; border: 0; border-radius: 0; overflow: hidden;
  max-width: none; max-height: none;
  width: 100%; height: 100%; height: 100dvh;
  display: grid; grid-template-rows: auto minmax(0, 1fr) auto;
  background: #fff; color: #231e22; font-family: Montserrat, Arial, sans-serif;
  line-height: 1.45; text-align: left; box-sizing: border-box;
}
dialog.wc-presentation::backdrop { background: white; }
dialog.wc-presentation:not([open]) { display: none; }
.wc-presentation [hidden] { display: none !important; }
.wc-presentation button {
  min-height: 44px; border: 1px solid #c9c0c2; border-radius: 8px;
  background: white; color: #352f33; padding: .48rem .85rem;
  font: 650 clamp(.875rem, 1.2vw, 1.13rem)/1.2 Montserrat, Arial, sans-serif;
  cursor: pointer; touch-action: manipulation;
}
.wc-presentation button:disabled { opacity: .4; cursor: default; }
.wc-presentation button:enabled:hover { background: #f8f1f1; border-color: #ad2c34; }
.wc-presentation :focus-visible { outline: 3px solid #2368a0; outline-offset: 3px; }
.presentation-header, .presentation-footer {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap;
  gap: .5rem 1.25rem; padding: clamp(.5rem,1.5vh,1rem) clamp(1rem, 4vw, 4rem);
  background: #fff;
}
.presentation-header { border-top: .32rem solid #ad2c34; border-bottom: 1px solid #e4dcdd; }
.presentation-brand { display: flex; gap: .7rem; align-items: center; }
.presentation-brand img { width: clamp(2.1rem, 4vw, 3.2rem); height: auto; }
.presentation-brand strong, .presentation-brand span { display: block; }
.presentation-brand strong { font-size: clamp(1rem, 1.5vw, 1.45rem); color: #34282b; }
.presentation-brand span { color: #5b5155; font-size: clamp(.81rem, 1vw, 1rem); }
.presentation-controls { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.presentation-scroll { min-width: 0; min-height: 0; overflow: auto; overscroll-behavior: contain; }
.presentation-slide {
  width: min(100%, 90rem); margin: 0 auto; box-sizing: border-box;
  padding: clamp(1.35rem, 4.5vh, 3.7rem) clamp(1.15rem, 6vw, 6rem);
}
.presentation-heading { display: flex; align-items: baseline; flex-wrap: wrap; gap: .5rem 1.2rem; }
.presentation-heading h2 { margin: 0; color: #762028; font-size: clamp(1.35rem, 2.5vw, 2.6rem); }
.presentation-heading h2:focus { outline: none; }
.presentation-format { font-size: clamp(1rem, 1.5vw, 1.6rem); font-weight: 650; color: #5b5155; }
.presentation-prompt {
  margin: clamp(.65rem, 2vh, 1.5rem) 0; font-size: clamp(1.5rem, 3.6vw, 3.9rem);
  font-weight: 650; line-height: 1.29; overflow-wrap: anywhere; white-space: pre-line;
}
.presentation-figure { margin: clamp(.75rem, 2vh, 1.6rem) 0; text-align: center; }
.wc-presentation .presentation-figure .diagram {
  display: block; margin: 0 auto; width: 100%; max-width: 52rem;
  height: clamp(9rem, 34vh, 28rem); color: #231e22;
}
.wc-presentation .presentation-figure .diagram.grid { height: clamp(11rem, 42vh, 31rem); }
.wc-presentation .presentation-figure .diagram.coin { width: auto; height: clamp(6rem, 20vh, 11rem); }
.presentation-figure figcaption { font-size: .82rem; color: #5b5155; margin-top: .35rem; }
.presentation-detail { margin: 1rem 0 0; padding: .8rem 1.2rem; border-left: .3rem solid #ad2c34; background: #fcf4f4; }
.presentation-detail h3 { font-size: clamp(1.05rem, 1.7vw, 1.8rem); color: #762028; margin: 0 0 .4rem; }
.presentation-detail p, .presentation-detail li {
  font-size: clamp(1.1rem, 2.3vw, 2.6rem); line-height: 1.45; overflow-wrap: anywhere;
}
.presentation-detail p { margin: 0; }
.presentation-detail ol { margin: .45rem 0 0; padding-left: 1.8em; }
.presentation-detail li + li { margin-top: .3em; }
.presentation-footer { border-top: 1px solid #ddd3d5; }
.presentation-progress { font-size: clamp(.9rem, 1.5vw, 1.4rem); font-weight: 700; white-space: nowrap; margin-right: .35rem; }
.wc-presentation button.presentation-next { background: #ad2c34; color: white; border-color: #ad2c34; }
.wc-presentation button.presentation-next:enabled:hover { background: #88232a; }
.presentation-status { position: absolute; right: 1rem; top: 4.4rem; background: #fff; color: #34282b; border: 1px solid #d8d1d2; padding: .5rem .75rem; border-radius: 6px; }
@media (max-width: 560px) {
  .presentation-header, .presentation-footer { padding-inline: .7rem; gap: .4rem; }
  .wc-presentation button { padding-inline: .65rem; }
  .presentation-brand { gap: .4rem; }
  .presentation-brand img { width: 1.85rem; }
  .presentation-reveals, .presentation-navigation { flex: 1 1 auto; }
  .presentation-navigation { justify-content: flex-end; }
  .presentation-footer { padding-bottom: max(.5rem, env(safe-area-inset-bottom)); }
}
@media print {
  body.wc-presenting { overflow: visible; }
  body.wc-presenting dialog::backdrop { display: none !important; background: transparent !important; }
  body.wc-presenting > :not(.wc-presentation) { display: none !important; }
  body.wc-presenting > .wc-presentation[role="dialog"] {
    display: block !important; position: static; width: auto; height: auto; color: black;
  }
  .wc-presentation .presentation-header, .wc-presentation .presentation-footer,
  .wc-presentation .presentation-status { display: none; }
  .wc-presentation .presentation-scroll { overflow: visible; }
  .presentation-slide { padding: 0; }
  .presentation-prompt { font-size: 21pt; }
  .presentation-detail p, .presentation-detail li { font-size: 13pt; }
}
