/* Xiaomi 18 Pro Max eMagazine — DEMO v3 · newspaper scrapbook · cosmic blue + kodak yellow
   Layout: one centred 1200px column, 12-col grid inside; text + art alternate sides.
   Heading plates (sapo / H2 / sub) are ALWAYS centred. Breakpoints: ≤1100 stacked, ≤640 mobile. */
.td-emag__wrapper {
  --x-paper: #F2EADA; --x-ink: #17161A; --x-ink-soft: #3A3833; --x-cosmic: #0B3A8F; --x-kodak: #F2BE1A; --x-white: #FFFDF8;
  --x-max: 1200px; --x-gut: clamp(16px, 4vw, 48px); --x-gap: 24px; --x-sec: clamp(64px, 8vw, 112px);
  background: var(--x-paper) url(https://genk.mediacdn.vn/139269124445442048/2026/11/21/paper-17952435979321419475442.jpg) 0 0 / 1024px;
  color: var(--x-ink); font-family: 'EmagNews', Georgia, serif;
  padding-bottom: 96px; overflow-x: clip; position: relative;
}
.td-emag__wrapper * { box-sizing: border-box; }
.td-emag__wrapper img { display: block; max-width: 100%; height: auto; }
.td-emag__wrapper figure { margin: 0; }

/* ---------- body text ---------- */
.td-emag__wrapper .td-p { max-width: 600px; margin: 0 0 1.15em; padding: 0; font-size: 1.2rem; line-height: 1.72; color: var(--x-ink); }
.td-emag__wrapper .td-p:last-child { margin-bottom: 0; }
.td-txt { position: relative; max-width: 600px; }
.td-hl { background: linear-gradient(transparent 60%, rgba(242,190,26,.75) 60% 92%, transparent 92%); }

/* ---------- plates (designed images) ---------- */
.td-plate img { width: 100%; }
.td-plate--sapo, .td-plate--h2, .td-plate--sub { margin-inline: auto; width: min(100% - 2 * var(--x-gut), var(--x-max)); }
.td-plate--sapo { margin-top: 48px; }
.td-plate--h2 { margin-top: var(--x-sec); margin-bottom: 40px; }
.td-plate--sub { max-width: 860px; margin-top: var(--x-sec); margin-bottom: 40px; }

/* ---------- grid rows ---------- */
.td-row { position: relative; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--x-gap); align-items: center;
  width: min(100% - 2 * var(--x-gut), var(--x-max)); margin: var(--x-sec) auto 0; }
.td-row--first { margin-top: 0; }
.td-art { position: relative; }

/* ---------- decoration (budget: ≤1 handwritten note per section; tape only on prints) ---------- */
.td-tape { position: absolute; z-index: 4; width: 120px; height: 32px; background: rgba(236, 226, 196, .86); box-shadow: 0 1px 2px rgba(0,0,0,.12);
  clip-path: polygon(0 10%, 5% 0, 100% 6%, 96% 30%, 100% 55%, 97% 100%, 0 92%, 4% 60%, 0 34%); pointer-events: none; }
