:root{font-family:-apple-system,BlinkMacSystemFont,"Helvetica Neue",Arial,sans-serif;color:#111;background:#f5f5f3;line-height:1.4}
*{box-sizing:border-box} body{margin:0;background:#f5f5f3} button,input{font:inherit}
.portal-shell{max-width:1100px;margin:auto;padding:22px 16px 100px}.brand{display:flex;justify-content:space-between;align-items:end;border-bottom:1px solid #111;padding:0 0 14px;margin-bottom:34px;font-size:11px;letter-spacing:.14em}.brand strong{font-size:13px}
.panel{max-width:560px;margin:10vh auto 0;background:#fff;border:1px solid #deded9;border-radius:22px;padding:28px}.eyebrow{font-size:11px;letter-spacing:.16em;font-weight:700}.panel h1,.couple-header h1{font-size:clamp(30px,7vw,56px);line-height:1.02;margin:.3em 0}
label{display:grid;gap:8px;font-weight:600;margin-top:24px}input{border:1px solid #bbb;border-radius:12px;padding:15px;background:#fff;font-size:20px;letter-spacing:.25em}button{border:0;border-radius:999px;background:#000;color:#fff;padding:14px 18px;font-weight:750;letter-spacing:.04em}.login-panel button{width:100%;margin-top:18px}
.error{position:sticky;top:8px;z-index:20;margin:0 auto 16px;max-width:680px;background:#fff;border:1px solid #111;border-radius:14px;padding:12px;text-align:center}.couple-header{text-align:center;padding:20px 0 24px}.couple-header p{color:#666}.selection-bar{position:sticky;top:8px;z-index:10;background:rgba(255,255,255,.94);backdrop-filter:blur(12px);border:1px solid #ddd;border-radius:18px;padding:12px 16px;margin-bottom:14px;display:flex;gap:16px;justify-content:space-between;align-items:center}.selection-bar p{margin:0;color:#555;font-size:13px}.selection-bar p[data-kind="advisory"]{font-weight:650;color:#111}.selection-bar strong{font-size:24px}
.gallery-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:6px}.photo-card{position:relative;border-radius:5px;padding:0;overflow:hidden;background:#ddd;aspect-ratio:2/3}.photo-card img{width:100%;height:100%;object-fit:cover;display:block}.photo-card span{position:absolute;right:8px;top:8px;width:30px;height:30px;border-radius:50%;display:grid;place-items:center;background:#fff;color:#111;opacity:0;transform:scale(.8);transition:.15s}.photo-card.selected{outline:4px solid #000;outline-offset:-4px}.photo-card.selected span{opacity:1;transform:scale(1)}
.support-link{display:block;color:#111;text-align:center;margin:28px auto 10px;font-weight:650}.confirm-dock{position:fixed;left:0;right:0;bottom:0;padding:12px max(16px,env(safe-area-inset-right)) calc(12px + env(safe-area-inset-bottom));background:rgba(245,245,243,.94);backdrop-filter:blur(14px);display:flex;justify-content:center}.confirm-dock button{width:min(620px,100%)}button:disabled{opacity:.35}
.photo-modal{width:100vw;height:100dvh;max-width:none;max-height:none;border:0;padding:58px 14px 22px;background:#050505;color:#fff}.photo-modal::backdrop{background:#000}.photo-modal img{display:block;max-width:100%;max-height:calc(100dvh - 150px);margin:auto;object-fit:contain}.modal-close{position:fixed;right:16px;top:16px;width:42px;height:42px;padding:0;background:#fff;color:#000;font-size:28px}.photo-modal #modalToggle{position:fixed;bottom:max(18px,env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);width:min(520px,calc(100% - 32px));background:#fff;color:#000}
@media(min-width:700px){.gallery-grid{grid-template-columns:repeat(4,1fr);gap:10px}.selection-bar{padding:14px 20px}.portal-shell{padding-inline:28px}}
@media(min-width:1050px){.gallery-grid{grid-template-columns:repeat(5,1fr)}}
.portal-nav{position:sticky;top:8px;z-index:12;display:flex;gap:6px;overflow:auto;background:rgba(245,245,243,.94);backdrop-filter:blur(14px);padding:8px;margin:0 0 18px;border:1px solid #ddd;border-radius:18px}.portal-nav button{flex:0 0 auto;background:transparent;color:#111;padding:10px 14px}.portal-nav button.active{background:#000;color:#fff}.portal-view[hidden]{display:none!important}.compact-panel{margin:0 auto 18px;max-width:none}.workflow-panel{max-width:920px;margin:20px auto}.workflow-panel h2{font-size:clamp(28px,6vw,48px);margin:.2em 0 .7em}.workflow-content{display:grid;gap:22px}.album-step{border-top:1px solid #ddd;padding-top:18px}.album-step h3{font-size:13px;letter-spacing:.08em}.choice-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.choice-card{min-height:92px;border:1px solid #d3d3cf;border-radius:15px;background:#fafafa;color:#111;text-align:left;display:grid;gap:5px;align-content:start;padding:14px}.choice-card.selected{background:#000;color:#fff;border-color:#000}.choice-card small{font-weight:500;opacity:.7}.recommend-badge{font-size:10px;line-height:1.25}.album-step input,.comment-form input,.comment-form textarea{width:100%;letter-spacing:0;font-size:16px}.check-line{display:flex;gap:9px;align-items:flex-start;font-weight:500}.check-line input{width:auto;margin-top:3px}.success-card,.notice{border:1px solid #111;border-radius:14px;padding:16px;background:#fff}.workflow-meta,.video-status{display:flex;justify-content:space-between;gap:12px;border-bottom:1px solid #ddd;padding-bottom:12px}.pdf-frame{width:100%;height:min(72vh,850px);border:1px solid #ccc;border-radius:12px;background:#eee}.comment-card{border:1px solid #ddd;border-radius:12px;padding:12px}.comment-card p{margin:.4em 0 0}.comment-form{display:grid;gap:10px}.comment-form textarea{min-height:120px;border:1px solid #bbb;border-radius:12px;padding:14px;resize:vertical}.review-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px}.secondary{background:#fff;color:#111;border:1px solid #111}.video-link{display:inline-flex;align-items:center;justify-content:center;border-radius:999px;background:#000;color:#fff;text-decoration:none;padding:15px 20px;font-weight:750}.confirm-dock[hidden]{display:none!important}@media(min-width:700px){.choice-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}

/* Rivivi: neutral black and white, readable controls on phones and desktops. */
:root {color-scheme:light; background:#f4f4f4;font-size:16px;line-height:1.5}
body{background:#f4f4f4} [hidden]{display:none!important}
.brand{font-size:14px;gap:18px;align-items:center;flex-wrap:wrap}.brand strong{font-size:14px}
.eyebrow{font-size:13px}.panel{border-radius:16px;border-color:#ddd}
.login-panel{border-top:5px solid #111}.login-panel h1{font-size:clamp(32px,6vw,48px);line-height:1.1;letter-spacing:-.035em}
input,textarea,select{color:#111;background:#fff;caret-color:#111;font:inherit}
input::placeholder,textarea::placeholder{color:#666;opacity:1}
input:-webkit-autofill{-webkit-text-fill-color:#111;box-shadow:0 0 0 1000px #fff inset}
#clientPin{font-size:24px;letter-spacing:.35em;text-align:center;width:100%;min-width:0}
#personalLink{font-size:1rem;letter-spacing:0;text-align:left;width:100%;min-width:0}
button{cursor:pointer}button:disabled{cursor:default;opacity:.5}
:focus-visible{outline:3px solid #356fb4;outline-offset:4px}
.logout{display:block;margin-left:auto;font-size:14px;padding:10px 14px}
.selection-bar{top:80px}.selection-bar p,.album-step h3{font-size:14px}
.choice-card img{width:100%;height:150px;object-fit:contain;background:white;border-radius:8px}
.choice-card small{font-size:14px;opacity:1}.recommend-badge{font-size:13px}
.confirm-dock,.portal-nav{background:rgba(244,244,244,.96)}
#galleryEmpty{margin:24px 0}.portal-nav{scrollbar-width:thin}.portal-nav button{font-size:14px}
@media(max-width:480px){.brand{letter-spacing:.06em}.brand strong{font-size:13px}.panel{padding:22px}.selection-bar{flex-direction:column;gap:3px;align-items:flex-start}.choice-grid,.review-actions{grid-template-columns:1fr 1fr}.choice-card{padding:10px}.review-actions{grid-template-columns:1fr}}

/* 4.0.8: use available width, let text reflow and avoid nested horizontal strips. */
html{font-size:100%;-webkit-text-size-adjust:100%;text-size-adjust:100%}
body{min-width:0}
.portal-shell{width:100%;max-width:1600px;padding:clamp(12px,3vw,36px);padding-bottom:calc(100px + env(safe-area-inset-bottom))}
.portal-shell>*{min-width:0}
.panel{width:100%;max-width:100%;margin:clamp(12px,3vh,32px) auto;padding:clamp(16px,3vw,36px)}
.login-panel{max-width:640px}
.workflow-panel{max-width:none}
h1,h2,h3,p,strong,small,label,button,a{overflow-wrap:anywhere}
button,input,textarea,select{max-width:100%;min-width:0}
button{white-space:normal;font-size:1rem;line-height:1.4;min-height:44px}
.brand,.eyebrow,.portal-nav button,.album-step h3,.selection-bar p,.recommend-badge,.choice-card small{font-size:.875rem}
.portal-nav{position:relative;top:auto;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));overflow:visible;gap:6px}
.portal-nav button{width:100%;padding:12px 8px;letter-spacing:.015em}
.selection-bar{top:8px;flex-wrap:wrap}
.choice-grid{grid-template-columns:repeat(auto-fit,minmax(min(100%,210px),1fr))}
.choice-card{min-width:0;border-radius:12px}
.choice-card img{height:clamp(140px,18vw,240px)}
.choice-card strong{font-size:1rem;line-height:1.4}
.check-line input{flex:none}
.workflow-meta{flex-wrap:wrap}
.error{max-width:none;position:relative;top:auto;line-height:1.5;text-align:left;border-left:4px solid #111}
#loginStatus,#galleryStatus{line-height:1.5}
#loginStatus:empty,#galleryStatus:empty{display:none}
#loadMorePhotos{display:block;margin:24px auto}
.cover-preview{margin:16px 0;padding:16px;border:1px solid #ddd;border-radius:12px;display:grid;gap:12px}
.cover-preview img{display:block;width:100%;max-height:360px;object-fit:contain}
.cover-picker{padding:16px 0}
.cover-picker summary{cursor:pointer;font-weight:700;padding:12px 0}
.cover-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,150px),1fr));gap:12px}
.cover-choice{border:2px solid transparent;background:#f4f4f4;color:#111;border-radius:10px;padding:8px;text-align:left}
.cover-choice[aria-pressed=true]{border-color:#111}
.cover-choice img{width:100%;height:170px;object-fit:contain;display:block}
.cover-choice span{display:block;font-size:.875rem;margin-top:8px}
@media(max-width:620px){
  .portal-nav{grid-template-columns:repeat(2,minmax(0,1fr))}
  .brand{margin-bottom:16px}.couple-header{padding:12px 0}
  .couple-header h1{font-size:clamp(2rem,8vw,3rem);line-height:1.1}
  .selection-bar{position:relative;top:0;gap:8px;padding:14px}
  .review-actions{grid-template-columns:1fr}
  .photo-modal #modalToggle{transform:none;left:16px}
}
@media(max-height:600px){.login-panel{margin-top:0}.brand{margin-bottom:12px}.photo-modal img{max-height:calc(100dvh - 140px)}}

/* Catalogue previews remain separate from selection. */
.choice-card .catalog-enlarge,.choice-card .catalog-select{width:100%;letter-spacing:0;text-transform:none;line-height:1.35;white-space:normal;padding:10px;font-size:.9rem}
.choice-card .catalog-enlarge{background:#fff;color:#111;border:1px solid #bbb}.choice-card .catalog-select{margin-top:auto;background:#111;color:#fff;border:1px solid #111}.choice-card.selected .catalog-select{background:#fff;color:#111}.choice-card{align-content:stretch}.choice-card h4{margin:0;font-size:.875rem;font-weight:500}
.catalog-preview{width:min(1280px,calc(100vw - 24px));max-height:94dvh;overflow:auto;box-sizing:border-box;border:1px solid #bbb;border-radius:18px;padding:20px;background:#fff;color:#111}.catalog-preview::backdrop{background:rgba(0,0,0,.72)}.catalog-preview-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;position:sticky;top:-20px;background:#fff;padding:12px 0}.catalog-preview h2{font-size:clamp(20px,4vw,32px);overflow-wrap:anywhere;margin:0}.catalog-preview-heading button{flex:0 0 auto}.catalog-preview>img{display:block;max-width:100%;width:auto;max-height:72dvh;object-fit:contain;margin:0 auto}.catalog-preview>img.catalog-page-image{width:100%;max-height:none;height:auto}.catalog-preview [hidden]{display:none!important}

/* 4.0.12: compact visual album dropdowns, no horizontal scrolling. */
.album-picker{padding:0;overflow:hidden;border:1px solid #d2d2d2;border-radius:16px;background:#fff}
.album-picker summary{display:flex;align-items:center;gap:16px;list-style:none;cursor:pointer;padding:18px;min-height:88px}
.album-picker summary::-webkit-details-marker{display:none}
.album-picker summary>img{width:72px;height:72px;object-fit:contain;background:#f4f4f4;border:1px solid #eee;border-radius:10px;flex:none}
.album-picker-copy{display:grid;gap:5px;min-width:0;flex:1}.album-picker-label{font-size:.75rem;letter-spacing:.07em;color:#555}.album-picker-copy strong{font-size:1.1rem;line-height:1.35}.album-picker-copy small{color:#555}
.album-picker-arrow{font-size:1.75rem;flex:none}.album-picker[open] .album-picker-arrow{transform:rotate(180deg)}
.album-picker[open] summary{border-bottom:1px solid #ddd;background:#f7f7f7}
.album-picker-content{padding:18px}.album-picker-search{display:grid;gap:8px;margin-bottom:16px;font-size:.9rem}.album-picker-search input{width:100%;background:#fff;color:#111}
.album-picker .choice-grid{grid-template-columns:repeat(auto-fill,minmax(min(100%,200px),1fr));max-height:min(60dvh,620px);overflow-y:auto;overscroll-behavior:contain;padding:4px;scrollbar-gutter:stable}
.album-picker .choice-card img{height:150px}.album-picker-status{border-left:3px solid #111;padding:12px;background:#f3f3f3;line-height:1.5}
.album-picker [hidden]{display:none!important}
@media(max-width:480px){.album-picker summary{padding:14px;gap:12px}.album-picker summary>img{width:56px;height:56px}.album-picker .choice-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.album-picker .choice-card img{height:100px}.album-picker-content{padding:10px}.album-picker .choice-card{padding:8px;gap:8px}}
.gallery-tools{display:flex;gap:8px;flex-wrap:wrap;margin:12px 0}.gallery-tools button{font-size:14px;padding:10px 14px;min-height:44px}.save-status{font-size:14px;line-height:1.45;margin:8px 0;min-height:1.4em}.save-status[data-state="error"]{font-weight:700;border-left:3px solid currentColor;padding-left:10px}.photo-modal[open]{display:grid;grid-template-rows:auto minmax(0,1fr) auto auto;gap:10px;padding:max(12px,env(safe-area-inset-top)) 14px max(12px,env(safe-area-inset-bottom));height:100dvh;box-sizing:border-box;overflow:hidden}.photo-header{display:flex;justify-content:space-between;align-items:center;gap:12px;min-width:0}.photo-header>div{min-width:0}.photo-header strong{display:block;font-size:15px;overflow-wrap:anywhere}.photo-header span{display:block;color:#ccc;font-size:13px;margin-top:4px}.photo-modal .modal-close{position:static;flex-shrink:0;width:44px;height:44px}.photo-stage{overflow:auto;min-height:0;min-width:0;overscroll-behavior:contain;touch-action:pan-x pan-y pinch-zoom}.photo-modal .photo-stage img{display:block;width:100%;height:100%;max-width:none;max-height:none;object-fit:contain;margin:0}.photo-modal .photo-stage.zoomed img{width:200%;height:200%}.photo-actions{min-width:0}.photo-navigation{display:grid;grid-template-columns:1fr auto 1fr;gap:8px}.photo-navigation button{background:#232323;color:#fff;border:1px solid #777;font-size:14px;padding:10px 8px;min-height:44px}.photo-navigation button:disabled{opacity:.4}.photo-modal #modalToggle{position:static;transform:none;left:auto;bottom:auto;width:100%;padding:14px;font-size:15px}.photo-modal .save-status{color:#fff}.photo-modal #modalImageStatus{margin:0;color:#eee;font-size:14px;overflow-wrap:anywhere}.photo-modal button:focus-visible{outline:3px solid #fff;outline-offset:3px}@media(max-width:360px){.photo-navigation{gap:4px}.photo-navigation button{font-size:12px;padding:10px 4px}}

.album-review .choice-card img{width:100%;height:130px;object-fit:contain;background:#fff;border-radius:8px}.album-review h4{margin:0;font-size:13px;letter-spacing:.03em}.album-review-cover{max-width:240px;max-height:200px;object-fit:contain}.album-review-price{font-weight:700}.album-review [data-album-missing]{background:#f3f3f1;border:1px solid #ccc;padding:16px;border-radius:12px}.review-missing-link{color:#111;background:transparent;text-decoration:underline;padding:8px 0;min-height:44px;text-align:left}.album-unsaved-notice{font-weight:650;border-left:3px solid #111;padding-left:12px}.album-review .check-line{margin:20px 0}.album-review [data-confirm-album]{width:100%}
.pdf-reader{display:grid;gap:12px}.pdf-reader-toolbar{position:sticky;top:0;z-index:2;display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:10px;background:#111;color:#fff;border-radius:10px}.pdf-reader-toolbar button,.pdf-reader-toolbar a{min-height:40px;padding:8px 12px;background:#fff;color:#111;border:1px solid #aaa;border-radius:6px;text-decoration:none}.pdf-reader-toolbar span{margin-right:auto;font-size:.9rem}.pdf-reader-pages{display:grid;justify-items:center;gap:18px;padding:12px;background:#e8e8e8;overflow:auto}.pdf-page{width:min(100%,900px);min-height:180px;display:grid;place-items:center;background:#fff;box-shadow:0 2px 8px #0002;color:#666}.pdf-page canvas{display:block;max-width:100%;height:auto}@media(max-width:620px){.pdf-reader-toolbar{position:static}.pdf-reader-toolbar span{width:100%;order:-1}.pdf-reader-pages{padding:6px}.pdf-page{min-height:120px}}
/* Photo gallery 4.0.26 */
.brand img{width:clamp(190px,36vw,400px);height:auto;max-width:100%;object-fit:contain;filter:invert(1)}
.photo-card{position:relative;overflow:hidden}.photo-card .photo-filename{display:block;background:#fff;color:#222;padding:8px;font-size:12px;line-height:1.35;text-align:left;overflow-wrap:anywhere}.photo-card img{height:auto;aspect-ratio:3/2;object-fit:cover}.photo-card>span{font-size:22px}
.photo-modal[open]{width:100vw;max-width:100vw;max-height:100dvh;margin:0;border:0;border-radius:0}.photo-stage{position:relative;overflow:hidden;touch-action:none;display:flex;align-items:center;justify-content:center}.photo-modal .photo-stage img{width:100%;height:100%;object-fit:contain;transform-origin:center;user-select:none;-webkit-user-select:none;pointer-events:auto}.zoom-controls{display:flex;gap:4px;align-items:center}.zoom-controls button{min-width:40px}.preview-download{display:flex;align-items:center;justify-content:center;gap:8px;flex-wrap:wrap;margin-top:8px}.preview-download button,.preview-download a{font-size:13px;padding:9px 12px;min-height:44px;border:1px solid #777;border-radius:9px;color:#fff;background:#232323;text-decoration:none}.preview-download p{flex-basis:100%;font-size:12px;line-height:1.35;margin:0;color:#ddd}.preview-download p:empty{display:none}.photo-modal .save-status:empty{display:none}.photo-modal .photo-actions{max-height:44dvh;overflow-y:auto}.photo-stage{min-height:80px}@media(max-width:420px){.photo-navigation{grid-template-columns:1fr auto 1fr}.photo-navigation button{font-size:12px;padding:8px 5px}.zoom-controls{gap:2px}.zoom-controls button{min-width:32px}.brand{gap:8px}}
.gallery-grid{gap:12px;align-items:start}.photo-card{aspect-ratio:auto;align-self:start}.photo-card img{aspect-ratio:auto;object-fit:contain}.photo-card .photo-filename{min-height:46px}@media(min-width:1000px){.gallery-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
.gallery-photo{min-width:0;background:#fff;border-radius:9px;overflow:hidden}.gallery-photo .photo-card{display:block;width:100%;border:0;border-radius:0;min-height:0}.gallery-caption{display:flex;align-items:center;gap:3px;padding:6px}.gallery-caption small{flex:1;min-width:0;font-size:12px;overflow-wrap:anywhere;color:#333}.gallery-caption button{flex-shrink:0;width:38px;min-height:44px;border:0;border-radius:8px;background:transparent;color:#111;font-size:23px;padding:4px}.gallery-caption button[aria-pressed=true]{background:#f0eeee}.gallery-caption button:focus-visible{outline-offset:-3px}

.confirm-dock{gap:8px;flex-wrap:wrap}.confirm-dock button{width:auto;flex:1 1 260px;max-width:420px;font-size:14px;padding:12px}.confirm-dock .secondary{background:#fff;color:#111;border:1px solid #111}@media(max-width:620px){.confirm-dock{display:grid;grid-template-columns:1fr;padding-top:10px;gap:6px}.confirm-dock button{width:100%;max-width:none;min-height:44px}main{padding-bottom:190px}}

/* Append after existing PDF reader rules. Zoomed pages scroll inside the reader. */
.pdf-reader{min-width:0;max-width:100%}
.pdf-reader-pages{display:flex;flex-direction:column;align-items:flex-start;min-width:0;max-width:100%;width:100%;box-sizing:border-box}
.pdf-page{flex:none;max-width:none;margin-inline:auto}
.pdf-page canvas{display:block;max-width:100%;height:auto}

.wedding-video-player{display:block;width:100%;aspect-ratio:16/9;min-height:200px;border:0;border-radius:12px;background:#000;margin:16px 0}.video-link{margin:8px 12px 8px 0}

.photo-search{margin:24px 0 12px}.photo-search label{display:block;font-weight:600;margin-bottom:10px}.photo-search>div{display:flex;gap:10px;flex-wrap:wrap}.photo-search input{flex:1;min-width:160px;font-size:16px;padding:12px;border:1px solid #bbb;border-radius:10px}.photo-search button{min-height:46px}#photoSearchSummary:empty{display:none}
