/* A client gallery. The photographer picks its look (design.py); the choices arrive as data attributes on <html>:
   theme light|dark · font sans|serif|bold · cover classic|split|band|plain · grid rows|columns|squares · spacing.
   Everything is styled through the tokens below so a choice changes the whole page consistently. */
:root {
    --bg: #ffffff; --bg-2: #f4f4f2; --text: #1a1b1b; --text-2: #4b4e4f; --muted: #7a7e7f; --line: #e4e5e3;
    --panel: #ffffff; --panel-line: #e4e5e3; --field: #f7f7f5;
    --btn-bg: #1a1b1b; --btn-fg: #ffffff; --ghost-bg: rgba(255, 255, 255, .86); --ghost-fg: #1a1b1b; --ghost-line: #cfd1ce;
    --scrim: rgba(255, 255, 255, .96); --mark: rgba(0, 0, 0, .55); --heart: #d9485a; --wrong: #b8372b;
    --display: 'Hanken Grotesk', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --body: 'Hanken Grotesk', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --title-weight: 600; --title-size: clamp(30px, 5vw, 52px); --title-spacing: -.02em; --title-transform: none; --title-line: 1.1;
    --gap: 6px; --gap-narrow: 3px;
    color-scheme: light;
}
:root[data-theme="dark"] {
    --bg: #121214; --bg-2: #1a1a1d; --text: #ececee; --text-2: #b9bbc0; --muted: #8e9197; --line: #2a2b30;
    --panel: #1c1c20; --panel-line: #2e2f35; --field: #17171a;
    --btn-bg: #f2f3f5; --btn-fg: #111214; --ghost-bg: rgba(20, 20, 23, .78); --ghost-fg: #f2f3f5; --ghost-line: #5c5f66;
    --scrim: rgba(8, 8, 9, .97); --mark: rgba(0, 0, 0, .6); --wrong: #f0827c;
    color-scheme: dark;
}
:root[data-font="serif"] {
    --display: 'Cormorant Garamond', 'Times New Roman', Georgia, serif;
    --title-weight: 500; --title-size: clamp(38px, 6.4vw, 72px); --title-spacing: 0; --title-line: 1.02;
}
:root[data-font="bold"] {
    --display: Oswald, 'Arial Narrow', 'Helvetica Neue', sans-serif;
    --title-weight: 500; --title-size: clamp(36px, 6.4vw, 76px); --title-spacing: .02em; --title-transform: uppercase; --title-line: 1.02;
}
:root[data-spacing="tight"] { --gap: 2px; --gap-narrow: 1px; }
:root[data-spacing="wide"] { --gap: 18px; --gap-narrow: 8px; }

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body { margin: 0; }
body {
    min-height: 100vh;
    background: var(--bg); color: var(--text);
    font: 15px/1.5 var(--body);
    -webkit-font-smoothing: antialiased;
}
body.boxed, body.sheeted { overflow: hidden; }
/* Room kept clear at the bottom of the screen: --base for the order bar (or the phone's home indicator),
   --buy for the viewer's buy button */
body { --base: env(safe-area-inset-bottom, 0px); --buy: 0px; }
body.selling, body.downloading, body.proofing { --buy: 64px; }
body.has-order { --base: calc(60px + env(safe-area-inset-bottom, 0px)); }
button { font: inherit; }
:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }

.owner-note { padding: 8px 16px; background: var(--bg-2); color: var(--muted); font-size: 13px; text-align: center; }
.owner-note a { color: var(--text); }

/* ---------- top bar ---------- */

