/* The shelf wall belongs to the Photo route; the reader and other routes keep their existing controls. */
.byob-page:has([data-panel=photo]:not([hidden])){background:#29081e;color:#fff3df}
.byob-page:has([data-panel=photo]:not([hidden])) .by-station-title{display:none}
.byob-page .byob:has([data-panel=photo]:not([hidden])){max-width:none;padding:0 0 5rem}
.byob:has([data-panel=photo]:not([hidden])) .by-modes{max-width:42rem;margin:auto;padding:.65rem 1rem;border-color:#755063}
.byob:has([data-panel=photo]:not([hidden])) .by-modes button{color:#cda9bc}
.byob:has([data-panel=photo]:not([hidden])) .by-modes button[aria-pressed=true]{color:#fff3df;border-color:#ff79a7}
.byob:has([data-panel=photo]:not([hidden])) .by-cabinet-tools{margin:0 auto;max-width:44rem;padding:0 1rem}
.byob:has([data-panel=photo]:not([hidden])) .by-cabinet-tools :is(button,a){color:#efd3df}
.byob:has([data-panel=photo]:not([hidden])) .by-cabinet-tools:has([hidden]):not(:has(:not([hidden]))){display:none}
.byob .by-shelf-wall{position:relative;isolation:isolate;display:flex;flex-direction:column;align-items:center;gap:1rem;width:100%;max-width:none;min-height:680px;margin:0;padding:2rem 1rem 1.5rem;text-align:center;overflow:hidden;background:#29081e}
/* Flat independent prints: image proportions never depend on stage height. */
.by-edge-gallery{position:absolute;inset:0;z-index:-1;pointer-events:none;max-width:1440px;margin:auto}
.by-edge-photo{position:absolute;width:clamp(170px,22vw,285px);margin:0;padding:10px 10px 0;background:#fff3df;color:#351326;box-shadow:0 8px 18px #10000c55}
.by-edge-photo img{display:block;width:100%;height:auto;aspect-ratio:1;object-fit:cover}
.by-edge-photo figcaption{padding:12px 2px 14px;font-size:14px;line-height:1.2;font-weight:500}
.by-edge-photo::before{content:'';position:absolute;width:60px;height:17px;background:#cd6b8cd9;top:-9px;left:calc(50% - 30px)}
.by-edge-kitchen{top:64px;left:3%;transform:rotate(-2deg)}
.by-edge-cabinet{top:64px;right:3%;transform:rotate(2deg)}
.by-edge-garden{bottom:26px;left:4%;transform:rotate(1deg)}
.by-edge-builtin{bottom:26px;right:4%;transform:rotate(-1deg)}
.by-shelf-wall .by-camera-copy{width:min(46%,34rem);text-align:center;margin:0}
.by-shelf-wall .by-camera-copy h2{font-size:clamp(2.6rem,4.6vw,4.4rem);line-height:.99;letter-spacing:-.045em;color:#fff3df;margin:0 0 .9rem}
.by-shelf-wall .by-camera-copy h2 em{color:#ff9bb9;font-weight:400}
.by-shelf-wall .by-camera-copy p{font-size:1rem;color:#dec2ce;margin:0}
.byob .by-shelf-wall .by-add-polaroid{display:flex;flex-direction:column;position:relative;grid-column:auto;grid-row:auto;width:250px;height:270px;min-height:0;max-height:none;padding:12px 12px 0;margin:.6rem 0;border:0;border-radius:0;background:#fff3df;color:#351326;box-shadow:0 15px 24px #0b00165c;transform:none;cursor:pointer;transition:transform .2s}
.byob .by-add-polaroid:hover,.byob .by-add-polaroid:focus-visible{transform:rotate(0) translateY(-3px);outline:3px solid #d5ff25;outline-offset:5px}
.by-add-polaroid::before{content:'';position:absolute;top:-11px;left:34%;width:32%;height:23px;background:#da6689de;transform:rotate(4deg)}
.by-empty-photo{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.75rem;width:100%;height:214px;background:#ecdfd0}
.by-empty-photo svg{width:44px;height:44px;stroke-width:1.2}
.by-empty-photo strong{font-size:1.35rem;line-height:1.15}
.by-empty-photo small{font-size:.82rem;font-weight:400}
.by-polaroid-caption{font-size:.8rem;line-height:1.2;font-weight:500;margin:auto;padding:.5rem 0}
.byob .by-shelf-wall[data-scan] .by-glass-frame{height:270px}
.by-shelf-wall[data-scan] .by-empty-photo{display:none}
.byob .by-shelf-wall #by-camera-preview{width:100%;height:214px;object-fit:contain;background:#ecdfd0}
.byob .by-shelf-wall #by-lens-caption{text-align:center;color:#fff3df;margin:0;min-height:0}
.by-shelf-wall #by-lens-caption:empty{display:none}
.by-shelf-wall #by-lens-caption small{color:#d6b3c4}
.by-shelf-process{display:flex;align-items:center;gap:.6rem;color:#e4bfd0;font-size:.85rem}
.by-shelf-process i{width:20px;height:1px;background:#855569}
.byob .by-shelf-wall .by-photo-actions{display:flex;align-self:center;justify-content:center;gap:.65rem;margin:.2rem 0 0;width:auto}
.byob .by-shelf-wall #by-open-camera,.byob .by-shelf-wall .by-photo-actions label{border-radius:3px;padding:.9rem 1.15rem;min-height:48px;font-size:1rem;font-weight:700;display:flex;align-items:center;justify-content:center;gap:.5rem}
.byob .by-shelf-wall #by-open-camera{background:#d5ff25;color:#2a0920;border:1px solid #d5ff25}
.byob .by-shelf-wall .by-photo-actions label{border:1px solid #b1889a;background:#29081e;color:#fff3df}
.byob .by-shelf-wall .by-photo-private{margin:0;color:#cda9bc;font-size:.85rem;line-height:1.6}
.by-example-note{color:#b795a7;font-size:.7rem}
.byob:has([data-panel=photo]:not([hidden])) :is(#by-photo-matches,#by-review,#by-results,#by-save-panel,#by-feedback,#by-scan-status,#by-cloud-photo,#by-cloud-privacy){background:#f7f0e5;color:#351326;max-width:1100px;margin:0 auto;padding:1.25rem clamp(1rem,4vw,3rem)}
.byob #by-feedback:empty{display:none}
.byob dialog{color:#351326;background:#fff3e8;border:0;max-height:85svh;overflow:auto;width:min(90vw,540px);padding:1.5rem}
.byob dialog::backdrop{background:#180515b8;backdrop-filter:blur(4px)}
.byob dialog h2{font-size:2rem;margin:.5rem 0 1rem}
.byob dialog p{line-height:1.5}
.byob dialog button{min-height:44px;margin:.3rem;padding:.7rem 1rem}
.byob .by-dialog-close{display:block;margin-left:auto;background:none;color:#351326;text-decoration:underline;padding:.3rem}
#by-share-bottles{display:grid;grid-template-columns:repeat(3,1fr);gap:.75rem}
#by-share-bottles figure{margin:0;font-size:.8rem}
#by-share-bottles img{width:100%;height:100px;object-fit:contain}
.byob .by-share-photo-toggle{display:flex;align-items:center;gap:.5rem;margin:1rem 0;font-weight:600}
.byob .by-share-small{font-size:.85rem;color:#795568}
.by-shared-intro{max-width:1100px;margin:auto;padding:2rem 1rem;background:#fff3e8;color:#351326}
.by-shared-intro h1{font-size:clamp(2rem,5vw,4rem)}
.by-shared-bottles{display:flex;gap:1rem;overflow:auto;margin:1rem 0}
.by-shared-bottles figure{flex:0 0 145px;margin:0;font-size:.9rem}
.by-shared-bottles img{width:145px;height:180px;object-fit:contain}
.by-shared-intro button{background:#351326;color:#fff3e8;padding:.9rem 1.3rem}
@media(max-width:700px){
 /* Mobile prints form a complete gallery, never cropped edge decorations. */
 .byob .by-shelf-wall{min-height:0;padding:1.2rem 1rem 1.5rem;gap:.85rem}
 .by-edge-gallery{position:relative;inset:auto;z-index:auto;order:10;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1.5rem 1rem;width:100%;max-width:480px;margin:0;padding:.6rem .15rem 1rem;pointer-events:auto}
 .by-edge-gallery .by-edge-photo{position:relative;inset:auto;width:100%;min-width:0;box-sizing:border-box;padding:7px 7px 0;opacity:1;transform:none}
 .by-edge-photo figcaption{font-size:12px;line-height:1.35;padding:10px 0 12px;min-height:2.7em;display:flex;align-items:center;justify-content:center}
 .by-edge-photo::before{width:44px;height:14px;top:-7px;left:calc(50% - 22px)}
 .by-example-note{order:9;margin-top:1rem;font-size:.8rem}
 .by-shelf-wall .by-camera-copy{width:95%;max-width:95%;padding:0 .3rem}
 .by-shelf-wall .by-camera-copy h2{font-size:2.8rem}
 .by-shelf-wall .by-camera-copy p{font-size:.9rem}
 .byob .by-shelf-wall .by-add-polaroid{width:205px;height:239px;margin:1rem 0 .5rem}
 .by-empty-photo,.byob .by-shelf-wall #by-camera-preview{height:185px}
 .byob .by-shelf-wall[data-scan] .by-glass-frame{height:239px}
 .by-empty-photo strong{font-size:1.2rem}
 .by-empty-photo small,.by-polaroid-caption{font-size:.72rem}
 .byob .by-shelf-wall .by-photo-actions{gap:.5rem;width:100%;max-width:360px}
 .byob .by-shelf-wall #by-open-camera,.byob .by-shelf-wall .by-photo-actions label{font-size:.9rem;padding:.85rem .65rem}
 .byob .by-shelf-wall .by-photo-private{font-size:.8rem}
}
@media(prefers-reduced-motion:reduce){.byob .by-add-polaroid{transition:none}}

@media(min-width:701px) and (max-width:1000px){.by-edge-photo{width:20vw;padding:7px 7px 0}.by-edge-photo figcaption{font-size:12px}.by-edge-kitchen,.by-edge-cabinet{top:125px}.by-edge-garden,.by-edge-builtin{bottom:70px}.by-edge-kitchen,.by-edge-garden{left:1%}.by-edge-cabinet,.by-edge-builtin{right:1%}}
