/* Client pages (/client, /gallery, contracts and invoices). Loaded after site.css, which supplies the type, buttons, photo wall, viewer, player and footer. */
.portal { min-height: 100vh; display: flex; flex-direction: column; }
.portal main { flex: 1; outline: none; }
[hidden] { display: none !important; }

/* Top bar */
.g-top { background: var(--yellow); }
.g-top .wrap { height: 76px; display: flex; align-items: center; gap: 14px; }
.g-top .brand img { height: 46px; width: auto; }
.g-who { margin-left: auto; display: flex; align-items: center; gap: 12px; min-width: 0; font-size: 15px; font-weight: 600; }
.g-who span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-who .btn { flex: none; }
.g-preview { background: var(--ink); color: #fff; text-align: center; padding: 9px var(--gutter); font-size: 14px; }
.g-preview strong { color: var(--yellow); }
.g-preview .g-link { color: #fff; margin-left: 6px; }

/* Waiting, sign in, messages */
.g-wait { display: grid; place-items: center; min-height: 50vh; }
.g-spin { width: 36px; height: 36px; border-radius: 50%; border: 4px solid var(--rule); border-top-color: var(--ink); animation: g-spin .8s linear infinite; }
@keyframes g-spin { to { transform: rotate(360deg); } }
.g-sign { background: var(--yellow); padding: clamp(24px, 5vw, 72px) 0 clamp(56px, 8vw, 112px); flex: 1; }
.g-sign-grid { display: grid; grid-template-columns: 6fr 5fr; gap: clamp(28px, 5vw, 80px); align-items: start; }
.g-sign h1 { font-size: clamp(44px, 6.6vw, 104px); margin-bottom: clamp(18px, 2.4vw, 32px); }
.g-sign .lead { max-width: 34ch; }
.g-sign .form .btn { justify-self: stretch; }
.g-sign .util-icons { gap: 8px; }
.g-sign .util-icons .bi { width: 22px; height: 22px; }
.g-note { background: var(--ink); color: #fff; border-radius: 14px; padding: 12px 16px; margin: 0; font-weight: 600; }
.status.ok { color: #1f7a4a; }
.status.err, .p-pick .form-note.err { color: #b4441b; }
.p-pick .form-note.err { font-weight: 700; }

/* Gallery hero */
.g-hero { background: var(--yellow); padding: clamp(14px, 2.4vw, 32px) 0 clamp(36px, 5vw, 64px); overflow: hidden; }
.g-hero-grid { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(24px, 4vw, 64px); align-items: center; }
.g-hero-grid.solo { grid-template-columns: 1fr; }
.g-hero-grid > * { min-width: 0; }
.g-kicker { margin: 0 0 14px; font-weight: 700; font-size: 15px; }
.g-hero h1 { font-size: clamp(38px, 5.2vw, 84px); line-height: .98; overflow-wrap: anywhere; margin-bottom: 18px; }
.g-hero .lead { max-width: 40ch; white-space: pre-line; }
.g-meta { margin: 0 0 24px; font-size: 15px; color: rgba(36, 37, 36, .78); }
.g-hero-acts { display: flex; flex-wrap: wrap; gap: 12px; }
/* The cover is shown whole, in its own shape (a portrait stays a portrait), as large as fits. Never cropped:
   Fabrizio, 2026-10-04, "sometime it crops at the face of the subject". */
.g-cover { display: flex; justify-content: center; }
.g-cover img { display: block; width: auto; height: auto; max-width: 100%; max-height: min(78vh, 760px); box-shadow: 0 40px 70px -40px rgba(36, 37, 36, .55), 0 2px 6px rgba(36, 37, 36, .12); }
.g-cover.noimg { display: none; }
#films { scroll-margin-top: 64px; }

/* Sticky bar: All / Favorites, sections, Select, Download all */
.g-bar { position: sticky; top: 0; z-index: 30; background: var(--paper); border-bottom: 1px solid var(--rule); }
.g-bar-in { display: flex; align-items: center; gap: 10px; padding-top: 10px; padding-bottom: 10px; }
.g-chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; flex: 1 1 auto; min-width: 0; padding: 3px 28px 3px 3px; margin: -3px; }
/* the chips scroll sideways: their right edge fades, so a chip under it reads as "more this way", not as cut in half */
.g-chips { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); }
.g-chips::-webkit-scrollbar { display: none; }
.g-chip { flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 16px; border-radius: 999px; border: 2px solid var(--rule); background: var(--paper); font-weight: 700; font-size: 15px; cursor: pointer; text-decoration: none; white-space: nowrap; }
.g-chip:hover { border-color: var(--ink); }
.g-chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.g-chip small { font-weight: 600; font-size: 13px; opacity: .7; }
.g-chip svg { width: 16px; height: 16px; }
.g-acts { display: flex; gap: 8px; flex: none; }
.g-acts .btn { min-height: 42px; padding: 0 18px; font-size: 15px; }
.selecting .g-acts [data-select] { background: var(--ink); color: #fff; border-color: var(--ink); }
/* While selecting, "Select all" takes the place of the filter pills, at the left of Done */
.g-selall { display: none; min-height: 42px; padding: 0 18px; font-size: 15px; margin-right: auto; }
.selecting .g-chips { display: none; }
.selecting .g-selall { display: inline-flex; }

/* Photos */
.g-sec { padding: clamp(28px, 4vw, 56px) 0 clamp(56px, 7vw, 96px); }
.g-part + .g-part { margin-top: clamp(40px, 5vw, 72px); }
.g-part h2 { font-size: clamp(26px, 3vw, 44px); margin-bottom: clamp(16px, 2vw, 28px); scroll-margin-top: 84px; }
.g-part h2 small { font-size: 15px; font-weight: 600; font-stretch: 100%; letter-spacing: 0; color: var(--graphite); margin-left: 10px; }
.g-tile { position: relative; }
.g-tile .tile { display: block; }
.g-tile.noimg .tile { display: grid; place-items: center; }
.g-tile.noimg .tile::before { content: attr(data-name); padding: 14px; font-size: 13px; color: var(--graphite); overflow-wrap: anywhere; text-align: center; }
.g-tile.noimg img { display: none; }
.g-heart { position: absolute; right: 8px; bottom: 8px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .45); color: #fff; display: grid; place-items: center; cursor: pointer; opacity: 0; transition: opacity .2s, background-color .2s, transform .2s; }
.g-heart svg { width: 20px; height: 20px; }
.g-tile:hover .g-heart, .g-heart:focus-visible, .g-heart[aria-pressed="true"] { opacity: 1; }
@media (hover: none) { .g-heart { opacity: 1; } }
.g-heart:hover { transform: scale(1.08); }
.g-heart[aria-pressed="true"], .v-heart[aria-pressed="true"] { background: var(--yellow); color: var(--ink); border-color: var(--yellow); }
.g-heart[aria-pressed="true"] svg, .v-heart[aria-pressed="true"] svg { fill: currentColor; }
.g-check { position: absolute; left: 10px; top: 10px; width: 30px; height: 30px; border-radius: 50%; border: 2px solid #fff; background: rgba(0, 0, 0, .35); color: var(--ink); display: none; place-items: center; pointer-events: none; }
.g-check svg { width: 16px; height: 16px; opacity: 0; }
.selecting .g-check { display: grid; }
.selecting .g-heart { display: none; }
.selecting .g-tile .tile { cursor: pointer; }
.g-tile.sel .g-check { background: var(--yellow); border-color: var(--yellow); }
.g-tile.sel .g-check svg { opacity: 1; }
.g-tile.sel .tile::after { box-shadow: inset 0 0 0 4px var(--yellow); }
/* Films can be selected too (their card has the same round mark) */
.selecting .film .play { opacity: .35; }
.film.sel .g-check { background: var(--yellow); border-color: var(--yellow); }
.film.sel .g-check svg { opacity: 1; }
.film.sel .film-img { outline: 4px solid var(--yellow); outline-offset: -4px; }
.preview-mode .g-heart, .preview-mode .v-heart, .guest-mode .g-heart, .guest-mode .v-heart { display: none; }
.g-empty { background: var(--mist); border-radius: 28px; padding: clamp(32px, 5vw, 64px) 24px; text-align: center; color: var(--graphite); }
.g-empty strong { display: block; color: var(--ink); font-size: 20px; font-stretch: 112%; margin-bottom: 6px; }

/* Films and other files */
.g-films h2 { margin-bottom: clamp(20px, 3vw, 40px); }
.g-films .film-img img { opacity: 1; }
.g-films .film-img.noimg img { display: none; }
.g-list { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.g-list li { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.g-list span { min-width: 0; overflow-wrap: anywhere; font-weight: 600; }
.g-list small { display: block; font-weight: 500; color: var(--graphite); }

/* Full-screen viewer additions */
.v-heart { width: 44px; height: 44px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .6); background: none; color: #fff; display: grid; place-items: center; cursor: pointer; }
.v-heart svg { width: 20px; height: 20px; }
.v-heart:hover { border-color: #fff; }
.viewer .v-cap { padding-bottom: calc(14px + env(safe-area-inset-bottom)); overflow-wrap: anywhere; }
.player .p-foot { min-height: 60px; }
.player .v-album { display: inline-flex; }

/* List of galleries */
.g-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: clamp(20px, 2.4vw, 32px); }
.g-card { display: block; text-decoration: none; }
.g-card-img { aspect-ratio: 3 / 2; overflow: hidden; background: var(--mist); position: relative; }
/* Same on the client's own page: the whole cover inside the card, over a soft blur of itself (--cv) */
.g-card-img::before { content: ''; position: absolute; inset: -28px; background: var(--cv, none) center / cover no-repeat; filter: blur(22px); opacity: .85; }
.g-card-img img { position: relative; width: 100%; height: 100%; object-fit: contain; }
.g-card strong { display: block; font-size: 22px; font-stretch: 118%; font-weight: 800; line-height: 1.15; margin-top: 14px; }
.g-card span { display: block; font-size: 15px; color: var(--graphite); }
.g-card.off { opacity: .6; }

/* Selection bar, download progress, toast */
.g-sel, .g-job { position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); translate: -50% 0; z-index: 50; background: var(--ink); color: #fff; box-shadow: 0 18px 40px -12px rgba(0, 0, 0, .5); max-width: calc(100vw - 24px); }
.g-sel { display: flex; align-items: center; gap: 4px; border-radius: 999px; padding: 8px 8px 8px 22px; white-space: nowrap; }
.g-sel strong { margin-right: 8px; font-variant-numeric: tabular-nums; }
.g-text { background: none; border: 0; color: #fff; font-weight: 700; font-size: 15px; padding: 10px 12px; border-radius: 999px; cursor: pointer; }
.g-text:hover { background: rgba(255, 255, 255, .14); }
.g-job .g-text.go { background: var(--yellow); color: var(--ink); padding: 10px 22px; animation: psave-pulse 1.6s ease-in-out infinite; }
.g-job { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px 14px; border-radius: 22px; padding: 12px 12px 16px 20px; width: min(460px, calc(100vw - 24px)); }
.g-job-text { font-weight: 600; font-size: 15px; font-variant-numeric: tabular-nums; }
.g-job-bar { grid-column: 1 / -1; height: 4px; margin-right: 8px; border-radius: 2px; background: rgba(255, 255, 255, .2); overflow: hidden; }
.g-job-bar span { display: block; height: 100%; width: 0; background: var(--yellow); transition: width .25s; }
.g-toast { position: fixed; left: 50%; top: 18px; translate: -50% 0; z-index: 70; background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 999px; font-weight: 600; font-size: 15px; opacity: 0; transition: opacity .2s; pointer-events: none; max-width: calc(100vw - 24px); text-align: center; }
.g-toast.show { opacity: 1; }
dialog .g-toast { position: absolute; }

/* The client's own page (/client): what is waiting, galleries, paperwork */
.c-sec { padding: clamp(28px, 4vw, 56px) 0 0; }
.c-sec:last-child { padding-bottom: clamp(56px, 7vw, 96px); }
.c-sec h2 { font-size: clamp(26px, 3vw, 44px); margin-bottom: clamp(16px, 2vw, 28px); }
.c-todos { display: grid; gap: 12px; }
.c-todo { display: flex; align-items: center; justify-content: space-between; gap: 14px 20px; flex-wrap: wrap; padding: 18px 22px; border-radius: 22px; background: var(--yellow); text-decoration: none; }
.c-todo.late { box-shadow: inset 0 0 0 3px #b4441b; }
.c-todo > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.c-todo strong { display: block; font-size: clamp(18px, 2vw, 22px); font-stretch: 112%; font-weight: 800; line-height: 1.2; }
.c-todo small { font-size: 15px; }
.c-todo:hover .btn { background: #000; }
.c-docs { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.c-docs a { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--rule); text-decoration: none; }
.c-docs a:hover strong { text-decoration: underline; }
.c-docs a > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.c-docs strong { display: block; font-size: 18px; }
.c-docs small { color: var(--graphite); font-size: 15px; }
.c-pill { flex: none; display: inline-block; padding: 3px 12px; border-radius: 999px; font-size: 14px; font-weight: 700; background: var(--yellow); white-space: nowrap; }
.c-pill.ok { background: #dff3e6; color: #1f7a4a; }
.c-pill.late { background: #fbe4dc; color: #b4441b; }
.g-link { background: none; border: 0; padding: 0; font: inherit; font-weight: 700; text-decoration: underline; cursor: pointer; color: var(--ink); }

/* A contract or an invoice: one sheet of paper */
.d-wrap { background: var(--mist); padding: clamp(16px, 3vw, 40px) 0 clamp(56px, 7vw, 96px); flex: 1; }
.d-wrap .wrap { max-width: 920px; }
.d-tools { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.sheet { background: #fff; border-radius: 20px; padding: clamp(22px, 5vw, 64px); box-shadow: 0 30px 60px -44px rgba(36, 37, 36, .45); }
.sheet h1 { font-size: clamp(28px, 4vw, 44px); line-height: 1.05; letter-spacing: -0.02em; margin: 0 0 12px; overflow-wrap: anywhere; }
.sheet-from { display: flex; align-items: flex-start; gap: 18px; flex-wrap: wrap; }
.sheet-from img { width: 132px; height: auto; background: var(--yellow); padding: 10px 12px; border-radius: 10px; }
.sheet-from p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--graphite); }
.sheet-from strong { color: var(--ink); font-size: 16px; }
.sheet-kind { text-transform: uppercase; letter-spacing: .12em; font-size: 13px; font-weight: 700; color: var(--graphite); margin: 32px 0 8px; }
.sheet-meta { color: var(--graphite); margin: 0 0 28px; }
.sheet-meta strong { color: var(--ink); }
.prose { font-family: Georgia, 'Times New Roman', serif; font-size: 17px; line-height: 1.65; overflow-wrap: anywhere; }
.prose h3 { font-size: 19px; font-stretch: 112%; letter-spacing: 0; line-height: 1.2; margin: 28px 0 10px; }
.prose p { margin: 0 0 14px; }
.sign, .signed { margin-top: 36px; padding: clamp(18px, 3vw, 28px); border-radius: 20px; background: var(--mist); display: grid; gap: 16px; }
.sign h2 { font-size: clamp(22px, 2.6vw, 30px); }
.sign .field input { background: #fff; }
.sign .btn { justify-self: start; }
.sig { width: 100%; aspect-ratio: 15 / 4; height: auto; background: #fff; border: 2px dashed var(--rule); border-radius: 14px; touch-action: none; cursor: crosshair; display: block; }
.s-agree { display: flex; gap: 10px; align-items: flex-start; font-weight: 600; cursor: pointer; }
.s-agree input { width: 22px; height: 22px; accent-color: var(--ink); flex: none; margin: 2px 0 0; }
.signed { background: #dff3e6; gap: 8px; }
/* an empty status line or note takes no room until it says something (it left a large gap above the small print) */
:is(.sign, .signed, .pay, .chg-item, .p-pick, .c-panel) :is(.status:not([aria-live]), .form-note):empty { display: none; }
.sign .p-opt { margin: 0; background: #fff; }
.sign .p-opt.on { background: var(--yellow); }
.signed.wait { background: var(--mist); }
.signed p { margin: 0; }
.signed .form-note { overflow-wrap: anywhere; }
.signed-name { font-family: 'Segoe Script', 'Brush Script MT', 'Snell Roundhand', cursive; font-size: clamp(30px, 4vw, 42px); line-height: 1.2; }
.signed img { max-width: min(300px, 100%); max-height: 110px; }

.inv-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; flex-wrap: wrap; margin-bottom: 28px; }
.inv-no { display: grid; gap: 3px; justify-items: end; text-align: right; margin-left: auto; }
.inv-no .sheet-kind { margin: 0; }
.inv-no strong { font-size: 26px; font-stretch: 115%; font-weight: 800; line-height: 1.1; }
.inv-no .c-pill { margin-top: 6px; }
.inv-items { width: 100%; border-collapse: collapse; margin: 20px 0 0; font-variant-numeric: tabular-nums; }
.inv-items th { text-align: left; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--graphite); border-bottom: 2px solid var(--ink); padding: 8px 0; }
.inv-items td { padding: 12px 0; border-bottom: 1px solid var(--rule); vertical-align: top; overflow-wrap: anywhere; }
.inv-items th:not(:first-child), .inv-items td:not(:first-child) { text-align: right; padding-left: 16px; white-space: nowrap; }
.inv-items td small { display: none; color: var(--graphite); font-size: 14px; }
.inv-sum { display: grid; grid-template-columns: 1fr auto; gap: 6px 0; margin: 16px 0 0 auto; max-width: 380px; font-variant-numeric: tabular-nums; }
.inv-sum dt, .inv-sum dd { margin: 0; }
.inv-sum dd { text-align: right; padding-left: 32px; }
.inv-sum .big { font-weight: 800; font-size: 20px; border-top: 2px solid var(--ink); padding-top: 8px; margin-top: 4px; }
.inv-notes { white-space: pre-line; margin: 24px 0 0; color: var(--graphite); }
.pay { margin-top: 32px; padding: clamp(18px, 3vw, 28px); border-radius: 20px; background: var(--yellow); display: grid; gap: 12px; justify-items: start; }
.pay.done { background: #dff3e6; color: #1f7a4a; }
.pay h2 { font-size: clamp(24px, 3vw, 34px); }
.pay h3 { font-size: 16px; letter-spacing: 0; margin-top: 14px; }
.pay p { margin: 0; }
.pay .form-note { color: rgba(36, 37, 36, .78); }
.pay-how { white-space: pre-line; overflow-wrap: anywhere; }
.pay-sent { margin-top: 8px; padding: 10px 14px; border-radius: 10px; background: #eef6f0; }
/* "Secured by Stripe.   Already paid?": the second is a quiet link; it opens the small window #paid */
.pay-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 16px; }
.pay-other { background: none; border: 0; padding: 4px 0; font: inherit; font-size: 14px; color: rgba(36, 37, 36, .78); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.pay-other:hover, .pay-other:focus-visible { color: var(--ink); }
@media (pointer: coarse) { .pay-other { padding: 12px 0; } }
.share.po { width: min(calc(100vw - 24px), 440px); }
/* An iPhone saving to Photos in steps: one step on screen, a big Save that pulses, Apple's own button drawn small */
.share.psave { width: min(calc(100vw - 24px), 440px); }
.psave-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; overflow-wrap: anywhere; }
.psave-body > * { min-width: 0; }
.psave-body p { margin: 0; }
.psave-lead { font-size: 17px; line-height: 1.45; }
.psave-first { font-size: 21px; font-weight: 700; line-height: 1.35; }
.psave-keep { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; line-height: 1.4; color: var(--graphite); }
.psave-keep b { flex: none; display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--graphite); color: #fff; font-size: 12px; line-height: 1; }
.psave-where { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.psave-where strong { font-size: 22px; font-stretch: 112%; font-weight: 800; }
.psave-where span { font-size: 15px; color: var(--graphite); font-variant-numeric: tabular-nums; white-space: nowrap; }
.psave-bars { display: flex; gap: 6px; margin-top: -6px; }
.psave-bars i { flex: 1; height: 6px; border-radius: 3px; background: var(--rule); }
.psave-bars i.on { background: var(--yellow); }
.psave-bars i.now { background: var(--ink); }
.psave-now { display: grid; gap: 12px; padding: 16px; border-radius: 16px; background: var(--mist); }
.psave-tell { font-size: 17px; font-weight: 600; line-height: 1.4; }
.psave-small { font-size: 14px; color: var(--graphite); line-height: 1.45; }
.psave-body .g-link { display: inline-block; padding: 10px 0; }  /* a link in this window is easy to tap */
.psave-now .psave-wide + .psave-wide { margin-top: -4px; }
.psave-bar { height: 10px; border-radius: 5px; background: #fff; box-shadow: inset 0 0 0 1px var(--rule); overflow: hidden; }
.psave-bar span { display: block; height: 100%; background: var(--yellow); transition: width .3s; }
.psave-go, .psave-wide { width: 100%; min-height: 58px; font-size: 18px; justify-content: center; }
.psave-go { animation: psave-pulse 1.6s ease-in-out infinite; }
@keyframes psave-pulse { 0% { box-shadow: 0 0 0 0 rgba(247, 202, 77, .85); } 70% { box-shadow: 0 0 0 14px rgba(247, 202, 77, 0); } 100% { box-shadow: 0 0 0 0 rgba(247, 202, 77, 0); } }
@media (prefers-reduced-motion: reduce) { .psave-go, .g-job .g-text.go { animation: none; } }
.psave-how { display: grid; gap: 8px; padding-top: 4px; }
.psave-how ol { margin: 0; padding-left: 22px; display: grid; gap: 8px; font-size: 15px; line-height: 1.45; }
.psave-done { display: grid; justify-items: center; gap: 6px; padding: 8px 0 4px; text-align: center; }
.psave-done strong { font-size: 21px; font-stretch: 112%; font-weight: 800; }
.psave-done span:last-child { font-size: 16px; color: var(--graphite); }
.psave-ok { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--yellow); color: var(--ink); }
.psave-ok svg { width: 30px; height: 30px; }
.psave-link { display: flex; gap: 8px; }
.psave-link .btn { flex: none; }
.psave-link input { flex: 1 1 0; width: 0; min-width: 0; height: 48px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--rule); font-size: 16px; background: #fff; color: var(--ink); }
.po .share-body { gap: 18px; }
.po .share-body > *, .po-fields > *, .po-amt-wrap > * { min-width: 0; }  /* an input's own width must not push the window wider than a phone */
.po .share-body .btn { justify-self: stretch; }
.po-fields { display: grid; gap: 18px; }
.po-ways { display: flex; flex-wrap: wrap; gap: 8px; }
.po-way { position: relative; }
.po-way input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.po-way span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 999px; border: 2px solid #d9d9d6; font-weight: 700; transition: background-color .15s, border-color .15s, color .15s; }
.po-way:hover span { border-color: var(--ink); }
.po-way input:checked + span { background: var(--ink); border-color: var(--ink); color: #fff; }
.po-way input:focus-visible + span { outline: 3px solid var(--yellow); outline-offset: 2px; }
.po-amt-wrap { display: grid; gap: 7px; }
.po-amt-wrap label { font-weight: 700; font-size: 15px; }
.po-amt { display: flex; align-items: center; gap: 6px; height: 58px; padding: 0 16px; border-radius: 14px; background: var(--mist); border: 2px solid transparent; transition: border-color .2s, background-color .2s; }
.po-amt:focus-within { border-color: var(--ink); background: #fff; }
.po-amt span { font-weight: 800; font-size: 22px; }
.po-amt input { flex: 1 1 0; width: 100%; min-width: 0; height: 100%; border: 0; padding: 0; background: transparent; font: inherit; font-size: 22px; font-weight: 800; color: var(--ink); outline: none; }
.po .status:empty { position: absolute; }  /* out of the way while empty, still read out when it speaks */
.po .status { margin: -6px 0 0; font-weight: 700; }

/* Log in: Google, email + password, or a link by email */
.g-sign .form > form { display: grid; gap: 18px; }
.g-google { justify-self: stretch; gap: 10px; background: #fff; }
.g-google svg { flex: none; }
.g-or { display: flex; align-items: center; gap: 12px; margin: 0; color: var(--graphite); font-size: 14px; }
.g-or::before, .g-or::after { content: ''; flex: 1; height: 1px; background: var(--rule); }
/* "No password, or forgot it?" under the log-in form, and the 6-digit code that follows */
.g-forgot, .g-sent { margin: 0; }
.g-sign form > .g-forgot { margin-top: -6px; }
.field input.g-code { font-size: 26px; font-weight: 700; letter-spacing: .28em; text-align: center; }

/* Their page: jump links, the password nudge, empty sections, the account rows */
.c-jump { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.c-jump a { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 16px; border-radius: 999px; border: 2px solid var(--ink); font-weight: 700; font-size: 15px; text-decoration: none; }
.c-jump a:hover { background: var(--ink); color: #fff; }
.c-jump small { font-size: 13px; opacity: .7; }
.c-nudge { background: var(--ink); color: #fff; padding: 12px 0; }
.c-nudge .wrap { display: flex; align-items: center; justify-content: space-between; gap: 10px 20px; flex-wrap: wrap; }
.c-nudge .btn { background: var(--yellow); color: var(--ink); }
.c-nudge .g-link { color: #fff; margin-left: 10px; }
.c-sec { scroll-margin-top: 12px; }
.c-sec h2 small { font-size: 15px; font-weight: 600; font-stretch: 100%; letter-spacing: 0; color: var(--graphite); margin-left: 10px; }
.c-none { margin: 0; padding: 22px 24px; border-radius: 20px; background: var(--mist); color: var(--graphite); }
.c-owed { margin: 0 0 14px; font-size: 18px; }
.c-acct { border-top: 2px solid var(--ink); }
.c-row { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; padding: 16px 0; border-bottom: 1px solid var(--rule); }
.c-row > span { flex: 1 1 260px; min-width: 0; overflow-wrap: anywhere; }
.c-row strong { display: block; font-size: 18px; }
.c-row small { color: var(--graphite); font-size: 15px; }
.c-panel { padding: 20px; margin: 0 0 4px; border-radius: 0 0 20px 20px; background: var(--mist); border-bottom: 1px solid var(--rule); }
.c-panel form { display: grid; gap: 16px; max-width: 520px; }
.c-panel .field input { background: #fff; }
.c-panel .btn { justify-self: start; }
.c-steps { margin: 0; padding-left: 22px; display: grid; gap: 12px; }
.c-qr { display: block; width: 190px; margin: 10px 0; background: #fff; padding: 8px; border-radius: 12px; }
.c-qr svg { display: block; width: 100%; height: auto; }
.c-key { font-family: ui-monospace, Consolas, monospace; font-size: 15px; background: #fff; padding: 3px 8px; border-radius: 8px; overflow-wrap: anywhere; }

/* Privacy page: plain reading text on the same sheet as contracts and invoices */
.policy h2 { font-size: 22px; font-stretch: 112%; letter-spacing: 0; line-height: 1.2; margin: 30px 0 10px; }
.policy p, .policy li { font-size: 17px; line-height: 1.6; }
.policy p { margin: 0 0 14px; }
.policy ul { margin: 0 0 14px; padding-left: 22px; display: grid; gap: 8px; }
.policy a { text-underline-offset: 3px; }

/* Footer */
.g-foot { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; }

@media (max-width: 860px) {
  .g-sign-grid, .g-hero-grid { grid-template-columns: 1fr; }
  .g-hero-grid .g-cover { order: -1; }
  .g-cover img { max-height: min(44vh, 540px); }  /* stacked: an upright cover leaves room for the title and the buttons */
}
@media (max-width: 640px) {
  .g-top .wrap { height: auto; min-height: 64px; padding-top: 8px; padding-bottom: 8px; flex-wrap: wrap; row-gap: 8px; }
  .g-who { flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
  .g-who .btn { min-height: 38px; padding: 0 14px; font-size: 14px; }
  .g-top .brand img { height: 38px; }
  .g-who span { display: none; }
  .g-acts [data-dl="all"] { display: none; }
}
/* the smallest phones: My page, the picture, Help and Log out still on one line */
@media (max-width: 360px) {
  .g-who { gap: 5px; }
  .g-who .btn { padding: 0 9px; }
}
@media (max-width: 640px) {
  .g-heart { width: 38px; height: 38px; right: 6px; bottom: 6px; }
  .g-heart svg { width: 17px; height: 17px; }
  /* a phone: the bar takes the width, the count at the left and Download filling the rest */
  .g-sel { left: 12px; right: 12px; translate: none; max-width: none; padding: 8px 8px 8px 18px; flex-wrap: wrap; justify-content: space-between; border-radius: 24px; row-gap: 6px; }
  .g-sel [data-dl] { flex: 1 1 auto; max-width: 260px; }
  .v-album.v-dl { padding: 0 14px; }
}
@media (max-width: 560px) {
  .inv-items th:nth-child(2), .inv-items th:nth-child(3), .inv-items td:nth-child(2), .inv-items td:nth-child(3) { display: none; }
  .inv-items td small { display: block; }
  .inv-no { justify-items: start; text-align: left; margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) { .g-spin { animation-duration: 2.4s; } }
/* On paper (or "Save as PDF"): only the sheet */
/* A gallery waiting for payment: the first photos are open, the rest are blurs with a padlock that lead to the invoice.
   The blur is not for show: the server sends only a 24-pixel picture for a locked file (see lockOf in lib/portal.js). */
.g-lock { display: flex; gap: 12px; align-items: flex-start; max-width: 62ch; margin: 0 0 20px; padding: 14px 18px; border-radius: 18px; background: rgba(36, 37, 36, .09); font-size: 16px; line-height: 1.45; }
.g-lock svg { flex: none; margin-top: 1px; }
.btn > svg { width: 18px; height: 18px; flex: none; }
.g-tile.locked .tile, .film.locked { cursor: pointer; text-decoration: none; }
.g-tile.locked .tile img, .film.locked .film-img img { filter: blur(14px); transform: scale(1.25); }
.g-tile.locked .tile:hover img, .film.locked:hover .film-img img { transform: scale(1.3); }
.g-lk { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 6px; padding: 8px; background: rgba(36, 37, 36, .3); color: #fff; text-align: center; }
.g-lk svg { width: 26px; height: 26px; }
.g-lk small { font-size: 13px; font-weight: 700; opacity: 0; transition: opacity .2s; }
.g-tile.locked .tile:hover .g-lk small, .g-tile.locked .tile:focus-visible .g-lk small, .film.locked .g-lk small { opacity: 1; }
.g-card .g-card-lock { position: absolute; left: 10px; top: 10px; display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; background: rgba(36, 37, 36, .85); color: #fff; font-size: 13px; font-weight: 700; }
.g-card-lock svg { width: 14px; height: 14px; }
.inv-plan { margin: 18px 0 0; font-weight: 700; }
.pay-btns { display: flex; flex-wrap: wrap; gap: 10px; }
/* on a phone the payment box is far down the invoice: a button under the title leads to it */
.pay-jump { display: none; margin: 18px 0 22px; }
@media (max-width: 640px) { .pay-jump { display: block; } .pay-jump .btn { width: 100%; } }
@media print { .pay-jump { display: none !important; } }
.pay a { font-weight: 700; }
.pay a.btn { text-decoration: none; }

@media print {
  .g-top, .foot, .d-tools, .g-preview, .g-toast, .g-job, .g-sel, .skip, .sign, .signed.wait, [data-pay], [data-pay] + .form-note, .pay-meta { display: none !important; }
  body, .d-wrap { background: #fff !important; }
  .d-wrap { padding: 0; }
  .d-wrap .wrap { max-width: none; padding: 0; }
  .sheet { box-shadow: none; border-radius: 0; padding: 0; }
  .sheet-from img, .pay, .signed, .c-pill { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .prose p, .inv-items tr, .signed, .pay { break-inside: avoid; }
}

/* A booking's contract: its details above the terms, the hold or confirmed note, the promotional choice, changes to approve */
.d-tools-end { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; margin-left: auto; }
.bk { margin: 18px 0 0; padding: 14px 18px; border-radius: 16px; background: var(--yellow); line-height: 1.45; }
.bk.ok { background: #dff3e6; color: #1f7a4a; }
.bk a { font-weight: 700; color: inherit; }
.bk a.btn { color: #fff; text-decoration: none; margin-top: 10px; }
.bk-h { margin: 32px 0 6px; font-size: 22px; }
.bk-rows { display: grid; grid-template-columns: minmax(120px, 34%) minmax(0, 1fr); margin: 12px 0 0; border-top: 1px solid rgba(36, 37, 36, .15); }
.bk-rows dt, .bk-rows dd { margin: 0; padding: 9px 0; border-bottom: 1px solid rgba(36, 37, 36, .15); }
.bk-rows dt { font-weight: 700; padding-right: 16px; }
.bk-rows dd { white-space: pre-line; overflow-wrap: anywhere; }
.bk-rows em { color: var(--graphite); }
/* What this booking's invoice says, repeated where the terms speak of payment in general */
.p-this { margin: 0 0 14px; padding: 12px 14px; border-left: 4px solid var(--yellow); background: #fff9e3; border-radius: 0 12px 12px 0; overflow-wrap: anywhere; }
.p-opt { display: flex; gap: 12px; align-items: flex-start; margin: 10px 0; padding: 12px 16px; border-radius: 14px; background: var(--mist); }
label.p-opt { cursor: pointer; }
label.p-opt input { width: 22px; height: 22px; flex: none; margin: 2px 0 0; accent-color: var(--ink); }
.p-opt.on { background: var(--yellow); }
.p-box { flex: none; width: 22px; height: 22px; margin-top: 2px; border: 2px solid var(--ink); border-radius: 50%; display: grid; place-items: center; }
.p-opt.on .p-box { background: var(--ink); color: #fff; }
.p-opt.on .p-box::after { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #fff; }
.chg { margin-top: 36px; }
.chg-item { margin-top: 14px; padding: 16px 18px; border-radius: 16px; background: var(--mist); display: grid; gap: 10px; }
.chg-item p { margin: 0; }
@media (max-width: 560px) { .bk-rows { grid-template-columns: 1fr; } .bk-rows dt { border-bottom: 0; padding-bottom: 0; } }
@media print { .bk, .p-opt { -webkit-print-color-adjust: exact; print-color-adjust: exact; } .d-tools-end, .chg .field, .chg .pay-btns { display: none; } }

/* The promotional-use choice, at the bottom of a contract right above the signature */
.p-pick { margin-top: 36px; padding: clamp(18px, 3vw, 28px); border-radius: 20px; background: var(--mist); }
.p-pick h2 { font-size: 22px; margin: 0 0 8px; }
.p-pick h2 small { font-size: 14px; font-weight: 600; font-stretch: 100%; letter-spacing: 0; color: var(--graphite); margin-left: 6px; }
.p-pick .p-opt { background: #fff; }
.p-pick .p-opt.on { background: var(--yellow); }
.p-pick .form-note { margin: 0 0 4px; }
.p-note { font-size: 15px; }
.p-note a { color: var(--graphite); }
@media print { .p-pick { -webkit-print-color-adjust: exact; print-color-adjust: exact; break-inside: avoid; } }

/* The order of a job on the client's page: a step that waits for the one above it */
.c-todo.wait { background: var(--mist); color: var(--graphite); }
.c-after { flex: none; font-size: 14px; font-weight: 700; white-space: nowrap; }
/* The client's own picture: in the header, next to "Hi …" on their page, in the profile dialog. Round, never an emoji:
   without a picture a drawn figure stands in. */
.g-ava, .c-face { flex: none; display: grid; place-items: end center; padding: 0; border-radius: 50%; overflow: hidden; border: 2px solid var(--ink); background: #fff; color: #b9bab8; cursor: pointer; }
.g-ava { width: 38px; height: 38px; }
.c-face { width: clamp(72px, 9vw, 104px); height: clamp(72px, 9vw, 104px); }
.g-ava img, .c-face img { width: 100%; height: 100%; object-fit: cover; }
.g-ava svg, .c-face svg { width: 100%; height: 100%; }
span.c-face { cursor: default; }
.c-hello { display: flex; align-items: center; gap: clamp(16px, 3vw, 36px); }
.c-hello > div { flex: 1; min-width: 0; }
.me-photo { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.me-photo .c-face { width: 88px; height: 88px; }
#me form { display: grid; gap: 14px; }
#me .field input { background: var(--mist); }
/* Sharing a gallery with a link: the "Share" button and its dialog */
.g-hero-acts .btn svg { margin-right: 8px; }
.share { width: min(calc(100vw - 24px), 540px); max-height: calc(100dvh - 24px); border-radius: 24px; background: #fff; color: var(--ink); overflow: auto; }
.share::backdrop { background: rgba(36, 37, 36, .68); }
.share-card { display: grid; gap: 16px; padding: clamp(20px, 3vw, 30px); }
.share-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.share-head h2 { margin: 0; font-size: clamp(22px, 2.4vw, 28px); }
.share-body { display: grid; gap: 14px; }
.share-body p { margin: 0; }
.share-body .status:empty { display: none; }
.share-body .btn { justify-self: start; }
.share-link { display: flex; gap: 8px; }
.share-link input { flex: 1; min-width: 0; min-height: 50px; padding: 0 14px; border: 2px solid var(--rule); border-radius: 14px; background: var(--mist); color: var(--ink); font: inherit; font-size: 15px; }
.share-link .btn { flex: none; }
@media (max-width: 480px) { .share-link { flex-direction: column; } .share-link .btn, .share-body .btn { justify-self: stretch; } }
/* The guided tour: the page dims, one real element is lit, and a small card next to it explains it */
.coach { position: fixed; inset: 0; z-index: 2000; }
.coach-hole { position: fixed; border-radius: 14px; pointer-events: none; box-shadow: 0 0 0 3px var(--yellow), 0 0 0 200vmax rgba(36, 37, 36, .68); }
.coach.center .coach-hole { top: 50% !important; left: 50% !important; width: 0 !important; height: 0 !important; box-shadow: 0 0 0 200vmax rgba(36, 37, 36, .68); }
.coach-card { position: fixed; width: min(calc(100vw - 24px), 360px); padding: 20px 20px 16px; border-radius: 20px; background: #fff; color: var(--ink); box-shadow: 0 20px 60px rgba(0, 0, 0, .4); }
.coach-card h2 { font-size: 22px; line-height: 1.15; margin: 0 0 8px; }
.tour-n { margin: 0 0 4px; font-size: 13px; font-weight: 700; color: var(--graphite); }
.tour-p { margin: 0 0 16px; font-size: 16px; line-height: 1.5; }
.tour-btns { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tour-btns > span { display: flex; gap: 8px; }
.g-tile.coach-on .g-heart { opacity: 1; }
@media print { .coach { display: none; } }

/* The sample client's inbox (/client?demo, the studio only): the emails on one side, the one that is open on the other */
.mailbox { width: min(calc(100vw - 24px), 1040px); }
.mb { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 16px; align-items: start; }
.mb-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.mb-h { font-size: 13px; font-weight: 700; color: var(--graphite); padding: 10px 2px 2px; }
.mb-h:first-child { padding-top: 0; }
.mb-list button { display: grid; gap: 2px; width: 100%; text-align: left; padding: 10px 12px; border: 2px solid transparent; border-radius: 12px; background: var(--mist); color: var(--ink); font: inherit; font-size: 15px; line-height: 1.3; cursor: pointer; }
.mb-list button:hover { border-color: var(--rule); }
.mb-list button[aria-current="true"] { border-color: var(--ink); background: #fff; }
.mb-list small { color: var(--graphite); font-size: 13px; }
.mb-read { min-width: 0; border: 2px solid var(--rule); border-radius: 16px; overflow: hidden; }
.mb-meta { margin: 0; padding: 10px 14px; font-size: 13px; color: var(--graphite); border-bottom: 2px solid var(--rule); overflow-wrap: anywhere; }
.mb-page { background: var(--mist); }
/* The calendar invitation: Google's own email looks like Google's, so this is what the site puts into the event */
.ev { margin: 16px; padding: 20px; background: #fff; border-radius: 16px; display: grid; gap: 12px; }
.ev h3 { margin: 0; font-size: 20px; }
.ev dl { margin: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 14px; }
.ev dt { font-weight: 700; }
.ev dd { margin: 0; }
.ev-desc { margin: 0; color: var(--graphite); overflow-wrap: anywhere; }
.ev-rsvp { margin: 0; display: flex; gap: 8px; }
.ev-rsvp span { padding: 6px 16px; border: 2px solid var(--rule); border-radius: 999px; font-weight: 700; font-size: 14px; color: var(--graphite); }
.mb-page > .form-note { margin: 0 16px 16px; }
@media (max-width: 760px) { .mb { grid-template-columns: 1fr; } }

/* "What happens later" in the sample (/client?demo): one row per thing that can be set off, with its button */
.later { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.later li { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 14px; border-radius: 14px; background: var(--mist); }
.later li > span:first-child { display: grid; gap: 2px; min-width: 0; }
.later small { color: var(--graphite); font-size: 14px; line-height: 1.35; }
.later .btn { flex: none; }
.later-done { flex: none; font-size: 14px; font-weight: 700; text-align: right; }
@media (max-width: 560px) { .later li { flex-direction: column; align-items: flex-start; } .later-done { text-align: left; } }
.g-preview .g-link { white-space: nowrap; }
.later .btn:disabled { opacity: .35; cursor: default; }

/* 2026-11-16: phones (after the rules above, so these win): fewer boxes inside boxes on a contract or an invoice, the
   words keep their width; buttons that wrap fill their row; the gallery bar's chips fade under its button */
@media screen and (max-width: 640px) {
  .d-wrap .wrap { padding-left: 10px; padding-right: 10px; }
  .sheet { padding: 22px 16px; border-radius: 16px; }
  .sign, .signed, .pay, .p-pick { padding: 16px 14px; border-radius: 16px; }
  .p-opt { padding: 12px; gap: 10px; }
  .chg-item { padding: 14px; }
  .sheet .p-pick h2 small { display: block; margin: 4px 0 0; }
  .pay { justify-items: stretch; }
  .pay-btns .btn { flex: 1 1 100%; }
  .g-hero-acts .btn { flex: 1 1 auto; }
  .g-chip { padding: 0 13px; font-size: 14px; }
  .g-acts .btn, .g-selall { padding: 0 14px; font-size: 14px; }
  .g-chips { padding-right: 22px; -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 22px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 22px), transparent); }
}
@media (max-width: 860px) { .g-sign .form { max-width: 560px; } }
