/* Parent dialog. Its iframe owns the renderer and releases it when closed. */
#menu-dialog.newspaper-dialog {
  box-sizing: border-box;
  width: min(1250px, calc(100vw - 20px));
  max-width: none;
  height: min(95dvh, 1050px);
  max-height: none;
  padding: 0;
  overflow: hidden;
  border: 1px solid #a4a394;
  background: #192e3c;
}
#menu-dialog.newspaper-dialog[open] {
  display: flex;
  flex-direction: column;
}
.newspaper-toolbar {
  display: flex;
  align-items: center;
  gap: clamp(10px, 2vw, 28px);
  padding: 8px clamp(12px, 2.5vw, 32px);
  color: #20272a;
  background: #f5f0e3;
  border-bottom: 4px double #817765;
}
.newspaper-toolbar h2 {
  flex: 1;
  font: 400 clamp(21px, 2.6vw, 34px)/1.06 var(--serif, Georgia, serif);
  margin: 0;
}
.newspaper-toolbar a, .newspaper-toolbar button {
  font: 600 14px/1.2 var(--sans, Arial, sans-serif);
  white-space: nowrap;
}
.newspaper-toolbar a { text-underline-offset: 3px; }
.newspaper-toolbar button { min-height: 42px; }
.newspaper-slot { flex: 1; min-height: 0; }
.newspaper-slot iframe { display: block; height: 100%; width: 100%; border: 0; }