.top {
    position: sticky; top: 0; z-index: 5;
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    min-height: 56px; padding: 8px 20px;
    background: var(--bg); border-bottom: 1px solid var(--line);
}
.top-credit { color: var(--text); font-family: var(--display); font-weight: var(--title-weight); font-size: 17px; letter-spacing: .01em; text-decoration: none; text-transform: var(--title-transform); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
:root[data-font="serif"] .top-credit { font-size: 22px; }
:root[data-font="bold"] .top-credit { font-size: 18px; letter-spacing: .06em; }
.top-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.top-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 7px 13px; border: 1px solid transparent; border-radius: 999px;
    background: transparent; color: var(--text-2); font-size: 14px; font-weight: 500; cursor: pointer; white-space: nowrap;
}
.top-btn:hover { background: var(--bg-2); color: var(--text); }
.top-btn.on { background: var(--text); border-color: var(--text); color: var(--bg); }
.top-btn.strong { border-color: var(--text); color: var(--text); }
.top-btn.strong:hover { background: var(--text); color: var(--bg); }
.top-count { min-width: 18px; padding: 0 5px; border-radius: 999px; background: var(--bg-2); color: var(--text-2); font-size: 12px; text-align: center; font-variant-numeric: tabular-nums; }
.top-btn.on .top-count { background: rgba(255, 255, 255, .22); color: inherit; }
.heart-mark { color: var(--heart); }
.top-btn.on .heart-mark { color: inherit; }

/* ---------- cover ---------- */

.cover { position: relative; }
.cover-photo { background: var(--bg-2); overflow: hidden; }
.cover-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.credit { margin: 0 0 14px; color: var(--muted); font-size: 12px; letter-spacing: .18em; text-transform: uppercase; }
h1 {
    margin: 0;
    font-family: var(--display); font-weight: var(--title-weight); font-size: var(--title-size);
    letter-spacing: var(--title-spacing); line-height: var(--title-line); text-transform: var(--title-transform);
    text-wrap: balance;
}
.meta { display: flex; flex-wrap: wrap; gap: 4px 0; margin: 14px 0 0; color: var(--muted); font-size: 14px; letter-spacing: .02em; }
.meta span + span::before { content: '·'; margin: 0 10px; }