.td-tape--y { background: rgba(242, 190, 26, .84); }
.td-ink { position: absolute; overflow: visible; pointer-events: none; z-index: 5; }
.td-ink path { fill: none; stroke: var(--x-cosmic); stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; filter: url(#tdWobble); }
.td-hand { position: absolute; z-index: 5; font-family: 'EmagMarker', cursive; font-size: 1.55rem; line-height: 1.15; color: var(--x-cosmic); pointer-events: none; white-space: nowrap; }
.td-np { position: absolute; z-index: 0; pointer-events: none; }

/* ---------- caption (product / hands-on only) ---------- */
.td-cap { display: flex; gap: 12px; align-items: baseline; margin-top: 18px; font-size: .98rem; line-height: 1.5; color: var(--x-ink-soft); font-style: italic; }
.td-cap__tag { flex: none; font-family: 'EmagMono', monospace; font-style: normal; font-weight: 600; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase;
  background: var(--x-cosmic); color: #F2EEE4; padding: 4px 9px 3px; transform: rotate(-2deg); }
.td-credit-s { display: block; margin-top: 8px; font-family: 'EmagMono', monospace; font-size: .66rem; letter-spacing: .06em; color: #7d735f; line-height: 1.4; font-style: normal; }

/* ---------- print: photo with an EVEN white border ---------- */
.td-print { position: relative; background: var(--x-white); padding: 12px; box-shadow: 0 1px 0 rgba(0,0,0,.05), 0 16px 22px -10px rgba(20,16,8,.38); cursor: zoom-in; }
.td-print img { width: 100%; aspect-ratio: var(--ar, 3 / 2); object-fit: cover; filter: saturate(.92) sepia(.06) contrast(1.03); }
.td-print .td-cap { margin-top: 12px; }

/* ---------- cut-out sticker (official assets): background removed, even white stroke baked into the file ---------- */
.td-cut { position: relative; cursor: zoom-in; }
.td-cut > img { width: 100%; filter: drop-shadow(0 14px 14px rgba(10, 20, 50, .28)); }

/* ---------- sticker from own photo: print + phone popped out with an EVEN rim (clip-path) ---------- */
.td-stk { position: relative; z-index: 2; cursor: zoom-in; }
.td-stk__stage { position: relative; }
.td-stk__print { position: relative; background: var(--x-white); padding: 12px; transform: rotate(-1.6deg); box-shadow: 0 16px 24px -10px rgba(20,16,8,.4); }
.td-stk__print img { width: 100%; filter: saturate(.8) sepia(.14) contrast(1.02) brightness(.98); }
.td-stk__cut { position: absolute; inset: 12px; pointer-events: none; --rim: 7px;
  transform-origin: 51.6% 50.4%; transform: rotate(-1.6deg) rotate(5deg) scale(1.2);
  filter: drop-shadow(0 18px 18px rgba(6, 20, 60, .4)); }
.td-stk__cut img { position: relative; width: 100%; clip-path: inset(16.5% 37.7% 15.7% 40.95% round 2.6% / 3.9%); }
.td-stk__rim { position: absolute; inset: 0; background: #FFFDF8;
  clip-path: inset(calc(16.5% - var(--rim)) calc(37.7% - var(--rim)) calc(15.7% - var(--rim)) calc(40.95% - var(--rim)) round calc(2.6% + var(--rim)) / calc(3.9% + var(--rim))); }
.td-stk .td-tape--a { left: -18px; top: 8%; transform: rotate(-30deg); }

/* ---------- Instax Wide: card 108×86mm, window 99×62 → caption in the wide bottom edge ---------- */
.td-ix { position: relative; z-index: 2; background: linear-gradient(165deg, #FFFEFA 0%, #F4F0E7 100%); padding: 4.2% 4.2% 0; border-radius: 5px;
  box-shadow: 0 1px 0 rgba(0,0,0,.06), 0 16px 22px -10px rgba(20,16,8,.36); cursor: zoom-in; }
.td-ix__win { display: block; aspect-ratio: 99 / 62; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(0,0,0,.1); }
.td-ix__win img { width: 100%; height: 100%; object-fit: cover; }
.td-ix figcaption { display: flex; align-items: center; aspect-ratio: 99 / 20; padding: 0 2%; font-family: 'EmagMarker', cursive; font-size: clamp(1rem, 1.6vw, 1.3rem); line-height: 1.2; color: var(--x-cosmic); }

/* ---------- 35mm film strip — true geometry, 1u = 1mm:
   film 35u high, frame 36×24u, pitch 38u = 8 KS perfs (1.98×2.794u, pitch 4.75u, 2u from edge), edge print in the outer 2u.
   u is derived from the container width, so the strip scales without breaking proportions; --n = frames per row. ---------- */
.td-film { container-type: inline-size; width: min(100% - 2 * var(--x-gut), 1100px); margin: 72px auto 0; --n: 4; }
.td-film__strip { display: flex; flex-wrap: wrap; row-gap: 28px; transform: rotate(-1.2deg); filter: drop-shadow(0 14px 14px rgba(20,16,8,.3)); }
.td-film__cell { --u: calc(100cqw / (38 * var(--n))); position: relative; flex: none; width: calc(38 * var(--u)); height: calc(35 * var(--u)); cursor: zoom-in;
  background-color: #15120F;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 475 279.4' preserveAspectRatio='none'%3E%3Crect x='138.5' width='198' height='279.4' rx='50' fill='%23F2EADA'/%3E%3C/svg%3E"), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 475 279.4' preserveAspectRatio='none'%3E%3Crect x='138.5' width='198' height='279.4' rx='50' fill='%23F2EADA'/%3E%3C/svg%3E");
  background-size: calc(4.75 * var(--u)) calc(2.794 * var(--u)); background-repeat: repeat-x;
  background-position: 0 calc(2 * var(--u)), 0 calc(30.206 * var(--u)); }
.td-film__fr { position: absolute; left: var(--u); top: calc(5.5 * var(--u)); width: calc(36 * var(--u)); height: calc(24 * var(--u)); overflow: hidden; border-radius: calc(.6 * var(--u)); }
.td-film__fr img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.05); }
.td-film__no { position: absolute; bottom: calc(.25 * var(--u)); left: calc(2 * var(--u)); font: 600 max(8px, calc(1.45 * var(--u)))/1 'EmagMono', monospace; letter-spacing: .08em; color: #E0A93B; white-space: nowrap; }
.td-film__no + .td-film__no { left: calc(21 * var(--u)); }
.td-film__credit { display: block; margin-top: 22px; text-align: right; }

/* ---------- contact sheet (B&W) ---------- */
.td-sheet { position: relative; padding: 40px 34px 44px; background: #EDE6D6; box-shadow: 0 1px 0 rgba(0,0,0,.06), 0 24px 40px -24px rgba(20,16,8,.45); transform: rotate(-.8deg); }
.td-sheet__head { display: flex; justify-content: space-between; gap: 12px; font-family: 'EmagMono', monospace; font-size: .76rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--x-ink-soft); border-bottom: 2px solid var(--x-ink); padding-bottom: 10px; margin-bottom: 22px; }
.td-sheet__grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 18px 16px; }
.td-sheet__fr { position: relative; cursor: zoom-in; }
.td-sheet__fr img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; filter: grayscale(1) contrast(1.08); border: 6px solid #111; }
.td-sheet__no { display: block; margin-top: 6px; font-family: 'EmagMono', monospace; font-size: .66rem; letter-spacing: .14em; color: #8a7f6a; }
.td-sheet__fr:nth-child(1) { grid-column: span 4; grid-row: span 2; align-self: start; }
.td-sheet__fr:nth-child(n+2) { grid-column: span 2; }
.td-sheet__ph { position: relative; display: block; }
.td-sheet__pick { position: absolute; inset: -14px -16px -10px -12px; width: calc(100% + 28px); height: calc(100% + 24px); pointer-events: none; z-index: 2; overflow: visible; }
.td-sheet__pick path { fill: none; stroke: var(--x-kodak); stroke-width: 7; stroke-linecap: round; opacity: .92; filter: url(#tdWobble); }
.td-sheet__mark { position: absolute; right: -10px; top: -30px; z-index: 3; font-family: 'EmagMarker', cursive; font-size: 1.6rem; color: var(--x-cosmic); transform: rotate(7deg); }
.td-sheet .td-tape--a { left: -24px; top: 10px; transform: rotate(-35deg); }

/* ================= sections (desktop ≥1101px) ================= */
/* 1 · Cosmic Blue: text L · sticker R */
.td-cb > .td-txt { grid-column: 1 / span 6; }
.td-cb > .td-art { grid-column: 7 / span 6; padding-top: 40px; }
.td-cb .td-hand { left: 4%; top: -18px; transform: rotate(-4deg); }
.td-cb .td-cap { margin-left: 6%; max-width: 440px; }

/* 2 · colours + side profile (cut-outs) */
.td-colors { align-items: end; }
.td-colors > .td-cut:nth-of-type(1) { grid-column: 1 / span 7; }
.td-colors > .td-cut:nth-of-type(2) { grid-column: 8 / span 5; margin-bottom: 40px; }
.td-colors .td-hand { left: 22%; top: -34px; transform: rotate(-5deg); }

/* 3 · privacy + secondary screen: art L · text R */
.td-priv > .td-art { grid-column: 1 / span 7; }
.td-priv > .td-txt { grid-column: 8 / span 5; }
.td-vid { transform: rotate(-1.2deg); }
.td-vid video { display: block; width: 100%; aspect-ratio: 4104 / 1440; object-fit: cover; background: #fafafa; }
.td-vid .td-tape { left: -22px; top: 14px; transform: rotate(-32deg); }
.td-priv .td-cut { width: 74%; margin: 40px 0 0 auto; }
.td-priv .td-hand { left: 2%; bottom: 16%; transform: rotate(-5deg); }

/* 4 · Leica philosophy: text L · instax R */
.td-leica > .td-txt { grid-column: 1 / span 6; }
.td-leica > .td-art { grid-column: 8 / span 5; }
.td-leica .td-ix { transform: rotate(3deg); }
.td-leica .td-tape { left: 40%; top: -14px; transform: rotate(-4deg); }

/* 5 · Henri Cartier-Bresson: collage L · text R */
.td-hcb > .td-art { grid-column: 1 / span 6; aspect-ratio: 588 / 760; }
.td-hcb > .td-txt { grid-column: 7 / span 6; }
.td-hcb__logo { width: 190px; margin: 0 0 22px -6px; transform: rotate(-4deg); opacity: .9; }
.td-hcb__art > * { position: absolute; }
.td-hcb__lazare { left: 18%; top: 0; width: 54%; transform: rotate(-2deg); z-index: 2; }
.td-hcb__lazare img, .td-hcb__portrait img { filter: grayscale(1) contrast(1.05); }
.td-hcb__portrait { left: 0; top: 46%; width: 34%; transform: rotate(4deg); z-index: 3; }
.td-hcb__book { right: 0; top: 5%; width: 30%; transform: rotate(5deg); z-index: 1; cursor: zoom-in; filter: drop-shadow(0 14px 16px rgba(20,16,8,.3)); }
.td-hcb__book img { clip-path: inset(6% 14% 2% 14%); margin: -6% 0 -2%; }
.td-hcb__leica { right: 2%; bottom: 0; width: 46%; transform: rotate(-6deg); z-index: 4; cursor: zoom-in; }
.td-hcb__leicaimg { display: block; background: var(--x-white); padding: 10px; box-shadow: 0 16px 22px -10px rgba(20,16,8,.38); }
.td-hcb__art .td-tape { left: 36%; top: -12px; transform: rotate(-6deg); }
.td-hcb__art .td-hand { left: 40%; top: 58%; transform: rotate(-6deg); }

/* 6 · park: text L · cut-out R */
.td-park > .td-txt { grid-column: 1 / span 6; }
.td-park > .td-cut { grid-column: 7 / span 6; transform: rotate(-3deg); }

/* 7 · street scatter (no captions) — proportional box so it scales cleanly */
.td-scatter { position: relative; width: min(100% - 2 * var(--x-gut), var(--x-max)); margin: 64px auto 0; aspect-ratio: 1200 / 720; }
.td-scatter .td-print { position: absolute; }
.td-scatter .s1 { left: 0; top: 4%; width: 44%; transform: rotate(-3deg); z-index: 2; }
.td-scatter .s2 { left: 40%; top: 0; width: 32%; transform: rotate(2.5deg); z-index: 3; }
.td-scatter .s3 { right: 0; top: 14%; width: 25%; transform: rotate(-2deg); z-index: 2; --ar: 3 / 4; }
.td-scatter .s4 { left: 18%; top: 52%; width: 36%; transform: rotate(1.5deg); z-index: 4; }
.td-scatter .s5 { left: 56%; top: 50%; width: 31%; transform: rotate(-4deg); z-index: 3; }
.td-scatter .td-tape { left: 46%; top: -12px; transform: rotate(8deg); }

/* 8 · B&W: contact sheet L · text R */
.td-bw > .td-art { grid-column: 1 / span 7; }
.td-bw > .td-txt { grid-column: 8 / span 5; }
.td-bw .td-hand { position: relative; display: inline-block; margin-top: 18px; transform: rotate(-3deg); }

/* footer: Xiaomi × Leica + credit (centred like the plates) */
.td-foot { width: min(100% - 2 * var(--x-gut), 600px); margin: var(--x-sec) auto 0; text-align: center; }
.td-foot__logos { display: flex; align-items: center; justify-content: center; gap: 22px; margin-bottom: 24px; }
.td-foot__logos img:first-child { width: 52px; }
.td-foot__logos img:last-child { width: 118px; }
.td-foot__x { font-family: 'EmagMono', monospace; font-size: 1rem; color: var(--x-ink-soft); }
.td-credit { padding-top: 14px; border-top: 2px solid var(--x-ink); font-family: 'EmagMono', monospace; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; }

/* ================= ≤1100px: one column, text first, art after ================= */
@media (max-width: 1100px) {
  .td-row { grid-template-columns: minmax(0, 1fr); row-gap: 48px; width: min(100% - 2 * var(--x-gut), 680px); }
  .td-row > * { grid-column: 1 / -1 !important; }
  .td-row > .td-txt { order: -1; justify-self: center; width: 100%; }
  .td-cb > .td-art { padding-top: 0; }
  .td-colors > .td-cut:nth-of-type(2) { width: 78%; justify-self: end; margin-bottom: 0; }
  .td-priv .td-hand { position: relative; display: block; left: auto; bottom: auto; margin-top: 18px; }
  .td-leica > .td-art { width: 82%; justify-self: center; }
  .td-hcb > .td-art { width: 100%; max-width: 600px; justify-self: center; }
  .td-park > .td-cut { width: 90%; justify-self: center; }
  .td-film { --n: 2; width: min(100% - 2 * var(--x-gut), 680px); }
  .td-scatter { aspect-ratio: auto; width: min(100% - 2 * var(--x-gut), 680px); display: grid; grid-template-columns: 1fr 1fr; gap: 28px 22px; }
  .td-scatter .td-print { position: relative; inset: auto; width: auto; }
  .td-scatter .s1 { grid-column: 1 / -1; }
  .td-scatter .td-tape { left: 50%; }
}

/* ================= ≤640px: mobile ================= */
@media (max-width: 640px) {
  .td-emag__wrapper { --x-gut: 16px; --x-sec: 56px; padding-bottom: 64px; }
  .td-emag__wrapper .td-p { font-size: 1.1rem; line-height: 1.7; }
  .td-plate--sapo, .td-plate--h2, .td-plate--sub { width: 100%; }
  .td-row { row-gap: 36px; }
  .td-hand { font-size: 1.3rem; }
  .td-cb .td-hand, .td-colors .td-hand { position: relative; display: block; left: auto; top: auto; margin-bottom: 8px; }
  .td-cb .td-cap { margin-left: 0; }
  .td-colors > .td-cut:nth-of-type(2) { width: 92%; }
  .td-priv .td-cut { width: 92%; margin-top: 28px; }
  .td-leica > .td-art { width: 94%; }
  .td-hcb > .td-art { aspect-ratio: 358 / 520; }
  .td-hcb__art .td-hand { top: 60%; left: 38%; font-size: 1.15rem; }
  .td-hcb__logo { width: 150px; }
  .td-film__strip { row-gap: 20px; transform: rotate(-1deg); }
  .td-scatter { grid-template-columns: 1fr; gap: 22px; }
  .td-scatter .td-print:nth-child(even) { width: 88%; justify-self: end; }
  .td-scatter .td-print:nth-child(odd) { width: 92%; }
  .td-scatter .s1 { width: 100%; }
  .td-sheet { padding: 26px 14px 30px; }
  .td-sheet__grid { grid-template-columns: repeat(2, 1fr); gap: 16px 12px; }
  .td-sheet__fr:nth-child(n) { grid-column: span 1; grid-row: auto; }
  .td-sheet__fr:nth-child(1) { grid-column: span 2; }
  .td-sheet__fr img { border-width: 4px; }
}

/* ---------- v3 fixes ---------- */
.td-hcb__lazare .td-credit-s { padding-left: 34%; text-align: right; }
.td-priv .td-hand { left: auto; bottom: auto; right: 4%; top: -42px; }
@media (max-width: 1100px) { .td-priv .td-hand { right: auto; top: auto; } }
@media (max-width: 640px) {
  .td-hcb > .td-art { aspect-ratio: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 22px 16px; align-items: start; }
  .td-hcb__art > * { position: relative; left: auto; right: auto; top: auto; bottom: auto; width: auto; }
  .td-hcb__lazare { grid-column: 1 / -1; width: 86%; justify-self: center; }
  .td-hcb__lazare .td-credit-s { padding-left: 0; text-align: left; }
  .td-hcb__book { margin-top: 10px; }
  .td-hcb__art .td-hand { display: none; }
  .td-hcb__art .td-tape { position: absolute; left: 40%; top: -12px; }
}
.td-hcb__art .td-hand { left: 73%; top: 44%; width: 150px; white-space: normal; transform: rotate(-6deg); }

/* ===== round 3 fixes ===== */
picture.td-plate { display: block; }
@media (min-width: 641px) { .td-plate--sapo { max-width: 1000px; } }
.td-scatter { align-items: start; }
/* torn-paper white border: the white card is a ::before run through #tdTear; shadow follows the torn edge */
.td-print, .td-stk__print, .td-hcb__leicaimg { position: relative; isolation: isolate; background: none; box-shadow: none;
  filter: drop-shadow(0 12px 12px rgba(20,16,8,.30)); }
.td-print::before, .td-stk__print::before, .td-hcb__leicaimg::before { content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--x-white); filter: url(#tdTear); }
.td-vid { cursor: default; }

/* ================= full article components ================= */
/* split rows: --tl = text left / art right · --al = art left / text right */
.td-split--tl > .td-txt { grid-column: 1 / span 6; }
.td-split--tl > .td-art, .td-split--tl > .td-cut { grid-column: 8 / span 5; }
.td-split--al > .td-art, .td-split--al > .td-cut { grid-column: 1 / span 6; }
.td-split--al > .td-txt { grid-column: 8 / span 5; }
.td-leica > .td-art { grid-column: 8 / span 5; }
.td-cb > .td-art { grid-column: 7 / span 6; }
.td-park > .td-cut { grid-column: 7 / span 6; }
.td-priv > .td-art, .td-bw > .td-art { grid-column: 1 / span 7; }
.td-tilt-l { transform: rotate(-2deg); }
.td-tilt-r { transform: rotate(2deg); }
.td-hand--tr { right: -2%; top: -40px; transform: rotate(5deg); }
.td-split .td-art > .td-tape { left: 40%; top: -14px; }
/* portrait pair */
.td-port { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.td-port .td-print img { aspect-ratio: 3 / 4; }
.td-port-2 { margin-top: 64px; transform: rotate(2.4deg); }

/* photo wall: newspaper-pinned prints, natural ratios, column flow */
.td-wall { position: relative; width: min(100% - 2 * var(--x-gut), var(--x-max)); margin: 64px auto 0; columns: 3; column-gap: 30px; }
.td-wall--4 { columns: 4; column-gap: 24px; }
.td-wall > .td-print { break-inside: avoid; margin-bottom: 30px; }
.td-wall > .td-print img { aspect-ratio: var(--ar); }
.td-wall > .td-print:nth-of-type(3n+1) { transform: rotate(-1.1deg); }
.td-wall > .td-print:nth-of-type(3n+2) { transform: rotate(.9deg); }
.td-wall > .td-print:nth-of-type(3n) { transform: rotate(-.4deg); }
.td-wall > .td-tape { left: 30%; top: -14px; transform: rotate(-5deg); }
.td-wall > .td-hand { right: 2%; top: -44px; transform: rotate(-4deg); }

/* trio: three product / hands-on prints, middle one dropped */
.td-trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; align-items: start; width: min(100% - 2 * var(--x-gut), var(--x-max)); margin: 64px auto 0; }
.td-trio > .td-print:nth-child(1) { transform: rotate(-1.6deg); }
.td-trio > .td-print:nth-child(2) { margin-top: 56px; transform: rotate(1.2deg); }
.td-trio > .td-print:nth-child(3) { margin-top: 18px; transform: rotate(-.6deg); }
.td-trio .td-print img { aspect-ratio: 3 / 2; }

/* film variants */
.td-film--bw .td-film__fr img { filter: grayscale(1) contrast(1.12); }
.td-film--end .td-film__fr img { filter: saturate(.92) sepia(.06); }
.td-film--end .td-film__strip { transform: rotate(1deg); }

@media (max-width: 1100px) {
  .td-split .td-art, .td-split > .td-cut { width: 90%; justify-self: center; }
  .td-wall, .td-trio { width: min(100% - 2 * var(--x-gut), 760px); }
  .td-wall, .td-wall--4 { columns: 2; column-gap: 22px; }
  .td-trio { grid-template-columns: 1fr 1fr; gap: 26px 22px; }
  .td-trio > .td-print:nth-child(1) { grid-column: 1 / -1; }
  .td-trio > .td-print:nth-child(n+2) { margin-top: 0; }
  .td-hand--tr { top: -34px; right: 0; }
}
@media (max-width: 640px) {
  .td-split .td-art, .td-split > .td-cut { width: 100%; }
  .td-wall, .td-wall--4 { columns: 2; column-gap: 12px; margin-top: 44px; }
  .td-wall > .td-print { padding: 6px; margin-bottom: 14px; }
  .td-wall > .td-hand { position: relative; display: block; right: auto; top: auto; margin-bottom: 12px; column-span: all; }
  .td-trio { gap: 18px 12px; margin-top: 44px; }
  .td-trio .td-print { padding: 7px; }
  .td-trio .td-cap { font-size: .9rem; }
  .td-port { gap: 12px; }
  .td-port-2 { margin-top: 36px; }
}

/* ===== round 4 ===== */
/* drop cap: first paragraph after each H2 */
.td-drop::first-letter { float: left; font-family: 'EmagFraunces', Georgia, serif; font-weight: 900; font-size: 4.4em; line-height: .82;
  margin: .07em .12em -.04em 0; color: var(--x-cosmic); text-shadow: .045em .045em 0 var(--x-kodak); }
/* trio: one shared caption, centred under the row */
.td-trio { margin-inline: auto; }
.td-trio__cap { grid-column: 1 / -1; justify-self: center; max-width: 600px; margin-top: 4px; }
/* single centred text block */
.td-solo > .td-txt { grid-column: 1 / -1; justify-self: center; width: 100%; }
/* B&W HC exposure meter */
.td-ev { width: 300px; margin-top: 24px; }
/* even grids: portrait wall 3x3, product walls 3 per row */
.td-wall--g3, .td-wall--prod { columns: auto; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px; align-items: start; }
.td-wall--g3 > .td-print, .td-wall--prod > .td-print { margin-bottom: 0; }
.td-wall--prod > .td-print img { aspect-ratio: 3 / 2; }
/* Leica M4 + Ultramax 400 vs Xiaomi 18 Pro Max: left / right pairs, equal heights */
.td-vs { width: min(100% - 2 * var(--x-gut), 880px); margin: 56px auto 0; }
.td-plate--vshead { display: block; width: 100%; margin-bottom: 8px; }
.td-vs__pair { display: flex; gap: 28px; align-items: flex-start; margin-top: 28px; }
.td-vs__pair > .td-print { flex: var(--fx) 1 0; min-width: 0; }
.td-vs__pair > .td-vs__m4 { transform: rotate(-.5deg); }
.td-vs__pair > .td-vs__mi { transform: rotate(.5deg); }
.td-plate--kit { display: block; width: min(100% - 2 * var(--x-gut), 1000px); margin: 64px auto 0; }
.td-plate--foot { display: block; width: 100%; }
.td-foot { width: min(100% - 2 * var(--x-gut), 560px); }

@media (max-width: 1100px) {
  .td-wall--g3, .td-wall--prod { grid-template-columns: 1fr 1fr; gap: 22px; }
  /* odd photo left over in a 2-up layout: centre it, a bit wider than one column */
  .td-wall > .td-print:last-of-type:nth-of-type(odd) { column-span: all; grid-column: 1 / -1; justify-self: center; width: 72%; margin-inline: auto; }
}
@media (max-width: 640px) {
  .td-drop::first-letter { font-size: 4em; }
  .td-wall--g3, .td-wall--prod { gap: 12px; }
  .td-wall > .td-print:last-of-type:nth-of-type(odd) { width: 78%; }
  .td-vs { margin-top: 40px; }
  .td-vs__pair { gap: 10px; margin-top: 14px; }
  .td-vs__pair > .td-print { padding: 5px; }
  .td-plate--kit { margin-top: 44px; }
  .td-ev { width: 250px; }
  /* contact sheet: frame 06 centred */
  .td-sheet__fr:last-child { grid-column: 1 / -1; justify-self: center; width: 72%; }
  /* HCB: portrait + book side by side, Leica centred below */
  .td-hcb__book { align-self: center; margin-top: 0; }
  .td-hcb__leica { grid-column: 1 / -1; justify-self: center; width: 72%; transform: rotate(-3deg); }
  /* 35mm strips full-bleed */
  .td-film { width: 100%; margin-inline: 0; }
}
/* closing strip: full-bleed, 8 frames in one straight row (2 rows of 4 on mobile) */
.td-film--end { width: 100%; max-width: none; margin-inline: 0; --n: 8; }
.td-film--end .td-film__strip { transform: none; }
@media (max-width: 640px) { .td-film--end { --n: 4; } }
/* hand note / tape inside grid walls must not take a cell */
.td-wall--g3 > .td-hand, .td-wall--prod > .td-hand { grid-column: 1 / -1; }
.td-wall--g3 > .td-tape, .td-wall--prod > .td-tape { position: absolute; }
/* tape stuck on the print frame: straddles the top edge or a top corner */
.td-print > .td-tape { width: 96px; height: 26px; pointer-events: none; }
.td-print > .td-tape--top { left: 50%; top: -13px; transform: translateX(-50%) rotate(-3deg); }
.td-print > .td-tape--tl { left: -26px; top: 2px; transform: rotate(-38deg); }
.td-print > .td-tape--tr { right: -26px; left: auto; top: 2px; transform: rotate(38deg); }
@media (max-width: 640px) {
  .td-print > .td-tape { width: 58px; height: 17px; }
  .td-print > .td-tape--top { top: -9px; }
  .td-print > .td-tape--tl { left: -16px; top: 0; }
  .td-print > .td-tape--tr { right: -16px; top: 0; }
}
/* eMagazine badge (I12) closing the footer */
.td-foot .td-tag { display: flex; justify-content: center; margin-top: 28px; }
.td-foot .td-tag img { width: 150px; height: auto; }
