/* =========================================================
   3D FLIPBOOK
   ========================================================= */
@property --p { syntax: "<number>"; inherits: true; initial-value: 0; }

.fb { position: relative; z-index: 1; }
.fb-stage {
  position: relative; width: 100%; perspective: 2600px; perspective-origin: 50% 30%;
  display: flex; justify-content: center; padding-top: 40px; touch-action: pan-y;
}
.fb-scaler { position: relative; transform-origin: top center; transform-style: preserve-3d; }
.fb-book {
  --shift: 0px; --tx: 10deg; --ty: 0deg; --edge-l: 0px; --edge-r: 0px;
  position: relative; margin: 0 auto; transform-style: preserve-3d;
  transform: rotateX(var(--tx)) rotateY(var(--ty)) translateX(var(--shift));
  transition: transform .9s cubic-bezier(.3,.8,.25,1);
  cursor: grab; user-select: none; -webkit-user-select: none;
}
.fb-book:active { cursor: grabbing; }
.fb-shadow {
  position: absolute; left: 6%; right: 6%; bottom: -36px; height: 50px; border-radius: 50%;
  background: radial-gradient(ellipse at center, #0000004d, #0000001f 45%, transparent 70%);
  transform: translateZ(-1px); pointer-events: none; transition: left .9s, right .9s;
}
.fb.is-closed .fb-shadow { left: 30%; right: 30%; }

/* leaves */
.fb-leaf {
  position: absolute; top: 0; left: 50%; width: 460px; height: 640px;
  transform-origin: left center; transform-style: preserve-3d;
  transition: transform .95s cubic-bezier(.45,.05,.25,1), --p .95s cubic-bezier(.45,.05,.25,1);
}
.fb-leaf.moving { will-change: transform; }
.fb-leaf.far { display: none; }
.fb-leaf.flipped { transform: rotateY(-180deg); }
.fb-face {
  position: absolute; inset: 0; overflow: hidden; backface-visibility: hidden; -webkit-backface-visibility: hidden;
  background: #FFFDF8; color: var(--ink); transform-style: flat;
}
.fb-face.back { transform: rotateY(180deg); }
.fb-face.front { border-radius: 0 6px 6px 0; }
.fb-face.back { border-radius: 6px 0 0 6px; }
.fb-face.is-hard { border-radius: 4px 10px 10px 4px; }
.fb-face.back.is-hard { border-radius: 10px 4px 4px 10px; }

/* spine shading */
.fb-face::after { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 5; }
.fb-face.front::after { background: linear-gradient(90deg, #00000038, #0000000d 5%, transparent 12%), linear-gradient(270deg, #ffffff40, transparent 3%); }
.fb-face.back::after { background: linear-gradient(270deg, #00000038, #0000000d 5%, transparent 12%), linear-gradient(90deg, #ffffff40, transparent 3%); }
.fb-face.is-hard::after { background: linear-gradient(90deg, #00000055, transparent 4%), linear-gradient(90deg, transparent 3%, #ffffff33 3.6%, transparent 5%); }
/* dynamic shading while turning */
.fb-shade { position: absolute; inset: 0; pointer-events: none; z-index: 6; opacity: 0; }
.fb-leaf.moving .fb-shade { opacity: calc(sin(calc(var(--p) * 180deg)) * .9); }
.fb-face.front .fb-shade { background: linear-gradient(90deg, #0000004d, transparent 55%, #ffffff33); }
.fb-face.back .fb-shade { background: linear-gradient(270deg, #0000004d, transparent 55%, #ffffff33); }

/* paper edges / thickness */
.fb-edge { position: absolute; top: 3px; bottom: 3px; pointer-events: none; transform: translateZ(-2px);
  background: repeating-linear-gradient(90deg, #e9e2d3 0 1px, #fffdf8 1px 2.5px); border: 1px solid #00000022; }
.fb-edge-r { left: calc(100% - 2px); width: var(--edge-r); border-radius: 0 4px 4px 0; opacity: 0; }
.fb-edge-l { right: calc(100% - 2px); width: var(--edge-l); border-radius: 4px 0 0 4px; opacity: 0; }
.fb-book.has-right .fb-edge-r, .fb-book.has-left .fb-edge-l { opacity: 1; }
.fb.single .fb-edge-r { left: calc(100% - 2px); }

/* face drop shadow */
.fb-leaf .fb-face { box-shadow: inset 0 0 0 1px #00000014; }

/* single page mode */
.fb.single .fb-leaf { left: 0; }
.fb.single .fb-leaf.flipped { opacity: 0; transition: transform .95s cubic-bezier(.45,.05,.25,1), --p .95s, opacity .25s .7s; pointer-events: none; }
.fb.single .fb-leaf.flipped.dragging, .fb.single .fb-leaf.dragging { opacity: 1; transition: none; }
.fb.single .fb-shadow { left: 4%; right: 4%; }

/* controls */
.fb-controls {
  position: relative; z-index: 3; display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap;
  margin: 8px auto 0; padding: 10px 14px; width: fit-content; max-width: calc(100% - 32px);
  background: var(--white); border: 2.5px solid var(--ink); border-radius: 999px; box-shadow: 5px 5px 0 var(--ink);
}
.fb-btn {
  width: 42px; height: 42px; border-radius: 50%; border: 2px solid var(--ink); background: var(--paper); color: var(--ink);
  font-size: 18px; cursor: pointer; display: grid; place-items: center; transition: .15s;
}
.fb-btn:hover:not(:disabled) { background: var(--ink); color: var(--yellow); }
.fb-btn:disabled { opacity: .3; cursor: default; }
.fb-range { width: clamp(100px, 22vw, 260px); accent-color: var(--pink); }
.fb-count { font: 700 12px/1 var(--f-mono); text-transform: uppercase; letter-spacing: .06em; min-width: 150px; text-align: center; }
.fb:fullscreen { background: var(--yellow); display: flex; flex-direction: column; justify-content: center; padding: 20px; }
.fb:fullscreen .fb-stage { padding-top: 10px; }
@media (max-width: 600px) {
  .fb-count { min-width: 0; flex-basis: 100%; order: -1; }
  .fb-range { display: none; }
  .fb-controls { gap: 8px; }
}

/* =========================================================
   MAGAZINE PAGES (base 460 × 640)
   ========================================================= */
.pg { position: absolute; inset: 0; padding: 34px 34px 46px; font-family: var(--f-sans); color: inherit; font-size: 12.5px; line-height: 1.5; }
.pg p { margin: 0 0 9px; }
.pg img { display: block; }
.pg .draft-badge { position: absolute; top: 14px; right: 14px; font-size: 8px; padding: 4px 5px; z-index: 4; }
.pg-bg { position: absolute; inset: 0; background: #ddd center/cover no-repeat; }
.pg-folio { position: absolute; left: 34px; right: 34px; bottom: 18px; display: flex; justify-content: space-between; font: 700 9px/1 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.pg-bars { position: absolute; left: 0; right: 0; bottom: 0; height: 14px; display: grid; grid-template-columns: repeat(7, 1fr); z-index: 3; }
.pg-bars i:nth-child(1) { background: var(--ink); } .pg-bars i:nth-child(2) { background: var(--yellow); } .pg-bars i:nth-child(3) { background: var(--orange); }
.pg-bars i:nth-child(4) { background: var(--green); } .pg-bars i:nth-child(5) { background: var(--pink); } .pg-bars i:nth-child(6) { background: var(--blue); } .pg-bars i:nth-child(7) { background: var(--red); }
.pg-kicker { font: 700 9.5px/1 var(--f-mono) !important; letter-spacing: .14em; text-transform: uppercase; display: flex; align-items: center; gap: 8px; margin-bottom: 12px !important; }
.pg-kicker::before { content: ""; width: 18px; height: 2.5px; background: var(--pink); }
.pg-kicker.light { color: var(--white); } .pg-kicker.light::before { background: var(--yellow); }
.pg-display { font: 400 66px/.88 var(--f-display); text-transform: uppercase; margin: 0 0 12px; letter-spacing: -.005em; }
.pg-display.xl { font-size: 96px; }
.pg-display.white { color: var(--white); }
.pg-display.dark { color: var(--ink); }
.pg-serif { font: 400 36px/1 var(--f-serif); margin-bottom: 14px; }
.pg-lead { font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.pg-lead.sm { font-size: 12px; }
.pg-lead.light { color: #ffffffdd; }
.pg-sub { font: 700 10px/1.4 var(--f-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.pg-sub.light { color: #ffffffcc; } .pg-sub.right { text-align: right; position: absolute; bottom: 44px; right: 34px; }
.pg-label { font: 700 9px/1 var(--f-mono) !important; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin-bottom: 8px !important; }
.pg-label.light { color: #ffffff99; }

/* COVER */
.pg-cover .pg { padding: 0; color: var(--white); }
.pg-cover { background: var(--ink); }
.pg-cover .pg-bg { top: 200px; background-position: 50% 20%; }
.pg-cover .pg-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, var(--ink) 0%, #12121200 22%, transparent 55%, #000000c0 100%); }
.cv-top { position: absolute; top: 18px; left: 24px; right: 24px; display: flex; justify-content: space-between; font: 700 9.5px/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; }
.cv-mast { position: absolute; z-index: 2; top: 40px; left: 20px; right: 20px; font: 400 128px/.8 var(--f-display); text-transform: uppercase; letter-spacing: -.01em; margin: 0; }
.cv-mast em { font-style: normal; color: var(--yellow); }
.cv-issue { position: absolute; z-index: 2; top: 262px; left: 24px; font: italic 400 22px/1 var(--f-serif); }
.cv-lines { position: absolute; left: 24px; bottom: 36px; list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; width: 230px; }
.cv-lines li { font-size: 11.5px; line-height: 1.25; border-left: 3px solid var(--yellow); padding-left: 9px; }
.cv-lines li:nth-child(2) { border-color: var(--pink); } .cv-lines li:nth-child(3) { border-color: var(--green); } .cv-lines li:nth-child(4) { border-color: var(--blue); }
.cv-lines b { display: block; font: 400 21px/1 var(--f-display); text-transform: uppercase; }
.cv-sticker { position: absolute; right: 22px; bottom: 44px; width: 96px; height: 96px; border-radius: 50%; background: var(--pink); color: var(--white); display: grid; place-items: center; text-align: center; font: 700 10px/1.1 var(--f-mono); text-transform: uppercase; transform: rotate(-12deg); border: 2.5px solid var(--white); }
.cv-sticker b { font: 400 22px/1 var(--f-display); }

/* CONTENTS */
.pg-toc { background: var(--paper); }
.toc { list-style: none; padding: 0; margin: 10px 0 0; }
.toc li { display: grid; grid-template-columns: 44px 1fr 20px; align-items: center; padding: 11px 0; border-bottom: 1.5px solid var(--ink); cursor: pointer; transition: padding .2s, background .2s; }
.toc li:hover { padding-left: 8px; background: var(--c); }
.toc-n { font: 400 28px/1 var(--f-display); color: var(--c); }
.toc li:hover .toc-n { color: var(--ink); }
.toc-l { font: 800 16px/1.1 var(--f-sans); font-stretch: 85%; }
.toc-arrow { font-weight: 800; }
.toc-note { font: 400 10px/1 var(--f-mono) !important; color: var(--muted); margin-top: 12px !important; text-transform: uppercase; }

/* LETTER */
.lt-wrap { font-size: 12px; color: var(--ink-2); }
.lt-photo { float: right; width: 150px; height: 190px; object-fit: cover; object-position: 50% 15%; margin: 0 0 10px 14px; border-radius: 80px 80px 10px 10px; border: 2px solid var(--ink); }
.dropcap::first-letter { float: left; font: 400 58px/.8 var(--f-display); color: var(--pink); margin: 4px 8px 0 0; }
.lt-sign { clear: both; padding-top: 6px; display: flex; flex-direction: column; }
.lt-sign b { font: italic 400 24px/1 var(--f-serif); }
.lt-sign span { font: 400 9.5px/1.4 var(--f-mono); text-transform: uppercase; color: var(--muted); }

/* ANTHEM */
.pg-anthem { background: var(--green); }
.pg-anthem .pg-display { color: var(--ink); font-size: 74px; }
.an-text p { font: 400 17px/1.25 var(--f-serif); margin: 0; }
.an-chorus { background: var(--white); border: 2px solid var(--ink); border-radius: 10px; padding: 10px 14px; margin: 10px 0; transform: rotate(-1.2deg); }
.an-chorus p { font-style: italic; }
.pg-anthem .pg-folio { color: var(--ink); }

/* PHOTO PAGE */
.pg-photo .pg { padding: 0; }
.in-overlay { position: absolute; left: 0; right: 0; bottom: 0; padding: 30px 30px 48px; background: linear-gradient(transparent, #000000c0); }
.in-overlay .pg-display { color: var(--white); margin: 0; }
.in-overlay .pg-display::after { content: ""; display: block; width: 120px; height: 10px; background: var(--yellow); margin-top: 12px; }
.pg-photo .pg-folio { color: #ffffffaa; }
.in-offices ol { list-style: none; padding: 0; margin: 0; counter-reset: o; }
.in-offices li { display: flex; justify-content: space-between; gap: 10px; padding: 6.5px 0; border-bottom: 1px dashed #12121233; font-size: 11.5px; counter-increment: o; }
.in-offices li span::before { content: counter(o, decimal-leading-zero) "  "; font-family: var(--f-mono); color: var(--pink); font-weight: 700; }
.in-offices li b { font-weight: 700; }

/* EXCOS mini IDs */
.pg-excos { background: var(--yellow); }
.pg-excos .pg-display { font-size: 56px; margin-bottom: 8px; }
.mid-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 4px; }
.mid-grid.top { margin-top: 0; }
.pg-excos .pg-display + .pg-sub { margin-bottom: 8px; color: var(--ink); }
.mid { background: var(--white); border: 2px solid var(--ink); border-radius: 10px; overflow: hidden; display: flex; flex-direction: column; box-shadow: 3px 3px 0 var(--ink); }
.mid-band { background: var(--c); display: flex; align-items: center; gap: 6px; padding: 5px 8px; border-bottom: 2px solid var(--ink); font: 700 7.5px/1 var(--f-mono); text-transform: uppercase; letter-spacing: .06em; }
.mid-band i { width: 15px; height: 15px; border-radius: 4px; background: var(--ink); color: var(--yellow); display: grid; place-items: center; font: 400 10px/1 var(--f-display); font-style: normal; }
.mid img { width: calc(100% - 16px); margin: 8px 8px 6px; aspect-ratio: 1/1; object-fit: cover; border-radius: 6px; border: 1.5px solid var(--ink); }
.mid > img { object-position: 50% 10%; }
.pg-excos .mid-grid:not(.top) .mid img { aspect-ratio: 1/.6; }
.pg-excos .mid-grid.top .mid img { aspect-ratio: 1/.9; }
.mid b { font: 400 14px/1 var(--f-display); text-transform: uppercase; padding: 0 8px; }
.mid small { font-size: 10px; padding: 2px 8px 0; font-weight: 600; }
.mid-foot { display: flex; justify-content: space-between; align-items: center; padding: 5px 8px 7px; font: 400 7.5px/1 var(--f-mono); color: var(--muted); }
.mid-foot em { width: 38px; height: 12px; background: repeating-linear-gradient(90deg, var(--ink) 0 1.5px, transparent 1.5px 3px, var(--ink) 3px 4px, transparent 4px 6px); }

/* MONTH */
.pg-month { background: var(--white); }
.mo-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.mo-num { font: 400 64px/.85 var(--f-display); color: var(--c); }
.mo-head b { display: block; font: 800 24px/1 var(--f-sans); font-stretch: 80%; }
.mo-head small { font: 400 10px/1.4 var(--f-mono); color: var(--muted); text-transform: uppercase; }
.mo-img { position: relative; height: 176px; border-radius: 10px; overflow: hidden; border: 2px solid var(--ink); margin-bottom: 14px; }
.mo-img img { width: 100%; height: 100%; object-fit: cover; }
.mo-tag { position: absolute; left: 10px; top: 10px; background: var(--c); border: 1.5px solid var(--ink); border-radius: 5px; padding: 5px 7px; font: 700 8.5px/1 var(--f-mono); text-transform: uppercase; letter-spacing: .08em; }
.mo-up { position: absolute; right: 10px; bottom: 10px; background: var(--ink); color: var(--white); border-radius: 5px; padding: 5px 7px; font: 700 8.5px/1 var(--f-mono); text-transform: uppercase; }
.mo-title { font: 800 19px/1.15 var(--f-sans); font-stretch: 88%; margin: 0 0 8px; }
.mo-title .draft-badge { position: static; vertical-align: 3px; }
.mo-sum { font-size: 11px; line-height: 1.45; color: var(--ink-2); }
.mo-list { list-style: none; padding: 0; margin: 4px 0 0; display: grid; gap: 5px; }
.mo-list li { position: relative; padding-left: 16px; font-size: 11px; line-height: 1.35; font-weight: 600; }
.mo-list li::before { content: ""; position: absolute; left: 0; top: 4px; width: 8px; height: 8px; background: var(--c); border: 1.5px solid var(--ink); border-radius: 2px; }

/* IFAKI DAY */
.pg-ifaki { background: var(--pink); }
.pg-ifaki .pg { overflow: hidden; }
.if-burst { position: absolute; width: 900px; height: 900px; left: -220px; top: -260px; border-radius: 50%; opacity: .25; background: repeating-conic-gradient(var(--yellow) 0 6deg, transparent 6deg 18deg); }
.pg-ifaki .pg-display { position: relative; font-size: 92px; text-shadow: 4px 4px 0 var(--ink); }
.pg-ifaki .pg-display span { color: transparent; -webkit-text-stroke: 2px var(--white); text-shadow: none; }
.if-stamp { position: absolute; right: 26px; bottom: 74px; width: 250px; background: var(--cream); padding: 12px 12px 8px; transform: rotate(5deg);
  --r: 5px;
  -webkit-mask: radial-gradient(var(--r), #0000 98%, #000) round calc(-1.5 * var(--r)) calc(-1.5 * var(--r)) / calc(3 * var(--r)) calc(3 * var(--r)), linear-gradient(#000 0 0) no-repeat 50% / calc(100% - 3 * var(--r)) calc(100% - 3 * var(--r));
  mask: radial-gradient(var(--r), #0000 98%, #000) round calc(-1.5 * var(--r)) calc(-1.5 * var(--r)) / calc(3 * var(--r)) calc(3 * var(--r)), linear-gradient(#000 0 0) no-repeat 50% / calc(100% - 3 * var(--r)) calc(100% - 3 * var(--r));
  filter: drop-shadow(0 10px 10px #0005); }
.if-stamp img { width: 100%; height: 190px; object-fit: cover; }
.if-stamp p { font: 400 18px/1 var(--f-display); color: var(--red); text-transform: uppercase; margin: 8px 0 0; }
.if-place { position: absolute; left: 34px; bottom: 50px; font: 700 10px/1.3 var(--f-mono); color: var(--white); text-transform: uppercase; letter-spacing: .1em; max-width: 140px; }
.pg-ifaki .pg-folio { color: #ffffffbb; }
.if-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 6px 0 12px; }
.if-grid img { width: 100%; height: 108px; object-fit: cover; object-position: 50% 22%; border-radius: 8px; border: 2px solid var(--ink); }
.if-quote { margin: 0 0 12px; background: var(--yellow); border: 2px solid var(--ink); border-radius: 10px; padding: 12px 14px; font: italic 400 18px/1.1 var(--f-serif); }
.if-quote cite { display: block; font: 400 8.5px/1.3 var(--f-mono); font-style: normal; text-transform: uppercase; margin-top: 6px; }
.if-comm { display: flex; flex-wrap: wrap; gap: 4px 6px; }
.if-comm .pg-label { width: 100%; }
.if-comm span { font-size: 9.5px; background: var(--paper); border: 1px solid var(--ink); border-radius: 999px; padding: 3px 8px; }

/* WEDDINGS */
.pg-wedding { background: var(--paper); }
.pg-wedding .pg-display .g { color: var(--green); }
.wd-stack { position: relative; height: 380px; }
.wd { position: absolute; width: 190px; margin: 0; background: var(--white); padding: 8px 8px 10px; border: 1.5px solid var(--ink); box-shadow: 0 10px 20px -10px #0006; }
.wd img { width: 100%; height: 190px; object-fit: cover; }
.wd figcaption { font: italic 400 15px/1.05 var(--f-serif); margin-top: 6px; }
.wd figcaption small { display: block; font: 400 8px/1.3 var(--f-mono); text-transform: uppercase; color: var(--muted); font-style: normal; margin-top: 3px; }
.wd-0 { left: 0; top: 0; transform: rotate(-5deg); }
.wd-1 { right: 0; top: 30px; transform: rotate(4deg); }
.wd-2 { left: 96px; top: 150px; transform: rotate(-1deg); z-index: 2; }

/* BIRTHDAYS */
.pg-bday { background: var(--orange); }
.pg-bday .pg-display { text-shadow: 3px 3px 0 var(--ink); font-size: 78px; }
.bd-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 18px; margin-top: 14px; }
.bd { text-align: center; color: var(--white); }
.bd img { width: 130px; height: 130px; border-radius: 50%; object-fit: cover; border: 3px solid var(--ink); margin: 0 auto 6px; box-shadow: 4px 4px 0 var(--yellow); }
.bd b { display: block; font-size: 12.5px; }
.bd small { font: 400 9px/1.3 var(--f-mono); text-transform: uppercase; }
.pg-bday .pg-folio { color: #ffffffcc; }

/* CONSTITUTION */
.pg-const { background: var(--blue); color: var(--white); }
.pg-const .pg-display { font-size: 62px; }
.co-steps { list-style: none; padding: 0; margin: 14px 0 18px; display: grid; gap: 8px; counter-reset: s; }
.co-steps li { display: grid; grid-template-columns: 26px 80px 1fr; align-items: center; gap: 8px; font-size: 11.5px; counter-increment: s; }
.co-steps li::before { content: counter(s); width: 24px; height: 24px; border-radius: 50%; background: var(--yellow); color: var(--ink); display: grid; place-items: center; font: 700 11px/1 var(--f-mono); border: 2px solid var(--ink); }
.co-steps b { font: 400 15px/1 var(--f-display); text-transform: uppercase; }
.co-btn { display: inline-block; background: var(--yellow); color: var(--ink); text-decoration: none; font: 800 14px/1 var(--f-sans); padding: 14px 18px; border-radius: 999px; border: 2px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); cursor: pointer; }
.co-btn:hover { background: var(--white); }
.pg-const .pg-folio { color: #ffffffaa; }

/* ROSTER */
.ro-list { list-style: none; padding: 0; margin: 0 0 16px; counter-reset: r; }
.ro-list li { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1.5px solid var(--ink); font-size: 12px; counter-increment: r; }
.ro-list li b::before { content: counter(r, decimal-leading-zero) "  "; font-family: var(--f-mono); color: var(--pink); }
.ro-list li span { font: 400 10px/1.6 var(--f-mono); text-transform: uppercase; color: var(--muted); }
.me-box { background: var(--ink); color: var(--white); border-radius: 10px; padding: 14px 16px; }
.me-box h3 { font: italic 400 24px/1 var(--f-serif); margin: 0 0 6px; }
.me-box p:last-child { margin: 0; font-size: 11px; color: #ffffffbb; }

/* GALLERY */
.pg-gallery { background: var(--paper); }
.ga-grid { display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(4, 1fr); gap: 6px; height: 400px; }
.ga-grid img { width: 100%; height: 100%; min-height: 0; object-fit: cover; border-radius: 6px; border: 1.5px solid var(--ink); }
.ga-grid img:nth-child(1) { grid-column: span 2; grid-row: span 2; }
.ga-grid img:not(:first-child) { object-position: 50% 18%; } /* faces sit in the upper part of most photos */

/* BACK COVER */
.pg-back { background: var(--ink); color: var(--white); }
.bc-inner { position: absolute; inset: 0; padding: 50px 38px; display: flex; flex-direction: column; }
.bc-mark { width: 64px; height: 64px; border-radius: 16px; background: var(--yellow); color: var(--ink); display: grid; place-items: center; font: 400 38px/1 var(--f-display); margin-bottom: 30px; box-shadow: 4px 4px 0 var(--pink); }
.pg-back .pg-display em { font-style: normal; color: var(--yellow); }
.bc-chorus { margin-top: 18px; border-left: 3px solid var(--pink); padding-left: 14px; }
.bc-chorus p { font: italic 400 19px/1.3 var(--f-serif); margin: 0; }
.bc-foot { margin-top: auto !important; font: 400 9.5px/1.6 var(--f-mono); text-transform: uppercase; letter-spacing: .1em; color: #ffffff88; padding-bottom: 10px; }

/* BLANK (reverse of single pages) */
.pg-blank { background: var(--paper); }
.pg-blank-mark { position: absolute; inset: 0; display: grid; place-items: center; font: 400 220px/1 var(--f-display); color: #1212120a; }
.pg-blank.is-hard { background: var(--ink); }
.pg-blank.is-hard .pg-blank-mark { color: #ffffff10; }
.pg-text { background: var(--white); }

/* additions */
.in-prelude { font-size: 11px; background: var(--paper); border-left: 3px solid var(--pink); padding: 8px 10px; margin-bottom: 12px !important; }
.mid-grid.three { grid-template-columns: 1fr 1fr; gap: 10px; }
.pg-excos .mid-grid.three .mid img { aspect-ratio: 1/.5; margin: 6px 8px 4px; }
.mid-grid.three .mid b { font-size: 12.5px; }
.mid-grid.three .mid-foot { padding-bottom: 5px; }
.mid-motto { display: flex; flex-direction: column; justify-content: center; background: var(--ink); color: var(--yellow); border: 2px solid var(--ink); border-radius: 10px; padding: 12px; font: 400 17px/1.05 var(--f-display); text-transform: uppercase; box-shadow: 3px 3px 0 var(--pink); }
.mid-motto span { font: 700 8px/1 var(--f-mono); letter-spacing: .14em; color: #ffffff99; margin-bottom: 8px; }
.mo-ev { margin-top: 8px; border-top: 1px dashed #12121244; padding-top: 6px; }
.mo-ev p { margin: 0 0 3px !important; font-size: 10px; line-height: 1.35; padding-left: 8px; border-left: 2.5px solid var(--pink); }
.ce-list { display: grid; gap: 10px; margin-top: 4px; }
.ce { display: grid; grid-template-columns: 92px 1fr; gap: 12px; align-items: center; border: 1.5px solid var(--ink); border-radius: 10px; padding: 7px; background: var(--white); }
.ce img { width: 92px; height: 78px; object-fit: cover; border-radius: 6px; }
.ce-farewell img { filter: grayscale(1); }
.ce small { display: block; font: 700 8.5px/1.3 var(--f-mono); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 4px; }
.ce-farewell small { color: var(--ink); }
.ce-outreach small { color: var(--green); }
.ce b { font: 800 14px/1.2 var(--f-sans); font-stretch: 88%; }
.co-btns { display: flex; flex-wrap: wrap; gap: 10px; }
.co-btn.ghost { background: transparent; color: var(--white); border-color: var(--white); }
.pg-const .co-steps { margin: 10px 0 14px; gap: 6px; }
.pm-pg p { font: 400 13.5px/1.42 var(--f-serif); color: var(--ink); }
.pg-pm .pg-serif { font-size: 30px; }
.me-formal { font: 400 9px/1.3 var(--f-mono) !important; text-transform: uppercase; color: #ffffff88; margin: 0 0 6px !important; }
.bd small { display: block; }
/* brand + certificate page */
.cv-top { align-items: center; }
.cv-logo { height: 34px; width: auto; }
.pg-cover .cv-mast { top: 62px; }
.pg-cover .cv-issue { top: 282px; }
.mid-band img { height: 16px !important; width: auto !important; margin: 0 !important; border: 0 !important; border-radius: 0 !important; aspect-ratio: auto !important; }
.mid-band span { border-left: 1.5px solid var(--ink); padding-left: 6px; }
.bc-logo { width: 170px; height: auto; margin-bottom: 28px; }
.pg-certpage { background: var(--red); }
.pg-certpage .pg-display { text-shadow: 4px 4px 0 var(--ink); margin-bottom: 18px; }
.ce-cert { margin: 0; background: var(--white); padding: 8px; border: 2.5px solid var(--ink); transform: rotate(-2deg); box-shadow: 0 18px 28px -14px #000a; }
.ce-cert img { width: 100%; height: auto; }
.ce-cert-cap { color: #ffffffe6; font-size: 11px; margin-top: 16px !important; }
.ce-cert-cap b { color: var(--white); }
.pg-certpage .pg-folio { color: #ffffffbb; }

/* Exco pages: three-across grid for the 13-member council */
.mid .ph-tile { box-sizing: border-box; width: calc(100% - 16px); height: auto; margin: 8px 8px 6px; aspect-ratio: 1/.8; border-radius: 6px; border: 1.5px solid var(--ink); gap: 5px; }
.mid .ph-tile b { font-size: 28px; }
.mid .ph-tile small { font-size: 6.5px; padding: 3px 6px; }
.mid-grid.six { grid-template-columns: repeat(3, 1fr); gap: 10px; }
.pg-excos .mid-grid.six .mid img, .mid-grid.six .mid .ph-tile { width: calc(100% - 12px); margin: 6px 6px 4px; aspect-ratio: 1/.82; }
.mid-grid.six .mid b { font-size: 11.5px; line-height: 1.05; padding: 0 6px; min-height: 2.1em; }
.mid-grid.six .mid small { font-size: 9px; line-height: 1.2; padding: 2px 6px 0; }
.mid-grid.six .mid-foot { padding: 4px 6px 5px; font-size: 6.5px; }
.mid-grid.six .mid-foot em { width: 28px; }
.mid-grid.six .mid-band { padding: 4px 6px; }
.mid-grid.six .mid-motto { grid-column: span 2; font-size: 16px; }
.in-offices li { padding: 4px 0; font-size: 10.5px; }
.mid-grid.six .mid .ph-tile b, .mid .ph-tile b { font: 400 30px/1 var(--f-display); padding: 0; min-height: 0; }
.mid-grid.six .mid .ph-tile small, .mid .ph-tile small { font: 700 6.5px/1 var(--f-mono); padding: 3px 6px; letter-spacing: .1em; }
.pg-excos .mid-grid.six .mid img, .mid-grid.six .mid .ph-tile { aspect-ratio: 1/.66; }
.mo-link { display: inline-block; margin-top: 10px; background: var(--ink); color: var(--yellow); text-decoration: none; font: 800 12px/1 var(--f-sans); padding: 10px 14px; border-radius: 999px; box-shadow: 3px 3px 0 var(--pink); }
.mo-link:hover { background: var(--pink); color: var(--white); box-shadow: 3px 3px 0 var(--ink); }

/* =========================================================
   PHOTO ALBUM (overlay, own 3D book — pages built from GALLERY)
   ========================================================= */
/* album.html — the album on its own page */
.album-page {
  min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column;
  background: radial-gradient(#12121214 1.2px, transparent 1.4px) 0 0/18px 18px, var(--yellow);
}
.album-page .fb-album { flex: 1; }
.album-back { flex: none; }
.album-section .album-link { color: var(--ink); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.album-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px var(--gutter) 0; }
.album-title { margin: 0; font: 400 clamp(26px, 4vw, 40px)/1 var(--f-display); text-transform: uppercase; color: var(--ink); }
.album-title span { display: block; font: 700 11px/1 var(--f-mono); letter-spacing: .14em; margin-bottom: 6px; }
.album-title em { font-style: normal; color: var(--pink); }
.fb-album { display: flex; flex-direction: column; justify-content: center; padding-bottom: 18px; }
.fb-album .fb-stage { padding-top: 14px; }
.fb-album .fb-range { accent-color: var(--ink); }
.album-open { align-self: center; }

/* pages */
.al-page { background:
  repeating-linear-gradient(0deg, #00000005 0 1px, transparent 1px 4px),
  linear-gradient(135deg, #F6EEDF, #EFE4D0); }
.al-folio { position: absolute; left: 0; right: 0; bottom: 16px; text-align: center; font: 700 9px/1 var(--f-mono); letter-spacing: .12em; color: #12121266; }
.al-slots { position: absolute; left: 30px; right: 30px; top: 30px; bottom: 44px; display: flex; flex-direction: column; justify-content: space-around; align-items: center; gap: 10px; }
.al-slots.one { top: 150px; }
.al-slots:not(.one) .al-snap:nth-child(1) { align-self: flex-start; }
.al-slots:not(.one) .al-snap:nth-child(2) { align-self: flex-end; }
.al-snap {
  position: relative; margin: 0; width: min-content; background: #fff; padding: 10px 10px 4px;
  box-shadow: 0 1px 1px #00000014, 0 10px 22px -10px #0000006b; transform: rotate(var(--r, 0deg));
}
.al-snap img { display: block; width: auto; height: auto; max-width: 360px; max-height: 205px; min-width: 120px; background: #e9e2d3; }
.al-slots.one .al-snap img { max-height: 340px; }
.al-snap figcaption { font: italic 400 16px/1.15 var(--f-serif); color: var(--ink-2); text-align: center; padding: 8px 4px 6px; }
.al-tape { position: absolute; top: -11px; left: 50%; width: 86px; height: 22px; transform: translateX(-50%) rotate(-3deg); opacity: .85;
  background: repeating-linear-gradient(45deg, #ffffff40 0 6px, transparent 6px 12px), var(--pink); box-shadow: 0 1px 2px #0000001f; }
.al-slots .al-snap:nth-child(2) .al-tape { background-color: var(--blue); transform: translateX(-50%) rotate(4deg); }
.al-page:nth-child(odd) .al-tape { background-color: var(--green); }

.al-chap { position: absolute; left: 34px; right: 34px; top: 30px; }
.al-chap small { font: 700 9px/1 var(--f-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.al-chap h3 { margin: 6px 0 8px; font: 400 44px/.95 var(--f-display); text-transform: uppercase; color: var(--ink);
  text-decoration: underline; text-decoration-color: var(--c); text-decoration-thickness: 7px; text-underline-offset: 5px; }
.al-chap span { font: italic 400 15px/1 var(--f-serif); color: var(--muted); }

/* covers */
.al-cover { color: var(--white); background:
  repeating-linear-gradient(45deg, #ffffff0a 0 2px, transparent 2px 5px),
  repeating-linear-gradient(-45deg, #0000000d 0 2px, transparent 2px 5px), var(--pink); }
.al-cover .pg { padding: 0; }
.al-cover-in { position: absolute; inset: 22px 22px 36px; border: 2px dashed #ffffffaa; border-radius: 8px; padding: 36px 30px; display: flex; flex-direction: column; }
.al-logo { width: 120px; margin-bottom: auto; }
.al-cover-k { font: 700 10px/1 var(--f-mono); letter-spacing: .16em; text-transform: uppercase; margin: 0 0 12px !important; }
.al-cover-t { font: 400 104px/.86 var(--f-display); text-transform: uppercase; margin: 0 0 14px; }
.al-cover-t.sm { font-size: 84px; margin-top: auto; }
.al-cover-t em { font-style: normal; color: var(--yellow); }
.al-cover-s { font: italic 400 22px/1.2 var(--f-serif); margin: 0 !important; }
.al-cover-badge { position: absolute; top: 30px; right: 26px; width: 84px; height: 84px; border-radius: 50%; background: var(--yellow); color: var(--ink);
  display: grid; place-content: center; text-align: center; font: 700 9px/1.2 var(--f-mono); text-transform: uppercase; letter-spacing: .1em; transform: rotate(10deg); box-shadow: 4px 4px 0 var(--ink); }
.al-cover-badge b { font: 400 28px/1 var(--f-display); letter-spacing: 0; }
.al-back { background-color: var(--ink); }
.al-back .al-cover-in { border-color: #ffffff55; }
.al-back-foot { margin: 18px 0 0 !important; font: 400 9.5px/1.6 var(--f-mono); text-transform: uppercase; letter-spacing: .1em; color: #ffffff88; }

/* inside cover */
.al-endpaper { background: radial-gradient(circle, var(--pink) 2px, transparent 2.5px) 0 0/26px 26px,
  radial-gradient(circle, var(--blue) 2px, transparent 2.5px) 13px 13px/26px 26px, #FBF6EC; }
.al-note { position: absolute; left: 50px; right: 50px; top: 50%; transform: translateY(-50%) rotate(-1.5deg); background: #fff; padding: 34px 28px; text-align: center; box-shadow: 0 12px 26px -12px #00000066; border-top: 10px solid var(--yellow); }
.al-note-k { font: 700 9px/1 var(--f-mono) !important; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.al-note-t { font: italic 400 30px/1.1 var(--f-serif); margin: 10px 0 12px !important; }
.al-note-s { font: 700 10px/1 var(--f-mono); text-transform: uppercase; letter-spacing: .1em; }
.al-note-m { font: italic 400 16px/1.3 var(--f-serif); color: var(--pink); margin: 16px 0 0 !important; }

.al-blank { background: linear-gradient(135deg, #F6EEDF, #EFE4D0); }
.al-blank.is-hard { background: var(--pink); }
.al-blank-mark { position: absolute; inset: 0; display: grid; place-items: center; padding: 60px; text-align: center; font: italic 400 26px/1.2 var(--f-serif); color: #1212122e; }

@media (max-width: 600px) {
  .album-top { padding-top: 12px; }
  .album-page .fb-album { justify-content: flex-start; padding-bottom: 24px; }
  .album-title { font-size: 22px; }
  .album-back { padding: 10px 14px; font-size: 13px; }
  .album-title span { display: none; }
  .album-page .brand-logo { height: 34px; }
  .album-open { order: 3; }
}
.al-slots.solo { justify-content: center; }
.al-slots.solo .al-snap { align-self: center !important; }
.al-slots.solo .al-snap img { max-height: 440px; }

/* gallery.html */
.gallery-page .album-top { position: sticky; top: 0; z-index: 20; padding-bottom: 12px; background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1.5px solid var(--line); }
.gallery-page .gallery { padding-top: clamp(28px, 5vw, 56px); }
.filters button small { font: 700 10px/1 var(--f-mono); opacity: .6; margin-left: 2px; }
.gallery-page .masonry img:not(.ok) { aspect-ratio: 4/3; background: var(--paper-2); } /* placeholder size until the photo loads */
.gallery-page .masonry img { height: auto; }

/* month photo shown whole (tall photos), over a blurred copy of itself */
.mo-img.whole { background: var(--ink); }
.mo-img.whole::before { content: ""; position: absolute; inset: -20px; background: var(--bg) center/cover; filter: blur(14px) brightness(.75); }
.mo-img.whole img { position: relative; object-fit: contain !important; object-position: 50% 50% !important; }