/* Inside the reader. The printed paper is the original menu PDF. */
.news-reader, .news-reader * { box-sizing: border-box; }
.news-reader {
  margin: 0;
  height: 100dvh;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  color: #faf4e6;
  background: radial-gradient(ellipse at 50% 15%, #3e5867, #223a49 57%, #122735);
  font: 15px/1.35 system-ui, sans-serif;
}
.news-reader [hidden] { display: none !important; }
#reading-table {
  position: relative;
  min-height: 0;
  overflow: hidden;
  padding: clamp(8px, 1.7vw, 23px);
}
#book.stf__parent, #single-sheet { width: 100%; height: 100%; }
#book.stf__parent { min-width: 0 !important; min-height: 0 !important; }
#book .stf__wrapper { height: 100%; }
#book { transition: translate .38s ease-in-out; }
#reading-table[data-edge="front"] #book { translate: calc(var(--sheet-width) * -.5) 0; }
#reading-table[data-edge="back"] #book { translate: calc(var(--sheet-width) * .5) 0; }
.news-page {
  overflow: hidden;
  background: #fbf6eb;
  box-shadow: 0 0 0 1px #857b6460, 0 4px 10px #07152255;
}
.news-page img, #single-sheet img { width: 100%; height: 100%; object-fit: contain; display: block; }
.news-page::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.news-page.--left::after { background: linear-gradient(90deg, transparent 85%, #49381b04 94%, #44351628); }
.news-page.--right::after { background: linear-gradient(90deg, #44351629, #49381b05 5%, transparent 12%); }
.news-page[data-page="1"]::after { background: none; }
#single-sheet img { filter: drop-shadow(0 4px 8px #09182699); }
#magnifier { position: absolute; inset: 0; overflow: auto; overscroll-behavior: contain; }
#magnifier .zoom-paper { display: flex; align-items: start; width: max-content; min-height: 100%; margin-inline: auto; }
#magnifier img { display: block; width: max(860px, 70vw); height: auto; }
.reader-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px 10px;
  padding: 7px 8px;
  background: #152b39;
  border-top: 1px solid #f1dcac4a;
}
.reader-controls button {
  background: transparent;
  color: inherit;
  min-width: 42px;
  min-height: 42px;
  border: 1px solid #eee1bd7a;
  padding: 5px 10px;
  font: inherit;
  cursor: pointer;
}
.reader-controls button:hover:enabled { background: #364a54; }
.reader-controls button:disabled { opacity: .46; cursor: default; }
.reader-controls button:focus-visible, #magnifier:focus-visible { outline: 3px solid #ffc987; outline-offset: -3px; }
.reader-controls output { font-size: .87em; text-align: center; }
@media (max-width: 550px) {
  #menu-dialog.newspaper-dialog { width: 100vw; height: 100dvh; border: 0; }
  .newspaper-toolbar { gap: 10px; padding: 6px 9px; }
  .newspaper-toolbar a, .newspaper-toolbar button { font-size: 12px; }
  .reader-controls { gap: 4px; font-size: 14px; }
  #reading-table { padding: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  #book { transition: none; }
}

/* The printed edition is a normal page. With scripts off the sheets scroll in order. */
.edition { display: block; height: auto; min-height: 100vh; }
.edition .newspaper-toolbar { position: sticky; top: 0; z-index: 2; justify-content: space-between; gap: 12px; }
.edition .newspaper-toolbar h1 { margin: 0; font: 600 clamp(19px, 3.2vw, 32px)/1.07 Georgia, serif; text-align: center; }
.edition .newspaper-toolbar h1 small { display: block; margin-top: 3px; font: 500 12px/1.2 system-ui, sans-serif; }
.edition .newspaper-toolbar a { color: #193244; display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 5px 10px; border: 1px solid #a69b85; border-radius: 3px; text-decoration: none; }
.edition .newspaper-toolbar a:hover { background: #e6dcc8; }
.edition #page-sheets { max-width: min(100%, 740px); margin: 0 auto; }
.edition #page-sheets .news-page { position: relative; margin: 0 0 16px; }
.edition #page-sheets img { width: 100%; height: auto; display: block; }
.edition.is-reader-ready { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; height: 100vh; height: 100dvh; min-height: 0; }
.edition.is-reader-ready .newspaper-toolbar { position: static; }
.edition .reader-controls { padding-bottom: max(7px, env(safe-area-inset-bottom)); }
.edition .reader-controls button { min-width: 44px; min-height: 44px; border-radius: 3px; }
.edition #magnifier { z-index: 1; background: #1a3242; }
.edition .reader-controls output { min-width: 94px; }
.edition-notes { background: #f5f0e3; color: #233744; text-align: center; max-height: 33dvh; overflow: auto; }
.edition-notes summary { min-height: 44px; padding: 12px; font-weight: 650; cursor: pointer; }
.edition-notes summary:focus-visible, .edition-notes a:focus-visible { outline: 3px solid #365a72; outline-offset: -3px; }
.edition-notes > div { max-width: 65ch; margin: 0 auto; padding: 0 18px 12px; text-align: left; }
.edition-notes h2 { margin: 0; font: 600 1.25rem/1.25 Georgia, serif; }
.edition-notes p { line-height: 1.55; }
.edition-notes a { color: #194865; text-underline-offset: .16em; }
.menu-edition-link { display: inline-flex; min-height: 44px; align-items: center; margin-top: 9px; padding: 8px 14px; border: 1px solid #776c58; border-radius: 3px; font: 600 .9rem/1.2 var(--sans, sans-serif); text-decoration: none; }
.menu-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 9px; }
.menu-actions .menu-edition-link { margin-top: 0; }
.menu-edition-link:hover, .menu-edition-link:focus-visible { background: #152c3c; color: #fff3d9; }
.paper__sections { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 16px; }
.paper__sections article:nth-child(-n+2) { grid-column: 1/-1; }
.paper__sections article:nth-child(n+3) h3 { font-size: clamp(1.22rem, 2vw, 1.9rem); }
@media (max-width:420px) {
  .edition .newspaper-toolbar { padding: 4px 7px; gap: 5px; }
  .edition .newspaper-toolbar a { padding: 4px 7px; }
  .edition .reader-controls { gap: 4px; font-size: 13px; }
  .edition .reader-controls button { padding-inline: 6px; }
  .edition .reader-controls output { min-width: 80px; }
  .paper__sections { column-gap: 12px; }
  .menu-edition-link { padding-inline: 10px; }
}