/* Classic: the photo fills the top of the screen, the title sits on it */
:root[data-cover="classic"] .cover { min-height: min(82vh, 760px); display: grid; }
:root[data-cover="classic"] .cover-photo { grid-area: 1 / 1; }
:root[data-cover="classic"] .cover-photo::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, .08) 0%, rgba(0, 0, 0, .18) 55%, rgba(0, 0, 0, .58) 100%);
}
:root[data-cover="classic"] .cover-text { grid-area: 1 / 1; z-index: 1; align-self: end; padding: 0 clamp(20px, 5vw, 64px) clamp(36px, 7vh, 72px); color: #fff; text-align: left; }
:root[data-cover="classic"] .cover-text .credit, :root[data-cover="classic"] .cover-text .meta { color: rgba(255, 255, 255, .78); }
:root[data-cover="classic"] .cover-text h1 { max-width: 20ch; text-shadow: 0 1px 24px rgba(0, 0, 0, .25); }
:root[data-cover="classic"] .cover:not(:has(.cover-photo)) .cover-text { color: var(--text); padding-top: 72px; }
:root[data-cover="classic"] .cover:not(:has(.cover-photo)) .cover-text .credit, :root[data-cover="classic"] .cover:not(:has(.cover-photo)) .cover-text .meta { color: var(--muted); }
.cover-down { position: absolute; right: clamp(20px, 5vw, 64px); bottom: clamp(36px, 7vh, 72px); width: 40px; height: 40px; border: 1px solid rgba(255, 255, 255, .6); border-radius: 50%; }
.cover-down span { position: absolute; left: 50%; top: 50%; width: 9px; height: 9px; border: solid #fff; border-width: 0 1.5px 1.5px 0; transform: translate(-50%, -70%) rotate(45deg); }
.cover-down:hover { background: rgba(255, 255, 255, .15); }

/* Split: photo on one side, words on the other; stacks on a phone */
:root[data-cover="split"] .cover { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); min-height: min(76vh, 700px); }
:root[data-cover="split"] .cover-photo { min-height: 320px; }
:root[data-cover="split"] .cover-text { display: flex; flex-direction: column; justify-content: center; padding: clamp(32px, 6vw, 80px) clamp(24px, 5vw, 72px); }
:root[data-cover="split"] .cover:not(:has(.cover-photo)) { grid-template-columns: 1fr; min-height: 0; }

/* Band: the words first, then a wide strip of the photo */
:root[data-cover="band"] .cover-text { max-width: 1120px; margin: 0 auto; padding: clamp(44px, 8vh, 88px) 24px clamp(28px, 5vh, 48px); text-align: center; }
:root[data-cover="band"] .meta { justify-content: center; }
:root[data-cover="band"] .cover { display: flex; flex-direction: column-reverse; }
:root[data-cover="band"] .cover-photo { height: min(46vh, 520px); }

/* Plain: words only */
:root[data-cover="plain"] .cover-text { max-width: 1120px; margin: 0 auto; padding: clamp(48px, 9vh, 96px) 24px clamp(24px, 4vh, 40px); text-align: center; }
:root[data-cover="plain"] .meta { justify-content: center; }

.under-cover { max-width: 720px; margin: 0 auto; padding: 22px 20px 0; text-align: center; }
.offer { margin: 0; color: var(--text-2); font-size: 14px; }
.offer-error { margin: 10px 0 0; color: var(--wrong); font-size: 14px; }
.proof-line { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 14px; margin: 10px 0 0; }
.proof-line:empty { display: none; }
.proof-status { color: var(--muted); font-size: 13px; }
.proof-status a { color: var(--text); }

/* ---------- find a player ---------- */

.finder { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 18px; padding: 24px 16px 4px; }
.finder-label { color: var(--muted); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; }
.finder-groups { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px; }
.finder-group { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.finder-team { color: var(--muted); font-size: 13px; margin-right: 2px; }
.chip {
    min-width: 40px; padding: 5px 11px;
    border: 1px solid var(--ghost-line); border-radius: 999px;
    background: transparent; color: var(--text);
    font-size: 14px; font-variant-numeric: tabular-nums;
    cursor: pointer;
}
.chip:hover { border-color: var(--text); }
.chip.on { background: var(--text); border-color: var(--text); color: var(--bg); font-weight: 600; }

/* ---------- the photos ---------- */

.rows { max-width: 1800px; margin: 0 auto; padding: 28px var(--gap) 0; }
.row { display: flex; gap: var(--gap); margin-bottom: var(--gap); }
.row .pic { position: relative; flex: 0 0 auto; overflow: hidden; background: var(--bg-2); }
.pic a { position: relative; display: block; width: 100%; height: 100%; cursor: zoom-in; }
.pic a.chosen::after {
    content: '✓'; position: absolute; top: 8px; right: 8px;
    width: 24px; height: 24px; border-radius: 50%;
    background: var(--btn-bg); color: var(--btn-fg); font-size: 14px; font-weight: 700; line-height: 24px; text-align: center;
}
.pic img { display: block; width: 100%; height: 100%; object-fit: cover; transition: opacity .15s; }
.pic a:hover img { opacity: .9; }
.pic a:focus-visible { outline: 2px solid var(--text); outline-offset: -2px; }

/* Columns: each photo at its own proportions, columns kept level by the script */
.cols { display: flex; gap: var(--gap); align-items: flex-start; }
.col { display: flex; flex: 1 1 0; flex-direction: column; gap: var(--gap); min-width: 0; }
.col .pic { position: relative; overflow: hidden; background: var(--bg-2); }
.col .pic img { height: auto; aspect-ratio: var(--ratio); }

/* Squares: a uniform grid */
.squares { display: grid; grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); gap: var(--gap); }
.squares .pic { position: relative; aspect-ratio: 1; overflow: hidden; background: var(--bg-2); }

.empty { padding: 40px 20px; color: var(--muted); text-align: center; }
.foot { padding: 48px 20px calc(44px + var(--base)); color: var(--muted); font-size: 12px; text-align: center; letter-spacing: .04em; }
.foot p { margin: 0; }

/* ---------- full-screen viewer ---------- */

.box {
    position: fixed; inset: 0; z-index: 10;
    display: flex; align-items: center; justify-content: center;
    background: var(--scrim);
    touch-action: pan-y;
}
.box img {
    max-width: 100vw; max-height: 100vh; max-height: 100dvh;
    object-fit: contain;
    user-select: none; -webkit-user-drag: none;
}
.box-btn {
    position: absolute; z-index: 1;
    width: 48px; height: 48px;
    border: 0; border-radius: 50%;
    background: var(--ghost-bg); color: var(--ghost-fg);
    font: 26px/1 var(--body);
    cursor: pointer;
}
.box-btn:hover { background: var(--text); color: var(--bg); }
.box-btn.close { top: 14px; right: 14px; font-size: 18px; }
.box-btn.play { top: 14px; right: 72px; font-size: 15px; padding-left: 3px; }
.box-btn.play.on { background: var(--text); color: var(--bg); }
.box-btn.prev { left: 14px; top: 50%; transform: translateY(-50%); }
.box-btn.next { right: 14px; top: 50%; transform: translateY(-50%); }
.box-count {
    position: absolute; left: 0; right: 0; bottom: max(14px, env(safe-area-inset-bottom));
    color: var(--text); font-size: 13px; text-align: center; font-variant-numeric: tabular-nums;
    pointer-events: none;
}
.selling .box, .downloading .box, .proofing .box { padding-bottom: calc(var(--base) + var(--buy)); }
.selling .box img, .downloading .box img, .proofing .box img { max-height: calc(100vh - var(--base) - var(--buy)); max-height: calc(100dvh - var(--base) - var(--buy)); }
.selling .box-count, .downloading .box-count, .proofing .box-count { bottom: calc(var(--base) + var(--buy) + 8px); }
.box-actions {
    position: absolute; left: 0; right: 0; bottom: calc(var(--base) + 10px);
    display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; padding: 0 12px;
    pointer-events: none;
}
.box-actions .pay, .box-actions .dl { pointer-events: auto; }

/* Quiet buttons: free downloads, notes, favourites */
.dl {
    display: inline-block; padding: 10px 18px;
    border: 1px solid var(--ghost-line); border-radius: 8px;
    background: var(--ghost-bg); color: var(--ghost-fg);
    font-weight: 600; text-align: center; text-decoration: none;
    cursor: pointer;
}
.dl:hover { border-color: var(--text); }
.dl.small { padding: 6px 14px; font-size: 14px; }
.dl.quiet { border-color: transparent; background: none; color: var(--text); cursor: default; }
.dl-sizes { display: flex; flex-direction: column; gap: 8px; margin: 4px 0 14px; }
.dl-size {
    display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
    padding: 12px 14px; border: 1px solid var(--panel-line); border-radius: 10px;
    background: transparent; color: var(--text); text-align: left; cursor: pointer;
}
.dl-size:hover { border-color: var(--text); }
.dl-size strong { font-weight: 600; }
.dl-size span { color: var(--muted); font-size: 13px; white-space: nowrap; }
.dl-part-head { margin: 10px 0 2px; color: var(--muted); font-size: 13px; }
.dl-parts-note { margin-top: -6px; }
.pin-input {
    width: 100%; margin: 4px 0 12px; padding: 12px 14px;
    border: 1px solid var(--panel-line); border-radius: 8px;
    background: var(--field); color: var(--text); font-size: 20px; letter-spacing: .3em; text-align: center;
}
.pin-input:focus { outline: none; border-color: var(--text); }
.notice { margin: 0; color: var(--muted); font-size: 14px; text-align: center; }
.notice a { color: var(--text); }

/* Proofing: hearts on the photos, notes in the viewer */
.heart {
    position: absolute; top: 6px; left: 6px; z-index: 1;
    width: 34px; height: 34px;
    border: 0; border-radius: 50%;
    background: var(--mark); color: #fff;
    font: 18px/34px var(--body); text-align: center;
    cursor: pointer; opacity: 0; transition: opacity .12s, transform .12s;
}
.pic:hover .heart, .heart.on, .heart:focus-visible { opacity: 1; }
.heart:hover { transform: scale(1.08); }
.heart.on { color: #ff6b7a; }
@media (hover: none) { .heart { opacity: .9; } }
.fav-n, .note-n {
    position: absolute; z-index: 1; padding: 2px 8px; border-radius: 999px;
    background: var(--mark); color: #fff; font-size: 12px; font-weight: 600; line-height: 18px;
    pointer-events: none;
}
.fav-n { top: 8px; left: 8px; color: #ff8c99; }
.note-n { right: 8px; bottom: 8px; padding: 2px 7px; }
.heart-btn.on { color: var(--heart); border-color: var(--heart); }
.box-notes {
    position: absolute; left: 0; right: 0; bottom: calc(var(--base) + var(--buy) + 30px); z-index: 1;
    max-width: 640px; margin: 0 auto; padding: 8px 14px;
    border: 0; border-radius: 8px; background: var(--ghost-bg); color: var(--ghost-fg);
    font-size: 14px; line-height: 1.4; text-align: center;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    cursor: pointer;
}
.sheet-label { display: block; margin: 10px 0 4px; color: var(--muted); font-size: 13px; }
.sheet .text {
    width: 100%; padding: 11px 12px;
    border: 1px solid var(--panel-line); border-radius: 8px;
    background: var(--field); color: var(--text); font: inherit; resize: vertical;
}
.sheet .text:focus { outline: none; border-color: var(--text); }
.sheet .wrong { margin-top: 10px; }
.sheet .pay.wide { margin-top: 14px; }
.sheet-note.fine { margin: 12px 0 0; font-size: 12px; text-align: center; }
.notes-list { flex: 1; min-height: 0; overflow-y: auto; margin: 8px 0 12px; padding: 0; list-style: none; }
.notes-list li { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 10px 0; border-top: 1px solid var(--panel-line); font-size: 14px; }
.notes-list li p { grid-column: 1 / -1; margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.notes-list .note-meta { color: var(--muted); font-size: 12px; }
.notes-list button { justify-self: end; padding: 3px 10px; border: 1px solid var(--panel-line); border-radius: 6px; background: transparent; color: var(--text); font-size: 12px; cursor: pointer; }
.notes-list .note-none { display: block; color: var(--muted); border-top: 0; padding-top: 0; }

/* ---------- buying ---------- */

.pay {
    display: inline-block; padding: 10px 18px;
    border: 1px solid var(--btn-bg); border-radius: 8px;
    background: var(--btn-bg); color: var(--btn-fg);
    font-weight: 600; text-align: center; text-decoration: none;
    cursor: pointer;
}
.pay.wide { display: block; width: 100%; }
.pay.chosen { background: var(--ghost-bg); border-color: var(--ghost-line); color: var(--ghost-fg); }
.pay:disabled { opacity: .55; cursor: default; }

.order-bar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
    display: flex; align-items: center; justify-content: center; gap: 28px;
    height: calc(60px + env(safe-area-inset-bottom, 0px));
    padding: 0 14px env(safe-area-inset-bottom, 0px);
    border-top: 1px solid var(--panel-line); background: var(--panel);
}
.order-summary { padding: 10px 0; border: 0; background: none; color: var(--text); font-variant-numeric: tabular-nums; cursor: pointer; }
.order-link { margin-left: 12px; color: var(--muted); text-decoration: underline; }

.sheet {
    position: fixed; inset: 0; z-index: 30;
    display: flex; align-items: center; justify-content: center;
    background: rgba(0, 0, 0, .5);
}
.sheet-panel {
    display: flex; flex-direction: column;
    width: 100%; max-width: 480px; max-height: 86vh; max-height: 86dvh;
    padding: 16px 18px 18px;
    border: 1px solid var(--panel-line); border-radius: 14px; background: var(--panel); color: var(--text);
}
.sheet-head { display: flex; align-items: center; justify-content: space-between; }
.sheet-head h2 { margin: 0; font-size: 18px; font-weight: 600; }
.sheet-close { width: 40px; height: 40px; margin-right: -10px; border: 0; background: none; color: var(--text); font-size: 18px; cursor: pointer; }
.sheet-items { flex: 1; min-height: 0; overflow-y: auto; margin: 10px 0 0; padding: 0; list-style: none; }
.sheet-items li { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-top: 1px solid var(--panel-line); }
.sheet-items img { width: 84px; height: 60px; border-radius: 4px; object-fit: cover; background: var(--bg-2); }
.sheet-items span { margin-left: auto; color: var(--muted); font-variant-numeric: tabular-nums; }
.sheet-items button { padding: 7px 12px; border: 1px solid var(--panel-line); border-radius: 6px; background: transparent; color: var(--text); font-size: 13px; cursor: pointer; }
.sheet-total { display: flex; justify-content: space-between; margin: 0; padding: 12px 0; border-top: 1px solid var(--panel-line); font-weight: 600; font-variant-numeric: tabular-nums; }
.sheet-note { margin: 0 0 14px; color: var(--muted); font-size: 13px; }
.sheet .wrong { margin: 0 0 14px; color: var(--wrong); font-size: 14px; }

/* ---------- a buyer's order page, the password prompt, notices ---------- */

.head { padding: 44px 20px 30px; text-align: center; }
.head .meta { justify-content: center; }
.order { max-width: 720px; margin: 0 auto; padding: 0 16px; }
.order-lead { margin: 0 0 20px; font-size: 17px; text-align: center; }
.order-items { display: grid; gap: 24px; margin: 22px 0; padding: 0; list-style: none; }
.order-items img { display: block; width: 100%; height: auto; border-radius: 6px; background: var(--bg-2); }
.order-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 10px; }
.order-name { color: var(--muted); font-size: 14px; word-break: break-all; }
.order-gone { color: var(--muted); font-size: 14px; text-align: right; }
.order-note { margin: 0 0 12px; color: var(--muted); font-size: 14px; text-align: center; }
.order-note a, .order-note strong { color: var(--text); }

.lock { display: flex; flex-direction: column; gap: 12px; max-width: 320px; margin: 0 auto; padding: 0 20px 60px; }
.lock label { color: var(--muted); text-align: center; }
.lock input {
    padding: 12px 14px; border: 1px solid var(--panel-line); border-radius: 8px;
    background: var(--field); color: var(--text); font: inherit; text-align: center;
}
.lock input:focus { outline: none; border-color: var(--text); }
.lock button { padding: 12px; border: 0; border-radius: 8px; background: var(--btn-bg); color: var(--btn-fg); font: inherit; font-weight: 600; cursor: pointer; }
.lock .wrong { margin: 0; color: var(--wrong); font-size: 14px; text-align: center; }

/* ---------- photographer's home page ---------- */

.site-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px 18px; max-width: 1240px; margin: 0 auto; padding: 0 20px; }
.site-card { display: block; color: inherit; text-decoration: none; }
.site-cover { aspect-ratio: 3 / 2; overflow: hidden; background: var(--bg-2); }
.site-cover img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease; }
.site-card:hover .site-cover img { transform: scale(1.03); }
.site-card h2 { margin: 12px 0 2px; font-family: var(--display); font-size: 19px; font-weight: var(--title-weight); text-transform: var(--title-transform); }
.site-card p { margin: 0; color: var(--muted); font-size: 14px; }

