/* iPhone keeps its own catalogue and artwork; only the book presentation is shared. */
.iphone-volume.pt-preview #reader#reader :is(.whatsapp-note,.table-caption>span,.reader-tip,.chapter-content #part-description,.workbench-wordmark,.enquiry-label,.page-running,.page-bottom,#chapter-kicker) {display:none!important}
.iphone-volume.pt-preview #reader#reader :is(.chapter-content,.art-area) {direction:inherit}
.iphone-volume.pt-preview #reader#reader #part-art,
.iphone-volume.pt-preview #reader#reader #part-art .part-photo-frame {padding:0;background:none!important;border:0!important;box-shadow:none!important;mix-blend-mode:multiply}
.iphone-volume.pt-preview #reader#reader #part-art img {background:transparent!important;box-shadow:none!important;object-fit:contain;mix-blend-mode:multiply}
.iphone-volume.pt-preview #reader#reader #part-title {min-height:0;height:auto;overflow-wrap:anywhere}
@media(min-width:801px) {
 .iphone-volume.pt-preview #reader#reader .open-book .photo-caption {display:none}
 .iphone-volume.pt-preview #reader#reader .open-book>.page {overflow:visible}
 .iphone-volume.pt-preview #reader#reader .open-book .page-left .part-photo-frame {width:100%;height:100%;max-height:100%}
 .iphone-volume.pt-preview #reader#reader .open-book .page-left .part-photo-frame img {width:100%;max-height:100%}
}

/* The series controls stay visible above the one active book. */
.iphone-volume #room,.iphone-volume .pt-reference-cover-hit {display:none!important}
.iphone-volume #iphone-picker {box-sizing:border-box;width:min(1120px,94vw);margin:14px auto 5px;padding:0 2px;scroll-margin:8px}
.iphone-volume #iphone-picker h1 {margin:0 0 9px;color:#263741;font:750 clamp(20px,2.1vw,28px)/1.15 system-ui,sans-serif}
.iphone-volume #iphone-series {display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:7px}
.iphone-volume #iphone-series button,.iphone-volume #iphone-models button {box-sizing:border-box;min-width:0;min-height:43px;padding:6px 8px;border:1px solid color-mix(in srgb,var(--series-ink),white 56%);border-radius:7px;font:650 clamp(11px,1.05vw,14px)/1.24 system-ui,sans-serif;cursor:pointer;color:#263741;background:color-mix(in srgb,var(--series-ink) 10%,#fff9ed);white-space:normal}
.iphone-volume #iphone-series button[aria-pressed="true"],.iphone-volume #iphone-models button[aria-pressed="true"] {color:#fff;background:var(--series-ink);border-color:var(--series-ink)}
.iphone-volume #iphone-models {display:flex;gap:7px;flex-wrap:wrap;margin-top:8px;padding:7px 0 4px;border-top:1px solid color-mix(in srgb,var(--series-ink),white 65%)}
.iphone-volume #iphone-models button {min-height:40px;padding-inline:13px;direction:ltr}
.iphone-volume #iphone-models button:not([aria-pressed="true"]) {color:var(--series-ink);background:color-mix(in srgb,var(--series-ink) 16%,white);border-color:color-mix(in srgb,var(--series-ink) 50%,white)}
.iphone-volume #iphone-picker button:focus-visible {outline:3px solid #245b83;outline-offset:2px}
@media(max-width:750px){.iphone-volume #iphone-series {grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:390px){.iphone-volume #iphone-series {grid-template-columns:repeat(2,minmax(0,1fr))}}

/* The surrounding page measures the iframe. Do not let the reader size
   itself to that same iframe height or the frame grows on each measurement. */
html.phonetek-inline-reader .iphone-volume.pt-preview #reader#reader {min-height:0}

.iphone-volume #reader#reader .iphone-page-nav-top {
 width:min(390px,94vw);max-width:none;margin:2px auto 5px;padding:4px 0;
 display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;
}
.iphone-volume #reader#reader .iphone-page-nav-top .page-turn {
 min-height:44px;min-width:0;padding:7px 12px;font:700 14px/1.25 system-ui,sans-serif;
 color:#27362f;background:#fff8e7;border:1px solid #9a8058;border-radius:8px;
}
.iphone-volume #reader#reader .iphone-page-nav-top .page-turn:not(:disabled):hover {
 background:#ffecb4;border-color:#6f542b;
}

