.choice-trigger{display:flex;align-items:center;gap:12px;width:100%;min-height:58px;padding:10px 12px;border:1px solid #cbd3e1;border-radius:12px;background:#fff;color:#182643;text-align:left;font:inherit;cursor:pointer;box-shadow:0 2px 5px #18264306;min-width:0}
.choice-trigger:hover{border-color:#4162cf}.choice-trigger:focus-visible,.choice-option:focus-visible,.choice-close:focus-visible{outline:3px solid #7d9bf1;outline-offset:3px}
.choice-trigger:disabled{opacity:.55;cursor:wait}.choice-image{width:54px;height:54px;object-fit:contain;flex:0 0 54px;border-radius:8px;background:#f5f6f8}
.choice-words{flex:1;min-width:0;display:flex;flex-direction:column;gap:4px}.choice-name{font-weight:600;line-height:1.35;overflow-wrap:anywhere}.choice-meta{font-size:12px;color:#69768d;line-height:1.4}.choice-chevron{font-size:22px;color:#53627c;flex-shrink:0}
.choice-dialog{width:min(620px,calc(100vw - 32px));max-width:none;max-height:85dvh;padding:24px;border:1px solid #e2e7ef;border-radius:20px;box-shadow:0 24px 90px #14254740;overflow:hidden;color:#182643;background:#fff}
.choice-dialog[open]{display:flex;flex-direction:column;gap:16px}.choice-dialog::backdrop{background:#18264366;backdrop-filter:blur(3px)}
.choice-heading{display:flex;align-items:center;gap:16px;flex-shrink:0}.choice-heading h2{font-size:21px;line-height:1.3;margin:0;flex:1}.choice-close{width:44px;height:44px;flex:0 0 44px;border:0;border-radius:50%;background:#f0f3f8;font-size:27px;color:#4d5c75;cursor:pointer}
.choice-search{width:100%;box-sizing:border-box;min-height:46px;font:inherit;border:1px solid #cbd3e1;border-radius:10px;padding:10px 14px;flex-shrink:0}
.choice-list{display:flex;flex-direction:column;gap:8px;overflow:auto;overscroll-behavior:contain;min-height:0;padding:4px;scrollbar-gutter:stable}
.choice-option{display:flex;align-items:center;gap:12px;width:100%;min-height:72px;border:1px solid #e0e6ef;border-radius:12px;padding:12px;background:#fff;text-align:left;color:inherit;font:inherit;flex-shrink:0;cursor:pointer}
.choice-option:hover{background:#f7f9ff;border-color:#9cafed}.choice-option[aria-pressed="true"]{background:#eef3ff;border-color:#365bc6;box-shadow:inset 0 0 0 1px #365bc6}.choice-check{width:16px;flex:0 0 16px;color:#3154c5;font-weight:700}.choice-price{font-size:13px;font-weight:600;white-space:nowrap}.choice-empty{padding:20px;text-align:center;color:#69768d}
.colour-swatch{width:24px;height:24px;border-radius:50%;border:1px solid #18264335;box-shadow:inset 0 0 0 2px #ffffff70;flex:0 0 24px}.colour-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.colour-list .choice-option{min-height:54px;padding:10px;gap:9px}.colour-list .choice-name{font-size:14px}.colour-dialog{max-width:520px}
@media(max-width:600px){.choice-dialog{width:100%;max-width:100%;max-height:88dvh;margin:auto 0 0;padding:18px 14px max(18px,env(safe-area-inset-bottom));border-radius:22px 22px 0 0;box-sizing:border-box}.choice-dialog[open]{gap:12px}.choice-heading h2{font-size:20px}.choice-option{gap:9px;padding:10px}.choice-image{width:46px;height:46px;flex-basis:46px}.choice-option .choice-name{font-size:14px}.choice-price{font-size:12px}.choice-list{scrollbar-gutter:auto}.choice-trigger .choice-name{font-size:15px}}
.choice-dialog .choice-image{margin:0;box-shadow:none}
/* The original Tegelstudio visual language, sized for a book page. */
.choice-dialog,.studio-review{font:15px/1.45 Arial,sans-serif;box-sizing:border-box;color:#192342}.choice-dialog *, .studio-review *{box-sizing:border-box}.choice-dialog [hidden],.studio-editor [hidden]{display:none!important}
.studio-editor{inset:4.5% 7% 7%;color:#192342;font-size:clamp(12px,calc(var(--page-w)*.027),15px);padding:0 4px 12px}.studio-editor h2{font:700 clamp(20px,calc(var(--page-w)*.05),28px)/1.15 Arial,sans-serif;letter-spacing:-.5px}.studio-editor .editor-personal{color:#69768d;font:inherit;font-size:.86em;line-height:1.5}.studio-editor button{border:1px solid #d8dfec;border-radius:8px;background:white;padding:10px 12px;color:#27395e;font-size:.9em;min-height:40px}.studio-editor input:not([type=file]),.studio-editor textarea,.studio-editor select{background:white;border:1px solid #d9dfeb;border-radius:8px;padding:10px;color:#192342;font-size:14px;min-height:42px}.studio-editor input[type=color]{padding:3px;min-height:38px}.studio-editor textarea{min-height:90px;resize:vertical}.studio-editor label{font-size:.88em;color:#40516e}.studio-editor .choice-trigger{padding:9px;min-height:58px;font-size:1em;text-align:left}.studio-editor .choice-image{width:42px;height:42px;flex-basis:42px}.studio-editor .choice-meta{font-size:11px}.studio-editor .catalog-options{border:0;padding:0;margin:12px 0}.studio-editor .catalog-options [data-edit=quantity]{max-width:120px}.studio-editor .editor-tip{font-size:.8em;line-height:1.5;color:#69768d}.studio-editor .studio-tabs{display:flex;background:#f1f3f8;padding:4px;border-radius:9px;margin:18px 0 14px;gap:3px}.studio-tabs button{flex:1;background:transparent;border:0;min-height:40px;padding:8px 4px}.studio-tabs button[aria-pressed=true]{background:white;color:#2447c3;box-shadow:0 2px 5px #17284a14;font-weight:700}.studio-editor .studio-upload{border:1.5px dashed #aebddd;background:#f8faff;border-radius:10px;min-height:125px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;text-align:center;padding:12px;cursor:pointer}.studio-upload .upload-symbol{font-size:27px;color:#4564cb}.studio-upload .upload-note{font-size:11px;color:#738199}.studio-editor .layer-list{display:flex;gap:7px;margin:12px 0;flex-wrap:wrap}.studio-editor .layer-list button{display:flex;gap:7px;align-items:center;padding:5px 8px;max-width:100%;overflow-wrap:anywhere}.studio-layer-thumb{width:34px;height:34px;border-radius:5px;object-fit:cover}.studio-editor .layer-list [aria-pressed=true]{outline:0;border-color:#365bc6;background:#eef3ff;box-shadow:inset 0 0 0 1px #365bc6}.studio-details{border-top:1px solid #e1e6ef;padding:13px 0;margin-top:10px}.studio-details>summary{color:#52627d;font-size:.87em;cursor:pointer;min-height:30px}.studio-order{border-top:1px solid #e1e6ef;margin:16px 0 4px;padding-top:12px}.studio-order .draft-price{font-size:1em;color:#2948bd;line-height:1.5}.studio-editor [data-show-preview],.studio-primary{width:100%;background:#2b49c7;color:white;border:0;border-radius:9px;padding:14px;font-weight:bold}.studio-editor [data-show-preview]:hover,.studio-primary:hover{background:#213ba8}.studio-review{width:min(92vw,580px);max-width:580px;max-height:90dvh;overflow:auto;border:1px solid #e2e6ef;border-radius:18px;padding:24px;background:#fff;box-shadow:0 20px 80px #15234033}.studio-review::backdrop{background:transparent}.studio-review-picture{display:flex;align-items:center;justify-content:center;min-height:100px;padding:16px 0}.studio-review-picture .tile-surface{width:100%!important;max-width:380px;max-height:52dvh;margin:10px auto;pointer-events:none}.studio-review-summary{display:flex;justify-content:space-between;gap:16px;align-items:center;font-size:14px}.studio-review-summary strong{font-size:23px;white-space:nowrap}.studio-review p{font-size:13px;line-height:1.6;color:#68738b}.studio-review-actions{display:grid;gap:10px;margin-top:20px}.studio-review button{cursor:pointer;font:inherit}.studio-secondary{background:white;border:1px solid #d8dfec;border-radius:8px;padding:12px;color:#27395e}.studio-review :focus-visible,.studio-editor :focus-visible{outline:3px solid #7794ff;outline-offset:3px}.tile-preview:not(.gallery-preview)>h2{font-family:Arial,sans-serif;font-weight:700;color:#192342}.tile-preview:not(.gallery-preview)>.tile-surface{margin:32px auto}.tile-selection{border:2px solid #4865eb}.tile-resize{width:16px;height:16px;box-shadow:0 2px 5px #17284a22;background:white;border:2px solid #4865eb}.tile-resize[data-corner=nw]{left:-8px;top:-8px;right:auto;bottom:auto}.tile-resize[data-corner=ne]{right:-8px;top:-8px;bottom:auto;cursor:nesw-resize}.tile-resize[data-corner=sw]{left:-8px;bottom:-8px;right:auto;cursor:nesw-resize}.tile-rotate{position:absolute;top:-48px;left:calc(50% - 15px);width:30px;height:30px;border:2px solid #4865eb;border-radius:50%;background:white;color:#3855d6;font-size:21px;pointer-events:auto;touch-action:none;cursor:grab}.tile-rotate:after{content:'';position:absolute;width:1px;height:18px;background:#4865eb;left:12px;top:28px;pointer-events:none}@media(max-width:600px){.studio-review{width:calc(100vw - 20px);padding:18px}.studio-review-summary{flex-wrap:wrap}.studio-editor input:not([type=file]),.studio-editor textarea,.studio-editor select{font-size:16px}.studio-editor{inset:4% 6% 7%}.choice-dialog{max-height:86dvh}.colour-list .choice-name{font-size:13px}}

.studio-editor .studio-position{display:none}@media(max-width:600px){.studio-editor .studio-position{display:block;width:100%;margin-bottom:10px}}

.studio-navigation-label{font-size:.8em;font-weight:600;color:#69768d;margin:8px 0}.image-load-status{color:#294bbb;font-size:.88em;padding:10px 12px;border-radius:8px;background:#eef3ff;line-height:1.5}.studio-upload.is-loading{cursor:progress;pointer-events:none}.studio-upload.is-loading .upload-symbol{font-size:0;width:25px;height:25px;border:3px solid #ccd7f6;border-top-color:#365bc6;border-radius:50%;animation:image-loading-spin .8s linear infinite}@keyframes image-loading-spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.studio-upload.is-loading .upload-symbol{animation:none;border-style:dotted}}

.studio-background-tools{border-top:1px solid #e1e6ef;padding-top:12px;margin-top:12px}.studio-background-tools>button{width:100%;margin:4px 0}.background-progress{display:flex;align-items:center;gap:10px}.background-progress progress{width:100%;accent-color:#2b49c7}.background-status{font-size:.82em;line-height:1.5;color:#49658d}

/* Mobile reading and studio: full-height paper, readable copy, thumb-sized controls. */
.mobile-book-nav{display:none}
@media(max-width:600px){
 main{height:calc(100dvh - 76px);align-items:start;padding-top:6px}.stage{max-width:calc(100vw - 16px)}
 .section-markers{display:none!important}.book-position{filter:drop-shadow(0 3px 5px #20332b18)}
 .mobile-book-nav{display:grid;grid-template-columns:44px minmax(80px,1fr) minmax(120px,1.6fr) 44px;gap:6px;position:fixed;z-index:150;bottom:0;left:0;right:0;padding:9px 8px max(9px,env(safe-area-inset-bottom));background:#fffdf8f5;border-top:1px solid #d8dfeb;box-shadow:0 -3px 16px #1826430a;backdrop-filter:blur(12px)}
 .mobile-book-nav button{min-height:46px;padding:8px 5px;border:1px solid #d8dfeb;border-radius:10px;background:white;color:#2447c3;font:600 13px/1.2 Arial;cursor:pointer}.mobile-book-nav [data-mobile-context]{background:#2b49c7;color:#fff;border-color:#2b49c7}.mobile-book-nav [data-mobile-prev],.mobile-book-nav [data-mobile-next]{font-size:28px}.mobile-book-nav button:disabled{opacity:.35}
 #book{touch-action:pan-y}.tile-story,.reader-profile,.contents-page,.opening-guide,.gallery-intro{inset:24px 20px 32px;overflow:auto;overscroll-behavior:contain;touch-action:pan-y;-webkit-overflow-scrolling:touch;font-size:16px!important;line-height:1.6!important;padding-bottom:12px}
 .tile-story h2,.reader-profile h2,.opening-guide h2,.gallery-intro h2,.contents-page h2{font-size:30px!important;line-height:1.12!important}.tile-story .story-eyebrow,.story-next>span,.profile-eyebrow,.contents-kicker{font-size:11px!important;line-height:1.5!important}.story-next p{font-size:16px!important}.folio{bottom:9px}
 .contents-list button{min-height:48px;font-size:16px}.contents-page .contents-subject{font-size:16px}.contents-page .contents-number{font-size:13px}
 .reader-profile{display:block!important}.reader-profile p{font-size:14px!important;line-height:1.55!important}.profile-fields{display:grid;grid-template-columns:1fr!important;gap:10px}.profile-fields label{font-size:14px}.profile-fields input,.profile-fields select{height:46px;font-size:16px;padding:9px}.profile-actions{flex-wrap:wrap}.profile-actions button{min-height:44px}.profile-consent{margin-top:18px}.profile-consent input{width:22px;height:22px}
 .tile-editor.studio-editor,.tile-preview{inset:16px 16px 28px;font-size:16px;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;padding-bottom:20px}.studio-editor h2{font-size:24px}.studio-editor .editor-kicker{font-size:11px;line-height:1.4}.studio-editor .studio-navigation-label{font-size:12px}.studio-editor label{font-size:14px}.studio-editor button,.tile-preview>button{min-height:46px;font-size:14px}.studio-editor input:not([type=file]),.studio-editor textarea,.studio-editor select{font-size:16px;min-height:46px}.studio-editor .editor-tip,.tile-preview .editor-tip,.elastic-hint{font-size:13px;line-height:1.55}.studio-editor .studio-upload{min-height:100px}.studio-editor .studio-tabs{position:sticky;top:-1px;z-index:3;margin-top:12px;box-shadow:0 3px 10px #fffdf8}.studio-editor .editor-row{gap:8px}.studio-editor .editor-row label{flex-basis:40%}.studio-editor .editor-row button{flex:1}.studio-editor .layer-list{flex-wrap:nowrap;overflow-x:auto;padding:4px 2px 8px}.studio-editor .layer-list button{flex-shrink:0;max-width:180px}.studio-editor .studio-order{position:static}.studio-editor .studio-position{display:none}.studio-editor .studio-details>summary{min-height:44px;padding-top:10px;font-size:14px}
 .tile-preview:not(.gallery-preview)>h2{font-size:23px}.tile-preview:not(.gallery-preview)>.tile-surface{width:88%!important;max-width:calc((100dvh - 270px)*var(--product-ratio,1));margin:50px auto 30px}.tile-preview>.editor-kicker{font-size:11px}.tile-preview>button{padding:12px;margin:5px;min-height:46px}.tile-resize{width:26px;height:26px}.tile-resize[data-corner=nw]{left:-13px;top:-13px}.tile-resize[data-corner=ne]{right:-13px;top:-13px}.tile-resize[data-corner=sw]{left:-13px;bottom:-13px}.tile-resize[data-corner=se]{right:-13px;bottom:-13px}.tile-rotate{width:40px;height:40px;left:calc(50% - 20px);top:-58px}.tile-rotate:after{left:17px;top:38px}
 .choice-dialog,.studio-review,.share-window,.book-checkout{max-height:calc(100dvh - 24px);overscroll-behavior:contain}.choice-search{font-size:16px}.choice-option{min-height:66px}.choice-heading{position:sticky;top:0;background:#fff;z-index:2}.choice-dialog[open]{max-height:90dvh}.share-window{padding:24px 20px}.share-options button,.share-back{min-height:46px}.opening-guide{bottom:22%}.cover-face{padding:20px}.cover-face h2{font-size:clamp(34px,12vw,54px)}
}
@media(max-width:600px){#book,.stf__parent{height:100%!important}.stf__wrapper{height:100%!important;padding-bottom:0!important}.mobile-book-nav button{min-width:0;overflow-wrap:anywhere}.mobile-book-nav [data-mobile-sections]{font-size:14px}}
.tile-frame-picker{border:1px solid #d6dfe9;border-radius:10px;padding:10px;margin:0 0 12px;min-width:0}
.tile-frame-picker legend{font:600 12px Arial,sans-serif;color:#253b58;padding:0 5px}
.tile-frame-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
.tile-frame-options button{display:flex;flex-direction:column;gap:4px;align-items:center;margin:0;padding:5px;border:1px solid #d6dfe9;border-radius:7px;background:#fff;color:#253b58;cursor:pointer;font:10px/1.2 Arial,sans-serif;min-width:0}
.tile-frame-options button[aria-pressed="true"]{border-color:#0645bf;box-shadow:0 0 0 1px #0645bf;background:#eef4ff}
.tile-frame-options button:focus-visible{outline:2px solid #0645bf;outline-offset:2px}
.tile-frame-options button:disabled{opacity:.5;cursor:wait}
.tile-frame-thumb{width:100%;max-width:66px;aspect-ratio:1;object-fit:contain;background:linear-gradient(135deg,#e7edf4,#fbf6ee);border-radius:3px}
.tile-frame-picker .editor-tip{font-size:10px;line-height:1.4;margin:8px 0 0}
.studio-tabs:has(button:nth-child(3)){grid-template-columns:repeat(3,minmax(0,1fr))}
.studio-tabs:has(button:nth-child(3)) button{padding-inline:6px;font-size:clamp(10px,calc(var(--page-w)*.026),15px)}
.studio-frame-panel[hidden]{display:none}
.tile-frame-picker[data-shape="round"] .tile-frame-thumb{border-radius:50%}
.tile-frame-picker[data-shape="long"] .tile-frame-options{grid-template-columns:repeat(2,minmax(0,1fr))}
.tile-frame-picker[data-shape="long"] .tile-frame-thumb{max-width:none;aspect-ratio:4/1}
