/* Mobile scroll ownership is the document; desktop geometry remains unchanged. */
.ops-mobile-menu,.ops-mobile-backdrop{display:none}
@media(max-width:1040px){
 html:root{height:auto!important;overflow:auto!important}
 html:root body.pacs-lovable[class],html body{height:auto!important;min-height:100dvh!important;overflow:visible!important}
 html:root body.pacs-lovable[class] .main-layout,html:root body.pacs-lovable[class] .main-layout.lv-shell,.preview-shell{display:block!important;grid-template-columns:minmax(0,1fr)!important;height:auto!important;min-height:100dvh!important;overflow:visible!important}
 html:root body.pacs-lovable[class] .content,html:root body.pacs-lovable[class] .content.lv-main,html:root body.pacs-lovable[class] #opsApplicationMain.content.lv-main,.preview-main{display:block!important;width:100%!important;min-width:0!important;margin:0!important;height:auto!important;min-height:100dvh!important;overflow:visible!important}
 html:root body.pacs-lovable[class] .main-layout>.sidebar,html:root body.pacs-lovable[class].ops-shell-page .main-layout.lv-shell>.sidebar.lv-sidebar,.preview-sidebar{display:block!important;position:fixed!important;top:62px!important;bottom:0!important;left:0!important;width:min(288px,85vw)!important;min-width:0!important;max-width:85vw!important;height:calc(100dvh - 62px)!important;min-height:0!important;overflow:auto!important;z-index:1101!important;visibility:hidden!important;transform:translateX(-100%);background:#0b1016}
 html:root body.pacs-lovable[class].ops-mobile-nav-open .main-layout>.sidebar,html:root body.pacs-lovable[class].ops-shell-page.ops-mobile-nav-open .main-layout.lv-shell>.sidebar.lv-sidebar,html body.ops-mobile-nav-open .preview-sidebar{visibility:visible!important;transform:none}
 html:root body.pacs-lovable[class] .main-layout>.sidebar .ops-side-shell,html:root body.pacs-lovable[class].ops-shell-page .main-layout.lv-shell>.sidebar.lv-sidebar .ops-side-shell{height:100%!important;min-height:0!important;padding-top:0!important;overflow:hidden!important}
 html:root body.pacs-lovable[class] .main-layout>.sidebar .ops-side-scroll,html:root body.pacs-lovable[class].ops-shell-page .main-layout.lv-shell>.sidebar.lv-sidebar .ops-side-scroll{overflow-y:auto!important;min-height:0!important;overscroll-behavior:contain!important;scrollbar-width:thin!important}
 html:root body.pacs-lovable[class] .main-layout>.sidebar :is(.ops-side-link,.sidebar-tree-group-toggle,.sidebar-tree-item),html:root body.pacs-lovable[class].ops-shell-page .main-layout.lv-shell>.sidebar.lv-sidebar :is(.ops-side-link,.sidebar-tree-group-toggle,.sidebar-tree-item){height:auto!important;min-height:44px!important;max-height:none!important}
 .ops-mobile-menu{display:inline-flex;align-items:center;justify-content:center;flex:0 0 44px;width:44px;height:44px;padding:10px;border:1px solid #3b4a5d;border-radius:5px;color:#e5edf6;background:#202b38;cursor:pointer}
 .ops-mobile-menu svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round}
 .ops-mobile-menu-standalone{position:sticky;top:8px;margin:8px 12px;z-index:1102}
 .ops-mobile-nav-open .ops-mobile-backdrop{display:block;position:fixed;inset:62px 0 0;z-index:1100;background:rgba(15,23,42,.45);border:0;padding:0;width:100%;height:calc(100dvh - 62px)}
 html:root body.ops-mobile-nav-open[class]{overflow:hidden!important}
 html:root body.pacs-lovable[class] .lv-header,.preview-topbar.ops-global-topbar{position:sticky!important;top:0!important;z-index:1102!important;padding:0 10px!important;height:auto!important;min-height:62px!important}
 .ops-global-tools{gap:6px!important}
 .ops-global-search,.preview-topbar.ops-global-topbar .ops-global-search{flex:1 1 0!important;width:auto!important;min-width:0!important;margin:0!important}
 .ops-global-search>input[type=search]{font-size:16px!important;height:44px!important;padding-left:32px!important}
 .ops-global-icon-button{flex-basis:36px}.ops-profile-trigger{height:44px}.ops-profile-copy,.ops-profile-trigger>svg,.ops-global-search>kbd{display:none!important}
 .ops-global-search-results{position:fixed!important;top:62px!important;left:10px!important;right:10px!important;max-height:calc(100dvh - 78px)!important;overflow:auto!important}
 html:root body.pacs-lovable[class] .lv-header .lv-head-row{flex-wrap:wrap!important;gap:6px!important}
 html:root body.pacs-lovable[class] .lv-header .lv-actions{flex-wrap:wrap!important;min-width:0!important}
 .ops-location-bar{height:auto!important;min-height:40px!important;padding:10px 12px!important}
 .ops-location-bar :is(.lv-title,.ops-location-path){flex-wrap:wrap!important;white-space:normal!important;line-height:1.5!important}
 html:root body.pacs-lovable[class] :is(.lv-body,.ops-body,.env-body,.backup-body,.inspection-page-body),html:root body.pacs-lovable[class] #opsApplicationMain>:is(.lv-body,.ops-body,.env-body,.backup-body){height:auto!important;min-height:0!important;overflow:visible!important;padding:12px!important}
 html:root body.pacs-lovable[class] :is(.lv-stack,.ops-stack,.ops-home-v2,.ops-workspace,.ops-panel,.ops-action-center,.ops-task-body,.ops-case-list,.ops-alerts){height:auto!important;max-height:none!important;min-height:0!important;overflow:visible!important}
 html:root body.pacs-lovable[class] :is(.ops-stack,.ops-home-v2){display:flex!important;flex-direction:column!important;gap:12px!important}
 html:root body.pacs-lovable[class] :is(.ops-workspace,.ops-management-grid,.lv-inspection-grid,.env-info-groups,.env-cluster-info-groups,.env-detail-grid){grid-template-columns:minmax(0,1fr)!important}
 html:root body.pacs-lovable[class] :is(.ops-summary-grid,.backup-summary-grid,.ops-statusbar){grid-template-columns:repeat(2,minmax(0,1fr))!important;height:auto!important}
 html:root body.pacs-lovable[class] .ops-summary-card{min-height:76px!important}
 html:root body.pacs-lovable[class] .ops-stat{min-height:88px!important;padding:14px!important}
 html:root body.pacs-lovable[class] .ops-stat-state{position:static!important;display:block!important;margin-top:5px!important}
 html:root body.pacs-lovable[class] .ops-operations-block .ops-alert-row{grid-template-columns:8px minmax(0,1fr)!important;gap:6px 10px!important;padding:12px!important}
 html:root body.pacs-lovable[class] .ops-alert-row :is(.ops-alert-issue,time){grid-column:2!important;justify-self:start!important;white-space:normal!important;overflow-wrap:anywhere}
 html:root body.pacs-lovable[class] :is(.ops-card-head,.backup-list-head,.backup-toolbar-card,.directory-head,.directory-tools,.lv-case-list-head,.lv-inspection-board-head,.lv-inspection-heading-row){height:auto!important;flex-wrap:wrap!important;gap:10px!important;min-width:0!important}
 html:root body.pacs-lovable[class] :is(.ops-card-tools,.backup-list-actions,.env-editor-actions,.directory-filters,.lv-search-form){flex-wrap:wrap!important;min-width:0!important;max-width:100%!important}
 html:root body.pacs-lovable[class] :is(.ops-table-wrap,.backup-table-wrap,.directory-table-wrap,.lv-table-wrap){display:block!important;max-width:100%!important;min-width:0!important;max-height:none!important;overflow:auto!important;scrollbar-width:thin!important;overscroll-behavior-x:contain}
 html:root body.pacs-lovable[class] .ops-table{min-width:950px!important}
 html:root body.pacs-lovable[class] .backup-table{min-width:1000px!important}
 html:root body.pacs-lovable[class] .lv-inspection-panel{min-width:0!important;min-height:0!important}
 html:root body.pacs-lovable[class] .lv-inspection-user-group{min-height:0!important}
 html:root body.pacs-lovable[class] .lv-inspection-item{grid-template-columns:minmax(0,1fr)!important;flex-wrap:wrap!important;height:auto!important}
 html:root body.pacs-lovable[class] .lv-inspection-note{width:100%!important;max-width:100%!important}
 html:root body.pacs-lovable[class] .case-form .form-row,html:root body.pacs-lovable[class] .case-form .form-row-editor{grid-template-columns:minmax(0,1fr)!important;display:grid!important;gap:8px!important}
 html:root body.pacs-lovable[class] .container{width:auto!important;max-width:100%!important;min-width:0!important;margin:12px!important;padding:14px!important}
 html:root body.pacs-lovable[class] :is(.form-field,.env-server-card,.env-info-group,.ops-card,.ops-panel,.lv-card){min-width:0!important;max-width:100%!important}
 html:root body.pacs-lovable[class] :is(input:not([type=checkbox]):not([type=radio]),textarea,select){max-width:100%;font-size:16px!important}
 html:root body.pacs-lovable[class] :is(.ops-card-tools,.backup-list-actions,.lv-actions,.actions) :is(button,a){min-height:40px!important}
 html:root body.pacs-lovable[class] :is(.master-modal,.backup-target-modal,.ops-agent-modal,.env-judgment-modal,.ops-detail-modal){width:calc(100vw - 24px)!important;max-width:calc(100vw - 24px)!important;max-height:calc(100dvh - 32px)!important;overflow:auto!important}
 .preview-content{padding:12px!important;min-width:0}
 .detail-tabs{display:flex!important;max-width:100%!important;height:auto!important;overflow-x:auto!important;overflow-y:hidden!important;flex-wrap:nowrap!important;scrollbar-width:thin!important}
 .detail-tab{flex:0 0 auto!important;min-height:44px!important}
 .preview-content :is(.grid-2,.grid-3,.grid-4,.server-facts,.hero-facts,.cluster-node-grid,.cluster-role-grid){grid-template-columns:minmax(0,1fr)!important}
 .preview-content :is(.panel,.server-card){min-width:0;max-width:100%}
 .preview-content .panel-body:has(table){overflow-x:auto}
 .preview-content table{min-width:600px}
 .preview-content :is(.capacity-title,.capacity-subtitle,.server-meta){white-space:normal!important;overflow-wrap:anywhere}
 .account-header{height:auto;min-height:64px;gap:12px;flex-wrap:wrap;padding:12px 16px}.account-header nav{gap:12px;flex-wrap:wrap}.account-main{max-width:calc(100% - 24px);margin:16px auto;min-width:0}
 html:root body.pacs-lovable[class] :is(.ops-operations-block,.lv-todo-list){flex-basis:auto!important;height:auto!important;min-height:0!important;max-height:none!important;overflow:visible!important}
 html:root body.pacs-lovable[class] .lv-content-box{overflow-x:auto;overflow-wrap:anywhere}
 html:root body.pacs-lovable[class] .lv-attach{flex-wrap:wrap;overflow-wrap:anywhere}
 html:root body.pacs-lovable[class] .directory-modal{width:calc(100vw - 24px)!important;max-height:calc(100dvh - 32px)!important;overflow:auto!important}
 html:root body.pacs-lovable[class] .directory-fields{grid-template-columns:minmax(0,1fr)!important}
 html:root body.pacs-lovable[class] .ops-deploy-controls{flex-wrap:wrap!important;min-width:0!important;max-width:100%!important;margin:0!important;box-sizing:border-box}
 html:root body.pacs-lovable[class] :is(.lv-card-head,.lv-case-list-head-left,.lv-case-list-head-right,.lv-case-pagination){flex-wrap:wrap!important;gap:10px!important;height:auto!important;min-width:0!important;max-width:100%!important}
 html:root body.pacs-lovable[class] .lv-search-form{grid-template-columns:minmax(0,1fr) auto auto!important;min-width:0!important}
 html:root body.pacs-lovable[class] .lv-search-form .lv-input{min-width:0!important;width:100%!important}
 html:root body.pacs-lovable[class] .lv-case-page-summary{white-space:normal!important}
 html:root body.pacs-lovable[class] select.ts-hidden-accessible{width:1px!important;min-width:0!important;max-width:1px!important;height:1px!important;padding:0!important;clip-path:inset(50%)!important}
 html:root body.pacs-lovable[class] :is(.ops-table-wrap,.backup-table-wrap,.directory-table-wrap,.lv-table-wrap)::before{content:'좌우로 넘겨 전체 항목을 확인하세요';display:block;position:sticky;left:0;padding:9px 12px;border-bottom:1px solid #e2e8f0;background:#f8fafc;color:#64748b;font-size:12px;white-space:normal}
 html:root body.pacs-lovable[class] .backup-body{display:flex!important;flex-direction:column!important;gap:12px!important}
 html:root body.pacs-lovable[class] .backup-summary-card{grid-column:auto!important;min-height:80px!important}
 html:root body.pacs-lovable[class] .backup-summary-card.progress-card{grid-column:1/-1!important;grid-template-columns:90px minmax(0,1fr)!important}
 html:root body.pacs-lovable[class] .backup-toolbar-card{padding:10px!important}
}
@media(max-width:600px){
 .preview-content .capacity-row{grid-template-columns:minmax(0,1fr)!important;gap:6px!important}
 html:root body.pacs-lovable[class] .lv-todo{flex-wrap:wrap!important;height:auto!important}.lv-todo-main{min-width:0!important}.lv-todo-title{white-space:normal!important;overflow-wrap:anywhere}.lv-todo-actions{margin-left:auto}
 .preview-content .metric-strip{grid-template-columns:repeat(2,minmax(0,1fr))!important}
 html:root body.pacs-lovable[class] .lv-header .lv-title{white-space:normal!important}
}
@media(max-width:1040px){
 /* CASE rows carry their own hierarchy instead of squeezing desktop columns. */
 html:root body.pacs-lovable[class].wiki-mode .lv-table-wrap:has(.lv-case-table)::before{display:none!important}
 html:root body.pacs-lovable[class].wiki-mode .lv-case-table,
 html:root body.pacs-lovable[class].wiki-mode .lv-case-table tbody{display:block!important;width:100%!important;min-width:0!important;max-width:100%!important}
 html:root body.pacs-lovable[class].wiki-mode .lv-case-table thead{display:none!important}
 html:root body.pacs-lovable[class].wiki-mode .lv-case-table tr[data-case-id]{display:grid!important;grid-template-columns:auto minmax(0,1fr) auto!important;grid-template-areas:'type product select' 'title title title' 'hospital hospital hospital' 'tags tags tags' 'date date views';gap:8px!important;padding:14px!important;min-width:0!important}
 html:root body.pacs-lovable[class].wiki-mode .lv-case-table td{display:block!important;position:static!important;width:auto!important;min-width:0!important;max-width:100%!important;height:auto!important;padding:0!important;border:0!important;white-space:normal!important;text-align:left!important}
 html:root body.pacs-lovable[class].wiki-mode .lv-case-table .ops-case-type-cell{grid-area:type}
 html:root body.pacs-lovable[class].wiki-mode .lv-case-table .ops-case-product-cell{grid-area:product;align-self:center}
 html:root body.pacs-lovable[class].wiki-mode .lv-case-table .ops-case-title-cell{grid-area:title}
 html:root body.pacs-lovable[class].wiki-mode .lv-case-table .ops-case-hospital-cell{grid-area:hospital;display:flex!important;align-items:baseline;gap:8px;color:#526174!important}
 html:root body.pacs-lovable[class].wiki-mode .ops-case-hospital-cell::before{content:'병원';flex:0 0 auto;color:#788494;font-size:12px}
 html:root body.pacs-lovable[class].wiki-mode .lv-case-table .ops-case-tags-cell{grid-area:tags}
 html:root body.pacs-lovable[class].wiki-mode .lv-case-table .lv-case-created-col{grid-area:date}
 html:root body.pacs-lovable[class].wiki-mode .lv-case-table .ops-case-views-cell{grid-area:views;color:#788494!important;justify-self:end;font-size:12px!important}
 html:root body.pacs-lovable[class].wiki-mode .ops-case-views-cell::before{content:'조회 ';font-size:12px}
 html:root body.pacs-lovable[class].wiki-mode .lv-case-table .lv-list-text{display:block!important;width:auto!important;max-width:100%!important;white-space:normal!important;overflow:visible!important;overflow-wrap:anywhere!important;line-height:1.55!important}
 html:root body.pacs-lovable[class].wiki-mode .lv-case-table .lv-case-title{font-size:14px!important;font-weight:650!important}
 html:root body.pacs-lovable[class].wiki-mode .lv-case-table .lv-list-tags{max-height:none!important;gap:6px;overflow-wrap:anywhere}
 html:root body.pacs-lovable[class].wiki-mode .lv-case-table .lv-case-select-cell{display:none!important;grid-area:select}
 html:root body.pacs-lovable[class].wiki-mode.case-delete-mode .lv-case-table .lv-case-select-cell{display:flex!important;align-items:center;justify-content:center;min-width:44px!important;min-height:44px!important}
 html:root body.pacs-lovable[class].wiki-mode .lv-case-list-footer{grid-template-columns:minmax(0,1fr)!important;gap:12px!important}
 html:root body.pacs-lovable[class].wiki-mode .lv-case-delete-actions{flex-wrap:wrap!important}
 html:root body.pacs-lovable[class].home-mode .ops-case-row{flex:0 0 auto!important;height:auto!important;min-height:0!important;gap:8px!important}
 html:root body.pacs-lovable[class].home-mode .ops-case-row :is(strong,.ops-case-site){display:block!important;flex:0 0 auto!important;max-height:none!important;overflow:visible!important;white-space:normal!important;overflow-wrap:anywhere;line-height:1.5!important}
}