@media(min-width:801px) {
 .iphone-volume.pt-preview #reader#reader .table-surface {
  width:min(1250px,96vw,var(--iphone-scene-inline-max,var(--iphone-scene-window-max,calc((100dvh - 255px)*4/3))));
  aspect-ratio:4/3;container-type:inline-size;
 }
 .iphone-volume.pt-preview #reader#reader .pt-standing-model {font-size:clamp(8px,2.05cqw,24px)}
 .iphone-volume.pt-preview #reader#reader .open-book>.page {padding-inline:clamp(4px,2.3cqw,29px)!important}
 .iphone-volume.pt-preview #reader#reader .open-book #bound-edition {font-size:clamp(8px,1.55cqw,15px);margin-bottom:clamp(3px,1.0cqw,14px)}
 .iphone-volume.pt-preview #reader#reader .open-book #part-title {font-size:clamp(15px,4.05cqw,54px)!important;margin-bottom:clamp(3px,1cqw,16px);overflow-wrap:anywhere}
 .iphone-volume.pt-preview #reader#reader .open-book #part-title::after {margin-top:clamp(3px,.9cqw,13px)}
 .iphone-volume.pt-preview #reader#reader .open-book #price-enquiry {gap:clamp(3px,.8cqw,7px);max-width:92%}
 .iphone-volume.pt-preview #reader#reader .open-book #price-enquiry :is(.whatsapp-cta,.call-shop) {
  min-height:clamp(24px,4.8cqw,46px)!important;height:auto!important;
  font-size:clamp(9px,1.51cqw,14px);padding:3px 4px;gap:4px;
 }
}

.iphone-volume .iphone-picker-heading {display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:8px}
.iphone-volume #iphone-picker .iphone-picker-heading h1 {margin:0}
.iphone-volume #iphone-return-home {
 flex:none;display:inline-flex;align-items:center;justify-content:center;min-height:40px;padding:5px 12px;
 border:1px solid #8f6a38;border-radius:8px;color:#27362f;background:#fff8e7;
 font:700 14px/1.25 system-ui,sans-serif;text-decoration:none;
}
.iphone-volume #iphone-return-home:hover {background:#ffecb4}
.iphone-volume #iphone-return-home:focus-visible {outline:3px solid #245b83;outline-offset:2px}

/* Fit compact, short and unfolded touch viewports without device sniffing. */
.iphone-volume #reader#reader .reader-head {flex-wrap:wrap;gap:6px 10px}
.iphone-volume #reader#reader .reader-head :is(button,select) {max-inline-size:100%;white-space:normal}
.iphone-volume #reader#reader .open-book>.page,
.iphone-volume #reader#reader :is(.chapter-content,#price-enquiry) {min-inline-size:0}
.iphone-volume #reader#reader .open-book :is(#bound-edition,#part-title,.whatsapp-cta,.call-shop) {overflow-wrap:anywhere}
.iphone-volume #reader#reader .open-book :is(.whatsapp-cta,.call-shop) {flex-wrap:wrap}
@media(max-width:430px){
 .iphone-volume #reader#reader .reader-head {padding:6px 10px;min-height:0}
 .iphone-volume #reader#reader .reader-head .locale-picker {margin-inline-start:auto}
 .iphone-volume #iphone-models button {padding-inline:9px}
 .iphone-volume #iphone-return-home {padding-inline:8px}
}
@media(max-width:1099px){
 html.phonetek-inline-reader .iphone-volume :is(#contents-dialog,#about-dialog)[open] {
  position:fixed;inset:var(--reader-dialog-top,10px) 0 auto;margin:0 auto;
  width:min(720px,calc(100% - 20px));max-width:none;max-height:var(--reader-dialog-max,calc(100dvh - 20px));
  overflow-y:auto;overscroll-behavior:contain;
 }
}
@media(max-width:1099px) and (orientation:landscape) and (max-height:650px){
 html:not(.phonetek-inline-reader) .iphone-volume #reader#reader .reader-head {padding-block:5px;min-height:48px}
}
html.phonetek-inline-reader[data-reader-compact=true] .iphone-volume #reader#reader .reader-head {padding-block:5px;min-height:48px}
html.phonetek-inline-reader[data-reader-compact=true] .iphone-volume #iphone-picker {margin-top:6px}
html.phonetek-inline-reader[data-reader-compact=true] .iphone-volume #reader#reader .table-caption {padding-block:0}

@media(max-width:800px){
 /* The decorative binding and the expanded drag hit zones may extend a few
    pixels; don't turn those edges into a second horizontal scroll surface. */
 body.iphone-volume {overflow-x:clip}
 .iphone-volume #reader#reader .drag-corner-area {inset-inline:-4px}
 .iphone-volume #reader#reader .page-nav {width:min(100%,430px)}
}
@media(max-width:800px){
 html:has(body.iphone-volume) {overflow-x:clip}
}
