/* R32: approved painted components shared by runtime and editor projection. */
.modal .close{display:grid;place-items:center;padding:0;line-height:1;isolation:isolate}
.modal .close-glyph{display:block;width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;pointer-events:none}
.modal .close:hover{background:#d3ae6660;color:#4e321a}.modal .close:active{background:#b4894d60}
.compact .modal .close-glyph{width:30px;height:30px}
.modal.folio{isolation:isolate;background:none;border:0;border-radius:0;box-shadow:none;padding:46px 46px 40px;overflow:visible;color:#42341f}
.modal.folio>.home-frame{z-index:-1;--frame-left:90px;--frame-right:90px;--frame-top:85px;--frame-bottom:96px;filter:drop-shadow(0 14px 20px #0007)}
.folio-heading{display:flex;align-items:center;gap:17px;margin:0 0 18px;min-height:75px;padding-bottom:13px;border-bottom:1px solid #ac894e80}
.folio-seal{display:grid;place-items:center;flex:0 0 72px;width:72px;height:72px;background:radial-gradient(ellipse,#ab8b4a28,#e5ce9920 65%,transparent 67%)}
.folio-seal img{width:65px;height:65px;object-fit:contain;filter:drop-shadow(0 3px 2px #85532c40)}
.modal.folio .folio-heading .eyebrow{font-size:11px;line-height:1.5;letter-spacing:2.5px;color:#777145}
.modal.folio .folio-heading h1{margin:4px 0 0;font-size:34px;line-height:1.3;letter-spacing:4px;color:#49301d;text-shadow:0 1px 0 #fff6d6}
.modal.folio .folio-actions{gap:12px;margin-top:18px}
.modal.folio .folio-button{position:relative;isolation:isolate;display:flex;align-items:center;justify-content:center;gap:12px;min-height:68px;padding:10px 28px;border:0;background:none;border-radius:0;box-shadow:none;color:#ffe7b6;letter-spacing:1.5px;text-shadow:0 2px 1px #281908;font-size:18px}
.folio-button .home-frame{inset:-17% 0 auto;height:146.6%;z-index:-1;--frame-left:56px;--frame-right:56px;--frame-top:0px;--frame-bottom:0px}
.folio-button.secondary .home-frame{filter:saturate(.68) brightness(.87)}
.folio-button .folio-button-icon{width:35px;height:35px;object-fit:contain;flex:0 0 35px;margin:0;filter:drop-shadow(0 2px 1px #0006)}
.folio-button-label{line-height:1.2;white-space:nowrap}.modal.folio .folio-button.secondary{color:#ecd8ae}
@media(hover:hover){.modal.folio .folio-button:hover{background:none}.folio-button:hover .home-frame{filter:brightness(1.18)}.folio-button.secondary:hover .home-frame{filter:saturate(.8) brightness(1.06)}}
.folio-button:active .home-frame{filter:brightness(.8)}.modal.folio .folio-button:focus-visible{outline:3px solid #51745d;outline-offset:-7px;border-radius:14px}

.modal.intro.folio{width:1080px;grid-template-columns:minmax(0,1.06fr) minmax(0,1fr);gap:20px 30px}
.brief-copy{min-width:0}.modal.folio .brief-description{margin:0 0 15px;font-size:17px;line-height:1.8;color:#526044}
.brief-label{font-size:12px;letter-spacing:2px;color:#846232;display:block;margin-bottom:5px}
.brief-rule{padding:12px 16px;border-left:3px solid #a28143;background:linear-gradient(90deg,#d6bc7e55,#ebd5a011);border-radius:0 6px 6px 0}
.modal.folio .brief-rule p{font-size:16px;line-height:1.7;margin:0;color:#4a5139}
.modal.folio .brief-choice{font-size:17px;line-height:1.7;color:#8a4b27;margin:15px 0}
.brief-dew{display:flex;align-items:center;gap:10px;padding-top:13px;border-top:1px solid #a3864f55}
.brief-dew img{width:36px;height:46px;object-fit:contain;flex:none}.modal.folio .brief-dew p{font-size:14px;line-height:1.8;color:#62664a;margin:0}
.brief-map{align-self:start;min-width:0;padding-top:5px}.brief-map-caption{display:flex;align-items:center;justify-content:space-between;color:#665331;font-size:17px;margin:0 3px 12px;letter-spacing:2px}
.brief-map-caption small{font-size:11px;letter-spacing:2px;color:#85744d}
.modal.intro.folio .map-preview{display:block;width:100%;height:auto;aspect-ratio:1000/510;margin:0;background:#204331;border:5px double #8a6736;border-radius:7px;box-shadow:0 3px 8px #6c442633}
.brief-stats{display:grid;grid-template-columns:.95fr .95fr 1.45fr;gap:7px;margin:14px 0 10px}
.brief-stats>div{display:flex;align-items:center;justify-content:center;gap:5px;padding:10px 3px;background:#c1a26620;border:1px solid #ab8d4e70;border-radius:5px;min-width:0}
.brief-stats img{width:27px;height:31px;object-fit:contain}.brief-stats small{display:block;color:#797144;font-size:11px;line-height:1.6;white-space:nowrap}.brief-stats strong{display:block;color:#5b3c1e;font-size:21px;line-height:1.4;font-weight:400;white-space:nowrap}.brief-stats em{font-size:12px;font-style:normal}
.modal.folio .brief-supplies{color:#74633f;font-size:13px;line-height:1.8;margin:8px 4px 0}
.modal.intro.folio>.folio-actions{grid-column:1/-1;margin-top:0;padding-top:0}

.modal-settings.folio{width:740px;padding:46px 48px 40px;display:block;height:auto}
.modal-settings.folio>.close{right:24px;top:24px;width:48px;height:48px;min-width:48px;min-height:48px;z-index:2;background:#eed59b;border:2px solid #a38248;box-shadow:inset 0 0 0 3px #fff0c150,0 2px 3px #76532f40}
.modal-settings.folio .folio-heading{margin-right:34px}
.settings-controls{display:flex;flex-direction:column;gap:8px}
.modal-settings.folio .settings-row{margin:0;min-height:77px;gap:14px;padding:9px 14px;border:1px solid #ad8d4b55;border-radius:7px;background:linear-gradient(90deg,#dcc28c60,#f9e8c13a);font-size:18px}
.setting-name{display:flex;align-items:center;gap:12px;min-width:0;flex:1}.setting-name>img{width:40px;height:44px;object-fit:contain;flex:none}.setting-name>span{white-space:nowrap}.setting-name small{display:block;font-size:11px;color:#7f7854;line-height:1.8}
.modal-settings.folio .settings-row output{font-size:20px;color:#7e562b;min-width:54px;text-align:right}
.modal-settings.folio .settings-row input[type=range]{width:205px;min-height:48px;margin:0;accent-color:#697e43;cursor:pointer;flex:0 0 205px}
.modal-settings.folio .settings-row input[type=checkbox]{appearance:none;width:34px;height:34px;margin:0;flex:none;border:2px solid #aa874b;border-radius:7px;background:#fff1c5;box-shadow:inset 0 2px 4px #84622a30;display:grid;place-content:center;cursor:pointer}
.modal-settings.folio .settings-row input[type=checkbox]:checked{background:#607544;border-color:#4e6636}
.modal-settings.folio .settings-row input[type=checkbox]:checked::after{content:"";width:14px;height:8px;border-left:3px solid #fff1c5;border-bottom:3px solid #fff1c5;transform:translateY(-2px) rotate(-45deg)}
.modal-settings.folio .settings-note{font-size:13px;line-height:1.6;color:#6e704e;margin:14px 0 0;padding-left:3px}
.modal-settings.folio .settings-actions{margin-top:14px}

.modal-pause.folio{width:810px;padding:43px 46px 38px}
.pause-summary{display:flex;align-items:center;gap:24px;justify-content:space-between;margin-top:-4px}
.pause-chapter{color:#79572c;font-size:17px;letter-spacing:1px}
.modal-pause.folio .pause-summary p{font-size:17px;line-height:1.9;color:#5c6246;margin:12px 0}
.pause-vignette{width:124px;height:130px;object-fit:contain;filter:drop-shadow(0 3px 3px #92633733);margin-right:14px}
.modal-pause.folio .pause-primary{margin-top:16px;padding-top:18px;border-top:1px solid #ad8d4e70}
.modal-pause.folio .pause-primary>.btn:first-child{flex:1.45}
.modal-pause.folio .pause-secondary{margin-top:10px}
.modal-pause.folio .pause-secondary .folio-button{font-size:15px;min-height:58px;gap:7px;padding:10px 18px;letter-spacing:1px}
.pause-secondary .folio-button .folio-button-icon{width:26px;height:29px;flex-basis:26px}

/* Same logical stage, explicit mobile controls of at least 88 units. */
.compact .modal.folio{max-height:620px;padding:48px 42px 32px;overflow:visible}
.compact .modal.folio>.home-frame{--frame-left:90px;--frame-right:90px;--frame-top:85px;--frame-bottom:96px}
.compact .folio-heading{min-height:76px;gap:14px;margin-bottom:15px;padding-bottom:10px}
.compact .folio-seal{width:68px;height:68px;flex-basis:68px}.compact .folio-seal img{width:62px;height:62px}
.compact .modal.folio .folio-heading h1{font-size:38px;margin-top:3px}.compact .modal.folio .folio-heading .eyebrow{font-size:16px;letter-spacing:2px}
.compact .modal.folio .folio-button{min-height:88px;font-size:26px;padding:12px 32px;gap:14px}
.compact .folio-button .folio-button-icon{width:42px;height:45px;flex-basis:42px}
.compact .modal.intro.folio{width:1180px;height:620px;grid-template-rows:minmax(0,1fr) auto;gap:16px 30px;grid-template-columns:minmax(0,1.12fr) minmax(0,1fr)}
.compact .modal.folio .brief-description{font-size:22px;line-height:1.6;margin-bottom:10px}
.compact .brief-label{font-size:16px;margin-bottom:2px}.compact .brief-rule{padding:8px 13px}
.compact .modal.folio .brief-rule p{font-size:21px;line-height:1.5}
.compact .modal.folio .brief-choice{font-size:22px;line-height:1.5;margin:10px 0}
.compact .brief-dew{padding-top:8px;gap:8px}.compact .brief-dew img{width:32px;height:40px}.compact .modal.folio .brief-dew p{font-size:18px;line-height:1.6}
.compact .brief-map{padding-top:8px}.compact .brief-map-caption{font-size:21px;margin-bottom:10px}.compact .brief-map-caption small{font-size:15px}
.compact .brief-stats{margin-top:12px;gap:6px}.compact .brief-stats>div{padding:8px 3px;gap:5px}.compact .brief-stats small{font-size:16px}.compact .brief-stats strong{font-size:25px}.compact .brief-stats em{font-size:16px}.compact .brief-stats img{width:28px;height:34px}
.compact .modal.folio .brief-supplies{font-size:19px;line-height:1.6;margin-top:10px}
.compact .modal-settings.folio{width:1080px;height:auto;display:block;padding:46px 46px 32px}
.compact .modal-settings.folio>.close{width:88px;height:88px;min-width:88px;min-height:88px;right:28px;top:22px;background:transparent;border-color:transparent;box-shadow:none}
.compact .modal-settings.folio>.close::before{content:"";position:absolute;inset:16px;border:2px solid #a38248;border-radius:50%;background:#efd7a3;box-shadow:inset 0 0 0 3px #fff0c150,0 2px 3px #76532f40;z-index:-1}
.compact .modal-settings.folio .folio-heading{margin-right:70px}
.compact .settings-controls{gap:6px}.compact .modal-settings.folio .settings-row{min-height:88px;padding:0 18px;gap:22px;font-size:27px}
.compact .setting-name{gap:14px}.compact .setting-name>img{width:46px;height:52px}.compact .setting-name small{font-size:17px;line-height:1.65}
.compact .modal-settings.folio .settings-row output{font-size:27px;min-width:68px}
.compact .modal-settings.folio .settings-row input[type=range]{flex-basis:370px;width:370px;height:88px;min-height:88px}
.compact .modal-settings.folio .settings-row input[type=checkbox]{width:58px;height:58px;margin:12px 0}
.compact .modal-settings.folio .settings-row input[type=checkbox]:checked::after{width:24px;height:13px;border-width:4px}
.compact .modal-settings.folio .settings-note{font-size:20px;margin:10px 0 0;line-height:1.4}
.compact .modal-settings.folio .settings-actions{margin-top:10px}
.compact .modal-pause.folio{width:1080px}.compact .pause-chapter{font-size:25px}.compact .modal-pause.folio .pause-summary p{font-size:25px;line-height:1.65;margin:10px 0}
.compact .pause-vignette{width:150px;height:150px}.compact .modal-pause.folio .pause-primary{padding-top:14px;margin-top:14px}
.compact .modal-pause.folio .pause-secondary .folio-button{min-height:88px;font-size:24px;gap:9px;padding:10px 20px}
.compact .pause-secondary .folio-button .folio-button-icon{width:34px;height:38px;flex-basis:34px}

.compact .folio-button .folio-wood{--frame-left:72px;--frame-right:72px}
.modal-pause.folio .pause-secondary .folio-wood{--frame-left:48px;--frame-right:48px}
.compact .modal-pause.folio .pause-secondary .folio-wood{--frame-left:72px;--frame-right:72px}
