html,body,#root{margin:0;min-height:100%}body{background:var(--ds-page)}
.mep-shell{position:relative;height:640px;width:100%;overflow:hidden;background:#14161c;border-radius:12px;font-family:Georgia,serif;touch-action:none}
.mep-shell canvas{display:block}
.mep-shell button{cursor:pointer}
.mep-shell #app{position:absolute;inset:0}
.mep-shell #hud{position:absolute;top:10px;left:10px;z-index:5;background:rgba(24,20,16,.82);color:#e8dcc8;
     padding:9px 12px;border-radius:10px;max-width:320px;font-size:12px;line-height:1.45;pointer-events:none}
.mep-shell #hud h1{font-size:13px;margin:0 0 3px;color:#e8b04b;font-weight:600;letter-spacing:.04em}
.mep-shell #hud .sub{opacity:.75}
.mep-shell #hint{position:absolute;left:50%;bottom:22px;transform:translateX(-50%);z-index:5;color:#ffe9c4;
     font-size:13px;letter-spacing:.16em;text-transform:uppercase;text-shadow:0 1px 8px #000;
     background:rgba(20,16,12,.66);padding:6px 14px;border-radius:14px;
     opacity:.95;transition:opacity .8s;pointer-events:none;white-space:nowrap}
.mep-shell #tag{position:absolute;bottom:10px;left:10px;z-index:5;background:rgba(24,20,16,.8);color:#b8a98f;
     font-size:11px;padding:5px 9px;border-radius:8px}
.mep-shell #tag:empty{display:none}
.mep-shell #temp{position:absolute;bottom:10px;right:10px;z-index:5;background:rgba(24,28,36,.85);color:#bfe4ff;
     font-size:12px;padding:6px 10px;border-radius:8px;font-variant-numeric:tabular-nums}
.mep-shell #fade{position:absolute;inset:0;z-index:8;background:#000;opacity:0;pointer-events:none;transition:opacity .25s}
.mep-shell #book{position:absolute;inset:0;z-index:50;display:flex;align-items:center;justify-content:center;background:rgba(10,8,6,.55);perspective:1200px}
.mep-shell #book .card{position:relative;color:#2c241c;border-radius:12px;width:min(900px,94%);height:92%;max-height:92%;padding:0;overflow:hidden;box-shadow:0 18px 50px #0008;font-size:14px;line-height:1.55;display:flex;flex-direction:column;background:#f4ecd9;animation:bookopen .55s ease;transform-origin:50% 100%}
.mep-shell #book .mep-book-toolbar{display:flex;align-items:center;gap:8px;flex:none;min-height:52px;padding:4px 14px;background:#e4d5b4;border-bottom:1px solid #c7b48b}
.mep-shell #book .mep-book-label{font-size:11px;letter-spacing:.12em;text-transform:uppercase;color:#665638;margin-right:auto}
.mep-shell #book .mep-book-body{min-height:0;flex:1;overflow:hidden;background:linear-gradient(90deg,#eee2c6 0%,#f8f0de 48.5%,#c4b18a 50%,#f8f0de 51.5%,#efe4cb 100%)}
.mep-shell #book #booklist,.mep-shell #book #chapter,.mep-shell #book #cvview{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-auto-rows:minmax(0,100%);height:100%;min-height:0;gap:32px}
.mep-shell #book .mep-book-page{min-width:0;min-height:0;overflow-y:auto;overflow-x:hidden;padding:22px 24px 30px;box-sizing:border-box;scrollbar-width:thin;scrollbar-color:#b7a47c transparent;overscroll-behavior:contain;touch-action:pan-y;-webkit-overflow-scrolling:touch}
.mep-shell #book .mep-book-kicker{font-size:11px;text-transform:uppercase;letter-spacing:.1em;color:#7a6a48;margin:0 0 18px}
@keyframes bookopen{from{transform:rotateX(16deg) scale(.9);opacity:.35}to{transform:none;opacity:1}}
.mep-shell #book .turn{animation:pageturn .45s ease;transform-origin:left center}
@keyframes pageturn{from{transform:rotateY(-18deg);opacity:.1}to{transform:none;opacity:1}}
.mep-shell #book h2{margin:0 0 12px;font-size:19px;color:#274d3d;letter-spacing:.03em}
.mep-shell #book .proj{margin:0 0 12px;padding-bottom:12px;border-bottom:1px solid #d8cbaa}
.mep-shell #book .st{color:#7a6a48;font-size:12.5px;font-style:italic}
.mep-shell #book .more{color:#7a6a48;font-size:12.5px;font-style:italic}
.mep-shell #bookclose,.mep-shell #bookcontact,.mep-shell #bookcv{position:static;flex:none;min-height:44px;padding:8px 10px;border:1px solid #b8a27a;border-radius:6px;background:#f8f0de;font:600 13px Georgia,serif;color:#274d3d}
.mep-shell #bookcontact,.mep-shell #bookcv{background:#efe3c8}
@media (max-width:600px){
  .mep-shell{border-radius:0}
  .mep-shell.mep-full{height:100svh;height:100dvh;max-height:100dvh;overflow:hidden}
  .mep-shell #hud{font-size:10.5px;max-width:54vw;padding:6px 9px}
  .mep-shell #hint{font-size:10.5px;letter-spacing:.08em}
  .mep-shell #book .card{width:94%;max-width:94%;height:94%;max-height:94%;padding:0;font-size:13px}
  .mep-shell #book .mep-book-body{overflow-y:auto;overflow-x:hidden;background:#f4ecd9;touch-action:pan-y;overscroll-behavior:contain}
  .mep-shell #book #booklist,.mep-shell #book #chapter,.mep-shell #book #cvview{height:auto;display:block}
  .mep-shell #book .mep-book-page{overflow:visible;padding:18px 16px 22px}
  .mep-shell #book .mep-book-page + .mep-book-page{border-top:1px solid #c7b48b;box-shadow:inset 0 8px 12px -12px #76613a}
  .mep-shell #book .mep-book-toolbar{padding:4px 8px;gap:4px}
  .mep-shell #book .mep-book-label{font-size:9px;letter-spacing:.05em}
  .mep-shell #book .mep-book-toolbar:has(#chback:not([hidden])) .mep-book-label{display:none}
  .mep-shell #book #bookcontact{margin-left:auto}
  .mep-shell #book #bookclose{margin-left:0}
}

