@font-face {
  font-family: 'Cover Condensed'; src: url('BarlowCondensed-BlackItalic.ttf') format('truetype');
  font-style: italic; font-weight: 900; font-display: swap;
}
body.cover-open {
  display: grid; align-items: center; min-height: 100svh; background: #252a26;
}
.cover-open #briefing, .cover-open .notebook-puzzle { display:none; }
.notebook.cover-open .notebook-leaf { padding: 0; box-shadow: none; }
#opening-cover {
  isolation: isolate; position: relative; overflow: hidden; container-type: inline-size;
  min-height: 460px; height: min(100svh,740px); color: #fae9be; background: #211f1a;
  border-radius: 3px 6px 5px 3px; box-shadow: inset 0 0 0 1px #655441;
}
.cover-art {
  position: absolute; inset: 0; z-index: -3; width: 100%; height: 100%;
  object-fit: cover; object-position: 81% 48%;
}
#opening-cover::before {
  content: ''; position: absolute; inset: 0; z-index: -2; pointer-events: none;
  background: linear-gradient(0deg,#181915 0%,#201e19e8 10%,#221d16b0 24%,transparent 47%),
    linear-gradient(180deg,#1518133d,transparent 19%);
}
#opening-cover::after {
  content: ''; position: absolute; z-index: 1; pointer-events: none; inset: 0 auto 0 0; width: 9px;
  border-right: 1px solid #b4a48165;
  background: repeating-linear-gradient(47deg,#3d4034c7 0 1px,#1c211bdc 1px 3px);
}
.cover-print {
  position: relative; min-height: inherit; height: 100%; display: flex;
  flex-direction: column; justify-content: space-between;
  padding: max(14px,env(safe-area-inset-top)) 19px max(19px,env(safe-area-inset-bottom)) 27px;
}
.cover-mast {
  align-self: flex-start; margin: 0;
  font: 900 italic 13.2cqw/.95 'Cover Condensed',Impact,'Arial Narrow',sans-serif;
  letter-spacing: -.045em; text-transform: uppercase; color: #ddc48e;
  text-shadow: 1px 2px #74372f;
}
.cover-bottom { padding-bottom: 2px; }
#cover-issue {
  position: relative; display: inline-block; transform: rotate(-3deg); margin-bottom: 7px;
  color: #f1ddae; background: #743b3d; border-block: 1px solid #cda47b;
}
#cover-number {
  display: block; padding: 5px 26px 5px 10px;
  font: bold 12px/1.25 'Courier New',monospace; letter-spacing: .08em;
}
#cover-issue .edition-label { position: absolute; inset: 0; margin: 0; background: none; border: 0; }
#cover-issue .edition-label::after { border-color: currentColor; }
#cover-issue select { cursor: pointer; opacity: 0; width: 100%; height: 100%; min-height: 0; }
#cover-issue:focus-within { outline: 2px solid #f7e8c5; outline-offset: 2px; }
#cover-title {
  position: relative; margin: 0 0 18px; padding: 0 2px 3px 0;
  font: 900 italic 15.6cqw/.85 'Cover Condensed',Impact,'Arial Narrow',sans-serif;
  letter-spacing: -.025em; text-transform: uppercase; text-wrap: balance;
  color: #fff0ce; text-shadow: 1px 1px #973e36,2px 2px #973e36,3px 3px #973e36,4px 4px #782e2d,5px 6px #211d19;
  transform: rotate(-3deg); transform-origin: left bottom;
}
#cover-title.long-title { font-size: 13.6cqw; }
.cover-actions {
  display: flex; align-items: center; gap: 10px; justify-content: space-between;
  padding-top: 11px; border-top: 1px solid #bba88980;
}
.cover-actions button { min-height: 44px; border-radius: 2px; }
#cover-start {
  color: #25271f; background: #e3c58c; border: 1px solid #f0d8a9; padding: 8px 14px;
  font: bold 16px/1 'Courier New',monospace; box-shadow: 2px 2px #442e27;
}
#cover-start::after { content: ' →'; }
#cover-sound { padding: 7px 5px; color: #e9d9bb; background: transparent; border: 0; font: 14px Georgia,serif; }
.cover-actions button:focus-visible { outline: 2px solid #f4d78a; outline-offset: 3px; }
.notebook #brief-name {
  font: 900 italic clamp(32px,9cqw,44px)/.96 'Cover Condensed',Impact,'Arial Narrow',sans-serif;
  color: #5c2e35; letter-spacing: -.02em; text-transform: uppercase; text-shadow: 1px 1px #d5ba85;
}
@media (max-height:560px) {
  #opening-cover { min-height:350px; }
  #cover-title { font-size: min(14cqw,48px); }
  .cover-mast { font-size:min(12cqw,43px); }
}

.reading-edition {
  display: inline-flex; align-items: center; min-height: 42px; margin: 5px 7px 3px 0;
  padding: 7px 12px; border: 1px solid var(--section); border-radius: 2px;
  font: bold 14px Georgia,serif; color: var(--paper); background: var(--section);
  text-decoration: none;
}
.reading-edition:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

#cover-error {
  margin: 0 0 12px;
  max-width: 36ch;
  font: 600 13px/1.4 Georgia, serif;
  color: #f2dfbb;
  text-shadow: 0 1px 3px #211b15;
}
.edition-label:has(select:disabled)::after { display: none; }
#cover-issue:has(select:disabled) #cover-number { padding-right: 10px; }
.edition-label select:disabled { opacity: 1; cursor: default; -webkit-text-fill-color: currentColor; }
#cover-issue select:disabled { opacity: 0; }
.cover-actions[hidden] { display: none; }
