/* Mobile layout only. Desktop typography and authored content stay intact. */
@media (max-width:720px), (max-width:960px) and (max-height:500px){
 body.storefront :is(.table-wrap,.board-table-wrap),body.admin-panel :is(.table-container,.table-wrap){max-width:100%;min-width:0;overflow-x:auto;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch}
 body.storefront .board-table thead th,body.storefront .account-content table thead th,body.admin-panel .data-table thead th{white-space:nowrap;word-break:keep-all;overflow-wrap:normal}
 body.storefront .board-table :is(th,td){padding-left:10px;padding-right:10px}
 body.storefront .board-table .table-empty,body.storefront .board-table td.empty{white-space:normal;text-align:left;padding:28px 16px}
 body.storefront :is(.rich-post,.legal-document,.purchase-guide-content){min-width:0;overflow-wrap:anywhere}
 body.storefront .rich-post :is(img,video){max-width:100%!important;height:auto!important;object-fit:contain}
 body.storefront .rich-post iframe{max-width:100%!important;width:100%;height:auto;aspect-ratio:16/9}
 body.storefront :is(.form-grid,.checkout-grid)>*,body.admin-panel :is(.form-grid,.metric-grid)>*{min-width:0}
 body.storefront dialog{box-sizing:border-box;max-width:calc(100vw - 24px)!important;max-height:calc(100dvh - 24px)!important;overflow:auto}
 body.storefront dialog :is(.form-actions,.dialog-actions){flex-wrap:wrap;gap:10px}
 body.storefront :is(.jodit-container,.jodit-workplace){max-width:100%;min-width:0}
 body.storefront .jodit-toolbar__box{overflow-x:auto}
 body.admin-panel .menu-toggle{display:inline-grid}
 body.admin-panel .sidebar{transform:translateX(-100%);visibility:hidden;pointer-events:none}
 body.admin-panel.sidebar-open .sidebar{transform:none;visibility:visible;pointer-events:auto}
 body.admin-panel.sidebar-open .sidebar-shade{display:block;position:fixed;inset:0;background:#10182780;z-index:29}
 body.admin-panel .topbar-left{min-width:0;flex:1}
 body.admin-panel .topbar-right{flex-shrink:0}
 body.admin-panel #breadcrumb{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 body.admin-panel .workspace,body.admin-panel.product-area .workspace{margin-left:0;min-width:0}
 body.admin-panel .workspace main{padding:22px 16px;min-width:0}
 body.admin-panel :is(.form-panel,.product-status-panel){padding:18px;min-width:0}
 body.admin-panel .metric-grid,body.admin-panel .product-status-panel .metric-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 body.admin-panel .metric{min-width:0;padding:16px 10px;overflow-wrap:anywhere}
 body.admin-panel .product-status-panel .metric strong{font-size:clamp(20px,5vw,28px);flex-wrap:wrap;line-height:1.3;gap:4px}
 body.admin-panel .product-status-panel .metric small{margin-left:0;font-size:13px}
 body.admin-panel .basic-settings{padding-right:0;padding-bottom:16px}
 body.admin-panel .basic-settings>.form-actions{position:sticky;bottom:0;top:auto;right:auto;transform:none;display:flex;justify-content:flex-end;padding:12px 0;background:#f5f6f8;z-index:5}
 body.admin-panel .basic-settings>.form-actions>.button{width:auto;white-space:nowrap;min-width:120px;box-shadow:none}
 body.admin-panel .form-grid{grid-template-columns:minmax(0,1fr)}
 body.admin-panel :is(.field,.field input,.field select,.field textarea){min-width:0;max-width:100%;box-sizing:border-box}
 body.admin-panel :is(.list-toolbar,.shop-toolbar,.product-list-top,.product-filters,.client-toolbar){flex-wrap:wrap;gap:10px}
 body.admin-panel .product-filters input,body.admin-panel .client-search{min-width:0}
 body.admin-panel .client-toolbar label{min-width:0;max-width:100%;flex:1 1 180px}
 body.admin-panel .client-toolbar :is(input,select){box-sizing:border-box;min-width:0;width:100%;max-width:100%}
 body.admin-panel :is(.product-list-actions,.editor-top-actions){flex-wrap:wrap;gap:8px;min-width:0}
 body.admin-panel .page-heading{flex-wrap:wrap;gap:14px}
 body.admin-panel .page-actions .button:not(.primary){display:inline-flex}
 body.admin-panel :is(.product-editor-tabs,.shop-tabs,.list-tabs,.version-tabs){display:flex;flex-wrap:nowrap;overflow-x:auto;max-width:100%;gap:16px}
 body.admin-panel :is(.product-editor-tabs,.shop-tabs,.list-tabs,.version-tabs)>*{flex-shrink:0;white-space:nowrap}
 body.admin-panel .product-page-form .product-editor-body{padding:18px}
 body.admin-panel :is(.jodit-container,.jodit-workplace){min-width:0;max-width:100%}
 body.admin-panel .jodit-wysiwyg{padding:12px!important}
 body.admin-panel dialog{box-sizing:border-box;max-width:calc(100vw - 24px)!important;max-height:calc(100dvh - 24px)!important;overflow:auto}
 body.admin-panel dialog :is(.dialog-heading,.dialog-body){padding:18px;min-width:0}
 body.admin-panel dialog :is(.form-actions,.dialog-actions,.runtime-footer){flex-wrap:wrap;gap:10px}
 body.admin-panel .refund-review-grid{grid-template-columns:minmax(0,1fr)}
 body.admin-panel .refund-action-options label{font-size:14px}
 body.admin-panel .release-file-info,body.admin-panel .subscription-card header{flex-wrap:wrap}
 body.admin-panel .home-button-row{grid-template-columns:24px minmax(0,1fr)}
 body.admin-panel .home-button-row :is(input,select){min-width:0}
 body.admin-panel .admin-toast{max-width:calc(100vw - 32px);white-space:normal;overflow-wrap:anywhere}
 body.admin-panel #product-navigation{transform:translateX(-300px);visibility:hidden;pointer-events:none}
 body.admin-panel.sidebar-open #product-navigation{transform:none;visibility:visible;pointer-events:auto}
 body.admin-panel.product-area .sidebar{transform:translateX(-100%)}
 body.admin-panel.product-area.sidebar-open .sidebar{transform:none;width:64px}
}
@media(max-width:380px){
 body.admin-panel .topbar{padding:0 12px}.admin-panel .topbar-right{gap:5px}.admin-panel .topbar-right .button{padding:8px;font-size:12px}
 body.admin-panel .product-status-panel .metric-grid{grid-template-columns:minmax(0,1fr)}
}
@media(max-height:500px) and (max-width:960px){
 body.storefront dialog,body.admin-panel dialog{max-height:calc(100dvh - 16px)!important;margin-top:auto;margin-bottom:auto;overflow:auto}
}

@media(min-width:721px) and (max-width:1100px){
 body.admin-panel .basic-settings{padding-right:0;padding-bottom:16px}
 body.admin-panel .basic-settings>.form-actions{position:sticky;bottom:0;top:auto;right:auto;transform:none;display:flex;justify-content:flex-end;padding:12px 0;background:#f5f6f8;z-index:5}
 body.admin-panel .basic-settings>.form-actions>.button{width:auto;white-space:nowrap;min-width:120px;box-shadow:none}
 body.admin-panel .basic-settings .form-grid{grid-template-columns:minmax(0,1fr)}
}
