:root { color-scheme: light; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 280px;
  background: #f2e3c9 url('assets/paper-background.jpg') center top / 100% auto repeat-y;
}
.slides {
  width: min(1280px, calc(100% - 64px));
  margin: 0 auto;
  padding: 28px 0 44px;
  display: flex;
  flex-direction: column;
  gap: 26px;
}
.slide {
  display: block;
  border: 1px solid rgb(163 117 67 / 22%);
  border-radius: 26px;
  padding: 14px;
  margin: 0;
  width: 100%;
  background: linear-gradient(180deg, rgb(255 251 243 / 94%), rgb(246 234 209 / 92%));
  box-shadow:
    0 16px 34px rgb(86 57 24 / 16%),
    inset 0 1px 0 rgb(255 255 255 / 62%);
  overflow: hidden;
  cursor: zoom-in;
  line-height: 0;
  -webkit-tap-highlight-color: transparent;
}
.slide picture,
.slide img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  border-radius: 18px;
}
.slide:hover {
  box-shadow: 0 20px 45px rgb(86 57 24 / 21%), inset 0 1px 0 rgb(255 255 255 / 62%);
}
.slide:focus-visible {
  outline: 3px solid #0b8e95;
  outline-offset: 5px;
}
.viewer {
  /* Avoid 100vw/100dvh: Firefox keeps stale viewport units for modal <dialog> after F11 fullscreen. */
  position: fixed;
  inset: 0;
  margin: 0;
  padding: 0;
  border: none;
  width: auto;
  height: auto;
  max-width: none;
  max-height: none;
  background: #031724;
  color: white;
  overflow: hidden;
  overscroll-behavior: contain;
}
.viewer:modal {
  /* Beat Firefox UA dialog:modal max-width/max-height calc(100% - …). */
  position: fixed;
  inset: 0;
  width: auto;
  height: auto;
  max-width: none;
  max-height: none;
  margin: 0;
}
.viewer::backdrop { background: rgb(0 0 0 / 92%); }
.viewer-stage {
  position: absolute;
  inset: 0;
  width: auto;
  height: auto;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 12px 56px;
  touch-action: pan-y;
}
.viewer-image {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}
.control {
  position: absolute;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: rgb(0 0 0 / 40%);
  color: #fff;
  border: 1px solid rgb(255 255 255 / 35%);
  border-radius: 50%;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 140ms ease;
}
.control:hover,
.control:focus-visible { background: rgb(25 70 84 / 90%); }
.control:focus-visible {
  outline: 2px solid #6afff3;
  outline-offset: 3px;
}
.control svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.close {
  top: max(14px, env(safe-area-inset-top));
  right: max(14px, env(safe-area-inset-right));
  z-index: 3;
}
.previous,
.next {
  top: 50%;
  transform: translateY(-50%);
}
.previous { left: 8px; }
.next { right: 8px; }
@media (max-width: 720px) {
  body { background-size: auto 850px; }
  .slides {
    width: calc(100% - 20px);
    padding: 10px 0 20px;
    gap: 14px;
  }
  .slide {
    border-radius: 18px;
    padding: 8px;
    box-shadow: 0 8px 18px rgb(86 57 24 / 15%), inset 0 1px 0 rgb(255 255 255 / 58%);
  }
  .slide picture,
  .slide img { border-radius: 12px; }
  .viewer-stage { padding: 8px 0 74px; }
  .previous,
  .next {
    top: auto;
    bottom: max(14px, env(safe-area-inset-bottom));
    transform: none;
  }
  .previous { left: calc(50% - 56px); }
  .next { right: calc(50% - 56px); }
  .close {
    width: 41px;
    height: 41px;
  }
}

.abstract-card {
  border: 1px solid rgb(64 126 131 / 22%);
  border-radius: 26px;
  padding: 0;
  background: linear-gradient(180deg, rgb(255 252 246 / 95%), rgb(244 237 221 / 92%));
  box-shadow:
    0 16px 34px rgb(86 57 24 / 15%),
    inset 0 1px 0 rgb(255 255 255 / 70%);
  overflow: hidden;
}
.abstract-inner {
  padding: 26px 28px 28px;
  border-radius: 26px;
  position: relative;
}
.abstract-card h2 {
  margin: 0 0 18px;
  padding-left: 10px;
  font: 700 clamp(1.55rem, 2.8vw, 2.15rem)/1.15 Arial, Helvetica, sans-serif;
  color: #09596a;
  letter-spacing: .01em;
}
.abstract-card p {
  margin: 0 0 15px;
  font: 400 clamp(1rem, 1.15vw, 1.08rem)/1.72 Georgia, 'Times New Roman', serif;
  color: #2b2d2e;
  text-align: left;
  hanging-punctuation: first;
}
.abstract-card strong {
  color: #0d5660;
}
.abstract-card .keywords {
  margin-bottom: 0;
}
@media (max-width: 720px) {
  .abstract-card {
    border-radius: 18px;
    box-shadow: 0 8px 18px rgb(86 57 24 / 15%), inset 0 1px 0 rgb(255 255 255 / 58%);
  }
  .abstract-inner {
    padding: 18px 16px 20px;
    border-radius: 18px;
  }
  .abstract-card h2 {
    padding-left: 8px;
    margin-bottom: 14px;
  }
  .abstract-card p {
    margin-bottom: 12px;
    line-height: 1.64;
  }
}
@media print {
  .abstract-card {
    box-shadow: none;
    border: 1px solid #bbb;
    break-inside: avoid;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .control { transition: none; }
}
@media print {
  body { background: white; }
  .slides {
    width: 100%;
    gap: 12px;
    padding: 0;
  }
  .slide {
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    border: 0;
    break-after: page;
    break-inside: avoid;
    cursor: default;
    background: transparent;
  }
  .slide picture,
  .slide img { border-radius: 0; }
  .viewer { display: none; }
}

/* Clickable organization URL beneath the final slide. */
.presentation-footer {
  text-align: center;
  padding: 5px 14px 12px;
}
.presentation-footer a {
  display: inline-block;
  color: #07586a;
  font: 700 clamp(1.1rem, 2.3vw, 1.55rem)/1.35 Arial, Helvetica, sans-serif;
  text-underline-offset: 5px;
  overflow-wrap: anywhere;
}
.presentation-footer a:hover,
.presentation-footer a:focus-visible { color: #033946; }
.presentation-footer a:focus-visible { outline: 3px solid #0b8e95; outline-offset: 5px; border-radius: 2px; }
@media print {
  .presentation-footer { padding: 18px 10px; }
}
