body:has(#session-reader[open]) { overflow: hidden; }

#session-reader {
  box-sizing: border-box;
  position: fixed;
  inset: 0;
  width: min(66rem, calc(100% - 3rem));
  max-width: none;
  max-height: 88vh;
  max-height: min(88dvh, 64rem);
  padding: 0;
  margin: auto;
  border: 1px solid #d9d1c4;
  border-radius: 18px;
  background: #fffefa;
  color: #172e3d;
  box-shadow: 0 20px 80px #10283840;
  overflow: hidden;
}
#session-reader[open] { display: flex; flex-direction: column; }
#session-reader::backdrop { background: rgb(19 36 49 / 52%); }
#session-reader .reader-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: clamp(12px, 3vw, 32px);
  flex: none;
  padding: 18px clamp(22px, 4vw, 54px);
  border-bottom: 1px solid #e4ddd1;
  background: #f7f4ed;
}
#reader-title {
  min-width: 0;
  align-self: center;
  margin: 0;
  color: #172e3d;
  font: 400 clamp(1.2rem, 2.2vw, 1.7rem)/1.23 Georgia, serif;
  overflow-wrap: anywhere;
}
#session-reader .reader-head form { margin: 0; flex: none; }
#session-reader .reader-close {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  padding: 8px 13px;
  border: 1px solid #cec5ba;
  border-radius: 8px;
  background: #fff;
  color: #263d4b;
  font: 600 .9rem/1.1 system-ui, sans-serif;
  cursor: pointer;
}
#session-reader .reader-close span { font: 400 1.55rem/1 system-ui, sans-serif; }
#session-reader .reader-close:hover { border-color: #91305e; color: #872551; }
#session-reader :focus-visible, .reader-open:focus-visible {
  outline: 2px solid #912d60;
  outline-offset: 2px;
}
#session-reader .reader-scroll {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  padding: clamp(18px, 3vw, 36px) clamp(22px, 5vw, 64px);
}
#reader-text {
  max-width: 78ch;
  margin: 0 auto;
  color: #172e3d;
  font: 400 clamp(1.05rem, 1.35vw, 1.18rem)/1.65 Georgia, serif;
  overflow-wrap: anywhere;
}
#reader-text p { margin: .7em 0; font: inherit; color: inherit; }
#reader-text :is(h1,h2,h3,h4,h5,h6) { margin: 1em 0 .4em; font: 600 1.24em/1.3 Georgia, serif; color: inherit; }
#reader-text > :first-child { margin-top: 0; }
#reader-text img { max-width: 100%; height: auto; }
#reader-text table { display: block; max-width: 100%; overflow-x: auto; }
.reader-open::after {
  content: '';
  display: inline-block;
  width: .4em;
  height: .4em;
  flex: none;
  border: solid currentColor;
  border-width: 2px 2px 0 0;
  transform: rotate(45deg);
}
.native-summary .reader-open, .booking-catalog .reader-open {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  min-height: 44px;
  border: 1px solid #cfc9c1;
  border-radius: 8px;
  background: #fff;
  color: #243f50;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.native-summary .reader-open { width: 100%; margin: 16px 0; }
.booking-catalog .reader-open { margin-inline-end: .65rem; }
.reader-open:hover { color: #872551; border-color: #ac6489; }
@media (max-width: 600px) {
  #session-reader { width: calc(100% - 16px); max-height: 94vh; max-height: 94dvh; border-radius: 13px; }
  #session-reader .reader-head { padding: 13px 15px; }
  #session-reader .reader-scroll { padding: 16px 18px 24px; }
  #reader-text { font-size: 1.04rem; }
}
