.sam-booklet{--sam-booklet-accent:#242122;--sam-booklet-panel-opacity:.85;--sam-booklet-background:none;box-sizing:border-box;width:min(440px,100%);aspect-ratio:440/560;margin:0 auto;padding:7px;color:var(--sam-booklet-text,#000);font-family:inherit;background:transparent;overflow:hidden}
.sam-booklet *{box-sizing:border-box}.sam-booklet__viewport{display:flex;width:100%;height:100%;min-height:0;padding:33px;background:var(--sam-booklet-background-color,#eee);overflow:hidden;border-radius:16px}
.sam-booklet__panel{display:flex;flex-direction:column;width:100%;height:100%;min-height:0;padding:20px;background:var(--sam-booklet-panel-color,rgba(255,255,255,.85));isolation:isolate}
.sam-booklet__page{display:flex;flex:1 1 auto;flex-direction:column;min-width:0;min-height:0;overflow:hidden}.sam-booklet__page[hidden]{display:none!important}
.sam-booklet__copy{flex:1 1 auto;min-height:0;overflow-x:hidden;overflow-y:auto;padding:0;overscroll-behavior:contain;scrollbar-gutter:stable}.sam-booklet__copy h2{margin:0 0 14px;font-size:20px;line-height:1.25}.sam-booklet__content{font-size:14px;line-height:1.45;overflow-wrap:anywhere}.sam-booklet__content>:first-child{margin-top:0}.sam-booklet__content>:last-child{margin-bottom:0}
.sam-booklet__content iframe,.sam-booklet__content video,.sam-booklet__content .wp-video,.sam-booklet__content .wp-video-shortcode,.sam-booklet__content .wp-block-embed,.sam-booklet__content .wp-block-embed__wrapper{display:block;width:100%!important;max-width:100%!important}.sam-booklet__content iframe,.sam-booklet__content video{height:auto!important;aspect-ratio:16/9;border:0}.sam-booklet__content .wp-block-embed__wrapper{position:relative;overflow:hidden;aspect-ratio:16/9}.sam-booklet__content .wp-block-embed__wrapper iframe{position:absolute;inset:0;width:100%!important;height:100%!important}.sam-booklet__content .wp-video{margin-left:0;margin-right:0}
.sam-booklet__jump{display:inline;color:var(--sam-booklet-text,var(--sam-booklet-accent));font:inherit;font-weight:600;line-height:inherit;text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:3px;cursor:pointer}.sam-booklet__jump:hover{text-decoration-thickness:2px}.sam-booklet__jump:focus-visible{border-radius:2px;outline:3px solid rgba(0,0,0,.2);outline-offset:2px}
.sam-booklet__nav{position:relative;display:flex;flex:0 0 54px;justify-content:flex-start;align-items:flex-end;gap:12px;padding-top:12px;border-top:1px dashed #aaa;background:transparent}.sam-booklet__nav button{display:block;width:30px;height:30px;padding:0;border:0;border-radius:50%;background:transparent;cursor:pointer}.sam-booklet__nav button img{display:block;width:30px;height:30px}.sam-booklet__nav button:hover{filter:brightness(.8)}.sam-booklet__nav button:focus-visible{outline:3px solid rgba(0,0,0,.25);outline-offset:2px}.sam-booklet__nav span{min-width:36px;align-self:flex-end;text-align:center;font-size:14px;line-height:30px}.sam-booklet__title{position:absolute;right:20px;bottom:20px;max-width:45%;overflow:hidden;text-align:right;text-overflow:ellipsis;white-space:nowrap;font-size:16px;line-height:30px}.sam-booklet__panel{position:relative}
@media(max-width:440px){.sam-booklet__viewport{padding:33px}.sam-booklet__panel{padding:20px}}
@media(prefers-reduced-motion:no-preference){.sam-booklet__page:not([hidden]){animation:sam-booklet-in .22s ease-out}@keyframes sam-booklet-in{from{opacity:.25;transform:translateX(10px)}to{opacity:1;transform:none}}}

/* Reform landscape: use the Magic Card orientation class and fit a square stage. */
.sammc-orient-landscape .sam-booklet{aspect-ratio:1/1}

/* Break layout: 660 x 540 panel over a full-width background. */
.sambr-panel.sambr-panel--booklet{padding-top:0!important;padding-bottom:0!important}
[data-sam-tap-layout="break"] .sam-booklet{width:var(--sam-tap-width,100%);min-height:var(--sam-tap-min-height,640px);height:var(--sam-tap-height,auto);aspect-ratio:auto;margin:0;padding:0;overflow:var(--sam-tap-overflow,visible)}
[data-sam-tap-layout="break"] .sam-booklet__viewport{height:auto;min-height:var(--sam-tap-min-height,640px);padding:40px max(20px,calc((100% - 660px)/2));overflow:visible;border-radius:0}
[data-sam-tap-layout="break"] .sam-booklet__panel{width:min(660px,100%);height:540px;margin:auto;padding:20px}
[data-sam-tap-layout="break"] .sam-booklet__page{overflow:hidden}
[data-sam-tap-layout="break"] .sam-booklet__copy{overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable}
[data-sam-tap-layout="break"] .sam-booklet__nav button{appearance:none!important;-webkit-appearance:none!important;display:block!important;min-width:0!important;max-width:30px!important;width:30px!important;min-height:0!important;max-height:30px!important;height:30px!important;margin:0!important;padding:0!important;border:0!important;border-radius:50%!important;background:transparent!important;background-image:none!important;box-shadow:none!important;outline-offset:2px;color:transparent!important;line-height:0!important}
[data-sam-tap-layout="break"] .sam-booklet__nav button::before,[data-sam-tap-layout="break"] .sam-booklet__nav button::after{display:none!important;content:none!important}
[data-sam-tap-layout="break"] .sam-booklet__nav button img{display:block!important;width:30px!important;height:30px!important;margin:0!important;padding:0!important;border:0!important;border-radius:50%!important;background:transparent!important;box-shadow:none!important}
@media(max-width:700px){[data-sam-tap-layout="break"] .sam-booklet__viewport{padding:20px}[data-sam-tap-layout="break"] .sam-booklet__panel{height:min(540px,calc(100vh - 40px))}}

@media(max-width:720px){.sam-booklet__title{display:none}}

/* Keep authored emphasis visible even when the host theme resets bold text. */
.sam-booklet__content{font-weight:400}
.sam-booklet__content strong,.sam-booklet__content b{font-weight:700!important}

/* Independent panel image layer: opacity never fades authored content. */
.sam-booklet__panel::before{content:"";position:absolute;inset:0;z-index:-1;pointer-events:none;background-image:var(--sam-booklet-background);background-position:center;background-size:cover;background-repeat:no-repeat;opacity:var(--sam-booklet-image-opacity,1)}
.sam-booklet__nav-icon{display:block!important;width:30px!important;height:30px!important;min-width:30px!important;background:var(--sam-booklet-text,#000);mask:var(--sam-booklet-icon) center/contain no-repeat;-webkit-mask:var(--sam-booklet-icon) center/contain no-repeat}
.sam-booklet__copy h2,.sam-booklet__title,.sam-booklet__nav{color:inherit}

/* Match the selected text color for links while leaving host hover rules intact. */
.sam-booklet .sam-booklet__content a:not(:hover){color:var(--sam-booklet-text,#000)!important}

/* Fill the host card, including its lower area, with a 7px outer inset. */
.sammc-yap-inner .sam-booklet{height:100%;aspect-ratio:auto;padding-bottom:7px}

/* Keep the panel above the host lower navigation strip without disabling it. */
.sammc-yap-inner .sam-booklet__viewport{align-items:flex-start}
.sammc-yap-inner .sam-booklet__panel{width:min(340px,100%);height:min(486px,calc(100% - 70px));margin:0 auto}