.mep-shell #book .projlink{cursor:pointer}
.mep-shell #book .projlink:hover{background:#efe3c8;border-radius:8px}
.mep-shell #book .open{color:#274d3d;font-size:12.5px;font-weight:600}
.mep-shell #book .chsub{color:#7a6a48;font-size:13px;margin:-6px 0 12px;font-style:italic}
.mep-shell #book #chback{display:block;width:auto;text-align:left;border:0;border-radius:6px;background:#f8f0de;color:#274d3d;font:600 13px Georgia,serif;cursor:pointer;padding:8px 10px;min-height:44px;margin-right:auto}
.mep-shell #book #chback[hidden]{display:none}

.mep-shell #ceiling{position:absolute;inset:0;z-index:9;display:flex;align-items:center;justify-content:flex-start;background:linear-gradient(90deg,rgba(8,10,12,.55),rgba(8,10,12,0) 55%);pointer-events:none}
.mep-shell #ceiling .panel,.mep-shell #gaugeread{pointer-events:auto}
.mep-shell #ceiling .panel{position:relative;max-width:min(360px,88%);max-height:88%;overflow-y:auto;margin-left:26px;background:rgba(32,35,38,.92);color:#f2ead8;border:1px solid rgba(255,255,255,.12);border-radius:14px;padding:22px 24px;box-shadow:0 18px 50px rgba(0,0,0,.55);font-size:14px;line-height:1.55}
.mep-shell #ceiling h2{margin:0 0 10px;font-size:19px;color:#ffd99a;letter-spacing:.03em}
.mep-shell #ceiling .note{font-size:13px;color:#d7c8a8;margin-bottom:12px;font-style:italic}
.mep-shell #ceiling ul{margin:0;padding-left:18px}
.mep-shell #ceiling li{margin:0 0 8px}
.mep-shell #ceiling b{color:#fff1c9}
.mep-shell #ceilclose{position:absolute;top:8px;right:10px;border:0;background:none;font-size:22px;color:#ffd99a;line-height:1}
.mep-shell #ceilmin{position:absolute;top:8px;right:38px;border:0;background:none;font-size:22px;color:#ffd99a;line-height:1}
.mep-shell #ceiling .panel.min{overflow:visible}
.mep-shell #ceiling .panel.min .note,.mep-shell #ceiling .panel.min ul{display:none}
.mep-shell #ceiling .panel.min h2{margin:0;padding-right:56px;font-size:15px}
@media (max-width:600px){.mep-shell #ceiling .panel.min{max-height:none}}
@media (max-width:600px){.mep-shell #ceiling{align-items:flex-end;background:linear-gradient(0deg,rgba(8,10,12,.6),rgba(8,10,12,0) 60%)}.mep-shell #ceiling .panel{padding:16px;font-size:13px;margin:0 12px 12px;max-width:calc(100% - 24px);max-height:52%}}
.mep-shell #gaugeread{position:absolute;right:26px;bottom:26px;z-index:10;max-width:min(340px,92%);background:rgba(32,35,38,.94);color:#f2ead8;border:1px solid rgba(255,255,255,.12);border-radius:12px;padding:14px 16px;box-shadow:0 12px 34px rgba(0,0,0,.5);font-size:13px;line-height:1.5}
.mep-shell #gaugeread h3{margin:0 0 6px;font-size:15px;color:#ffd99a;padding-right:22px;letter-spacing:.03em}
.mep-shell #gaugeread .gr-where{font-size:11px;color:#c9b98f;letter-spacing:.06em;text-transform:uppercase;margin:-2px 0 8px}
.mep-shell #gaugeread .gr-plate{display:flex;gap:12px;margin-bottom:8px}
.mep-shell #gaugeread .gr-dial{flex:1;text-align:center}
.mep-shell #gaugeread .gr-dial svg{width:84px;height:84px}
.mep-shell #gaugeread .gr-dial .face{fill:#f5eeda;stroke:#3a3f45;stroke-width:2.5}
.mep-shell #gaugeread .gr-dial .needle{stroke:#3a3f45;stroke-width:3;stroke-linecap:round}
.mep-shell #gaugeread .gr-dial .hub{fill:#3a3f45}
.mep-shell #gaugeread .gr-dial .dlab{font:700 13px Georgia;fill:#3a3f45}
.mep-shell #gaugeread .gr-dial .dlab-low{fill:#2f6f9f}
.mep-shell #gaugeread .gr-dial .dlab-high{fill:#b03a2e}
.mep-shell #gaugeread .gr-side{font-size:11px;color:#d7c8a8;margin-top:2px}
.mep-shell #gaugeread .gr-val{font-size:13px;color:#fff1c9;margin-top:2px}
.mep-shell #gaugeread .gr-note{font-size:12px;color:#d7c8a8;font-style:italic}
.mep-shell #gaugeclose{position:absolute;top:6px;right:8px;border:0;background:none;font-size:18px;color:#ffd99a;line-height:1}
@media (max-width:600px){.mep-shell #gaugeread{left:12px;right:12px;bottom:12px;max-width:none}}

.mep-shell #book .sheets{display:grid;grid-template-columns:minmax(0,1fr);gap:18px;padding:8px 0;margin-top:6px}
.mep-shell #book .sheets figure{margin:0;min-width:0;cursor:zoom-in;border-radius:6px}
.mep-shell #book .sheets figure:focus-visible,.mep-shell #book .projlink:focus-visible{outline:3px solid #9a6d24;outline-offset:3px}
.mep-shell #book .projlink{padding:10px;border:1px solid #d8cbaa;border-radius:8px;min-height:44px}
.mep-shell #book .sheets img{width:100%;display:block;border:1px solid #d8cbaa;border-radius:6px;background:#fff}
.mep-shell #book .sheets figcaption{font-size:11.5px;color:#5a4c34;margin-top:4px;line-height:1.35}
.mep-shell #book .sheets figure.open{position:fixed;inset:0;z-index:40;background:rgba(10,8,6,.9);display:flex;flex-direction:column;align-items:center;justify-content:center;padding:24px;cursor:zoom-out}
.mep-shell #book .sheets figure.open img{max-width:96%;max-height:86%;width:auto;border-radius:8px}
.mep-shell #book .sheets figure.open figcaption{color:#e8dcbf;font-size:13px;margin-top:10px}
.mep-shell #gaugebtn{display:block;margin:10px 0 2px;padding:9px 14px;border:0;border-radius:18px;background:rgba(255,217,154,.16);color:#ffd99a;font:600 13px Georgia,serif;letter-spacing:.04em;cursor:pointer}

/* Drawing viewer. Native dialog is sized to the visitor viewport, not the long page. */
.mep-sheet-dialog{box-sizing:border-box;width:min(1100px,calc(100vw - 24px));height:min(850px,calc(100dvh - 24px));max-width:none;max-height:none;margin:auto;padding:0;border:1px solid #76694f;border-radius:14px;background:#181b1d;color:#f5eddb;font:14px/1.45 Georgia,serif;overflow:hidden;box-shadow:0 24px 80px #0008}
.mep-sheet-dialog::backdrop{background:#090c0fe8}
.mep-sheet-dialog[open]{display:flex;flex-direction:column}
.mep-sheet-dialog button{box-sizing:border-box;min-height:44px;min-width:44px;border:1px solid #857657;border-radius:7px;padding:8px 12px;background:#2b3031;color:#f5eddb;font:600 13px Georgia,serif;cursor:pointer;white-space:nowrap}
.mep-sheet-dialog button:disabled{opacity:.4;cursor:default}
.mep-sheet-dialog button:focus-visible,.mep-sheet-viewport:focus-visible,.mep-shell figure[role=button]:focus-visible{outline:3px solid #f0c374;outline-offset:3px}
.mep-sheet-head{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:12px 16px;border-bottom:1px solid #45453e}
.mep-sheet-eyebrow{font-size:11px;color:#c2b28e;letter-spacing:.05em}
.mep-sheet-position{font-size:15px;margin-top:2px}
.mep-sheet-viewport{position:relative;display:flex;align-items:center;justify-content:center;flex:1;min-height:0;overflow:hidden;touch-action:none;user-select:none;background:#101416;padding:8px;box-sizing:border-box;cursor:default}
.mep-sheet-viewport.is-zoomed{cursor:grab}
.mep-sheet-viewport.is-zoomed:active{cursor:grabbing}
.mep-sheet-viewport img{display:block;max-width:100%;max-height:100%;object-fit:contain;flex:0 1 auto;transform-origin:center;user-select:none;pointer-events:none;box-shadow:0 2px 16px #0005}
.mep-sheet-caption{font-size:13px;padding:10px 16px 4px;color:#e7d9bd;min-height:36px}
.mep-sheet-controls{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:8px 16px}
.mep-sheet-zoom{display:flex;align-items:center;gap:6px}
.mep-sheet-zoom output{font:12px/1 Georgia,serif;min-width:40px;text-align:center;color:#dac9a5}
.mep-sheet-help{text-align:center;font-size:11px;color:#b2a88e;padding:0 12px 12px}
@media(max-width:600px){
.mep-sheet-dialog{width:calc(100vw - 12px);height:min(calc(100dvh - 16px),640px);border-radius:10px}
.mep-sheet-head{padding:10px 12px}
.mep-sheet-caption{font-size:12px;padding:8px 12px 2px;min-height:38px}
.mep-sheet-controls{display:grid;grid-template-columns:1fr 1fr;padding:6px 12px;gap:8px}
.mep-sheet-zoom{grid-column:1/-1;grid-row:1;justify-content:center}
.mep-sheet-controls>[data-sheet-action=next]{justify-self:end}
.mep-sheet-help{padding-bottom:10px}
}

/* Keep keyboard location visible in the project reader. */
.mep-shell #book button:focus-visible{outline:3px solid #9a6d24;outline-offset:2px}

/* Service panels keep their navigation outside the scrolled explanation. */
.mep-shell #ceiling .panel{padding:0;overflow:hidden;display:flex;flex-direction:column;max-height:88%;width:360px;max-width:88%}
.mep-shell #ceiling .mep-service-toolbar{flex:none;padding:12px 16px 8px;border-bottom:1px solid #786c56;background:#24282b}
.mep-shell #ceiling .mep-service-toolbar h2{font-size:17px;margin:0 0 8px;padding:0}
.mep-shell #ceiling .mep-service-actions{display:flex;gap:8px;justify-content:space-between}
.mep-shell #ceiling #ceilmin,.mep-shell #ceiling #ceilclose,.mep-shell #gaugeclose{position:static;min-height:44px;min-width:44px;padding:8px 12px;border:1px solid #887b60;border-radius:6px;background:#34393b;color:#ffe5b8;font:600 12px Georgia,serif;line-height:1.2}
.mep-shell #ceiling .mep-service-body{overflow-y:auto;min-height:0;padding:14px 16px;touch-action:pan-y;overscroll-behavior:contain;scrollbar-width:thin}
.mep-shell #ceiling .mep-service-min-note{display:none;font-size:11px;color:#e6bd75;margin-top:8px}
.mep-shell #ceiling .panel.min{overflow:hidden}
.mep-shell #ceiling .panel.min .mep-service-body{display:none}
.mep-shell #ceiling .panel.min .mep-service-min-note{display:block}
.mep-shell #ceiling .panel.min h2{font-size:16px;margin:0 0 8px;padding:0}
.mep-shell #gaugeread{padding:0;max-height:88%;display:flex;flex-direction:column;overflow:hidden;box-sizing:border-box}
.mep-shell #gaugeread .mep-reading-toolbar{display:flex;align-items:center;gap:8px;justify-content:space-between;flex:none;padding:10px 12px;background:#24282b;border-bottom:1px solid #786c56}
.mep-shell #gaugeread .mep-reading-toolbar h3{padding:0;margin:0;font-size:14px}
.mep-shell #gaugeread .mep-reading-body{min-height:0;overflow-y:auto;padding:12px 16px;touch-action:pan-y;overscroll-behavior:contain;scrollbar-width:thin}
.mep-shell #ceiling button:focus-visible{outline:3px solid #e6bd75;outline-offset:2px}
@media(max-width:600px){
 .mep-shell #ceiling .panel{max-height:72%;width:calc(100% - 24px);max-width:calc(100% - 24px);margin:0 12px 12px;padding:0}
 .mep-shell #gaugeread{max-height:92%;max-width:none;left:12px;right:12px;bottom:12px;padding:0}
}
.mep-shell #ceiling #gaugebtn{min-height:44px;white-space:normal}
.mep-shell #ceiling.mep-readings-open .panel{visibility:hidden}
.mep-shell #gaugeclose{flex:0 0 auto;min-width:56px;white-space:nowrap}

/* Room actions share one flow, so the return path cannot overlap an action. */
.mep-shell #mep-visit-actions.mep-visit-docked{left:12px;right:12px;max-width:none;display:flex;justify-content:flex-start;align-items:stretch}
.mep-shell #mep-visit-actions.mep-visit-docked button{min-height:44px;position:static!important;flex:0 1 auto;white-space:normal}
.mep-shell #mep-visit-actions.mep-visit-docked #roomback{margin-left:auto}
@media(max-width:600px){
 .mep-shell #mep-visit-actions.mep-visit-docked{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
 .mep-shell #mep-visit-actions.mep-visit-docked button{width:100%;min-width:0;box-sizing:border-box;padding:8px 10px;line-height:1.3;letter-spacing:0}
 .mep-shell #mep-visit-actions.mep-visit-docked #roomback{grid-column:2;margin-left:0}
}
.mep-shell #mep-visit-actions.mep-visit-docked{max-width:none!important}
.mep-shell #mep-visit-actions.mep-visit-docked button{min-height:44px!important}

/* Status labels do not compete for the same narrow-phone baseline. */
.mep-shell #tag{max-width:calc(100% - 20px);box-sizing:border-box}
@media(max-width:600px){
 .mep-shell #temp{top:90px;bottom:auto;right:10px;left:auto;max-width:58vw;box-sizing:border-box;font-size:11px;padding:5px 8px}
 .mep-shell #mep-visit-actions.mep-inside-actions{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;left:12px;right:12px;max-width:none!important;bottom:108px!important}
 .mep-shell #mep-visit-actions.mep-inside-actions button{min-height:44px!important;min-width:0;box-sizing:border-box;padding:8px 10px;line-height:1.3;letter-spacing:0}
}
.mep-shell #temp{top:90px;bottom:auto;right:10px;left:auto;max-width:220px;box-sizing:border-box}
.mep-shell #connected-detail::-webkit-scrollbar{width:6px}
.mep-shell #connected-detail::-webkit-scrollbar-thumb{background:rgba(224,193,132,.5);border-radius:3px}

/* letters card: sealed-letter rows; only the address text itself is a link */
.letterrow{display:flex;align-items:center;gap:12px;min-height:52px;margin:10px 0;padding:8px 14px;border:1px solid #cbb98f;border-radius:10px;background:#f6edd8;color:#3a2c1c;font:15px Georgia,serif;box-shadow:0 1px 4px rgba(60,40,20,.18);}
.letterrow::before{content:"";flex:0 0 16px;width:16px;height:16px;border-radius:50%;background:radial-gradient(circle at 35% 35%,#c0533f,#7e2a1e);box-shadow:0 1px 2px rgba(0,0,0,.4);}
.letterrow b{flex:none;font-size:15px;}
.letterlink{display:inline-flex;align-items:center;min-height:44px;padding:4px 8px;margin-left:-8px;font-size:14px;color:#274d3d;text-decoration:underline;text-underline-offset:3px;word-break:break-all;border-radius:6px;}
.letterlink:active{background:#e7d9b8;}

/* letters card: centered parchment panel (mirrors the book card's shell styles) */
.mep-shell #letters{position:absolute;inset:0;z-index:50;display:flex;align-items:center;justify-content:center;background:rgba(10,8,6,.45);}
.mep-shell #letters .card{position:relative;color:#2c241c;border-radius:12px;width:min(430px,92%);max-height:86%;padding:0;overflow:hidden;box-shadow:0 18px 50px #0008;font-size:14px;line-height:1.55;display:flex;flex-direction:column;background:#f4ecd9;animation:bookopen .45s ease;transform-origin:50% 100%;}
.mep-shell #letters .mep-book-toolbar{display:flex;align-items:center;gap:8px;flex:none;min-height:52px;padding:4px 14px;background:#e4d5b4;border-bottom:1px solid #c7b48b;}
.mep-shell #letters .mep-book-label{font-size:11px;letter-spacing:.12em;text-transform:uppercase;color:#665638;margin-right:auto;}
.mep-shell #letters .mep-book-body{min-height:0;flex:1;overflow:hidden;background:#f6eeda;display:flex;flex-direction:column;}
.mep-shell #letters .mep-book-page{height:100%;min-height:0;overflow-y:auto;overflow-x:hidden;padding:20px 20px 26px;box-sizing:border-box;scrollbar-width:thin;scrollbar-color:#b7a47c transparent;overscroll-behavior:contain;touch-action:pan-y;-webkit-overflow-scrolling:touch;}
.mep-shell #letters h2{margin:0 0 12px;font-size:19px;color:#274d3d;letter-spacing:.03em;}
.mep-shell #letters .proj{margin:0 0 12px;padding-bottom:12px;border-bottom:1px solid #d8cbaa;}
.mep-shell #lettersclose{position:static;flex:none;min-height:44px;padding:8px 10px;border:1px solid #b8a27a;border-radius:6px;background:#f8f0de;font:600 13px Georgia,serif;color:#274d3d;}
.mep-shell #letters button:focus-visible,.mep-shell #letters a:focus-visible{outline:3px solid #9a6d24;outline-offset:2px;}

.mep-shell #env{position:absolute;top:10px;right:10px;z-index:6;display:flex;flex-direction:column;gap:6px;align-items:flex-end}
.mep-shell #env button{min-height:36px;padding:6px 12px;border:0;border-radius:18px;background:rgba(24,20,16,.78);color:#e8dcc8;font:600 12px Georgia,serif;letter-spacing:.04em;box-shadow:0 2px 10px rgba(0,0,0,.3);cursor:pointer;-webkit-tap-highlight-color:transparent}

/* bottom overlay stack: hint above tag, growing upward, so long teaching text never collides */
.mep-shell #bottombar{display:contents}
@media (max-width:600px){
  .mep-shell #bottombar{position:absolute;left:10px;right:10px;bottom:10px;z-index:5;display:flex;flex-direction:column;gap:6px;align-items:flex-start;pointer-events:none}
  .mep-shell #bottombar #hint,.mep-shell #bottombar #tag{position:static;transform:none;max-width:100%}
  /* tighter control density on phones */
  .mep-shell #env button{min-height:32px;padding:5px 10px;font-size:11px}
  .mep-shell #mep-xray-bar button,.mep-shell .mep-chip{min-height:26px;padding:4px 7px;font-size:9.5px}
  .mep-shell #hint{font-size:10px;letter-spacing:.1em;padding:5px 10px;white-space:normal}
}

/* Portfolio controls: X-Ray bar, discipline filter chips, callout card, tour pill, minimap, hover tip */
.mep-shell #mep-xray-bar{position:absolute;top:10px;left:10px;z-index:35;display:none;gap:4px;flex-wrap:nowrap;align-items:center}
.mep-shell #mep-xray-bar button,.mep-shell .mep-chip{min-height:30px;padding:5px 8px;border:1px solid rgba(224,193,132,.34);border-radius:15px;background:rgba(24,20,16,.86);color:#e8dcc8;font:600 10.5px/1 Georgia,serif;letter-spacing:.01em;box-shadow:0 2px 8px rgba(0,0,0,.3);-webkit-tap-highlight-color:transparent;white-space:nowrap}
.mep-shell #mep-xray-bar button.is-active,.mep-shell .mep-chip.is-active{background:#b88435;color:#18130d;border-color:#ffd99a}
.mep-shell .mep-dot{display:inline-block;width:7px;height:7px;border-radius:50%;background:var(--dot,#58a6ff);margin-right:5px;vertical-align:1px;box-shadow:0 0 0 1px rgba(0,0,0,.35)}
.mep-shell .mep-filter-chips{position:absolute;top:46px;left:10px;z-index:35;display:none;gap:4px;flex-wrap:wrap;max-width:calc(100% - 150px)}
.mep-shell #mep-loader{position:absolute;top:12px;left:50%;transform:translateX(-50%);z-index:42;padding:5px 12px;border-radius:14px;background:rgba(20,18,15,.88);border:1px solid rgba(232,176,75,.4);color:#f3e2be;font:600 11px/1.2 Georgia,serif;letter-spacing:.04em;pointer-events:none;transition:opacity .45s ease}
.mep-shell #mep-callout{position:absolute;left:12px;bottom:170px;z-index:45;width:min(340px,calc(100% - 24px));max-height:calc(100% - 190px);overflow-y:auto;padding:12px 14px;border:1px solid rgba(224,193,132,.42);border-radius:12px;background:rgba(24,22,19,.95);color:#f0e4cd;box-shadow:0 14px 36px rgba(0,0,0,.55);font:12.5px/1.48 Georgia,serif}
.mep-shell .mep-co-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:4px}
.mep-shell .mep-co-badge{display:inline-block;padding:2px 8px;border-radius:10px;background:var(--badge,#58a6ff);color:#0f1419;font:700 10.5px Georgia,serif;letter-spacing:.04em;text-transform:uppercase}
.mep-shell .mep-co-close{border:0;background:none;color:#ffd99a;font-size:20px;line-height:1;padding:0 4px}
.mep-shell .mep-co-title{font:700 14.5px Georgia,serif;color:#ffe6b3;margin:2px 0 6px}
.mep-shell .mep-co-body{margin:0 0 6px}
.mep-shell .mep-co-notice{margin:6px 0;padding:6px 8px;border-left:3px solid #e6bd75;border-radius:4px;background:rgba(82,60,24,.7);color:#f7e4bc;font-size:11.5px}
.mep-shell .mep-co-basis{font-size:11px;color:#c3b394;font-style:italic}
.mep-shell .mep-co-action{margin-top:8px;min-height:34px;padding:6px 12px;border:1px solid rgba(255,217,154,.4);border-radius:16px;background:rgba(255,217,154,.14);color:#ffd99a;font:600 12px Georgia,serif}
.mep-shell #mep-minimap{position:absolute;top:112px;left:10px;z-index:36;background:rgba(24,20,16,.92);border:1px solid rgba(224,193,132,.35);border-radius:10px;padding:8px;box-shadow:0 10px 26px rgba(0,0,0,.45);color:#f0e4cd;font:11px Georgia,serif}
.mep-shell .mep-mm-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:4px;font-weight:700;color:#ffd99a}
.mep-shell .mep-mm-close{border:0;background:none;color:#ffd99a;font-size:17px;line-height:1;padding:0 4px}
.mep-shell #mep-minimap svg{display:block;background:#1c1914;border-radius:6px}
.mep-shell .mm-room{fill:#2d2820;stroke:#786850;stroke-width:0.06;cursor:pointer}
.mep-shell .mm-room:hover{fill:#3c352a}
.mep-shell .mm-lbl{fill:#c8b896;font:700 0.44px Georgia,serif;text-anchor:middle;pointer-events:none}
.mep-shell .mep-mm-jumps{display:flex;gap:4px;margin-top:6px;flex-wrap:wrap}
.mep-shell .mep-mm-jumps button{flex:1;min-height:26px;padding:3px 6px;border:1px solid rgba(224,193,132,.3);border-radius:6px;background:#2a241c;color:#f3e7d3;font:600 10.5px Georgia,serif}
.mep-shell #mep-tour-pill{position:absolute;top:78px;right:10px;z-index:37;max-width:min(320px,calc(100% - 20px));display:flex;align-items:center;gap:8px;padding:8px 10px;border-radius:10px;background:rgba(24,20,16,.93);border:1px solid rgba(255,217,154,.4);color:#f2e6cf;font:11.5px/1.35 Georgia,serif;box-shadow:0 8px 24px rgba(0,0,0,.45)}
.mep-shell .mep-tp-text{display:flex;flex-direction:column;gap:2px}
.mep-shell .mep-tp-text b{color:#ffd99a}
.mep-shell .mep-tp-btns{display:flex;flex-direction:column;gap:4px;flex:none}
.mep-shell .mep-tp-btns button{min-height:28px;padding:4px 9px;border:1px solid rgba(255,217,154,.4);border-radius:12px;background:#2f281f;color:#ffe4ad;font:600 11px Georgia,serif}
.mep-shell #mep-hover-tip{position:absolute;z-index:48;pointer-events:none;padding:5px 9px;border-radius:6px;background:rgba(20,17,14,.92);border:1px solid rgba(255,217,154,.4);color:#ffe9c4;font:600 11.5px Georgia,serif;white-space:nowrap;box-shadow:0 4px 12px rgba(0,0,0,.4)}
@media (min-width:601px){
  .mep-shell #mep-visit-actions.mep-visit-docked{left:50%!important;right:auto!important;transform:translateX(-50%);width:min(680px,calc(100% - 28px));max-width:680px!important}
  .mep-shell #mep-sup-chip,.mep-shell #mep-slab-legend{left:50%!important;right:auto!important;transform:translateX(-50%);width:min(680px,calc(100% - 28px));box-sizing:border-box}
}
@media (max-width:600px){
  .mep-shell #mep-callout{top:114px;bottom:auto;left:10px;right:10px;width:auto;max-height:46%;overflow-y:auto}
  .mep-shell #mep-tour-pill{top:114px;left:10px;right:10px;max-width:none}
}
/* ---- Welcome parchment hung on the facade (src/ui/parchment.js) ---- */
.mep-shell .mep-parch-wrap{position:absolute;inset:0;z-index:40;display:flex;align-items:flex-start;justify-content:center;padding:max(14px,4vh) 12px 12px;background:radial-gradient(ellipse at 50% 30%,rgba(20,16,12,.08),rgba(20,16,12,.42));overflow:auto}
.mep-shell .mep-parch{position:relative;width:min(520px,calc(100vw - 96px));margin-top:34px;transform-origin:50% -34px;animation:mepParchIn .9s cubic-bezier(.2,.8,.25,1) both,mepParchSway 7s ease-in-out .9s infinite alternate}
.mep-shell .mep-parch-cords{position:absolute;left:0;right:0;top:-34px;height:34px;pointer-events:none}
.mep-shell .mep-parch-cords::before,.mep-shell .mep-parch-cords::after{content:"";position:absolute;top:2px;width:2px;height:44px;background:linear-gradient(#6b4a2a,#3d2a17);transform-origin:top}
.mep-shell .mep-parch-cords::before{left:50%;transform:rotate(56deg)}
.mep-shell .mep-parch-cords::after{left:50%;transform:rotate(-56deg)}
.mep-shell .mep-parch-cords i{position:absolute;left:calc(50% - 7px);top:-5px;width:14px;height:14px;border-radius:50%;background:radial-gradient(circle at 35% 35%,#f4d58a,#a77a2c 60%,#5e4216);box-shadow:0 2px 3px rgba(0,0,0,.45)}
.mep-shell .mep-parch-rod{height:16px;margin:0 -16px;border-radius:9px;background:linear-gradient(#8a5a33,#5a371c 55%,#3a2210);box-shadow:0 3px 6px rgba(0,0,0,.4)}
.mep-shell .mep-parch-rod::before,.mep-shell .mep-parch-rod::after{content:"";position:absolute;width:22px;height:22px;margin-top:-3px;border-radius:50%;background:radial-gradient(circle at 35% 35%,#e9c77d,#9a6d28 60%,#4d3410)}
.mep-shell .mep-parch-rod::before{left:-26px}
.mep-shell .mep-parch-rod::after{right:-26px}
.mep-shell .mep-parch-rod{position:relative}
.mep-shell .mep-parch-sheet{position:relative;padding:22px 26px 18px;color:#3a2714;font:15px/1.55 Georgia,'Times New Roman',serif;text-align:center;transform-origin:top;
  background:radial-gradient(ellipse at 20% 15%,rgba(255,250,232,.9),rgba(255,250,232,0) 45%),radial-gradient(ellipse at 85% 80%,rgba(120,80,30,.22),rgba(120,80,30,0) 50%),linear-gradient(90deg,#c9a66b 0,#ead2a0 6%,#f3e2bc 30%,#f0dcb0 70%,#e3c58c 94%,#c4a065 100%);
  box-shadow:inset 0 0 40px rgba(110,70,25,.35),0 10px 28px rgba(0,0,0,.45)}
.mep-shell .mep-parch-sheet h1{margin:0;font-size:30px;letter-spacing:.06em;color:#4a2c12;font-weight:700}
.mep-shell .mep-parch-role{font-size:14px;letter-spacing:.14em;text-transform:uppercase;color:#7a4d1f;margin-top:4px}
.mep-shell .mep-parch-place{font-size:13px;font-style:italic;color:#6b4c2c;margin-bottom:10px}
.mep-shell .mep-parch-sheet p{margin:8px 0 14px}
.mep-shell .mep-parch-thumbs{display:grid;grid-template-columns:repeat(3,1fr);gap:9px;margin:0 0 14px}
.mep-shell .mep-parch-thumb{padding:4px 4px 3px;border:1px solid rgba(90,55,20,.45);background:rgba(255,248,230,.55);border-radius:3px;cursor:pointer;color:#4a2c12;font:12px/1.3 Georgia,serif;box-shadow:0 2px 4px rgba(60,35,10,.25)}
.mep-shell .mep-parch-thumb img{display:block;width:100%;aspect-ratio:4/3;object-fit:cover;background:#ddd;margin-bottom:3px}
.mep-shell .mep-parch-thumb:hover,.mep-shell .mep-parch-thumb:focus-visible{background:rgba(255,252,240,.9);outline:2px solid #8a5a2a;outline-offset:1px}
.mep-shell .mep-parch-actions{display:flex;gap:10px;justify-content:center;flex-wrap:wrap}
.mep-shell .mep-parch-actions button{font:600 15px Georgia,serif;padding:10px 18px;border-radius:22px;cursor:pointer;border:1px solid #5a3415}
.mep-shell .mep-parch-go{background:#5a3415;color:#fbead0}
.mep-shell .mep-parch-book{background:transparent;color:#5a3415}
.mep-shell .mep-parch-actions button:focus-visible,.mep-shell .mep-parch-x:focus-visible,.mep-shell .mep-parch-li:focus-visible{outline:2px solid #2d6db0;outline-offset:2px}
.mep-shell .mep-parch-li{display:inline-block;margin-top:12px;font-size:13px;color:#6b3d14}
.mep-shell .mep-parch-x{position:absolute;top:20px;right:-6px;width:34px;height:34px;border-radius:50%;border:1px solid #5a3415;background:#f3e2bc;color:#4a2c12;font:20px/1 Georgia,serif;cursor:pointer;box-shadow:0 2px 5px rgba(0,0,0,.35)}
.mep-shell .mep-parch-wrap.is-rolling{background:transparent;transition:background .6s}
.mep-shell .mep-parch-wrap.is-rolling .mep-parch{animation:none}
.mep-shell .mep-parch-wrap.is-rolling .mep-parch-sheet{transform:scaleY(0);opacity:.6;transition:transform .55s cubic-bezier(.5,0,.75,0),opacity .55s}
.mep-shell .mep-parch-wrap.is-rolling .mep-parch-rod-b{transform:translateY(calc(-1 * var(--sheetH,420px)));transition:transform .55s cubic-bezier(.5,0,.75,0)}
.mep-shell .mep-parch-wrap.is-rolling .mep-parch-x{opacity:0}
.mep-shell .mep-parch-wrap.is-rolling .mep-parch{opacity:0;transition:opacity .2s .55s}
@keyframes mepParchIn{from{transform:translateY(-30px) rotate(-1.5deg);opacity:0}to{transform:none;opacity:1}}
@keyframes mepParchSway{from{transform:rotate(-.5deg)}to{transform:rotate(.5deg)}}
@media (max-width:480px){.mep-shell .mep-parch-sheet{padding:16px 14px 14px;font-size:14px}.mep-shell .mep-parch-sheet h1{font-size:24px}.mep-shell .mep-parch-role{font-size:12px}.mep-shell .mep-parch-thumb span{font-size:11px}}
@media (prefers-reduced-motion:reduce){.mep-shell .mep-parch{animation:none}.mep-shell .mep-parch-wrap.is-rolling *{transition:none!important}}

/* sealed letters: each address appears only after its seal is broken (same for all three) */
.letterseal{margin-left:auto;min-height:44px;padding:6px 14px;border:1px solid #8e2f22;border-radius:22px;background:#fbf3e2;color:#7e2a1e;font:600 13px Georgia,serif;cursor:pointer}
.letterseal:focus-visible{outline:2px solid #274d3d;outline-offset:2px}
.letterrow.is-open::before{background:radial-gradient(circle at 35% 35%,#c0533f,#7e2a1e);clip-path:polygon(0 0,45% 0,55% 45%,100% 30%,100% 100%,0 100%);}
.letterrow .letterlink{margin-left:auto}
