/* Shared interaction rules; this sheet owns the mobile app layout. */
.ly-mobile-header,.ly-mobile-bottom{display:none}
[hidden],#lyMobileNav[hidden],.ls-compare-rail[hidden],#lsAccept[hidden]{display:none!important}
.ly-menu-open{overflow:hidden}
#lyMobileNav{position:fixed;inset:0;z-index:2000}
.ly-menu-backdrop{position:absolute;inset:0;background:#0009;border:0;width:100%;height:100%}
#lyMobileNav nav{position:relative;width:min(360px,90vw);height:100dvh;background:var(--panel,#19120f);color:var(--cream,#fff);padding:calc(12px + env(safe-area-inset-top)) 16px max(24px,env(safe-area-inset-bottom));overflow-y:auto;overscroll-behavior:contain;box-shadow:12px 0 40px #0005}
.ly-menu-heading{display:flex;justify-content:space-between;align-items:center;padding-bottom:12px}
.ly-menu-heading button{width:48px;height:48px;border:1px solid var(--line);border-radius:12px;background:transparent;color:inherit;font-size:24px}
.ly-menu-links section{display:grid;gap:4px;border-top:1px solid var(--line);padding:12px 0}
.ly-menu-links h3{font-size:14px;color:var(--muted);margin:0;padding:8px 12px}
.ly-menu-links button{min-height:48px;text-align:left;border:0;border-radius:10px;background:transparent;color:inherit;font:inherit;font-size:16px;padding:10px 14px}
.ly-menu-links button[aria-current=page]{background:var(--rose,#e7b299);color:#201510}
.ls-caption{display:none!important}
.ls-mode-switch{display:flex;gap:8px;justify-content:center;margin:8px 0}
.ls-mode-switch .btn{flex:1;min-height:44px}
.ls-mode-switch [aria-pressed=true]{background:var(--rose);color:#201510}
.ls-transform .ls-transform-size,.ls-transform .ls-transform-rotate{pointer-events:none;opacity:0}
.ls-transform.selected .ls-transform-size,.ls-transform.selected .ls-transform-rotate,.ls-transform:focus-within .ls-transform-size,.ls-transform:focus-within .ls-transform-rotate{pointer-events:auto;opacity:1}
.ls-transform-move{z-index:2}
.ls-compare-rail{position:relative;display:flex;justify-content:space-between;align-items:center;height:48px;margin:4px 24px;border-radius:24px;background:var(--panel2);padding:0 12px;font-size:14px;color:var(--muted);isolation:isolate}
.ls-compare-rail:before{content:'';position:absolute;left:0;right:0;top:50%;height:1px;background:var(--line);z-index:-1}
.ls-compare-rail #lsHandle{top:50%;width:44px!important;height:44px!important;min-height:44px!important;min-width:44px!important;padding:0!important;font-size:20px!important;border:1px solid var(--rose);background:var(--panel);color:var(--cream);box-shadow:none}
.ls-zoom-details{font-size:14px;margin:4px 0}.ls-zoom-details summary{min-height:44px;display:flex;align-items:center;cursor:pointer}.ls-zoom-details summary:before{content:'＋';margin-right:8px}.ls-zoom-details[open] summary:before{content:'−'}
#lsCatalog .ls-styles{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));overflow:visible;gap:12px;scroll-snap-type:none}
#lsCatalog .ls-effect{width:100%;min-width:0;min-height:110px;margin:0}
#lsCatalog .ls-thumb,#lsCatalog .ls-thumb img{height:78px}
.ls-dock-heading{flex-wrap:wrap;gap:12px}.ls-colors[role=group]{display:flex;gap:6px}.ls-colors button{min-height:44px}
.schedule-summary{margin:16px 0}.schedule-summary>summary,.schedule-filters>summary{padding:12px;min-height:44px;cursor:pointer;font-size:14px}
.schedule-filters{min-width:0}.schedule-filter-fields{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;padding:12px;border:1px solid var(--line);border-radius:12px;background:var(--panel)}
.schedule-filter-fields label{min-width:0}.schedule-filter-fields input,.schedule-filter-fields select{width:100%}
.schedule-toolbar{flex-wrap:wrap}.schedule-filters[open]{flex-basis:100%}
.mg-option-copy{display:block}.mg-reference-card.selected{box-shadow:inset 0 0 0 3px var(--rose)}
.mg-client-latest{display:flex;gap:12px;align-items:center;margin:12px 0;padding:12px;border:1px solid var(--line);border-radius:12px}.mg-client-latest:empty{display:none}.mg-client-latest canvas{width:72px;height:88px;object-fit:cover;object-position:center 25%;border-radius:8px}.mg-client-latest p{font-size:14px;margin:4px 0 8px}
.mg-advisor-disclosure{margin:0 0 16px}.mg-advisor-disclosure>summary{min-height:44px;padding:12px;cursor:pointer;color:var(--rose);font-size:14px}
.mg-reference-card:disabled{opacity:1!important;cursor:wait}
.mg-reference-card{position:relative}.mg-reference-card.selected .mg-option-copy:after{content:'✓';position:absolute;top:6px;right:10px;font-size:16px}.mg-observe-help{order:5;font-size:14px;padding:12px 0}.mg-observe-help summary{min-height:44px;cursor:pointer}
:where(button,a,input,select,textarea,summary):focus-visible{outline:2px solid var(--rose,#e7b299);outline-offset:3px}
@media(max-width:800px){
 body:has(.app-shell){padding-top:calc(56px + env(safe-area-inset-top))!important;padding-bottom:calc(72px + env(safe-area-inset-bottom))}
 html[data-panel-theme=dark] body:has(.app-shell){--muted:#cbb9ac}
 html[data-panel-theme]:not([data-panel-theme=dark]) .ls-mode-switch [aria-pressed=true],html[data-panel-theme]:not([data-panel-theme=dark]) .ly-menu-links button[aria-current=page]{color:#fff}
 .ly-mobile-header{display:flex;position:fixed;inset:0 0 auto;height:calc(56px + env(safe-area-inset-top));padding:env(safe-area-inset-top) 16px 0;align-items:center;gap:10px;background:var(--panel,#17110e);color:var(--cream,#fff);border-bottom:1px solid var(--line);z-index:1500}
 .ly-mobile-header button{height:44px;min-width:44px;display:flex;align-items:center;justify-content:center;border:0;border-radius:10px;background:transparent;color:inherit;font-size:22px}.ly-mobile-header button span{display:none}.ly-mobile-header img{width:80px;height:44px;object-fit:contain}
 #lyMobileTitle{margin-left:auto;font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 .ly-mobile-bottom{display:grid;grid-template-columns:repeat(4,1fr);position:fixed;inset:auto 0 0;min-height:64px;padding:4px 8px max(4px,env(safe-area-inset-bottom));background:var(--panel,#17110e);border-top:1px solid var(--line);z-index:1400}
 .ly-mobile-bottom button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;min-width:0;min-height:56px;padding:4px;border:0;border-radius:12px;background:transparent;color:var(--muted);font:inherit;font-size:12px}.ly-mobile-bottom button>span{font-size:22px;line-height:24px}.ly-mobile-bottom button[aria-current=page]{color:var(--rose);background:var(--accent-soft,#e7b29914)}
 body:has(#modal.show) .ly-mobile-bottom{display:none}
 .app-shell{display:block!important}.main>.top,.bottom-nav,.fab{display:none!important}.main{min-width:0}.screen{padding:16px 16px 24px!important;min-width:0}.screen-head{align-items:center;flex-wrap:wrap;gap:12px;margin-bottom:16px}.screen-head h1{font-size:26px!important;margin:0}.screen-head p{font-size:14px!important}.screen .btn,.modal .btn{min-height:48px;font-size:14px}
 .screen input,.screen select,.modal input:not([type=range]),.modal select,.modal textarea{font-size:16px!important;max-width:100%}.screen p,.modal p{line-height:1.5}.screen .card{border-radius:14px}.screen .panel{padding:16px}.grid2,.grid3,.grid4,.mg-field{min-width:0}
 .demo-strip{font-size:12px;padding:4px 16px;line-height:1.4;position:static!important}
 #modal.modal-bg{inset:calc(56px + env(safe-area-inset-top)) 0 0!important;height:auto!important;padding:0!important;align-items:stretch!important}
 #modal>.modal,#modal>.modal:has(#mgRoot){display:flex;flex-direction:column;width:100%!important;max-width:100%!important;height:100%!important;max-height:100%!important;margin:0!important;border-radius:0!important;padding:0!important;overflow:hidden!important}
 #modal .modal-head{flex:none;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:4px 16px!important;margin:0!important;background:var(--panel);border-bottom:1px solid var(--line)}#modal .modal-head h2{font-size:16px!important;margin:0!important}#modal .modal-head .close{width:44px;height:44px;min-width:44px;font-size:22px}
 #modalBody{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:12px 16px max(16px,env(safe-area-inset-bottom));scrollbar-gutter:auto}
 body:has(#modal.show){overflow:hidden}
 #screen-home.active{display:flex;flex-direction:column;gap:16px}#screen-home>.screen-head{order:0;margin:0}#screen-home>.dashboard{order:1;display:grid;gap:16px}#screen-home>#stats{order:2;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}#screen-home>#aiBrief{order:3;margin:0;padding:16px;min-height:0}#screen-home .stat{min-height:0;padding:16px}#screen-home .stat b{font-size:26px;margin:8px 0}#screen-home .stat span,#screen-home .stat small{font-size:14px}#screen-home .eyebrow,#screen-home .screen-head p{display:none}#screen-home .action-item{padding:12px 0}#screen-home .appt-row{gap:8px;flex-wrap:wrap}#screen-home .appt-row .avatar{display:none}#screen-home .appt-row strong{font-size:16px}#screen-home .appt-row small{font-size:14px}
 #screen-agenda .screen-head{display:flex!important;flex-direction:row!important;justify-content:space-between;flex-wrap:nowrap}#screen-agenda .screen-head .btn{width:auto!important;padding:10px 14px}#screen-agenda .schedule-toolbar{display:grid;grid-template-columns:1fr auto;gap:8px;padding:0;margin:0 0 12px;background:none;border:0;position:static}
 #screen-agenda .schedule-date-nav{gap:4px}#screen-agenda .schedule-date-nav .btn{min-width:44px;padding:8px}#screen-agenda .schedule-toolbar>label{font-size:0;min-width:0}#screen-agenda .schedule-toolbar>label input{font-size:16px;width:150px;min-height:48px;margin:0;padding:8px}
 #screen-agenda .schedule-filters{grid-column:1/-1}#screen-agenda .schedule-filters>summary{padding:8px 0;color:var(--muted)}#screen-agenda .schedule-filter-fields{grid-template-columns:1fr}#screen-agenda .schedule-views{display:none}
 #screen-agenda .schedule-panel{display:block!important;padding:12px;min-width:0}#screen-agenda .schedule-heading{margin-bottom:12px;gap:8px;align-items:center}#screen-agenda .schedule-heading h2{font-size:18px;margin:0}#screen-agenda .schedule-heading p,#screen-agenda .schedule-legend{display:none}#scheduleContent{display:block!important;min-height:100px}
 #screen-agenda .schedule-list-row{display:grid;grid-template-columns:48px minmax(0,1fr);gap:8px;padding:14px 0}#screen-agenda .schedule-list-row>time{font-size:16px}#screen-agenda .schedule-list-row strong{font-size:16px}#screen-agenda .schedule-list-row small{font-size:14px}#screen-agenda .schedule-list-row>.btn{grid-column:2;justify-self:start;margin-top:4px}
 #screen-agenda .story-banner{margin-top:16px;padding:12px;background:none;border-radius:12px;align-items:center;gap:12px}#screen-agenda .story-banner p{display:none}#screen-agenda .story-banner strong{font-size:14px}#screen-agenda .story-banner .btn{min-width:110px}#screen-agenda .schedule-summary .ops-summary{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}#screen-agenda .ops-card{padding:12px;min-height:0}
 #mgRoot .mg-assessment-layout{display:flex;flex-direction:column;gap:8px}#mgRoot .mg-observation,#mgRoot .mg-decisions{width:100%;min-width:0}#mgRoot .mg-photo-stage{height:clamp(180px,24dvh,220px)!important;max-height:220px!important}#mgRoot .mg-photo-stage canvas{object-fit:cover;object-position:center 25%;height:100%!important}
 #mgRoot .mg-visual-heading h3{font-size:24px;margin:4px 0}#mgRoot .mg-visual-heading>small{font-size:12px}#mgRoot .mg-visual-heading details{font-size:14px}
 #mgRoot .mg-photo-options{font-size:14px;margin:0}#mgRoot .mg-photo-options summary{min-height:44px;display:flex;align-items:center}#mgRoot .mg-eye-label{font-size:14px;background:none;color:var(--rose);padding:0;margin:0}#mgRoot .mg-swap{font-size:14px;padding:8px 0;min-height:44px;margin:0}
 #mgRoot .mg-reference-options{display:grid!important;grid-template-columns:1fr!important;gap:8px;overflow:visible;padding:0}
 #mgRoot .mg-reference-card{display:grid;grid-template-columns:76px minmax(0,1fr);align-items:center;gap:12px;text-align:left;width:100%!important;min-width:0!important;max-width:none!important;flex:none!important;padding:6px;border-radius:12px}
 #mgRoot .mg-reference-card img{width:76px;height:76px;aspect-ratio:1;object-fit:cover;border-radius:8px}#mgRoot .mg-reference-card strong{font-size:16px;white-space:normal;min-height:0!important;margin:0 0 4px}#mgRoot .mg-reference-card small{display:block;font-size:14px;margin:0}
 #mgRoot .mg-tap-hint{font-size:14px;margin:0 0 8px}#mgRoot .mg-decisions{display:flex;flex-direction:column}#mgRoot .mg-decisions>.mg-measures{order:3;margin-top:8px}#mgRoot .mg-choice-tools{order:4}#mgRoot .mg-unassessed{font-size:14px;margin:8px 0}
 #mgRoot footer{position:sticky;bottom:-16px;background:var(--panel);border-top:1px solid var(--line);padding:12px 0 max(12px,env(safe-area-inset-bottom));gap:8px;z-index:20}#mgRoot footer .btn{font-size:14px!important;min-height:48px;white-space:normal!important}#mgRoot footer #mgNext{flex:1}#mgRoot footer #mgSave,#mgRoot footer #mgHistory{display:none}
 #modalBody:has(#mgRoot){padding-bottom:calc(96px + env(safe-area-inset-bottom))}#mgRoot footer{position:fixed;left:0;right:0;bottom:0;padding:12px 16px max(12px,env(safe-area-inset-bottom));margin:0}#mgRoot:has(.mg-visual-assessment) footer{position:static;margin:0;padding:8px 0}#modalBody:has(.mg-visual-assessment){padding-bottom:16px}#mgRoot:has(.mg-visual-assessment) #mgBack{width:100%}#mgRoot .mg-answer-grid{grid-template-columns:1fr;gap:8px}#mgRoot .mg-answer small{font-size:14px}#mgRoot .mg-answer strong{font-size:16px}#mgRoot .mg-final-photo{max-height:220px!important}#mgRoot .mg-final-eye{padding:14px}#mgRoot .mg-final-model{width:140px;max-width:100%;float:none;margin:0 0 12px}#mgRoot .mg-final-eye dt,#mgRoot .mg-final-eye dd{font-size:14px}
 #mgSimulator .ls-editor{display:flex;flex-direction:column;gap:12px;width:100%;max-width:none}#mgSimulator .ls-photo-column{position:relative;top:auto;z-index:auto;background:var(--panel,#17110e);padding:0;width:100%;margin:0}
 #mgSimulator .ls-stage{width:100%;max-width:100%;margin:0;flex:none;overflow:visible}#mgSimulator .ls-stage canvas{display:block;max-height:none!important;height:auto!important;width:100%!important;max-width:100%!important}#mgSimulator .ls-view-frame{display:flex;align-items:center;justify-content:center;width:100%!important;height:34dvh;max-width:100%;border-radius:12px}
 #mgSimulator .ls-controls-column{width:100%;gap:12px}#mgSimulator .ls-dock{padding:0;border:0;background:none;border-radius:0}#mgSimulator .ls-dock-heading{display:grid;gap:8px}#mgSimulator .ls-dock-heading small{display:none}#mgSimulator .ls-dock-heading strong{font-size:14px}#mgSimulator .ls-colors{justify-content:flex-start}
 #mgSimulator .ls-view-controls{padding:0!important;margin:0!important;background:none!important;border:0!important}#mgSimulator .ls-zoom-row button{width:44px!important;height:44px!important;min-width:44px!important;min-height:44px!important;padding:0!important}#mgSimulator .ls-zoom-row label{font-size:14px!important}#mgSimulator .ls-zoom-row input{min-height:44px}#mgSimulator .ls-view-controls p{font-size:14px}
 #mgSimulator .ls-category-tabs{display:flex;flex-wrap:wrap;overflow:visible;gap:6px;padding:12px 0}#mgSimulator .ls-category-tabs button{min-height:44px;padding:8px 12px;font-size:14px}#mgSimulator .ls-catalog-nav{margin:0 0 8px;gap:8px}#mgSimulator .ls-catalog-nav strong{font-size:16px}
 #mgSimulator #lsCatalog .ls-styles{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;padding:0;margin:0}#mgSimulator #lsCatalog .ls-effect{min-width:0;min-height:112px;width:100%;padding:8px;flex:none}#mgSimulator #lsCatalog .ls-thumb,#mgSimulator #lsCatalog .ls-thumb img{height:76px}#mgSimulator #lsCatalog .ls-effect strong{font-size:14px}
 #mgSimulator .ls-share{margin:0;font-size:14px;min-height:48px}#mgSimulator .ls-disclaimer{font-size:14px}#mgSimulator #lsStatus:empty{display:none}#mgSimulator #lsStatus{font-size:14px}#mgSimulator .ls-adjust-shortcut{min-height:48px;font-size:14px;margin-top:12px}#mgSimulator #lsDoneAdjust{display:none!important}
 .ls-transform .ls-transform-move{inset:auto;left:50%;top:50%;width:max(100%,44px);height:max(100%,44px);min-width:44px!important;min-height:44px!important;transform:translate(-50%,-50%)}
 .ls-transform-size,.ls-transform-rotate{width:44px!important;height:44px!important;min-width:44px!important;min-height:44px!important;font-size:20px!important}.ls-transform-size{right:-48px!important;bottom:-52px!important}.ls-transform-rotate{left:-48px!important;bottom:-52px!important}
 .mg-actions{flex-wrap:wrap;gap:8px}.mg-actions .btn{flex:1 1 auto}.screen table{max-width:100%}.screen .table-wrap{overflow-x:auto}
}
@media(prefers-reduced-motion:no-preference){.mg-reference-card,.ls-effect,.ly-mobile-bottom button{transition:background-color .15s,border-color .15s,box-shadow .15s}.mg-reference-card:active,.ls-effect:active{transform:scale(.99)}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto!important}*,*:before,*:after{animation-duration:.01ms!important;transition-duration:.01ms!important;scroll-behavior:auto!important}}

/* Compact eye editor and guided capture */
.mg-length-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:8px}
.mg-common-fields{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:16px}
.mg-eye-editor h3{font-size:16px;margin:12px 0}.mg-eye-editor h3 small{display:block;font-size:12px;font-weight:400;color:var(--muted)}
.mg-eye-editor .mg-field{min-width:0;margin:0}.mg-eye-editor input,.mg-eye-editor select{min-width:0;width:100%;min-height:44px;padding:10px}
#mgTechnicalPreview svg{display:block;width:100%;max-height:180px;margin:8px auto}
.mg-common-note{font-size:12px;line-height:1.5;color:var(--muted)}
.mg-eye-next{margin:10px 0 14px;padding:12px 14px;border-radius:12px;background:var(--rose,#e7b49a);color:var(--bg,#17110e);font-weight:800;line-height:1.4}
.mg-zone-exceptions,.mg-map-tools{margin-top:12px;border-top:1px solid var(--line);padding-top:8px}
.mg-zone-exceptions summary,.mg-map-tools summary{padding:12px 0;cursor:pointer;font-size:14px}
.mg-zone-row{display:grid;grid-template-columns:60px 1fr 1fr;gap:10px;align-items:center;padding:10px 0;border-top:1px solid var(--line)}
.mg-zone-row strong{font-size:13px}.mg-zone-row label{font-size:12px}
.ly-camera{position:fixed;inset:0;z-index:3000;background:#17110e;color:#fff;display:flex;flex-direction:column;padding:env(safe-area-inset-top) 16px env(safe-area-inset-bottom);overflow:auto}
.ly-camera header,.ly-camera footer{display:flex;gap:10px;align-items:center;justify-content:center;padding:12px 0;flex-shrink:0}.ly-camera header{justify-content:space-between}
.ly-camera button,.ly-camera footer label{border:1px solid #806c60;background:#29201a;color:#fff;border-radius:12px;min-height:44px;padding:10px 16px;font:inherit;cursor:pointer}.ly-camera button:disabled{opacity:.5}
.ly-camera [data-capture],.ly-camera [data-use]{background:#e7b49a;color:#17110e}
.ly-camera p{font-size:14px;text-align:center;max-width:440px;margin:0 auto 12px}
.ly-camera-frame{position:relative;aspect-ratio:4/5;width:min(100%,400px,52dvh);max-height:65dvh;flex-shrink:0;margin:auto;overflow:hidden;border-radius:16px;background:#090909}
.ly-camera video,.ly-camera img{width:100%;height:100%;object-fit:cover;display:block}
.ly-camera-guide{position:absolute;inset:8% 12%;border:1px dashed #fff9;border-radius:48%;pointer-events:none}
.ly-camera-guide span{position:absolute;top:37%;width:30%;height:7%;border-bottom:3px solid #e7b49a;border-radius:50%;box-shadow:0 2px 1px #0007}.ly-camera-guide span:first-child{left:9%}.ly-camera-guide span:last-child{right:9%}
.ly-camera [hidden]{display:none!important}.ly-camera input{max-width:180px}.ly-camera footer{flex-wrap:wrap}
@media(max-width:767px){
 .ly-mobile-header img{width:106px}.ly-mobile-header button{margin-left:0}
 .ly-mobile-bottom [data-ly-screen="mapping"]{color:var(--rose,#e7b49a);font-weight:800;position:relative}
 .ly-mobile-bottom [data-ly-screen="mapping"] span{display:grid;place-items:center;width:32px;height:32px;margin:-8px auto 1px;border-radius:50%;background:var(--rose,#e7b49a);color:var(--bg,#17110e);box-shadow:0 0 0 4px var(--panel,#17110e)}
 #mgRoot.mg-compact-map>header{padding:0 0 12px!important;margin-bottom:12px!important}
 #mgRoot.mg-compact-map>header h2{font-size:17px!important;margin:4px 0!important}
 #mgRoot.mg-compact-map>header small{display:none}
 #mgRoot.mg-compact-map>header p{font-size:13px;margin:4px 0}
 #mgRoot.mg-compact-map>header progress{margin:8px 0!important;height:3px}
 .mg-eye-tabs .mg-actions{display:grid!important;grid-template-columns:1fr 1fr!important;gap:8px!important}
 .mg-eye-tabs button{font-size:13px!important;padding:10px 6px!important;min-width:0!important}
 .mg-length-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
 .mg-length-grid label,.mg-common-fields label{font-size:12px}
 #mgTechnicalPreview svg{max-height:155px!important}
 .mg-common-fields{gap:8px}.mg-zone-row{grid-template-columns:48px 1fr 1fr;gap:6px}
}

@media(max-width:767px){#mgRoot.mg-compact-map .mg-content{padding-top:0}.mg-eye-tabs .mg-actions{margin:0 0 8px!important}}
