/* Loaded last: mobile workspace overrides, preserving desktop layouts. */
.mobile-menu-button,.mobile-nav-close,.mobile-bottom-nav,.mobile-backdrop{display:none}
.pc-only-note{display:block;color:var(--muted);font-size:12px;white-space:normal;margin:6px 0}
.mobile-table-scroll{max-width:100%;overflow:auto;overscroll-behavior-x:contain}
@media(max-width:1024px){
 body .sidebar{position:fixed;inset:0 auto 0 0;width:min(320px,88vw);height:100dvh;padding:16px;z-index:220;background:var(--sidebar-bg,#fff);transform:translateX(-105%);visibility:hidden;display:flex;overflow:hidden}
 body.mobile-menu-open .sidebar{transform:translateX(0);visibility:visible}
 .mobile-menu-button,.mobile-nav-close{display:inline-flex;min-height:44px;align-items:center;justify-content:center}
 .mobile-nav-close{align-self:flex-end}
 body.mobile-menu-open{overflow:hidden}
 .mobile-backdrop:not([hidden]){display:block;position:fixed;inset:0;background:#0008;z-index:210;border:0;width:100%;height:100%}
 body .sidebar>#nav{display:block;overflow-y:auto;min-height:0;flex:1}
 body .sidebar .nav-group-items:not([hidden]){display:block}
 body .sidebar .nav-fixed{display:block}
 body .sidebar a,body .sidebar .nav-group-toggle{min-height:44px}
 body .sidebar .workspace,body .sidebar .future,body .sidebar .local{display:none}
 body .shell{margin-left:0;width:100%}
 body .shell-content{display:block}
 body .shell-content>main{padding:18px 14px calc(88px + env(safe-area-inset-bottom));width:100%;min-width:0}
 body .topbar{padding:8px 12px;min-height:60px;gap:8px;position:relative;align-items:center}
 .topbar>span{flex:1;min-width:0}
 .topbar-actions{width:100%;flex-wrap:wrap;justify-content:space-between}
 #user-account{flex:1;min-width:0;gap:8px}
 .seller-switcher{flex-wrap:wrap;max-width:100%}
 .seller-switch-label{min-width:0}
 body .seller-switch-label select{min-width:0;max-width:100%;width:100%}
 .mobile-bottom-nav{position:fixed;bottom:0;left:0;right:0;display:flex;z-index:95;background:var(--panel,#fff);border-top:1px solid var(--line);padding:6px 4px calc(6px + env(safe-area-inset-bottom));justify-content:space-around}
 .mobile-bottom-nav a{flex:1;text-align:center;padding:14px 2px;color:var(--muted);text-decoration:none;font-size:13px;border-radius:8px}
 .mobile-bottom-nav a.active{background:var(--hover,#e7f6ef);color:var(--teal);font-weight:700}
 body #moa-ai-fab{bottom:calc(76px + env(safe-area-inset-bottom))}
 body .moa-ai-rail{display:none;position:fixed;top:auto;bottom:calc(130px + env(safe-area-inset-bottom));left:12px;right:12px;width:auto;max-height:calc(100dvh - 160px);overflow:auto;z-index:100}
 body .moa-ai-rail.open{display:block}
 body .datalab-rail{display:none}
 .heading,.card-head,.modal-header{flex-wrap:wrap;gap:12px;align-items:flex-start}
 .heading>.actions{width:100%}
 .heading h1{font-size:24px}
 .card{padding:16px;min-width:0}
 .btn,.btn.small,button,select,input:not([type=checkbox]):not([type=radio]){min-height:44px}
 input,select,textarea{font-size:16px!important;max-width:100%;min-width:0}
 input[type=checkbox],input[type=radio]{width:22px;height:22px;flex-shrink:0}
 .filters input,.filters select{min-width:0;flex:1 1 150px}
 .actions{gap:8px;max-width:100%}
 .split,.editor-layout,.v2-editor-layout,.mr-coupang-grid,.tx-account-grid,.oa-account-grid{grid-template-columns:minmax(0,1fr)!important}
 .table-wrap,.op-table,.mobile-table-scroll{width:100%;max-width:100%;overflow:auto;-webkit-overflow-scrolling:touch}
 .mobile-table-scroll:focus{outline:2px solid var(--teal);outline-offset:2px}
 .mobile-table-scroll:before{content:'↔ 표를 좌우로 밀어 전체 항목을 확인하세요';display:block;position:sticky;left:0;font-size:12px;color:var(--muted);padding:8px 0;white-space:normal;width:min(260px,100%)}
 table{min-width:600px}
 td,th{padding:12px 10px}
 dialog{width:calc(100vw - 20px)!important;max-width:calc(100vw - 20px)!important;max-height:calc(100dvh - 24px)!important;padding:14px!important;overflow:auto;box-sizing:border-box}
 dialog .modal-header{position:sticky;top:-14px;background:var(--panel,#fff);z-index:2;padding:12px 0}
 #toast{max-width:calc(100vw - 24px);bottom:calc(80px + env(safe-area-inset-bottom));overflow-wrap:anywhere}
 .v2-preview{position:relative;max-width:100%;overflow:auto}
 .calc{flex-wrap:wrap;gap:14px}
}
@media(max-width:600px){
 .form-grid,.v2-editor-layout .section-editor .form-grid,.op-filters,.detail-grid,.ai-draft-review-grid{grid-template-columns:minmax(0,1fr)!important}
 .metrics,.op-summary,.product-context{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px}
 .metric{padding:13px}.metric .value{font-size:23px;overflow-wrap:anywhere}
 .heading .actions>.btn{flex:1 1 140px}
 .field,.form-grid>*{min-width:0}
 .tx-account,.oa-account{flex-wrap:wrap}
 .image-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 .action-center-row{grid-template-columns:1fr}.action-center-go{grid-column:1}
}
html.mobile-device .moa-ai-rail,html.mobile-device #moa-ai-fab,html.mobile-device .datalab-rail{display:none!important}
html.mobile-device .shell-content{display:block}
@media(max-width:1024px){body .moa-ai-rail,body .moa-ai-rail.open,body #moa-ai-fab,body .datalab-rail{display:none!important}}
[aria-disabled=true]{opacity:.55;cursor:not-allowed}
/* Explicit rows prevent account/search content from squeezing the breadcrumb. */
@media(max-width:1024px){
 body .topbar{display:grid;grid-template-columns:auto minmax(0,1fr) auto;height:auto;min-height:0;align-items:center;gap:10px;padding:10px 12px}
 body .topbar>.mobile-menu-button{grid-column:1;grid-row:1;white-space:nowrap}
 body .topbar>span{grid-column:2;grid-row:1;min-width:0;line-height:1.5;overflow-wrap:normal;word-break:keep-all}
 body .topbar>span b{margin:0 4px}
 body .topbar>.topbar-actions{display:contents}
 body .topbar #theme-toggle{grid-column:3;grid-row:1;white-space:nowrap;min-width:60px;min-height:44px}
 body .topbar #user-account{display:grid;grid-column:1/-1;grid-row:2;grid-template-columns:minmax(0,1fr) auto auto;width:100%;min-width:0;gap:8px;align-items:center;justify-content:stretch}
 body .topbar #seller-switcher{grid-column:1/-1;display:flex;flex-wrap:wrap;justify-content:flex-start;align-items:center;width:100%;min-width:0;gap:8px}
 body .topbar .seller-current{flex:1 1 170px;line-height:1.5;word-break:keep-all;overflow-wrap:break-word}
 body .topbar #seller-switcher>.btn{flex:0 0 auto;white-space:nowrap}
 body .topbar .seller-switch-label{display:flex;flex:1 1 100%;width:100%;min-width:0;white-space:nowrap;gap:8px}
 body .topbar .seller-switch-label select{flex:1;min-width:0;width:0;max-width:none}
 body .topbar .current-user{min-width:0;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.5}
 body .topbar #account-settings,body .topbar #logout{white-space:nowrap;word-break:keep-all;padding:9px 10px}
 body .topbar #global-search{grid-column:1/-1;grid-row:3;display:grid;grid-template-columns:minmax(0,1fr) auto;min-width:0;width:100%;max-width:none;margin:0;gap:8px}
 body .topbar #global-search input{width:100%;min-width:0;max-width:none;margin:0}
 body .topbar #global-search button{white-space:nowrap}
}
/* Override shared sidebar link alignment for the five mobile tabs. */
@media(max-width:1024px){
 body .mobile-bottom-nav{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:4px;align-items:center;padding:6px max(8px,env(safe-area-inset-right)) calc(6px + env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left))}
 body .mobile-bottom-nav a{display:flex;justify-content:center;align-items:center;min-width:0;width:100%;height:48px;min-height:48px;margin:0;padding:0 4px;gap:0;line-height:1.2;white-space:nowrap;text-align:center;border-radius:10px;box-sizing:border-box}
}