@media (max-width: 760px) {
    .top { padding: 6px 12px; }
    .top-credit { font-size: 15px; }
    .top-btn { padding: 6px 10px; font-size: 13px; }
    #play { display: none; }      /* the viewer has its own play button */
    :root[data-cover="classic"] .cover { min-height: min(68vh, 560px); }
    :root[data-cover="split"] .cover { grid-template-columns: 1fr; min-height: 0; }
    :root[data-cover="split"] .cover-photo { min-height: 0; height: 52vw; }
    :root[data-cover="split"] .cover-text { padding: 28px 20px 8px; }
    :root[data-cover="band"] .cover-photo { height: 46vw; }
    .cover-down { display: none; }
    .rows { padding-top: 18px; --gap: var(--gap-narrow); }
    .box-btn.prev, .box-btn.next { display: none; }     /* swipe instead */
    .box-actions { gap: 8px; }
    .box-actions .pay, .box-actions .dl { padding: 9px 13px; font-size: 14px; }
    /* Buying, downloading and favourites together need two rows of buttons on a phone */
    body.proofing.selling, body.proofing.downloading { --buy: 112px; }
    .box-notes { left: 8px; right: 8px; font-size: 13px; }
    .order-bar { justify-content: space-between; }
    .sheet { align-items: flex-end; }
    .sheet-panel { max-width: none; padding-bottom: calc(18px + env(safe-area-inset-bottom, 0px)); border-width: 1px 0 0; border-radius: 14px 14px 0 0; }
}

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; }
}
