/* Issue pages: the letter opens as a big window on the same desktop.
   Top bar, dock, wallpaper and CRT come from style.css + rlrpb.css. */

body.issue-page { overflow-y: auto; overflow-x: hidden; }

.reader {
  max-width: 860px;
  margin: 0 auto;
  padding: calc(var(--top-bar-height) + 28px) 16px 130px;   /* room for the top bar and the dock */
}

.issue-window {
  background: #e4e7eb;
  border: 1px solid #fff;
  border-right: 2px solid #8e949c; border-bottom: 2px solid #8e949c;
  border-radius: 6px;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
  overflow: hidden;
  animation: windowOpen .35s cubic-bezier(.2,.9,.3,1) both;
  text-shadow: none;
}
@keyframes windowOpen {
  from { opacity: 0; transform: translateY(14px) scale(.97); }
  to { opacity: 1; transform: none; }
}
.issue-window .window-header { cursor: default; }
.issue-window .window-btn { text-decoration: none; }
.win-body { background: var(--paper); color: var(--ink); font-family: var(--font-ui); }

.btn {
  display: inline-block; font: 700 12px var(--font-ui); color: var(--ink); text-decoration: none;
  padding: 8px 14px; background: #e4e7eb; cursor: pointer;
  border: 1px solid #fff; border-right: 2px solid #555; border-bottom: 2px solid #555;
}
.btn.pink { background: var(--pink); color: #fff; }
.field {
  font: 13px var(--font-ui); padding: 8px 10px; width: 100%; background: #fff; color: var(--ink);
  border: 2px solid #555; border-right: 1px solid #fff; border-bottom: 1px solid #fff;
}

/* masthead */
.mast { text-align: center; padding: 40px 24px 28px; border-bottom: 1px solid var(--ink); position: relative; }
.mast .tag { width: min(78%, 520px); display: block; margin: 0 auto -6px; transform: rotate(-4deg); }
.mast .line { display: flex; justify-content: center; gap: 18px; flex-wrap: wrap; font-size: 11px; color: #6b6560; margin-top: 18px; }
.mast .sticker {
  position: absolute; top: 22px; right: 22px; transform: rotate(9deg);
  background: var(--acid); font-family: var(--pixel-soft); font-size: 11px; padding: 8px 10px; border: 1.5px solid var(--ink);
}

.letter { padding: 36px clamp(20px, 6vw, 72px) 8px; }
.letter h1 { font: 400 clamp(38px, 6.4vw, 62px)/1 var(--serif); margin: 0 0 22px; letter-spacing: -.01em; }
.letter h1 em { color: var(--pink); }
.letter p { font-size: 14px; line-height: 1.75; margin: 0 0 14px; max-width: 60ch; }
.letter .sign { font: italic 26px var(--serif); margin-top: 6px; }

.toc { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 clamp(20px, 6vw, 72px) 28px; }
.toc a { font-size: 11px; color: var(--ink); text-decoration: none; border: 1px solid var(--ink); border-radius: 20px; padding: 3px 10px; }
.toc a:hover { background: var(--ink); color: var(--paper); }

/* sections */
.sec { display: grid; grid-template-columns: 140px 1fr; gap: 24px; padding: 34px clamp(20px, 6vw, 72px); border-top: 1px dashed rgba(0,0,0,.35); }
.sec .num { font-family: var(--pixel-soft); font-size: 12px; line-height: 1.6; }
.sec .num b { display: block; font-size: 34px; line-height: 1; font-family: var(--serif); font-weight: 400; color: var(--pink); }
.sec .num small { color: #6b6560; font-family: var(--font-ui); font-size: 11px; }
.sec h2 { font: 400 34px/1.05 var(--serif); margin: 0 0 6px; }
.sec .where { font-size: 11px; color: #6b6560; margin: 0 0 16px; text-transform: uppercase; letter-spacing: .06em; }
.sec p { font-size: 13.5px; line-height: 1.75; margin: 0 0 12px; max-width: 58ch; }
.sec .ph { background: var(--acid); padding: 0 3px; }

.pic { margin: 18px 0 6px; position: relative; max-width: 420px; }
.pic img, .pic .fake { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border: 1.5px solid var(--ink); }
.pic.tilt-l { transform: rotate(-1.5deg); }
.pic.tilt-r { transform: rotate(1.2deg); }
.pic figcaption { font-size: 11px; color: #6b6560; margin-top: 8px; }
.fake { display: grid !important; place-items: center; font-family: var(--pixel-soft); font-size: 11px; color: rgba(0,0,0,.55); }
.fake.a { background: linear-gradient(135deg, #f3e6cf, #d8c3a0); }
.fake.b { background: repeating-linear-gradient(0deg, #151515 0 3px, #262626 3px 6px); color: #bbb; }

/* end of the letter */
.end { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--ink); }
.end > div { padding: 30px clamp(20px, 4vw, 40px); }
.end .join { background: var(--ink); color: var(--paper); }
.end .join h3, .end .work h3 { font: italic 400 30px/1.05 var(--serif); margin: 0 0 10px; }
.end p { font-size: 13px; line-height: 1.65; margin: 0 0 14px; }
.end form { display: flex; gap: 8px; }
.end .work a { color: var(--ink); }
.end .tagw { height: 34px; display: block; margin-top: 18px; opacity: .9; }

.past { padding: 18px clamp(20px, 6vw, 72px) 26px; font-size: 12px; color: #6b6560; border-top: 1px solid var(--ink); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.past a { color: var(--ink); }

@media (max-width: 768px) {
  .reader { padding: 50px 8px 120px; }
  .issue-window { border-radius: 12px 12px 6px 6px; }
  .sec { grid-template-columns: 1fr; gap: 10px; }
  .sec .num b { display: inline; font-size: 28px; margin-right: 8px; }
  .end { grid-template-columns: 1fr; }
  .mast .sticker { top: 12px; right: 12px; font-size: 9px; }
}

/* dock hides while reading (scrolling down), like an auto-hiding dock */
.issue-page .dock-container { transition: transform .3s ease, opacity .3s ease; }
.issue-page.reading .dock-container { transform: translateY(140%); opacity: 0; }

/* phones: no dock inside the issue, just the iPhone home bar back to the desktop */
.home-bar { display: none; }
@media (max-width: 768px) {
  .issue-page .dock-container { display: none; }
  .reader { padding-bottom: 60px; }
  .home-bar {
    display: flex; justify-content: center; align-items: center;
    position: fixed; left: 0; right: 0; bottom: 0; height: 34px; z-index: 10001;
  }
  .home-bar span {
    width: 134px; height: 5px; border-radius: 3px;
    background: rgba(20, 18, 18, .82);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, .5);
  }
}
.letter .sign-tag { width: 92px; display: block; margin: 4px 0 6px -4px; transform: rotate(-6deg); }

/* the drawn tag */
.mast .tag { width: min(78%, 520px); display: block; margin: 0 auto -6px; transform: rotate(-4deg); }
.letter .sign-tag { width: 92px; display: block; margin: 4px 0 6px -4px; transform: rotate(-6deg); }
.end .tagw { height: 34px; display: block; margin-top: 18px; opacity: .9; }
.end .join a { color: var(--acid); }

/* lyric and book quotes */
.sec .quote { font: italic 400 21px/1.35 var(--serif); margin: 6px 0 18px; padding: 4px 0 4px 16px; border-left: 3px solid var(--pink); max-width: 52ch; }

/* scanned book pages: show the whole page, no cropping */
.pic.page { max-width: 460px; }
.pic.page img { aspect-ratio: auto; object-fit: contain; }

/* embedded track */
.video { margin: 18px 0 18px; max-width: 520px; transform: rotate(-0.8deg); }
.video iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 1.5px solid var(--ink); background: #151515; }
.video figcaption { font-size: 11px; color: #6b6560; margin-top: 8px; }
